import{a as M,f as G,t as pt}from"../chunks/pJd4F_Tq.js";import{i as Ke}from"../chunks/BgHfHpED.js";import{A as K,aq as vt,aW as _t,aX as gt,aY as yt,aZ as xt,a_ as bt,a$ as kt,b0 as wt,aT as Tt,v as Z,ao as Ct,R as X,b1 as St,p as et,b2 as At,t as ae,f as b,b as tt,s as E,c as S,r as A,b3 as he,a1 as Ae,ad as rt,i as Ot,e as Nt,$ as Rt}from"../chunks/CCV2x70u.js";import{h as Zt}from"../chunks/DhYTxIvM.js";import{s as Et,a as It}from"../chunks/JkAhLmb1.js";import{g as jt}from"../chunks/DBDqKY8A.js";import{e as $t,s as me}from"../chunks/Bx__7-vK.js";import{i as ne}from"../chunks/CC5oASRR.js";import{p as Oe}from"../chunks/C62USj72.js";import{b as Lt,c as Vt}from"../chunks/CrZRXG6z.js";const Ne=[...` \r\f \v\uFEFF`];function Dt(r,e,t){var s=""+r;if(t){for(var a in t)if(t[a])s=s?s+" "+a:a;else if(s.length)for(var n=a.length,i=0;(i=s.indexOf(a,i))>=0;){var o=i+n;(i===0||Ne.includes(s[i-1]))&&(o===s.length||Ne.includes(s[o]))?s=(i===0?"":s.substring(0,i))+s.substring(o+1):i=o}}return s===""?null:s}function Re(r,e,t,s,a,n){var i=r.__className;if(K||i!==t||i===void 0){var o=Dt(t,s,n);(!K||o!==r.getAttribute("class"))&&(o==null?r.removeAttribute("class"):r.className=o),r.__className=t}else if(n&&a!==n)for(var l in n){var u=!!n[l];(a==null||u!==!!a[l])&&r.classList.toggle(l,u)}return n}const Pt=Symbol("is custom element"),zt=Symbol("is html"),Mt=xt?"link":"LINK";function Ze(r){if(K){var e=!1,t=()=>{if(!e){if(e=!0,r.hasAttribute("value")){var s=r.value;W(r,"value",null),r.value=s}if(r.hasAttribute("checked")){var a=r.checked;W(r,"checked",null),r.checked=a}}};r.__on_r=t,vt(t),_t()}}function W(r,e,t,s){var a=Ut(r);K&&(a[e]=r.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&r.nodeName===Mt)||a[e]!==(a[e]=t)&&(e==="loading"&&(r[gt]=t),t==null?r.removeAttribute(e):typeof t!="string"&&Ft(r).includes(e)?r[e]=t:r.setAttribute(e,t))}function Ut(r){return r.__attributes??(r.__attributes={[Pt]:r.nodeName.includes("-"),[zt]:r.namespaceURI===yt})}var Ee=new Map;function Ft(r){var e=r.getAttribute("is")||r.nodeName,t=Ee.get(e);if(t)return t;Ee.set(e,t=[]);for(var s,a=r,n=Element.prototype;n!==a;){s=kt(a);for(var i in s)s[i].set&&t.push(i);a=bt(a)}return t}function Ie(r,e,t=e){var s=new WeakSet;wt(r,"input",async a=>{var n=a?r.defaultValue:r.value;if(n=pe(r)?ve(n):n,t(n),X!==null&&s.add(X),await Tt(),n!==(n=e())){var i=r.selectionStart,o=r.selectionEnd,l=r.value.length;if(r.value=n??"",o!==null){var u=r.value.length;i===o&&o===l&&u>l?(r.selectionStart=u,r.selectionEnd=u):(r.selectionStart=i,r.selectionEnd=Math.min(o,u))}}}),(K&&r.defaultValue!==r.value||Z(e)==null&&r.value)&&(t(pe(r)?ve(r.value):r.value),X!==null&&s.add(X)),Ct(()=>{var a=e();if(r===document.activeElement){var n=St??X;if(s.has(n))return}pe(r)&&a===ve(r.value)||r.type==="date"&&!a&&!r.value||a!==r.value&&(r.value=a??"")})}function pe(r){var e=r.type;return e==="number"||e==="range"}function ve(r){return r===""?null:+r}function Wt(r){return function(...e){var t=e[0];return t.preventDefault(),r==null?void 0:r.apply(this,e)}}const qt=!1,Mr=Object.freeze(Object.defineProperty({__proto__:null,ssr:qt},Symbol.toStringTag,{value:"Module"}));var y;(function(r){r.assertEqual=a=>{};function e(a){}r.assertIs=e;function t(a){throw new Error}r.assertNever=t,r.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},r.getValidEnumValues=a=>{const n=r.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),i={};for(const o of n)i[o]=a[o];return r.objectValues(i)},r.objectValues=a=>r.objectKeys(a).map(function(n){return a[n]}),r.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},r.find=(a,n)=>{for(const i of a)if(n(i))return i},r.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function s(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}r.joinValues=s,r.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(y||(y={}));var je;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(je||(je={}));const f=y.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),j=r=>{switch(typeof r){case"undefined":return f.undefined;case"string":return f.string;case"number":return Number.isNaN(r)?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(r)?f.array:r===null?f.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?f.promise:typeof Map<"u"&&r instanceof Map?f.map:typeof Set<"u"&&r instanceof Set?f.set:typeof Date<"u"&&r instanceof Date?f.date:f.object;default:return f.unknown}},d=y.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"]);class R extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(n){return n.message},s={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)s._errors.push(t(i));else{let o=s,l=0;for(;lt.message){const t={},s=[];for(const a of this.issues)if(a.path.length>0){const n=a.path[0];t[n]=t[n]||[],t[n].push(e(a))}else s.push(e(a));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}R.create=r=>new R(r);const ge=(r,e)=>{let t;switch(r.code){case d.invalid_type:r.received===f.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,y.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${y.joinValues(r.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${y.joinValues(r.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${y.joinValues(r.options)}, received '${r.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:y.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case d.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="bigint"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case d.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,y.assertNever(r)}return{message:t}};let Bt=ge;function Yt(){return Bt}const Ht=r=>{const{data:e,path:t,errorMaps:s,issueData:a}=r,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let o="";const l=s.filter(u=>!!u).slice().reverse();for(const u of l)o=u(i,{data:e,defaultError:o}).message;return{...a,path:n,message:o}};function c(r,e){const t=Yt(),s=Ht({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===ge?void 0:ge].filter(a=>!!a)});r.common.issues.push(s)}class T{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const a of t){if(a.status==="aborted")return m;a.status==="dirty"&&e.dirty(),s.push(a.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const a of t){const n=await a.key,i=await a.value;s.push({key:n,value:i})}return T.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const a of t){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return m;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(s[n.value]=i.value)}return{status:e.value,value:s}}}const m=Object.freeze({status:"aborted"}),Q=r=>({status:"dirty",value:r}),C=r=>({status:"valid",value:r}),$e=r=>r.status==="aborted",Le=r=>r.status==="dirty",q=r=>r.status==="valid",ie=r=>typeof Promise<"u"&&r instanceof Promise;var h;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));class V{constructor(e,t,s,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=a}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 Ve=(r,e)=>{if(q(e))return{success:!0,data:e.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new R(r.common.issues);return this._error=t,this._error}}};function _(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:a}=r;if(e&&(t||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:(i,o)=>{const{message:l}=r;return i.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??s??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:l??t??o.defaultError}},description:a}}class g{get description(){return this._def.description}_getType(e){return j(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:j(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new T,ctx:{common:e.parent.common,data:e.data,parsedType:j(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(ie(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){const s={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)},a=this._parseSync({data:e,path:s.path,parent:s});return Ve(s,a)}"~validate"(e){var s,a;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return q(n)?{value:n.value}:{issues:t.common.issues}}catch(n){(a=(s=n==null?void 0:n.message)==null?void 0:s.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>q(n)?{value:n.value}:{issues:t.common.issues})}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:j(e)},a=this._parse({data:e,path:s.path,parent:s}),n=await(ie(a)?a:Promise.resolve(a));return Ve(s,n)}refine(e,t){const s=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const i=e(a),o=()=>n.addIssue({code:d.custom,...s(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(l=>l?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((s,a)=>e(s)?!0:(a.addIssue(typeof t=="function"?t(s,a):t),!1))}_refinement(e){return new Y({schema:this,typeName:p.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return L.create(this,this._def)}nullable(){return H.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return N.create(this)}promise(){return le.create(this,this._def)}or(e){return de.create([this,e],this._def)}and(e){return ce.create(this,e,this._def)}transform(e){return new Y({..._(this._def),schema:this,typeName:p.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new xe({..._(this._def),innerType:this,defaultValue:t,typeName:p.ZodDefault})}brand(){return new _r({typeName:p.ZodBranded,type:this,..._(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new be({..._(this._def),innerType:this,catchValue:t,typeName:p.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Te.create(this,e)}readonly(){return ke.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Gt=/^c[^\s-]{8,}$/i,Jt=/^[0-9a-z]+$/,Xt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Qt=/^[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,Kt=/^[a-z0-9_-]{21}$/i,er=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,tr=/^[-+]?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)?)??$/,rr=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,sr="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let _e;const ar=/^(?:(?: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])$/,nr=/^(?:(?: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])$/,ir=/^(([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]))$/,or=/^(([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])$/,dr=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,cr=/^([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])))",lr=new RegExp(`^${st}$`);function at(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function ur(r){return new RegExp(`^${at(r)}$`)}function fr(r){let e=`${st}T${at(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function hr(r,e){return!!((e==="v4"||!e)&&ar.test(r)||(e==="v6"||!e)&&ir.test(r))}function mr(r,e){if(!er.test(r))return!1;try{const[t]=r.split(".");if(!t)return!1;const s=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(s));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function pr(r,e){return!!((e==="v4"||!e)&&nr.test(r)||(e==="v6"||!e)&&or.test(r))}class $ extends g{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==f.string){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:f.string,received:n.parsedType}),m}const s=new T;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.lengthn.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),s.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,o=e.data.lengthe.test(a),{validation:t,code:d.invalid_string,...h.errToObj(s)})}_addCheck(e){return new $({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.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,...h.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,...h.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new $({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new $({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new $({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew $({checks:[],typeName:p.ZodString,coerce:(r==null?void 0:r.coerce)??!1,..._(r)});function vr(r,e){const t=(r.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,a=t>s?t:s,n=Number.parseInt(r.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class ee extends g{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 n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:f.number,received:n.parsedType}),m}let s;const a=new T;for(const n of this._def.checks)n.kind==="int"?y.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{code:d.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.datan.value:e.data>=n.value)&&(s=this._getOrReturnCtx(e,s),c(s,{code:d.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?vr(e.data,n.value)!==0&&(s=this._getOrReturnCtx(e,s),c(s,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),c(s,{code:d.not_finite,message:n.message}),a.dirty()):y.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,a){return new ee({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(a)}]})}_addCheck(e){return new ee({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&y.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.valuenew ee({checks:[],typeName:p.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,..._(r)});class te extends g{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 s;const a=new T;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.datan.value:e.data>=n.value)&&(s=this._getOrReturnCtx(e,s),c(s,{code:d.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),c(s,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):y.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:f.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,s,a){return new te({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:h.toString(a)}]})}_addCheck(e){return new te({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew te({checks:[],typeName:p.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,..._(r)});class De extends g{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==f.boolean){const s=this._getOrReturnCtx(e);return c(s,{code:d.invalid_type,expected:f.boolean,received:s.parsedType}),m}return C(e.data)}}De.create=r=>new De({typeName:p.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,..._(r)});class oe extends g{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==f.date){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:f.date,received:n.parsedType}),m}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_date}),m}const s=new T;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),s.dirty()):y.assertNever(n);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new oe({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew oe({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:p.ZodDate,..._(r)});class Pe extends g{_parse(e){if(this._getType(e)!==f.symbol){const s=this._getOrReturnCtx(e);return c(s,{code:d.invalid_type,expected:f.symbol,received:s.parsedType}),m}return C(e.data)}}Pe.create=r=>new Pe({typeName:p.ZodSymbol,..._(r)});class ze extends g{_parse(e){if(this._getType(e)!==f.undefined){const s=this._getOrReturnCtx(e);return c(s,{code:d.invalid_type,expected:f.undefined,received:s.parsedType}),m}return C(e.data)}}ze.create=r=>new ze({typeName:p.ZodUndefined,..._(r)});class Me extends g{_parse(e){if(this._getType(e)!==f.null){const s=this._getOrReturnCtx(e);return c(s,{code:d.invalid_type,expected:f.null,received:s.parsedType}),m}return C(e.data)}}Me.create=r=>new Me({typeName:p.ZodNull,..._(r)});class Ue extends g{constructor(){super(...arguments),this._any=!0}_parse(e){return C(e.data)}}Ue.create=r=>new Ue({typeName:p.ZodAny,..._(r)});class Fe extends g{constructor(){super(...arguments),this._unknown=!0}_parse(e){return C(e.data)}}Fe.create=r=>new Fe({typeName:p.ZodUnknown,..._(r)});class D extends g{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:f.never,received:t.parsedType}),m}}D.create=r=>new D({typeName:p.ZodNever,..._(r)});class We extends g{_parse(e){if(this._getType(e)!==f.undefined){const s=this._getOrReturnCtx(e);return c(s,{code:d.invalid_type,expected:f.void,received:s.parsedType}),m}return C(e.data)}}We.create=r=>new We({typeName:p.ZodVoid,..._(r)});class N extends g{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),a=this._def;if(t.parsedType!==f.array)return c(t,{code:d.invalid_type,expected:f.array,received:t.parsedType}),m;if(a.exactLength!==null){const i=t.data.length>a.exactLength.value,o=t.data.lengtha.maxLength.value&&(c(t,{code:d.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>a.type._parseAsync(new V(t,i,t.path,o)))).then(i=>T.mergeArray(s,i));const n=[...t.data].map((i,o)=>a.type._parseSync(new V(t,i,t.path,o)));return T.mergeArray(s,n)}get element(){return this._def.type}min(e,t){return new N({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new N({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new N({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}N.create=(r,e)=>new N({type:r,minLength:null,maxLength:null,exactLength:null,typeName:p.ZodArray,..._(e)});function F(r){if(r instanceof k){const e={};for(const t in r.shape){const s=r.shape[t];e[t]=L.create(F(s))}return new k({...r._def,shape:()=>e})}else return r instanceof N?new N({...r._def,type:F(r.element)}):r instanceof L?L.create(F(r.unwrap())):r instanceof H?H.create(F(r.unwrap())):r instanceof U?U.create(r.items.map(e=>F(e))):r}class k extends g{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=y.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==f.object){const u=this._getOrReturnCtx(e);return c(u,{code:d.invalid_type,expected:f.object,received:u.parsedType}),m}const{status:s,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof D&&this._def.unknownKeys==="strip"))for(const u in a.data)i.includes(u)||o.push(u);const l=[];for(const u of i){const v=n[u],O=a.data[u];l.push({key:{status:"valid",value:u},value:v._parse(new V(a,O,a.path,u)),alwaysSet:u in a.data})}if(this._def.catchall instanceof D){const u=this._def.unknownKeys;if(u==="passthrough")for(const v of o)l.push({key:{status:"valid",value:v},value:{status:"valid",value:a.data[v]}});else if(u==="strict")o.length>0&&(c(a,{code:d.unrecognized_keys,keys:o}),s.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const v of o){const O=a.data[v];l.push({key:{status:"valid",value:v},value:u._parse(new V(a,O,a.path,v)),alwaysSet:v in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const u=[];for(const v of l){const O=await v.key,J=await v.value;u.push({key:O,value:J,alwaysSet:v.alwaysSet})}return u}).then(u=>T.mergeObjectSync(s,u)):T.mergeObjectSync(s,l)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new k({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var n,i;const a=((i=(n=this._def).errorMap)==null?void 0:i.call(n,t,s).message)??s.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??a}:{message:a}}}:{}})}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:p.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new k({...this._def,catchall:e})}pick(e){const t={};for(const s of y.objectKeys(e))e[s]&&this.shape[s]&&(t[s]=this.shape[s]);return new k({...this._def,shape:()=>t})}omit(e){const t={};for(const s of y.objectKeys(this.shape))e[s]||(t[s]=this.shape[s]);return new k({...this._def,shape:()=>t})}deepPartial(){return F(this)}partial(e){const t={};for(const s of y.objectKeys(this.shape)){const a=this.shape[s];e&&!e[s]?t[s]=a:t[s]=a.optional()}return new k({...this._def,shape:()=>t})}required(e){const t={};for(const s of y.objectKeys(this.shape))if(e&&!e[s])t[s]=this.shape[s];else{let n=this.shape[s];for(;n instanceof L;)n=n._def.innerType;t[s]=n}return new k({...this._def,shape:()=>t})}keyof(){return nt(y.objectKeys(this.shape))}}k.create=(r,e)=>new k({shape:()=>r,unknownKeys:"strip",catchall:D.create(),typeName:p.ZodObject,..._(e)});k.strictCreate=(r,e)=>new k({shape:()=>r,unknownKeys:"strict",catchall:D.create(),typeName:p.ZodObject,..._(e)});k.lazycreate=(r,e)=>new k({shape:r,unknownKeys:"strip",catchall:D.create(),typeName:p.ZodObject,..._(e)});class de extends g{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function a(n){for(const o of n)if(o.result.status==="valid")return o.result;for(const o of n)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=n.map(o=>new R(o.ctx.common.issues));return c(t,{code:d.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(s.map(async n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(a);{let n;const i=[];for(const l of s){const u={...t,common:{...t.common,issues:[]},parent:null},v=l._parseSync({data:t.data,path:t.path,parent:u});if(v.status==="valid")return v;v.status==="dirty"&&!n&&(n={result:v,ctx:u}),u.common.issues.length&&i.push(u.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const o=i.map(l=>new R(l));return c(t,{code:d.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}de.create=(r,e)=>new de({options:r,typeName:p.ZodUnion,..._(e)});function ye(r,e){const t=j(r),s=j(e);if(r===e)return{valid:!0,data:r};if(t===f.object&&s===f.object){const a=y.objectKeys(e),n=y.objectKeys(r).filter(o=>a.indexOf(o)!==-1),i={...r,...e};for(const o of n){const l=ye(r[o],e[o]);if(!l.valid)return{valid:!1};i[o]=l.data}return{valid:!0,data:i}}else if(t===f.array&&s===f.array){if(r.length!==e.length)return{valid:!1};const a=[];for(let n=0;n{if($e(n)||$e(i))return m;const o=ye(n.value,i.value);return o.valid?((Le(n)||Le(i))&&t.dirty(),{status:t.value,value:o.data}):(c(s,{code:d.invalid_intersection_types}),m)};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(([n,i])=>a(n,i)):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}))}}ce.create=(r,e,t)=>new ce({left:r,right:e,typeName:p.ZodIntersection,..._(t)});class U extends g{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.array)return c(s,{code:d.invalid_type,expected:f.array,received:s.parsedType}),m;if(s.data.lengththis._def.items.length&&(c(s,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...s.data].map((i,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new V(s,i,s.path,o)):null}).filter(i=>!!i);return s.common.async?Promise.all(n).then(i=>T.mergeArray(t,i)):T.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new U({...this._def,rest:e})}}U.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new U({items:r,typeName:p.ZodTuple,rest:null,..._(e)})};class qe extends g{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.map)return c(s,{code:d.invalid_type,expected:f.map,received:s.parsedType}),m;const a=this._def.keyType,n=this._def.valueType,i=[...s.data.entries()].map(([o,l],u)=>({key:a._parse(new V(s,o,s.path,[u,"key"])),value:n._parse(new V(s,l,s.path,[u,"value"]))}));if(s.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of i){const u=await l.key,v=await l.value;if(u.status==="aborted"||v.status==="aborted")return m;(u.status==="dirty"||v.status==="dirty")&&t.dirty(),o.set(u.value,v.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const l of i){const u=l.key,v=l.value;if(u.status==="aborted"||v.status==="aborted")return m;(u.status==="dirty"||v.status==="dirty")&&t.dirty(),o.set(u.value,v.value)}return{status:t.value,value:o}}}}qe.create=(r,e,t)=>new qe({valueType:e,keyType:r,typeName:p.ZodMap,..._(t)});class re extends g{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==f.set)return c(s,{code:d.invalid_type,expected:f.set,received:s.parsedType}),m;const a=this._def;a.minSize!==null&&s.data.sizea.maxSize.value&&(c(s,{code:d.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=this._def.valueType;function i(l){const u=new Set;for(const v of l){if(v.status==="aborted")return m;v.status==="dirty"&&t.dirty(),u.add(v.value)}return{status:t.value,value:u}}const o=[...s.data.values()].map((l,u)=>n._parse(new V(s,l,s.path,u)));return s.common.async?Promise.all(o).then(l=>i(l)):i(o)}min(e,t){return new re({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new re({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}re.create=(r,e)=>new re({valueType:r,minSize:null,maxSize:null,typeName:p.ZodSet,..._(e)});class Be extends g{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Be.create=(r,e)=>new Be({getter:r,typeName:p.ZodLazy,..._(e)});class Ye extends g{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}Ye.create=(r,e)=>new Ye({value:r,typeName:p.ZodLiteral,..._(e)});function nt(r,e){return new B({values:r,typeName:p.ZodEnum,..._(e)})}class B extends g{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return c(t,{expected:y.joinValues(s),received:t.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),s=this._def.values;return c(t,{received:t.data,code:d.invalid_enum_value,options:s}),m}return C(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return B.create(e,{...this._def,...t})}exclude(e,t=this._def){return B.create(this.options.filter(s=>!e.includes(s)),{...this._def,...t})}}B.create=nt;class He extends g{_parse(e){const t=y.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==f.string&&s.parsedType!==f.number){const a=y.objectValues(t);return c(s,{expected:y.joinValues(a),received:s.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(y.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=y.objectValues(t);return c(s,{received:s.data,code:d.invalid_enum_value,options:a}),m}return C(e.data)}get enum(){return this._def.values}}He.create=(r,e)=>new He({values:r,typeName:p.ZodNativeEnum,..._(e)});class le extends g{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.promise&&t.common.async===!1)return c(t,{code:d.invalid_type,expected:f.promise,received:t.parsedType}),m;const s=t.parsedType===f.promise?t.data:Promise.resolve(t.data);return C(s.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}le.create=(r,e)=>new le({type:r,typeName:p.ZodPromise,..._(e)});class Y extends g{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===p.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{c(s,i),i.fatal?t.abort():t.dirty()},get path(){return s.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(s.data,n);if(s.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return m;const l=await this._def.schema._parseAsync({data:o,path:s.path,parent:s});return l.status==="aborted"?m:l.status==="dirty"||t.value==="dirty"?Q(l.value):l});{if(t.value==="aborted")return m;const o=this._def.schema._parseSync({data:i,path:s.path,parent:s});return o.status==="aborted"?m:o.status==="dirty"||t.value==="dirty"?Q(o.value):o}}if(a.type==="refinement"){const i=o=>{const l=a.refinement(o,n);if(s.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(a.type==="transform")if(s.common.async===!1){const i=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!q(i))return m;const o=a.transform(i.value,n);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(i=>q(i)?Promise.resolve(a.transform(i.value,n)).then(o=>({status:t.value,value:o})):m);y.assertNever(a)}}Y.create=(r,e,t)=>new Y({schema:r,typeName:p.ZodEffects,effect:e,..._(t)});Y.createWithPreprocess=(r,e,t)=>new Y({schema:e,effect:{type:"preprocess",transform:r},typeName:p.ZodEffects,..._(t)});class L extends g{_parse(e){return this._getType(e)===f.undefined?C(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}L.create=(r,e)=>new L({innerType:r,typeName:p.ZodOptional,..._(e)});class H extends g{_parse(e){return this._getType(e)===f.null?C(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}H.create=(r,e)=>new H({innerType:r,typeName:p.ZodNullable,..._(e)});class xe extends g{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===f.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}xe.create=(r,e)=>new xe({innerType:r,typeName:p.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,..._(e)});class be extends g{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return ie(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new R(s.common.issues)},input:s.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new R(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}be.create=(r,e)=>new be({innerType:r,typeName:p.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,..._(e)});class Ge extends g{_parse(e){if(this._getType(e)!==f.nan){const s=this._getOrReturnCtx(e);return c(s,{code:d.invalid_type,expected:f.nan,received:s.parsedType}),m}return{status:"valid",value:e.data}}}Ge.create=r=>new Ge({typeName:p.ZodNaN,..._(r)});class _r extends g{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class Te extends g{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),Q(n.value)):this._def.out._parseAsync({data:n.value,path:s.path,parent:s})})();{const a=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:s.path,parent:s})}}static create(e,t){return new Te({in:e,out:t,typeName:p.ZodPipeline})}}class ke extends g{_parse(e){const t=this._def.innerType._parse(e),s=a=>(q(a)&&(a.value=Object.freeze(a.value)),a);return ie(t)?t.then(a=>s(a)):s(t)}unwrap(){return this._def.innerType}}ke.create=(r,e)=>new ke({innerType:r,typeName:p.ZodReadonly,..._(e)});var p;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(p||(p={}));const Je=$.create;D.create;N.create;const gr=k.create;de.create;ce.create;U.create;B.create;le.create;L.create;H.create;var Xe;(function(r){r[r.Idle=0]="Idle",r[r.Submitting=1]="Submitting",r[r.Delayed=2]="Delayed",r[r.Timeout=3]="Timeout"})(Xe||(Xe={}));let yr=!1;try{SUPERFORMS_LEGACY&&(yr=!0)}catch{}let xr=!1;try{globalThis.STORIES&&(xr=!0)}catch{}let br=!1;try{SUPERFORMS_LEGACY&&(br=!0)}catch{}var Qe;(function(r){r[r.Array=0]="Array",r[r.BigInt=1]="BigInt",r[r.Boolean=2]="Boolean",r[r.Date=3]="Date",r[r.Constructor=4]="Constructor",r[r.Function=5]="Function",r[r.Null=6]="Null",r[r.Number=7]="Number",r[r.Object=8]="Object",r[r.RegExp=9]="RegExp",r[r.String=10]="String",r[r.Symbol=11]="Symbol",r[r.TypeArray=12]="TypeArray",r[r.Undefined=13]="Undefined"})(Qe||(Qe={}));BigInt("14695981039346656037");BigInt("1099511628211"),BigInt("18446744073709551616");Array.from({length:256}).map((r,e)=>BigInt(e));const it=new Float64Array(1);new DataView(it.buffer);new Uint8Array(it.buffer);new TextEncoder;function we(r,e){return Array.from({length:e-r+1},(t,s)=>String.fromCharCode(r+s))}[...we(97,122),...we(65,90)];const kr="0",wr=we(49,57);[...wr];new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");var Tr=G(''),Cr=G(' '),Sr=G(' '),Ar=G(' Logging in...',1),Or=G('
');function Nr(r,e){et(e,!1);let t=Oe(e,"isLoading",8,!1),s=Oe(e,"errorMessage",8,null);const a=At(),n=gr({email:Je().min(1,"Email is required").email("Invalid email format"),password:Je().min(1,"Password is required")});let i=Ae({email:"",password:""}),o=Ae({});function l(){Ot(o,{});try{return n.parse(b(i)),!0}catch(x){return x instanceof R&&x.errors.forEach(w=>{const I=w.path[0];he(o,b(o)[I]=w.message)}),!1}}function u(){l()&&a("login",b(i))}Ke();var v=Or(),O=S(v);{var J=x=>{var w=Tr(),I=E(S(w),2),mt=S(I,!0);A(I),A(w),ae(()=>me(mt,s())),M(x,w)};ne(O,x=>{s()&&x(J)})}var se=E(O,2),P=E(S(se),2);Ze(P);let Ce;var ot=E(P,2);{var dt=x=>{var w=Cr(),I=S(w,!0);A(w),ae(()=>me(I,(b(o),Z(()=>b(o).email)))),M(x,w)};ne(ot,x=>{b(o),Z(()=>b(o).email)&&x(dt)})}A(se);var ue=E(se,2),z=E(S(ue),2);Ze(z);let Se;var ct=E(z,2);{var lt=x=>{var w=Sr(),I=S(w,!0);A(w),ae(()=>me(I,(b(o),Z(()=>b(o).password)))),M(x,w)};ne(ct,x=>{b(o),Z(()=>b(o).password)&&x(lt)})}A(ue);var fe=E(ue,2),ut=S(fe);{var ft=x=>{var w=Ar();rt(),M(x,w)},ht=x=>{var w=pt("Login");M(x,w)};ne(ut,x=>{t()?x(ft):x(ht,!1)})}A(fe),A(v),ae(()=>{Ce=Re(P,1,"input input-bordered w-full",null,Ce,{"input-error":b(o).email}),P.disabled=t(),W(P,"aria-invalid",(b(o),Z(()=>b(o).email?"true":"false"))),W(P,"aria-describedby",(b(o),Z(()=>b(o).email?"email-error":void 0))),Se=Re(z,1,"input input-bordered w-full",null,Se,{"input-error":b(o).password}),z.disabled=t(),W(z,"aria-invalid",(b(o),Z(()=>b(o).password?"true":"false"))),W(z,"aria-describedby",(b(o),Z(()=>b(o).password?"password-error":void 0))),fe.disabled=t()}),Ie(P,()=>b(i).email,x=>he(i,b(i).email=x)),Ie(z,()=>b(i).password,x=>he(i,b(i).password=x)),$t("submit",v,Wt(u)),M(r,v),tt()}var Rr=G('

Welcome to Headroom

Sign in to access your dashboard

Demo credentials:

admin@example.com / password

');function Ur(r,e){et(e,!1);const t=()=>It(Vt,"$auth",s),[s,a]=Et();async function n(v){const{email:O,password:J}=v.detail;(await Lt({email:O,password:J})).success&&jt("/dashboard")}Ke();var i=Rr();Zt("1x05zx6",v=>{Nt(()=>{Rt.title="Login - Headroom"})});var o=S(i),l=S(o),u=E(S(l),4);Nr(u,{get isLoading(){return t().isLoading},get errorMessage(){return t().error},$$events:{login:n}}),rt(4),A(l),A(o),A(i),M(r,i),tt(),a()}export{Ur as component,Mr as universal};