react-luminus-components 2.1.8 → 2.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/.vite/manifest.json +191 -50
  2. package/dist/Alert-BApdinGX.cjs +1 -0
  3. package/dist/Alert-D2Bw906t.js +495 -0
  4. package/dist/DelegationContext-B1WXROG2.cjs +201 -0
  5. package/dist/DelegationContext-CCnk58PI.js +3156 -0
  6. package/dist/HelmetContext-ChKPef74.js +49 -0
  7. package/dist/HelmetContext-DDQ-Phg7.cjs +1 -0
  8. package/dist/PrimaryButton-D7r0m8xi.js +742 -0
  9. package/dist/PrimaryButton-D91b3Dmv.cjs +1 -0
  10. package/dist/SimpleTooltip-B00uLuVM.cjs +1 -0
  11. package/dist/SimpleTooltip-dwOOgecT.js +1642 -0
  12. package/dist/Typography-C5KJzU5O.js +1627 -0
  13. package/dist/Typography-Fo21SeyJ.cjs +20 -0
  14. package/dist/UserContext-45ZxeQHB.cjs +1 -0
  15. package/dist/UserContext-ZsTsf5Xe.js +270 -0
  16. package/dist/contexts.cjs.js +1 -1
  17. package/dist/contexts.es.js +1773 -852
  18. package/dist/dateUtils-CXm9PEh6.cjs +1 -0
  19. package/dist/dateUtils-ayErBYbI.js +1488 -0
  20. package/dist/hooks.cjs.js +1 -1
  21. package/dist/hooks.es.js +118 -123
  22. package/dist/index-4IYT9u10.js +95 -0
  23. package/dist/index-jmbq5h95.cjs +25 -0
  24. package/dist/layout.cjs.js +1 -1
  25. package/dist/layout.es.js +97 -98
  26. package/dist/localStorageUtils-BSATUi5m.cjs +1 -0
  27. package/dist/localStorageUtils-DNgjNynk.js +1070 -0
  28. package/dist/main.cjs.js +56 -7
  29. package/dist/main.es.js +36660 -11628
  30. package/dist/models/texts/ApprovalTexts.d.ts +1 -0
  31. package/dist/style.css +1 -1
  32. package/dist/useIsFormDirty-76y8Dca-.cjs +1 -0
  33. package/dist/useIsFormDirty-Ba5uhPH7.js +3257 -0
  34. package/dist/useWindowSize-7W91GsJQ.js +56 -0
  35. package/dist/useWindowSize-CLoDaEYh.cjs +1 -0
  36. package/dist/utils.cjs.js +1 -1
  37. package/dist/utils.es.js +79 -85
  38. package/package.json +10 -1
  39. package/dist/FormDisabledProvider-D-DRODSt.js +0 -51
  40. package/dist/FormDisabledProvider-Dt39yr7W.cjs +0 -1
  41. package/dist/localStorageUtils-CVwJ9FKd.cjs +0 -1
  42. package/dist/localStorageUtils-TeLq8MHE.js +0 -59
  43. package/dist/nivo-bar-D6NJLYWS.js +0 -39616
  44. package/dist/nivo-bar-SBWBmyeI.cjs +0 -293
  45. package/dist/useIsFormDirty-CZ4jNRFn.js +0 -117
  46. package/dist/useIsFormDirty-Crsu8mjo.cjs +0 -1
  47. package/dist/useLocalStorageState-Ca7olZgH.cjs +0 -1
  48. package/dist/useLocalStorageState-DtBc-C2W.js +0 -25
@@ -0,0 +1 @@
1
+ "use strict";const qe=require("./index-jmbq5h95.cjs"),tt=require("./UserContext-45ZxeQHB.cjs"),rt=require("./dateUtils-CXm9PEh6.cjs"),H=require("react"),gt=require("react-router"),Ie=require("./queryStorage-Dk70bkj7.cjs"),_t=require("./DelegationContext-B1WXROG2.cjs"),vt=require("react-hook-form");var x;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{const a={};for(const i of s)a[i]=i;return a},t.getValidEnumValues=s=>{const a=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of a)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(a){return s[a]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const a=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&a.push(i);return a},t.find=(s,a)=>{for(const i of s)if(a(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function n(s,a=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}t.joinValues=n,t.jsonStringifyReplacer=(s,a)=>typeof a=="bigint"?a.toString():a})(x||(x={}));var We;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(We||(We={}));const f=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),D=t=>{switch(typeof t){case"undefined":return f.undefined;case"string":return f.string;case"number":return Number.isNaN(t)?f.nan:f.number;case"boolean":return f.boolean;case"function":return f.function;case"bigint":return f.bigint;case"symbol":return f.symbol;case"object":return Array.isArray(t)?f.array:t===null?f.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?f.promise:typeof Map<"u"&&t instanceof Map?f.map:typeof Set<"u"&&t instanceof Set?f.set:typeof Date<"u"&&t instanceof Date?f.date:f.object;default:return f.unknown}},c=x.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"]),xt=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class O extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(a){return a.message},n={_errors:[]},s=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)n._errors.push(r(i));else{let o=n,u=0;for(;u<i.path.length;){const d=i.path[u];u===i.path.length-1?(o[d]=o[d]||{_errors:[]},o[d]._errors.push(r(i))):o[d]=o[d]||{_errors:[]},o=o[d],u++}}};return s(this),n}static assert(e){if(!(e instanceof O))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const s of this.issues)if(s.path.length>0){const a=s.path[0];r[a]=r[a]||[],r[a].push(e(s))}else n.push(e(s));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}O.create=t=>new O(t);const oe=(t,e)=>{let r;switch(t.code){case c.invalid_type:t.received===f.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case c.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,x.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:r=`Unrecognized key(s) in object: ${x.joinValues(t.keys,", ")}`;break;case c.invalid_union:r="Invalid input";break;case c.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${x.joinValues(t.options)}`;break;case c.invalid_enum_value:r=`Invalid enum value. Expected ${x.joinValues(t.options)}, received '${t.received}'`;break;case c.invalid_arguments:r="Invalid function arguments";break;case c.invalid_return_type:r="Invalid function return type";break;case c.invalid_date:r="Invalid date";break;case c.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:x.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case c.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case c.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case c.custom:r="Invalid input";break;case c.invalid_intersection_types:r="Intersection results could not be merged";break;case c.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case c.not_finite:r="Number must be finite";break;default:r=e.defaultError,x.assertNever(t)}return{message:r}};let nt=oe;function bt(t){nt=t}function Ze(){return nt}const je=t=>{const{data:e,path:r,errorMaps:n,issueData:s}=t,a=[...r,...s.path||[]],i={...s,path:a};if(s.message!==void 0)return{...s,path:a,message:s.message};let o="";const u=n.filter(d=>!!d).slice().reverse();for(const d of u)o=d(i,{data:e,defaultError:o}).message;return{...s,path:a,message:o}},kt=[];function l(t,e){const r=Ze(),n=je({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===oe?void 0:oe].filter(s=>!!s)});t.common.issues.push(n)}class S{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const s of r){if(s.status==="aborted")return p;s.status==="dirty"&&e.dirty(),n.push(s.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const s of r){const a=await s.key,i=await s.value;n.push({key:a,value:i})}return S.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const s of r){const{key:a,value:i}=s;if(a.status==="aborted"||i.status==="aborted")return p;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||s.alwaysSet)&&(n[a.value]=i.value)}return{status:e.value,value:n}}}const p=Object.freeze({status:"aborted"}),se=t=>({status:"dirty",value:t}),C=t=>({status:"valid",value:t}),Je=t=>t.status==="aborted",Qe=t=>t.status==="dirty",X=t=>t.status==="valid",he=t=>typeof Promise<"u"&&t instanceof Promise;var m;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(m||(m={}));class M{constructor(e,r,n,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Xe=(t,e)=>{if(X(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 r=new O(t.common.issues);return this._error=r,this._error}}};function _(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:s}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(i,o)=>{const{message:u}=t;return i.code==="invalid_enum_value"?{message:u??o.defaultError}:typeof o.data>"u"?{message:u??n??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:u??r??o.defaultError}},description:s}}class v{get description(){return this._def.description}_getType(e){return D(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:D(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:D(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(he(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){const n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:D(e)},s=this._parseSync({data:e,path:n.path,parent:n});return Xe(n,s)}"~validate"(e){var n,s;const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:D(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:r});return X(a)?{value:a.value}:{issues:r.common.issues}}catch(a){(s=(n=a==null?void 0:a.message)==null?void 0:n.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(a=>X(a)?{value:a.value}:{issues:r.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:D(e)},s=this._parse({data:e,path:n.path,parent:n}),a=await(he(s)?s:Promise.resolve(s));return Xe(n,a)}refine(e,r){const n=s=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,a)=>{const i=e(s),o=()=>a.addIssue({code:c.custom,...n(s)});return typeof Promise<"u"&&i instanceof Promise?i.then(u=>u?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,r){return this._refinement((n,s)=>e(n)?!0:(s.addIssue(typeof r=="function"?r(n,s):r),!1))}_refinement(e){return new Z({schema:this,typeName:g.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return $.create(this,this._def)}nullable(){return Q.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return I.create(this)}promise(){return ue.create(this,this._def)}or(e){return ge.create([this,e],this._def)}and(e){return _e.create(this,e,this._def)}transform(e){return new Z({..._(this._def),schema:this,typeName:g.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new we({..._(this._def),innerType:this,defaultValue:r,typeName:g.ZodDefault})}brand(){return new He({typeName:g.ZodBranded,type:this,..._(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new Te({..._(this._def),innerType:this,catchValue:r,typeName:g.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Ce.create(this,e)}readonly(){return Se.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const wt=/^c[^\s-]{8,}$/i,Tt=/^[0-9a-z]+$/,St=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ct=/^[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,Nt=/^[a-z0-9_-]{21}$/i,Rt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Et=/^[-+]?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)?)??$/,Ot=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,At="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Be;const It=/^(?:(?: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])$/,Zt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,jt=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,$t=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Mt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,zt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,st="((\\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])))",Pt=new RegExp(`^${st}$`);function at(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function qt(t){return new RegExp(`^${at(t)}$`)}function it(t){let e=`${st}T${at(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Lt(t,e){return!!((e==="v4"||!e)&&It.test(t)||(e==="v6"||!e)&&jt.test(t))}function Dt(t,e){if(!Rt.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),s=JSON.parse(atob(n));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||e&&s.alg!==e)}catch{return!1}}function Vt(t,e){return!!((e==="v4"||!e)&&Zt.test(t)||(e==="v6"||!e)&&$t.test(t))}class A extends v{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==f.string){const a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:f.string,received:a.parsedType}),p}const n=new S;let s;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="max")e.data.length>a.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),n.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.length<a.value;(i||o)&&(s=this._getOrReturnCtx(e,s),i?l(s,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&l(s,{code:c.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),n.dirty())}else if(a.kind==="email")Ot.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"email",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="emoji")Be||(Be=new RegExp(At,"u")),Be.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"emoji",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="uuid")Ct.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"uuid",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="nanoid")Nt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"nanoid",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid")wt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"cuid",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="cuid2")Tt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"cuid2",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="ulid")St.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"ulid",code:c.invalid_string,message:a.message}),n.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),l(s,{validation:"url",code:c.invalid_string,message:a.message}),n.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"regex",code:c.invalid_string,message:a.message}),n.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),n.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.invalid_string,validation:{startsWith:a.value},message:a.message}),n.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.invalid_string,validation:{endsWith:a.value},message:a.message}),n.dirty()):a.kind==="datetime"?it(a).test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.invalid_string,validation:"datetime",message:a.message}),n.dirty()):a.kind==="date"?Pt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.invalid_string,validation:"date",message:a.message}),n.dirty()):a.kind==="time"?qt(a).test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{code:c.invalid_string,validation:"time",message:a.message}),n.dirty()):a.kind==="duration"?Et.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"duration",code:c.invalid_string,message:a.message}),n.dirty()):a.kind==="ip"?Lt(e.data,a.version)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"ip",code:c.invalid_string,message:a.message}),n.dirty()):a.kind==="jwt"?Dt(e.data,a.alg)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"jwt",code:c.invalid_string,message:a.message}),n.dirty()):a.kind==="cidr"?Vt(e.data,a.version)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"cidr",code:c.invalid_string,message:a.message}),n.dirty()):a.kind==="base64"?Mt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"base64",code:c.invalid_string,message:a.message}),n.dirty()):a.kind==="base64url"?zt.test(e.data)||(s=this._getOrReturnCtx(e,s),l(s,{validation:"base64url",code:c.invalid_string,message:a.message}),n.dirty()):x.assertNever(a);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(s=>e.test(s),{validation:r,code:c.invalid_string,...m.errToObj(n)})}_addCheck(e){return new A({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...m.errToObj(e)})}url(e){return this._addCheck({kind:"url",...m.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...m.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...m.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...m.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...m.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...m.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...m.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...m.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...m.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...m.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...m.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...m.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...m.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,...m.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...m.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...m.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...m.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...m.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...m.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...m.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...m.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...m.errToObj(r)})}nonempty(e){return this.min(1,m.errToObj(e))}trim(){return new A({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new A({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new A({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}A.create=t=>new A({checks:[],typeName:g.ZodString,coerce:(t==null?void 0:t.coerce)??!1,..._(t)});function Ft(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,s=r>n?r:n,a=Number.parseInt(t.toFixed(s).replace(".","")),i=Number.parseInt(e.toFixed(s).replace(".",""));return a%i/10**s}class B 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)!==f.number){const a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:f.number,received:a.parsedType}),p}let n;const s=new S;for(const a of this._def.checks)a.kind==="int"?x.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),s.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),s.dirty()):a.kind==="multipleOf"?Ft(e.data,a.value)!==0&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),l(n,{code:c.not_finite,message:a.message}),s.dirty()):x.assertNever(a);return{status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,m.toString(r))}gt(e,r){return this.setLimit("min",e,!1,m.toString(r))}lte(e,r){return this.setLimit("max",e,!0,m.toString(r))}lt(e,r){return this.setLimit("max",e,!1,m.toString(r))}setLimit(e,r,n,s){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:m.toString(s)}]})}_addCheck(e){return new B({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:m.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:m.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:m.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:m.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:m.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:m.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:m.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:m.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:m.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}B.create=t=>new B({checks:[],typeName:g.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,..._(t)});class W extends v{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==f.bigint)return this._getInvalidInput(e);let n;const s=new S;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),s.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),l(n,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),s.dirty()):x.assertNever(a);return{status:s.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return l(r,{code:c.invalid_type,expected:f.bigint,received:r.parsedType}),p}gte(e,r){return this.setLimit("min",e,!0,m.toString(r))}gt(e,r){return this.setLimit("min",e,!1,m.toString(r))}lte(e,r){return this.setLimit("max",e,!0,m.toString(r))}lt(e,r){return this.setLimit("max",e,!1,m.toString(r))}setLimit(e,r,n,s){return new W({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:m.toString(s)}]})}_addCheck(e){return new W({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:m.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:m.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:m.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:m.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:m.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}W.create=t=>new W({checks:[],typeName:g.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,..._(t)});class me extends v{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==f.boolean){const n=this._getOrReturnCtx(e);return l(n,{code:c.invalid_type,expected:f.boolean,received:n.parsedType}),p}return C(e.data)}}me.create=t=>new me({typeName:g.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,..._(t)});class K extends v{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==f.date){const a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_type,expected:f.date,received:a.parsedType}),p}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return l(a,{code:c.invalid_date}),p}const n=new S;let s;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),n.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(s=this._getOrReturnCtx(e,s),l(s,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),n.dirty()):x.assertNever(a);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:m.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:m.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}K.create=t=>new K({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:g.ZodDate,..._(t)});class $e extends v{_parse(e){if(this._getType(e)!==f.symbol){const n=this._getOrReturnCtx(e);return l(n,{code:c.invalid_type,expected:f.symbol,received:n.parsedType}),p}return C(e.data)}}$e.create=t=>new $e({typeName:g.ZodSymbol,..._(t)});class pe extends v{_parse(e){if(this._getType(e)!==f.undefined){const n=this._getOrReturnCtx(e);return l(n,{code:c.invalid_type,expected:f.undefined,received:n.parsedType}),p}return C(e.data)}}pe.create=t=>new pe({typeName:g.ZodUndefined,..._(t)});class ye extends v{_parse(e){if(this._getType(e)!==f.null){const n=this._getOrReturnCtx(e);return l(n,{code:c.invalid_type,expected:f.null,received:n.parsedType}),p}return C(e.data)}}ye.create=t=>new ye({typeName:g.ZodNull,..._(t)});class ce extends v{constructor(){super(...arguments),this._any=!0}_parse(e){return C(e.data)}}ce.create=t=>new ce({typeName:g.ZodAny,..._(t)});class Y extends v{constructor(){super(...arguments),this._unknown=!0}_parse(e){return C(e.data)}}Y.create=t=>new Y({typeName:g.ZodUnknown,..._(t)});class V extends v{_parse(e){const r=this._getOrReturnCtx(e);return l(r,{code:c.invalid_type,expected:f.never,received:r.parsedType}),p}}V.create=t=>new V({typeName:g.ZodNever,..._(t)});class Me extends v{_parse(e){if(this._getType(e)!==f.undefined){const n=this._getOrReturnCtx(e);return l(n,{code:c.invalid_type,expected:f.void,received:n.parsedType}),p}return C(e.data)}}Me.create=t=>new Me({typeName:g.ZodVoid,..._(t)});class I extends v{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),s=this._def;if(r.parsedType!==f.array)return l(r,{code:c.invalid_type,expected:f.array,received:r.parsedType}),p;if(s.exactLength!==null){const i=r.data.length>s.exactLength.value,o=r.data.length<s.exactLength.value;(i||o)&&(l(r,{code:i?c.too_big:c.too_small,minimum:o?s.exactLength.value:void 0,maximum:i?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),n.dirty())}if(s.minLength!==null&&r.data.length<s.minLength.value&&(l(r,{code:c.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),n.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(l(r,{code:c.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((i,o)=>s.type._parseAsync(new M(r,i,r.path,o)))).then(i=>S.mergeArray(n,i));const a=[...r.data].map((i,o)=>s.type._parseSync(new M(r,i,r.path,o)));return S.mergeArray(n,a)}get element(){return this._def.type}min(e,r){return new I({...this._def,minLength:{value:e,message:m.toString(r)}})}max(e,r){return new I({...this._def,maxLength:{value:e,message:m.toString(r)}})}length(e,r){return new I({...this._def,exactLength:{value:e,message:m.toString(r)}})}nonempty(e){return this.min(1,e)}}I.create=(t,e)=>new I({type:t,minLength:null,maxLength:null,exactLength:null,typeName:g.ZodArray,..._(e)});function ne(t){if(t instanceof b){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=$.create(ne(n))}return new b({...t._def,shape:()=>e})}else return t instanceof I?new I({...t._def,type:ne(t.element)}):t instanceof $?$.create(ne(t.unwrap())):t instanceof Q?Q.create(ne(t.unwrap())):t instanceof z?z.create(t.items.map(e=>ne(e))):t}class b 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(),r=x.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==f.object){const d=this._getOrReturnCtx(e);return l(d,{code:c.invalid_type,expected:f.object,received:d.parsedType}),p}const{status:n,ctx:s}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof V&&this._def.unknownKeys==="strip"))for(const d in s.data)i.includes(d)||o.push(d);const u=[];for(const d of i){const y=a[d],w=s.data[d];u.push({key:{status:"valid",value:d},value:y._parse(new M(s,w,s.path,d)),alwaysSet:d in s.data})}if(this._def.catchall instanceof V){const d=this._def.unknownKeys;if(d==="passthrough")for(const y of o)u.push({key:{status:"valid",value:y},value:{status:"valid",value:s.data[y]}});else if(d==="strict")o.length>0&&(l(s,{code:c.unrecognized_keys,keys:o}),n.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const y of o){const w=s.data[y];u.push({key:{status:"valid",value:y},value:d._parse(new M(s,w,s.path,y)),alwaysSet:y in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const d=[];for(const y of u){const w=await y.key,N=await y.value;d.push({key:w,value:N,alwaysSet:y.alwaysSet})}return d}).then(d=>S.mergeObjectSync(n,d)):S.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return m.errToObj,new b({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var a,i;const s=((i=(a=this._def).errorMap)==null?void 0:i.call(a,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:m.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new b({...this._def,unknownKeys:"strip"})}passthrough(){return new b({...this._def,unknownKeys:"passthrough"})}extend(e){return new b({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new b({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:g.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new b({...this._def,catchall:e})}pick(e){const r={};for(const n of x.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new b({...this._def,shape:()=>r})}omit(e){const r={};for(const n of x.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new b({...this._def,shape:()=>r})}deepPartial(){return ne(this)}partial(e){const r={};for(const n of x.objectKeys(this.shape)){const s=this.shape[n];e&&!e[n]?r[n]=s:r[n]=s.optional()}return new b({...this._def,shape:()=>r})}required(e){const r={};for(const n of x.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let a=this.shape[n];for(;a instanceof $;)a=a._def.innerType;r[n]=a}return new b({...this._def,shape:()=>r})}keyof(){return ot(x.objectKeys(this.shape))}}b.create=(t,e)=>new b({shape:()=>t,unknownKeys:"strip",catchall:V.create(),typeName:g.ZodObject,..._(e)});b.strictCreate=(t,e)=>new b({shape:()=>t,unknownKeys:"strict",catchall:V.create(),typeName:g.ZodObject,..._(e)});b.lazycreate=(t,e)=>new b({shape:t,unknownKeys:"strip",catchall:V.create(),typeName:g.ZodObject,..._(e)});class ge extends v{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function s(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;const i=a.map(o=>new O(o.ctx.common.issues));return l(r,{code:c.invalid_union,unionErrors:i}),p}if(r.common.async)return Promise.all(n.map(async a=>{const i={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:i}),ctx:i}})).then(s);{let a;const i=[];for(const u of n){const d={...r,common:{...r.common,issues:[]},parent:null},y=u._parseSync({data:r.data,path:r.path,parent:d});if(y.status==="valid")return y;y.status==="dirty"&&!a&&(a={result:y,ctx:d}),d.common.issues.length&&i.push(d.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(u=>new O(u));return l(r,{code:c.invalid_union,unionErrors:o}),p}}get options(){return this._def.options}}ge.create=(t,e)=>new ge({options:t,typeName:g.ZodUnion,..._(e)});const L=t=>t instanceof xe?L(t.schema):t instanceof Z?L(t.innerType()):t instanceof be?[t.value]:t instanceof J?t.options:t instanceof ke?x.objectValues(t.enum):t instanceof we?L(t._def.innerType):t instanceof pe?[void 0]:t instanceof ye?[null]:t instanceof $?[void 0,...L(t.unwrap())]:t instanceof Q?[null,...L(t.unwrap())]:t instanceof He||t instanceof Se?L(t.unwrap()):t instanceof Te?L(t._def.innerType):[];class Le extends v{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==f.object)return l(r,{code:c.invalid_type,expected:f.object,received:r.parsedType}),p;const n=this.discriminator,s=r.data[n],a=this.optionsMap.get(s);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(l(r,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),p)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const s=new Map;for(const a of r){const i=L(a.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(s.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);s.set(o,a)}}return new Le({typeName:g.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:s,..._(n)})}}function Ge(t,e){const r=D(t),n=D(e);if(t===e)return{valid:!0,data:t};if(r===f.object&&n===f.object){const s=x.objectKeys(e),a=x.objectKeys(t).filter(o=>s.indexOf(o)!==-1),i={...t,...e};for(const o of a){const u=Ge(t[o],e[o]);if(!u.valid)return{valid:!1};i[o]=u.data}return{valid:!0,data:i}}else if(r===f.array&&n===f.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let a=0;a<t.length;a++){const i=t[a],o=e[a],u=Ge(i,o);if(!u.valid)return{valid:!1};s.push(u.data)}return{valid:!0,data:s}}else return r===f.date&&n===f.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class _e extends v{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),s=(a,i)=>{if(Je(a)||Je(i))return p;const o=Ge(a.value,i.value);return o.valid?((Qe(a)||Qe(i))&&r.dirty(),{status:r.value,value:o.data}):(l(n,{code:c.invalid_intersection_types}),p)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([a,i])=>s(a,i)):s(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}_e.create=(t,e,r)=>new _e({left:t,right:e,typeName:g.ZodIntersection,..._(r)});class z extends v{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.array)return l(n,{code:c.invalid_type,expected:f.array,received:n.parsedType}),p;if(n.data.length<this._def.items.length)return l(n,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p;!this._def.rest&&n.data.length>this._def.items.length&&(l(n,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...n.data].map((i,o)=>{const u=this._def.items[o]||this._def.rest;return u?u._parse(new M(n,i,n.path,o)):null}).filter(i=>!!i);return n.common.async?Promise.all(a).then(i=>S.mergeArray(r,i)):S.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new z({...this._def,rest:e})}}z.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new z({items:t,typeName:g.ZodTuple,rest:null,..._(e)})};class ve extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.object)return l(n,{code:c.invalid_type,expected:f.object,received:n.parsedType}),p;const s=[],a=this._def.keyType,i=this._def.valueType;for(const o in n.data)s.push({key:a._parse(new M(n,o,n.path,o)),value:i._parse(new M(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?S.mergeObjectAsync(r,s):S.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof v?new ve({keyType:e,valueType:r,typeName:g.ZodRecord,..._(n)}):new ve({keyType:A.create(),valueType:e,typeName:g.ZodRecord,..._(r)})}}class ze extends v{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.map)return l(n,{code:c.invalid_type,expected:f.map,received:n.parsedType}),p;const s=this._def.keyType,a=this._def.valueType,i=[...n.data.entries()].map(([o,u],d)=>({key:s._parse(new M(n,o,n.path,[d,"key"])),value:a._parse(new M(n,u,n.path,[d,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const u of i){const d=await u.key,y=await u.value;if(d.status==="aborted"||y.status==="aborted")return p;(d.status==="dirty"||y.status==="dirty")&&r.dirty(),o.set(d.value,y.value)}return{status:r.value,value:o}})}else{const o=new Map;for(const u of i){const d=u.key,y=u.value;if(d.status==="aborted"||y.status==="aborted")return p;(d.status==="dirty"||y.status==="dirty")&&r.dirty(),o.set(d.value,y.value)}return{status:r.value,value:o}}}}ze.create=(t,e,r)=>new ze({valueType:e,keyType:t,typeName:g.ZodMap,..._(r)});class ee extends v{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==f.set)return l(n,{code:c.invalid_type,expected:f.set,received:n.parsedType}),p;const s=this._def;s.minSize!==null&&n.data.size<s.minSize.value&&(l(n,{code:c.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&n.data.size>s.maxSize.value&&(l(n,{code:c.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());const a=this._def.valueType;function i(u){const d=new Set;for(const y of u){if(y.status==="aborted")return p;y.status==="dirty"&&r.dirty(),d.add(y.value)}return{status:r.value,value:d}}const o=[...n.data.values()].map((u,d)=>a._parse(new M(n,u,n.path,d)));return n.common.async?Promise.all(o).then(u=>i(u)):i(o)}min(e,r){return new ee({...this._def,minSize:{value:e,message:m.toString(r)}})}max(e,r){return new ee({...this._def,maxSize:{value:e,message:m.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}ee.create=(t,e)=>new ee({valueType:t,minSize:null,maxSize:null,typeName:g.ZodSet,..._(e)});class ie extends v{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==f.function)return l(r,{code:c.invalid_type,expected:f.function,received:r.parsedType}),p;function n(o,u){return je({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ze(),oe].filter(d=>!!d),issueData:{code:c.invalid_arguments,argumentsError:u}})}function s(o,u){return je({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ze(),oe].filter(d=>!!d),issueData:{code:c.invalid_return_type,returnTypeError:u}})}const a={errorMap:r.common.contextualErrorMap},i=r.data;if(this._def.returns instanceof ue){const o=this;return C(async function(...u){const d=new O([]),y=await o._def.args.parseAsync(u,a).catch(R=>{throw d.addIssue(n(u,R)),d}),w=await Reflect.apply(i,this,y);return await o._def.returns._def.type.parseAsync(w,a).catch(R=>{throw d.addIssue(s(w,R)),d})})}else{const o=this;return C(function(...u){const d=o._def.args.safeParse(u,a);if(!d.success)throw new O([n(u,d.error)]);const y=Reflect.apply(i,this,d.data),w=o._def.returns.safeParse(y,a);if(!w.success)throw new O([s(y,w.error)]);return w.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ie({...this._def,args:z.create(e).rest(Y.create())})}returns(e){return new ie({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new ie({args:e||z.create([]).rest(Y.create()),returns:r||Y.create(),typeName:g.ZodFunction,..._(n)})}}class xe extends v{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}xe.create=(t,e)=>new xe({getter:t,typeName:g.ZodLazy,..._(e)});class be extends v{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return l(r,{received:r.data,code:c.invalid_literal,expected:this._def.value}),p}return{status:"valid",value:e.data}}get value(){return this._def.value}}be.create=(t,e)=>new be({value:t,typeName:g.ZodLiteral,..._(e)});function ot(t,e){return new J({values:t,typeName:g.ZodEnum,..._(e)})}class J extends v{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return l(r,{expected:x.joinValues(n),received:r.parsedType,code:c.invalid_type}),p}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return l(r,{received:r.data,code:c.invalid_enum_value,options:n}),p}return C(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return J.create(e,{...this._def,...r})}exclude(e,r=this._def){return J.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}J.create=ot;class ke extends v{_parse(e){const r=x.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==f.string&&n.parsedType!==f.number){const s=x.objectValues(r);return l(n,{expected:x.joinValues(s),received:n.parsedType,code:c.invalid_type}),p}if(this._cache||(this._cache=new Set(x.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const s=x.objectValues(r);return l(n,{received:n.data,code:c.invalid_enum_value,options:s}),p}return C(e.data)}get enum(){return this._def.values}}ke.create=(t,e)=>new ke({values:t,typeName:g.ZodNativeEnum,..._(e)});class ue extends v{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==f.promise&&r.common.async===!1)return l(r,{code:c.invalid_type,expected:f.promise,received:r.parsedType}),p;const n=r.parsedType===f.promise?r.data:Promise.resolve(r.data);return C(n.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ue.create=(t,e)=>new ue({type:t,typeName:g.ZodPromise,..._(e)});class Z 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:r,ctx:n}=this._processInputParams(e),s=this._def.effect||null,a={addIssue:i=>{l(n,i),i.fatal?r.abort():r.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),s.type==="preprocess"){const i=s.transform(n.data,a);if(n.common.async)return Promise.resolve(i).then(async o=>{if(r.value==="aborted")return p;const u=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return u.status==="aborted"?p:u.status==="dirty"||r.value==="dirty"?se(u.value):u});{if(r.value==="aborted")return p;const o=this._def.schema._parseSync({data:i,path:n.path,parent:n});return o.status==="aborted"?p:o.status==="dirty"||r.value==="dirty"?se(o.value):o}}if(s.type==="refinement"){const i=o=>{const u=s.refinement(o,a);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?p:(o.status==="dirty"&&r.dirty(),i(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?p:(o.status==="dirty"&&r.dirty(),i(o.value).then(()=>({status:r.value,value:o.value}))))}if(s.type==="transform")if(n.common.async===!1){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!X(i))return p;const o=s.transform(i.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(i=>X(i)?Promise.resolve(s.transform(i.value,a)).then(o=>({status:r.value,value:o})):p);x.assertNever(s)}}Z.create=(t,e,r)=>new Z({schema:t,typeName:g.ZodEffects,effect:e,..._(r)});Z.createWithPreprocess=(t,e,r)=>new Z({schema:e,effect:{type:"preprocess",transform:t},typeName:g.ZodEffects,..._(r)});class $ extends v{_parse(e){return this._getType(e)===f.undefined?C(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}$.create=(t,e)=>new $({innerType:t,typeName:g.ZodOptional,..._(e)});class Q extends v{_parse(e){return this._getType(e)===f.null?C(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Q.create=(t,e)=>new Q({innerType:t,typeName:g.ZodNullable,..._(e)});class we extends v{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===f.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}we.create=(t,e)=>new we({innerType:t,typeName:g.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,..._(e)});class Te extends v{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return he(s)?s.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new O(n.common.issues)},input:n.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new O(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Te.create=(t,e)=>new Te({innerType:t,typeName:g.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});class Pe extends v{_parse(e){if(this._getType(e)!==f.nan){const n=this._getOrReturnCtx(e);return l(n,{code:c.invalid_type,expected:f.nan,received:n.parsedType}),p}return{status:"valid",value:e.data}}}Pe.create=t=>new Pe({typeName:g.ZodNaN,..._(t)});const Ut=Symbol("zod_brand");class He extends v{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Ce extends v{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?p:a.status==="dirty"?(r.dirty(),se(a.value)):this._def.out._parseAsync({data:a.value,path:n.path,parent:n})})();{const s=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?p:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:n.path,parent:n})}}static create(e,r){return new Ce({in:e,out:r,typeName:g.ZodPipeline})}}class Se extends v{_parse(e){const r=this._def.innerType._parse(e),n=s=>(X(s)&&(s.value=Object.freeze(s.value)),s);return he(r)?r.then(s=>n(s)):n(r)}unwrap(){return this._def.innerType}}Se.create=(t,e)=>new Se({innerType:t,typeName:g.ZodReadonly,..._(e)});function Ke(t,e){const r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function ct(t,e={},r){return t?ce.create().superRefine((n,s)=>{const a=t(n);if(a instanceof Promise)return a.then(i=>{if(!i){const o=Ke(e,n),u=o.fatal??r??!0;s.addIssue({code:"custom",...o,fatal:u})}});if(!a){const i=Ke(e,n),o=i.fatal??r??!0;s.addIssue({code:"custom",...i,fatal:o})}}):ce.create()}const Bt={object:b.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 Wt=(t,e={message:`Input not instance of ${t.name}`})=>ct(r=>r instanceof t,e),Ye=A.create,ut=B.create,Jt=Pe.create,Qt=W.create,dt=me.create,Gt=K.create,Ht=$e.create,Yt=pe.create,Xt=ye.create,lt=ce.create,Kt=Y.create,er=V.create,tr=Me.create,ft=I.create,ae=b.create,rr=b.strictCreate,nr=ge.create,sr=Le.create,ar=_e.create,ir=z.create,or=ve.create,cr=ze.create,ur=ee.create,dr=ie.create,lr=xe.create,fr=be.create,ht=J.create,hr=ke.create,mr=ue.create,et=Z.create,pr=$.create,yr=Q.create,mt=Z.createWithPreprocess,gr=Ce.create,_r=()=>Ye().optional(),vr=()=>ut().optional(),xr=()=>dt().optional(),le={string:t=>A.create({...t,coerce:!0}),number:t=>B.create({...t,coerce:!0}),boolean:t=>me.create({...t,coerce:!0}),bigint:t=>W.create({...t,coerce:!0}),date:t=>K.create({...t,coerce:!0})},br=p,fe=Object.freeze(Object.defineProperty({__proto__:null,BRAND:Ut,DIRTY:se,EMPTY_PATH:kt,INVALID:p,NEVER:br,OK:C,ParseStatus:S,Schema:v,ZodAny:ce,ZodArray:I,ZodBigInt:W,ZodBoolean:me,ZodBranded:He,ZodCatch:Te,ZodDate:K,ZodDefault:we,ZodDiscriminatedUnion:Le,ZodEffects:Z,ZodEnum:J,ZodError:O,get ZodFirstPartyTypeKind(){return g},ZodFunction:ie,ZodIntersection:_e,ZodIssueCode:c,ZodLazy:xe,ZodLiteral:be,ZodMap:ze,ZodNaN:Pe,ZodNativeEnum:ke,ZodNever:V,ZodNull:ye,ZodNullable:Q,ZodNumber:B,ZodObject:b,ZodOptional:$,ZodParsedType:f,ZodPipeline:Ce,ZodPromise:ue,ZodReadonly:Se,ZodRecord:ve,ZodSchema:v,ZodSet:ee,ZodString:A,ZodSymbol:$e,ZodTransformer:Z,ZodTuple:z,ZodType:v,ZodUndefined:pe,ZodUnion:ge,ZodUnknown:Y,ZodVoid:Me,addIssueToContext:l,any:lt,array:ft,bigint:Qt,boolean:dt,coerce:le,custom:ct,date:Gt,datetimeRegex:it,defaultErrorMap:oe,discriminatedUnion:sr,effect:et,enum:ht,function:dr,getErrorMap:Ze,getParsedType:D,instanceof:Wt,intersection:ar,isAborted:Je,isAsync:he,isDirty:Qe,isValid:X,late:Bt,lazy:lr,literal:fr,makeIssue:je,map:cr,nan:Jt,nativeEnum:hr,never:er,null:Xt,nullable:yr,number:ut,object:ae,get objectUtil(){return We},oboolean:xr,onumber:vr,optional:pr,ostring:_r,pipeline:gr,preprocess:mt,promise:mr,quotelessJson:xt,record:or,set:ur,setErrorMap:bt,strictObject:rr,string:Ye,symbol:Ht,transformer:et,tuple:ir,undefined:Yt,union:nr,unknown:Kt,get util(){return x},void:tr},Symbol.toStringTag,{value:"Module"})),kr=()=>{const t=qe.compilerRuntimeExports.c(43),{texts:e}=H.useContext(tt.LuminusComponentsContext),{formValidation:r}=e;let n;t[0]!==r?(n=(h,E)=>{const de=E===void 0?!1:E;let T=(h!=null&&h.useCoerce?le:fe).string({invalid_type_error:r.required,required_error:r.required});return de||(T=T.min(1,r.required)),h!=null&&h.email&&(T=T.email(r.invalidEmail)),h!=null&&h.length&&(T=T.min(h.length,r.length(h.length))),h!=null&&h.minLength&&(T=T.min(h.minLength,r.minLength(h.minLength))),h!=null&&h.maxLength&&(T=T.max(h.maxLength,r.maxLength(h.maxLength))),h!=null&&h.numeric&&(T=T.regex(/^\d+$/,r.noCharactersOtherThanNumbers)),h!=null&&h.regex&&(T=T.regex(h.regex,r.invalidFormat)),T.transform(wr)},t[0]=r,t[1]=n):n=t[1];const s=n;let a;t[2]!==s?(a=h=>s(h,!1),t[2]=s,t[3]=a):a=t[3];const i=a;let o;t[4]!==s?(o=h=>s(h,!0).nullable().optional().transform(Tr),t[4]=s,t[5]=o):o=t[5];const u=o;let d;t[6]!==r?(d=h=>{const E=(h==null?void 0:h.min)??Number.MIN_SAFE_INTEGER,de=(h==null?void 0:h.max)??Number.MAX_SAFE_INTEGER,T=(h!=null&&h.useCoerce?le:fe).number({invalid_type_error:r.required,required_error:r.required}).min(E,r.lessThanMin(E)).max(de,r.moreThanMax(de));return T.transform(Sr),T},t[6]=r,t[7]=d):d=t[7];const y=d;let w;t[8]!==y?(w=h=>y(h).nullable().optional().transform(Cr),t[8]=y,t[9]=w):w=t[9];const N=w;let R;t[10]!==r.required?(R=h=>((h==null?void 0:h.useCoerce)===!1?fe:le).boolean({invalid_type_error:r.required,required_error:r.required}).transform(Nr),t[10]=r.required,t[11]=R):R=t[11];const F=R;let te;t[12]!==r.invalidDate||t[13]!==r.required?(te=h=>(h!=null&&h.useCoerce?le:fe).string({invalid_type_error:r.required,required_error:r.required}).refine(rt.isISODateInValidRange,{message:r.invalidDate}).transform(Rr),t[12]=r.invalidDate,t[13]=r.required,t[14]=te):te=t[14];const j=te;let P;t[15]!==j?(P=h=>mt(Er,j(h).nullable().optional()).transform(Or),t[15]=j,t[16]=P):P=t[16];const G=P;let q;t[17]!==r.required?(q=(h,E)=>ht(h,{invalid_type_error:r.required,required_error:r.required}).transform(Ar),t[17]=r.required,t[18]=q):q=t[18];const k=q;let U;t[19]!==k?(U=(h,E)=>k(h,E).nullable().transform(Ir),t[19]=k,t[20]=U):U=t[20];const re=U;let Ne;t[21]!==N?(Ne=h=>ae({id:N({useCoerce:!0})}).nullable().transform(Zr),t[21]=N,t[22]=Ne):Ne=t[22];const De=Ne;let Re;t[23]!==y?(Re=h=>ae({id:y()}).transform(jr),t[23]=y,t[24]=Re):Re=t[24];const Ve=Re;let Ee;t[25]!==u?(Ee=h=>ae({id:u({useCoerce:!0})}).nullable().transform($r),t[25]=u,t[26]=Ee):Ee=t[26];const Fe=Ee;let Oe;t[27]!==i?(Oe=h=>ae({id:i()}).transform(Mr),t[27]=i,t[28]=Oe):Oe=t[28];const Ue=Oe,yt=Pr;let Ae;return t[29]!==F||t[30]!==G||t[31]!==j||t[32]!==re||t[33]!==k||t[34]!==N||t[35]!==y||t[36]!==De||t[37]!==Ve||t[38]!==Fe||t[39]!==Ue||t[40]!==u||t[41]!==i?(Ae={zString:u,zStringRequired:i,zNumber:N,zNumberRequired:y,zBool:F,zDate:G,zDateRequired:j,zEnum:re,zEnumRequired:k,zObjectIdInt:De,zObjectIdIntRequired:Ve,zObjectIdStr:Fe,zObjectIdStrRequired:Ue,zFile:yt},t[29]=F,t[30]=G,t[31]=j,t[32]=re,t[33]=k,t[34]=N,t[35]=y,t[36]=De,t[37]=Ve,t[38]=Fe,t[39]=Ue,t[40]=u,t[41]=i,t[42]=Ae):Ae=t[42],Ae};function wr(t){return t??null}function Tr(t){return t??null}function Sr(t){return t??null}function Cr(t){return t??null}function Nr(t){return t??null}function Rr(t){return t??null}function Er(t){return t===""?null:t}function Or(t){return t??null}function Ar(t){return t??null}function Ir(t){return t??null}function Zr(t){return t??null}function jr(t){return t??null}function $r(t){return t??null}function Mr(t){return t??null}function zr(t){return Array.from(t??[])}function Pr(t){const{required:e,multiple:r,maxFileSize:n}=t;return lt().transform(zr).refine(a=>!e||(a==null?void 0:a.length)>0,"File is required.").refine(a=>r||(a==null?void 0:a.length)<=1,"Multiple files not allowed.").refine(a=>a.every(i=>i.size<=n),`Maximum file size is ${rt.formatFileSize(n)}.`).transform(a=>(r?a:a==null?void 0:a[0])??null)}const qr=(t,e,r)=>{let n;e:{if(r){n=t;break e}if(t!=="date"&&t!=="datetime-local"&&t!=="time"){n=t;break e}if(!e){n="text";break e}n=t}return n},Lr=()=>{const t=qe.compilerRuntimeExports.c(6),[e,r]=gt.useSearchParams();let n;t[0]!==e||t[1]!==r?(n=(i,o)=>{e.get(i)!==o&&r(u=>(o===null&&u.delete(i),u.get(i)===o||u.set(i,o??""),u),{replace:!0})},t[0]=e,t[1]=r,t[2]=n):n=t[2];const s=n;let a;return t[3]!==e||t[4]!==s?(a={searchParams:e,setSearch:s},t[3]=e,t[4]=s,t[5]=a):a=t[5],a},pt="\0",Dr=t=>e=>(window.addEventListener(`queryStorage_${t}`,e),()=>window.removeEventListener(`queryStorage_${t}`,e)),Vr=(t,e,r)=>{const n=t;if(n===pt)return null;const s=n?Number(n):e;let a=Number.isNaN(s)?typeof e:"number";switch(a==="object"&&e instanceof Date&&(a="date"),r??a){case"number":return s;case"string":return n??e;case"boolean":return n==="true";case"object":return n?JSON.parse(n):e;case"date":return n?new Date(n):e;default:throw console.error(r,a),new Error(`useSearchQueryState is not implemented for type ${typeof(r??a)}.`)}},Fr=(t,e,r)=>{const n=qe.compilerRuntimeExports.c(22),[s]=H.useState(e);let a;n[0]!==r?(a=k=>{if(typeof k=="object"){if(r&&r==="date"||!r&&k instanceof Date){if(!(k instanceof Date))throw new Error("Tried to setQueryState of type Date to non-date.");return k.toISOString()}return JSON.stringify(k)}return k.toString()},n[0]=r,n[1]=a):a=n[1];const i=a;let o;n[2]!==i||n[3]!==e?(o=i(e),n[2]=i,n[3]=e,n[4]=o):o=n[4];const u=o;let d;n[5]!==e?(d=JSON.stringify(e),n[5]=e,n[6]=d):d=n[6];const y=H.useRef(d),w=H.useRef(e);let N;n[7]!==t||n[8]!==s||n[9]!==r?(N=()=>{const k=Ie.queryStorage.getItem(t);return k!==y.current&&(y.current=k,w.current=Vr(k,s,r)),w.current},n[7]=t,n[8]=s,n[9]=r,n[10]=N):N=n[10];const R=N;let F;n[11]!==t?(F=Dr(t),n[11]=t,n[12]=F):F=n[12];const te=F,j=H.useSyncExternalStore(te,R);let P;n[13]!==u||n[14]!==R||n[15]!==i||n[16]!==e||n[17]!==t?(P=k=>{const U=typeof k=="function"?k(R()):k,re=i(U);if(e===U||re===u){Ie.queryStorage.removeItem(t),window.dispatchEvent(new Event(`queryStorage_${t}`));return}if(U===null){Ie.queryStorage.setItem(t,pt),window.dispatchEvent(new Event(`queryStorage_${t}`));return}Ie.queryStorage.setItem(t,re),window.dispatchEvent(new Event(`queryStorage_${t}`))},n[13]=u,n[14]=R,n[15]=i,n[16]=e,n[17]=t,n[18]=P):P=n[18];const G=P;let q;return n[19]!==G||n[20]!==j?(q=[j,G],n[19]=G,n[20]=j,n[21]=q):q=n[21],q},Ur=t=>{const e=qe.compilerRuntimeExports.c(5),r=Math.floor(Math.random()*900)+100;let n;e[0]!==t?(n=btoa(t.toString()??""),e[0]=t,e[1]=n):n=e[1];const s=n,a=`employeePhotos?personalNumber=${r}${s}&small=false`,i=`employeePhotos?personalNumber=${r}${s}&small=true`;let o;return e[2]!==a||e[3]!==i?(o={photoPath:a,photoPathSm:i},e[2]=a,e[3]=i,e[4]=o):o=e[4],o},Br=()=>{const{addNotification:t}=_t.useNotifications(),{texts:{clipboard:e}}=H.useContext(tt.LuminusComponentsContext);return{copyToClipboard:H.useCallback(async n=>{var s;try{await((s=navigator.clipboard)==null?void 0:s.writeText(n)),t(e.copySuccess(n),"prompt")}catch(a){console.error(a),t(e.copyError,"danger")}},[t,e])}},Wr=({control:t}={})=>{"use no memo";const{dirtyFields:e}=vt.useFormState({control:t});return Object.keys(e).length>0};exports.ZodIssueCode=c;exports.arrayType=ft;exports.objectType=ae;exports.stringType=Ye;exports.useClipboard=Br;exports.useEmployeePhotoPath=Ur;exports.useFormControlType=qr;exports.useIsFormDirty=Wr;exports.useSearchQuery=Lr;exports.useSearchQueryState=Fr;exports.useZodSchemaTypes=kr;exports.z=fe;