@volter/twin-tiktok 0.1.18 → 0.1.19
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.
|
@@ -442,7 +442,7 @@ ${v}`:v:"",B=Function,O=`return (input) => {
|
|
|
442
442
|
${v}
|
|
443
443
|
}`,N;try{N=new B(...G,O)(...D)}catch(g){throw new s6(`this schema (generated code failed to evaluate: ${g.message})`)}if(I?.debug)N.code=C;return N.definite=K.definite,N}function K6($,I){for(let[K,J]of $.constants)if(J===I)return K;let Q=`c${$.constantCounter++}`;return $.constants.set(Q,I),Q}function B9($,I){return $.definite=!1,K6($,I)}function J6($){return`v${$.varCounter++}`}function Oc($,I){let Q=$._zod.run({value:I,issues:[]},{});if(Q&&typeof Q.then==="function")return XJ;let K=Q;return K.issues.length===0?K.value:XJ}function BI($,I,Q,K,J=!0){let Z=$.content.length,G=I.constants.size,D=I.constantCounter,v=I.varCounter;try{return U1($,I,Q,K,J)}catch(C){if(!(C instanceof s6)||!C.islandable)throw C;if($.content.length=Z,I.constants.size>G){let B=Array.from(I.constants.keys()).slice(G);for(let O of B)I.constants.delete(O)}return I.constantCounter=D,I.varCounter=v,Lc($,I,Q,K)}}function Lc($,I,Q,K){I.definite=!1;let J=K6(I,Q),Z=K6(I,Oc),G=J6(I);return $.write(`const ${G} = ${Z}(${J}, ${K});`),$.write(`if (${G} === INVALID) return INVALID;`),G}var Vc=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function Ac($,I,Q,K){let J=Q._zod.def.checks;if(!J||J.length===0)return K;let Z=K;for(let G of J){let D=G._zod.def;if(D.when&&!Vc.has(D.check))throw new s6('check with a custom "when" condition');switch(D.check){case"greater_than":Tc($,I,D,Z);break;case"less_than":Pc($,I,D,Z);break;case"multiple_of":Rc($,I,D,Z);break;case"number_format":qS($,D,Z);break;case"min_length":{let v=C9(D.minimum,"min_length"),C=iR($,I,Z,`${Z}.length >= ${v} && ${Z}.length < ${D.minimum*2}`);$.write(`if (${C} < ${v}) return INVALID;`);break}case"max_length":{let v=C9(D.maximum,"max_length"),C=iR($,I,Z,`${Z}.length > ${v}`);$.write(`if (${C} > ${v}) return INVALID;`);break}case"length_equals":{let v=C9(D.length,"length_equals"),C=iR($,I,Z,`${Z}.length >= ${v} && ${Z}.length <= ${D.length*2}`);$.write(`if (${C} !== ${v}) return INVALID;`);break}case"min_size":$.write(`if (${Z}.size < ${C9(D.minimum,"min_size")}) return INVALID;`);break;case"max_size":$.write(`if (${Z}.size > ${C9(D.maximum,"max_size")}) return INVALID;`);break;case"size_equals":$.write(`if (${Z}.size !== ${C9(D.size,"size_equals")}) return INVALID;`);break;case"string_format":Z=BS($,I,D,Z);break;case"custom":Z=Nc($,I,G,Z);break;case"bigint_format":_c($,D,Z);break;case"mime_type":Cc($,I,D,Z);break;case"property":Bc($,I,D,Z);break;case"properties":qc($,I,D,Z);break;case"overwrite":{let v=J6(I);jc($,I,G,Z,v),Z=v;break}default:throw new s6(`check type ${D.check}`)}}return Z}function iR($,I,Q,K){let J=K6(I,T9),Z=J6(I);return $.write(`const ${Z} = typeof ${Q} === "string" && ${K} ? ${J}(${Q}) : ${Q}.length;`),Z}function C9($,I){if(typeof $!=="number"||!Number.isFinite($))throw new s6(`${I} bound of type ${typeof $}`);return`${$}`}function CS($,I){if(typeof I==="bigint")return`${I}n`;if(typeof I==="number"){if(Number.isNaN(I))throw new s6("comparison check with NaN bound");return`${I}`}if(I instanceof Date){if(Number.isNaN(I.getTime()))throw new s6("comparison check with Invalid Date bound");return K6($,I)}throw new s6(`comparison check bound of type ${typeof I}`)}function Tc($,I,Q,K){let J=Q.inclusive?"<":"<=";$.write(`if (${K} ${J} ${CS(I,Q.value)}) return INVALID;`)}function Pc($,I,Q,K){let J=Q.inclusive?">":">=";$.write(`if (${K} ${J} ${CS(I,Q.value)}) return INVALID;`)}function Rc($,I,Q,K){if(typeof Q.value==="bigint"){if(Q.value===BigInt(0))throw new s6("multiple_of check with a zero divisor");$.write(`if (${K} % ${Q.value}n !== 0n) return INVALID;`)}else{let J=K6(I,qF);$.write(`if (${J}(${K}, ${C9(Q.value,"multiple_of")}) !== 0) return INVALID;`)}}function qS($,I,Q){let K=I.format;switch(K){case"safeint":$.write(`if (!Number.isSafeInteger(${Q})) return INVALID;`);break;case"int32":$.write(`if (!Number.isInteger(${Q}) || ${Q} < -2147483648 || ${Q} > 2147483647) return INVALID;`);break;case"uint32":$.write(`if (!Number.isInteger(${Q}) || ${Q} < 0 || ${Q} > 4294967295) return INVALID;`);break;case"float32":$.write(`if (!Number.isFinite(${Q}) || ${Q} < -3.4028234663852886e38 || ${Q} > 3.4028234663852886e38) return INVALID;`);break;case"float64":$.write(`if (!Number.isFinite(${Q})) return INVALID;`);break;default:throw new s6(`number format ${K}`)}}function _c($,I,Q){let K=I.format;if(!K)return;switch(K){case"int64":$.write(`if (${Q} < -9223372036854775808n || ${Q} > 9223372036854775807n) return INVALID;`);break;case"uint64":$.write(`if (${Q} < 0n || ${Q} > 18446744073709551615n) return INVALID;`);break;default:throw new s6(`bigint format ${K}`)}}function Cc($,I,Q,K){let J=Q.mime;if(J&&J.length>0){let Z=K6(I,new Set(J));$.write(`if (!${Z}.has(${K}.type)) return INVALID;`)}}function qc($,I,Q,K){if(Q.when)throw new s6('check with a custom "when" condition');$.write(`if (${K} == null) return INVALID;`);let J=Q.shape;for(let Z of Reflect.ownKeys(J)){let G=typeof Z==="symbol"?K6(I,Z):$J(Z),D=J6(I);$.write(`const ${D} = ${K}[${G}];`),BI($,I,J[Z],D,!1)}}function Bc($,I,Q,K){let J=`${K}[${JSON.stringify(Q.property)}]`;U1($,I,Q.schema,J)}function jc($,I,Q,K,J){let Z=Q._zod.def.tx;if(!Z)throw new s6("overwrite check without a transform function");if(j9(Z))throw new HG("z.compile: async overwrite transforms are not supported");let G=K6(I,Z);$.write(`const ${J} = ${G}(${K});`)}function oR(){throw new LQ}function aR($){this.issues.push($)}function Nc($,I,Q,K){let J=Q._zod.def;if(J.fn){if(j9(J.fn))throw new HG("z.compile: async .refine() predicates are not supported");let Z=B9(I,J.fn),G=K6(I,oR),D=J6(I);return $.write(`const ${D} = ${Z}(${K});`),$.write(`if (${D} instanceof Promise) ${G}();`),$.write(`if (!${D}) return INVALID;`),K}if(Q._zod.check){if(j9(Q._zod.check))throw new HG("z.compile: async .superRefine() / check functions are not supported");let Z=Q._zod.check,D=B9(I,(C)=>{let B={value:C,issues:[],addIssue:aR};if(Z(B)instanceof Promise)oR();return B.issues.length===0?B.value:XJ}),v=J6(I);return $.write(`const ${v} = ${D}(${K});`),$.write(`if (${v} === INVALID) return INVALID;`),v}throw new s6("custom check without a predicate or check function")}var Ec=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function BS($,I,Q,K,J=!0){let Z=Q.format;if(Z==="base64"){let C=K6(I,cF);return $.write(`if (!${C}(${K})) return INVALID;`),K}if(Z==="base64url"){let C=K6(I,oM);return $.write(`if (!${C}(${K})) return INVALID;`),K}if(Z==="jwt"){let C=K6(I,aM),B=K6(I,Q.alg??null);return $.write(`if (!${C}(${K}, ${B})) return INVALID;`),K}if(Z==="ipv6"){let C=K6(I,lF);return $.write(`if (!${C}(${K})) return INVALID;`),K}if(Z==="cidrv6"){let C=K6(I,nM);return $.write(`if (!${C}(${K})) return INVALID;`),K}if(Z==="credit_card"){let C=K6(I,rM);return $.write(`if (!${C}(${K})) return INVALID;`),K}if(Z==="iban"){let C=K6(I,tM);return $.write(`if (!${C}(${K})) return INVALID;`),K}let G=Q;if(Z==="url"||Z==="httpurl"||G.normalize||G.hostname!==void 0||G.protocol!==void 0){let C=K6(I,lM),B=K6(I,Q),O=J6(I),N=J6(I);if($.write(`const ${O} = ${K}.trim();`),$.write(`const ${N} = ${C}(${O}, ${B});`),$.write(`if (typeof ${N} === "number") return INVALID;`),G.hostname!==void 0){let b=K6(I,cM);$.write(`if (!${b}(${N}, ${B}.hostname)) return INVALID;`)}if(G.protocol!==void 0){let b=K6(I,dM);$.write(`if (!${b}(${N}, ${B}.protocol)) return INVALID;`)}if(!J)return null;let g=J6(I),x=G.normalize?`${N}.href`:`${K6(I,pF)}(${O})`;return $.write(`const ${g} = ${x};`),g}let D=Q.fn;if(D){if(j9(D))throw new s6(`async string format ${Z}`);let C=K6(I,D);return $.write(`if (!${C}(${K})) return INVALID;`),K}if(Ec.has(Z)&&Q.pattern){let C=K6(I,Q.pattern);return $.write(`${C}.lastIndex = 0;`),$.write(`if (!${C}.test(${K})) return INVALID;`),K}let v=Q.format;switch(v){case"regex":throw new s6("regex format without a pattern");case"lowercase":$.write(`if (${K} !== ${K}.toLowerCase()) return INVALID;`);break;case"uppercase":$.write(`if (${K} !== ${K}.toUpperCase()) return INVALID;`);break;case"includes":$.write(`if (!${K}.includes(${$J(Q.includes)})) return INVALID;`);break;case"starts_with":{let C=Q.prefix;$.write(`if (${K}.slice(0, ${C.length}) !== ${$J(C)}) return INVALID;`);break}case"ends_with":{let C=Q.suffix;$.write(`if (${K}.slice(-${C.length}) !== ${$J(C)}) return INVALID;`);break}default:throw new s6(`string format ${v}`)}return K}function U1($,I,Q,K,J=!0){let Z=Q._zod.def,G=Z.type;if(Z.coerce)throw new s6(`coercion (z.coerce.${G}())`);let D=J||!!Z.checks?.length,v;switch(G){case"string":v=vc($,I,Q,K,D);break;case"number":v=Sc($,Q,K);break;case"boolean":v=kc($,K);break;case"bigint":v=gc($,Q,K);break;case"symbol":v=xc($,K);break;case"undefined":v=wc($,K);break;case"null":v=fc($,K);break;case"any":case"unknown":v=K;break;case"never":$.write("return INVALID;"),v=K;break;case"void":v=yc($,K);break;case"nan":v=bc($,K);break;case"date":v=hc($,K);break;case"object":v=uc($,I,Q,K,D);break;case"optional":v=mc($,I,Q,K,D);break;case"nullable":v=cc($,I,Q,K,D);break;case"array":v=dc($,I,Q,K,D);break;case"literal":v=nc($,I,Q,K);break;case"enum":v=ic($,I,Q,K);break;case"readonly":{let C=PS($,I,Q,K),B=J6(I);$.write(`const ${B} = Object.freeze(${C});`),v=B;break}case"success":PS($,I,Q,K),v="true";break;case"default":case"prefault":v=oc($,I,Q,K);break;case"nonoptional":v=rc($,I,Q,K);break;case"tuple":v=tc($,I,Q,K);break;case"union":v=ac($,I,Q,K);break;case"intersection":v=$d($,I,Q,K);break;case"record":v=Ud($,I,Q,K);break;case"map":v=Id($,I,Q,K);break;case"set":v=Jd($,I,Q,K);break;case"file":v=Qd($,K);break;case"template_literal":v=Yd($,I,Q,K);break;case"lazy":v=Gd($,I,Q,K);break;case"pipe":v=Zd($,I,Q,K);break;case"custom":v=Wd($,I,Q,K);break;case"transform":v=Hd($,I,Q,K);break;case"catch":v=zd($,I,Q,K);break;default:throw new s6(`schema type ${G}`)}if(v===null)return null;return Ac($,I,Q,v)}function vc($,I,Q,K,J=!0){$.write(`if (typeof ${K} !== "string") return INVALID;`);let Z=Q._zod.def;if(Z.format===void 0)return K;return BS($,I,Z,K,J)}function Sc($,I,Q){$.write(`if (typeof ${Q} !== "number" || !Number.isFinite(${Q})) return INVALID;`);let K=I._zod.def;if(K.check==="number_format"&&K.format)qS($,{format:K.format},Q);return Q}function kc($,I){return $.write(`if (typeof ${I} !== "boolean") return INVALID;`),I}function gc($,I,Q){$.write(`if (typeof ${Q} !== "bigint") return INVALID;`);let K=I._zod.def;if(K.format)switch(K.format){case"int64":$.write(`if (${Q} < -9223372036854775808n || ${Q} > 9223372036854775807n) return INVALID;`);break;case"uint64":$.write(`if (${Q} < 0n || ${Q} > 18446744073709551615n) return INVALID;`);break}return Q}function xc($,I){return $.write(`if (typeof ${I} !== "symbol") return INVALID;`),I}function wc($,I){return $.write(`if (${I} !== undefined) return INVALID;`),I}function fc($,I){return $.write(`if (${I} !== null) return INVALID;`),I}function yc($,I){return $.write(`if (${I} !== undefined) return INVALID;`),I}function bc($,I){return $.write(`if (typeof ${I} !== "number" || !Number.isNaN(${I})) return INVALID;`),I}function hc($,I){return $.write(`if (!(${I} instanceof Date) || Number.isNaN(${I}.getTime())) return INVALID;`),I}function uc($,I,Q,K,J=!0){let Z=Q._zod.def;$.write(`if (typeof ${K} !== "object" || ${K} === null || Array.isArray(${K})) return INVALID;`);let G=Z.shape,D=Object.keys(G),v=Object.getOwnPropertySymbols(G),C=v.length?[...D,...v]:D,B=(h)=>typeof h==="symbol"?K6(I,h):$J(h),O=(h)=>typeof h==="symbol"?`[${B(h)}]`:$J(h),N=G;if(D.includes("__proto__"))throw new s6('object shape key "__proto__"');let g=new Map;for(let h of C){let d=N[h],s=B(h),$$=J6(I);if($.write(`const ${$$} = ${K}[${s}];`),d._zod.optin!==void 0){let J$=J6(I);if($.write(`let ${J$} = (() => {`),$.indented((_$)=>{let S$=BI(_$,I,d,$$);_$.write(`return ${S$};`)}),$.write("})();"),d._zod.optout==="optional")$.write(`if (${J$} === INVALID) {`),$.indented((_$)=>{_$.write(`if (${s} in ${K}) return INVALID;`),_$.write(`${J$} = undefined;`)}),$.write("}");else $.write(`if (${J$} === INVALID) return INVALID;`);g.set(h,J$)}else{if(lc(d))$.write(`if (!(${s} in ${K})) return INVALID;`);let J$=BI($,I,d,$$,J);if(J$!==null)g.set(h,J$)}}let x=Z.catchall,b="none";if(x){let h=x._zod.def.type;if(h==="never"){let d=D.map((s)=>`k !== ${$J(s)}`).join(" && ")||"true";$.write(`for (const k in ${K}) {`),$.indented((s)=>{s.write(`if (${d}) return INVALID;`)}),$.write("}")}else if((h==="unknown"||h==="any")&&!x._zod.def.checks?.length)b="passthrough";else b="schema"}let m=J6(I),c=C.some((h)=>TS(N[h])||rR(N[h]));if(!J){if(b==="schema"){let h=D.length>0?K6(I,new Set(D)):null;$.write(`for (const k in ${K}) {`),$.indented((d)=>{if(d.write('if (k === "__proto__") continue;'),h)d.write(`if (${h}.has(k)) continue;`);let s=J6(I);d.write(`const ${s} = ${K}[k];`),BI(d,I,x,s,!1)}),$.write("}")}return null}if(!c){let h=C.map((d)=>`${O(d)}: ${g.get(d)}`).join(", ");$.write(`const ${m} = { ${h} };`)}else{$.write(`const ${m} = {};`);for(let h of C){let d=B(h),s=g.get(h);if(rR(N[h]))$.write(`if (${d} in ${K}) ${m}[${d}] = ${s};`);else if(TS(N[h]))$.write(`if (${s} !== undefined || ${d} in ${K}) ${m}[${d}] = ${s};`);else $.write(`${m}[${d}] = ${s};`)}}if(b!=="none"){let h=D.length>0?K6(I,new Set(D)):null;$.write(`for (const k in ${K}) {`),$.indented((d)=>{if(d.write('if (k === "__proto__") continue;'),h)d.write(`if (${h}.has(k)) continue;`);if(b==="passthrough")d.write(`${m}[k] = ${K}[k];`);else{let s=J6(I);d.write(`const ${s} = ${K}[k];`);let $$=BI(d,I,x,s);d.write(`${m}[k] = ${$$};`)}}),$.write("}")}return m}function mc($,I,Q,K,J=!0){let Z=Q._zod.def;if(pc(Q))return U1($,I,Z.innerType,K,J);if(Z.innerType._zod.optin==="defaulted"){let D=J6(I),v=J6(I);return $.write(`let ${D};`),$.write(`if (${K} === undefined) {`),$.indented((C)=>{C.write(`const ${v} = (() => {`),C.indented((B)=>{let O=U1(B,I,Z.innerType,K);B.write(`return ${O};`)}),C.write("})();"),C.write(`if (${v} !== INVALID) ${D} = ${v};`)}),$.write("} else {"),$.indented((C)=>{let B=U1(C,I,Z.innerType,K);C.write(`${D} = ${B};`)}),$.write("}"),D}let G=J?J6(I):null;if(G)$.write(`let ${G};`);return $.write(`if (${K} !== undefined) {`),$.indented((D)=>{let v=U1(D,I,Z.innerType,K,J);if(G&&v!==null)D.write(`${G} = ${v};`)}),$.write("}"),G}function pc($){return $._zod.traits?.has("$ZodExactOptional")===!0}function lc($){return $._zod.optin===void 0&&q9($)}function q9($){if($._zod.def.coerce)return!0;let I=$._zod.def;switch(I.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return I.innerType?q9(I.innerType):!1;case"literal":return!!I.values?.includes(void 0);case"enum":return!!$._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return I.innerType?q9(I.innerType):!0;case"catch":return!0;case"union":return I.options?I.options.some(q9):!0;case"intersection":if(!I.left||!I.right)return!0;return q9(I.left)&&q9(I.right);case"pipe":return I.in?q9(I.in):!0;default:return!0}}function rR($){return $._zod.optin==="optional"&&$._zod.optout==="optional"}function TS($){return($._zod.optin!=="defaulted"||$._zod.optout==="optional")&&Cz($)}function Cz($){let I=$._zod.def;switch(I.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!I.values?.includes(void 0);case"enum":return!!$._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return I.innerType?Cz(I.innerType):!0;case"union":return I.options?I.options.some(Cz):!0;case"intersection":return!I.left||!I.right||Cz(I.left)||Cz(I.right);case"pipe":return I.out?Cz(I.out):!0;default:return!0}}function cc($,I,Q,K,J=!0){let Z=Q._zod.def,G=J?J6(I):null;if(G)$.write(`let ${G} = null;`);return $.write(`if (${K} !== null) {`),$.indented((D)=>{let v=U1(D,I,Z.innerType,K,J);if(G&&v!==null)D.write(`${G} = ${v};`)}),$.write("}"),G}function dc($,I,Q,K,J=!0){let Z=Q._zod.def;$.write(`if (!Array.isArray(${K})) return INVALID;`);let G=J?J6(I):null,D=J6(I),v=J6(I);if(G)$.write(`const ${G} = new Array(${K}.length);`);return $.write(`for (let ${D} = 0; ${D} < ${K}.length; ${D}++) {`),$.indented((C)=>{C.write(`const ${v} = ${K}[${D}];`);let B=BI(C,I,Z.element,v,J);if(G&&B!==null)C.write(`${G}[${D}] = ${B};`)}),$.write("}"),G}function nc($,I,Q,K){let Z=Q._zod.def.values;if(Z.length!==1){let D=K6(I,new Set(Z));return $.write(`if (!${D}.has(${K})) return INVALID;`),K}let G=Z[0];if(typeof G==="number"&&Number.isNaN(G)){let D=K6(I,new Set(Z));return $.write(`if (!${D}.has(${K})) return INVALID;`),K}if(typeof G==="string")$.write(`if (${K} !== ${$J(G)}) return INVALID;`);else if(typeof G==="number"||typeof G==="boolean")$.write(`if (${K} !== ${G}) return INVALID;`);else if(G===null)$.write(`if (${K} !== null) return INVALID;`);else if(G===void 0)$.write(`if (${K} !== undefined) return INVALID;`);else if(typeof G==="bigint")$.write(`if (${K} !== ${G}n) return INVALID;`);else throw new s6(`literal type ${typeof G}`);return K}function ic($,I,Q,K){let J=Q._zod.values;if(!J)throw new s6("enum schema without enumerated values");let Z=K6(I,J);return $.write(`if (!${Z}.has(${K})) return INVALID;`),K}function PS($,I,Q,K){let J=Q._zod.def;return U1($,I,J.innerType,K)}function oc($,I,Q,K){let J=Q._zod.def,G=Object.getOwnPropertyDescriptor(Q._zod.def,"defaultValue")?()=>Q._zod.def.defaultValue:void 0;if(Q._zod.def.type==="prefault"){if(!G)return U1($,I,J.innerType,K);let v=K6(I,G),C=J6(I);return $.write(`let ${C} = ${K};`),$.write(`if (${K} === undefined) ${C} = ${v}();`),U1($,I,J.innerType,C)}let D=J6(I);if(G){let v=K6(I,G),C=K6(I,BF);$.write(`let ${D};`),$.write(`if (${K} === undefined) {`),$.indented((B)=>{B.write(`${D} = ${C}(${v}());`)}),$.write("} else {"),$.indented((B)=>{let O=U1(B,I,J.innerType,K);B.write(`${D} = ${O} === undefined ? ${C}(${v}()) : ${O};`)}),$.write("}")}else $.write(`let ${D};`),$.write(`if (${K} !== undefined) {`),$.indented((v)=>{let C=U1(v,I,J.innerType,K);v.write(`${D} = ${C};`)}),$.write("}");return D}function rc($,I,Q,K){let J=Q._zod.def,Z=U1($,I,J.innerType,K),G=J6(I);return $.write(`const ${G} = ${Z};`),$.write(`if (${G} === undefined) return INVALID;`),G}function tc($,I,Q,K){let J=Q._zod.def,Z=J.items,G=J.rest;$.write(`if (!Array.isArray(${K})) return INVALID;`);let D=RS(Z,"optin"),v=RS(Z,"optout");if(G)$.write(`if (${K}.length < ${D}) return INVALID;`);else $.write(`if (${K}.length < ${D} || ${K}.length > ${Z.length}) return INVALID;`);let C=J6(I);$.write(`const ${C} = [];`);for(let B=0;B<Z.length;B++){let O=Z[B];if(B>=v)$.write(`if (${C}.length === ${B}) {`),$.indented((N)=>{N.write(`if (${B} < ${K}.length) {`),N.indented((g)=>{let x=J6(I);g.write(`const ${x} = ${K}[${B}];`);let b=BI(g,I,O,x);g.write(`${C}[${B}] = ${b};`)}),N.write("} else {"),N.indented((g)=>{if(rR(O)){g.write(`${C}.length = ${B};`);return}let x=J6(I),b=J6(I);g.write(`const ${x} = undefined;`),g.write(`const ${b} = (() => {`),g.indented((m)=>{let c=BI(m,I,O,x);m.write(`return ${c};`)}),g.write("})();"),g.write(`if (${b} === INVALID || ${b} === undefined) ${C}.length = ${B};`),g.write(`else ${C}[${B}] = ${b};`)}),N.write("}")}),$.write("}");else{let N=J6(I);$.write(`const ${N} = ${K}[${B}];`);let g=BI($,I,O,N);$.write(`${C}[${B}] = ${g};`)}}if(G){let B=J6(I),O=J6(I);$.write(`for (let ${B} = ${Z.length}; ${B} < ${K}.length; ${B}++) {`),$.indented((N)=>{N.write(`const ${O} = ${K}[${B}];`);let g=BI(N,I,G,O);N.write(`${C}[${B}] = ${g};`)}),$.write("}")}return C}function RS($,I){for(let Q=$.length-1;Q>=0;Q--)if(!(I==="optin"?$[Q]._zod.optin!==void 0:$[Q]._zod.optout==="optional"))return Q+1;return 0}function ac($,I,Q,K){let J=Q._zod.def,Z=J.options;if(J.discriminator)return sc($,I,J,K);if(J.inclusive===!1)throw new s6("exclusive unions (z.xor)");if(Z.length===0)return $.write("return INVALID;"),K;if(Z.length===1)return U1($,I,Z[0],K);if(Z.every((v)=>v._zod.def.type==="literal"&&!v._zod.def.checks?.length)){let v=new Set(Z.flatMap((B)=>B._zod.def.values)),C=K6(I,v);return $.write(`if (!${C}.has(${K})) return INVALID;`),K}let D=J6(I);$.write(`let ${D};`);for(let v=0;v<Z.length;v++){let C=Z[v];if(v===0)$.write(`${D} = (() => {`);else $.write(`if (${D} === INVALID) ${D} = (() => {`);$.indented((B)=>{let O=U1(B,I,C,K);B.write(`return ${O};`)}),$.write("})();")}return $.write(`if (${D} === INVALID) return INVALID;`),D}function sc($,I,Q,K){if(Q.unionFallback)throw new s6("discriminated union with unionFallback");if(Q.options.length===0)return $.write("return INVALID;"),K;let J=J6(I),Z=J6(I);$.write(`const ${J} = ${K}?.[${$J(Q.discriminator)}];`),$.write(`let ${Z};`);let G=!0,D=new Set;for(let v of Q.options){let C=v._zod.propValues?.[Q.discriminator];if(!C||C.size===0)throw new s6("discriminated union option without static discriminator values");for(let N of C){if(D.has(N))throw new s6(`duplicate discriminator value ${String(N)}`);D.add(N)}let B=Array.from(C,(N)=>ec(I,J,N)),O=G?"if":"else if";$.write(`${O} (${B.join(" || ")}) {`),$.indented((N)=>{let g=U1(N,I,v,K);N.write(`${Z} = ${g};`)}),$.write("}"),G=!1}return $.write("else { return INVALID; }"),Z}function ec($,I,Q){if(typeof Q==="string")return`${I} === ${$J(Q)}`;if(typeof Q==="number"){if(Number.isNaN(Q))return`Number.isNaN(${I})`;return`${I} === ${Q}`}if(typeof Q==="boolean")return`${I} === ${Q}`;if(Q===null)return`${I} === null`;if(Q===void 0)return`${I} === undefined`;if(typeof Q==="bigint")return`${I} === ${Q}n`;if(typeof Q==="symbol"){let K=K6($,Q);return`${I} === ${K}`}throw new s6(`literal discriminator value ${String(Q)}`)}function $d($,I,Q,K){let J=Q._zod.def;I.definite=!1;let Z=BI($,I,J.left,K),G=BI($,I,J.right,K),D=K6(I,Pz),v=J6(I);return $.write(`const ${v} = ${D}(${Z}, ${G});`),$.write(`if (!${v}.valid) return INVALID;`),`${v}.data`}function Ud($,I,Q,K){let J=Q._zod.def,Z=K6(I,WY);$.write(`if (!${Z}(${K})) return INVALID;`);let G=J6(I),D=J6(I),v=J6(I);$.write(`const ${G} = {};`);let C=J,B=C.partial?void 0:J.keyType._zod.values;if(B){let g=[];for(let b of B){if(!(typeof b==="string"||typeof b==="number"||typeof b==="symbol"))throw new s6(`record key value ${String(b)}`);let m=typeof b==="number"?b.toString():b;if(m==="__proto__")throw new s6('record key "__proto__"');g.push(m);let c=K6(I,b),h=U1($,I,J.keyType,c),d=J6(I);$.write(`const ${d} = ${K}[${Xd(I,m)}];`);let s=BI($,I,J.valueType,d);$.write(`${G}[${h}] = ${s};`)}let x=K6(I,new Set(g));return $.write(`for (const ${D} in ${K}) {`),$.indented((b)=>{if(b.write(`if (${x}.has(${D})) continue;`),C.mode==="loose")b.write(`if (${D} !== "__proto__") ${G}[${D}] = ${K}[${D}];`);else b.write("return INVALID;")}),$.write("}"),G}let O=J.keyType._zod.def;if(!(O.type==="string"&&O.format===void 0&&!O.coerce&&(O.checks?.length??0)===0)){let g=J.mode==="loose",x=KD(J.keyType);if(x.definite===!1)I.definite=!1;let b=K6(I,x),m=K6(I,zG),c=J6(I);return _S($,I,K,D,(h)=>{if(h.write(`let ${c} = ${b}(${D});`),h.write(`if (${c} === INVALID && typeof ${D} === "string" && ${m}.test(${D})) ${c} = ${b}(Number(${D}));`),g)h.write(`if (${c} === INVALID) { ${G}[${D}] = ${K}[${D}]; continue; }`);else h.write(`if (${c} === INVALID) return INVALID;`);h.write(`if (${c} === "__proto__") continue;`);let d=J6(I);h.write(`const ${d} = ${K}[${D}];`);let s=BI(h,I,J.valueType,d);h.write(`${G}[${c}] = ${s};`)}),G}return _S($,I,K,D,(g)=>{g.write(`const ${v} = ${K}[${D}];`);let x=BI(g,I,J.valueType,v);g.write(`${G}[${D}] = ${x};`)},"return INVALID;"),G}function _S($,I,Q,K,J,Z){let G=K6(I,Object.prototype.propertyIsEnumerable),D=J6(I),v=J6(I),C=J6(I);$.write(`const ${D} = Object.getOwnPropertySymbols(${Q});`),$.write(`const ${v} = Object.getOwnPropertyNames(${Q});`),$.write(`for (let ${C} = 0; ${C} < ${v}.length; ${C}++) {`),$.indented((B)=>{B.write(`const ${K} = ${v}[${C}];`),B.write(`if (${K} === "__proto__" || !${G}.call(${Q}, ${K})) continue;`),J(B)}),$.write("}"),$.write(`for (let ${C} = 0; ${C} < ${D}.length; ${C}++) {`),$.indented((B)=>{if(B.write(`const ${K} = ${D}[${C}];`),B.write(`if (!${G}.call(${Q}, ${K})) continue;`),Z)B.write(Z);else J(B)}),$.write("}")}function Xd($,I){if(typeof I==="string")return $J(I);return K6($,I)}function Id($,I,Q,K){let J=Q._zod.def;$.write(`if (!(${K} instanceof Map)) return INVALID;`);let Z=J6(I),G=J6(I),D=J6(I);return $.write(`const ${Z} = new Map();`),$.write(`for (const [${G}, ${D}] of ${K}) {`),$.indented((v)=>{let C=U1(v,I,J.keyType,G),B=U1(v,I,J.valueType,D);v.write(`${Z}.set(${C}, ${B});`)}),$.write("}"),Z}function Jd($,I,Q,K){let J=Q._zod.def;$.write(`if (!(${K} instanceof Set)) return INVALID;`);let Z=J6(I),G=J6(I);return $.write(`const ${Z} = new Set();`),$.write(`for (const ${G} of ${K}) {`),$.indented((D)=>{let v=U1(D,I,J.valueType,G);D.write(`${Z}.add(${v});`)}),$.write("}"),Z}function Qd($,I){return $.write(`if (!(${I} instanceof File)) return INVALID;`),I}function Yd($,I,Q,K){$.write(`if (typeof ${K} !== "string") return INVALID;`);let J=Q._zod.pattern;if(J){let Z=K6(I,J);$.write(`${Z}.lastIndex = 0;`),$.write(`if (!${Z}.test(${K})) return INVALID;`)}return K}function Gd($,I,Q,K){let J=Q._zod.def,Z=B9(I,J.getter),G=K6(I,{parser:null});$.write(`if (!${G}.parser) {`),$.indented((v)=>{v.write(`const inner = ${Z}();`),v.write(`${G}.parser = function(input) {`),v.indented((C)=>{C.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),C.write("return result.issues.length === 0 ? result.value : INVALID;")}),v.write("};")}),$.write("}");let D=J6(I);return $.write(`const ${D} = ${G}.parser(${K});`),$.write(`if (${D} === INVALID) return INVALID;`),D}function Zd($,I,Q,K){let J=Q._zod.def,Z=U1($,I,J.in,K);if(J.transform){if(j9(J.transform))throw new HG("z.compile: async transforms in pipes are not supported");let G=J.transform,v=B9(I,(B)=>{let O={value:B,issues:[],addIssue:aR},N=G(B,O);if(N instanceof Promise)return XJ;return O.issues.length===0?N:XJ}),C=J6(I);return $.write(`const ${C} = ${v}(${Z});`),$.write(`if (${C} === INVALID) return INVALID;`),U1($,I,J.out,C)}else return U1($,I,J.out,Z)}function j9($){return typeof $==="function"&&($.constructor.name==="AsyncFunction"||$[Symbol.toStringTag]==="AsyncFunction")}function Wd($,I,Q,K){let J=Q._zod.def;if(J.fn){if(j9(J.fn))throw new HG("z.compile: async custom predicates are not supported");let Z=B9(I,J.fn),G=K6(I,oR),D=J6(I);$.write(`const ${D} = ${Z}(${K});`),$.write(`if (${D} instanceof Promise) ${G}();`),$.write(`if (!${D}) return INVALID;`)}else throw new s6("custom schema without a predicate function");return K}function Kd($,I,Q){let K=$._zod.run({value:Q,issues:[]},{});if(K&&typeof K.then==="function")return XJ;let J=K;if(J.issues.length===0)return J.value;return I()}function zd($,I,Q,K){let J=Q._zod.def;if(!J.catchValue[TM])throw new s6("catch with a callback (only a constant catch value compiles)",!1);let Z=J6(I);$.write(`let ${Z} = (() => {`),$.indented((C)=>{let B=BI(C,I,J.innerType,K);C.write(`return ${B};`)}),$.write("})();");let G=K6(I,J.innerType),D=B9(I,J.catchValue),v=K6(I,Kd);return $.write(`if (${Z} === INVALID) {`),$.indented((C)=>{C.write(`${Z} = ${v}(${G}, ${D}, ${K});`),C.write(`if (${Z} === INVALID) return INVALID;`)}),$.write("}"),Z}function Hd($,I,Q,K){let J=Q._zod.def;if(J.transform){if(j9(J.transform))throw new HG("z.compile: async transforms are not supported");let Z=J.transform,D=B9(I,(C)=>{let B={value:C,issues:[],addIssue:aR},O=Z(C,B);if(O instanceof Promise)return XJ;return B.issues.length===0?O:XJ}),v=J6(I);return $.write(`const ${v} = ${D}(${K});`),$.write(`if (${v} === INVALID) return INVALID;`),v}return K}function zD($){if($.checks)$.checks=[...$.checks];return $}function sR($,I){return new $(zD({type:"string",...y0(I)}))}function eR($,I){return new $(zD({type:"string",coerce:!0,...y0(I)}))}function HD($,I){return new $({type:"string",format:"email",check:"string_format",abort:!1,...y0(I)})}function FD($,I){return new $({type:"string",format:"guid",check:"string_format",abort:!1,...y0(I)})}function MD($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,...y0(I)})}function DD($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...y0(I)})}function OD($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...y0(I)})}function LD($,I){return new $({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...y0(I)})}function J5($,I){return new $({type:"string",format:"url",check:"string_format",abort:!1,...y0(I)})}function VD($,I){return new $({type:"string",format:"emoji",check:"string_format",abort:!1,...y0(I)})}function AD($,I){return new $({type:"string",format:"nanoid",check:"string_format",abort:!1,...y0(I)})}function TD($,I){return new $({type:"string",format:"cuid",check:"string_format",abort:!1,...y0(I)})}function PD($,I){return new $({type:"string",format:"cuid2",check:"string_format",abort:!1,...y0(I)})}function RD($,I){return new $({type:"string",format:"ulid",check:"string_format",abort:!1,...y0(I)})}function _D($,I){return new $({type:"string",format:"xid",check:"string_format",abort:!1,...y0(I)})}function CD($,I){return new $({type:"string",format:"ksuid",check:"string_format",abort:!1,...y0(I)})}function qD($,I){return new $({type:"string",format:"ipv4",check:"string_format",abort:!1,...y0(I)})}function BD($,I){return new $({type:"string",format:"ipv6",check:"string_format",abort:!1,...y0(I)})}function $_($,I){return new $({type:"string",format:"mac",check:"string_format",abort:!1,...y0(I)})}function jD($,I){return new $({type:"string",format:"cidrv4",check:"string_format",abort:!1,...y0(I)})}function ND($,I){return new $({type:"string",format:"cidrv6",check:"string_format",abort:!1,...y0(I)})}function ED($,I){return new $({type:"string",format:"base64",check:"string_format",abort:!1,...y0(I)})}function vD($,I){return new $({type:"string",format:"base64url",check:"string_format",abort:!1,...y0(I)})}function SD($,I){return new $({type:"string",format:"e164",check:"string_format",abort:!1,...y0(I)})}function U_($,I){return new $({type:"string",format:"credit_card",check:"string_format",abort:!1,...y0(I)})}function X_($,I){return new $({type:"string",format:"iban",check:"string_format",abort:!1,...y0(I)})}function kD($,I){return new $({type:"string",format:"jwt",check:"string_format",abort:!1,...y0(I)})}var I_={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Q5($,I){return new $({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...y0(I)})}function Y5($,I){return new $({type:"string",format:"date",check:"string_format",...y0(I)})}function G5($,I){return new $({type:"string",format:"time",check:"string_format",precision:null,...y0(I)})}function Z5($,I){return new $({type:"string",format:"duration",check:"string_format",...y0(I)})}function J_($,I){return new $(zD({type:"number",checks:[],...y0(I)}))}function Q_($,I){return new $(zD({type:"number",coerce:!0,checks:[],...y0(I)}))}function Y_($,I){return new $({type:"number",check:"number_format",abort:!1,format:"safeint",...y0(I)})}function G_($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float32",...y0(I)})}function Z_($,I){return new $({type:"number",check:"number_format",abort:!1,format:"float64",...y0(I)})}function W_($,I){return new $({type:"number",check:"number_format",abort:!1,format:"int32",...y0(I)})}function K_($,I){return new $({type:"number",check:"number_format",abort:!1,format:"uint32",...y0(I)})}function z_($,I){return new $({type:"boolean",...y0(I)})}function H_($,I){return new $({type:"boolean",coerce:!0,...y0(I)})}function F_($,I){return new $({type:"bigint",...y0(I)})}function M_($,I){return new $({type:"bigint",coerce:!0,...y0(I)})}function D_($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...y0(I)})}function O_($,I){return new $({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...y0(I)})}function L_($,I){return new $({type:"symbol",...y0(I)})}function V_($,I){return new $({type:"undefined",...y0(I)})}function A_($,I){return new $({type:"null",...y0(I)})}function T_($){return new $({type:"any"})}function P_($){return new $({type:"unknown"})}function R_($,I){return new $({type:"never",...y0(I)})}function __($,I){return new $({type:"void",...y0(I)})}function C_($,I){return new $({type:"date",...y0(I)})}function q_($,I){return new $({type:"date",coerce:!0,...y0(I)})}function B_($,I){return new $({type:"nan",...y0(I)})}function FG($,I){return new fM({check:"less_than",...y0(I),value:$,inclusive:!1})}function VQ($,I){return new fM({check:"less_than",...y0(I),value:$,inclusive:!0})}function MG($,I){return new yM({check:"greater_than",...y0(I),value:$,inclusive:!1})}function AQ($,I){return new yM({check:"greater_than",...y0(I),value:$,inclusive:!0})}function gD($){return MG(0,$)}function xD($){return FG(0,$)}function wD($){return VQ(0,$)}function fD($){return AQ(0,$)}function iZ($,I){return new XT({check:"multiple_of",...y0(I),value:$})}function oZ($,I){return new QT({check:"max_size",...y0(I),maximum:$})}function DG($,I){return new YT({check:"min_size",...y0(I),minimum:$})}function N9($,I){return new GT({check:"size_equals",...y0(I),size:$})}function E9($,I){return new ZT({check:"max_length",...y0(I),maximum:$})}function C8($,I){return new WT({check:"min_length",...y0(I),minimum:$})}function v9($,I){return new KT({check:"length_equals",...y0(I),length:$})}function qz($,I){return new zT({check:"string_format",format:"regex",...y0(I),pattern:$})}function Bz($){return new HT({check:"string_format",format:"lowercase",...y0($)})}function jz($){return new FT({check:"string_format",format:"uppercase",...y0($)})}function Nz($,I){return new MT({check:"string_format",format:"includes",...y0(I),includes:$})}function Ez($,I){return new DT({check:"string_format",format:"starts_with",...y0(I),prefix:$})}function vz($,I){return new OT({check:"string_format",format:"ends_with",...y0(I),suffix:$})}function yD($,I,Q){return new LT({check:"property",property:$,schema:I,...y0(Q)})}function Sz($,I){return new VT({check:"properties",shape:$,...y0(I)})}function kz($,I){return new AT({check:"mime_type",mime:$,...y0(I)})}function Y2($){return new TT({check:"overwrite",tx:$})}function gz($){return Y2((I)=>I.normalize($))}function xz(){return Y2(($)=>$.trim())}function wz(){return Y2(($)=>$.toLowerCase())}function fz(){return Y2(($)=>$.toUpperCase())}function yz(){return Y2(($)=>JA($))}function j_($,I,Q){return new $({type:"array",element:I,...y0(Q)})}function Fd($,I,Q){return new $({type:"union",options:I,...y0(Q)})}function Md($,I,Q){return new $({type:"union",options:I,inclusive:!1,...y0(Q)})}function Dd($,I,Q,K){return new $({type:"union",options:Q,discriminator:I,...y0(K)})}function Od($,I,Q){return new $({type:"intersection",left:I,right:Q})}function Ld($,I,Q,K){let J=Q instanceof A6;return new $({type:"tuple",items:I,rest:J?Q:null,...y0(J?K:Q)})}function Vd($,I,Q,K){return new $({type:"record",keyType:I,valueType:Q,...y0(K)})}function Ad($,I,Q,K){return new $({type:"map",keyType:I,valueType:Q,...y0(K)})}function Td($,I,Q){return new $({type:"set",valueType:I,...y0(Q)})}function Pd($,I,Q){let K=Array.isArray(I)?Object.fromEntries(I.map((J)=>[J,J])):I;return new $({type:"enum",entries:K,...y0(Q)})}function Rd($,I,Q){return new $({type:"enum",entries:I,...y0(Q)})}function _d($,I,Q){return new $({type:"literal",values:Array.isArray(I)?I:[I],...y0(Q)})}function N_($,I){return new $({type:"file",...y0(I)})}function Cd($,I){return new $({type:"transform",transform:I})}function qd($,I){return new $({type:"optional",innerType:I})}function Bd($,I){return new $({type:"nullable",innerType:I})}function jd($,I,Q){return new $({type:"default",innerType:I,get defaultValue(){return typeof Q==="function"?Q():BF(Q)}})}function Nd($,I,Q){return new $({type:"nonoptional",innerType:I,...y0(Q)})}function Ed($,I){return new $({type:"success",innerType:I})}function vd($,I,Q){return new $({type:"catch",innerType:I,catchValue:typeof Q==="function"?Q:KA(Q)})}function Sd($,I,Q){return new $({type:"pipe",in:I,out:Q})}function kd($,I){return new $({type:"readonly",innerType:I})}function gd($,I,Q){return new $({type:"template_literal",parts:I,...y0(Q)})}function xd($,I){return new $({type:"lazy",getter:I})}function wd($,I){return new $({type:"promise",innerType:I})}function E_($,I,Q){let K=y0(Q);return K.abort??(K.abort=!0),new $({type:"custom",check:"custom",fn:I,...K})}function v_($,I,Q){return new $({type:"custom",check:"custom",fn:I,...y0(Q)})}function S_($,I){let Q=jS((K)=>{return K.addIssue=(J)=>{if(typeof J==="string")K.issues.push(Mz(J,K.value,Q._zod.def));else{let Z=J;if(Z.fatal)Z.continue=!1;if(Z.code??(Z.code="custom"),!("input"in Z))Z.input=K.value;Z.inst??(Z.inst=Q),Z.continue??(Z.continue=!Q._zod.def.abort),K.issues.push(Mz(Z))}},$(K.value,K)},I);return Q}function jS($,I){let Q=new MU({check:"custom",...y0(I)});return Q._zod.check=$,Q}function k_($){let I=new MU({check:"describe"});return I._zod.onattach=[(Q)=>{let K=ZI.get(Q)??{};ZI.add(Q,{...K,description:$})}],I._zod.check=()=>{},I}function g_($){let I=new MU({check:"meta"});return I._zod.onattach=[(Q)=>{let K=ZI.get(Q)??{};ZI.add(Q,{...K,...$})}],I._zod.check=()=>{},I}function x_($,I){let Q=y0(I),K=Q.truthy??["true","1","yes","on","y","enabled"],J=Q.falsy??["false","0","no","off","n","disabled"];if(Q.case!=="sensitive")K=K.map((g)=>typeof g==="string"?g.toLowerCase():g),J=J.map((g)=>typeof g==="string"?g.toLowerCase():g);let Z=new Set(K),G=new Set(J),D=$.Codec??oF,v=$.Boolean??nF,B=new($.String??_9)({type:"string",error:Q.error}),O=new v({type:"boolean",error:Q.error}),N=new D({type:"pipe",in:B,out:O,transform:(g,x)=>{let b=g;if(Q.case!=="sensitive")b=b.toLowerCase();if(Z.has(b))return!0;else if(G.has(b))return!1;else return x.issues.push({code:"invalid_value",expected:"stringbool",values:[...Z,...G],input:x.value,inst:N,continue:!1}),{}},reverseTransform:(g,x)=>{if(g===!0)return K[0]||"true";else return J[0]||"false"},error:Q.error});return N._zod.bag.truthy=K,N._zod.bag.falsy=J,N._zod.bag.case=Q.case??"insensitive",N}function S9($,I,Q,K={}){let J=y0(K),Z={check:"string_format",type:"string",format:I,fn:typeof Q==="function"?Q:(D)=>Q.test(D),...J};if(Q instanceof RegExp)Z.pattern=Q;return new $(Z)}function W5($,...I){for(let Q of I)for(let K of Reflect.ownKeys(Q))if(Object.prototype.propertyIsEnumerable.call(Q,K))GI($,K,Q[K]);return $}function rZ($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";return{processors:$.processors??{},metadataRegistry:$?.metadata??ZI,target:I,unrepresentable:$?.unrepresentable??"throw",override:$?.override??(()=>{}),io:$?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:$?.cycles??"ref",reused:$?.reused??"inline",intersections:[],deferred:[],external:$?.external??void 0}}function LX($,I,Q,K,J){let Z=typeof I.unrepresentable==="function"?I.unrepresentable({zodSchema:$,path:K.path,message:J}):I.unrepresentable;if(Z==="any")return!1;if(Z===void 0||Z==="throw")throw Error(J);return Object.assign(Q,Z),!0}function e4($,I,Q={path:[],schemaPath:[]}){var K;let J=$._zod.def,Z=I.seen.get($);if(Z){if(Z.count++,Q.schemaPath.includes($))Z.cycle=Q.path;return Z.schema}let G={schema:{},count:1,cycle:void 0,path:Q.path};I.seen.set($,G),I.sharedDefsExtractedFor=void 0,I.sharedEmitDoneFor=void 0;let D=$._zod.toJSONSchema?.();if(D)G.schema=D;else{let B={...Q,schemaPath:[...Q.schemaPath,$],path:Q.path};if($._zod.processJSONSchema)$._zod.processJSONSchema(I,G.schema,B);else{let N=G.schema,g=I.processors[J.type];if(!g)throw Error(`[toJSONSchema]: Non-representable type encountered: ${J.type}`);g($,I,N,B)}let O=$._zod.parent;if(O){if(!G.ref)G.ref=O;e4(O,I,B),I.seen.get(O).isParent=!0}}let v=I.metadataRegistry.get($);if(v)W5(G.schema,v);if(I.io==="input"&&IJ($))delete G.schema.examples,delete G.schema.default;if(I.io==="input"&&"_prefault"in G.schema)(K=G.schema).default??(K.default=G.schema._prefault);return delete G.schema._prefault,I.seen.get($).schema}function NS($){return $.replace(/~/g,"~0").replace(/\//g,"~1")}function tZ($,I){let Q=$.seen.get(I);if(!Q)throw Error("Unprocessed schema. This is a bug in Zod.");if($.external&&$.sharedDefsExtractedFor===$.external)return;let K=new Map;for(let G of $.seen.entries()){let D=$.metadataRegistry.get(G[0])?.id;if(D){let v=K.get(D);if(v&&v!==G[0])throw Error(`Duplicate schema id "${D}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);K.set(D,G[0])}}let J=(G)=>{let D=$.target==="draft-2020-12"?"$defs":"definitions";if($.external){let O=$.external.registry.get(G[0])?.id,N=$.external.uri??((x)=>x);if(O)return{ref:N(O)};let g=G[1].defId??G[1].schema.id??`schema${$.counter++}`;return G[1].defId=g,{defId:g,ref:`${N("__shared")}#/${D}/${NS(g)}`}}let v="#",C=`${v}/${D}/`;if(G[1]===Q&&!G[1].schema.id)return{ref:v};let B=G[1].schema.id??`__schema${$.counter++}`;return{defId:B,ref:C+NS(B)}},Z=(G)=>{if(G[1].schema.$ref)return;let D=G[1],{ref:v,defId:C}=J(G);if(D.def={...D.schema},C)D.defId=C;let B=D.schema;for(let O in B)delete B[O];B.$ref=v};if($.cycles==="throw")for(let G of $.seen.entries()){let D=G[1];if(D.cycle)throw Error(`Cycle detected: #/${D.cycle?.join("/")}/<root>
|
|
444
444
|
|
|
445
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let G of $.seen.entries()){let D=G[1];if(I===G[0]){Z(G);continue}if($.external){let C=$.external.registry.get(G[0])?.id;if(I!==G[0]&&C){Z(G);continue}}if($.metadataRegistry.get(G[0])?.id){Z(G);continue}if(D.cycle){Z(G);continue}if(D.count>1){if($.reused==="ref")Z(G)}}if($.external)$.sharedDefsExtractedFor=$.external}function SS($){let I=$.anyOf;if(!Array.isArray(I)||I.length===0||$.type!==void 0)return;let Q=[];for(let K of I){if(!K||typeof K!=="object")return;SS(K);let J=Object.keys(K);if(J.length!==1||J[0]!=="type")return;let Z=K.type;for(let G of Array.isArray(Z)?Z:[Z]){if(typeof G!=="string")return;if(!Q.includes(G))Q.push(G)}}delete $.anyOf,$.type=Q.length===1?Q[0]:Q}var kS=new Set(["type","properties","required","additionalProperties"]),ES=["oneOf","anyOf"];function vS($){let I=$.additionalProperties;if(I===void 0||I===!1||typeof I!=="object"||I===null)return null;return Object.keys(I).length?I:null}function w_($){let I=[];for(let Z of $){if(typeof Z!=="object"||Z.type!=="object")return null;for(let G in Z)if(!kS.has(G))return null;I.push(Z)}let Q={},K=new Set;for(let Z of I){for(let G in Z.properties){if(Object.prototype.hasOwnProperty.call(Q,G))continue;let D=[];for(let C of I){let B=C.properties?.[G]??vS(C);if(B===null||B===void 0)continue;if(!D.some((O)=>JSON.stringify(O)===JSON.stringify(B)))D.push(B)}let v=D.length===1?D[0]:w_(D)??{allOf:D};GI(Q,G,v)}for(let G of Z.required??[])K.add(G)}let J={type:"object",properties:Q};if(K.size)J.required=[...K];if(I.every((Z)=>Z.additionalProperties===!1))J.additionalProperties=!1;else{let Z=[];for(let G of I){let D=vS(G);if(D&&!Z.some((v)=>JSON.stringify(v)===JSON.stringify(D)))Z.push(D)}if(Z.length===1)J.additionalProperties=Z[0];else if(Z.length>1)J.additionalProperties={allOf:Z}}return J}function fd($){let I=$.allOf;if(!Array.isArray(I)||I.length<2)return;for(let J of kS)if(J in $)return;let Q=I.filter((J)=>ES.some((Z)=>Array.isArray(J[Z]))),K=null;if(!Q.length)K=w_(I);else{let J=Q[0],Z=ES.find((v)=>Array.isArray(J[v]));if(Object.keys(J).length!==1)return;let G=I.filter((v)=>v!==J),D=J[Z].map((v)=>w_([...G,v]));if(D.some((v)=>!v))return;K={[Z]:D}}if(!K)return;delete $.allOf,W5($,K)}function aZ($,I){let Q=$.seen.get(I);if(!Q)throw Error("Unprocessed schema. This is a bug in Zod.");let K=(D)=>{let v=$.seen.get(D);if(v.ref===null)return;let C=v.def??v.schema,B={...C},O=v.ref;if(v.ref=null,O){K(O);let g=$.seen.get(O),x=g.schema;if(x.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))C.allOf=C.allOf??[],C.allOf.push(x);else W5(C,x);if(W5(C,B),D._zod.parent===O)for(let m in C){if(m==="$ref"||m==="allOf")continue;if(!(m in B))delete C[m]}if(x.$ref&&g.def)for(let m in C){if(m==="$ref"||m==="allOf")continue;if(m in g.def&&JSON.stringify(C[m])===JSON.stringify(g.def[m]))delete C[m]}}let N=D._zod.parent;if(N&&N!==O){K(N);let g=$.seen.get(N);if(g?.schema.$ref){if(C.$ref=g.schema.$ref,g.def)for(let x in C){if(x==="$ref"||x==="allOf")continue;if(x in g.def&&JSON.stringify(C[x])===JSON.stringify(g.def[x]))delete C[x]}}}$.override({zodSchema:D,jsonSchema:C,path:v.path??[]})};if(!$.external||$.sharedEmitDoneFor!==$.external){for(let D of[...$.seen.entries()].reverse())K(D[0]);if($.target!=="openapi-3.0")for(let D of $.seen.entries())SS(D[1].def??D[1].schema);for(let D of $.deferred)D();if($.intersections.length){let D=new Map;for(let v of $.seen.values())for(let C of[v.schema,v.def]){let B=C?.allOf;if(!Array.isArray(B))continue;let O=D.get(B);if(O)O.push(C);else D.set(B,[C])}for(let v of $.intersections)for(let C of D.get(v)??[])fd(C)}}let J={};if($.target==="draft-2020-12")J.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")J.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")J.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let D=$.external.registry.get(I)?.id;if(!D)throw Error("Schema is missing an `id` property");J.$id=$.external.uri(D)}W5(J,Q.defId?Q.schema:Q.def??Q.schema);let Z=$.metadataRegistry.get(I)?.id;if(Z!==void 0&&J.id===Z)delete J.id;let G=$.external?.defs??{};if(!$.external||$.sharedEmitDoneFor!==$.external)for(let D of $.seen.entries()){let v=D[1];if(v.def&&v.defId){if(v.def.id===v.defId)delete v.def.id;GI(G,v.defId,v.def)}}if($.external)$.sharedEmitDoneFor=$.external;if($.external);else if(Object.keys(G).length>0)if($.target==="draft-2020-12")J.$defs=G;else J.definitions=G;try{let D=JSON.parse(JSON.stringify(J));return Object.defineProperty(D,"~standard",{value:{...I["~standard"],jsonSchema:{input:bz(I,"input",$.processors),output:bz(I,"output",$.processors)}},enumerable:!1,writable:!1}),D}catch(D){throw Error("Error converting schema to JSON.")}}function IJ($,I){let Q=I??{seen:new Set};if(Q.seen.has($))return!1;Q.seen.add($);let K=$._zod.def;if(K.type==="transform")return!0;if(K.type==="array")return IJ(K.element,Q);if(K.type==="set")return IJ(K.valueType,Q);if(K.type==="lazy")return IJ(K.getter(),Q);if(K.type==="promise"||K.type==="optional"||K.type==="nonoptional"||K.type==="nullable"||K.type==="readonly"||K.type==="default"||K.type==="prefault"||K.type==="catch")return IJ(K.innerType,Q);if(K.type==="intersection")return IJ(K.left,Q)||IJ(K.right,Q);if(K.type==="record"||K.type==="map")return IJ(K.keyType,Q)||IJ(K.valueType,Q);if(K.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return IJ(K.in,Q)||IJ(K.out,Q)}if(K.type==="object"){for(let J in K.shape)if(IJ(K.shape[J],Q))return!0;return!1}if(K.type==="union"){for(let J of K.options)if(IJ(J,Q))return!0;return!1}if(K.type==="tuple"){for(let J of K.items)if(IJ(J,Q))return!0;if(K.rest&&IJ(K.rest,Q))return!0;return!1}return!1}var f_=($,I={})=>(Q)=>{let K=rZ({...Q,processors:I});return e4($,K),tZ(K,$),aZ(K,$)},bz=($,I,Q={})=>(K)=>{let{libraryOptions:J,target:Z}=K??{},G=rZ({...J??{},target:Z,io:I,processors:Q});return e4($,G),tZ(G,$),aZ(G,$)};var hz=($,I,Q)=>{if($[I]===void 0||Q>$[I])$[I]=Q},uz=($,I,Q)=>{if($[I]===void 0||Q<$[I])$[I]=Q},gS=($,I)=>{hz($,"minimum",I),uz($,"maximum",I)},yS=($,I)=>{if($.multipleOf??($.multipleOf=[]),!$.multipleOf.includes(I))$.multipleOf.push(I)},bS=($,I)=>{$.patterns??($.patterns=new Set),$.patterns.add(I)},hS=($,I)=>{$.mime=$.mime?$.mime.filter((Q)=>I.includes(Q)):[...I]},uS=($,I)=>{if($.format=I,I.includes("int"))$.isInt=!0},xS=($,I)=>hz($,"minimum",I.minimum),wS=($,I)=>uz($,"maximum",I.maximum),fS=($)=>(I,Q)=>{uS(I,Q.format);let[K,J]=$[Q.format];hz(I,"minimum",K),uz(I,"maximum",J)},yd={greater_than:($,I)=>hz($,I.inclusive?"minimum":"exclusiveMinimum",I.value),less_than:($,I)=>uz($,I.inclusive?"maximum":"exclusiveMaximum",I.value),multiple_of:($,I)=>yS($,I.value),number_format:fS(NF),bigint_format:fS(EF),min_length:xS,max_length:wS,length_equals:($,I)=>gS($,I.length),min_size:xS,max_size:wS,size_equals:($,I)=>gS($,I.size),string_format:($,I)=>{if(uS($,I.format),I.pattern)bS($,I.pattern);if(I.format==="base64"||I.format==="base64url")$.contentEncoding=I.format;if(I.local||I.precision===-1)$.laxFormat=!0},mime_type:($,I)=>hS($,I.mime)};function VX($){let I={},Q=$._zod.def,K=$._zod.traits.has("$ZodCheck")?[$,...Q.checks??[]]:Q.checks??[];for(let Z of K)yd[Z._zod.def.check]?.(I,Z._zod.def);let J=$._zod.bag;if(J.minimum!==void 0)hz(I,"minimum",J.minimum);if(J.exclusiveMinimum!==void 0)hz(I,"exclusiveMinimum",J.exclusiveMinimum);if(J.maximum!==void 0)uz(I,"maximum",J.maximum);if(J.exclusiveMaximum!==void 0)uz(I,"exclusiveMaximum",J.exclusiveMaximum);if(J.multipleOf!==void 0)yS(I,J.multipleOf);if(J.format!==void 0){if(I.format??(I.format=J.format),J.format.includes("int"))I.isInt=!0}if(J.mime)hS(I,J.mime);for(let Z of J.patterns??[])bS(I,Z);return I}var bd={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},hd=new Map([[iM,fA],[dF,yA]]),mS=($)=>hd.get($)??$,h_=($,I,Q,K)=>{let J=Q;J.type="string";let{minimum:Z,maximum:G,format:D,patterns:v,contentEncoding:C,laxFormat:B}=VX($);if(typeof Z==="number")J.minLength=Z;if(typeof G==="number")J.maxLength=G;if(D){if(J.format=bd[D]??D,J.format==="")delete J.format;if(D==="time"||B)delete J.format}if(C)J.contentEncoding=C;if(v&&v.size>0){let O=[...v].map(mS);if(O.length===1)J.pattern=O[0].source;else if(O.length>1)J.allOf=[...O.map((N)=>({...I.target==="draft-07"||I.target==="draft-04"||I.target==="openapi-3.0"?{type:"string"}:{},pattern:N.source}))]}},u_=($,I,Q,K)=>{let J=Q,{minimum:Z,maximum:G,multipleOf:D,exclusiveMaximum:v,exclusiveMinimum:C,isInt:B}=VX($);J.type=B?"integer":"number";let O=typeof C==="number"&&C>=(Z??Number.NEGATIVE_INFINITY),N=typeof v==="number"&&v<=(G??Number.POSITIVE_INFINITY),g=I.target==="draft-04"||I.target==="openapi-3.0";if(O)if(g)J.minimum=C,J.exclusiveMinimum=!0;else J.exclusiveMinimum=C;else if(typeof Z==="number")J.minimum=Z;if(N)if(g)J.maximum=v,J.exclusiveMaximum=!0;else J.exclusiveMaximum=v;else if(typeof G==="number")J.maximum=G;if(D){let x=new Set;for(let c of D)if(Number.isFinite(c)&&c!==0)x.add(Math.abs(c));else LX($,I,J,K,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`);let[b,...m]=x;if(b!==void 0)J.multipleOf=b;if(m.length)J.allOf=[...J.allOf??[],...m.map((c)=>({multipleOf:c}))]}},m_=($,I,Q,K)=>{Q.type="boolean"},p_=($,I,Q,K)=>{LX($,I,Q,K,"BigInt cannot be represented in JSON Schema")},l_=($,I,Q,K)=>{LX($,I,Q,K,"Symbols cannot be represented in JSON Schema")},c_=($,I,Q,K)=>{if(I.target==="openapi-3.0")Q.type="string",Q.nullable=!0,Q.enum=[null];else Q.type="null"},d_=($,I,Q,K)=>{LX($,I,Q,K,"Undefined cannot be represented in JSON Schema")},n_=($,I,Q,K)=>{LX($,I,Q,K,"Void cannot be represented in JSON Schema")},i_=($,I,Q,K)=>{Q.not={}},o_=($,I,Q,K)=>{},r_=($,I,Q,K)=>{},t_=($,I,Q,K)=>{LX($,I,Q,K,"Date cannot be represented in JSON Schema")},a_=($,I,Q,K)=>{let J=$._zod.def,Z=Kz(J.entries);if(Z.length===0){Q.not={};return}if(Z.every((G)=>typeof G==="number"))Q.type="number";if(Z.every((G)=>typeof G==="string"))Q.type="string";Q.enum=Z},s_=($,I,Q,K)=>{let J=$._zod.def;if(J.values.length===0){Q.not={};return}let Z=[];for(let G of J.values)if(G===void 0){if(LX($,I,Q,K,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof G==="bigint"){if(LX($,I,Q,K,"BigInt literals cannot be represented in JSON Schema"))return;Z.push(Number(G))}else Z.push(G);if(Z.length===0);else if(Z.length===1){let G=Z[0];if(Q.type=G===null?"null":typeof G,I.target==="draft-04"||I.target==="openapi-3.0")Q.enum=[G];else Q.const=G}else{if(Z.every((G)=>typeof G==="number"))Q.type="number";if(Z.every((G)=>typeof G==="string"))Q.type="string";if(Z.every((G)=>typeof G==="boolean"))Q.type="boolean";if(Z.every((G)=>G===null))Q.type="null";Q.enum=Z}},e_=($,I,Q,K)=>{LX($,I,Q,K,"NaN cannot be represented in JSON Schema")},$C=($,I,Q,K)=>{let J=Q,Z=$._zod.pattern;if(!Z)throw Error("Pattern not found in template literal");J.type="string",J.pattern=Z.source},UC=($,I,Q,K)=>{let J=Q;J.type="string",J.format="binary",J.contentEncoding="binary";let{minimum:Z,maximum:G,mime:D}=VX($);if(Z!==void 0)J.minLength=Z;if(G!==void 0)J.maxLength=G;if(!D)return;if(D.length===0)J.not={};else if(D.length===1)J.contentMediaType=D[0];else J.anyOf=D.map((v)=>({contentMediaType:v}))},XC=($,I,Q,K)=>{Q.type="boolean"},IC=($,I,Q,K)=>{LX($,I,Q,K,"Custom types cannot be represented in JSON Schema")},JC=($,I,Q,K)=>{LX($,I,Q,K,"Function types cannot be represented in JSON Schema")},QC=($,I,Q,K)=>{LX($,I,Q,K,"Transforms cannot be represented in JSON Schema")},YC=($,I,Q,K)=>{LX($,I,Q,K,"Map cannot be represented in JSON Schema")},GC=($,I,Q,K)=>{LX($,I,Q,K,"Set cannot be represented in JSON Schema")},ZC=($,I,Q,K)=>{let J=Q,Z=$._zod.def,{minimum:G,maximum:D}=VX($);if(typeof G==="number")J.minItems=G;if(typeof D==="number")J.maxItems=D;J.type="array",J.items=e4(Z.element,I,{...K,path:[...K.path,"items"]})};function K5($){let I=$._zod.def;if(I.type==="pipe"&&I.in._zod.traits.has("$ZodTransform"))return K5(I.out);if(I.type==="catch")return K5(I.innerType);return $._zod.optin}var WC=($,I,Q,K)=>{let J=Q,Z=$._zod.def,G=Z.shape;if(Object.getOwnPropertySymbols(G).length&&LX($,I,J,K,"Symbol keys cannot be represented in JSON Schema"))return;J.type="object",J.properties={};for(let C in G)GI(J.properties,C,e4(G[C],I,{...K,path:[...K.path,"properties",C]}));let v=[];for(let C of Object.keys(G)){let B=Z.shape[C];if(I.io==="input"?K5(B)===void 0:B._zod.optout===void 0)v.push(C)}if(v.length>0)J.required=v;if(Z.catchall?._zod.def.type==="never")J.additionalProperties=!1;else if(!Z.catchall){if(I.io==="output")J.additionalProperties=!1}else if(Z.catchall)J.additionalProperties=e4(Z.catchall,I,{...K,path:[...K.path,"additionalProperties"]})},hD=($,I,Q,K)=>{let J=$._zod.def,Z=J.inclusive===!1,G=J.options.map((D,v)=>e4(D,I,{...K,path:[...K.path,Z?"oneOf":"anyOf",v]}));if(Z)Q.oneOf=G;else Q.anyOf=G},KC=($,I,Q,K)=>{let J=$._zod.def,Z=e4(J.left,I,{...K,path:[...K.path,"allOf",0]}),G=e4(J.right,I,{...K,path:[...K.path,"allOf",1]}),D=(C)=>("allOf"in C)&&Object.keys(C).length===1,v=[...D(Z)?Z.allOf:[Z],...D(G)?G.allOf:[G]];Q.allOf=v,I.intersections.push(v)},zC=($,I,Q,K)=>{let J=Q,Z=$._zod.def;J.type="array";let G=I.target==="draft-2020-12"?"prefixItems":"items",D=I.target==="draft-2020-12"?"items":I.target==="openapi-3.0"?"items":"additionalItems",v=Z.items.map((b,m)=>e4(b,I,{...K,path:[...K.path,G,m]})),C=Z.rest?e4(Z.rest,I,{...K,path:[...K.path,D,...I.target==="openapi-3.0"?[Z.items.length]:[]]}):null,B=Z.items.length;while(B>0){let b=Z.items[B-1];if(!(I.io==="input"?K5(b)!==void 0:b._zod.optout==="optional"))break;B--}let O=Z.items.length,N=!Z.rest;if(I.target==="draft-2020-12"){if(J.prefixItems=v,N)J.items=!1;else if(C)J.items=C;if(B>0)J.minItems=B;if(N)J.maxItems=O}else if(I.target==="openapi-3.0"){if(J.items={anyOf:v},C)J.items.anyOf.push(C);if(B>0)J.minItems=B;if(N)J.maxItems=O}else{if(J.items=v,N)J.additionalItems=!1;else if(C)J.additionalItems=C;if(B>0)J.minItems=B;if(N)J.maxItems=O}let{minimum:g,maximum:x}=VX($);if(typeof g==="number")J.minItems=g;if(typeof x==="number")J.maxItems=x};function y_($,I,Q){if(I.$ref){if(Q.has(I))return I;Q.add(I);let x=$.get(I)?.def;if(!x)return I;let b=y_($,x,Q);return b===x?I:b}for(let x of["anyOf","oneOf"]){let b=I[x];if(!Array.isArray(b))continue;let m=b.map((c)=>y_($,c,Q));if(m.some((c,h)=>c!==b[h]))I={...I,[x]:m}}let K=Array.isArray(I.type)?I.type:[I.type],J=!K.includes("string")&&K.some((x)=>x==="number"||x==="integer"),Z=I.enum??(I.const!==void 0?[I.const]:void 0);if(!J&&!Z?.some((x)=>typeof x==="number"))return I;let{minimum:G,maximum:D,exclusiveMinimum:v,exclusiveMaximum:C,multipleOf:B,format:O,id:N,...g}=I;if(g.enum)g.enum=g.enum.map((x)=>typeof x==="number"?String(x):x);else if(typeof g.const==="number")g.const=String(g.const);if(!J)return g;if(g.type="string",!Z)g.pattern=(K.includes("number")?zG:bF).source;return g}var b_=new WeakMap;function ud($){let I=new Map;for(let K of $.seen.values())if(K.def&&!I.has(K.schema))I.set(K.schema,K);let Q=new Map;for(let K of b_.get($)??[]){let J=$.seen.get(K),Z=(J?.def??J?.schema)?.propertyNames;if(!Z||Z===!0||Q.has(Z))continue;let G=y_(I,Z,new Set);if(G!==Z)Q.set(Z,G)}if(!Q.size)return;for(let K of $.seen.values())for(let J of[K.schema,K.def]){let Z=J&&Q.get(J.propertyNames);if(Z)J.propertyNames=Z}}var HC=($,I,Q,K)=>{let J=Q,Z=$._zod.def;J.type="object";let G=Z.keyType,D=VX(G).patterns;if(Z.mode==="loose"&&D&&D.size>0){let B=e4(Z.valueType,I,{...K,path:[...K.path,"patternProperties","*"]});J.patternProperties={};for(let O of D)GI(J.patternProperties,mS(O).source,B)}else{if(I.target==="draft-07"||I.target==="draft-2020-12"){J.propertyNames=e4(Z.keyType,I,{...K,path:[...K.path,"propertyNames"]});let B=b_.get(I);if(!B)B=[],b_.set(I,B),I.deferred.push(()=>ud(I));B.push($)}J.additionalProperties=e4(Z.valueType,I,{...K,path:[...K.path,"additionalProperties"]})}let v=G._zod.values,C=I.io==="input"&&K5(Z.valueType)!==void 0;if(v&&!Z.partial&&!C){let B=[...v].filter((O)=>typeof O==="string"||typeof O==="number");if(B.length>0)J.required=B.map(String)}},FC=($,I,Q,K)=>{let J=$._zod.def,Z=e4(J.innerType,I,K),G=I.seen.get($);if(I.target==="openapi-3.0")G.ref=J.innerType,Q.nullable=!0;else Q.anyOf=[Z,{type:"null"}]},MC=($,I,Q,K)=>{let J=$._zod.def;e4(J.innerType,I,K);let Z=I.seen.get($);Z.ref=J.innerType},DC=Symbol();function pS($,I,Q,K,J){let Z=!1,G=JSON.stringify($,(D,v)=>{if(typeof v!=="bigint")return v;return Z=!0,null});if(!Z)return JSON.parse(G);return LX(I,Q,K,J,"BigInt defaults cannot be represented in JSON Schema"),DC}var OC=($,I,Q,K)=>{let J=$._zod.def;e4(J.innerType,I,K);let Z=I.seen.get($);Z.ref=J.innerType;let G=pS(J.defaultValue,$,I,Q,K);if(G!==DC)Q.default=G},LC=($,I,Q,K)=>{let J=$._zod.def;e4(J.innerType,I,K);let Z=I.seen.get($);if(Z.ref=J.innerType,I.io!=="input")return;let G=pS(J.defaultValue,$,I,Q,K);if(G!==DC)Q._prefault=G},VC=($,I,Q,K)=>{let J=$._zod.def;e4(J.innerType,I,K);let Z=I.seen.get($);Z.ref=J.innerType;let G;try{G=J.catchValue(void 0)}catch{LX($,I,Q,K,"Dynamic catch values are not supported in JSON Schema");return}Q.default=G},AC=($,I,Q,K)=>{let J=$._zod.def,Z=J.in._zod.traits.has("$ZodTransform"),G=I.io==="input"?Z?J.out:J.in:J.out;e4(G,I,K);let D=I.seen.get($);D.ref=G},TC=($,I,Q,K)=>{let J=$._zod.def;e4(J.innerType,I,K);let Z=I.seen.get($);Z.ref=J.innerType,Q.readOnly=!0},PC=($,I,Q,K)=>{let J=$._zod.def;e4(J.innerType,I,K);let Z=I.seen.get($);Z.ref=J.innerType},uD=($,I,Q,K)=>{let J=$._zod.def;e4(J.innerType,I,K);let Z=I.seen.get($);Z.ref=J.innerType},RC=($,I,Q,K)=>{let J=$._zod.innerType;e4(J,I,K);let Z=I.seen.get($);Z.ref=J},bD={string:h_,number:u_,boolean:m_,bigint:p_,symbol:l_,null:c_,undefined:d_,void:n_,never:i_,any:o_,unknown:r_,date:t_,enum:a_,literal:s_,nan:e_,template_literal:$C,file:UC,success:XC,custom:IC,function:JC,transform:QC,map:YC,set:GC,array:ZC,object:WC,union:hD,intersection:KC,tuple:zC,record:HC,nullable:FC,nonoptional:MC,default:OC,prefault:LC,catch:VC,pipe:AC,readonly:TC,promise:PC,optional:uD,lazy:RC};function mD($,I){if("_idmap"in $){let K=$,J=rZ({...I,processors:bD}),Z={};for(let v of K._idmap.entries()){let[C,B]=v;e4(B,J)}let G={},D={registry:K,uri:I?.uri,defs:Z};J.external=D;for(let v of K._idmap.entries()){let[C,B]=v;tZ(J,B),GI(G,C,aZ(J,B))}if(Object.keys(Z).length>0){let v=J.target==="draft-2020-12"?"$defs":"definitions";G.__shared={[v]:Z}}return{schemas:G}}let Q=rZ({...I,processors:bD});return e4($,Q),tZ(Q,$),aZ(Q,$)}class _C{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($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";this.ctx=rZ({processors:bD,target:I,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,I={path:[],schemaPath:[]}){return e4($,this.ctx,I)}emit($,I){if(I){if(I.cycles)this.ctx.cycles=I.cycles;if(I.reused)this.ctx.reused=I.reused;if(I.external)this.ctx.external=I.external}this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,tZ(this.ctx,$);let Q=aZ(this.ctx,$),{"~standard":K,...J}=Q;return J}}var lS={};var oz={};tI(oz,{xor:()=>hk,xid:()=>Qk,void:()=>gk,uuidv7:()=>aS,uuidv6:()=>tS,uuidv4:()=>rS,uuid:()=>oS,url:()=>sS,unknown:()=>k9,union:()=>iz,undefined:()=>Sk,ulid:()=>Jk,uint64:()=>Ek,uint32:()=>Bk,tuple:()=>Uq,transform:()=>FO,templateLiteral:()=>ek,symbol:()=>vk,superRefine:()=>Nq,success:()=>rk,stringbool:()=>Gg,stringFormat:()=>Vk,string:()=>z5,strictObject:()=>yk,set:()=>ck,refine:()=>jq,record:()=>Xq,readonly:()=>Pq,promise:()=>$g,preprocess:()=>Wg,prefault:()=>Fq,pipe:()=>dD,partialRecord:()=>mk,optional:()=>g9,object:()=>fk,number:()=>hC,nullish:()=>ok,nullable:()=>H5,null:()=>cC,nonoptional:()=>Mq,never:()=>zO,nativeEnum:()=>dk,nanoid:()=>Uk,nan:()=>tk,meta:()=>Qg,map:()=>lk,mac:()=>Zk,looseRecord:()=>pk,looseObject:()=>bk,literal:()=>nk,lazy:()=>Cq,ksuid:()=>Yk,keyof:()=>wk,jwt:()=>Lk,json:()=>Zg,ipv6:()=>Wk,ipv4:()=>Gk,invertCodec:()=>sk,intersection:()=>eC,int64:()=>Nk,int32:()=>qk,int:()=>cD,instanceof:()=>Yg,iban:()=>Ok,httpUrl:()=>eS,hostname:()=>Ak,hex:()=>Tk,hash:()=>Rk,guid:()=>iS,function:()=>Ug,float64:()=>Ck,float32:()=>_k,file:()=>ik,exactOptional:()=>Zq,enum:()=>HO,emoji:()=>$k,email:()=>nS,e164:()=>Mk,discriminatedUnion:()=>uk,describe:()=>Jg,date:()=>xk,custom:()=>Ig,currencyCode:()=>Pk,cuid2:()=>Ik,cuid:()=>Xk,creditCard:()=>Dk,codec:()=>ak,cidrv6:()=>zk,cidrv4:()=>Kk,check:()=>Xg,catch:()=>Lq,boolean:()=>uC,bigint:()=>jk,base64url:()=>Fk,base64:()=>Hk,array:()=>D5,any:()=>kk,_function:()=>Ug,_default:()=>zq,_ZodString:()=>nD,ZodXor:()=>tC,ZodXID:()=>$O,ZodVoid:()=>oC,ZodUnknown:()=>nC,ZodUnion:()=>L5,ZodUndefined:()=>pC,ZodUUID:()=>OG,ZodURL:()=>F5,ZodULID:()=>eD,ZodType:()=>v6,ZodTuple:()=>$q,ZodTransform:()=>Gq,ZodTemplateLiteral:()=>Rq,ZodSymbol:()=>mC,ZodSuccess:()=>Dq,ZodStringFormat:()=>QU,ZodString:()=>lz,ZodSet:()=>Jq,ZodRecord:()=>mz,ZodReadonly:()=>Tq,ZodPromise:()=>qq,ZodPreprocess:()=>Aq,ZodPrefault:()=>Hq,ZodPipe:()=>A5,ZodOptional:()=>V5,ZodObject:()=>O5,ZodNumberFormat:()=>f9,ZodNumber:()=>cz,ZodNullable:()=>Wq,ZodNull:()=>lC,ZodNonOptional:()=>DO,ZodNever:()=>iC,ZodNanoID:()=>tD,ZodNaN:()=>Vq,ZodMap:()=>Iq,ZodMAC:()=>fC,ZodLiteral:()=>Qq,ZodLazy:()=>_q,ZodKSUID:()=>UO,ZodJWT:()=>WO,ZodIntersection:()=>sC,ZodInstanceOf:()=>Eq,ZodISOTime:()=>$W,ZodISODuration:()=>UW,ZodISODateTime:()=>sZ,ZodISODate:()=>eZ,ZodIPv6:()=>IO,ZodIPv4:()=>XO,ZodIBAN:()=>bC,ZodGUID:()=>oD,ZodFunction:()=>Bq,ZodFile:()=>Yq,ZodExactOptional:()=>MO,ZodEnum:()=>pz,ZodEmoji:()=>rD,ZodEmail:()=>iD,ZodE164:()=>ZO,ZodDiscriminatedUnion:()=>aC,ZodDefault:()=>Kq,ZodDate:()=>M5,ZodCustomStringFormat:()=>w9,ZodCustom:()=>P5,ZodCreditCard:()=>yC,ZodCodec:()=>T5,ZodCatch:()=>Oq,ZodCUID2:()=>sD,ZodCUID:()=>aD,ZodCIDRv6:()=>QO,ZodCIDRv4:()=>JO,ZodBoolean:()=>dz,ZodBigIntFormat:()=>KO,ZodBigInt:()=>nz,ZodBase64URL:()=>GO,ZodBase64:()=>YO,ZodArray:()=>rC,ZodAny:()=>dC});var pD={};tI(pD,{uppercase:()=>jz,trim:()=>xz,toUpperCase:()=>fz,toLowerCase:()=>wz,startsWith:()=>Ez,slugify:()=>yz,size:()=>N9,regex:()=>qz,property:()=>yD,properties:()=>Sz,positive:()=>gD,overwrite:()=>Y2,normalize:()=>gz,nonpositive:()=>wD,nonnegative:()=>fD,negative:()=>xD,multipleOf:()=>iZ,minSize:()=>DG,minLength:()=>C8,mime:()=>kz,maxSize:()=>oZ,maxLength:()=>E9,lte:()=>VQ,lt:()=>FG,lowercase:()=>Bz,length:()=>v9,includes:()=>Nz,gte:()=>AQ,gt:()=>MG,endsWith:()=>vz});var cS=new WeakSet([Object.prototype,Error.prototype]);function lD($,I,Q){Object.defineProperty($,I,{configurable:!0,enumerable:!1,get(){let K=Q(this);return Object.defineProperty(this,I,{value:K,configurable:!0,writable:!0}),K},set(K){Object.defineProperty(this,I,{value:K,configurable:!0,writable:!0})}})}var dS=($,I)=>{OA.init($,I),$.name="ZodError";let Q=Object.getPrototypeOf($);if(cS.has(Q))return;cS.add(Q),lD(Q,"format",(K)=>(J)=>xF(K,J)),lD(Q,"flatten",(K)=>(J)=>gF(K,J)),lD(Q,"addIssue",(K)=>(J)=>{K.issues.push(J),K.message=JSON.stringify(K.issues,zz,2)}),lD(Q,"addIssues",(K)=>(J)=>{K.issues.push(...J),K.message=JSON.stringify(K.issues,zz,2)}),Object.defineProperty(Q,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}})},pd=d$("ZodError",dS),fJ=d$("ZodError",dS,void 0,{Parent:Error});var CC=Dz(fJ),qC=Oz(fJ),BC=Lz(fJ),jC=Vz(fJ),NC=CM(fJ),EC=qM(fJ),vC=BM(fJ),SC=jM(fJ),kC=NM(fJ),gC=EM(fJ),xC=vM(fJ),wC=SM(fJ);function cd(){if(!bX.localeError)C1(eF())}function x9(){if(!bX.memoizer)C1({memoizer:sF()})}var v6=d$("ZodType",($,I)=>{return cd(),A6.init($,I),$.def=I,$.type=I.type,$},{check(...$){let I=this.def;return this.clone(V0.mergeDefs(I,{checks:[...I.checks??[],...$.map((Q)=>typeof Q==="function"?{_zod:{check:Q,def:{check:"custom"},onattach:[]}}:Q)]}),{parent:!0})},with(...$){return this.check(...$)},clone($,I){return a4(this,$,I)},brand(){return this},register($,I){return $.add(this,I),this},refine($,I){return this.check(jq($,I))},superRefine($,I){return this.check(Nq($,I))},overwrite($){return this.check(Y2($))},optional(){return g9(this)},exactOptional(){return Zq(this)},nullable(){return H5(this)},nullish(){return g9(H5(this))},nonoptional($){return Mq(this,$)},array(){return D5(this)},or($){return iz([this,$])},and($){return eC(this,$)},transform($){return dD(this,FO($))},default($){return zq(this,$)},prefault($){return Fq(this,$)},catch($){return Lq(this,$)},pipe($){return dD(this,$)},readonly(){return Pq(this)},describe($){let I=this.clone();return ZI.add(I,{description:$}),I},meta(...$){if($.length===0)return ZI.get(this);let I=this.clone();return ZI.add(I,$[0]),I},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply($,...I){return I.length===0?$(this):$(this,...I)},get "~standard"(){return V0.hide(this,"~standard",{...pM(this),jsonSchema:{input:bz(this,"input"),output:bz(this,"output")}})},set "~standard"($){V0.own(this,"~standard",$)},parse:function $(I,Q){return CC(this,I,Q,{callee:$})},parseAsync:async function $(I,Q){return await qC(this,I,Q,{callee:$})},safeParse($,I){return BC(this,$,I)},async safeParseAsync($,I){return jC(this,$,I)},get spa(){return this?.safeParseAsync},set spa($){V0.own(this,"spa",$)},validate($,I){return wF(this,$,I)},validateAsync($,I){return fF(this,$,I)},encode:function $(I,Q){return NC(this,I,Q,{callee:$})},decode:function $(I,Q){return EC(this,I,Q,{callee:$})},encodeAsync:async function $(I,Q){return await vC(this,I,Q,{callee:$})},decodeAsync:async function $(I,Q){return await SC(this,I,Q,{callee:$})},safeEncode($,I){return kC(this,$,I)},safeDecode($,I){return gC(this,$,I)},async safeEncodeAsync($,I){return xC(this,$,I)},async safeDecodeAsync($,I){return wC(this,$,I)},toJSONSchema($){return f_(this,{})($)},get description(){return ZI.get(this)?.description},get _def(){return this._zod.def}}),nD=d$("_ZodString",($,I)=>{_9.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>h_($,Q,K,J)},V0.derived({format:($)=>VX($).format??null,minLength:($)=>VX($).minimum??null,maxLength:($)=>VX($).maximum??null},{regex(...$){return this.check(qz(...$))},includes(...$){return this.check(Nz(...$))},startsWith(...$){return this.check(Ez(...$))},endsWith(...$){return this.check(vz(...$))},min(...$){return this.check(C8(...$))},max(...$){return this.check(E9(...$))},length(...$){return this.check(v9(...$))},nonempty(...$){return this.check(C8(1,...$))},lowercase($){return this.check(Bz($))},uppercase($){return this.check(jz($))},trim(){return this.check(xz())},normalize(...$){return this.check(gz(...$))},toLowerCase(){return this.check(wz())},toUpperCase(){return this.check(fz())},slugify(){return this.check(yz())}})),lz=d$("ZodString",($,I)=>{_9.init($,I),nD.init($,I)},{email($){return this.check(HD(iD,$))},url($){return this.check(J5(F5,$))},jwt($){return this.check(kD(WO,$))},emoji($){return this.check(VD(rD,$))},guid($){return this.check(FD(oD,$))},uuid($){return this.check(MD(OG,$))},uuidv4($){return this.check(DD(OG,$))},uuidv6($){return this.check(OD(OG,$))},uuidv7($){return this.check(LD(OG,$))},nanoid($){return this.check(AD(tD,$))},cuid($){return this.check(TD(aD,$))},cuid2($){return this.check(PD(sD,$))},ulid($){return this.check(RD(eD,$))},base64($){return this.check(ED(YO,$))},base64url($){return this.check(vD(GO,$))},xid($){return this.check(_D($O,$))},ksuid($){return this.check(CD(UO,$))},ipv4($){return this.check(qD(XO,$))},ipv6($){return this.check(BD(IO,$))},cidrv4($){return this.check(jD(JO,$))},cidrv6($){return this.check(ND(QO,$))},e164($){return this.check(SD(ZO,$))},datetime($){return this.check(Q5(sZ,$))},date($){return this.check(Y5(eZ,$))},time($){return this.check(G5($W,$))},duration($){return this.check(Z5(UW,$))}});function z5($){return sR(lz,$)}var QU=d$("ZodStringFormat",($,I)=>{s4.init($,I),nD.init($,I)}),sZ=d$("ZodISODateTime",($,I)=>{fT.init($,I),QU.init($,I)}),eZ=d$("ZodISODate",($,I)=>{yT.init($,I),QU.init($,I)}),$W=d$("ZodISOTime",($,I)=>{bT.init($,I),QU.init($,I)}),UW=d$("ZodISODuration",($,I)=>{hT.init($,I),QU.init($,I)}),iD=d$("ZodEmail",($,I)=>{qT.init($,I),QU.init($,I)});function nS($){return HD(iD,$)}var oD=d$("ZodGUID",($,I)=>{_T.init($,I),QU.init($,I)});function iS($){return FD(oD,$)}var OG=d$("ZodUUID",($,I)=>{CT.init($,I),QU.init($,I)});function oS($){return MD(OG,$)}function rS($){return DD(OG,$)}function tS($){return OD(OG,$)}function aS($){return LD(OG,$)}var F5=d$("ZodURL",($,I)=>{NT.init($,I),QU.init($,I)});function sS($){return J5(F5,$)}function eS($){return J5(F5,{protocol:yF,hostname:hA,...V0.normalizeParams($)})}var rD=d$("ZodEmoji",($,I)=>{ET.init($,I),QU.init($,I)});function $k($){return VD(rD,$)}var tD=d$("ZodNanoID",($,I)=>{vT.init($,I),QU.init($,I)});function Uk($){return AD(tD,$)}var aD=d$("ZodCUID",($,I)=>{ST.init($,I),QU.init($,I)});function Xk($){return TD(aD,$)}var sD=d$("ZodCUID2",($,I)=>{kT.init($,I),QU.init($,I)});function Ik($){return PD(sD,$)}var eD=d$("ZodULID",($,I)=>{gT.init($,I),QU.init($,I)});function Jk($){return RD(eD,$)}var $O=d$("ZodXID",($,I)=>{xT.init($,I),QU.init($,I)});function Qk($){return _D($O,$)}var UO=d$("ZodKSUID",($,I)=>{wT.init($,I),QU.init($,I)});function Yk($){return CD(UO,$)}var XO=d$("ZodIPv4",($,I)=>{uT.init($,I),QU.init($,I)});function Gk($){return qD(XO,$)}var fC=d$("ZodMAC",($,I)=>{pT.init($,I),QU.init($,I)});function Zk($){return $_(fC,$)}var IO=d$("ZodIPv6",($,I)=>{mT.init($,I),QU.init($,I)});function Wk($){return BD(IO,$)}var JO=d$("ZodCIDRv4",($,I)=>{lT.init($,I),QU.init($,I)});function Kk($){return jD(JO,$)}var QO=d$("ZodCIDRv6",($,I)=>{cT.init($,I),QU.init($,I)});function zk($){return ND(QO,$)}var YO=d$("ZodBase64",($,I)=>{dT.init($,I),QU.init($,I)});function Hk($){return ED(YO,$)}var GO=d$("ZodBase64URL",($,I)=>{nT.init($,I),QU.init($,I)});function Fk($){return vD(GO,$)}var ZO=d$("ZodE164",($,I)=>{iT.init($,I),QU.init($,I)});function Mk($){return SD(ZO,$)}var yC=d$("ZodCreditCard",($,I)=>{oT.init($,I),QU.init($,I)});function Dk($){return U_(yC,$)}var bC=d$("ZodIBAN",($,I)=>{rT.init($,I),QU.init($,I)});function Ok($){return X_(bC,$)}var WO=d$("ZodJWT",($,I)=>{tT.init($,I),QU.init($,I)});function Lk($){return kD(WO,$)}var w9=d$("ZodCustomStringFormat",($,I)=>{aT.init($,I),QU.init($,I)});function Vk($,I,Q={}){return S9(w9,$,I,Q)}function Ak($){return S9(w9,"hostname",bA,$)}function Tk($){return S9(w9,"hex",eA,$)}function Pk($){return S9(w9,"currency_code",mA,$)}function Rk($,I){let Q=I?.enc??"hex",K=`${$}_${Q}`,J=zY[K];if(!J)throw Error(`Unrecognized hash format: ${K}`);return S9(w9,K,J,I)}var cz=d$("ZodNumber",($,I)=>{sM.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>u_($,Q,K,J),$.isFinite=!0},V0.derived({minValue:($)=>{let{minimum:I,exclusiveMinimum:Q}=VX($);return Math.max(I??Number.NEGATIVE_INFINITY,Q??Number.NEGATIVE_INFINITY)},maxValue:($)=>{let{maximum:I,exclusiveMaximum:Q}=VX($);return Math.min(I??Number.POSITIVE_INFINITY,Q??Number.POSITIVE_INFINITY)},isInt:($)=>{let{isInt:I,multipleOf:Q}=VX($);return!!I||!!Q?.some(Number.isSafeInteger)},format:($)=>VX($).format??null},{gt($,I){return this.check(MG($,I))},gte($,I){return this.check(AQ($,I))},min($,I){return this.check(AQ($,I))},lt($,I){return this.check(FG($,I))},lte($,I){return this.check(VQ($,I))},max($,I){return this.check(VQ($,I))},int($){return this.check(cD($))},safe($){return this.check(cD($))},positive($){return this.check(MG(0,$))},nonnegative($){return this.check(AQ(0,$))},negative($){return this.check(FG(0,$))},nonpositive($){return this.check(VQ(0,$))},multipleOf($,I){return this.check(iZ($,I))},step($,I){return this.check(iZ($,I))},finite(){return this}}));function hC($){return J_(cz,$)}var f9=d$("ZodNumberFormat",($,I)=>{sT.init($,I),cz.init($,I)});function cD($){return Y_(f9,$)}function _k($){return G_(f9,$)}function Ck($){return Z_(f9,$)}function qk($){return W_(f9,$)}function Bk($){return K_(f9,$)}var dz=d$("ZodBoolean",($,I)=>{nF.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>m_($,Q,K,J)});function uC($){return z_(dz,$)}var nz=d$("ZodBigInt",($,I)=>{eM.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>p_($,Q,K,J)},V0.derived({minValue:($)=>VX($).minimum??null,maxValue:($)=>VX($).maximum??null,format:($)=>VX($).format??null},{gte($,I){return this.check(AQ($,I))},min($,I){return this.check(AQ($,I))},gt($,I){return this.check(MG($,I))},lt($,I){return this.check(FG($,I))},lte($,I){return this.check(VQ($,I))},max($,I){return this.check(VQ($,I))},positive($){return this.check(MG(BigInt(0),$))},negative($){return this.check(FG(BigInt(0),$))},nonpositive($){return this.check(VQ(BigInt(0),$))},nonnegative($){return this.check(AQ(BigInt(0),$))},multipleOf($,I){return this.check(iZ($,I))}}));function jk($){return F_(nz,$)}var KO=d$("ZodBigIntFormat",($,I)=>{eT.init($,I),nz.init($,I)});function Nk($){return D_(KO,$)}function Ek($){return O_(KO,$)}var mC=d$("ZodSymbol",($,I)=>{$P.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>l_($,Q,K,J)});function vk($){return L_(mC,$)}var pC=d$("ZodUndefined",($,I)=>{UP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>d_($,Q,K,J)});function Sk($){return V_(pC,$)}var lC=d$("ZodNull",($,I)=>{XP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>c_($,Q,K,J)});function cC($){return A_(lC,$)}var dC=d$("ZodAny",($,I)=>{IP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>o_($,Q,K,J)});function kk(){return T_(dC)}var nC=d$("ZodUnknown",($,I)=>{JP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>r_($,Q,K,J)});function k9(){return P_(nC)}var iC=d$("ZodNever",($,I)=>{QP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>i_($,Q,K,J)});function zO($){return R_(iC,$)}var oC=d$("ZodVoid",($,I)=>{YP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>n_($,Q,K,J)});function gk($){return __(oC,$)}var M5=d$("ZodDate",($,I)=>{GP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>t_($,Q,K,J),$.min=(Q,K)=>$.check(AQ(Q,K)),$.max=(Q,K)=>$.check(VQ(Q,K))},V0.derived({minDate:($)=>{let{minimum:I}=VX($);return I?new Date(I):null},maxDate:($)=>{let{maximum:I}=VX($);return I?new Date(I):null}},{}));function xk($){return C_(M5,$)}var rC=d$("ZodArray",($,I)=>{x9(),ZP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>ZC($,Q,K,J),$.element=I.element},{min($,I){return this.check(C8($,I))},nonempty($){return this.check(C8(1,$))},max($,I){return this.check(E9($,I))},length($,I){return this.check(v9($,I))},unwrap(){return this.element}});function D5($,I){return j_(rC,$,I)}function wk($){let I=$._zod.def.shape;return HO(Object.keys(I))}var O5=d$("ZodObject",($,I)=>{x9(),WP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>WC($,Q,K,J),V0.installLazyProp($,"shape",(Q)=>Q._zod.def.shape,!1)},{keyof(){return HO(Object.keys(this._zod.def.shape))},catchall($){return this.clone(V0.mergeDefs(this._zod.def,{catchall:$}))},passthrough(){return this.clone(V0.mergeDefs(this._zod.def,{catchall:k9()}))},loose(){return this.clone(V0.mergeDefs(this._zod.def,{catchall:k9()}))},strict(){return this.clone(V0.mergeDefs(this._zod.def,{catchall:zO()}))},strip(){return this.clone(V0.mergeDefs(this._zod.def,{catchall:void 0}))},extend($){return V0.extend(this,$)},safeExtend($){return V0.safeExtend(this,$)},merge($){return V0.merge(this,$)},pick($){return V0.pick(this,$)},omit($){return V0.omit(this,$)},partial(...$){return V0.partial(V5,this,$[0])},exactPartial(...$){return V0.partial(MO,this,$[0],"exactPartial")},required(...$){return V0.required(DO,this,$[0])}});function fk($,I){let Q={type:"object",shape:$??{},...V0.normalizeParams(I)};return new O5(Q)}function yk($,I){return new O5({type:"object",shape:$,catchall:zO(),...V0.normalizeParams(I)})}function bk($,I){return new O5({type:"object",shape:$,catchall:k9(),...V0.normalizeParams(I)})}var L5=d$("ZodUnion",($,I)=>{iF.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>hD($,Q,K,J),$.options=I.options});function iz($,I){return new L5({type:"union",options:$,...V0.normalizeParams(I)})}var tC=d$("ZodXor",($,I)=>{L5.init($,I),KP.init($,I),$._zod.processJSONSchema=(Q,K,J)=>hD($,Q,K,J),$.options=I.options});function hk($,I){return new tC({type:"union",options:$,inclusive:!1,...V0.normalizeParams(I)})}var aC=d$("ZodDiscriminatedUnion",($,I)=>{L5.init($,I),HP.init($,I)});function uk($,I,Q){return new aC({type:"union",options:I,discriminator:$,...V0.normalizeParams(Q)})}var sC=d$("ZodIntersection",($,I)=>{FP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>KC($,Q,K,J)});function eC($,I){return new sC({type:"intersection",left:$,right:I})}var $q=d$("ZodTuple",($,I)=>{x9(),$D.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>zC($,Q,K,J)},{rest($){return this.clone({...this._zod.def,rest:$})},partial(){let $=this._zod.def;if($.checks?.length)throw Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...$,items:$.items.map((I)=>new V5({type:"optional",innerType:I}))})}});function Uq($,I,Q){let K=I instanceof A6,J=K?Q:I;return new $q({type:"tuple",items:$,rest:K?I:null,...V0.normalizeParams(J)})}var mz=d$("ZodRecord",($,I)=>{x9(),MP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>HC($,Q,K,J),$.keyType=I.keyType,$.valueType=I.valueType});function Xq($,I,Q){if(!I||!I._zod)return new mz({type:"record",keyType:z5(),valueType:$,...V0.normalizeParams(I)});return new mz({type:"record",keyType:$,valueType:I,...V0.normalizeParams(Q)})}function mk($,I,Q){return new mz({type:"record",keyType:$,valueType:I,...V0.normalizeParams(Q),partial:!0})}function pk($,I,Q){return new mz({type:"record",keyType:$,valueType:I,mode:"loose",...V0.normalizeParams(Q)})}var Iq=d$("ZodMap",($,I)=>{x9(),DP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>YC($,Q,K,J),$.keyType=I.keyType,$.valueType=I.valueType,$.min=(...Q)=>$.check(DG(...Q)),$.nonempty=(Q)=>$.check(DG(1,Q)),$.max=(...Q)=>$.check(oZ(...Q)),$.size=(...Q)=>$.check(N9(...Q))});function lk($,I,Q){return new Iq({type:"map",keyType:$,valueType:I,...V0.normalizeParams(Q)})}var Jq=d$("ZodSet",($,I)=>{x9(),OP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>GC($,Q,K,J),$.min=(...Q)=>$.check(DG(...Q)),$.nonempty=(Q)=>$.check(DG(1,Q)),$.max=(...Q)=>$.check(oZ(...Q)),$.size=(...Q)=>$.check(N9(...Q))});function ck($,I){return new Jq({type:"set",valueType:$,...V0.normalizeParams(I)})}var pz=d$("ZodEnum",($,I)=>{LP.init($,I),v6.init($,I),$._zod.processJSONSchema=(K,J,Z)=>a_($,K,J,Z),$.enum=I.entries,$.options=[...$._zod.values];let Q=new Set(Object.keys(I.entries));$.extract=(K,J)=>{let Z={};for(let G of K)if(Q.has(G))Z[G]=I.entries[G];else throw Error(`Key ${G} not found in enum`);return new pz({...I,checks:[],...V0.normalizeParams(J),entries:Z})},$.exclude=(K,J)=>{let Z={...I.entries};for(let G of K)if(Q.has(G))delete Z[G];else throw Error(`Key ${G} not found in enum`);return new pz({...I,checks:[],...V0.normalizeParams(J),entries:Z})}});function HO($,I){let Q=Array.isArray($)?Object.fromEntries($.map((K)=>[K,K])):$;return new pz({type:"enum",entries:Q,...V0.normalizeParams(I)})}function dk($,I){return new pz({type:"enum",entries:$,...V0.normalizeParams(I)})}var Qq=d$("ZodLiteral",($,I)=>{VP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>s_($,Q,K,J),$.values=new Set(I.values),Object.defineProperty($,"value",{get(){if(I.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return I.values[0]}})});function nk($,I){return new Qq({type:"literal",values:Array.isArray($)?$:[$],...V0.normalizeParams(I)})}var Yq=d$("ZodFile",($,I)=>{AP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>UC($,Q,K,J),$.min=(Q,K)=>$.check(DG(Q,K)),$.max=(Q,K)=>$.check(oZ(Q,K)),$.mime=(Q,K)=>$.check(kz(Array.isArray(Q)?Q:[Q],K))});function ik($){return N_(Yq,$)}var Gq=d$("ZodTransform",($,I)=>{x9(),TP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>QC($,Q,K,J),$._zod.parse=(Q,K)=>{if(K.direction==="backward")throw new P9($.constructor.name);Q.addIssue=(Z)=>{if(typeof Z==="string")Q.issues.push(V0.issue(Z,Q.value,I));else{let G=Z;if(G.fatal)G.continue=!1;if(G.code??(G.code="custom"),!("input"in G))G.input=Q.value;G.inst??(G.inst=$),Q.issues.push(V0.issue(G))}};let J=I.transform(Q.value,Q);if(J instanceof Promise)return J.then((Z)=>{return Q.value=Z,Q});return Q.value=J,Q}});function FO($){return new Gq({type:"transform",transform:$})}var V5=d$("ZodOptional",($,I)=>{UD.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>uD($,Q,K,J),$.unwrap=()=>$._zod.def.innerType});function g9($){return new V5({type:"optional",innerType:$})}var MO=d$("ZodExactOptional",($,I)=>{PP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>uD($,Q,K,J),$.unwrap=()=>$._zod.def.innerType});function Zq($){return new MO({type:"optional",innerType:$})}var Wq=d$("ZodNullable",($,I)=>{RP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>FC($,Q,K,J),$.unwrap=()=>$._zod.def.innerType});function H5($){return new Wq({type:"nullable",innerType:$})}function ok($){return g9(H5($))}var Kq=d$("ZodDefault",($,I)=>{_P.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>OC($,Q,K,J),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function zq($,I){return new Kq({type:"default",innerType:$,get defaultValue(){return typeof I==="function"?I():V0.shallowClone(I)}})}var Hq=d$("ZodPrefault",($,I)=>{CP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>LC($,Q,K,J),$.unwrap=()=>$._zod.def.innerType});function Fq($,I){return new Hq({type:"prefault",innerType:$,get defaultValue(){return typeof I==="function"?I():V0.shallowClone(I)}})}var DO=d$("ZodNonOptional",($,I)=>{qP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>MC($,Q,K,J),$.unwrap=()=>$._zod.def.innerType});function Mq($,I){return new DO({type:"nonoptional",innerType:$,...V0.normalizeParams(I)})}var Dq=d$("ZodSuccess",($,I)=>{BP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>XC($,Q,K,J),$.unwrap=()=>$._zod.def.innerType});function rk($){return new Dq({type:"success",innerType:$})}var Oq=d$("ZodCatch",($,I)=>{jP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>VC($,Q,K,J),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function Lq($,I){return new Oq({type:"catch",innerType:$,catchValue:typeof I==="function"?I:V0.constantCatch(I)})}var Vq=d$("ZodNaN",($,I)=>{NP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>e_($,Q,K,J)});function tk($){return B_(Vq,$)}var A5=d$("ZodPipe",($,I)=>{XD.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>AC($,Q,K,J),$.in=I.in,$.out=I.out});function dD($,I){return new A5({type:"pipe",in:$,out:I})}var T5=d$("ZodCodec",($,I)=>{A5.init($,I),oF.init($,I)});function ak($,I,Q){return new T5({type:"pipe",in:$,out:I,transform:Q.decode,reverseTransform:Q.encode})}function sk($){let I=$._zod.def;return new T5({type:"pipe",in:I.out,out:I.in,transform:I.reverseTransform,reverseTransform:I.transform})}var Aq=d$("ZodPreprocess",($,I)=>{A5.init($,I),EP.init($,I)}),Tq=d$("ZodReadonly",($,I)=>{vP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>TC($,Q,K,J),$.unwrap=()=>$._zod.def.innerType});function Pq($){return new Tq({type:"readonly",innerType:$})}var Rq=d$("ZodTemplateLiteral",($,I)=>{SP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>$C($,Q,K,J)});function ek($,I){return new Rq({type:"template_literal",parts:$,...V0.normalizeParams(I)})}var _q=d$("ZodLazy",($,I)=>{rF.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>RC($,Q,K,J),$.unwrap=()=>$._zod.def.getter()});function Cq($){return new _q({type:"lazy",getter:$})}var qq=d$("ZodPromise",($,I)=>{gP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>PC($,Q,K,J),$.unwrap=()=>$._zod.def.innerType});function $g($){return new qq({type:"promise",innerType:$})}var Bq=d$("ZodFunction",($,I)=>{kP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>JC($,Q,K,J)});function Ug($){return new Bq({type:"function",input:Array.isArray($?.input)?Uq($?.input):$?.input??D5(k9()),output:$?.output??k9()})}var P5=d$("ZodCustom",($,I)=>{xP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>IC($,Q,K,J)});function Xg($){let I=new MU({check:"custom"});return I._zod.check=$,I}function Ig($,I){return E_(P5,$??(()=>!0),I)}function jq($,I={}){return v_(P5,$,I)}function Nq($,I){return S_($,I)}var Jg=k_,Qg=g_,Eq=d$("ZodInstanceOf",($,I)=>{P5.init($,I)},{properties($,I){return this.check(Sz($,I))}});function Yg($,I={}){let Q=new Eq({type:"custom",check:"custom",fn:(K)=>K instanceof $,abort:!0,...V0.normalizeParams(I)});return Q._zod.bag.Class=$,Q._zod.check=(K)=>{if(!(K.value instanceof $))K.issues.push({code:"invalid_type",expected:$.name,input:K.value,inst:Q,path:[...Q._zod.def.path??[]]})},Q}var Gg=(...$)=>x_({Codec:T5,Boolean:dz,String:lz},...$);function Zg($){let I=Cq(()=>{return iz([z5($),hC(),uC(),cC(),D5(I),Xq(z5(),I)])});return I}function Wg($,I){return new Aq({type:"pipe",in:FO($),out:I})}var dd={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 nd($){C1({customError:$})}function id(){return C1().customError}var vq;(function($){})(vq||(vq={}));var R5={};tI(R5,{time:()=>td,duration:()=>ad,datetime:()=>od,date:()=>rd,ZodISOTime:()=>$W,ZodISODuration:()=>UW,ZodISODateTime:()=>sZ,ZodISODate:()=>eZ});function od($){return Q5(sZ,$)}function rd($){return Y5(eZ,$)}function td($){return G5($W,$)}function ad($){return Z5(UW,$)}var d0={...oz,...pD,iso:R5},sd=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 ed($,I){let Q=$.$schema;if(Q==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(Q==="http://json-schema.org/draft-07/schema#")return"draft-7";if(Q==="http://json-schema.org/draft-04/schema#")return"draft-4";return I??"draft-2020-12"}function Kg($,I){return $.map((Q,K)=>K<I?Q:Q.optional())}function $n($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}function Un($,I){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let Q=$.slice(1).split("/").filter(Boolean);if(Q.length===0)return I.rootSchema;let K=I.version==="draft-2020-12"?"$defs":"definitions";if(Q[0]===K){let J=Q[1]===void 0?void 0:$n(Q[1]);if(!J||!I.defs[J])throw Error(`Reference not found: ${$}`);return I.defs[J]}throw Error(`Reference not found: ${$}`)}function Xn($,I){return d0.transform((K)=>K).check((K)=>{let J=K.value;if(typeof J!=="object"||J===null||Array.isArray(J))return;let Z=Object.getOwnPropertyNames(J);if(I.minProperties!==void 0&&Z.length<I.minProperties)K.issues.push({origin:"object",code:"too_small",minimum:I.minProperties,inclusive:!0,message:`Too small: expected object to have >=${I.minProperties} properties`,input:J,inst:$,continue:!0});if(I.maxProperties!==void 0&&Z.length>I.maxProperties)K.issues.push({origin:"object",code:"too_big",maximum:I.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${I.maxProperties} properties`,input:J,inst:$,continue:!0});if(I.keySchema)for(let G of Z){let D=I.keySchema.safeParse(G);if(D.success)continue;K.issues.push({code:"invalid_key",origin:"record",issues:D.error.issues,input:G,path:[G],continue:!0})}}).pipe($)}function Sq($,I){if($===null)return"z";let Q=typeof $;if(Q!=="object"){if(Q==="number"&&Number.isNaN($))return null;let K=String($);return`${Q[0]}${K.length}:${K}`}if(I.has($))return null;I.add($);try{if(Array.isArray($)){let Z=[];for(let G of $){let D=Sq(G,I);if(D===null)return null;Z.push(D)}return`a${Z.length}:[${Z.join(",")}]`}let K=Object.keys($).sort(),J=[];for(let Z of K){let G=Sq($[Z],I);if(G===null)return null;J.push(`${Z.length}:${Z}=${G}`)}return`o${J.length}:{${J.join(",")}}`}finally{I.delete($)}}var In=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),Jn=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function _5($){if(typeof $!=="object"||$===null)return!1;if(Array.isArray($))return $.some(_5);if(typeof $.$ref==="string")return!0;return Object.entries($).some(([I,Q])=>{if(In.has(I))return _5(Q);if(!Jn.has(I)||typeof Q!=="object"||Q===null)return!1;return Object.values(Q).some(_5)})}function zg($){return $===1?"element":"elements"}function Qn($,I){return d0.transform((K)=>K).check((K)=>{let J=K.value;if(!Array.isArray(J))return;if(I.uniqueItems===!0){let Z=new Map;for(let G=0;G<J.length;G++){let D=Sq(J[G],new Set);if(D===null)continue;let v=Z.get(D);if(v===void 0){Z.set(D,G);continue}K.issues.push({code:"custom",message:`Array items must be unique: element at index ${G} duplicates the one at index ${v}`,input:J,path:[G],continue:!0})}}if(I.containsSchema){let Z=I.minContains??1,G=I.maxContains!==void 0?I.maxContains+1:Number.POSITIVE_INFINITY,D=0;for(let v of J)if(I.containsSchema.safeParse(v).success&&++D>=G)break;if(D<Z)K.issues.push({code:"custom",message:`Array must contain at least ${Z} matching ${zg(Z)}; found ${D}`,input:J,continue:!0});if(I.maxContains!==void 0&&D>I.maxContains)K.issues.push({code:"custom",message:`Array must contain at most ${I.maxContains} matching ${zg(I.maxContains)}`,input:J,continue:!0})}}).pipe($)}function Hg($,I){if($===!1)return;if($===void 0||$===!0)return d0.any();return JJ($,I)}var Yn=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function Fg($,I){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return d0.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let J=$.$ref;if(I.refs.has(J))return I.refs.get(J);if(I.processing.has(J))return d0.lazy(()=>{if(!I.refs.has(J))throw Error(`Circular reference not resolved: ${J}`);return I.refs.get(J)});I.processing.add(J);let Z=Un(J,I),G=JJ(Z,I);return I.refs.set(J,G),I.processing.delete(J),G}if($.enum!==void 0){let J=$.enum;if(I.version==="openapi-3.0"&&$.nullable===!0&&J.length===1&&J[0]===null)return d0.null();if(J.length===0)return d0.never();if(J.length===1)return d0.literal(J[0]);if(J.every((G)=>typeof G==="string"))return d0.enum(J);let Z=J.map((G)=>d0.literal(G));if(Z.length<2)return Z[0];return d0.union([Z[0],Z[1],...Z.slice(2)])}if($.const!==void 0)return d0.literal($.const);let Q=$.type;if(Array.isArray(Q)){let J=Q.map((Z)=>{let G={...$,type:Z};return Fg(G,I)});if(J.length===0)return d0.never();if(J.length===1)return J[0];return d0.union(J)}if(!Q)return d0.any();let K;switch(Q){case"string":{let J=d0.string();if($.format){let Z=$.format;if(Z==="email")J=J.check(d0.email());else if(Z==="uri"||Z==="uri-reference")J=J.check(d0.url());else if(Z==="uuid"||Z==="guid")J=J.check(d0.uuid());else if(Z==="date-time")J=J.check(d0.iso.datetime({offset:!0}));else if(Z==="date")J=J.check(d0.iso.date());else if(Z==="time")J=J.check(d0.regex(Yn));else if(Z==="duration")J=J.check(d0.iso.duration());else if(Z==="hostname")J=J.check(d0.hostname());else if(Z==="ipv4")J=J.check(d0.ipv4());else if(Z==="ipv6")J=J.check(d0.ipv6());else if(Z==="mac")J=J.check(d0.mac());else if(Z==="cidr")J=J.check(d0.cidrv4());else if(Z==="cidr-v6")J=J.check(d0.cidrv6());else if(Z==="base64")J=J.check(d0.base64());else if(Z==="base64url")J=J.check(d0.base64url());else if(Z==="e164")J=J.check(d0.e164());else if(Z==="credit_card")J=J.check(d0.creditCard());else if(Z==="iban")J=J.check(d0.iban());else if(Z==="jwt")J=J.check(d0.jwt());else if(Z==="emoji")J=J.check(d0.emoji());else if(Z==="nanoid")J=J.check(d0.nanoid());else if(Z==="cuid")J=J.check(d0.cuid());else if(Z==="cuid2")J=J.check(d0.cuid2());else if(Z==="ulid")J=J.check(d0.ulid());else if(Z==="xid")J=J.check(d0.xid());else if(Z==="ksuid")J=J.check(d0.ksuid())}if(typeof $.minLength==="number")J=J.min($.minLength);if(typeof $.maxLength==="number")J=J.max($.maxLength);if($.pattern)J=J.regex(new RegExp($.pattern));K=J;break}case"number":case"integer":{let J=Q==="integer"?d0.number().int():d0.number();if(typeof $.minimum==="number"&&$.exclusiveMinimum!==!0)J=J.min($.minimum);if(typeof $.maximum==="number"&&$.exclusiveMaximum!==!0)J=J.max($.maximum);if(typeof $.exclusiveMinimum==="number")J=J.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")J=J.gt($.minimum);if(typeof $.exclusiveMaximum==="number")J=J.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")J=J.lt($.maximum);if(typeof $.multipleOf==="number")J=J.multipleOf($.multipleOf);K=J;break}case"boolean":{K=d0.boolean();break}case"null":{K=d0.null();break}case"object":{let J={},Z=$.properties||{},G=new Set($.required||[]),D=typeof $.additionalProperties==="object"?JJ($.additionalProperties,I):void 0;for(let[O,N]of Object.entries(Z)){let g=JJ(N,I);GI(J,O,G.has(O)?g:g.optional())}if($.patternProperties){let O=$.patternProperties,N=Object.keys(O),g=[];for(let b of N){let m=JJ(O[b],I),c=d0.string().regex(new RegExp(b));g.push(d0.looseRecord(c,m))}let x=[];if(Object.keys(J).length>0)x.push(d0.object(J).passthrough());if(x.push(...g),x.length===0)K=d0.object({}).passthrough();else if(x.length===1)K=x[0];else{let b=d0.intersection(x[0],x[1]);for(let m=2;m<x.length;m++)b=d0.intersection(b,x[m]);K=b}if($.additionalProperties===!1){let b=Object.keys(J),m=N.map((h)=>new RegExp(h)),c=K;K=K.check((h)=>{if(!WY(h.value))return;let d=[];for(let s of Object.keys(h.value)){if(b.includes(s))continue;if(m.some(($$)=>$$.test(s)))continue;d.push(s)}if(d.length)h.issues.push({code:"unrecognized_keys",keys:d,input:h.value,inst:c})})}}else{let O=d0.object(J);if($.additionalProperties===!1)K=O.strict();else if(D)K=O.catchall(D);else K=O.passthrough()}let v=$.propertyNames!==void 0&&$.propertyNames!==!0,C=typeof $.minProperties==="number"?$.minProperties:void 0,B=typeof $.maxProperties==="number"?$.maxProperties:void 0;if(v||C!==void 0||B!==void 0){let O;if(v){let N=typeof $.propertyNames==="object"&&$.propertyNames.type===void 0?{type:"string",...$.propertyNames}:$.propertyNames;O=JJ(N,I)}K=Xn(K,{keySchema:O,minProperties:C,maxProperties:B})}break}case"array":{let{prefixItems:J,items:Z}=$;if(J&&Array.isArray(J)){let G=typeof $.minItems==="number"?$.minItems:0,D=J.map((O)=>JJ(O,I)),v=Kg(D,G),C=!Array.isArray(Z)?Hg(Z,I):void 0,B=d0.tuple(v);if(K=C?B.rest(C):B,typeof $.minItems==="number")K=K.check(d0.minLength($.minItems));if(typeof $.maxItems==="number")K=K.check(d0.maxLength($.maxItems))}else if(Array.isArray(Z)){let G=typeof $.minItems==="number"?$.minItems:0,D=Z.map((O)=>JJ(O,I)),v=Kg(D,G),C=Hg($.additionalItems,I),B=d0.tuple(v);if(K=C?B.rest(C):B,typeof $.minItems==="number")K=K.check(d0.minLength($.minItems));if(typeof $.maxItems==="number")K=K.check(d0.maxLength($.maxItems))}else if(Z!==void 0){let G=JJ(Z,I),D=d0.array(G);if(typeof $.minItems==="number")D=D.min($.minItems);if(typeof $.maxItems==="number")D=D.max($.maxItems);K=D}else K=d0.array(d0.any());if($.uniqueItems===!0||$.contains!==void 0)K=Qn(K,{uniqueItems:$.uniqueItems===!0,containsSchema:$.contains!==void 0?JJ($.contains,I):void 0,minContains:typeof $.minContains==="number"?$.minContains:void 0,maxContains:typeof $.maxContains==="number"?$.maxContains:void 0});break}default:throw Error(`Unsupported type: ${Q}`)}return K}function JJ($,I){if(typeof $==="boolean")return $?d0.any():d0.never();let Q=Fg($,I),K=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let D=$.anyOf.map((C)=>JJ(C,I)),v=d0.union(D);Q=K?d0.intersection(Q,v):v}if($.oneOf&&Array.isArray($.oneOf)){let D=$.oneOf.map((C)=>JJ(C,I)),v=d0.xor(D);Q=K?d0.intersection(Q,v):v}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)Q=K?Q:d0.any();else{let D=K?Q:JJ($.allOf[0],I),v=K?0:1;for(let C=v;C<$.allOf.length;C++)D=d0.intersection(D,JJ($.allOf[C],I));Q=D}if($.nullable===!0&&I.version==="openapi-3.0")Q=d0.nullable(Q);if($.readOnly===!0)Q=d0.readonly(Q);if($.default!==void 0)Q=Q.default($.default);let J={},Z=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let D of Z)if(D in $)J[D]=$[D];let G=["contentEncoding","contentMediaType","contentSchema"];for(let D of G)if(D in $)J[D]=$[D];if($.type==="object"&&$.$ref===void 0){if($.propertyNames!==void 0&&!_5($.propertyNames))J.propertyNames=$.propertyNames;for(let D of["minProperties","maxProperties"])if($[D]!==void 0)J[D]=$[D]}if($.type==="array"&&$.$ref===void 0){if($.contains!==void 0&&!_5($.contains))J.contains=$.contains;for(let D of["uniqueItems","minContains","maxContains"])if($[D]!==void 0)J[D]=$[D]}for(let D of Object.keys($))if(!sd.has(D))GI(J,D,$[D]);if(Object.keys(J).length>0)I.registry.add(Q,J);if($.description)Q=Q.describe($.description);return Q}function Mg($,I){if(typeof $==="boolean")return $?d0.any():d0.never();let Q;try{Q=JSON.parse(JSON.stringify($))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let K=ed(Q,I?.defaultTarget),J=Q.$defs||Q.definitions||{},Z={version:K,defs:J,refs:new Map,processing:new Set,rootSchema:Q,registry:I?.registry??ZI};return JJ(Q,Z)}var Dg=Symbol("z.visit/resolving");function C5($,I){let Q=typeof I==="function"?I:(G,D)=>{let v=I[G._zod.def.type];return v?v(G,D):G},K=new Map;function J(G){let D=K.get(G);if(D===Dg)return new rF({type:"lazy",getter:()=>K.get(G)});if(D!==void 0)return D;K.set(G,Dg);let v=Z(G),C=Q(v,v!==G);return K.set(G,C),C}function Z(G){let D=G._zod.def,v=D.type;switch(v){case"object":{let C=D.shape,B=Object.keys(C),O=!1,N={};for(let x of B){let b=J(C[x]);if(b!==C[x])O=!0;N[x]=b}let g=D.catchall;if(D.catchall){if(g=J(D.catchall),g!==D.catchall)O=!0}return O?a4(G,{...D,shape:N,catchall:g}):G}case"array":{let C=J(D.element);return C===D.element?G:a4(G,{...D,element:C})}case"tuple":{let C=D.items,B=!1,O=[];for(let g of C){let x=J(g);if(x!==g)B=!0;O.push(x)}let N=D.rest;if(D.rest){if(N=J(D.rest),N!==D.rest)B=!0}return B?a4(G,{...D,items:O,rest:N}):G}case"record":case"map":{let C=J(D.keyType),B=J(D.valueType);return C===D.keyType&&B===D.valueType?G:a4(G,{...D,keyType:C,valueType:B})}case"set":{let C=J(D.valueType);return C===D.valueType?G:a4(G,{...D,valueType:C})}case"union":{let C=D.options,B=!1,O=[];for(let N of C){let g=J(N);if(g!==N)B=!0;O.push(g)}return B?a4(G,{...D,options:O}):G}case"intersection":{let C=J(D.left),B=J(D.right);return C===D.left&&B===D.right?G:a4(G,{...D,left:C,right:B})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let C=J(D.innerType);return C===D.innerType?G:a4(G,{...D,innerType:C})}case"pipe":{let C=J(D.in),B=J(D.out);return C===D.in&&B===D.out?G:a4(G,{...D,in:C,out:B})}case"function":{let C=J(D.input),B=J(D.output);return C===D.input&&B===D.output?G:a4(G,{...D,input:C,output:B})}case"lazy":{let C=D.getter,{_cachedInner:B,...O}=D;return a4(G,{...O,getter:()=>J(C())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return G;default:return G}}return J($)}function Og($){return C5($,{object:(I)=>I.partial(),union:(I)=>{let Q=I._zod.def;return Q.discriminator===void 0?I:iz(Q.options)}})}function Gn($,I){if(!I?.length)return $;let Q=$._zod.def;return a4($,Q2(Q,{checks:[...Q.checks??[],...I]}),{parent:!0})}function Lg($){return Gn($.out,$.checks)}function Zn($){return $.in._zod.traits.has("$ZodTransform")?Lg($):$.in}function Vg($){return C5($,{pipe:(I)=>Zn(I._zod.def),default:(I,Q)=>Q?g9(I._zod.def.innerType):I,catch:(I,Q)=>Q?I._zod.def.innerType:I})}function Ag($){return C5($,{pipe:(I)=>Lg(I._zod.def),prefault:(I,Q)=>Q?I._zod.def.innerType:I})}var kq={};tI(kq,{string:()=>Wn,number:()=>Kn,date:()=>Fn,boolean:()=>zn,bigint:()=>Hn});function Wn($){return eR(lz,$)}function Kn($){return Q_(cz,$)}function zn($){return H_(dz,$)}function Hn($){return M_(nz,$)}function Fn($){return q_(M5,$)}var Tg=D6.object({id:D6.string().min(1).optional(),name:D6.string().min(1).optional(),kind:D6.enum(["human","agent","bot","system"])}),Pg=D6.object({type:D6.string().min(1),id:D6.string().min(1)}),Rg=D6.object({provider:D6.string().min(1),id:D6.string().min(1).optional(),url:D6.string().min(1).optional(),cursor:D6.string().min(1).optional(),rawRef:D6.string().min(1).optional()}),gq=D6.object({id:D6.string().min(1),service:D6.string().min(1),type:D6.string().min(1),schemaVersion:D6.number().int().positive(),idempotencyKey:D6.string().min(1),occurredAt:D6.string().min(1),observedAt:D6.string().min(1),origin:D6.enum(["virtual","external","agent","connector","replay","migration"]),actor:Tg.optional(),subject:Pg,causationId:D6.string().min(1).optional(),correlationId:D6.string().min(1).optional(),external:Rg.optional(),data:D6.record(D6.string(),D6.unknown()),raw:D6.record(D6.string(),D6.unknown()).optional()}),_g=D6.object({version:D6.literal(1),service:D6.string().min(1),rebuiltAt:D6.string().min(1),eventCount:D6.number().int().nonnegative(),latestEventId:D6.string().min(1).optional(),subjects:D6.record(D6.string(),D6.object({type:D6.string().min(1),id:D6.string().min(1),latestEventId:D6.string().min(1),latestType:D6.string().min(1),updatedAt:D6.string().min(1)}))});function Cg($){return J2($||process.env.PROJECT_ROOT||process.cwd())}function MM(){let $=process.env.VOLTER_STATE_DIR||".volter";if(O9($)||$.split(/[\\/]/).includes(".."))throw Error("VOLTER_STATE_DIR must be a relative directory without .. segments");return $}function OO($){return M4(Cg($),MM(),"world")}function On($){if(!/^[A-Za-z0-9_-]+$/.test($))throw Error(`Invalid world service name: ${$}`);return $}var xq;function qg($){let I=xq;return xq=$,I}var Ln=0;function kJ($,I){let Q=On($);if(Ln===0)xq?.(Q,I);let K=Cg(I),J=M4(OO(I),Q);return{root:K,service:Q,dir:J,events:M4(J,"events.jsonl"),state:M4(J,"state.json"),resources:M4(J,"resources"),cursors:M4(J,"cursors"),ingests:M4(J,"ingests"),eventQueue:M4(J,"event-queue.jsonl")}}var Vn={windowMs:60000,ceiling:60,defaultWeight:2,maxRetryAfterSeconds:300,rules:[],reason:"no pack declared a budget for this vendor — this is the conservative fallback (30 calls/min at "+"the default weight), not a considered limit. Declare one on the pack with the vendor's real limits."};var Bg="2.0",_n=Number(Bg.split(".")[0]);var jn=y1(Ng(),1);wU();var{AsyncLocalStorage:X4$}=(()=>({}));var{AsyncLocalStorage:i6$}=(()=>({}));var o6$="0".repeat(32),r6$="0".repeat(16);var{AsyncLocalStorage:Xi}=(()=>({}));var mn;function kg($){mn=$}var bq="/__volter/world-boot";var{chmodSync:q4$,existsSync:B4$,mkdirSync:j4$,readFileSync:N4$,writeFileSync:E4$}=(()=>({}));wU();var Ii=1e6,Ji=/(?:^|[-_.])(?:auth|authorization|token|jwt|key|apikey|secret|credential|credentials|signature|sig|password|passwd|pwd|session|sessionid|cookie|access[-_]?token|refresh[-_]?token)(?:[-_.]|$)/i,Qi=/^(Bearer|Basic|Digest|Token|Negotiate|NTLM|OAuth|Signature|Hawk|AWS4-HMAC-SHA256|SharedKey|SharedKeyLite|GoogleLogin)\s+(\S[\s\S]*)$/i;function wg($){return`sha256:${eI("sha256").update($,"utf8").digest("hex").slice(0,16)}`}function Yi($,I,Q){let K=Qi.exec(I);if(!K&&!Ji.test($))return;let J=$.toLowerCase();if(I==="")return{name:J,in:Q,empty:!0};if(K)return{name:J,in:Q,scheme:K[1],fp:wg(K[2])};return{name:J,in:Q,fp:wg(I)}}function ug($,I){let Q=[],K=new Set,J=(Z,G,D)=>{let v=Yi(Z,G,D);if(!v)return;let C=`${v.in}:${v.name}`;if(K.has(C))return;K.add(C),Q.push(v)};try{if(typeof $.forEach==="function")$.forEach((Z,G)=>J(G,Z,"header"));else for(let[Z,G]of Object.entries($))J(Z,String(G),"header")}catch{}try{if(I!==void 0){let Z=typeof I==="string"?new URL(I,"http://twin.invalid").search:I.search;for(let[G,D]of new URLSearchParams(Z))J(G,D,"query")}}catch{}return Q.sort((Z,G)=>Z.in===G.in?Z.name.localeCompare(G.name):Z.in.localeCompare(G.in))}function pq($=process.env){return $.VOLTER_TWIN_REQUEST_JOURNAL==="1"}function mg($,I){return M4(_1(kJ($,I).events),"requests.jsonl")}function pg($,I,Q){if(!pq())return;try{let K=qI(),J=mg($,Q);if(K.mkdir(_1(J)),(K.stat(J)?.size??0)>=Ii)K.writeAtomic(`${J}.1`,K.read(J)??""),K.write(J,"");let G=JSON.stringify({at:I.at??new Date().toISOString(),method:I.method.toUpperCase(),path:I.path.split("?")[0],status:I.status,...typeof I.ms==="number"?{ms:I.ms}:{},...I.credentials?.length?{credentials:I.credentials}:{}});K.append(J,`${G}
|
|
445
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let G of $.seen.entries()){let D=G[1];if(I===G[0]){Z(G);continue}if($.external){let C=$.external.registry.get(G[0])?.id;if(I!==G[0]&&C){Z(G);continue}}if($.metadataRegistry.get(G[0])?.id){Z(G);continue}if(D.cycle){Z(G);continue}if(D.count>1){if($.reused==="ref")Z(G)}}if($.external)$.sharedDefsExtractedFor=$.external}function SS($){let I=$.anyOf;if(!Array.isArray(I)||I.length===0||$.type!==void 0)return;let Q=[];for(let K of I){if(!K||typeof K!=="object")return;SS(K);let J=Object.keys(K);if(J.length!==1||J[0]!=="type")return;let Z=K.type;for(let G of Array.isArray(Z)?Z:[Z]){if(typeof G!=="string")return;if(!Q.includes(G))Q.push(G)}}delete $.anyOf,$.type=Q.length===1?Q[0]:Q}var kS=new Set(["type","properties","required","additionalProperties"]),ES=["oneOf","anyOf"];function vS($){let I=$.additionalProperties;if(I===void 0||I===!1||typeof I!=="object"||I===null)return null;return Object.keys(I).length?I:null}function w_($){let I=[];for(let Z of $){if(typeof Z!=="object"||Z.type!=="object")return null;for(let G in Z)if(!kS.has(G))return null;I.push(Z)}let Q={},K=new Set;for(let Z of I){for(let G in Z.properties){if(Object.prototype.hasOwnProperty.call(Q,G))continue;let D=[];for(let C of I){let B=C.properties?.[G]??vS(C);if(B===null||B===void 0)continue;if(!D.some((O)=>JSON.stringify(O)===JSON.stringify(B)))D.push(B)}let v=D.length===1?D[0]:w_(D)??{allOf:D};GI(Q,G,v)}for(let G of Z.required??[])K.add(G)}let J={type:"object",properties:Q};if(K.size)J.required=[...K];if(I.every((Z)=>Z.additionalProperties===!1))J.additionalProperties=!1;else{let Z=[];for(let G of I){let D=vS(G);if(D&&!Z.some((v)=>JSON.stringify(v)===JSON.stringify(D)))Z.push(D)}if(Z.length===1)J.additionalProperties=Z[0];else if(Z.length>1)J.additionalProperties={allOf:Z}}return J}function fd($){let I=$.allOf;if(!Array.isArray(I)||I.length<2)return;for(let J of kS)if(J in $)return;let Q=I.filter((J)=>ES.some((Z)=>Array.isArray(J[Z]))),K=null;if(!Q.length)K=w_(I);else{let J=Q[0],Z=ES.find((v)=>Array.isArray(J[v]));if(Object.keys(J).length!==1)return;let G=I.filter((v)=>v!==J),D=J[Z].map((v)=>w_([...G,v]));if(D.some((v)=>!v))return;K={[Z]:D}}if(!K)return;delete $.allOf,W5($,K)}function aZ($,I){let Q=$.seen.get(I);if(!Q)throw Error("Unprocessed schema. This is a bug in Zod.");let K=(D)=>{let v=$.seen.get(D);if(v.ref===null)return;let C=v.def??v.schema,B={...C},O=v.ref;if(v.ref=null,O){K(O);let g=$.seen.get(O),x=g.schema;if(x.$ref&&($.target==="draft-07"||$.target==="draft-04"||$.target==="openapi-3.0"))C.allOf=C.allOf??[],C.allOf.push(x);else W5(C,x);if(W5(C,B),D._zod.parent===O)for(let m in C){if(m==="$ref"||m==="allOf")continue;if(!(m in B))delete C[m]}if(x.$ref&&g.def)for(let m in C){if(m==="$ref"||m==="allOf")continue;if(m in g.def&&JSON.stringify(C[m])===JSON.stringify(g.def[m]))delete C[m]}}let N=D._zod.parent;if(N&&N!==O){K(N);let g=$.seen.get(N);if(g?.schema.$ref){if(C.$ref=g.schema.$ref,g.def)for(let x in C){if(x==="$ref"||x==="allOf")continue;if(x in g.def&&JSON.stringify(C[x])===JSON.stringify(g.def[x]))delete C[x]}}}$.override({zodSchema:D,jsonSchema:C,path:v.path??[]})};if(!$.external||$.sharedEmitDoneFor!==$.external){for(let D of[...$.seen.entries()].reverse())K(D[0]);if($.target!=="openapi-3.0")for(let D of $.seen.entries())SS(D[1].def??D[1].schema);for(let D of $.deferred)D();if($.intersections.length){let D=new Map;for(let v of $.seen.values())for(let C of[v.schema,v.def]){let B=C?.allOf;if(!Array.isArray(B))continue;let O=D.get(B);if(O)O.push(C);else D.set(B,[C])}for(let v of $.intersections)for(let C of D.get(v)??[])fd(C)}}let J={};if($.target==="draft-2020-12")J.$schema="https://json-schema.org/draft/2020-12/schema";else if($.target==="draft-07")J.$schema="http://json-schema.org/draft-07/schema#";else if($.target==="draft-04")J.$schema="http://json-schema.org/draft-04/schema#";else if($.target==="openapi-3.0");if($.external?.uri){let D=$.external.registry.get(I)?.id;if(!D)throw Error("Schema is missing an `id` property");J.$id=$.external.uri(D)}W5(J,Q.defId?Q.schema:Q.def??Q.schema);let Z=$.metadataRegistry.get(I)?.id;if(Z!==void 0&&J.id===Z)delete J.id;let G=$.external?.defs??{};if(!$.external||$.sharedEmitDoneFor!==$.external)for(let D of $.seen.entries()){let v=D[1];if(v.def&&v.defId){if(v.def.id===v.defId)delete v.def.id;GI(G,v.defId,v.def)}}if($.external)$.sharedEmitDoneFor=$.external;if($.external);else if(Object.keys(G).length>0)if($.target==="draft-2020-12")J.$defs=G;else J.definitions=G;try{let D=JSON.parse(JSON.stringify(J));return Object.defineProperty(D,"~standard",{value:{...I["~standard"],jsonSchema:{input:bz(I,"input",$.processors),output:bz(I,"output",$.processors)}},enumerable:!1,writable:!1}),D}catch(D){throw Error("Error converting schema to JSON.")}}function IJ($,I){let Q=I??{seen:new Set};if(Q.seen.has($))return!1;Q.seen.add($);let K=$._zod.def;if(K.type==="transform")return!0;if(K.type==="array")return IJ(K.element,Q);if(K.type==="set")return IJ(K.valueType,Q);if(K.type==="lazy")return IJ(K.getter(),Q);if(K.type==="promise"||K.type==="optional"||K.type==="nonoptional"||K.type==="nullable"||K.type==="readonly"||K.type==="default"||K.type==="prefault"||K.type==="catch")return IJ(K.innerType,Q);if(K.type==="intersection")return IJ(K.left,Q)||IJ(K.right,Q);if(K.type==="record"||K.type==="map")return IJ(K.keyType,Q)||IJ(K.valueType,Q);if(K.type==="pipe"){if($._zod.traits.has("$ZodCodec"))return!0;return IJ(K.in,Q)||IJ(K.out,Q)}if(K.type==="object"){for(let J in K.shape)if(IJ(K.shape[J],Q))return!0;return!1}if(K.type==="union"){for(let J of K.options)if(IJ(J,Q))return!0;return!1}if(K.type==="tuple"){for(let J of K.items)if(IJ(J,Q))return!0;if(K.rest&&IJ(K.rest,Q))return!0;return!1}return!1}var f_=($,I={})=>(Q)=>{let K=rZ({...Q,processors:I});return e4($,K),tZ(K,$),aZ(K,$)},bz=($,I,Q={})=>(K)=>{let{libraryOptions:J,target:Z}=K??{},G=rZ({...J??{},target:Z,io:I,processors:Q});return e4($,G),tZ(G,$),aZ(G,$)};var hz=($,I,Q)=>{if($[I]===void 0||Q>$[I])$[I]=Q},uz=($,I,Q)=>{if($[I]===void 0||Q<$[I])$[I]=Q},gS=($,I)=>{hz($,"minimum",I),uz($,"maximum",I)},yS=($,I)=>{if($.multipleOf??($.multipleOf=[]),!$.multipleOf.includes(I))$.multipleOf.push(I)},bS=($,I)=>{$.patterns??($.patterns=new Set),$.patterns.add(I)},hS=($,I)=>{$.mime=$.mime?$.mime.filter((Q)=>I.includes(Q)):[...I]},uS=($,I)=>{if($.format=I,I.includes("int"))$.isInt=!0},xS=($,I)=>hz($,"minimum",I.minimum),wS=($,I)=>uz($,"maximum",I.maximum),fS=($)=>(I,Q)=>{uS(I,Q.format);let[K,J]=$[Q.format];hz(I,"minimum",K),uz(I,"maximum",J)},yd={greater_than:($,I)=>hz($,I.inclusive?"minimum":"exclusiveMinimum",I.value),less_than:($,I)=>uz($,I.inclusive?"maximum":"exclusiveMaximum",I.value),multiple_of:($,I)=>yS($,I.value),number_format:fS(NF),bigint_format:fS(EF),min_length:xS,max_length:wS,length_equals:($,I)=>gS($,I.length),min_size:xS,max_size:wS,size_equals:($,I)=>gS($,I.size),string_format:($,I)=>{if(uS($,I.format),I.pattern)bS($,I.pattern);if(I.format==="base64"||I.format==="base64url")$.contentEncoding=I.format;if(I.local||I.precision===-1)$.laxFormat=!0},mime_type:($,I)=>hS($,I.mime)};function VX($){let I={},Q=$._zod.def,K=$._zod.traits.has("$ZodCheck")?[$,...Q.checks??[]]:Q.checks??[];for(let Z of K)yd[Z._zod.def.check]?.(I,Z._zod.def);let J=$._zod.bag;if(J.minimum!==void 0)hz(I,"minimum",J.minimum);if(J.exclusiveMinimum!==void 0)hz(I,"exclusiveMinimum",J.exclusiveMinimum);if(J.maximum!==void 0)uz(I,"maximum",J.maximum);if(J.exclusiveMaximum!==void 0)uz(I,"exclusiveMaximum",J.exclusiveMaximum);if(J.multipleOf!==void 0)yS(I,J.multipleOf);if(J.format!==void 0){if(I.format??(I.format=J.format),J.format.includes("int"))I.isInt=!0}if(J.mime)hS(I,J.mime);for(let Z of J.patterns??[])bS(I,Z);return I}var bd={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},hd=new Map([[iM,fA],[dF,yA]]),mS=($)=>hd.get($)??$,h_=($,I,Q,K)=>{let J=Q;J.type="string";let{minimum:Z,maximum:G,format:D,patterns:v,contentEncoding:C,laxFormat:B}=VX($);if(typeof Z==="number")J.minLength=Z;if(typeof G==="number")J.maxLength=G;if(D){if(J.format=bd[D]??D,J.format==="")delete J.format;if(D==="time"||B)delete J.format}if(C)J.contentEncoding=C;if(v&&v.size>0){let O=[...v].map(mS);if(O.length===1)J.pattern=O[0].source;else if(O.length>1)J.allOf=[...O.map((N)=>({...I.target==="draft-07"||I.target==="draft-04"||I.target==="openapi-3.0"?{type:"string"}:{},pattern:N.source}))]}},u_=($,I,Q,K)=>{let J=Q,{minimum:Z,maximum:G,multipleOf:D,exclusiveMaximum:v,exclusiveMinimum:C,isInt:B}=VX($);J.type=B?"integer":"number";let O=typeof C==="number"&&C>=(Z??Number.NEGATIVE_INFINITY),N=typeof v==="number"&&v<=(G??Number.POSITIVE_INFINITY),g=I.target==="draft-04"||I.target==="openapi-3.0";if(O)if(g)J.minimum=C,J.exclusiveMinimum=!0;else J.exclusiveMinimum=C;else if(typeof Z==="number")J.minimum=Z;if(N)if(g)J.maximum=v,J.exclusiveMaximum=!0;else J.exclusiveMaximum=v;else if(typeof G==="number")J.maximum=G;if(D){let x=new Set;for(let c of D)if(Number.isFinite(c)&&c!==0)x.add(Math.abs(c));else LX($,I,J,K,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`);let[b,...m]=x;if(b!==void 0)J.multipleOf=b;if(m.length)J.allOf=[...J.allOf??[],...m.map((c)=>({multipleOf:c}))]}},m_=($,I,Q,K)=>{Q.type="boolean"},p_=($,I,Q,K)=>{LX($,I,Q,K,"BigInt cannot be represented in JSON Schema")},l_=($,I,Q,K)=>{LX($,I,Q,K,"Symbols cannot be represented in JSON Schema")},c_=($,I,Q,K)=>{if(I.target==="openapi-3.0")Q.type="string",Q.nullable=!0,Q.enum=[null];else Q.type="null"},d_=($,I,Q,K)=>{LX($,I,Q,K,"Undefined cannot be represented in JSON Schema")},n_=($,I,Q,K)=>{LX($,I,Q,K,"Void cannot be represented in JSON Schema")},i_=($,I,Q,K)=>{Q.not={}},o_=($,I,Q,K)=>{},r_=($,I,Q,K)=>{},t_=($,I,Q,K)=>{LX($,I,Q,K,"Date cannot be represented in JSON Schema")},a_=($,I,Q,K)=>{let J=$._zod.def,Z=Kz(J.entries);if(Z.length===0){Q.not={};return}if(Z.every((G)=>typeof G==="number"))Q.type="number";if(Z.every((G)=>typeof G==="string"))Q.type="string";Q.enum=Z},s_=($,I,Q,K)=>{let J=$._zod.def;if(J.values.length===0){Q.not={};return}let Z=[];for(let G of J.values)if(G===void 0){if(LX($,I,Q,K,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof G==="bigint"){if(LX($,I,Q,K,"BigInt literals cannot be represented in JSON Schema"))return;Z.push(Number(G))}else Z.push(G);if(Z.length===0);else if(Z.length===1){let G=Z[0];if(Q.type=G===null?"null":typeof G,I.target==="draft-04"||I.target==="openapi-3.0")Q.enum=[G];else Q.const=G}else{if(Z.every((G)=>typeof G==="number"))Q.type="number";if(Z.every((G)=>typeof G==="string"))Q.type="string";if(Z.every((G)=>typeof G==="boolean"))Q.type="boolean";if(Z.every((G)=>G===null))Q.type="null";Q.enum=Z}},e_=($,I,Q,K)=>{LX($,I,Q,K,"NaN cannot be represented in JSON Schema")},$C=($,I,Q,K)=>{let J=Q,Z=$._zod.pattern;if(!Z)throw Error("Pattern not found in template literal");J.type="string",J.pattern=Z.source},UC=($,I,Q,K)=>{let J=Q;J.type="string",J.format="binary",J.contentEncoding="binary";let{minimum:Z,maximum:G,mime:D}=VX($);if(Z!==void 0)J.minLength=Z;if(G!==void 0)J.maxLength=G;if(!D)return;if(D.length===0)J.not={};else if(D.length===1)J.contentMediaType=D[0];else J.anyOf=D.map((v)=>({contentMediaType:v}))},XC=($,I,Q,K)=>{Q.type="boolean"},IC=($,I,Q,K)=>{LX($,I,Q,K,"Custom types cannot be represented in JSON Schema")},JC=($,I,Q,K)=>{LX($,I,Q,K,"Function types cannot be represented in JSON Schema")},QC=($,I,Q,K)=>{LX($,I,Q,K,"Transforms cannot be represented in JSON Schema")},YC=($,I,Q,K)=>{LX($,I,Q,K,"Map cannot be represented in JSON Schema")},GC=($,I,Q,K)=>{LX($,I,Q,K,"Set cannot be represented in JSON Schema")},ZC=($,I,Q,K)=>{let J=Q,Z=$._zod.def,{minimum:G,maximum:D}=VX($);if(typeof G==="number")J.minItems=G;if(typeof D==="number")J.maxItems=D;J.type="array",J.items=e4(Z.element,I,{...K,path:[...K.path,"items"]})};function K5($){let I=$._zod.def;if(I.type==="pipe"&&I.in._zod.traits.has("$ZodTransform"))return K5(I.out);if(I.type==="catch")return K5(I.innerType);return $._zod.optin}var WC=($,I,Q,K)=>{let J=Q,Z=$._zod.def,G=Z.shape;if(Object.getOwnPropertySymbols(G).length&&LX($,I,J,K,"Symbol keys cannot be represented in JSON Schema"))return;J.type="object",J.properties={};for(let C in G)GI(J.properties,C,e4(G[C],I,{...K,path:[...K.path,"properties",C]}));let v=[];for(let C of Object.keys(G)){let B=Z.shape[C];if(I.io==="input"?K5(B)===void 0:B._zod.optout===void 0)v.push(C)}if(v.length>0)J.required=v;if(Z.catchall?._zod.def.type==="never")J.additionalProperties=!1;else if(!Z.catchall){if(I.io==="output")J.additionalProperties=!1}else if(Z.catchall)J.additionalProperties=e4(Z.catchall,I,{...K,path:[...K.path,"additionalProperties"]})},hD=($,I,Q,K)=>{let J=$._zod.def,Z=J.inclusive===!1,G=J.options.map((D,v)=>e4(D,I,{...K,path:[...K.path,Z?"oneOf":"anyOf",v]}));if(Z)Q.oneOf=G;else Q.anyOf=G},KC=($,I,Q,K)=>{let J=$._zod.def,Z=e4(J.left,I,{...K,path:[...K.path,"allOf",0]}),G=e4(J.right,I,{...K,path:[...K.path,"allOf",1]}),D=(C)=>("allOf"in C)&&Object.keys(C).length===1,v=[...D(Z)?Z.allOf:[Z],...D(G)?G.allOf:[G]];Q.allOf=v,I.intersections.push(v)},zC=($,I,Q,K)=>{let J=Q,Z=$._zod.def;J.type="array";let G=I.target==="draft-2020-12"?"prefixItems":"items",D=I.target==="draft-2020-12"?"items":I.target==="openapi-3.0"?"items":"additionalItems",v=Z.items.map((b,m)=>e4(b,I,{...K,path:[...K.path,G,m]})),C=Z.rest?e4(Z.rest,I,{...K,path:[...K.path,D,...I.target==="openapi-3.0"?[Z.items.length]:[]]}):null,B=Z.items.length;while(B>0){let b=Z.items[B-1];if(!(I.io==="input"?K5(b)!==void 0:b._zod.optout==="optional"))break;B--}let O=Z.items.length,N=!Z.rest;if(I.target==="draft-2020-12"){if(J.prefixItems=v,N)J.items=!1;else if(C)J.items=C;if(B>0)J.minItems=B;if(N)J.maxItems=O}else if(I.target==="openapi-3.0"){if(J.items={anyOf:v},C)J.items.anyOf.push(C);if(B>0)J.minItems=B;if(N)J.maxItems=O}else{if(J.items=v,N)J.additionalItems=!1;else if(C)J.additionalItems=C;if(B>0)J.minItems=B;if(N)J.maxItems=O}let{minimum:g,maximum:x}=VX($);if(typeof g==="number")J.minItems=g;if(typeof x==="number")J.maxItems=x};function y_($,I,Q){if(I.$ref){if(Q.has(I))return I;Q.add(I);let x=$.get(I)?.def;if(!x)return I;let b=y_($,x,Q);return b===x?I:b}for(let x of["anyOf","oneOf"]){let b=I[x];if(!Array.isArray(b))continue;let m=b.map((c)=>y_($,c,Q));if(m.some((c,h)=>c!==b[h]))I={...I,[x]:m}}let K=Array.isArray(I.type)?I.type:[I.type],J=!K.includes("string")&&K.some((x)=>x==="number"||x==="integer"),Z=I.enum??(I.const!==void 0?[I.const]:void 0);if(!J&&!Z?.some((x)=>typeof x==="number"))return I;let{minimum:G,maximum:D,exclusiveMinimum:v,exclusiveMaximum:C,multipleOf:B,format:O,id:N,...g}=I;if(g.enum)g.enum=g.enum.map((x)=>typeof x==="number"?String(x):x);else if(typeof g.const==="number")g.const=String(g.const);if(!J)return g;if(g.type="string",!Z)g.pattern=(K.includes("number")?zG:bF).source;return g}var b_=new WeakMap;function ud($){let I=new Map;for(let K of $.seen.values())if(K.def&&!I.has(K.schema))I.set(K.schema,K);let Q=new Map;for(let K of b_.get($)??[]){let J=$.seen.get(K),Z=(J?.def??J?.schema)?.propertyNames;if(!Z||Z===!0||Q.has(Z))continue;let G=y_(I,Z,new Set);if(G!==Z)Q.set(Z,G)}if(!Q.size)return;for(let K of $.seen.values())for(let J of[K.schema,K.def]){let Z=J&&Q.get(J.propertyNames);if(Z)J.propertyNames=Z}}var HC=($,I,Q,K)=>{let J=Q,Z=$._zod.def;J.type="object";let G=Z.keyType,D=VX(G).patterns;if(Z.mode==="loose"&&D&&D.size>0){let B=e4(Z.valueType,I,{...K,path:[...K.path,"patternProperties","*"]});J.patternProperties={};for(let O of D)GI(J.patternProperties,mS(O).source,B)}else{if(I.target==="draft-07"||I.target==="draft-2020-12"){J.propertyNames=e4(Z.keyType,I,{...K,path:[...K.path,"propertyNames"]});let B=b_.get(I);if(!B)B=[],b_.set(I,B),I.deferred.push(()=>ud(I));B.push($)}J.additionalProperties=e4(Z.valueType,I,{...K,path:[...K.path,"additionalProperties"]})}let v=G._zod.values,C=I.io==="input"&&K5(Z.valueType)!==void 0;if(v&&!Z.partial&&!C){let B=[...v].filter((O)=>typeof O==="string"||typeof O==="number");if(B.length>0)J.required=B.map(String)}},FC=($,I,Q,K)=>{let J=$._zod.def,Z=e4(J.innerType,I,K),G=I.seen.get($);if(I.target==="openapi-3.0")G.ref=J.innerType,Q.nullable=!0;else Q.anyOf=[Z,{type:"null"}]},MC=($,I,Q,K)=>{let J=$._zod.def;e4(J.innerType,I,K);let Z=I.seen.get($);Z.ref=J.innerType},DC=Symbol();function pS($,I,Q,K,J){let Z=!1,G=JSON.stringify($,(D,v)=>{if(typeof v!=="bigint")return v;return Z=!0,null});if(!Z)return JSON.parse(G);return LX(I,Q,K,J,"BigInt defaults cannot be represented in JSON Schema"),DC}var OC=($,I,Q,K)=>{let J=$._zod.def;e4(J.innerType,I,K);let Z=I.seen.get($);Z.ref=J.innerType;let G=pS(J.defaultValue,$,I,Q,K);if(G!==DC)Q.default=G},LC=($,I,Q,K)=>{let J=$._zod.def;e4(J.innerType,I,K);let Z=I.seen.get($);if(Z.ref=J.innerType,I.io!=="input")return;let G=pS(J.defaultValue,$,I,Q,K);if(G!==DC)Q._prefault=G},VC=($,I,Q,K)=>{let J=$._zod.def;e4(J.innerType,I,K);let Z=I.seen.get($);Z.ref=J.innerType;let G;try{G=J.catchValue(void 0)}catch{LX($,I,Q,K,"Dynamic catch values are not supported in JSON Schema");return}Q.default=G},AC=($,I,Q,K)=>{let J=$._zod.def,Z=J.in._zod.traits.has("$ZodTransform"),G=I.io==="input"?Z?J.out:J.in:J.out;e4(G,I,K);let D=I.seen.get($);D.ref=G},TC=($,I,Q,K)=>{let J=$._zod.def;e4(J.innerType,I,K);let Z=I.seen.get($);Z.ref=J.innerType,Q.readOnly=!0},PC=($,I,Q,K)=>{let J=$._zod.def;e4(J.innerType,I,K);let Z=I.seen.get($);Z.ref=J.innerType},uD=($,I,Q,K)=>{let J=$._zod.def;e4(J.innerType,I,K);let Z=I.seen.get($);Z.ref=J.innerType},RC=($,I,Q,K)=>{let J=$._zod.innerType;e4(J,I,K);let Z=I.seen.get($);Z.ref=J},bD={string:h_,number:u_,boolean:m_,bigint:p_,symbol:l_,null:c_,undefined:d_,void:n_,never:i_,any:o_,unknown:r_,date:t_,enum:a_,literal:s_,nan:e_,template_literal:$C,file:UC,success:XC,custom:IC,function:JC,transform:QC,map:YC,set:GC,array:ZC,object:WC,union:hD,intersection:KC,tuple:zC,record:HC,nullable:FC,nonoptional:MC,default:OC,prefault:LC,catch:VC,pipe:AC,readonly:TC,promise:PC,optional:uD,lazy:RC};function mD($,I){if("_idmap"in $){let K=$,J=rZ({...I,processors:bD}),Z={};for(let v of K._idmap.entries()){let[C,B]=v;e4(B,J)}let G={},D={registry:K,uri:I?.uri,defs:Z};J.external=D;for(let v of K._idmap.entries()){let[C,B]=v;tZ(J,B),GI(G,C,aZ(J,B))}if(Object.keys(Z).length>0){let v=J.target==="draft-2020-12"?"$defs":"definitions";G.__shared={[v]:Z}}return{schemas:G}}let Q=rZ({...I,processors:bD});return e4($,Q),tZ(Q,$),aZ(Q,$)}class _C{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($){this.ctx.counter=$}get seen(){return this.ctx.seen}constructor($){let I=$?.target??"draft-2020-12";if(I==="draft-4")I="draft-04";if(I==="draft-7")I="draft-07";this.ctx=rZ({processors:bD,target:I,...$?.metadata&&{metadata:$.metadata},...$?.unrepresentable&&{unrepresentable:$.unrepresentable},...$?.override&&{override:$.override},...$?.io&&{io:$.io}})}process($,I={path:[],schemaPath:[]}){return e4($,this.ctx,I)}emit($,I){if(I){if(I.cycles)this.ctx.cycles=I.cycles;if(I.reused)this.ctx.reused=I.reused;if(I.external)this.ctx.external=I.external}this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,tZ(this.ctx,$);let Q=aZ(this.ctx,$),{"~standard":K,...J}=Q;return J}}var lS={};var oz={};tI(oz,{xor:()=>hk,xid:()=>Qk,void:()=>gk,uuidv7:()=>aS,uuidv6:()=>tS,uuidv4:()=>rS,uuid:()=>oS,url:()=>sS,unknown:()=>k9,union:()=>iz,undefined:()=>Sk,ulid:()=>Jk,uint64:()=>Ek,uint32:()=>Bk,tuple:()=>Uq,transform:()=>FO,templateLiteral:()=>ek,symbol:()=>vk,superRefine:()=>Nq,success:()=>rk,stringbool:()=>Gg,stringFormat:()=>Vk,string:()=>z5,strictObject:()=>yk,set:()=>ck,refine:()=>jq,record:()=>Xq,readonly:()=>Pq,promise:()=>$g,preprocess:()=>Wg,prefault:()=>Fq,pipe:()=>dD,partialRecord:()=>mk,optional:()=>g9,object:()=>fk,number:()=>hC,nullish:()=>ok,nullable:()=>H5,null:()=>cC,nonoptional:()=>Mq,never:()=>zO,nativeEnum:()=>dk,nanoid:()=>Uk,nan:()=>tk,meta:()=>Qg,map:()=>lk,mac:()=>Zk,looseRecord:()=>pk,looseObject:()=>bk,literal:()=>nk,lazy:()=>Cq,ksuid:()=>Yk,keyof:()=>wk,jwt:()=>Lk,json:()=>Zg,ipv6:()=>Wk,ipv4:()=>Gk,invertCodec:()=>sk,intersection:()=>eC,int64:()=>Nk,int32:()=>qk,int:()=>cD,instanceof:()=>Yg,iban:()=>Ok,httpUrl:()=>eS,hostname:()=>Ak,hex:()=>Tk,hash:()=>Rk,guid:()=>iS,function:()=>Ug,float64:()=>Ck,float32:()=>_k,file:()=>ik,exactOptional:()=>Zq,enum:()=>HO,emoji:()=>$k,email:()=>nS,e164:()=>Mk,discriminatedUnion:()=>uk,describe:()=>Jg,date:()=>xk,custom:()=>Ig,currencyCode:()=>Pk,cuid2:()=>Ik,cuid:()=>Xk,creditCard:()=>Dk,codec:()=>ak,cidrv6:()=>zk,cidrv4:()=>Kk,check:()=>Xg,catch:()=>Lq,boolean:()=>uC,bigint:()=>jk,base64url:()=>Fk,base64:()=>Hk,array:()=>D5,any:()=>kk,_function:()=>Ug,_default:()=>zq,_ZodString:()=>nD,ZodXor:()=>tC,ZodXID:()=>$O,ZodVoid:()=>oC,ZodUnknown:()=>nC,ZodUnion:()=>L5,ZodUndefined:()=>pC,ZodUUID:()=>OG,ZodURL:()=>F5,ZodULID:()=>eD,ZodType:()=>v6,ZodTuple:()=>$q,ZodTransform:()=>Gq,ZodTemplateLiteral:()=>Rq,ZodSymbol:()=>mC,ZodSuccess:()=>Dq,ZodStringFormat:()=>QU,ZodString:()=>lz,ZodSet:()=>Jq,ZodRecord:()=>mz,ZodReadonly:()=>Tq,ZodPromise:()=>qq,ZodPreprocess:()=>Aq,ZodPrefault:()=>Hq,ZodPipe:()=>A5,ZodOptional:()=>V5,ZodObject:()=>O5,ZodNumberFormat:()=>f9,ZodNumber:()=>cz,ZodNullable:()=>Wq,ZodNull:()=>lC,ZodNonOptional:()=>DO,ZodNever:()=>iC,ZodNanoID:()=>tD,ZodNaN:()=>Vq,ZodMap:()=>Iq,ZodMAC:()=>fC,ZodLiteral:()=>Qq,ZodLazy:()=>_q,ZodKSUID:()=>UO,ZodJWT:()=>WO,ZodIntersection:()=>sC,ZodInstanceOf:()=>Eq,ZodISOTime:()=>$W,ZodISODuration:()=>UW,ZodISODateTime:()=>sZ,ZodISODate:()=>eZ,ZodIPv6:()=>IO,ZodIPv4:()=>XO,ZodIBAN:()=>bC,ZodGUID:()=>oD,ZodFunction:()=>Bq,ZodFile:()=>Yq,ZodExactOptional:()=>MO,ZodEnum:()=>pz,ZodEmoji:()=>rD,ZodEmail:()=>iD,ZodE164:()=>ZO,ZodDiscriminatedUnion:()=>aC,ZodDefault:()=>Kq,ZodDate:()=>M5,ZodCustomStringFormat:()=>w9,ZodCustom:()=>P5,ZodCreditCard:()=>yC,ZodCodec:()=>T5,ZodCatch:()=>Oq,ZodCUID2:()=>sD,ZodCUID:()=>aD,ZodCIDRv6:()=>QO,ZodCIDRv4:()=>JO,ZodBoolean:()=>dz,ZodBigIntFormat:()=>KO,ZodBigInt:()=>nz,ZodBase64URL:()=>GO,ZodBase64:()=>YO,ZodArray:()=>rC,ZodAny:()=>dC});var pD={};tI(pD,{uppercase:()=>jz,trim:()=>xz,toUpperCase:()=>fz,toLowerCase:()=>wz,startsWith:()=>Ez,slugify:()=>yz,size:()=>N9,regex:()=>qz,property:()=>yD,properties:()=>Sz,positive:()=>gD,overwrite:()=>Y2,normalize:()=>gz,nonpositive:()=>wD,nonnegative:()=>fD,negative:()=>xD,multipleOf:()=>iZ,minSize:()=>DG,minLength:()=>C8,mime:()=>kz,maxSize:()=>oZ,maxLength:()=>E9,lte:()=>VQ,lt:()=>FG,lowercase:()=>Bz,length:()=>v9,includes:()=>Nz,gte:()=>AQ,gt:()=>MG,endsWith:()=>vz});var cS=new WeakSet([Object.prototype,Error.prototype]);function lD($,I,Q){Object.defineProperty($,I,{configurable:!0,enumerable:!1,get(){let K=Q(this);return Object.defineProperty(this,I,{value:K,configurable:!0,writable:!0}),K},set(K){Object.defineProperty(this,I,{value:K,configurable:!0,writable:!0})}})}var dS=($,I)=>{OA.init($,I),$.name="ZodError";let Q=Object.getPrototypeOf($);if(cS.has(Q))return;cS.add(Q),lD(Q,"format",(K)=>(J)=>xF(K,J)),lD(Q,"flatten",(K)=>(J)=>gF(K,J)),lD(Q,"addIssue",(K)=>(J)=>{K.issues.push(J),K.message=JSON.stringify(K.issues,zz,2)}),lD(Q,"addIssues",(K)=>(J)=>{K.issues.push(...J),K.message=JSON.stringify(K.issues,zz,2)}),Object.defineProperty(Q,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}})},pd=d$("ZodError",dS),fJ=d$("ZodError",dS,void 0,{Parent:Error});var CC=Dz(fJ),qC=Oz(fJ),BC=Lz(fJ),jC=Vz(fJ),NC=CM(fJ),EC=qM(fJ),vC=BM(fJ),SC=jM(fJ),kC=NM(fJ),gC=EM(fJ),xC=vM(fJ),wC=SM(fJ);function cd(){if(!bX.localeError)C1(eF())}function x9(){if(!bX.memoizer)C1({memoizer:sF()})}var v6=d$("ZodType",($,I)=>{return cd(),A6.init($,I),$.def=I,$.type=I.type,$},{check(...$){let I=this.def;return this.clone(V0.mergeDefs(I,{checks:[...I.checks??[],...$.map((Q)=>typeof Q==="function"?{_zod:{check:Q,def:{check:"custom"},onattach:[]}}:Q)]}),{parent:!0})},with(...$){return this.check(...$)},clone($,I){return a4(this,$,I)},brand(){return this},register($,I){return $.add(this,I),this},refine($,I){return this.check(jq($,I))},superRefine($,I){return this.check(Nq($,I))},overwrite($){return this.check(Y2($))},optional(){return g9(this)},exactOptional(){return Zq(this)},nullable(){return H5(this)},nullish(){return g9(H5(this))},nonoptional($){return Mq(this,$)},array(){return D5(this)},or($){return iz([this,$])},and($){return eC(this,$)},transform($){return dD(this,FO($))},default($){return zq(this,$)},prefault($){return Fq(this,$)},catch($){return Lq(this,$)},pipe($){return dD(this,$)},readonly(){return Pq(this)},describe($){let I=this.clone();return ZI.add(I,{description:$}),I},meta(...$){if($.length===0)return ZI.get(this);let I=this.clone();return ZI.add(I,$[0]),I},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply($,...I){return I.length===0?$(this):$(this,...I)},get "~standard"(){return V0.hide(this,"~standard",{...pM(this),jsonSchema:{input:bz(this,"input"),output:bz(this,"output")}})},set "~standard"($){V0.own(this,"~standard",$)},parse:function $(I,Q){return CC(this,I,Q,{callee:$})},parseAsync:async function $(I,Q){return await qC(this,I,Q,{callee:$})},safeParse($,I){return BC(this,$,I)},async safeParseAsync($,I){return jC(this,$,I)},get spa(){return this?.safeParseAsync},set spa($){V0.own(this,"spa",$)},validate($,I){return wF(this,$,I)},validateAsync($,I){return fF(this,$,I)},encode:function $(I,Q){return NC(this,I,Q,{callee:$})},decode:function $(I,Q){return EC(this,I,Q,{callee:$})},encodeAsync:async function $(I,Q){return await vC(this,I,Q,{callee:$})},decodeAsync:async function $(I,Q){return await SC(this,I,Q,{callee:$})},safeEncode($,I){return kC(this,$,I)},safeDecode($,I){return gC(this,$,I)},async safeEncodeAsync($,I){return xC(this,$,I)},async safeDecodeAsync($,I){return wC(this,$,I)},toJSONSchema($){return f_(this,{})($)},get description(){return ZI.get(this)?.description},get _def(){return this._zod.def}}),nD=d$("_ZodString",($,I)=>{_9.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>h_($,Q,K,J)},V0.derived({format:($)=>VX($).format??null,minLength:($)=>VX($).minimum??null,maxLength:($)=>VX($).maximum??null},{regex(...$){return this.check(qz(...$))},includes(...$){return this.check(Nz(...$))},startsWith(...$){return this.check(Ez(...$))},endsWith(...$){return this.check(vz(...$))},min(...$){return this.check(C8(...$))},max(...$){return this.check(E9(...$))},length(...$){return this.check(v9(...$))},nonempty(...$){return this.check(C8(1,...$))},lowercase($){return this.check(Bz($))},uppercase($){return this.check(jz($))},trim(){return this.check(xz())},normalize(...$){return this.check(gz(...$))},toLowerCase(){return this.check(wz())},toUpperCase(){return this.check(fz())},slugify(){return this.check(yz())}})),lz=d$("ZodString",($,I)=>{_9.init($,I),nD.init($,I)},{email($){return this.check(HD(iD,$))},url($){return this.check(J5(F5,$))},jwt($){return this.check(kD(WO,$))},emoji($){return this.check(VD(rD,$))},guid($){return this.check(FD(oD,$))},uuid($){return this.check(MD(OG,$))},uuidv4($){return this.check(DD(OG,$))},uuidv6($){return this.check(OD(OG,$))},uuidv7($){return this.check(LD(OG,$))},nanoid($){return this.check(AD(tD,$))},cuid($){return this.check(TD(aD,$))},cuid2($){return this.check(PD(sD,$))},ulid($){return this.check(RD(eD,$))},base64($){return this.check(ED(YO,$))},base64url($){return this.check(vD(GO,$))},xid($){return this.check(_D($O,$))},ksuid($){return this.check(CD(UO,$))},ipv4($){return this.check(qD(XO,$))},ipv6($){return this.check(BD(IO,$))},cidrv4($){return this.check(jD(JO,$))},cidrv6($){return this.check(ND(QO,$))},e164($){return this.check(SD(ZO,$))},datetime($){return this.check(Q5(sZ,$))},date($){return this.check(Y5(eZ,$))},time($){return this.check(G5($W,$))},duration($){return this.check(Z5(UW,$))}});function z5($){return sR(lz,$)}var QU=d$("ZodStringFormat",($,I)=>{s4.init($,I),nD.init($,I)}),sZ=d$("ZodISODateTime",($,I)=>{fT.init($,I),QU.init($,I)}),eZ=d$("ZodISODate",($,I)=>{yT.init($,I),QU.init($,I)}),$W=d$("ZodISOTime",($,I)=>{bT.init($,I),QU.init($,I)}),UW=d$("ZodISODuration",($,I)=>{hT.init($,I),QU.init($,I)}),iD=d$("ZodEmail",($,I)=>{qT.init($,I),QU.init($,I)});function nS($){return HD(iD,$)}var oD=d$("ZodGUID",($,I)=>{_T.init($,I),QU.init($,I)});function iS($){return FD(oD,$)}var OG=d$("ZodUUID",($,I)=>{CT.init($,I),QU.init($,I)});function oS($){return MD(OG,$)}function rS($){return DD(OG,$)}function tS($){return OD(OG,$)}function aS($){return LD(OG,$)}var F5=d$("ZodURL",($,I)=>{NT.init($,I),QU.init($,I)});function sS($){return J5(F5,$)}function eS($){return J5(F5,{protocol:yF,hostname:hA,...V0.normalizeParams($)})}var rD=d$("ZodEmoji",($,I)=>{ET.init($,I),QU.init($,I)});function $k($){return VD(rD,$)}var tD=d$("ZodNanoID",($,I)=>{vT.init($,I),QU.init($,I)});function Uk($){return AD(tD,$)}var aD=d$("ZodCUID",($,I)=>{ST.init($,I),QU.init($,I)});function Xk($){return TD(aD,$)}var sD=d$("ZodCUID2",($,I)=>{kT.init($,I),QU.init($,I)});function Ik($){return PD(sD,$)}var eD=d$("ZodULID",($,I)=>{gT.init($,I),QU.init($,I)});function Jk($){return RD(eD,$)}var $O=d$("ZodXID",($,I)=>{xT.init($,I),QU.init($,I)});function Qk($){return _D($O,$)}var UO=d$("ZodKSUID",($,I)=>{wT.init($,I),QU.init($,I)});function Yk($){return CD(UO,$)}var XO=d$("ZodIPv4",($,I)=>{uT.init($,I),QU.init($,I)});function Gk($){return qD(XO,$)}var fC=d$("ZodMAC",($,I)=>{pT.init($,I),QU.init($,I)});function Zk($){return $_(fC,$)}var IO=d$("ZodIPv6",($,I)=>{mT.init($,I),QU.init($,I)});function Wk($){return BD(IO,$)}var JO=d$("ZodCIDRv4",($,I)=>{lT.init($,I),QU.init($,I)});function Kk($){return jD(JO,$)}var QO=d$("ZodCIDRv6",($,I)=>{cT.init($,I),QU.init($,I)});function zk($){return ND(QO,$)}var YO=d$("ZodBase64",($,I)=>{dT.init($,I),QU.init($,I)});function Hk($){return ED(YO,$)}var GO=d$("ZodBase64URL",($,I)=>{nT.init($,I),QU.init($,I)});function Fk($){return vD(GO,$)}var ZO=d$("ZodE164",($,I)=>{iT.init($,I),QU.init($,I)});function Mk($){return SD(ZO,$)}var yC=d$("ZodCreditCard",($,I)=>{oT.init($,I),QU.init($,I)});function Dk($){return U_(yC,$)}var bC=d$("ZodIBAN",($,I)=>{rT.init($,I),QU.init($,I)});function Ok($){return X_(bC,$)}var WO=d$("ZodJWT",($,I)=>{tT.init($,I),QU.init($,I)});function Lk($){return kD(WO,$)}var w9=d$("ZodCustomStringFormat",($,I)=>{aT.init($,I),QU.init($,I)});function Vk($,I,Q={}){return S9(w9,$,I,Q)}function Ak($){return S9(w9,"hostname",bA,$)}function Tk($){return S9(w9,"hex",eA,$)}function Pk($){return S9(w9,"currency_code",mA,$)}function Rk($,I){let Q=I?.enc??"hex",K=`${$}_${Q}`,J=zY[K];if(!J)throw Error(`Unrecognized hash format: ${K}`);return S9(w9,K,J,I)}var cz=d$("ZodNumber",($,I)=>{sM.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>u_($,Q,K,J),$.isFinite=!0},V0.derived({minValue:($)=>{let{minimum:I,exclusiveMinimum:Q}=VX($);return Math.max(I??Number.NEGATIVE_INFINITY,Q??Number.NEGATIVE_INFINITY)},maxValue:($)=>{let{maximum:I,exclusiveMaximum:Q}=VX($);return Math.min(I??Number.POSITIVE_INFINITY,Q??Number.POSITIVE_INFINITY)},isInt:($)=>{let{isInt:I,multipleOf:Q}=VX($);return!!I||!!Q?.some(Number.isSafeInteger)},format:($)=>VX($).format??null},{gt($,I){return this.check(MG($,I))},gte($,I){return this.check(AQ($,I))},min($,I){return this.check(AQ($,I))},lt($,I){return this.check(FG($,I))},lte($,I){return this.check(VQ($,I))},max($,I){return this.check(VQ($,I))},int($){return this.check(cD($))},safe($){return this.check(cD($))},positive($){return this.check(MG(0,$))},nonnegative($){return this.check(AQ(0,$))},negative($){return this.check(FG(0,$))},nonpositive($){return this.check(VQ(0,$))},multipleOf($,I){return this.check(iZ($,I))},step($,I){return this.check(iZ($,I))},finite(){return this}}));function hC($){return J_(cz,$)}var f9=d$("ZodNumberFormat",($,I)=>{sT.init($,I),cz.init($,I)});function cD($){return Y_(f9,$)}function _k($){return G_(f9,$)}function Ck($){return Z_(f9,$)}function qk($){return W_(f9,$)}function Bk($){return K_(f9,$)}var dz=d$("ZodBoolean",($,I)=>{nF.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>m_($,Q,K,J)});function uC($){return z_(dz,$)}var nz=d$("ZodBigInt",($,I)=>{eM.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>p_($,Q,K,J)},V0.derived({minValue:($)=>VX($).minimum??null,maxValue:($)=>VX($).maximum??null,format:($)=>VX($).format??null},{gte($,I){return this.check(AQ($,I))},min($,I){return this.check(AQ($,I))},gt($,I){return this.check(MG($,I))},lt($,I){return this.check(FG($,I))},lte($,I){return this.check(VQ($,I))},max($,I){return this.check(VQ($,I))},positive($){return this.check(MG(BigInt(0),$))},negative($){return this.check(FG(BigInt(0),$))},nonpositive($){return this.check(VQ(BigInt(0),$))},nonnegative($){return this.check(AQ(BigInt(0),$))},multipleOf($,I){return this.check(iZ($,I))}}));function jk($){return F_(nz,$)}var KO=d$("ZodBigIntFormat",($,I)=>{eT.init($,I),nz.init($,I)});function Nk($){return D_(KO,$)}function Ek($){return O_(KO,$)}var mC=d$("ZodSymbol",($,I)=>{$P.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>l_($,Q,K,J)});function vk($){return L_(mC,$)}var pC=d$("ZodUndefined",($,I)=>{UP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>d_($,Q,K,J)});function Sk($){return V_(pC,$)}var lC=d$("ZodNull",($,I)=>{XP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>c_($,Q,K,J)});function cC($){return A_(lC,$)}var dC=d$("ZodAny",($,I)=>{IP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>o_($,Q,K,J)});function kk(){return T_(dC)}var nC=d$("ZodUnknown",($,I)=>{JP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>r_($,Q,K,J)});function k9(){return P_(nC)}var iC=d$("ZodNever",($,I)=>{QP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>i_($,Q,K,J)});function zO($){return R_(iC,$)}var oC=d$("ZodVoid",($,I)=>{YP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>n_($,Q,K,J)});function gk($){return __(oC,$)}var M5=d$("ZodDate",($,I)=>{GP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>t_($,Q,K,J),$.min=(Q,K)=>$.check(AQ(Q,K)),$.max=(Q,K)=>$.check(VQ(Q,K))},V0.derived({minDate:($)=>{let{minimum:I}=VX($);return I?new Date(I):null},maxDate:($)=>{let{maximum:I}=VX($);return I?new Date(I):null}},{}));function xk($){return C_(M5,$)}var rC=d$("ZodArray",($,I)=>{x9(),ZP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>ZC($,Q,K,J),$.element=I.element},{min($,I){return this.check(C8($,I))},nonempty($){return this.check(C8(1,$))},max($,I){return this.check(E9($,I))},length($,I){return this.check(v9($,I))},unwrap(){return this.element}});function D5($,I){return j_(rC,$,I)}function wk($){let I=$._zod.def.shape;return HO(Object.keys(I))}var O5=d$("ZodObject",($,I)=>{x9(),WP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>WC($,Q,K,J),V0.installLazyProp($,"shape",(Q)=>Q._zod.def.shape,!1)},{keyof(){return HO(Object.keys(this._zod.def.shape))},catchall($){return this.clone(V0.mergeDefs(this._zod.def,{catchall:$}))},passthrough(){return this.clone(V0.mergeDefs(this._zod.def,{catchall:k9()}))},loose(){return this.clone(V0.mergeDefs(this._zod.def,{catchall:k9()}))},strict(){return this.clone(V0.mergeDefs(this._zod.def,{catchall:zO()}))},strip(){return this.clone(V0.mergeDefs(this._zod.def,{catchall:void 0}))},extend($){return V0.extend(this,$)},safeExtend($){return V0.safeExtend(this,$)},merge($){return V0.merge(this,$)},pick($){return V0.pick(this,$)},omit($){return V0.omit(this,$)},partial(...$){return V0.partial(V5,this,$[0])},exactPartial(...$){return V0.partial(MO,this,$[0],"exactPartial")},required(...$){return V0.required(DO,this,$[0])}});function fk($,I){let Q={type:"object",shape:$??{},...V0.normalizeParams(I)};return new O5(Q)}function yk($,I){return new O5({type:"object",shape:$,catchall:zO(),...V0.normalizeParams(I)})}function bk($,I){return new O5({type:"object",shape:$,catchall:k9(),...V0.normalizeParams(I)})}var L5=d$("ZodUnion",($,I)=>{iF.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>hD($,Q,K,J),$.options=I.options});function iz($,I){return new L5({type:"union",options:$,...V0.normalizeParams(I)})}var tC=d$("ZodXor",($,I)=>{L5.init($,I),KP.init($,I),$._zod.processJSONSchema=(Q,K,J)=>hD($,Q,K,J),$.options=I.options});function hk($,I){return new tC({type:"union",options:$,inclusive:!1,...V0.normalizeParams(I)})}var aC=d$("ZodDiscriminatedUnion",($,I)=>{L5.init($,I),HP.init($,I)});function uk($,I,Q){return new aC({type:"union",options:I,discriminator:$,...V0.normalizeParams(Q)})}var sC=d$("ZodIntersection",($,I)=>{FP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>KC($,Q,K,J)});function eC($,I){return new sC({type:"intersection",left:$,right:I})}var $q=d$("ZodTuple",($,I)=>{x9(),$D.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>zC($,Q,K,J)},{rest($){return this.clone({...this._zod.def,rest:$})},partial(){let $=this._zod.def;if($.checks?.length)throw Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...$,items:$.items.map((I)=>new V5({type:"optional",innerType:I}))})}});function Uq($,I,Q){let K=I instanceof A6,J=K?Q:I;return new $q({type:"tuple",items:$,rest:K?I:null,...V0.normalizeParams(J)})}var mz=d$("ZodRecord",($,I)=>{x9(),MP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>HC($,Q,K,J),$.keyType=I.keyType,$.valueType=I.valueType});function Xq($,I,Q){if(!I||!I._zod)return new mz({type:"record",keyType:z5(),valueType:$,...V0.normalizeParams(I)});return new mz({type:"record",keyType:$,valueType:I,...V0.normalizeParams(Q)})}function mk($,I,Q){return new mz({type:"record",keyType:$,valueType:I,...V0.normalizeParams(Q),partial:!0})}function pk($,I,Q){return new mz({type:"record",keyType:$,valueType:I,mode:"loose",...V0.normalizeParams(Q)})}var Iq=d$("ZodMap",($,I)=>{x9(),DP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>YC($,Q,K,J),$.keyType=I.keyType,$.valueType=I.valueType,$.min=(...Q)=>$.check(DG(...Q)),$.nonempty=(Q)=>$.check(DG(1,Q)),$.max=(...Q)=>$.check(oZ(...Q)),$.size=(...Q)=>$.check(N9(...Q))});function lk($,I,Q){return new Iq({type:"map",keyType:$,valueType:I,...V0.normalizeParams(Q)})}var Jq=d$("ZodSet",($,I)=>{x9(),OP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>GC($,Q,K,J),$.min=(...Q)=>$.check(DG(...Q)),$.nonempty=(Q)=>$.check(DG(1,Q)),$.max=(...Q)=>$.check(oZ(...Q)),$.size=(...Q)=>$.check(N9(...Q))});function ck($,I){return new Jq({type:"set",valueType:$,...V0.normalizeParams(I)})}var pz=d$("ZodEnum",($,I)=>{LP.init($,I),v6.init($,I),$._zod.processJSONSchema=(K,J,Z)=>a_($,K,J,Z),$.enum=I.entries,$.options=[...$._zod.values];let Q=new Set(Object.keys(I.entries));$.extract=(K,J)=>{let Z={};for(let G of K)if(Q.has(G))Z[G]=I.entries[G];else throw Error(`Key ${G} not found in enum`);return new pz({...I,checks:[],...V0.normalizeParams(J),entries:Z})},$.exclude=(K,J)=>{let Z={...I.entries};for(let G of K)if(Q.has(G))delete Z[G];else throw Error(`Key ${G} not found in enum`);return new pz({...I,checks:[],...V0.normalizeParams(J),entries:Z})}});function HO($,I){let Q=Array.isArray($)?Object.fromEntries($.map((K)=>[K,K])):$;return new pz({type:"enum",entries:Q,...V0.normalizeParams(I)})}function dk($,I){return new pz({type:"enum",entries:$,...V0.normalizeParams(I)})}var Qq=d$("ZodLiteral",($,I)=>{VP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>s_($,Q,K,J),$.values=new Set(I.values),Object.defineProperty($,"value",{get(){if(I.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return I.values[0]}})});function nk($,I){return new Qq({type:"literal",values:Array.isArray($)?$:[$],...V0.normalizeParams(I)})}var Yq=d$("ZodFile",($,I)=>{AP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>UC($,Q,K,J),$.min=(Q,K)=>$.check(DG(Q,K)),$.max=(Q,K)=>$.check(oZ(Q,K)),$.mime=(Q,K)=>$.check(kz(Array.isArray(Q)?Q:[Q],K))});function ik($){return N_(Yq,$)}var Gq=d$("ZodTransform",($,I)=>{x9(),TP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>QC($,Q,K,J),$._zod.parse=(Q,K)=>{if(K.direction==="backward")throw new P9($.constructor.name);Q.addIssue=(Z)=>{if(typeof Z==="string")Q.issues.push(V0.issue(Z,Q.value,I));else{let G=Z;if(G.fatal)G.continue=!1;if(G.code??(G.code="custom"),!("input"in G))G.input=Q.value;G.inst??(G.inst=$),Q.issues.push(V0.issue(G))}};let J=I.transform(Q.value,Q);if(J instanceof Promise)return J.then((Z)=>{return Q.value=Z,Q});return Q.value=J,Q}});function FO($){return new Gq({type:"transform",transform:$})}var V5=d$("ZodOptional",($,I)=>{UD.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>uD($,Q,K,J),$.unwrap=()=>$._zod.def.innerType});function g9($){return new V5({type:"optional",innerType:$})}var MO=d$("ZodExactOptional",($,I)=>{PP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>uD($,Q,K,J),$.unwrap=()=>$._zod.def.innerType});function Zq($){return new MO({type:"optional",innerType:$})}var Wq=d$("ZodNullable",($,I)=>{RP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>FC($,Q,K,J),$.unwrap=()=>$._zod.def.innerType});function H5($){return new Wq({type:"nullable",innerType:$})}function ok($){return g9(H5($))}var Kq=d$("ZodDefault",($,I)=>{_P.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>OC($,Q,K,J),$.unwrap=()=>$._zod.def.innerType,$.removeDefault=$.unwrap});function zq($,I){return new Kq({type:"default",innerType:$,get defaultValue(){return typeof I==="function"?I():V0.shallowClone(I)}})}var Hq=d$("ZodPrefault",($,I)=>{CP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>LC($,Q,K,J),$.unwrap=()=>$._zod.def.innerType});function Fq($,I){return new Hq({type:"prefault",innerType:$,get defaultValue(){return typeof I==="function"?I():V0.shallowClone(I)}})}var DO=d$("ZodNonOptional",($,I)=>{qP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>MC($,Q,K,J),$.unwrap=()=>$._zod.def.innerType});function Mq($,I){return new DO({type:"nonoptional",innerType:$,...V0.normalizeParams(I)})}var Dq=d$("ZodSuccess",($,I)=>{BP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>XC($,Q,K,J),$.unwrap=()=>$._zod.def.innerType});function rk($){return new Dq({type:"success",innerType:$})}var Oq=d$("ZodCatch",($,I)=>{jP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>VC($,Q,K,J),$.unwrap=()=>$._zod.def.innerType,$.removeCatch=$.unwrap});function Lq($,I){return new Oq({type:"catch",innerType:$,catchValue:typeof I==="function"?I:V0.constantCatch(I)})}var Vq=d$("ZodNaN",($,I)=>{NP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>e_($,Q,K,J)});function tk($){return B_(Vq,$)}var A5=d$("ZodPipe",($,I)=>{XD.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>AC($,Q,K,J),$.in=I.in,$.out=I.out});function dD($,I){return new A5({type:"pipe",in:$,out:I})}var T5=d$("ZodCodec",($,I)=>{A5.init($,I),oF.init($,I)});function ak($,I,Q){return new T5({type:"pipe",in:$,out:I,transform:Q.decode,reverseTransform:Q.encode})}function sk($){let I=$._zod.def;return new T5({type:"pipe",in:I.out,out:I.in,transform:I.reverseTransform,reverseTransform:I.transform})}var Aq=d$("ZodPreprocess",($,I)=>{A5.init($,I),EP.init($,I)}),Tq=d$("ZodReadonly",($,I)=>{vP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>TC($,Q,K,J),$.unwrap=()=>$._zod.def.innerType});function Pq($){return new Tq({type:"readonly",innerType:$})}var Rq=d$("ZodTemplateLiteral",($,I)=>{SP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>$C($,Q,K,J)});function ek($,I){return new Rq({type:"template_literal",parts:$,...V0.normalizeParams(I)})}var _q=d$("ZodLazy",($,I)=>{rF.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>RC($,Q,K,J),$.unwrap=()=>$._zod.def.getter()});function Cq($){return new _q({type:"lazy",getter:$})}var qq=d$("ZodPromise",($,I)=>{gP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>PC($,Q,K,J),$.unwrap=()=>$._zod.def.innerType});function $g($){return new qq({type:"promise",innerType:$})}var Bq=d$("ZodFunction",($,I)=>{kP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>JC($,Q,K,J)});function Ug($){return new Bq({type:"function",input:Array.isArray($?.input)?Uq($?.input):$?.input??D5(k9()),output:$?.output??k9()})}var P5=d$("ZodCustom",($,I)=>{xP.init($,I),v6.init($,I),$._zod.processJSONSchema=(Q,K,J)=>IC($,Q,K,J)});function Xg($){let I=new MU({check:"custom"});return I._zod.check=$,I}function Ig($,I){return E_(P5,$??(()=>!0),I)}function jq($,I={}){return v_(P5,$,I)}function Nq($,I){return S_($,I)}var Jg=k_,Qg=g_,Eq=d$("ZodInstanceOf",($,I)=>{P5.init($,I)},{properties($,I){return this.check(Sz($,I))}});function Yg($,I={}){let Q=new Eq({type:"custom",check:"custom",fn:(K)=>K instanceof $,abort:!0,...V0.normalizeParams(I)});return Q._zod.bag.Class=$,Q._zod.check=(K)=>{if(!(K.value instanceof $))K.issues.push({code:"invalid_type",expected:$.name,input:K.value,inst:Q,path:[...Q._zod.def.path??[]]})},Q}var Gg=(...$)=>x_({Codec:T5,Boolean:dz,String:lz},...$);function Zg($){let I=Cq(()=>{return iz([z5($),hC(),uC(),cC(),D5(I),Xq(z5(),I)])});return I}function Wg($,I){return new Aq({type:"pipe",in:FO($),out:I})}var dd={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 nd($){C1({customError:$})}function id(){return C1().customError}var vq;(function($){})(vq||(vq={}));var R5={};tI(R5,{time:()=>td,duration:()=>ad,datetime:()=>od,date:()=>rd,ZodISOTime:()=>$W,ZodISODuration:()=>UW,ZodISODateTime:()=>sZ,ZodISODate:()=>eZ});function od($){return Q5(sZ,$)}function rd($){return Y5(eZ,$)}function td($){return G5($W,$)}function ad($){return Z5(UW,$)}var d0={...oz,...pD,iso:R5},sd=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 ed($,I){let Q=$.$schema;if(Q==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(Q==="http://json-schema.org/draft-07/schema#")return"draft-7";if(Q==="http://json-schema.org/draft-04/schema#")return"draft-4";return I??"draft-2020-12"}function Kg($,I){return $.map((Q,K)=>K<I?Q:Q.optional())}function $n($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}function Un($,I){if(!$.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let Q=$.slice(1).split("/").filter(Boolean);if(Q.length===0)return I.rootSchema;let K=I.version==="draft-2020-12"?"$defs":"definitions";if(Q[0]===K){let J=Q[1]===void 0?void 0:$n(Q[1]);if(!J||!I.defs[J])throw Error(`Reference not found: ${$}`);return I.defs[J]}throw Error(`Reference not found: ${$}`)}function Xn($,I){return d0.transform((K)=>K).check((K)=>{let J=K.value;if(typeof J!=="object"||J===null||Array.isArray(J))return;let Z=Object.getOwnPropertyNames(J);if(I.minProperties!==void 0&&Z.length<I.minProperties)K.issues.push({origin:"object",code:"too_small",minimum:I.minProperties,inclusive:!0,message:`Too small: expected object to have >=${I.minProperties} properties`,input:J,inst:$,continue:!0});if(I.maxProperties!==void 0&&Z.length>I.maxProperties)K.issues.push({origin:"object",code:"too_big",maximum:I.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${I.maxProperties} properties`,input:J,inst:$,continue:!0});if(I.keySchema)for(let G of Z){let D=I.keySchema.safeParse(G);if(D.success)continue;K.issues.push({code:"invalid_key",origin:"record",issues:D.error.issues,input:G,path:[G],continue:!0})}}).pipe($)}function Sq($,I){if($===null)return"z";let Q=typeof $;if(Q!=="object"){if(Q==="number"&&Number.isNaN($))return null;let K=String($);return`${Q[0]}${K.length}:${K}`}if(I.has($))return null;I.add($);try{if(Array.isArray($)){let Z=[];for(let G of $){let D=Sq(G,I);if(D===null)return null;Z.push(D)}return`a${Z.length}:[${Z.join(",")}]`}let K=Object.keys($).sort(),J=[];for(let Z of K){let G=Sq($[Z],I);if(G===null)return null;J.push(`${Z.length}:${Z}=${G}`)}return`o${J.length}:{${J.join(",")}}`}finally{I.delete($)}}var In=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),Jn=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function _5($){if(typeof $!=="object"||$===null)return!1;if(Array.isArray($))return $.some(_5);if(typeof $.$ref==="string")return!0;return Object.entries($).some(([I,Q])=>{if(In.has(I))return _5(Q);if(!Jn.has(I)||typeof Q!=="object"||Q===null)return!1;return Object.values(Q).some(_5)})}function zg($){return $===1?"element":"elements"}function Qn($,I){return d0.transform((K)=>K).check((K)=>{let J=K.value;if(!Array.isArray(J))return;if(I.uniqueItems===!0){let Z=new Map;for(let G=0;G<J.length;G++){let D=Sq(J[G],new Set);if(D===null)continue;let v=Z.get(D);if(v===void 0){Z.set(D,G);continue}K.issues.push({code:"custom",message:`Array items must be unique: element at index ${G} duplicates the one at index ${v}`,input:J,path:[G],continue:!0})}}if(I.containsSchema){let Z=I.minContains??1,G=I.maxContains!==void 0?I.maxContains+1:Number.POSITIVE_INFINITY,D=0;for(let v of J)if(I.containsSchema.safeParse(v).success&&++D>=G)break;if(D<Z)K.issues.push({code:"custom",message:`Array must contain at least ${Z} matching ${zg(Z)}; found ${D}`,input:J,continue:!0});if(I.maxContains!==void 0&&D>I.maxContains)K.issues.push({code:"custom",message:`Array must contain at most ${I.maxContains} matching ${zg(I.maxContains)}`,input:J,continue:!0})}}).pipe($)}function Hg($,I){if($===!1)return;if($===void 0||$===!0)return d0.any();return JJ($,I)}var Yn=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function Fg($,I){if($.not!==void 0){if(typeof $.not==="object"&&Object.keys($.not).length===0)return d0.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if($.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if($.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if($.if!==void 0||$.then!==void 0||$.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if($.dependentSchemas!==void 0||$.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if($.$ref){let J=$.$ref;if(I.refs.has(J))return I.refs.get(J);if(I.processing.has(J))return d0.lazy(()=>{if(!I.refs.has(J))throw Error(`Circular reference not resolved: ${J}`);return I.refs.get(J)});I.processing.add(J);let Z=Un(J,I),G=JJ(Z,I);return I.refs.set(J,G),I.processing.delete(J),G}if($.enum!==void 0){let J=$.enum;if(I.version==="openapi-3.0"&&$.nullable===!0&&J.length===1&&J[0]===null)return d0.null();if(J.length===0)return d0.never();if(J.length===1)return d0.literal(J[0]);if(J.every((G)=>typeof G==="string"))return d0.enum(J);let Z=J.map((G)=>d0.literal(G));if(Z.length<2)return Z[0];return d0.union([Z[0],Z[1],...Z.slice(2)])}if($.const!==void 0)return d0.literal($.const);let Q=$.type;if(Array.isArray(Q)){let J=Q.map((Z)=>{let G={...$,type:Z};return Fg(G,I)});if(J.length===0)return d0.never();if(J.length===1)return J[0];return d0.union(J)}if(!Q)return d0.any();let K;switch(Q){case"string":{let J=d0.string();if($.format){let Z=$.format;if(Z==="email")J=J.check(d0.email());else if(Z==="uri"||Z==="uri-reference")J=J.check(d0.url());else if(Z==="uuid"||Z==="guid")J=J.check(d0.uuid());else if(Z==="date-time")J=J.check(d0.iso.datetime({offset:!0}));else if(Z==="date")J=J.check(d0.iso.date());else if(Z==="time")J=J.check(d0.regex(Yn));else if(Z==="duration")J=J.check(d0.iso.duration());else if(Z==="hostname")J=J.check(d0.hostname());else if(Z==="ipv4")J=J.check(d0.ipv4());else if(Z==="ipv6")J=J.check(d0.ipv6());else if(Z==="mac")J=J.check(d0.mac());else if(Z==="cidr")J=J.check(d0.cidrv4());else if(Z==="cidr-v6")J=J.check(d0.cidrv6());else if(Z==="base64")J=J.check(d0.base64());else if(Z==="base64url")J=J.check(d0.base64url());else if(Z==="e164")J=J.check(d0.e164());else if(Z==="credit_card")J=J.check(d0.creditCard());else if(Z==="iban")J=J.check(d0.iban());else if(Z==="jwt")J=J.check(d0.jwt());else if(Z==="emoji")J=J.check(d0.emoji());else if(Z==="nanoid")J=J.check(d0.nanoid());else if(Z==="cuid")J=J.check(d0.cuid());else if(Z==="cuid2")J=J.check(d0.cuid2());else if(Z==="ulid")J=J.check(d0.ulid());else if(Z==="xid")J=J.check(d0.xid());else if(Z==="ksuid")J=J.check(d0.ksuid())}if(typeof $.minLength==="number")J=J.min($.minLength);if(typeof $.maxLength==="number")J=J.max($.maxLength);if($.pattern)J=J.regex(new RegExp($.pattern));K=J;break}case"number":case"integer":{let J=Q==="integer"?d0.number().int():d0.number();if(typeof $.minimum==="number"&&$.exclusiveMinimum!==!0)J=J.min($.minimum);if(typeof $.maximum==="number"&&$.exclusiveMaximum!==!0)J=J.max($.maximum);if(typeof $.exclusiveMinimum==="number")J=J.gt($.exclusiveMinimum);else if($.exclusiveMinimum===!0&&typeof $.minimum==="number")J=J.gt($.minimum);if(typeof $.exclusiveMaximum==="number")J=J.lt($.exclusiveMaximum);else if($.exclusiveMaximum===!0&&typeof $.maximum==="number")J=J.lt($.maximum);if(typeof $.multipleOf==="number")J=J.multipleOf($.multipleOf);K=J;break}case"boolean":{K=d0.boolean();break}case"null":{K=d0.null();break}case"object":{let J={},Z=$.properties||{},G=new Set($.required||[]),D=typeof $.additionalProperties==="object"?JJ($.additionalProperties,I):void 0;for(let[O,N]of Object.entries(Z)){let g=JJ(N,I);GI(J,O,G.has(O)?g:g.optional())}if($.patternProperties){let O=$.patternProperties,N=Object.keys(O),g=[];for(let b of N){let m=JJ(O[b],I),c=d0.string().regex(new RegExp(b));g.push(d0.looseRecord(c,m))}let x=[];if(Object.keys(J).length>0)x.push(d0.object(J).passthrough());if(x.push(...g),x.length===0)K=d0.object({}).passthrough();else if(x.length===1)K=x[0];else{let b=d0.intersection(x[0],x[1]);for(let m=2;m<x.length;m++)b=d0.intersection(b,x[m]);K=b}if($.additionalProperties===!1){let b=Object.keys(J),m=N.map((h)=>new RegExp(h)),c=K;K=K.check((h)=>{if(!WY(h.value))return;let d=[];for(let s of Object.keys(h.value)){if(b.includes(s))continue;if(m.some(($$)=>$$.test(s)))continue;d.push(s)}if(d.length)h.issues.push({code:"unrecognized_keys",keys:d,input:h.value,inst:c})})}}else{let O=d0.object(J);if($.additionalProperties===!1)K=O.strict();else if(D)K=O.catchall(D);else K=O.passthrough()}let v=$.propertyNames!==void 0&&$.propertyNames!==!0,C=typeof $.minProperties==="number"?$.minProperties:void 0,B=typeof $.maxProperties==="number"?$.maxProperties:void 0;if(v||C!==void 0||B!==void 0){let O;if(v){let N=typeof $.propertyNames==="object"&&$.propertyNames.type===void 0?{type:"string",...$.propertyNames}:$.propertyNames;O=JJ(N,I)}K=Xn(K,{keySchema:O,minProperties:C,maxProperties:B})}break}case"array":{let{prefixItems:J,items:Z}=$;if(J&&Array.isArray(J)){let G=typeof $.minItems==="number"?$.minItems:0,D=J.map((O)=>JJ(O,I)),v=Kg(D,G),C=!Array.isArray(Z)?Hg(Z,I):void 0,B=d0.tuple(v);if(K=C?B.rest(C):B,typeof $.minItems==="number")K=K.check(d0.minLength($.minItems));if(typeof $.maxItems==="number")K=K.check(d0.maxLength($.maxItems))}else if(Array.isArray(Z)){let G=typeof $.minItems==="number"?$.minItems:0,D=Z.map((O)=>JJ(O,I)),v=Kg(D,G),C=Hg($.additionalItems,I),B=d0.tuple(v);if(K=C?B.rest(C):B,typeof $.minItems==="number")K=K.check(d0.minLength($.minItems));if(typeof $.maxItems==="number")K=K.check(d0.maxLength($.maxItems))}else if(Z!==void 0){let G=JJ(Z,I),D=d0.array(G);if(typeof $.minItems==="number")D=D.min($.minItems);if(typeof $.maxItems==="number")D=D.max($.maxItems);K=D}else K=d0.array(d0.any());if($.uniqueItems===!0||$.contains!==void 0)K=Qn(K,{uniqueItems:$.uniqueItems===!0,containsSchema:$.contains!==void 0?JJ($.contains,I):void 0,minContains:typeof $.minContains==="number"?$.minContains:void 0,maxContains:typeof $.maxContains==="number"?$.maxContains:void 0});break}default:throw Error(`Unsupported type: ${Q}`)}return K}function JJ($,I){if(typeof $==="boolean")return $?d0.any():d0.never();let Q=Fg($,I),K=$.type||$.enum!==void 0||$.const!==void 0;if($.anyOf&&Array.isArray($.anyOf)){let D=$.anyOf.map((C)=>JJ(C,I)),v=d0.union(D);Q=K?d0.intersection(Q,v):v}if($.oneOf&&Array.isArray($.oneOf)){let D=$.oneOf.map((C)=>JJ(C,I)),v=d0.xor(D);Q=K?d0.intersection(Q,v):v}if($.allOf&&Array.isArray($.allOf))if($.allOf.length===0)Q=K?Q:d0.any();else{let D=K?Q:JJ($.allOf[0],I),v=K?0:1;for(let C=v;C<$.allOf.length;C++)D=d0.intersection(D,JJ($.allOf[C],I));Q=D}if($.nullable===!0&&I.version==="openapi-3.0")Q=d0.nullable(Q);if($.readOnly===!0)Q=d0.readonly(Q);if($.default!==void 0)Q=Q.default($.default);let J={},Z=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let D of Z)if(D in $)J[D]=$[D];let G=["contentEncoding","contentMediaType","contentSchema"];for(let D of G)if(D in $)J[D]=$[D];if($.type==="object"&&$.$ref===void 0){if($.propertyNames!==void 0&&!_5($.propertyNames))J.propertyNames=$.propertyNames;for(let D of["minProperties","maxProperties"])if($[D]!==void 0)J[D]=$[D]}if($.type==="array"&&$.$ref===void 0){if($.contains!==void 0&&!_5($.contains))J.contains=$.contains;for(let D of["uniqueItems","minContains","maxContains"])if($[D]!==void 0)J[D]=$[D]}for(let D of Object.keys($))if(!sd.has(D))GI(J,D,$[D]);if(Object.keys(J).length>0)I.registry.add(Q,J);if($.description)Q=Q.describe($.description);return Q}function Mg($,I){if(typeof $==="boolean")return $?d0.any():d0.never();let Q;try{Q=JSON.parse(JSON.stringify($))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let K=ed(Q,I?.defaultTarget),J=Q.$defs||Q.definitions||{},Z={version:K,defs:J,refs:new Map,processing:new Set,rootSchema:Q,registry:I?.registry??ZI};return JJ(Q,Z)}var Dg=Symbol("z.visit/resolving");function C5($,I){let Q=typeof I==="function"?I:(G,D)=>{let v=I[G._zod.def.type];return v?v(G,D):G},K=new Map;function J(G){let D=K.get(G);if(D===Dg)return new rF({type:"lazy",getter:()=>K.get(G)});if(D!==void 0)return D;K.set(G,Dg);let v=Z(G),C=Q(v,v!==G);return K.set(G,C),C}function Z(G){let D=G._zod.def,v=D.type;switch(v){case"object":{let C=D.shape,B=Object.keys(C),O=!1,N={};for(let x of B){let b=J(C[x]);if(b!==C[x])O=!0;N[x]=b}let g=D.catchall;if(D.catchall){if(g=J(D.catchall),g!==D.catchall)O=!0}return O?a4(G,{...D,shape:N,catchall:g}):G}case"array":{let C=J(D.element);return C===D.element?G:a4(G,{...D,element:C})}case"tuple":{let C=D.items,B=!1,O=[];for(let g of C){let x=J(g);if(x!==g)B=!0;O.push(x)}let N=D.rest;if(D.rest){if(N=J(D.rest),N!==D.rest)B=!0}return B?a4(G,{...D,items:O,rest:N}):G}case"record":case"map":{let C=J(D.keyType),B=J(D.valueType);return C===D.keyType&&B===D.valueType?G:a4(G,{...D,keyType:C,valueType:B})}case"set":{let C=J(D.valueType);return C===D.valueType?G:a4(G,{...D,valueType:C})}case"union":{let C=D.options,B=!1,O=[];for(let N of C){let g=J(N);if(g!==N)B=!0;O.push(g)}return B?a4(G,{...D,options:O}):G}case"intersection":{let C=J(D.left),B=J(D.right);return C===D.left&&B===D.right?G:a4(G,{...D,left:C,right:B})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let C=J(D.innerType);return C===D.innerType?G:a4(G,{...D,innerType:C})}case"pipe":{let C=J(D.in),B=J(D.out);return C===D.in&&B===D.out?G:a4(G,{...D,in:C,out:B})}case"function":{let C=J(D.input),B=J(D.output);return C===D.input&&B===D.output?G:a4(G,{...D,input:C,output:B})}case"lazy":{let C=D.getter,{_cachedInner:B,...O}=D;return a4(G,{...O,getter:()=>J(C())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return G;default:return G}}return J($)}function Og($){return C5($,{object:(I)=>I.partial(),union:(I)=>{let Q=I._zod.def;return Q.discriminator===void 0?I:iz(Q.options)}})}function Gn($,I){if(!I?.length)return $;let Q=$._zod.def;return a4($,Q2(Q,{checks:[...Q.checks??[],...I]}),{parent:!0})}function Lg($){return Gn($.out,$.checks)}function Zn($){return $.in._zod.traits.has("$ZodTransform")?Lg($):$.in}function Vg($){return C5($,{pipe:(I)=>Zn(I._zod.def),default:(I,Q)=>Q?g9(I._zod.def.innerType):I,catch:(I,Q)=>Q?I._zod.def.innerType:I})}function Ag($){return C5($,{pipe:(I)=>Lg(I._zod.def),prefault:(I,Q)=>Q?I._zod.def.innerType:I})}var kq={};tI(kq,{string:()=>Wn,number:()=>Kn,date:()=>Fn,boolean:()=>zn,bigint:()=>Hn});function Wn($){return eR(lz,$)}function Kn($){return Q_(cz,$)}function zn($){return H_(dz,$)}function Hn($){return M_(nz,$)}function Fn($){return q_(M5,$)}var Tg=D6.object({id:D6.string().min(1).optional(),name:D6.string().min(1).optional(),kind:D6.enum(["human","agent","bot","system"])}),Pg=D6.object({type:D6.string().min(1),id:D6.string().min(1)}),Rg=D6.object({provider:D6.string().min(1),id:D6.string().min(1).optional(),url:D6.string().min(1).optional(),cursor:D6.string().min(1).optional(),rawRef:D6.string().min(1).optional()}),gq=D6.object({id:D6.string().min(1),service:D6.string().min(1),type:D6.string().min(1),schemaVersion:D6.number().int().positive(),idempotencyKey:D6.string().min(1),occurredAt:D6.string().min(1),observedAt:D6.string().min(1),origin:D6.enum(["virtual","external","agent","connector","replay","migration"]),actor:Tg.optional(),subject:Pg,causationId:D6.string().min(1).optional(),correlationId:D6.string().min(1).optional(),external:Rg.optional(),data:D6.record(D6.string(),D6.unknown()),raw:D6.record(D6.string(),D6.unknown()).optional()}),_g=D6.object({version:D6.literal(1),service:D6.string().min(1),rebuiltAt:D6.string().min(1),eventCount:D6.number().int().nonnegative(),latestEventId:D6.string().min(1).optional(),subjects:D6.record(D6.string(),D6.object({type:D6.string().min(1),id:D6.string().min(1),latestEventId:D6.string().min(1),latestType:D6.string().min(1),updatedAt:D6.string().min(1)}))});function Cg($){return J2($||process.env.PROJECT_ROOT||process.cwd())}function MM(){let $=process.env.VOLTER_STATE_DIR||".volter";if(O9($)||$.split(/[\\/]/).includes(".."))throw Error("VOLTER_STATE_DIR must be a relative directory without .. segments");return $}function OO($){return M4(Cg($),MM(),"world")}function On($){if(!/^[A-Za-z0-9_-]+$/.test($))throw Error(`Invalid world service name: ${$}`);return $}var xq;function qg($){let I=xq;return xq=$,I}var Ln=0;function kJ($,I){let Q=On($);if(Ln===0)xq?.(Q,I);let K=Cg(I),J=M4(OO(I),Q);return{root:K,service:Q,dir:J,events:M4(J,"events.jsonl"),state:M4(J,"state.json"),resources:M4(J,"resources"),cursors:M4(J,"cursors"),ingests:M4(J,"ingests"),eventQueue:M4(J,"event-queue.jsonl")}}var Vn={windowMs:60000,ceiling:60,defaultWeight:2,maxRetryAfterSeconds:300,rules:[],reason:"no pack declared a budget for this vendor — this is the conservative fallback (30 calls/min at "+"the default weight), not a considered limit. Declare one on the pack with the vendor's real limits."};var Bg="2.0",_n=Number(Bg.split(".")[0]);var jn=y1(Ng(),1);wU();var{AsyncLocalStorage:X4$}=(()=>({}));var{AsyncLocalStorage:i6$}=(()=>({}));var o6$="0".repeat(32),r6$="0".repeat(16);var{AsyncLocalStorage:Xi}=(()=>({}));var mn;function kg($){mn=$}var bq="/__volter/world-boot";var{chmodSync:q4$,existsSync:B4$,mkdirSync:j4$,readFileSync:N4$,writeFileSync:E4$}=(()=>({}));wU();var Ii=1e6,Ji=/(?:^|[-_.])(?:auth|authorization|token|jwt|key|apikey|secret|credential|credentials|signature|sig|password|passwd|pwd|session|sessionid|cookie|access[-_]?token|refresh[-_]?token)(?:[-_.]|$)/i,Qi=/^(Bearer|Basic|Digest|Token|Negotiate|NTLM|OAuth|Signature|Hawk|AWS4-HMAC-SHA256|SharedKey|SharedKeyLite|GoogleLogin)\s+(\S[\s\S]*)$/i;function wg($){return`sha256:${eI("sha256").update($,"utf8").digest("hex").slice(0,16)}`}function Yi($,I,Q){let K=Qi.exec(I);if(!K&&!Ji.test($))return;let J=$.toLowerCase();if(I==="")return{name:J,in:Q,empty:!0};if(K)return{name:J,in:Q,scheme:K[1],fp:wg(K[2])};return{name:J,in:Q,fp:wg(I)}}function ug($,I){let Q=[],K=new Set,J=(Z,G,D)=>{let v=Yi(Z,G,D);if(!v)return;let C=`${v.in}:${v.name}`;if(K.has(C))return;K.add(C),Q.push(v)};try{if(typeof $.forEach==="function")$.forEach((Z,G)=>J(G,Z,"header"));else for(let[Z,G]of Object.entries($))J(Z,String(G),"header")}catch{}try{if(I!==void 0){let Z=typeof I==="string"?new URL(I,"http://twin.invalid").search:I.search;for(let[G,D]of new URLSearchParams(Z))J(G,D,"query")}}catch{}return Q.sort((Z,G)=>Z.in===G.in?Z.name.localeCompare(G.name):Z.in.localeCompare(G.in))}function pq($=process.env){return $.VOLTER_TWIN_REQUEST_JOURNAL!=="0"}function mg($,I){return M4(_1(kJ($,I).events),"requests.jsonl")}function pg($,I,Q){if(!pq())return;try{let K=qI(),J=mg($,Q);if(K.mkdir(_1(J)),(K.stat(J)?.size??0)>=Ii)K.writeAtomic(`${J}.1`,K.read(J)??""),K.write(J,"");let G=JSON.stringify({at:I.at??new Date().toISOString(),method:I.method.toUpperCase(),path:I.path.split("?")[0],status:I.status,...typeof I.ms==="number"?{ms:I.ms}:{},...I.credentials?.length?{credentials:I.credentials}:{}});K.append(J,`${G}
|
|
446
446
|
`)}catch{}}var lg=Symbol.for("volter.twin.requestJournal.identity"),fg=Symbol.for("volter.twin.requestJournal.installed"),hq;function Gi(){return hq??=new Xi,hq}function Zi(){qg(($,I)=>{let Q=hq?.getStore();if(!Q||Q.identity!==void 0)return;Q.identity=I===void 0?{service:$}:{service:$,root:I}})}function Wi($=process.argv){let I=$.indexOf("--root"),Q=I>=0?$[I+1]:void 0;return Q&&!Q.startsWith("--")?Q:void 0}var Ki=new Set(["world-runtime","world-tooling","world-attach","world-browser-assets","world-host"]);function yg($){if(!$)return;let I=/(?:packages[\\/]twin[\\/]|@volter[\\/]twin-)([A-Za-z0-9_-]+)/g;for(let Q of $.matchAll(I)){let K=Q[1];if(!Ki.has(K))return K}return}function zi(){if(typeof window<"u"||typeof document<"u")return!1;let $=globalThis.Bun,I=$&&typeof $.serve==="function"?$.serve:void 0;if(I&&I[fg])return!0;if(Zi(),kg((K)=>bg(K,yg(Error().stack))),!I)return!1;let Q=function(J,...Z){let G=J;if(!G||typeof G.fetch!=="function")return I.apply(this,[J,...Z]);let D=G[lg]?void 0:yg(Error().stack);return I.apply(this,[{...G,fetch:bg(G,D)},...Z])};return Object.defineProperty(Q,fg,{value:!0}),$.serve=Q,!0}function bg($,I){if($.twinRequestJournal===!1)return $.fetch;{let K=$[lg],J=$.fetch;return async function(G,D){if(!pq()||new URL(G.url).pathname===bq)return J.call(this,G,D);let v={},C=500,B=Date.now();try{let O=await Gi().run(v,()=>J.call(this,G,D));if(O instanceof Response)C=O.status;else if(O===void 0)return O;return O}finally{K??=v.identity;let O=K??Hi(I);if(O){let N=new URL(G.url);pg(O.service,{method:G.method,path:N.pathname,status:C,ms:Date.now()-B,credentials:ug(G.headers,N)},O.root)}}}}}function Hi($){let I=process.env.VOLTER_TWIN_JOURNAL_SERVICE||$;if(!I||!/^[A-Za-z0-9_-]+$/.test(I))return;let Q=Wi();return Q===void 0?{service:I}:{service:I,root:Q}}zi();wU();var HU$=Symbol("absent");wU();var{closeSync:qi,existsSync:B5,mkdirSync:Bi,openSync:ji,readdirSync:Ni,readFileSync:Ei,readSync:vi,renameSync:Si,rmSync:Ux,statSync:oq,writeFileSync:ki}=(()=>({}));wU();var{closeSync:nq,constants:y9,fstatSync:rg,ftruncateSync:Vi,linkSync:Ai,lstatSync:dq,mkdirSync:Ti,openSync:iq,readFileSync:Pi,readSync:ng,rmSync:Ri,writeFileSync:_i}=(()=>({}));var tg=131072,ag=32,sg=4;function eg($){return $.isFile()&&$.nlink===1&&(!process.getuid||$.uid===process.getuid())&&($.mode&63)===0}function ig($){try{let I=dq($);return I.isDirectory()&&(I.mode&63)===0&&(!process.getuid||I.uid===process.getuid())}catch{return!1}}function og($){let I;try{I=iq($,y9.O_RDONLY|y9.O_NONBLOCK|(y9.O_NOFOLLOW??0));let Q=rg(I);if(!eg(Q)||Q.size>tg)return{};let K=JSON.parse(Pi(I,"utf8"));if(!K||typeof K!=="object"||Array.isArray(K))return{};let J={};for(let[Z,G]of Object.entries(K).slice(-ag)){if(!/^\d+:[a-f0-9]{64}$/.test(Z)||!Array.isArray(G))continue;J[Z]=G.filter((D)=>typeof D==="string"&&D.length<=4096&&O9(D)).slice(0,sg)}return J}catch{return{}}finally{if(I!==void 0)nq(I)}}function Ci($,I){let Q=iq($,"r");try{let K=eI("sha256"),J=Buffer.allocUnsafe(65536),Z=I;while(Z>0){let G=ng(Q,J,0,Math.min(J.length,Z),null);if(!G)return null;K.update(J.subarray(0,G)),Z-=G}if(ng(Q,J,0,1,null))return null;return K.digest("hex")}finally{nq(Q)}}function $x($,I,Q){let K=M4($,`${Q.slice(0,2)}.json`),J=`${I}:${Q}`;return{reuse(Z,G){if(!ig($))return!1;for(let D of og(K)[J]??[]){try{let v=dq(D);if(!v.isFile()||v.dev!==I||v.size!==G||process.getuid&&v.uid!==process.getuid())continue;Ai(D,Z);let C=dq(Z);if(C.isFile()&&C.dev===I&&C.size===G&&(!process.getuid||C.uid===process.getuid())&&Ci(Z,G)===Q)return!0}catch{}Ri(Z,{force:!0})}return!1},record(Z){try{let G=J2(Z);if(G.length>4096)return;let D=og(K),v=[G,...(D[J]??[]).filter((O)=>O!==G)].slice(0,sg);delete D[J],D[J]=v;let C=JSON.stringify(D);while(Object.keys(D).length>ag||Buffer.byteLength(C)>tg)delete D[Object.keys(D)[0]],C=JSON.stringify(D);if(Ti($,{recursive:!0,mode:448}),!ig($))return;let B=iq(K,y9.O_WRONLY|y9.O_CREAT|y9.O_NONBLOCK|(y9.O_NOFOLLOW??0),384);try{if(!eg(rg(B)))return;Vi(B,0),_i(B,C)}finally{nq(B)}}catch{}}}}class rq{options;constructor($={}){this.options=$}async get($){if(!B5($))return null;return new Uint8Array(Ei($))}async put($,I){Bi(_1($),{recursive:!0});let Q=`${$}.tmp.${Gz()}`,K;try{if(this.options.sharedIndexRoot!==!1)try{K=$x(this.options.sharedIndexRoot??M4(TF(),"blob-index-v1"),oq(_1($)).dev,tq(I))}catch{}if(!K?.reuse(Q,I.byteLength))ki(Q,I,{flag:"wx"});Si(Q,$),K?.record($)}finally{Ux(Q,{force:!0})}}async exists($){return B5($)}async remove($){Ux($,{force:!0,recursive:$.endsWith("/")})}async list($){let I=[],Q=(K)=>{if(!B5(K))return;for(let J of Ni(K,{withFileTypes:!0})){let Z=M4(K,J.name);if(J.isDirectory())Q(Z);else if(!J.name.includes(".tmp."))I.push(Z)}};return Q($.replace(/\/$/,"")),I.sort()}async size($){if(!B5($))return null;return oq($).size}async getRange($,I,Q){if(!B5($))return null;let K=oq($).size,J=Math.max(0,I),Z=Math.min(Q,K-1);if(Z<J)return new Uint8Array(0);let G=new Uint8Array(Z-J+1),D=ji($,"r"),v=0;try{while(v<G.length){let C=vi(D,G,v,G.length-v,J+v);if(C===0)break;v+=C}}finally{qi(D)}return v===G.length?G:G.subarray(0,v)}}function tq($){return eI("sha256").update($).digest("hex")}var vU$=new rq;IB();var kU$=new RegExp("^(?:(?: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])$"),gU$=new RegExp("^(?:(?:(?:[0-9a-fA-F]{1,4}):){7}(?:(?:[0-9a-fA-F]{1,4})|:)|(?:(?:[0-9a-fA-F]{1,4}):){6}(?:(?:(?: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-9a-fA-F]{1,4})|:)|(?:(?:[0-9a-fA-F]{1,4}):){5}(?::(?:(?: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-9a-fA-F]{1,4})){1,2}|:)|(?:(?:[0-9a-fA-F]{1,4}):){4}(?:(?::(?:[0-9a-fA-F]{1,4})){0,1}:(?:(?: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-9a-fA-F]{1,4})){1,3}|:)|(?:(?:[0-9a-fA-F]{1,4}):){3}(?:(?::(?:[0-9a-fA-F]{1,4})){0,2}:(?:(?: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-9a-fA-F]{1,4})){1,4}|:)|(?:(?:[0-9a-fA-F]{1,4}):){2}(?:(?::(?:[0-9a-fA-F]{1,4})){0,3}:(?:(?: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-9a-fA-F]{1,4})){1,5}|:)|(?:(?:[0-9a-fA-F]{1,4}):){1}(?:(?::(?:[0-9a-fA-F]{1,4})){0,4}:(?:(?: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-9a-fA-F]{1,4})){1,6}|:)|(?::(?:(?::(?:[0-9a-fA-F]{1,4})){0,5}:(?:(?: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-9a-fA-F]{1,4})){1,7}|:)))(?:%[0-9a-zA-Z-.:]{1,})?$");wU();var{existsSync:W1$,readFileSync:K1$,statSync:z1$}=(()=>({}));class Ao{buf=new Uint8Array(65536);len=0;push($){if(this.len===this.buf.length){let I=new Uint8Array(this.buf.length*2);I.set(this.buf),this.buf=I}this.buf[this.len++]=$}copy($,I){if($>this.len)throw Error("inflate: distance too far back");for(let Q=0;Q<I;Q++)this.push(this.buf[this.len-$])}bytes(){return this.buf.slice(0,this.len)}}var k1$="0".repeat(40),g1$=new Uint8Array([48,48,48,48]);var{AsyncLocalStorage:n1$}=(()=>({}));var{AsyncLocalStorage:s1$}=(()=>({}));var{existsSync:UX$,readFileSync:XX$,statSync:IX$}=(()=>({}));var{existsSync:YX$,readFileSync:GX$}=(()=>({}));var{existsSync:KX$}=(()=>({}));wU();wU();var so=y1(uZ(),1);var ho=y1(jx(),1),uo=y1(Nx(),1),TO,YB;TO=ho,YB=uo;var{version:mo,renderToString:po,renderToStaticMarkup:Ex}=TO,lo=YB.renderToReadableStream,co=YB.resume;var io=y1(N5(),1);var oo={"user.info.basic":{label:"Read a user's profile info (open id, avatar, display name...)",product:"user"},"user.info.profile":{label:"Read access to profile_web_link, profile_deep_link, bio_description, is_verified",product:"user"},"user.info.stats":{label:"Read your engagement metrics: follower count, following count, likes count and video count",product:"user"},"video.list":{label:"Read a user's public videos on TikTok",product:"video"},"video.upload":{label:"Share videos to your account as drafts, for you to edit before posting",product:"video"},"video.publish":{label:"Directly post content to a user's TikTok profile",product:"video"},"portability.activity.ongoing":{label:"Export your activity data on an ongoing basis",product:"portability"},"portability.activity.single":{label:"Export your activity data once",product:"portability"},"portability.all.ongoing":{label:"Export your complete data archive on an ongoing basis",product:"portability"},"portability.all.single":{label:"Export your complete data archive once",product:"portability"},"portability.directmessages.ongoing":{label:"Export your direct messages on an ongoing basis",product:"portability"},"portability.directmessages.single":{label:"Export your direct messages once",product:"portability"},"portability.postsandprofile.ongoing":{label:"Export your posts and profile data on an ongoing basis",product:"portability"},"portability.postsandprofile.single":{label:"Export your posts and profile data once",product:"portability"},"research.data.basic":{label:"Access public data for research purposes",product:"research"},"research.data.u18eu":{label:"Access data of European users under 18 for research purposes",product:"research"},"research.data.vra":{label:"Access vetted-researcher provisioned data",product:"research"},"research.adlib.basic":{label:"Access commercial content data for research purposes",product:"research"},"local.product.manage":{label:"Manage the products of your local services account",product:"local"},"local.shop.manage":{label:"Manage the shops of your local services account",product:"local"},"local.voucher.manage":{label:"Manage the vouchers of your local services account",product:"local"}},ro=Object.keys(oo);var BG$=`
|
|
447
447
|
:root { color-scheme: light dark; }
|
|
448
448
|
* { box-sizing: border-box; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/twin-tiktok",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "Local TikTok twin — the real tiktok.com authorization page, the full Login Kit OAuth round trip (token, refresh, revoke, client_credentials) and the Display API user/video reads with TikTok's own comma-separated scopes, per-app open_id, field-level scope gating and both of its error envelopes, so an unmodified TikTok integration completes sign-in-with-TikTok against it. Built on @volter/world-core.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"twin",
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
"react-dom": "^19.2.7"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@volter/world-core": "2.0.
|
|
60
|
+
"@volter/world-core": "2.0.19"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/bun": "^1.2.20",
|
|
64
64
|
"@types/node": "^24.0.0",
|
|
65
65
|
"@types/react": "^19.2.17",
|
|
66
66
|
"@types/react-dom": "^19.2.3",
|
|
67
|
-
"@volter/world-core": "2.0.
|
|
67
|
+
"@volter/world-core": "2.0.19",
|
|
68
68
|
"@volter/world-tooling": "0.1.0",
|
|
69
69
|
"typescript": "^5.9.0"
|
|
70
70
|
},
|