sliccy 1.23.2 → 1.23.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/ui/assets/{___vite-browser-external_commonjs-proxy-DJjtBAzT.js → ___vite-browser-external_commonjs-proxy-BZRJ6_X4.js} +1 -1
  2. package/dist/ui/assets/{anthropic-D2LAO3ec.js → anthropic-CFRG0Hfe.js} +1 -1
  3. package/dist/ui/assets/anthropic-h0YkYJvY.js +2 -0
  4. package/dist/ui/assets/azure-openai-responses-B72ahkq2.js +1 -0
  5. package/dist/ui/assets/{azure-openai-responses-CRZc4-49.js → azure-openai-responses-DiuVg7QC.js} +1 -1
  6. package/dist/ui/assets/{bsh-watchdog-DF1jz7YG.js → bsh-watchdog-BHj7Fs8o.js} +1 -1
  7. package/dist/ui/assets/client-CLc9DbbF.js +23 -0
  8. package/dist/ui/assets/github-copilot-headers-Dz44zqGk.js +1 -0
  9. package/dist/ui/assets/google-CVSsY19W.js +1 -0
  10. package/dist/ui/assets/{google-U_C7Pazm.js → google-FJTEoy_e.js} +1 -1
  11. package/dist/ui/assets/google-gemini-cli-T80C305w.js +2 -0
  12. package/dist/ui/assets/{google-gemini-cli-CzBfYt4_.js → google-gemini-cli-gF7kFWc4.js} +1 -1
  13. package/dist/ui/assets/{google-shared-FSIbZjLZ.js → google-shared-BjArPveV.js} +1 -1
  14. package/dist/ui/assets/google-shared-CYYiav7i.js +2 -0
  15. package/dist/ui/assets/google-vertex-6VDNXf5n.js +1 -0
  16. package/dist/ui/assets/{google-vertex-C732IhNh.js → google-vertex-CjjOIg6q.js} +1 -1
  17. package/dist/ui/assets/hash-k-C9KAKF.js +1 -0
  18. package/dist/ui/assets/{index-BfTbMhIq.js → index-BTBHJQVY.js} +1 -1
  19. package/dist/ui/assets/{index-DknnmEPX.js → index-BbFB6aZt.js} +2 -2
  20. package/dist/ui/assets/{index-YmeV9Jqf.js → index-C7KXlIoI.js} +1 -1
  21. package/dist/ui/assets/{index-CNJf5i_6.js → index-C9qsgFXA.js} +1 -1
  22. package/dist/ui/assets/{index-B-xljX2v.js → index-CMitoXJI.js} +1 -1
  23. package/dist/ui/assets/index-CYH9nDaE.js +15023 -0
  24. package/dist/ui/assets/{index-CaNBjh71.js → index-CmZETbUD.js} +1 -1
  25. package/dist/ui/assets/{index-CKEflIkf.js → index-Et7zk9Rb.js} +2 -2
  26. package/dist/ui/assets/{index-CeyfbT1z.js → index-TCK0ykMx.js} +1 -1
  27. package/dist/ui/assets/index-uz_REvSi.js +5 -0
  28. package/dist/ui/assets/{json-parse-BCE40htG.js → json-parse-BRxcI2Wj.js} +1 -1
  29. package/dist/ui/assets/json-parse-zqPLE5kv.js +1 -0
  30. package/dist/ui/assets/{mistral-BDvM3VUI.js → mistral-BnNh3LzR.js} +8 -8
  31. package/dist/ui/assets/mistral-DBk4zmZV.js +8 -0
  32. package/dist/ui/assets/{offscreen-client-L-9S-Lfw.js → offscreen-client-DdMA5sAC.js} +1 -1
  33. package/dist/ui/assets/openai-codex-responses-BRTJp-Ny.js +7 -0
  34. package/dist/ui/assets/{openai-codex-responses-B17sbyI5.js → openai-codex-responses-DXePmJ37.js} +1 -1
  35. package/dist/ui/assets/{openai-completions-4N9csiit.js → openai-completions-BJ5tXvNF.js} +1 -1
  36. package/dist/ui/assets/openai-completions-CFS00Zu3.js +6 -0
  37. package/dist/ui/assets/openai-responses-D0cbe-PZ.js +1 -0
  38. package/dist/ui/assets/{openai-responses-j29whBIs.js → openai-responses-GLrZ6X81.js} +1 -1
  39. package/dist/ui/assets/openai-responses-shared-B_0Hvupy.js +10 -0
  40. package/dist/ui/assets/{openai-responses-shared-CNs3k_0q.js → openai-responses-shared-CCp4pUoS.js} +1 -1
  41. package/dist/ui/assets/{sql-wasm-D8k4OLXL.js → sql-wasm-WyohJvyK.js} +1 -1
  42. package/dist/ui/assets/transform-messages-DqxXnsXK.js +1 -0
  43. package/dist/ui/index.html +1 -1
  44. package/dist/ui/packages/webapp/index.html +1 -1
  45. package/package.json +1 -1
  46. package/dist/ui/assets/index-BKFeHvuQ.js +0 -15079
@@ -0,0 +1,5 @@
1
+ var q={},ae={},Y={},mt={exports:{}},H={},At={},Ht;function yt(){return Ht||(Ht=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.getParsedType=r.ZodParsedType=r.objectUtil=r.util=void 0;var _;(function(s){s.assertEqual=f=>{};function i(f){}s.assertIs=i;function h(f){throw new Error}s.assertNever=h,s.arrayToEnum=f=>{const T={};for(const y of f)T[y]=y;return T},s.getValidEnumValues=f=>{const T=s.objectKeys(f).filter(b=>typeof f[f[b]]!="number"),y={};for(const b of T)y[b]=f[b];return s.objectValues(y)},s.objectValues=f=>s.objectKeys(f).map(function(T){return f[T]}),s.objectKeys=typeof Object.keys=="function"?f=>Object.keys(f):f=>{const T=[];for(const y in f)Object.prototype.hasOwnProperty.call(f,y)&&T.push(y);return T},s.find=(f,T)=>{for(const y of f)if(T(y))return y},s.isInteger=typeof Number.isInteger=="function"?f=>Number.isInteger(f):f=>typeof f=="number"&&Number.isFinite(f)&&Math.floor(f)===f;function l(f,T=" | "){return f.map(y=>typeof y=="string"?`'${y}'`:y).join(T)}s.joinValues=l,s.jsonStringifyReplacer=(f,T)=>typeof T=="bigint"?T.toString():T})(_||(r.util=_={}));var o;(function(s){s.mergeShapes=(i,h)=>({...i,...h})})(o||(r.objectUtil=o={})),r.ZodParsedType=_.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);const n=s=>{switch(typeof s){case"undefined":return r.ZodParsedType.undefined;case"string":return r.ZodParsedType.string;case"number":return Number.isNaN(s)?r.ZodParsedType.nan:r.ZodParsedType.number;case"boolean":return r.ZodParsedType.boolean;case"function":return r.ZodParsedType.function;case"bigint":return r.ZodParsedType.bigint;case"symbol":return r.ZodParsedType.symbol;case"object":return Array.isArray(s)?r.ZodParsedType.array:s===null?r.ZodParsedType.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?r.ZodParsedType.promise:typeof Map<"u"&&s instanceof Map?r.ZodParsedType.map:typeof Set<"u"&&s instanceof Set?r.ZodParsedType.set:typeof Date<"u"&&s instanceof Date?r.ZodParsedType.date:r.ZodParsedType.object;default:return r.ZodParsedType.unknown}};r.getParsedType=n})(At)),At}var Gt;function wt(){if(Gt)return H;Gt=1,Object.defineProperty(H,"__esModule",{value:!0}),H.ZodError=H.quotelessJson=H.ZodIssueCode=void 0;const r=yt();H.ZodIssueCode=r.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);const _=n=>JSON.stringify(n,null,2).replace(/"([^"]+)":/g,"$1:");H.quotelessJson=_;let o=class Wr extends Error{get errors(){return this.issues}constructor(s){super(),this.issues=[],this.addIssue=h=>{this.issues=[...this.issues,h]},this.addIssues=(h=[])=>{this.issues=[...this.issues,...h]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=s}format(s){const i=s||function(f){return f.message},h={_errors:[]},l=f=>{for(const T of f.issues)if(T.code==="invalid_union")T.unionErrors.map(l);else if(T.code==="invalid_return_type")l(T.returnTypeError);else if(T.code==="invalid_arguments")l(T.argumentsError);else if(T.path.length===0)h._errors.push(i(T));else{let y=h,b=0;for(;b<T.path.length;){const Z=T.path[b];b===T.path.length-1?(y[Z]=y[Z]||{_errors:[]},y[Z]._errors.push(i(T))):y[Z]=y[Z]||{_errors:[]},y=y[Z],b++}}};return l(this),h}static assert(s){if(!(s instanceof Wr))throw new Error(`Not a ZodError: ${s}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,r.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(s=i=>i.message){const i=Object.create(null),h=[];for(const l of this.issues)if(l.path.length>0){const f=l.path[0];i[f]=i[f]||[],i[f].push(s(l))}else h.push(s(l));return{formErrors:h,fieldErrors:i}}get formErrors(){return this.flatten()}};return H.ZodError=o,o.create=n=>new o(n),H}var Qt;function Jr(){return Qt||(Qt=1,(function(r,_){Object.defineProperty(_,"__esModule",{value:!0});const o=wt(),n=yt(),s=(i,h)=>{let l;switch(i.code){case o.ZodIssueCode.invalid_type:i.received===n.ZodParsedType.undefined?l="Required":l=`Expected ${i.expected}, received ${i.received}`;break;case o.ZodIssueCode.invalid_literal:l=`Invalid literal value, expected ${JSON.stringify(i.expected,n.util.jsonStringifyReplacer)}`;break;case o.ZodIssueCode.unrecognized_keys:l=`Unrecognized key(s) in object: ${n.util.joinValues(i.keys,", ")}`;break;case o.ZodIssueCode.invalid_union:l="Invalid input";break;case o.ZodIssueCode.invalid_union_discriminator:l=`Invalid discriminator value. Expected ${n.util.joinValues(i.options)}`;break;case o.ZodIssueCode.invalid_enum_value:l=`Invalid enum value. Expected ${n.util.joinValues(i.options)}, received '${i.received}'`;break;case o.ZodIssueCode.invalid_arguments:l="Invalid function arguments";break;case o.ZodIssueCode.invalid_return_type:l="Invalid function return type";break;case o.ZodIssueCode.invalid_date:l="Invalid date";break;case o.ZodIssueCode.invalid_string:typeof i.validation=="object"?"includes"in i.validation?(l=`Invalid input: must include "${i.validation.includes}"`,typeof i.validation.position=="number"&&(l=`${l} at one or more positions greater than or equal to ${i.validation.position}`)):"startsWith"in i.validation?l=`Invalid input: must start with "${i.validation.startsWith}"`:"endsWith"in i.validation?l=`Invalid input: must end with "${i.validation.endsWith}"`:n.util.assertNever(i.validation):i.validation!=="regex"?l=`Invalid ${i.validation}`:l="Invalid";break;case o.ZodIssueCode.too_small:i.type==="array"?l=`Array must contain ${i.exact?"exactly":i.inclusive?"at least":"more than"} ${i.minimum} element(s)`:i.type==="string"?l=`String must contain ${i.exact?"exactly":i.inclusive?"at least":"over"} ${i.minimum} character(s)`:i.type==="number"?l=`Number must be ${i.exact?"exactly equal to ":i.inclusive?"greater than or equal to ":"greater than "}${i.minimum}`:i.type==="bigint"?l=`Number must be ${i.exact?"exactly equal to ":i.inclusive?"greater than or equal to ":"greater than "}${i.minimum}`:i.type==="date"?l=`Date must be ${i.exact?"exactly equal to ":i.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(i.minimum))}`:l="Invalid input";break;case o.ZodIssueCode.too_big:i.type==="array"?l=`Array must contain ${i.exact?"exactly":i.inclusive?"at most":"less than"} ${i.maximum} element(s)`:i.type==="string"?l=`String must contain ${i.exact?"exactly":i.inclusive?"at most":"under"} ${i.maximum} character(s)`:i.type==="number"?l=`Number must be ${i.exact?"exactly":i.inclusive?"less than or equal to":"less than"} ${i.maximum}`:i.type==="bigint"?l=`BigInt must be ${i.exact?"exactly":i.inclusive?"less than or equal to":"less than"} ${i.maximum}`:i.type==="date"?l=`Date must be ${i.exact?"exactly":i.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(i.maximum))}`:l="Invalid input";break;case o.ZodIssueCode.custom:l="Invalid input";break;case o.ZodIssueCode.invalid_intersection_types:l="Intersection results could not be merged";break;case o.ZodIssueCode.not_multiple_of:l=`Number must be a multiple of ${i.multipleOf}`;break;case o.ZodIssueCode.not_finite:l="Number must be finite";break;default:l=h.defaultError,n.util.assertNever(i)}return{message:l}};_.default=s,r.exports=_.default})(mt,mt.exports)),mt.exports}var Xt;function Nt(){if(Xt)return Y;Xt=1;var r=Y&&Y.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Y,"__esModule",{value:!0}),Y.defaultErrorMap=void 0,Y.setErrorMap=n,Y.getErrorMap=s;const _=r(Jr());Y.defaultErrorMap=_.default;let o=_.default;function n(i){o=i}function s(){return o}return Y}var Ae={},$t;function Yr(){return $t||($t=1,(function(r){var _=Ae&&Ae.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(r,"__esModule",{value:!0}),r.isAsync=r.isValid=r.isDirty=r.isAborted=r.OK=r.DIRTY=r.INVALID=r.ParseStatus=r.EMPTY_PATH=r.makeIssue=void 0,r.addIssueToContext=i;const o=Nt(),n=_(Jr()),s=m=>{const{data:A,path:S,errorMaps:w,issueData:O}=m,D=[...S,...O.path||[]],M={...O,path:D};if(O.message!==void 0)return{...O,path:D,message:O.message};let $="";const fe=w.filter(ee=>!!ee).slice().reverse();for(const ee of fe)$=ee(M,{data:A,defaultError:$}).message;return{...O,path:D,message:$}};r.makeIssue=s,r.EMPTY_PATH=[];function i(m,A){const S=(0,o.getErrorMap)(),w=(0,r.makeIssue)({issueData:A,data:m.data,path:m.path,errorMaps:[m.common.contextualErrorMap,m.schemaErrorMap,S,S===n.default?void 0:n.default].filter(O=>!!O)});m.common.issues.push(w)}class h{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(A,S){const w=[];for(const O of S){if(O.status==="aborted")return r.INVALID;O.status==="dirty"&&A.dirty(),w.push(O.value)}return{status:A.value,value:w}}static async mergeObjectAsync(A,S){const w=[];for(const O of S){const D=await O.key,M=await O.value;w.push({key:D,value:M})}return h.mergeObjectSync(A,w)}static mergeObjectSync(A,S){const w={};for(const O of S){const{key:D,value:M}=O;if(D.status==="aborted"||M.status==="aborted")return r.INVALID;D.status==="dirty"&&A.dirty(),M.status==="dirty"&&A.dirty(),D.value!=="__proto__"&&(typeof M.value<"u"||O.alwaysSet)&&(w[D.value]=M.value)}return{status:A.value,value:w}}}r.ParseStatus=h,r.INVALID=Object.freeze({status:"aborted"});const l=m=>({status:"dirty",value:m});r.DIRTY=l;const f=m=>({status:"valid",value:m});r.OK=f;const T=m=>m.status==="aborted";r.isAborted=T;const y=m=>m.status==="dirty";r.isDirty=y;const b=m=>m.status==="valid";r.isValid=b;const Z=m=>typeof Promise<"u"&&m instanceof Promise;r.isAsync=Z})(Ae)),Ae}var Dt={},er;function na(){return er||(er=1,Object.defineProperty(Dt,"__esModule",{value:!0})),Dt}var p={},De={},tr;function aa(){if(tr)return De;tr=1,Object.defineProperty(De,"__esModule",{value:!0}),De.errorUtil=void 0;var r;return(function(_){_.errToObj=o=>typeof o=="string"?{message:o}:o||{},_.toString=o=>typeof o=="string"?o:o?.message})(r||(De.errorUtil=r={})),De}var rr;function sa(){if(rr)return p;rr=1,Object.defineProperty(p,"__esModule",{value:!0}),p.discriminatedUnion=p.date=p.boolean=p.bigint=p.array=p.any=p.coerce=p.ZodFirstPartyTypeKind=p.late=p.ZodSchema=p.Schema=p.ZodReadonly=p.ZodPipeline=p.ZodBranded=p.BRAND=p.ZodNaN=p.ZodCatch=p.ZodDefault=p.ZodNullable=p.ZodOptional=p.ZodTransformer=p.ZodEffects=p.ZodPromise=p.ZodNativeEnum=p.ZodEnum=p.ZodLiteral=p.ZodLazy=p.ZodFunction=p.ZodSet=p.ZodMap=p.ZodRecord=p.ZodTuple=p.ZodIntersection=p.ZodDiscriminatedUnion=p.ZodUnion=p.ZodObject=p.ZodArray=p.ZodVoid=p.ZodNever=p.ZodUnknown=p.ZodAny=p.ZodNull=p.ZodUndefined=p.ZodSymbol=p.ZodDate=p.ZodBoolean=p.ZodBigInt=p.ZodNumber=p.ZodString=p.ZodType=void 0,p.NEVER=p.void=p.unknown=p.union=p.undefined=p.tuple=p.transformer=p.symbol=p.string=p.strictObject=p.set=p.record=p.promise=p.preprocess=p.pipeline=p.ostring=p.optional=p.onumber=p.oboolean=p.object=p.number=p.nullable=p.null=p.never=p.nativeEnum=p.nan=p.map=p.literal=p.lazy=p.intersection=p.instanceof=p.function=p.enum=p.effect=void 0,p.datetimeRegex=ut,p.custom=Ft;const r=wt(),_=Nt(),o=aa(),n=Yr(),s=yt();class i{constructor(e,t,a,u){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=u}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const h=(d,e)=>{if((0,n.isValid)(e))return{success:!0,data:e.value};if(!d.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new r.ZodError(d.common.issues);return this._error=t,this._error}}};function l(d){if(!d)return{};const{errorMap:e,invalid_type_error:t,required_error:a,description:u}=d;if(e&&(t||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:u}:{errorMap:(v,g)=>{const{message:I}=d;return v.code==="invalid_enum_value"?{message:I??g.defaultError}:typeof g.data>"u"?{message:I??a??g.defaultError}:v.code!=="invalid_type"?{message:g.defaultError}:{message:I??t??g.defaultError}},description:u}}class f{get description(){return this._def.description}_getType(e){return(0,s.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,s.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new n.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,s.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if((0,n.isAsync)(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){const a={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,s.getParsedType)(e)},u=this._parseSync({data:e,path:a.path,parent:a});return h(a,u)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,s.getParsedType)(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:t});return(0,n.isValid)(a)?{value:a.value}:{issues:t.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>(0,n.isValid)(a)?{value:a.value}:{issues:t.common.issues})}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,s.getParsedType)(e)},u=this._parse({data:e,path:a.path,parent:a}),c=await((0,n.isAsync)(u)?u:Promise.resolve(u));return h(a,c)}refine(e,t){const a=u=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(u):t;return this._refinement((u,c)=>{const v=e(u),g=()=>c.addIssue({code:r.ZodIssueCode.custom,...a(u)});return typeof Promise<"u"&&v instanceof Promise?v.then(I=>I?!0:(g(),!1)):v?!0:(g(),!1)})}refinement(e,t){return this._refinement((a,u)=>e(a)?!0:(u.addIssue(typeof t=="function"?t(a,u):t),!1))}_refinement(e){return new L({schema:this,typeName:k.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return B.create(this,this._def)}nullable(){return X.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return U.create(this)}promise(){return le.create(this,this._def)}or(e){return ye.create([this,e],this._def)}and(e){return _e.create(this,e,this._def)}transform(e){return new L({...l(this._def),schema:this,typeName:k.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Te({...l(this._def),innerType:this,defaultValue:t,typeName:k.ZodDefault})}brand(){return new Pt({typeName:k.ZodBranded,type:this,...l(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Ie({...l(this._def),innerType:this,catchValue:t,typeName:k.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Pe.create(this,e)}readonly(){return ke.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}p.ZodType=f,p.Schema=f,p.ZodSchema=f;const T=/^c[^\s-]{8,}$/i,y=/^[0-9a-z]+$/,b=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Z=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,m=/^[a-z0-9_-]{21}$/i,A=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,S=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,w=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,O="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let D;const M=/^(?:(?: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])$/,$=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,fe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ee=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_t=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,gt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ot="((\\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])))",vt=new RegExp(`^${ot}$`);function dt(d){let e="[0-5]\\d";d.precision?e=`${e}\\.\\d{${d.precision}}`:d.precision==null&&(e=`${e}(\\.\\d+)?`);const t=d.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function bt(d){return new RegExp(`^${dt(d)}$`)}function ut(d){let e=`${ot}T${dt(d)}`;const t=[];return t.push(d.local?"Z?":"Z"),d.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Zt(d,e){return!!((e==="v4"||!e)&&M.test(d)||(e==="v6"||!e)&&fe.test(d))}function Tt(d,e){if(!A.test(d))return!1;try{const[t]=d.split(".");if(!t)return!1;const a=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),u=JSON.parse(atob(a));return!(typeof u!="object"||u===null||"typ"in u&&u?.typ!=="JWT"||!u.alg||e&&u.alg!==e)}catch{return!1}}function j(d,e){return!!((e==="v4"||!e)&&$.test(d)||(e==="v6"||!e)&&ee.test(d))}class E extends f{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==s.ZodParsedType.string){const c=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(c,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.string,received:c.parsedType}),n.INVALID}const a=new n.ParseStatus;let u;for(const c of this._def.checks)if(c.kind==="min")e.data.length<c.value&&(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{code:r.ZodIssueCode.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),a.dirty());else if(c.kind==="max")e.data.length>c.value&&(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{code:r.ZodIssueCode.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),a.dirty());else if(c.kind==="length"){const v=e.data.length>c.value,g=e.data.length<c.value;(v||g)&&(u=this._getOrReturnCtx(e,u),v?(0,n.addIssueToContext)(u,{code:r.ZodIssueCode.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}):g&&(0,n.addIssueToContext)(u,{code:r.ZodIssueCode.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}),a.dirty())}else if(c.kind==="email")w.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{validation:"email",code:r.ZodIssueCode.invalid_string,message:c.message}),a.dirty());else if(c.kind==="emoji")D||(D=new RegExp(O,"u")),D.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{validation:"emoji",code:r.ZodIssueCode.invalid_string,message:c.message}),a.dirty());else if(c.kind==="uuid")Z.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{validation:"uuid",code:r.ZodIssueCode.invalid_string,message:c.message}),a.dirty());else if(c.kind==="nanoid")m.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{validation:"nanoid",code:r.ZodIssueCode.invalid_string,message:c.message}),a.dirty());else if(c.kind==="cuid")T.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{validation:"cuid",code:r.ZodIssueCode.invalid_string,message:c.message}),a.dirty());else if(c.kind==="cuid2")y.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{validation:"cuid2",code:r.ZodIssueCode.invalid_string,message:c.message}),a.dirty());else if(c.kind==="ulid")b.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{validation:"ulid",code:r.ZodIssueCode.invalid_string,message:c.message}),a.dirty());else if(c.kind==="url")try{new URL(e.data)}catch{u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{validation:"url",code:r.ZodIssueCode.invalid_string,message:c.message}),a.dirty()}else c.kind==="regex"?(c.regex.lastIndex=0,c.regex.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{validation:"regex",code:r.ZodIssueCode.invalid_string,message:c.message}),a.dirty())):c.kind==="trim"?e.data=e.data.trim():c.kind==="includes"?e.data.includes(c.value,c.position)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{code:r.ZodIssueCode.invalid_string,validation:{includes:c.value,position:c.position},message:c.message}),a.dirty()):c.kind==="toLowerCase"?e.data=e.data.toLowerCase():c.kind==="toUpperCase"?e.data=e.data.toUpperCase():c.kind==="startsWith"?e.data.startsWith(c.value)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{code:r.ZodIssueCode.invalid_string,validation:{startsWith:c.value},message:c.message}),a.dirty()):c.kind==="endsWith"?e.data.endsWith(c.value)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{code:r.ZodIssueCode.invalid_string,validation:{endsWith:c.value},message:c.message}),a.dirty()):c.kind==="datetime"?ut(c).test(e.data)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{code:r.ZodIssueCode.invalid_string,validation:"datetime",message:c.message}),a.dirty()):c.kind==="date"?vt.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{code:r.ZodIssueCode.invalid_string,validation:"date",message:c.message}),a.dirty()):c.kind==="time"?bt(c).test(e.data)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{code:r.ZodIssueCode.invalid_string,validation:"time",message:c.message}),a.dirty()):c.kind==="duration"?S.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{validation:"duration",code:r.ZodIssueCode.invalid_string,message:c.message}),a.dirty()):c.kind==="ip"?Zt(e.data,c.version)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{validation:"ip",code:r.ZodIssueCode.invalid_string,message:c.message}),a.dirty()):c.kind==="jwt"?Tt(e.data,c.alg)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{validation:"jwt",code:r.ZodIssueCode.invalid_string,message:c.message}),a.dirty()):c.kind==="cidr"?j(e.data,c.version)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{validation:"cidr",code:r.ZodIssueCode.invalid_string,message:c.message}),a.dirty()):c.kind==="base64"?_t.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{validation:"base64",code:r.ZodIssueCode.invalid_string,message:c.message}),a.dirty()):c.kind==="base64url"?gt.test(e.data)||(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{validation:"base64url",code:r.ZodIssueCode.invalid_string,message:c.message}),a.dirty()):s.util.assertNever(c);return{status:a.value,value:e.data}}_regex(e,t,a){return this.refinement(u=>e.test(u),{validation:t,code:r.ZodIssueCode.invalid_string,...o.errorUtil.errToObj(a)})}_addCheck(e){return new E({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...o.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...o.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...o.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...o.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...o.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...o.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...o.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...o.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...o.errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...o.errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...o.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...o.errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...o.errorUtil.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...o.errorUtil.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...o.errorUtil.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...o.errorUtil.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...o.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...o.errorUtil.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...o.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...o.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...o.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...o.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...o.errorUtil.errToObj(t)})}nonempty(e){return this.min(1,o.errorUtil.errToObj(e))}trim(){return new E({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new E({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new E({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}p.ZodString=E,E.create=d=>new E({checks:[],typeName:k.ZodString,coerce:d?.coerce??!1,...l(d)});function C(d,e){const t=(d.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,u=t>a?t:a,c=Number.parseInt(d.toFixed(u).replace(".","")),v=Number.parseInt(e.toFixed(u).replace(".",""));return c%v/10**u}class K extends f{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==s.ZodParsedType.number){const c=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(c,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.number,received:c.parsedType}),n.INVALID}let a;const u=new n.ParseStatus;for(const c of this._def.checks)c.kind==="int"?s.util.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:c.message}),u.dirty()):c.kind==="min"?(c.inclusive?e.data<c.value:e.data<=c.value)&&(a=this._getOrReturnCtx(e,a),(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.too_small,minimum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),u.dirty()):c.kind==="max"?(c.inclusive?e.data>c.value:e.data>=c.value)&&(a=this._getOrReturnCtx(e,a),(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.too_big,maximum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),u.dirty()):c.kind==="multipleOf"?C(e.data,c.value)!==0&&(a=this._getOrReturnCtx(e,a),(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.not_multiple_of,multipleOf:c.value,message:c.message}),u.dirty()):c.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.not_finite,message:c.message}),u.dirty()):s.util.assertNever(c);return{status:u.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,o.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,o.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,o.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,o.errorUtil.toString(t))}setLimit(e,t,a,u){return new K({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:o.errorUtil.toString(u)}]})}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:o.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:o.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:o.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:o.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:o.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:o.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:o.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:o.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:o.errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&s.util.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(t===null||a.value>t)&&(t=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}p.ZodNumber=K,K.create=d=>new K({checks:[],typeName:k.ZodNumber,coerce:d?.coerce||!1,...l(d)});class G extends f{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==s.ZodParsedType.bigint)return this._getInvalidInput(e);let a;const u=new n.ParseStatus;for(const c of this._def.checks)c.kind==="min"?(c.inclusive?e.data<c.value:e.data<=c.value)&&(a=this._getOrReturnCtx(e,a),(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.too_small,type:"bigint",minimum:c.value,inclusive:c.inclusive,message:c.message}),u.dirty()):c.kind==="max"?(c.inclusive?e.data>c.value:e.data>=c.value)&&(a=this._getOrReturnCtx(e,a),(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.too_big,type:"bigint",maximum:c.value,inclusive:c.inclusive,message:c.message}),u.dirty()):c.kind==="multipleOf"?e.data%c.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.not_multiple_of,multipleOf:c.value,message:c.message}),u.dirty()):s.util.assertNever(c);return{status:u.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.bigint,received:t.parsedType}),n.INVALID}gte(e,t){return this.setLimit("min",e,!0,o.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,o.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,o.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,o.errorUtil.toString(t))}setLimit(e,t,a,u){return new G({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:o.errorUtil.toString(u)}]})}_addCheck(e){return new G({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:o.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:o.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:o.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:o.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:o.errorUtil.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}p.ZodBigInt=G,G.create=d=>new G({checks:[],typeName:k.ZodBigInt,coerce:d?.coerce??!1,...l(d)});class pe extends f{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==s.ZodParsedType.boolean){const a=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.boolean,received:a.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}p.ZodBoolean=pe,pe.create=d=>new pe({typeName:k.ZodBoolean,coerce:d?.coerce||!1,...l(d)});class te extends f{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==s.ZodParsedType.date){const c=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(c,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.date,received:c.parsedType}),n.INVALID}if(Number.isNaN(e.data.getTime())){const c=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(c,{code:r.ZodIssueCode.invalid_date}),n.INVALID}const a=new n.ParseStatus;let u;for(const c of this._def.checks)c.kind==="min"?e.data.getTime()<c.value&&(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{code:r.ZodIssueCode.too_small,message:c.message,inclusive:!0,exact:!1,minimum:c.value,type:"date"}),a.dirty()):c.kind==="max"?e.data.getTime()>c.value&&(u=this._getOrReturnCtx(e,u),(0,n.addIssueToContext)(u,{code:r.ZodIssueCode.too_big,message:c.message,inclusive:!0,exact:!1,maximum:c.value,type:"date"}),a.dirty()):s.util.assertNever(c);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:o.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:o.errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}p.ZodDate=te,te.create=d=>new te({checks:[],coerce:d?.coerce||!1,typeName:k.ZodDate,...l(d)});class ct extends f{_parse(e){if(this._getType(e)!==s.ZodParsedType.symbol){const a=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.symbol,received:a.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}p.ZodSymbol=ct,ct.create=d=>new ct({typeName:k.ZodSymbol,...l(d)});class he extends f{_parse(e){if(this._getType(e)!==s.ZodParsedType.undefined){const a=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.undefined,received:a.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}p.ZodUndefined=he,he.create=d=>new he({typeName:k.ZodUndefined,...l(d)});class me extends f{_parse(e){if(this._getType(e)!==s.ZodParsedType.null){const a=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.null,received:a.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}p.ZodNull=me,me.create=d=>new me({typeName:k.ZodNull,...l(d)});class de extends f{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,n.OK)(e.data)}}p.ZodAny=de,de.create=d=>new de({typeName:k.ZodAny,...l(d)});class re extends f{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,n.OK)(e.data)}}p.ZodUnknown=re,re.create=d=>new re({typeName:k.ZodUnknown,...l(d)});class W extends f{_parse(e){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.never,received:t.parsedType}),n.INVALID}}p.ZodNever=W,W.create=d=>new W({typeName:k.ZodNever,...l(d)});class lt extends f{_parse(e){if(this._getType(e)!==s.ZodParsedType.undefined){const a=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.void,received:a.parsedType}),n.INVALID}return(0,n.OK)(e.data)}}p.ZodVoid=lt,lt.create=d=>new lt({typeName:k.ZodVoid,...l(d)});class U extends f{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),u=this._def;if(t.parsedType!==s.ZodParsedType.array)return(0,n.addIssueToContext)(t,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.array,received:t.parsedType}),n.INVALID;if(u.exactLength!==null){const v=t.data.length>u.exactLength.value,g=t.data.length<u.exactLength.value;(v||g)&&((0,n.addIssueToContext)(t,{code:v?r.ZodIssueCode.too_big:r.ZodIssueCode.too_small,minimum:g?u.exactLength.value:void 0,maximum:v?u.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:u.exactLength.message}),a.dirty())}if(u.minLength!==null&&t.data.length<u.minLength.value&&((0,n.addIssueToContext)(t,{code:r.ZodIssueCode.too_small,minimum:u.minLength.value,type:"array",inclusive:!0,exact:!1,message:u.minLength.message}),a.dirty()),u.maxLength!==null&&t.data.length>u.maxLength.value&&((0,n.addIssueToContext)(t,{code:r.ZodIssueCode.too_big,maximum:u.maxLength.value,type:"array",inclusive:!0,exact:!1,message:u.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((v,g)=>u.type._parseAsync(new i(t,v,t.path,g)))).then(v=>n.ParseStatus.mergeArray(a,v));const c=[...t.data].map((v,g)=>u.type._parseSync(new i(t,v,t.path,g)));return n.ParseStatus.mergeArray(a,c)}get element(){return this._def.type}min(e,t){return new U({...this._def,minLength:{value:e,message:o.errorUtil.toString(t)}})}max(e,t){return new U({...this._def,maxLength:{value:e,message:o.errorUtil.toString(t)}})}length(e,t){return new U({...this._def,exactLength:{value:e,message:o.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}p.ZodArray=U,U.create=(d,e)=>new U({type:d,minLength:null,maxLength:null,exactLength:null,typeName:k.ZodArray,...l(e)});function ue(d){if(d instanceof N){const e={};for(const t in d.shape){const a=d.shape[t];e[t]=B.create(ue(a))}return new N({...d._def,shape:()=>e})}else return d instanceof U?new U({...d._def,type:ue(d.element)}):d instanceof B?B.create(ue(d.unwrap())):d instanceof X?X.create(ue(d.unwrap())):d instanceof F?F.create(d.items.map(e=>ue(e))):d}class N extends f{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=s.util.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==s.ZodParsedType.object){const P=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(P,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.object,received:P.parsedType}),n.INVALID}const{status:a,ctx:u}=this._processInputParams(e),{shape:c,keys:v}=this._getCached(),g=[];if(!(this._def.catchall instanceof W&&this._def.unknownKeys==="strip"))for(const P in u.data)v.includes(P)||g.push(P);const I=[];for(const P of v){const x=c[P],V=u.data[P];I.push({key:{status:"valid",value:P},value:x._parse(new i(u,V,u.path,P)),alwaysSet:P in u.data})}if(this._def.catchall instanceof W){const P=this._def.unknownKeys;if(P==="passthrough")for(const x of g)I.push({key:{status:"valid",value:x},value:{status:"valid",value:u.data[x]}});else if(P==="strict")g.length>0&&((0,n.addIssueToContext)(u,{code:r.ZodIssueCode.unrecognized_keys,keys:g}),a.dirty());else if(P!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const P=this._def.catchall;for(const x of g){const V=u.data[x];I.push({key:{status:"valid",value:x},value:P._parse(new i(u,V,u.path,x)),alwaysSet:x in u.data})}}return u.common.async?Promise.resolve().then(async()=>{const P=[];for(const x of I){const V=await x.key,Yt=await x.value;P.push({key:V,value:Yt,alwaysSet:x.alwaysSet})}return P}).then(P=>n.ParseStatus.mergeObjectSync(a,P)):n.ParseStatus.mergeObjectSync(a,I)}get shape(){return this._def.shape()}strict(e){return o.errorUtil.errToObj,new N({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{const u=this._def.errorMap?.(t,a).message??a.defaultError;return t.code==="unrecognized_keys"?{message:o.errorUtil.errToObj(e).message??u}:{message:u}}}:{}})}strip(){return new N({...this._def,unknownKeys:"strip"})}passthrough(){return new N({...this._def,unknownKeys:"passthrough"})}extend(e){return new N({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new N({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:k.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new N({...this._def,catchall:e})}pick(e){const t={};for(const a of s.util.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new N({...this._def,shape:()=>t})}omit(e){const t={};for(const a of s.util.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new N({...this._def,shape:()=>t})}deepPartial(){return ue(this)}partial(e){const t={};for(const a of s.util.objectKeys(this.shape)){const u=this.shape[a];e&&!e[a]?t[a]=u:t[a]=u.optional()}return new N({...this._def,shape:()=>t})}required(e){const t={};for(const a of s.util.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let c=this.shape[a];for(;c instanceof B;)c=c._def.innerType;t[a]=c}return new N({...this._def,shape:()=>t})}keyof(){return qt(s.util.objectKeys(this.shape))}}p.ZodObject=N,N.create=(d,e)=>new N({shape:()=>d,unknownKeys:"strip",catchall:W.create(),typeName:k.ZodObject,...l(e)}),N.strictCreate=(d,e)=>new N({shape:()=>d,unknownKeys:"strict",catchall:W.create(),typeName:k.ZodObject,...l(e)}),N.lazycreate=(d,e)=>new N({shape:d,unknownKeys:"strip",catchall:W.create(),typeName:k.ZodObject,...l(e)});class ye extends f{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;function u(c){for(const g of c)if(g.result.status==="valid")return g.result;for(const g of c)if(g.result.status==="dirty")return t.common.issues.push(...g.ctx.common.issues),g.result;const v=c.map(g=>new r.ZodError(g.ctx.common.issues));return(0,n.addIssueToContext)(t,{code:r.ZodIssueCode.invalid_union,unionErrors:v}),n.INVALID}if(t.common.async)return Promise.all(a.map(async c=>{const v={...t,common:{...t.common,issues:[]},parent:null};return{result:await c._parseAsync({data:t.data,path:t.path,parent:v}),ctx:v}})).then(u);{let c;const v=[];for(const I of a){const P={...t,common:{...t.common,issues:[]},parent:null},x=I._parseSync({data:t.data,path:t.path,parent:P});if(x.status==="valid")return x;x.status==="dirty"&&!c&&(c={result:x,ctx:P}),P.common.issues.length&&v.push(P.common.issues)}if(c)return t.common.issues.push(...c.ctx.common.issues),c.result;const g=v.map(I=>new r.ZodError(I));return(0,n.addIssueToContext)(t,{code:r.ZodIssueCode.invalid_union,unionErrors:g}),n.INVALID}}get options(){return this._def.options}}p.ZodUnion=ye,ye.create=(d,e)=>new ye({options:d,typeName:k.ZodUnion,...l(e)});const J=d=>d instanceof ve?J(d.schema):d instanceof L?J(d.innerType()):d instanceof be?[d.value]:d instanceof Q?d.options:d instanceof Ze?s.util.objectValues(d.enum):d instanceof Te?J(d._def.innerType):d instanceof he?[void 0]:d instanceof me?[null]:d instanceof B?[void 0,...J(d.unwrap())]:d instanceof X?[null,...J(d.unwrap())]:d instanceof Pt||d instanceof ke?J(d.unwrap()):d instanceof Ie?J(d._def.innerType):[];class ft extends f{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.ZodParsedType.object)return(0,n.addIssueToContext)(t,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.object,received:t.parsedType}),n.INVALID;const a=this.discriminator,u=t.data[a],c=this.optionsMap.get(u);return c?t.common.async?c._parseAsync({data:t.data,path:t.path,parent:t}):c._parseSync({data:t.data,path:t.path,parent:t}):((0,n.addIssueToContext)(t,{code:r.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),n.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){const u=new Map;for(const c of t){const v=J(c.shape[e]);if(!v.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const g of v){if(u.has(g))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(g)}`);u.set(g,c)}}return new ft({typeName:k.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:u,...l(a)})}}p.ZodDiscriminatedUnion=ft;function It(d,e){const t=(0,s.getParsedType)(d),a=(0,s.getParsedType)(e);if(d===e)return{valid:!0,data:d};if(t===s.ZodParsedType.object&&a===s.ZodParsedType.object){const u=s.util.objectKeys(e),c=s.util.objectKeys(d).filter(g=>u.indexOf(g)!==-1),v={...d,...e};for(const g of c){const I=It(d[g],e[g]);if(!I.valid)return{valid:!1};v[g]=I.data}return{valid:!0,data:v}}else if(t===s.ZodParsedType.array&&a===s.ZodParsedType.array){if(d.length!==e.length)return{valid:!1};const u=[];for(let c=0;c<d.length;c++){const v=d[c],g=e[c],I=It(v,g);if(!I.valid)return{valid:!1};u.push(I.data)}return{valid:!0,data:u}}else return t===s.ZodParsedType.date&&a===s.ZodParsedType.date&&+d==+e?{valid:!0,data:d}:{valid:!1}}class _e extends f{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),u=(c,v)=>{if((0,n.isAborted)(c)||(0,n.isAborted)(v))return n.INVALID;const g=It(c.value,v.value);return g.valid?(((0,n.isDirty)(c)||(0,n.isDirty)(v))&&t.dirty(),{status:t.value,value:g.data}):((0,n.addIssueToContext)(a,{code:r.ZodIssueCode.invalid_intersection_types}),n.INVALID)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([c,v])=>u(c,v)):u(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}p.ZodIntersection=_e,_e.create=(d,e,t)=>new _e({left:d,right:e,typeName:k.ZodIntersection,...l(t)});class F extends f{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==s.ZodParsedType.array)return(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.array,received:a.parsedType}),n.INVALID;if(a.data.length<this._def.items.length)return(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.INVALID;!this._def.rest&&a.data.length>this._def.items.length&&((0,n.addIssueToContext)(a,{code:r.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const c=[...a.data].map((v,g)=>{const I=this._def.items[g]||this._def.rest;return I?I._parse(new i(a,v,a.path,g)):null}).filter(v=>!!v);return a.common.async?Promise.all(c).then(v=>n.ParseStatus.mergeArray(t,v)):n.ParseStatus.mergeArray(t,c)}get items(){return this._def.items}rest(e){return new F({...this._def,rest:e})}}p.ZodTuple=F,F.create=(d,e)=>{if(!Array.isArray(d))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new F({items:d,typeName:k.ZodTuple,rest:null,...l(e)})};class ge extends f{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==s.ZodParsedType.object)return(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.object,received:a.parsedType}),n.INVALID;const u=[],c=this._def.keyType,v=this._def.valueType;for(const g in a.data)u.push({key:c._parse(new i(a,g,a.path,g)),value:v._parse(new i(a,a.data[g],a.path,g)),alwaysSet:g in a.data});return a.common.async?n.ParseStatus.mergeObjectAsync(t,u):n.ParseStatus.mergeObjectSync(t,u)}get element(){return this._def.valueType}static create(e,t,a){return t instanceof f?new ge({keyType:e,valueType:t,typeName:k.ZodRecord,...l(a)}):new ge({keyType:E.create(),valueType:e,typeName:k.ZodRecord,...l(t)})}}p.ZodRecord=ge;class pt extends f{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==s.ZodParsedType.map)return(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.map,received:a.parsedType}),n.INVALID;const u=this._def.keyType,c=this._def.valueType,v=[...a.data.entries()].map(([g,I],P)=>({key:u._parse(new i(a,g,a.path,[P,"key"])),value:c._parse(new i(a,I,a.path,[P,"value"]))}));if(a.common.async){const g=new Map;return Promise.resolve().then(async()=>{for(const I of v){const P=await I.key,x=await I.value;if(P.status==="aborted"||x.status==="aborted")return n.INVALID;(P.status==="dirty"||x.status==="dirty")&&t.dirty(),g.set(P.value,x.value)}return{status:t.value,value:g}})}else{const g=new Map;for(const I of v){const P=I.key,x=I.value;if(P.status==="aborted"||x.status==="aborted")return n.INVALID;(P.status==="dirty"||x.status==="dirty")&&t.dirty(),g.set(P.value,x.value)}return{status:t.value,value:g}}}}p.ZodMap=pt,pt.create=(d,e,t)=>new pt({valueType:e,keyType:d,typeName:k.ZodMap,...l(t)});class ne extends f{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==s.ZodParsedType.set)return(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.set,received:a.parsedType}),n.INVALID;const u=this._def;u.minSize!==null&&a.data.size<u.minSize.value&&((0,n.addIssueToContext)(a,{code:r.ZodIssueCode.too_small,minimum:u.minSize.value,type:"set",inclusive:!0,exact:!1,message:u.minSize.message}),t.dirty()),u.maxSize!==null&&a.data.size>u.maxSize.value&&((0,n.addIssueToContext)(a,{code:r.ZodIssueCode.too_big,maximum:u.maxSize.value,type:"set",inclusive:!0,exact:!1,message:u.maxSize.message}),t.dirty());const c=this._def.valueType;function v(I){const P=new Set;for(const x of I){if(x.status==="aborted")return n.INVALID;x.status==="dirty"&&t.dirty(),P.add(x.value)}return{status:t.value,value:P}}const g=[...a.data.values()].map((I,P)=>c._parse(new i(a,I,a.path,P)));return a.common.async?Promise.all(g).then(I=>v(I)):v(g)}min(e,t){return new ne({...this._def,minSize:{value:e,message:o.errorUtil.toString(t)}})}max(e,t){return new ne({...this._def,maxSize:{value:e,message:o.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}p.ZodSet=ne,ne.create=(d,e)=>new ne({valueType:d,minSize:null,maxSize:null,typeName:k.ZodSet,...l(e)});class ce extends f{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.ZodParsedType.function)return(0,n.addIssueToContext)(t,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.function,received:t.parsedType}),n.INVALID;function a(g,I){return(0,n.makeIssue)({data:g,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,_.getErrorMap)(),_.defaultErrorMap].filter(P=>!!P),issueData:{code:r.ZodIssueCode.invalid_arguments,argumentsError:I}})}function u(g,I){return(0,n.makeIssue)({data:g,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,_.getErrorMap)(),_.defaultErrorMap].filter(P=>!!P),issueData:{code:r.ZodIssueCode.invalid_return_type,returnTypeError:I}})}const c={errorMap:t.common.contextualErrorMap},v=t.data;if(this._def.returns instanceof le){const g=this;return(0,n.OK)(async function(...I){const P=new r.ZodError([]),x=await g._def.args.parseAsync(I,c).catch(kt=>{throw P.addIssue(a(I,kt)),P}),V=await Reflect.apply(v,this,x);return await g._def.returns._def.type.parseAsync(V,c).catch(kt=>{throw P.addIssue(u(V,kt)),P})})}else{const g=this;return(0,n.OK)(function(...I){const P=g._def.args.safeParse(I,c);if(!P.success)throw new r.ZodError([a(I,P.error)]);const x=Reflect.apply(v,this,P.data),V=g._def.returns.safeParse(x,c);if(!V.success)throw new r.ZodError([u(x,V.error)]);return V.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ce({...this._def,args:F.create(e).rest(re.create())})}returns(e){return new ce({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new ce({args:e||F.create([]).rest(re.create()),returns:t||re.create(),typeName:k.ZodFunction,...l(a)})}}p.ZodFunction=ce;class ve extends f{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}p.ZodLazy=ve,ve.create=(d,e)=>new ve({getter:d,typeName:k.ZodLazy,...l(e)});class be extends f{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(t,{received:t.data,code:r.ZodIssueCode.invalid_literal,expected:this._def.value}),n.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}p.ZodLiteral=be,be.create=(d,e)=>new be({value:d,typeName:k.ZodLiteral,...l(e)});function qt(d,e){return new Q({values:d,typeName:k.ZodEnum,...l(e)})}class Q extends f{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return(0,n.addIssueToContext)(t,{expected:s.util.joinValues(a),received:t.parsedType,code:r.ZodIssueCode.invalid_type}),n.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return(0,n.addIssueToContext)(t,{received:t.data,code:r.ZodIssueCode.invalid_enum_value,options:a}),n.INVALID}return(0,n.OK)(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Q.create(e,{...this._def,...t})}exclude(e,t=this._def){return Q.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}p.ZodEnum=Q,Q.create=qt;class Ze extends f{_parse(e){const t=s.util.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==s.ZodParsedType.string&&a.parsedType!==s.ZodParsedType.number){const u=s.util.objectValues(t);return(0,n.addIssueToContext)(a,{expected:s.util.joinValues(u),received:a.parsedType,code:r.ZodIssueCode.invalid_type}),n.INVALID}if(this._cache||(this._cache=new Set(s.util.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const u=s.util.objectValues(t);return(0,n.addIssueToContext)(a,{received:a.data,code:r.ZodIssueCode.invalid_enum_value,options:u}),n.INVALID}return(0,n.OK)(e.data)}get enum(){return this._def.values}}p.ZodNativeEnum=Ze,Ze.create=(d,e)=>new Ze({values:d,typeName:k.ZodNativeEnum,...l(e)});class le extends f{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==s.ZodParsedType.promise&&t.common.async===!1)return(0,n.addIssueToContext)(t,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.promise,received:t.parsedType}),n.INVALID;const a=t.parsedType===s.ZodParsedType.promise?t.data:Promise.resolve(t.data);return(0,n.OK)(a.then(u=>this._def.type.parseAsync(u,{path:t.path,errorMap:t.common.contextualErrorMap})))}}p.ZodPromise=le,le.create=(d,e)=>new le({type:d,typeName:k.ZodPromise,...l(e)});class L extends f{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===k.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),u=this._def.effect||null,c={addIssue:v=>{(0,n.addIssueToContext)(a,v),v.fatal?t.abort():t.dirty()},get path(){return a.path}};if(c.addIssue=c.addIssue.bind(c),u.type==="preprocess"){const v=u.transform(a.data,c);if(a.common.async)return Promise.resolve(v).then(async g=>{if(t.value==="aborted")return n.INVALID;const I=await this._def.schema._parseAsync({data:g,path:a.path,parent:a});return I.status==="aborted"?n.INVALID:I.status==="dirty"||t.value==="dirty"?(0,n.DIRTY)(I.value):I});{if(t.value==="aborted")return n.INVALID;const g=this._def.schema._parseSync({data:v,path:a.path,parent:a});return g.status==="aborted"?n.INVALID:g.status==="dirty"||t.value==="dirty"?(0,n.DIRTY)(g.value):g}}if(u.type==="refinement"){const v=g=>{const I=u.refinement(g,c);if(a.common.async)return Promise.resolve(I);if(I instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return g};if(a.common.async===!1){const g=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return g.status==="aborted"?n.INVALID:(g.status==="dirty"&&t.dirty(),v(g.value),{status:t.value,value:g.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(g=>g.status==="aborted"?n.INVALID:(g.status==="dirty"&&t.dirty(),v(g.value).then(()=>({status:t.value,value:g.value}))))}if(u.type==="transform")if(a.common.async===!1){const v=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!(0,n.isValid)(v))return n.INVALID;const g=u.transform(v.value,c);if(g instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:g}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(v=>(0,n.isValid)(v)?Promise.resolve(u.transform(v.value,c)).then(g=>({status:t.value,value:g})):n.INVALID);s.util.assertNever(u)}}p.ZodEffects=L,p.ZodTransformer=L,L.create=(d,e,t)=>new L({schema:d,typeName:k.ZodEffects,effect:e,...l(t)}),L.createWithPreprocess=(d,e,t)=>new L({schema:e,effect:{type:"preprocess",transform:d},typeName:k.ZodEffects,...l(t)});class B extends f{_parse(e){return this._getType(e)===s.ZodParsedType.undefined?(0,n.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}p.ZodOptional=B,B.create=(d,e)=>new B({innerType:d,typeName:k.ZodOptional,...l(e)});class X extends f{_parse(e){return this._getType(e)===s.ZodParsedType.null?(0,n.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}p.ZodNullable=X,X.create=(d,e)=>new X({innerType:d,typeName:k.ZodNullable,...l(e)});class Te extends f{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===s.ZodParsedType.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}p.ZodDefault=Te,Te.create=(d,e)=>new Te({innerType:d,typeName:k.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...l(e)});class Ie extends f{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},u=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return(0,n.isAsync)(u)?u.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new r.ZodError(a.common.issues)},input:a.data})})):{status:"valid",value:u.status==="valid"?u.value:this._def.catchValue({get error(){return new r.ZodError(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}p.ZodCatch=Ie,Ie.create=(d,e)=>new Ie({innerType:d,typeName:k.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...l(e)});class ht extends f{_parse(e){if(this._getType(e)!==s.ZodParsedType.nan){const a=this._getOrReturnCtx(e);return(0,n.addIssueToContext)(a,{code:r.ZodIssueCode.invalid_type,expected:s.ZodParsedType.nan,received:a.parsedType}),n.INVALID}return{status:"valid",value:e.data}}}p.ZodNaN=ht,ht.create=d=>new ht({typeName:k.ZodNaN,...l(d)}),p.BRAND=Symbol("zod_brand");class Pt extends f{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}p.ZodBranded=Pt;class Pe extends f{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const c=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return c.status==="aborted"?n.INVALID:c.status==="dirty"?(t.dirty(),(0,n.DIRTY)(c.value)):this._def.out._parseAsync({data:c.value,path:a.path,parent:a})})();{const u=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return u.status==="aborted"?n.INVALID:u.status==="dirty"?(t.dirty(),{status:"dirty",value:u.value}):this._def.out._parseSync({data:u.value,path:a.path,parent:a})}}static create(e,t){return new Pe({in:e,out:t,typeName:k.ZodPipeline})}}p.ZodPipeline=Pe;class ke extends f{_parse(e){const t=this._def.innerType._parse(e),a=u=>((0,n.isValid)(u)&&(u.value=Object.freeze(u.value)),u);return(0,n.isAsync)(t)?t.then(u=>a(u)):a(t)}unwrap(){return this._def.innerType}}p.ZodReadonly=ke,ke.create=(d,e)=>new ke({innerType:d,typeName:k.ZodReadonly,...l(e)});function zt(d,e){const t=typeof d=="function"?d(e):typeof d=="string"?{message:d}:d;return typeof t=="string"?{message:t}:t}function Ft(d,e={},t){return d?de.create().superRefine((a,u)=>{const c=d(a);if(c instanceof Promise)return c.then(v=>{if(!v){const g=zt(e,a),I=g.fatal??t??!0;u.addIssue({code:"custom",...g,fatal:I})}});if(!c){const v=zt(e,a),g=v.fatal??t??!0;u.addIssue({code:"custom",...v,fatal:g})}}):de.create()}p.late={object:N.lazycreate};var k;(function(d){d.ZodString="ZodString",d.ZodNumber="ZodNumber",d.ZodNaN="ZodNaN",d.ZodBigInt="ZodBigInt",d.ZodBoolean="ZodBoolean",d.ZodDate="ZodDate",d.ZodSymbol="ZodSymbol",d.ZodUndefined="ZodUndefined",d.ZodNull="ZodNull",d.ZodAny="ZodAny",d.ZodUnknown="ZodUnknown",d.ZodNever="ZodNever",d.ZodVoid="ZodVoid",d.ZodArray="ZodArray",d.ZodObject="ZodObject",d.ZodUnion="ZodUnion",d.ZodDiscriminatedUnion="ZodDiscriminatedUnion",d.ZodIntersection="ZodIntersection",d.ZodTuple="ZodTuple",d.ZodRecord="ZodRecord",d.ZodMap="ZodMap",d.ZodSet="ZodSet",d.ZodFunction="ZodFunction",d.ZodLazy="ZodLazy",d.ZodLiteral="ZodLiteral",d.ZodEnum="ZodEnum",d.ZodEffects="ZodEffects",d.ZodNativeEnum="ZodNativeEnum",d.ZodOptional="ZodOptional",d.ZodNullable="ZodNullable",d.ZodDefault="ZodDefault",d.ZodCatch="ZodCatch",d.ZodPromise="ZodPromise",d.ZodBranded="ZodBranded",d.ZodPipeline="ZodPipeline",d.ZodReadonly="ZodReadonly"})(k||(p.ZodFirstPartyTypeKind=k={}));const In=(d,e={message:`Input not instance of ${d.name}`})=>Ft(t=>t instanceof d,e);p.instanceof=In;const Bt=E.create;p.string=Bt;const Kt=K.create;p.number=Kt;const Pn=ht.create;p.nan=Pn;const kn=G.create;p.bigint=kn;const Wt=pe.create;p.boolean=Wt;const An=te.create;p.date=An;const Dn=ct.create;p.symbol=Dn;const xn=he.create;p.undefined=xn;const Cn=me.create;p.null=Cn;const jn=de.create;p.any=jn;const On=re.create;p.unknown=On;const wn=W.create;p.never=wn;const Nn=lt.create;p.void=Nn;const Rn=U.create;p.array=Rn;const Sn=N.create;p.object=Sn;const En=N.strictCreate;p.strictObject=En;const Mn=ye.create;p.union=Mn;const Vn=ft.create;p.discriminatedUnion=Vn;const Un=_e.create;p.intersection=Un;const Ln=F.create;p.tuple=Ln;const qn=ge.create;p.record=qn;const zn=pt.create;p.map=zn;const Fn=ne.create;p.set=Fn;const Bn=ce.create;p.function=Bn;const Kn=ve.create;p.lazy=Kn;const Wn=be.create;p.literal=Wn;const Jn=Q.create;p.enum=Jn;const Yn=Ze.create;p.nativeEnum=Yn;const Hn=le.create;p.promise=Hn;const Jt=L.create;p.effect=Jt,p.transformer=Jt;const Gn=B.create;p.optional=Gn;const Qn=X.create;p.nullable=Qn;const Xn=L.createWithPreprocess;p.preprocess=Xn;const $n=Pe.create;p.pipeline=$n;const ea=()=>Bt().optional();p.ostring=ea;const ta=()=>Kt().optional();p.onumber=ta;const ra=()=>Wt().optional();return p.oboolean=ra,p.coerce={string:(d=>E.create({...d,coerce:!0})),number:(d=>K.create({...d,coerce:!0})),boolean:(d=>pe.create({...d,coerce:!0})),bigint:(d=>G.create({...d,coerce:!0})),date:(d=>te.create({...d,coerce:!0}))},p.NEVER=n.INVALID,p}var nr;function ar(){return nr||(nr=1,(function(r){var _=ae&&ae.__createBinding||(Object.create?(function(n,s,i,h){h===void 0&&(h=i);var l=Object.getOwnPropertyDescriptor(s,i);(!l||("get"in l?!s.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return s[i]}}),Object.defineProperty(n,h,l)}):(function(n,s,i,h){h===void 0&&(h=i),n[h]=s[i]})),o=ae&&ae.__exportStar||function(n,s){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(s,i)&&_(s,n,i)};Object.defineProperty(r,"__esModule",{value:!0}),o(Nt(),r),o(Yr(),r),o(na(),r),o(yt(),r),o(sa(),r),o(wt(),r)})(ae)),ae}var sr;function Rt(){return sr||(sr=1,(function(r){var _=q&&q.__createBinding||(Object.create?(function(h,l,f,T){T===void 0&&(T=f);var y=Object.getOwnPropertyDescriptor(l,f);(!y||("get"in y?!l.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return l[f]}}),Object.defineProperty(h,T,y)}):(function(h,l,f,T){T===void 0&&(T=f),h[T]=l[f]})),o=q&&q.__setModuleDefault||(Object.create?(function(h,l){Object.defineProperty(h,"default",{enumerable:!0,value:l})}):function(h,l){h.default=l}),n=q&&q.__importStar||function(h){if(h&&h.__esModule)return h;var l={};if(h!=null)for(var f in h)f!=="default"&&Object.prototype.hasOwnProperty.call(h,f)&&_(l,h,f);return o(l,h),l},s=q&&q.__exportStar||function(h,l){for(var f in h)f!=="default"&&!Object.prototype.hasOwnProperty.call(l,f)&&_(l,h,f)};Object.defineProperty(r,"__esModule",{value:!0}),r.z=void 0;const i=n(ar());r.z=i,s(ar(),r),r.default=i})(q)),q}var se={},xt={},ir;function St(){return ir||(ir=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.getDefaultOptions=r.defaultOptions=r.jsonDescription=r.ignoreOverride=void 0,r.ignoreOverride=Symbol("Let zodToJsonSchema decide on which parser to use");const _=(n,s)=>{if(s.description)try{return{...n,...JSON.parse(s.description)}}catch{}return n};r.jsonDescription=_,r.defaultOptions={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"};const o=n=>typeof n=="string"?{...r.defaultOptions,name:n}:{...r.defaultOptions,...n};r.getDefaultOptions=o})(xt)),xt}var xe={},or;function Hr(){if(or)return xe;or=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.getRefs=void 0;const r=St(),_=o=>{const n=(0,r.getDefaultOptions)(o),s=n.name!==void 0?[...n.basePath,n.definitionPath,n.name]:n.basePath;return{...n,flags:{hasReferencedOpenAiAnyType:!1},currentPath:s,propertyPath:void 0,seen:new Map(Object.entries(n.definitions).map(([i,h])=>[h._def,{def:h._def,path:[...n.basePath,n.definitionPath,i],jsonSchema:void 0}]))}};return xe.getRefs=_,xe}var ie={},dr;function oe(){if(dr)return ie;dr=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.setResponseValueAndErrors=ie.addErrorMessage=void 0;function r(o,n,s,i){i?.errorMessages&&s&&(o.errorMessage={...o.errorMessage,[n]:s})}ie.addErrorMessage=r;function _(o,n,s,i,h){o[n]=s,r(o,n,i,h)}return ie.setResponseValueAndErrors=_,ie}var Ce={},ur;function Et(){if(ur)return Ce;ur=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.getRelativePath=void 0;const r=(_,o)=>{let n=0;for(;n<_.length&&n<o.length&&_[n]===o[n];n++);return[(_.length-n).toString(),...o.slice(n)].join("/")};return Ce.getRelativePath=r,Ce}var je={},Oe={},we={},cr;function z(){if(cr)return we;cr=1,Object.defineProperty(we,"__esModule",{value:!0}),we.parseAnyDef=void 0;const r=Et();function _(o){if(o.target!=="openAi")return{};const n=[...o.basePath,o.definitionPath,o.openAiAnyTypeName];return o.flags.hasReferencedOpenAiAnyType=!0,{$ref:o.$refStrategy==="relative"?(0,r.getRelativePath)(n,o.currentPath):n.join("/")}}return we.parseAnyDef=_,we}var Ne={},lr;function Gr(){if(lr)return Ne;lr=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.parseArrayDef=void 0;const r=Rt(),_=oe(),o=R();function n(s,i){const h={type:"array"};return s.type?._def&&s.type?._def?.typeName!==r.ZodFirstPartyTypeKind.ZodAny&&(h.items=(0,o.parseDef)(s.type._def,{...i,currentPath:[...i.currentPath,"items"]})),s.minLength&&(0,_.setResponseValueAndErrors)(h,"minItems",s.minLength.value,s.minLength.message,i),s.maxLength&&(0,_.setResponseValueAndErrors)(h,"maxItems",s.maxLength.value,s.maxLength.message,i),s.exactLength&&((0,_.setResponseValueAndErrors)(h,"minItems",s.exactLength.value,s.exactLength.message,i),(0,_.setResponseValueAndErrors)(h,"maxItems",s.exactLength.value,s.exactLength.message,i)),h}return Ne.parseArrayDef=n,Ne}var Re={},fr;function Qr(){if(fr)return Re;fr=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.parseBigintDef=void 0;const r=oe();function _(o,n){const s={type:"integer",format:"int64"};if(!o.checks)return s;for(const i of o.checks)switch(i.kind){case"min":n.target==="jsonSchema7"?i.inclusive?(0,r.setResponseValueAndErrors)(s,"minimum",i.value,i.message,n):(0,r.setResponseValueAndErrors)(s,"exclusiveMinimum",i.value,i.message,n):(i.inclusive||(s.exclusiveMinimum=!0),(0,r.setResponseValueAndErrors)(s,"minimum",i.value,i.message,n));break;case"max":n.target==="jsonSchema7"?i.inclusive?(0,r.setResponseValueAndErrors)(s,"maximum",i.value,i.message,n):(0,r.setResponseValueAndErrors)(s,"exclusiveMaximum",i.value,i.message,n):(i.inclusive||(s.exclusiveMaximum=!0),(0,r.setResponseValueAndErrors)(s,"maximum",i.value,i.message,n));break;case"multipleOf":(0,r.setResponseValueAndErrors)(s,"multipleOf",i.value,i.message,n);break}return s}return Re.parseBigintDef=_,Re}var Se={},pr;function Xr(){if(pr)return Se;pr=1,Object.defineProperty(Se,"__esModule",{value:!0}),Se.parseBooleanDef=void 0;function r(){return{type:"boolean"}}return Se.parseBooleanDef=r,Se}var Ee={},hr;function Mt(){if(hr)return Ee;hr=1,Object.defineProperty(Ee,"__esModule",{value:!0}),Ee.parseBrandedDef=void 0;const r=R();function _(o,n){return(0,r.parseDef)(o.type._def,n)}return Ee.parseBrandedDef=_,Ee}var Me={},mr;function $r(){if(mr)return Me;mr=1,Object.defineProperty(Me,"__esModule",{value:!0}),Me.parseCatchDef=void 0;const r=R(),_=(o,n)=>(0,r.parseDef)(o.innerType._def,n);return Me.parseCatchDef=_,Me}var Ve={},yr;function en(){if(yr)return Ve;yr=1,Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.parseDateDef=void 0;const r=oe();function _(n,s,i){const h=i??s.dateStrategy;if(Array.isArray(h))return{anyOf:h.map((l,f)=>_(n,s,l))};switch(h){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return o(n,s)}}Ve.parseDateDef=_;const o=(n,s)=>{const i={type:"integer",format:"unix-time"};if(s.target==="openApi3")return i;for(const h of n.checks)switch(h.kind){case"min":(0,r.setResponseValueAndErrors)(i,"minimum",h.value,h.message,s);break;case"max":(0,r.setResponseValueAndErrors)(i,"maximum",h.value,h.message,s);break}return i};return Ve}var Ue={},_r;function tn(){if(_r)return Ue;_r=1,Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.parseDefaultDef=void 0;const r=R();function _(o,n){return{...(0,r.parseDef)(o.innerType._def,n),default:o.defaultValue()}}return Ue.parseDefaultDef=_,Ue}var Le={},gr;function rn(){if(gr)return Le;gr=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.parseEffectsDef=void 0;const r=R(),_=z();function o(n,s){return s.effectStrategy==="input"?(0,r.parseDef)(n.schema._def,s):(0,_.parseAnyDef)(s)}return Le.parseEffectsDef=o,Le}var qe={},vr;function nn(){if(vr)return qe;vr=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.parseEnumDef=void 0;function r(_){return{type:"string",enum:Array.from(_.values)}}return qe.parseEnumDef=r,qe}var ze={},br;function an(){if(br)return ze;br=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.parseIntersectionDef=void 0;const r=R(),_=n=>"type"in n&&n.type==="string"?!1:"allOf"in n;function o(n,s){const i=[(0,r.parseDef)(n.left._def,{...s,currentPath:[...s.currentPath,"allOf","0"]}),(0,r.parseDef)(n.right._def,{...s,currentPath:[...s.currentPath,"allOf","1"]})].filter(f=>!!f);let h=s.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const l=[];return i.forEach(f=>{if(_(f))l.push(...f.allOf),f.unevaluatedProperties===void 0&&(h=void 0);else{let T=f;if("additionalProperties"in f&&f.additionalProperties===!1){const{additionalProperties:y,...b}=f;T=b}else h=void 0;l.push(T)}}),l.length?{allOf:l,...h}:void 0}return ze.parseIntersectionDef=o,ze}var Fe={},Zr;function sn(){if(Zr)return Fe;Zr=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.parseLiteralDef=void 0;function r(_,o){const n=typeof _.value;return n!=="bigint"&&n!=="number"&&n!=="boolean"&&n!=="string"?{type:Array.isArray(_.value)?"array":"object"}:o.target==="openApi3"?{type:n==="bigint"?"integer":n,enum:[_.value]}:{type:n==="bigint"?"integer":n,const:_.value}}return Fe.parseLiteralDef=r,Fe}var Be={},Ke={},Ct={},Tr;function Vt(){return Tr||(Tr=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.parseStringDef=r.zodPatterns=void 0;const _=oe();let o;r.zodPatterns={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(o===void 0&&(o=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),o),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function n(y,b){const Z={type:"string"};if(y.checks)for(const m of y.checks)switch(m.kind){case"min":(0,_.setResponseValueAndErrors)(Z,"minLength",typeof Z.minLength=="number"?Math.max(Z.minLength,m.value):m.value,m.message,b);break;case"max":(0,_.setResponseValueAndErrors)(Z,"maxLength",typeof Z.maxLength=="number"?Math.min(Z.maxLength,m.value):m.value,m.message,b);break;case"email":switch(b.emailStrategy){case"format:email":l(Z,"email",m.message,b);break;case"format:idn-email":l(Z,"idn-email",m.message,b);break;case"pattern:zod":f(Z,r.zodPatterns.email,m.message,b);break}break;case"url":l(Z,"uri",m.message,b);break;case"uuid":l(Z,"uuid",m.message,b);break;case"regex":f(Z,m.regex,m.message,b);break;case"cuid":f(Z,r.zodPatterns.cuid,m.message,b);break;case"cuid2":f(Z,r.zodPatterns.cuid2,m.message,b);break;case"startsWith":f(Z,RegExp(`^${s(m.value,b)}`),m.message,b);break;case"endsWith":f(Z,RegExp(`${s(m.value,b)}$`),m.message,b);break;case"datetime":l(Z,"date-time",m.message,b);break;case"date":l(Z,"date",m.message,b);break;case"time":l(Z,"time",m.message,b);break;case"duration":l(Z,"duration",m.message,b);break;case"length":(0,_.setResponseValueAndErrors)(Z,"minLength",typeof Z.minLength=="number"?Math.max(Z.minLength,m.value):m.value,m.message,b),(0,_.setResponseValueAndErrors)(Z,"maxLength",typeof Z.maxLength=="number"?Math.min(Z.maxLength,m.value):m.value,m.message,b);break;case"includes":{f(Z,RegExp(s(m.value,b)),m.message,b);break}case"ip":{m.version!=="v6"&&l(Z,"ipv4",m.message,b),m.version!=="v4"&&l(Z,"ipv6",m.message,b);break}case"base64url":f(Z,r.zodPatterns.base64url,m.message,b);break;case"jwt":f(Z,r.zodPatterns.jwt,m.message,b);break;case"cidr":{m.version!=="v6"&&f(Z,r.zodPatterns.ipv4Cidr,m.message,b),m.version!=="v4"&&f(Z,r.zodPatterns.ipv6Cidr,m.message,b);break}case"emoji":f(Z,r.zodPatterns.emoji(),m.message,b);break;case"ulid":{f(Z,r.zodPatterns.ulid,m.message,b);break}case"base64":{switch(b.base64Strategy){case"format:binary":{l(Z,"binary",m.message,b);break}case"contentEncoding:base64":{(0,_.setResponseValueAndErrors)(Z,"contentEncoding","base64",m.message,b);break}case"pattern:zod":{f(Z,r.zodPatterns.base64,m.message,b);break}}break}case"nanoid":f(Z,r.zodPatterns.nanoid,m.message,b)}return Z}r.parseStringDef=n;function s(y,b){return b.patternStrategy==="escape"?h(y):y}const i=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function h(y){let b="";for(let Z=0;Z<y.length;Z++)i.has(y[Z])||(b+="\\"),b+=y[Z];return b}function l(y,b,Z,m){y.format||y.anyOf?.some(A=>A.format)?(y.anyOf||(y.anyOf=[]),y.format&&(y.anyOf.push({format:y.format,...y.errorMessage&&m.errorMessages&&{errorMessage:{format:y.errorMessage.format}}}),delete y.format,y.errorMessage&&(delete y.errorMessage.format,Object.keys(y.errorMessage).length===0&&delete y.errorMessage)),y.anyOf.push({format:b,...Z&&m.errorMessages&&{errorMessage:{format:Z}}})):(0,_.setResponseValueAndErrors)(y,"format",b,Z,m)}function f(y,b,Z,m){y.pattern||y.allOf?.some(A=>A.pattern)?(y.allOf||(y.allOf=[]),y.pattern&&(y.allOf.push({pattern:y.pattern,...y.errorMessage&&m.errorMessages&&{errorMessage:{pattern:y.errorMessage.pattern}}}),delete y.pattern,y.errorMessage&&(delete y.errorMessage.pattern,Object.keys(y.errorMessage).length===0&&delete y.errorMessage)),y.allOf.push({pattern:T(b,m),...Z&&m.errorMessages&&{errorMessage:{pattern:Z}}})):(0,_.setResponseValueAndErrors)(y,"pattern",T(b,m),Z,m)}function T(y,b){if(!b.applyRegexFlags||!y.flags)return y.source;const Z={i:y.flags.includes("i"),m:y.flags.includes("m"),s:y.flags.includes("s")},m=Z.i?y.source.toLowerCase():y.source;let A="",S=!1,w=!1,O=!1;for(let D=0;D<m.length;D++){if(S){A+=m[D],S=!1;continue}if(Z.i){if(w){if(m[D].match(/[a-z]/)){O?(A+=m[D],A+=`${m[D-2]}-${m[D]}`.toUpperCase(),O=!1):m[D+1]==="-"&&m[D+2]?.match(/[a-z]/)?(A+=m[D],O=!0):A+=`${m[D]}${m[D].toUpperCase()}`;continue}}else if(m[D].match(/[a-z]/)){A+=`[${m[D]}${m[D].toUpperCase()}]`;continue}}if(Z.m){if(m[D]==="^"){A+=`(^|(?<=[\r
2
+ ]))`;continue}else if(m[D]==="$"){A+=`($|(?=[\r
3
+ ]))`;continue}}if(Z.s&&m[D]==="."){A+=w?`${m[D]}\r
4
+ `:`[${m[D]}\r
5
+ ]`;continue}A+=m[D],m[D]==="\\"?S=!0:w&&m[D]==="]"?w=!1:!w&&m[D]==="["&&(w=!0)}try{new RegExp(A)}catch{return console.warn(`Could not convert regex pattern at ${b.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),y.source}return A}})(Ct)),Ct}var Ir;function Ut(){if(Ir)return Ke;Ir=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.parseRecordDef=void 0;const r=Rt(),_=R(),o=Vt(),n=Mt(),s=z();function i(h,l){if(l.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),l.target==="openApi3"&&h.keyType?._def.typeName===r.ZodFirstPartyTypeKind.ZodEnum)return{type:"object",required:h.keyType._def.values,properties:h.keyType._def.values.reduce((T,y)=>({...T,[y]:(0,_.parseDef)(h.valueType._def,{...l,currentPath:[...l.currentPath,"properties",y]})??(0,s.parseAnyDef)(l)}),{}),additionalProperties:l.rejectedAdditionalProperties};const f={type:"object",additionalProperties:(0,_.parseDef)(h.valueType._def,{...l,currentPath:[...l.currentPath,"additionalProperties"]})??l.allowedAdditionalProperties};if(l.target==="openApi3")return f;if(h.keyType?._def.typeName===r.ZodFirstPartyTypeKind.ZodString&&h.keyType._def.checks?.length){const{type:T,...y}=(0,o.parseStringDef)(h.keyType._def,l);return{...f,propertyNames:y}}else{if(h.keyType?._def.typeName===r.ZodFirstPartyTypeKind.ZodEnum)return{...f,propertyNames:{enum:h.keyType._def.values}};if(h.keyType?._def.typeName===r.ZodFirstPartyTypeKind.ZodBranded&&h.keyType._def.type._def.typeName===r.ZodFirstPartyTypeKind.ZodString&&h.keyType._def.type._def.checks?.length){const{type:T,...y}=(0,n.parseBrandedDef)(h.keyType._def,l);return{...f,propertyNames:y}}}return f}return Ke.parseRecordDef=i,Ke}var Pr;function on(){if(Pr)return Be;Pr=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.parseMapDef=void 0;const r=R(),_=Ut(),o=z();function n(s,i){if(i.mapStrategy==="record")return(0,_.parseRecordDef)(s,i);const h=(0,r.parseDef)(s.keyType._def,{...i,currentPath:[...i.currentPath,"items","items","0"]})||(0,o.parseAnyDef)(i),l=(0,r.parseDef)(s.valueType._def,{...i,currentPath:[...i.currentPath,"items","items","1"]})||(0,o.parseAnyDef)(i);return{type:"array",maxItems:125,items:{type:"array",items:[h,l],minItems:2,maxItems:2}}}return Be.parseMapDef=n,Be}var We={},kr;function dn(){if(kr)return We;kr=1,Object.defineProperty(We,"__esModule",{value:!0}),We.parseNativeEnumDef=void 0;function r(_){const o=_.values,s=Object.keys(_.values).filter(h=>typeof o[o[h]]!="number").map(h=>o[h]),i=Array.from(new Set(s.map(h=>typeof h)));return{type:i.length===1?i[0]==="string"?"string":"number":["string","number"],enum:s}}return We.parseNativeEnumDef=r,We}var Je={},Ar;function un(){if(Ar)return Je;Ar=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.parseNeverDef=void 0;const r=z();function _(o){return o.target==="openAi"?void 0:{not:(0,r.parseAnyDef)({...o,currentPath:[...o.currentPath,"not"]})}}return Je.parseNeverDef=_,Je}var Ye={},Dr;function cn(){if(Dr)return Ye;Dr=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.parseNullDef=void 0;function r(_){return _.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}return Ye.parseNullDef=r,Ye}var He={},jt={},xr;function Lt(){return xr||(xr=1,(function(r){Object.defineProperty(r,"__esModule",{value:!0}),r.parseUnionDef=r.primitiveMappings=void 0;const _=R();r.primitiveMappings={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function o(s,i){if(i.target==="openApi3")return n(s,i);const h=s.options instanceof Map?Array.from(s.options.values()):s.options;if(h.every(l=>l._def.typeName in r.primitiveMappings&&(!l._def.checks||!l._def.checks.length))){const l=h.reduce((f,T)=>{const y=r.primitiveMappings[T._def.typeName];return y&&!f.includes(y)?[...f,y]:f},[]);return{type:l.length>1?l:l[0]}}else if(h.every(l=>l._def.typeName==="ZodLiteral"&&!l.description)){const l=h.reduce((f,T)=>{const y=typeof T._def.value;switch(y){case"string":case"number":case"boolean":return[...f,y];case"bigint":return[...f,"integer"];case"object":if(T._def.value===null)return[...f,"null"];case"symbol":case"undefined":case"function":default:return f}},[]);if(l.length===h.length){const f=l.filter((T,y,b)=>b.indexOf(T)===y);return{type:f.length>1?f:f[0],enum:h.reduce((T,y)=>T.includes(y._def.value)?T:[...T,y._def.value],[])}}}else if(h.every(l=>l._def.typeName==="ZodEnum"))return{type:"string",enum:h.reduce((l,f)=>[...l,...f._def.values.filter(T=>!l.includes(T))],[])};return n(s,i)}r.parseUnionDef=o;const n=(s,i)=>{const h=(s.options instanceof Map?Array.from(s.options.values()):s.options).map((l,f)=>(0,_.parseDef)(l._def,{...i,currentPath:[...i.currentPath,"anyOf",`${f}`]})).filter(l=>!!l&&(!i.strictUnions||typeof l=="object"&&Object.keys(l).length>0));return h.length?{anyOf:h}:void 0}})(jt)),jt}var Cr;function ln(){if(Cr)return He;Cr=1,Object.defineProperty(He,"__esModule",{value:!0}),He.parseNullableDef=void 0;const r=R(),_=Lt();function o(n,s){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(n.innerType._def.typeName)&&(!n.innerType._def.checks||!n.innerType._def.checks.length))return s.target==="openApi3"?{type:_.primitiveMappings[n.innerType._def.typeName],nullable:!0}:{type:[_.primitiveMappings[n.innerType._def.typeName],"null"]};if(s.target==="openApi3"){const h=(0,r.parseDef)(n.innerType._def,{...s,currentPath:[...s.currentPath]});return h&&"$ref"in h?{allOf:[h],nullable:!0}:h&&{...h,nullable:!0}}const i=(0,r.parseDef)(n.innerType._def,{...s,currentPath:[...s.currentPath,"anyOf","0"]});return i&&{anyOf:[i,{type:"null"}]}}return He.parseNullableDef=o,He}var Ge={},jr;function fn(){if(jr)return Ge;jr=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.parseNumberDef=void 0;const r=oe();function _(o,n){const s={type:"number"};if(!o.checks)return s;for(const i of o.checks)switch(i.kind){case"int":s.type="integer",(0,r.addErrorMessage)(s,"type",i.message,n);break;case"min":n.target==="jsonSchema7"?i.inclusive?(0,r.setResponseValueAndErrors)(s,"minimum",i.value,i.message,n):(0,r.setResponseValueAndErrors)(s,"exclusiveMinimum",i.value,i.message,n):(i.inclusive||(s.exclusiveMinimum=!0),(0,r.setResponseValueAndErrors)(s,"minimum",i.value,i.message,n));break;case"max":n.target==="jsonSchema7"?i.inclusive?(0,r.setResponseValueAndErrors)(s,"maximum",i.value,i.message,n):(0,r.setResponseValueAndErrors)(s,"exclusiveMaximum",i.value,i.message,n):(i.inclusive||(s.exclusiveMaximum=!0),(0,r.setResponseValueAndErrors)(s,"maximum",i.value,i.message,n));break;case"multipleOf":(0,r.setResponseValueAndErrors)(s,"multipleOf",i.value,i.message,n);break}return s}return Ge.parseNumberDef=_,Ge}var Qe={},Or;function pn(){if(Or)return Qe;Or=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.parseObjectDef=void 0;const r=R();function _(s,i){const h=i.target==="openAi",l={type:"object",properties:{}},f=[],T=s.shape();for(const b in T){let Z=T[b];if(Z===void 0||Z._def===void 0)continue;let m=n(Z);m&&h&&(Z._def.typeName==="ZodOptional"&&(Z=Z._def.innerType),Z.isNullable()||(Z=Z.nullable()),m=!1);const A=(0,r.parseDef)(Z._def,{...i,currentPath:[...i.currentPath,"properties",b],propertyPath:[...i.currentPath,"properties",b]});A!==void 0&&(l.properties[b]=A,m||f.push(b))}f.length&&(l.required=f);const y=o(s,i);return y!==void 0&&(l.additionalProperties=y),l}Qe.parseObjectDef=_;function o(s,i){if(s.catchall._def.typeName!=="ZodNever")return(0,r.parseDef)(s.catchall._def,{...i,currentPath:[...i.currentPath,"additionalProperties"]});switch(s.unknownKeys){case"passthrough":return i.allowedAdditionalProperties;case"strict":return i.rejectedAdditionalProperties;case"strip":return i.removeAdditionalStrategy==="strict"?i.allowedAdditionalProperties:i.rejectedAdditionalProperties}}function n(s){try{return s.isOptional()}catch{return!0}}return Qe}var Xe={},wr;function hn(){if(wr)return Xe;wr=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.parseOptionalDef=void 0;const r=R(),_=z(),o=(n,s)=>{if(s.currentPath.toString()===s.propertyPath?.toString())return(0,r.parseDef)(n.innerType._def,s);const i=(0,r.parseDef)(n.innerType._def,{...s,currentPath:[...s.currentPath,"anyOf","1"]});return i?{anyOf:[{not:(0,_.parseAnyDef)(s)},i]}:(0,_.parseAnyDef)(s)};return Xe.parseOptionalDef=o,Xe}var $e={},Nr;function mn(){if(Nr)return $e;Nr=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.parsePipelineDef=void 0;const r=R(),_=(o,n)=>{if(n.pipeStrategy==="input")return(0,r.parseDef)(o.in._def,n);if(n.pipeStrategy==="output")return(0,r.parseDef)(o.out._def,n);const s=(0,r.parseDef)(o.in._def,{...n,currentPath:[...n.currentPath,"allOf","0"]}),i=(0,r.parseDef)(o.out._def,{...n,currentPath:[...n.currentPath,"allOf",s?"1":"0"]});return{allOf:[s,i].filter(h=>h!==void 0)}};return $e.parsePipelineDef=_,$e}var et={},Rr;function yn(){if(Rr)return et;Rr=1,Object.defineProperty(et,"__esModule",{value:!0}),et.parsePromiseDef=void 0;const r=R();function _(o,n){return(0,r.parseDef)(o.type._def,n)}return et.parsePromiseDef=_,et}var tt={},Sr;function _n(){if(Sr)return tt;Sr=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.parseSetDef=void 0;const r=oe(),_=R();function o(n,s){const h={type:"array",uniqueItems:!0,items:(0,_.parseDef)(n.valueType._def,{...s,currentPath:[...s.currentPath,"items"]})};return n.minSize&&(0,r.setResponseValueAndErrors)(h,"minItems",n.minSize.value,n.minSize.message,s),n.maxSize&&(0,r.setResponseValueAndErrors)(h,"maxItems",n.maxSize.value,n.maxSize.message,s),h}return tt.parseSetDef=o,tt}var rt={},Er;function gn(){if(Er)return rt;Er=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.parseTupleDef=void 0;const r=R();function _(o,n){return o.rest?{type:"array",minItems:o.items.length,items:o.items.map((s,i)=>(0,r.parseDef)(s._def,{...n,currentPath:[...n.currentPath,"items",`${i}`]})).reduce((s,i)=>i===void 0?s:[...s,i],[]),additionalItems:(0,r.parseDef)(o.rest._def,{...n,currentPath:[...n.currentPath,"additionalItems"]})}:{type:"array",minItems:o.items.length,maxItems:o.items.length,items:o.items.map((s,i)=>(0,r.parseDef)(s._def,{...n,currentPath:[...n.currentPath,"items",`${i}`]})).reduce((s,i)=>i===void 0?s:[...s,i],[])}}return rt.parseTupleDef=_,rt}var nt={},Mr;function vn(){if(Mr)return nt;Mr=1,Object.defineProperty(nt,"__esModule",{value:!0}),nt.parseUndefinedDef=void 0;const r=z();function _(o){return{not:(0,r.parseAnyDef)(o)}}return nt.parseUndefinedDef=_,nt}var at={},Vr;function bn(){if(Vr)return at;Vr=1,Object.defineProperty(at,"__esModule",{value:!0}),at.parseUnknownDef=void 0;const r=z();function _(o){return(0,r.parseAnyDef)(o)}return at.parseUnknownDef=_,at}var st={},Ur;function Zn(){if(Ur)return st;Ur=1,Object.defineProperty(st,"__esModule",{value:!0}),st.parseReadonlyDef=void 0;const r=R(),_=(o,n)=>(0,r.parseDef)(o.innerType._def,n);return st.parseReadonlyDef=_,st}var Lr;function Tn(){if(Lr)return Oe;Lr=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.selectParser=void 0;const r=Rt(),_=z(),o=Gr(),n=Qr(),s=Xr(),i=Mt(),h=$r(),l=en(),f=tn(),T=rn(),y=nn(),b=an(),Z=sn(),m=on(),A=dn(),S=un(),w=cn(),O=ln(),D=fn(),M=pn(),$=hn(),fe=mn(),ee=yn(),_t=Ut(),gt=_n(),ot=Vt(),vt=gn(),dt=vn(),bt=Lt(),ut=bn(),Zt=Zn(),Tt=(j,E,C)=>{switch(E){case r.ZodFirstPartyTypeKind.ZodString:return(0,ot.parseStringDef)(j,C);case r.ZodFirstPartyTypeKind.ZodNumber:return(0,D.parseNumberDef)(j,C);case r.ZodFirstPartyTypeKind.ZodObject:return(0,M.parseObjectDef)(j,C);case r.ZodFirstPartyTypeKind.ZodBigInt:return(0,n.parseBigintDef)(j,C);case r.ZodFirstPartyTypeKind.ZodBoolean:return(0,s.parseBooleanDef)();case r.ZodFirstPartyTypeKind.ZodDate:return(0,l.parseDateDef)(j,C);case r.ZodFirstPartyTypeKind.ZodUndefined:return(0,dt.parseUndefinedDef)(C);case r.ZodFirstPartyTypeKind.ZodNull:return(0,w.parseNullDef)(C);case r.ZodFirstPartyTypeKind.ZodArray:return(0,o.parseArrayDef)(j,C);case r.ZodFirstPartyTypeKind.ZodUnion:case r.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:return(0,bt.parseUnionDef)(j,C);case r.ZodFirstPartyTypeKind.ZodIntersection:return(0,b.parseIntersectionDef)(j,C);case r.ZodFirstPartyTypeKind.ZodTuple:return(0,vt.parseTupleDef)(j,C);case r.ZodFirstPartyTypeKind.ZodRecord:return(0,_t.parseRecordDef)(j,C);case r.ZodFirstPartyTypeKind.ZodLiteral:return(0,Z.parseLiteralDef)(j,C);case r.ZodFirstPartyTypeKind.ZodEnum:return(0,y.parseEnumDef)(j);case r.ZodFirstPartyTypeKind.ZodNativeEnum:return(0,A.parseNativeEnumDef)(j);case r.ZodFirstPartyTypeKind.ZodNullable:return(0,O.parseNullableDef)(j,C);case r.ZodFirstPartyTypeKind.ZodOptional:return(0,$.parseOptionalDef)(j,C);case r.ZodFirstPartyTypeKind.ZodMap:return(0,m.parseMapDef)(j,C);case r.ZodFirstPartyTypeKind.ZodSet:return(0,gt.parseSetDef)(j,C);case r.ZodFirstPartyTypeKind.ZodLazy:return()=>j.getter()._def;case r.ZodFirstPartyTypeKind.ZodPromise:return(0,ee.parsePromiseDef)(j,C);case r.ZodFirstPartyTypeKind.ZodNaN:case r.ZodFirstPartyTypeKind.ZodNever:return(0,S.parseNeverDef)(C);case r.ZodFirstPartyTypeKind.ZodEffects:return(0,T.parseEffectsDef)(j,C);case r.ZodFirstPartyTypeKind.ZodAny:return(0,_.parseAnyDef)(C);case r.ZodFirstPartyTypeKind.ZodUnknown:return(0,ut.parseUnknownDef)(C);case r.ZodFirstPartyTypeKind.ZodDefault:return(0,f.parseDefaultDef)(j,C);case r.ZodFirstPartyTypeKind.ZodBranded:return(0,i.parseBrandedDef)(j,C);case r.ZodFirstPartyTypeKind.ZodReadonly:return(0,Zt.parseReadonlyDef)(j,C);case r.ZodFirstPartyTypeKind.ZodCatch:return(0,h.parseCatchDef)(j,C);case r.ZodFirstPartyTypeKind.ZodPipeline:return(0,fe.parsePipelineDef)(j,C);case r.ZodFirstPartyTypeKind.ZodFunction:case r.ZodFirstPartyTypeKind.ZodVoid:case r.ZodFirstPartyTypeKind.ZodSymbol:return;default:return(K=>{})()}};return Oe.selectParser=Tt,Oe}var qr;function R(){if(qr)return je;qr=1,Object.defineProperty(je,"__esModule",{value:!0}),je.parseDef=void 0;const r=St(),_=Tn(),o=Et(),n=z();function s(l,f,T=!1){const y=f.seen.get(l);if(f.override){const A=f.override?.(l,f,y,T);if(A!==r.ignoreOverride)return A}if(y&&!T){const A=i(y,f);if(A!==void 0)return A}const b={def:l,path:f.currentPath,jsonSchema:void 0};f.seen.set(l,b);const Z=(0,_.selectParser)(l,l.typeName,f),m=typeof Z=="function"?s(Z(),f):Z;if(m&&h(l,f,m),f.postProcess){const A=f.postProcess(m,l,f);return b.jsonSchema=m,A}return b.jsonSchema=m,m}je.parseDef=s;const i=(l,f)=>{switch(f.$refStrategy){case"root":return{$ref:l.path.join("/")};case"relative":return{$ref:(0,o.getRelativePath)(f.currentPath,l.path)};case"none":case"seen":return l.path.length<f.currentPath.length&&l.path.every((T,y)=>f.currentPath[y]===T)?(console.warn(`Recursive reference detected at ${f.currentPath.join("/")}! Defaulting to any`),(0,n.parseAnyDef)(f)):f.$refStrategy==="seen"?(0,n.parseAnyDef)(f):void 0}},h=(l,f,T)=>(l.description&&(T.description=l.description,f.markdownDescription&&(T.markdownDescription=l.description)),T);return je}var Ot={},zr;function ia(){return zr||(zr=1,Object.defineProperty(Ot,"__esModule",{value:!0})),Ot}var it={},Fr;function Br(){if(Fr)return it;Fr=1,Object.defineProperty(it,"__esModule",{value:!0}),it.zodToJsonSchema=void 0;const r=R(),_=Hr(),o=z(),n=(s,i)=>{const h=(0,_.getRefs)(i);let l=typeof i=="object"&&i.definitions?Object.entries(i.definitions).reduce((Z,[m,A])=>({...Z,[m]:(0,r.parseDef)(A._def,{...h,currentPath:[...h.basePath,h.definitionPath,m]},!0)??(0,o.parseAnyDef)(h)}),{}):void 0;const f=typeof i=="string"?i:i?.nameStrategy==="title"?void 0:i?.name,T=(0,r.parseDef)(s._def,f===void 0?h:{...h,currentPath:[...h.basePath,h.definitionPath,f]},!1)??(0,o.parseAnyDef)(h),y=typeof i=="object"&&i.name!==void 0&&i.nameStrategy==="title"?i.name:void 0;y!==void 0&&(T.title=y),h.flags.hasReferencedOpenAiAnyType&&(l||(l={}),l[h.openAiAnyTypeName]||(l[h.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:h.$refStrategy==="relative"?"1":[...h.basePath,h.definitionPath,h.openAiAnyTypeName].join("/")}}));const b=f===void 0?l?{...T,[h.definitionPath]:l}:T:{$ref:[...h.$refStrategy==="relative"?[]:h.basePath,h.definitionPath,f].join("/"),[h.definitionPath]:{...l,[f]:T}};return h.target==="jsonSchema7"?b.$schema="http://json-schema.org/draft-07/schema#":(h.target==="jsonSchema2019-09"||h.target==="openAi")&&(b.$schema="https://json-schema.org/draft/2019-09/schema#"),h.target==="openAi"&&("anyOf"in b||"oneOf"in b||"allOf"in b||"type"in b&&Array.isArray(b.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),b};return it.zodToJsonSchema=n,it}var Kr;function oa(){return Kr||(Kr=1,(function(r){var _=se&&se.__createBinding||(Object.create?(function(s,i,h,l){l===void 0&&(l=h);var f=Object.getOwnPropertyDescriptor(i,h);(!f||("get"in f?!i.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return i[h]}}),Object.defineProperty(s,l,f)}):(function(s,i,h,l){l===void 0&&(l=h),s[l]=i[h]})),o=se&&se.__exportStar||function(s,i){for(var h in s)h!=="default"&&!Object.prototype.hasOwnProperty.call(i,h)&&_(i,s,h)};Object.defineProperty(r,"__esModule",{value:!0}),o(St(),r),o(Hr(),r),o(oe(),r),o(Et(),r),o(R(),r),o(ia(),r),o(z(),r),o(Gr(),r),o(Qr(),r),o(Xr(),r),o(Mt(),r),o($r(),r),o(en(),r),o(tn(),r),o(rn(),r),o(nn(),r),o(an(),r),o(sn(),r),o(on(),r),o(dn(),r),o(un(),r),o(cn(),r),o(ln(),r),o(fn(),r),o(pn(),r),o(hn(),r),o(mn(),r),o(yn(),r),o(Zn(),r),o(Ut(),r),o(_n(),r),o(Vt(),r),o(gn(),r),o(vn(),r),o(Lt(),r),o(bn(),r),o(Tn(),r),o(Br(),r);const n=Br();r.default=n.zodToJsonSchema})(se)),se}export{oa as a,Rt as r};
@@ -1 +1 @@
1
- import{e as t}from"./index-BKFeHvuQ.js";function u(r){if(!r||r.trim()==="")return{};try{return JSON.parse(r)}catch{try{return t.parse(r)??{}}catch{return{}}}}export{u as p};
1
+ import{e as t}from"./index-CYH9nDaE.js";function u(r){if(!r||r.trim()==="")return{};try{return JSON.parse(r)}catch{try{return t.parse(r)??{}}catch{return{}}}}export{u as p};
@@ -0,0 +1 @@
1
+ import{e as t}from"./index-CYH9nDaE.js";function u(r){if(!r||r.trim()==="")return{};try{return JSON.parse(r)}catch{try{return t.parse(r)??{}}catch{return{}}}}export{u as p};