@nordicsemiconductor/pc-nrfconnect-shared 265.0.0 → 266.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Changelog.md
CHANGED
|
@@ -7,6 +7,12 @@ This project does _not_ adhere to
|
|
|
7
7
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html) but contrary to it
|
|
8
8
|
every new version is a new major version.
|
|
9
9
|
|
|
10
|
+
## 266.0.0 - 2026-12-02
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Support Electron 45 with launcher 6.0.0.
|
|
15
|
+
|
|
10
16
|
## 265.0.0 - 2026-12-01
|
|
11
17
|
|
|
12
18
|
### Changed
|
package/config/versions.ts
CHANGED
|
@@ -28,11 +28,17 @@ export const versionsByLauncherVersion: Record<
|
|
|
28
28
|
node: '24.18.1',
|
|
29
29
|
},
|
|
30
30
|
|
|
31
|
-
'>=5.4.1': {
|
|
31
|
+
'>=5.4.1 <6.0.0-pre.1': {
|
|
32
32
|
electron: '43.8.6',
|
|
33
33
|
chrome: '150.0.7871',
|
|
34
34
|
node: '24.22.1',
|
|
35
35
|
},
|
|
36
|
+
|
|
37
|
+
'>=6.0.0-pre.1': {
|
|
38
|
+
electron: '45.5.0',
|
|
39
|
+
chrome: '156.0.8078',
|
|
40
|
+
node: '24.22.3',
|
|
41
|
+
},
|
|
36
42
|
};
|
|
37
43
|
|
|
38
44
|
export const versionsForLauncherVersion = (
|
|
@@ -28,7 +28,7 @@ Expecting one of '${n.join("', '")}'`);let i=`${e}Help`;return this.on(i,s=>{let
|
|
|
28
28
|
`+a+"]":"["+o.join(",")+"]",xe=a,i}if(Tt&&typeof Tt=="object")for(s=Tt.length,r=0;r<s;r+=1)n=Tt[r],typeof n=="string"&&(i=Mn(n,u),i&&o.push(ms(n)+(xe?": ":":")+i));else for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(i=Mn(n,u),i&&o.push(ms(n)+(xe?": ":":")+i));return i=o.length===0?"{}":xe?`{
|
|
29
29
|
`+xe+o.join(`,
|
|
30
30
|
`+xe)+`
|
|
31
|
-
`+a+"}":"{"+o.join(",")+"}",xe=a,i;default:}}eu.exports=function(t,e,r){var n;if(xe="",qn="",typeof r=="number")for(n=0;n<r;n+=1)qn+=" ";else typeof r=="string"&&(qn=r);if(Tt=e,e&&typeof e!="function"&&(typeof e!="object"||typeof e.length!="number"))throw new Error("JSON.stringify");return Mn("",{"":t})}});var ru=A(Cs=>{"use strict";Cs.parse=Q0();Cs.stringify=tu()});var iu=A((RD,nu)=>{var Gp=typeof JSON<"u"?JSON:ru();nu.exports=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var r=e.cmp&&(function(n){return function(i){return function(s,a){var o={key:s,value:i[s]},u={key:a,value:i[a]};return n(o,u)}}})(e.cmp);return(function n(i){if(typeof i!="object"||i===null)return Gp.stringify(i);if(Jp(i)){for(var s=[],a=0;a<i.length;a++)s.push(n(i[a]));return"["+s.join(",")+"]"}else{for(var o=Kp(i).sort(r&&r(i)),s=[],a=0;a<o.length;a++){var u=o[a];s.push(n(u)+":"+n(i[u]))}return"{"+s.join(",")+"}"}})(t)};var Jp=Array.isArray||function(t){return{}.toString.call(t)==="[object Array]"},Kp=Object.keys||function(t){var e=Object.prototype.hasOwnProperty||function(){return!0},r=[];for(var n in t)e.call(t,n)&&r.push(n);return r}});var ou=A((PD,au)=>{var Yp=require("crypto").createHash,su=require("buffer").Buffer,Xp=iu();au.exports=function(e,r,n){return e=typeof e=="string"||su.isBuffer(e)?e:Xp(e),Yp(r||"sha1").update(e,su.isBuffer(e)?null:"utf8").digest(n||"hex")}});var cu=A(($D,uu)=>{function Qp(t){return function(e){return e?.[t]}}uu.exports=Qp});var Vn=A((LD,lu)=>{var eA=Array.isArray;lu.exports=eA});var fu=A((ZD,du)=>{var tA=typeof global=="object"&&global&&global.Object===Object&&global;du.exports=tA});var Un=A((jD,hu)=>{var rA=fu(),nA=typeof self=="object"&&self&&self.Object===Object&&self,iA=rA||nA||Function("return this")();hu.exports=iA});var Hn=A((qD,pu)=>{var sA=Un(),aA=sA.Symbol;pu.exports=aA});var mu=A((MD,Eu)=>{var Au=Hn(),Fu=Object.prototype,oA=Fu.hasOwnProperty,uA=Fu.toString,en=Au?Au.toStringTag:void 0;function cA(t){var e=oA.call(t,en),r=t[en];try{t[en]=void 0;var n=!0}catch{}var i=uA.call(t);return n&&(e?t[en]=r:delete t[en]),i}Eu.exports=cA});var gu=A((VD,Cu)=>{var lA=Object.prototype,dA=lA.toString;function fA(t){return dA.call(t)}Cu.exports=fA});var gs=A((UD,Bu)=>{var Du=Hn(),hA=mu(),pA=gu(),AA="[object Null]",FA="[object Undefined]",_u=Du?Du.toStringTag:void 0;function EA(t){return t==null?t===void 0?FA:AA:_u&&_u in Object(t)?hA(t):pA(t)}Bu.exports=EA});var vu=A((HD,yu)=>{function mA(t){return t!=null&&typeof t=="object"}yu.exports=mA});var zn=A((zD,bu)=>{var CA=gs(),gA=vu(),DA="[object Symbol]";function _A(t){return typeof t=="symbol"||gA(t)&&CA(t)==DA}bu.exports=_A});var Ds=A((WD,xu)=>{var BA=Vn(),yA=zn(),vA=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bA=/^\w*$/;function xA(t,e){if(BA(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||yA(t)?!0:bA.test(t)||!vA.test(t)||e!=null&&t in Object(e)}xu.exports=xA});var _s=A((GD,wu)=>{function wA(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}wu.exports=wA});var Su=A((JD,Iu)=>{var IA=gs(),SA=_s(),TA="[object AsyncFunction]",OA="[object Function]",kA="[object GeneratorFunction]",NA="[object Proxy]";function RA(t){if(!SA(t))return!1;var e=IA(t);return e==OA||e==kA||e==TA||e==NA}Iu.exports=RA});var Ou=A((KD,Tu)=>{var PA=Un(),$A=PA["__core-js_shared__"];Tu.exports=$A});var Ru=A((YD,Nu)=>{var Bs=Ou(),ku=(function(){var t=/[^.]+$/.exec(Bs&&Bs.keys&&Bs.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function LA(t){return!!ku&&ku in t}Nu.exports=LA});var $u=A((XD,Pu)=>{var ZA=Function.prototype,jA=ZA.toString;function qA(t){if(t!=null){try{return jA.call(t)}catch{}try{return t+""}catch{}}return""}Pu.exports=qA});var Zu=A((QD,Lu)=>{var MA=Su(),VA=Ru(),UA=_s(),HA=$u(),zA=/[\\^$.*+?()[\]{}|]/g,WA=/^\[object .+?Constructor\]$/,GA=Function.prototype,JA=Object.prototype,KA=GA.toString,YA=JA.hasOwnProperty,XA=RegExp("^"+KA.call(YA).replace(zA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function QA(t){if(!UA(t)||VA(t))return!1;var e=MA(t)?XA:WA;return e.test(HA(t))}Lu.exports=QA});var qu=A((e_,ju)=>{function eF(t,e){return t?.[e]}ju.exports=eF});var ys=A((t_,Mu)=>{var tF=Zu(),rF=qu();function nF(t,e){var r=rF(t,e);return tF(r)?r:void 0}Mu.exports=nF});var tn=A((r_,Vu)=>{var iF=ys(),sF=iF(Object,"create");Vu.exports=sF});var zu=A((n_,Hu)=>{var Uu=tn();function aF(){this.__data__=Uu?Uu(null):{},this.size=0}Hu.exports=aF});var Gu=A((i_,Wu)=>{function oF(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}Wu.exports=oF});var Ku=A((s_,Ju)=>{var uF=tn(),cF="__lodash_hash_undefined__",lF=Object.prototype,dF=lF.hasOwnProperty;function fF(t){var e=this.__data__;if(uF){var r=e[t];return r===cF?void 0:r}return dF.call(e,t)?e[t]:void 0}Ju.exports=fF});var Xu=A((a_,Yu)=>{var hF=tn(),pF=Object.prototype,AF=pF.hasOwnProperty;function FF(t){var e=this.__data__;return hF?e[t]!==void 0:AF.call(e,t)}Yu.exports=FF});var ec=A((o_,Qu)=>{var EF=tn(),mF="__lodash_hash_undefined__";function CF(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=EF&&e===void 0?mF:e,this}Qu.exports=CF});var rc=A((u_,tc)=>{var gF=zu(),DF=Gu(),_F=Ku(),BF=Xu(),yF=ec();function gr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}gr.prototype.clear=gF;gr.prototype.delete=DF;gr.prototype.get=_F;gr.prototype.has=BF;gr.prototype.set=yF;tc.exports=gr});var ic=A((c_,nc)=>{function vF(){this.__data__=[],this.size=0}nc.exports=vF});var ac=A((l_,sc)=>{function bF(t,e){return t===e||t!==t&&e!==e}sc.exports=bF});var rn=A((d_,oc)=>{var xF=ac();function wF(t,e){for(var r=t.length;r--;)if(xF(t[r][0],e))return r;return-1}oc.exports=wF});var cc=A((f_,uc)=>{var IF=rn(),SF=Array.prototype,TF=SF.splice;function OF(t){var e=this.__data__,r=IF(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():TF.call(e,r,1),--this.size,!0}uc.exports=OF});var dc=A((h_,lc)=>{var kF=rn();function NF(t){var e=this.__data__,r=kF(e,t);return r<0?void 0:e[r][1]}lc.exports=NF});var hc=A((p_,fc)=>{var RF=rn();function PF(t){return RF(this.__data__,t)>-1}fc.exports=PF});var Ac=A((A_,pc)=>{var $F=rn();function LF(t,e){var r=this.__data__,n=$F(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}pc.exports=LF});var Ec=A((F_,Fc)=>{var ZF=ic(),jF=cc(),qF=dc(),MF=hc(),VF=Ac();function Dr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Dr.prototype.clear=ZF;Dr.prototype.delete=jF;Dr.prototype.get=qF;Dr.prototype.has=MF;Dr.prototype.set=VF;Fc.exports=Dr});var Cc=A((E_,mc)=>{var UF=ys(),HF=Un(),zF=UF(HF,"Map");mc.exports=zF});var _c=A((m_,Dc)=>{var gc=rc(),WF=Ec(),GF=Cc();function JF(){this.size=0,this.__data__={hash:new gc,map:new(GF||WF),string:new gc}}Dc.exports=JF});var yc=A((C_,Bc)=>{function KF(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}Bc.exports=KF});var nn=A((g_,vc)=>{var YF=yc();function XF(t,e){var r=t.__data__;return YF(e)?r[typeof e=="string"?"string":"hash"]:r.map}vc.exports=XF});var xc=A((D_,bc)=>{var QF=nn();function eE(t){var e=QF(this,t).delete(t);return this.size-=e?1:0,e}bc.exports=eE});var Ic=A((__,wc)=>{var tE=nn();function rE(t){return tE(this,t).get(t)}wc.exports=rE});var Tc=A((B_,Sc)=>{var nE=nn();function iE(t){return nE(this,t).has(t)}Sc.exports=iE});var kc=A((y_,Oc)=>{var sE=nn();function aE(t,e){var r=sE(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}Oc.exports=aE});var Rc=A((v_,Nc)=>{var oE=_c(),uE=xc(),cE=Ic(),lE=Tc(),dE=kc();function _r(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}_r.prototype.clear=oE;_r.prototype.delete=uE;_r.prototype.get=cE;_r.prototype.has=lE;_r.prototype.set=dE;Nc.exports=_r});var Lc=A((b_,$c)=>{var Pc=Rc(),fE="Expected a function";function vs(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(fE);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=t.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(vs.Cache||Pc),r}vs.Cache=Pc;$c.exports=vs});var jc=A((x_,Zc)=>{var hE=Lc(),pE=500;function AE(t){var e=hE(t,function(n){return r.size===pE&&r.clear(),n}),r=e.cache;return e}Zc.exports=AE});var Mc=A((w_,qc)=>{var FE=jc(),EE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mE=/\\(\\)?/g,CE=FE(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(EE,function(r,n,i,s){e.push(i?s.replace(mE,"$1"):n||r)}),e});qc.exports=CE});var Uc=A((I_,Vc)=>{function gE(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}Vc.exports=gE});var Kc=A((S_,Jc)=>{var Hc=Hn(),DE=Uc(),_E=Vn(),BE=zn(),yE=1/0,zc=Hc?Hc.prototype:void 0,Wc=zc?zc.toString:void 0;function Gc(t){if(typeof t=="string")return t;if(_E(t))return DE(t,Gc)+"";if(BE(t))return Wc?Wc.call(t):"";var e=t+"";return e=="0"&&1/t==-yE?"-0":e}Jc.exports=Gc});var Xc=A((T_,Yc)=>{var vE=Kc();function bE(t){return t==null?"":vE(t)}Yc.exports=bE});var el=A((O_,Qc)=>{var xE=Vn(),wE=Ds(),IE=Mc(),SE=Xc();function TE(t,e){return xE(t)?t:wE(t,e)?[t]:IE(SE(t))}Qc.exports=TE});var bs=A((k_,tl)=>{var OE=zn(),kE=1/0;function NE(t){if(typeof t=="string"||OE(t))return t;var e=t+"";return e=="0"&&1/t==-kE?"-0":e}tl.exports=NE});var nl=A((N_,rl)=>{var RE=el(),PE=bs();function $E(t,e){e=RE(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[PE(e[r++])];return r&&r==n?t:void 0}rl.exports=$E});var sl=A((R_,il)=>{var LE=nl();function ZE(t){return function(e){return LE(e,t)}}il.exports=ZE});var ol=A((P_,al)=>{var jE=cu(),qE=sl(),ME=Ds(),VE=bs();function UE(t){return ME(t)?jE(VE(t)):qE(t)}al.exports=UE});var dn=A(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.getParsedType=te.ZodParsedType=te.objectUtil=te.util=void 0;var yl;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let s={};for(let a of i)s[a]=a;return s},t.getValidEnumValues=i=>{let s=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(let o of s)a[o]=i[o];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let s=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},t.find=(i,s)=>{for(let a of i)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(yl=te.util||(te.util={}));var Km;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Km=te.objectUtil||(te.objectUtil={}));te.ZodParsedType=yl.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);var Ym=t=>{switch(typeof t){case"undefined":return te.ZodParsedType.undefined;case"string":return te.ZodParsedType.string;case"number":return isNaN(t)?te.ZodParsedType.nan:te.ZodParsedType.number;case"boolean":return te.ZodParsedType.boolean;case"function":return te.ZodParsedType.function;case"bigint":return te.ZodParsedType.bigint;case"symbol":return te.ZodParsedType.symbol;case"object":return Array.isArray(t)?te.ZodParsedType.array:t===null?te.ZodParsedType.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?te.ZodParsedType.promise:typeof Map<"u"&&t instanceof Map?te.ZodParsedType.map:typeof Set<"u"&&t instanceof Set?te.ZodParsedType.set:typeof Date<"u"&&t instanceof Date?te.ZodParsedType.date:te.ZodParsedType.object;default:return te.ZodParsedType.unknown}};te.getParsedType=Ym});var ti=A(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.ZodError=Ct.quotelessJson=Ct.ZodIssueCode=void 0;var vl=dn();Ct.ZodIssueCode=vl.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"]);var Xm=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");Ct.quotelessJson=Xm;var fn=class t extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(s){return s.message},n={_errors:[]},i=s=>{for(let a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let o=n,u=0;for(;u<a.path.length;){let c=a.path[u];u===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(r(a))):o[c]=o[c]||{_errors:[]},o=o[c],u++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,vl.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Ct.ZodError=fn;fn.create=t=>new fn(t)});var ks=A(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});var Wt=dn(),he=ti(),Qm=(t,e)=>{let r;switch(t.code){case he.ZodIssueCode.invalid_type:t.received===Wt.ZodParsedType.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case he.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Wt.util.jsonStringifyReplacer)}`;break;case he.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${Wt.util.joinValues(t.keys,", ")}`;break;case he.ZodIssueCode.invalid_union:r="Invalid input";break;case he.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Wt.util.joinValues(t.options)}`;break;case he.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${Wt.util.joinValues(t.options)}, received '${t.received}'`;break;case he.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case he.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case he.ZodIssueCode.invalid_date:r="Invalid date";break;case he.ZodIssueCode.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Wt.util.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case he.ZodIssueCode.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case he.ZodIssueCode.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case he.ZodIssueCode.custom:r="Invalid input";break;case he.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case he.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case he.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=e.defaultError,Wt.util.assertNever(t)}return{message:r}};Os.default=Qm});var ri=A(Ge=>{"use strict";var e2=Ge&&Ge.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.getErrorMap=Ge.setErrorMap=Ge.defaultErrorMap=void 0;var bl=e2(ks());Ge.defaultErrorMap=bl.default;var xl=bl.default;function t2(t){xl=t}Ge.setErrorMap=t2;function r2(){return xl}Ge.getErrorMap=r2});var Rs=A(Q=>{"use strict";var n2=Q&&Q.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Q,"__esModule",{value:!0});Q.isAsync=Q.isValid=Q.isDirty=Q.isAborted=Q.OK=Q.DIRTY=Q.INVALID=Q.ParseStatus=Q.addIssueToContext=Q.EMPTY_PATH=Q.makeIssue=void 0;var i2=ri(),wl=n2(ks()),s2=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,s=[...r,...i.path||[]],a={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let o="",u=n.filter(c=>!!c).slice().reverse();for(let c of u)o=c(a,{data:e,defaultError:o}).message;return{...i,path:s,message:o}};Q.makeIssue=s2;Q.EMPTY_PATH=[];function a2(t,e){let r=(0,i2.getErrorMap)(),n=(0,Q.makeIssue)({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===wl.default?void 0:wl.default].filter(i=>!!i)});t.common.issues.push(n)}Q.addIssueToContext=a2;var Ns=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return Q.INVALID;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let s=await i.key,a=await i.value;n.push({key:s,value:a})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return Q.INVALID;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[s.value]=a.value)}return{status:e.value,value:n}}};Q.ParseStatus=Ns;Q.INVALID=Object.freeze({status:"aborted"});var o2=t=>({status:"dirty",value:t});Q.DIRTY=o2;var u2=t=>({status:"valid",value:t});Q.OK=u2;var c2=t=>t.status==="aborted";Q.isAborted=c2;var l2=t=>t.status==="dirty";Q.isDirty=l2;var d2=t=>t.status==="valid";Q.isValid=d2;var f2=t=>typeof Promise<"u"&&t instanceof Promise;Q.isAsync=f2});var Sl=A(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0})});var Tl=A(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.errorUtil=void 0;var h2;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(h2=hn.errorUtil||(hn.errorUtil={}))});var Vl=A(d=>{"use strict";var ii=d&&d.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},kl=d&&d.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},pn,An;Object.defineProperty(d,"__esModule",{value:!0});d.boolean=d.bigint=d.array=d.any=d.coerce=d.ZodFirstPartyTypeKind=d.late=d.ZodSchema=d.Schema=d.custom=d.ZodReadonly=d.ZodPipeline=d.ZodBranded=d.BRAND=d.ZodNaN=d.ZodCatch=d.ZodDefault=d.ZodNullable=d.ZodOptional=d.ZodTransformer=d.ZodEffects=d.ZodPromise=d.ZodNativeEnum=d.ZodEnum=d.ZodLiteral=d.ZodLazy=d.ZodFunction=d.ZodSet=d.ZodMap=d.ZodRecord=d.ZodTuple=d.ZodIntersection=d.ZodDiscriminatedUnion=d.ZodUnion=d.ZodObject=d.ZodArray=d.ZodVoid=d.ZodNever=d.ZodUnknown=d.ZodAny=d.ZodNull=d.ZodUndefined=d.ZodSymbol=d.ZodDate=d.ZodBoolean=d.ZodBigInt=d.ZodNumber=d.ZodString=d.datetimeRegex=d.ZodType=void 0;d.NEVER=d.void=d.unknown=d.union=d.undefined=d.tuple=d.transformer=d.symbol=d.string=d.strictObject=d.set=d.record=d.promise=d.preprocess=d.pipeline=d.ostring=d.optional=d.onumber=d.oboolean=d.object=d.number=d.nullable=d.null=d.never=d.nativeEnum=d.nan=d.map=d.literal=d.lazy=d.intersection=d.instanceof=d.function=d.enum=d.effect=d.discriminatedUnion=d.date=void 0;var ni=ri(),S=Tl(),p=Rs(),_=dn(),D=ti(),$e=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Ol=(t,e)=>{if((0,p.isValid)(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new D.ZodError(t.common.issues);return this._error=r,this._error}}};function q(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,o)=>{var u,c;let{message:l}=t;return a.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:(u=l??n)!==null&&u!==void 0?u:o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:(c=l??r)!==null&&c!==void 0?c:o.defaultError}},description:i}}var M=class{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)}get description(){return this._def.description}_getType(e){return(0,_.getParsedType)(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:(0,_.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new p.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,_.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if((0,p.isAsync)(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,_.getParsedType)(e)},s=this._parseSync({data:e,path:i.path,parent:i});return Ol(i,s)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,_.getParsedType)(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await((0,p.isAsync)(i)?i:Promise.resolve(i));return Ol(n,s)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{let a=e(i),o=()=>s.addIssue({code:D.ZodIssueCode.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Se({schema:this,typeName:P.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Pe.create(this,this._def)}nullable(){return Ke.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return lt.create(this,this._def)}promise(){return _t.create(this,this._def)}or(e){return er.create([this,e],this._def)}and(e){return tr.create(this,e,this._def)}transform(e){return new Se({...q(this._def),schema:this,typeName:P.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new ar({...q(this._def),innerType:this,defaultValue:r,typeName:P.ZodDefault})}brand(){return new Fn({typeName:P.ZodBranded,type:this,...q(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new or({...q(this._def),innerType:this,catchValue:r,typeName:P.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return En.create(this,e)}readonly(){return ur.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};d.ZodType=M;d.Schema=M;d.ZodSchema=M;var p2=/^c[^\s-]{8,}$/i,A2=/^[0-9a-z]+$/,F2=/^[0-9A-HJKMNP-TV-Z]{26}$/,E2=/^[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,m2=/^[a-z0-9_-]{21}$/i,C2=/^[-+]?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)?)??$/,g2=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,D2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Ps,_2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,B2=/^(([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})))$/,y2=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Nl="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",v2=new RegExp(`^${Nl}$`);function Rl(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function b2(t){return new RegExp(`^${Rl(t)}$`)}function Pl(t){let e=`${Nl}T${Rl(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}d.datetimeRegex=Pl;function x2(t,e){return!!((e==="v4"||!e)&&_2.test(t)||(e==="v6"||!e)&&B2.test(t))}var gt=class t extends M{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==_.ZodParsedType.string){let s=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(s,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.string,received:s.parsedType}),p.INVALID}let n=new p.ParseStatus,i;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(i=this._getOrReturnCtx(e,i),a?(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")g2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"email",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Ps||(Ps=new RegExp(D2,"u")),Ps.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"emoji",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")E2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"uuid",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")m2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"nanoid",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")p2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"cuid",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")A2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"cuid2",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")F2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"ulid",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"url",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"regex",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?Pl(s).test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?v2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?b2(s).test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?C2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"duration",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?x2(e.data,s.version)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"ip",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?y2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"base64",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):_.util.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:D.ZodIssueCode.invalid_string,...S.errorUtil.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...S.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...S.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...S.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...S.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...S.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...S.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...S.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...S.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...S.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...S.errorUtil.errToObj(e)})}datetime(e){var r,n;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:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...S.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,...S.errorUtil.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...S.errorUtil.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...S.errorUtil.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...S.errorUtil.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...S.errorUtil.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...S.errorUtil.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...S.errorUtil.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...S.errorUtil.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...S.errorUtil.errToObj(r)})}nonempty(e){return this.min(1,S.errorUtil.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...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 isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};d.ZodString=gt;gt.create=t=>{var e;return new gt({checks:[],typeName:P.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...q(t)})};function w2(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,s=parseInt(t.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return s%a/Math.pow(10,i)}var Gt=class t extends M{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)!==_.ZodParsedType.number){let s=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(s,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.number,received:s.parsedType}),p.INVALID}let n,i=new p.ParseStatus;for(let s of this._def.checks)s.kind==="int"?_.util.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?w2(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.not_finite,message:s.message}),i.dirty()):_.util.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,S.errorUtil.toString(r))}gt(e,r){return this.setLimit("min",e,!1,S.errorUtil.toString(r))}lte(e,r){return this.setLimit("max",e,!0,S.errorUtil.toString(r))}lt(e,r){return this.setLimit("max",e,!1,S.errorUtil.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:S.errorUtil.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:S.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:S.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:S.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:S.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:S.errorUtil.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:S.errorUtil.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:S.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:S.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:S.errorUtil.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&_.util.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};d.ZodNumber=Gt;Gt.create=t=>new Gt({checks:[],typeName:P.ZodNumber,coerce:t?.coerce||!1,...q(t)});var Jt=class t extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==_.ZodParsedType.bigint){let s=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(s,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.bigint,received:s.parsedType}),p.INVALID}let n,i=new p.ParseStatus;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):_.util.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,S.errorUtil.toString(r))}gt(e,r){return this.setLimit("min",e,!1,S.errorUtil.toString(r))}lte(e,r){return this.setLimit("max",e,!0,S.errorUtil.toString(r))}lt(e,r){return this.setLimit("max",e,!1,S.errorUtil.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:S.errorUtil.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:S.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:S.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:S.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:S.errorUtil.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:S.errorUtil.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};d.ZodBigInt=Jt;Jt.create=t=>{var e;return new Jt({checks:[],typeName:P.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...q(t)})};var Kt=class extends M{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==_.ZodParsedType.boolean){let n=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.boolean,received:n.parsedType}),p.INVALID}return(0,p.OK)(e.data)}};d.ZodBoolean=Kt;Kt.create=t=>new Kt({typeName:P.ZodBoolean,coerce:t?.coerce||!1,...q(t)});var Yt=class t extends M{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==_.ZodParsedType.date){let s=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(s,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.date,received:s.parsedType}),p.INVALID}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(s,{code:D.ZodIssueCode.invalid_date}),p.INVALID}let n=new p.ParseStatus,i;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):_.util.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:S.errorUtil.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:S.errorUtil.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};d.ZodDate=Yt;Yt.create=t=>new Yt({checks:[],coerce:t?.coerce||!1,typeName:P.ZodDate,...q(t)});var Or=class extends M{_parse(e){if(this._getType(e)!==_.ZodParsedType.symbol){let n=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.symbol,received:n.parsedType}),p.INVALID}return(0,p.OK)(e.data)}};d.ZodSymbol=Or;Or.create=t=>new Or({typeName:P.ZodSymbol,...q(t)});var Xt=class extends M{_parse(e){if(this._getType(e)!==_.ZodParsedType.undefined){let n=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.undefined,received:n.parsedType}),p.INVALID}return(0,p.OK)(e.data)}};d.ZodUndefined=Xt;Xt.create=t=>new Xt({typeName:P.ZodUndefined,...q(t)});var Qt=class extends M{_parse(e){if(this._getType(e)!==_.ZodParsedType.null){let n=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.null,received:n.parsedType}),p.INVALID}return(0,p.OK)(e.data)}};d.ZodNull=Qt;Qt.create=t=>new Qt({typeName:P.ZodNull,...q(t)});var Dt=class extends M{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,p.OK)(e.data)}};d.ZodAny=Dt;Dt.create=t=>new Dt({typeName:P.ZodAny,...q(t)});var ct=class extends M{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,p.OK)(e.data)}};d.ZodUnknown=ct;ct.create=t=>new ct({typeName:P.ZodUnknown,...q(t)});var Ve=class extends M{_parse(e){let r=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(r,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.never,received:r.parsedType}),p.INVALID}};d.ZodNever=Ve;Ve.create=t=>new Ve({typeName:P.ZodNever,...q(t)});var kr=class extends M{_parse(e){if(this._getType(e)!==_.ZodParsedType.undefined){let n=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.void,received:n.parsedType}),p.INVALID}return(0,p.OK)(e.data)}};d.ZodVoid=kr;kr.create=t=>new kr({typeName:P.ZodVoid,...q(t)});var lt=class t extends M{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==_.ZodParsedType.array)return(0,p.addIssueToContext)(r,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.array,received:r.parsedType}),p.INVALID;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,o=r.data.length<i.exactLength.value;(a||o)&&((0,p.addIssueToContext)(r,{code:a?D.ZodIssueCode.too_big:D.ZodIssueCode.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&((0,p.addIssueToContext)(r,{code:D.ZodIssueCode.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&((0,p.addIssueToContext)(r,{code:D.ZodIssueCode.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,o)=>i.type._parseAsync(new $e(r,a,r.path,o)))).then(a=>p.ParseStatus.mergeArray(n,a));let s=[...r.data].map((a,o)=>i.type._parseSync(new $e(r,a,r.path,o)));return p.ParseStatus.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:S.errorUtil.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:S.errorUtil.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:S.errorUtil.toString(r)}})}nonempty(e){return this.min(1,e)}};d.ZodArray=lt;lt.create=(t,e)=>new lt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:P.ZodArray,...q(e)});function Tr(t){if(t instanceof De){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Pe.create(Tr(n))}return new De({...t._def,shape:()=>e})}else return t instanceof lt?new lt({...t._def,type:Tr(t.element)}):t instanceof Pe?Pe.create(Tr(t.unwrap())):t instanceof Ke?Ke.create(Tr(t.unwrap())):t instanceof Je?Je.create(t.items.map(e=>Tr(e))):t}var De=class t extends M{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=_.util.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==_.ZodParsedType.object){let c=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(c,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.object,received:c.parsedType}),p.INVALID}let{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Ve&&this._def.unknownKeys==="strip"))for(let c in i.data)a.includes(c)||o.push(c);let u=[];for(let c of a){let l=s[c],f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new $e(i,f,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Ve){let c=this._def.unknownKeys;if(c==="passthrough")for(let l of o)u.push({key:{status:"valid",value:l},value:{status:"valid",value:i.data[l]}});else if(c==="strict")o.length>0&&((0,p.addIssueToContext)(i,{code:D.ZodIssueCode.unrecognized_keys,keys:o}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let l of o){let f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new $e(i,f,i.path,l)),alwaysSet:l in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let c=[];for(let l of u){let f=await l.key,m=await l.value;c.push({key:f,value:m,alwaysSet:l.alwaysSet})}return c}).then(c=>p.ParseStatus.mergeObjectSync(n,c)):p.ParseStatus.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return S.errorUtil.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,s,a,o;let u=(a=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(o=S.errorUtil.errToObj(e).message)!==null&&o!==void 0?o:u}:{message:u}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:P.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return _.util.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return _.util.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}deepPartial(){return Tr(this)}partial(e){let r={};return _.util.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return _.util.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Pe;)s=s._def.innerType;r[n]=s}}),new t({...this._def,shape:()=>r})}keyof(){return $l(_.util.objectKeys(this.shape))}};d.ZodObject=De;De.create=(t,e)=>new De({shape:()=>t,unknownKeys:"strip",catchall:Ve.create(),typeName:P.ZodObject,...q(e)});De.strictCreate=(t,e)=>new De({shape:()=>t,unknownKeys:"strict",catchall:Ve.create(),typeName:P.ZodObject,...q(e)});De.lazycreate=(t,e)=>new De({shape:t,unknownKeys:"strip",catchall:Ve.create(),typeName:P.ZodObject,...q(e)});var er=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(s){for(let o of s)if(o.result.status==="valid")return o.result;for(let o of s)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(o=>new D.ZodError(o.ctx.common.issues));return(0,p.addIssueToContext)(r,{code:D.ZodIssueCode.invalid_union,unionErrors:a}),p.INVALID}if(r.common.async)return Promise.all(n.map(async s=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let s,a=[];for(let u of n){let c={...r,common:{...r.common,issues:[]},parent:null},l=u._parseSync({data:r.data,path:r.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!s&&(s={result:l,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let o=a.map(u=>new D.ZodError(u));return(0,p.addIssueToContext)(r,{code:D.ZodIssueCode.invalid_union,unionErrors:o}),p.INVALID}}get options(){return this._def.options}};d.ZodUnion=er;er.create=(t,e)=>new er({options:t,typeName:P.ZodUnion,...q(e)});var ut=t=>t instanceof rr?ut(t.schema):t instanceof Se?ut(t.innerType()):t instanceof nr?[t.value]:t instanceof ir?t.options:t instanceof sr?_.util.objectValues(t.enum):t instanceof ar?ut(t._def.innerType):t instanceof Xt?[void 0]:t instanceof Qt?[null]:t instanceof Pe?[void 0,...ut(t.unwrap())]:t instanceof Ke?[null,...ut(t.unwrap())]:t instanceof Fn||t instanceof ur?ut(t.unwrap()):t instanceof or?ut(t._def.innerType):[],si=class t extends M{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==_.ZodParsedType.object)return(0,p.addIssueToContext)(r,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.object,received:r.parsedType}),p.INVALID;let n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):((0,p.addIssueToContext)(r,{code:D.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),p.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let s of r){let a=ut(s.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of a){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,s)}}return new t({typeName:P.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...q(n)})}};d.ZodDiscriminatedUnion=si;function $s(t,e){let r=(0,_.getParsedType)(t),n=(0,_.getParsedType)(e);if(t===e)return{valid:!0,data:t};if(r===_.ZodParsedType.object&&n===_.ZodParsedType.object){let i=_.util.objectKeys(e),s=_.util.objectKeys(t).filter(o=>i.indexOf(o)!==-1),a={...t,...e};for(let o of s){let u=$s(t[o],e[o]);if(!u.valid)return{valid:!1};a[o]=u.data}return{valid:!0,data:a}}else if(r===_.ZodParsedType.array&&n===_.ZodParsedType.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let s=0;s<t.length;s++){let a=t[s],o=e[s],u=$s(a,o);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===_.ZodParsedType.date&&n===_.ZodParsedType.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var tr=class extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(s,a)=>{if((0,p.isAborted)(s)||(0,p.isAborted)(a))return p.INVALID;let o=$s(s.value,a.value);return o.valid?(((0,p.isDirty)(s)||(0,p.isDirty)(a))&&r.dirty(),{status:r.value,value:o.data}):((0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_intersection_types}),p.INVALID)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};d.ZodIntersection=tr;tr.create=(t,e,r)=>new tr({left:t,right:e,typeName:P.ZodIntersection,...q(r)});var Je=class t extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==_.ZodParsedType.array)return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.array,received:n.parsedType}),p.INVALID;if(n.data.length<this._def.items.length)return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p.INVALID;!this._def.rest&&n.data.length>this._def.items.length&&((0,p.addIssueToContext)(n,{code:D.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((a,o)=>{let u=this._def.items[o]||this._def.rest;return u?u._parse(new $e(n,a,n.path,o)):null}).filter(a=>!!a);return n.common.async?Promise.all(s).then(a=>p.ParseStatus.mergeArray(r,a)):p.ParseStatus.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};d.ZodTuple=Je;Je.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Je({items:t,typeName:P.ZodTuple,rest:null,...q(e)})};var ai=class t extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==_.ZodParsedType.object)return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.object,received:n.parsedType}),p.INVALID;let i=[],s=this._def.keyType,a=this._def.valueType;for(let o in n.data)i.push({key:s._parse(new $e(n,o,n.path,o)),value:a._parse(new $e(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?p.ParseStatus.mergeObjectAsync(r,i):p.ParseStatus.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof M?new t({keyType:e,valueType:r,typeName:P.ZodRecord,...q(n)}):new t({keyType:gt.create(),valueType:e,typeName:P.ZodRecord,...q(r)})}};d.ZodRecord=ai;var Nr=class extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==_.ZodParsedType.map)return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.map,received:n.parsedType}),p.INVALID;let i=this._def.keyType,s=this._def.valueType,a=[...n.data.entries()].map(([o,u],c)=>({key:i._parse(new $e(n,o,n.path,[c,"key"])),value:s._parse(new $e(n,u,n.path,[c,"value"]))}));if(n.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let u of a){let c=await u.key,l=await u.value;if(c.status==="aborted"||l.status==="aborted")return p.INVALID;(c.status==="dirty"||l.status==="dirty")&&r.dirty(),o.set(c.value,l.value)}return{status:r.value,value:o}})}else{let o=new Map;for(let u of a){let c=u.key,l=u.value;if(c.status==="aborted"||l.status==="aborted")return p.INVALID;(c.status==="dirty"||l.status==="dirty")&&r.dirty(),o.set(c.value,l.value)}return{status:r.value,value:o}}}};d.ZodMap=Nr;Nr.create=(t,e,r)=>new Nr({valueType:e,keyType:t,typeName:P.ZodMap,...q(r)});var Rr=class t extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==_.ZodParsedType.set)return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.set,received:n.parsedType}),p.INVALID;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&((0,p.addIssueToContext)(n,{code:D.ZodIssueCode.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&((0,p.addIssueToContext)(n,{code:D.ZodIssueCode.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let s=this._def.valueType;function a(u){let c=new Set;for(let l of u){if(l.status==="aborted")return p.INVALID;l.status==="dirty"&&r.dirty(),c.add(l.value)}return{status:r.value,value:c}}let o=[...n.data.values()].map((u,c)=>s._parse(new $e(n,u,n.path,c)));return n.common.async?Promise.all(o).then(u=>a(u)):a(o)}min(e,r){return new t({...this._def,minSize:{value:e,message:S.errorUtil.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:S.errorUtil.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};d.ZodSet=Rr;Rr.create=(t,e)=>new Rr({valueType:t,minSize:null,maxSize:null,typeName:P.ZodSet,...q(e)});var oi=class t extends M{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==_.ZodParsedType.function)return(0,p.addIssueToContext)(r,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.function,received:r.parsedType}),p.INVALID;function n(o,u){return(0,p.makeIssue)({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,ni.getErrorMap)(),ni.defaultErrorMap].filter(c=>!!c),issueData:{code:D.ZodIssueCode.invalid_arguments,argumentsError:u}})}function i(o,u){return(0,p.makeIssue)({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,ni.getErrorMap)(),ni.defaultErrorMap].filter(c=>!!c),issueData:{code:D.ZodIssueCode.invalid_return_type,returnTypeError:u}})}let s={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof _t){let o=this;return(0,p.OK)(async function(...u){let c=new D.ZodError([]),l=await o._def.args.parseAsync(u,s).catch(F=>{throw c.addIssue(n(u,F)),c}),f=await Reflect.apply(a,this,l);return await o._def.returns._def.type.parseAsync(f,s).catch(F=>{throw c.addIssue(i(f,F)),c})})}else{let o=this;return(0,p.OK)(function(...u){let c=o._def.args.safeParse(u,s);if(!c.success)throw new D.ZodError([n(u,c.error)]);let l=Reflect.apply(a,this,c.data),f=o._def.returns.safeParse(l,s);if(!f.success)throw new D.ZodError([i(l,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Je.create(e).rest(ct.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||Je.create([]).rest(ct.create()),returns:r||ct.create(),typeName:P.ZodFunction,...q(n)})}};d.ZodFunction=oi;var rr=class extends M{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};d.ZodLazy=rr;rr.create=(t,e)=>new rr({getter:t,typeName:P.ZodLazy,...q(e)});var nr=class extends M{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(r,{received:r.data,code:D.ZodIssueCode.invalid_literal,expected:this._def.value}),p.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}};d.ZodLiteral=nr;nr.create=(t,e)=>new nr({value:t,typeName:P.ZodLiteral,...q(e)});function $l(t,e){return new ir({values:t,typeName:P.ZodEnum,...q(e)})}var ir=class t extends M{constructor(){super(...arguments),pn.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return(0,p.addIssueToContext)(r,{expected:_.util.joinValues(n),received:r.parsedType,code:D.ZodIssueCode.invalid_type}),p.INVALID}if(ii(this,pn,"f")||kl(this,pn,new Set(this._def.values),"f"),!ii(this,pn,"f").has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return(0,p.addIssueToContext)(r,{received:r.data,code:D.ZodIssueCode.invalid_enum_value,options:n}),p.INVALID}return(0,p.OK)(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};d.ZodEnum=ir;pn=new WeakMap;ir.create=$l;var sr=class extends M{constructor(){super(...arguments),An.set(this,void 0)}_parse(e){let r=_.util.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==_.ZodParsedType.string&&n.parsedType!==_.ZodParsedType.number){let i=_.util.objectValues(r);return(0,p.addIssueToContext)(n,{expected:_.util.joinValues(i),received:n.parsedType,code:D.ZodIssueCode.invalid_type}),p.INVALID}if(ii(this,An,"f")||kl(this,An,new Set(_.util.getValidEnumValues(this._def.values)),"f"),!ii(this,An,"f").has(e.data)){let i=_.util.objectValues(r);return(0,p.addIssueToContext)(n,{received:n.data,code:D.ZodIssueCode.invalid_enum_value,options:i}),p.INVALID}return(0,p.OK)(e.data)}get enum(){return this._def.values}};d.ZodNativeEnum=sr;An=new WeakMap;sr.create=(t,e)=>new sr({values:t,typeName:P.ZodNativeEnum,...q(e)});var _t=class extends M{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==_.ZodParsedType.promise&&r.common.async===!1)return(0,p.addIssueToContext)(r,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.promise,received:r.parsedType}),p.INVALID;let n=r.parsedType===_.ZodParsedType.promise?r.data:Promise.resolve(r.data);return(0,p.OK)(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};d.ZodPromise=_t;_t.create=(t,e)=>new _t({type:t,typeName:P.ZodPromise,...q(e)});var Se=class extends M{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===P.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:a=>{(0,p.addIssueToContext)(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){let a=i.transform(n.data,s);if(n.common.async)return Promise.resolve(a).then(async o=>{if(r.value==="aborted")return p.INVALID;let u=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return u.status==="aborted"?p.INVALID:u.status==="dirty"||r.value==="dirty"?(0,p.DIRTY)(u.value):u});{if(r.value==="aborted")return p.INVALID;let o=this._def.schema._parseSync({data:a,path:n.path,parent:n});return o.status==="aborted"?p.INVALID:o.status==="dirty"||r.value==="dirty"?(0,p.DIRTY)(o.value):o}}if(i.type==="refinement"){let a=o=>{let u=i.refinement(o,s);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?p.INVALID:(o.status==="dirty"&&r.dirty(),a(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?p.INVALID:(o.status==="dirty"&&r.dirty(),a(o.value).then(()=>({status:r.value,value:o.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,p.isValid)(a))return a;let o=i.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>(0,p.isValid)(a)?Promise.resolve(i.transform(a.value,s)).then(o=>({status:r.value,value:o})):a);_.util.assertNever(i)}};d.ZodEffects=Se;d.ZodTransformer=Se;Se.create=(t,e,r)=>new Se({schema:t,typeName:P.ZodEffects,effect:e,...q(r)});Se.createWithPreprocess=(t,e,r)=>new Se({schema:e,effect:{type:"preprocess",transform:t},typeName:P.ZodEffects,...q(r)});var Pe=class extends M{_parse(e){return this._getType(e)===_.ZodParsedType.undefined?(0,p.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};d.ZodOptional=Pe;Pe.create=(t,e)=>new Pe({innerType:t,typeName:P.ZodOptional,...q(e)});var Ke=class extends M{_parse(e){return this._getType(e)===_.ZodParsedType.null?(0,p.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};d.ZodNullable=Ke;Ke.create=(t,e)=>new Ke({innerType:t,typeName:P.ZodNullable,...q(e)});var ar=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===_.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};d.ZodDefault=ar;ar.create=(t,e)=>new ar({innerType:t,typeName:P.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...q(e)});var or=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return(0,p.isAsync)(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new D.ZodError(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new D.ZodError(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};d.ZodCatch=or;or.create=(t,e)=>new or({innerType:t,typeName:P.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...q(e)});var Pr=class extends M{_parse(e){if(this._getType(e)!==_.ZodParsedType.nan){let n=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.nan,received:n.parsedType}),p.INVALID}return{status:"valid",value:e.data}}};d.ZodNaN=Pr;Pr.create=t=>new Pr({typeName:P.ZodNaN,...q(t)});d.BRAND=Symbol("zod_brand");var Fn=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}};d.ZodBranded=Fn;var En=class t extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?p.INVALID:s.status==="dirty"?(r.dirty(),(0,p.DIRTY)(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?p.INVALID:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:P.ZodPipeline})}};d.ZodPipeline=En;var ur=class extends M{_parse(e){let r=this._def.innerType._parse(e),n=i=>((0,p.isValid)(i)&&(i.value=Object.freeze(i.value)),i);return(0,p.isAsync)(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};d.ZodReadonly=ur;ur.create=(t,e)=>new ur({innerType:t,typeName:P.ZodReadonly,...q(e)});function Ll(t,e={},r){return t?Dt.create().superRefine((n,i)=>{var s,a;if(!t(n)){let o=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,u=(a=(s=o.fatal)!==null&&s!==void 0?s:r)!==null&&a!==void 0?a:!0,c=typeof o=="string"?{message:o}:o;i.addIssue({code:"custom",...c,fatal:u})}}):Dt.create()}d.custom=Ll;d.late={object:De.lazycreate};var P;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(P=d.ZodFirstPartyTypeKind||(d.ZodFirstPartyTypeKind={}));var I2=(t,e={message:`Input not instance of ${t.name}`})=>Ll(r=>r instanceof t,e);d.instanceof=I2;var Zl=gt.create;d.string=Zl;var jl=Gt.create;d.number=jl;var S2=Pr.create;d.nan=S2;var T2=Jt.create;d.bigint=T2;var ql=Kt.create;d.boolean=ql;var O2=Yt.create;d.date=O2;var k2=Or.create;d.symbol=k2;var N2=Xt.create;d.undefined=N2;var R2=Qt.create;d.null=R2;var P2=Dt.create;d.any=P2;var $2=ct.create;d.unknown=$2;var L2=Ve.create;d.never=L2;var Z2=kr.create;d.void=Z2;var j2=lt.create;d.array=j2;var q2=De.create;d.object=q2;var M2=De.strictCreate;d.strictObject=M2;var V2=er.create;d.union=V2;var U2=si.create;d.discriminatedUnion=U2;var H2=tr.create;d.intersection=H2;var z2=Je.create;d.tuple=z2;var W2=ai.create;d.record=W2;var G2=Nr.create;d.map=G2;var J2=Rr.create;d.set=J2;var K2=oi.create;d.function=K2;var Y2=rr.create;d.lazy=Y2;var X2=nr.create;d.literal=X2;var Q2=ir.create;d.enum=Q2;var eC=sr.create;d.nativeEnum=eC;var tC=_t.create;d.promise=tC;var Ml=Se.create;d.effect=Ml;d.transformer=Ml;var rC=Pe.create;d.optional=rC;var nC=Ke.create;d.nullable=nC;var iC=Se.createWithPreprocess;d.preprocess=iC;var sC=En.create;d.pipeline=sC;var aC=()=>Zl().optional();d.ostring=aC;var oC=()=>jl().optional();d.onumber=oC;var uC=()=>ql().optional();d.oboolean=uC;d.coerce={string:(t=>gt.create({...t,coerce:!0})),number:(t=>Gt.create({...t,coerce:!0})),boolean:(t=>Kt.create({...t,coerce:!0})),bigint:(t=>Jt.create({...t,coerce:!0})),date:(t=>Yt.create({...t,coerce:!0}))};d.NEVER=p.INVALID});var Ls=A(Le=>{"use strict";var cC=Le&&Le.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),$r=Le&&Le.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&cC(e,t,r)};Object.defineProperty(Le,"__esModule",{value:!0});$r(ri(),Le);$r(Rs(),Le);$r(Sl(),Le);$r(dn(),Le);$r(Vl(),Le);$r(ti(),Le)});var zl=A(_e=>{"use strict";var Ul=_e&&_e.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lC=_e&&_e.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),dC=_e&&_e.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Ul(e,t,r);return lC(e,t),e},fC=_e&&_e.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ul(e,t,r)};Object.defineProperty(_e,"__esModule",{value:!0});_e.z=void 0;var Hl=dC(Ls());_e.z=Hl;fC(Ls(),_e);_e.default=Hl});var Wl=A(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.joinPath=void 0;var hC=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function pC(t){return t.length===1?t[0].toString():t.reduce((e,r)=>{if(typeof r=="number")return e+"["+r.toString()+"]";if(r.includes('"'))return e+'["'+AC(r)+'"]';if(!hC.test(r))return e+'["'+r+'"]';let n=e.length===0?"":".";return e+n+r},"")}ui.joinPath=pC;function AC(t){return t.replace(/"/g,'\\"')}});var Gl=A(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.isNonEmptyArray=void 0;function FC(t){return t.length!==0}ci.isNonEmptyArray=FC});var td=A(ae=>{"use strict";var EC=ae&&ae.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),mC=ae&&ae.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),CC=ae&&ae.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&EC(e,t,r);return mC(e,t),e};Object.defineProperty(ae,"__esModule",{value:!0});ae.errorMap=ae.isValidationErrorLike=ae.isValidationError=ae.toValidationError=ae.fromZodError=ae.fromZodIssue=ae.ValidationError=void 0;var gC=CC(zl()),DC=Wl(),_C=Gl(),BC=99,Jl="; ",Kl=", or ",Zs="Validation error",Yl=": ",Lr=class extends Error{details;name;constructor(e,r=[]){super(e),this.details=r,this.name="ZodValidationError"}toString(){return this.message}};ae.ValidationError=Lr;function js(t,e,r){if(t.code==="invalid_union")return t.unionErrors.reduce((n,i)=>{let s=i.issues.map(a=>js(a,e,r)).join(e);return n.includes(s)||n.push(s),n},[]).join(r);if((0,_C.isNonEmptyArray)(t.path)){if(t.path.length===1){let n=t.path[0];if(typeof n=="number")return`${t.message} at index ${n}`}return`${t.message} at "${(0,DC.joinPath)(t.path)}"`}return t.message}function Xl(t,e,r){return e!==null?t.length>0?[e,t].join(r):e:t.length>0?t:Zs}function Ql(t,e={}){let{issueSeparator:r=Jl,unionSeparator:n=Kl,prefixSeparator:i=Yl,prefix:s=Zs}=e,a=js(t,r,n),o=Xl(a,s,i);return new Lr(o,[t])}ae.fromZodIssue=Ql;function ed(t,e={}){let{maxIssuesInMessage:r=BC,issueSeparator:n=Jl,unionSeparator:i=Kl,prefixSeparator:s=Yl,prefix:a=Zs}=e,o=t.errors.slice(0,r).map(c=>js(c,n,i)).join(n),u=Xl(o,a,s);return new Lr(u,t.errors)}ae.fromZodError=ed;var yC=(t={})=>e=>e instanceof gC.ZodError?ed(e,t):e instanceof Error?e:new Error("Unknown error");ae.toValidationError=yC;function vC(t){return t instanceof Lr}ae.isValidationError=vC;function bC(t){return t instanceof Error&&t.name==="ZodValidationError"}ae.isValidationErrorLike=bC;var xC=(t,e)=>({message:Ql({...t,message:t.message??e.defaultError}).message});ae.errorMap=xC});var rd=A(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.errorMap=pe.fromZodIssue=pe.fromZodError=pe.isValidationErrorLike=pe.isValidationError=pe.toValidationError=pe.ValidationError=void 0;var cr=td();Object.defineProperty(pe,"ValidationError",{enumerable:!0,get:function(){return cr.ValidationError}});Object.defineProperty(pe,"toValidationError",{enumerable:!0,get:function(){return cr.toValidationError}});Object.defineProperty(pe,"isValidationError",{enumerable:!0,get:function(){return cr.isValidationError}});Object.defineProperty(pe,"isValidationErrorLike",{enumerable:!0,get:function(){return cr.isValidationErrorLike}});Object.defineProperty(pe,"fromZodError",{enumerable:!0,get:function(){return cr.fromZodError}});Object.defineProperty(pe,"fromZodIssue",{enumerable:!0,get:function(){return cr.fromZodIssue}});Object.defineProperty(pe,"errorMap",{enumerable:!0,get:function(){return cr.errorMap}})});var ua=Qe(oa(),1),{program:wi,createCommand:Eg,createArgument:mg,createOption:Cg,CommanderError:gg,InvalidArgumentError:Dg,InvalidOptionArgumentError:_g,Command:Bg,Argument:yg,Option:ca,Help:vg}=ua.default;var md=Qe(Ya()),Cd=require("node:child_process"),dr=Qe(require("node:fs")),gd=Qe(Ln()),Dd=Qe(ou());var dd=Qe(ol()),fd=require("node:child_process"),lr=require("node:fs"),Ms=Qe(Ln());var ul=Qe(Ln()),Wn="5.2.0",HE={">=5.2.0 <5.4.0":{electron:"32.1.2",chrome:"128.0.6613",node:"20.17.0"},">=5.4.0 <5.4.1":{electron:"43.4.0",chrome:"150.0.7871",node:"24.18.1"},">=5.4.1":{electron:"43.8.6",chrome:"150.0.7871",node:"24.22.1"}},cl=(t,e=HE)=>{let r=Object.entries(e).find(([n])=>ul.default.satisfies(t,n,{includePrerelease:!0}));if(r==null)throw new Error(`No versions found for launcher version ${t}. Please update config/versions.ts to include this version.`);return r[1]};var G;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let s={};for(let a of i)s[a]=a;return s},t.getValidEnumValues=i=>{let s=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(let o of s)a[o]=i[o];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let s=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},t.find=(i,s)=>{for(let a of i)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(G||(G={}));var ws;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(ws||(ws={}));var y=G.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),At=t=>{switch(typeof t){case"undefined":return y.undefined;case"string":return y.string;case"number":return isNaN(t)?y.nan:y.number;case"boolean":return y.boolean;case"function":return y.function;case"bigint":return y.bigint;case"symbol":return y.symbol;case"object":return Array.isArray(t)?y.array:t===null?y.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?y.promise:typeof Map<"u"&&t instanceof Map?y.map:typeof Set<"u"&&t instanceof Set?y.set:typeof Date<"u"&&t instanceof Date?y.date:y.object;default:return y.unknown}},E=G.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"]),zE=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),we=class t extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(s){return s.message},n={_errors:[]},i=s=>{for(let a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let o=n,u=0;for(;u<a.path.length;){let c=a.path[u];u===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(r(a))):o[c]=o[c]||{_errors:[]},o=o[c],u++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,G.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};we.create=t=>new we(t);var vr=(t,e)=>{let r;switch(t.code){case E.invalid_type:t.received===y.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case E.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,G.jsonStringifyReplacer)}`;break;case E.unrecognized_keys:r=`Unrecognized key(s) in object: ${G.joinValues(t.keys,", ")}`;break;case E.invalid_union:r="Invalid input";break;case E.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${G.joinValues(t.options)}`;break;case E.invalid_enum_value:r=`Invalid enum value. Expected ${G.joinValues(t.options)}, received '${t.received}'`;break;case E.invalid_arguments:r="Invalid function arguments";break;case E.invalid_return_type:r="Invalid function return type";break;case E.invalid_date:r="Invalid date";break;case E.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:G.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case E.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case E.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case E.custom:r="Invalid input";break;case E.invalid_intersection_types:r="Intersection results could not be merged";break;case E.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case E.not_finite:r="Number must be finite";break;default:r=e.defaultError,G.assertNever(t)}return{message:r}},fl=vr;function WE(t){fl=t}function Gn(){return fl}var Jn=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,s=[...r,...i.path||[]],a={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let o="",u=n.filter(c=>!!c).slice().reverse();for(let c of u)o=c(a,{data:e,defaultError:o}).message;return{...i,path:s,message:o}},GE=[];function B(t,e){let r=Gn(),n=Jn({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===vr?void 0:vr].filter(i=>!!i)});t.common.issues.push(n)}var fe=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return R;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let s=await i.key,a=await i.value;n.push({key:s,value:a})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return R;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[s.value]=a.value)}return{status:e.value,value:n}}},R=Object.freeze({status:"aborted"}),yr=t=>({status:"dirty",value:t}),me=t=>({status:"valid",value:t}),Is=t=>t.status==="aborted",Ss=t=>t.status==="dirty",on=t=>t.status==="valid",un=t=>typeof Promise<"u"&&t instanceof Promise;function Kn(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function hl(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}var I;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(I||(I={}));var sn,an,Re=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ll=(t,e)=>{if(on(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new we(t.common.issues);return this._error=r,this._error}}};function Z(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,o)=>{var u,c;let{message:l}=t;return a.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:(u=l??n)!==null&&u!==void 0?u:o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:(c=l??r)!==null&&c!==void 0?c:o.defaultError}},description:i}}var j=class{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)}get description(){return this._def.description}_getType(e){return At(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:At(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new fe,ctx:{common:e.parent.common,data:e.data,parsedType:At(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(un(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:At(e)},s=this._parseSync({data:e,path:i.path,parent:i});return ll(i,s)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:At(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(un(i)?i:Promise.resolve(i));return ll(n,s)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{let a=e(i),o=()=>s.addIssue({code:E.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Ie({schema:this,typeName:N.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Ne.create(this,this._def)}nullable(){return We.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ot.create(this,this._def)}promise(){return mt.create(this,this._def)}or(e){return Lt.create([this,e],this._def)}and(e){return Zt.create(this,e,this._def)}transform(e){return new Ie({...Z(this._def),schema:this,typeName:N.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Ut({...Z(this._def),innerType:this,defaultValue:r,typeName:N.ZodDefault})}brand(){return new cn({typeName:N.ZodBranded,type:this,...Z(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Ht({...Z(this._def),innerType:this,catchValue:r,typeName:N.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return ln.create(this,e)}readonly(){return zt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},JE=/^c[^\s-]{8,}$/i,KE=/^[0-9a-z]+$/,YE=/^[0-9A-HJKMNP-TV-Z]{26}$/,XE=/^[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,QE=/^[a-z0-9_-]{21}$/i,em=/^[-+]?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)?)??$/,tm=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",xs,nm=/^(?:(?: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])$/,im=/^(([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})))$/,sm=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,pl="((\\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])))",am=new RegExp(`^${pl}$`);function Al(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function om(t){return new RegExp(`^${Al(t)}$`)}function Fl(t){let e=`${pl}T${Al(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function um(t,e){return!!((e==="v4"||!e)&&nm.test(t)||(e==="v6"||!e)&&im.test(t))}var Ft=class t extends j{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==y.string){let s=this._getOrReturnCtx(e);return B(s,{code:E.invalid_type,expected:y.string,received:s.parsedType}),R}let n=new fe,i;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),B(i,{code:E.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),B(i,{code:E.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(i=this._getOrReturnCtx(e,i),a?B(i,{code:E.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&B(i,{code:E.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")tm.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"email",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")xs||(xs=new RegExp(rm,"u")),xs.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"emoji",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")XE.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"uuid",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")QE.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"nanoid",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")JE.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"cuid",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")KE.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"cuid2",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")YE.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"ulid",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),B(i,{validation:"url",code:E.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"regex",code:E.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),B(i,{code:E.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),B(i,{code:E.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),B(i,{code:E.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?Fl(s).test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{code:E.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?am.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{code:E.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?om(s).test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{code:E.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?em.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"duration",code:E.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?um(e.data,s.version)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"ip",code:E.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?sm.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"base64",code:E.invalid_string,message:s.message}),n.dirty()):G.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:E.invalid_string,...I.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...I.errToObj(e)})}url(e){return this._addCheck({kind:"url",...I.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...I.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...I.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...I.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...I.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...I.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...I.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...I.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...I.errToObj(e)})}datetime(e){var r,n;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:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...I.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,...I.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...I.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...I.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...I.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...I.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...I.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...I.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...I.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...I.errToObj(r)})}nonempty(e){return this.min(1,I.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...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 isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Ft.create=t=>{var e;return new Ft({checks:[],typeName:N.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...Z(t)})};function cm(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,s=parseInt(t.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return s%a/Math.pow(10,i)}var Ot=class t extends j{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)!==y.number){let s=this._getOrReturnCtx(e);return B(s,{code:E.invalid_type,expected:y.number,received:s.parsedType}),R}let n,i=new fe;for(let s of this._def.checks)s.kind==="int"?G.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),B(n,{code:E.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),B(n,{code:E.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),B(n,{code:E.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?cm(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),B(n,{code:E.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),B(n,{code:E.not_finite,message:s.message}),i.dirty()):G.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,I.toString(r))}gt(e,r){return this.setLimit("min",e,!1,I.toString(r))}lte(e,r){return this.setLimit("max",e,!0,I.toString(r))}lt(e,r){return this.setLimit("max",e,!1,I.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:I.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:I.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:I.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:I.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:I.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:I.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:I.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:I.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:I.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:I.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&G.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};Ot.create=t=>new Ot({checks:[],typeName:N.ZodNumber,coerce:t?.coerce||!1,...Z(t)});var kt=class t extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==y.bigint){let s=this._getOrReturnCtx(e);return B(s,{code:E.invalid_type,expected:y.bigint,received:s.parsedType}),R}let n,i=new fe;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),B(n,{code:E.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),B(n,{code:E.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),B(n,{code:E.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):G.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,I.toString(r))}gt(e,r){return this.setLimit("min",e,!1,I.toString(r))}lte(e,r){return this.setLimit("max",e,!0,I.toString(r))}lt(e,r){return this.setLimit("max",e,!1,I.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:I.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:I.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:I.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:I.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:I.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:I.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};kt.create=t=>{var e;return new kt({checks:[],typeName:N.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...Z(t)})};var Nt=class extends j{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==y.boolean){let n=this._getOrReturnCtx(e);return B(n,{code:E.invalid_type,expected:y.boolean,received:n.parsedType}),R}return me(e.data)}};Nt.create=t=>new Nt({typeName:N.ZodBoolean,coerce:t?.coerce||!1,...Z(t)});var Rt=class t extends j{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==y.date){let s=this._getOrReturnCtx(e);return B(s,{code:E.invalid_type,expected:y.date,received:s.parsedType}),R}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return B(s,{code:E.invalid_date}),R}let n=new fe,i;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),B(i,{code:E.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),B(i,{code:E.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):G.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:I.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:I.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Rt.create=t=>new Rt({checks:[],coerce:t?.coerce||!1,typeName:N.ZodDate,...Z(t)});var br=class extends j{_parse(e){if(this._getType(e)!==y.symbol){let n=this._getOrReturnCtx(e);return B(n,{code:E.invalid_type,expected:y.symbol,received:n.parsedType}),R}return me(e.data)}};br.create=t=>new br({typeName:N.ZodSymbol,...Z(t)});var Pt=class extends j{_parse(e){if(this._getType(e)!==y.undefined){let n=this._getOrReturnCtx(e);return B(n,{code:E.invalid_type,expected:y.undefined,received:n.parsedType}),R}return me(e.data)}};Pt.create=t=>new Pt({typeName:N.ZodUndefined,...Z(t)});var $t=class extends j{_parse(e){if(this._getType(e)!==y.null){let n=this._getOrReturnCtx(e);return B(n,{code:E.invalid_type,expected:y.null,received:n.parsedType}),R}return me(e.data)}};$t.create=t=>new $t({typeName:N.ZodNull,...Z(t)});var Et=class extends j{constructor(){super(...arguments),this._any=!0}_parse(e){return me(e.data)}};Et.create=t=>new Et({typeName:N.ZodAny,...Z(t)});var at=class extends j{constructor(){super(...arguments),this._unknown=!0}_parse(e){return me(e.data)}};at.create=t=>new at({typeName:N.ZodUnknown,...Z(t)});var Me=class extends j{_parse(e){let r=this._getOrReturnCtx(e);return B(r,{code:E.invalid_type,expected:y.never,received:r.parsedType}),R}};Me.create=t=>new Me({typeName:N.ZodNever,...Z(t)});var xr=class extends j{_parse(e){if(this._getType(e)!==y.undefined){let n=this._getOrReturnCtx(e);return B(n,{code:E.invalid_type,expected:y.void,received:n.parsedType}),R}return me(e.data)}};xr.create=t=>new xr({typeName:N.ZodVoid,...Z(t)});var ot=class t extends j{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==y.array)return B(r,{code:E.invalid_type,expected:y.array,received:r.parsedType}),R;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,o=r.data.length<i.exactLength.value;(a||o)&&(B(r,{code:a?E.too_big:E.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(B(r,{code:E.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(B(r,{code:E.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,o)=>i.type._parseAsync(new Re(r,a,r.path,o)))).then(a=>fe.mergeArray(n,a));let s=[...r.data].map((a,o)=>i.type._parseSync(new Re(r,a,r.path,o)));return fe.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:I.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:I.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:I.toString(r)}})}nonempty(e){return this.min(1,e)}};ot.create=(t,e)=>new ot({type:t,minLength:null,maxLength:null,exactLength:null,typeName:N.ZodArray,...Z(e)});function Br(t){if(t instanceof ge){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Ne.create(Br(n))}return new ge({...t._def,shape:()=>e})}else return t instanceof ot?new ot({...t._def,type:Br(t.element)}):t instanceof Ne?Ne.create(Br(t.unwrap())):t instanceof We?We.create(Br(t.unwrap())):t instanceof ze?ze.create(t.items.map(e=>Br(e))):t}var ge=class t extends j{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=G.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==y.object){let c=this._getOrReturnCtx(e);return B(c,{code:E.invalid_type,expected:y.object,received:c.parsedType}),R}let{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Me&&this._def.unknownKeys==="strip"))for(let c in i.data)a.includes(c)||o.push(c);let u=[];for(let c of a){let l=s[c],f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new Re(i,f,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Me){let c=this._def.unknownKeys;if(c==="passthrough")for(let l of o)u.push({key:{status:"valid",value:l},value:{status:"valid",value:i.data[l]}});else if(c==="strict")o.length>0&&(B(i,{code:E.unrecognized_keys,keys:o}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let l of o){let f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new Re(i,f,i.path,l)),alwaysSet:l in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let c=[];for(let l of u){let f=await l.key,m=await l.value;c.push({key:f,value:m,alwaysSet:l.alwaysSet})}return c}).then(c=>fe.mergeObjectSync(n,c)):fe.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return I.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,s,a,o;let u=(a=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(o=I.errToObj(e).message)!==null&&o!==void 0?o:u}:{message:u}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:N.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return G.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return G.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}deepPartial(){return Br(this)}partial(e){let r={};return G.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return G.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Ne;)s=s._def.innerType;r[n]=s}}),new t({...this._def,shape:()=>r})}keyof(){return El(G.objectKeys(this.shape))}};ge.create=(t,e)=>new ge({shape:()=>t,unknownKeys:"strip",catchall:Me.create(),typeName:N.ZodObject,...Z(e)});ge.strictCreate=(t,e)=>new ge({shape:()=>t,unknownKeys:"strict",catchall:Me.create(),typeName:N.ZodObject,...Z(e)});ge.lazycreate=(t,e)=>new ge({shape:t,unknownKeys:"strip",catchall:Me.create(),typeName:N.ZodObject,...Z(e)});var Lt=class extends j{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(s){for(let o of s)if(o.result.status==="valid")return o.result;for(let o of s)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(o=>new we(o.ctx.common.issues));return B(r,{code:E.invalid_union,unionErrors:a}),R}if(r.common.async)return Promise.all(n.map(async s=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let s,a=[];for(let u of n){let c={...r,common:{...r.common,issues:[]},parent:null},l=u._parseSync({data:r.data,path:r.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!s&&(s={result:l,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let o=a.map(u=>new we(u));return B(r,{code:E.invalid_union,unionErrors:o}),R}}get options(){return this._def.options}};Lt.create=(t,e)=>new Lt({options:t,typeName:N.ZodUnion,...Z(e)});var st=t=>t instanceof jt?st(t.schema):t instanceof Ie?st(t.innerType()):t instanceof qt?[t.value]:t instanceof Mt?t.options:t instanceof Vt?G.objectValues(t.enum):t instanceof Ut?st(t._def.innerType):t instanceof Pt?[void 0]:t instanceof $t?[null]:t instanceof Ne?[void 0,...st(t.unwrap())]:t instanceof We?[null,...st(t.unwrap())]:t instanceof cn||t instanceof zt?st(t.unwrap()):t instanceof Ht?st(t._def.innerType):[],Yn=class t extends j{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.object)return B(r,{code:E.invalid_type,expected:y.object,received:r.parsedType}),R;let n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(B(r,{code:E.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),R)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let s of r){let a=st(s.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of a){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,s)}}return new t({typeName:N.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Z(n)})}};function Ts(t,e){let r=At(t),n=At(e);if(t===e)return{valid:!0,data:t};if(r===y.object&&n===y.object){let i=G.objectKeys(e),s=G.objectKeys(t).filter(o=>i.indexOf(o)!==-1),a={...t,...e};for(let o of s){let u=Ts(t[o],e[o]);if(!u.valid)return{valid:!1};a[o]=u.data}return{valid:!0,data:a}}else if(r===y.array&&n===y.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let s=0;s<t.length;s++){let a=t[s],o=e[s],u=Ts(a,o);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===y.date&&n===y.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Zt=class extends j{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(s,a)=>{if(Is(s)||Is(a))return R;let o=Ts(s.value,a.value);return o.valid?((Ss(s)||Ss(a))&&r.dirty(),{status:r.value,value:o.data}):(B(n,{code:E.invalid_intersection_types}),R)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Zt.create=(t,e,r)=>new Zt({left:t,right:e,typeName:N.ZodIntersection,...Z(r)});var ze=class t extends j{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.array)return B(n,{code:E.invalid_type,expected:y.array,received:n.parsedType}),R;if(n.data.length<this._def.items.length)return B(n,{code:E.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),R;!this._def.rest&&n.data.length>this._def.items.length&&(B(n,{code:E.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((a,o)=>{let u=this._def.items[o]||this._def.rest;return u?u._parse(new Re(n,a,n.path,o)):null}).filter(a=>!!a);return n.common.async?Promise.all(s).then(a=>fe.mergeArray(r,a)):fe.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};ze.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ze({items:t,typeName:N.ZodTuple,rest:null,...Z(e)})};var Xn=class t extends j{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.object)return B(n,{code:E.invalid_type,expected:y.object,received:n.parsedType}),R;let i=[],s=this._def.keyType,a=this._def.valueType;for(let o in n.data)i.push({key:s._parse(new Re(n,o,n.path,o)),value:a._parse(new Re(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?fe.mergeObjectAsync(r,i):fe.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof j?new t({keyType:e,valueType:r,typeName:N.ZodRecord,...Z(n)}):new t({keyType:Ft.create(),valueType:e,typeName:N.ZodRecord,...Z(r)})}},wr=class extends j{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.map)return B(n,{code:E.invalid_type,expected:y.map,received:n.parsedType}),R;let i=this._def.keyType,s=this._def.valueType,a=[...n.data.entries()].map(([o,u],c)=>({key:i._parse(new Re(n,o,n.path,[c,"key"])),value:s._parse(new Re(n,u,n.path,[c,"value"]))}));if(n.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let u of a){let c=await u.key,l=await u.value;if(c.status==="aborted"||l.status==="aborted")return R;(c.status==="dirty"||l.status==="dirty")&&r.dirty(),o.set(c.value,l.value)}return{status:r.value,value:o}})}else{let o=new Map;for(let u of a){let c=u.key,l=u.value;if(c.status==="aborted"||l.status==="aborted")return R;(c.status==="dirty"||l.status==="dirty")&&r.dirty(),o.set(c.value,l.value)}return{status:r.value,value:o}}}};wr.create=(t,e,r)=>new wr({valueType:e,keyType:t,typeName:N.ZodMap,...Z(r)});var Ir=class t extends j{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.set)return B(n,{code:E.invalid_type,expected:y.set,received:n.parsedType}),R;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(B(n,{code:E.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(B(n,{code:E.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let s=this._def.valueType;function a(u){let c=new Set;for(let l of u){if(l.status==="aborted")return R;l.status==="dirty"&&r.dirty(),c.add(l.value)}return{status:r.value,value:c}}let o=[...n.data.values()].map((u,c)=>s._parse(new Re(n,u,n.path,c)));return n.common.async?Promise.all(o).then(u=>a(u)):a(o)}min(e,r){return new t({...this._def,minSize:{value:e,message:I.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:I.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Ir.create=(t,e)=>new Ir({valueType:t,minSize:null,maxSize:null,typeName:N.ZodSet,...Z(e)});var Qn=class t extends j{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.function)return B(r,{code:E.invalid_type,expected:y.function,received:r.parsedType}),R;function n(o,u){return Jn({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Gn(),vr].filter(c=>!!c),issueData:{code:E.invalid_arguments,argumentsError:u}})}function i(o,u){return Jn({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Gn(),vr].filter(c=>!!c),issueData:{code:E.invalid_return_type,returnTypeError:u}})}let s={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof mt){let o=this;return me(async function(...u){let c=new we([]),l=await o._def.args.parseAsync(u,s).catch(F=>{throw c.addIssue(n(u,F)),c}),f=await Reflect.apply(a,this,l);return await o._def.returns._def.type.parseAsync(f,s).catch(F=>{throw c.addIssue(i(f,F)),c})})}else{let o=this;return me(function(...u){let c=o._def.args.safeParse(u,s);if(!c.success)throw new we([n(u,c.error)]);let l=Reflect.apply(a,this,c.data),f=o._def.returns.safeParse(l,s);if(!f.success)throw new we([i(l,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:ze.create(e).rest(at.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||ze.create([]).rest(at.create()),returns:r||at.create(),typeName:N.ZodFunction,...Z(n)})}},jt=class extends j{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};jt.create=(t,e)=>new jt({getter:t,typeName:N.ZodLazy,...Z(e)});var qt=class extends j{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return B(r,{received:r.data,code:E.invalid_literal,expected:this._def.value}),R}return{status:"valid",value:e.data}}get value(){return this._def.value}};qt.create=(t,e)=>new qt({value:t,typeName:N.ZodLiteral,...Z(e)});function El(t,e){return new Mt({values:t,typeName:N.ZodEnum,...Z(e)})}var Mt=class t extends j{constructor(){super(...arguments),sn.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return B(r,{expected:G.joinValues(n),received:r.parsedType,code:E.invalid_type}),R}if(Kn(this,sn,"f")||hl(this,sn,new Set(this._def.values),"f"),!Kn(this,sn,"f").has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return B(r,{received:r.data,code:E.invalid_enum_value,options:n}),R}return me(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};sn=new WeakMap;Mt.create=El;var Vt=class extends j{constructor(){super(...arguments),an.set(this,void 0)}_parse(e){let r=G.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==y.string&&n.parsedType!==y.number){let i=G.objectValues(r);return B(n,{expected:G.joinValues(i),received:n.parsedType,code:E.invalid_type}),R}if(Kn(this,an,"f")||hl(this,an,new Set(G.getValidEnumValues(this._def.values)),"f"),!Kn(this,an,"f").has(e.data)){let i=G.objectValues(r);return B(n,{received:n.data,code:E.invalid_enum_value,options:i}),R}return me(e.data)}get enum(){return this._def.values}};an=new WeakMap;Vt.create=(t,e)=>new Vt({values:t,typeName:N.ZodNativeEnum,...Z(e)});var mt=class extends j{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.promise&&r.common.async===!1)return B(r,{code:E.invalid_type,expected:y.promise,received:r.parsedType}),R;let n=r.parsedType===y.promise?r.data:Promise.resolve(r.data);return me(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};mt.create=(t,e)=>new mt({type:t,typeName:N.ZodPromise,...Z(e)});var Ie=class extends j{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===N.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:a=>{B(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){let a=i.transform(n.data,s);if(n.common.async)return Promise.resolve(a).then(async o=>{if(r.value==="aborted")return R;let u=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return u.status==="aborted"?R:u.status==="dirty"||r.value==="dirty"?yr(u.value):u});{if(r.value==="aborted")return R;let o=this._def.schema._parseSync({data:a,path:n.path,parent:n});return o.status==="aborted"?R:o.status==="dirty"||r.value==="dirty"?yr(o.value):o}}if(i.type==="refinement"){let a=o=>{let u=i.refinement(o,s);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?R:(o.status==="dirty"&&r.dirty(),a(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?R:(o.status==="dirty"&&r.dirty(),a(o.value).then(()=>({status:r.value,value:o.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!on(a))return a;let o=i.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>on(a)?Promise.resolve(i.transform(a.value,s)).then(o=>({status:r.value,value:o})):a);G.assertNever(i)}};Ie.create=(t,e,r)=>new Ie({schema:t,typeName:N.ZodEffects,effect:e,...Z(r)});Ie.createWithPreprocess=(t,e,r)=>new Ie({schema:e,effect:{type:"preprocess",transform:t},typeName:N.ZodEffects,...Z(r)});var Ne=class extends j{_parse(e){return this._getType(e)===y.undefined?me(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ne.create=(t,e)=>new Ne({innerType:t,typeName:N.ZodOptional,...Z(e)});var We=class extends j{_parse(e){return this._getType(e)===y.null?me(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};We.create=(t,e)=>new We({innerType:t,typeName:N.ZodNullable,...Z(e)});var Ut=class extends j{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===y.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Ut.create=(t,e)=>new Ut({innerType:t,typeName:N.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Z(e)});var Ht=class extends j{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return un(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new we(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new we(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Ht.create=(t,e)=>new Ht({innerType:t,typeName:N.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Z(e)});var Sr=class extends j{_parse(e){if(this._getType(e)!==y.nan){let n=this._getOrReturnCtx(e);return B(n,{code:E.invalid_type,expected:y.nan,received:n.parsedType}),R}return{status:"valid",value:e.data}}};Sr.create=t=>new Sr({typeName:N.ZodNaN,...Z(t)});var lm=Symbol("zod_brand"),cn=class extends j{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},ln=class t extends j{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?R:s.status==="dirty"?(r.dirty(),yr(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?R:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:N.ZodPipeline})}},zt=class extends j{_parse(e){let r=this._def.innerType._parse(e),n=i=>(on(i)&&(i.value=Object.freeze(i.value)),i);return un(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};zt.create=(t,e)=>new zt({innerType:t,typeName:N.ZodReadonly,...Z(e)});function ml(t,e={},r){return t?Et.create().superRefine((n,i)=>{var s,a;if(!t(n)){let o=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,u=(a=(s=o.fatal)!==null&&s!==void 0?s:r)!==null&&a!==void 0?a:!0,c=typeof o=="string"?{message:o}:o;i.addIssue({code:"custom",...c,fatal:u})}}):Et.create()}var dm={object:ge.lazycreate},N;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(N||(N={}));var fm=(t,e={message:`Input not instance of ${t.name}`})=>ml(r=>r instanceof t,e),Cl=Ft.create,gl=Ot.create,hm=Sr.create,pm=kt.create,Dl=Nt.create,Am=Rt.create,Fm=br.create,Em=Pt.create,mm=$t.create,Cm=Et.create,gm=at.create,Dm=Me.create,_m=xr.create,Bm=ot.create,ym=ge.create,vm=ge.strictCreate,bm=Lt.create,xm=Yn.create,wm=Zt.create,Im=ze.create,Sm=Xn.create,Tm=wr.create,Om=Ir.create,km=Qn.create,Nm=jt.create,Rm=qt.create,Pm=Mt.create,$m=Vt.create,Lm=mt.create,dl=Ie.create,Zm=Ne.create,jm=We.create,qm=Ie.createWithPreprocess,Mm=ln.create,Vm=()=>Cl().optional(),Um=()=>gl().optional(),Hm=()=>Dl().optional(),zm={string:(t=>Ft.create({...t,coerce:!0})),number:(t=>Ot.create({...t,coerce:!0})),boolean:(t=>Nt.create({...t,coerce:!0})),bigint:(t=>kt.create({...t,coerce:!0})),date:(t=>Rt.create({...t,coerce:!0}))},Wm=R,z=Object.freeze({__proto__:null,defaultErrorMap:vr,setErrorMap:WE,getErrorMap:Gn,makeIssue:Jn,EMPTY_PATH:GE,addIssueToContext:B,ParseStatus:fe,INVALID:R,DIRTY:yr,OK:me,isAborted:Is,isDirty:Ss,isValid:on,isAsync:un,get util(){return G},get objectUtil(){return ws},ZodParsedType:y,getParsedType:At,ZodType:j,datetimeRegex:Fl,ZodString:Ft,ZodNumber:Ot,ZodBigInt:kt,ZodBoolean:Nt,ZodDate:Rt,ZodSymbol:br,ZodUndefined:Pt,ZodNull:$t,ZodAny:Et,ZodUnknown:at,ZodNever:Me,ZodVoid:xr,ZodArray:ot,ZodObject:ge,ZodUnion:Lt,ZodDiscriminatedUnion:Yn,ZodIntersection:Zt,ZodTuple:ze,ZodRecord:Xn,ZodMap:wr,ZodSet:Ir,ZodFunction:Qn,ZodLazy:jt,ZodLiteral:qt,ZodEnum:Mt,ZodNativeEnum:Vt,ZodPromise:mt,ZodEffects:Ie,ZodTransformer:Ie,ZodOptional:Ne,ZodNullable:We,ZodDefault:Ut,ZodCatch:Ht,ZodNaN:Sr,BRAND:lm,ZodBranded:cn,ZodPipeline:ln,ZodReadonly:zt,custom:ml,Schema:j,ZodSchema:j,late:dm,get ZodFirstPartyTypeKind(){return N},coerce:zm,any:Cm,array:Bm,bigint:pm,boolean:Dl,date:Am,discriminatedUnion:xm,effect:dl,enum:Pm,function:km,instanceof:fm,intersection:wm,lazy:Nm,literal:Rm,map:Tm,nan:hm,nativeEnum:$m,never:Dm,null:mm,nullable:jm,number:gl,object:ym,oboolean:Hm,onumber:Um,optional:Zm,ostring:Vm,pipeline:Mm,preprocess:qm,promise:Lm,record:Sm,set:Om,strictObject:vm,string:Cl,symbol:Fm,transformer:dl,tuple:Im,undefined:Em,union:bm,unknown:gm,void:_m,NEVER:Wm,ZodIssueCode:E,quotelessJson:zE,ZodError:we});var _l=["PCA10028","PCA10031","PCA10040","PCA10056","PCA10059","PCA10090","PCA10095","PCA10100","PCA10121","PCA20020","PCA20053","PCA20035","PCA10143","PCA10152","PCA10153","PCA10165","PCA20065","PCA10171","PCA10156","PCA10175","PCA10184","PCA10188","PCA10214","PCA10201","PCA10218","PCA10226","PCA10232","PCA10237","PCA10208"];var q_=z.object({name:z.string(),description:z.string().optional(),apps:z.array(z.string().url())}),M_=z.array(z.string().url()),ei=z.string().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,"Is not a valid string for a semantic version"),Gm=z.string(),Jm=ei,Bl=z.record(Gm,z.tuple([Jm]));var nd=Qe(rd()),li=t=>e=>{let r=t.safeParse(JSON.parse(e));return r.success?r:{...r,error:(0,nd.fromZodError)(r.error,{prefix:"Error in package.json",prefixSeparator:`:
|
|
31
|
+
`+a+"}":"{"+o.join(",")+"}",xe=a,i;default:}}eu.exports=function(t,e,r){var n;if(xe="",qn="",typeof r=="number")for(n=0;n<r;n+=1)qn+=" ";else typeof r=="string"&&(qn=r);if(Tt=e,e&&typeof e!="function"&&(typeof e!="object"||typeof e.length!="number"))throw new Error("JSON.stringify");return Mn("",{"":t})}});var ru=A(Cs=>{"use strict";Cs.parse=Q0();Cs.stringify=tu()});var iu=A((RD,nu)=>{var Gp=typeof JSON<"u"?JSON:ru();nu.exports=function(t,e){e||(e={}),typeof e=="function"&&(e={cmp:e});var r=e.cmp&&(function(n){return function(i){return function(s,a){var o={key:s,value:i[s]},u={key:a,value:i[a]};return n(o,u)}}})(e.cmp);return(function n(i){if(typeof i!="object"||i===null)return Gp.stringify(i);if(Jp(i)){for(var s=[],a=0;a<i.length;a++)s.push(n(i[a]));return"["+s.join(",")+"]"}else{for(var o=Kp(i).sort(r&&r(i)),s=[],a=0;a<o.length;a++){var u=o[a];s.push(n(u)+":"+n(i[u]))}return"{"+s.join(",")+"}"}})(t)};var Jp=Array.isArray||function(t){return{}.toString.call(t)==="[object Array]"},Kp=Object.keys||function(t){var e=Object.prototype.hasOwnProperty||function(){return!0},r=[];for(var n in t)e.call(t,n)&&r.push(n);return r}});var ou=A((PD,au)=>{var Yp=require("crypto").createHash,su=require("buffer").Buffer,Xp=iu();au.exports=function(e,r,n){return e=typeof e=="string"||su.isBuffer(e)?e:Xp(e),Yp(r||"sha1").update(e,su.isBuffer(e)?null:"utf8").digest(n||"hex")}});var cu=A(($D,uu)=>{function Qp(t){return function(e){return e?.[t]}}uu.exports=Qp});var Vn=A((LD,lu)=>{var eA=Array.isArray;lu.exports=eA});var fu=A((ZD,du)=>{var tA=typeof global=="object"&&global&&global.Object===Object&&global;du.exports=tA});var Un=A((jD,hu)=>{var rA=fu(),nA=typeof self=="object"&&self&&self.Object===Object&&self,iA=rA||nA||Function("return this")();hu.exports=iA});var Hn=A((qD,pu)=>{var sA=Un(),aA=sA.Symbol;pu.exports=aA});var mu=A((MD,Eu)=>{var Au=Hn(),Fu=Object.prototype,oA=Fu.hasOwnProperty,uA=Fu.toString,en=Au?Au.toStringTag:void 0;function cA(t){var e=oA.call(t,en),r=t[en];try{t[en]=void 0;var n=!0}catch{}var i=uA.call(t);return n&&(e?t[en]=r:delete t[en]),i}Eu.exports=cA});var gu=A((VD,Cu)=>{var lA=Object.prototype,dA=lA.toString;function fA(t){return dA.call(t)}Cu.exports=fA});var gs=A((UD,Bu)=>{var Du=Hn(),hA=mu(),pA=gu(),AA="[object Null]",FA="[object Undefined]",_u=Du?Du.toStringTag:void 0;function EA(t){return t==null?t===void 0?FA:AA:_u&&_u in Object(t)?hA(t):pA(t)}Bu.exports=EA});var vu=A((HD,yu)=>{function mA(t){return t!=null&&typeof t=="object"}yu.exports=mA});var zn=A((zD,bu)=>{var CA=gs(),gA=vu(),DA="[object Symbol]";function _A(t){return typeof t=="symbol"||gA(t)&&CA(t)==DA}bu.exports=_A});var Ds=A((WD,xu)=>{var BA=Vn(),yA=zn(),vA=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bA=/^\w*$/;function xA(t,e){if(BA(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||yA(t)?!0:bA.test(t)||!vA.test(t)||e!=null&&t in Object(e)}xu.exports=xA});var _s=A((GD,wu)=>{function wA(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}wu.exports=wA});var Su=A((JD,Iu)=>{var IA=gs(),SA=_s(),TA="[object AsyncFunction]",OA="[object Function]",kA="[object GeneratorFunction]",NA="[object Proxy]";function RA(t){if(!SA(t))return!1;var e=IA(t);return e==OA||e==kA||e==TA||e==NA}Iu.exports=RA});var Ou=A((KD,Tu)=>{var PA=Un(),$A=PA["__core-js_shared__"];Tu.exports=$A});var Ru=A((YD,Nu)=>{var Bs=Ou(),ku=(function(){var t=/[^.]+$/.exec(Bs&&Bs.keys&&Bs.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function LA(t){return!!ku&&ku in t}Nu.exports=LA});var $u=A((XD,Pu)=>{var ZA=Function.prototype,jA=ZA.toString;function qA(t){if(t!=null){try{return jA.call(t)}catch{}try{return t+""}catch{}}return""}Pu.exports=qA});var Zu=A((QD,Lu)=>{var MA=Su(),VA=Ru(),UA=_s(),HA=$u(),zA=/[\\^$.*+?()[\]{}|]/g,WA=/^\[object .+?Constructor\]$/,GA=Function.prototype,JA=Object.prototype,KA=GA.toString,YA=JA.hasOwnProperty,XA=RegExp("^"+KA.call(YA).replace(zA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function QA(t){if(!UA(t)||VA(t))return!1;var e=MA(t)?XA:WA;return e.test(HA(t))}Lu.exports=QA});var qu=A((e_,ju)=>{function eF(t,e){return t?.[e]}ju.exports=eF});var ys=A((t_,Mu)=>{var tF=Zu(),rF=qu();function nF(t,e){var r=rF(t,e);return tF(r)?r:void 0}Mu.exports=nF});var tn=A((r_,Vu)=>{var iF=ys(),sF=iF(Object,"create");Vu.exports=sF});var zu=A((n_,Hu)=>{var Uu=tn();function aF(){this.__data__=Uu?Uu(null):{},this.size=0}Hu.exports=aF});var Gu=A((i_,Wu)=>{function oF(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}Wu.exports=oF});var Ku=A((s_,Ju)=>{var uF=tn(),cF="__lodash_hash_undefined__",lF=Object.prototype,dF=lF.hasOwnProperty;function fF(t){var e=this.__data__;if(uF){var r=e[t];return r===cF?void 0:r}return dF.call(e,t)?e[t]:void 0}Ju.exports=fF});var Xu=A((a_,Yu)=>{var hF=tn(),pF=Object.prototype,AF=pF.hasOwnProperty;function FF(t){var e=this.__data__;return hF?e[t]!==void 0:AF.call(e,t)}Yu.exports=FF});var ec=A((o_,Qu)=>{var EF=tn(),mF="__lodash_hash_undefined__";function CF(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=EF&&e===void 0?mF:e,this}Qu.exports=CF});var rc=A((u_,tc)=>{var gF=zu(),DF=Gu(),_F=Ku(),BF=Xu(),yF=ec();function gr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}gr.prototype.clear=gF;gr.prototype.delete=DF;gr.prototype.get=_F;gr.prototype.has=BF;gr.prototype.set=yF;tc.exports=gr});var ic=A((c_,nc)=>{function vF(){this.__data__=[],this.size=0}nc.exports=vF});var ac=A((l_,sc)=>{function bF(t,e){return t===e||t!==t&&e!==e}sc.exports=bF});var rn=A((d_,oc)=>{var xF=ac();function wF(t,e){for(var r=t.length;r--;)if(xF(t[r][0],e))return r;return-1}oc.exports=wF});var cc=A((f_,uc)=>{var IF=rn(),SF=Array.prototype,TF=SF.splice;function OF(t){var e=this.__data__,r=IF(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():TF.call(e,r,1),--this.size,!0}uc.exports=OF});var dc=A((h_,lc)=>{var kF=rn();function NF(t){var e=this.__data__,r=kF(e,t);return r<0?void 0:e[r][1]}lc.exports=NF});var hc=A((p_,fc)=>{var RF=rn();function PF(t){return RF(this.__data__,t)>-1}fc.exports=PF});var Ac=A((A_,pc)=>{var $F=rn();function LF(t,e){var r=this.__data__,n=$F(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}pc.exports=LF});var Ec=A((F_,Fc)=>{var ZF=ic(),jF=cc(),qF=dc(),MF=hc(),VF=Ac();function Dr(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Dr.prototype.clear=ZF;Dr.prototype.delete=jF;Dr.prototype.get=qF;Dr.prototype.has=MF;Dr.prototype.set=VF;Fc.exports=Dr});var Cc=A((E_,mc)=>{var UF=ys(),HF=Un(),zF=UF(HF,"Map");mc.exports=zF});var _c=A((m_,Dc)=>{var gc=rc(),WF=Ec(),GF=Cc();function JF(){this.size=0,this.__data__={hash:new gc,map:new(GF||WF),string:new gc}}Dc.exports=JF});var yc=A((C_,Bc)=>{function KF(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}Bc.exports=KF});var nn=A((g_,vc)=>{var YF=yc();function XF(t,e){var r=t.__data__;return YF(e)?r[typeof e=="string"?"string":"hash"]:r.map}vc.exports=XF});var xc=A((D_,bc)=>{var QF=nn();function eE(t){var e=QF(this,t).delete(t);return this.size-=e?1:0,e}bc.exports=eE});var Ic=A((__,wc)=>{var tE=nn();function rE(t){return tE(this,t).get(t)}wc.exports=rE});var Tc=A((B_,Sc)=>{var nE=nn();function iE(t){return nE(this,t).has(t)}Sc.exports=iE});var kc=A((y_,Oc)=>{var sE=nn();function aE(t,e){var r=sE(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}Oc.exports=aE});var Rc=A((v_,Nc)=>{var oE=_c(),uE=xc(),cE=Ic(),lE=Tc(),dE=kc();function _r(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}_r.prototype.clear=oE;_r.prototype.delete=uE;_r.prototype.get=cE;_r.prototype.has=lE;_r.prototype.set=dE;Nc.exports=_r});var Lc=A((b_,$c)=>{var Pc=Rc(),fE="Expected a function";function vs(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(fE);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=t.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(vs.Cache||Pc),r}vs.Cache=Pc;$c.exports=vs});var jc=A((x_,Zc)=>{var hE=Lc(),pE=500;function AE(t){var e=hE(t,function(n){return r.size===pE&&r.clear(),n}),r=e.cache;return e}Zc.exports=AE});var Mc=A((w_,qc)=>{var FE=jc(),EE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mE=/\\(\\)?/g,CE=FE(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(EE,function(r,n,i,s){e.push(i?s.replace(mE,"$1"):n||r)}),e});qc.exports=CE});var Uc=A((I_,Vc)=>{function gE(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}Vc.exports=gE});var Kc=A((S_,Jc)=>{var Hc=Hn(),DE=Uc(),_E=Vn(),BE=zn(),yE=1/0,zc=Hc?Hc.prototype:void 0,Wc=zc?zc.toString:void 0;function Gc(t){if(typeof t=="string")return t;if(_E(t))return DE(t,Gc)+"";if(BE(t))return Wc?Wc.call(t):"";var e=t+"";return e=="0"&&1/t==-yE?"-0":e}Jc.exports=Gc});var Xc=A((T_,Yc)=>{var vE=Kc();function bE(t){return t==null?"":vE(t)}Yc.exports=bE});var el=A((O_,Qc)=>{var xE=Vn(),wE=Ds(),IE=Mc(),SE=Xc();function TE(t,e){return xE(t)?t:wE(t,e)?[t]:IE(SE(t))}Qc.exports=TE});var bs=A((k_,tl)=>{var OE=zn(),kE=1/0;function NE(t){if(typeof t=="string"||OE(t))return t;var e=t+"";return e=="0"&&1/t==-kE?"-0":e}tl.exports=NE});var nl=A((N_,rl)=>{var RE=el(),PE=bs();function $E(t,e){e=RE(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[PE(e[r++])];return r&&r==n?t:void 0}rl.exports=$E});var sl=A((R_,il)=>{var LE=nl();function ZE(t){return function(e){return LE(e,t)}}il.exports=ZE});var ol=A((P_,al)=>{var jE=cu(),qE=sl(),ME=Ds(),VE=bs();function UE(t){return ME(t)?jE(VE(t)):qE(t)}al.exports=UE});var dn=A(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.getParsedType=te.ZodParsedType=te.objectUtil=te.util=void 0;var yl;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let s={};for(let a of i)s[a]=a;return s},t.getValidEnumValues=i=>{let s=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(let o of s)a[o]=i[o];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let s=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},t.find=(i,s)=>{for(let a of i)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(yl=te.util||(te.util={}));var Km;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Km=te.objectUtil||(te.objectUtil={}));te.ZodParsedType=yl.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);var Ym=t=>{switch(typeof t){case"undefined":return te.ZodParsedType.undefined;case"string":return te.ZodParsedType.string;case"number":return isNaN(t)?te.ZodParsedType.nan:te.ZodParsedType.number;case"boolean":return te.ZodParsedType.boolean;case"function":return te.ZodParsedType.function;case"bigint":return te.ZodParsedType.bigint;case"symbol":return te.ZodParsedType.symbol;case"object":return Array.isArray(t)?te.ZodParsedType.array:t===null?te.ZodParsedType.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?te.ZodParsedType.promise:typeof Map<"u"&&t instanceof Map?te.ZodParsedType.map:typeof Set<"u"&&t instanceof Set?te.ZodParsedType.set:typeof Date<"u"&&t instanceof Date?te.ZodParsedType.date:te.ZodParsedType.object;default:return te.ZodParsedType.unknown}};te.getParsedType=Ym});var ti=A(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.ZodError=Ct.quotelessJson=Ct.ZodIssueCode=void 0;var vl=dn();Ct.ZodIssueCode=vl.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"]);var Xm=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");Ct.quotelessJson=Xm;var fn=class t extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(s){return s.message},n={_errors:[]},i=s=>{for(let a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let o=n,u=0;for(;u<a.path.length;){let c=a.path[u];u===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(r(a))):o[c]=o[c]||{_errors:[]},o=o[c],u++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,vl.util.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Ct.ZodError=fn;fn.create=t=>new fn(t)});var ks=A(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});var Wt=dn(),he=ti(),Qm=(t,e)=>{let r;switch(t.code){case he.ZodIssueCode.invalid_type:t.received===Wt.ZodParsedType.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case he.ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Wt.util.jsonStringifyReplacer)}`;break;case he.ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${Wt.util.joinValues(t.keys,", ")}`;break;case he.ZodIssueCode.invalid_union:r="Invalid input";break;case he.ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Wt.util.joinValues(t.options)}`;break;case he.ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${Wt.util.joinValues(t.options)}, received '${t.received}'`;break;case he.ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case he.ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case he.ZodIssueCode.invalid_date:r="Invalid date";break;case he.ZodIssueCode.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Wt.util.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case he.ZodIssueCode.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case he.ZodIssueCode.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case he.ZodIssueCode.custom:r="Invalid input";break;case he.ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case he.ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case he.ZodIssueCode.not_finite:r="Number must be finite";break;default:r=e.defaultError,Wt.util.assertNever(t)}return{message:r}};Os.default=Qm});var ri=A(Ge=>{"use strict";var e2=Ge&&Ge.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ge,"__esModule",{value:!0});Ge.getErrorMap=Ge.setErrorMap=Ge.defaultErrorMap=void 0;var bl=e2(ks());Ge.defaultErrorMap=bl.default;var xl=bl.default;function t2(t){xl=t}Ge.setErrorMap=t2;function r2(){return xl}Ge.getErrorMap=r2});var Rs=A(Q=>{"use strict";var n2=Q&&Q.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Q,"__esModule",{value:!0});Q.isAsync=Q.isValid=Q.isDirty=Q.isAborted=Q.OK=Q.DIRTY=Q.INVALID=Q.ParseStatus=Q.addIssueToContext=Q.EMPTY_PATH=Q.makeIssue=void 0;var i2=ri(),wl=n2(ks()),s2=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,s=[...r,...i.path||[]],a={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let o="",u=n.filter(c=>!!c).slice().reverse();for(let c of u)o=c(a,{data:e,defaultError:o}).message;return{...i,path:s,message:o}};Q.makeIssue=s2;Q.EMPTY_PATH=[];function a2(t,e){let r=(0,i2.getErrorMap)(),n=(0,Q.makeIssue)({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===wl.default?void 0:wl.default].filter(i=>!!i)});t.common.issues.push(n)}Q.addIssueToContext=a2;var Ns=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return Q.INVALID;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let s=await i.key,a=await i.value;n.push({key:s,value:a})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return Q.INVALID;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[s.value]=a.value)}return{status:e.value,value:n}}};Q.ParseStatus=Ns;Q.INVALID=Object.freeze({status:"aborted"});var o2=t=>({status:"dirty",value:t});Q.DIRTY=o2;var u2=t=>({status:"valid",value:t});Q.OK=u2;var c2=t=>t.status==="aborted";Q.isAborted=c2;var l2=t=>t.status==="dirty";Q.isDirty=l2;var d2=t=>t.status==="valid";Q.isValid=d2;var f2=t=>typeof Promise<"u"&&t instanceof Promise;Q.isAsync=f2});var Sl=A(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0})});var Tl=A(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.errorUtil=void 0;var h2;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(h2=hn.errorUtil||(hn.errorUtil={}))});var Vl=A(d=>{"use strict";var ii=d&&d.__classPrivateFieldGet||function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},kl=d&&d.__classPrivateFieldSet||function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},pn,An;Object.defineProperty(d,"__esModule",{value:!0});d.boolean=d.bigint=d.array=d.any=d.coerce=d.ZodFirstPartyTypeKind=d.late=d.ZodSchema=d.Schema=d.custom=d.ZodReadonly=d.ZodPipeline=d.ZodBranded=d.BRAND=d.ZodNaN=d.ZodCatch=d.ZodDefault=d.ZodNullable=d.ZodOptional=d.ZodTransformer=d.ZodEffects=d.ZodPromise=d.ZodNativeEnum=d.ZodEnum=d.ZodLiteral=d.ZodLazy=d.ZodFunction=d.ZodSet=d.ZodMap=d.ZodRecord=d.ZodTuple=d.ZodIntersection=d.ZodDiscriminatedUnion=d.ZodUnion=d.ZodObject=d.ZodArray=d.ZodVoid=d.ZodNever=d.ZodUnknown=d.ZodAny=d.ZodNull=d.ZodUndefined=d.ZodSymbol=d.ZodDate=d.ZodBoolean=d.ZodBigInt=d.ZodNumber=d.ZodString=d.datetimeRegex=d.ZodType=void 0;d.NEVER=d.void=d.unknown=d.union=d.undefined=d.tuple=d.transformer=d.symbol=d.string=d.strictObject=d.set=d.record=d.promise=d.preprocess=d.pipeline=d.ostring=d.optional=d.onumber=d.oboolean=d.object=d.number=d.nullable=d.null=d.never=d.nativeEnum=d.nan=d.map=d.literal=d.lazy=d.intersection=d.instanceof=d.function=d.enum=d.effect=d.discriminatedUnion=d.date=void 0;var ni=ri(),S=Tl(),p=Rs(),_=dn(),D=ti(),$e=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Ol=(t,e)=>{if((0,p.isValid)(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new D.ZodError(t.common.issues);return this._error=r,this._error}}};function q(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,o)=>{var u,c;let{message:l}=t;return a.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:(u=l??n)!==null&&u!==void 0?u:o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:(c=l??r)!==null&&c!==void 0?c:o.defaultError}},description:i}}var M=class{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)}get description(){return this._def.description}_getType(e){return(0,_.getParsedType)(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:(0,_.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new p.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,_.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if((0,p.isAsync)(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,_.getParsedType)(e)},s=this._parseSync({data:e,path:i.path,parent:i});return Ol(i,s)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,_.getParsedType)(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await((0,p.isAsync)(i)?i:Promise.resolve(i));return Ol(n,s)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{let a=e(i),o=()=>s.addIssue({code:D.ZodIssueCode.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Se({schema:this,typeName:P.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Pe.create(this,this._def)}nullable(){return Ke.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return lt.create(this,this._def)}promise(){return _t.create(this,this._def)}or(e){return er.create([this,e],this._def)}and(e){return tr.create(this,e,this._def)}transform(e){return new Se({...q(this._def),schema:this,typeName:P.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new ar({...q(this._def),innerType:this,defaultValue:r,typeName:P.ZodDefault})}brand(){return new Fn({typeName:P.ZodBranded,type:this,...q(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new or({...q(this._def),innerType:this,catchValue:r,typeName:P.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return En.create(this,e)}readonly(){return ur.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};d.ZodType=M;d.Schema=M;d.ZodSchema=M;var p2=/^c[^\s-]{8,}$/i,A2=/^[0-9a-z]+$/,F2=/^[0-9A-HJKMNP-TV-Z]{26}$/,E2=/^[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,m2=/^[a-z0-9_-]{21}$/i,C2=/^[-+]?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)?)??$/,g2=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,D2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Ps,_2=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,B2=/^(([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})))$/,y2=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Nl="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",v2=new RegExp(`^${Nl}$`);function Rl(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function b2(t){return new RegExp(`^${Rl(t)}$`)}function Pl(t){let e=`${Nl}T${Rl(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}d.datetimeRegex=Pl;function x2(t,e){return!!((e==="v4"||!e)&&_2.test(t)||(e==="v6"||!e)&&B2.test(t))}var gt=class t extends M{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==_.ZodParsedType.string){let s=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(s,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.string,received:s.parsedType}),p.INVALID}let n=new p.ParseStatus,i;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(i=this._getOrReturnCtx(e,i),a?(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")g2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"email",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Ps||(Ps=new RegExp(D2,"u")),Ps.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"emoji",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")E2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"uuid",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")m2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"nanoid",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")p2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"cuid",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")A2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"cuid2",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")F2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"ulid",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"url",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"regex",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?Pl(s).test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?v2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?b2(s).test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?C2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"duration",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?x2(e.data,s.version)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"ip",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?y2.test(e.data)||(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{validation:"base64",code:D.ZodIssueCode.invalid_string,message:s.message}),n.dirty()):_.util.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:D.ZodIssueCode.invalid_string,...S.errorUtil.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...S.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...S.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...S.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...S.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...S.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...S.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...S.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...S.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...S.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...S.errorUtil.errToObj(e)})}datetime(e){var r,n;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:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...S.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,...S.errorUtil.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...S.errorUtil.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...S.errorUtil.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...S.errorUtil.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...S.errorUtil.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...S.errorUtil.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...S.errorUtil.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...S.errorUtil.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...S.errorUtil.errToObj(r)})}nonempty(e){return this.min(1,S.errorUtil.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...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 isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};d.ZodString=gt;gt.create=t=>{var e;return new gt({checks:[],typeName:P.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...q(t)})};function w2(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,s=parseInt(t.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return s%a/Math.pow(10,i)}var Gt=class t extends M{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)!==_.ZodParsedType.number){let s=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(s,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.number,received:s.parsedType}),p.INVALID}let n,i=new p.ParseStatus;for(let s of this._def.checks)s.kind==="int"?_.util.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?w2(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.not_finite,message:s.message}),i.dirty()):_.util.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,S.errorUtil.toString(r))}gt(e,r){return this.setLimit("min",e,!1,S.errorUtil.toString(r))}lte(e,r){return this.setLimit("max",e,!0,S.errorUtil.toString(r))}lt(e,r){return this.setLimit("max",e,!1,S.errorUtil.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:S.errorUtil.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:S.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:S.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:S.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:S.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:S.errorUtil.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:S.errorUtil.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:S.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:S.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:S.errorUtil.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&_.util.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};d.ZodNumber=Gt;Gt.create=t=>new Gt({checks:[],typeName:P.ZodNumber,coerce:t?.coerce||!1,...q(t)});var Jt=class t extends M{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==_.ZodParsedType.bigint){let s=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(s,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.bigint,received:s.parsedType}),p.INVALID}let n,i=new p.ParseStatus;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):_.util.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,S.errorUtil.toString(r))}gt(e,r){return this.setLimit("min",e,!1,S.errorUtil.toString(r))}lte(e,r){return this.setLimit("max",e,!0,S.errorUtil.toString(r))}lt(e,r){return this.setLimit("max",e,!1,S.errorUtil.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:S.errorUtil.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:S.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:S.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:S.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:S.errorUtil.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:S.errorUtil.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};d.ZodBigInt=Jt;Jt.create=t=>{var e;return new Jt({checks:[],typeName:P.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...q(t)})};var Kt=class extends M{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==_.ZodParsedType.boolean){let n=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.boolean,received:n.parsedType}),p.INVALID}return(0,p.OK)(e.data)}};d.ZodBoolean=Kt;Kt.create=t=>new Kt({typeName:P.ZodBoolean,coerce:t?.coerce||!1,...q(t)});var Yt=class t extends M{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==_.ZodParsedType.date){let s=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(s,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.date,received:s.parsedType}),p.INVALID}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(s,{code:D.ZodIssueCode.invalid_date}),p.INVALID}let n=new p.ParseStatus,i;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),(0,p.addIssueToContext)(i,{code:D.ZodIssueCode.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):_.util.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:S.errorUtil.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:S.errorUtil.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};d.ZodDate=Yt;Yt.create=t=>new Yt({checks:[],coerce:t?.coerce||!1,typeName:P.ZodDate,...q(t)});var Or=class extends M{_parse(e){if(this._getType(e)!==_.ZodParsedType.symbol){let n=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.symbol,received:n.parsedType}),p.INVALID}return(0,p.OK)(e.data)}};d.ZodSymbol=Or;Or.create=t=>new Or({typeName:P.ZodSymbol,...q(t)});var Xt=class extends M{_parse(e){if(this._getType(e)!==_.ZodParsedType.undefined){let n=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.undefined,received:n.parsedType}),p.INVALID}return(0,p.OK)(e.data)}};d.ZodUndefined=Xt;Xt.create=t=>new Xt({typeName:P.ZodUndefined,...q(t)});var Qt=class extends M{_parse(e){if(this._getType(e)!==_.ZodParsedType.null){let n=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.null,received:n.parsedType}),p.INVALID}return(0,p.OK)(e.data)}};d.ZodNull=Qt;Qt.create=t=>new Qt({typeName:P.ZodNull,...q(t)});var Dt=class extends M{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,p.OK)(e.data)}};d.ZodAny=Dt;Dt.create=t=>new Dt({typeName:P.ZodAny,...q(t)});var ct=class extends M{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,p.OK)(e.data)}};d.ZodUnknown=ct;ct.create=t=>new ct({typeName:P.ZodUnknown,...q(t)});var Ve=class extends M{_parse(e){let r=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(r,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.never,received:r.parsedType}),p.INVALID}};d.ZodNever=Ve;Ve.create=t=>new Ve({typeName:P.ZodNever,...q(t)});var kr=class extends M{_parse(e){if(this._getType(e)!==_.ZodParsedType.undefined){let n=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.void,received:n.parsedType}),p.INVALID}return(0,p.OK)(e.data)}};d.ZodVoid=kr;kr.create=t=>new kr({typeName:P.ZodVoid,...q(t)});var lt=class t extends M{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==_.ZodParsedType.array)return(0,p.addIssueToContext)(r,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.array,received:r.parsedType}),p.INVALID;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,o=r.data.length<i.exactLength.value;(a||o)&&((0,p.addIssueToContext)(r,{code:a?D.ZodIssueCode.too_big:D.ZodIssueCode.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&((0,p.addIssueToContext)(r,{code:D.ZodIssueCode.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&((0,p.addIssueToContext)(r,{code:D.ZodIssueCode.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,o)=>i.type._parseAsync(new $e(r,a,r.path,o)))).then(a=>p.ParseStatus.mergeArray(n,a));let s=[...r.data].map((a,o)=>i.type._parseSync(new $e(r,a,r.path,o)));return p.ParseStatus.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:S.errorUtil.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:S.errorUtil.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:S.errorUtil.toString(r)}})}nonempty(e){return this.min(1,e)}};d.ZodArray=lt;lt.create=(t,e)=>new lt({type:t,minLength:null,maxLength:null,exactLength:null,typeName:P.ZodArray,...q(e)});function Tr(t){if(t instanceof De){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Pe.create(Tr(n))}return new De({...t._def,shape:()=>e})}else return t instanceof lt?new lt({...t._def,type:Tr(t.element)}):t instanceof Pe?Pe.create(Tr(t.unwrap())):t instanceof Ke?Ke.create(Tr(t.unwrap())):t instanceof Je?Je.create(t.items.map(e=>Tr(e))):t}var De=class t extends M{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=_.util.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==_.ZodParsedType.object){let c=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(c,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.object,received:c.parsedType}),p.INVALID}let{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Ve&&this._def.unknownKeys==="strip"))for(let c in i.data)a.includes(c)||o.push(c);let u=[];for(let c of a){let l=s[c],f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new $e(i,f,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Ve){let c=this._def.unknownKeys;if(c==="passthrough")for(let l of o)u.push({key:{status:"valid",value:l},value:{status:"valid",value:i.data[l]}});else if(c==="strict")o.length>0&&((0,p.addIssueToContext)(i,{code:D.ZodIssueCode.unrecognized_keys,keys:o}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let l of o){let f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new $e(i,f,i.path,l)),alwaysSet:l in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let c=[];for(let l of u){let f=await l.key,m=await l.value;c.push({key:f,value:m,alwaysSet:l.alwaysSet})}return c}).then(c=>p.ParseStatus.mergeObjectSync(n,c)):p.ParseStatus.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return S.errorUtil.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,s,a,o;let u=(a=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(o=S.errorUtil.errToObj(e).message)!==null&&o!==void 0?o:u}:{message:u}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:P.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return _.util.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return _.util.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}deepPartial(){return Tr(this)}partial(e){let r={};return _.util.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return _.util.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Pe;)s=s._def.innerType;r[n]=s}}),new t({...this._def,shape:()=>r})}keyof(){return $l(_.util.objectKeys(this.shape))}};d.ZodObject=De;De.create=(t,e)=>new De({shape:()=>t,unknownKeys:"strip",catchall:Ve.create(),typeName:P.ZodObject,...q(e)});De.strictCreate=(t,e)=>new De({shape:()=>t,unknownKeys:"strict",catchall:Ve.create(),typeName:P.ZodObject,...q(e)});De.lazycreate=(t,e)=>new De({shape:t,unknownKeys:"strip",catchall:Ve.create(),typeName:P.ZodObject,...q(e)});var er=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(s){for(let o of s)if(o.result.status==="valid")return o.result;for(let o of s)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(o=>new D.ZodError(o.ctx.common.issues));return(0,p.addIssueToContext)(r,{code:D.ZodIssueCode.invalid_union,unionErrors:a}),p.INVALID}if(r.common.async)return Promise.all(n.map(async s=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let s,a=[];for(let u of n){let c={...r,common:{...r.common,issues:[]},parent:null},l=u._parseSync({data:r.data,path:r.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!s&&(s={result:l,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let o=a.map(u=>new D.ZodError(u));return(0,p.addIssueToContext)(r,{code:D.ZodIssueCode.invalid_union,unionErrors:o}),p.INVALID}}get options(){return this._def.options}};d.ZodUnion=er;er.create=(t,e)=>new er({options:t,typeName:P.ZodUnion,...q(e)});var ut=t=>t instanceof rr?ut(t.schema):t instanceof Se?ut(t.innerType()):t instanceof nr?[t.value]:t instanceof ir?t.options:t instanceof sr?_.util.objectValues(t.enum):t instanceof ar?ut(t._def.innerType):t instanceof Xt?[void 0]:t instanceof Qt?[null]:t instanceof Pe?[void 0,...ut(t.unwrap())]:t instanceof Ke?[null,...ut(t.unwrap())]:t instanceof Fn||t instanceof ur?ut(t.unwrap()):t instanceof or?ut(t._def.innerType):[],si=class t extends M{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==_.ZodParsedType.object)return(0,p.addIssueToContext)(r,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.object,received:r.parsedType}),p.INVALID;let n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):((0,p.addIssueToContext)(r,{code:D.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),p.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let s of r){let a=ut(s.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of a){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,s)}}return new t({typeName:P.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...q(n)})}};d.ZodDiscriminatedUnion=si;function $s(t,e){let r=(0,_.getParsedType)(t),n=(0,_.getParsedType)(e);if(t===e)return{valid:!0,data:t};if(r===_.ZodParsedType.object&&n===_.ZodParsedType.object){let i=_.util.objectKeys(e),s=_.util.objectKeys(t).filter(o=>i.indexOf(o)!==-1),a={...t,...e};for(let o of s){let u=$s(t[o],e[o]);if(!u.valid)return{valid:!1};a[o]=u.data}return{valid:!0,data:a}}else if(r===_.ZodParsedType.array&&n===_.ZodParsedType.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let s=0;s<t.length;s++){let a=t[s],o=e[s],u=$s(a,o);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===_.ZodParsedType.date&&n===_.ZodParsedType.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var tr=class extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(s,a)=>{if((0,p.isAborted)(s)||(0,p.isAborted)(a))return p.INVALID;let o=$s(s.value,a.value);return o.valid?(((0,p.isDirty)(s)||(0,p.isDirty)(a))&&r.dirty(),{status:r.value,value:o.data}):((0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_intersection_types}),p.INVALID)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};d.ZodIntersection=tr;tr.create=(t,e,r)=>new tr({left:t,right:e,typeName:P.ZodIntersection,...q(r)});var Je=class t extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==_.ZodParsedType.array)return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.array,received:n.parsedType}),p.INVALID;if(n.data.length<this._def.items.length)return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p.INVALID;!this._def.rest&&n.data.length>this._def.items.length&&((0,p.addIssueToContext)(n,{code:D.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((a,o)=>{let u=this._def.items[o]||this._def.rest;return u?u._parse(new $e(n,a,n.path,o)):null}).filter(a=>!!a);return n.common.async?Promise.all(s).then(a=>p.ParseStatus.mergeArray(r,a)):p.ParseStatus.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};d.ZodTuple=Je;Je.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Je({items:t,typeName:P.ZodTuple,rest:null,...q(e)})};var ai=class t extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==_.ZodParsedType.object)return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.object,received:n.parsedType}),p.INVALID;let i=[],s=this._def.keyType,a=this._def.valueType;for(let o in n.data)i.push({key:s._parse(new $e(n,o,n.path,o)),value:a._parse(new $e(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?p.ParseStatus.mergeObjectAsync(r,i):p.ParseStatus.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof M?new t({keyType:e,valueType:r,typeName:P.ZodRecord,...q(n)}):new t({keyType:gt.create(),valueType:e,typeName:P.ZodRecord,...q(r)})}};d.ZodRecord=ai;var Nr=class extends M{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==_.ZodParsedType.map)return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.map,received:n.parsedType}),p.INVALID;let i=this._def.keyType,s=this._def.valueType,a=[...n.data.entries()].map(([o,u],c)=>({key:i._parse(new $e(n,o,n.path,[c,"key"])),value:s._parse(new $e(n,u,n.path,[c,"value"]))}));if(n.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let u of a){let c=await u.key,l=await u.value;if(c.status==="aborted"||l.status==="aborted")return p.INVALID;(c.status==="dirty"||l.status==="dirty")&&r.dirty(),o.set(c.value,l.value)}return{status:r.value,value:o}})}else{let o=new Map;for(let u of a){let c=u.key,l=u.value;if(c.status==="aborted"||l.status==="aborted")return p.INVALID;(c.status==="dirty"||l.status==="dirty")&&r.dirty(),o.set(c.value,l.value)}return{status:r.value,value:o}}}};d.ZodMap=Nr;Nr.create=(t,e,r)=>new Nr({valueType:e,keyType:t,typeName:P.ZodMap,...q(r)});var Rr=class t extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==_.ZodParsedType.set)return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.set,received:n.parsedType}),p.INVALID;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&((0,p.addIssueToContext)(n,{code:D.ZodIssueCode.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&((0,p.addIssueToContext)(n,{code:D.ZodIssueCode.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let s=this._def.valueType;function a(u){let c=new Set;for(let l of u){if(l.status==="aborted")return p.INVALID;l.status==="dirty"&&r.dirty(),c.add(l.value)}return{status:r.value,value:c}}let o=[...n.data.values()].map((u,c)=>s._parse(new $e(n,u,n.path,c)));return n.common.async?Promise.all(o).then(u=>a(u)):a(o)}min(e,r){return new t({...this._def,minSize:{value:e,message:S.errorUtil.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:S.errorUtil.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};d.ZodSet=Rr;Rr.create=(t,e)=>new Rr({valueType:t,minSize:null,maxSize:null,typeName:P.ZodSet,...q(e)});var oi=class t extends M{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==_.ZodParsedType.function)return(0,p.addIssueToContext)(r,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.function,received:r.parsedType}),p.INVALID;function n(o,u){return(0,p.makeIssue)({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,ni.getErrorMap)(),ni.defaultErrorMap].filter(c=>!!c),issueData:{code:D.ZodIssueCode.invalid_arguments,argumentsError:u}})}function i(o,u){return(0,p.makeIssue)({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,(0,ni.getErrorMap)(),ni.defaultErrorMap].filter(c=>!!c),issueData:{code:D.ZodIssueCode.invalid_return_type,returnTypeError:u}})}let s={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof _t){let o=this;return(0,p.OK)(async function(...u){let c=new D.ZodError([]),l=await o._def.args.parseAsync(u,s).catch(F=>{throw c.addIssue(n(u,F)),c}),f=await Reflect.apply(a,this,l);return await o._def.returns._def.type.parseAsync(f,s).catch(F=>{throw c.addIssue(i(f,F)),c})})}else{let o=this;return(0,p.OK)(function(...u){let c=o._def.args.safeParse(u,s);if(!c.success)throw new D.ZodError([n(u,c.error)]);let l=Reflect.apply(a,this,c.data),f=o._def.returns.safeParse(l,s);if(!f.success)throw new D.ZodError([i(l,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Je.create(e).rest(ct.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||Je.create([]).rest(ct.create()),returns:r||ct.create(),typeName:P.ZodFunction,...q(n)})}};d.ZodFunction=oi;var rr=class extends M{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};d.ZodLazy=rr;rr.create=(t,e)=>new rr({getter:t,typeName:P.ZodLazy,...q(e)});var nr=class extends M{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(r,{received:r.data,code:D.ZodIssueCode.invalid_literal,expected:this._def.value}),p.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}};d.ZodLiteral=nr;nr.create=(t,e)=>new nr({value:t,typeName:P.ZodLiteral,...q(e)});function $l(t,e){return new ir({values:t,typeName:P.ZodEnum,...q(e)})}var ir=class t extends M{constructor(){super(...arguments),pn.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return(0,p.addIssueToContext)(r,{expected:_.util.joinValues(n),received:r.parsedType,code:D.ZodIssueCode.invalid_type}),p.INVALID}if(ii(this,pn,"f")||kl(this,pn,new Set(this._def.values),"f"),!ii(this,pn,"f").has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return(0,p.addIssueToContext)(r,{received:r.data,code:D.ZodIssueCode.invalid_enum_value,options:n}),p.INVALID}return(0,p.OK)(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};d.ZodEnum=ir;pn=new WeakMap;ir.create=$l;var sr=class extends M{constructor(){super(...arguments),An.set(this,void 0)}_parse(e){let r=_.util.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==_.ZodParsedType.string&&n.parsedType!==_.ZodParsedType.number){let i=_.util.objectValues(r);return(0,p.addIssueToContext)(n,{expected:_.util.joinValues(i),received:n.parsedType,code:D.ZodIssueCode.invalid_type}),p.INVALID}if(ii(this,An,"f")||kl(this,An,new Set(_.util.getValidEnumValues(this._def.values)),"f"),!ii(this,An,"f").has(e.data)){let i=_.util.objectValues(r);return(0,p.addIssueToContext)(n,{received:n.data,code:D.ZodIssueCode.invalid_enum_value,options:i}),p.INVALID}return(0,p.OK)(e.data)}get enum(){return this._def.values}};d.ZodNativeEnum=sr;An=new WeakMap;sr.create=(t,e)=>new sr({values:t,typeName:P.ZodNativeEnum,...q(e)});var _t=class extends M{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==_.ZodParsedType.promise&&r.common.async===!1)return(0,p.addIssueToContext)(r,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.promise,received:r.parsedType}),p.INVALID;let n=r.parsedType===_.ZodParsedType.promise?r.data:Promise.resolve(r.data);return(0,p.OK)(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};d.ZodPromise=_t;_t.create=(t,e)=>new _t({type:t,typeName:P.ZodPromise,...q(e)});var Se=class extends M{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===P.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:a=>{(0,p.addIssueToContext)(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){let a=i.transform(n.data,s);if(n.common.async)return Promise.resolve(a).then(async o=>{if(r.value==="aborted")return p.INVALID;let u=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return u.status==="aborted"?p.INVALID:u.status==="dirty"||r.value==="dirty"?(0,p.DIRTY)(u.value):u});{if(r.value==="aborted")return p.INVALID;let o=this._def.schema._parseSync({data:a,path:n.path,parent:n});return o.status==="aborted"?p.INVALID:o.status==="dirty"||r.value==="dirty"?(0,p.DIRTY)(o.value):o}}if(i.type==="refinement"){let a=o=>{let u=i.refinement(o,s);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?p.INVALID:(o.status==="dirty"&&r.dirty(),a(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?p.INVALID:(o.status==="dirty"&&r.dirty(),a(o.value).then(()=>({status:r.value,value:o.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!(0,p.isValid)(a))return a;let o=i.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>(0,p.isValid)(a)?Promise.resolve(i.transform(a.value,s)).then(o=>({status:r.value,value:o})):a);_.util.assertNever(i)}};d.ZodEffects=Se;d.ZodTransformer=Se;Se.create=(t,e,r)=>new Se({schema:t,typeName:P.ZodEffects,effect:e,...q(r)});Se.createWithPreprocess=(t,e,r)=>new Se({schema:e,effect:{type:"preprocess",transform:t},typeName:P.ZodEffects,...q(r)});var Pe=class extends M{_parse(e){return this._getType(e)===_.ZodParsedType.undefined?(0,p.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};d.ZodOptional=Pe;Pe.create=(t,e)=>new Pe({innerType:t,typeName:P.ZodOptional,...q(e)});var Ke=class extends M{_parse(e){return this._getType(e)===_.ZodParsedType.null?(0,p.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};d.ZodNullable=Ke;Ke.create=(t,e)=>new Ke({innerType:t,typeName:P.ZodNullable,...q(e)});var ar=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===_.ZodParsedType.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};d.ZodDefault=ar;ar.create=(t,e)=>new ar({innerType:t,typeName:P.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...q(e)});var or=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return(0,p.isAsync)(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new D.ZodError(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new D.ZodError(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};d.ZodCatch=or;or.create=(t,e)=>new or({innerType:t,typeName:P.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...q(e)});var Pr=class extends M{_parse(e){if(this._getType(e)!==_.ZodParsedType.nan){let n=this._getOrReturnCtx(e);return(0,p.addIssueToContext)(n,{code:D.ZodIssueCode.invalid_type,expected:_.ZodParsedType.nan,received:n.parsedType}),p.INVALID}return{status:"valid",value:e.data}}};d.ZodNaN=Pr;Pr.create=t=>new Pr({typeName:P.ZodNaN,...q(t)});d.BRAND=Symbol("zod_brand");var Fn=class extends M{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}};d.ZodBranded=Fn;var En=class t extends M{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?p.INVALID:s.status==="dirty"?(r.dirty(),(0,p.DIRTY)(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?p.INVALID:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:P.ZodPipeline})}};d.ZodPipeline=En;var ur=class extends M{_parse(e){let r=this._def.innerType._parse(e),n=i=>((0,p.isValid)(i)&&(i.value=Object.freeze(i.value)),i);return(0,p.isAsync)(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};d.ZodReadonly=ur;ur.create=(t,e)=>new ur({innerType:t,typeName:P.ZodReadonly,...q(e)});function Ll(t,e={},r){return t?Dt.create().superRefine((n,i)=>{var s,a;if(!t(n)){let o=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,u=(a=(s=o.fatal)!==null&&s!==void 0?s:r)!==null&&a!==void 0?a:!0,c=typeof o=="string"?{message:o}:o;i.addIssue({code:"custom",...c,fatal:u})}}):Dt.create()}d.custom=Ll;d.late={object:De.lazycreate};var P;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(P=d.ZodFirstPartyTypeKind||(d.ZodFirstPartyTypeKind={}));var I2=(t,e={message:`Input not instance of ${t.name}`})=>Ll(r=>r instanceof t,e);d.instanceof=I2;var Zl=gt.create;d.string=Zl;var jl=Gt.create;d.number=jl;var S2=Pr.create;d.nan=S2;var T2=Jt.create;d.bigint=T2;var ql=Kt.create;d.boolean=ql;var O2=Yt.create;d.date=O2;var k2=Or.create;d.symbol=k2;var N2=Xt.create;d.undefined=N2;var R2=Qt.create;d.null=R2;var P2=Dt.create;d.any=P2;var $2=ct.create;d.unknown=$2;var L2=Ve.create;d.never=L2;var Z2=kr.create;d.void=Z2;var j2=lt.create;d.array=j2;var q2=De.create;d.object=q2;var M2=De.strictCreate;d.strictObject=M2;var V2=er.create;d.union=V2;var U2=si.create;d.discriminatedUnion=U2;var H2=tr.create;d.intersection=H2;var z2=Je.create;d.tuple=z2;var W2=ai.create;d.record=W2;var G2=Nr.create;d.map=G2;var J2=Rr.create;d.set=J2;var K2=oi.create;d.function=K2;var Y2=rr.create;d.lazy=Y2;var X2=nr.create;d.literal=X2;var Q2=ir.create;d.enum=Q2;var eC=sr.create;d.nativeEnum=eC;var tC=_t.create;d.promise=tC;var Ml=Se.create;d.effect=Ml;d.transformer=Ml;var rC=Pe.create;d.optional=rC;var nC=Ke.create;d.nullable=nC;var iC=Se.createWithPreprocess;d.preprocess=iC;var sC=En.create;d.pipeline=sC;var aC=()=>Zl().optional();d.ostring=aC;var oC=()=>jl().optional();d.onumber=oC;var uC=()=>ql().optional();d.oboolean=uC;d.coerce={string:(t=>gt.create({...t,coerce:!0})),number:(t=>Gt.create({...t,coerce:!0})),boolean:(t=>Kt.create({...t,coerce:!0})),bigint:(t=>Jt.create({...t,coerce:!0})),date:(t=>Yt.create({...t,coerce:!0}))};d.NEVER=p.INVALID});var Ls=A(Le=>{"use strict";var cC=Le&&Le.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),$r=Le&&Le.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&cC(e,t,r)};Object.defineProperty(Le,"__esModule",{value:!0});$r(ri(),Le);$r(Rs(),Le);$r(Sl(),Le);$r(dn(),Le);$r(Vl(),Le);$r(ti(),Le)});var zl=A(_e=>{"use strict";var Ul=_e&&_e.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lC=_e&&_e.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),dC=_e&&_e.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Ul(e,t,r);return lC(e,t),e},fC=_e&&_e.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ul(e,t,r)};Object.defineProperty(_e,"__esModule",{value:!0});_e.z=void 0;var Hl=dC(Ls());_e.z=Hl;fC(Ls(),_e);_e.default=Hl});var Wl=A(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.joinPath=void 0;var hC=/[$_\p{ID_Start}][$\u200c\u200d\p{ID_Continue}]*/u;function pC(t){return t.length===1?t[0].toString():t.reduce((e,r)=>{if(typeof r=="number")return e+"["+r.toString()+"]";if(r.includes('"'))return e+'["'+AC(r)+'"]';if(!hC.test(r))return e+'["'+r+'"]';let n=e.length===0?"":".";return e+n+r},"")}ui.joinPath=pC;function AC(t){return t.replace(/"/g,'\\"')}});var Gl=A(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.isNonEmptyArray=void 0;function FC(t){return t.length!==0}ci.isNonEmptyArray=FC});var td=A(ae=>{"use strict";var EC=ae&&ae.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),mC=ae&&ae.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),CC=ae&&ae.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&EC(e,t,r);return mC(e,t),e};Object.defineProperty(ae,"__esModule",{value:!0});ae.errorMap=ae.isValidationErrorLike=ae.isValidationError=ae.toValidationError=ae.fromZodError=ae.fromZodIssue=ae.ValidationError=void 0;var gC=CC(zl()),DC=Wl(),_C=Gl(),BC=99,Jl="; ",Kl=", or ",Zs="Validation error",Yl=": ",Lr=class extends Error{details;name;constructor(e,r=[]){super(e),this.details=r,this.name="ZodValidationError"}toString(){return this.message}};ae.ValidationError=Lr;function js(t,e,r){if(t.code==="invalid_union")return t.unionErrors.reduce((n,i)=>{let s=i.issues.map(a=>js(a,e,r)).join(e);return n.includes(s)||n.push(s),n},[]).join(r);if((0,_C.isNonEmptyArray)(t.path)){if(t.path.length===1){let n=t.path[0];if(typeof n=="number")return`${t.message} at index ${n}`}return`${t.message} at "${(0,DC.joinPath)(t.path)}"`}return t.message}function Xl(t,e,r){return e!==null?t.length>0?[e,t].join(r):e:t.length>0?t:Zs}function Ql(t,e={}){let{issueSeparator:r=Jl,unionSeparator:n=Kl,prefixSeparator:i=Yl,prefix:s=Zs}=e,a=js(t,r,n),o=Xl(a,s,i);return new Lr(o,[t])}ae.fromZodIssue=Ql;function ed(t,e={}){let{maxIssuesInMessage:r=BC,issueSeparator:n=Jl,unionSeparator:i=Kl,prefixSeparator:s=Yl,prefix:a=Zs}=e,o=t.errors.slice(0,r).map(c=>js(c,n,i)).join(n),u=Xl(o,a,s);return new Lr(u,t.errors)}ae.fromZodError=ed;var yC=(t={})=>e=>e instanceof gC.ZodError?ed(e,t):e instanceof Error?e:new Error("Unknown error");ae.toValidationError=yC;function vC(t){return t instanceof Lr}ae.isValidationError=vC;function bC(t){return t instanceof Error&&t.name==="ZodValidationError"}ae.isValidationErrorLike=bC;var xC=(t,e)=>({message:Ql({...t,message:t.message??e.defaultError}).message});ae.errorMap=xC});var rd=A(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.errorMap=pe.fromZodIssue=pe.fromZodError=pe.isValidationErrorLike=pe.isValidationError=pe.toValidationError=pe.ValidationError=void 0;var cr=td();Object.defineProperty(pe,"ValidationError",{enumerable:!0,get:function(){return cr.ValidationError}});Object.defineProperty(pe,"toValidationError",{enumerable:!0,get:function(){return cr.toValidationError}});Object.defineProperty(pe,"isValidationError",{enumerable:!0,get:function(){return cr.isValidationError}});Object.defineProperty(pe,"isValidationErrorLike",{enumerable:!0,get:function(){return cr.isValidationErrorLike}});Object.defineProperty(pe,"fromZodError",{enumerable:!0,get:function(){return cr.fromZodError}});Object.defineProperty(pe,"fromZodIssue",{enumerable:!0,get:function(){return cr.fromZodIssue}});Object.defineProperty(pe,"errorMap",{enumerable:!0,get:function(){return cr.errorMap}})});var ua=Qe(oa(),1),{program:wi,createCommand:Eg,createArgument:mg,createOption:Cg,CommanderError:gg,InvalidArgumentError:Dg,InvalidOptionArgumentError:_g,Command:Bg,Argument:yg,Option:ca,Help:vg}=ua.default;var md=Qe(Ya()),Cd=require("node:child_process"),dr=Qe(require("node:fs")),gd=Qe(Ln()),Dd=Qe(ou());var dd=Qe(ol()),fd=require("node:child_process"),lr=require("node:fs"),Ms=Qe(Ln());var ul=Qe(Ln()),Wn="5.2.0",HE={">=5.2.0 <5.4.0":{electron:"32.1.2",chrome:"128.0.6613",node:"20.17.0"},">=5.4.0 <5.4.1":{electron:"43.4.0",chrome:"150.0.7871",node:"24.18.1"},">=5.4.1 <6.0.0-pre.1":{electron:"43.8.6",chrome:"150.0.7871",node:"24.22.1"},">=6.0.0-pre.1":{electron:"45.5.0",chrome:"156.0.8078",node:"24.22.3"}},cl=(t,e=HE)=>{let r=Object.entries(e).find(([n])=>ul.default.satisfies(t,n,{includePrerelease:!0}));if(r==null)throw new Error(`No versions found for launcher version ${t}. Please update config/versions.ts to include this version.`);return r[1]};var G;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let s={};for(let a of i)s[a]=a;return s},t.getValidEnumValues=i=>{let s=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(let o of s)a[o]=i[o];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let s=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},t.find=(i,s)=>{for(let a of i)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function n(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=n,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(G||(G={}));var ws;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(ws||(ws={}));var y=G.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),At=t=>{switch(typeof t){case"undefined":return y.undefined;case"string":return y.string;case"number":return isNaN(t)?y.nan:y.number;case"boolean":return y.boolean;case"function":return y.function;case"bigint":return y.bigint;case"symbol":return y.symbol;case"object":return Array.isArray(t)?y.array:t===null?y.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?y.promise:typeof Map<"u"&&t instanceof Map?y.map:typeof Set<"u"&&t instanceof Set?y.set:typeof Date<"u"&&t instanceof Date?y.date:y.object;default:return y.unknown}},E=G.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"]),zE=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),we=class t extends Error{constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(s){return s.message},n={_errors:[]},i=s=>{for(let a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let o=n,u=0;for(;u<a.path.length;){let c=a.path[u];u===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(r(a))):o[c]=o[c]||{_errors:[]},o=o[c],u++}}};return i(this),n}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,G.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},n=[];for(let i of this.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};we.create=t=>new we(t);var vr=(t,e)=>{let r;switch(t.code){case E.invalid_type:t.received===y.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case E.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,G.jsonStringifyReplacer)}`;break;case E.unrecognized_keys:r=`Unrecognized key(s) in object: ${G.joinValues(t.keys,", ")}`;break;case E.invalid_union:r="Invalid input";break;case E.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${G.joinValues(t.options)}`;break;case E.invalid_enum_value:r=`Invalid enum value. Expected ${G.joinValues(t.options)}, received '${t.received}'`;break;case E.invalid_arguments:r="Invalid function arguments";break;case E.invalid_return_type:r="Invalid function return type";break;case E.invalid_date:r="Invalid date";break;case E.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:G.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case E.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case E.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case E.custom:r="Invalid input";break;case E.invalid_intersection_types:r="Intersection results could not be merged";break;case E.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case E.not_finite:r="Number must be finite";break;default:r=e.defaultError,G.assertNever(t)}return{message:r}},fl=vr;function WE(t){fl=t}function Gn(){return fl}var Jn=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,s=[...r,...i.path||[]],a={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let o="",u=n.filter(c=>!!c).slice().reverse();for(let c of u)o=c(a,{data:e,defaultError:o}).message;return{...i,path:s,message:o}},GE=[];function B(t,e){let r=Gn(),n=Jn({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===vr?void 0:vr].filter(i=>!!i)});t.common.issues.push(n)}var fe=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return R;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let s=await i.key,a=await i.value;n.push({key:s,value:a})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return R;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[s.value]=a.value)}return{status:e.value,value:n}}},R=Object.freeze({status:"aborted"}),yr=t=>({status:"dirty",value:t}),me=t=>({status:"valid",value:t}),Is=t=>t.status==="aborted",Ss=t=>t.status==="dirty",on=t=>t.status==="valid",un=t=>typeof Promise<"u"&&t instanceof Promise;function Kn(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function hl(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}var I;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(I||(I={}));var sn,an,Re=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ll=(t,e)=>{if(on(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new we(t.common.issues);return this._error=r,this._error}}};function Z(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,o)=>{var u,c;let{message:l}=t;return a.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:(u=l??n)!==null&&u!==void 0?u:o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:(c=l??r)!==null&&c!==void 0?c:o.defaultError}},description:i}}var j=class{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)}get description(){return this._def.description}_getType(e){return At(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:At(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new fe,ctx:{common:e.parent.common,data:e.data,parsedType:At(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(un(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;let i={common:{issues:[],async:(n=r?.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:At(e)},s=this._parseSync({data:e,path:i.path,parent:i});return ll(i,s)}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:At(e)},i=this._parse({data:e,path:n.path,parent:n}),s=await(un(i)?i:Promise.resolve(i));return ll(n,s)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,s)=>{let a=e(i),o=()=>s.addIssue({code:E.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new Ie({schema:this,typeName:N.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Ne.create(this,this._def)}nullable(){return We.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ot.create(this,this._def)}promise(){return mt.create(this,this._def)}or(e){return Lt.create([this,e],this._def)}and(e){return Zt.create(this,e,this._def)}transform(e){return new Ie({...Z(this._def),schema:this,typeName:N.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Ut({...Z(this._def),innerType:this,defaultValue:r,typeName:N.ZodDefault})}brand(){return new cn({typeName:N.ZodBranded,type:this,...Z(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Ht({...Z(this._def),innerType:this,catchValue:r,typeName:N.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return ln.create(this,e)}readonly(){return zt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},JE=/^c[^\s-]{8,}$/i,KE=/^[0-9a-z]+$/,YE=/^[0-9A-HJKMNP-TV-Z]{26}$/,XE=/^[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,QE=/^[a-z0-9_-]{21}$/i,em=/^[-+]?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)?)??$/,tm=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",xs,nm=/^(?:(?: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])$/,im=/^(([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})))$/,sm=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,pl="((\\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])))",am=new RegExp(`^${pl}$`);function Al(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function om(t){return new RegExp(`^${Al(t)}$`)}function Fl(t){let e=`${pl}T${Al(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function um(t,e){return!!((e==="v4"||!e)&&nm.test(t)||(e==="v6"||!e)&&im.test(t))}var Ft=class t extends j{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==y.string){let s=this._getOrReturnCtx(e);return B(s,{code:E.invalid_type,expected:y.string,received:s.parsedType}),R}let n=new fe,i;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),B(i,{code:E.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),B(i,{code:E.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){let a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(i=this._getOrReturnCtx(e,i),a?B(i,{code:E.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&B(i,{code:E.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")tm.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"email",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")xs||(xs=new RegExp(rm,"u")),xs.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"emoji",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")XE.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"uuid",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")QE.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"nanoid",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")JE.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"cuid",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")KE.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"cuid2",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")YE.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"ulid",code:E.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),B(i,{validation:"url",code:E.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"regex",code:E.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),B(i,{code:E.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),B(i,{code:E.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),B(i,{code:E.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?Fl(s).test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{code:E.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?am.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{code:E.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?om(s).test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{code:E.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?em.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"duration",code:E.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?um(e.data,s.version)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"ip",code:E.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?sm.test(e.data)||(i=this._getOrReturnCtx(e,i),B(i,{validation:"base64",code:E.invalid_string,message:s.message}),n.dirty()):G.assertNever(s);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:E.invalid_string,...I.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...I.errToObj(e)})}url(e){return this._addCheck({kind:"url",...I.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...I.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...I.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...I.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...I.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...I.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...I.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...I.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...I.errToObj(e)})}datetime(e){var r,n;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:(r=e?.offset)!==null&&r!==void 0?r:!1,local:(n=e?.local)!==null&&n!==void 0?n:!1,...I.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,...I.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...I.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...I.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...I.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...I.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...I.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...I.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...I.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...I.errToObj(r)})}nonempty(e){return this.min(1,I.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...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 isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Ft.create=t=>{var e;return new Ft({checks:[],typeName:N.ZodString,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...Z(t)})};function cm(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,s=parseInt(t.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return s%a/Math.pow(10,i)}var Ot=class t extends j{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)!==y.number){let s=this._getOrReturnCtx(e);return B(s,{code:E.invalid_type,expected:y.number,received:s.parsedType}),R}let n,i=new fe;for(let s of this._def.checks)s.kind==="int"?G.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),B(n,{code:E.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),B(n,{code:E.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),B(n,{code:E.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?cm(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),B(n,{code:E.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),B(n,{code:E.not_finite,message:s.message}),i.dirty()):G.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,I.toString(r))}gt(e,r){return this.setLimit("min",e,!1,I.toString(r))}lte(e,r){return this.setLimit("max",e,!0,I.toString(r))}lt(e,r){return this.setLimit("max",e,!1,I.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:I.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:I.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:I.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:I.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:I.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:I.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:I.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:I.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:I.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:I.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&G.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};Ot.create=t=>new Ot({checks:[],typeName:N.ZodNumber,coerce:t?.coerce||!1,...Z(t)});var kt=class t extends j{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==y.bigint){let s=this._getOrReturnCtx(e);return B(s,{code:E.invalid_type,expected:y.bigint,received:s.parsedType}),R}let n,i=new fe;for(let s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),B(n,{code:E.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),B(n,{code:E.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),B(n,{code:E.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):G.assertNever(s);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,I.toString(r))}gt(e,r){return this.setLimit("min",e,!1,I.toString(r))}lte(e,r){return this.setLimit("max",e,!0,I.toString(r))}lt(e,r){return this.setLimit("max",e,!1,I.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:I.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:I.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:I.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:I.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:I.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:I.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};kt.create=t=>{var e;return new kt({checks:[],typeName:N.ZodBigInt,coerce:(e=t?.coerce)!==null&&e!==void 0?e:!1,...Z(t)})};var Nt=class extends j{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==y.boolean){let n=this._getOrReturnCtx(e);return B(n,{code:E.invalid_type,expected:y.boolean,received:n.parsedType}),R}return me(e.data)}};Nt.create=t=>new Nt({typeName:N.ZodBoolean,coerce:t?.coerce||!1,...Z(t)});var Rt=class t extends j{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==y.date){let s=this._getOrReturnCtx(e);return B(s,{code:E.invalid_type,expected:y.date,received:s.parsedType}),R}if(isNaN(e.data.getTime())){let s=this._getOrReturnCtx(e);return B(s,{code:E.invalid_date}),R}let n=new fe,i;for(let s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),B(i,{code:E.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),B(i,{code:E.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):G.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:I.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:I.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Rt.create=t=>new Rt({checks:[],coerce:t?.coerce||!1,typeName:N.ZodDate,...Z(t)});var br=class extends j{_parse(e){if(this._getType(e)!==y.symbol){let n=this._getOrReturnCtx(e);return B(n,{code:E.invalid_type,expected:y.symbol,received:n.parsedType}),R}return me(e.data)}};br.create=t=>new br({typeName:N.ZodSymbol,...Z(t)});var Pt=class extends j{_parse(e){if(this._getType(e)!==y.undefined){let n=this._getOrReturnCtx(e);return B(n,{code:E.invalid_type,expected:y.undefined,received:n.parsedType}),R}return me(e.data)}};Pt.create=t=>new Pt({typeName:N.ZodUndefined,...Z(t)});var $t=class extends j{_parse(e){if(this._getType(e)!==y.null){let n=this._getOrReturnCtx(e);return B(n,{code:E.invalid_type,expected:y.null,received:n.parsedType}),R}return me(e.data)}};$t.create=t=>new $t({typeName:N.ZodNull,...Z(t)});var Et=class extends j{constructor(){super(...arguments),this._any=!0}_parse(e){return me(e.data)}};Et.create=t=>new Et({typeName:N.ZodAny,...Z(t)});var at=class extends j{constructor(){super(...arguments),this._unknown=!0}_parse(e){return me(e.data)}};at.create=t=>new at({typeName:N.ZodUnknown,...Z(t)});var Me=class extends j{_parse(e){let r=this._getOrReturnCtx(e);return B(r,{code:E.invalid_type,expected:y.never,received:r.parsedType}),R}};Me.create=t=>new Me({typeName:N.ZodNever,...Z(t)});var xr=class extends j{_parse(e){if(this._getType(e)!==y.undefined){let n=this._getOrReturnCtx(e);return B(n,{code:E.invalid_type,expected:y.void,received:n.parsedType}),R}return me(e.data)}};xr.create=t=>new xr({typeName:N.ZodVoid,...Z(t)});var ot=class t extends j{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==y.array)return B(r,{code:E.invalid_type,expected:y.array,received:r.parsedType}),R;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,o=r.data.length<i.exactLength.value;(a||o)&&(B(r,{code:a?E.too_big:E.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(B(r,{code:E.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(B(r,{code:E.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,o)=>i.type._parseAsync(new Re(r,a,r.path,o)))).then(a=>fe.mergeArray(n,a));let s=[...r.data].map((a,o)=>i.type._parseSync(new Re(r,a,r.path,o)));return fe.mergeArray(n,s)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:I.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:I.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:I.toString(r)}})}nonempty(e){return this.min(1,e)}};ot.create=(t,e)=>new ot({type:t,minLength:null,maxLength:null,exactLength:null,typeName:N.ZodArray,...Z(e)});function Br(t){if(t instanceof ge){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=Ne.create(Br(n))}return new ge({...t._def,shape:()=>e})}else return t instanceof ot?new ot({...t._def,type:Br(t.element)}):t instanceof Ne?Ne.create(Br(t.unwrap())):t instanceof We?We.create(Br(t.unwrap())):t instanceof ze?ze.create(t.items.map(e=>Br(e))):t}var ge=class t extends j{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=G.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==y.object){let c=this._getOrReturnCtx(e);return B(c,{code:E.invalid_type,expected:y.object,received:c.parsedType}),R}let{status:n,ctx:i}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof Me&&this._def.unknownKeys==="strip"))for(let c in i.data)a.includes(c)||o.push(c);let u=[];for(let c of a){let l=s[c],f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new Re(i,f,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Me){let c=this._def.unknownKeys;if(c==="passthrough")for(let l of o)u.push({key:{status:"valid",value:l},value:{status:"valid",value:i.data[l]}});else if(c==="strict")o.length>0&&(B(i,{code:E.unrecognized_keys,keys:o}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let l of o){let f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new Re(i,f,i.path,l)),alwaysSet:l in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let c=[];for(let l of u){let f=await l.key,m=await l.value;c.push({key:f,value:m,alwaysSet:l.alwaysSet})}return c}).then(c=>fe.mergeObjectSync(n,c)):fe.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return I.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var i,s,a,o;let u=(a=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(o=I.errToObj(e).message)!==null&&o!==void 0?o:u}:{message:u}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:N.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return G.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}omit(e){let r={};return G.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new t({...this._def,shape:()=>r})}deepPartial(){return Br(this)}partial(e){let r={};return G.objectKeys(this.shape).forEach(n=>{let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}),new t({...this._def,shape:()=>r})}required(e){let r={};return G.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let s=this.shape[n];for(;s instanceof Ne;)s=s._def.innerType;r[n]=s}}),new t({...this._def,shape:()=>r})}keyof(){return El(G.objectKeys(this.shape))}};ge.create=(t,e)=>new ge({shape:()=>t,unknownKeys:"strip",catchall:Me.create(),typeName:N.ZodObject,...Z(e)});ge.strictCreate=(t,e)=>new ge({shape:()=>t,unknownKeys:"strict",catchall:Me.create(),typeName:N.ZodObject,...Z(e)});ge.lazycreate=(t,e)=>new ge({shape:t,unknownKeys:"strip",catchall:Me.create(),typeName:N.ZodObject,...Z(e)});var Lt=class extends j{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(s){for(let o of s)if(o.result.status==="valid")return o.result;for(let o of s)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;let a=s.map(o=>new we(o.ctx.common.issues));return B(r,{code:E.invalid_union,unionErrors:a}),R}if(r.common.async)return Promise.all(n.map(async s=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let s,a=[];for(let u of n){let c={...r,common:{...r.common,issues:[]},parent:null},l=u._parseSync({data:r.data,path:r.path,parent:c});if(l.status==="valid")return l;l.status==="dirty"&&!s&&(s={result:l,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let o=a.map(u=>new we(u));return B(r,{code:E.invalid_union,unionErrors:o}),R}}get options(){return this._def.options}};Lt.create=(t,e)=>new Lt({options:t,typeName:N.ZodUnion,...Z(e)});var st=t=>t instanceof jt?st(t.schema):t instanceof Ie?st(t.innerType()):t instanceof qt?[t.value]:t instanceof Mt?t.options:t instanceof Vt?G.objectValues(t.enum):t instanceof Ut?st(t._def.innerType):t instanceof Pt?[void 0]:t instanceof $t?[null]:t instanceof Ne?[void 0,...st(t.unwrap())]:t instanceof We?[null,...st(t.unwrap())]:t instanceof cn||t instanceof zt?st(t.unwrap()):t instanceof Ht?st(t._def.innerType):[],Yn=class t extends j{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.object)return B(r,{code:E.invalid_type,expected:y.object,received:r.parsedType}),R;let n=this.discriminator,i=r.data[n],s=this.optionsMap.get(i);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(B(r,{code:E.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),R)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let s of r){let a=st(s.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let o of a){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,s)}}return new t({typeName:N.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Z(n)})}};function Ts(t,e){let r=At(t),n=At(e);if(t===e)return{valid:!0,data:t};if(r===y.object&&n===y.object){let i=G.objectKeys(e),s=G.objectKeys(t).filter(o=>i.indexOf(o)!==-1),a={...t,...e};for(let o of s){let u=Ts(t[o],e[o]);if(!u.valid)return{valid:!1};a[o]=u.data}return{valid:!0,data:a}}else if(r===y.array&&n===y.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let s=0;s<t.length;s++){let a=t[s],o=e[s],u=Ts(a,o);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return r===y.date&&n===y.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Zt=class extends j{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(s,a)=>{if(Is(s)||Is(a))return R;let o=Ts(s.value,a.value);return o.valid?((Ss(s)||Ss(a))&&r.dirty(),{status:r.value,value:o.data}):(B(n,{code:E.invalid_intersection_types}),R)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Zt.create=(t,e,r)=>new Zt({left:t,right:e,typeName:N.ZodIntersection,...Z(r)});var ze=class t extends j{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.array)return B(n,{code:E.invalid_type,expected:y.array,received:n.parsedType}),R;if(n.data.length<this._def.items.length)return B(n,{code:E.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),R;!this._def.rest&&n.data.length>this._def.items.length&&(B(n,{code:E.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let s=[...n.data].map((a,o)=>{let u=this._def.items[o]||this._def.rest;return u?u._parse(new Re(n,a,n.path,o)):null}).filter(a=>!!a);return n.common.async?Promise.all(s).then(a=>fe.mergeArray(r,a)):fe.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};ze.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ze({items:t,typeName:N.ZodTuple,rest:null,...Z(e)})};var Xn=class t extends j{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.object)return B(n,{code:E.invalid_type,expected:y.object,received:n.parsedType}),R;let i=[],s=this._def.keyType,a=this._def.valueType;for(let o in n.data)i.push({key:s._parse(new Re(n,o,n.path,o)),value:a._parse(new Re(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?fe.mergeObjectAsync(r,i):fe.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof j?new t({keyType:e,valueType:r,typeName:N.ZodRecord,...Z(n)}):new t({keyType:Ft.create(),valueType:e,typeName:N.ZodRecord,...Z(r)})}},wr=class extends j{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.map)return B(n,{code:E.invalid_type,expected:y.map,received:n.parsedType}),R;let i=this._def.keyType,s=this._def.valueType,a=[...n.data.entries()].map(([o,u],c)=>({key:i._parse(new Re(n,o,n.path,[c,"key"])),value:s._parse(new Re(n,u,n.path,[c,"value"]))}));if(n.common.async){let o=new Map;return Promise.resolve().then(async()=>{for(let u of a){let c=await u.key,l=await u.value;if(c.status==="aborted"||l.status==="aborted")return R;(c.status==="dirty"||l.status==="dirty")&&r.dirty(),o.set(c.value,l.value)}return{status:r.value,value:o}})}else{let o=new Map;for(let u of a){let c=u.key,l=u.value;if(c.status==="aborted"||l.status==="aborted")return R;(c.status==="dirty"||l.status==="dirty")&&r.dirty(),o.set(c.value,l.value)}return{status:r.value,value:o}}}};wr.create=(t,e,r)=>new wr({valueType:e,keyType:t,typeName:N.ZodMap,...Z(r)});var Ir=class t extends j{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==y.set)return B(n,{code:E.invalid_type,expected:y.set,received:n.parsedType}),R;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(B(n,{code:E.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(B(n,{code:E.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let s=this._def.valueType;function a(u){let c=new Set;for(let l of u){if(l.status==="aborted")return R;l.status==="dirty"&&r.dirty(),c.add(l.value)}return{status:r.value,value:c}}let o=[...n.data.values()].map((u,c)=>s._parse(new Re(n,u,n.path,c)));return n.common.async?Promise.all(o).then(u=>a(u)):a(o)}min(e,r){return new t({...this._def,minSize:{value:e,message:I.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:I.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Ir.create=(t,e)=>new Ir({valueType:t,minSize:null,maxSize:null,typeName:N.ZodSet,...Z(e)});var Qn=class t extends j{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.function)return B(r,{code:E.invalid_type,expected:y.function,received:r.parsedType}),R;function n(o,u){return Jn({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Gn(),vr].filter(c=>!!c),issueData:{code:E.invalid_arguments,argumentsError:u}})}function i(o,u){return Jn({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Gn(),vr].filter(c=>!!c),issueData:{code:E.invalid_return_type,returnTypeError:u}})}let s={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof mt){let o=this;return me(async function(...u){let c=new we([]),l=await o._def.args.parseAsync(u,s).catch(F=>{throw c.addIssue(n(u,F)),c}),f=await Reflect.apply(a,this,l);return await o._def.returns._def.type.parseAsync(f,s).catch(F=>{throw c.addIssue(i(f,F)),c})})}else{let o=this;return me(function(...u){let c=o._def.args.safeParse(u,s);if(!c.success)throw new we([n(u,c.error)]);let l=Reflect.apply(a,this,c.data),f=o._def.returns.safeParse(l,s);if(!f.success)throw new we([i(l,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:ze.create(e).rest(at.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new t({args:e||ze.create([]).rest(at.create()),returns:r||at.create(),typeName:N.ZodFunction,...Z(n)})}},jt=class extends j{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};jt.create=(t,e)=>new jt({getter:t,typeName:N.ZodLazy,...Z(e)});var qt=class extends j{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return B(r,{received:r.data,code:E.invalid_literal,expected:this._def.value}),R}return{status:"valid",value:e.data}}get value(){return this._def.value}};qt.create=(t,e)=>new qt({value:t,typeName:N.ZodLiteral,...Z(e)});function El(t,e){return new Mt({values:t,typeName:N.ZodEnum,...Z(e)})}var Mt=class t extends j{constructor(){super(...arguments),sn.set(this,void 0)}_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return B(r,{expected:G.joinValues(n),received:r.parsedType,code:E.invalid_type}),R}if(Kn(this,sn,"f")||hl(this,sn,new Set(this._def.values),"f"),!Kn(this,sn,"f").has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return B(r,{received:r.data,code:E.invalid_enum_value,options:n}),R}return me(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};sn=new WeakMap;Mt.create=El;var Vt=class extends j{constructor(){super(...arguments),an.set(this,void 0)}_parse(e){let r=G.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==y.string&&n.parsedType!==y.number){let i=G.objectValues(r);return B(n,{expected:G.joinValues(i),received:n.parsedType,code:E.invalid_type}),R}if(Kn(this,an,"f")||hl(this,an,new Set(G.getValidEnumValues(this._def.values)),"f"),!Kn(this,an,"f").has(e.data)){let i=G.objectValues(r);return B(n,{received:n.data,code:E.invalid_enum_value,options:i}),R}return me(e.data)}get enum(){return this._def.values}};an=new WeakMap;Vt.create=(t,e)=>new Vt({values:t,typeName:N.ZodNativeEnum,...Z(e)});var mt=class extends j{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==y.promise&&r.common.async===!1)return B(r,{code:E.invalid_type,expected:y.promise,received:r.parsedType}),R;let n=r.parsedType===y.promise?r.data:Promise.resolve(r.data);return me(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};mt.create=(t,e)=>new mt({type:t,typeName:N.ZodPromise,...Z(e)});var Ie=class extends j{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===N.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:a=>{B(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){let a=i.transform(n.data,s);if(n.common.async)return Promise.resolve(a).then(async o=>{if(r.value==="aborted")return R;let u=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return u.status==="aborted"?R:u.status==="dirty"||r.value==="dirty"?yr(u.value):u});{if(r.value==="aborted")return R;let o=this._def.schema._parseSync({data:a,path:n.path,parent:n});return o.status==="aborted"?R:o.status==="dirty"||r.value==="dirty"?yr(o.value):o}}if(i.type==="refinement"){let a=o=>{let u=i.refinement(o,s);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){let o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?R:(o.status==="dirty"&&r.dirty(),a(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?R:(o.status==="dirty"&&r.dirty(),a(o.value).then(()=>({status:r.value,value:o.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!on(a))return a;let o=i.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>on(a)?Promise.resolve(i.transform(a.value,s)).then(o=>({status:r.value,value:o})):a);G.assertNever(i)}};Ie.create=(t,e,r)=>new Ie({schema:t,typeName:N.ZodEffects,effect:e,...Z(r)});Ie.createWithPreprocess=(t,e,r)=>new Ie({schema:e,effect:{type:"preprocess",transform:t},typeName:N.ZodEffects,...Z(r)});var Ne=class extends j{_parse(e){return this._getType(e)===y.undefined?me(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ne.create=(t,e)=>new Ne({innerType:t,typeName:N.ZodOptional,...Z(e)});var We=class extends j{_parse(e){return this._getType(e)===y.null?me(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};We.create=(t,e)=>new We({innerType:t,typeName:N.ZodNullable,...Z(e)});var Ut=class extends j{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===y.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Ut.create=(t,e)=>new Ut({innerType:t,typeName:N.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Z(e)});var Ht=class extends j{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return un(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new we(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new we(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};Ht.create=(t,e)=>new Ht({innerType:t,typeName:N.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Z(e)});var Sr=class extends j{_parse(e){if(this._getType(e)!==y.nan){let n=this._getOrReturnCtx(e);return B(n,{code:E.invalid_type,expected:y.nan,received:n.parsedType}),R}return{status:"valid",value:e.data}}};Sr.create=t=>new Sr({typeName:N.ZodNaN,...Z(t)});var lm=Symbol("zod_brand"),cn=class extends j{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},ln=class t extends j{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let s=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?R:s.status==="dirty"?(r.dirty(),yr(s.value)):this._def.out._parseAsync({data:s.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?R:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:N.ZodPipeline})}},zt=class extends j{_parse(e){let r=this._def.innerType._parse(e),n=i=>(on(i)&&(i.value=Object.freeze(i.value)),i);return un(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};zt.create=(t,e)=>new zt({innerType:t,typeName:N.ZodReadonly,...Z(e)});function ml(t,e={},r){return t?Et.create().superRefine((n,i)=>{var s,a;if(!t(n)){let o=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e,u=(a=(s=o.fatal)!==null&&s!==void 0?s:r)!==null&&a!==void 0?a:!0,c=typeof o=="string"?{message:o}:o;i.addIssue({code:"custom",...c,fatal:u})}}):Et.create()}var dm={object:ge.lazycreate},N;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(N||(N={}));var fm=(t,e={message:`Input not instance of ${t.name}`})=>ml(r=>r instanceof t,e),Cl=Ft.create,gl=Ot.create,hm=Sr.create,pm=kt.create,Dl=Nt.create,Am=Rt.create,Fm=br.create,Em=Pt.create,mm=$t.create,Cm=Et.create,gm=at.create,Dm=Me.create,_m=xr.create,Bm=ot.create,ym=ge.create,vm=ge.strictCreate,bm=Lt.create,xm=Yn.create,wm=Zt.create,Im=ze.create,Sm=Xn.create,Tm=wr.create,Om=Ir.create,km=Qn.create,Nm=jt.create,Rm=qt.create,Pm=Mt.create,$m=Vt.create,Lm=mt.create,dl=Ie.create,Zm=Ne.create,jm=We.create,qm=Ie.createWithPreprocess,Mm=ln.create,Vm=()=>Cl().optional(),Um=()=>gl().optional(),Hm=()=>Dl().optional(),zm={string:(t=>Ft.create({...t,coerce:!0})),number:(t=>Ot.create({...t,coerce:!0})),boolean:(t=>Nt.create({...t,coerce:!0})),bigint:(t=>kt.create({...t,coerce:!0})),date:(t=>Rt.create({...t,coerce:!0}))},Wm=R,z=Object.freeze({__proto__:null,defaultErrorMap:vr,setErrorMap:WE,getErrorMap:Gn,makeIssue:Jn,EMPTY_PATH:GE,addIssueToContext:B,ParseStatus:fe,INVALID:R,DIRTY:yr,OK:me,isAborted:Is,isDirty:Ss,isValid:on,isAsync:un,get util(){return G},get objectUtil(){return ws},ZodParsedType:y,getParsedType:At,ZodType:j,datetimeRegex:Fl,ZodString:Ft,ZodNumber:Ot,ZodBigInt:kt,ZodBoolean:Nt,ZodDate:Rt,ZodSymbol:br,ZodUndefined:Pt,ZodNull:$t,ZodAny:Et,ZodUnknown:at,ZodNever:Me,ZodVoid:xr,ZodArray:ot,ZodObject:ge,ZodUnion:Lt,ZodDiscriminatedUnion:Yn,ZodIntersection:Zt,ZodTuple:ze,ZodRecord:Xn,ZodMap:wr,ZodSet:Ir,ZodFunction:Qn,ZodLazy:jt,ZodLiteral:qt,ZodEnum:Mt,ZodNativeEnum:Vt,ZodPromise:mt,ZodEffects:Ie,ZodTransformer:Ie,ZodOptional:Ne,ZodNullable:We,ZodDefault:Ut,ZodCatch:Ht,ZodNaN:Sr,BRAND:lm,ZodBranded:cn,ZodPipeline:ln,ZodReadonly:zt,custom:ml,Schema:j,ZodSchema:j,late:dm,get ZodFirstPartyTypeKind(){return N},coerce:zm,any:Cm,array:Bm,bigint:pm,boolean:Dl,date:Am,discriminatedUnion:xm,effect:dl,enum:Pm,function:km,instanceof:fm,intersection:wm,lazy:Nm,literal:Rm,map:Tm,nan:hm,nativeEnum:$m,never:Dm,null:mm,nullable:jm,number:gl,object:ym,oboolean:Hm,onumber:Um,optional:Zm,ostring:Vm,pipeline:Mm,preprocess:qm,promise:Lm,record:Sm,set:Om,strictObject:vm,string:Cl,symbol:Fm,transformer:dl,tuple:Im,undefined:Em,union:bm,unknown:gm,void:_m,NEVER:Wm,ZodIssueCode:E,quotelessJson:zE,ZodError:we});var _l=["PCA10028","PCA10031","PCA10040","PCA10056","PCA10059","PCA10090","PCA10095","PCA10100","PCA10121","PCA20020","PCA20053","PCA20035","PCA10143","PCA10152","PCA10153","PCA10165","PCA20065","PCA10171","PCA10156","PCA10175","PCA10184","PCA10188","PCA10214","PCA10201","PCA10218","PCA10226","PCA10232","PCA10237","PCA10208"];var q_=z.object({name:z.string(),description:z.string().optional(),apps:z.array(z.string().url())}),M_=z.array(z.string().url()),ei=z.string().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,"Is not a valid string for a semantic version"),Gm=z.string(),Jm=ei,Bl=z.record(Gm,z.tuple([Jm]));var nd=Qe(rd()),li=t=>e=>{let r=t.safeParse(JSON.parse(e));return r.success?r:{...r,error:(0,nd.fromZodError)(r.error,{prefix:"Error in package.json",prefixSeparator:`:
|
|
32
32
|
- `,issueSeparator:`
|
|
33
33
|
- `})}};var id=z.object({name:z.string(),version:ei,displayName:z.string().optional()}),cB=li(id),sd=z.object({supportedDevices:z.enum(_l).array().nonempty().optional(),nrfutil:Bl.optional(),nrfutilCore:ei,html:z.string(),autoUpdate:z.boolean().optional(),fixedSize:z.object({width:z.number().int().positive(),height:z.number().int().positive()}).optional()}),di=z.record(z.string().optional()),wC=di.and(z.object({nrfconnect:z.string()})),ad=id.extend({dependencies:di.optional(),description:z.string(),homepage:z.string().url().optional(),devDependencies:di.optional(),displayName:z.string(),engines:wC,nrfConnectForDesktop:sd,files:z.string().array().optional(),peerDependencies:di.optional(),repository:z.object({type:z.string(),url:z.string().url()}).optional()}),od=li(ad),IC=ad.extend({nrfConnectForDesktop:sd.extend({supportedDevices:z.array(z.string()).nonempty().optional()}).partial({html:!0,nrfutilCore:!0}).optional()}),lB=li(IC);var ud=require("node:fs"),SC=()=>(0,ud.readFileSync)("Changelog.md","utf-8"),qs=(t=SC())=>{let e=t.split(/(?:^|\n)## /)[1],r=e.split(`
|
|
34
34
|
`)[0],n=e.replace(/[^\n]*/,"").trim();return{header:r,content:n}},TC=require.main===module;TC&&console.log(qs().content);var hd=t=>t.map(e=>`\`${e}\``).join(", "),cd=t=>e=>{let r=(0,dd.default)(e)(t);return r==null||r===""};function Ye(t){console.error(t),process.exit(1)}var ld=t=>{console.warn(t)},OC=(t,e)=>{t.length!==0&&Ye(`${e}: ${hd(t)}`)},pd=(t,e,r)=>{let n=e.filter(i=>!t.includes(i));OC(n,r)},kC=(t,e,r)=>{e.some(n=>t.includes(n))||Ye(`${r}: ${hd(e)}`)},NC=(t,e)=>{let r=s=>s.replace(/\.git$/,""),n=s=>s.replace(/^git@[^:]+:/,"github.com/").replace(/^https:\/\//,""),i=s=>n(r(s));return i(t)===i(e)},RC=t=>{if(!(0,lr.existsSync)("./.git"))return;let e=(0,fd.execSync)("git remote get-url origin",{encoding:"utf-8"}).trimEnd(),r=t.repository?.url;(r==null||!NC(e,r))&&Ye(`package.json says the repository is located at \`${r}\` but \`git remote get-url origin\` says it is at \`${e}\`.`)},PC=t=>{cd(t)("homepage")&&ld("Please provide a property `homepage` in package.json."),cd(t)("repository.url")?ld("Please provide a property `repository.url` in package.json."):RC(t)},$C=t=>{pd(t.files??[],["LICENSE","dist/","Changelog.md"],"These entries are missing in the property `files` in package.json"),kC(t.files??[],["resources/*","resources/icon.*","resources/"],"One of these entries must be in the property `files` in package.json")},LC=t=>{let e=Ms.default.minVersion(t.engines.nrfconnect);if(e==null)Ye(`Unable to determine the minimal launcher version requested by \`engines.nrfconnect\` set to \`${t.engines.nrfconnect}\`.`);else{Ms.default.lt(e,Wn)&&Ye(`This version of shared requires at least launcher version ${Wn} but the field \`engines.nrfconnect\` in package.json requests \`${t.engines.nrfconnect}\` which would also allow the lower ${e}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../config/versions.ts"],"names":[],"mappings":"AAMA,OAAe,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE7C,eAAO,MAAM,sBAAsB,UAAU,CAAC;AAE9C,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAC1C,MAAM,EACN;IACI,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CAChB,
|
|
1
|
+
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../config/versions.ts"],"names":[],"mappings":"AAMA,OAAe,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE7C,eAAO,MAAM,sBAAsB,UAAU,CAAC;AAE9C,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAC1C,MAAM,EACN;IACI,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CAChB,CAyBJ,CAAC;AAEF,eAAO,MAAM,0BAA0B,GACnC,iBAAiB,MAAM,GAAG,MAAM,EAChC;cAhCc,MAAM;YACR,MAAM;UACR,MAAM;EA8BoB;cAhCtB,MAAM;YACR,MAAM;UACR,MAAM;CA2CnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nordicsemiconductor/pc-nrfconnect-shared",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "266.0.0",
|
|
4
4
|
"description": "Shared commodities for developing pc-nrfconnect-* packages",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"electron": "32.1.2"
|
|
130
130
|
},
|
|
131
131
|
"peerDependencies": {
|
|
132
|
-
"electron": "32.1.2 || 43.4.0 || 43.8.6"
|
|
132
|
+
"electron": "32.1.2 || 43.4.0 || 43.8.6 || 45.5.0"
|
|
133
133
|
},
|
|
134
134
|
"typings": "./dist/typings/src/index.d.ts",
|
|
135
135
|
"prettier": "./config/prettier.config.js"
|
package/release_notes.md
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
1
|
### Changed
|
|
2
2
|
|
|
3
|
-
-
|
|
4
|
-
prefix (e.g. not `fs` but `node:fs`)
|
|
5
|
-
|
|
6
|
-
### Steps to upgrade when using this package
|
|
7
|
-
|
|
8
|
-
- Run `npm run check:lint -- --fix` to fix cases where the `node:` prefix was
|
|
9
|
-
not used. If you mock Node built-in modules in your unit tests, you have to
|
|
10
|
-
adjust those mocks manually.
|
|
3
|
+
- Support Electron 45 with launcher 6.0.0.
|