PageSourceSearch

https://cdn.pixai.art/artifacts/app-1.0.2605/assets/vendor-validation-B2yIaCOz.js

js pixai.art collected 2026-10-01 12:36:33 UTC 98,820 bytes, 52 lines download raw bytes

1(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=(function(r){for(var n=1;n<arguments.length;n++){var o=arguments[n];if(o!=null)for(var i in o)o.hasOwnProperty(i)&&(r[i]=o[i])}return r})({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:pixai-web-app-key":!0});var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="32a20ccf-18b2-4f69-a9c1-11766de974e0",e._sentryDebugIdIdentifier="sentry-dbid-32a20ccf-18b2-4f69-a9c1-11766de974e0")}catch{}})();function Et(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,n])=>t.indexOf(+r)===-1).map(([r,n])=>n)}function rt(e,t="|"){return e.map(r=>jt(r)).join(t)}function Ie(e,t){return typeof t=="bigint"?t.toString():t}function me(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}throw new Error("cached value already set")}}}function Nt(e){return e==null}function Me(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Jr(e,t){const r=e/t,n=Math.round(r),o=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-n)<o?0:r-n}function I(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function U(...e){const t={};for(const r of e)Object.assign(t,Object.getOwnPropertyDescriptors(r));return Object.defineProperties({},t)}function Lr(e){return JSON.stringify(e)}function Vr(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Tt="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ee(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Br=me(()=>{if(T.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch{return!1}});function W(e){if(ee(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(ee(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function At(e){return W(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Kr=new Set(["string","number","symbol"]);function G(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function M(e,t,r){const n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}function m(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function jt(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Wr(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var Gr={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Yr(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");return M(e,U(e._zod.def,{get shape(){const o={};for(const i of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(r.shape,i))throw new Error(`Unrecognized key: "${String(i)}"`);t[i]&&I(o,i,r.shape[i])}return I(this,"shape",o),o},checks:[]}))}function qr(e,t){const r=e._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");return M(e,U(e._zod.def,{get shape(){const o={...e._zod.def.shape};for(const i of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(r.shape,i))throw new Error(`Unrecognized key: "${String(i)}"`);t[i]&&delete o[i]}return I(this,"shape",o),o},checks:[]}))}function Xr(e,t){if(!W(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const n=e._zod.def.shape;for(const o of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,o)!==void 0)throw new Error("Cannot over
1write keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return M(e,U(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t};return I(this,"shape",n),n}}))}function Hr(e,t){if(!W(t))throw new Error("Invalid input to safeExtend: expected a plain object");return M(e,U(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return I(this,"shape",r),r}}))}function Qr(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");return M(e,U(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return I(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function nt(e,t,r,n="partial"){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(`.${n}() cannot be used on object schemas containing refinements`);return M(t,U(t._zod.def,{get shape(){const i=t._zod.def.shape,s={...i};if(r)for(const a of Reflect.ownKeys(r)){if(!Object.prototype.hasOwnProperty.call(i,a))throw new Error(`Unrecognized key: "${String(a)}"`);r[a]&&(s[a]=e?new e({type:"optional",innerType:i[a]}):i[a])}else for(const a of Reflect.ownKeys(i))s[a]=e?new e({type:"optional",innerType:i[a]}):i[a];return I(this,"shape",s),s},checks:[]}))}function en(e,t,r){return M(t,U(t._zod.def,{get shape(){const n=t._zod.def.shape,o={...n};if(r)for(const i of Reflect.ownKeys(r)){if(!Object.prototype.hasOwnProperty.call(o,i))throw new Error(`Unrecognized key: "${String(i)}"`);r[i]&&(o[i]=new e({type:"nonoptional",innerType:n[i]}))}else for(const i of Reflect.ownKeys(n))o[i]=new e({type:"nonoptional",innerType:n[i]});return I(this,"shape",o),o}}))}function L(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function tn(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function V(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function X(e){return typeof e=="string"?e:e?.message}function ot(e,t,r){var n;for(let o=t;o<e.length;o++)(n=e[o]).schema??(n.schema=r)}function F(e,t,r){var n;const o=e.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(n=e).schema??(n.schema=e.inst):e.schema=e.inst);const i=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,s=e.message?e.message:X(e.inst?._zod.def?.error?.(e))??X(i?.(e))??X(t?.error?.(e))??X(r.customError?.(e))??X(r.localeError?.(e))??"Invalid input",{inst:a,schema:u,continue:c,input:f,...p}=e;return p.path??(p.path=[]),p.message=s,t?.reportInput&&(p.input=f),p}function Dt(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var rn=/[\uD800-\uDBFF]/;function xe(e){const t=e.length;if(!rn.test(e))return t;let r=t;for(let n=0;n<t-1;n++)(e.charCodeAt(n)&64512)===55296&&(e.charCodeAt(n+1)&64512)===56320&&(r--,n++);return r}function Je(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function nn(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function te(...e){const[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}function on(e,t){for(const r in t){const n=Object.getOwnPropertyDescriptor(t,r);n.get?Object.defineProperty(e,r,{...n,enumerable:!1}):sn(e,r,n.value)}}function Y(e,t,r,n=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:n,value:r}),r}function Rt(e,t,r){return Y(e,t,r,!1)}function sn(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:Y(this,t,r.bind(this))},set(n){Y(this,t,n)}})}function an(e,t){const r=Object.getPrototypeOf(e);return t in r?void 0:r}var ke,C=!1,un={configurable:!0,get(){C=!0}};function g(e,t,r){const n=Object.getPrototypeOf(e._zod);if(t in n&&ke!==e._zod){ke=void 0;return}ke=e._zod,Object.defineProperty(n,t,{configurable:!0,get(){Object.defineProperty(this,t,un);const o=C;C=!1;try{const i=r(this);return C?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:i}),C=C||o,i}catch(i){throw delete this[t],C=C||o,i}},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o})}})}function cn(e,t,r,n){const o=an(e,t);o&&Object.defineProperty(o,t,{configurable:!0,get(){const i={configurable:!0,writable:!0,enumerable:n,value:void 0};
1return Object.defineProperty(this,t,i),i.value=r(this),Object.defineProperty(this,t,i),i.value},set(i){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:n,value:i})}})}var fn="~constantCatch";function ln(e){const t=()=>e;return t[fn]=!0,t}var it,zu=Object.freeze({status:"aborted"}),$e={value:void 0,enumerable:!1},st="captureStackTrace"in Error?Error:null;function dn(e){const t=st;if(t){const r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0}catch{return st=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function l(e,t,r,n){const o={};function i(d){this.def=d,this.constr=p,this.traits=new Set}i.prototype=o;const s=r,a=s&&new WeakSet;function u(d,h){if(!d._zod){$e.value=new i(h);try{Object.defineProperty(d,"_zod",$e)}finally{$e.value=void 0}}if(d._zod.traits.has(e))return;if(d._zod.traits.add(e),t(d,h),a){const _=Object.getPrototypeOf(d),z=d._zod.constr.prototype;let E=_;for(;E&&E!==z;)E=Object.getPrototypeOf(E);const R=E??_;a.has(R)||(a.add(R),on(R,s))}const v=p.prototype;for(const _ in v)Object.prototype.hasOwnProperty.call(v,_)&&(_ in d||(d[_]=v[_].bind(d)))}const c=n?.Parent??Object;class f extends c{}Object.defineProperty(f,"name",{value:e});function p(d){const h=n?.Parent?dn(f):this;u(h,d);const v=h._zod.deferred;
1if(v){for(const z of v)z();h._zod.deferred=void 0}const _=globalThis.__zod_globalConfig?.postProcessor;return _&&_(h),h}return Object.defineProperty(p,"init",{value:u}),Object.defineProperty(p,Symbol.hasInstance,{value:d=>n?.Parent&&d instanceof n.Parent?!0:d?._zod?.traits?.has(e)}),Object.defineProperty(p,"name",{value:e}),p}var K=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ct=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}};(it=globalThis).__zod_globalConfig??(it.__zod_globalConfig={});var T=globalThis.__zod_globalConfig;function D(e){return e&&Object.assign(T,e),T}function pn(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Ie,2)),e.message}function hn(e){this._zod.message=e}var mn={get:pn,set:hn,enumerable:!0,configurable:!0},Oe={value:void 0,enumerable:!1},Ze={value:void 0,enumerable:!1},at=new WeakSet([Object.prototype,Error.prototype]),Ft=(e,t)=>{e.name="$ZodError",Oe.value=e._zod,Object.defineProperty(e,"_zod",Oe),Ze.value=t,Object.defineProperty(e,"issues",Ze),Oe.value=void 0,Ze.value=void 0,Object.defineProperty(e,"message",mn);const r=Object.getPrototypeOf(e);at.has(r)||(at.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){const n=()=>this.message;return Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,"toString",{value:n,configurable:!0,writable:!0})}}))},Ut=l("$ZodError",Ft),Mt=l("$ZodError",Ft,void 0,{Parent:Error});function vn(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0}):e[t]=r()),e[t]}function _n(e,t=r=>r.message){const r={},n=[];for(const o of e.issues)o.path.length>0?vn(r,o.path[0],()=>[]).push(t(o)):n.push(t(o));return{formErrors:n,fieldErrors:r}}function gn(e,t=r=>r.message){const r={_errors:[]},n=(o,i=[])=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>n({issues:a},[...i,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...i,...s.path]);else{const a=[...i,...s.path];if(a.length===0)r._errors.push(t(s));else{let u=r,c=0;for(;c<a.length;){const f=a[c],p=c===a.length-1;if(f==="_errors"){p&&u._errors.push(t(s)),c++;continue}Object.prototype.hasOwnProperty.call(u,f)||Object.defineProperty(u,f,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const d=u[f];p&&d._errors.push(t(s)),u=d,c++}}}};return n(e),r}function ve(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Le=e=>{const t=(r,n,o,i)=>{const s=o?{...o,async:!1}:{async:!1},a=r._zod.run({value:n,issues:[]},s);if(a instanceof Promise)throw new K;if(a.issues.length){const u=new(i?.Err??e)(a.issues.map(c=>F(c,s,D())));throw Tt(u,i?.callee??t),u}return a.value};return t},Ve=e=>{const t=async(r,n,o,i)=>{const s=o?{...o,async:!0}:{async:!0};let a=r._zod.run({value:n,issues:[]},s);if(a instanceof Promise&&(a=await a),a.issues.length){const u=new(i?.Err??e)(a.issues.map(c=>F(c,s,D())));throw Tt(u,i?.callee??t),u}return a.value};return t},_e=e=>(t,r,n)=>{const o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new K;return i.issues.length?{success:!1,error:new(e??Ut)(i.issues.map(s=>F(s,o,D())))}:{success:!0,data:i.value}},bn=_e(Mt),ge=e=>async(t,r,n)=>{const o=n?{...n,async:!0}:{async:!0};let i=t._zod.run({value:r,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>F(s,o,D())))}:{success:!0,data:i.value}},yn=ge(Mt),zn=e=>{const t=Le(e),r=(n,o,i,s)=>t(n,o,i?{...i,direction:"backward"}:{direction:"backward"},ve(r,s));return r},wn=e=>{const t=Le(e),r=(n,o,i,s)=>t(n,o,i,ve(r,s));return r},kn=e=>{const t=Ve(e),r=async(n,o,i,s)=>await t(n,o,i?{...i,direction:"backward"}:{direction:"backward"},ve(r,s));return r},$n=e=>{const t=Ve(e),r=async(n,o,i,s)=>await t(n,o,i,ve(r,s));return r},On=e=>(t,r,n)=>{const o=n?{...n,direction:"backward"}:{direction:"backward"};return _e(e)(t,r,o)}
1,Zn=e=>(t,r,n)=>_e(e)(t,r,n),Sn=e=>async(t,r,n)=>{const o=n?{...n,direction:"backward"}:{direction:"backward"};return ge(e)(t,r,o)},In=e=>async(t,r,n)=>ge(e)(t,r,n),Pn=/^[cC][0-9a-z]{6,}$/,En=/^[0-9a-z]+$/,Nn=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Tn=/^[0-9a-vA-V]{20}$/,An=/^[A-Za-z0-9]{27}$/,jn=/^[a-zA-Z0-9_-]{21}$/;function Dn(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Rn=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Cn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ut=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Fn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Un="^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Mn(){return new RegExp(Un,"u")}var xn=/^(?:(?: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])$/,Jn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Ln=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Vn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Bn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,xt=/^[A-Za-z0-9_-]*$/,Kn=/^https?$/,Wn=/^\+[1-9]\d{6,14}$/,Jt="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function Gn(e){return new RegExp(`^${e}$`)}var Yn=Gn(Jt);function Pe(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function qn(e){return new RegExp(`^${Pe(e)}$`)}function Xn(e){const t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${Pe({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,n=e.local?`${r}|${Pe({precision:e.precision})}`:r;return new RegExp(`^${Jt}T(?:${n})$`)}var Hn=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Qn=/^-?\d+n?$/,Lt=/^-?\d+$/,Be=/^-?\d+(?:\.\d+)?$/,eo=/^(?:true|false)$/i,to=/^null$/i,ro=/^[^A-Z]*$/,no=/^[^a-z]*$/,Z=l("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Vt=e=>{const t=e.value;return!Nt(t)&&t.size!==void 0},Ke=e=>{const t=e.value;return!Nt(t)&&t.length!==void 0},ue={number:"number",bigint:"bigint",object:"date"},Bt=l("$ZodCheckLessThan",(e,t)=>{Z.init(e,t);const r=ue[typeof t.value];e._zod.onattach.push(n=>{const o=n._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:ue[typeof n.value]??r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Kt=l("$ZodCheckGreaterThan",(e,t)=>{Z.init(e,t);const r=ue[typeof t.value];e._zod.onattach.push(n=>
vendor: 5,338 bytes, line 1
1{const o=n._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:ue[typeof n.value]??r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),oo=l("$ZodCheckMultipleOf",(e,t)=>{Z.init(e,t),e._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):Jr(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),io=l("$ZodCheckNumberFormat",(e,t)=>{Z.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),n=r?"int":"number",[o,i]=Gr[t.format];e._zod.onattach.push(s=>{const a=s._zod.bag;a.format=t.format,a.minimum=o,a.maximum=i,r&&(a.pattern=Lt)}),e._zod.check=s=>{const a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}a<o&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),so=l("$ZodCheckMaxSize",(e,t)=>{var r;Z.init(e,t),(r=e._zod.def).when??(r.when=Vt),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;o.size<=t.maximum||n.issues.push({origin:Dt(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),ao=l("$ZodCheckMinSize",(e,t)=>{var r;Z.init(e,t),(r=e._zod.def).when??(r.when=Vt),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;o.size>=t.minimum||n.issues.push({origin:Dt(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),uo=l("$ZodCheckMaxLength",(e,t)=>{var r;Z.init(e,t),(r=e._zod.def).when??(r.when=Ke),e._zod.onattach.push(n=>{const o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value,i=o.length;if((typeof o=="string"&&i>t.maximum?xe(o):i)<=t.maximum)return;const s=Je(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),co=l("$ZodCheckMinLength",(e,t)=>{var r;Z.init(e,t),(r=e._zod.def).when??(r.when=Ke),e._zod.onattach.push(n=>{const o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value,i=o.length;if((typeof o=="string"&&i>=t.minimum&&i<t.minimum*2?xe(o):i)>=t.minimum)return;const s=Je(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),fo=l("$ZodCheckLengthEquals",(e,t)=>{var r;Z.init(e,t),(r=e._zod.def).when??(r.when=Ke),e._zod.onattach.push(n=>{const o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=n=>{const o=n.value,i=o.length,s=typeof o=="string"&&i>=t.length&&i<=t.length*2?xe(o):i;if(s===t.length)return;const a=Je(o),u=s>t.length;n.issues.push({origin:a,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),be=l("$ZodCheckStringFormat",(e,t)=>{var r,n;Z.init(e,t),e._zod.onattach.push(o=>{const i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),lo=l("$ZodCheckRegex",(e,t)=>{be.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),po=l("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ro),be.init(e,t)}),ho=l("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=no),be.init(e,t)}),mo=l("$ZodCheckIncludes",(e,t)=>{Z.init(e,t);const r=G(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position},}${r}`:r);t.pattern=n,e._zod.onattach.push(o=>{const i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input
1:o.value,inst:e,continue:!t.abort})}}),vo=l("$ZodCheckStartsWith",(e,t)=>{Z.init(e,t);const r=new RegExp(`^${G(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),_o=l("$ZodCheckEndsWith",(e,t)=>{Z.init(e,t);const r=new RegExp(`.*${G(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(n=>{const o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),go=l("$ZodCheckMimeType",(e,t)=>{Z.init(e,t);const r=new Set(t.mime);e._zod.onattach.push(n=>{n._zod.bag.mime=t.mime}),e._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e,continue:!t.abort})}}),bo=l("$ZodCheckOverwrite",(e,t)=>{Z.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}}),yo=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const t=e.split(`
2`).filter(o=>o),r=Math.min(...t.map(o=>o.length-o.trimStart().length)),n=t.map(o=>o.slice(r)).map(o=>" ".repeat(this.indent*2)+o);for(const o of n)this.content.push(o)}compile(){const e=Function,t=this?.content??[""];return new e(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
3${t.join(`
4`)}
5};`)(...Object.values(this.closed))}},zo={major:4,minor:5,patch:4},b=l("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=zo;const n=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...n??[]]:n?.length?[...n]:[];for(const i of o)for(const s of i._zod.onattach)s(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const i=(a,u,c)=>{if(a.memo)return a;let f=L(a),p;for(const d of u){if(d._zod.def.when){if(tn(a)||!d._zod.def.when(a))continue}else if(f)continue;const h=a.issues.length,v=d._zod.check(a);if(v instanceof Promise&&c?.async===!1)throw new K;if(p||v instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await v,a.issues.length!==h&&(ot(a.issues,h,e),f||(f=L(a,h)))});else{if(a.issues.length===h)continue;ot(a.issues,h,e),f||(f=L(a,h))}}return p?p.then(()=>a):a},s=(a,u,c)=>{if(L(a))return a.aborted=!0,a;const f=i(u,o,c);if(f instanceof Promise){if(c.async===!1)throw new K;return f.then(p=>e._zod.parse(p,c))}return e._zod.parse(f,c)};e._zod.run=(a,u)=>{if(u.skipChecks)return e._zod.parse(a,u);if(u.direction==="backward"){const f=e._zod.parse({value:a.value,issues:[]},{...u,skipChecks:!0});return f instanceof Promise?f.then(p=>s(p,a,u)):s(f,a,u)}const c=e._zod.parse(a,u);if(c instanceof Promise){if(u.async===!1)throw new K;return c.then(f=>i(f,o,u))}return i(c,o,u)}}},{get"~standard"(){return Rt(this,"~standard",Wt(this))},set"~standard"(e){Y(this,"~standard",e)}}),ct=e=>e.success?{value:e.data}:{issues:e.error?.issues};function Wt(e){return{validate:t=>{try{return ct(bn(e,t))}catch{return yn(e,t).then(ct)}},vendor:"zod",version:1}}var ye=l("$ZodString",(e,t)=>{b.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Hn(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),k=l("$ZodStringFormat",(e,t)=>{be.init(e,t),ye.init(e,t)}),wo=l("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Cn),k.init(e,t)}),ko=l("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=ut(r))}else t.pattern??(t.pattern=ut());k.init(e,t)}),$o=l("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Fn),k.init(e,t)});function Oo(e,t){if(!t.normalize&&t.protocol?.source===Kn.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}var Zo=/[\t\n\r]/g;function So(e){return e.replace(Zo,"")}function Io(e,t){return t.lastIndex=0,t.test(e.hostname)}function Po(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var Eo=l("$ZodURL",(e,t)=>{k.init(e,t),e._zod.check=r=>{try{const n=r.value.trim(),o=Oo(n,t);
vendor: 6,797 bytes, line 5
5if(o===1){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(o===2){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}t.hostname&&!Io(o,t.hostname)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&!Po(o,t.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?o.href:So(n);return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),No=l("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Mn()),k.init(e,t)}),To=l("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?jn:Dn(t.length)),k.init(e,t)}),Ao=l("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Pn),k.init(e,t)}),jo=l("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=En),k.init(e,t)}),Do=l("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Nn),k.init(e,t)}),Ro=l("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Tn),k.init(e,t)}),Co=l("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=An),k.init(e,t)}),Fo=l("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Xn(t)),k.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(r=>{r._zod.bag.laxFormat=!0}))}),Uo=l("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Yn),k.init(e,t)}),Mo=l("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=qn(t)),k.init(e,t)}),xo=l("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Rn),k.init(e,t)}),Jo=l("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=xn),k.init(e,t),e._zod.bag.format="ipv4"}),Lo=/^[0-9a-fA-F:.]+$/;function Gt(e){if(!Lo.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}var Vo=l("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Jn),k.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{Gt(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),Bo=l("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Ln),k.init(e,t)});function Ko(e){const t=e.split("/");if(t.length!==2)return!1;const[r,n]=t;if(!n)return!1;const o=Number(n);return`${o}`!==n||o<0||o>128?!1:Gt(r)}var Wo=l("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Vn),k.init(e,t),e._zod.check=r=>{Ko(r.value)||r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function Yt(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Go=l("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Bn),k.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Yt(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Yo(e){if(!xt.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/");return Yt(t.padEnd(Math.ceil(t.length/4)*4,"="))}var qo=l("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=xt),k.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{Yo(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Xo=l("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Wn),k.init(e,t)});function Ho(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[n]=r;if(!n)return!1;const o=JSON.parse(atob(n));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}var Qo=l("$ZodJWT",(e,t)=>{k.init(e,t),e._zod.check=r=>{Ho(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),qt=l("$ZodNumber",(e,t)=>{b.init(e,t),e._zod.pattern=e._zod.bag.pattern??Be,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;const i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),ei=l("$ZodNumberFormat",(e,t)=>{io.init(e,t),qt.init(e,t)}),Xt=l("$ZodBoolean",(e,t)=>{b.init(e,t),e._zod.pattern=eo,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}const o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),ti=l("$ZodBigInt",(e,t)=>{b.init(e,t),e._zod.pattern=Qn,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),ri=l("$ZodNull",(e,t)=>{b.init(e,t),e._zod.pattern=to,e._zod.values=new Set([null]),e._zod.parse=(r,n)=>{const o=r.value;return o===null||r.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),r}}),ni=l("$ZodAny",(e,t)=>{b.init(e,t),e._zod.parse=r=>r}),oi=l("$ZodUnknown",(e,t)=>{b.init(e,t),e._zod.parse=r=>r}),ii=l("$ZodNever",(e,t)=>{b.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),si=l("$ZodVoid",(e,t)=>{b.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),ai=l("$ZodDate",(e,t)=>{b.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}const o=r.value,i=o instanceof Date;return i&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...i?{received:"Invalid Date"}:{},inst:e}),r}});function ft(e,t,r){e.issues.length&&t.issues.push(...V(r,e.issues)),t.value[r]=e.value}var ui=l("$ZodArray",(e,t)=>{b.init(e,t);const r=T.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=r?r.alloc(e,n,Array(i.length),o):Array(i.length);const s=[];for(let a=0;a<i.length;a++){const u=i[a],c=t.element._zod.run({value:u,issues:[]},o);c instanceof Promise?s.push(c.then(f=>ft(f,n,a))):ft(c,n,a)}return s.length?Promise.all(s).then(()=>n):n}});function ce(e,t,r,n,o,i){const s=r in n,a=i==="optional";if(!(!s&&a&&o==="optional")){if(e.issues.length){if(o!==void 0&&a&&!s)return;t.issues.push(...V(r,e.issues))}if(!s&&o===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?s&&(t.value[r]=void 0):t.value[r]=e.value}}var ci=[];function Ht(e){const t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),n=r.length?r:ci,o=n.length?[...t,...n]:t;for(const s of o)if(!e.shape?.[s]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(s)}": expected a Zod schema`);const i=Wr(e.shape);
5return{...e,allKeys:o,symbolKeys:n,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(i)}}function Qt(e,t,r,n,o,i){const s=[],a=o.keySet,u=o.catchall._zod,c=u.def.type,f=u.optin,p=u.optout;for(const d in t){if(a.has(d))continue;if(d==="__proto__"){c==="never"&&s.push(d);continue}if(c==="never"){s.push(d);continue}const h=u.run({value:t[d],issues:[]},n);h instanceof Promise?e.push(h.then(v=>ce(v,r,d,t,f,p))):ce(h,r,d,t,f,p)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i,continue:!0}),e.length?Promise.all(e).then(()=>r):r}var Ee=new WeakMap,fi=l("$ZodObject",(e,t)=>{if(b.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const a=t.shape;Ee.set(t,a),Object.defineProperty(t,"shape",{get:()=>{const u={...a};return Object.defineProperty(t,"shape",{value:u}),Ee.set(t,u),u}})}const r=me(()=>Ht(t));g(e,"propValues",a=>{const u=a.def.shape,c={};for(const f in u){const p=u[f]._zod;if(p.values){Object.prototype.hasOwnProperty.call(c,f)||I(c,f,new Set);for(const d of p.values)c[f].add(d);p.optin!==void 0&&c[f].add(void 0)}}return c});const n=ee,o=t.catchall;let i;const s=T.memoizer;s?.attach(e),e._zod.parse=(a,u)=>{i??(i=r.value);const c=a.value;if(!n(c))return a.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),a;a.value=s?s.alloc(e,a,{},u):{};const f=[],p=i.shape;for(const d of i.allKeys){if(d==="__proto__")continue;const h=p[d],v=h._zod.optin,_=h._zod.optout,z=h._zod.run({value:c[d],issues:[]},u);z instanceof Promise?f.push(z.then(E=>ce(E,a,d,c,v,_))):ce(z,a,d,c,v,_)}return o?Qt(f,c,a,u,r.value,e):f.length?Promise.all(f).then(()=>a):a}}),li=l("$ZodObjectJIT",(e,t)=>{fi.init(e,t);const r=e._zod.parse,n=me(()=>Ht(t)),o=T.memoizer,i=h=>{const v=n.value,_=v.symbolKeys,z=new yo(["payload","ctx"],{shape:h,inst:e,memo:o,syms:_}),E=P=>`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`,R=(P,w)=>`
6          for (let i = 0; i < ${P}.issues.length; i++) {
7            const iss = ${P}.issues[i];
8            iss.path = iss.path ? [${w}, ...iss.path] : [${w}];
9            payload.issues.push(iss);
10          }`;z.write("const input = payload.value;");const He=Object.create(null);let Ur=0;for(const P of v.allKeys)He[P]=`key_${Ur++}`;z.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const P of v.allKeys){if(P==="__proto__")continue;const w=He[P],j=typeof P=="symbol"?`syms[${_.indexOf(P)}]`:Lr(P),we=`${j} in input`,Qe=h[P],et=Qe?._zod?.optin,tt=et!==void 0,Mr=Qe?._zod?.optout==="optional";if(z.write(`const ${w} = ${E(j)};`),tt&&Mr){const xr=et==="optional"?`${w}_present`:`${w}.value !== undefined || ${w}_present`;z.write(`
11        const ${w}_present = ${we};
12        if (!${w}.issues.length || ${w}_present) {
13          if (${w}.issues.length) {${R(w,j)}
14          }
15
16          if (${xr}) {
17            newResult[${j}] = ${w}.value;
18          }
19        }
20
21      `)}else tt?z.write(`
22        if (${w}.issues.length) {${R(w,j)}
23        }
24        
25        if (${w}.value === undefined) {
26          if (${we}) {
27            newResult[${j}] = undefined;
28          }
29        } else {
30          newResult[${j}] = ${w}.value;
31        }
32
33      `):z.write(`
34        const ${w}_present = ${we};
35        if (${w}.issues.length) {${R(w,j)}
36        }
37        if (!${w}_present && !${w}.issues.length) {
38          payload.issues.push({
39            code: "invalid_type",
40            expected: "nonoptional",
41            input: undefined,
42            path: [${j}]
43          });
44        }
45
46        if (${w}_present) {
47          newResult[${j}] = ${w}.value;
48        }
49
50      `)}return z.write("payload.value = newResult;"),z.write("return payload;"),z.compile()};let s;const a=ee,u=!T.jitless,f=u&&Br.value,p=t.catchall;let d;e._zod.parse=(h,v)=>{d??(d=n.value);const _=h.value;return a(_)?u&&f&&v?.async===!1&&v.jitless!==!0?(s||(s=i(t.shape)),h=s(h,v),p?Qt([],_,h,v,d,e):h):r(h,v):(h.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),h)}});function lt(e,t,r,n){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!L(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(s=>F(s,n,D())))}),t)}var er=l("$ZodUnion",(e,t)=>{b.init(e,t),g(e,"optin",n=>n.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":n.def.options.some(o=>
50o._zod.optin!==void 0)?"optional":void 0),g(e,"optout",n=>n.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),g(e,"values",n=>{if(n.def.options.every(o=>o._zod.values))return new Set(n.def.options.flatMap(o=>Array.from(o._zod.values)))}),g(e,"pattern",n=>{if(n.def.options.every(o=>o._zod.pattern)){const o=n.def.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>Me(i.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1;const s=[];for(const a of t.options){const u=a._zod.run({value:n.value,issues:[]},o);if(u instanceof Promise)s.push(u),i=!0;else{if(u.issues.length===0)return u;s.push(u)}}return i?Promise.all(s).then(a=>lt(a,n,e,o)):lt(s,n,e,o)}}),di=l("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,er.init(e,t);const r=e._zod.parse;g(e,"propValues",o=>{const i={};for(const s of o.def.options){const a=s._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${o.def.options.indexOf(s)}"`);for(const[u,c]of Object.entries(a)){Object.prototype.hasOwnProperty.call(i,u)||I(i,u,new Set);for(const f of c)i[u].add(f)}}return i}),t.options.forEach((o,i)=>{const s=Ee.get(o._zod.def);if(s&&!Object.prototype.hasOwnProperty.call(s,t.discriminator))throw new Error(`Invalid discriminated union option at index "${i}"`)});const n=me(()=>{const o=t.options,i=new Map;for(const s of o){const a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(const u of a){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,s)}}return i});e._zod.parse=(o,i)=>{const s=o.value;if(!ee(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;const a=n.value.get(s?.[t.discriminator]);return a?a._zod.run(o,i):t.unionFallback||i.direction==="backward"?r(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(n.value.keys()),input:s,path:[t.discriminator],inst:e}),o)}}),pi=l("$ZodIntersection",(e,t)=>{b.init(e,t),e._zod.parse=(r,n)=>{const o=r.value,i=t.left._zod.run({value:o,issues:[]},n),s=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([a,u])=>dt(r,a,u)):dt(r,i,s)}});function Ne(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(W(e)&&W(t)){const r=Object.keys(t),n=Object.keys(e).filter(i=>r.indexOf(i)!==-1),o={...e,...t};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const i of n){if(i==="__proto__")continue;const s=Ne(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let n=0;n<e.length;n++){const o=e[n],i=t[n],s=Ne(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function dt(e,t,r){const n=new Map;let o;const i=new Map,s=(c,f)=>{let p;if(c.code==="unrecognized_keys"&&!c.path?.length)o??(o=c),p=c.keys;else if(c.code==="invalid_key"&&c.origin==="record"&&c.path?.length===1){const d=String(c.path[0]);i.has(d)||i.set(d,c),p=[d]}else return!1;for(const d of p)n.has(d)||n.set(d,{}),n.get(d)[f]=!0;return!0};for(const c of t.issues)s(c,"l")||e.issues.push(c);for(const c of r.issues)s(c,"r")||e.issues.push(c);const a=[...n].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(a.length){const c=o?a.filter(f=>o.keys.includes(f)):[];c.length&&e.issues.push({...o,keys:c});for(const f of a)!c.includes(f)&&i.has(f)&&e.issues.push(i.get(f))}const u=Ne(t.value,r.value);if(!u.valid){if(L(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`)}return e.value=u.data,e}var hi=l("$ZodRecord",(e,t)=>{b.init(e,t);const r=T.memoizer;r?.attach(e),e._zod.parse=(n,o)=>{const i=n.value;if(!W(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;const s=[],a=t.keyType._zod.values;if(a&&!t.partial){n.value=r?r.alloc(e,n,{},o):{};const u=new Set;for(const f of a)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){if(u.add(typeof f=="number"?f.toString():f),f==="__proto__")continue;const p=t.keyType._zod.run({value:f,issues:[]},o);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(p.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(v=>
50F(v,o,D())),input:f,path:[f],inst:e});continue}const d=p.value;if(d==="__proto__")continue;const h=t.valueType._zod.run({value:i[f],issues:[]},o);h instanceof Promise?s.push(h.then(v=>{v.issues.length&&n.issues.push(...V(f,v.issues)),n.value[d]=v.value})):(h.issues.length&&n.issues.push(...V(f,h.issues)),n.value[d]=h.value)}let c;for(const f in i)if(!u.has(f))if(t.mode==="loose"){if(f==="__proto__")continue;n.value[f]=i[f]}else c=c??[],c.push(f);c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c,continue:!0})}else{n.value=r?r.alloc(e,n,{},o):{};let u;for(const c of Reflect.ownKeys(i)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,c))continue;let f=t.keyType._zod.run({value:c,issues:[]},o);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&Be.test(c)&&f.issues.length){const h=t.keyType._zod.run({value:Number(c),issues:[]},o);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");h.issues.length===0&&(f=h)}if(f.issues.length){t.mode==="loose"?n.value[c]=i[c]:a?(u=u??[],u.push(c)):n.issues.push({code:"invalid_key",origin:"record",issues:f.issues.map(h=>F(h,o,D())),input:c,path:[c],inst:e});continue}const p=f.value;if(p==="__proto__")continue;const d=t.valueType._zod.run({value:i[c],issues:[]},o);d instanceof Promise?s.push(d.then(h=>{h.issues.length&&n.issues.push(...V(c,h.issues)),n.value[p]=h.value})):(d.issues.length&&n.issues.push(...V(c,d.issues)),n.value[p]=d.value)}u&&u.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:u,continue:!0})}return s.length?Promise.all(s).then(()=>n):n}}),mi=l("$ZodEnum",(e,t)=>{b.init(e,t);const r=Et(t.entries),n=new Set(r);e._zod.values=n;const o=r.filter(i=>Kr.has(typeof i));e._zod.pattern=new RegExp(o.length?`^(${o.map(i=>G(i.toString())).join("|")})$`:"^[^\\s\\S]$"),e._zod.parse=(i,s)=>{const a=i.value;return n.has(a)||i.issues.push({code:"invalid_value",values:r,input:a,inst:e}),i}}),vi=l("$ZodLiteral",(e,t)=>{b.init(e,t);const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(t.values.length?`^(${t.values.map(n=>typeof n=="string"?G(n):n?G(n.toString()):String(n)).join("|")})$`:"^[^\\s\\S]$"),e._zod.parse=(n,o)=>{const i=n.value;return r.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),_i=l("$ZodFile",(e,t)=>{b.init(e,t),e._zod.parse=(r,n)=>{const o=r.value;return o instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),r}}),gi=l("$ZodTransform",(e,t)=>{b.init(e,t),e._zod.optin="optional",T.memoizer?.guard(e),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ct(e.constructor.name);const o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(i=>(r.value=i,r));if(o instanceof Promise)throw new K;return r.value=o,r}});function pt(e,t){return e.value=t.issues.length?void 0:t.value,e}var tr=l("$ZodOptional",(e,t)=>{b.init(e,t),g(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",g(e,"values",r=>{const n=r.def.innerType._zod.values;return n?new Set([...n,void 0]):void 0}),g(e,"pattern",r=>{const n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${Me(n.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;const o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>pt(r,i)):pt(r,o)}return t.innerType._zod.run(r,n)}}),bi=l("$ZodExactOptional",(e,t)=>{tr.init(e,t),g(e,"values",r=>r.def.innerType._zod.values),g(e,"pattern",r=>r.def.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),yi=l("$ZodNullable",(e,t)=>{b.init(e,t),g(e,"optin",r=>
vendor: 2,087 bytes, line 50
50r.def.innerType._zod.optin),g(e,"optout",r=>r.def.innerType._zod.optout),g(e,"pattern",r=>{const n=r.def.innerType._zod.pattern;return n?new RegExp(`^(${Me(n.source)}|null)$`):void 0}),g(e,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)}),zi=l("$ZodDefault",(e,t)=>{b.init(e,t),e._zod.optin="defaulted",g(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>ht(i,t)):ht(o,t)}});function ht(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var wi=l("$ZodPrefault",(e,t)=>{b.init(e,t),e._zod.optin="defaulted",g(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,n))}),ki=l("$ZodNonOptional",(e,t)=>{b.init(e,t),g(e,"values",r=>{const n=r.def.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,n)=>{const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(i=>mt(i,e)):mt(o,e)}});function mt(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}function vt(e,t,r,n){return t.issues.length?(e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(o=>F(o,n,D()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var $i=l("$ZodCatch",(e,t)=>{b.init(e,t),g(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),g(e,"optout",r=>r.def.innerType._zod.optout),g(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run({value:r.value,issues:[]},n);return o instanceof Promise?o.then(i=>vt(r,i,t,n)):vt(r,o,t,n)}}),rr=l("$ZodPipe",(e,t)=>{b.init(e,t),g(e,"values",r=>r.def.in._zod.values),g(e,"optin",r=>
50r.def.in._zod.optin),g(e,"optout",r=>r.def.out._zod.optout),g(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){const i=t.out._zod.run(r,n);return i instanceof Promise?i.then(s=>re(s,t.in,n)):re(i,t.in,n)}const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>re(i,t.out,n)):re(o,t.out,n)}});function re(e,t,r){return e.issues.some(n=>n.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var nr=l("$ZodCodec",(e,t)=>{b.init(e,t),g(e,"values",r=>r.def.in._zod.values),g(e,"optin",r=>r.def.in._zod.optin),g(e,"optout",r=>r.def.out._zod.optout),g(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){const o=t.in._zod.run(r,n);return o instanceof Promise?o.then(i=>ne(i,t,n)):ne(o,t,n)}else{const o=t.out._zod.run(r,n);return o instanceof Promise?o.then(i=>ne(i,t,n)):ne(o,t,n)}}});function ne(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){const n=t.transform(e.value,e);return n instanceof Promise?n.then(o=>oe(e,o,t.out,r)):oe(e,n,t.out,r)}else{const n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>oe(e,o,t.in,r)):oe(e,n,t.in,r)}}function oe(e,t,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},n)}var Oi=l("$ZodPreprocess",(e,t)=>{rr.init(e,t)}),Zi=l("$ZodReadonly",(e,t)=>{b.init(e,t),g(e,"propValues",r=>r.def.innerType._zod.propValues),g(e,"values",r=>r.def.innerType._zod.values),g(e,"optin",r=>
vendor: 11,472 bytes, line 50
50r.def.innerType?._zod?.optin),g(e,"optout",r=>r.def.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);const o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(_t):_t(o)}});function _t(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Si=l("$ZodCustom",(e,t)=>{Z.init(e,t),b.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{const n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(i=>gt(i,r,n,e));gt(o,r,n,e)}});function gt(e,t,r,n){if(!e){const o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(te(o))}}var Ii=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},Te="~memo",bt=[];function Se(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var yt=new WeakMap;function or(e,t){const r=yt.get(e);if(r!==void 0)return r;if(t.has(e))return!0;t.add(e);let n=!1;const o=s=>{!n&&s?._zod&&or(s,t)&&(n=!0)},i=e._zod.def;switch(i.type){case"object":for(const s of Reflect.ownKeys(i.shape))o(i.shape[s]);o(i.catchall);break;case"array":o(i.element);break;case"tuple":for(const s of i.items)o(s);o(i.rest);break;case"record":case"map":o(i.keyType),o(i.valueType);break;case"set":o(i.valueType);break;case"union":for(const s of i.options)o(s);break;case"intersection":o(i.left),o(i.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":o(i.innerType);break;case"pipe":o(i.in),o(i.out);break;case"function":o(i.input),o(i.output);break;case"lazy":o(e._zod.innerType);break;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":break;default:for(const s in i){const a=Object.getOwnPropertyDescriptor(i,s);if(!a||a.get)continue;const u=a.value;if(!(!u||typeof u!="object")){if(u._zod)o(u);else if(Array.isArray(u))for(const c of u)o(c)}}}return t.delete(e),yt.set(e,n),n}function Pi(e,t){let r=e.buckets.get(t);return r||(r=new Map,e.buckets.set(t,r)),r}var ie,se=[],Ei={alloc(e,t,r){const n=ie;if(!n)return r;ie=void 0;const o={value:r,issues:null};return n.set(t.value,o),se.push(o),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const r=e._zod.parse,n=(o,i)=>{if(i.direction!=="backward"&&Ti(i,o.value))throw new Ii;return r(o,i)};e._zod.parse=n,e._zod.run===r&&(e._zod.run=n)})},attach(e){var t;let r,n,o;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{const i=e._zod.parse,s=(a,u)=>{if(r===void 0&&(r=or(e,new Set),!r))return e._zod.parse=i,e._zod.run===s&&(e._zod.run=i),i(a,u);const c=a.value;if(c===null||typeof c!="object")return i(a,u);let f=u[Te];f||(f={buckets:new Map,backEdges:void 0},u[Te]=f);let p;n===u?p=o:(p=Pi(f,e),n=u,o=p);const d=p.get(c);if(d)return a.value=d.value,d.issues?d.issues.length&&a.issues.push(...Se(d.issues)):(a.memo=!0,f.backEdges??(f.backEdges=new Set),f.backEdges.add(d.value)),a;ie=p;const h=se.length,v=i(a,u);ie=void 0;const _=se.length>h?se.pop():void 0;return v instanceof Promise?v.then(z=>(_&&(_.issues=z.issues.length?Se(z.issues):bt),z)):(_&&(_.issues=v.issues.length?Se(v.issues):bt),v)};e._zod.parse=s,e._zod.run===i&&(e._zod.run=s)})}};function Ni(){return Ei}function Ti(e,t){const r=e[Te]?.backEdges;return r!==void 0&&t!==null&&typeof t=="object"&&r.has(t)}var Ai=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"credit card number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};function o(i,s){return i==="number"&&typeof s=="number"&&!Number.isFinite(s)?String(s):n[i]??i}return i=>{switch(i.code){case"invalid_type":return`Invalid input: expected ${o(i.expected)}, received ${o(nn(i.input),i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${jt(i.values[0])}`:`Invalid option: expected one of ${rt(i.values,"|")}`;case"too_big":{const s=i.exact?"exactly ":i.inclusive?"<=":"<",a=t(i.origin);return a?`Too big: expected ${i.origin??"value"} to have ${s}${i.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${s}${i.maximum.toString()}`}case"too_small":{const s=i.exact?"exactly ":i.inclusive?">=":">",a=t(i.origin);return a?`Too small: expected ${i.origin} to have ${s}${i.minimum.toString()} ${a.unit}`:`Too small: expected ${i.origin} to be ${s}${i.minimum.toString()}`}case"invalid_format":{const s=i;return s.format==="starts_with"?`Invalid string: must start with "${s.prefix}"`:s.format==="ends_with"?`Invalid string: must end with "${s.suffix}"`:s.format==="includes"?`Invalid string: must include "${s.includes}"`:s.format==="regex"?`Invalid string: must match pattern ${s.pattern}`:`Invalid ${r[s.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${rt(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(s=>`'${s}'`).join(" | ")}`:i.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function ji(){return{localeError:Ai()}}var zt,Di=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const r=t[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const r={...this.get(t)??{}};delete r.id;const n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Ri(){return new Di}(zt=globalThis).__zod_globalRegistry??(zt.__zod_globalRegistry=Ri());var H=globalThis.__zod_globalRegistry;function Ci(e,t){return new e({type:"string",...m(t)})}function ir(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...m(t)})}function Fi(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...m(t)})}function sr(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...m(t)})}function Ui(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...m(t)})}function Mi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...m(t)})}function ar(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...m(t)})}function ur(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...m(t)})}function xi(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...m(t)})}function Ji(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...m(t)})}function Li(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...m(t)})}function Vi(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...m(t)})}function Bi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...m(t)})}function Ki(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...m(t)})}function Wi(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...m(t)})}function cr(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...m(t)})}function fr(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...m(t)})}function Gi(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...m(t)})}function Yi(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...m(t)})}function qi(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...m(t)})}function Xi(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...m(t)})}function Hi(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...m(t)})}function Qi(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...m(t)})}function lr(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...m(t)})}function dr(e,t){return new e({type:"string",format:"date",check:"string_format",...m(t)})}function es(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...m(t)})}function ts(e,t){return new e({type:"string",format:"duration",check:"string_format",...m(t)})}function rs(e,t){return new e({type:"number",checks:[],...m(t)})}function ns(e,t){return new e({type:"number",coerce:!0,checks:[],...m(t)})}function os(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...m(t)})}function is(e,t){return new e({type:"boolean",...m(t)})}function ss(e,t){return new e({type:"boolean",coerce:!0,...m(t)})}function as(e,t){return new e({type:"bigint",...m(t)})}function us(e,t){return new e({type:"bigint",coerce:!0,...m(t)})}function cs(e,t){return new e({type:"null",...m(t)})}function fs(e){return new e({type:"any"})}function ls(e){return new e({type:"unknown"})}function ds(e,t){return new e({type:"never",...m(t)})}function ps(e,t){return new e({type:"void",...m(t)})}function hs(e,t){return new e({type:"date",...m(t)})}function ms(e,t){return new e({type:"date",coerce:!0,...m(t)})}function fe(e,t){return new Bt({check:"less_than",...m(t),value:e,inclusive:!1})}function x(e,t){return new Bt({check:"less_than",...m(t),value:e,inclusive:!0})}function le(e,t){return new Kt({check:"greater_than",...m(t),value:e,inclusive:!1})}function J(e,t){return new Kt({check:"greater_than",...m(t),value:e,inclusive:!0})}function Ae(e,t){return new oo({check:"multiple_of",...m(t),value:e})}function vs(e,t){return new so({check:"max_size",...m(t),maximum:e})}function _s(e,t){return new ao({check:"min_size",...m(t),minimum:e})}function pr(e,t){return new uo({check:"max_length",...m(t),maximum:e})}function de(e,t){return new co({check:"min_length",...m(t),minimum:e})}function hr(e,t){return new fo({check:"length_equals",...m(t),length:e})}function gs(e,t){return new lo({check:"string_format",format:"regex",...m(t),pattern:e})}function bs(e){return new po({check:"string_format",format:"lowercase",...m(e)})}
50function ys(e){return new ho({check:"string_format",format:"uppercase",...m(e)})}function zs(e,t){return new mo({check:"string_format",format:"includes",...m(t),includes:e})}function ws(e,t){return new vo({check:"string_format",format:"starts_with",...m(t),prefix:e})}function ks(e,t){return new _o({check:"string_format",format:"ends_with",...m(t),suffix:e})}function $s(e,t){return new go({check:"mime_type",mime:e,...m(t)})}function q(e){return new bo({check:"overwrite",tx:e})}function Os(e){return q(t=>t.normalize(e))}function Zs(){return q(e=>e.trim())}function Ss(){return q(e=>e.toLowerCase())}function Is(){return q(e=>e.toUpperCase())}function Ps(){return q(e=>Vr(e))}function Es(e,t,r){return new e({type:"array",element:t,...m(r)})}function Ns(e,t){return new e({type:"file",...m(t)})}function Ts(e,t,r){return new e({type:"custom",check:"custom",fn:t,...m(r)})}function As(e,t){const r=js(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(te(o,n.value,r._zod.def));else{const i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=n.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),n.issues.push(te(i))}},e(n.value,n)),t);return r}function js(e,t){const r=new Z({check:"custom",...m(t)});return r._zod.check=e,r}function Ds(e,t){const r=m(t);let n=r.truthy??["true","1","yes","on","y","enabled"],o=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(f=>typeof f=="string"?f.toLowerCase():f),o=o.map(f=>typeof f=="string"?f.toLowerCase():f));const i=new Set(n),s=new Set(o),a=e.Codec??nr,u=e.Boolean??Xt,c=new a({type:"pipe",in:new(e.String??ye)({type:"string",error:r.error}),out:new u({type:"boolean",error:r.error}),transform:((f,p)=>{let d=f;return r.case!=="sensitive"&&(d=d.toLowerCase()),i.has(d)?!0:s.has(d)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:p.value,inst:c,continue:!1}),{})}),reverseTransform:((f,p)=>f===!0?n[0]||"true":o[0]||"false"),error:r.error});return c._zod.bag.truthy=n,c._zod.bag.falsy=o,c._zod.bag.case=r.case??"insensitive",c}function Q(e,...t){for(const r of t)for(const n of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,n)&&I(e,n,r[n]);return e}function mr(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??H,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function A(e,t,r,n,o){const i=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:n.path,message:o}):t.unrepresentable;if(i==="any")return!1;if(i===void 0||i==="throw")throw new Error(o);return Object.assign(r,i),!0}function O(e,t,r={path:[],schemaPath:[]}){var n;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;const s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;const a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{const c={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,c);else{const p=s.schema,d=t.processors[o.type];if(!d)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);d(e,t,p,c)}const f=e._zod.parent;f&&(s.ref||(s.ref=f),O(f,t,c),t.seen.get(f).isParent=!0)}const u=t.metadataRegistry.get(e);return u&&Q(s.schema,u),t.io==="input"&&S(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((n=s.schema).default??(n.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function wt(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function vr(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const n=new Map;for(const s of e.seen.entries()){const a=e.metadataRegistry.get(s[0])?.id;if(a){const u=n.get(a);if(u&&u!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,s[0])}}const o=s=>
50{const a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(s[0])?.id,d=e.external.uri??(v=>v);if(p)return{ref:d(p)};const h=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=h,{defId:h,ref:`${d("__shared")}#/${a}/${wt(h)}`}}const u="#",c=`${u}/${a}/`;if(s[1]===r&&!s[1].schema.id)return{ref:u};const f=s[1].schema.id??`__schema${e.counter++}`;return{defId:f,ref:c+wt(f)}},i=s=>{if(s[1].schema.$ref)return;const a=s[1],{ref:u,defId:c}=o(s);a.def={...a.schema},c&&(a.defId=c);const f=a.schema;for(const p in f)delete f[p];f.$ref=u};if(e.cycles==="throw")for(const s of e.seen.entries()){const a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
51
52Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const s of e.seen.entries()){const a=s[1];if(t===s[0]){i(s);continue}if(e.external){const u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function _r(e){const t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;const r=[];for(const n of t){if(!n||typeof n!="object")return;_r(n);const o=Object.keys(n);if(o.length!==1||o[0]!=="type")return;const i=n.type;for(const s of Array.isArray(i)?i:[i]){if(typeof s!="string")return;r.includes(s)||r.push(s)}}delete e.anyOf,e.type=r.length===1?r[0]:r}var gr=new Set(["type","properties","required","additionalProperties"]),kt=["oneOf","anyOf"];function $t(e){const t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function je(e){const t=[];for(const i of e){if(typeof i!="object"||i.type!=="object")return null;for(const s in i)if(!gr.has(s))return null;t.push(i)}const r={},n=new Set;for(const i of t){for(const s in i.properties){if(Object.prototype.hasOwnProperty.call(r,s))continue;const a=[];for(const u of t){const c=u.properties?.[s]??$t(u);c!=null&&(a.some(f=>JSON.stringify(f)===JSON.stringify(c))||a.push(c))}I(r,s,a.length===1?a[0]:je(a)??{allOf:a})}for(const s of i.required??[])n.add(s)}const o={type:"object",properties:r};if(n.size&&(o.required=[...n]),t.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{const i=[];for(const s of t){const a=$t(s);a&&!i.some(u=>JSON.stringify(u)===JSON.stringify(a))&&i.push(a)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function Rs(e){const t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(const o of gr)if(o in e)return;const r=t.filter(o=>kt.some(i=>Array.isArray(o[i])));let n=null;if(!r.length)n=je(t);else{const o=r[0],i=kt.find(u=>Array.isArray(o[u]));if(Object.keys(o).length!==1)return;const s=t.filter(u=>u!==o),a=o[i].map(u=>je([...s,u]));if(a.some(u=>!u))return;n={[i]:a}}n&&(delete e.allOf,Q(e,n))}function br(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=a=>{const u=e.seen.get(a);if(u.ref===null)return;const c=u.def??u.schema,f={...c},p=u.ref;if(u.ref=null,p){n(p);const h=e.seen.get(p),v=h.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(v)):Q(c,v),Q(c,f),a._zod.parent===p)for(const _ in c)_==="$ref"||_==="allOf"||_ in f||delete c[_];if(v.$ref&&h.def)for(const _ in c)_==="$ref"||_==="allOf"||_ in h.def&&JSON.stringify(c[_])===JSON.stringify(h.def[_])&&delete c[_]}const d=a._zod.parent;if(d&&d!==p){n(d);const h=e.seen.get(d);if(h?.schema.$ref&&(c.$ref=h.schema.$ref,h.def))for(const v in c)v==="$ref"||v==="allOf"||v in h.def&&JSON.stringify(c[v])===JSON.stringify(h.def[v])&&delete c[v]}e.override({zodSchema:a,jsonSchema:c,path:u.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const a of[...e.seen.entries()].reverse())n(a[0]);if(e.target!=="openapi-3.0")for(const a of e.seen.entries())_r(a[1].def??a[1].schema);for(const a of e.deferred)a();if(e.intersections.length){const a=new Map;for(const u of e.seen.values())for(const c of[u.schema,u.def]){const f=c?.allOf;if(!Array.isArray(f))continue;const p=a.get(f);p?p.push(c):a.set(f,[c])}for(const u of e.intersections)for(const c of a.get(u)??[])Rs(c)}}const o={};
52if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(a)}Q(o,r.defId?r.schema:r.def??r.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;const s=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const a of e.seen.entries()){const u=a[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,I(s,u.defId,u.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{const a=JSON.parse(JSON.stringify(o));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:pe(t,"input",e.processors),output:pe(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function S(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return S(n.element,r);if(n.type==="set")return S(n.valueType,r);if(n.type==="lazy")return S(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault"||n.type==="catch")return S(n.innerType,r);if(n.type==="intersection")return S(n.left,r)||S(n.right,r);if(n.type==="record"||n.type==="map")return S(n.keyType,r)||S(n.valueType,r);if(n.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:S(n.in,r)||S(n.out,r);if(n.type==="object"){for(const o in n.shape)if(S(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(const o of n.options)if(S(o,r))return!0;return!1}if(n.type==="tuple"){for(const o of n.items)if(S(o,r))return!0;return!!(n.rest&&S(n.rest,r))}return!1}var Cs=(e,t={})=>r=>{const n=mr({...r,processors:t});return O(e,n),vr(n,e),br(n,e)},pe=(e,t,r={})=>n=>{const{libraryOptions:o,target:i}=n??{},s=mr({...o??{},target:i,io:t,processors:r});return O(e,s),vr(s,e),br(s,e)},Fs={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Us=(e,t,r,n)=>{const o=r;o.type="string";const{minimum:i,maximum:s,format:a,patterns:u,contentEncoding:c,laxFormat:f}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),a&&(o.format=Fs[a]??a,o.format===""&&delete o.format,(a==="time"||f)&&delete o.format),c&&(o.contentEncoding=c),u&&u.size>0){const p=[...u];p.length===1?o.pattern=p[0].source:p.length>1&&(o.allOf=[...p.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Ms=(e,t,r,n)=>{const o=r,{minimum:i,maximum:s,format:a,multipleOf:u,exclusiveMaximum:c,exclusiveMinimum:f}=e._zod.bag;typeof a=="string"&&a.includes("int")?o.type="integer":o.type="number";const p=typeof f=="number"&&f>=(i??Number.NEGATIVE_INFINITY),d=typeof c=="number"&&c<=(s??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";p?h?(o.minimum=f,o.exclusiveMinimum=!0):o.exclusiveMinimum=f:typeof i=="number"&&(o.minimum=i),d?h?(o.maximum=c,o.exclusiveMaximum=!0):o.exclusiveMaximum=c:typeof s=="number"&&(o.maximum=s),typeof u=="number"&&(Number.isFinite(u)&&u!==0?o.multipleOf=Math.abs(u):A(e,t,o,n,`A multipleOf divisor of ${u} cannot be represented in JSON Schema`))},xs=(e,t,r,n)=>{r.type="boolean"},Js=(e,t,r,n)=>{A(e,t,r,n,"BigInt cannot be represented in JSON Schema")},Ls=(e,t,r,n)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Vs=(e,t,r,n)=>{A(e,t,r,n,"Void cannot be represented in JSON Schema")},Bs=(e,t,r,n)=>{r.not={}},Ks=(e,t,r,n)=>{},Ws=(e,t,r,n)=>{},Gs=(e,t,r,n)=>{A(e,t,r,n,"Date cannot be represented in JSON Schema")},Ys=(e,t,r,n)=>{const o=e._zod.def,i=Et(o.entries);if(i.length===0){r.not={};return}i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),r.enum=i},qs=(e,t,r,n)=>{const o=e._zod.def;if(o.values.length===0){r.not={};return}const i=[];for(const s of o.values)if(s===void 0){if(A(e,t,r,n,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof s=="bigint"){if(A(e,t,r,n,"BigInt literals cannot be represented in JSON Schema"))return;i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){const s=i[0];r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[s]:r.const=s}else i.every(s=>typeof s=="number")&&(r.type="number"),i.every(s=>typeof s=="string")&&(r.type="string"),i.every(s=>typeof s=="boolean")&&(r.type="boolean"),i.every(s=>s===null)&&(r.type="null"),r.enum=i},Xs=(e,t,r,n)=>{const o=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:u}=e._zod.bag;s!==void 0&&(i.minLength=s),a!==void 0&&(i.maxLength=a),u?u.length===1?(i.contentMediaType=u[0],Ob
52ject.assign(o,i)):(Object.assign(o,i),o.anyOf=u.map(c=>({contentMediaType:c}))):Object.assign(o,i)},Hs=(e,t,r,n)=>{A(e,t,r,n,"Custom types cannot be represented in JSON Schema")},Qs=(e,t,r,n)=>{A(e,t,r,n,"Transforms cannot be represented in JSON Schema")},ea=(e,t,r,n)=>{const o=r,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=O(i.element,t,{...n,path:[...n.path,"items"]})};function he(e){const t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?he(t.out):t.type==="catch"?he(t.innerType):e._zod.optin}var ta=(e,t,r,n)=>{const o=r,i=e._zod.def,s=i.shape;if(Object.getOwnPropertySymbols(s).length&&A(e,t,o,n,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const c in s)I(o.properties,c,O(s[c],t,{...n,path:[...n.path,"properties",c]}));const a=new Set(Object.keys(s)),u=new Set([...a].filter(c=>{const f=i.shape[c];return t.io==="input"?he(f)===void 0:f._zod.optout===void 0}));u.size>0&&(o.required=Array.from(u)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=O(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},ra=(e,t,r,n)=>{const o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,u)=>O(a,t,{...n,path:[...n.path,i?"oneOf":"anyOf",u]}));i?r.oneOf=s:r.anyOf=s},na=(e,t,r,n)=>{const o=e._zod.def,i=O(o.left,t,{...n,path:[...n.path,"allOf",0]}),s=O(o.right,t,{...n,path:[...n.path,"allOf",1]}),a=c=>"allOf"in c&&Object.keys(c).length===1,u=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=u,t.intersections.push(u)};function De(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);const v=e.get(t)?.def;if(!v)return t;const _=De(e,v,r);return _===v?t:_}for(const v of["anyOf","oneOf"]){const _=t[v];if(!Array.isArray(_))continue;const z=_.map(E=>De(e,E,r));z.some((E,R)=>E!==_[R])&&(t={...t,[v]:z})}const n=Array.isArray(t.type)?t.type:[t.type],o=!n.includes("string")&&n.some(v=>v==="number"||v==="integer"),i=t.enum??(t.const!==void 0?[t.const]:void 0);if(!o&&!i?.some(v=>typeof v=="number"))return t;const{minimum:s,maximum:a,exclusiveMinimum:u,exclusiveMaximum:c,multipleOf:f,format:p,id:d,...h}=t;return h.enum?h.enum=h.enum.map(v=>typeof v=="number"?String(v):v):typeof h.const=="number"&&(h.const=String(h.const)),o&&(h.type="string",i||(h.pattern=(n.includes("number")?Be:Lt).source)),h}var Re=new WeakMap;function oa(e){const t=new Map;for(const n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);const r=new Map;for(const n of Re.get(e)??[]){const o=e.seen.get(n),i=(o?.def??o?.schema)?.propertyNames;if(!i||i===!0||r.has(i))continue;const s=De(t,i,new Set);s!==i&&r.set(i,s)}if(r.size)for(const n of e.seen.values())for(const o of[n.schema,n.def]){const i=o&&r.get(o.propertyNames);i&&(o.propertyNames=i)}}var ia=(e,t,r,n)=>{const o=r,i=e._zod.def;o.type="object";const s=i.keyType,a=s._zod.bag?.patterns;if(i.mode==="loose"&&a&&a.size>0){const f=O(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(const p of a)I(o.patternProperties,p.source,f)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){o.propertyNames=O(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});let f=Re.get(t);f||(f=[],Re.set(t,f),t.deferred.push(()=>oa(t))),f.push(e)}o.additionalProperties=O(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}const u=s._zod.values,c=t.io==="input"&&he(i.valueType)!==void 0;if(u&&!i.partial&&!c){const f=[...u].filter(p=>typeof p=="string"||typeof p=="number");f.length>0&&(o.required=f.map(String))}},sa=(e,t,r,n)=>{const o=e._zod.def,i=O(o.innerType,t,n),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},aa=(e,t,r,n)=>{const o=e._zod.def;O(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},We=Symbol();function yr(e,t,r,n,o){let i=!1;const s=JSON.stringify(e,(a,u)=>typeof u!="bigint"?u:(i=!0,null));return i?(A(t,r,n,o,"BigInt defaults cannot be represented in JSON Schema"),We):JSON.parse(s)}var ua=(e,t,r,n)=>{const o=e._zod.def;O(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType;const s=yr(o.defaultValue,e,t,r,n);s!==We&&(r.default=s)},ca=(e,t,r,n)=>{const o=e._zod.def;O(o.innerType,t,n);const i=t.seen.get(e);if(i.ref=o.innerType,t.io!=="input")return;const s=yr(o.defaultValue,e,t,r,n);s!==We&&(r._prefault=s)},fa=(e,t,r,n)=>{const o=e._zod.def;O(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{A(e,t,r,n,"Dynamic catch values are not supported in JSON Schema");return}r.default=s},la=(e,t,r,n)=>{const o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;O(s,t,n);const a=t.seen.get(e);a.ref=s},da=(e,t,r,n)=>{const o=e._zod.def;O(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0},zr=(e,t,r,n)=>{const o=e._zod.def;O(o.innerType,t,n);const i=t.seen.get(e);i.ref=o.innerType},Ot=new WeakSet([Object.prototype,Error.prototype]);function ae(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){const n=r(this);return Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),n},set(n){Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0})}})}var wr=(e,t)=>
vendor: 5,583 bytes, line 52
52{Ut.init(e,t),e.name="ZodError";const r=Object.getPrototypeOf(e);Ot.has(r)||(Ot.add(r),ae(r,"format",n=>o=>gn(n,o)),ae(r,"flatten",n=>o=>_n(n,o)),ae(r,"addIssue",n=>o=>{n.issues.push(o),n.message=JSON.stringify(n.issues,Ie,2)}),ae(r,"addIssues",n=>o=>{n.issues.push(...o),n.message=JSON.stringify(n.issues,Ie,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},wu=l("ZodError",wr),N=l("ZodError",wr,void 0,{Parent:Error}),pa=Le(N),ha=Ve(N),ma=_e(N),va=ge(N),_a=zn(N),ga=wn(N),ba=kn(N),ya=$n(N),za=On(N),wa=Zn(N),ka=Sn(N),$a=In(N);function Oa(){T.localeError||D(ji())}function ze(){T.memoizer||D({memoizer:Ni()})}var y=l("ZodType",(e,t)=>(Oa(),b.init(e,t),e.def=t,e.type=t.type,e),{check(...e){const t=this.def;return this.clone(U(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return M(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(bu(e,t))},superRefine(e,t){return this.check(yu(e,t))},overwrite(e){return this.check(q(e))},optional(){return St(this)},exactOptional(){return iu(this)},nullable(){return It(this)},nullish(){return St(It(this))},nonoptional(e){return lu(this,e)},array(){return qa(this)},or(e){return Xa([this,e])},and(e){return eu(this,e)},transform(e){return Pt(this,Dr(e))},default(e){return uu(this,e)},prefault(e){return fu(this,e)},catch(e){return pu(this,e)},pipe(e){return Pt(this,e)},readonly(){return _u(this)},describe(e){const t=this.clone();return H.add(t,{description:e}),t},meta(...e){if(e.length===0)return H.get(this);const t=this.clone();return H.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Rt(this,"~standard",{...Wt(this),jsonSchema:{input:pe(this,"input"),output:pe(this,"output")}})},set"~standard"(e){Y(this,"~standard",e)},parse:function e(t,r){return pa(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await ha(this,t,r,{callee:e})},safeParse(e,t){return ma(this,e,t)},async safeParseAsync(e,t){return va(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Y(this,"spa",e)},encode:function e(t,r){return _a(this,t,r,{callee:e})},decode:function e(t,r){return ga(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await ba(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await ya(this,t,r,{callee:e})},safeEncode(e,t){return za(this,e,t)},safeDecode(e,t){return wa(this,e,t)},async safeEncodeAsync(e,t){return ka(this,e,t)},async safeDecodeAsync(e,t){return $a(this,e,t)},toJSONSchema(e){return Cs(this,{})(e)},get description(){return H.get(this)?.description},get _def(){return this._zod.def}}),kr=l("_ZodString",(e,t)=>{ye.init(e,t),y.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Us(e,n,o,i);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null},{regex(...e){return this.check(gs(...e))},includes(...e){return this.check(zs(...e))},startsWith(...e){return this.check(ws(...e))},endsWith(...e){return this.check(ks(...e))},min(...e){return this.check(de(...e))},max(...e){return this.check(pr(...e))},length(...e){return this.check(hr(...e))},nonempty(...e){return this.check(de(1,...e))},lowercase(e){return this.check(bs(e))},uppercase(e){return this.check(ys(e))},trim(){return this.check(Zs())},normalize(...e){return this.check(Os(...e))},toLowerCase(){return this.check(Ss())},toUpperCase(){return this.check(Is())},slugify(){return this.check(Ps())}}),$r=l("ZodString",(e,t)=>{ye.init(e,t),kr.init(e,t)},{email(e){return this.check(ir(Sr,e))},url(e){return this.check(ur(Ir,e))},jwt(e){return this.check(Qi(Ja,e))},emoji(e){return this.check(xi(Ea,e))},guid(e){return this.check(Fi(Pa,e))},uuid(e){return this.check(sr(B,e))},uuidv4(e){return this.check(Ui(B,e))},uuidv6(e){return this.check(Mi(B,e))},uuidv7(e){return this.check(ar(B,e))},nanoid(e){return this.check(Ji(Na,e))},cuid(e){return this.check(Li(Ta,e))},cuid2(e){return this.check(Vi(Aa,e))},ulid(e){return this.check(Bi(ja,e))},base64(e){return this.check(qi(Ua,e))},base64url(e){return this.check(Xi(Ma,e))},xid(e){return this.check(Ki(Da,e))},ksuid(e){return this.check(Wi(Ra,e))},ipv4(e){return this.check(cr(Pr,e))},ipv6(e){return this.check(fr(Er,e))},cidrv4(e){return this.check(Gi(Ca,e))},cidrv6(e){return this.check(Yi(Fa,e))},e164(e){return this.check(Hi(xa,e))},datetime(e){return this.check(lr(Or,e))},date(e){return this.check(dr(Zr,e))},time(e){return this.check(es(Sa,e))},duration(e){return this.check(ts(Ia,e))}});function Za(e){return Ci($r,e)}var $=l("ZodStringFormat",(e,t)=>{k.init(e,t),kr.init(e,t)}),Or=l("ZodISODateTime",(e,t)=>{Fo.init(e,t),$.init(e,t)}),Zr=l("ZodISODate",(e,t)=>{Uo.init(e,t),$.init(e,t)}),Sa=l("ZodISOTime",(e,t)=>{Mo.init(e,t),$.init(e,t)}),Ia=l("ZodISODuration",(e,t)=>{xo.init(e,t),$.init(e,t)}),Sr=l("ZodEmail",(e,t)=>{$o.init(e,t),$.init(e,t)});function ku(e){return ir(Sr,e)}var Pa=l("ZodGUID",(e,t)=>{wo.init(e,t),$.init(e,t)}),B=l("ZodUUID",(e,t)=>{ko.init(e,t),$.init(e,t)});function $u(e){return sr(B,e)}function Ou(e){return ar(B,e)}var Ir=l("ZodURL",(e,t)=>{Eo.init(e,t),$.init(e,t)});function Zu(e){return ur(Ir,e)}var Ea=l("ZodEmoji",(e,t)=>{No.init(e,t),$.init(e,t)}),Na=l("ZodNanoID",(e,t)=>{To.init(e,t),$.init(e,t)}),Ta=l("ZodCUID",(e,t)=>{Ao.init(e,t),$.init(e,t)}),Aa=l("ZodCUID2",(e,t)=>{jo.init(e,t),$.init(e,t)}
52),ja=l("ZodULID",(e,t)=>{Do.init(e,t),$.init(e,t)}),Da=l("ZodXID",(e,t)=>{Ro.init(e,t),$.init(e,t)}),Ra=l("ZodKSUID",(e,t)=>{Co.init(e,t),$.init(e,t)}),Pr=l("ZodIPv4",(e,t)=>{Jo.init(e,t),$.init(e,t)});function Su(e){return cr(Pr,e)}var Er=l("ZodIPv6",(e,t)=>{Vo.init(e,t),$.init(e,t)});function Iu(e){return fr(Er,e)}var Ca=l("ZodCIDRv4",(e,t)=>{Bo.init(e,t),$.init(e,t)}),Fa=l("ZodCIDRv6",(e,t)=>{Wo.init(e,t),$.init(e,t)}),Ua=l("ZodBase64",(e,t)=>{Go.init(e,t),$.init(e,t)}),Ma=l("ZodBase64URL",(e,t)=>{qo.init(e,t),$.init(e,t)}),xa=l("ZodE164",(e,t)=>{Xo.init(e,t),$.init(e,t)}),Ja=l("ZodJWT",(e,t)=>{Qo.init(e,t),$.init(e,t)}),Ge=l("ZodNumber",(e,t)=>{qt.init(e,t),y.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Ms(e,n,o,i);const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null},{gt(e,t){return this.check(le(e,t))},gte(e,t){return this.check(J(e,t))},min(e,t){return this.check(J(e,t))},lt(e,t){return this.check(fe(e,t))},lte(e,t){return this.check(x(e,t))},max(e,t){return this.check(x(e,t))},int(e){return this.check(Zt(e))},safe(e){return this.check(Zt(e))},positive(e){return this.check(le(0,e))},nonnegative(e){return this.check(J(0,e))},negative(e){return this.check(fe(0,e))},nonpositive(e){return this.check(x(0,e))},multipleOf(e,t){return this.check(Ae(e,t))},step(e,t){return this.check(Ae(e,t))},finite(){return this}});function Pu(e){return rs(Ge,e)}var La=l("ZodNumberFormat",(e,t)=>{ei.init(e,t),Ge.init(e,t)});function Zt(e){return os(La,e)}var Ye=l("ZodBoolean",(e,t)=>{Xt.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>xs(e,r,n,o)});function Eu(e){return is(Ye,e)}var Nr=l("ZodBigInt",(e,t)=>{ti.init(e,t),y.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Js(e,n,o,i);const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null},{gte(e,t){return this.check(J(e,t))},min(e,t){return this.check(J(e,t))},gt(e,t){return this.check(le(e,t))},lt(e,t){return this.check(fe(e,t))},lte(e,t){return this.check(x(e,t))},max(e,t){return this.check(x(e,t))},positive(e){return this.check(le(BigInt(0),e))},negative(e){return this.check(fe(BigInt(0),e))},nonpositive(e){return this.check(x(BigInt(0),e))},nonnegative(e){return this.check(J(BigInt(0),e))},multipleOf(e,t){return this.check(Ae(e,t))}});function Nu(e){return as(Nr,e)}var Va=l("ZodNull",(e,t)=>{ri.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ls(e,r,n,o)});function Tu(e){return cs(Va,e)}var Ba=l("ZodAny",(e,t)=>{ni.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ks(e,r,n,o)});function Au(){return fs(Ba)}var Ka=l("ZodUnknown",(e,t)=>{oi.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ws(e,r,n,o)});function Ce(){return ls(Ka)}var Wa=l("ZodNever",(e,t)=>{ii.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Bs(e,r,n,o)});function Tr(e){return ds(Wa,e)}var Ga=l("ZodVoid",(e,t)=>{si.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Vs(e,r,n,o)});function ju(e){return ps(Ga,e)}var Ar=l("ZodDate",(e,t)=>{ai.init(e,t),y.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Gs(e,n,o,i),e.min=(n,o)=>e.check(J(n,o)),e.max=(n,o)=>e.check(x(n,o));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function Du(e){return hs(Ar,e)}var Ya=l("ZodArray",(e,t)=>
vendor: 1,883 bytes, line 52
52{ze(),ui.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ea(e,r,n,o),e.element=t.element},{min(e,t){return this.check(de(e,t))},nonempty(e){return this.check(de(1,e))},max(e,t){return this.check(pr(e,t))},length(e,t){return this.check(hr(e,t))},unwrap(){return this.element}});function qa(e,t){return Es(Ya,e,t)}var qe=l("ZodObject",(e,t)=>{ze(),li.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ta(e,r,n,o),cn(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return tu(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:Ce()})},loose(){return this.clone({...this._zod.def,catchall:Ce()})},strict(){return this.clone({...this._zod.def,catchall:Tr()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Xr(this,e)},safeExtend(e){return Hr(this,e)},merge(e){return Qr(this,e)},pick(e){return Yr(this,e)},omit(e){return qr(this,e)},partial(...e){return nt(Rr,this,e[0])},exactPartial(...e){return nt(Cr,this,e[0],"exactPartial")},required(...e){return en(Fr,this,e[0])}});function Ru(e,t){return new qe({type:"object",shape:e??{},...m(t)})}function Cu(e,t){return new qe({type:"object",shape:e,catchall:Tr(),...m(t)})}function Fu(e,t){return new qe({type:"object",shape:e,catchall:Ce(),...m(t)})}var jr=l("ZodUnion",(e,t)=>{er.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ra(e,r,n,o),e.options=t.options});function Xa(e,t){return new jr({type:"union",options:e,...m(t)})}var Ha=l("ZodDiscriminatedUnion",(e,t)=>{jr.init(e,t),di.init(e,t)});function Uu(e,t,r){return new Ha({type:"union",options:t,discriminator:e,...m(r)})}var Qa=l("ZodIntersection",(e,t)=>{pi.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>na(e,r,n,o)});function eu(e,t){return new Qa({type:"intersection",left:e,right:t})}var Fe=l("ZodRecord",(e,t)=>
52{ze(),hi.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ia(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function Mu(e,t,r){return!t||!t._zod?new Fe({type:"record",keyType:Za(),valueType:e,...m(t)}):new Fe({type:"record",keyType:e,valueType:t,...m(r)})}function xu(e,t,r){return new Fe({type:"record",keyType:e,valueType:t,...m(r),partial:!0})}var Ue=l("ZodEnum",(e,t)=>{mi.init(e,t),y.init(e,t),e._zod.processJSONSchema=(n,o,i)=>Ys(e,n,o,i),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{const i={};for(const s of n)if(r.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Ue({...t,checks:[],...m(o),entries:i})},e.exclude=(n,o)=>{const i={...t.entries};for(const s of n)if(r.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Ue({...t,checks:[],...m(o),entries:i})}});function tu(e,t){return new Ue({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e,...m(t)})}var ru=l("ZodLiteral",(e,t)=>{vi.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>qs(e,r,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if
vendor: 3,917 bytes, line 52
52(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Ju(e,t){return new ru({type:"literal",values:Array.isArray(e)?e:[e],...m(t)})}var nu=l("ZodFile",(e,t)=>{_i.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Xs(e,r,n,o),e.min=(r,n)=>e.check(_s(r,n)),e.max=(r,n)=>e.check(vs(r,n)),e.mime=(r,n)=>e.check($s(Array.isArray(r)?r:[r],n))});function Lu(e){return Ns(nu,e)}var ou=l("ZodTransform",(e,t)=>{ze(),gi.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Qs(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ct(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(te(i,r.value,t));else{const s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=r.value),s.inst??(s.inst=e),r.issues.push(te(s))}};const o=t.transform(r.value,r);return o instanceof Promise?o.then(i=>(r.value=i,r)):(r.value=o,r)}});function Dr(e){return new ou({type:"transform",transform:e})}var Rr=l("ZodOptional",(e,t)=>{tr.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>zr(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function St(e){return new Rr({type:"optional",innerType:e})}var Cr=l("ZodExactOptional",(e,t)=>{bi.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>zr(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function iu(e){return new Cr({type:"optional",innerType:e})}var su=l("ZodNullable",(e,t)=>{yi.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>sa(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function It(e){return new su({type:"nullable",innerType:e})}var au=l("ZodDefault",(e,t)=>{zi.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ua(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function uu(e,t){return new au({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():At(t)}})}var cu=l("ZodPrefault",(e,t)=>{wi.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>ca(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function fu(e,t){return new cu({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():At(t)}})}var Fr=l("ZodNonOptional",(e,t)=>{ki.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>aa(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function lu(e,t){return new Fr({type:"nonoptional",innerType:e,...m(t)})}var du=l("ZodCatch",(e,t)=>{$i.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>fa(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function pu(e,t){return new du({type:"catch",innerType:e,catchValue:typeof t=="function"?t:ln(t)})}var Xe=l("ZodPipe",(e,t)=>{rr.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>la(e,r,n,o),e.in=t.in,e.out=t.out});function Pt(e,t){return new Xe({type:"pipe",in:e,out:t})}var hu=l("ZodCodec",(e,t)=>{Xe.init(e,t),nr.init(e,t)}),mu=l("ZodPreprocess",(e,t)=>{Xe.init(e,t),Oi.init(e,t)}),vu=l("ZodReadonly",(e,t)=>{Zi.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>da(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function _u(e){return new vu({type:"readonly",innerType:e})}var gu=l("ZodCustom",(e,t)=>{Si.init(e,t),y.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Hs(e,r,n,o)});function bu(e,t={}){return Ts(gu,e,t)}function yu(e,t){return As(e,t)}var Vu=(...e)=>Ds({Codec:hu,Boolean:Ye,String:$r},...e);function Bu(e,t){return new mu({type:"pipe",in:Dr(e),out:t})}function Ku(e){return lr(Or,e)}function Wu(e){return dr(Zr,e)}function Gu(e){return ns(Ge,e)}function Yu(e){return ss(Ye,e)}function qu(e){return us(Nr,e)}function Xu(e){return ms(Ar,e)}export{Cu as A,Fu as C,xu as D,Ru as E,Zu as F,$u as I,Ou as L,Vu as M,Xa as N,Bu as O,Ce as P,wu as R,Ju as S,Pu as T,Lu as _,Wu as a,Su as b,Tu as c,qa as d,Nu as f,ku as g,Uu as h,Gu as i,Za as j,Mu as k,ju as l,Du as m,Yu as n,Ku as o,Eu as p,Xu as r,tu as s,qu as t,Au as u,Zt as v,Tr as w,Iu as x,eu as y,zu as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.