@authhero/adapter-interfaces 0.27.0 → 0.29.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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function Pt(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(t);a<s.length;a++)e.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(t,s[a])&&(n[s[a]]=t[s[a]]);return n}function Mt(t,e){var n;return((n=t==null?void 0:t._def)===null||n===void 0?void 0:n.typeName)===e}function J(t,e){const n=t.ZodType.prototype[e];t.ZodType.prototype[e]=function(...s){const a=n.apply(this,s);return a._def.openapi=this._def.openapi,a}}function Ut(t){if(typeof t.ZodType.prototype.openapi<"u")return;t.ZodType.prototype.openapi=function(a,i){var o,c,u,l,m,x;const z=typeof a=="string"?i:a,W=z??{},{param:Ve}=W,Zt=Pt(W,["param"]),Le=Object.assign(Object.assign({},(o=this._def.openapi)===null||o===void 0?void 0:o._internal),typeof a=="string"?{refId:a}:void 0),Be=Object.assign(Object.assign(Object.assign({},(c=this._def.openapi)===null||c===void 0?void 0:c.metadata),Zt),!((l=(u=this._def.openapi)===null||u===void 0?void 0:u.metadata)===null||l===void 0)&&l.param||Ve?{param:Object.assign(Object.assign({},(x=(m=this._def.openapi)===null||m===void 0?void 0:m.metadata)===null||x===void 0?void 0:x.param),Ve)}:void 0),ze=new this.constructor(Object.assign(Object.assign({},this._def),{openapi:Object.assign(Object.assign({},Object.keys(Le).length>0?{_internal:Le}:void 0),Object.keys(Be).length>0?{metadata:Be}:void 0)}));if(Mt(this,"ZodObject")){const Rt=this.extend;ze.extend=function(...At){var Se,we,Te,Ee,Ce,Oe;const je=Rt.apply(this,At);return je._def.openapi={_internal:{extendedFrom:!((we=(Se=this._def.openapi)===null||Se===void 0?void 0:Se._internal)===null||we===void 0)&&we.refId?{refId:(Ee=(Te=this._def.openapi)===null||Te===void 0?void 0:Te._internal)===null||Ee===void 0?void 0:Ee.refId,schema:this}:(Ce=this._def.openapi)===null||Ce===void 0?void 0:Ce._internal.extendedFrom},metadata:(Oe=je._def.openapi)===null||Oe===void 0?void 0:Oe.metadata},je}}return ze},J(t,"optional"),J(t,"nullable"),J(t,"default"),J(t,"transform"),J(t,"refine");const e=t.ZodObject.prototype.deepPartial;t.ZodObject.prototype.deepPartial=function(){const a=this._def.shape(),i=e.apply(this),o=i._def.shape();return Object.entries(o).forEach(([c,u])=>{var l,m;u._def.openapi=(m=(l=a[c])===null||l===void 0?void 0:l._def)===null||m===void 0?void 0:m.openapi}),i._def.openapi=void 0,i};const n=t.ZodObject.prototype.pick;t.ZodObject.prototype.pick=function(...a){const i=n.apply(this,a);return i._def.openapi=void 0,i};const s=t.ZodObject.prototype.omit;t.ZodObject.prototype.omit=function(...a){const i=s.apply(this,a);return i._def.openapi=void 0,i}}new Set(".\\+*[^]$()");var b;(function(t){t.assertEqual=a=>a;function e(a){}t.assertIs=e;function n(a){throw new Error}t.assertNever=n,t.arrayToEnum=a=>{const i={};for(const o of a)i[o]=o;return i},t.getValidEnumValues=a=>{const i=t.objectKeys(a).filter(c=>typeof a[a[c]]!="number"),o={};for(const c of i)o[c]=a[c];return t.objectValues(o)},t.objectValues=a=>t.objectKeys(a).map(function(i){return a[i]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&i.push(o);return i},t.find=(a,i)=>{for(const o of a)if(i(o))return o},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function s(a,i=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=s,t.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(b||(b={}));var Ne;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Ne||(Ne={}));const h=b.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),A=t=>{switch(typeof t){case"undefined":return h.undefined;case"string":return h.string;case"number":return isNaN(t)?h.nan:h.number;case"boolean":return h.boolean;case"function":return h.function;case"bigint":return h.bigint;case"symbol":return h.symbol;case"object":return Array.isArray(t)?h.array:t===null?h.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?h.promise:typeof Map<"u"&&t instanceof Map?h.map:typeof Set<"u"&&t instanceof Set?h.set:typeof Date<"u"&&t instanceof Date?h.date:h.object;default:return h.unknown}},d=b.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"]),Dt=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class T extends Error{constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(i){return i.message},s={_errors:[]},a=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)s._errors.push(n(o));else{let c=s,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(c[l]=c[l]||{_errors:[]},c[l]._errors.push(n(o))):c[l]=c[l]||{_errors:[]},c=c[l],u++}}};return a(this),s}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,b.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},s=[];for(const a of this.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(e(a))):s.push(e(a));return{formErrors:s,fieldErrors:n}}get formErrors(){return this.flatten()}}T.create=t=>new T(t);const F=(t,e)=>{let n;switch(t.code){case d.invalid_type:t.received===h.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case d.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,b.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:n=`Unrecognized key(s) in object: ${b.joinValues(t.keys,", ")}`;break;case d.invalid_union:n="Invalid input";break;case d.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${b.joinValues(t.options)}`;break;case d.invalid_enum_value:n=`Invalid enum value. Expected ${b.joinValues(t.options)}, received '${t.received}'`;break;case d.invalid_arguments:n="Invalid function arguments";break;case d.invalid_return_type:n="Invalid function return type";break;case d.invalid_date:n="Invalid date";break;case d.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:b.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case d.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case d.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case d.custom:n="Invalid input";break;case d.invalid_intersection_types:n="Intersection results could not be merged";break;case d.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case d.not_finite:n="Number must be finite";break;default:n=e.defaultError,b.assertNever(t)}return{message:n}};let qe=F;function $t(t){qe=t}function me(){return qe}const ge=t=>{const{data:e,path:n,errorMaps:s,issueData:a}=t,i=[...n,...a.path||[]],o={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let c="";const u=s.filter(l=>!!l).slice().reverse();for(const l of u)c=l(o,{data:e,defaultError:c}).message;return{...a,path:i,message:c}},Vt=[];function p(t,e){const n=me(),s=ge({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===F?void 0:F].filter(a=>!!a)});t.common.issues.push(s)}class S{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const s=[];for(const a of n){if(a.status==="aborted")return _;a.status==="dirty"&&e.dirty(),s.push(a.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,n){const s=[];for(const a of n){const i=await a.key,o=await a.value;s.push({key:i,value:o})}return S.mergeObjectSync(e,s)}static mergeObjectSync(e,n){const s={};for(const a of n){const{key:i,value:o}=a;if(i.status==="aborted"||o.status==="aborted")return _;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(s[i.value]=o.value)}return{status:e.value,value:s}}}const _=Object.freeze({status:"aborted"}),q=t=>({status:"dirty",value:t}),w=t=>({status:"valid",value:t}),Ze=t=>t.status==="aborted",Re=t=>t.status==="dirty",ee=t=>t.status==="valid",te=t=>typeof Promise<"u"&&t instanceof Promise;function _e(t,e,n,s){if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Ge(t,e,n,s,a){if(typeof e=="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var f;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(f||(f={}));var Q,X;class I{constructor(e,n,s,a){this._cachedPath=[],this.parent=e,this.data=n,this._path=s,this._key=a}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}}const We=(t,e)=>{if(ee(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;const n=new T(t.common.issues);return this._error=n,this._error}}};function y(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:s,description:a}=t;if(e&&(n||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(o,c)=>{var u,l;const{message:m}=t;return o.code==="invalid_enum_value"?{message:m??c.defaultError}:typeof c.data>"u"?{message:(u=m??s)!==null&&u!==void 0?u:c.defaultError}:o.code!=="invalid_type"?{message:c.defaultError}:{message:(l=m??n)!==null&&l!==void 0?l:c.defaultError}},description:a}}class v{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 A(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:A(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new S,ctx:{common:e.parent.common,data:e.data,parsedType:A(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(te(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const s=this.safeParse(e,n);if(s.success)return s.data;throw s.error}safeParse(e,n){var s;const a={common:{issues:[],async:(s=n==null?void 0:n.async)!==null&&s!==void 0?s:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:A(e)},i=this._parseSync({data:e,path:a.path,parent:a});return We(a,i)}async parseAsync(e,n){const s=await this.safeParseAsync(e,n);if(s.success)return s.data;throw s.error}async safeParseAsync(e,n){const s={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:A(e)},a=this._parse({data:e,path:s.path,parent:s}),i=await(te(a)?a:Promise.resolve(a));return We(s,i)}refine(e,n){const s=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,i)=>{const o=e(a),c=()=>i.addIssue({code:d.custom,...s(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(c(),!1)):o?!0:(c(),!1)})}refinement(e,n){return this._refinement((s,a)=>e(s)?!0:(a.addIssue(typeof n=="function"?n(s,a):n),!1))}_refinement(e){return new O({schema:this,typeName:g.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return j.create(this,this._def)}nullable(){return D.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return C.create(this,this._def)}promise(){return Y.create(this,this._def)}or(e){return ae.create([this,e],this._def)}and(e){return ie.create(this,e,this._def)}transform(e){return new O({...y(this._def),schema:this,typeName:g.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new ue({...y(this._def),innerType:this,defaultValue:n,typeName:g.ZodDefault})}brand(){return new Pe({typeName:g.ZodBranded,type:this,...y(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new pe({...y(this._def),innerType:this,catchValue:n,typeName:g.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return fe.create(this,e)}readonly(){return he.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Lt=/^c[^\s-]{8,}$/i,Bt=/^[0-9a-z]+$/,zt=/^[0-9A-HJKMNP-TV-Z]{26}$/,Wt=/^[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,Ht=/^[a-z0-9_-]{21}$/i,qt=/^[-+]?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)?)??$/,Gt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ft="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ie;const Kt=/^(?:(?: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])$/,Yt=/^(([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})))$/,Jt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Fe="((\\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])))",Qt=new RegExp(`^${Fe}$`);function Ke(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 Xt(t){return new RegExp(`^${Ke(t)}$`)}function Ye(t){let e=`${Fe}T${Ke(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function en(t,e){return!!((e==="v4"||!e)&&Kt.test(t)||(e==="v6"||!e)&&Yt.test(t))}class E extends v{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==h.string){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_type,expected:h.string,received:i.parsedType}),_}const s=new S;let a;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),p(a,{code:d.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),s.dirty());else if(i.kind==="max")e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),p(a,{code:d.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),s.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,c=e.data.length<i.value;(o||c)&&(a=this._getOrReturnCtx(e,a),o?p(a,{code:d.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&p(a,{code:d.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),s.dirty())}else if(i.kind==="email")Gt.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"email",code:d.invalid_string,message:i.message}),s.dirty());else if(i.kind==="emoji")Ie||(Ie=new RegExp(Ft,"u")),Ie.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"emoji",code:d.invalid_string,message:i.message}),s.dirty());else if(i.kind==="uuid")Wt.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"uuid",code:d.invalid_string,message:i.message}),s.dirty());else if(i.kind==="nanoid")Ht.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"nanoid",code:d.invalid_string,message:i.message}),s.dirty());else if(i.kind==="cuid")Lt.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"cuid",code:d.invalid_string,message:i.message}),s.dirty());else if(i.kind==="cuid2")Bt.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"cuid2",code:d.invalid_string,message:i.message}),s.dirty());else if(i.kind==="ulid")zt.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"ulid",code:d.invalid_string,message:i.message}),s.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),p(a,{validation:"url",code:d.invalid_string,message:i.message}),s.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"regex",code:d.invalid_string,message:i.message}),s.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(e,a),p(a,{code:d.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),s.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),p(a,{code:d.invalid_string,validation:{startsWith:i.value},message:i.message}),s.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),p(a,{code:d.invalid_string,validation:{endsWith:i.value},message:i.message}),s.dirty()):i.kind==="datetime"?Ye(i).test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{code:d.invalid_string,validation:"datetime",message:i.message}),s.dirty()):i.kind==="date"?Qt.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{code:d.invalid_string,validation:"date",message:i.message}),s.dirty()):i.kind==="time"?Xt(i).test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{code:d.invalid_string,validation:"time",message:i.message}),s.dirty()):i.kind==="duration"?qt.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"duration",code:d.invalid_string,message:i.message}),s.dirty()):i.kind==="ip"?en(e.data,i.version)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"ip",code:d.invalid_string,message:i.message}),s.dirty()):i.kind==="base64"?Jt.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"base64",code:d.invalid_string,message:i.message}),s.dirty()):b.assertNever(i);return{status:s.value,value:e.data}}_regex(e,n,s){return this.refinement(a=>e.test(a),{validation:n,code:d.invalid_string,...f.errToObj(s)})}_addCheck(e){return new E({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...f.errToObj(e)})}url(e){return this._addCheck({kind:"url",...f.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...f.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...f.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...f.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...f.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...f.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...f.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...f.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...f.errToObj(e)})}datetime(e){var n,s;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(s=e==null?void 0:e.local)!==null&&s!==void 0?s:!1,...f.errToObj(e==null?void 0: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==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...f.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...f.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...f.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...f.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...f.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...f.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...f.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...f.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...f.errToObj(n)})}nonempty(e){return this.min(1,f.errToObj(e))}trim(){return new E({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new E({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new E({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}E.create=t=>{var e;return new E({checks:[],typeName:g.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...y(t)})};function tn(t,e){const n=(t.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,a=n>s?n:s,i=parseInt(t.toFixed(a).replace(".","")),o=parseInt(e.toFixed(a).replace(".",""));return i%o/Math.pow(10,a)}class P extends v{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)!==h.number){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_type,expected:h.number,received:i.parsedType}),_}let s;const a=new S;for(const i of this._def.checks)i.kind==="int"?b.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:d.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?tn(e.data,i.value)!==0&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:d.not_finite,message:i.message}),a.dirty()):b.assertNever(i);return{status:a.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,f.toString(n))}gt(e,n){return this.setLimit("min",e,!1,f.toString(n))}lte(e,n){return this.setLimit("max",e,!0,f.toString(n))}lt(e,n){return this.setLimit("max",e,!1,f.toString(n))}setLimit(e,n,s,a){return new P({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:s,message:f.toString(a)}]})}_addCheck(e){return new P({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:f.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:f.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:f.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:f.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:f.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:f.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:f.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:f.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:f.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&b.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(n===null||s.value>n)&&(n=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(n)&&Number.isFinite(e)}}P.create=t=>new P({checks:[],typeName:g.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...y(t)});class M extends v{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)!==h.bigint){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_type,expected:h.bigint,received:i.parsedType}),_}let s;const a=new S;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):b.assertNever(i);return{status:a.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,f.toString(n))}gt(e,n){return this.setLimit("min",e,!1,f.toString(n))}lte(e,n){return this.setLimit("max",e,!0,f.toString(n))}lt(e,n){return this.setLimit("max",e,!1,f.toString(n))}setLimit(e,n,s,a){return new M({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:s,message:f.toString(a)}]})}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:f.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:f.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:f.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:f.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:f.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}M.create=t=>{var e;return new M({checks:[],typeName:g.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...y(t)})};class ne extends v{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==h.boolean){const s=this._getOrReturnCtx(e);return p(s,{code:d.invalid_type,expected:h.boolean,received:s.parsedType}),_}return w(e.data)}}ne.create=t=>new ne({typeName:g.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...y(t)});class L extends v{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==h.date){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_type,expected:h.date,received:i.parsedType}),_}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_date}),_}const s=new S;let a;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(a=this._getOrReturnCtx(e,a),p(a,{code:d.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),s.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(a=this._getOrReturnCtx(e,a),p(a,{code:d.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),s.dirty()):b.assertNever(i);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new L({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:f.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:f.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}L.create=t=>new L({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:g.ZodDate,...y(t)});class ye extends v{_parse(e){if(this._getType(e)!==h.symbol){const s=this._getOrReturnCtx(e);return p(s,{code:d.invalid_type,expected:h.symbol,received:s.parsedType}),_}return w(e.data)}}ye.create=t=>new ye({typeName:g.ZodSymbol,...y(t)});class re extends v{_parse(e){if(this._getType(e)!==h.undefined){const s=this._getOrReturnCtx(e);return p(s,{code:d.invalid_type,expected:h.undefined,received:s.parsedType}),_}return w(e.data)}}re.create=t=>new re({typeName:g.ZodUndefined,...y(t)});class se extends v{_parse(e){if(this._getType(e)!==h.null){const s=this._getOrReturnCtx(e);return p(s,{code:d.invalid_type,expected:h.null,received:s.parsedType}),_}return w(e.data)}}se.create=t=>new se({typeName:g.ZodNull,...y(t)});class K extends v{constructor(){super(...arguments),this._any=!0}_parse(e){return w(e.data)}}K.create=t=>new K({typeName:g.ZodAny,...y(t)});class V extends v{constructor(){super(...arguments),this._unknown=!0}_parse(e){return w(e.data)}}V.create=t=>new V({typeName:g.ZodUnknown,...y(t)});class R extends v{_parse(e){const n=this._getOrReturnCtx(e);return p(n,{code:d.invalid_type,expected:h.never,received:n.parsedType}),_}}R.create=t=>new R({typeName:g.ZodNever,...y(t)});class ve extends v{_parse(e){if(this._getType(e)!==h.undefined){const s=this._getOrReturnCtx(e);return p(s,{code:d.invalid_type,expected:h.void,received:s.parsedType}),_}return w(e.data)}}ve.create=t=>new ve({typeName:g.ZodVoid,...y(t)});class C extends v{_parse(e){const{ctx:n,status:s}=this._processInputParams(e),a=this._def;if(n.parsedType!==h.array)return p(n,{code:d.invalid_type,expected:h.array,received:n.parsedType}),_;if(a.exactLength!==null){const o=n.data.length>a.exactLength.value,c=n.data.length<a.exactLength.value;(o||c)&&(p(n,{code:o?d.too_big:d.too_small,minimum:c?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),s.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(p(n,{code:d.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),s.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(p(n,{code:d.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),s.dirty()),n.common.async)return Promise.all([...n.data].map((o,c)=>a.type._parseAsync(new I(n,o,n.path,c)))).then(o=>S.mergeArray(s,o));const i=[...n.data].map((o,c)=>a.type._parseSync(new I(n,o,n.path,c)));return S.mergeArray(s,i)}get element(){return this._def.type}min(e,n){return new C({...this._def,minLength:{value:e,message:f.toString(n)}})}max(e,n){return new C({...this._def,maxLength:{value:e,message:f.toString(n)}})}length(e,n){return new C({...this._def,exactLength:{value:e,message:f.toString(n)}})}nonempty(e){return this.min(1,e)}}C.create=(t,e)=>new C({type:t,minLength:null,maxLength:null,exactLength:null,typeName:g.ZodArray,...y(e)});function H(t){if(t instanceof k){const e={};for(const n in t.shape){const s=t.shape[n];e[n]=j.create(H(s))}return new k({...t._def,shape:()=>e})}else return t instanceof C?new C({...t._def,type:H(t.element)}):t instanceof j?j.create(H(t.unwrap())):t instanceof D?D.create(H(t.unwrap())):t instanceof N?N.create(t.items.map(e=>H(e))):t}class k extends v{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=b.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==h.object){const l=this._getOrReturnCtx(e);return p(l,{code:d.invalid_type,expected:h.object,received:l.parsedType}),_}const{status:s,ctx:a}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),c=[];if(!(this._def.catchall instanceof R&&this._def.unknownKeys==="strip"))for(const l in a.data)o.includes(l)||c.push(l);const u=[];for(const l of o){const m=i[l],x=a.data[l];u.push({key:{status:"valid",value:l},value:m._parse(new I(a,x,a.path,l)),alwaysSet:l in a.data})}if(this._def.catchall instanceof R){const l=this._def.unknownKeys;if(l==="passthrough")for(const m of c)u.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(l==="strict")c.length>0&&(p(a,{code:d.unrecognized_keys,keys:c}),s.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const m of c){const x=a.data[m];u.push({key:{status:"valid",value:m},value:l._parse(new I(a,x,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const l=[];for(const m of u){const x=await m.key,z=await m.value;l.push({key:x,value:z,alwaysSet:m.alwaysSet})}return l}).then(l=>S.mergeObjectSync(s,l)):S.mergeObjectSync(s,u)}get shape(){return this._def.shape()}strict(e){return f.errToObj,new k({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,s)=>{var a,i,o,c;const u=(o=(i=(a=this._def).errorMap)===null||i===void 0?void 0:i.call(a,n,s).message)!==null&&o!==void 0?o:s.defaultError;return n.code==="unrecognized_keys"?{message:(c=f.errToObj(e).message)!==null&&c!==void 0?c:u}:{message:u}}}:{}})}strip(){return new k({...this._def,unknownKeys:"strip"})}passthrough(){return new k({...this._def,unknownKeys:"passthrough"})}extend(e){return new k({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new k({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:g.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new k({...this._def,catchall:e})}pick(e){const n={};return b.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(n[s]=this.shape[s])}),new k({...this._def,shape:()=>n})}omit(e){const n={};return b.objectKeys(this.shape).forEach(s=>{e[s]||(n[s]=this.shape[s])}),new k({...this._def,shape:()=>n})}deepPartial(){return H(this)}partial(e){const n={};return b.objectKeys(this.shape).forEach(s=>{const a=this.shape[s];e&&!e[s]?n[s]=a:n[s]=a.optional()}),new k({...this._def,shape:()=>n})}required(e){const n={};return b.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])n[s]=this.shape[s];else{let i=this.shape[s];for(;i instanceof j;)i=i._def.innerType;n[s]=i}}),new k({...this._def,shape:()=>n})}keyof(){return Je(b.objectKeys(this.shape))}}k.create=(t,e)=>new k({shape:()=>t,unknownKeys:"strip",catchall:R.create(),typeName:g.ZodObject,...y(e)});k.strictCreate=(t,e)=>new k({shape:()=>t,unknownKeys:"strict",catchall:R.create(),typeName:g.ZodObject,...y(e)});k.lazycreate=(t,e)=>new k({shape:t,unknownKeys:"strip",catchall:R.create(),typeName:g.ZodObject,...y(e)});class ae extends v{_parse(e){const{ctx:n}=this._processInputParams(e),s=this._def.options;function a(i){for(const c of i)if(c.result.status==="valid")return c.result;for(const c of i)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;const o=i.map(c=>new T(c.ctx.common.issues));return p(n,{code:d.invalid_union,unionErrors:o}),_}if(n.common.async)return Promise.all(s.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(a);{let i;const o=[];for(const u of s){const l={...n,common:{...n.common,issues:[]},parent:null},m=u._parseSync({data:n.data,path:n.path,parent:l});if(m.status==="valid")return m;m.status==="dirty"&&!i&&(i={result:m,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const c=o.map(u=>new T(u));return p(n,{code:d.invalid_union,unionErrors:c}),_}}get options(){return this._def.options}}ae.create=(t,e)=>new ae({options:t,typeName:g.ZodUnion,...y(e)});const Z=t=>t instanceof ce?Z(t.schema):t instanceof O?Z(t.innerType()):t instanceof de?[t.value]:t instanceof U?t.options:t instanceof le?b.objectValues(t.enum):t instanceof ue?Z(t._def.innerType):t instanceof re?[void 0]:t instanceof se?[null]:t instanceof j?[void 0,...Z(t.unwrap())]:t instanceof D?[null,...Z(t.unwrap())]:t instanceof Pe||t instanceof he?Z(t.unwrap()):t instanceof pe?Z(t._def.innerType):[];class xe extends v{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==h.object)return p(n,{code:d.invalid_type,expected:h.object,received:n.parsedType}),_;const s=this.discriminator,a=n.data[s],i=this.optionsMap.get(a);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(p(n,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),_)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,s){const a=new Map;for(const i of n){const o=Z(i.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const c of o){if(a.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);a.set(c,i)}}return new xe({typeName:g.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:a,...y(s)})}}function Ae(t,e){const n=A(t),s=A(e);if(t===e)return{valid:!0,data:t};if(n===h.object&&s===h.object){const a=b.objectKeys(e),i=b.objectKeys(t).filter(c=>a.indexOf(c)!==-1),o={...t,...e};for(const c of i){const u=Ae(t[c],e[c]);if(!u.valid)return{valid:!1};o[c]=u.data}return{valid:!0,data:o}}else if(n===h.array&&s===h.array){if(t.length!==e.length)return{valid:!1};const a=[];for(let i=0;i<t.length;i++){const o=t[i],c=e[i],u=Ae(o,c);if(!u.valid)return{valid:!1};a.push(u.data)}return{valid:!0,data:a}}else return n===h.date&&s===h.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ie extends v{_parse(e){const{status:n,ctx:s}=this._processInputParams(e),a=(i,o)=>{if(Ze(i)||Ze(o))return _;const c=Ae(i.value,o.value);return c.valid?((Re(i)||Re(o))&&n.dirty(),{status:n.value,value:c.data}):(p(s,{code:d.invalid_intersection_types}),_)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([i,o])=>a(i,o)):a(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}ie.create=(t,e,n)=>new ie({left:t,right:e,typeName:g.ZodIntersection,...y(n)});class N extends v{_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.array)return p(s,{code:d.invalid_type,expected:h.array,received:s.parsedType}),_;if(s.data.length<this._def.items.length)return p(s,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_;!this._def.rest&&s.data.length>this._def.items.length&&(p(s,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...s.data].map((o,c)=>{const u=this._def.items[c]||this._def.rest;return u?u._parse(new I(s,o,s.path,c)):null}).filter(o=>!!o);return s.common.async?Promise.all(i).then(o=>S.mergeArray(n,o)):S.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new N({...this._def,rest:e})}}N.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new N({items:t,typeName:g.ZodTuple,rest:null,...y(e)})};class oe extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.object)return p(s,{code:d.invalid_type,expected:h.object,received:s.parsedType}),_;const a=[],i=this._def.keyType,o=this._def.valueType;for(const c in s.data)a.push({key:i._parse(new I(s,c,s.path,c)),value:o._parse(new I(s,s.data[c],s.path,c)),alwaysSet:c in s.data});return s.common.async?S.mergeObjectAsync(n,a):S.mergeObjectSync(n,a)}get element(){return this._def.valueType}static create(e,n,s){return n instanceof v?new oe({keyType:e,valueType:n,typeName:g.ZodRecord,...y(s)}):new oe({keyType:E.create(),valueType:e,typeName:g.ZodRecord,...y(n)})}}class be extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.map)return p(s,{code:d.invalid_type,expected:h.map,received:s.parsedType}),_;const a=this._def.keyType,i=this._def.valueType,o=[...s.data.entries()].map(([c,u],l)=>({key:a._parse(new I(s,c,s.path,[l,"key"])),value:i._parse(new I(s,u,s.path,[l,"value"]))}));if(s.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const u of o){const l=await u.key,m=await u.value;if(l.status==="aborted"||m.status==="aborted")return _;(l.status==="dirty"||m.status==="dirty")&&n.dirty(),c.set(l.value,m.value)}return{status:n.value,value:c}})}else{const c=new Map;for(const u of o){const l=u.key,m=u.value;if(l.status==="aborted"||m.status==="aborted")return _;(l.status==="dirty"||m.status==="dirty")&&n.dirty(),c.set(l.value,m.value)}return{status:n.value,value:c}}}}be.create=(t,e,n)=>new be({valueType:e,keyType:t,typeName:g.ZodMap,...y(n)});class B extends v{_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.set)return p(s,{code:d.invalid_type,expected:h.set,received:s.parsedType}),_;const a=this._def;a.minSize!==null&&s.data.size<a.minSize.value&&(p(s,{code:d.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&s.data.size>a.maxSize.value&&(p(s,{code:d.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const i=this._def.valueType;function o(u){const l=new Set;for(const m of u){if(m.status==="aborted")return _;m.status==="dirty"&&n.dirty(),l.add(m.value)}return{status:n.value,value:l}}const c=[...s.data.values()].map((u,l)=>i._parse(new I(s,u,s.path,l)));return s.common.async?Promise.all(c).then(u=>o(u)):o(c)}min(e,n){return new B({...this._def,minSize:{value:e,message:f.toString(n)}})}max(e,n){return new B({...this._def,maxSize:{value:e,message:f.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}B.create=(t,e)=>new B({valueType:t,minSize:null,maxSize:null,typeName:g.ZodSet,...y(e)});class G extends v{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==h.function)return p(n,{code:d.invalid_type,expected:h.function,received:n.parsedType}),_;function s(c,u){return ge({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,me(),F].filter(l=>!!l),issueData:{code:d.invalid_arguments,argumentsError:u}})}function a(c,u){return ge({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,me(),F].filter(l=>!!l),issueData:{code:d.invalid_return_type,returnTypeError:u}})}const i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Y){const c=this;return w(async function(...u){const l=new T([]),m=await c._def.args.parseAsync(u,i).catch(W=>{throw l.addIssue(s(u,W)),l}),x=await Reflect.apply(o,this,m);return await c._def.returns._def.type.parseAsync(x,i).catch(W=>{throw l.addIssue(a(x,W)),l})})}else{const c=this;return w(function(...u){const l=c._def.args.safeParse(u,i);if(!l.success)throw new T([s(u,l.error)]);const m=Reflect.apply(o,this,l.data),x=c._def.returns.safeParse(m,i);if(!x.success)throw new T([a(m,x.error)]);return x.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new G({...this._def,args:N.create(e).rest(V.create())})}returns(e){return new G({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,s){return new G({args:e||N.create([]).rest(V.create()),returns:n||V.create(),typeName:g.ZodFunction,...y(s)})}}class ce extends v{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ce.create=(t,e)=>new ce({getter:t,typeName:g.ZodLazy,...y(e)});class de extends v{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return p(n,{received:n.data,code:d.invalid_literal,expected:this._def.value}),_}return{status:"valid",value:e.data}}get value(){return this._def.value}}de.create=(t,e)=>new de({value:t,typeName:g.ZodLiteral,...y(e)});function Je(t,e){return new U({values:t,typeName:g.ZodEnum,...y(e)})}class U extends v{constructor(){super(...arguments),Q.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),s=this._def.values;return p(n,{expected:b.joinValues(s),received:n.parsedType,code:d.invalid_type}),_}if(_e(this,Q)||Ge(this,Q,new Set(this._def.values)),!_e(this,Q).has(e.data)){const n=this._getOrReturnCtx(e),s=this._def.values;return p(n,{received:n.data,code:d.invalid_enum_value,options:s}),_}return w(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return U.create(e,{...this._def,...n})}exclude(e,n=this._def){return U.create(this.options.filter(s=>!e.includes(s)),{...this._def,...n})}}Q=new WeakMap;U.create=Je;class le extends v{constructor(){super(...arguments),X.set(this,void 0)}_parse(e){const n=b.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==h.string&&s.parsedType!==h.number){const a=b.objectValues(n);return p(s,{expected:b.joinValues(a),received:s.parsedType,code:d.invalid_type}),_}if(_e(this,X)||Ge(this,X,new Set(b.getValidEnumValues(this._def.values))),!_e(this,X).has(e.data)){const a=b.objectValues(n);return p(s,{received:s.data,code:d.invalid_enum_value,options:a}),_}return w(e.data)}get enum(){return this._def.values}}X=new WeakMap;le.create=(t,e)=>new le({values:t,typeName:g.ZodNativeEnum,...y(e)});class Y extends v{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==h.promise&&n.common.async===!1)return p(n,{code:d.invalid_type,expected:h.promise,received:n.parsedType}),_;const s=n.parsedType===h.promise?n.data:Promise.resolve(n.data);return w(s.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Y.create=(t,e)=>new Y({type:t,typeName:g.ZodPromise,...y(e)});class O extends v{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===g.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:s}=this._processInputParams(e),a=this._def.effect||null,i={addIssue:o=>{p(s,o),o.fatal?n.abort():n.dirty()},get path(){return s.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const o=a.transform(s.data,i);if(s.common.async)return Promise.resolve(o).then(async c=>{if(n.value==="aborted")return _;const u=await this._def.schema._parseAsync({data:c,path:s.path,parent:s});return u.status==="aborted"?_:u.status==="dirty"||n.value==="dirty"?q(u.value):u});{if(n.value==="aborted")return _;const c=this._def.schema._parseSync({data:o,path:s.path,parent:s});return c.status==="aborted"?_:c.status==="dirty"||n.value==="dirty"?q(c.value):c}}if(a.type==="refinement"){const o=c=>{const u=a.refinement(c,i);if(s.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(s.common.async===!1){const c=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return c.status==="aborted"?_:(c.status==="dirty"&&n.dirty(),o(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(c=>c.status==="aborted"?_:(c.status==="dirty"&&n.dirty(),o(c.value).then(()=>({status:n.value,value:c.value}))))}if(a.type==="transform")if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!ee(o))return o;const c=a.transform(o.value,i);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>ee(o)?Promise.resolve(a.transform(o.value,i)).then(c=>({status:n.value,value:c})):o);b.assertNever(a)}}O.create=(t,e,n)=>new O({schema:t,typeName:g.ZodEffects,effect:e,...y(n)});O.createWithPreprocess=(t,e,n)=>new O({schema:e,effect:{type:"preprocess",transform:t},typeName:g.ZodEffects,...y(n)});class j extends v{_parse(e){return this._getType(e)===h.undefined?w(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}j.create=(t,e)=>new j({innerType:t,typeName:g.ZodOptional,...y(e)});class D extends v{_parse(e){return this._getType(e)===h.null?w(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}D.create=(t,e)=>new D({innerType:t,typeName:g.ZodNullable,...y(e)});class ue extends v{_parse(e){const{ctx:n}=this._processInputParams(e);let s=n.data;return n.parsedType===h.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ue.create=(t,e)=>new ue({innerType:t,typeName:g.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class pe extends v{_parse(e){const{ctx:n}=this._processInputParams(e),s={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return te(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new T(s.common.issues)},input:s.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}pe.create=(t,e)=>new pe({innerType:t,typeName:g.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class ke extends v{_parse(e){if(this._getType(e)!==h.nan){const s=this._getOrReturnCtx(e);return p(s,{code:d.invalid_type,expected:h.nan,received:s.parsedType}),_}return{status:"valid",value:e.data}}}ke.create=t=>new ke({typeName:g.ZodNaN,...y(t)});const nn=Symbol("zod_brand");class Pe extends v{_parse(e){const{ctx:n}=this._processInputParams(e),s=n.data;return this._def.type._parse({data:s,path:n.path,parent:n})}unwrap(){return this._def.type}}class fe extends v{_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return i.status==="aborted"?_:i.status==="dirty"?(n.dirty(),q(i.value)):this._def.out._parseAsync({data:i.value,path:s.path,parent:s})})();{const a=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?_:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:s.path,parent:s})}}static create(e,n){return new fe({in:e,out:n,typeName:g.ZodPipeline})}}class he extends v{_parse(e){const n=this._def.innerType._parse(e),s=a=>(ee(a)&&(a.value=Object.freeze(a.value)),a);return te(n)?n.then(a=>s(a)):s(n)}unwrap(){return this._def.innerType}}he.create=(t,e)=>new he({innerType:t,typeName:g.ZodReadonly,...y(e)});function Qe(t,e={},n){return t?K.create().superRefine((s,a)=>{var i,o;if(!t(s)){const c=typeof e=="function"?e(s):typeof e=="string"?{message:e}:e,u=(o=(i=c.fatal)!==null&&i!==void 0?i:n)!==null&&o!==void 0?o:!0,l=typeof c=="string"?{message:c}:c;a.addIssue({code:"custom",...l,fatal:u})}}):K.create()}const rn={object:k.lazycreate};var g;(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"})(g||(g={}));const sn=(t,e={message:`Input not instance of ${t.name}`})=>Qe(n=>n instanceof t,e),Xe=E.create,et=P.create,an=ke.create,on=M.create,tt=ne.create,cn=L.create,dn=ye.create,ln=re.create,un=se.create,pn=K.create,hn=V.create,fn=R.create,mn=ve.create,gn=C.create,_n=k.create,yn=k.strictCreate,vn=ae.create,bn=xe.create,kn=ie.create,xn=N.create,Sn=oe.create,wn=be.create,Tn=B.create,En=G.create,Cn=ce.create,On=de.create,jn=U.create,In=le.create,Nn=Y.create,He=O.create,Zn=j.create,Rn=D.create,An=O.createWithPreprocess,Pn=fe.create,Mn=()=>Xe().optional(),Un=()=>et().optional(),Dn=()=>tt().optional(),$n={string:t=>E.create({...t,coerce:!0}),number:t=>P.create({...t,coerce:!0}),boolean:t=>ne.create({...t,coerce:!0}),bigint:t=>M.create({...t,coerce:!0}),date:t=>L.create({...t,coerce:!0})},Vn=_;var r=Object.freeze({__proto__:null,defaultErrorMap:F,setErrorMap:$t,getErrorMap:me,makeIssue:ge,EMPTY_PATH:Vt,addIssueToContext:p,ParseStatus:S,INVALID:_,DIRTY:q,OK:w,isAborted:Ze,isDirty:Re,isValid:ee,isAsync:te,get util(){return b},get objectUtil(){return Ne},ZodParsedType:h,getParsedType:A,ZodType:v,datetimeRegex:Ye,ZodString:E,ZodNumber:P,ZodBigInt:M,ZodBoolean:ne,ZodDate:L,ZodSymbol:ye,ZodUndefined:re,ZodNull:se,ZodAny:K,ZodUnknown:V,ZodNever:R,ZodVoid:ve,ZodArray:C,ZodObject:k,ZodUnion:ae,ZodDiscriminatedUnion:xe,ZodIntersection:ie,ZodTuple:N,ZodRecord:oe,ZodMap:be,ZodSet:B,ZodFunction:G,ZodLazy:ce,ZodLiteral:de,ZodEnum:U,ZodNativeEnum:le,ZodPromise:Y,ZodEffects:O,ZodTransformer:O,ZodOptional:j,ZodNullable:D,ZodDefault:ue,ZodCatch:pe,ZodNaN:ke,BRAND:nn,ZodBranded:Pe,ZodPipeline:fe,ZodReadonly:he,custom:Qe,Schema:v,ZodSchema:v,late:rn,get ZodFirstPartyTypeKind(){return g},coerce:$n,any:pn,array:gn,bigint:on,boolean:tt,date:cn,discriminatedUnion:bn,effect:He,enum:jn,function:En,instanceof:sn,intersection:kn,lazy:Cn,literal:On,map:wn,nan:an,nativeEnum:In,never:fn,null:un,nullable:Rn,number:et,object:_n,oboolean:Dn,onumber:Un,optional:Zn,ostring:Mn,pipeline:Pn,preprocess:An,promise:Nn,record:Sn,set:Tn,strictObject:yn,string:Xe,symbol:dn,transformer:He,tuple:xn,undefined:ln,union:vn,unknown:hn,void:mn,NEVER:Vn,ZodIssueCode:d,quotelessJson:Dt,ZodError:T});Ut(r);const Ln=r.object({start:r.number(),limit:r.number(),length:r.number()}),Me=r.object({created_at:r.string(),updated_at:r.string()}),nt=r.object({email:r.string().optional(),email_verified:r.boolean().optional(),name:r.string().optional(),username:r.string().optional(),given_name:r.string().optional(),phone_number:r.string().optional(),phone_verified:r.boolean().optional(),family_name:r.string().optional()}).catchall(r.any()),rt=r.object({connection:r.string(),user_id:r.string(),provider:r.string(),isSocial:r.boolean(),access_token:r.string().optional(),access_token_secret:r.string().optional(),refresh_token:r.string().optional(),profileData:nt.optional()}),Ue=r.object({email:r.string().optional(),username:r.string().optional(),given_name:r.string().optional(),family_name:r.string().optional(),nickname:r.string().optional(),name:r.string().optional(),picture:r.string().optional(),locale:r.string().optional(),linked_to:r.string().optional(),profileData:r.string().optional(),user_id:r.string().optional(),app_metadata:r.any().default({}).optional(),user_metadata:r.any().default({}).optional()}),st=Ue.extend({email_verified:r.boolean().default(!1),verify_email:r.boolean().optional(),last_ip:r.string().optional(),last_login:r.string().optional(),user_id:r.string().optional(),provider:r.string().default("email"),connection:r.string().default("email")}),at=r.object({...st.shape,...Me.shape,user_id:r.string(),email:r.string(),is_social:r.boolean(),login_count:r.number(),identities:r.array(rt).optional()}),Bn=at,zn=Ue.extend({email:r.string(),login_count:r.number(),multifactor:r.array(r.string()).optional(),last_ip:r.string().optional(),last_login:r.string().optional(),user_id:r.string()}).catchall(r.any()),Wn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Hn=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;)e+=Wn[n[t]&63];return e};const it=r.object({audience:r.string().optional(),recipient:r.string().optional(),createUpnClaim:r.boolean().optional(),mapUnknownClaimsAsIs:r.boolean().optional(),passthroughClaimsWithNoMapping:r.boolean().optional(),mapIdentities:r.boolean().optional(),signatureAlgorithm:r.string().optional(),digestAlgorithm:r.string().optional(),issuer:r.string().optional(),destination:r.string().optional(),lifetimeInSeconds:r.number().optional(),signResponse:r.boolean().optional(),nameIdentifierFormat:r.string().optional(),nameIdentifierProbes:r.array(r.string()).optional(),authnContextClassRef:r.string().optional(),mappings:r.record(r.string()).optional()}),ot=r.object({id:r.string(),name:r.string(),callbacks:r.array(r.string()).default([]).optional().openapi({description:"Comma-separated list of URLs whitelisted to use as a callback to the client after authentication."}),allowed_origins:r.array(r.string()).default([]).optional().openapi({description:"Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level. Query strings and hash information are not taken into account when validating these URLs."}),web_origins:r.array(r.string()).default([]).optional().openapi({description:"Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode."}),allowed_logout_urls:r.array(r.string()).default([]).optional().openapi({description:"Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains."}),allowed_clients:r.array(r.string()).default([]).optional().openapi({description:"Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients"}),addons:r.object({samlp:it.optional()}).default({}).optional().openapi({description:"Addons associated with the client. The key is the addon's package name and the value is an object with the configuration for the addon."}),email_validation:r.enum(["enabled","disabled","enforced"]).default("enforced").optional().openapi({description:"Defines if it possible to sign in with an unverified email and if verification emails will be sent. This is not available in auth0"}),client_secret:r.string().default(()=>Hn()).optional(),disable_sign_ups:r.boolean().optional().default(!1).openapi({description:"Prevents users from signing up using the hosted login page. This is not available in auth0"})}),ct=r.object({created_at:r.string().transform(t=>t===null?"":t),updated_at:r.string().transform(t=>t===null?"":t),...ot.shape});var De=(t=>(t.TOKEN="token",t.TOKEN_ID_TOKEN="token id_token",t.CODE="code",t))(De||{}),$e=(t=>(t.QUERY="query",t.FRAGMENT="fragment",t.FORM_POST="form_post",t.WEB_MESSAGE="web_message",t.SAML_POST="saml_post",t))($e||{}),dt=(t=>(t.S265="S256",t.plain="plain",t))(dt||{});const lt=r.object({client_id:r.string(),vendor_id:r.string().optional(),act_as:r.string().optional(),response_type:r.nativeEnum(De).optional(),response_mode:r.nativeEnum($e).optional(),redirect_uri:r.string().optional(),audience:r.string().optional(),state:r.string().optional(),nonce:r.string().optional(),scope:r.string().optional(),prompt:r.string().optional(),code_challenge_method:r.enum(["plain","S256"]).optional(),code_challenge:r.string().optional(),username:r.string().optional(),ui_locales:r.string().optional()}),qn=r.object({colors:r.object({primary:r.string(),page_background:r.object({type:r.string().optional(),start:r.string().optional(),end:r.string().optional(),angle_deg:r.number().optional()}).optional()}).optional(),logo_url:r.string().optional(),favicon_url:r.string().optional(),font:r.object({url:r.string()}).optional()}),ut=r.object({id:r.string().optional(),name:r.string(),strategy:r.enum(["google-oauth2","facebook","vipps","freja","apple","email","auth0","authhero","Username-Password-Authentication","oidc","oauth2","custom"]),options:r.object({kid:r.string().optional(),team_id:r.string().optional(),realms:r.string().optional(),client_id:r.string().optional(),client_secret:r.string().optional(),app_secret:r.string().optional(),scope:r.string().optional(),authorization_endpoint:r.string().default("").optional(),token_endpoint:r.string().default("").optional(),userinfo_endpoint:r.string().default("").optional(),jwks_uri:r.string().default("").optional(),discovery_url:r.string().default("").optional(),issuer:r.string().default("").optional()}).default({}).optional(),enabled_clients:r.array(r.string()).default([]).optional(),response_type:r.custom().optional(),response_mode:r.custom().optional()}),pt=r.object({id:r.string(),created_at:r.string().transform(t=>t===null?"":t),updated_at:r.string().transform(t=>t===null?"":t)}).extend(ut.shape),ht=r.object({name:r.string(),audience:r.string(),sender_email:r.string().email(),sender_name:r.string(),support_url:r.string().url().optional(),logo:r.string().url().optional(),primary_color:r.string().optional(),secondary_color:r.string().optional(),language:r.string().optional()}),ft=r.object({created_at:r.string().transform(t=>t===null?"":t),updated_at:r.string().transform(t=>t===null?"":t),id:r.string(),...ht.shape}),Gn=r.object({logoUrl:r.string(),loginBackgroundImage:r.string().nullish(),style:r.object({primaryColor:r.string(),buttonTextColor:r.string(),primaryHoverColor:r.string()}),supportEmail:r.string().nullable(),supportUrl:r.string().nullable(),name:r.string(),showGreyishBackground:r.boolean().optional(),termsAndConditionsUrl:r.string().nullable(),companyName:r.string().optional(),checkoutHideSocial:r.boolean().optional(),siteUrl:r.string().nullable(),manageSubscriptionsUrl:r.string().optional()}),Fn=r.object({domain:r.string(),dkim_private_key:r.string().optional(),dkim_public_key:r.string().optional(),email_api_key:r.string().optional(),email_service:r.union([r.literal("mailgun"),r.literal("mailchannels")]).optional()});r.object({...ct.shape,domains:r.array(Fn),tenant:ft,connections:r.array(pt)});const mt=r.enum(["password_reset","email_verification","otp","authorization_code","oauth2_state","ticket"]),gt=r.object({code_id:r.string().openapi({description:"The code that will be used in for instance an email verification flow"}),login_id:r.string().openapi({description:"The id of the login session that the code is connected to"}),connection_id:r.string().optional().openapi({description:"The connection that the code is connected to"}),code_type:mt,expires_at:r.string(),used_at:r.string().optional(),user_id:r.string().optional()}),Kn=r.object({...gt.shape,created_at:r.string()}),_t=r.object({domain:r.string(),dkim_private_key:r.string().optional(),dkim_public_key:r.string().optional(),email_api_key:r.string().optional(),email_service:r.enum(["mailgun","mailchannels"])}),Yn=Me.extend({..._t.shape,id:r.string()}),yt=r.object({trigger_id:r.enum(["pre-user-signup","post-user-registration","post-user-login"]),enabled:r.boolean().default(!1),url:r.string(),hook_id:r.string().optional(),synchronous:r.boolean().default(!1),priority:r.number().optional()}),Jn=yt.extend({...Me.shape,hook_id:r.string()}),vt=r.object({alg:r.enum(["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512"]),e:r.string(),kid:r.string(),kty:r.enum(["RSA","EC","oct"]),n:r.string(),x5t:r.string().optional(),x5c:r.array(r.string()).optional(),use:r.enum(["sig","enc"]).optional()}),Qn=r.object({keys:r.array(vt)}),Xn=r.object({issuer:r.string(),authorization_endpoint:r.string(),token_endpoint:r.string(),device_authorization_endpoint:r.string(),userinfo_endpoint:r.string(),mfa_challenge_endpoint:r.string(),jwks_uri:r.string(),registration_endpoint:r.string(),revocation_endpoint:r.string(),scopes_supported:r.array(r.string()),response_types_supported:r.array(r.string()),code_challenge_methods_supported:r.array(r.string()),response_modes_supported:r.array(r.string()),subject_types_supported:r.array(r.string()),id_token_signing_alg_values_supported:r.array(r.string()),token_endpoint_auth_methods_supported:r.array(r.string()),claims_supported:r.array(r.string()),request_uri_parameter_supported:r.boolean(),request_parameter_supported:r.boolean(),token_endpoint_auth_signing_alg_values_supported:r.array(r.string())}),bt=r.object({auth0Client:r.string().optional(),authParams:lt,expires_at:r.string(),deleted_at:r.string().optional(),ip:r.string().optional(),useragent:r.string().optional()}).openapi({description:"This represents a login sesion"}),er=r.object({...bt.shape,login_id:r.string().openapi({description:"This is is used as the state in the universal login"}),created_at:r.string(),updated_at:r.string()});var kt=(t=>(t.FAILED_SILENT_AUTH="fsa",t.FAILED_SIGNUP="fs",t.FAILED_LOGIN="f",t.FAILED_LOGIN_INCORRECT_PASSWORD="fp",t.FAILED_CHANGE_PASSWORD="fcp",t.FAILED_BY_CONNECTOR="fc",t.FAILED_LOGIN_INVALID_EMAIL_USERNAME="fu",t.FAILED_HOOK="fh",t.FAILED_CROSS_ORIGIN_AUTHENTICATION="fcoa",t.SUCCESS_API_OPERATION="sapi",t.SUCCESS_CHANGE_PASSWORD="scp",t.SUCCESS_CHANGE_PASSWORD_REQUEST="scpr",t.SUCCESS_CHANGE_USERNAME="scu",t.SUCCESS_CROSS_ORIGIN_AUTHENTICATION="scoa",t.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN="seacft",t.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN="serft",t.SUCCESS_LOGIN="s",t.SUCCESS_LOGOUT="slo",t.SUCCESS_SIGNUP="ss",t.SUCCESS_SILENT_AUTH="ssa",t.SUCCESS_VERIFICATION_EMAIL="sv",t.SUCCESS_VERIFICATION_EMAIL_REQUEST="svr",t.CODE_LINK_SENT="cls",t))(kt||{});const tr=r.enum(["cls","fsa","fs","f","fc","fcoa","fcp","fh","fp","fs","fu","s","sapi","scoa","scp","scpr","scu","seacft","serft","slo","ss","ssa","sv","svr"]),xt=r.object({name:r.string(),version:r.string(),env:r.object({node:r.string().optional()}).optional()}),nr=r.object({type:tr,date:r.string(),description:r.string().optional(),log_id:r.string().optional(),_id:r.string().optional(),ip:r.string(),user_agent:r.string(),details:r.any().optional(),isMobile:r.boolean(),user_id:r.string().optional(),user_name:r.string().optional(),connection:r.string().optional(),connection_id:r.string().optional(),client_id:r.string().optional(),client_name:r.string().optional(),audience:r.string().optional(),scope:r.array(r.string()).optional(),strategy:r.string().optional(),strategy_type:r.string().optional(),hostname:r.string().optional(),auth0_client:xt.optional()}),St=r.object({user_id:r.string(),password:r.string(),algorithm:r.enum(["bcrypt","argon2id"]).default("argon2id")}),rr=r.object({...St.shape,created_at:r.string(),updated_at:r.string()}),wt=r.object({session_id:r.string(),client_id:r.string(),expires_at:r.string(),used_at:r.string(),deleted_at:r.string().optional(),user_id:r.string()}),sr=r.object({created_at:r.string(),...wt.shape}),ar=r.object({kid:r.string().openapi({description:"The key id of the signing key"}),cert:r.string().openapi({description:"The public certificate of the signing key"}),fingerprint:r.string().openapi({description:"The cert fingerprint"}),thumbprint:r.string().openapi({description:"The cert thumbprint"}),pkcs7:r.string().optional().openapi({description:"The private key in pkcs7 format"}),current:r.boolean().optional().openapi({description:"True if the key is the current key"}),next:r.boolean().optional().openapi({description:"True if the key is the next key"}),previous:r.boolean().optional().openapi({description:"True if the key is the previous key"}),current_since:r.string().optional().openapi({description:"The date and time when the key became the current key"}),current_until:r.string().optional().openapi({description:"The date and time when the current key was rotated"}),revoked:r.boolean().optional().openapi({description:"True if the key is revoked"}),revoked_at:r.string().optional().openapi({description:"The date and time when the key was revoked"})});var Tt=(t=>(t.RefreshToken="refresh_token",t.AuthorizationCode="authorization_code",t.ClientCredential="client_credentials",t.Passwordless="passwordless",t.Password="password",t))(Tt||{});r.object({access_token:r.string(),id_token:r.string().optional(),scope:r.string().optional(),state:r.string().optional(),refresh_token:r.string().optional(),token_type:r.string(),expires_in:r.number()});r.object({code:r.string(),state:r.string().optional()});const Et=r.object({button_border_radius:r.number(),button_border_weight:r.number(),buttons_style:r.enum(["pill"]),input_border_radius:r.number(),input_border_weight:r.number(),inputs_style:r.enum(["pill"]),show_widget_shadow:r.boolean(),widget_border_weight:r.number(),widget_corner_radius:r.number()}),Ct=r.object({base_focus_color:r.string(),base_hover_color:r.string(),body_text:r.string(),captcha_widget_theme:r.enum(["auto"]),error:r.string(),header:r.string(),icons:r.string(),input_background:r.string(),input_border:r.string(),input_filled_text:r.string(),input_labels_placeholders:r.string(),links_focused_components:r.string(),primary_button:r.string(),primary_button_label:r.string(),secondary_button_border:r.string(),secondary_button_label:r.string(),success:r.string(),widget_background:r.string(),widget_border:r.string()}),$=r.object({bold:r.boolean(),size:r.number()}),Ot=r.object({body_text:$,buttons_text:$,font_url:r.string(),input_labels:$,links:$,links_style:r.enum(["normal"]),reference_text_size:r.number(),subtitle:$,title:$}),jt=r.object({background_color:r.string(),background_image_url:r.string(),page_layout:r.enum(["center"])}),It=r.object({header_text_alignment:r.enum(["center"]),logo_height:r.number(),logo_position:r.enum(["center"]),logo_url:r.string(),social_buttons_layout:r.enum(["bottom"])}),Nt=r.object({borders:Et,colors:Ct,displayName:r.string(),fonts:Ot,page_background:jt,widget:It}),ir=Nt.extend({themeId:r.string()}),or=r.object({universal_login_experience:r.enum(["new","classic"]).default("new"),identifier_first:r.boolean().default(!0),password_first:r.boolean().default(!1),webauthn_platform_first_factor:r.boolean()}),cr=r.object({name:r.string(),enabled:r.boolean().optional().default(!0),default_from_address:r.string().optional(),credentials:r.union([r.object({accessKeyId:r.string(),secretAccessKey:r.string(),region:r.string()}),r.object({smtp_host:r.array(r.string()),smtp_port:r.number(),smtp_user:r.string(),smtp_pass:r.string()}),r.object({api_key:r.string(),domain:r.string().optional()}),r.object({connectionString:r.string()}),r.object({tenantId:r.string(),clientId:r.string(),clientSecret:r.string()})]),settings:r.object({}).optional()});function dr(t){const[e,n]=t.split("|");if(!e||!n)throw new Error(`Invalid user_id: ${t}`);return{connection:e,id:n}}exports.Auth0Client=xt;exports.AuthorizationResponseMode=$e;exports.AuthorizationResponseType=De;exports.CodeChallengeMethod=dt;exports.GrantType=Tt;exports.LogTypes=kt;exports.applicationInsertSchema=ot;exports.applicationSchema=ct;exports.auth0UserResponseSchema=Bn;exports.authParamsSchema=lt;exports.baseUserSchema=Ue;exports.bordersSchema=Et;exports.brandingSchema=qn;exports.codeInsertSchema=gt;exports.codeSchema=Kn;exports.codeTypeSchema=mt;exports.colorsSchema=Ct;exports.connectionInsertSchema=ut;exports.connectionSchema=pt;exports.domainInsertSchema=_t;exports.domainSchema=Yn;exports.emailProviderSchema=cr;exports.fontDetailsSchema=$;exports.fontsSchema=Ot;exports.hookInsertSchema=yt;exports.hookSchema=Jn;exports.identitySchema=rt;exports.jwksKeySchema=Qn;exports.jwksSchema=vt;exports.logSchema=nr;exports.loginInsertSchema=bt;exports.loginSchema=er;exports.openIDConfigurationSchema=Xn;exports.pageBackgroundSchema=jt;exports.parseUserId=dr;exports.passwordInsertSchema=St;exports.passwordSchema=rr;exports.profileDataSchema=nt;exports.promptSettingSchema=or;exports.samlpAddon=it;exports.sessionInsertSchema=wt;exports.sessionSchema=sr;exports.signingKeySchema=ar;exports.tenantInsertSchema=ht;exports.tenantSchema=ft;exports.themeInsertSchema=Nt;exports.themeSchema=ir;exports.totalsSchema=Ln;exports.userInsertSchema=st;exports.userResponseSchema=zn;exports.userSchema=at;exports.vendorSettingsSchema=Gn;exports.widgetSchema=It;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function Pt(t,e){var n={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(t);a<s.length;a++)e.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(t,s[a])&&(n[s[a]]=t[s[a]]);return n}function Mt(t,e){var n;return((n=t==null?void 0:t._def)===null||n===void 0?void 0:n.typeName)===e}function J(t,e){const n=t.ZodType.prototype[e];t.ZodType.prototype[e]=function(...s){const a=n.apply(this,s);return a._def.openapi=this._def.openapi,a}}function Ut(t){if(typeof t.ZodType.prototype.openapi<"u")return;t.ZodType.prototype.openapi=function(a,i){var o,c,u,l,m,x;const z=typeof a=="string"?i:a,W=z??{},{param:Le}=W,Zt=Pt(W,["param"]),Be=Object.assign(Object.assign({},(o=this._def.openapi)===null||o===void 0?void 0:o._internal),typeof a=="string"?{refId:a}:void 0),ze=Object.assign(Object.assign(Object.assign({},(c=this._def.openapi)===null||c===void 0?void 0:c.metadata),Zt),!((l=(u=this._def.openapi)===null||u===void 0?void 0:u.metadata)===null||l===void 0)&&l.param||Le?{param:Object.assign(Object.assign({},(x=(m=this._def.openapi)===null||m===void 0?void 0:m.metadata)===null||x===void 0?void 0:x.param),Le)}:void 0),We=new this.constructor(Object.assign(Object.assign({},this._def),{openapi:Object.assign(Object.assign({},Object.keys(Be).length>0?{_internal:Be}:void 0),Object.keys(ze).length>0?{metadata:ze}:void 0)}));if(Mt(this,"ZodObject")){const Rt=this.extend;We.extend=function(...At){var Se,we,Te,Ee,Ce,Oe;const je=Rt.apply(this,At);return je._def.openapi={_internal:{extendedFrom:!((we=(Se=this._def.openapi)===null||Se===void 0?void 0:Se._internal)===null||we===void 0)&&we.refId?{refId:(Ee=(Te=this._def.openapi)===null||Te===void 0?void 0:Te._internal)===null||Ee===void 0?void 0:Ee.refId,schema:this}:(Ce=this._def.openapi)===null||Ce===void 0?void 0:Ce._internal.extendedFrom},metadata:(Oe=je._def.openapi)===null||Oe===void 0?void 0:Oe.metadata},je}}return We},J(t,"optional"),J(t,"nullable"),J(t,"default"),J(t,"transform"),J(t,"refine");const e=t.ZodObject.prototype.deepPartial;t.ZodObject.prototype.deepPartial=function(){const a=this._def.shape(),i=e.apply(this),o=i._def.shape();return Object.entries(o).forEach(([c,u])=>{var l,m;u._def.openapi=(m=(l=a[c])===null||l===void 0?void 0:l._def)===null||m===void 0?void 0:m.openapi}),i._def.openapi=void 0,i};const n=t.ZodObject.prototype.pick;t.ZodObject.prototype.pick=function(...a){const i=n.apply(this,a);return i._def.openapi=void 0,i};const s=t.ZodObject.prototype.omit;t.ZodObject.prototype.omit=function(...a){const i=s.apply(this,a);return i._def.openapi=void 0,i}}new Set(".\\+*[^]$()");var b;(function(t){t.assertEqual=a=>a;function e(a){}t.assertIs=e;function n(a){throw new Error}t.assertNever=n,t.arrayToEnum=a=>{const i={};for(const o of a)i[o]=o;return i},t.getValidEnumValues=a=>{const i=t.objectKeys(a).filter(c=>typeof a[a[c]]!="number"),o={};for(const c of i)o[c]=a[c];return t.objectValues(o)},t.objectValues=a=>t.objectKeys(a).map(function(i){return a[i]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&i.push(o);return i},t.find=(a,i)=>{for(const o of a)if(i(o))return o},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function s(a,i=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=s,t.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(b||(b={}));var Ne;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Ne||(Ne={}));const h=b.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),A=t=>{switch(typeof t){case"undefined":return h.undefined;case"string":return h.string;case"number":return isNaN(t)?h.nan:h.number;case"boolean":return h.boolean;case"function":return h.function;case"bigint":return h.bigint;case"symbol":return h.symbol;case"object":return Array.isArray(t)?h.array:t===null?h.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?h.promise:typeof Map<"u"&&t instanceof Map?h.map:typeof Set<"u"&&t instanceof Set?h.set:typeof Date<"u"&&t instanceof Date?h.date:h.object;default:return h.unknown}},d=b.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"]),Dt=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class T extends Error{constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(i){return i.message},s={_errors:[]},a=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)s._errors.push(n(o));else{let c=s,u=0;for(;u<o.path.length;){const l=o.path[u];u===o.path.length-1?(c[l]=c[l]||{_errors:[]},c[l]._errors.push(n(o))):c[l]=c[l]||{_errors:[]},c=c[l],u++}}};return a(this),s}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,b.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},s=[];for(const a of this.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(e(a))):s.push(e(a));return{formErrors:s,fieldErrors:n}}get formErrors(){return this.flatten()}}T.create=t=>new T(t);const F=(t,e)=>{let n;switch(t.code){case d.invalid_type:t.received===h.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case d.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,b.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:n=`Unrecognized key(s) in object: ${b.joinValues(t.keys,", ")}`;break;case d.invalid_union:n="Invalid input";break;case d.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${b.joinValues(t.options)}`;break;case d.invalid_enum_value:n=`Invalid enum value. Expected ${b.joinValues(t.options)}, received '${t.received}'`;break;case d.invalid_arguments:n="Invalid function arguments";break;case d.invalid_return_type:n="Invalid function return type";break;case d.invalid_date:n="Invalid date";break;case d.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:b.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case d.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case d.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case d.custom:n="Invalid input";break;case d.invalid_intersection_types:n="Intersection results could not be merged";break;case d.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case d.not_finite:n="Number must be finite";break;default:n=e.defaultError,b.assertNever(t)}return{message:n}};let Ge=F;function $t(t){Ge=t}function me(){return Ge}const ge=t=>{const{data:e,path:n,errorMaps:s,issueData:a}=t,i=[...n,...a.path||[]],o={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let c="";const u=s.filter(l=>!!l).slice().reverse();for(const l of u)c=l(o,{data:e,defaultError:c}).message;return{...a,path:i,message:c}},Vt=[];function p(t,e){const n=me(),s=ge({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===F?void 0:F].filter(a=>!!a)});t.common.issues.push(s)}class S{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const s=[];for(const a of n){if(a.status==="aborted")return _;a.status==="dirty"&&e.dirty(),s.push(a.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,n){const s=[];for(const a of n){const i=await a.key,o=await a.value;s.push({key:i,value:o})}return S.mergeObjectSync(e,s)}static mergeObjectSync(e,n){const s={};for(const a of n){const{key:i,value:o}=a;if(i.status==="aborted"||o.status==="aborted")return _;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(s[i.value]=o.value)}return{status:e.value,value:s}}}const _=Object.freeze({status:"aborted"}),q=t=>({status:"dirty",value:t}),w=t=>({status:"valid",value:t}),Ze=t=>t.status==="aborted",Re=t=>t.status==="dirty",ee=t=>t.status==="valid",te=t=>typeof Promise<"u"&&t instanceof Promise;function _e(t,e,n,s){if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Fe(t,e,n,s,a){if(typeof e=="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var f;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(f||(f={}));var Q,X;class I{constructor(e,n,s,a){this._cachedPath=[],this.parent=e,this.data=n,this._path=s,this._key=a}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}}const He=(t,e)=>{if(ee(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;const n=new T(t.common.issues);return this._error=n,this._error}}};function y(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:s,description:a}=t;if(e&&(n||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(o,c)=>{var u,l;const{message:m}=t;return o.code==="invalid_enum_value"?{message:m??c.defaultError}:typeof c.data>"u"?{message:(u=m??s)!==null&&u!==void 0?u:c.defaultError}:o.code!=="invalid_type"?{message:c.defaultError}:{message:(l=m??n)!==null&&l!==void 0?l:c.defaultError}},description:a}}class v{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 A(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:A(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new S,ctx:{common:e.parent.common,data:e.data,parsedType:A(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(te(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const s=this.safeParse(e,n);if(s.success)return s.data;throw s.error}safeParse(e,n){var s;const a={common:{issues:[],async:(s=n==null?void 0:n.async)!==null&&s!==void 0?s:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:A(e)},i=this._parseSync({data:e,path:a.path,parent:a});return He(a,i)}async parseAsync(e,n){const s=await this.safeParseAsync(e,n);if(s.success)return s.data;throw s.error}async safeParseAsync(e,n){const s={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:A(e)},a=this._parse({data:e,path:s.path,parent:s}),i=await(te(a)?a:Promise.resolve(a));return He(s,i)}refine(e,n){const s=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,i)=>{const o=e(a),c=()=>i.addIssue({code:d.custom,...s(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(c(),!1)):o?!0:(c(),!1)})}refinement(e,n){return this._refinement((s,a)=>e(s)?!0:(a.addIssue(typeof n=="function"?n(s,a):n),!1))}_refinement(e){return new O({schema:this,typeName:g.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return j.create(this,this._def)}nullable(){return D.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return C.create(this,this._def)}promise(){return Y.create(this,this._def)}or(e){return ae.create([this,e],this._def)}and(e){return ie.create(this,e,this._def)}transform(e){return new O({...y(this._def),schema:this,typeName:g.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new ue({...y(this._def),innerType:this,defaultValue:n,typeName:g.ZodDefault})}brand(){return new Pe({typeName:g.ZodBranded,type:this,...y(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new pe({...y(this._def),innerType:this,catchValue:n,typeName:g.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return fe.create(this,e)}readonly(){return he.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Lt=/^c[^\s-]{8,}$/i,Bt=/^[0-9a-z]+$/,zt=/^[0-9A-HJKMNP-TV-Z]{26}$/,Wt=/^[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,Ht=/^[a-z0-9_-]{21}$/i,qt=/^[-+]?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)?)??$/,Gt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ft="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ie;const Kt=/^(?:(?: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])$/,Yt=/^(([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})))$/,Jt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ke="((\\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])))",Qt=new RegExp(`^${Ke}$`);function Ye(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 Xt(t){return new RegExp(`^${Ye(t)}$`)}function Je(t){let e=`${Ke}T${Ye(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function en(t,e){return!!((e==="v4"||!e)&&Kt.test(t)||(e==="v6"||!e)&&Yt.test(t))}class E extends v{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==h.string){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_type,expected:h.string,received:i.parsedType}),_}const s=new S;let a;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),p(a,{code:d.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),s.dirty());else if(i.kind==="max")e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),p(a,{code:d.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),s.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,c=e.data.length<i.value;(o||c)&&(a=this._getOrReturnCtx(e,a),o?p(a,{code:d.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&p(a,{code:d.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),s.dirty())}else if(i.kind==="email")Gt.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"email",code:d.invalid_string,message:i.message}),s.dirty());else if(i.kind==="emoji")Ie||(Ie=new RegExp(Ft,"u")),Ie.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"emoji",code:d.invalid_string,message:i.message}),s.dirty());else if(i.kind==="uuid")Wt.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"uuid",code:d.invalid_string,message:i.message}),s.dirty());else if(i.kind==="nanoid")Ht.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"nanoid",code:d.invalid_string,message:i.message}),s.dirty());else if(i.kind==="cuid")Lt.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"cuid",code:d.invalid_string,message:i.message}),s.dirty());else if(i.kind==="cuid2")Bt.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"cuid2",code:d.invalid_string,message:i.message}),s.dirty());else if(i.kind==="ulid")zt.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"ulid",code:d.invalid_string,message:i.message}),s.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),p(a,{validation:"url",code:d.invalid_string,message:i.message}),s.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"regex",code:d.invalid_string,message:i.message}),s.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(e,a),p(a,{code:d.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),s.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),p(a,{code:d.invalid_string,validation:{startsWith:i.value},message:i.message}),s.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),p(a,{code:d.invalid_string,validation:{endsWith:i.value},message:i.message}),s.dirty()):i.kind==="datetime"?Je(i).test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{code:d.invalid_string,validation:"datetime",message:i.message}),s.dirty()):i.kind==="date"?Qt.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{code:d.invalid_string,validation:"date",message:i.message}),s.dirty()):i.kind==="time"?Xt(i).test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{code:d.invalid_string,validation:"time",message:i.message}),s.dirty()):i.kind==="duration"?qt.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"duration",code:d.invalid_string,message:i.message}),s.dirty()):i.kind==="ip"?en(e.data,i.version)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"ip",code:d.invalid_string,message:i.message}),s.dirty()):i.kind==="base64"?Jt.test(e.data)||(a=this._getOrReturnCtx(e,a),p(a,{validation:"base64",code:d.invalid_string,message:i.message}),s.dirty()):b.assertNever(i);return{status:s.value,value:e.data}}_regex(e,n,s){return this.refinement(a=>e.test(a),{validation:n,code:d.invalid_string,...f.errToObj(s)})}_addCheck(e){return new E({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...f.errToObj(e)})}url(e){return this._addCheck({kind:"url",...f.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...f.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...f.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...f.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...f.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...f.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...f.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...f.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...f.errToObj(e)})}datetime(e){var n,s;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(s=e==null?void 0:e.local)!==null&&s!==void 0?s:!1,...f.errToObj(e==null?void 0: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==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...f.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...f.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...f.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...f.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...f.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...f.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...f.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...f.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...f.errToObj(n)})}nonempty(e){return this.min(1,f.errToObj(e))}trim(){return new E({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new E({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new E({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}E.create=t=>{var e;return new E({checks:[],typeName:g.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...y(t)})};function tn(t,e){const n=(t.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,a=n>s?n:s,i=parseInt(t.toFixed(a).replace(".","")),o=parseInt(e.toFixed(a).replace(".",""));return i%o/Math.pow(10,a)}class P extends v{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)!==h.number){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_type,expected:h.number,received:i.parsedType}),_}let s;const a=new S;for(const i of this._def.checks)i.kind==="int"?b.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:d.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?tn(e.data,i.value)!==0&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:d.not_finite,message:i.message}),a.dirty()):b.assertNever(i);return{status:a.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,f.toString(n))}gt(e,n){return this.setLimit("min",e,!1,f.toString(n))}lte(e,n){return this.setLimit("max",e,!0,f.toString(n))}lt(e,n){return this.setLimit("max",e,!1,f.toString(n))}setLimit(e,n,s,a){return new P({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:s,message:f.toString(a)}]})}_addCheck(e){return new P({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:f.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:f.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:f.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:f.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:f.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:f.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:f.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:f.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:f.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&b.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(n===null||s.value>n)&&(n=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(n)&&Number.isFinite(e)}}P.create=t=>new P({checks:[],typeName:g.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...y(t)});class M extends v{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)!==h.bigint){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_type,expected:h.bigint,received:i.parsedType}),_}let s;const a=new S;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),p(s,{code:d.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):b.assertNever(i);return{status:a.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,f.toString(n))}gt(e,n){return this.setLimit("min",e,!1,f.toString(n))}lte(e,n){return this.setLimit("max",e,!0,f.toString(n))}lt(e,n){return this.setLimit("max",e,!1,f.toString(n))}setLimit(e,n,s,a){return new M({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:s,message:f.toString(a)}]})}_addCheck(e){return new M({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:f.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:f.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:f.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:f.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:f.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}M.create=t=>{var e;return new M({checks:[],typeName:g.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...y(t)})};class ne extends v{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==h.boolean){const s=this._getOrReturnCtx(e);return p(s,{code:d.invalid_type,expected:h.boolean,received:s.parsedType}),_}return w(e.data)}}ne.create=t=>new ne({typeName:g.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...y(t)});class L extends v{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==h.date){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_type,expected:h.date,received:i.parsedType}),_}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return p(i,{code:d.invalid_date}),_}const s=new S;let a;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(a=this._getOrReturnCtx(e,a),p(a,{code:d.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),s.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(a=this._getOrReturnCtx(e,a),p(a,{code:d.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),s.dirty()):b.assertNever(i);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new L({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:f.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:f.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}L.create=t=>new L({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:g.ZodDate,...y(t)});class ye extends v{_parse(e){if(this._getType(e)!==h.symbol){const s=this._getOrReturnCtx(e);return p(s,{code:d.invalid_type,expected:h.symbol,received:s.parsedType}),_}return w(e.data)}}ye.create=t=>new ye({typeName:g.ZodSymbol,...y(t)});class re extends v{_parse(e){if(this._getType(e)!==h.undefined){const s=this._getOrReturnCtx(e);return p(s,{code:d.invalid_type,expected:h.undefined,received:s.parsedType}),_}return w(e.data)}}re.create=t=>new re({typeName:g.ZodUndefined,...y(t)});class se extends v{_parse(e){if(this._getType(e)!==h.null){const s=this._getOrReturnCtx(e);return p(s,{code:d.invalid_type,expected:h.null,received:s.parsedType}),_}return w(e.data)}}se.create=t=>new se({typeName:g.ZodNull,...y(t)});class K extends v{constructor(){super(...arguments),this._any=!0}_parse(e){return w(e.data)}}K.create=t=>new K({typeName:g.ZodAny,...y(t)});class V extends v{constructor(){super(...arguments),this._unknown=!0}_parse(e){return w(e.data)}}V.create=t=>new V({typeName:g.ZodUnknown,...y(t)});class R extends v{_parse(e){const n=this._getOrReturnCtx(e);return p(n,{code:d.invalid_type,expected:h.never,received:n.parsedType}),_}}R.create=t=>new R({typeName:g.ZodNever,...y(t)});class ve extends v{_parse(e){if(this._getType(e)!==h.undefined){const s=this._getOrReturnCtx(e);return p(s,{code:d.invalid_type,expected:h.void,received:s.parsedType}),_}return w(e.data)}}ve.create=t=>new ve({typeName:g.ZodVoid,...y(t)});class C extends v{_parse(e){const{ctx:n,status:s}=this._processInputParams(e),a=this._def;if(n.parsedType!==h.array)return p(n,{code:d.invalid_type,expected:h.array,received:n.parsedType}),_;if(a.exactLength!==null){const o=n.data.length>a.exactLength.value,c=n.data.length<a.exactLength.value;(o||c)&&(p(n,{code:o?d.too_big:d.too_small,minimum:c?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),s.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(p(n,{code:d.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),s.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(p(n,{code:d.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),s.dirty()),n.common.async)return Promise.all([...n.data].map((o,c)=>a.type._parseAsync(new I(n,o,n.path,c)))).then(o=>S.mergeArray(s,o));const i=[...n.data].map((o,c)=>a.type._parseSync(new I(n,o,n.path,c)));return S.mergeArray(s,i)}get element(){return this._def.type}min(e,n){return new C({...this._def,minLength:{value:e,message:f.toString(n)}})}max(e,n){return new C({...this._def,maxLength:{value:e,message:f.toString(n)}})}length(e,n){return new C({...this._def,exactLength:{value:e,message:f.toString(n)}})}nonempty(e){return this.min(1,e)}}C.create=(t,e)=>new C({type:t,minLength:null,maxLength:null,exactLength:null,typeName:g.ZodArray,...y(e)});function H(t){if(t instanceof k){const e={};for(const n in t.shape){const s=t.shape[n];e[n]=j.create(H(s))}return new k({...t._def,shape:()=>e})}else return t instanceof C?new C({...t._def,type:H(t.element)}):t instanceof j?j.create(H(t.unwrap())):t instanceof D?D.create(H(t.unwrap())):t instanceof N?N.create(t.items.map(e=>H(e))):t}class k extends v{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=b.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==h.object){const l=this._getOrReturnCtx(e);return p(l,{code:d.invalid_type,expected:h.object,received:l.parsedType}),_}const{status:s,ctx:a}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),c=[];if(!(this._def.catchall instanceof R&&this._def.unknownKeys==="strip"))for(const l in a.data)o.includes(l)||c.push(l);const u=[];for(const l of o){const m=i[l],x=a.data[l];u.push({key:{status:"valid",value:l},value:m._parse(new I(a,x,a.path,l)),alwaysSet:l in a.data})}if(this._def.catchall instanceof R){const l=this._def.unknownKeys;if(l==="passthrough")for(const m of c)u.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(l==="strict")c.length>0&&(p(a,{code:d.unrecognized_keys,keys:c}),s.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const m of c){const x=a.data[m];u.push({key:{status:"valid",value:m},value:l._parse(new I(a,x,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const l=[];for(const m of u){const x=await m.key,z=await m.value;l.push({key:x,value:z,alwaysSet:m.alwaysSet})}return l}).then(l=>S.mergeObjectSync(s,l)):S.mergeObjectSync(s,u)}get shape(){return this._def.shape()}strict(e){return f.errToObj,new k({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,s)=>{var a,i,o,c;const u=(o=(i=(a=this._def).errorMap)===null||i===void 0?void 0:i.call(a,n,s).message)!==null&&o!==void 0?o:s.defaultError;return n.code==="unrecognized_keys"?{message:(c=f.errToObj(e).message)!==null&&c!==void 0?c:u}:{message:u}}}:{}})}strip(){return new k({...this._def,unknownKeys:"strip"})}passthrough(){return new k({...this._def,unknownKeys:"passthrough"})}extend(e){return new k({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new k({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:g.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new k({...this._def,catchall:e})}pick(e){const n={};return b.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(n[s]=this.shape[s])}),new k({...this._def,shape:()=>n})}omit(e){const n={};return b.objectKeys(this.shape).forEach(s=>{e[s]||(n[s]=this.shape[s])}),new k({...this._def,shape:()=>n})}deepPartial(){return H(this)}partial(e){const n={};return b.objectKeys(this.shape).forEach(s=>{const a=this.shape[s];e&&!e[s]?n[s]=a:n[s]=a.optional()}),new k({...this._def,shape:()=>n})}required(e){const n={};return b.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])n[s]=this.shape[s];else{let i=this.shape[s];for(;i instanceof j;)i=i._def.innerType;n[s]=i}}),new k({...this._def,shape:()=>n})}keyof(){return Qe(b.objectKeys(this.shape))}}k.create=(t,e)=>new k({shape:()=>t,unknownKeys:"strip",catchall:R.create(),typeName:g.ZodObject,...y(e)});k.strictCreate=(t,e)=>new k({shape:()=>t,unknownKeys:"strict",catchall:R.create(),typeName:g.ZodObject,...y(e)});k.lazycreate=(t,e)=>new k({shape:t,unknownKeys:"strip",catchall:R.create(),typeName:g.ZodObject,...y(e)});class ae extends v{_parse(e){const{ctx:n}=this._processInputParams(e),s=this._def.options;function a(i){for(const c of i)if(c.result.status==="valid")return c.result;for(const c of i)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;const o=i.map(c=>new T(c.ctx.common.issues));return p(n,{code:d.invalid_union,unionErrors:o}),_}if(n.common.async)return Promise.all(s.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(a);{let i;const o=[];for(const u of s){const l={...n,common:{...n.common,issues:[]},parent:null},m=u._parseSync({data:n.data,path:n.path,parent:l});if(m.status==="valid")return m;m.status==="dirty"&&!i&&(i={result:m,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const c=o.map(u=>new T(u));return p(n,{code:d.invalid_union,unionErrors:c}),_}}get options(){return this._def.options}}ae.create=(t,e)=>new ae({options:t,typeName:g.ZodUnion,...y(e)});const Z=t=>t instanceof ce?Z(t.schema):t instanceof O?Z(t.innerType()):t instanceof de?[t.value]:t instanceof U?t.options:t instanceof le?b.objectValues(t.enum):t instanceof ue?Z(t._def.innerType):t instanceof re?[void 0]:t instanceof se?[null]:t instanceof j?[void 0,...Z(t.unwrap())]:t instanceof D?[null,...Z(t.unwrap())]:t instanceof Pe||t instanceof he?Z(t.unwrap()):t instanceof pe?Z(t._def.innerType):[];class xe extends v{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==h.object)return p(n,{code:d.invalid_type,expected:h.object,received:n.parsedType}),_;const s=this.discriminator,a=n.data[s],i=this.optionsMap.get(a);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(p(n,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),_)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,s){const a=new Map;for(const i of n){const o=Z(i.shape[e]);if(!o.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const c of o){if(a.has(c))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`);a.set(c,i)}}return new xe({typeName:g.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:a,...y(s)})}}function Ae(t,e){const n=A(t),s=A(e);if(t===e)return{valid:!0,data:t};if(n===h.object&&s===h.object){const a=b.objectKeys(e),i=b.objectKeys(t).filter(c=>a.indexOf(c)!==-1),o={...t,...e};for(const c of i){const u=Ae(t[c],e[c]);if(!u.valid)return{valid:!1};o[c]=u.data}return{valid:!0,data:o}}else if(n===h.array&&s===h.array){if(t.length!==e.length)return{valid:!1};const a=[];for(let i=0;i<t.length;i++){const o=t[i],c=e[i],u=Ae(o,c);if(!u.valid)return{valid:!1};a.push(u.data)}return{valid:!0,data:a}}else return n===h.date&&s===h.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ie extends v{_parse(e){const{status:n,ctx:s}=this._processInputParams(e),a=(i,o)=>{if(Ze(i)||Ze(o))return _;const c=Ae(i.value,o.value);return c.valid?((Re(i)||Re(o))&&n.dirty(),{status:n.value,value:c.data}):(p(s,{code:d.invalid_intersection_types}),_)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([i,o])=>a(i,o)):a(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}ie.create=(t,e,n)=>new ie({left:t,right:e,typeName:g.ZodIntersection,...y(n)});class N extends v{_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.array)return p(s,{code:d.invalid_type,expected:h.array,received:s.parsedType}),_;if(s.data.length<this._def.items.length)return p(s,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_;!this._def.rest&&s.data.length>this._def.items.length&&(p(s,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...s.data].map((o,c)=>{const u=this._def.items[c]||this._def.rest;return u?u._parse(new I(s,o,s.path,c)):null}).filter(o=>!!o);return s.common.async?Promise.all(i).then(o=>S.mergeArray(n,o)):S.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new N({...this._def,rest:e})}}N.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new N({items:t,typeName:g.ZodTuple,rest:null,...y(e)})};class oe extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.object)return p(s,{code:d.invalid_type,expected:h.object,received:s.parsedType}),_;const a=[],i=this._def.keyType,o=this._def.valueType;for(const c in s.data)a.push({key:i._parse(new I(s,c,s.path,c)),value:o._parse(new I(s,s.data[c],s.path,c)),alwaysSet:c in s.data});return s.common.async?S.mergeObjectAsync(n,a):S.mergeObjectSync(n,a)}get element(){return this._def.valueType}static create(e,n,s){return n instanceof v?new oe({keyType:e,valueType:n,typeName:g.ZodRecord,...y(s)}):new oe({keyType:E.create(),valueType:e,typeName:g.ZodRecord,...y(n)})}}class be extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.map)return p(s,{code:d.invalid_type,expected:h.map,received:s.parsedType}),_;const a=this._def.keyType,i=this._def.valueType,o=[...s.data.entries()].map(([c,u],l)=>({key:a._parse(new I(s,c,s.path,[l,"key"])),value:i._parse(new I(s,u,s.path,[l,"value"]))}));if(s.common.async){const c=new Map;return Promise.resolve().then(async()=>{for(const u of o){const l=await u.key,m=await u.value;if(l.status==="aborted"||m.status==="aborted")return _;(l.status==="dirty"||m.status==="dirty")&&n.dirty(),c.set(l.value,m.value)}return{status:n.value,value:c}})}else{const c=new Map;for(const u of o){const l=u.key,m=u.value;if(l.status==="aborted"||m.status==="aborted")return _;(l.status==="dirty"||m.status==="dirty")&&n.dirty(),c.set(l.value,m.value)}return{status:n.value,value:c}}}}be.create=(t,e,n)=>new be({valueType:e,keyType:t,typeName:g.ZodMap,...y(n)});class B extends v{_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.set)return p(s,{code:d.invalid_type,expected:h.set,received:s.parsedType}),_;const a=this._def;a.minSize!==null&&s.data.size<a.minSize.value&&(p(s,{code:d.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&s.data.size>a.maxSize.value&&(p(s,{code:d.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const i=this._def.valueType;function o(u){const l=new Set;for(const m of u){if(m.status==="aborted")return _;m.status==="dirty"&&n.dirty(),l.add(m.value)}return{status:n.value,value:l}}const c=[...s.data.values()].map((u,l)=>i._parse(new I(s,u,s.path,l)));return s.common.async?Promise.all(c).then(u=>o(u)):o(c)}min(e,n){return new B({...this._def,minSize:{value:e,message:f.toString(n)}})}max(e,n){return new B({...this._def,maxSize:{value:e,message:f.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}B.create=(t,e)=>new B({valueType:t,minSize:null,maxSize:null,typeName:g.ZodSet,...y(e)});class G extends v{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==h.function)return p(n,{code:d.invalid_type,expected:h.function,received:n.parsedType}),_;function s(c,u){return ge({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,me(),F].filter(l=>!!l),issueData:{code:d.invalid_arguments,argumentsError:u}})}function a(c,u){return ge({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,me(),F].filter(l=>!!l),issueData:{code:d.invalid_return_type,returnTypeError:u}})}const i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Y){const c=this;return w(async function(...u){const l=new T([]),m=await c._def.args.parseAsync(u,i).catch(W=>{throw l.addIssue(s(u,W)),l}),x=await Reflect.apply(o,this,m);return await c._def.returns._def.type.parseAsync(x,i).catch(W=>{throw l.addIssue(a(x,W)),l})})}else{const c=this;return w(function(...u){const l=c._def.args.safeParse(u,i);if(!l.success)throw new T([s(u,l.error)]);const m=Reflect.apply(o,this,l.data),x=c._def.returns.safeParse(m,i);if(!x.success)throw new T([a(m,x.error)]);return x.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new G({...this._def,args:N.create(e).rest(V.create())})}returns(e){return new G({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,s){return new G({args:e||N.create([]).rest(V.create()),returns:n||V.create(),typeName:g.ZodFunction,...y(s)})}}class ce extends v{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ce.create=(t,e)=>new ce({getter:t,typeName:g.ZodLazy,...y(e)});class de extends v{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return p(n,{received:n.data,code:d.invalid_literal,expected:this._def.value}),_}return{status:"valid",value:e.data}}get value(){return this._def.value}}de.create=(t,e)=>new de({value:t,typeName:g.ZodLiteral,...y(e)});function Qe(t,e){return new U({values:t,typeName:g.ZodEnum,...y(e)})}class U extends v{constructor(){super(...arguments),Q.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),s=this._def.values;return p(n,{expected:b.joinValues(s),received:n.parsedType,code:d.invalid_type}),_}if(_e(this,Q)||Fe(this,Q,new Set(this._def.values)),!_e(this,Q).has(e.data)){const n=this._getOrReturnCtx(e),s=this._def.values;return p(n,{received:n.data,code:d.invalid_enum_value,options:s}),_}return w(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return U.create(e,{...this._def,...n})}exclude(e,n=this._def){return U.create(this.options.filter(s=>!e.includes(s)),{...this._def,...n})}}Q=new WeakMap;U.create=Qe;class le extends v{constructor(){super(...arguments),X.set(this,void 0)}_parse(e){const n=b.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==h.string&&s.parsedType!==h.number){const a=b.objectValues(n);return p(s,{expected:b.joinValues(a),received:s.parsedType,code:d.invalid_type}),_}if(_e(this,X)||Fe(this,X,new Set(b.getValidEnumValues(this._def.values))),!_e(this,X).has(e.data)){const a=b.objectValues(n);return p(s,{received:s.data,code:d.invalid_enum_value,options:a}),_}return w(e.data)}get enum(){return this._def.values}}X=new WeakMap;le.create=(t,e)=>new le({values:t,typeName:g.ZodNativeEnum,...y(e)});class Y extends v{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==h.promise&&n.common.async===!1)return p(n,{code:d.invalid_type,expected:h.promise,received:n.parsedType}),_;const s=n.parsedType===h.promise?n.data:Promise.resolve(n.data);return w(s.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Y.create=(t,e)=>new Y({type:t,typeName:g.ZodPromise,...y(e)});class O extends v{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===g.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:s}=this._processInputParams(e),a=this._def.effect||null,i={addIssue:o=>{p(s,o),o.fatal?n.abort():n.dirty()},get path(){return s.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const o=a.transform(s.data,i);if(s.common.async)return Promise.resolve(o).then(async c=>{if(n.value==="aborted")return _;const u=await this._def.schema._parseAsync({data:c,path:s.path,parent:s});return u.status==="aborted"?_:u.status==="dirty"||n.value==="dirty"?q(u.value):u});{if(n.value==="aborted")return _;const c=this._def.schema._parseSync({data:o,path:s.path,parent:s});return c.status==="aborted"?_:c.status==="dirty"||n.value==="dirty"?q(c.value):c}}if(a.type==="refinement"){const o=c=>{const u=a.refinement(c,i);if(s.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(s.common.async===!1){const c=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return c.status==="aborted"?_:(c.status==="dirty"&&n.dirty(),o(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(c=>c.status==="aborted"?_:(c.status==="dirty"&&n.dirty(),o(c.value).then(()=>({status:n.value,value:c.value}))))}if(a.type==="transform")if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!ee(o))return o;const c=a.transform(o.value,i);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>ee(o)?Promise.resolve(a.transform(o.value,i)).then(c=>({status:n.value,value:c})):o);b.assertNever(a)}}O.create=(t,e,n)=>new O({schema:t,typeName:g.ZodEffects,effect:e,...y(n)});O.createWithPreprocess=(t,e,n)=>new O({schema:e,effect:{type:"preprocess",transform:t},typeName:g.ZodEffects,...y(n)});class j extends v{_parse(e){return this._getType(e)===h.undefined?w(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}j.create=(t,e)=>new j({innerType:t,typeName:g.ZodOptional,...y(e)});class D extends v{_parse(e){return this._getType(e)===h.null?w(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}D.create=(t,e)=>new D({innerType:t,typeName:g.ZodNullable,...y(e)});class ue extends v{_parse(e){const{ctx:n}=this._processInputParams(e);let s=n.data;return n.parsedType===h.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ue.create=(t,e)=>new ue({innerType:t,typeName:g.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class pe extends v{_parse(e){const{ctx:n}=this._processInputParams(e),s={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return te(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new T(s.common.issues)},input:s.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}pe.create=(t,e)=>new pe({innerType:t,typeName:g.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class ke extends v{_parse(e){if(this._getType(e)!==h.nan){const s=this._getOrReturnCtx(e);return p(s,{code:d.invalid_type,expected:h.nan,received:s.parsedType}),_}return{status:"valid",value:e.data}}}ke.create=t=>new ke({typeName:g.ZodNaN,...y(t)});const nn=Symbol("zod_brand");class Pe extends v{_parse(e){const{ctx:n}=this._processInputParams(e),s=n.data;return this._def.type._parse({data:s,path:n.path,parent:n})}unwrap(){return this._def.type}}class fe extends v{_parse(e){const{status:n,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return i.status==="aborted"?_:i.status==="dirty"?(n.dirty(),q(i.value)):this._def.out._parseAsync({data:i.value,path:s.path,parent:s})})();{const a=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?_:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:s.path,parent:s})}}static create(e,n){return new fe({in:e,out:n,typeName:g.ZodPipeline})}}class he extends v{_parse(e){const n=this._def.innerType._parse(e),s=a=>(ee(a)&&(a.value=Object.freeze(a.value)),a);return te(n)?n.then(a=>s(a)):s(n)}unwrap(){return this._def.innerType}}he.create=(t,e)=>new he({innerType:t,typeName:g.ZodReadonly,...y(e)});function Xe(t,e={},n){return t?K.create().superRefine((s,a)=>{var i,o;if(!t(s)){const c=typeof e=="function"?e(s):typeof e=="string"?{message:e}:e,u=(o=(i=c.fatal)!==null&&i!==void 0?i:n)!==null&&o!==void 0?o:!0,l=typeof c=="string"?{message:c}:c;a.addIssue({code:"custom",...l,fatal:u})}}):K.create()}const rn={object:k.lazycreate};var g;(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"})(g||(g={}));const sn=(t,e={message:`Input not instance of ${t.name}`})=>Xe(n=>n instanceof t,e),et=E.create,tt=P.create,an=ke.create,on=M.create,nt=ne.create,cn=L.create,dn=ye.create,ln=re.create,un=se.create,pn=K.create,hn=V.create,fn=R.create,mn=ve.create,gn=C.create,_n=k.create,yn=k.strictCreate,vn=ae.create,bn=xe.create,kn=ie.create,xn=N.create,Sn=oe.create,wn=be.create,Tn=B.create,En=G.create,Cn=ce.create,On=de.create,jn=U.create,In=le.create,Nn=Y.create,qe=O.create,Zn=j.create,Rn=D.create,An=O.createWithPreprocess,Pn=fe.create,Mn=()=>et().optional(),Un=()=>tt().optional(),Dn=()=>nt().optional(),$n={string:t=>E.create({...t,coerce:!0}),number:t=>P.create({...t,coerce:!0}),boolean:t=>ne.create({...t,coerce:!0}),bigint:t=>M.create({...t,coerce:!0}),date:t=>L.create({...t,coerce:!0})},Vn=_;var r=Object.freeze({__proto__:null,defaultErrorMap:F,setErrorMap:$t,getErrorMap:me,makeIssue:ge,EMPTY_PATH:Vt,addIssueToContext:p,ParseStatus:S,INVALID:_,DIRTY:q,OK:w,isAborted:Ze,isDirty:Re,isValid:ee,isAsync:te,get util(){return b},get objectUtil(){return Ne},ZodParsedType:h,getParsedType:A,ZodType:v,datetimeRegex:Je,ZodString:E,ZodNumber:P,ZodBigInt:M,ZodBoolean:ne,ZodDate:L,ZodSymbol:ye,ZodUndefined:re,ZodNull:se,ZodAny:K,ZodUnknown:V,ZodNever:R,ZodVoid:ve,ZodArray:C,ZodObject:k,ZodUnion:ae,ZodDiscriminatedUnion:xe,ZodIntersection:ie,ZodTuple:N,ZodRecord:oe,ZodMap:be,ZodSet:B,ZodFunction:G,ZodLazy:ce,ZodLiteral:de,ZodEnum:U,ZodNativeEnum:le,ZodPromise:Y,ZodEffects:O,ZodTransformer:O,ZodOptional:j,ZodNullable:D,ZodDefault:ue,ZodCatch:pe,ZodNaN:ke,BRAND:nn,ZodBranded:Pe,ZodPipeline:fe,ZodReadonly:he,custom:Xe,Schema:v,ZodSchema:v,late:rn,get ZodFirstPartyTypeKind(){return g},coerce:$n,any:pn,array:gn,bigint:on,boolean:nt,date:cn,discriminatedUnion:bn,effect:qe,enum:jn,function:En,instanceof:sn,intersection:kn,lazy:Cn,literal:On,map:wn,nan:an,nativeEnum:In,never:fn,null:un,nullable:Rn,number:tt,object:_n,oboolean:Dn,onumber:Un,optional:Zn,ostring:Mn,pipeline:Pn,preprocess:An,promise:Nn,record:Sn,set:Tn,strictObject:yn,string:et,symbol:dn,transformer:qe,tuple:xn,undefined:ln,union:vn,unknown:hn,void:mn,NEVER:Vn,ZodIssueCode:d,quotelessJson:Dt,ZodError:T});Ut(r);const Ln=r.object({start:r.number(),limit:r.number(),length:r.number()}),Me=r.object({created_at:r.string(),updated_at:r.string()}),rt=r.object({email:r.string().optional(),email_verified:r.boolean().optional(),name:r.string().optional(),username:r.string().optional(),given_name:r.string().optional(),phone_number:r.string().optional(),phone_verified:r.boolean().optional(),family_name:r.string().optional()}).catchall(r.any()),st=r.object({connection:r.string(),user_id:r.string(),provider:r.string(),isSocial:r.boolean(),access_token:r.string().optional(),access_token_secret:r.string().optional(),refresh_token:r.string().optional(),profileData:rt.optional()}),Ue=r.object({email:r.string().optional(),username:r.string().optional(),given_name:r.string().optional(),family_name:r.string().optional(),nickname:r.string().optional(),name:r.string().optional(),picture:r.string().optional(),locale:r.string().optional(),linked_to:r.string().optional(),profileData:r.string().optional(),user_id:r.string().optional(),app_metadata:r.any().default({}).optional(),user_metadata:r.any().default({}).optional()}),at=Ue.extend({email_verified:r.boolean().default(!1),verify_email:r.boolean().optional(),last_ip:r.string().optional(),last_login:r.string().optional(),user_id:r.string().optional(),provider:r.string().default("email"),connection:r.string().default("email")}),it=r.object({...at.shape,...Me.shape,user_id:r.string(),email:r.string(),is_social:r.boolean(),login_count:r.number(),identities:r.array(st).optional()}),Bn=it,zn=Ue.extend({email:r.string(),login_count:r.number(),multifactor:r.array(r.string()).optional(),last_ip:r.string().optional(),last_login:r.string().optional(),user_id:r.string()}).catchall(r.any()),Wn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Hn=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;)e+=Wn[n[t]&63];return e};const ot=r.object({audience:r.string().optional(),recipient:r.string().optional(),createUpnClaim:r.boolean().optional(),mapUnknownClaimsAsIs:r.boolean().optional(),passthroughClaimsWithNoMapping:r.boolean().optional(),mapIdentities:r.boolean().optional(),signatureAlgorithm:r.string().optional(),digestAlgorithm:r.string().optional(),issuer:r.string().optional(),destination:r.string().optional(),lifetimeInSeconds:r.number().optional(),signResponse:r.boolean().optional(),nameIdentifierFormat:r.string().optional(),nameIdentifierProbes:r.array(r.string()).optional(),authnContextClassRef:r.string().optional(),mappings:r.record(r.string()).optional()}),ct=r.object({id:r.string(),name:r.string(),callbacks:r.array(r.string()).default([]).optional().openapi({description:"Comma-separated list of URLs whitelisted to use as a callback to the client after authentication."}),allowed_origins:r.array(r.string()).default([]).optional().openapi({description:"Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level. Query strings and hash information are not taken into account when validating these URLs."}),web_origins:r.array(r.string()).default([]).optional().openapi({description:"Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode."}),allowed_logout_urls:r.array(r.string()).default([]).optional().openapi({description:"Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains."}),allowed_clients:r.array(r.string()).default([]).optional().openapi({description:"Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients"}),addons:r.object({samlp:ot.optional()}).default({}).optional().openapi({description:"Addons associated with the client. The key is the addon's package name and the value is an object with the configuration for the addon."}),email_validation:r.enum(["enabled","disabled","enforced"]).default("enforced").optional().openapi({description:"Defines if it possible to sign in with an unverified email and if verification emails will be sent. This is not available in auth0"}),client_secret:r.string().default(()=>Hn()).optional(),disable_sign_ups:r.boolean().optional().default(!1).openapi({description:"Prevents users from signing up using the hosted login page. This is not available in auth0"})}),dt=r.object({created_at:r.string().transform(t=>t===null?"":t),updated_at:r.string().transform(t=>t===null?"":t),...ct.shape});var De=(t=>(t.TOKEN="token",t.TOKEN_ID_TOKEN="token id_token",t.CODE="code",t))(De||{}),$e=(t=>(t.QUERY="query",t.FRAGMENT="fragment",t.FORM_POST="form_post",t.WEB_MESSAGE="web_message",t.SAML_POST="saml_post",t))($e||{}),Ve=(t=>(t.S256="S256",t.Plain="plain",t))(Ve||{});const lt=r.object({client_id:r.string(),vendor_id:r.string().optional(),act_as:r.string().optional(),response_type:r.nativeEnum(De).optional(),response_mode:r.nativeEnum($e).optional(),redirect_uri:r.string().optional(),audience:r.string().optional(),state:r.string().optional(),nonce:r.string().optional(),scope:r.string().optional(),prompt:r.string().optional(),code_challenge_method:r.nativeEnum(Ve).optional(),code_challenge:r.string().optional(),username:r.string().optional(),ui_locales:r.string().optional()}),qn=r.object({colors:r.object({primary:r.string(),page_background:r.object({type:r.string().optional(),start:r.string().optional(),end:r.string().optional(),angle_deg:r.number().optional()}).optional()}).optional(),logo_url:r.string().optional(),favicon_url:r.string().optional(),font:r.object({url:r.string()}).optional()}),ut=r.object({id:r.string().optional(),name:r.string(),strategy:r.enum(["google-oauth2","facebook","vipps","freja","apple","email","auth0","authhero","Username-Password-Authentication","oidc","oauth2","custom"]),options:r.object({kid:r.string().optional(),team_id:r.string().optional(),realms:r.string().optional(),client_id:r.string().optional(),client_secret:r.string().optional(),app_secret:r.string().optional(),scope:r.string().optional(),authorization_endpoint:r.string().default("").optional(),token_endpoint:r.string().default("").optional(),userinfo_endpoint:r.string().default("").optional(),jwks_uri:r.string().default("").optional(),discovery_url:r.string().default("").optional(),issuer:r.string().default("").optional()}).default({}).optional(),enabled_clients:r.array(r.string()).default([]).optional(),response_type:r.custom().optional(),response_mode:r.custom().optional()}),pt=r.object({id:r.string(),created_at:r.string().transform(t=>t===null?"":t),updated_at:r.string().transform(t=>t===null?"":t)}).extend(ut.shape),ht=r.object({name:r.string(),audience:r.string(),sender_email:r.string().email(),sender_name:r.string(),support_url:r.string().url().optional(),logo:r.string().url().optional(),primary_color:r.string().optional(),secondary_color:r.string().optional(),language:r.string().optional()}),ft=r.object({created_at:r.string().transform(t=>t===null?"":t),updated_at:r.string().transform(t=>t===null?"":t),id:r.string(),...ht.shape}),Gn=r.object({logoUrl:r.string(),loginBackgroundImage:r.string().nullish(),style:r.object({primaryColor:r.string(),buttonTextColor:r.string(),primaryHoverColor:r.string()}),supportEmail:r.string().nullable(),supportUrl:r.string().nullable(),name:r.string(),showGreyishBackground:r.boolean().optional(),termsAndConditionsUrl:r.string().nullable(),companyName:r.string().optional(),checkoutHideSocial:r.boolean().optional(),siteUrl:r.string().nullable(),manageSubscriptionsUrl:r.string().optional()}),Fn=r.object({domain:r.string(),dkim_private_key:r.string().optional(),dkim_public_key:r.string().optional(),email_api_key:r.string().optional(),email_service:r.union([r.literal("mailgun"),r.literal("mailchannels")]).optional()});r.object({...dt.shape,domains:r.array(Fn),tenant:ft,connections:r.array(pt)});const mt=r.enum(["password_reset","email_verification","otp","authorization_code","oauth2_state","ticket"]),gt=r.object({code_id:r.string().openapi({description:"The code that will be used in for instance an email verification flow"}),login_id:r.string().openapi({description:"The id of the login session that the code is connected to"}),connection_id:r.string().optional().openapi({description:"The connection that the code is connected to"}),code_type:mt,expires_at:r.string(),used_at:r.string().optional(),user_id:r.string().optional()}),Kn=r.object({...gt.shape,created_at:r.string()}),_t=r.object({domain:r.string(),dkim_private_key:r.string().optional(),dkim_public_key:r.string().optional(),email_api_key:r.string().optional(),email_service:r.enum(["mailgun","mailchannels"])}),Yn=Me.extend({..._t.shape,id:r.string()}),yt=r.object({trigger_id:r.enum(["pre-user-signup","post-user-registration","post-user-login"]),enabled:r.boolean().default(!1),url:r.string(),hook_id:r.string().optional(),synchronous:r.boolean().default(!1),priority:r.number().optional()}),Jn=yt.extend({...Me.shape,hook_id:r.string()}),vt=r.object({alg:r.enum(["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512"]),e:r.string(),kid:r.string(),kty:r.enum(["RSA","EC","oct"]),n:r.string(),x5t:r.string().optional(),x5c:r.array(r.string()).optional(),use:r.enum(["sig","enc"]).optional()}),Qn=r.object({keys:r.array(vt)}),Xn=r.object({issuer:r.string(),authorization_endpoint:r.string(),token_endpoint:r.string(),device_authorization_endpoint:r.string(),userinfo_endpoint:r.string(),mfa_challenge_endpoint:r.string(),jwks_uri:r.string(),registration_endpoint:r.string(),revocation_endpoint:r.string(),scopes_supported:r.array(r.string()),response_types_supported:r.array(r.string()),code_challenge_methods_supported:r.array(r.string()),response_modes_supported:r.array(r.string()),subject_types_supported:r.array(r.string()),id_token_signing_alg_values_supported:r.array(r.string()),token_endpoint_auth_methods_supported:r.array(r.string()),claims_supported:r.array(r.string()),request_uri_parameter_supported:r.boolean(),request_parameter_supported:r.boolean(),token_endpoint_auth_signing_alg_values_supported:r.array(r.string())}),bt=r.object({auth0Client:r.string().optional(),authParams:lt,expires_at:r.string(),deleted_at:r.string().optional(),ip:r.string().optional(),useragent:r.string().optional()}).openapi({description:"This represents a login sesion"}),er=r.object({...bt.shape,login_id:r.string().openapi({description:"This is is used as the state in the universal login"}),created_at:r.string(),updated_at:r.string()});var kt=(t=>(t.FAILED_SILENT_AUTH="fsa",t.FAILED_SIGNUP="fs",t.FAILED_LOGIN="f",t.FAILED_LOGIN_INCORRECT_PASSWORD="fp",t.FAILED_CHANGE_PASSWORD="fcp",t.FAILED_BY_CONNECTOR="fc",t.FAILED_LOGIN_INVALID_EMAIL_USERNAME="fu",t.FAILED_HOOK="fh",t.FAILED_CROSS_ORIGIN_AUTHENTICATION="fcoa",t.SUCCESS_API_OPERATION="sapi",t.SUCCESS_CHANGE_PASSWORD="scp",t.SUCCESS_CHANGE_PASSWORD_REQUEST="scpr",t.SUCCESS_CHANGE_USERNAME="scu",t.SUCCESS_CROSS_ORIGIN_AUTHENTICATION="scoa",t.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN="seacft",t.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN="serft",t.SUCCESS_LOGIN="s",t.SUCCESS_LOGOUT="slo",t.SUCCESS_SIGNUP="ss",t.SUCCESS_SILENT_AUTH="ssa",t.SUCCESS_VERIFICATION_EMAIL="sv",t.SUCCESS_VERIFICATION_EMAIL_REQUEST="svr",t.CODE_LINK_SENT="cls",t))(kt||{});const tr=r.enum(["cls","fsa","fs","f","fc","fcoa","fcp","fh","fp","fs","fu","s","sapi","scoa","scp","scpr","scu","seacft","serft","slo","ss","ssa","sv","svr"]),xt=r.object({name:r.string(),version:r.string(),env:r.object({node:r.string().optional()}).optional()}),nr=r.object({type:tr,date:r.string(),description:r.string().optional(),log_id:r.string().optional(),_id:r.string().optional(),ip:r.string(),user_agent:r.string(),details:r.any().optional(),isMobile:r.boolean(),user_id:r.string().optional(),user_name:r.string().optional(),connection:r.string().optional(),connection_id:r.string().optional(),client_id:r.string().optional(),client_name:r.string().optional(),audience:r.string().optional(),scope:r.array(r.string()).optional(),strategy:r.string().optional(),strategy_type:r.string().optional(),hostname:r.string().optional(),auth0_client:xt.optional()}),St=r.object({user_id:r.string(),password:r.string(),algorithm:r.enum(["bcrypt","argon2id"]).default("argon2id")}),rr=r.object({...St.shape,created_at:r.string(),updated_at:r.string()}),wt=r.object({session_id:r.string(),client_id:r.string(),expires_at:r.string(),used_at:r.string(),deleted_at:r.string().optional(),user_id:r.string()}),sr=r.object({created_at:r.string(),...wt.shape}),ar=r.object({kid:r.string().openapi({description:"The key id of the signing key"}),cert:r.string().openapi({description:"The public certificate of the signing key"}),fingerprint:r.string().openapi({description:"The cert fingerprint"}),thumbprint:r.string().openapi({description:"The cert thumbprint"}),pkcs7:r.string().optional().openapi({description:"The private key in pkcs7 format"}),current:r.boolean().optional().openapi({description:"True if the key is the current key"}),next:r.boolean().optional().openapi({description:"True if the key is the next key"}),previous:r.boolean().optional().openapi({description:"True if the key is the previous key"}),current_since:r.string().optional().openapi({description:"The date and time when the key became the current key"}),current_until:r.string().optional().openapi({description:"The date and time when the current key was rotated"}),revoked:r.boolean().optional().openapi({description:"True if the key is revoked"}),revoked_at:r.string().optional().openapi({description:"The date and time when the key was revoked"})});var Tt=(t=>(t.RefreshToken="refresh_token",t.AuthorizationCode="authorization_code",t.ClientCredential="client_credentials",t.Passwordless="passwordless",t.Password="password",t))(Tt||{});r.object({access_token:r.string(),id_token:r.string().optional(),scope:r.string().optional(),state:r.string().optional(),refresh_token:r.string().optional(),token_type:r.string(),expires_in:r.number()});r.object({code:r.string(),state:r.string().optional()});const Et=r.object({button_border_radius:r.number(),button_border_weight:r.number(),buttons_style:r.enum(["pill"]),input_border_radius:r.number(),input_border_weight:r.number(),inputs_style:r.enum(["pill"]),show_widget_shadow:r.boolean(),widget_border_weight:r.number(),widget_corner_radius:r.number()}),Ct=r.object({base_focus_color:r.string(),base_hover_color:r.string(),body_text:r.string(),captcha_widget_theme:r.enum(["auto"]),error:r.string(),header:r.string(),icons:r.string(),input_background:r.string(),input_border:r.string(),input_filled_text:r.string(),input_labels_placeholders:r.string(),links_focused_components:r.string(),primary_button:r.string(),primary_button_label:r.string(),secondary_button_border:r.string(),secondary_button_label:r.string(),success:r.string(),widget_background:r.string(),widget_border:r.string()}),$=r.object({bold:r.boolean(),size:r.number()}),Ot=r.object({body_text:$,buttons_text:$,font_url:r.string(),input_labels:$,links:$,links_style:r.enum(["normal"]),reference_text_size:r.number(),subtitle:$,title:$}),jt=r.object({background_color:r.string(),background_image_url:r.string(),page_layout:r.enum(["center"])}),It=r.object({header_text_alignment:r.enum(["center"]),logo_height:r.number(),logo_position:r.enum(["center"]),logo_url:r.string(),social_buttons_layout:r.enum(["bottom"])}),Nt=r.object({borders:Et,colors:Ct,displayName:r.string(),fonts:Ot,page_background:jt,widget:It}),ir=Nt.extend({themeId:r.string()}),or=r.object({universal_login_experience:r.enum(["new","classic"]).default("new"),identifier_first:r.boolean().default(!0),password_first:r.boolean().default(!1),webauthn_platform_first_factor:r.boolean()}),cr=r.object({name:r.string(),enabled:r.boolean().optional().default(!0),default_from_address:r.string().optional(),credentials:r.union([r.object({accessKeyId:r.string(),secretAccessKey:r.string(),region:r.string()}),r.object({smtp_host:r.array(r.string()),smtp_port:r.number(),smtp_user:r.string(),smtp_pass:r.string()}),r.object({api_key:r.string(),domain:r.string().optional()}),r.object({connectionString:r.string()}),r.object({tenantId:r.string(),clientId:r.string(),clientSecret:r.string()})]),settings:r.object({}).optional()});function dr(t){const[e,n]=t.split("|");if(!e||!n)throw new Error(`Invalid user_id: ${t}`);return{connection:e,id:n}}exports.Auth0Client=xt;exports.AuthorizationResponseMode=$e;exports.AuthorizationResponseType=De;exports.CodeChallengeMethod=Ve;exports.GrantType=Tt;exports.LogTypes=kt;exports.applicationInsertSchema=ct;exports.applicationSchema=dt;exports.auth0UserResponseSchema=Bn;exports.authParamsSchema=lt;exports.baseUserSchema=Ue;exports.bordersSchema=Et;exports.brandingSchema=qn;exports.codeInsertSchema=gt;exports.codeSchema=Kn;exports.codeTypeSchema=mt;exports.colorsSchema=Ct;exports.connectionInsertSchema=ut;exports.connectionSchema=pt;exports.domainInsertSchema=_t;exports.domainSchema=Yn;exports.emailProviderSchema=cr;exports.fontDetailsSchema=$;exports.fontsSchema=Ot;exports.hookInsertSchema=yt;exports.hookSchema=Jn;exports.identitySchema=st;exports.jwksKeySchema=Qn;exports.jwksSchema=vt;exports.logSchema=nr;exports.loginInsertSchema=bt;exports.loginSchema=er;exports.openIDConfigurationSchema=Xn;exports.pageBackgroundSchema=jt;exports.parseUserId=dr;exports.passwordInsertSchema=St;exports.passwordSchema=rr;exports.profileDataSchema=rt;exports.promptSettingSchema=or;exports.samlpAddon=ot;exports.sessionInsertSchema=wt;exports.sessionSchema=sr;exports.signingKeySchema=ar;exports.tenantInsertSchema=ht;exports.tenantSchema=ft;exports.themeInsertSchema=Nt;exports.themeSchema=ir;exports.totalsSchema=Ln;exports.userInsertSchema=at;exports.userResponseSchema=zn;exports.userSchema=it;exports.vendorSettingsSchema=Gn;exports.widgetSchema=It;
@@ -981,8 +981,8 @@ export declare enum AuthorizationResponseMode {
981
981
  SAML_POST = "saml_post"
982
982
  }
983
983
  export declare enum CodeChallengeMethod {
984
- S265 = "S256",
985
- plain = "plain"
984
+ S256 = "S256",
985
+ Plain = "plain"
986
986
  }
987
987
  export declare const authParamsSchema: z.ZodObject<{
988
988
  client_id: z.ZodString;
@@ -996,10 +996,7 @@ export declare const authParamsSchema: z.ZodObject<{
996
996
  nonce: z.ZodOptional<z.ZodString>;
997
997
  scope: z.ZodOptional<z.ZodString>;
998
998
  prompt: z.ZodOptional<z.ZodString>;
999
- code_challenge_method: z.ZodOptional<z.ZodEnum<[
1000
- "plain",
1001
- "S256"
1002
- ]>>;
999
+ code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
1003
1000
  code_challenge: z.ZodOptional<z.ZodString>;
1004
1001
  username: z.ZodOptional<z.ZodString>;
1005
1002
  ui_locales: z.ZodOptional<z.ZodString>;
@@ -1016,7 +1013,7 @@ export declare const authParamsSchema: z.ZodObject<{
1016
1013
  nonce?: string | undefined;
1017
1014
  scope?: string | undefined;
1018
1015
  prompt?: string | undefined;
1019
- code_challenge_method?: "S256" | "plain" | undefined;
1016
+ code_challenge_method?: CodeChallengeMethod | undefined;
1020
1017
  code_challenge?: string | undefined;
1021
1018
  ui_locales?: string | undefined;
1022
1019
  }, {
@@ -1032,7 +1029,7 @@ export declare const authParamsSchema: z.ZodObject<{
1032
1029
  nonce?: string | undefined;
1033
1030
  scope?: string | undefined;
1034
1031
  prompt?: string | undefined;
1035
- code_challenge_method?: "S256" | "plain" | undefined;
1032
+ code_challenge_method?: CodeChallengeMethod | undefined;
1036
1033
  code_challenge?: string | undefined;
1037
1034
  ui_locales?: string | undefined;
1038
1035
  }>;
@@ -2277,10 +2274,7 @@ export declare const loginInsertSchema: z.ZodObject<{
2277
2274
  nonce: z.ZodOptional<z.ZodString>;
2278
2275
  scope: z.ZodOptional<z.ZodString>;
2279
2276
  prompt: z.ZodOptional<z.ZodString>;
2280
- code_challenge_method: z.ZodOptional<z.ZodEnum<[
2281
- "plain",
2282
- "S256"
2283
- ]>>;
2277
+ code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
2284
2278
  code_challenge: z.ZodOptional<z.ZodString>;
2285
2279
  username: z.ZodOptional<z.ZodString>;
2286
2280
  ui_locales: z.ZodOptional<z.ZodString>;
@@ -2297,7 +2291,7 @@ export declare const loginInsertSchema: z.ZodObject<{
2297
2291
  nonce?: string | undefined;
2298
2292
  scope?: string | undefined;
2299
2293
  prompt?: string | undefined;
2300
- code_challenge_method?: "S256" | "plain" | undefined;
2294
+ code_challenge_method?: CodeChallengeMethod | undefined;
2301
2295
  code_challenge?: string | undefined;
2302
2296
  ui_locales?: string | undefined;
2303
2297
  }, {
@@ -2313,7 +2307,7 @@ export declare const loginInsertSchema: z.ZodObject<{
2313
2307
  nonce?: string | undefined;
2314
2308
  scope?: string | undefined;
2315
2309
  prompt?: string | undefined;
2316
- code_challenge_method?: "S256" | "plain" | undefined;
2310
+ code_challenge_method?: CodeChallengeMethod | undefined;
2317
2311
  code_challenge?: string | undefined;
2318
2312
  ui_locales?: string | undefined;
2319
2313
  }>;
@@ -2336,7 +2330,7 @@ export declare const loginInsertSchema: z.ZodObject<{
2336
2330
  nonce?: string | undefined;
2337
2331
  scope?: string | undefined;
2338
2332
  prompt?: string | undefined;
2339
- code_challenge_method?: "S256" | "plain" | undefined;
2333
+ code_challenge_method?: CodeChallengeMethod | undefined;
2340
2334
  code_challenge?: string | undefined;
2341
2335
  ui_locales?: string | undefined;
2342
2336
  };
@@ -2359,7 +2353,7 @@ export declare const loginInsertSchema: z.ZodObject<{
2359
2353
  nonce?: string | undefined;
2360
2354
  scope?: string | undefined;
2361
2355
  prompt?: string | undefined;
2362
- code_challenge_method?: "S256" | "plain" | undefined;
2356
+ code_challenge_method?: CodeChallengeMethod | undefined;
2363
2357
  code_challenge?: string | undefined;
2364
2358
  ui_locales?: string | undefined;
2365
2359
  };
@@ -2386,10 +2380,7 @@ export declare const loginSchema: z.ZodObject<{
2386
2380
  nonce: z.ZodOptional<z.ZodString>;
2387
2381
  scope: z.ZodOptional<z.ZodString>;
2388
2382
  prompt: z.ZodOptional<z.ZodString>;
2389
- code_challenge_method: z.ZodOptional<z.ZodEnum<[
2390
- "plain",
2391
- "S256"
2392
- ]>>;
2383
+ code_challenge_method: z.ZodOptional<z.ZodNativeEnum<typeof CodeChallengeMethod>>;
2393
2384
  code_challenge: z.ZodOptional<z.ZodString>;
2394
2385
  username: z.ZodOptional<z.ZodString>;
2395
2386
  ui_locales: z.ZodOptional<z.ZodString>;
@@ -2406,7 +2397,7 @@ export declare const loginSchema: z.ZodObject<{
2406
2397
  nonce?: string | undefined;
2407
2398
  scope?: string | undefined;
2408
2399
  prompt?: string | undefined;
2409
- code_challenge_method?: "S256" | "plain" | undefined;
2400
+ code_challenge_method?: CodeChallengeMethod | undefined;
2410
2401
  code_challenge?: string | undefined;
2411
2402
  ui_locales?: string | undefined;
2412
2403
  }, {
@@ -2422,7 +2413,7 @@ export declare const loginSchema: z.ZodObject<{
2422
2413
  nonce?: string | undefined;
2423
2414
  scope?: string | undefined;
2424
2415
  prompt?: string | undefined;
2425
- code_challenge_method?: "S256" | "plain" | undefined;
2416
+ code_challenge_method?: CodeChallengeMethod | undefined;
2426
2417
  code_challenge?: string | undefined;
2427
2418
  ui_locales?: string | undefined;
2428
2419
  }>;
@@ -2448,7 +2439,7 @@ export declare const loginSchema: z.ZodObject<{
2448
2439
  nonce?: string | undefined;
2449
2440
  scope?: string | undefined;
2450
2441
  prompt?: string | undefined;
2451
- code_challenge_method?: "S256" | "plain" | undefined;
2442
+ code_challenge_method?: CodeChallengeMethod | undefined;
2452
2443
  code_challenge?: string | undefined;
2453
2444
  ui_locales?: string | undefined;
2454
2445
  };
@@ -2474,7 +2465,7 @@ export declare const loginSchema: z.ZodObject<{
2474
2465
  nonce?: string | undefined;
2475
2466
  scope?: string | undefined;
2476
2467
  prompt?: string | undefined;
2477
- code_challenge_method?: "S256" | "plain" | undefined;
2468
+ code_challenge_method?: CodeChallengeMethod | undefined;
2478
2469
  code_challenge?: string | undefined;
2479
2470
  ui_locales?: string | undefined;
2480
2471
  };
@@ -1,4 +1,4 @@
1
- function at(t, e) {
1
+ function it(t, e) {
2
2
  var n = {};
3
3
  for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && e.indexOf(s) < 0 && (n[s] = t[s]);
4
4
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -6,7 +6,7 @@ function at(t, e) {
6
6
  e.indexOf(s[a]) < 0 && Object.prototype.propertyIsEnumerable.call(t, s[a]) && (n[s[a]] = t[s[a]]);
7
7
  return n;
8
8
  }
9
- function it(t, e) {
9
+ function ot(t, e) {
10
10
  var n;
11
11
  return ((n = t == null ? void 0 : t._def) === null || n === void 0 ? void 0 : n.typeName) === e;
12
12
  }
@@ -17,19 +17,19 @@ function J(t, e) {
17
17
  return a._def.openapi = this._def.openapi, a;
18
18
  };
19
19
  }
20
- function ot(t) {
20
+ function dt(t) {
21
21
  if (typeof t.ZodType.prototype.openapi < "u")
22
22
  return;
23
23
  t.ZodType.prototype.openapi = function(a, i) {
24
24
  var o, d, u, l, m, x;
25
- const B = typeof a == "string" ? i : a, z = B ?? {}, { param: Ue } = z, nt = at(z, ["param"]), De = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof a == "string" ? { refId: a } : void 0), $e = Object.assign(Object.assign(Object.assign({}, (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata), nt), !((l = (u = this._def.openapi) === null || u === void 0 ? void 0 : u.metadata) === null || l === void 0) && l.param || Ue ? {
25
+ const B = typeof a == "string" ? i : a, z = B ?? {}, { param: Ue } = z, rt = it(z, ["param"]), De = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof a == "string" ? { refId: a } : void 0), $e = Object.assign(Object.assign(Object.assign({}, (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata), rt), !((l = (u = this._def.openapi) === null || u === void 0 ? void 0 : u.metadata) === null || l === void 0) && l.param || Ue ? {
26
26
  param: Object.assign(Object.assign({}, (x = (m = this._def.openapi) === null || m === void 0 ? void 0 : m.metadata) === null || x === void 0 ? void 0 : x.param), Ue)
27
27
  } : void 0), Ve = new this.constructor(Object.assign(Object.assign({}, this._def), { openapi: Object.assign(Object.assign({}, Object.keys(De).length > 0 ? { _internal: De } : void 0), Object.keys($e).length > 0 ? { metadata: $e } : void 0) }));
28
- if (it(this, "ZodObject")) {
29
- const rt = this.extend;
30
- Ve.extend = function(...st) {
28
+ if (ot(this, "ZodObject")) {
29
+ const st = this.extend;
30
+ Ve.extend = function(...at) {
31
31
  var we, Se, Te, Ee, Ce, Oe;
32
- const je = rt.apply(this, st);
32
+ const je = st.apply(this, at);
33
33
  return je._def.openapi = {
34
34
  _internal: {
35
35
  extendedFrom: !((Se = (we = this._def.openapi) === null || we === void 0 ? void 0 : we._internal) === null || Se === void 0) && Se.refId ? { refId: (Ee = (Te = this._def.openapi) === null || Te === void 0 ? void 0 : Te._internal) === null || Ee === void 0 ? void 0 : Ee.refId, schema: this } : (Ce = this._def.openapi) === null || Ce === void 0 ? void 0 : Ce._internal.extendedFrom
@@ -163,7 +163,7 @@ const f = b.arrayToEnum([
163
163
  "invalid_intersection_types",
164
164
  "not_multiple_of",
165
165
  "not_finite"
166
- ]), dt = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
166
+ ]), ct = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
167
167
  class T extends Error {
168
168
  constructor(e) {
169
169
  super(), this.issues = [], this.addIssue = (s) => {
@@ -281,7 +281,7 @@ const F = (t, e) => {
281
281
  return { message: n };
282
282
  };
283
283
  let ze = F;
284
- function ct(t) {
284
+ function lt(t) {
285
285
  ze = t;
286
286
  }
287
287
  function me() {
@@ -307,7 +307,7 @@ const _e = (t) => {
307
307
  path: i,
308
308
  message: d
309
309
  };
310
- }, lt = [];
310
+ }, ut = [];
311
311
  function p(t, e) {
312
312
  const n = me(), s = _e({
313
313
  issueData: e,
@@ -598,14 +598,14 @@ class v {
598
598
  return this.safeParse(null).success;
599
599
  }
600
600
  }
601
- const ut = /^c[^\s-]{8,}$/i, pt = /^[0-9a-z]+$/, ft = /^[0-9A-HJKMNP-TV-Z]{26}$/, ht = /^[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, mt = /^[a-z0-9_-]{21}$/i, _t = /^[-+]?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)?)??$/, gt = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, yt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
601
+ const pt = /^c[^\s-]{8,}$/i, ft = /^[0-9a-z]+$/, ht = /^[0-9A-HJKMNP-TV-Z]{26}$/, mt = /^[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, _t = /^[a-z0-9_-]{21}$/i, gt = /^[-+]?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)?)??$/, yt = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, vt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
602
602
  let Ie;
603
- const vt = /^(?:(?: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])$/, bt = /^(([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})))$/, kt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, He = "((\\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])))", xt = new RegExp(`^${He}$`);
603
+ const bt = /^(?:(?: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])$/, kt = /^(([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})))$/, xt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, He = "((\\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])))", wt = new RegExp(`^${He}$`);
604
604
  function qe(t) {
605
605
  let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
606
606
  return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
607
607
  }
608
- function wt(t) {
608
+ function St(t) {
609
609
  return new RegExp(`^${qe(t)}$`);
610
610
  }
611
611
  function Ge(t) {
@@ -613,8 +613,8 @@ function Ge(t) {
613
613
  const n = [];
614
614
  return n.push(t.local ? "Z?" : "Z"), t.offset && n.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${n.join("|")})`, new RegExp(`^${e}$`);
615
615
  }
616
- function St(t, e) {
617
- return !!((e === "v4" || !e) && vt.test(t) || (e === "v6" || !e) && bt.test(t));
616
+ function Tt(t, e) {
617
+ return !!((e === "v4" || !e) && bt.test(t) || (e === "v6" || !e) && kt.test(t));
618
618
  }
619
619
  class E extends v {
620
620
  _parse(e) {
@@ -665,43 +665,43 @@ class E extends v {
665
665
  message: i.message
666
666
  }), s.dirty());
667
667
  } else if (i.kind === "email")
668
- gt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
668
+ yt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
669
669
  validation: "email",
670
670
  code: c.invalid_string,
671
671
  message: i.message
672
672
  }), s.dirty());
673
673
  else if (i.kind === "emoji")
674
- Ie || (Ie = new RegExp(yt, "u")), Ie.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
674
+ Ie || (Ie = new RegExp(vt, "u")), Ie.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
675
675
  validation: "emoji",
676
676
  code: c.invalid_string,
677
677
  message: i.message
678
678
  }), s.dirty());
679
679
  else if (i.kind === "uuid")
680
- ht.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
680
+ mt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
681
681
  validation: "uuid",
682
682
  code: c.invalid_string,
683
683
  message: i.message
684
684
  }), s.dirty());
685
685
  else if (i.kind === "nanoid")
686
- mt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
686
+ _t.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
687
687
  validation: "nanoid",
688
688
  code: c.invalid_string,
689
689
  message: i.message
690
690
  }), s.dirty());
691
691
  else if (i.kind === "cuid")
692
- ut.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
692
+ pt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
693
693
  validation: "cuid",
694
694
  code: c.invalid_string,
695
695
  message: i.message
696
696
  }), s.dirty());
697
697
  else if (i.kind === "cuid2")
698
- pt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
698
+ ft.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
699
699
  validation: "cuid2",
700
700
  code: c.invalid_string,
701
701
  message: i.message
702
702
  }), s.dirty());
703
703
  else if (i.kind === "ulid")
704
- ft.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
704
+ ht.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
705
705
  validation: "ulid",
706
706
  code: c.invalid_string,
707
707
  message: i.message
@@ -736,23 +736,23 @@ class E extends v {
736
736
  code: c.invalid_string,
737
737
  validation: "datetime",
738
738
  message: i.message
739
- }), s.dirty()) : i.kind === "date" ? xt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
739
+ }), s.dirty()) : i.kind === "date" ? wt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
740
740
  code: c.invalid_string,
741
741
  validation: "date",
742
742
  message: i.message
743
- }), s.dirty()) : i.kind === "time" ? wt(i).test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
743
+ }), s.dirty()) : i.kind === "time" ? St(i).test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
744
744
  code: c.invalid_string,
745
745
  validation: "time",
746
746
  message: i.message
747
- }), s.dirty()) : i.kind === "duration" ? _t.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
747
+ }), s.dirty()) : i.kind === "duration" ? gt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
748
748
  validation: "duration",
749
749
  code: c.invalid_string,
750
750
  message: i.message
751
- }), s.dirty()) : i.kind === "ip" ? St(e.data, i.version) || (a = this._getOrReturnCtx(e, a), p(a, {
751
+ }), s.dirty()) : i.kind === "ip" ? Tt(e.data, i.version) || (a = this._getOrReturnCtx(e, a), p(a, {
752
752
  validation: "ip",
753
753
  code: c.invalid_string,
754
754
  message: i.message
755
- }), s.dirty()) : i.kind === "base64" ? kt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
755
+ }), s.dirty()) : i.kind === "base64" ? xt.test(e.data) || (a = this._getOrReturnCtx(e, a), p(a, {
756
756
  validation: "base64",
757
757
  code: c.invalid_string,
758
758
  message: i.message
@@ -974,7 +974,7 @@ E.create = (t) => {
974
974
  ...y(t)
975
975
  });
976
976
  };
977
- function Tt(t, e) {
977
+ function Et(t, e) {
978
978
  const n = (t.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, a = n > s ? n : s, i = parseInt(t.toFixed(a).replace(".", "")), o = parseInt(e.toFixed(a).replace(".", ""));
979
979
  return i % o / Math.pow(10, a);
980
980
  }
@@ -1013,7 +1013,7 @@ class P extends v {
1013
1013
  inclusive: i.inclusive,
1014
1014
  exact: !1,
1015
1015
  message: i.message
1016
- }), a.dirty()) : i.kind === "multipleOf" ? Tt(e.data, i.value) !== 0 && (s = this._getOrReturnCtx(e, s), p(s, {
1016
+ }), a.dirty()) : i.kind === "multipleOf" ? Et(e.data, i.value) !== 0 && (s = this._getOrReturnCtx(e, s), p(s, {
1017
1017
  code: c.not_multiple_of,
1018
1018
  multipleOf: i.value,
1019
1019
  message: i.message
@@ -2714,7 +2714,7 @@ ke.create = (t) => new ke({
2714
2714
  typeName: _.ZodNaN,
2715
2715
  ...y(t)
2716
2716
  });
2717
- const Et = Symbol("zod_brand");
2717
+ const Ct = Symbol("zod_brand");
2718
2718
  class Pe extends v {
2719
2719
  _parse(e) {
2720
2720
  const { ctx: n } = this._processInputParams(e), s = n.data;
@@ -2791,16 +2791,16 @@ function Ke(t, e = {}, n) {
2791
2791
  }
2792
2792
  }) : K.create();
2793
2793
  }
2794
- const Ct = {
2794
+ const Ot = {
2795
2795
  object: k.lazycreate
2796
2796
  };
2797
2797
  var _;
2798
2798
  (function(t) {
2799
2799
  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";
2800
2800
  })(_ || (_ = {}));
2801
- const Ot = (t, e = {
2801
+ const jt = (t, e = {
2802
2802
  message: `Input not instance of ${t.name}`
2803
- }) => Ke((n) => n instanceof t, e), Ye = E.create, Je = P.create, jt = ke.create, It = M.create, Qe = ne.create, Nt = V.create, Zt = ye.create, Rt = re.create, At = se.create, Pt = K.create, Mt = $.create, Ut = R.create, Dt = ve.create, $t = C.create, Vt = k.create, Lt = k.strictCreate, Bt = ae.create, zt = xe.create, Wt = ie.create, Ht = N.create, qt = oe.create, Gt = be.create, Ft = L.create, Kt = G.create, Yt = de.create, Jt = ce.create, Qt = U.create, Xt = le.create, en = Y.create, Be = O.create, tn = j.create, nn = D.create, rn = O.createWithPreprocess, sn = he.create, an = () => Ye().optional(), on = () => Je().optional(), dn = () => Qe().optional(), cn = {
2803
+ }) => Ke((n) => n instanceof t, e), Ye = E.create, Je = P.create, It = ke.create, Nt = M.create, Qe = ne.create, Zt = V.create, Rt = ye.create, At = re.create, Pt = se.create, Mt = K.create, Ut = $.create, Dt = R.create, $t = ve.create, Vt = C.create, Lt = k.create, Bt = k.strictCreate, zt = ae.create, Wt = xe.create, Ht = ie.create, qt = N.create, Gt = oe.create, Ft = be.create, Kt = L.create, Yt = G.create, Jt = de.create, Qt = ce.create, Xt = U.create, en = le.create, tn = Y.create, Be = O.create, nn = j.create, rn = D.create, sn = O.createWithPreprocess, an = he.create, on = () => Ye().optional(), dn = () => Je().optional(), cn = () => Qe().optional(), ln = {
2804
2804
  string: (t) => E.create({ ...t, coerce: !0 }),
2805
2805
  number: (t) => P.create({ ...t, coerce: !0 }),
2806
2806
  boolean: (t) => ne.create({
@@ -2809,14 +2809,14 @@ const Ot = (t, e = {
2809
2809
  }),
2810
2810
  bigint: (t) => M.create({ ...t, coerce: !0 }),
2811
2811
  date: (t) => V.create({ ...t, coerce: !0 })
2812
- }, ln = g;
2812
+ }, un = g;
2813
2813
  var r = /* @__PURE__ */ Object.freeze({
2814
2814
  __proto__: null,
2815
2815
  defaultErrorMap: F,
2816
- setErrorMap: ct,
2816
+ setErrorMap: lt,
2817
2817
  getErrorMap: me,
2818
2818
  makeIssue: _e,
2819
- EMPTY_PATH: lt,
2819
+ EMPTY_PATH: ut,
2820
2820
  addIssueToContext: p,
2821
2821
  ParseStatus: w,
2822
2822
  INVALID: g,
@@ -2870,63 +2870,63 @@ var r = /* @__PURE__ */ Object.freeze({
2870
2870
  ZodDefault: ue,
2871
2871
  ZodCatch: pe,
2872
2872
  ZodNaN: ke,
2873
- BRAND: Et,
2873
+ BRAND: Ct,
2874
2874
  ZodBranded: Pe,
2875
2875
  ZodPipeline: he,
2876
2876
  ZodReadonly: fe,
2877
2877
  custom: Ke,
2878
2878
  Schema: v,
2879
2879
  ZodSchema: v,
2880
- late: Ct,
2880
+ late: Ot,
2881
2881
  get ZodFirstPartyTypeKind() {
2882
2882
  return _;
2883
2883
  },
2884
- coerce: cn,
2885
- any: Pt,
2886
- array: $t,
2887
- bigint: It,
2884
+ coerce: ln,
2885
+ any: Mt,
2886
+ array: Vt,
2887
+ bigint: Nt,
2888
2888
  boolean: Qe,
2889
- date: Nt,
2890
- discriminatedUnion: zt,
2889
+ date: Zt,
2890
+ discriminatedUnion: Wt,
2891
2891
  effect: Be,
2892
- enum: Qt,
2893
- function: Kt,
2894
- instanceof: Ot,
2895
- intersection: Wt,
2896
- lazy: Yt,
2897
- literal: Jt,
2898
- map: Gt,
2899
- nan: jt,
2900
- nativeEnum: Xt,
2901
- never: Ut,
2902
- null: At,
2903
- nullable: nn,
2892
+ enum: Xt,
2893
+ function: Yt,
2894
+ instanceof: jt,
2895
+ intersection: Ht,
2896
+ lazy: Jt,
2897
+ literal: Qt,
2898
+ map: Ft,
2899
+ nan: It,
2900
+ nativeEnum: en,
2901
+ never: Dt,
2902
+ null: Pt,
2903
+ nullable: rn,
2904
2904
  number: Je,
2905
- object: Vt,
2906
- oboolean: dn,
2907
- onumber: on,
2908
- optional: tn,
2909
- ostring: an,
2910
- pipeline: sn,
2911
- preprocess: rn,
2912
- promise: en,
2913
- record: qt,
2914
- set: Ft,
2915
- strictObject: Lt,
2905
+ object: Lt,
2906
+ oboolean: cn,
2907
+ onumber: dn,
2908
+ optional: nn,
2909
+ ostring: on,
2910
+ pipeline: an,
2911
+ preprocess: sn,
2912
+ promise: tn,
2913
+ record: Gt,
2914
+ set: Kt,
2915
+ strictObject: Bt,
2916
2916
  string: Ye,
2917
- symbol: Zt,
2917
+ symbol: Rt,
2918
2918
  transformer: Be,
2919
- tuple: Ht,
2920
- undefined: Rt,
2921
- union: Bt,
2922
- unknown: Mt,
2923
- void: Dt,
2924
- NEVER: ln,
2919
+ tuple: qt,
2920
+ undefined: At,
2921
+ union: zt,
2922
+ unknown: Ut,
2923
+ void: $t,
2924
+ NEVER: un,
2925
2925
  ZodIssueCode: c,
2926
- quotelessJson: dt,
2926
+ quotelessJson: ct,
2927
2927
  ZodError: T
2928
2928
  });
2929
- ot(r);
2929
+ dt(r);
2930
2930
  const Hn = r.object({
2931
2931
  start: r.number(),
2932
2932
  limit: r.number(),
@@ -2934,7 +2934,7 @@ const Hn = r.object({
2934
2934
  }), Me = r.object({
2935
2935
  created_at: r.string(),
2936
2936
  updated_at: r.string()
2937
- }), un = r.object({
2937
+ }), pn = r.object({
2938
2938
  email: r.string().optional(),
2939
2939
  email_verified: r.boolean().optional(),
2940
2940
  name: r.string().optional(),
@@ -2943,7 +2943,7 @@ const Hn = r.object({
2943
2943
  phone_number: r.string().optional(),
2944
2944
  phone_verified: r.boolean().optional(),
2945
2945
  family_name: r.string().optional()
2946
- }).catchall(r.any()), pn = r.object({
2946
+ }).catchall(r.any()), fn = r.object({
2947
2947
  connection: r.string(),
2948
2948
  user_id: r.string(),
2949
2949
  provider: r.string(),
@@ -2951,7 +2951,7 @@ const Hn = r.object({
2951
2951
  access_token: r.string().optional(),
2952
2952
  access_token_secret: r.string().optional(),
2953
2953
  refresh_token: r.string().optional(),
2954
- profileData: un.optional()
2954
+ profileData: pn.optional()
2955
2955
  }), Xe = r.object({
2956
2956
  email: r.string().optional(),
2957
2957
  username: r.string().optional(),
@@ -2966,7 +2966,7 @@ const Hn = r.object({
2966
2966
  user_id: r.string().optional(),
2967
2967
  app_metadata: r.any().default({}).optional(),
2968
2968
  user_metadata: r.any().default({}).optional()
2969
- }), fn = Xe.extend({
2969
+ }), hn = Xe.extend({
2970
2970
  email_verified: r.boolean().default(!1),
2971
2971
  verify_email: r.boolean().optional(),
2972
2972
  last_ip: r.string().optional(),
@@ -2974,30 +2974,30 @@ const Hn = r.object({
2974
2974
  user_id: r.string().optional(),
2975
2975
  provider: r.string().default("email"),
2976
2976
  connection: r.string().default("email")
2977
- }), hn = r.object({
2978
- ...fn.shape,
2977
+ }), mn = r.object({
2978
+ ...hn.shape,
2979
2979
  ...Me.shape,
2980
2980
  user_id: r.string(),
2981
2981
  // TODO: this not might be correct if you use the username
2982
2982
  email: r.string(),
2983
2983
  is_social: r.boolean(),
2984
2984
  login_count: r.number(),
2985
- identities: r.array(pn).optional()
2986
- }), qn = hn, Gn = Xe.extend({
2985
+ identities: r.array(fn).optional()
2986
+ }), qn = mn, Gn = Xe.extend({
2987
2987
  email: r.string(),
2988
2988
  login_count: r.number(),
2989
2989
  multifactor: r.array(r.string()).optional(),
2990
2990
  last_ip: r.string().optional(),
2991
2991
  last_login: r.string().optional(),
2992
2992
  user_id: r.string()
2993
- }).catchall(r.any()), mn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2994
- let _n = (t = 21) => {
2993
+ }).catchall(r.any()), _n = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2994
+ let gn = (t = 21) => {
2995
2995
  let e = "", n = crypto.getRandomValues(new Uint8Array(t));
2996
2996
  for (; t--; )
2997
- e += mn[n[t] & 63];
2997
+ e += _n[n[t] & 63];
2998
2998
  return e;
2999
2999
  };
3000
- const gn = r.object({
3000
+ const yn = r.object({
3001
3001
  audience: r.string().optional(),
3002
3002
  recipient: r.string().optional(),
3003
3003
  createUpnClaim: r.boolean().optional(),
@@ -3014,7 +3014,7 @@ const gn = r.object({
3014
3014
  nameIdentifierProbes: r.array(r.string()).optional(),
3015
3015
  authnContextClassRef: r.string().optional(),
3016
3016
  mappings: r.record(r.string()).optional()
3017
- }), yn = r.object({
3017
+ }), vn = r.object({
3018
3018
  id: r.string(),
3019
3019
  name: r.string(),
3020
3020
  callbacks: r.array(r.string()).default([]).optional().openapi({
@@ -3033,23 +3033,23 @@ const gn = r.object({
3033
3033
  description: "Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients"
3034
3034
  }),
3035
3035
  addons: r.object({
3036
- samlp: gn.optional()
3036
+ samlp: yn.optional()
3037
3037
  }).default({}).optional().openapi({
3038
3038
  description: "Addons associated with the client. The key is the addon's package name and the value is an object with the configuration for the addon."
3039
3039
  }),
3040
3040
  email_validation: r.enum(["enabled", "disabled", "enforced"]).default("enforced").optional().openapi({
3041
3041
  description: "Defines if it possible to sign in with an unverified email and if verification emails will be sent. This is not available in auth0"
3042
3042
  }),
3043
- client_secret: r.string().default(() => _n()).optional(),
3043
+ client_secret: r.string().default(() => gn()).optional(),
3044
3044
  disable_sign_ups: r.boolean().optional().default(!1).openapi({
3045
3045
  description: "Prevents users from signing up using the hosted login page. This is not available in auth0"
3046
3046
  })
3047
- }), vn = r.object({
3047
+ }), bn = r.object({
3048
3048
  created_at: r.string().transform((t) => t === null ? "" : t),
3049
3049
  updated_at: r.string().transform((t) => t === null ? "" : t),
3050
- ...yn.shape
3050
+ ...vn.shape
3051
3051
  });
3052
- var et = /* @__PURE__ */ ((t) => (t.TOKEN = "token", t.TOKEN_ID_TOKEN = "token id_token", t.CODE = "code", t))(et || {}), tt = /* @__PURE__ */ ((t) => (t.QUERY = "query", t.FRAGMENT = "fragment", t.FORM_POST = "form_post", t.WEB_MESSAGE = "web_message", t.SAML_POST = "saml_post", t))(tt || {}), bn = /* @__PURE__ */ ((t) => (t.S265 = "S256", t.plain = "plain", t))(bn || {});
3052
+ var et = /* @__PURE__ */ ((t) => (t.TOKEN = "token", t.TOKEN_ID_TOKEN = "token id_token", t.CODE = "code", t))(et || {}), tt = /* @__PURE__ */ ((t) => (t.QUERY = "query", t.FRAGMENT = "fragment", t.FORM_POST = "form_post", t.WEB_MESSAGE = "web_message", t.SAML_POST = "saml_post", t))(tt || {}), nt = /* @__PURE__ */ ((t) => (t.S256 = "S256", t.Plain = "plain", t))(nt || {});
3053
3053
  const kn = r.object({
3054
3054
  client_id: r.string(),
3055
3055
  vendor_id: r.string().optional(),
@@ -3062,7 +3062,7 @@ const kn = r.object({
3062
3062
  nonce: r.string().optional(),
3063
3063
  scope: r.string().optional(),
3064
3064
  prompt: r.string().optional(),
3065
- code_challenge_method: r.enum(["plain", "S256"]).optional(),
3065
+ code_challenge_method: r.nativeEnum(nt).optional(),
3066
3066
  code_challenge: r.string().optional(),
3067
3067
  username: r.string().optional(),
3068
3068
  ui_locales: r.string().optional()
@@ -3161,7 +3161,7 @@ const kn = r.object({
3161
3161
  email_service: r.union([r.literal("mailgun"), r.literal("mailchannels")]).optional()
3162
3162
  });
3163
3163
  r.object({
3164
- ...vn.shape,
3164
+ ...bn.shape,
3165
3165
  domains: r.array(En),
3166
3166
  tenant: Tn,
3167
3167
  connections: r.array(wn)
@@ -3511,11 +3511,11 @@ export {
3511
3511
  Pn as Auth0Client,
3512
3512
  tt as AuthorizationResponseMode,
3513
3513
  et as AuthorizationResponseType,
3514
- bn as CodeChallengeMethod,
3514
+ nt as CodeChallengeMethod,
3515
3515
  Dn as GrantType,
3516
3516
  Rn as LogTypes,
3517
- yn as applicationInsertSchema,
3518
- vn as applicationSchema,
3517
+ vn as applicationInsertSchema,
3518
+ bn as applicationSchema,
3519
3519
  qn as auth0UserResponseSchema,
3520
3520
  kn as authParamsSchema,
3521
3521
  Xe as baseUserSchema,
@@ -3534,7 +3534,7 @@ export {
3534
3534
  Ln as fontsSchema,
3535
3535
  In as hookInsertSchema,
3536
3536
  Qn as hookSchema,
3537
- pn as identitySchema,
3537
+ fn as identitySchema,
3538
3538
  Xn as jwksKeySchema,
3539
3539
  Nn as jwksSchema,
3540
3540
  nr as logSchema,
@@ -3545,9 +3545,9 @@ export {
3545
3545
  cr as parseUserId,
3546
3546
  Mn as passwordInsertSchema,
3547
3547
  rr as passwordSchema,
3548
- un as profileDataSchema,
3548
+ pn as profileDataSchema,
3549
3549
  or as promptSettingSchema,
3550
- gn as samlpAddon,
3550
+ yn as samlpAddon,
3551
3551
  Un as sessionInsertSchema,
3552
3552
  sr as sessionSchema,
3553
3553
  ar as signingKeySchema,
@@ -3556,9 +3556,9 @@ export {
3556
3556
  Wn as themeInsertSchema,
3557
3557
  ir as themeSchema,
3558
3558
  Hn as totalsSchema,
3559
- fn as userInsertSchema,
3559
+ hn as userInsertSchema,
3560
3560
  Gn as userResponseSchema,
3561
- hn as userSchema,
3561
+ mn as userSchema,
3562
3562
  Kn as vendorSettingsSchema,
3563
3563
  zn as widgetSchema
3564
3564
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/markusahlstrand/authhero"
13
13
  },
14
- "version": "0.27.0",
14
+ "version": "0.29.0",
15
15
  "files": [
16
16
  "dist"
17
17
  ],