aso-cli 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -48
- package/cli/dist/cli.js +213 -159
- package/cli/dist/cli.js.map +4 -4
- package/cli/dist/dashboard-public/aso-sidebar-icon.png +0 -0
- package/cli/dist/dashboard-public/assets/index-C9Cq1ZYb.css +1 -0
- package/cli/dist/dashboard-public/assets/index-EguovmUL.js +23 -0
- package/cli/dist/dashboard-public/dashboard.jpg +0 -0
- package/cli/dist/dashboard-public/favicon.png +0 -0
- package/cli/dist/dashboard-public/index.html +3 -3
- package/cli/dist/dashboard-public/mcp.jpg +0 -0
- package/cli/dist/mcp.js +54 -35
- package/cli/dist/mcp.js.map +4 -4
- package/package.json +12 -6
- package/cli/dist/dashboard-public/assets/index-BtzyVl7h.js +0 -23
- package/cli/dist/dashboard-public/assets/index-CcqTg85O.css +0 -1
package/cli/dist/mcp.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var
|
|
3
|
-
`);let o;for(;(o=
|
|
4
|
-
`),i=i.replace(/\\r/g,"\r")),t[r]=i}return t}function PS(e){e=e||{};let t=Rg(e);e.path=t;let n=je.configDotenv(e);if(!n.parsed){let a=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw a.code="MISSING_DATA",a}let o=Ng(e).split(","),r=o.length,i;for(let a=0;a<r;a++)try{let s=o[a].trim(),c=OS(n,s);i=je.decrypt(c.ciphertext,c.key);break}catch(s){if(a+1>=r)throw s}return je.parse(i)}function jS(e){console.log(`[dotenv@${gd}][WARN] ${e}`)}function Co(e){console.log(`[dotenv@${gd}][DEBUG] ${e}`)}function Og(e){console.log(`[dotenv@${gd}] ${e}`)}function Ng(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function OS(e,t){let n;try{n=new URL(t)}catch(s){if(s.code==="ERR_INVALID_URL"){let c=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw c.code="INVALID_DOTENV_KEY",c}throw s}let o=n.password;if(!o){let s=new Error("INVALID_DOTENV_KEY: Missing key part");throw s.code="INVALID_DOTENV_KEY",s}let r=n.searchParams.get("environment");if(!r){let s=new Error("INVALID_DOTENV_KEY: Missing environment part");throw s.code="INVALID_DOTENV_KEY",s}let i=`DOTENV_VAULT_${r.toUpperCase()}`,a=e.parsed[i];if(!a){let s=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${i} in your .env.vault file.`);throw s.code="NOT_FOUND_DOTENV_ENVIRONMENT",s}return{ciphertext:a,key:o}}function Rg(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let n of e.path)hd.existsSync(n)&&(t=n.endsWith(".vault")?n:`${n}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=Ha.resolve(process.cwd(),".env.vault");return hd.existsSync(t)?t:null}function jg(e){return e[0]==="~"?Ha.join(SS.homedir(),e.slice(1)):e}function NS(e){let t=!!(e&&e.debug),n=e&&"quiet"in e?e.quiet:!0;(t||!n)&&Og("Loading env from encrypted .env.vault");let o=je._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),je.populate(r,o,e),{parsed:o}}function RS(e){let t=Ha.resolve(process.cwd(),".env"),n="utf8",o=!!(e&&e.debug),r=e&&"quiet"in e?e.quiet:!0;e&&e.encoding?n=e.encoding:o&&Co("No encoding is specified. UTF-8 is used by default");let i=[t];if(e&&e.path)if(!Array.isArray(e.path))i=[jg(e.path)];else{i=[];for(let l of e.path)i.push(jg(l))}let a,s={};for(let l of i)try{let d=je.parse(hd.readFileSync(l,{encoding:n}));je.populate(s,d,e)}catch(d){o&&Co(`Failed to load ${l} ${d.message}`),a=d}let c=process.env;if(e&&e.processEnv!=null&&(c=e.processEnv),je.populate(c,s,e),o||!r){let l=Object.keys(s).length,d=[];for(let f of i)try{let y=Ha.relative(process.cwd(),f);d.push(y)}catch(y){o&&Co(`Failed to load ${f} ${y.message}`),a=y}Og(`injecting env (${l}) from ${d.join(",")}`)}return a?{parsed:s,error:a}:{parsed:s}}function AS(e){if(Ng(e).length===0)return je.configDotenv(e);let t=Rg(e);return t?je._configVault(e):(jS(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),je.configDotenv(e))}function DS(e,t){let n=Buffer.from(t.slice(-64),"hex"),o=Buffer.from(e,"base64"),r=o.subarray(0,12),i=o.subarray(-16);o=o.subarray(12,-16);try{let a=zS.createDecipheriv("aes-256-gcm",n,r);return a.setAuthTag(i),`${a.update(o)}${a.final()}`}catch(a){let s=a instanceof RangeError,c=a.message==="Invalid key length",l=a.message==="Unsupported state or unable to authenticate data";if(s||c){let d=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw d.code="INVALID_DOTENV_KEY",d}else if(l){let d=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw d.code="DECRYPTION_FAILED",d}else throw a}}function CS(e,t,n={}){let o=!!(n&&n.debug),r=!!(n&&n.override);if(typeof t!="object"){let i=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw i.code="OBJECT_REQUIRED",i}for(let i of Object.keys(t))Object.prototype.hasOwnProperty.call(e,i)?(r===!0&&(e[i]=t[i]),o&&Co(r===!0?`"${i}" is already defined and WAS overwritten`:`"${i}" is already defined and was NOT overwritten`)):e[i]=t[i]}var je={configDotenv:RS,_configVault:NS,_parseVault:PS,config:AS,decrypt:DS,parse:TS,populate:CS};Jt.exports.configDotenv=je.configDotenv;Jt.exports._configVault=je._configVault;Jt.exports._parseVault=je._parseVault;Jt.exports.config=je.config;Jt.exports.decrypt=je.decrypt;Jt.exports.parse=je.parse;Jt.exports.populate=je.populate;Jt.exports=je});var oa=A(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.regexpCode=me.getEsmExportName=me.getProperty=me.safeStringify=me.stringify=me.strConcat=me.addCodeArg=me.str=me._=me.nil=me._Code=me.Name=me.IDENTIFIER=me._CodeOrName=void 0;var ra=class{};me._CodeOrName=ra;me.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var en=class extends ra{constructor(t){if(super(),!me.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};me.Name=en;var yt=class extends ra{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((n,o)=>`${n}${o}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((n,o)=>(o instanceof en&&(n[o.str]=(n[o.str]||0)+1),n),{})}};me._Code=yt;me.nil=new yt("");function rb(e,...t){let n=[e[0]],o=0;for(;o<t.length;)Xp(n,t[o]),n.push(e[++o]);return new yt(n)}me._=rb;var Wp=new yt("+");function nb(e,...t){let n=[na(e[0])],o=0;for(;o<t.length;)n.push(Wp),Xp(n,t[o]),n.push(Wp,na(e[++o]));return PP(n),new yt(n)}me.str=nb;function Xp(e,t){t instanceof yt?e.push(...t._items):t instanceof en?e.push(t):e.push(NP(t))}me.addCodeArg=Xp;function PP(e){let t=1;for(;t<e.length-1;){if(e[t]===Wp){let n=jP(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function jP(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof en||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof en))return`"${e}${t.slice(1)}`}function OP(e,t){return t.emptyStr()?e:e.emptyStr()?t:nb`${e}${t}`}me.strConcat=OP;function NP(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:na(Array.isArray(e)?e.join(","):e)}function RP(e){return new yt(na(e))}me.stringify=RP;function na(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}me.safeStringify=na;function AP(e){return typeof e=="string"&&me.IDENTIFIER.test(e)?new yt(`.${e}`):rb`[${e}]`}me.getProperty=AP;function DP(e){if(typeof e=="string"&&me.IDENTIFIER.test(e))return new yt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}me.getEsmExportName=DP;function CP(e){return new yt(e.toString())}me.regexpCode=CP});var em=A(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.ValueScope=ot.ValueScopeName=ot.Scope=ot.varKinds=ot.UsedValueState=void 0;var nt=oa(),Yp=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},nl;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(nl||(ot.UsedValueState=nl={}));ot.varKinds={const:new nt.Name("const"),let:new nt.Name("let"),var:new nt.Name("var")};var ol=class{constructor({prefixes:t,parent:n}={}){this._names={},this._prefixes=t,this._parent=n}toName(t){return t instanceof nt.Name?t:this.name(t)}name(t){return new nt.Name(this._newName(t))}_newName(t){let n=this._names[t]||this._nameGroup(t);return`${t}${n.index++}`}_nameGroup(t){var n,o;if(!((o=(n=this._parent)===null||n===void 0?void 0:n._prefixes)===null||o===void 0)&&o.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};ot.Scope=ol;var il=class extends nt.Name{constructor(t,n){super(n),this.prefix=t}setValue(t,{property:n,itemIndex:o}){this.value=t,this.scopePath=(0,nt._)`.${new nt.Name(n)}[${o}]`}};ot.ValueScopeName=il;var ZP=(0,nt._)`\n`,Qp=class extends ol{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?ZP:nt.nil}}get(){return this._scope}name(t){return new il(t,this._newName(t))}value(t,n){var o;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(t),{prefix:i}=r,a=(o=n.key)!==null&&o!==void 0?o:n.ref,s=this._values[i];if(s){let d=s.get(a);if(d)return d}else s=this._values[i]=new Map;s.set(a,r);let c=this._scope[i]||(this._scope[i]=[]),l=c.length;return c[l]=n.ref,r.setValue(n,{property:i,itemIndex:l}),r}getValue(t,n){let o=this._values[t];if(o)return o.get(n)}scopeRefs(t,n=this._values){return this._reduceValues(n,o=>{if(o.scopePath===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return(0,nt._)`${t}${o.scopePath}`})}scopeCode(t=this._values,n,o){return this._reduceValues(t,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},n,o)}_reduceValues(t,n,o={},r){let i=nt.nil;for(let a in t){let s=t[a];if(!s)continue;let c=o[a]=o[a]||new Map;s.forEach(l=>{if(c.has(l))return;c.set(l,nl.Started);let d=n(l);if(d){let f=this.opts.es5?ot.varKinds.var:ot.varKinds.const;i=(0,nt._)`${i}${f} ${l} = ${d};${this.opts._n}`}else if(d=r?.(l))i=(0,nt._)`${i}${d}${this.opts._n}`;else throw new Yp(l);c.set(l,nl.Completed)})}return i}};ot.ValueScope=Qp});var re=A(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.or=oe.and=oe.not=oe.CodeGen=oe.operators=oe.varKinds=oe.ValueScopeName=oe.ValueScope=oe.Scope=oe.Name=oe.regexpCode=oe.stringify=oe.getProperty=oe.nil=oe.strConcat=oe.str=oe._=void 0;var le=oa(),jt=em(),Tr=oa();Object.defineProperty(oe,"_",{enumerable:!0,get:function(){return Tr._}});Object.defineProperty(oe,"str",{enumerable:!0,get:function(){return Tr.str}});Object.defineProperty(oe,"strConcat",{enumerable:!0,get:function(){return Tr.strConcat}});Object.defineProperty(oe,"nil",{enumerable:!0,get:function(){return Tr.nil}});Object.defineProperty(oe,"getProperty",{enumerable:!0,get:function(){return Tr.getProperty}});Object.defineProperty(oe,"stringify",{enumerable:!0,get:function(){return Tr.stringify}});Object.defineProperty(oe,"regexpCode",{enumerable:!0,get:function(){return Tr.regexpCode}});Object.defineProperty(oe,"Name",{enumerable:!0,get:function(){return Tr.Name}});var ul=em();Object.defineProperty(oe,"Scope",{enumerable:!0,get:function(){return ul.Scope}});Object.defineProperty(oe,"ValueScope",{enumerable:!0,get:function(){return ul.ValueScope}});Object.defineProperty(oe,"ValueScopeName",{enumerable:!0,get:function(){return ul.ValueScopeName}});Object.defineProperty(oe,"varKinds",{enumerable:!0,get:function(){return ul.varKinds}});oe.operators={GT:new le._Code(">"),GTE:new le._Code(">="),LT:new le._Code("<"),LTE:new le._Code("<="),EQ:new le._Code("==="),NEQ:new le._Code("!=="),NOT:new le._Code("!"),OR:new le._Code("||"),AND:new le._Code("&&"),ADD:new le._Code("+")};var rr=class{optimizeNodes(){return this}optimizeNames(t,n){return this}},tm=class extends rr{constructor(t,n,o){super(),this.varKind=t,this.name=n,this.rhs=o}render({es5:t,_n:n}){let o=t?jt.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${o} ${this.name}${r};`+n}optimizeNames(t,n){if(t[this.name.str])return this.rhs&&(this.rhs=go(this.rhs,t,n)),this}get names(){return this.rhs instanceof le._CodeOrName?this.rhs.names:{}}},al=class extends rr{constructor(t,n,o){super(),this.lhs=t,this.rhs=n,this.sideEffects=o}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,n){if(!(this.lhs instanceof le.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=go(this.rhs,t,n),this}get names(){let t=this.lhs instanceof le.Name?{}:{...this.lhs.names};return cl(t,this.rhs)}},rm=class extends al{constructor(t,n,o,r){super(t,o,r),this.op=n}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},nm=class extends rr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},om=class extends rr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},im=class extends rr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},am=class extends rr{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,n){return this.code=go(this.code,t,n),this}get names(){return this.code instanceof le._CodeOrName?this.code.names:{}}},ia=class extends rr{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((n,o)=>n+o.render(t),"")}optimizeNodes(){let{nodes:t}=this,n=t.length;for(;n--;){let o=t[n].optimizeNodes();Array.isArray(o)?t.splice(n,1,...o):o?t[n]=o:t.splice(n,1)}return t.length>0?this:void 0}optimizeNames(t,n){let{nodes:o}=this,r=o.length;for(;r--;){let i=o[r];i.optimizeNames(t,n)||(UP(t,i.names),o.splice(r,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((t,n)=>nn(t,n.names),{})}},nr=class extends ia{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},sm=class extends ia{},ho=class extends nr{};ho.kind="else";var tn=class e extends nr{constructor(t,n){super(n),this.condition=t}render(t){let n=`if(${this.condition})`+super.render(t);return this.else&&(n+="else "+this.else.render(t)),n}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let o=n.optimizeNodes();n=this.else=Array.isArray(o)?new ho(o):o}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(ob(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,n){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,n),!!(super.optimizeNames(t,n)||this.else))return this.condition=go(this.condition,t,n),this}get names(){let t=super.names;return cl(t,this.condition),this.else&&nn(t,this.else.names),t}};tn.kind="if";var rn=class extends nr{};rn.kind="for";var cm=class extends rn{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,n){if(super.optimizeNames(t,n))return this.iteration=go(this.iteration,t,n),this}get names(){return nn(super.names,this.iteration.names)}},um=class extends rn{constructor(t,n,o,r){super(),this.varKind=t,this.name=n,this.from=o,this.to=r}render(t){let n=t.es5?jt.varKinds.var:this.varKind,{name:o,from:r,to:i}=this;return`for(${n} ${o}=${r}; ${o}<${i}; ${o}++)`+super.render(t)}get names(){let t=cl(super.names,this.from);return cl(t,this.to)}},sl=class extends rn{constructor(t,n,o,r){super(),this.loop=t,this.varKind=n,this.name=o,this.iterable=r}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,n){if(super.optimizeNames(t,n))return this.iterable=go(this.iterable,t,n),this}get names(){return nn(super.names,this.iterable.names)}},aa=class extends nr{constructor(t,n,o){super(),this.name=t,this.args=n,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};aa.kind="func";var sa=class extends ia{render(t){return"return "+super.render(t)}};sa.kind="return";var lm=class extends nr{render(t){let n="try"+super.render(t);return this.catch&&(n+=this.catch.render(t)),this.finally&&(n+=this.finally.render(t)),n}optimizeNodes(){var t,n;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(t,n){var o,r;return super.optimizeNames(t,n),(o=this.catch)===null||o===void 0||o.optimizeNames(t,n),(r=this.finally)===null||r===void 0||r.optimizeNames(t,n),this}get names(){let t=super.names;return this.catch&&nn(t,this.catch.names),this.finally&&nn(t,this.finally.names),t}},ca=class extends nr{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};ca.kind="catch";var ua=class extends nr{render(t){return"finally"+super.render(t)}};ua.kind="finally";var dm=class{constructor(t,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
|
|
5
|
-
`:""},this._extScope=t,this._scope=new jt.Scope({parent:t}),this._nodes=[new sm]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,n){let o=this._extScope.value(t,n);return(this._values[o.prefix]||(this._values[o.prefix]=new Set)).add(o),o}getScopeValue(t,n){return this._extScope.getValue(t,n)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,n,o,r){let i=this._scope.toName(n);return o!==void 0&&r&&(this._constants[i.str]=o),this._leafNode(new tm(t,i,o)),i}const(t,n,o){return this._def(jt.varKinds.const,t,n,o)}let(t,n,o){return this._def(jt.varKinds.let,t,n,o)}var(t,n,o){return this._def(jt.varKinds.var,t,n,o)}assign(t,n,o){return this._leafNode(new al(t,n,o))}add(t,n){return this._leafNode(new rm(t,oe.operators.ADD,n))}code(t){return typeof t=="function"?t():t!==le.nil&&this._leafNode(new am(t)),this}object(...t){let n=["{"];for(let[o,r]of t)n.length>1&&n.push(","),n.push(o),(o!==r||this.opts.es5)&&(n.push(":"),(0,le.addCodeArg)(n,r));return n.push("}"),new le._Code(n)}if(t,n,o){if(this._blockNode(new tn(t)),n&&o)this.code(n).else().code(o).endIf();else if(n)this.code(n).endIf();else if(o)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new tn(t))}else(){return this._elseNode(new ho)}endIf(){return this._endBlockNode(tn,ho)}_for(t,n){return this._blockNode(t),n&&this.code(n).endFor(),this}for(t,n){return this._for(new cm(t),n)}forRange(t,n,o,r,i=this.opts.es5?jt.varKinds.var:jt.varKinds.let){let a=this._scope.toName(t);return this._for(new um(i,a,n,o),()=>r(a))}forOf(t,n,o,r=jt.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let a=n instanceof le.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,le._)`${a}.length`,s=>{this.var(i,(0,le._)`${a}[${s}]`),o(i)})}return this._for(new sl("of",r,i,n),()=>o(i))}forIn(t,n,o,r=this.opts.es5?jt.varKinds.var:jt.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,le._)`Object.keys(${n})`,o);let i=this._scope.toName(t);return this._for(new sl("in",r,i,n),()=>o(i))}endFor(){return this._endBlockNode(rn)}label(t){return this._leafNode(new nm(t))}break(t){return this._leafNode(new om(t))}return(t){let n=new sa;if(this._blockNode(n),this.code(t),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(sa)}try(t,n,o){if(!n&&!o)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new lm;if(this._blockNode(r),this.code(t),n){let i=this.name("e");this._currNode=r.catch=new ca(i),n(i)}return o&&(this._currNode=r.finally=new ua,this.code(o)),this._endBlockNode(ca,ua)}throw(t){return this._leafNode(new im(t))}block(t,n){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(n),this}endBlock(t){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let o=this._nodes.length-n;if(o<0||t!==void 0&&o!==t)throw new Error(`CodeGen: wrong number of nodes: ${o} vs ${t} expected`);return this._nodes.length=n,this}func(t,n=le.nil,o,r){return this._blockNode(new aa(t,n,o)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(aa)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,n){let o=this._currNode;if(o instanceof t||n&&o instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${t.kind}/${n.kind}`:t.kind}"`)}_elseNode(t){let n=this._currNode;if(!(n instanceof tn))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let n=this._nodes;n[n.length-1]=t}};oe.CodeGen=dm;function nn(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function cl(e,t){return t instanceof le._CodeOrName?nn(e,t.names):e}function go(e,t,n){if(e instanceof le.Name)return o(e);if(!r(e))return e;return new le._Code(e._items.reduce((i,a)=>(a instanceof le.Name&&(a=o(a)),a instanceof le._Code?i.push(...a._items):i.push(a),i),[]));function o(i){let a=n[i.str];return a===void 0||t[i.str]!==1?i:(delete t[i.str],a)}function r(i){return i instanceof le._Code&&i._items.some(a=>a instanceof le.Name&&t[a.str]===1&&n[a.str]!==void 0)}}function UP(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function ob(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,le._)`!${fm(e)}`}oe.not=ob;var MP=ib(oe.operators.AND);function LP(...e){return e.reduce(MP)}oe.and=LP;var qP=ib(oe.operators.OR);function VP(...e){return e.reduce(qP)}oe.or=VP;function ib(e){return(t,n)=>t===le.nil?n:n===le.nil?t:(0,le._)`${fm(t)} ${e} ${fm(n)}`}function fm(e){return e instanceof le.Name?e:(0,le._)`(${e})`}});var fe=A(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.checkStrictMode=ae.getErrorPath=ae.Type=ae.useFunc=ae.setEvaluated=ae.evaluatedPropsToName=ae.mergeEvaluated=ae.eachItem=ae.unescapeJsonPointer=ae.escapeJsonPointer=ae.escapeFragment=ae.unescapeFragment=ae.schemaRefOrVal=ae.schemaHasRulesButRef=ae.schemaHasRules=ae.checkUnknownRules=ae.alwaysValidSchema=ae.toHash=void 0;var be=re(),FP=oa();function BP(e){let t={};for(let n of e)t[n]=!0;return t}ae.toHash=BP;function KP(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(cb(e,t),!ub(t,e.self.RULES.all))}ae.alwaysValidSchema=KP;function cb(e,t=e.schema){let{opts:n,self:o}=e;if(!n.strictSchema||typeof t=="boolean")return;let r=o.RULES.keywords;for(let i in t)r[i]||fb(e,`unknown keyword: "${i}"`)}ae.checkUnknownRules=cb;function ub(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(t[n])return!0;return!1}ae.schemaHasRules=ub;function HP(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}ae.schemaHasRulesButRef=HP;function JP({topSchemaRef:e,schemaPath:t},n,o,r){if(!r){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,be._)`${n}`}return(0,be._)`${e}${t}${(0,be.getProperty)(o)}`}ae.schemaRefOrVal=JP;function GP(e){return lb(decodeURIComponent(e))}ae.unescapeFragment=GP;function WP(e){return encodeURIComponent(mm(e))}ae.escapeFragment=WP;function mm(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ae.escapeJsonPointer=mm;function lb(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ae.unescapeJsonPointer=lb;function XP(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}ae.eachItem=XP;function ab({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:o}){return(r,i,a,s)=>{let c=a===void 0?i:a instanceof be.Name?(i instanceof be.Name?e(r,i,a):t(r,i,a),a):i instanceof be.Name?(t(r,a,i),i):n(i,a);return s===be.Name&&!(c instanceof be.Name)?o(r,c):c}}ae.mergeEvaluated={props:ab({mergeNames:(e,t,n)=>e.if((0,be._)`${n} !== true && ${t} !== undefined`,()=>{e.if((0,be._)`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,(0,be._)`${n} || {}`).code((0,be._)`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if((0,be._)`${n} !== true`,()=>{t===!0?e.assign(n,!0):(e.assign(n,(0,be._)`${n} || {}`),hm(e,n,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:db}),items:ab({mergeNames:(e,t,n)=>e.if((0,be._)`${n} !== true && ${t} !== undefined`,()=>e.assign(n,(0,be._)`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if((0,be._)`${n} !== true`,()=>e.assign(n,t===!0?!0:(0,be._)`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function db(e,t){if(t===!0)return e.var("props",!0);let n=e.var("props",(0,be._)`{}`);return t!==void 0&&hm(e,n,t),n}ae.evaluatedPropsToName=db;function hm(e,t,n){Object.keys(n).forEach(o=>e.assign((0,be._)`${t}${(0,be.getProperty)(o)}`,!0))}ae.setEvaluated=hm;var sb={};function YP(e,t){return e.scopeValue("func",{ref:t,code:sb[t.code]||(sb[t.code]=new FP._Code(t.code))})}ae.useFunc=YP;var pm;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(pm||(ae.Type=pm={}));function QP(e,t,n){if(e instanceof be.Name){let o=t===pm.Num;return n?o?(0,be._)`"[" + ${e} + "]"`:(0,be._)`"['" + ${e} + "']"`:o?(0,be._)`"/" + ${e}`:(0,be._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,be.getProperty)(e).toString():"/"+mm(e)}ae.getErrorPath=QP;function fb(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw new Error(t);e.self.logger.warn(t)}}ae.checkStrictMode=fb});var or=A(gm=>{"use strict";Object.defineProperty(gm,"__esModule",{value:!0});var Ke=re(),ej={data:new Ke.Name("data"),valCxt:new Ke.Name("valCxt"),instancePath:new Ke.Name("instancePath"),parentData:new Ke.Name("parentData"),parentDataProperty:new Ke.Name("parentDataProperty"),rootData:new Ke.Name("rootData"),dynamicAnchors:new Ke.Name("dynamicAnchors"),vErrors:new Ke.Name("vErrors"),errors:new Ke.Name("errors"),this:new Ke.Name("this"),self:new Ke.Name("self"),scope:new Ke.Name("scope"),json:new Ke.Name("json"),jsonPos:new Ke.Name("jsonPos"),jsonLen:new Ke.Name("jsonLen"),jsonPart:new Ke.Name("jsonPart")};gm.default=ej});var la=A(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.extendErrors=He.resetErrorsCount=He.reportExtraError=He.reportError=He.keyword$DataError=He.keywordError=void 0;var pe=re(),ll=fe(),Xe=or();He.keywordError={message:({keyword:e})=>(0,pe.str)`must pass "${e}" keyword validation`};He.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,pe.str)`"${e}" keyword must be ${t} ($data)`:(0,pe.str)`"${e}" keyword is invalid ($data)`};function tj(e,t=He.keywordError,n,o){let{it:r}=e,{gen:i,compositeRule:a,allErrors:s}=r,c=hb(e,t,n);o??(a||s)?pb(i,c):mb(r,(0,pe._)`[${c}]`)}He.reportError=tj;function rj(e,t=He.keywordError,n){let{it:o}=e,{gen:r,compositeRule:i,allErrors:a}=o,s=hb(e,t,n);pb(r,s),i||a||mb(o,Xe.default.vErrors)}He.reportExtraError=rj;function nj(e,t){e.assign(Xe.default.errors,t),e.if((0,pe._)`${Xe.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,pe._)`${Xe.default.vErrors}.length`,t),()=>e.assign(Xe.default.vErrors,null)))}He.resetErrorsCount=nj;function oj({gen:e,keyword:t,schemaValue:n,data:o,errsCount:r,it:i}){if(r===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",r,Xe.default.errors,s=>{e.const(a,(0,pe._)`${Xe.default.vErrors}[${s}]`),e.if((0,pe._)`${a}.instancePath === undefined`,()=>e.assign((0,pe._)`${a}.instancePath`,(0,pe.strConcat)(Xe.default.instancePath,i.errorPath))),e.assign((0,pe._)`${a}.schemaPath`,(0,pe.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,pe._)`${a}.schema`,n),e.assign((0,pe._)`${a}.data`,o))})}He.extendErrors=oj;function pb(e,t){let n=e.const("err",t);e.if((0,pe._)`${Xe.default.vErrors} === null`,()=>e.assign(Xe.default.vErrors,(0,pe._)`[${n}]`),(0,pe._)`${Xe.default.vErrors}.push(${n})`),e.code((0,pe._)`${Xe.default.errors}++`)}function mb(e,t){let{gen:n,validateName:o,schemaEnv:r}=e;r.$async?n.throw((0,pe._)`new ${e.ValidationError}(${t})`):(n.assign((0,pe._)`${o}.errors`,t),n.return(!1))}var on={keyword:new pe.Name("keyword"),schemaPath:new pe.Name("schemaPath"),params:new pe.Name("params"),propertyName:new pe.Name("propertyName"),message:new pe.Name("message"),schema:new pe.Name("schema"),parentSchema:new pe.Name("parentSchema")};function hb(e,t,n){let{createErrors:o}=e.it;return o===!1?(0,pe._)`{}`:ij(e,t,n)}function ij(e,t,n={}){let{gen:o,it:r}=e,i=[aj(r,n),sj(e,n)];return cj(e,t,i),o.object(...i)}function aj({errorPath:e},{instancePath:t}){let n=t?(0,pe.str)`${e}${(0,ll.getErrorPath)(t,ll.Type.Str)}`:e;return[Xe.default.instancePath,(0,pe.strConcat)(Xe.default.instancePath,n)]}function sj({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:o}){let r=o?t:(0,pe.str)`${t}/${e}`;return n&&(r=(0,pe.str)`${r}${(0,ll.getErrorPath)(n,ll.Type.Str)}`),[on.schemaPath,r]}function cj(e,{params:t,message:n},o){let{keyword:r,data:i,schemaValue:a,it:s}=e,{opts:c,propertyName:l,topSchemaRef:d,schemaPath:f}=s;o.push([on.keyword,r],[on.params,typeof t=="function"?t(e):t||(0,pe._)`{}`]),c.messages&&o.push([on.message,typeof n=="function"?n(e):n]),c.verbose&&o.push([on.schema,a],[on.parentSchema,(0,pe._)`${d}${f}`],[Xe.default.data,i]),l&&o.push([on.propertyName,l])}});var vb=A(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.boolOrEmptySchema=vo.topBoolOrEmptySchema=void 0;var uj=la(),lj=re(),dj=or(),fj={message:"boolean schema is false"};function pj(e){let{gen:t,schema:n,validateName:o}=e;n===!1?gb(e,!1):typeof n=="object"&&n.$async===!0?t.return(dj.default.data):(t.assign((0,lj._)`${o}.errors`,null),t.return(!0))}vo.topBoolOrEmptySchema=pj;function mj(e,t){let{gen:n,schema:o}=e;o===!1?(n.var(t,!1),gb(e)):n.var(t,!0)}vo.boolOrEmptySchema=mj;function gb(e,t){let{gen:n,data:o}=e,r={gen:n,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,uj.reportError)(r,fj,void 0,t)}});var vm=A(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.getRules=_o.isJSONType=void 0;var hj=["string","number","integer","boolean","null","object","array"],gj=new Set(hj);function vj(e){return typeof e=="string"&&gj.has(e)}_o.isJSONType=vj;function _j(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}_o.getRules=_j});var _m=A(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.shouldUseRule=Pr.shouldUseGroup=Pr.schemaHasRulesForType=void 0;function yj({schema:e,self:t},n){let o=t.RULES.types[n];return o&&o!==!0&&_b(e,o)}Pr.schemaHasRulesForType=yj;function _b(e,t){return t.rules.some(n=>yb(e,n))}Pr.shouldUseGroup=_b;function yb(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some(o=>e[o]!==void 0))}Pr.shouldUseRule=yb});var da=A(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.reportTypeError=Je.checkDataTypes=Je.checkDataType=Je.coerceAndCheckDataType=Je.getJSONTypes=Je.getSchemaTypes=Je.DataType=void 0;var bj=vm(),$j=_m(),xj=la(),ee=re(),bb=fe(),yo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(yo||(Je.DataType=yo={}));function wj(e){let t=$b(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}Je.getSchemaTypes=wj;function $b(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(bj.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Je.getJSONTypes=$b;function kj(e,t){let{gen:n,data:o,opts:r}=e,i=Sj(t,r.coerceTypes),a=t.length>0&&!(i.length===0&&t.length===1&&(0,$j.schemaHasRulesForType)(e,t[0]));if(a){let s=bm(t,o,r.strictNumbers,yo.Wrong);n.if(s,()=>{i.length?zj(e,t,i):$m(e)})}return a}Je.coerceAndCheckDataType=kj;var xb=new Set(["string","number","integer","boolean","null"]);function Sj(e,t){return t?e.filter(n=>xb.has(n)||t==="array"&&n==="array"):[]}function zj(e,t,n){let{gen:o,data:r,opts:i}=e,a=o.let("dataType",(0,ee._)`typeof ${r}`),s=o.let("coerced",(0,ee._)`undefined`);i.coerceTypes==="array"&&o.if((0,ee._)`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>o.assign(r,(0,ee._)`${r}[0]`).assign(a,(0,ee._)`typeof ${r}`).if(bm(t,r,i.strictNumbers),()=>o.assign(s,r))),o.if((0,ee._)`${s} !== undefined`);for(let l of n)(xb.has(l)||l==="array"&&i.coerceTypes==="array")&&c(l);o.else(),$m(e),o.endIf(),o.if((0,ee._)`${s} !== undefined`,()=>{o.assign(r,s),Ij(e,s)});function c(l){switch(l){case"string":o.elseIf((0,ee._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,ee._)`"" + ${r}`).elseIf((0,ee._)`${r} === null`).assign(s,(0,ee._)`""`);return;case"number":o.elseIf((0,ee._)`${a} == "boolean" || ${r} === null
|
|
2
|
+
"use strict";var TS=Object.create;var yd=Object.defineProperty;var PS=Object.getOwnPropertyDescriptor;var OS=Object.getOwnPropertyNames;var jS=Object.getPrototypeOf,NS=Object.prototype.hasOwnProperty;var A=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Fr=(e,t)=>{for(var n in t)yd(e,n,{get:t[n],enumerable:!0})},RS=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of OS(t))!NS.call(e,r)&&r!==n&&yd(e,r,{get:()=>t[r],enumerable:!(o=PS(t,r))||o.enumerable});return e};var ht=(e,t,n)=>(n=e!=null?TS(jS(e)):{},RS(t||!e||!e.__esModule?yd(n,"default",{value:e,enumerable:!0}):n,e));var Dg=A((q4,AS)=>{AS.exports={name:"dotenv",version:"16.6.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard",pretest:"npm run lint && npm run dts-check",test:"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},homepage:"https://github.com/motdotla/dotenv#readme",funding:"https://dotenvx.com",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^18.11.3",decache:"^4.6.2",sinon:"^14.0.1",standard:"^17.0.0","standard-version":"^9.5.0",tap:"^19.2.0",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Lg=A((V4,Wt)=>{var bd=require("fs"),Ga=require("path"),DS=require("os"),CS=require("crypto"),US=Dg(),$d=US.version,ZS=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function MS(e){let t={},n=e.toString();n=n.replace(/\r\n?/mg,`
|
|
3
|
+
`);let o;for(;(o=ZS.exec(n))!=null;){let r=o[1],i=o[2]||"";i=i.trim();let a=i[0];i=i.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),a==='"'&&(i=i.replace(/\\n/g,`
|
|
4
|
+
`),i=i.replace(/\\r/g,"\r")),t[r]=i}return t}function LS(e){e=e||{};let t=Mg(e);e.path=t;let n=Oe.configDotenv(e);if(!n.parsed){let a=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw a.code="MISSING_DATA",a}let o=Zg(e).split(","),r=o.length,i;for(let a=0;a<r;a++)try{let s=o[a].trim(),c=VS(n,s);i=Oe.decrypt(c.ciphertext,c.key);break}catch(s){if(a+1>=r)throw s}return Oe.parse(i)}function qS(e){console.log(`[dotenv@${$d}][WARN] ${e}`)}function Zo(e){console.log(`[dotenv@${$d}][DEBUG] ${e}`)}function Ug(e){console.log(`[dotenv@${$d}] ${e}`)}function Zg(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function VS(e,t){let n;try{n=new URL(t)}catch(s){if(s.code==="ERR_INVALID_URL"){let c=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw c.code="INVALID_DOTENV_KEY",c}throw s}let o=n.password;if(!o){let s=new Error("INVALID_DOTENV_KEY: Missing key part");throw s.code="INVALID_DOTENV_KEY",s}let r=n.searchParams.get("environment");if(!r){let s=new Error("INVALID_DOTENV_KEY: Missing environment part");throw s.code="INVALID_DOTENV_KEY",s}let i=`DOTENV_VAULT_${r.toUpperCase()}`,a=e.parsed[i];if(!a){let s=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${i} in your .env.vault file.`);throw s.code="NOT_FOUND_DOTENV_ENVIRONMENT",s}return{ciphertext:a,key:o}}function Mg(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(let n of e.path)bd.existsSync(n)&&(t=n.endsWith(".vault")?n:`${n}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=Ga.resolve(process.cwd(),".env.vault");return bd.existsSync(t)?t:null}function Cg(e){return e[0]==="~"?Ga.join(DS.homedir(),e.slice(1)):e}function FS(e){let t=!!(e&&e.debug),n=e&&"quiet"in e?e.quiet:!0;(t||!n)&&Ug("Loading env from encrypted .env.vault");let o=Oe._parseVault(e),r=process.env;return e&&e.processEnv!=null&&(r=e.processEnv),Oe.populate(r,o,e),{parsed:o}}function BS(e){let t=Ga.resolve(process.cwd(),".env"),n="utf8",o=!!(e&&e.debug),r=e&&"quiet"in e?e.quiet:!0;e&&e.encoding?n=e.encoding:o&&Zo("No encoding is specified. UTF-8 is used by default");let i=[t];if(e&&e.path)if(!Array.isArray(e.path))i=[Cg(e.path)];else{i=[];for(let l of e.path)i.push(Cg(l))}let a,s={};for(let l of i)try{let d=Oe.parse(bd.readFileSync(l,{encoding:n}));Oe.populate(s,d,e)}catch(d){o&&Zo(`Failed to load ${l} ${d.message}`),a=d}let c=process.env;if(e&&e.processEnv!=null&&(c=e.processEnv),Oe.populate(c,s,e),o||!r){let l=Object.keys(s).length,d=[];for(let f of i)try{let _=Ga.relative(process.cwd(),f);d.push(_)}catch(_){o&&Zo(`Failed to load ${f} ${_.message}`),a=_}Ug(`injecting env (${l}) from ${d.join(",")}`)}return a?{parsed:s,error:a}:{parsed:s}}function KS(e){if(Zg(e).length===0)return Oe.configDotenv(e);let t=Mg(e);return t?Oe._configVault(e):(qS(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),Oe.configDotenv(e))}function HS(e,t){let n=Buffer.from(t.slice(-64),"hex"),o=Buffer.from(e,"base64"),r=o.subarray(0,12),i=o.subarray(-16);o=o.subarray(12,-16);try{let a=CS.createDecipheriv("aes-256-gcm",n,r);return a.setAuthTag(i),`${a.update(o)}${a.final()}`}catch(a){let s=a instanceof RangeError,c=a.message==="Invalid key length",l=a.message==="Unsupported state or unable to authenticate data";if(s||c){let d=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw d.code="INVALID_DOTENV_KEY",d}else if(l){let d=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw d.code="DECRYPTION_FAILED",d}else throw a}}function JS(e,t,n={}){let o=!!(n&&n.debug),r=!!(n&&n.override);if(typeof t!="object"){let i=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw i.code="OBJECT_REQUIRED",i}for(let i of Object.keys(t))Object.prototype.hasOwnProperty.call(e,i)?(r===!0&&(e[i]=t[i]),o&&Zo(r===!0?`"${i}" is already defined and WAS overwritten`:`"${i}" is already defined and was NOT overwritten`)):e[i]=t[i]}var Oe={configDotenv:BS,_configVault:FS,_parseVault:LS,config:KS,decrypt:HS,parse:MS,populate:JS};Wt.exports.configDotenv=Oe.configDotenv;Wt.exports._configVault=Oe._configVault;Wt.exports._parseVault=Oe._parseVault;Wt.exports.config=Oe.config;Wt.exports.decrypt=Oe.decrypt;Wt.exports.parse=Oe.parse;Wt.exports.populate=Oe.populate;Wt.exports=Oe});var aa=A(me=>{"use strict";Object.defineProperty(me,"__esModule",{value:!0});me.regexpCode=me.getEsmExportName=me.getProperty=me.safeStringify=me.stringify=me.strConcat=me.addCodeArg=me.str=me._=me.nil=me._Code=me.Name=me.IDENTIFIER=me._CodeOrName=void 0;var oa=class{};me._CodeOrName=oa;me.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var rn=class extends oa{constructor(t){if(super(),!me.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};me.Name=rn;var bt=class extends oa{constructor(t){super(),this._items=typeof t=="string"?[t]:t}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let t=this._items[0];return t===""||t==='""'}get str(){var t;return(t=this._str)!==null&&t!==void 0?t:this._str=this._items.reduce((n,o)=>`${n}${o}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((n,o)=>(o instanceof rn&&(n[o.str]=(n[o.str]||0)+1),n),{})}};me._Code=bt;me.nil=new bt("");function cb(e,...t){let n=[e[0]],o=0;for(;o<t.length;)rm(n,t[o]),n.push(e[++o]);return new bt(n)}me._=cb;var tm=new bt("+");function ub(e,...t){let n=[ia(e[0])],o=0;for(;o<t.length;)n.push(tm),rm(n,t[o]),n.push(tm,ia(e[++o]));return LP(n),new bt(n)}me.str=ub;function rm(e,t){t instanceof bt?e.push(...t._items):t instanceof rn?e.push(t):e.push(FP(t))}me.addCodeArg=rm;function LP(e){let t=1;for(;t<e.length-1;){if(e[t]===tm){let n=qP(e[t-1],e[t+1]);if(n!==void 0){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}function qP(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof rn||e[e.length-1]!=='"'?void 0:typeof t!="string"?`${e.slice(0,-1)}${t}"`:t[0]==='"'?e.slice(0,-1)+t.slice(1):void 0;if(typeof t=="string"&&t[0]==='"'&&!(e instanceof rn))return`"${e}${t.slice(1)}`}function VP(e,t){return t.emptyStr()?e:e.emptyStr()?t:ub`${e}${t}`}me.strConcat=VP;function FP(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:ia(Array.isArray(e)?e.join(","):e)}function BP(e){return new bt(ia(e))}me.stringify=BP;function ia(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}me.safeStringify=ia;function KP(e){return typeof e=="string"&&me.IDENTIFIER.test(e)?new bt(`.${e}`):cb`[${e}]`}me.getProperty=KP;function HP(e){if(typeof e=="string"&&me.IDENTIFIER.test(e))return new bt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}me.getEsmExportName=HP;function JP(e){return new bt(e.toString())}me.regexpCode=JP});var im=A(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.ValueScope=it.ValueScopeName=it.Scope=it.varKinds=it.UsedValueState=void 0;var ot=aa(),nm=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},il;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(il||(it.UsedValueState=il={}));it.varKinds={const:new ot.Name("const"),let:new ot.Name("let"),var:new ot.Name("var")};var al=class{constructor({prefixes:t,parent:n}={}){this._names={},this._prefixes=t,this._parent=n}toName(t){return t instanceof ot.Name?t:this.name(t)}name(t){return new ot.Name(this._newName(t))}_newName(t){let n=this._names[t]||this._nameGroup(t);return`${t}${n.index++}`}_nameGroup(t){var n,o;if(!((o=(n=this._parent)===null||n===void 0?void 0:n._prefixes)===null||o===void 0)&&o.has(t)||this._prefixes&&!this._prefixes.has(t))throw new Error(`CodeGen: prefix "${t}" is not allowed in this scope`);return this._names[t]={prefix:t,index:0}}};it.Scope=al;var sl=class extends ot.Name{constructor(t,n){super(n),this.prefix=t}setValue(t,{property:n,itemIndex:o}){this.value=t,this.scopePath=(0,ot._)`.${new ot.Name(n)}[${o}]`}};it.ValueScopeName=sl;var GP=(0,ot._)`\n`,om=class extends al{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?GP:ot.nil}}get(){return this._scope}name(t){return new sl(t,this._newName(t))}value(t,n){var o;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(t),{prefix:i}=r,a=(o=n.key)!==null&&o!==void 0?o:n.ref,s=this._values[i];if(s){let d=s.get(a);if(d)return d}else s=this._values[i]=new Map;s.set(a,r);let c=this._scope[i]||(this._scope[i]=[]),l=c.length;return c[l]=n.ref,r.setValue(n,{property:i,itemIndex:l}),r}getValue(t,n){let o=this._values[t];if(o)return o.get(n)}scopeRefs(t,n=this._values){return this._reduceValues(n,o=>{if(o.scopePath===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return(0,ot._)`${t}${o.scopePath}`})}scopeCode(t=this._values,n,o){return this._reduceValues(t,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},n,o)}_reduceValues(t,n,o={},r){let i=ot.nil;for(let a in t){let s=t[a];if(!s)continue;let c=o[a]=o[a]||new Map;s.forEach(l=>{if(c.has(l))return;c.set(l,il.Started);let d=n(l);if(d){let f=this.opts.es5?it.varKinds.var:it.varKinds.const;i=(0,ot._)`${i}${f} ${l} = ${d};${this.opts._n}`}else if(d=r?.(l))i=(0,ot._)`${i}${d}${this.opts._n}`;else throw new nm(l);c.set(l,il.Completed)})}return i}};it.ValueScope=om});var re=A(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.or=oe.and=oe.not=oe.CodeGen=oe.operators=oe.varKinds=oe.ValueScopeName=oe.ValueScope=oe.Scope=oe.Name=oe.regexpCode=oe.stringify=oe.getProperty=oe.nil=oe.strConcat=oe.str=oe._=void 0;var le=aa(),jt=im(),Or=aa();Object.defineProperty(oe,"_",{enumerable:!0,get:function(){return Or._}});Object.defineProperty(oe,"str",{enumerable:!0,get:function(){return Or.str}});Object.defineProperty(oe,"strConcat",{enumerable:!0,get:function(){return Or.strConcat}});Object.defineProperty(oe,"nil",{enumerable:!0,get:function(){return Or.nil}});Object.defineProperty(oe,"getProperty",{enumerable:!0,get:function(){return Or.getProperty}});Object.defineProperty(oe,"stringify",{enumerable:!0,get:function(){return Or.stringify}});Object.defineProperty(oe,"regexpCode",{enumerable:!0,get:function(){return Or.regexpCode}});Object.defineProperty(oe,"Name",{enumerable:!0,get:function(){return Or.Name}});var dl=im();Object.defineProperty(oe,"Scope",{enumerable:!0,get:function(){return dl.Scope}});Object.defineProperty(oe,"ValueScope",{enumerable:!0,get:function(){return dl.ValueScope}});Object.defineProperty(oe,"ValueScopeName",{enumerable:!0,get:function(){return dl.ValueScopeName}});Object.defineProperty(oe,"varKinds",{enumerable:!0,get:function(){return dl.varKinds}});oe.operators={GT:new le._Code(">"),GTE:new le._Code(">="),LT:new le._Code("<"),LTE:new le._Code("<="),EQ:new le._Code("==="),NEQ:new le._Code("!=="),NOT:new le._Code("!"),OR:new le._Code("||"),AND:new le._Code("&&"),ADD:new le._Code("+")};var nr=class{optimizeNodes(){return this}optimizeNames(t,n){return this}},am=class extends nr{constructor(t,n,o){super(),this.varKind=t,this.name=n,this.rhs=o}render({es5:t,_n:n}){let o=t?jt.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${o} ${this.name}${r};`+n}optimizeNames(t,n){if(t[this.name.str])return this.rhs&&(this.rhs=_o(this.rhs,t,n)),this}get names(){return this.rhs instanceof le._CodeOrName?this.rhs.names:{}}},cl=class extends nr{constructor(t,n,o){super(),this.lhs=t,this.rhs=n,this.sideEffects=o}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,n){if(!(this.lhs instanceof le.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=_o(this.rhs,t,n),this}get names(){let t=this.lhs instanceof le.Name?{}:{...this.lhs.names};return ll(t,this.rhs)}},sm=class extends cl{constructor(t,n,o,r){super(t,o,r),this.op=n}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},cm=class extends nr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},um=class extends nr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},lm=class extends nr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},dm=class extends nr{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,n){return this.code=_o(this.code,t,n),this}get names(){return this.code instanceof le._CodeOrName?this.code.names:{}}},sa=class extends nr{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((n,o)=>n+o.render(t),"")}optimizeNodes(){let{nodes:t}=this,n=t.length;for(;n--;){let o=t[n].optimizeNodes();Array.isArray(o)?t.splice(n,1,...o):o?t[n]=o:t.splice(n,1)}return t.length>0?this:void 0}optimizeNames(t,n){let{nodes:o}=this,r=o.length;for(;r--;){let i=o[r];i.optimizeNames(t,n)||(WP(t,i.names),o.splice(r,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((t,n)=>an(t,n.names),{})}},or=class extends sa{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},fm=class extends sa{},vo=class extends or{};vo.kind="else";var nn=class e extends or{constructor(t,n){super(n),this.condition=t}render(t){let n=`if(${this.condition})`+super.render(t);return this.else&&(n+="else "+this.else.render(t)),n}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let n=this.else;if(n){let o=n.optimizeNodes();n=this.else=Array.isArray(o)?new vo(o):o}if(n)return t===!1?n instanceof e?n:n.nodes:this.nodes.length?this:new e(lb(t),n instanceof e?[n]:n.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,n){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,n),!!(super.optimizeNames(t,n)||this.else))return this.condition=_o(this.condition,t,n),this}get names(){let t=super.names;return ll(t,this.condition),this.else&&an(t,this.else.names),t}};nn.kind="if";var on=class extends or{};on.kind="for";var pm=class extends on{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,n){if(super.optimizeNames(t,n))return this.iteration=_o(this.iteration,t,n),this}get names(){return an(super.names,this.iteration.names)}},mm=class extends on{constructor(t,n,o,r){super(),this.varKind=t,this.name=n,this.from=o,this.to=r}render(t){let n=t.es5?jt.varKinds.var:this.varKind,{name:o,from:r,to:i}=this;return`for(${n} ${o}=${r}; ${o}<${i}; ${o}++)`+super.render(t)}get names(){let t=ll(super.names,this.from);return ll(t,this.to)}},ul=class extends on{constructor(t,n,o,r){super(),this.loop=t,this.varKind=n,this.name=o,this.iterable=r}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,n){if(super.optimizeNames(t,n))return this.iterable=_o(this.iterable,t,n),this}get names(){return an(super.names,this.iterable.names)}},ca=class extends or{constructor(t,n,o){super(),this.name=t,this.args=n,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};ca.kind="func";var ua=class extends sa{render(t){return"return "+super.render(t)}};ua.kind="return";var hm=class extends or{render(t){let n="try"+super.render(t);return this.catch&&(n+=this.catch.render(t)),this.finally&&(n+=this.finally.render(t)),n}optimizeNodes(){var t,n;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(t,n){var o,r;return super.optimizeNames(t,n),(o=this.catch)===null||o===void 0||o.optimizeNames(t,n),(r=this.finally)===null||r===void 0||r.optimizeNames(t,n),this}get names(){let t=super.names;return this.catch&&an(t,this.catch.names),this.finally&&an(t,this.finally.names),t}},la=class extends or{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};la.kind="catch";var da=class extends or{render(t){return"finally"+super.render(t)}};da.kind="finally";var gm=class{constructor(t,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
|
|
5
|
+
`:""},this._extScope=t,this._scope=new jt.Scope({parent:t}),this._nodes=[new fm]}toString(){return this._root.render(this.opts)}name(t){return this._scope.name(t)}scopeName(t){return this._extScope.name(t)}scopeValue(t,n){let o=this._extScope.value(t,n);return(this._values[o.prefix]||(this._values[o.prefix]=new Set)).add(o),o}getScopeValue(t,n){return this._extScope.getValue(t,n)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,n,o,r){let i=this._scope.toName(n);return o!==void 0&&r&&(this._constants[i.str]=o),this._leafNode(new am(t,i,o)),i}const(t,n,o){return this._def(jt.varKinds.const,t,n,o)}let(t,n,o){return this._def(jt.varKinds.let,t,n,o)}var(t,n,o){return this._def(jt.varKinds.var,t,n,o)}assign(t,n,o){return this._leafNode(new cl(t,n,o))}add(t,n){return this._leafNode(new sm(t,oe.operators.ADD,n))}code(t){return typeof t=="function"?t():t!==le.nil&&this._leafNode(new dm(t)),this}object(...t){let n=["{"];for(let[o,r]of t)n.length>1&&n.push(","),n.push(o),(o!==r||this.opts.es5)&&(n.push(":"),(0,le.addCodeArg)(n,r));return n.push("}"),new le._Code(n)}if(t,n,o){if(this._blockNode(new nn(t)),n&&o)this.code(n).else().code(o).endIf();else if(n)this.code(n).endIf();else if(o)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new nn(t))}else(){return this._elseNode(new vo)}endIf(){return this._endBlockNode(nn,vo)}_for(t,n){return this._blockNode(t),n&&this.code(n).endFor(),this}for(t,n){return this._for(new pm(t),n)}forRange(t,n,o,r,i=this.opts.es5?jt.varKinds.var:jt.varKinds.let){let a=this._scope.toName(t);return this._for(new mm(i,a,n,o),()=>r(a))}forOf(t,n,o,r=jt.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let a=n instanceof le.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,le._)`${a}.length`,s=>{this.var(i,(0,le._)`${a}[${s}]`),o(i)})}return this._for(new ul("of",r,i,n),()=>o(i))}forIn(t,n,o,r=this.opts.es5?jt.varKinds.var:jt.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,le._)`Object.keys(${n})`,o);let i=this._scope.toName(t);return this._for(new ul("in",r,i,n),()=>o(i))}endFor(){return this._endBlockNode(on)}label(t){return this._leafNode(new cm(t))}break(t){return this._leafNode(new um(t))}return(t){let n=new ua;if(this._blockNode(n),this.code(t),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ua)}try(t,n,o){if(!n&&!o)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new hm;if(this._blockNode(r),this.code(t),n){let i=this.name("e");this._currNode=r.catch=new la(i),n(i)}return o&&(this._currNode=r.finally=new da,this.code(o)),this._endBlockNode(la,da)}throw(t){return this._leafNode(new lm(t))}block(t,n){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(n),this}endBlock(t){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let o=this._nodes.length-n;if(o<0||t!==void 0&&o!==t)throw new Error(`CodeGen: wrong number of nodes: ${o} vs ${t} expected`);return this._nodes.length=n,this}func(t,n=le.nil,o,r){return this._blockNode(new ca(t,n,o)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(ca)}optimize(t=1){for(;t-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(t){return this._currNode.nodes.push(t),this}_blockNode(t){this._currNode.nodes.push(t),this._nodes.push(t)}_endBlockNode(t,n){let o=this._currNode;if(o instanceof t||n&&o instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${t.kind}/${n.kind}`:t.kind}"`)}_elseNode(t){let n=this._currNode;if(!(n instanceof nn))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let n=this._nodes;n[n.length-1]=t}};oe.CodeGen=gm;function an(e,t){for(let n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function ll(e,t){return t instanceof le._CodeOrName?an(e,t.names):e}function _o(e,t,n){if(e instanceof le.Name)return o(e);if(!r(e))return e;return new le._Code(e._items.reduce((i,a)=>(a instanceof le.Name&&(a=o(a)),a instanceof le._Code?i.push(...a._items):i.push(a),i),[]));function o(i){let a=n[i.str];return a===void 0||t[i.str]!==1?i:(delete t[i.str],a)}function r(i){return i instanceof le._Code&&i._items.some(a=>a instanceof le.Name&&t[a.str]===1&&n[a.str]!==void 0)}}function WP(e,t){for(let n in t)e[n]=(e[n]||0)-(t[n]||0)}function lb(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,le._)`!${vm(e)}`}oe.not=lb;var XP=db(oe.operators.AND);function YP(...e){return e.reduce(XP)}oe.and=YP;var QP=db(oe.operators.OR);function eO(...e){return e.reduce(QP)}oe.or=eO;function db(e){return(t,n)=>t===le.nil?n:n===le.nil?t:(0,le._)`${vm(t)} ${e} ${vm(n)}`}function vm(e){return e instanceof le.Name?e:(0,le._)`(${e})`}});var fe=A(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.checkStrictMode=ae.getErrorPath=ae.Type=ae.useFunc=ae.setEvaluated=ae.evaluatedPropsToName=ae.mergeEvaluated=ae.eachItem=ae.unescapeJsonPointer=ae.escapeJsonPointer=ae.escapeFragment=ae.unescapeFragment=ae.schemaRefOrVal=ae.schemaHasRulesButRef=ae.schemaHasRules=ae.checkUnknownRules=ae.alwaysValidSchema=ae.toHash=void 0;var be=re(),tO=aa();function rO(e){let t={};for(let n of e)t[n]=!0;return t}ae.toHash=rO;function nO(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(mb(e,t),!hb(t,e.self.RULES.all))}ae.alwaysValidSchema=nO;function mb(e,t=e.schema){let{opts:n,self:o}=e;if(!n.strictSchema||typeof t=="boolean")return;let r=o.RULES.keywords;for(let i in t)r[i]||_b(e,`unknown keyword: "${i}"`)}ae.checkUnknownRules=mb;function hb(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(t[n])return!0;return!1}ae.schemaHasRules=hb;function oO(e,t){if(typeof e=="boolean")return!e;for(let n in e)if(n!=="$ref"&&t.all[n])return!0;return!1}ae.schemaHasRulesButRef=oO;function iO({topSchemaRef:e,schemaPath:t},n,o,r){if(!r){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,be._)`${n}`}return(0,be._)`${e}${t}${(0,be.getProperty)(o)}`}ae.schemaRefOrVal=iO;function aO(e){return gb(decodeURIComponent(e))}ae.unescapeFragment=aO;function sO(e){return encodeURIComponent(ym(e))}ae.escapeFragment=sO;function ym(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ae.escapeJsonPointer=ym;function gb(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ae.unescapeJsonPointer=gb;function cO(e,t){if(Array.isArray(e))for(let n of e)t(n);else t(e)}ae.eachItem=cO;function fb({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:o}){return(r,i,a,s)=>{let c=a===void 0?i:a instanceof be.Name?(i instanceof be.Name?e(r,i,a):t(r,i,a),a):i instanceof be.Name?(t(r,a,i),i):n(i,a);return s===be.Name&&!(c instanceof be.Name)?o(r,c):c}}ae.mergeEvaluated={props:fb({mergeNames:(e,t,n)=>e.if((0,be._)`${n} !== true && ${t} !== undefined`,()=>{e.if((0,be._)`${t} === true`,()=>e.assign(n,!0),()=>e.assign(n,(0,be._)`${n} || {}`).code((0,be._)`Object.assign(${n}, ${t})`))}),mergeToName:(e,t,n)=>e.if((0,be._)`${n} !== true`,()=>{t===!0?e.assign(n,!0):(e.assign(n,(0,be._)`${n} || {}`),bm(e,n,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:vb}),items:fb({mergeNames:(e,t,n)=>e.if((0,be._)`${n} !== true && ${t} !== undefined`,()=>e.assign(n,(0,be._)`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`)),mergeToName:(e,t,n)=>e.if((0,be._)`${n} !== true`,()=>e.assign(n,t===!0?!0:(0,be._)`${n} > ${t} ? ${n} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function vb(e,t){if(t===!0)return e.var("props",!0);let n=e.var("props",(0,be._)`{}`);return t!==void 0&&bm(e,n,t),n}ae.evaluatedPropsToName=vb;function bm(e,t,n){Object.keys(n).forEach(o=>e.assign((0,be._)`${t}${(0,be.getProperty)(o)}`,!0))}ae.setEvaluated=bm;var pb={};function uO(e,t){return e.scopeValue("func",{ref:t,code:pb[t.code]||(pb[t.code]=new tO._Code(t.code))})}ae.useFunc=uO;var _m;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(_m||(ae.Type=_m={}));function lO(e,t,n){if(e instanceof be.Name){let o=t===_m.Num;return n?o?(0,be._)`"[" + ${e} + "]"`:(0,be._)`"['" + ${e} + "']"`:o?(0,be._)`"/" + ${e}`:(0,be._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,be.getProperty)(e).toString():"/"+ym(e)}ae.getErrorPath=lO;function _b(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,n===!0)throw new Error(t);e.self.logger.warn(t)}}ae.checkStrictMode=_b});var ir=A($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});var Ke=re(),dO={data:new Ke.Name("data"),valCxt:new Ke.Name("valCxt"),instancePath:new Ke.Name("instancePath"),parentData:new Ke.Name("parentData"),parentDataProperty:new Ke.Name("parentDataProperty"),rootData:new Ke.Name("rootData"),dynamicAnchors:new Ke.Name("dynamicAnchors"),vErrors:new Ke.Name("vErrors"),errors:new Ke.Name("errors"),this:new Ke.Name("this"),self:new Ke.Name("self"),scope:new Ke.Name("scope"),json:new Ke.Name("json"),jsonPos:new Ke.Name("jsonPos"),jsonLen:new Ke.Name("jsonLen"),jsonPart:new Ke.Name("jsonPart")};$m.default=dO});var fa=A(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.extendErrors=He.resetErrorsCount=He.reportExtraError=He.reportError=He.keyword$DataError=He.keywordError=void 0;var pe=re(),fl=fe(),Xe=ir();He.keywordError={message:({keyword:e})=>(0,pe.str)`must pass "${e}" keyword validation`};He.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,pe.str)`"${e}" keyword must be ${t} ($data)`:(0,pe.str)`"${e}" keyword is invalid ($data)`};function fO(e,t=He.keywordError,n,o){let{it:r}=e,{gen:i,compositeRule:a,allErrors:s}=r,c=$b(e,t,n);o??(a||s)?yb(i,c):bb(r,(0,pe._)`[${c}]`)}He.reportError=fO;function pO(e,t=He.keywordError,n){let{it:o}=e,{gen:r,compositeRule:i,allErrors:a}=o,s=$b(e,t,n);yb(r,s),i||a||bb(o,Xe.default.vErrors)}He.reportExtraError=pO;function mO(e,t){e.assign(Xe.default.errors,t),e.if((0,pe._)`${Xe.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,pe._)`${Xe.default.vErrors}.length`,t),()=>e.assign(Xe.default.vErrors,null)))}He.resetErrorsCount=mO;function hO({gen:e,keyword:t,schemaValue:n,data:o,errsCount:r,it:i}){if(r===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",r,Xe.default.errors,s=>{e.const(a,(0,pe._)`${Xe.default.vErrors}[${s}]`),e.if((0,pe._)`${a}.instancePath === undefined`,()=>e.assign((0,pe._)`${a}.instancePath`,(0,pe.strConcat)(Xe.default.instancePath,i.errorPath))),e.assign((0,pe._)`${a}.schemaPath`,(0,pe.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,pe._)`${a}.schema`,n),e.assign((0,pe._)`${a}.data`,o))})}He.extendErrors=hO;function yb(e,t){let n=e.const("err",t);e.if((0,pe._)`${Xe.default.vErrors} === null`,()=>e.assign(Xe.default.vErrors,(0,pe._)`[${n}]`),(0,pe._)`${Xe.default.vErrors}.push(${n})`),e.code((0,pe._)`${Xe.default.errors}++`)}function bb(e,t){let{gen:n,validateName:o,schemaEnv:r}=e;r.$async?n.throw((0,pe._)`new ${e.ValidationError}(${t})`):(n.assign((0,pe._)`${o}.errors`,t),n.return(!1))}var sn={keyword:new pe.Name("keyword"),schemaPath:new pe.Name("schemaPath"),params:new pe.Name("params"),propertyName:new pe.Name("propertyName"),message:new pe.Name("message"),schema:new pe.Name("schema"),parentSchema:new pe.Name("parentSchema")};function $b(e,t,n){let{createErrors:o}=e.it;return o===!1?(0,pe._)`{}`:gO(e,t,n)}function gO(e,t,n={}){let{gen:o,it:r}=e,i=[vO(r,n),_O(e,n)];return yO(e,t,i),o.object(...i)}function vO({errorPath:e},{instancePath:t}){let n=t?(0,pe.str)`${e}${(0,fl.getErrorPath)(t,fl.Type.Str)}`:e;return[Xe.default.instancePath,(0,pe.strConcat)(Xe.default.instancePath,n)]}function _O({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:o}){let r=o?t:(0,pe.str)`${t}/${e}`;return n&&(r=(0,pe.str)`${r}${(0,fl.getErrorPath)(n,fl.Type.Str)}`),[sn.schemaPath,r]}function yO(e,{params:t,message:n},o){let{keyword:r,data:i,schemaValue:a,it:s}=e,{opts:c,propertyName:l,topSchemaRef:d,schemaPath:f}=s;o.push([sn.keyword,r],[sn.params,typeof t=="function"?t(e):t||(0,pe._)`{}`]),c.messages&&o.push([sn.message,typeof n=="function"?n(e):n]),c.verbose&&o.push([sn.schema,a],[sn.parentSchema,(0,pe._)`${d}${f}`],[Xe.default.data,i]),l&&o.push([sn.propertyName,l])}});var wb=A(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.boolOrEmptySchema=yo.topBoolOrEmptySchema=void 0;var bO=fa(),$O=re(),xO=ir(),wO={message:"boolean schema is false"};function kO(e){let{gen:t,schema:n,validateName:o}=e;n===!1?xb(e,!1):typeof n=="object"&&n.$async===!0?t.return(xO.default.data):(t.assign((0,$O._)`${o}.errors`,null),t.return(!0))}yo.topBoolOrEmptySchema=kO;function SO(e,t){let{gen:n,schema:o}=e;o===!1?(n.var(t,!1),xb(e)):n.var(t,!0)}yo.boolOrEmptySchema=SO;function xb(e,t){let{gen:n,data:o}=e,r={gen:n,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,bO.reportError)(r,wO,void 0,t)}});var xm=A(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.getRules=bo.isJSONType=void 0;var zO=["string","number","integer","boolean","null","object","array"],IO=new Set(zO);function EO(e){return typeof e=="string"&&IO.has(e)}bo.isJSONType=EO;function TO(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}bo.getRules=TO});var wm=A(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.shouldUseRule=jr.shouldUseGroup=jr.schemaHasRulesForType=void 0;function PO({schema:e,self:t},n){let o=t.RULES.types[n];return o&&o!==!0&&kb(e,o)}jr.schemaHasRulesForType=PO;function kb(e,t){return t.rules.some(n=>Sb(e,n))}jr.shouldUseGroup=kb;function Sb(e,t){var n;return e[t.keyword]!==void 0||((n=t.definition.implements)===null||n===void 0?void 0:n.some(o=>e[o]!==void 0))}jr.shouldUseRule=Sb});var pa=A(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.reportTypeError=Je.checkDataTypes=Je.checkDataType=Je.coerceAndCheckDataType=Je.getJSONTypes=Je.getSchemaTypes=Je.DataType=void 0;var OO=xm(),jO=wm(),NO=fa(),ee=re(),zb=fe(),$o;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})($o||(Je.DataType=$o={}));function RO(e){let t=Ib(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}Je.getSchemaTypes=RO;function Ib(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(OO.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Je.getJSONTypes=Ib;function AO(e,t){let{gen:n,data:o,opts:r}=e,i=DO(t,r.coerceTypes),a=t.length>0&&!(i.length===0&&t.length===1&&(0,jO.schemaHasRulesForType)(e,t[0]));if(a){let s=Sm(t,o,r.strictNumbers,$o.Wrong);n.if(s,()=>{i.length?CO(e,t,i):zm(e)})}return a}Je.coerceAndCheckDataType=AO;var Eb=new Set(["string","number","integer","boolean","null"]);function DO(e,t){return t?e.filter(n=>Eb.has(n)||t==="array"&&n==="array"):[]}function CO(e,t,n){let{gen:o,data:r,opts:i}=e,a=o.let("dataType",(0,ee._)`typeof ${r}`),s=o.let("coerced",(0,ee._)`undefined`);i.coerceTypes==="array"&&o.if((0,ee._)`${a} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>o.assign(r,(0,ee._)`${r}[0]`).assign(a,(0,ee._)`typeof ${r}`).if(Sm(t,r,i.strictNumbers),()=>o.assign(s,r))),o.if((0,ee._)`${s} !== undefined`);for(let l of n)(Eb.has(l)||l==="array"&&i.coerceTypes==="array")&&c(l);o.else(),zm(e),o.endIf(),o.if((0,ee._)`${s} !== undefined`,()=>{o.assign(r,s),UO(e,s)});function c(l){switch(l){case"string":o.elseIf((0,ee._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,ee._)`"" + ${r}`).elseIf((0,ee._)`${r} === null`).assign(s,(0,ee._)`""`);return;case"number":o.elseIf((0,ee._)`${a} == "boolean" || ${r} === null
|
|
6
6
|
|| (${a} == "string" && ${r} && ${r} == +${r})`).assign(s,(0,ee._)`+${r}`);return;case"integer":o.elseIf((0,ee._)`${a} === "boolean" || ${r} === null
|
|
7
7
|
|| (${a} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(s,(0,ee._)`+${r}`);return;case"boolean":o.elseIf((0,ee._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(s,!1).elseIf((0,ee._)`${r} === "true" || ${r} === 1`).assign(s,!0);return;case"null":o.elseIf((0,ee._)`${r} === "" || ${r} === 0 || ${r} === false`),o.assign(s,null);return;case"array":o.elseIf((0,ee._)`${a} === "string" || ${a} === "number"
|
|
8
|
-
|| ${a} === "boolean" || ${r} === null`).assign(s,(0,ee._)`[${r}]`)}}}function Ij({gen:e,parentData:t,parentDataProperty:n},o){e.if((0,ee._)`${t} !== undefined`,()=>e.assign((0,ee._)`${t}[${n}]`,o))}function ym(e,t,n,o=yo.Correct){let r=o===yo.Correct?ee.operators.EQ:ee.operators.NEQ,i;switch(e){case"null":return(0,ee._)`${t} ${r} null`;case"array":i=(0,ee._)`Array.isArray(${t})`;break;case"object":i=(0,ee._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a((0,ee._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return(0,ee._)`typeof ${t} ${r} ${e}`}return o===yo.Correct?i:(0,ee.not)(i);function a(s=ee.nil){return(0,ee.and)((0,ee._)`typeof ${t} == "number"`,s,n?(0,ee._)`isFinite(${t})`:ee.nil)}}Je.checkDataType=ym;function bm(e,t,n,o){if(e.length===1)return ym(e[0],t,n,o);let r,i=(0,bb.toHash)(e);if(i.array&&i.object){let a=(0,ee._)`typeof ${t} != "object"`;r=i.null?a:(0,ee._)`!${t} || ${a}`,delete i.null,delete i.array,delete i.object}else r=ee.nil;i.number&&delete i.integer;for(let a in i)r=(0,ee.and)(r,ym(a,t,n,o));return r}Je.checkDataTypes=bm;var Ej={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,ee._)`{type: ${e}}`:(0,ee._)`{type: ${t}}`};function $m(e){let t=Tj(e);(0,xj.reportError)(t,Ej)}Je.reportTypeError=$m;function Tj(e){let{gen:t,data:n,schema:o}=e,r=(0,bb.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:n,schema:o.type,schemaCode:r,schemaValue:r,parentSchema:o,params:{},it:e}}});var kb=A(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.assignDefaults=void 0;var bo=re(),Pj=fe();function jj(e,t){let{properties:n,items:o}=e.schema;if(t==="object"&&n)for(let r in n)wb(e,r,n[r].default);else t==="array"&&Array.isArray(o)&&o.forEach((r,i)=>wb(e,i,r.default))}dl.assignDefaults=jj;function wb(e,t,n){let{gen:o,compositeRule:r,data:i,opts:a}=e;if(n===void 0)return;let s=(0,bo._)`${i}${(0,bo.getProperty)(t)}`;if(r){(0,Pj.checkStrictMode)(e,`default is ignored for: ${s}`);return}let c=(0,bo._)`${s} === undefined`;a.useDefaults==="empty"&&(c=(0,bo._)`${c} || ${s} === null || ${s} === ""`),o.if(c,(0,bo._)`${s} = ${(0,bo.stringify)(n)}`)}});var bt=A(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.validateUnion=_e.validateArray=_e.usePattern=_e.callValidateCode=_e.schemaProperties=_e.allSchemaProperties=_e.noPropertyInData=_e.propertyInData=_e.isOwnProperty=_e.hasPropFunc=_e.reportMissingProp=_e.checkMissingProp=_e.checkReportMissingProp=void 0;var Se=re(),xm=fe(),jr=or(),Oj=fe();function Nj(e,t){let{gen:n,data:o,it:r}=e;n.if(km(n,o,t,r.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Se._)`${t}`},!0),e.error()})}_e.checkReportMissingProp=Nj;function Rj({gen:e,data:t,it:{opts:n}},o,r){return(0,Se.or)(...o.map(i=>(0,Se.and)(km(e,t,i,n.ownProperties),(0,Se._)`${r} = ${i}`)))}_e.checkMissingProp=Rj;function Aj(e,t){e.setParams({missingProperty:t},!0),e.error()}_e.reportMissingProp=Aj;function Sb(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Se._)`Object.prototype.hasOwnProperty`})}_e.hasPropFunc=Sb;function wm(e,t,n){return(0,Se._)`${Sb(e)}.call(${t}, ${n})`}_e.isOwnProperty=wm;function Dj(e,t,n,o){let r=(0,Se._)`${t}${(0,Se.getProperty)(n)} !== undefined`;return o?(0,Se._)`${r} && ${wm(e,t,n)}`:r}_e.propertyInData=Dj;function km(e,t,n,o){let r=(0,Se._)`${t}${(0,Se.getProperty)(n)} === undefined`;return o?(0,Se.or)(r,(0,Se.not)(wm(e,t,n))):r}_e.noPropertyInData=km;function zb(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}_e.allSchemaProperties=zb;function Cj(e,t){return zb(t).filter(n=>!(0,xm.alwaysValidSchema)(e,t[n]))}_e.schemaProperties=Cj;function Zj({schemaCode:e,data:t,it:{gen:n,topSchemaRef:o,schemaPath:r,errorPath:i},it:a},s,c,l){let d=l?(0,Se._)`${e}, ${t}, ${o}${r}`:t,f=[[jr.default.instancePath,(0,Se.strConcat)(jr.default.instancePath,i)],[jr.default.parentData,a.parentData],[jr.default.parentDataProperty,a.parentDataProperty],[jr.default.rootData,jr.default.rootData]];a.opts.dynamicRef&&f.push([jr.default.dynamicAnchors,jr.default.dynamicAnchors]);let y=(0,Se._)`${d}, ${n.object(...f)}`;return c!==Se.nil?(0,Se._)`${s}.call(${c}, ${y})`:(0,Se._)`${s}(${y})`}_e.callValidateCode=Zj;var Uj=(0,Se._)`new RegExp`;function Mj({gen:e,it:{opts:t}},n){let o=t.unicodeRegExp?"u":"",{regExp:r}=t.code,i=r(n,o);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Se._)`${r.code==="new RegExp"?Uj:(0,Oj.useFunc)(e,r)}(${n}, ${o})`})}_e.usePattern=Mj;function Lj(e){let{gen:t,data:n,keyword:o,it:r}=e,i=t.name("valid");if(r.allErrors){let s=t.let("valid",!0);return a(()=>t.assign(s,!1)),s}return t.var(i,!0),a(()=>t.break()),i;function a(s){let c=t.const("len",(0,Se._)`${n}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:o,dataProp:l,dataPropType:xm.Type.Num},i),t.if((0,Se.not)(i),s)})}}_e.validateArray=Lj;function qj(e){let{gen:t,schema:n,keyword:o,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(c=>(0,xm.alwaysValidSchema)(r,c))&&!r.opts.unevaluated)return;let a=t.let("valid",!1),s=t.name("_valid");t.block(()=>n.forEach((c,l)=>{let d=e.subschema({keyword:o,schemaProp:l,compositeRule:!0},s);t.assign(a,(0,Se._)`${a} || ${s}`),e.mergeValidEvaluated(d,s)||t.if((0,Se.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}_e.validateUnion=qj});var Tb=A(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.validateKeywordUsage=Lt.validSchemaType=Lt.funcKeywordCode=Lt.macroKeywordCode=void 0;var Ye=re(),an=or(),Vj=bt(),Fj=la();function Bj(e,t){let{gen:n,keyword:o,schema:r,parentSchema:i,it:a}=e,s=t.macro.call(a.self,r,i,a),c=Eb(n,o,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let l=n.name("valid");e.subschema({schema:s,schemaPath:Ye.nil,errSchemaPath:`${a.errSchemaPath}/${o}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}Lt.macroKeywordCode=Bj;function Kj(e,t){var n;let{gen:o,keyword:r,schema:i,parentSchema:a,$data:s,it:c}=e;Jj(c,t);let l=!s&&t.compile?t.compile.call(c.self,i,a,c):t.validate,d=Eb(o,r,l),f=o.let("valid");e.block$data(f,y),e.ok((n=t.valid)!==null&&n!==void 0?n:f);function y(){if(t.errors===!1)b(),t.modifying&&Ib(e),x(()=>e.error());else{let I=t.async?v():g();t.modifying&&Ib(e),x(()=>Hj(e,I))}}function v(){let I=o.let("ruleErrs",null);return o.try(()=>b((0,Ye._)`await `),R=>o.assign(f,!1).if((0,Ye._)`${R} instanceof ${c.ValidationError}`,()=>o.assign(I,(0,Ye._)`${R}.errors`),()=>o.throw(R))),I}function g(){let I=(0,Ye._)`${d}.errors`;return o.assign(I,null),b(Ye.nil),I}function b(I=t.async?(0,Ye._)`await `:Ye.nil){let R=c.opts.passContext?an.default.this:an.default.self,P=!("compile"in t&&!s||t.schema===!1);o.assign(f,(0,Ye._)`${I}${(0,Vj.callValidateCode)(e,d,R,P)}`,t.modifying)}function x(I){var R;o.if((0,Ye.not)((R=t.valid)!==null&&R!==void 0?R:f),I)}}Lt.funcKeywordCode=Kj;function Ib(e){let{gen:t,data:n,it:o}=e;t.if(o.parentData,()=>t.assign(n,(0,Ye._)`${o.parentData}[${o.parentDataProperty}]`))}function Hj(e,t){let{gen:n}=e;n.if((0,Ye._)`Array.isArray(${t})`,()=>{n.assign(an.default.vErrors,(0,Ye._)`${an.default.vErrors} === null ? ${t} : ${an.default.vErrors}.concat(${t})`).assign(an.default.errors,(0,Ye._)`${an.default.vErrors}.length`),(0,Fj.extendErrors)(e)},()=>e.error())}function Jj({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Eb(e,t,n){if(n===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,Ye.stringify)(n)})}function Gj(e,t,n=!1){return!t.length||t.some(o=>o==="array"?Array.isArray(e):o==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==o||n&&typeof e>"u")}Lt.validSchemaType=Gj;function Wj({schema:e,opts:t,self:n,errSchemaPath:o},r,i){if(Array.isArray(r.keyword)?!r.keyword.includes(i):r.keyword!==i)throw new Error("ajv implementation error");let a=r.dependencies;if(a?.some(s=>!Object.prototype.hasOwnProperty.call(e,s)))throw new Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(r.validateSchema&&!r.validateSchema(e[i])){let c=`keyword "${i}" value is invalid at path "${o}": `+n.errorsText(r.validateSchema.errors);if(t.validateSchema==="log")n.logger.error(c);else throw new Error(c)}}Lt.validateKeywordUsage=Wj});var jb=A(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.extendSubschemaMode=Or.extendSubschemaData=Or.getSubschema=void 0;var qt=re(),Pb=fe();function Xj(e,{keyword:t,schemaProp:n,schema:o,schemaPath:r,errSchemaPath:i,topSchemaRef:a}){if(t!==void 0&&o!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let s=e.schema[t];return n===void 0?{schema:s,schemaPath:(0,qt._)`${e.schemaPath}${(0,qt.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[n],schemaPath:(0,qt._)`${e.schemaPath}${(0,qt.getProperty)(t)}${(0,qt.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Pb.escapeFragment)(n)}`}}if(o!==void 0){if(r===void 0||i===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:r,topSchemaRef:a,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Or.getSubschema=Xj;function Yj(e,t,{dataProp:n,dataPropType:o,data:r,dataTypes:i,propertyName:a}){if(r!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=t;if(n!==void 0){let{errorPath:l,dataPathArr:d,opts:f}=t,y=s.let("data",(0,qt._)`${t.data}${(0,qt.getProperty)(n)}`,!0);c(y),e.errorPath=(0,qt.str)`${l}${(0,Pb.getErrorPath)(n,o,f.jsPropertySyntax)}`,e.parentDataProperty=(0,qt._)`${n}`,e.dataPathArr=[...d,e.parentDataProperty]}if(r!==void 0){let l=r instanceof qt.Name?r:s.let("data",r,!0);c(l),a!==void 0&&(e.propertyName=a)}i&&(e.dataTypes=i);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}Or.extendSubschemaData=Yj;function Qj(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:o,createErrors:r,allErrors:i}){o!==void 0&&(e.compositeRule=o),r!==void 0&&(e.createErrors=r),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=n}Or.extendSubschemaMode=Qj});var Sm=A((GL,Ob)=>{"use strict";Ob.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var o,r,i;if(Array.isArray(t)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(n).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;r--!==0;){var a=i[r];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}});var Rb=A((WL,Nb)=>{"use strict";var Nr=Nb.exports=function(e,t,n){typeof t=="function"&&(n=t,t={}),n=t.cb||n;var o=typeof n=="function"?n:n.pre||function(){},r=n.post||function(){};fl(t,o,r,e,"",e)};Nr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Nr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Nr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Nr.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function fl(e,t,n,o,r,i,a,s,c,l){if(o&&typeof o=="object"&&!Array.isArray(o)){t(o,r,i,a,s,c,l);for(var d in o){var f=o[d];if(Array.isArray(f)){if(d in Nr.arrayKeywords)for(var y=0;y<f.length;y++)fl(e,t,n,f[y],r+"/"+d+"/"+y,i,r,d,o,y)}else if(d in Nr.propsKeywords){if(f&&typeof f=="object")for(var v in f)fl(e,t,n,f[v],r+"/"+d+"/"+eO(v),i,r,d,o,v)}else(d in Nr.keywords||e.allKeys&&!(d in Nr.skipKeywords))&&fl(e,t,n,f,r+"/"+d,i,r,d,o)}n(o,r,i,a,s,c,l)}}function eO(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var fa=A(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.getSchemaRefs=it.resolveUrl=it.normalizeId=it._getFullPath=it.getFullPath=it.inlineRef=void 0;var tO=fe(),rO=Sm(),nO=Rb(),oO=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function iO(e,t=!0){return typeof e=="boolean"?!0:t===!0?!zm(e):t?Ab(e)<=t:!1}it.inlineRef=iO;var aO=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function zm(e){for(let t in e){if(aO.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(zm)||typeof n=="object"&&zm(n))return!0}return!1}function Ab(e){let t=0;for(let n in e){if(n==="$ref")return 1/0;if(t++,!oO.has(n)&&(typeof e[n]=="object"&&(0,tO.eachItem)(e[n],o=>t+=Ab(o)),t===1/0))return 1/0}return t}function Db(e,t="",n){n!==!1&&(t=$o(t));let o=e.parse(t);return Cb(e,o)}it.getFullPath=Db;function Cb(e,t){return e.serialize(t).split("#")[0]+"#"}it._getFullPath=Cb;var sO=/#\/?$/;function $o(e){return e?e.replace(sO,""):""}it.normalizeId=$o;function cO(e,t,n){return n=$o(n),e.resolve(t,n)}it.resolveUrl=cO;var uO=/^[a-z_][-a-z0-9._]*$/i;function lO(e,t){if(typeof e=="boolean")return{};let{schemaId:n,uriResolver:o}=this.opts,r=$o(e[n]||t),i={"":r},a=Db(o,r,!1),s={},c=new Set;return nO(e,{allKeys:!0},(f,y,v,g)=>{if(g===void 0)return;let b=a+y,x=i[g];typeof f[n]=="string"&&(x=I.call(this,f[n])),R.call(this,f.$anchor),R.call(this,f.$dynamicAnchor),i[y]=x;function I(P){let M=this.opts.uriResolver.resolve;if(P=$o(x?M(x,P):P),c.has(P))throw d(P);c.add(P);let V=this.refs[P];return typeof V=="string"&&(V=this.refs[V]),typeof V=="object"?l(f,V.schema,P):P!==$o(b)&&(P[0]==="#"?(l(f,s[P],P),s[P]=f):this.refs[P]=b),P}function R(P){if(typeof P=="string"){if(!uO.test(P))throw new Error(`invalid anchor "${P}"`);I.call(this,`#${P}`)}}}),s;function l(f,y,v){if(y!==void 0&&!rO(f,y))throw d(v)}function d(f){return new Error(`reference "${f}" resolves to more than one schema`)}}it.getSchemaRefs=lO});var ha=A(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.getData=Rr.KeywordCxt=Rr.validateFunctionCode=void 0;var qb=vb(),Zb=da(),Em=_m(),pl=da(),dO=kb(),ma=Tb(),Im=jb(),K=re(),X=or(),fO=fa(),ir=fe(),pa=la();function pO(e){if(Bb(e)&&(Kb(e),Fb(e))){gO(e);return}Vb(e,()=>(0,qb.topBoolOrEmptySchema)(e))}Rr.validateFunctionCode=pO;function Vb({gen:e,validateName:t,schema:n,schemaEnv:o,opts:r},i){r.code.es5?e.func(t,(0,K._)`${X.default.data}, ${X.default.valCxt}`,o.$async,()=>{e.code((0,K._)`"use strict"; ${Ub(n,r)}`),hO(e,r),e.code(i)}):e.func(t,(0,K._)`${X.default.data}, ${mO(r)}`,o.$async,()=>e.code(Ub(n,r)).code(i))}function mO(e){return(0,K._)`{${X.default.instancePath}="", ${X.default.parentData}, ${X.default.parentDataProperty}, ${X.default.rootData}=${X.default.data}${e.dynamicRef?(0,K._)`, ${X.default.dynamicAnchors}={}`:K.nil}}={}`}function hO(e,t){e.if(X.default.valCxt,()=>{e.var(X.default.instancePath,(0,K._)`${X.default.valCxt}.${X.default.instancePath}`),e.var(X.default.parentData,(0,K._)`${X.default.valCxt}.${X.default.parentData}`),e.var(X.default.parentDataProperty,(0,K._)`${X.default.valCxt}.${X.default.parentDataProperty}`),e.var(X.default.rootData,(0,K._)`${X.default.valCxt}.${X.default.rootData}`),t.dynamicRef&&e.var(X.default.dynamicAnchors,(0,K._)`${X.default.valCxt}.${X.default.dynamicAnchors}`)},()=>{e.var(X.default.instancePath,(0,K._)`""`),e.var(X.default.parentData,(0,K._)`undefined`),e.var(X.default.parentDataProperty,(0,K._)`undefined`),e.var(X.default.rootData,X.default.data),t.dynamicRef&&e.var(X.default.dynamicAnchors,(0,K._)`{}`)})}function gO(e){let{schema:t,opts:n,gen:o}=e;Vb(e,()=>{n.$comment&&t.$comment&&Jb(e),$O(e),o.let(X.default.vErrors,null),o.let(X.default.errors,0),n.unevaluated&&vO(e),Hb(e),kO(e)})}function vO(e){let{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",(0,K._)`${n}.evaluated`),t.if((0,K._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,K._)`${e.evaluated}.props`,(0,K._)`undefined`)),t.if((0,K._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,K._)`${e.evaluated}.items`,(0,K._)`undefined`))}function Ub(e,t){let n=typeof e=="object"&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,K._)`/*# sourceURL=${n} */`:K.nil}function _O(e,t){if(Bb(e)&&(Kb(e),Fb(e))){yO(e,t);return}(0,qb.boolOrEmptySchema)(e,t)}function Fb({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function Bb(e){return typeof e.schema!="boolean"}function yO(e,t){let{schema:n,gen:o,opts:r}=e;r.$comment&&n.$comment&&Jb(e),xO(e),wO(e);let i=o.const("_errs",X.default.errors);Hb(e,i),o.var(t,(0,K._)`${i} === ${X.default.errors}`)}function Kb(e){(0,ir.checkUnknownRules)(e),bO(e)}function Hb(e,t){if(e.opts.jtd)return Mb(e,[],!1,t);let n=(0,Zb.getSchemaTypes)(e.schema),o=(0,Zb.coerceAndCheckDataType)(e,n);Mb(e,n,!o,t)}function bO(e){let{schema:t,errSchemaPath:n,opts:o,self:r}=e;t.$ref&&o.ignoreKeywordsWithRef&&(0,ir.schemaHasRulesButRef)(t,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function $O(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,ir.checkStrictMode)(e,"default is ignored in the schema root")}function xO(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,fO.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function wO(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Jb({gen:e,schemaEnv:t,schema:n,errSchemaPath:o,opts:r}){let i=n.$comment;if(r.$comment===!0)e.code((0,K._)`${X.default.self}.logger.log(${i})`);else if(typeof r.$comment=="function"){let a=(0,K.str)`${o}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code((0,K._)`${X.default.self}.opts.$comment(${i}, ${a}, ${s}.schema)`)}}function kO(e){let{gen:t,schemaEnv:n,validateName:o,ValidationError:r,opts:i}=e;n.$async?t.if((0,K._)`${X.default.errors} === 0`,()=>t.return(X.default.data),()=>t.throw((0,K._)`new ${r}(${X.default.vErrors})`)):(t.assign((0,K._)`${o}.errors`,X.default.vErrors),i.unevaluated&&SO(e),t.return((0,K._)`${X.default.errors} === 0`))}function SO({gen:e,evaluated:t,props:n,items:o}){n instanceof K.Name&&e.assign((0,K._)`${t}.props`,n),o instanceof K.Name&&e.assign((0,K._)`${t}.items`,o)}function Mb(e,t,n,o){let{gen:r,schema:i,data:a,allErrors:s,opts:c,self:l}=e,{RULES:d}=l;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,ir.schemaHasRulesButRef)(i,d))){r.block(()=>Wb(e,"$ref",d.all.$ref.definition));return}c.jtd||zO(e,t),r.block(()=>{for(let y of d.rules)f(y);f(d.post)});function f(y){(0,Em.shouldUseGroup)(i,y)&&(y.type?(r.if((0,pl.checkDataType)(y.type,a,c.strictNumbers)),Lb(e,y),t.length===1&&t[0]===y.type&&n&&(r.else(),(0,pl.reportTypeError)(e)),r.endIf()):Lb(e,y),s||r.if((0,K._)`${X.default.errors} === ${o||0}`))}}function Lb(e,t){let{gen:n,schema:o,opts:{useDefaults:r}}=e;r&&(0,dO.assignDefaults)(e,t.type),n.block(()=>{for(let i of t.rules)(0,Em.shouldUseRule)(o,i)&&Wb(e,i.keyword,i.definition,t.type)})}function zO(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(IO(e,t),e.opts.allowUnionTypes||EO(e,t),TO(e,e.dataTypes))}function IO(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(n=>{Gb(e.dataTypes,n)||Tm(e,`type "${n}" not allowed by context "${e.dataTypes.join(",")}"`)}),jO(e,t)}}function EO(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Tm(e,"use allowUnionTypes to allow union type keyword")}function TO(e,t){let n=e.self.RULES.all;for(let o in n){let r=n[o];if(typeof r=="object"&&(0,Em.shouldUseRule)(e.schema,r)){let{type:i}=r.definition;i.length&&!i.some(a=>PO(t,a))&&Tm(e,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function PO(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Gb(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function jO(e,t){let n=[];for(let o of e.dataTypes)Gb(t,o)?n.push(o):t.includes("integer")&&o==="number"&&n.push("integer");e.dataTypes=n}function Tm(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,ir.checkStrictMode)(e,t,e.opts.strictTypes)}var ml=class{constructor(t,n,o){if((0,ma.validateKeywordUsage)(t,n,o),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=o,this.data=t.data,this.schema=t.schema[o],this.$data=n.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,ir.schemaRefOrVal)(t,this.schema,o,this.$data),this.schemaType=n.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=n,this.$data)this.schemaCode=t.gen.const("vSchema",Xb(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,ma.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${o} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=t.gen.const("_errs",X.default.errors))}result(t,n,o){this.failResult((0,K.not)(t),n,o)}failResult(t,n,o){this.gen.if(t),o?o():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,n){this.failResult((0,K.not)(t),void 0,n)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:n}=this;this.fail((0,K._)`${n} !== undefined && (${(0,K.or)(this.invalid$data(),t)})`)}error(t,n,o){if(n){this.setParams(n),this._error(t,o),this.setParams({});return}this._error(t,o)}_error(t,n){(t?pa.reportExtraError:pa.reportError)(this,this.def.error,n)}$dataError(){(0,pa.reportError)(this,this.def.$dataError||pa.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,pa.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,n){n?Object.assign(this.params,t):this.params=t}block$data(t,n,o=K.nil){this.gen.block(()=>{this.check$data(t,o),n()})}check$data(t=K.nil,n=K.nil){if(!this.$data)return;let{gen:o,schemaCode:r,schemaType:i,def:a}=this;o.if((0,K.or)((0,K._)`${r} === undefined`,n)),t!==K.nil&&o.assign(t,!0),(i.length||a.validateSchema)&&(o.elseIf(this.invalid$data()),this.$dataError(),t!==K.nil&&o.assign(t,!1)),o.else()}invalid$data(){let{gen:t,schemaCode:n,schemaType:o,def:r,it:i}=this;return(0,K.or)(a(),s());function a(){if(o.length){if(!(n instanceof K.Name))throw new Error("ajv implementation error");let c=Array.isArray(o)?o:[o];return(0,K._)`${(0,pl.checkDataTypes)(c,n,i.opts.strictNumbers,pl.DataType.Wrong)}`}return K.nil}function s(){if(r.validateSchema){let c=t.scopeValue("validate$data",{ref:r.validateSchema});return(0,K._)`!${c}(${n})`}return K.nil}}subschema(t,n){let o=(0,Im.getSubschema)(this.it,t);(0,Im.extendSubschemaData)(o,this.it,t),(0,Im.extendSubschemaMode)(o,t);let r={...this.it,...o,items:void 0,props:void 0};return _O(r,n),r}mergeEvaluated(t,n){let{it:o,gen:r}=this;o.opts.unevaluated&&(o.props!==!0&&t.props!==void 0&&(o.props=ir.mergeEvaluated.props(r,t.props,o.props,n)),o.items!==!0&&t.items!==void 0&&(o.items=ir.mergeEvaluated.items(r,t.items,o.items,n)))}mergeValidEvaluated(t,n){let{it:o,gen:r}=this;if(o.opts.unevaluated&&(o.props!==!0||o.items!==!0))return r.if(n,()=>this.mergeEvaluated(t,K.Name)),!0}};Rr.KeywordCxt=ml;function Wb(e,t,n,o){let r=new ml(e,n,t);"code"in n?n.code(r,o):r.$data&&n.validate?(0,ma.funcKeywordCode)(r,n):"macro"in n?(0,ma.macroKeywordCode)(r,n):(n.compile||n.validate)&&(0,ma.funcKeywordCode)(r,n)}var OO=/^\/(?:[^~]|~0|~1)*$/,NO=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Xb(e,{dataLevel:t,dataNames:n,dataPathArr:o}){let r,i;if(e==="")return X.default.rootData;if(e[0]==="/"){if(!OO.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);r=e,i=X.default.rootData}else{let l=NO.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let d=+l[1];if(r=l[2],r==="#"){if(d>=t)throw new Error(c("property/index",d));return o[t-d]}if(d>t)throw new Error(c("data",d));if(i=n[t-d],!r)return i}let a=i,s=r.split("/");for(let l of s)l&&(i=(0,K._)`${i}${(0,K.getProperty)((0,ir.unescapeJsonPointer)(l))}`,a=(0,K._)`${a} && ${i}`);return a;function c(l,d){return`Cannot access ${l} ${d} levels up, current level is ${t}`}}Rr.getData=Xb});var hl=A(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});var Pm=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};jm.default=Pm});var ga=A(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});var Om=fa(),Nm=class extends Error{constructor(t,n,o,r){super(r||`can't resolve reference ${o} from id ${n}`),this.missingRef=(0,Om.resolveUrl)(t,n,o),this.missingSchema=(0,Om.normalizeId)((0,Om.getFullPath)(t,this.missingRef))}};Rm.default=Nm});var vl=A($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.resolveSchema=$t.getCompilingSchema=$t.resolveRef=$t.compileSchema=$t.SchemaEnv=void 0;var Ot=re(),RO=hl(),sn=or(),Nt=fa(),Yb=fe(),AO=ha(),xo=class{constructor(t){var n;this.refs={},this.dynamicAnchors={};let o;typeof t.schema=="object"&&(o=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(n=t.baseId)!==null&&n!==void 0?n:(0,Nt.normalizeId)(o?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=o?.$async,this.refs={}}};$t.SchemaEnv=xo;function Dm(e){let t=Qb.call(this,e);if(t)return t;let n=(0,Nt.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:o,lines:r}=this.opts.code,{ownProperties:i}=this.opts,a=new Ot.CodeGen(this.scope,{es5:o,lines:r,ownProperties:i}),s;e.$async&&(s=a.scopeValue("Error",{ref:RO.default,code:(0,Ot._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:sn.default.data,parentData:sn.default.parentData,parentDataProperty:sn.default.parentDataProperty,dataNames:[sn.default.data],dataPathArr:[Ot.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Ot.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:Ot.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ot._)`""`,opts:this.opts,self:this},d;try{this._compilations.add(e),(0,AO.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let f=a.toString();d=`${a.scopeRefs(sn.default.scope)}return ${f}`,this.opts.code.process&&(d=this.opts.code.process(d,e));let v=new Function(`${sn.default.self}`,`${sn.default.scope}`,d)(this,this.scope.get());if(this.scope.value(c,{ref:v}),v.errors=null,v.schema=e.schema,v.schemaEnv=e,e.$async&&(v.$async=!0),this.opts.code.source===!0&&(v.source={validateName:c,validateCode:f,scopeValues:a._values}),this.opts.unevaluated){let{props:g,items:b}=l;v.evaluated={props:g instanceof Ot.Name?void 0:g,items:b instanceof Ot.Name?void 0:b,dynamicProps:g instanceof Ot.Name,dynamicItems:b instanceof Ot.Name},v.source&&(v.source.evaluated=(0,Ot.stringify)(v.evaluated))}return e.validate=v,e}catch(f){throw delete e.validate,delete e.validateName,d&&this.logger.error("Error compiling schema, function code:",d),f}finally{this._compilations.delete(e)}}$t.compileSchema=Dm;function DO(e,t,n){var o;n=(0,Nt.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let i=UO.call(this,e,n);if(i===void 0){let a=(o=e.localRefs)===null||o===void 0?void 0:o[n],{schemaId:s}=this.opts;a&&(i=new xo({schema:a,schemaId:s,root:e,baseId:t}))}if(i!==void 0)return e.refs[n]=CO.call(this,i)}$t.resolveRef=DO;function CO(e){return(0,Nt.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Dm.call(this,e)}function Qb(e){for(let t of this._compilations)if(ZO(t,e))return t}$t.getCompilingSchema=Qb;function ZO(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function UO(e,t){let n;for(;typeof(n=this.refs[t])=="string";)t=n;return n||this.schemas[t]||gl.call(this,e,t)}function gl(e,t){let n=this.opts.uriResolver.parse(t),o=(0,Nt._getFullPath)(this.opts.uriResolver,n),r=(0,Nt.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===r)return Am.call(this,n,e);let i=(0,Nt.normalizeId)(o),a=this.refs[i]||this.schemas[i];if(typeof a=="string"){let s=gl.call(this,e,a);return typeof s?.schema!="object"?void 0:Am.call(this,n,s)}if(typeof a?.schema=="object"){if(a.validate||Dm.call(this,a),i===(0,Nt.normalizeId)(t)){let{schema:s}=a,{schemaId:c}=this.opts,l=s[c];return l&&(r=(0,Nt.resolveUrl)(this.opts.uriResolver,r,l)),new xo({schema:s,schemaId:c,root:e,baseId:r})}return Am.call(this,n,a)}}$t.resolveSchema=gl;var MO=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Am(e,{baseId:t,schema:n,root:o}){var r;if(((r=e.fragment)===null||r===void 0?void 0:r[0])!=="/")return;for(let s of e.fragment.slice(1).split("/")){if(typeof n=="boolean")return;let c=n[(0,Yb.unescapeFragment)(s)];if(c===void 0)return;n=c;let l=typeof n=="object"&&n[this.opts.schemaId];!MO.has(s)&&l&&(t=(0,Nt.resolveUrl)(this.opts.uriResolver,t,l))}let i;if(typeof n!="boolean"&&n.$ref&&!(0,Yb.schemaHasRulesButRef)(n,this.RULES)){let s=(0,Nt.resolveUrl)(this.opts.uriResolver,t,n.$ref);i=gl.call(this,o,s)}let{schemaId:a}=this.opts;if(i=i||new xo({schema:n,schemaId:a,root:o,baseId:t}),i.schema!==i.root.schema)return i}});var e$=A((r2,LO)=>{LO.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Zm=A((n2,o$)=>{"use strict";var qO=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),r$=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function Cm(e){let t="",n=0,o=0;for(o=0;o<e.length;o++)if(n=e[o].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[o];break}for(o+=1;o<e.length;o++){if(n=e[o].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[o]}return t}var VO=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function t$(e){return e.length=0,!0}function FO(e,t,n){if(e.length){let o=Cm(e);if(o!=="")t.push(o);else return n.error=!0,!1;e.length=0}return!0}function BO(e){let t=0,n={error:!1,address:"",zone:""},o=[],r=[],i=!1,a=!1,s=FO;for(let c=0;c<e.length;c++){let l=e[c];if(!(l==="["||l==="]"))if(l===":"){if(i===!0&&(a=!0),!s(r,o,n))break;if(++t>7){n.error=!0;break}c>0&&e[c-1]===":"&&(i=!0),o.push(":");continue}else if(l==="%"){if(!s(r,o,n))break;s=t$}else{r.push(l);continue}}return r.length&&(s===t$?n.zone=r.join(""):a?o.push(r.join("")):o.push(Cm(r))),n.address=o.join(""),n}function n$(e){if(KO(e,":")<2)return{host:e,isIPV6:!1};let t=BO(e);if(t.error)return{host:e,isIPV6:!1};{let n=t.address,o=t.address;return t.zone&&(n+="%"+t.zone,o+="%25"+t.zone),{host:n,isIPV6:!0,escapedHost:o}}}function KO(e,t){let n=0;for(let o=0;o<e.length;o++)e[o]===t&&n++;return n}function HO(e){let t=e,n=[],o=-1,r=0;for(;r=t.length;){if(r===1){if(t===".")break;if(t==="/"){n.push("/");break}else{n.push(t);break}}else if(r===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){n.push("/");break}}else if(r===3&&t==="/.."){n.length!==0&&n.pop(),n.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),n.length!==0&&n.pop();continue}}if((o=t.indexOf("/",1))===-1){n.push(t);break}else n.push(t.slice(0,o)),t=t.slice(o)}return n.join("")}function JO(e,t){let n=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=n(e.scheme)),e.userinfo!==void 0&&(e.userinfo=n(e.userinfo)),e.host!==void 0&&(e.host=n(e.host)),e.path!==void 0&&(e.path=n(e.path)),e.query!==void 0&&(e.query=n(e.query)),e.fragment!==void 0&&(e.fragment=n(e.fragment)),e}function GO(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let n=unescape(e.host);if(!r$(n)){let o=n$(n);o.isIPV6===!0?n=`[${o.escapedHost}]`:n=e.host}t.push(n)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}o$.exports={nonSimpleDomain:VO,recomposeAuthority:GO,normalizeComponentEncoding:JO,removeDotSegments:HO,isIPv4:r$,isUUID:qO,normalizeIPv6:n$,stringArrayToHexStripped:Cm}});var u$=A((o2,c$)=>{"use strict";var{isUUID:WO}=Zm(),XO=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,YO=["http","https","ws","wss","urn","urn:uuid"];function QO(e){return YO.indexOf(e)!==-1}function Um(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function i$(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function a$(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function eN(e){return e.secure=Um(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function tN(e){if((e.port===(Um(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function rN(e,t){if(!e.path)return e.error="URN can not be parsed",e;let n=e.path.match(XO);if(n){let o=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];let r=`${o}:${t.nid||e.nid}`,i=Mm(r);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function nN(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let n=t.scheme||e.scheme||"urn",o=e.nid.toLowerCase(),r=`${n}:${t.nid||o}`,i=Mm(r);i&&(e=i.serialize(e,t));let a=e,s=e.nss;return a.path=`${o||t.nid}:${s}`,t.skipEscape=!0,a}function oN(e,t){let n=e;return n.uuid=n.nss,n.nss=void 0,!t.tolerant&&(!n.uuid||!WO(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function iN(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var s$={scheme:"http",domainHost:!0,parse:i$,serialize:a$},aN={scheme:"https",domainHost:s$.domainHost,parse:i$,serialize:a$},_l={scheme:"ws",domainHost:!0,parse:eN,serialize:tN},sN={scheme:"wss",domainHost:_l.domainHost,parse:_l.parse,serialize:_l.serialize},cN={scheme:"urn",parse:rN,serialize:nN,skipNormalize:!0},uN={scheme:"urn:uuid",parse:oN,serialize:iN,skipNormalize:!0},yl={http:s$,https:aN,ws:_l,wss:sN,urn:cN,"urn:uuid":uN};Object.setPrototypeOf(yl,null);function Mm(e){return e&&(yl[e]||yl[e.toLowerCase()])||void 0}c$.exports={wsIsSecure:Um,SCHEMES:yl,isValidSchemeName:QO,getSchemeHandler:Mm}});var f$=A((i2,$l)=>{"use strict";var{normalizeIPv6:lN,removeDotSegments:va,recomposeAuthority:dN,normalizeComponentEncoding:bl,isIPv4:fN,nonSimpleDomain:pN}=Zm(),{SCHEMES:mN,getSchemeHandler:l$}=u$();function hN(e,t){return typeof e=="string"?e=Vt(ar(e,t),t):typeof e=="object"&&(e=ar(Vt(e,t),t)),e}function gN(e,t,n){let o=n?Object.assign({scheme:"null"},n):{scheme:"null"},r=d$(ar(e,o),ar(t,o),o,!0);return o.skipEscape=!0,Vt(r,o)}function d$(e,t,n,o){let r={};return o||(e=ar(Vt(e,n),n),t=ar(Vt(t,n),n)),n=n||{},!n.tolerant&&t.scheme?(r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=va(t.path||""),r.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=va(t.path||""),r.query=t.query):(t.path?(t.path[0]==="/"?r.path=va(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?r.path="/"+t.path:e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:r.path=t.path,r.path=va(r.path)),r.query=t.query):(r.path=e.path,t.query!==void 0?r.query=t.query:r.query=e.query),r.userinfo=e.userinfo,r.host=e.host,r.port=e.port),r.scheme=e.scheme),r.fragment=t.fragment,r}function vN(e,t,n){return typeof e=="string"?(e=unescape(e),e=Vt(bl(ar(e,n),!0),{...n,skipEscape:!0})):typeof e=="object"&&(e=Vt(bl(e,!0),{...n,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=Vt(bl(ar(t,n),!0),{...n,skipEscape:!0})):typeof t=="object"&&(t=Vt(bl(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function Vt(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},o=Object.assign({},t),r=[],i=l$(o.scheme||n.scheme);i&&i.serialize&&i.serialize(n,o),n.path!==void 0&&(o.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),o.reference!=="suffix"&&n.scheme&&r.push(n.scheme,":");let a=dN(n);if(a!==void 0&&(o.reference!=="suffix"&&r.push("//"),r.push(a),n.path&&n.path[0]!=="/"&&r.push("/")),n.path!==void 0){let s=n.path;!o.absolutePath&&(!i||!i.absolutePath)&&(s=va(s)),a===void 0&&s[0]==="/"&&s[1]==="/"&&(s="/%2F"+s.slice(2)),r.push(s)}return n.query!==void 0&&r.push("?",n.query),n.fragment!==void 0&&r.push("#",n.fragment),r.join("")}var _N=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function ar(e,t){let n=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},r=!1;n.reference==="suffix"&&(n.scheme?e=n.scheme+":"+e:e="//"+e);let i=e.match(_N);if(i){if(o.scheme=i[1],o.userinfo=i[3],o.host=i[4],o.port=parseInt(i[5],10),o.path=i[6]||"",o.query=i[7],o.fragment=i[8],isNaN(o.port)&&(o.port=i[5]),o.host)if(fN(o.host)===!1){let c=lN(o.host);o.host=c.host.toLowerCase(),r=c.isIPV6}else r=!0;o.scheme===void 0&&o.userinfo===void 0&&o.host===void 0&&o.port===void 0&&o.query===void 0&&!o.path?o.reference="same-document":o.scheme===void 0?o.reference="relative":o.fragment===void 0?o.reference="absolute":o.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==o.reference&&(o.error=o.error||"URI is not a "+n.reference+" reference.");let a=l$(n.scheme||o.scheme);if(!n.unicodeSupport&&(!a||!a.unicodeSupport)&&o.host&&(n.domainHost||a&&a.domainHost)&&r===!1&&pN(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(s){o.error=o.error||"Host's domain name can not be converted to ASCII: "+s}(!a||a&&!a.skipNormalize)&&(e.indexOf("%")!==-1&&(o.scheme!==void 0&&(o.scheme=unescape(o.scheme)),o.host!==void 0&&(o.host=unescape(o.host))),o.path&&(o.path=escape(unescape(o.path))),o.fragment&&(o.fragment=encodeURI(decodeURIComponent(o.fragment)))),a&&a.parse&&a.parse(o,n)}else o.error=o.error||"URI can not be parsed.";return o}var Lm={SCHEMES:mN,normalize:hN,resolve:gN,resolveComponent:d$,equal:vN,serialize:Vt,parse:ar};$l.exports=Lm;$l.exports.default=Lm;$l.exports.fastUri=Lm});var m$=A(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0});var p$=f$();p$.code='require("ajv/dist/runtime/uri").default';qm.default=p$});var x$=A(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.CodeGen=Ze.Name=Ze.nil=Ze.stringify=Ze.str=Ze._=Ze.KeywordCxt=void 0;var yN=ha();Object.defineProperty(Ze,"KeywordCxt",{enumerable:!0,get:function(){return yN.KeywordCxt}});var wo=re();Object.defineProperty(Ze,"_",{enumerable:!0,get:function(){return wo._}});Object.defineProperty(Ze,"str",{enumerable:!0,get:function(){return wo.str}});Object.defineProperty(Ze,"stringify",{enumerable:!0,get:function(){return wo.stringify}});Object.defineProperty(Ze,"nil",{enumerable:!0,get:function(){return wo.nil}});Object.defineProperty(Ze,"Name",{enumerable:!0,get:function(){return wo.Name}});Object.defineProperty(Ze,"CodeGen",{enumerable:!0,get:function(){return wo.CodeGen}});var bN=hl(),y$=ga(),$N=vm(),_a=vl(),xN=re(),ya=fa(),xl=da(),Fm=fe(),h$=e$(),wN=m$(),b$=(e,t)=>new RegExp(e,t);b$.code="new RegExp";var kN=["removeAdditional","useDefaults","coerceTypes"],SN=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),zN={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},IN={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},g$=200;function EN(e){var t,n,o,r,i,a,s,c,l,d,f,y,v,g,b,x,I,R,P,M,V,Me,st,No,sr;let Ur=e.strict,fn=(t=e.code)===null||t===void 0?void 0:t.optimize,Aa=fn===!0||fn===void 0?1:fn||0,Da=(o=(n=e.code)===null||n===void 0?void 0:n.regExp)!==null&&o!==void 0?o:b$,Xl=(r=e.uriResolver)!==null&&r!==void 0?r:wN.default;return{strictSchema:(a=(i=e.strictSchema)!==null&&i!==void 0?i:Ur)!==null&&a!==void 0?a:!0,strictNumbers:(c=(s=e.strictNumbers)!==null&&s!==void 0?s:Ur)!==null&&c!==void 0?c:!0,strictTypes:(d=(l=e.strictTypes)!==null&&l!==void 0?l:Ur)!==null&&d!==void 0?d:"log",strictTuples:(y=(f=e.strictTuples)!==null&&f!==void 0?f:Ur)!==null&&y!==void 0?y:"log",strictRequired:(g=(v=e.strictRequired)!==null&&v!==void 0?v:Ur)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:Aa,regExp:Da}:{optimize:Aa,regExp:Da},loopRequired:(b=e.loopRequired)!==null&&b!==void 0?b:g$,loopEnum:(x=e.loopEnum)!==null&&x!==void 0?x:g$,meta:(I=e.meta)!==null&&I!==void 0?I:!0,messages:(R=e.messages)!==null&&R!==void 0?R:!0,inlineRefs:(P=e.inlineRefs)!==null&&P!==void 0?P:!0,schemaId:(M=e.schemaId)!==null&&M!==void 0?M:"$id",addUsedSchema:(V=e.addUsedSchema)!==null&&V!==void 0?V:!0,validateSchema:(Me=e.validateSchema)!==null&&Me!==void 0?Me:!0,validateFormats:(st=e.validateFormats)!==null&&st!==void 0?st:!0,unicodeRegExp:(No=e.unicodeRegExp)!==null&&No!==void 0?No:!0,int32range:(sr=e.int32range)!==null&&sr!==void 0?sr:!0,uriResolver:Xl}}var ba=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...EN(t)};let{es5:n,lines:o}=this.opts.code;this.scope=new xN.ValueScope({scope:{},prefixes:SN,es5:n,lines:o}),this.logger=RN(t.logger);let r=t.validateFormats;t.validateFormats=!1,this.RULES=(0,$N.getRules)(),v$.call(this,zN,t,"NOT SUPPORTED"),v$.call(this,IN,t,"DEPRECATED","warn"),this._metaOpts=ON.call(this),t.formats&&PN.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&jN.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),TN.call(this),t.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:n,schemaId:o}=this.opts,r=h$;o==="id"&&(r={...h$},r.id=r.$id,delete r.$id),n&&t&&this.addMetaSchema(r,r[o],!1)}defaultMeta(){let{meta:t,schemaId:n}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[n]||t:void 0}validate(t,n){let o;if(typeof t=="string"){if(o=this.getSchema(t),!o)throw new Error(`no schema with key or ref "${t}"`)}else o=this.compile(t);let r=o(n);return"$async"in o||(this.errors=o.errors),r}compile(t,n){let o=this._addSchema(t,n);return o.validate||this._compileSchemaEnv(o)}compileAsync(t,n){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:o}=this.opts;return r.call(this,t,n);async function r(d,f){await i.call(this,d.$schema);let y=this._addSchema(d,f);return y.validate||a.call(this,y)}async function i(d){d&&!this.getSchema(d)&&await r.call(this,{$ref:d},!0)}async function a(d){try{return this._compileSchemaEnv(d)}catch(f){if(!(f instanceof y$.default))throw f;return s.call(this,f),await c.call(this,f.missingSchema),a.call(this,d)}}function s({missingSchema:d,missingRef:f}){if(this.refs[d])throw new Error(`AnySchema ${d} is loaded but ${f} cannot be resolved`)}async function c(d){let f=await l.call(this,d);this.refs[d]||await i.call(this,f.$schema),this.refs[d]||this.addSchema(f,d,n)}async function l(d){let f=this._loading[d];if(f)return f;try{return await(this._loading[d]=o(d))}finally{delete this._loading[d]}}}addSchema(t,n,o,r=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,o,r);return this}let i;if(typeof t=="object"){let{schemaId:a}=this.opts;if(i=t[a],i!==void 0&&typeof i!="string")throw new Error(`schema ${a} must be string`)}return n=(0,ya.normalizeId)(n||i),this._checkUnique(n),this.schemas[n]=this._addSchema(t,o,n,r,!0),this}addMetaSchema(t,n,o=this.opts.validateSchema){return this.addSchema(t,n,!0,o),this}validateSchema(t,n){if(typeof t=="boolean")return!0;let o;if(o=t.$schema,o!==void 0&&typeof o!="string")throw new Error("$schema must be a string");if(o=o||this.opts.defaultMeta||this.defaultMeta(),!o)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let r=this.validate(o,t);if(!r&&n){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return r}getSchema(t){let n;for(;typeof(n=_$.call(this,t))=="string";)t=n;if(n===void 0){let{schemaId:o}=this.opts,r=new _a.SchemaEnv({schema:{},schemaId:o});if(n=_a.resolveSchema.call(this,r,t),!n)return;this.refs[t]=n}return n.validate||this._compileSchemaEnv(n)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let n=_$.call(this,t);return typeof n=="object"&&this._cache.delete(n.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let n=t;this._cache.delete(n);let o=t[this.opts.schemaId];return o&&(o=(0,ya.normalizeId)(o),delete this.schemas[o],delete this.refs[o]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let n of t)this.addKeyword(n);return this}addKeyword(t,n){let o;if(typeof t=="string")o=t,typeof n=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),n.keyword=o);else if(typeof t=="object"&&n===void 0){if(n=t,o=n.keyword,Array.isArray(o)&&!o.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(DN.call(this,o,n),!n)return(0,Fm.eachItem)(o,i=>Vm.call(this,i)),this;ZN.call(this,n);let r={...n,type:(0,xl.getJSONTypes)(n.type),schemaType:(0,xl.getJSONTypes)(n.schemaType)};return(0,Fm.eachItem)(o,r.type.length===0?i=>Vm.call(this,i,r):i=>r.type.forEach(a=>Vm.call(this,i,r,a))),this}getKeyword(t){let n=this.RULES.all[t];return typeof n=="object"?n.definition:!!n}removeKeyword(t){let{RULES:n}=this;delete n.keywords[t],delete n.all[t];for(let o of n.rules){let r=o.rules.findIndex(i=>i.keyword===t);r>=0&&o.rules.splice(r,1)}return this}addFormat(t,n){return typeof n=="string"&&(n=new RegExp(n)),this.formats[t]=n,this}errorsText(t=this.errors,{separator:n=", ",dataVar:o="data"}={}){return!t||t.length===0?"No errors":t.map(r=>`${o}${r.instancePath} ${r.message}`).reduce((r,i)=>r+n+i)}$dataMetaSchema(t,n){let o=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let r of n){let i=r.split("/").slice(1),a=t;for(let s of i)a=a[s];for(let s in o){let c=o[s];if(typeof c!="object")continue;let{$data:l}=c.definition,d=a[s];l&&d&&(a[s]=$$(d))}}return t}_removeAllSchemas(t,n){for(let o in t){let r=t[o];(!n||n.test(o))&&(typeof r=="string"?delete t[o]:r&&!r.meta&&(this._cache.delete(r.schema),delete t[o]))}}_addSchema(t,n,o,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof t=="object")a=t[s];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;o=(0,ya.normalizeId)(a||o);let l=ya.getSchemaRefs.call(this,t,o);return c=new _a.SchemaEnv({schema:t,schemaId:s,meta:n,baseId:o,localRefs:l}),this._cache.set(c.schema,c),i&&!o.startsWith("#")&&(o&&this._checkUnique(o),this.refs[o]=c),r&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):_a.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let n=this.opts;this.opts=this._metaOpts;try{_a.compileSchema.call(this,t)}finally{this.opts=n}}};ba.ValidationError=bN.default;ba.MissingRefError=y$.default;Ze.default=ba;function v$(e,t,n,o="error"){for(let r in e){let i=r;i in t&&this.logger[o](`${n}: option ${r}. ${e[i]}`)}}function _$(e){return e=(0,ya.normalizeId)(e),this.schemas[e]||this.refs[e]}function TN(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function PN(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function jN(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}function ON(){let e={...this.opts};for(let t of kN)delete e[t];return e}var NN={log(){},warn(){},error(){}};function RN(e){if(e===!1)return NN;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var AN=/^[a-z_$][a-z0-9_$:-]*$/i;function DN(e,t){let{RULES:n}=this;if((0,Fm.eachItem)(e,o=>{if(n.keywords[o])throw new Error(`Keyword ${o} is already defined`);if(!AN.test(o))throw new Error(`Keyword ${o} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function Vm(e,t,n){var o;let r=t?.post;if(n&&r)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,a=r?i.post:i.rules.find(({type:c})=>c===n);if(a||(a={type:n,rules:[]},i.rules.push(a)),i.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,xl.getJSONTypes)(t.type),schemaType:(0,xl.getJSONTypes)(t.schemaType)}};t.before?CN.call(this,a,s,t.before):a.rules.push(s),i.all[e]=s,(o=t.implements)===null||o===void 0||o.forEach(c=>this.addKeyword(c))}function CN(e,t,n){let o=e.rules.findIndex(r=>r.keyword===n);o>=0?e.rules.splice(o,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function ZN(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=$$(t)),e.validateSchema=this.compile(t,!0))}var UN={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function $$(e){return{anyOf:[e,UN]}}});var w$=A(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});var MN={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Bm.default=MN});var I$=A(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.callRef=cn.getValidate=void 0;var LN=ga(),k$=bt(),at=re(),ko=or(),S$=vl(),wl=fe(),qN={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:n,it:o}=e,{baseId:r,schemaEnv:i,validateName:a,opts:s,self:c}=o,{root:l}=i;if((n==="#"||n==="#/")&&r===l.baseId)return f();let d=S$.resolveRef.call(c,l,r,n);if(d===void 0)throw new LN.default(o.opts.uriResolver,r,n);if(d instanceof S$.SchemaEnv)return y(d);return v(d);function f(){if(i===l)return kl(e,a,i,i.$async);let g=t.scopeValue("root",{ref:l});return kl(e,(0,at._)`${g}.validate`,l,l.$async)}function y(g){let b=z$(e,g);kl(e,b,g,g.$async)}function v(g){let b=t.scopeValue("schema",s.code.source===!0?{ref:g,code:(0,at.stringify)(g)}:{ref:g}),x=t.name("valid"),I=e.subschema({schema:g,dataTypes:[],schemaPath:at.nil,topSchemaRef:b,errSchemaPath:n},x);e.mergeEvaluated(I),e.ok(x)}}};function z$(e,t){let{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):(0,at._)`${n.scopeValue("wrapper",{ref:t})}.validate`}cn.getValidate=z$;function kl(e,t,n,o){let{gen:r,it:i}=e,{allErrors:a,schemaEnv:s,opts:c}=i,l=c.passContext?ko.default.this:at.nil;o?d():f();function d(){if(!s.$async)throw new Error("async schema referenced by sync schema");let g=r.let("valid");r.try(()=>{r.code((0,at._)`await ${(0,k$.callValidateCode)(e,t,l)}`),v(t),a||r.assign(g,!0)},b=>{r.if((0,at._)`!(${b} instanceof ${i.ValidationError})`,()=>r.throw(b)),y(b),a||r.assign(g,!1)}),e.ok(g)}function f(){e.result((0,k$.callValidateCode)(e,t,l),()=>v(t),()=>y(t))}function y(g){let b=(0,at._)`${g}.errors`;r.assign(ko.default.vErrors,(0,at._)`${ko.default.vErrors} === null ? ${b} : ${ko.default.vErrors}.concat(${b})`),r.assign(ko.default.errors,(0,at._)`${ko.default.vErrors}.length`)}function v(g){var b;if(!i.opts.unevaluated)return;let x=(b=n?.validate)===null||b===void 0?void 0:b.evaluated;if(i.props!==!0)if(x&&!x.dynamicProps)x.props!==void 0&&(i.props=wl.mergeEvaluated.props(r,x.props,i.props));else{let I=r.var("props",(0,at._)`${g}.evaluated.props`);i.props=wl.mergeEvaluated.props(r,I,i.props,at.Name)}if(i.items!==!0)if(x&&!x.dynamicItems)x.items!==void 0&&(i.items=wl.mergeEvaluated.items(r,x.items,i.items));else{let I=r.var("items",(0,at._)`${g}.evaluated.items`);i.items=wl.mergeEvaluated.items(r,I,i.items,at.Name)}}}cn.callRef=kl;cn.default=qN});var E$=A(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});var VN=w$(),FN=I$(),BN=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",VN.default,FN.default];Km.default=BN});var T$=A(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0});var Sl=re(),Ar=Sl.operators,zl={maximum:{okStr:"<=",ok:Ar.LTE,fail:Ar.GT},minimum:{okStr:">=",ok:Ar.GTE,fail:Ar.LT},exclusiveMaximum:{okStr:"<",ok:Ar.LT,fail:Ar.GTE},exclusiveMinimum:{okStr:">",ok:Ar.GT,fail:Ar.LTE}},KN={message:({keyword:e,schemaCode:t})=>(0,Sl.str)`must be ${zl[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Sl._)`{comparison: ${zl[e].okStr}, limit: ${t}}`},HN={keyword:Object.keys(zl),type:"number",schemaType:"number",$data:!0,error:KN,code(e){let{keyword:t,data:n,schemaCode:o}=e;e.fail$data((0,Sl._)`${n} ${zl[t].fail} ${o} || isNaN(${n})`)}};Hm.default=HN});var P$=A(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});var $a=re(),JN={message:({schemaCode:e})=>(0,$a.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,$a._)`{multipleOf: ${e}}`},GN={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:JN,code(e){let{gen:t,data:n,schemaCode:o,it:r}=e,i=r.opts.multipleOfPrecision,a=t.let("res"),s=i?(0,$a._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:(0,$a._)`${a} !== parseInt(${a})`;e.fail$data((0,$a._)`(${o} === 0 || (${a} = ${n}/${o}, ${s}))`)}};Jm.default=GN});var O$=A(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0});function j$(e){let t=e.length,n=0,o=0,r;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),(r&64512)===56320&&o++);return n}Gm.default=j$;j$.code='require("ajv/dist/runtime/ucs2length").default'});var N$=A(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0});var un=re(),WN=fe(),XN=O$(),YN={message({keyword:e,schemaCode:t}){let n=e==="maxLength"?"more":"fewer";return(0,un.str)`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>(0,un._)`{limit: ${e}}`},QN={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:YN,code(e){let{keyword:t,data:n,schemaCode:o,it:r}=e,i=t==="maxLength"?un.operators.GT:un.operators.LT,a=r.opts.unicode===!1?(0,un._)`${n}.length`:(0,un._)`${(0,WN.useFunc)(e.gen,XN.default)}(${n})`;e.fail$data((0,un._)`${a} ${i} ${o}`)}};Wm.default=QN});var R$=A(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0});var e1=bt(),t1=fe(),So=re(),r1={message:({schemaCode:e})=>(0,So.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,So._)`{pattern: ${e}}`},n1={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:r1,code(e){let{gen:t,data:n,$data:o,schema:r,schemaCode:i,it:a}=e,s=a.opts.unicodeRegExp?"u":"";if(o){let{regExp:c}=a.opts.code,l=c.code==="new RegExp"?(0,So._)`new RegExp`:(0,t1.useFunc)(t,c),d=t.let("valid");t.try(()=>t.assign(d,(0,So._)`${l}(${i}, ${s}).test(${n})`),()=>t.assign(d,!1)),e.fail$data((0,So._)`!${d}`)}else{let c=(0,e1.usePattern)(e,r);e.fail$data((0,So._)`!${c}.test(${n})`)}}};Xm.default=n1});var A$=A(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0});var xa=re(),o1={message({keyword:e,schemaCode:t}){let n=e==="maxProperties"?"more":"fewer";return(0,xa.str)`must NOT have ${n} than ${t} properties`},params:({schemaCode:e})=>(0,xa._)`{limit: ${e}}`},i1={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:o1,code(e){let{keyword:t,data:n,schemaCode:o}=e,r=t==="maxProperties"?xa.operators.GT:xa.operators.LT;e.fail$data((0,xa._)`Object.keys(${n}).length ${r} ${o}`)}};Ym.default=i1});var D$=A(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0});var wa=bt(),ka=re(),a1=fe(),s1={message:({params:{missingProperty:e}})=>(0,ka.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,ka._)`{missingProperty: ${e}}`},c1={keyword:"required",type:"object",schemaType:"array",$data:!0,error:s1,code(e){let{gen:t,schema:n,schemaCode:o,data:r,$data:i,it:a}=e,{opts:s}=a;if(!i&&n.length===0)return;let c=n.length>=s.loopRequired;if(a.allErrors?l():d(),s.strictRequired){let v=e.parentSchema.properties,{definedProperties:g}=e.it;for(let b of n)if(v?.[b]===void 0&&!g.has(b)){let x=a.schemaEnv.baseId+a.errSchemaPath,I=`required property "${b}" is not defined at "${x}" (strictRequired)`;(0,a1.checkStrictMode)(a,I,a.opts.strictRequired)}}function l(){if(c||i)e.block$data(ka.nil,f);else for(let v of n)(0,wa.checkReportMissingProp)(e,v)}function d(){let v=t.let("missing");if(c||i){let g=t.let("valid",!0);e.block$data(g,()=>y(v,g)),e.ok(g)}else t.if((0,wa.checkMissingProp)(e,n,v)),(0,wa.reportMissingProp)(e,v),t.else()}function f(){t.forOf("prop",o,v=>{e.setParams({missingProperty:v}),t.if((0,wa.noPropertyInData)(t,r,v,s.ownProperties),()=>e.error())})}function y(v,g){e.setParams({missingProperty:v}),t.forOf(v,o,()=>{t.assign(g,(0,wa.propertyInData)(t,r,v,s.ownProperties)),t.if((0,ka.not)(g),()=>{e.error(),t.break()})},ka.nil)}}};Qm.default=c1});var C$=A(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0});var Sa=re(),u1={message({keyword:e,schemaCode:t}){let n=e==="maxItems"?"more":"fewer";return(0,Sa.str)`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>(0,Sa._)`{limit: ${e}}`},l1={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:u1,code(e){let{keyword:t,data:n,schemaCode:o}=e,r=t==="maxItems"?Sa.operators.GT:Sa.operators.LT;e.fail$data((0,Sa._)`${n}.length ${r} ${o}`)}};eh.default=l1});var Il=A(th=>{"use strict";Object.defineProperty(th,"__esModule",{value:!0});var Z$=Sm();Z$.code='require("ajv/dist/runtime/equal").default';th.default=Z$});var U$=A(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0});var rh=da(),Ue=re(),d1=fe(),f1=Il(),p1={message:({params:{i:e,j:t}})=>(0,Ue.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Ue._)`{i: ${e}, j: ${t}}`},m1={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:p1,code(e){let{gen:t,data:n,$data:o,schema:r,parentSchema:i,schemaCode:a,it:s}=e;if(!o&&!r)return;let c=t.let("valid"),l=i.items?(0,rh.getSchemaTypes)(i.items):[];e.block$data(c,d,(0,Ue._)`${a} === false`),e.ok(c);function d(){let g=t.let("i",(0,Ue._)`${n}.length`),b=t.let("j");e.setParams({i:g,j:b}),t.assign(c,!0),t.if((0,Ue._)`${g} > 1`,()=>(f()?y:v)(g,b))}function f(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}function y(g,b){let x=t.name("item"),I=(0,rh.checkDataTypes)(l,x,s.opts.strictNumbers,rh.DataType.Wrong),R=t.const("indices",(0,Ue._)`{}`);t.for((0,Ue._)`;${g}--;`,()=>{t.let(x,(0,Ue._)`${n}[${g}]`),t.if(I,(0,Ue._)`continue`),l.length>1&&t.if((0,Ue._)`typeof ${x} == "string"`,(0,Ue._)`${x} += "_"`),t.if((0,Ue._)`typeof ${R}[${x}] == "number"`,()=>{t.assign(b,(0,Ue._)`${R}[${x}]`),e.error(),t.assign(c,!1).break()}).code((0,Ue._)`${R}[${x}] = ${g}`)})}function v(g,b){let x=(0,d1.useFunc)(t,f1.default),I=t.name("outer");t.label(I).for((0,Ue._)`;${g}--;`,()=>t.for((0,Ue._)`${b} = ${g}; ${b}--;`,()=>t.if((0,Ue._)`${x}(${n}[${g}], ${n}[${b}])`,()=>{e.error(),t.assign(c,!1).break(I)})))}}};nh.default=m1});var M$=A(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});var oh=re(),h1=fe(),g1=Il(),v1={message:"must be equal to constant",params:({schemaCode:e})=>(0,oh._)`{allowedValue: ${e}}`},_1={keyword:"const",$data:!0,error:v1,code(e){let{gen:t,data:n,$data:o,schemaCode:r,schema:i}=e;o||i&&typeof i=="object"?e.fail$data((0,oh._)`!${(0,h1.useFunc)(t,g1.default)}(${n}, ${r})`):e.fail((0,oh._)`${i} !== ${n}`)}};ih.default=_1});var L$=A(ah=>{"use strict";Object.defineProperty(ah,"__esModule",{value:!0});var za=re(),y1=fe(),b1=Il(),$1={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,za._)`{allowedValues: ${e}}`},x1={keyword:"enum",schemaType:"array",$data:!0,error:$1,code(e){let{gen:t,data:n,$data:o,schema:r,schemaCode:i,it:a}=e;if(!o&&r.length===0)throw new Error("enum must have non-empty array");let s=r.length>=a.opts.loopEnum,c,l=()=>c??(c=(0,y1.useFunc)(t,b1.default)),d;if(s||o)d=t.let("valid"),e.block$data(d,f);else{if(!Array.isArray(r))throw new Error("ajv implementation error");let v=t.const("vSchema",i);d=(0,za.or)(...r.map((g,b)=>y(v,b)))}e.pass(d);function f(){t.assign(d,!1),t.forOf("v",i,v=>t.if((0,za._)`${l()}(${n}, ${v})`,()=>t.assign(d,!0).break()))}function y(v,g){let b=r[g];return typeof b=="object"&&b!==null?(0,za._)`${l()}(${n}, ${v}[${g}])`:(0,za._)`${n} === ${b}`}}};ah.default=x1});var q$=A(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0});var w1=T$(),k1=P$(),S1=N$(),z1=R$(),I1=A$(),E1=D$(),T1=C$(),P1=U$(),j1=M$(),O1=L$(),N1=[w1.default,k1.default,S1.default,z1.default,I1.default,E1.default,T1.default,P1.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},j1.default,O1.default];sh.default=N1});var uh=A(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});Ia.validateAdditionalItems=void 0;var ln=re(),ch=fe(),R1={message:({params:{len:e}})=>(0,ln.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,ln._)`{limit: ${e}}`},A1={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:R1,code(e){let{parentSchema:t,it:n}=e,{items:o}=t;if(!Array.isArray(o)){(0,ch.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}V$(e,o)}};function V$(e,t){let{gen:n,schema:o,data:r,keyword:i,it:a}=e;a.items=!0;let s=n.const("len",(0,ln._)`${r}.length`);if(o===!1)e.setParams({len:t.length}),e.pass((0,ln._)`${s} <= ${t.length}`);else if(typeof o=="object"&&!(0,ch.alwaysValidSchema)(a,o)){let l=n.var("valid",(0,ln._)`${s} <= ${t.length}`);n.if((0,ln.not)(l),()=>c(l)),e.ok(l)}function c(l){n.forRange("i",t.length,s,d=>{e.subschema({keyword:i,dataProp:d,dataPropType:ch.Type.Num},l),a.allErrors||n.if((0,ln.not)(l),()=>n.break())})}}Ia.validateAdditionalItems=V$;Ia.default=A1});var lh=A(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.validateTuple=void 0;var F$=re(),El=fe(),D1=bt(),C1={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return B$(e,"additionalItems",t);n.items=!0,!(0,El.alwaysValidSchema)(n,t)&&e.ok((0,D1.validateArray)(e))}};function B$(e,t,n=e.schema){let{gen:o,parentSchema:r,data:i,keyword:a,it:s}=e;d(r),s.opts.unevaluated&&n.length&&s.items!==!0&&(s.items=El.mergeEvaluated.items(o,n.length,s.items));let c=o.name("valid"),l=o.const("len",(0,F$._)`${i}.length`);n.forEach((f,y)=>{(0,El.alwaysValidSchema)(s,f)||(o.if((0,F$._)`${l} > ${y}`,()=>e.subschema({keyword:a,schemaProp:y,dataProp:y},c)),e.ok(c))});function d(f){let{opts:y,errSchemaPath:v}=s,g=n.length,b=g===f.minItems&&(g===f.maxItems||f[t]===!1);if(y.strictTuples&&!b){let x=`"${a}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${v}"`;(0,El.checkStrictMode)(s,x,y.strictTuples)}}}Ea.validateTuple=B$;Ea.default=C1});var K$=A(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});var Z1=lh(),U1={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,Z1.validateTuple)(e,"items")};dh.default=U1});var J$=A(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});var H$=re(),M1=fe(),L1=bt(),q1=uh(),V1={message:({params:{len:e}})=>(0,H$.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,H$._)`{limit: ${e}}`},F1={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:V1,code(e){let{schema:t,parentSchema:n,it:o}=e,{prefixItems:r}=n;o.items=!0,!(0,M1.alwaysValidSchema)(o,t)&&(r?(0,q1.validateAdditionalItems)(e,r):e.ok((0,L1.validateArray)(e)))}};fh.default=F1});var G$=A(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});var xt=re(),Tl=fe(),B1={message:({params:{min:e,max:t}})=>t===void 0?(0,xt.str)`must contain at least ${e} valid item(s)`:(0,xt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,xt._)`{minContains: ${e}}`:(0,xt._)`{minContains: ${e}, maxContains: ${t}}`},K1={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:B1,code(e){let{gen:t,schema:n,parentSchema:o,data:r,it:i}=e,a,s,{minContains:c,maxContains:l}=o;i.opts.next?(a=c===void 0?1:c,s=l):a=1;let d=t.const("len",(0,xt._)`${r}.length`);if(e.setParams({min:a,max:s}),s===void 0&&a===0){(0,Tl.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,Tl.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Tl.alwaysValidSchema)(i,n)){let b=(0,xt._)`${d} >= ${a}`;s!==void 0&&(b=(0,xt._)`${b} && ${d} <= ${s}`),e.pass(b);return}i.items=!0;let f=t.name("valid");s===void 0&&a===1?v(f,()=>t.if(f,()=>t.break())):a===0?(t.let(f,!0),s!==void 0&&t.if((0,xt._)`${r}.length > 0`,y)):(t.let(f,!1),y()),e.result(f,()=>e.reset());function y(){let b=t.name("_valid"),x=t.let("count",0);v(b,()=>t.if(b,()=>g(x)))}function v(b,x){t.forRange("i",0,d,I=>{e.subschema({keyword:"contains",dataProp:I,dataPropType:Tl.Type.Num,compositeRule:!0},b),x()})}function g(b){t.code((0,xt._)`${b}++`),s===void 0?t.if((0,xt._)`${b} >= ${a}`,()=>t.assign(f,!0).break()):(t.if((0,xt._)`${b} > ${s}`,()=>t.assign(f,!1).break()),a===1?t.assign(f,!0):t.if((0,xt._)`${b} >= ${a}`,()=>t.assign(f,!0)))}}};ph.default=K1});var Y$=A(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.validateSchemaDeps=Ft.validatePropertyDeps=Ft.error=void 0;var mh=re(),H1=fe(),Ta=bt();Ft.error={message:({params:{property:e,depsCount:t,deps:n}})=>{let o=t===1?"property":"properties";return(0,mh.str)`must have ${o} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:n,missingProperty:o}})=>(0,mh._)`{property: ${e},
|
|
8
|
+
|| ${a} === "boolean" || ${r} === null`).assign(s,(0,ee._)`[${r}]`)}}}function UO({gen:e,parentData:t,parentDataProperty:n},o){e.if((0,ee._)`${t} !== undefined`,()=>e.assign((0,ee._)`${t}[${n}]`,o))}function km(e,t,n,o=$o.Correct){let r=o===$o.Correct?ee.operators.EQ:ee.operators.NEQ,i;switch(e){case"null":return(0,ee._)`${t} ${r} null`;case"array":i=(0,ee._)`Array.isArray(${t})`;break;case"object":i=(0,ee._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a((0,ee._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return(0,ee._)`typeof ${t} ${r} ${e}`}return o===$o.Correct?i:(0,ee.not)(i);function a(s=ee.nil){return(0,ee.and)((0,ee._)`typeof ${t} == "number"`,s,n?(0,ee._)`isFinite(${t})`:ee.nil)}}Je.checkDataType=km;function Sm(e,t,n,o){if(e.length===1)return km(e[0],t,n,o);let r,i=(0,zb.toHash)(e);if(i.array&&i.object){let a=(0,ee._)`typeof ${t} != "object"`;r=i.null?a:(0,ee._)`!${t} || ${a}`,delete i.null,delete i.array,delete i.object}else r=ee.nil;i.number&&delete i.integer;for(let a in i)r=(0,ee.and)(r,km(a,t,n,o));return r}Je.checkDataTypes=Sm;var ZO={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,ee._)`{type: ${e}}`:(0,ee._)`{type: ${t}}`};function zm(e){let t=MO(e);(0,NO.reportError)(t,ZO)}Je.reportTypeError=zm;function MO(e){let{gen:t,data:n,schema:o}=e,r=(0,zb.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:n,schema:o.type,schemaCode:r,schemaValue:r,parentSchema:o,params:{},it:e}}});var Pb=A(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.assignDefaults=void 0;var xo=re(),LO=fe();function qO(e,t){let{properties:n,items:o}=e.schema;if(t==="object"&&n)for(let r in n)Tb(e,r,n[r].default);else t==="array"&&Array.isArray(o)&&o.forEach((r,i)=>Tb(e,i,r.default))}pl.assignDefaults=qO;function Tb(e,t,n){let{gen:o,compositeRule:r,data:i,opts:a}=e;if(n===void 0)return;let s=(0,xo._)`${i}${(0,xo.getProperty)(t)}`;if(r){(0,LO.checkStrictMode)(e,`default is ignored for: ${s}`);return}let c=(0,xo._)`${s} === undefined`;a.useDefaults==="empty"&&(c=(0,xo._)`${c} || ${s} === null || ${s} === ""`),o.if(c,(0,xo._)`${s} = ${(0,xo.stringify)(n)}`)}});var $t=A(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.validateUnion=_e.validateArray=_e.usePattern=_e.callValidateCode=_e.schemaProperties=_e.allSchemaProperties=_e.noPropertyInData=_e.propertyInData=_e.isOwnProperty=_e.hasPropFunc=_e.reportMissingProp=_e.checkMissingProp=_e.checkReportMissingProp=void 0;var Se=re(),Im=fe(),Nr=ir(),VO=fe();function FO(e,t){let{gen:n,data:o,it:r}=e;n.if(Tm(n,o,t,r.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Se._)`${t}`},!0),e.error()})}_e.checkReportMissingProp=FO;function BO({gen:e,data:t,it:{opts:n}},o,r){return(0,Se.or)(...o.map(i=>(0,Se.and)(Tm(e,t,i,n.ownProperties),(0,Se._)`${r} = ${i}`)))}_e.checkMissingProp=BO;function KO(e,t){e.setParams({missingProperty:t},!0),e.error()}_e.reportMissingProp=KO;function Ob(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Se._)`Object.prototype.hasOwnProperty`})}_e.hasPropFunc=Ob;function Em(e,t,n){return(0,Se._)`${Ob(e)}.call(${t}, ${n})`}_e.isOwnProperty=Em;function HO(e,t,n,o){let r=(0,Se._)`${t}${(0,Se.getProperty)(n)} !== undefined`;return o?(0,Se._)`${r} && ${Em(e,t,n)}`:r}_e.propertyInData=HO;function Tm(e,t,n,o){let r=(0,Se._)`${t}${(0,Se.getProperty)(n)} === undefined`;return o?(0,Se.or)(r,(0,Se.not)(Em(e,t,n))):r}_e.noPropertyInData=Tm;function jb(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}_e.allSchemaProperties=jb;function JO(e,t){return jb(t).filter(n=>!(0,Im.alwaysValidSchema)(e,t[n]))}_e.schemaProperties=JO;function GO({schemaCode:e,data:t,it:{gen:n,topSchemaRef:o,schemaPath:r,errorPath:i},it:a},s,c,l){let d=l?(0,Se._)`${e}, ${t}, ${o}${r}`:t,f=[[Nr.default.instancePath,(0,Se.strConcat)(Nr.default.instancePath,i)],[Nr.default.parentData,a.parentData],[Nr.default.parentDataProperty,a.parentDataProperty],[Nr.default.rootData,Nr.default.rootData]];a.opts.dynamicRef&&f.push([Nr.default.dynamicAnchors,Nr.default.dynamicAnchors]);let _=(0,Se._)`${d}, ${n.object(...f)}`;return c!==Se.nil?(0,Se._)`${s}.call(${c}, ${_})`:(0,Se._)`${s}(${_})`}_e.callValidateCode=GO;var WO=(0,Se._)`new RegExp`;function XO({gen:e,it:{opts:t}},n){let o=t.unicodeRegExp?"u":"",{regExp:r}=t.code,i=r(n,o);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Se._)`${r.code==="new RegExp"?WO:(0,VO.useFunc)(e,r)}(${n}, ${o})`})}_e.usePattern=XO;function YO(e){let{gen:t,data:n,keyword:o,it:r}=e,i=t.name("valid");if(r.allErrors){let s=t.let("valid",!0);return a(()=>t.assign(s,!1)),s}return t.var(i,!0),a(()=>t.break()),i;function a(s){let c=t.const("len",(0,Se._)`${n}.length`);t.forRange("i",0,c,l=>{e.subschema({keyword:o,dataProp:l,dataPropType:Im.Type.Num},i),t.if((0,Se.not)(i),s)})}}_e.validateArray=YO;function QO(e){let{gen:t,schema:n,keyword:o,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(c=>(0,Im.alwaysValidSchema)(r,c))&&!r.opts.unevaluated)return;let a=t.let("valid",!1),s=t.name("_valid");t.block(()=>n.forEach((c,l)=>{let d=e.subschema({keyword:o,schemaProp:l,compositeRule:!0},s);t.assign(a,(0,Se._)`${a} || ${s}`),e.mergeValidEvaluated(d,s)||t.if((0,Se.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}_e.validateUnion=QO});var Ab=A(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.validateKeywordUsage=Vt.validSchemaType=Vt.funcKeywordCode=Vt.macroKeywordCode=void 0;var Ye=re(),cn=ir(),ej=$t(),tj=fa();function rj(e,t){let{gen:n,keyword:o,schema:r,parentSchema:i,it:a}=e,s=t.macro.call(a.self,r,i,a),c=Rb(n,o,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let l=n.name("valid");e.subschema({schema:s,schemaPath:Ye.nil,errSchemaPath:`${a.errSchemaPath}/${o}`,topSchemaRef:c,compositeRule:!0},l),e.pass(l,()=>e.error(!0))}Vt.macroKeywordCode=rj;function nj(e,t){var n;let{gen:o,keyword:r,schema:i,parentSchema:a,$data:s,it:c}=e;ij(c,t);let l=!s&&t.compile?t.compile.call(c.self,i,a,c):t.validate,d=Rb(o,r,l),f=o.let("valid");e.block$data(f,_),e.ok((n=t.valid)!==null&&n!==void 0?n:f);function _(){if(t.errors===!1)b(),t.modifying&&Nb(e),x(()=>e.error());else{let I=t.async?v():g();t.modifying&&Nb(e),x(()=>oj(e,I))}}function v(){let I=o.let("ruleErrs",null);return o.try(()=>b((0,Ye._)`await `),R=>o.assign(f,!1).if((0,Ye._)`${R} instanceof ${c.ValidationError}`,()=>o.assign(I,(0,Ye._)`${R}.errors`),()=>o.throw(R))),I}function g(){let I=(0,Ye._)`${d}.errors`;return o.assign(I,null),b(Ye.nil),I}function b(I=t.async?(0,Ye._)`await `:Ye.nil){let R=c.opts.passContext?cn.default.this:cn.default.self,P=!("compile"in t&&!s||t.schema===!1);o.assign(f,(0,Ye._)`${I}${(0,ej.callValidateCode)(e,d,R,P)}`,t.modifying)}function x(I){var R;o.if((0,Ye.not)((R=t.valid)!==null&&R!==void 0?R:f),I)}}Vt.funcKeywordCode=nj;function Nb(e){let{gen:t,data:n,it:o}=e;t.if(o.parentData,()=>t.assign(n,(0,Ye._)`${o.parentData}[${o.parentDataProperty}]`))}function oj(e,t){let{gen:n}=e;n.if((0,Ye._)`Array.isArray(${t})`,()=>{n.assign(cn.default.vErrors,(0,Ye._)`${cn.default.vErrors} === null ? ${t} : ${cn.default.vErrors}.concat(${t})`).assign(cn.default.errors,(0,Ye._)`${cn.default.vErrors}.length`),(0,tj.extendErrors)(e)},()=>e.error())}function ij({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function Rb(e,t,n){if(n===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,Ye.stringify)(n)})}function aj(e,t,n=!1){return!t.length||t.some(o=>o==="array"?Array.isArray(e):o==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==o||n&&typeof e>"u")}Vt.validSchemaType=aj;function sj({schema:e,opts:t,self:n,errSchemaPath:o},r,i){if(Array.isArray(r.keyword)?!r.keyword.includes(i):r.keyword!==i)throw new Error("ajv implementation error");let a=r.dependencies;if(a?.some(s=>!Object.prototype.hasOwnProperty.call(e,s)))throw new Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(r.validateSchema&&!r.validateSchema(e[i])){let c=`keyword "${i}" value is invalid at path "${o}": `+n.errorsText(r.validateSchema.errors);if(t.validateSchema==="log")n.logger.error(c);else throw new Error(c)}}Vt.validateKeywordUsage=sj});var Cb=A(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.extendSubschemaMode=Rr.extendSubschemaData=Rr.getSubschema=void 0;var Ft=re(),Db=fe();function cj(e,{keyword:t,schemaProp:n,schema:o,schemaPath:r,errSchemaPath:i,topSchemaRef:a}){if(t!==void 0&&o!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){let s=e.schema[t];return n===void 0?{schema:s,schemaPath:(0,Ft._)`${e.schemaPath}${(0,Ft.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[n],schemaPath:(0,Ft._)`${e.schemaPath}${(0,Ft.getProperty)(t)}${(0,Ft.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,Db.escapeFragment)(n)}`}}if(o!==void 0){if(r===void 0||i===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:r,topSchemaRef:a,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Rr.getSubschema=cj;function uj(e,t,{dataProp:n,dataPropType:o,data:r,dataTypes:i,propertyName:a}){if(r!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=t;if(n!==void 0){let{errorPath:l,dataPathArr:d,opts:f}=t,_=s.let("data",(0,Ft._)`${t.data}${(0,Ft.getProperty)(n)}`,!0);c(_),e.errorPath=(0,Ft.str)`${l}${(0,Db.getErrorPath)(n,o,f.jsPropertySyntax)}`,e.parentDataProperty=(0,Ft._)`${n}`,e.dataPathArr=[...d,e.parentDataProperty]}if(r!==void 0){let l=r instanceof Ft.Name?r:s.let("data",r,!0);c(l),a!==void 0&&(e.propertyName=a)}i&&(e.dataTypes=i);function c(l){e.data=l,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,l]}}Rr.extendSubschemaData=uj;function lj(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:o,createErrors:r,allErrors:i}){o!==void 0&&(e.compositeRule=o),r!==void 0&&(e.createErrors=r),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=n}Rr.extendSubschemaMode=lj});var Pm=A((b2,Ub)=>{"use strict";Ub.exports=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var o,r,i;if(Array.isArray(t)){if(o=t.length,o!=n.length)return!1;for(r=o;r--!==0;)if(!e(t[r],n[r]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(n).length)return!1;for(r=o;r--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[r]))return!1;for(r=o;r--!==0;){var a=i[r];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}});var Mb=A(($2,Zb)=>{"use strict";var Ar=Zb.exports=function(e,t,n){typeof t=="function"&&(n=t,t={}),n=t.cb||n;var o=typeof n=="function"?n:n.pre||function(){},r=n.post||function(){};ml(t,o,r,e,"",e)};Ar.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Ar.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Ar.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Ar.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function ml(e,t,n,o,r,i,a,s,c,l){if(o&&typeof o=="object"&&!Array.isArray(o)){t(o,r,i,a,s,c,l);for(var d in o){var f=o[d];if(Array.isArray(f)){if(d in Ar.arrayKeywords)for(var _=0;_<f.length;_++)ml(e,t,n,f[_],r+"/"+d+"/"+_,i,r,d,o,_)}else if(d in Ar.propsKeywords){if(f&&typeof f=="object")for(var v in f)ml(e,t,n,f[v],r+"/"+d+"/"+dj(v),i,r,d,o,v)}else(d in Ar.keywords||e.allKeys&&!(d in Ar.skipKeywords))&&ml(e,t,n,f,r+"/"+d,i,r,d,o)}n(o,r,i,a,s,c,l)}}function dj(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var ma=A(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.getSchemaRefs=at.resolveUrl=at.normalizeId=at._getFullPath=at.getFullPath=at.inlineRef=void 0;var fj=fe(),pj=Pm(),mj=Mb(),hj=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function gj(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Om(e):t?Lb(e)<=t:!1}at.inlineRef=gj;var vj=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Om(e){for(let t in e){if(vj.has(t))return!0;let n=e[t];if(Array.isArray(n)&&n.some(Om)||typeof n=="object"&&Om(n))return!0}return!1}function Lb(e){let t=0;for(let n in e){if(n==="$ref")return 1/0;if(t++,!hj.has(n)&&(typeof e[n]=="object"&&(0,fj.eachItem)(e[n],o=>t+=Lb(o)),t===1/0))return 1/0}return t}function qb(e,t="",n){n!==!1&&(t=wo(t));let o=e.parse(t);return Vb(e,o)}at.getFullPath=qb;function Vb(e,t){return e.serialize(t).split("#")[0]+"#"}at._getFullPath=Vb;var _j=/#\/?$/;function wo(e){return e?e.replace(_j,""):""}at.normalizeId=wo;function yj(e,t,n){return n=wo(n),e.resolve(t,n)}at.resolveUrl=yj;var bj=/^[a-z_][-a-z0-9._]*$/i;function $j(e,t){if(typeof e=="boolean")return{};let{schemaId:n,uriResolver:o}=this.opts,r=wo(e[n]||t),i={"":r},a=qb(o,r,!1),s={},c=new Set;return mj(e,{allKeys:!0},(f,_,v,g)=>{if(g===void 0)return;let b=a+_,x=i[g];typeof f[n]=="string"&&(x=I.call(this,f[n])),R.call(this,f.$anchor),R.call(this,f.$dynamicAnchor),i[_]=x;function I(P){let M=this.opts.uriResolver.resolve;if(P=wo(x?M(x,P):P),c.has(P))throw d(P);c.add(P);let V=this.refs[P];return typeof V=="string"&&(V=this.refs[V]),typeof V=="object"?l(f,V.schema,P):P!==wo(b)&&(P[0]==="#"?(l(f,s[P],P),s[P]=f):this.refs[P]=b),P}function R(P){if(typeof P=="string"){if(!bj.test(P))throw new Error(`invalid anchor "${P}"`);I.call(this,`#${P}`)}}}),s;function l(f,_,v){if(_!==void 0&&!pj(f,_))throw d(v)}function d(f){return new Error(`reference "${f}" resolves to more than one schema`)}}at.getSchemaRefs=$j});var va=A(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.getData=Dr.KeywordCxt=Dr.validateFunctionCode=void 0;var Jb=wb(),Fb=pa(),Nm=wm(),hl=pa(),xj=Pb(),ga=Ab(),jm=Cb(),K=re(),X=ir(),wj=ma(),ar=fe(),ha=fa();function kj(e){if(Xb(e)&&(Yb(e),Wb(e))){Ij(e);return}Gb(e,()=>(0,Jb.topBoolOrEmptySchema)(e))}Dr.validateFunctionCode=kj;function Gb({gen:e,validateName:t,schema:n,schemaEnv:o,opts:r},i){r.code.es5?e.func(t,(0,K._)`${X.default.data}, ${X.default.valCxt}`,o.$async,()=>{e.code((0,K._)`"use strict"; ${Bb(n,r)}`),zj(e,r),e.code(i)}):e.func(t,(0,K._)`${X.default.data}, ${Sj(r)}`,o.$async,()=>e.code(Bb(n,r)).code(i))}function Sj(e){return(0,K._)`{${X.default.instancePath}="", ${X.default.parentData}, ${X.default.parentDataProperty}, ${X.default.rootData}=${X.default.data}${e.dynamicRef?(0,K._)`, ${X.default.dynamicAnchors}={}`:K.nil}}={}`}function zj(e,t){e.if(X.default.valCxt,()=>{e.var(X.default.instancePath,(0,K._)`${X.default.valCxt}.${X.default.instancePath}`),e.var(X.default.parentData,(0,K._)`${X.default.valCxt}.${X.default.parentData}`),e.var(X.default.parentDataProperty,(0,K._)`${X.default.valCxt}.${X.default.parentDataProperty}`),e.var(X.default.rootData,(0,K._)`${X.default.valCxt}.${X.default.rootData}`),t.dynamicRef&&e.var(X.default.dynamicAnchors,(0,K._)`${X.default.valCxt}.${X.default.dynamicAnchors}`)},()=>{e.var(X.default.instancePath,(0,K._)`""`),e.var(X.default.parentData,(0,K._)`undefined`),e.var(X.default.parentDataProperty,(0,K._)`undefined`),e.var(X.default.rootData,X.default.data),t.dynamicRef&&e.var(X.default.dynamicAnchors,(0,K._)`{}`)})}function Ij(e){let{schema:t,opts:n,gen:o}=e;Gb(e,()=>{n.$comment&&t.$comment&&e$(e),jj(e),o.let(X.default.vErrors,null),o.let(X.default.errors,0),n.unevaluated&&Ej(e),Qb(e),Aj(e)})}function Ej(e){let{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",(0,K._)`${n}.evaluated`),t.if((0,K._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,K._)`${e.evaluated}.props`,(0,K._)`undefined`)),t.if((0,K._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,K._)`${e.evaluated}.items`,(0,K._)`undefined`))}function Bb(e,t){let n=typeof e=="object"&&e[t.schemaId];return n&&(t.code.source||t.code.process)?(0,K._)`/*# sourceURL=${n} */`:K.nil}function Tj(e,t){if(Xb(e)&&(Yb(e),Wb(e))){Pj(e,t);return}(0,Jb.boolOrEmptySchema)(e,t)}function Wb({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let n in e)if(t.RULES.all[n])return!0;return!1}function Xb(e){return typeof e.schema!="boolean"}function Pj(e,t){let{schema:n,gen:o,opts:r}=e;r.$comment&&n.$comment&&e$(e),Nj(e),Rj(e);let i=o.const("_errs",X.default.errors);Qb(e,i),o.var(t,(0,K._)`${i} === ${X.default.errors}`)}function Yb(e){(0,ar.checkUnknownRules)(e),Oj(e)}function Qb(e,t){if(e.opts.jtd)return Kb(e,[],!1,t);let n=(0,Fb.getSchemaTypes)(e.schema),o=(0,Fb.coerceAndCheckDataType)(e,n);Kb(e,n,!o,t)}function Oj(e){let{schema:t,errSchemaPath:n,opts:o,self:r}=e;t.$ref&&o.ignoreKeywordsWithRef&&(0,ar.schemaHasRulesButRef)(t,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function jj(e){let{schema:t,opts:n}=e;t.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,ar.checkStrictMode)(e,"default is ignored in the schema root")}function Nj(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,wj.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function Rj(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function e$({gen:e,schemaEnv:t,schema:n,errSchemaPath:o,opts:r}){let i=n.$comment;if(r.$comment===!0)e.code((0,K._)`${X.default.self}.logger.log(${i})`);else if(typeof r.$comment=="function"){let a=(0,K.str)`${o}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code((0,K._)`${X.default.self}.opts.$comment(${i}, ${a}, ${s}.schema)`)}}function Aj(e){let{gen:t,schemaEnv:n,validateName:o,ValidationError:r,opts:i}=e;n.$async?t.if((0,K._)`${X.default.errors} === 0`,()=>t.return(X.default.data),()=>t.throw((0,K._)`new ${r}(${X.default.vErrors})`)):(t.assign((0,K._)`${o}.errors`,X.default.vErrors),i.unevaluated&&Dj(e),t.return((0,K._)`${X.default.errors} === 0`))}function Dj({gen:e,evaluated:t,props:n,items:o}){n instanceof K.Name&&e.assign((0,K._)`${t}.props`,n),o instanceof K.Name&&e.assign((0,K._)`${t}.items`,o)}function Kb(e,t,n,o){let{gen:r,schema:i,data:a,allErrors:s,opts:c,self:l}=e,{RULES:d}=l;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,ar.schemaHasRulesButRef)(i,d))){r.block(()=>r$(e,"$ref",d.all.$ref.definition));return}c.jtd||Cj(e,t),r.block(()=>{for(let _ of d.rules)f(_);f(d.post)});function f(_){(0,Nm.shouldUseGroup)(i,_)&&(_.type?(r.if((0,hl.checkDataType)(_.type,a,c.strictNumbers)),Hb(e,_),t.length===1&&t[0]===_.type&&n&&(r.else(),(0,hl.reportTypeError)(e)),r.endIf()):Hb(e,_),s||r.if((0,K._)`${X.default.errors} === ${o||0}`))}}function Hb(e,t){let{gen:n,schema:o,opts:{useDefaults:r}}=e;r&&(0,xj.assignDefaults)(e,t.type),n.block(()=>{for(let i of t.rules)(0,Nm.shouldUseRule)(o,i)&&r$(e,i.keyword,i.definition,t.type)})}function Cj(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(Uj(e,t),e.opts.allowUnionTypes||Zj(e,t),Mj(e,e.dataTypes))}function Uj(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(n=>{t$(e.dataTypes,n)||Rm(e,`type "${n}" not allowed by context "${e.dataTypes.join(",")}"`)}),qj(e,t)}}function Zj(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Rm(e,"use allowUnionTypes to allow union type keyword")}function Mj(e,t){let n=e.self.RULES.all;for(let o in n){let r=n[o];if(typeof r=="object"&&(0,Nm.shouldUseRule)(e.schema,r)){let{type:i}=r.definition;i.length&&!i.some(a=>Lj(t,a))&&Rm(e,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function Lj(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function t$(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function qj(e,t){let n=[];for(let o of e.dataTypes)t$(t,o)?n.push(o):t.includes("integer")&&o==="number"&&n.push("integer");e.dataTypes=n}function Rm(e,t){let n=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${n}" (strictTypes)`,(0,ar.checkStrictMode)(e,t,e.opts.strictTypes)}var gl=class{constructor(t,n,o){if((0,ga.validateKeywordUsage)(t,n,o),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=o,this.data=t.data,this.schema=t.schema[o],this.$data=n.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,ar.schemaRefOrVal)(t,this.schema,o,this.$data),this.schemaType=n.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=n,this.$data)this.schemaCode=t.gen.const("vSchema",n$(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,ga.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${o} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=t.gen.const("_errs",X.default.errors))}result(t,n,o){this.failResult((0,K.not)(t),n,o)}failResult(t,n,o){this.gen.if(t),o?o():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,n){this.failResult((0,K.not)(t),void 0,n)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);let{schemaCode:n}=this;this.fail((0,K._)`${n} !== undefined && (${(0,K.or)(this.invalid$data(),t)})`)}error(t,n,o){if(n){this.setParams(n),this._error(t,o),this.setParams({});return}this._error(t,o)}_error(t,n){(t?ha.reportExtraError:ha.reportError)(this,this.def.error,n)}$dataError(){(0,ha.reportError)(this,this.def.$dataError||ha.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,ha.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,n){n?Object.assign(this.params,t):this.params=t}block$data(t,n,o=K.nil){this.gen.block(()=>{this.check$data(t,o),n()})}check$data(t=K.nil,n=K.nil){if(!this.$data)return;let{gen:o,schemaCode:r,schemaType:i,def:a}=this;o.if((0,K.or)((0,K._)`${r} === undefined`,n)),t!==K.nil&&o.assign(t,!0),(i.length||a.validateSchema)&&(o.elseIf(this.invalid$data()),this.$dataError(),t!==K.nil&&o.assign(t,!1)),o.else()}invalid$data(){let{gen:t,schemaCode:n,schemaType:o,def:r,it:i}=this;return(0,K.or)(a(),s());function a(){if(o.length){if(!(n instanceof K.Name))throw new Error("ajv implementation error");let c=Array.isArray(o)?o:[o];return(0,K._)`${(0,hl.checkDataTypes)(c,n,i.opts.strictNumbers,hl.DataType.Wrong)}`}return K.nil}function s(){if(r.validateSchema){let c=t.scopeValue("validate$data",{ref:r.validateSchema});return(0,K._)`!${c}(${n})`}return K.nil}}subschema(t,n){let o=(0,jm.getSubschema)(this.it,t);(0,jm.extendSubschemaData)(o,this.it,t),(0,jm.extendSubschemaMode)(o,t);let r={...this.it,...o,items:void 0,props:void 0};return Tj(r,n),r}mergeEvaluated(t,n){let{it:o,gen:r}=this;o.opts.unevaluated&&(o.props!==!0&&t.props!==void 0&&(o.props=ar.mergeEvaluated.props(r,t.props,o.props,n)),o.items!==!0&&t.items!==void 0&&(o.items=ar.mergeEvaluated.items(r,t.items,o.items,n)))}mergeValidEvaluated(t,n){let{it:o,gen:r}=this;if(o.opts.unevaluated&&(o.props!==!0||o.items!==!0))return r.if(n,()=>this.mergeEvaluated(t,K.Name)),!0}};Dr.KeywordCxt=gl;function r$(e,t,n,o){let r=new gl(e,n,t);"code"in n?n.code(r,o):r.$data&&n.validate?(0,ga.funcKeywordCode)(r,n):"macro"in n?(0,ga.macroKeywordCode)(r,n):(n.compile||n.validate)&&(0,ga.funcKeywordCode)(r,n)}var Vj=/^\/(?:[^~]|~0|~1)*$/,Fj=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function n$(e,{dataLevel:t,dataNames:n,dataPathArr:o}){let r,i;if(e==="")return X.default.rootData;if(e[0]==="/"){if(!Vj.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);r=e,i=X.default.rootData}else{let l=Fj.exec(e);if(!l)throw new Error(`Invalid JSON-pointer: ${e}`);let d=+l[1];if(r=l[2],r==="#"){if(d>=t)throw new Error(c("property/index",d));return o[t-d]}if(d>t)throw new Error(c("data",d));if(i=n[t-d],!r)return i}let a=i,s=r.split("/");for(let l of s)l&&(i=(0,K._)`${i}${(0,K.getProperty)((0,ar.unescapeJsonPointer)(l))}`,a=(0,K._)`${a} && ${i}`);return a;function c(l,d){return`Cannot access ${l} ${d} levels up, current level is ${t}`}}Dr.getData=n$});var vl=A(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});var Am=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Dm.default=Am});var _a=A(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0});var Cm=ma(),Um=class extends Error{constructor(t,n,o,r){super(r||`can't resolve reference ${o} from id ${n}`),this.missingRef=(0,Cm.resolveUrl)(t,n,o),this.missingSchema=(0,Cm.normalizeId)((0,Cm.getFullPath)(t,this.missingRef))}};Zm.default=Um});var yl=A(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.resolveSchema=xt.getCompilingSchema=xt.resolveRef=xt.compileSchema=xt.SchemaEnv=void 0;var Nt=re(),Bj=vl(),un=ir(),Rt=ma(),o$=fe(),Kj=va(),ko=class{constructor(t){var n;this.refs={},this.dynamicAnchors={};let o;typeof t.schema=="object"&&(o=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(n=t.baseId)!==null&&n!==void 0?n:(0,Rt.normalizeId)(o?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=o?.$async,this.refs={}}};xt.SchemaEnv=ko;function Lm(e){let t=i$.call(this,e);if(t)return t;let n=(0,Rt.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:o,lines:r}=this.opts.code,{ownProperties:i}=this.opts,a=new Nt.CodeGen(this.scope,{es5:o,lines:r,ownProperties:i}),s;e.$async&&(s=a.scopeValue("Error",{ref:Bj.default,code:(0,Nt._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let l={gen:a,allErrors:this.opts.allErrors,data:un.default.data,parentData:un.default.parentData,parentDataProperty:un.default.parentDataProperty,dataNames:[un.default.data],dataPathArr:[Nt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Nt.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:Nt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Nt._)`""`,opts:this.opts,self:this},d;try{this._compilations.add(e),(0,Kj.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);let f=a.toString();d=`${a.scopeRefs(un.default.scope)}return ${f}`,this.opts.code.process&&(d=this.opts.code.process(d,e));let v=new Function(`${un.default.self}`,`${un.default.scope}`,d)(this,this.scope.get());if(this.scope.value(c,{ref:v}),v.errors=null,v.schema=e.schema,v.schemaEnv=e,e.$async&&(v.$async=!0),this.opts.code.source===!0&&(v.source={validateName:c,validateCode:f,scopeValues:a._values}),this.opts.unevaluated){let{props:g,items:b}=l;v.evaluated={props:g instanceof Nt.Name?void 0:g,items:b instanceof Nt.Name?void 0:b,dynamicProps:g instanceof Nt.Name,dynamicItems:b instanceof Nt.Name},v.source&&(v.source.evaluated=(0,Nt.stringify)(v.evaluated))}return e.validate=v,e}catch(f){throw delete e.validate,delete e.validateName,d&&this.logger.error("Error compiling schema, function code:",d),f}finally{this._compilations.delete(e)}}xt.compileSchema=Lm;function Hj(e,t,n){var o;n=(0,Rt.resolveUrl)(this.opts.uriResolver,t,n);let r=e.refs[n];if(r)return r;let i=Wj.call(this,e,n);if(i===void 0){let a=(o=e.localRefs)===null||o===void 0?void 0:o[n],{schemaId:s}=this.opts;a&&(i=new ko({schema:a,schemaId:s,root:e,baseId:t}))}if(i!==void 0)return e.refs[n]=Jj.call(this,i)}xt.resolveRef=Hj;function Jj(e){return(0,Rt.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Lm.call(this,e)}function i$(e){for(let t of this._compilations)if(Gj(t,e))return t}xt.getCompilingSchema=i$;function Gj(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Wj(e,t){let n;for(;typeof(n=this.refs[t])=="string";)t=n;return n||this.schemas[t]||_l.call(this,e,t)}function _l(e,t){let n=this.opts.uriResolver.parse(t),o=(0,Rt._getFullPath)(this.opts.uriResolver,n),r=(0,Rt.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===r)return Mm.call(this,n,e);let i=(0,Rt.normalizeId)(o),a=this.refs[i]||this.schemas[i];if(typeof a=="string"){let s=_l.call(this,e,a);return typeof s?.schema!="object"?void 0:Mm.call(this,n,s)}if(typeof a?.schema=="object"){if(a.validate||Lm.call(this,a),i===(0,Rt.normalizeId)(t)){let{schema:s}=a,{schemaId:c}=this.opts,l=s[c];return l&&(r=(0,Rt.resolveUrl)(this.opts.uriResolver,r,l)),new ko({schema:s,schemaId:c,root:e,baseId:r})}return Mm.call(this,n,a)}}xt.resolveSchema=_l;var Xj=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Mm(e,{baseId:t,schema:n,root:o}){var r;if(((r=e.fragment)===null||r===void 0?void 0:r[0])!=="/")return;for(let s of e.fragment.slice(1).split("/")){if(typeof n=="boolean")return;let c=n[(0,o$.unescapeFragment)(s)];if(c===void 0)return;n=c;let l=typeof n=="object"&&n[this.opts.schemaId];!Xj.has(s)&&l&&(t=(0,Rt.resolveUrl)(this.opts.uriResolver,t,l))}let i;if(typeof n!="boolean"&&n.$ref&&!(0,o$.schemaHasRulesButRef)(n,this.RULES)){let s=(0,Rt.resolveUrl)(this.opts.uriResolver,t,n.$ref);i=_l.call(this,o,s)}let{schemaId:a}=this.opts;if(i=i||new ko({schema:n,schemaId:a,root:o,baseId:t}),i.schema!==i.root.schema)return i}});var a$=A((I2,Yj)=>{Yj.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var Vm=A((E2,l$)=>{"use strict";var Qj=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),c$=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function qm(e){let t="",n=0,o=0;for(o=0;o<e.length;o++)if(n=e[o].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[o];break}for(o+=1;o<e.length;o++){if(n=e[o].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";t+=e[o]}return t}var eN=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s$(e){return e.length=0,!0}function tN(e,t,n){if(e.length){let o=qm(e);if(o!=="")t.push(o);else return n.error=!0,!1;e.length=0}return!0}function rN(e){let t=0,n={error:!1,address:"",zone:""},o=[],r=[],i=!1,a=!1,s=tN;for(let c=0;c<e.length;c++){let l=e[c];if(!(l==="["||l==="]"))if(l===":"){if(i===!0&&(a=!0),!s(r,o,n))break;if(++t>7){n.error=!0;break}c>0&&e[c-1]===":"&&(i=!0),o.push(":");continue}else if(l==="%"){if(!s(r,o,n))break;s=s$}else{r.push(l);continue}}return r.length&&(s===s$?n.zone=r.join(""):a?o.push(r.join("")):o.push(qm(r))),n.address=o.join(""),n}function u$(e){if(nN(e,":")<2)return{host:e,isIPV6:!1};let t=rN(e);if(t.error)return{host:e,isIPV6:!1};{let n=t.address,o=t.address;return t.zone&&(n+="%"+t.zone,o+="%25"+t.zone),{host:n,isIPV6:!0,escapedHost:o}}}function nN(e,t){let n=0;for(let o=0;o<e.length;o++)e[o]===t&&n++;return n}function oN(e){let t=e,n=[],o=-1,r=0;for(;r=t.length;){if(r===1){if(t===".")break;if(t==="/"){n.push("/");break}else{n.push(t);break}}else if(r===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){n.push("/");break}}else if(r===3&&t==="/.."){n.length!==0&&n.pop(),n.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),n.length!==0&&n.pop();continue}}if((o=t.indexOf("/",1))===-1){n.push(t);break}else n.push(t.slice(0,o)),t=t.slice(o)}return n.join("")}function iN(e,t){let n=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=n(e.scheme)),e.userinfo!==void 0&&(e.userinfo=n(e.userinfo)),e.host!==void 0&&(e.host=n(e.host)),e.path!==void 0&&(e.path=n(e.path)),e.query!==void 0&&(e.query=n(e.query)),e.fragment!==void 0&&(e.fragment=n(e.fragment)),e}function aN(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let n=unescape(e.host);if(!c$(n)){let o=u$(n);o.isIPV6===!0?n=`[${o.escapedHost}]`:n=e.host}t.push(n)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}l$.exports={nonSimpleDomain:eN,recomposeAuthority:aN,normalizeComponentEncoding:iN,removeDotSegments:oN,isIPv4:c$,isUUID:Qj,normalizeIPv6:u$,stringArrayToHexStripped:qm}});var h$=A((T2,m$)=>{"use strict";var{isUUID:sN}=Vm(),cN=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,uN=["http","https","ws","wss","urn","urn:uuid"];function lN(e){return uN.indexOf(e)!==-1}function Fm(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function d$(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function f$(e){let t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function dN(e){return e.secure=Fm(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function fN(e){if((e.port===(Fm(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,n]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=n,e.resourceName=void 0}return e.fragment=void 0,e}function pN(e,t){if(!e.path)return e.error="URN can not be parsed",e;let n=e.path.match(cN);if(n){let o=t.scheme||e.scheme||"urn";e.nid=n[1].toLowerCase(),e.nss=n[2];let r=`${o}:${t.nid||e.nid}`,i=Bm(r);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function mN(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let n=t.scheme||e.scheme||"urn",o=e.nid.toLowerCase(),r=`${n}:${t.nid||o}`,i=Bm(r);i&&(e=i.serialize(e,t));let a=e,s=e.nss;return a.path=`${o||t.nid}:${s}`,t.skipEscape=!0,a}function hN(e,t){let n=e;return n.uuid=n.nss,n.nss=void 0,!t.tolerant&&(!n.uuid||!sN(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function gN(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var p$={scheme:"http",domainHost:!0,parse:d$,serialize:f$},vN={scheme:"https",domainHost:p$.domainHost,parse:d$,serialize:f$},bl={scheme:"ws",domainHost:!0,parse:dN,serialize:fN},_N={scheme:"wss",domainHost:bl.domainHost,parse:bl.parse,serialize:bl.serialize},yN={scheme:"urn",parse:pN,serialize:mN,skipNormalize:!0},bN={scheme:"urn:uuid",parse:hN,serialize:gN,skipNormalize:!0},$l={http:p$,https:vN,ws:bl,wss:_N,urn:yN,"urn:uuid":bN};Object.setPrototypeOf($l,null);function Bm(e){return e&&($l[e]||$l[e.toLowerCase()])||void 0}m$.exports={wsIsSecure:Fm,SCHEMES:$l,isValidSchemeName:lN,getSchemeHandler:Bm}});var _$=A((P2,wl)=>{"use strict";var{normalizeIPv6:$N,removeDotSegments:ya,recomposeAuthority:xN,normalizeComponentEncoding:xl,isIPv4:wN,nonSimpleDomain:kN}=Vm(),{SCHEMES:SN,getSchemeHandler:g$}=h$();function zN(e,t){return typeof e=="string"?e=Bt(sr(e,t),t):typeof e=="object"&&(e=sr(Bt(e,t),t)),e}function IN(e,t,n){let o=n?Object.assign({scheme:"null"},n):{scheme:"null"},r=v$(sr(e,o),sr(t,o),o,!0);return o.skipEscape=!0,Bt(r,o)}function v$(e,t,n,o){let r={};return o||(e=sr(Bt(e,n),n),t=sr(Bt(t,n),n)),n=n||{},!n.tolerant&&t.scheme?(r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=ya(t.path||""),r.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=ya(t.path||""),r.query=t.query):(t.path?(t.path[0]==="/"?r.path=ya(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?r.path="/"+t.path:e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:r.path=t.path,r.path=ya(r.path)),r.query=t.query):(r.path=e.path,t.query!==void 0?r.query=t.query:r.query=e.query),r.userinfo=e.userinfo,r.host=e.host,r.port=e.port),r.scheme=e.scheme),r.fragment=t.fragment,r}function EN(e,t,n){return typeof e=="string"?(e=unescape(e),e=Bt(xl(sr(e,n),!0),{...n,skipEscape:!0})):typeof e=="object"&&(e=Bt(xl(e,!0),{...n,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=Bt(xl(sr(t,n),!0),{...n,skipEscape:!0})):typeof t=="object"&&(t=Bt(xl(t,!0),{...n,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function Bt(e,t){let n={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},o=Object.assign({},t),r=[],i=g$(o.scheme||n.scheme);i&&i.serialize&&i.serialize(n,o),n.path!==void 0&&(o.skipEscape?n.path=unescape(n.path):(n.path=escape(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),o.reference!=="suffix"&&n.scheme&&r.push(n.scheme,":");let a=xN(n);if(a!==void 0&&(o.reference!=="suffix"&&r.push("//"),r.push(a),n.path&&n.path[0]!=="/"&&r.push("/")),n.path!==void 0){let s=n.path;!o.absolutePath&&(!i||!i.absolutePath)&&(s=ya(s)),a===void 0&&s[0]==="/"&&s[1]==="/"&&(s="/%2F"+s.slice(2)),r.push(s)}return n.query!==void 0&&r.push("?",n.query),n.fragment!==void 0&&r.push("#",n.fragment),r.join("")}var TN=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function sr(e,t){let n=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},r=!1;n.reference==="suffix"&&(n.scheme?e=n.scheme+":"+e:e="//"+e);let i=e.match(TN);if(i){if(o.scheme=i[1],o.userinfo=i[3],o.host=i[4],o.port=parseInt(i[5],10),o.path=i[6]||"",o.query=i[7],o.fragment=i[8],isNaN(o.port)&&(o.port=i[5]),o.host)if(wN(o.host)===!1){let c=$N(o.host);o.host=c.host.toLowerCase(),r=c.isIPV6}else r=!0;o.scheme===void 0&&o.userinfo===void 0&&o.host===void 0&&o.port===void 0&&o.query===void 0&&!o.path?o.reference="same-document":o.scheme===void 0?o.reference="relative":o.fragment===void 0?o.reference="absolute":o.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==o.reference&&(o.error=o.error||"URI is not a "+n.reference+" reference.");let a=g$(n.scheme||o.scheme);if(!n.unicodeSupport&&(!a||!a.unicodeSupport)&&o.host&&(n.domainHost||a&&a.domainHost)&&r===!1&&kN(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(s){o.error=o.error||"Host's domain name can not be converted to ASCII: "+s}(!a||a&&!a.skipNormalize)&&(e.indexOf("%")!==-1&&(o.scheme!==void 0&&(o.scheme=unescape(o.scheme)),o.host!==void 0&&(o.host=unescape(o.host))),o.path&&(o.path=escape(unescape(o.path))),o.fragment&&(o.fragment=encodeURI(decodeURIComponent(o.fragment)))),a&&a.parse&&a.parse(o,n)}else o.error=o.error||"URI can not be parsed.";return o}var Km={SCHEMES:SN,normalize:zN,resolve:IN,resolveComponent:v$,equal:EN,serialize:Bt,parse:sr};wl.exports=Km;wl.exports.default=Km;wl.exports.fastUri=Km});var b$=A(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0});var y$=_$();y$.code='require("ajv/dist/runtime/uri").default';Hm.default=y$});var E$=A(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.CodeGen=Ue.Name=Ue.nil=Ue.stringify=Ue.str=Ue._=Ue.KeywordCxt=void 0;var PN=va();Object.defineProperty(Ue,"KeywordCxt",{enumerable:!0,get:function(){return PN.KeywordCxt}});var So=re();Object.defineProperty(Ue,"_",{enumerable:!0,get:function(){return So._}});Object.defineProperty(Ue,"str",{enumerable:!0,get:function(){return So.str}});Object.defineProperty(Ue,"stringify",{enumerable:!0,get:function(){return So.stringify}});Object.defineProperty(Ue,"nil",{enumerable:!0,get:function(){return So.nil}});Object.defineProperty(Ue,"Name",{enumerable:!0,get:function(){return So.Name}});Object.defineProperty(Ue,"CodeGen",{enumerable:!0,get:function(){return So.CodeGen}});var ON=vl(),S$=_a(),jN=xm(),ba=yl(),NN=re(),$a=ma(),kl=pa(),Gm=fe(),$$=a$(),RN=b$(),z$=(e,t)=>new RegExp(e,t);z$.code="new RegExp";var AN=["removeAdditional","useDefaults","coerceTypes"],DN=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),CN={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},UN={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},x$=200;function ZN(e){var t,n,o,r,i,a,s,c,l,d,f,_,v,g,b,x,I,R,P,M,V,Me,ct,Ao,ur;let Lr=e.strict,mn=(t=e.code)===null||t===void 0?void 0:t.optimize,Ca=mn===!0||mn===void 0?1:mn||0,Ua=(o=(n=e.code)===null||n===void 0?void 0:n.regExp)!==null&&o!==void 0?o:z$,rd=(r=e.uriResolver)!==null&&r!==void 0?r:RN.default;return{strictSchema:(a=(i=e.strictSchema)!==null&&i!==void 0?i:Lr)!==null&&a!==void 0?a:!0,strictNumbers:(c=(s=e.strictNumbers)!==null&&s!==void 0?s:Lr)!==null&&c!==void 0?c:!0,strictTypes:(d=(l=e.strictTypes)!==null&&l!==void 0?l:Lr)!==null&&d!==void 0?d:"log",strictTuples:(_=(f=e.strictTuples)!==null&&f!==void 0?f:Lr)!==null&&_!==void 0?_:"log",strictRequired:(g=(v=e.strictRequired)!==null&&v!==void 0?v:Lr)!==null&&g!==void 0?g:!1,code:e.code?{...e.code,optimize:Ca,regExp:Ua}:{optimize:Ca,regExp:Ua},loopRequired:(b=e.loopRequired)!==null&&b!==void 0?b:x$,loopEnum:(x=e.loopEnum)!==null&&x!==void 0?x:x$,meta:(I=e.meta)!==null&&I!==void 0?I:!0,messages:(R=e.messages)!==null&&R!==void 0?R:!0,inlineRefs:(P=e.inlineRefs)!==null&&P!==void 0?P:!0,schemaId:(M=e.schemaId)!==null&&M!==void 0?M:"$id",addUsedSchema:(V=e.addUsedSchema)!==null&&V!==void 0?V:!0,validateSchema:(Me=e.validateSchema)!==null&&Me!==void 0?Me:!0,validateFormats:(ct=e.validateFormats)!==null&&ct!==void 0?ct:!0,unicodeRegExp:(Ao=e.unicodeRegExp)!==null&&Ao!==void 0?Ao:!0,int32range:(ur=e.int32range)!==null&&ur!==void 0?ur:!0,uriResolver:rd}}var xa=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...ZN(t)};let{es5:n,lines:o}=this.opts.code;this.scope=new NN.ValueScope({scope:{},prefixes:DN,es5:n,lines:o}),this.logger=BN(t.logger);let r=t.validateFormats;t.validateFormats=!1,this.RULES=(0,jN.getRules)(),w$.call(this,CN,t,"NOT SUPPORTED"),w$.call(this,UN,t,"DEPRECATED","warn"),this._metaOpts=VN.call(this),t.formats&&LN.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&qN.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),MN.call(this),t.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:n,schemaId:o}=this.opts,r=$$;o==="id"&&(r={...$$},r.id=r.$id,delete r.$id),n&&t&&this.addMetaSchema(r,r[o],!1)}defaultMeta(){let{meta:t,schemaId:n}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[n]||t:void 0}validate(t,n){let o;if(typeof t=="string"){if(o=this.getSchema(t),!o)throw new Error(`no schema with key or ref "${t}"`)}else o=this.compile(t);let r=o(n);return"$async"in o||(this.errors=o.errors),r}compile(t,n){let o=this._addSchema(t,n);return o.validate||this._compileSchemaEnv(o)}compileAsync(t,n){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:o}=this.opts;return r.call(this,t,n);async function r(d,f){await i.call(this,d.$schema);let _=this._addSchema(d,f);return _.validate||a.call(this,_)}async function i(d){d&&!this.getSchema(d)&&await r.call(this,{$ref:d},!0)}async function a(d){try{return this._compileSchemaEnv(d)}catch(f){if(!(f instanceof S$.default))throw f;return s.call(this,f),await c.call(this,f.missingSchema),a.call(this,d)}}function s({missingSchema:d,missingRef:f}){if(this.refs[d])throw new Error(`AnySchema ${d} is loaded but ${f} cannot be resolved`)}async function c(d){let f=await l.call(this,d);this.refs[d]||await i.call(this,f.$schema),this.refs[d]||this.addSchema(f,d,n)}async function l(d){let f=this._loading[d];if(f)return f;try{return await(this._loading[d]=o(d))}finally{delete this._loading[d]}}}addSchema(t,n,o,r=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,o,r);return this}let i;if(typeof t=="object"){let{schemaId:a}=this.opts;if(i=t[a],i!==void 0&&typeof i!="string")throw new Error(`schema ${a} must be string`)}return n=(0,$a.normalizeId)(n||i),this._checkUnique(n),this.schemas[n]=this._addSchema(t,o,n,r,!0),this}addMetaSchema(t,n,o=this.opts.validateSchema){return this.addSchema(t,n,!0,o),this}validateSchema(t,n){if(typeof t=="boolean")return!0;let o;if(o=t.$schema,o!==void 0&&typeof o!="string")throw new Error("$schema must be a string");if(o=o||this.opts.defaultMeta||this.defaultMeta(),!o)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let r=this.validate(o,t);if(!r&&n){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return r}getSchema(t){let n;for(;typeof(n=k$.call(this,t))=="string";)t=n;if(n===void 0){let{schemaId:o}=this.opts,r=new ba.SchemaEnv({schema:{},schemaId:o});if(n=ba.resolveSchema.call(this,r,t),!n)return;this.refs[t]=n}return n.validate||this._compileSchemaEnv(n)}removeSchema(t){if(t instanceof RegExp)return this._removeAllSchemas(this.schemas,t),this._removeAllSchemas(this.refs,t),this;switch(typeof t){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let n=k$.call(this,t);return typeof n=="object"&&this._cache.delete(n.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let n=t;this._cache.delete(n);let o=t[this.opts.schemaId];return o&&(o=(0,$a.normalizeId)(o),delete this.schemas[o],delete this.refs[o]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let n of t)this.addKeyword(n);return this}addKeyword(t,n){let o;if(typeof t=="string")o=t,typeof n=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),n.keyword=o);else if(typeof t=="object"&&n===void 0){if(n=t,o=n.keyword,Array.isArray(o)&&!o.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(HN.call(this,o,n),!n)return(0,Gm.eachItem)(o,i=>Jm.call(this,i)),this;GN.call(this,n);let r={...n,type:(0,kl.getJSONTypes)(n.type),schemaType:(0,kl.getJSONTypes)(n.schemaType)};return(0,Gm.eachItem)(o,r.type.length===0?i=>Jm.call(this,i,r):i=>r.type.forEach(a=>Jm.call(this,i,r,a))),this}getKeyword(t){let n=this.RULES.all[t];return typeof n=="object"?n.definition:!!n}removeKeyword(t){let{RULES:n}=this;delete n.keywords[t],delete n.all[t];for(let o of n.rules){let r=o.rules.findIndex(i=>i.keyword===t);r>=0&&o.rules.splice(r,1)}return this}addFormat(t,n){return typeof n=="string"&&(n=new RegExp(n)),this.formats[t]=n,this}errorsText(t=this.errors,{separator:n=", ",dataVar:o="data"}={}){return!t||t.length===0?"No errors":t.map(r=>`${o}${r.instancePath} ${r.message}`).reduce((r,i)=>r+n+i)}$dataMetaSchema(t,n){let o=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let r of n){let i=r.split("/").slice(1),a=t;for(let s of i)a=a[s];for(let s in o){let c=o[s];if(typeof c!="object")continue;let{$data:l}=c.definition,d=a[s];l&&d&&(a[s]=I$(d))}}return t}_removeAllSchemas(t,n){for(let o in t){let r=t[o];(!n||n.test(o))&&(typeof r=="string"?delete t[o]:r&&!r.meta&&(this._cache.delete(r.schema),delete t[o]))}}_addSchema(t,n,o,r=this.opts.validateSchema,i=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof t=="object")a=t[s];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof t!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(t);if(c!==void 0)return c;o=(0,$a.normalizeId)(a||o);let l=$a.getSchemaRefs.call(this,t,o);return c=new ba.SchemaEnv({schema:t,schemaId:s,meta:n,baseId:o,localRefs:l}),this._cache.set(c.schema,c),i&&!o.startsWith("#")&&(o&&this._checkUnique(o),this.refs[o]=c),r&&this.validateSchema(t,!0),c}_checkUnique(t){if(this.schemas[t]||this.refs[t])throw new Error(`schema with key or id "${t}" already exists`)}_compileSchemaEnv(t){if(t.meta?this._compileMetaSchema(t):ba.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let n=this.opts;this.opts=this._metaOpts;try{ba.compileSchema.call(this,t)}finally{this.opts=n}}};xa.ValidationError=ON.default;xa.MissingRefError=S$.default;Ue.default=xa;function w$(e,t,n,o="error"){for(let r in e){let i=r;i in t&&this.logger[o](`${n}: option ${r}. ${e[i]}`)}}function k$(e){return e=(0,$a.normalizeId)(e),this.schemas[e]||this.refs[e]}function MN(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function LN(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function qN(e){if(Array.isArray(e)){this.addVocabulary(e);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let t in e){let n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}function VN(){let e={...this.opts};for(let t of AN)delete e[t];return e}var FN={log(){},warn(){},error(){}};function BN(e){if(e===!1)return FN;if(e===void 0)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}var KN=/^[a-z_$][a-z0-9_$:-]*$/i;function HN(e,t){let{RULES:n}=this;if((0,Gm.eachItem)(e,o=>{if(n.keywords[o])throw new Error(`Keyword ${o} is already defined`);if(!KN.test(o))throw new Error(`Keyword ${o} has invalid name`)}),!!t&&t.$data&&!("code"in t||"validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function Jm(e,t,n){var o;let r=t?.post;if(n&&r)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,a=r?i.post:i.rules.find(({type:c})=>c===n);if(a||(a={type:n,rules:[]},i.rules.push(a)),i.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,kl.getJSONTypes)(t.type),schemaType:(0,kl.getJSONTypes)(t.schemaType)}};t.before?JN.call(this,a,s,t.before):a.rules.push(s),i.all[e]=s,(o=t.implements)===null||o===void 0||o.forEach(c=>this.addKeyword(c))}function JN(e,t,n){let o=e.rules.findIndex(r=>r.keyword===n);o>=0?e.rules.splice(o,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function GN(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=I$(t)),e.validateSchema=this.compile(t,!0))}var WN={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function I$(e){return{anyOf:[e,WN]}}});var T$=A(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0});var XN={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Wm.default=XN});var N$=A(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.callRef=ln.getValidate=void 0;var YN=_a(),P$=$t(),st=re(),zo=ir(),O$=yl(),Sl=fe(),QN={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:n,it:o}=e,{baseId:r,schemaEnv:i,validateName:a,opts:s,self:c}=o,{root:l}=i;if((n==="#"||n==="#/")&&r===l.baseId)return f();let d=O$.resolveRef.call(c,l,r,n);if(d===void 0)throw new YN.default(o.opts.uriResolver,r,n);if(d instanceof O$.SchemaEnv)return _(d);return v(d);function f(){if(i===l)return zl(e,a,i,i.$async);let g=t.scopeValue("root",{ref:l});return zl(e,(0,st._)`${g}.validate`,l,l.$async)}function _(g){let b=j$(e,g);zl(e,b,g,g.$async)}function v(g){let b=t.scopeValue("schema",s.code.source===!0?{ref:g,code:(0,st.stringify)(g)}:{ref:g}),x=t.name("valid"),I=e.subschema({schema:g,dataTypes:[],schemaPath:st.nil,topSchemaRef:b,errSchemaPath:n},x);e.mergeEvaluated(I),e.ok(x)}}};function j$(e,t){let{gen:n}=e;return t.validate?n.scopeValue("validate",{ref:t.validate}):(0,st._)`${n.scopeValue("wrapper",{ref:t})}.validate`}ln.getValidate=j$;function zl(e,t,n,o){let{gen:r,it:i}=e,{allErrors:a,schemaEnv:s,opts:c}=i,l=c.passContext?zo.default.this:st.nil;o?d():f();function d(){if(!s.$async)throw new Error("async schema referenced by sync schema");let g=r.let("valid");r.try(()=>{r.code((0,st._)`await ${(0,P$.callValidateCode)(e,t,l)}`),v(t),a||r.assign(g,!0)},b=>{r.if((0,st._)`!(${b} instanceof ${i.ValidationError})`,()=>r.throw(b)),_(b),a||r.assign(g,!1)}),e.ok(g)}function f(){e.result((0,P$.callValidateCode)(e,t,l),()=>v(t),()=>_(t))}function _(g){let b=(0,st._)`${g}.errors`;r.assign(zo.default.vErrors,(0,st._)`${zo.default.vErrors} === null ? ${b} : ${zo.default.vErrors}.concat(${b})`),r.assign(zo.default.errors,(0,st._)`${zo.default.vErrors}.length`)}function v(g){var b;if(!i.opts.unevaluated)return;let x=(b=n?.validate)===null||b===void 0?void 0:b.evaluated;if(i.props!==!0)if(x&&!x.dynamicProps)x.props!==void 0&&(i.props=Sl.mergeEvaluated.props(r,x.props,i.props));else{let I=r.var("props",(0,st._)`${g}.evaluated.props`);i.props=Sl.mergeEvaluated.props(r,I,i.props,st.Name)}if(i.items!==!0)if(x&&!x.dynamicItems)x.items!==void 0&&(i.items=Sl.mergeEvaluated.items(r,x.items,i.items));else{let I=r.var("items",(0,st._)`${g}.evaluated.items`);i.items=Sl.mergeEvaluated.items(r,I,i.items,st.Name)}}}ln.callRef=zl;ln.default=QN});var R$=A(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0});var eR=T$(),tR=N$(),rR=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",eR.default,tR.default];Xm.default=rR});var A$=A(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0});var Il=re(),Cr=Il.operators,El={maximum:{okStr:"<=",ok:Cr.LTE,fail:Cr.GT},minimum:{okStr:">=",ok:Cr.GTE,fail:Cr.LT},exclusiveMaximum:{okStr:"<",ok:Cr.LT,fail:Cr.GTE},exclusiveMinimum:{okStr:">",ok:Cr.GT,fail:Cr.LTE}},nR={message:({keyword:e,schemaCode:t})=>(0,Il.str)`must be ${El[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Il._)`{comparison: ${El[e].okStr}, limit: ${t}}`},oR={keyword:Object.keys(El),type:"number",schemaType:"number",$data:!0,error:nR,code(e){let{keyword:t,data:n,schemaCode:o}=e;e.fail$data((0,Il._)`${n} ${El[t].fail} ${o} || isNaN(${n})`)}};Ym.default=oR});var D$=A(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0});var wa=re(),iR={message:({schemaCode:e})=>(0,wa.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,wa._)`{multipleOf: ${e}}`},aR={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:iR,code(e){let{gen:t,data:n,schemaCode:o,it:r}=e,i=r.opts.multipleOfPrecision,a=t.let("res"),s=i?(0,wa._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:(0,wa._)`${a} !== parseInt(${a})`;e.fail$data((0,wa._)`(${o} === 0 || (${a} = ${n}/${o}, ${s}))`)}};Qm.default=aR});var U$=A(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0});function C$(e){let t=e.length,n=0,o=0,r;for(;o<t;)n++,r=e.charCodeAt(o++),r>=55296&&r<=56319&&o<t&&(r=e.charCodeAt(o),(r&64512)===56320&&o++);return n}eh.default=C$;C$.code='require("ajv/dist/runtime/ucs2length").default'});var Z$=A(th=>{"use strict";Object.defineProperty(th,"__esModule",{value:!0});var dn=re(),sR=fe(),cR=U$(),uR={message({keyword:e,schemaCode:t}){let n=e==="maxLength"?"more":"fewer";return(0,dn.str)`must NOT have ${n} than ${t} characters`},params:({schemaCode:e})=>(0,dn._)`{limit: ${e}}`},lR={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:uR,code(e){let{keyword:t,data:n,schemaCode:o,it:r}=e,i=t==="maxLength"?dn.operators.GT:dn.operators.LT,a=r.opts.unicode===!1?(0,dn._)`${n}.length`:(0,dn._)`${(0,sR.useFunc)(e.gen,cR.default)}(${n})`;e.fail$data((0,dn._)`${a} ${i} ${o}`)}};th.default=lR});var M$=A(rh=>{"use strict";Object.defineProperty(rh,"__esModule",{value:!0});var dR=$t(),fR=fe(),Io=re(),pR={message:({schemaCode:e})=>(0,Io.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Io._)`{pattern: ${e}}`},mR={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:pR,code(e){let{gen:t,data:n,$data:o,schema:r,schemaCode:i,it:a}=e,s=a.opts.unicodeRegExp?"u":"";if(o){let{regExp:c}=a.opts.code,l=c.code==="new RegExp"?(0,Io._)`new RegExp`:(0,fR.useFunc)(t,c),d=t.let("valid");t.try(()=>t.assign(d,(0,Io._)`${l}(${i}, ${s}).test(${n})`),()=>t.assign(d,!1)),e.fail$data((0,Io._)`!${d}`)}else{let c=(0,dR.usePattern)(e,r);e.fail$data((0,Io._)`!${c}.test(${n})`)}}};rh.default=mR});var L$=A(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0});var ka=re(),hR={message({keyword:e,schemaCode:t}){let n=e==="maxProperties"?"more":"fewer";return(0,ka.str)`must NOT have ${n} than ${t} properties`},params:({schemaCode:e})=>(0,ka._)`{limit: ${e}}`},gR={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:hR,code(e){let{keyword:t,data:n,schemaCode:o}=e,r=t==="maxProperties"?ka.operators.GT:ka.operators.LT;e.fail$data((0,ka._)`Object.keys(${n}).length ${r} ${o}`)}};nh.default=gR});var q$=A(oh=>{"use strict";Object.defineProperty(oh,"__esModule",{value:!0});var Sa=$t(),za=re(),vR=fe(),_R={message:({params:{missingProperty:e}})=>(0,za.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,za._)`{missingProperty: ${e}}`},yR={keyword:"required",type:"object",schemaType:"array",$data:!0,error:_R,code(e){let{gen:t,schema:n,schemaCode:o,data:r,$data:i,it:a}=e,{opts:s}=a;if(!i&&n.length===0)return;let c=n.length>=s.loopRequired;if(a.allErrors?l():d(),s.strictRequired){let v=e.parentSchema.properties,{definedProperties:g}=e.it;for(let b of n)if(v?.[b]===void 0&&!g.has(b)){let x=a.schemaEnv.baseId+a.errSchemaPath,I=`required property "${b}" is not defined at "${x}" (strictRequired)`;(0,vR.checkStrictMode)(a,I,a.opts.strictRequired)}}function l(){if(c||i)e.block$data(za.nil,f);else for(let v of n)(0,Sa.checkReportMissingProp)(e,v)}function d(){let v=t.let("missing");if(c||i){let g=t.let("valid",!0);e.block$data(g,()=>_(v,g)),e.ok(g)}else t.if((0,Sa.checkMissingProp)(e,n,v)),(0,Sa.reportMissingProp)(e,v),t.else()}function f(){t.forOf("prop",o,v=>{e.setParams({missingProperty:v}),t.if((0,Sa.noPropertyInData)(t,r,v,s.ownProperties),()=>e.error())})}function _(v,g){e.setParams({missingProperty:v}),t.forOf(v,o,()=>{t.assign(g,(0,Sa.propertyInData)(t,r,v,s.ownProperties)),t.if((0,za.not)(g),()=>{e.error(),t.break()})},za.nil)}}};oh.default=yR});var V$=A(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});var Ia=re(),bR={message({keyword:e,schemaCode:t}){let n=e==="maxItems"?"more":"fewer";return(0,Ia.str)`must NOT have ${n} than ${t} items`},params:({schemaCode:e})=>(0,Ia._)`{limit: ${e}}`},$R={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:bR,code(e){let{keyword:t,data:n,schemaCode:o}=e,r=t==="maxItems"?Ia.operators.GT:Ia.operators.LT;e.fail$data((0,Ia._)`${n}.length ${r} ${o}`)}};ih.default=$R});var Tl=A(ah=>{"use strict";Object.defineProperty(ah,"__esModule",{value:!0});var F$=Pm();F$.code='require("ajv/dist/runtime/equal").default';ah.default=F$});var B$=A(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});var sh=pa(),Ze=re(),xR=fe(),wR=Tl(),kR={message:({params:{i:e,j:t}})=>(0,Ze.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Ze._)`{i: ${e}, j: ${t}}`},SR={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:kR,code(e){let{gen:t,data:n,$data:o,schema:r,parentSchema:i,schemaCode:a,it:s}=e;if(!o&&!r)return;let c=t.let("valid"),l=i.items?(0,sh.getSchemaTypes)(i.items):[];e.block$data(c,d,(0,Ze._)`${a} === false`),e.ok(c);function d(){let g=t.let("i",(0,Ze._)`${n}.length`),b=t.let("j");e.setParams({i:g,j:b}),t.assign(c,!0),t.if((0,Ze._)`${g} > 1`,()=>(f()?_:v)(g,b))}function f(){return l.length>0&&!l.some(g=>g==="object"||g==="array")}function _(g,b){let x=t.name("item"),I=(0,sh.checkDataTypes)(l,x,s.opts.strictNumbers,sh.DataType.Wrong),R=t.const("indices",(0,Ze._)`{}`);t.for((0,Ze._)`;${g}--;`,()=>{t.let(x,(0,Ze._)`${n}[${g}]`),t.if(I,(0,Ze._)`continue`),l.length>1&&t.if((0,Ze._)`typeof ${x} == "string"`,(0,Ze._)`${x} += "_"`),t.if((0,Ze._)`typeof ${R}[${x}] == "number"`,()=>{t.assign(b,(0,Ze._)`${R}[${x}]`),e.error(),t.assign(c,!1).break()}).code((0,Ze._)`${R}[${x}] = ${g}`)})}function v(g,b){let x=(0,xR.useFunc)(t,wR.default),I=t.name("outer");t.label(I).for((0,Ze._)`;${g}--;`,()=>t.for((0,Ze._)`${b} = ${g}; ${b}--;`,()=>t.if((0,Ze._)`${x}(${n}[${g}], ${n}[${b}])`,()=>{e.error(),t.assign(c,!1).break(I)})))}}};ch.default=SR});var K$=A(lh=>{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});var uh=re(),zR=fe(),IR=Tl(),ER={message:"must be equal to constant",params:({schemaCode:e})=>(0,uh._)`{allowedValue: ${e}}`},TR={keyword:"const",$data:!0,error:ER,code(e){let{gen:t,data:n,$data:o,schemaCode:r,schema:i}=e;o||i&&typeof i=="object"?e.fail$data((0,uh._)`!${(0,zR.useFunc)(t,IR.default)}(${n}, ${r})`):e.fail((0,uh._)`${i} !== ${n}`)}};lh.default=TR});var H$=A(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});var Ea=re(),PR=fe(),OR=Tl(),jR={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Ea._)`{allowedValues: ${e}}`},NR={keyword:"enum",schemaType:"array",$data:!0,error:jR,code(e){let{gen:t,data:n,$data:o,schema:r,schemaCode:i,it:a}=e;if(!o&&r.length===0)throw new Error("enum must have non-empty array");let s=r.length>=a.opts.loopEnum,c,l=()=>c??(c=(0,PR.useFunc)(t,OR.default)),d;if(s||o)d=t.let("valid"),e.block$data(d,f);else{if(!Array.isArray(r))throw new Error("ajv implementation error");let v=t.const("vSchema",i);d=(0,Ea.or)(...r.map((g,b)=>_(v,b)))}e.pass(d);function f(){t.assign(d,!1),t.forOf("v",i,v=>t.if((0,Ea._)`${l()}(${n}, ${v})`,()=>t.assign(d,!0).break()))}function _(v,g){let b=r[g];return typeof b=="object"&&b!==null?(0,Ea._)`${l()}(${n}, ${v}[${g}])`:(0,Ea._)`${n} === ${b}`}}};dh.default=NR});var J$=A(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});var RR=A$(),AR=D$(),DR=Z$(),CR=M$(),UR=L$(),ZR=q$(),MR=V$(),LR=B$(),qR=K$(),VR=H$(),FR=[RR.default,AR.default,DR.default,CR.default,UR.default,ZR.default,MR.default,LR.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},qR.default,VR.default];fh.default=FR});var mh=A(Ta=>{"use strict";Object.defineProperty(Ta,"__esModule",{value:!0});Ta.validateAdditionalItems=void 0;var fn=re(),ph=fe(),BR={message:({params:{len:e}})=>(0,fn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,fn._)`{limit: ${e}}`},KR={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:BR,code(e){let{parentSchema:t,it:n}=e,{items:o}=t;if(!Array.isArray(o)){(0,ph.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}G$(e,o)}};function G$(e,t){let{gen:n,schema:o,data:r,keyword:i,it:a}=e;a.items=!0;let s=n.const("len",(0,fn._)`${r}.length`);if(o===!1)e.setParams({len:t.length}),e.pass((0,fn._)`${s} <= ${t.length}`);else if(typeof o=="object"&&!(0,ph.alwaysValidSchema)(a,o)){let l=n.var("valid",(0,fn._)`${s} <= ${t.length}`);n.if((0,fn.not)(l),()=>c(l)),e.ok(l)}function c(l){n.forRange("i",t.length,s,d=>{e.subschema({keyword:i,dataProp:d,dataPropType:ph.Type.Num},l),a.allErrors||n.if((0,fn.not)(l),()=>n.break())})}}Ta.validateAdditionalItems=G$;Ta.default=KR});var hh=A(Pa=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});Pa.validateTuple=void 0;var W$=re(),Pl=fe(),HR=$t(),JR={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:n}=e;if(Array.isArray(t))return X$(e,"additionalItems",t);n.items=!0,!(0,Pl.alwaysValidSchema)(n,t)&&e.ok((0,HR.validateArray)(e))}};function X$(e,t,n=e.schema){let{gen:o,parentSchema:r,data:i,keyword:a,it:s}=e;d(r),s.opts.unevaluated&&n.length&&s.items!==!0&&(s.items=Pl.mergeEvaluated.items(o,n.length,s.items));let c=o.name("valid"),l=o.const("len",(0,W$._)`${i}.length`);n.forEach((f,_)=>{(0,Pl.alwaysValidSchema)(s,f)||(o.if((0,W$._)`${l} > ${_}`,()=>e.subschema({keyword:a,schemaProp:_,dataProp:_},c)),e.ok(c))});function d(f){let{opts:_,errSchemaPath:v}=s,g=n.length,b=g===f.minItems&&(g===f.maxItems||f[t]===!1);if(_.strictTuples&&!b){let x=`"${a}" is ${g}-tuple, but minItems or maxItems/${t} are not specified or different at path "${v}"`;(0,Pl.checkStrictMode)(s,x,_.strictTuples)}}}Pa.validateTuple=X$;Pa.default=JR});var Y$=A(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});var GR=hh(),WR={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,GR.validateTuple)(e,"items")};gh.default=WR});var ex=A(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});var Q$=re(),XR=fe(),YR=$t(),QR=mh(),e1={message:({params:{len:e}})=>(0,Q$.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Q$._)`{limit: ${e}}`},t1={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:e1,code(e){let{schema:t,parentSchema:n,it:o}=e,{prefixItems:r}=n;o.items=!0,!(0,XR.alwaysValidSchema)(o,t)&&(r?(0,QR.validateAdditionalItems)(e,r):e.ok((0,YR.validateArray)(e)))}};vh.default=t1});var tx=A(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});var wt=re(),Ol=fe(),r1={message:({params:{min:e,max:t}})=>t===void 0?(0,wt.str)`must contain at least ${e} valid item(s)`:(0,wt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,wt._)`{minContains: ${e}}`:(0,wt._)`{minContains: ${e}, maxContains: ${t}}`},n1={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:r1,code(e){let{gen:t,schema:n,parentSchema:o,data:r,it:i}=e,a,s,{minContains:c,maxContains:l}=o;i.opts.next?(a=c===void 0?1:c,s=l):a=1;let d=t.const("len",(0,wt._)`${r}.length`);if(e.setParams({min:a,max:s}),s===void 0&&a===0){(0,Ol.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,Ol.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Ol.alwaysValidSchema)(i,n)){let b=(0,wt._)`${d} >= ${a}`;s!==void 0&&(b=(0,wt._)`${b} && ${d} <= ${s}`),e.pass(b);return}i.items=!0;let f=t.name("valid");s===void 0&&a===1?v(f,()=>t.if(f,()=>t.break())):a===0?(t.let(f,!0),s!==void 0&&t.if((0,wt._)`${r}.length > 0`,_)):(t.let(f,!1),_()),e.result(f,()=>e.reset());function _(){let b=t.name("_valid"),x=t.let("count",0);v(b,()=>t.if(b,()=>g(x)))}function v(b,x){t.forRange("i",0,d,I=>{e.subschema({keyword:"contains",dataProp:I,dataPropType:Ol.Type.Num,compositeRule:!0},b),x()})}function g(b){t.code((0,wt._)`${b}++`),s===void 0?t.if((0,wt._)`${b} >= ${a}`,()=>t.assign(f,!0).break()):(t.if((0,wt._)`${b} > ${s}`,()=>t.assign(f,!1).break()),a===1?t.assign(f,!0):t.if((0,wt._)`${b} >= ${a}`,()=>t.assign(f,!0)))}}};_h.default=n1});var ox=A(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.validateSchemaDeps=Kt.validatePropertyDeps=Kt.error=void 0;var yh=re(),o1=fe(),Oa=$t();Kt.error={message:({params:{property:e,depsCount:t,deps:n}})=>{let o=t===1?"property":"properties";return(0,yh.str)`must have ${o} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:n,missingProperty:o}})=>(0,yh._)`{property: ${e},
|
|
9
9
|
missingProperty: ${o},
|
|
10
10
|
depsCount: ${t},
|
|
11
|
-
deps: ${n}}`};var J1={keyword:"dependencies",type:"object",schemaType:"object",error:Ft.error,code(e){let[t,n]=G1(e);W$(e,t),X$(e,n)}};function G1({schema:e}){let t={},n={};for(let o in e){if(o==="__proto__")continue;let r=Array.isArray(e[o])?t:n;r[o]=e[o]}return[t,n]}function W$(e,t=e.schema){let{gen:n,data:o,it:r}=e;if(Object.keys(t).length===0)return;let i=n.let("missing");for(let a in t){let s=t[a];if(s.length===0)continue;let c=(0,Ta.propertyInData)(n,o,a,r.opts.ownProperties);e.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),r.allErrors?n.if(c,()=>{for(let l of s)(0,Ta.checkReportMissingProp)(e,l)}):(n.if((0,mh._)`${c} && (${(0,Ta.checkMissingProp)(e,s,i)})`),(0,Ta.reportMissingProp)(e,i),n.else())}}Ft.validatePropertyDeps=W$;function X$(e,t=e.schema){let{gen:n,data:o,keyword:r,it:i}=e,a=n.name("valid");for(let s in t)(0,H1.alwaysValidSchema)(i,t[s])||(n.if((0,Ta.propertyInData)(n,o,s,i.opts.ownProperties),()=>{let c=e.subschema({keyword:r,schemaProp:s},a);e.mergeValidEvaluated(c,a)},()=>n.var(a,!0)),e.ok(a))}Ft.validateSchemaDeps=X$;Ft.default=J1});var ex=A(hh=>{"use strict";Object.defineProperty(hh,"__esModule",{value:!0});var Q$=re(),W1=fe(),X1={message:"property name must be valid",params:({params:e})=>(0,Q$._)`{propertyName: ${e.propertyName}}`},Y1={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:X1,code(e){let{gen:t,schema:n,data:o,it:r}=e;if((0,W1.alwaysValidSchema)(r,n))return;let i=t.name("valid");t.forIn("key",o,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},i),t.if((0,Q$.not)(i),()=>{e.error(!0),r.allErrors||t.break()})}),e.ok(i)}};hh.default=Y1});var vh=A(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});var Pl=bt(),Rt=re(),Q1=or(),jl=fe(),eR={message:"must NOT have additional properties",params:({params:e})=>(0,Rt._)`{additionalProperty: ${e.additionalProperty}}`},tR={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:eR,code(e){let{gen:t,schema:n,parentSchema:o,data:r,errsCount:i,it:a}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,jl.alwaysValidSchema)(a,n))return;let l=(0,Pl.allSchemaProperties)(o.properties),d=(0,Pl.allSchemaProperties)(o.patternProperties);f(),e.ok((0,Rt._)`${i} === ${Q1.default.errors}`);function f(){t.forIn("key",r,x=>{!l.length&&!d.length?g(x):t.if(y(x),()=>g(x))})}function y(x){let I;if(l.length>8){let R=(0,jl.schemaRefOrVal)(a,o.properties,"properties");I=(0,Pl.isOwnProperty)(t,R,x)}else l.length?I=(0,Rt.or)(...l.map(R=>(0,Rt._)`${x} === ${R}`)):I=Rt.nil;return d.length&&(I=(0,Rt.or)(I,...d.map(R=>(0,Rt._)`${(0,Pl.usePattern)(e,R)}.test(${x})`))),(0,Rt.not)(I)}function v(x){t.code((0,Rt._)`delete ${r}[${x}]`)}function g(x){if(c.removeAdditional==="all"||c.removeAdditional&&n===!1){v(x);return}if(n===!1){e.setParams({additionalProperty:x}),e.error(),s||t.break();return}if(typeof n=="object"&&!(0,jl.alwaysValidSchema)(a,n)){let I=t.name("valid");c.removeAdditional==="failing"?(b(x,I,!1),t.if((0,Rt.not)(I),()=>{e.reset(),v(x)})):(b(x,I),s||t.if((0,Rt.not)(I),()=>t.break()))}}function b(x,I,R){let P={keyword:"additionalProperties",dataProp:x,dataPropType:jl.Type.Str};R===!1&&Object.assign(P,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(P,I)}}};gh.default=tR});var nx=A(yh=>{"use strict";Object.defineProperty(yh,"__esModule",{value:!0});var rR=ha(),tx=bt(),_h=fe(),rx=vh(),nR={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,parentSchema:o,data:r,it:i}=e;i.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&rx.default.code(new rR.KeywordCxt(i,rx.default,"additionalProperties"));let a=(0,tx.allSchemaProperties)(n);for(let f of a)i.definedProperties.add(f);i.opts.unevaluated&&a.length&&i.props!==!0&&(i.props=_h.mergeEvaluated.props(t,(0,_h.toHash)(a),i.props));let s=a.filter(f=>!(0,_h.alwaysValidSchema)(i,n[f]));if(s.length===0)return;let c=t.name("valid");for(let f of s)l(f)?d(f):(t.if((0,tx.propertyInData)(t,r,f,i.opts.ownProperties)),d(f),i.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(f),e.ok(c);function l(f){return i.opts.useDefaults&&!i.compositeRule&&n[f].default!==void 0}function d(f){e.subschema({keyword:"properties",schemaProp:f,dataProp:f},c)}}};yh.default=nR});var sx=A(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});var ox=bt(),Ol=re(),ix=fe(),ax=fe(),oR={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,data:o,parentSchema:r,it:i}=e,{opts:a}=i,s=(0,ox.allSchemaProperties)(n),c=s.filter(b=>(0,ix.alwaysValidSchema)(i,n[b]));if(s.length===0||c.length===s.length&&(!i.opts.unevaluated||i.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&r.properties,d=t.name("valid");i.props!==!0&&!(i.props instanceof Ol.Name)&&(i.props=(0,ax.evaluatedPropsToName)(t,i.props));let{props:f}=i;y();function y(){for(let b of s)l&&v(b),i.allErrors?g(b):(t.var(d,!0),g(b),t.if(d))}function v(b){for(let x in l)new RegExp(b).test(x)&&(0,ix.checkStrictMode)(i,`property ${x} matches pattern ${b} (use allowMatchingProperties)`)}function g(b){t.forIn("key",o,x=>{t.if((0,Ol._)`${(0,ox.usePattern)(e,b)}.test(${x})`,()=>{let I=c.includes(b);I||e.subschema({keyword:"patternProperties",schemaProp:b,dataProp:x,dataPropType:ax.Type.Str},d),i.opts.unevaluated&&f!==!0?t.assign((0,Ol._)`${f}[${x}]`,!0):!I&&!i.allErrors&&t.if((0,Ol.not)(d),()=>t.break())})})}}};bh.default=oR});var cx=A($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});var iR=fe(),aR={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:n,it:o}=e;if((0,iR.alwaysValidSchema)(o,n)){e.fail();return}let r=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),e.failResult(r,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};$h.default=aR});var ux=A(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});var sR=bt(),cR={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:sR.validateUnion,error:{message:"must match a schema in anyOf"}};xh.default=cR});var lx=A(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});var Nl=re(),uR=fe(),lR={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Nl._)`{passingSchemas: ${e.passing}}`},dR={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:lR,code(e){let{gen:t,schema:n,parentSchema:o,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(r.opts.discriminator&&o.discriminator)return;let i=n,a=t.let("valid",!1),s=t.let("passing",null),c=t.name("_valid");e.setParams({passing:s}),t.block(l),e.result(a,()=>e.reset(),()=>e.error(!0));function l(){i.forEach((d,f)=>{let y;(0,uR.alwaysValidSchema)(r,d)?t.var(c,!0):y=e.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},c),f>0&&t.if((0,Nl._)`${c} && ${a}`).assign(a,!1).assign(s,(0,Nl._)`[${s}, ${f}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(s,f),y&&e.mergeEvaluated(y,Nl.Name)})})}}};wh.default=dR});var dx=A(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});var fR=fe(),pR={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:n,it:o}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");let r=t.name("valid");n.forEach((i,a)=>{if((0,fR.alwaysValidSchema)(o,i))return;let s=e.subschema({keyword:"allOf",schemaProp:a},r);e.ok(r),e.mergeEvaluated(s)})}};kh.default=pR});var mx=A(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});var Rl=re(),px=fe(),mR={message:({params:e})=>(0,Rl.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Rl._)`{failingKeyword: ${e.ifClause}}`},hR={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:mR,code(e){let{gen:t,parentSchema:n,it:o}=e;n.then===void 0&&n.else===void 0&&(0,px.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let r=fx(o,"then"),i=fx(o,"else");if(!r&&!i)return;let a=t.let("valid",!0),s=t.name("_valid");if(c(),e.reset(),r&&i){let d=t.let("ifClause");e.setParams({ifClause:d}),t.if(s,l("then",d),l("else",d))}else r?t.if(s,l("then")):t.if((0,Rl.not)(s),l("else"));e.pass(a,()=>e.error(!0));function c(){let d=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);e.mergeEvaluated(d)}function l(d,f){return()=>{let y=e.subschema({keyword:d},s);t.assign(a,s),e.mergeValidEvaluated(y,a),f?t.assign(f,(0,Rl._)`${d}`):e.setParams({ifClause:d})}}}};function fx(e,t){let n=e.schema[t];return n!==void 0&&!(0,px.alwaysValidSchema)(e,n)}Sh.default=hR});var hx=A(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});var gR=fe(),vR={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){t.if===void 0&&(0,gR.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};zh.default=vR});var gx=A(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var _R=uh(),yR=K$(),bR=lh(),$R=J$(),xR=G$(),wR=Y$(),kR=ex(),SR=vh(),zR=nx(),IR=sx(),ER=cx(),TR=ux(),PR=lx(),jR=dx(),OR=mx(),NR=hx();function RR(e=!1){let t=[ER.default,TR.default,PR.default,jR.default,OR.default,NR.default,kR.default,SR.default,wR.default,zR.default,IR.default];return e?t.push(yR.default,$R.default):t.push(_R.default,bR.default),t.push(xR.default),t}Ih.default=RR});var vx=A(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});var Te=re(),AR={message:({schemaCode:e})=>(0,Te.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Te._)`{format: ${e}}`},DR={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:AR,code(e,t){let{gen:n,data:o,$data:r,schema:i,schemaCode:a,it:s}=e,{opts:c,errSchemaPath:l,schemaEnv:d,self:f}=s;if(!c.validateFormats)return;r?y():v();function y(){let g=n.scopeValue("formats",{ref:f.formats,code:c.code.formats}),b=n.const("fDef",(0,Te._)`${g}[${a}]`),x=n.let("fType"),I=n.let("format");n.if((0,Te._)`typeof ${b} == "object" && !(${b} instanceof RegExp)`,()=>n.assign(x,(0,Te._)`${b}.type || "string"`).assign(I,(0,Te._)`${b}.validate`),()=>n.assign(x,(0,Te._)`"string"`).assign(I,b)),e.fail$data((0,Te.or)(R(),P()));function R(){return c.strictSchema===!1?Te.nil:(0,Te._)`${a} && !${I}`}function P(){let M=d.$async?(0,Te._)`(${b}.async ? await ${I}(${o}) : ${I}(${o}))`:(0,Te._)`${I}(${o})`,V=(0,Te._)`(typeof ${I} == "function" ? ${M} : ${I}.test(${o}))`;return(0,Te._)`${I} && ${I} !== true && ${x} === ${t} && !${V}`}}function v(){let g=f.formats[i];if(!g){R();return}if(g===!0)return;let[b,x,I]=P(g);b===t&&e.pass(M());function R(){if(c.strictSchema===!1){f.logger.warn(V());return}throw new Error(V());function V(){return`unknown format "${i}" ignored in schema at path "${l}"`}}function P(V){let Me=V instanceof RegExp?(0,Te.regexpCode)(V):c.code.formats?(0,Te._)`${c.code.formats}${(0,Te.getProperty)(i)}`:void 0,st=n.scopeValue("formats",{key:i,ref:V,code:Me});return typeof V=="object"&&!(V instanceof RegExp)?[V.type||"string",V.validate,(0,Te._)`${st}.validate`]:["string",V,st]}function M(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!d.$async)throw new Error("async format in sync schema");return(0,Te._)`await ${I}(${o})`}return typeof x=="function"?(0,Te._)`${I}(${o})`:(0,Te._)`${I}.test(${o})`}}}};Eh.default=DR});var _x=A(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});var CR=vx(),ZR=[CR.default];Th.default=ZR});var yx=A(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});zo.contentVocabulary=zo.metadataVocabulary=void 0;zo.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];zo.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var $x=A(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});var UR=E$(),MR=q$(),LR=gx(),qR=_x(),bx=yx(),VR=[UR.default,MR.default,(0,LR.default)(),qR.default,bx.metadataVocabulary,bx.contentVocabulary];Ph.default=VR});var wx=A(Al=>{"use strict";Object.defineProperty(Al,"__esModule",{value:!0});Al.DiscrError=void 0;var xx;(function(e){e.Tag="tag",e.Mapping="mapping"})(xx||(Al.DiscrError=xx={}))});var Sx=A(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var Io=re(),jh=wx(),kx=vl(),FR=ga(),BR=fe(),KR={message:({params:{discrError:e,tagName:t}})=>e===jh.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>(0,Io._)`{error: ${e}, tag: ${n}, tagValue: ${t}}`},HR={keyword:"discriminator",type:"object",schemaType:"object",error:KR,code(e){let{gen:t,data:n,schema:o,parentSchema:r,it:i}=e,{oneOf:a}=r;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=o.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(o.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",(0,Io._)`${n}${(0,Io.getProperty)(s)}`);t.if((0,Io._)`typeof ${l} == "string"`,()=>d(),()=>e.error(!1,{discrError:jh.DiscrError.Tag,tag:l,tagName:s})),e.ok(c);function d(){let v=y();t.if(!1);for(let g in v)t.elseIf((0,Io._)`${l} === ${g}`),t.assign(c,f(v[g]));t.else(),e.error(!1,{discrError:jh.DiscrError.Mapping,tag:l,tagName:s}),t.endIf()}function f(v){let g=t.name("valid"),b=e.subschema({keyword:"oneOf",schemaProp:v},g);return e.mergeEvaluated(b,Io.Name),g}function y(){var v;let g={},b=I(r),x=!0;for(let M=0;M<a.length;M++){let V=a[M];if(V?.$ref&&!(0,BR.schemaHasRulesButRef)(V,i.self.RULES)){let st=V.$ref;if(V=kx.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,st),V instanceof kx.SchemaEnv&&(V=V.schema),V===void 0)throw new FR.default(i.opts.uriResolver,i.baseId,st)}let Me=(v=V?.properties)===null||v===void 0?void 0:v[s];if(typeof Me!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);x=x&&(b||I(V)),R(Me,M)}if(!x)throw new Error(`discriminator: "${s}" must be required`);return g;function I({required:M}){return Array.isArray(M)&&M.includes(s)}function R(M,V){if(M.const)P(M.const,V);else if(M.enum)for(let Me of M.enum)P(Me,V);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function P(M,V){if(typeof M!="string"||M in g)throw new Error(`discriminator: "${s}" values must be unique strings`);g[M]=V}}}};Oh.default=HR});var zx=A((H2,JR)=>{JR.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Rh=A((ze,Nh)=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.MissingRefError=ze.ValidationError=ze.CodeGen=ze.Name=ze.nil=ze.stringify=ze.str=ze._=ze.KeywordCxt=ze.Ajv=void 0;var GR=x$(),WR=$x(),XR=Sx(),Ix=zx(),YR=["/properties"],Dl="http://json-schema.org/draft-07/schema",Eo=class extends GR.default{_addVocabularies(){super._addVocabularies(),WR.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(XR.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(Ix,YR):Ix;this.addMetaSchema(t,Dl,!1),this.refs["http://json-schema.org/schema"]=Dl}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Dl)?Dl:void 0)}};ze.Ajv=Eo;Nh.exports=ze=Eo;Nh.exports.Ajv=Eo;Object.defineProperty(ze,"__esModule",{value:!0});ze.default=Eo;var QR=ha();Object.defineProperty(ze,"KeywordCxt",{enumerable:!0,get:function(){return QR.KeywordCxt}});var To=re();Object.defineProperty(ze,"_",{enumerable:!0,get:function(){return To._}});Object.defineProperty(ze,"str",{enumerable:!0,get:function(){return To.str}});Object.defineProperty(ze,"stringify",{enumerable:!0,get:function(){return To.stringify}});Object.defineProperty(ze,"nil",{enumerable:!0,get:function(){return To.nil}});Object.defineProperty(ze,"Name",{enumerable:!0,get:function(){return To.Name}});Object.defineProperty(ze,"CodeGen",{enumerable:!0,get:function(){return To.CodeGen}});var eA=hl();Object.defineProperty(ze,"ValidationError",{enumerable:!0,get:function(){return eA.default}});var tA=ga();Object.defineProperty(ze,"MissingRefError",{enumerable:!0,get:function(){return tA.default}})});var Ax=A(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.formatNames=Kt.fastFormats=Kt.fullFormats=void 0;function Bt(e,t){return{validate:e,compare:t}}Kt.fullFormats={date:Bt(jx,Zh),time:Bt(Dh(!0),Uh),"date-time":Bt(Ex(!0),Nx),"iso-time":Bt(Dh(),Ox),"iso-date-time":Bt(Ex(),Rx),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:sA,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:mA,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:cA,int32:{type:"number",validate:dA},int64:{type:"number",validate:fA},float:{type:"number",validate:Px},double:{type:"number",validate:Px},password:!0,binary:!0};Kt.fastFormats={...Kt.fullFormats,date:Bt(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Zh),time:Bt(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Uh),"date-time":Bt(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Nx),"iso-time":Bt(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Ox),"iso-date-time":Bt(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Rx),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};Kt.formatNames=Object.keys(Kt.fullFormats);function rA(e){return e%4===0&&(e%100!==0||e%400===0)}var nA=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,oA=[0,31,28,31,30,31,30,31,31,30,31,30,31];function jx(e){let t=nA.exec(e);if(!t)return!1;let n=+t[1],o=+t[2],r=+t[3];return o>=1&&o<=12&&r>=1&&r<=(o===2&&rA(n)?29:oA[o])}function Zh(e,t){if(e&&t)return e>t?1:e<t?-1:0}var Ah=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Dh(e){return function(n){let o=Ah.exec(n);if(!o)return!1;let r=+o[1],i=+o[2],a=+o[3],s=o[4],c=o[5]==="-"?-1:1,l=+(o[6]||0),d=+(o[7]||0);if(l>23||d>59||e&&!s)return!1;if(r<=23&&i<=59&&a<60)return!0;let f=i-d*c,y=r-l*c-(f<0?1:0);return(y===23||y===-1)&&(f===59||f===-1)&&a<61}}function Uh(e,t){if(!(e&&t))return;let n=new Date("2020-01-01T"+e).valueOf(),o=new Date("2020-01-01T"+t).valueOf();if(n&&o)return n-o}function Ox(e,t){if(!(e&&t))return;let n=Ah.exec(e),o=Ah.exec(t);if(n&&o)return e=n[1]+n[2]+n[3],t=o[1]+o[2]+o[3],e>t?1:e<t?-1:0}var Ch=/t|\s/i;function Ex(e){let t=Dh(e);return function(o){let r=o.split(Ch);return r.length===2&&jx(r[0])&&t(r[1])}}function Nx(e,t){if(!(e&&t))return;let n=new Date(e).valueOf(),o=new Date(t).valueOf();if(n&&o)return n-o}function Rx(e,t){if(!(e&&t))return;let[n,o]=e.split(Ch),[r,i]=t.split(Ch),a=Zh(n,r);if(a!==void 0)return a||Uh(o,i)}var iA=/\/|:/,aA=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function sA(e){return iA.test(e)&&aA.test(e)}var Tx=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function cA(e){return Tx.lastIndex=0,Tx.test(e)}var uA=-(2**31),lA=2**31-1;function dA(e){return Number.isInteger(e)&&e<=lA&&e>=uA}function fA(e){return Number.isInteger(e)}function Px(){return!0}var pA=/[^\\]\\Z/;function mA(e){if(pA.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var Dx=A(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});Po.formatLimitDefinition=void 0;var hA=Rh(),At=re(),Dr=At.operators,Cl={formatMaximum:{okStr:"<=",ok:Dr.LTE,fail:Dr.GT},formatMinimum:{okStr:">=",ok:Dr.GTE,fail:Dr.LT},formatExclusiveMaximum:{okStr:"<",ok:Dr.LT,fail:Dr.GTE},formatExclusiveMinimum:{okStr:">",ok:Dr.GT,fail:Dr.LTE}},gA={message:({keyword:e,schemaCode:t})=>(0,At.str)`should be ${Cl[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,At._)`{comparison: ${Cl[e].okStr}, limit: ${t}}`};Po.formatLimitDefinition={keyword:Object.keys(Cl),type:"string",schemaType:"string",$data:!0,error:gA,code(e){let{gen:t,data:n,schemaCode:o,keyword:r,it:i}=e,{opts:a,self:s}=i;if(!a.validateFormats)return;let c=new hA.KeywordCxt(i,s.RULES.all.format.definition,"format");c.$data?l():d();function l(){let y=t.scopeValue("formats",{ref:s.formats,code:a.code.formats}),v=t.const("fmt",(0,At._)`${y}[${c.schemaCode}]`);e.fail$data((0,At.or)((0,At._)`typeof ${v} != "object"`,(0,At._)`${v} instanceof RegExp`,(0,At._)`typeof ${v}.compare != "function"`,f(v)))}function d(){let y=c.schema,v=s.formats[y];if(!v||v===!0)return;if(typeof v!="object"||v instanceof RegExp||typeof v.compare!="function")throw new Error(`"${r}": format "${y}" does not define "compare" function`);let g=t.scopeValue("formats",{key:y,ref:v,code:a.code.formats?(0,At._)`${a.code.formats}${(0,At.getProperty)(y)}`:void 0});e.fail$data(f(g))}function f(y){return(0,At._)`${y}.compare(${n}, ${o}) ${Cl[r].fail} 0`}},dependencies:["format"]};var vA=e=>(e.addKeyword(Po.formatLimitDefinition),e);Po.default=vA});var Mx=A((Pa,Ux)=>{"use strict";Object.defineProperty(Pa,"__esModule",{value:!0});var jo=Ax(),_A=Dx(),Mh=re(),Cx=new Mh.Name("fullFormats"),yA=new Mh.Name("fastFormats"),Lh=(e,t={keywords:!0})=>{if(Array.isArray(t))return Zx(e,t,jo.fullFormats,Cx),e;let[n,o]=t.mode==="fast"?[jo.fastFormats,yA]:[jo.fullFormats,Cx],r=t.formats||jo.formatNames;return Zx(e,r,n,o),t.keywords&&(0,_A.default)(e),e};Lh.get=(e,t="full")=>{let o=(t==="fast"?jo.fastFormats:jo.fullFormats)[e];if(!o)throw new Error(`Unknown format "${e}"`);return o};function Zx(e,t,n,o){var r,i;(r=(i=e.opts.code).formats)!==null&&r!==void 0||(i.formats=(0,Mh._)`require("ajv-formats/dist/formats").${o}`);for(let a of t)e.addFormat(a,n[a])}Ux.exports=Pa=Lh;Object.defineProperty(Pa,"__esModule",{value:!0});Pa.default=Lh});var Hh=A((Kh,Yx)=>{(function(e,t){"use strict";typeof define=="function"&&define.amd?define("stackframe",[],t):typeof Kh=="object"?Yx.exports=t():e.StackFrame=t()})(Kh,function(){"use strict";function e(v){return!isNaN(parseFloat(v))&&isFinite(v)}function t(v){return v.charAt(0).toUpperCase()+v.substring(1)}function n(v){return function(){return this[v]}}var o=["isConstructor","isEval","isNative","isToplevel"],r=["columnNumber","lineNumber"],i=["fileName","functionName","source"],a=["args"],s=["evalOrigin"],c=o.concat(r,i,a,s);function l(v){if(v)for(var g=0;g<c.length;g++)v[c[g]]!==void 0&&this["set"+t(c[g])](v[c[g]])}l.prototype={getArgs:function(){return this.args},setArgs:function(v){if(Object.prototype.toString.call(v)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=v},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(v){if(v instanceof l)this.evalOrigin=v;else if(v instanceof Object)this.evalOrigin=new l(v);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var v=this.getFileName()||"",g=this.getLineNumber()||"",b=this.getColumnNumber()||"",x=this.getFunctionName()||"";return this.getIsEval()?v?"[eval] ("+v+":"+g+":"+b+")":"[eval]:"+g+":"+b:x?x+" ("+v+":"+g+":"+b+")":v+":"+g+":"+b}},l.fromString=function(g){var b=g.indexOf("("),x=g.lastIndexOf(")"),I=g.substring(0,b),R=g.substring(b+1,x).split(","),P=g.substring(x+1);if(P.indexOf("@")===0)var M=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(P,""),V=M[1],Me=M[2],st=M[3];return new l({functionName:I,args:R||void 0,fileName:V,lineNumber:Me||void 0,columnNumber:st||void 0})};for(var d=0;d<o.length;d++)l.prototype["get"+t(o[d])]=n(o[d]),l.prototype["set"+t(o[d])]=(function(v){return function(g){this[v]=!!g}})(o[d]);for(var f=0;f<r.length;f++)l.prototype["get"+t(r[f])]=n(r[f]),l.prototype["set"+t(r[f])]=(function(v){return function(g){if(!e(g))throw new TypeError(v+" must be a Number");this[v]=Number(g)}})(r[f]);for(var y=0;y<i.length;y++)l.prototype["get"+t(i[y])]=n(i[y]),l.prototype["set"+t(i[y])]=(function(v){return function(g){this[v]=String(g)}})(i[y]);return l})});var ew=A((Jh,Qx)=>{(function(e,t){"use strict";typeof define=="function"&&define.amd?define("error-stack-parser",["stackframe"],t):typeof Jh=="object"?Qx.exports=t(Hh()):e.ErrorStackParser=t(e.StackFrame)})(Jh,function(t){"use strict";var n=/(^|@)\S+:\d+/,o=/^\s*at .*(\S+:\d+|\(native\))/m,r=/^(eval@)?(\[native code])?$/;return{parse:function(a){if(typeof a.stacktrace<"u"||typeof a["opera#sourceloc"]<"u")return this.parseOpera(a);if(a.stack&&a.stack.match(o))return this.parseV8OrIE(a);if(a.stack)return this.parseFFOrSafari(a);throw new Error("Cannot parse given Error object")},extractLocation:function(a){if(a.indexOf(":")===-1)return[a];var s=/(.+?)(?::(\d+))?(?::(\d+))?$/,c=s.exec(a.replace(/[()]/g,""));return[c[1],c[2]||void 0,c[3]||void 0]},parseV8OrIE:function(a){var s=a.stack.split(`
|
|
12
|
-
`).filter(function(c){return!!c.match(o)},this);return s.map(function(c){c.indexOf("(eval ")>-1&&(c=c.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var l=c.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),d=l.match(/ (\(.+\)$)/);l=d?l.replace(d[0],""):l;var f=this.extractLocation(d?d[1]:l),
|
|
13
|
-
`).filter(function(c){return!c.match(r)},this);return s.map(function(c){if(c.indexOf(" > eval")>-1&&(c=c.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),c.indexOf("@")===-1&&c.indexOf(":")===-1)return new t({functionName:c});var l=/((.*".+"[^@]*)?[^@]*)(?:@)/,d=c.match(l),f=d&&d[1]?d[1]:void 0,
|
|
11
|
+
deps: ${n}}`};var i1={keyword:"dependencies",type:"object",schemaType:"object",error:Kt.error,code(e){let[t,n]=a1(e);rx(e,t),nx(e,n)}};function a1({schema:e}){let t={},n={};for(let o in e){if(o==="__proto__")continue;let r=Array.isArray(e[o])?t:n;r[o]=e[o]}return[t,n]}function rx(e,t=e.schema){let{gen:n,data:o,it:r}=e;if(Object.keys(t).length===0)return;let i=n.let("missing");for(let a in t){let s=t[a];if(s.length===0)continue;let c=(0,Oa.propertyInData)(n,o,a,r.opts.ownProperties);e.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),r.allErrors?n.if(c,()=>{for(let l of s)(0,Oa.checkReportMissingProp)(e,l)}):(n.if((0,yh._)`${c} && (${(0,Oa.checkMissingProp)(e,s,i)})`),(0,Oa.reportMissingProp)(e,i),n.else())}}Kt.validatePropertyDeps=rx;function nx(e,t=e.schema){let{gen:n,data:o,keyword:r,it:i}=e,a=n.name("valid");for(let s in t)(0,o1.alwaysValidSchema)(i,t[s])||(n.if((0,Oa.propertyInData)(n,o,s,i.opts.ownProperties),()=>{let c=e.subschema({keyword:r,schemaProp:s},a);e.mergeValidEvaluated(c,a)},()=>n.var(a,!0)),e.ok(a))}Kt.validateSchemaDeps=nx;Kt.default=i1});var ax=A(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});var ix=re(),s1=fe(),c1={message:"property name must be valid",params:({params:e})=>(0,ix._)`{propertyName: ${e.propertyName}}`},u1={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:c1,code(e){let{gen:t,schema:n,data:o,it:r}=e;if((0,s1.alwaysValidSchema)(r,n))return;let i=t.name("valid");t.forIn("key",o,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},i),t.if((0,ix.not)(i),()=>{e.error(!0),r.allErrors||t.break()})}),e.ok(i)}};bh.default=u1});var xh=A($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});var jl=$t(),At=re(),l1=ir(),Nl=fe(),d1={message:"must NOT have additional properties",params:({params:e})=>(0,At._)`{additionalProperty: ${e.additionalProperty}}`},f1={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:d1,code(e){let{gen:t,schema:n,parentSchema:o,data:r,errsCount:i,it:a}=e;if(!i)throw new Error("ajv implementation error");let{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,Nl.alwaysValidSchema)(a,n))return;let l=(0,jl.allSchemaProperties)(o.properties),d=(0,jl.allSchemaProperties)(o.patternProperties);f(),e.ok((0,At._)`${i} === ${l1.default.errors}`);function f(){t.forIn("key",r,x=>{!l.length&&!d.length?g(x):t.if(_(x),()=>g(x))})}function _(x){let I;if(l.length>8){let R=(0,Nl.schemaRefOrVal)(a,o.properties,"properties");I=(0,jl.isOwnProperty)(t,R,x)}else l.length?I=(0,At.or)(...l.map(R=>(0,At._)`${x} === ${R}`)):I=At.nil;return d.length&&(I=(0,At.or)(I,...d.map(R=>(0,At._)`${(0,jl.usePattern)(e,R)}.test(${x})`))),(0,At.not)(I)}function v(x){t.code((0,At._)`delete ${r}[${x}]`)}function g(x){if(c.removeAdditional==="all"||c.removeAdditional&&n===!1){v(x);return}if(n===!1){e.setParams({additionalProperty:x}),e.error(),s||t.break();return}if(typeof n=="object"&&!(0,Nl.alwaysValidSchema)(a,n)){let I=t.name("valid");c.removeAdditional==="failing"?(b(x,I,!1),t.if((0,At.not)(I),()=>{e.reset(),v(x)})):(b(x,I),s||t.if((0,At.not)(I),()=>t.break()))}}function b(x,I,R){let P={keyword:"additionalProperties",dataProp:x,dataPropType:Nl.Type.Str};R===!1&&Object.assign(P,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(P,I)}}};$h.default=f1});var ux=A(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});var p1=va(),sx=$t(),wh=fe(),cx=xh(),m1={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,parentSchema:o,data:r,it:i}=e;i.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&cx.default.code(new p1.KeywordCxt(i,cx.default,"additionalProperties"));let a=(0,sx.allSchemaProperties)(n);for(let f of a)i.definedProperties.add(f);i.opts.unevaluated&&a.length&&i.props!==!0&&(i.props=wh.mergeEvaluated.props(t,(0,wh.toHash)(a),i.props));let s=a.filter(f=>!(0,wh.alwaysValidSchema)(i,n[f]));if(s.length===0)return;let c=t.name("valid");for(let f of s)l(f)?d(f):(t.if((0,sx.propertyInData)(t,r,f,i.opts.ownProperties)),d(f),i.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(f),e.ok(c);function l(f){return i.opts.useDefaults&&!i.compositeRule&&n[f].default!==void 0}function d(f){e.subschema({keyword:"properties",schemaProp:f,dataProp:f},c)}}};kh.default=m1});var px=A(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});var lx=$t(),Rl=re(),dx=fe(),fx=fe(),h1={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:n,data:o,parentSchema:r,it:i}=e,{opts:a}=i,s=(0,lx.allSchemaProperties)(n),c=s.filter(b=>(0,dx.alwaysValidSchema)(i,n[b]));if(s.length===0||c.length===s.length&&(!i.opts.unevaluated||i.props===!0))return;let l=a.strictSchema&&!a.allowMatchingProperties&&r.properties,d=t.name("valid");i.props!==!0&&!(i.props instanceof Rl.Name)&&(i.props=(0,fx.evaluatedPropsToName)(t,i.props));let{props:f}=i;_();function _(){for(let b of s)l&&v(b),i.allErrors?g(b):(t.var(d,!0),g(b),t.if(d))}function v(b){for(let x in l)new RegExp(b).test(x)&&(0,dx.checkStrictMode)(i,`property ${x} matches pattern ${b} (use allowMatchingProperties)`)}function g(b){t.forIn("key",o,x=>{t.if((0,Rl._)`${(0,lx.usePattern)(e,b)}.test(${x})`,()=>{let I=c.includes(b);I||e.subschema({keyword:"patternProperties",schemaProp:b,dataProp:x,dataPropType:fx.Type.Str},d),i.opts.unevaluated&&f!==!0?t.assign((0,Rl._)`${f}[${x}]`,!0):!I&&!i.allErrors&&t.if((0,Rl.not)(d),()=>t.break())})})}}};Sh.default=h1});var mx=A(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});var g1=fe(),v1={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:n,it:o}=e;if((0,g1.alwaysValidSchema)(o,n)){e.fail();return}let r=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},r),e.failResult(r,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};zh.default=v1});var hx=A(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var _1=$t(),y1={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:_1.validateUnion,error:{message:"must match a schema in anyOf"}};Ih.default=y1});var gx=A(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});var Al=re(),b1=fe(),$1={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Al._)`{passingSchemas: ${e.passing}}`},x1={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:$1,code(e){let{gen:t,schema:n,parentSchema:o,it:r}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");if(r.opts.discriminator&&o.discriminator)return;let i=n,a=t.let("valid",!1),s=t.let("passing",null),c=t.name("_valid");e.setParams({passing:s}),t.block(l),e.result(a,()=>e.reset(),()=>e.error(!0));function l(){i.forEach((d,f)=>{let _;(0,b1.alwaysValidSchema)(r,d)?t.var(c,!0):_=e.subschema({keyword:"oneOf",schemaProp:f,compositeRule:!0},c),f>0&&t.if((0,Al._)`${c} && ${a}`).assign(a,!1).assign(s,(0,Al._)`[${s}, ${f}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(s,f),_&&e.mergeEvaluated(_,Al.Name)})})}}};Eh.default=x1});var vx=A(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});var w1=fe(),k1={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:n,it:o}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");let r=t.name("valid");n.forEach((i,a)=>{if((0,w1.alwaysValidSchema)(o,i))return;let s=e.subschema({keyword:"allOf",schemaProp:a},r);e.ok(r),e.mergeEvaluated(s)})}};Th.default=k1});var bx=A(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});var Dl=re(),yx=fe(),S1={message:({params:e})=>(0,Dl.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Dl._)`{failingKeyword: ${e.ifClause}}`},z1={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:S1,code(e){let{gen:t,parentSchema:n,it:o}=e;n.then===void 0&&n.else===void 0&&(0,yx.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let r=_x(o,"then"),i=_x(o,"else");if(!r&&!i)return;let a=t.let("valid",!0),s=t.name("_valid");if(c(),e.reset(),r&&i){let d=t.let("ifClause");e.setParams({ifClause:d}),t.if(s,l("then",d),l("else",d))}else r?t.if(s,l("then")):t.if((0,Dl.not)(s),l("else"));e.pass(a,()=>e.error(!0));function c(){let d=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);e.mergeEvaluated(d)}function l(d,f){return()=>{let _=e.subschema({keyword:d},s);t.assign(a,s),e.mergeValidEvaluated(_,a),f?t.assign(f,(0,Dl._)`${d}`):e.setParams({ifClause:d})}}}};function _x(e,t){let n=e.schema[t];return n!==void 0&&!(0,yx.alwaysValidSchema)(e,n)}Ph.default=z1});var $x=A(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});var I1=fe(),E1={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:n}){t.if===void 0&&(0,I1.checkStrictMode)(n,`"${e}" without "if" is ignored`)}};Oh.default=E1});var xx=A(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});var T1=mh(),P1=Y$(),O1=hh(),j1=ex(),N1=tx(),R1=ox(),A1=ax(),D1=xh(),C1=ux(),U1=px(),Z1=mx(),M1=hx(),L1=gx(),q1=vx(),V1=bx(),F1=$x();function B1(e=!1){let t=[Z1.default,M1.default,L1.default,q1.default,V1.default,F1.default,A1.default,D1.default,R1.default,C1.default,U1.default];return e?t.push(P1.default,j1.default):t.push(T1.default,O1.default),t.push(N1.default),t}jh.default=B1});var wx=A(Nh=>{"use strict";Object.defineProperty(Nh,"__esModule",{value:!0});var Te=re(),K1={message:({schemaCode:e})=>(0,Te.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Te._)`{format: ${e}}`},H1={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:K1,code(e,t){let{gen:n,data:o,$data:r,schema:i,schemaCode:a,it:s}=e,{opts:c,errSchemaPath:l,schemaEnv:d,self:f}=s;if(!c.validateFormats)return;r?_():v();function _(){let g=n.scopeValue("formats",{ref:f.formats,code:c.code.formats}),b=n.const("fDef",(0,Te._)`${g}[${a}]`),x=n.let("fType"),I=n.let("format");n.if((0,Te._)`typeof ${b} == "object" && !(${b} instanceof RegExp)`,()=>n.assign(x,(0,Te._)`${b}.type || "string"`).assign(I,(0,Te._)`${b}.validate`),()=>n.assign(x,(0,Te._)`"string"`).assign(I,b)),e.fail$data((0,Te.or)(R(),P()));function R(){return c.strictSchema===!1?Te.nil:(0,Te._)`${a} && !${I}`}function P(){let M=d.$async?(0,Te._)`(${b}.async ? await ${I}(${o}) : ${I}(${o}))`:(0,Te._)`${I}(${o})`,V=(0,Te._)`(typeof ${I} == "function" ? ${M} : ${I}.test(${o}))`;return(0,Te._)`${I} && ${I} !== true && ${x} === ${t} && !${V}`}}function v(){let g=f.formats[i];if(!g){R();return}if(g===!0)return;let[b,x,I]=P(g);b===t&&e.pass(M());function R(){if(c.strictSchema===!1){f.logger.warn(V());return}throw new Error(V());function V(){return`unknown format "${i}" ignored in schema at path "${l}"`}}function P(V){let Me=V instanceof RegExp?(0,Te.regexpCode)(V):c.code.formats?(0,Te._)`${c.code.formats}${(0,Te.getProperty)(i)}`:void 0,ct=n.scopeValue("formats",{key:i,ref:V,code:Me});return typeof V=="object"&&!(V instanceof RegExp)?[V.type||"string",V.validate,(0,Te._)`${ct}.validate`]:["string",V,ct]}function M(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!d.$async)throw new Error("async format in sync schema");return(0,Te._)`await ${I}(${o})`}return typeof x=="function"?(0,Te._)`${I}(${o})`:(0,Te._)`${I}.test(${o})`}}}};Nh.default=H1});var kx=A(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});var J1=wx(),G1=[J1.default];Rh.default=G1});var Sx=A(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});Eo.contentVocabulary=Eo.metadataVocabulary=void 0;Eo.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Eo.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Ix=A(Ah=>{"use strict";Object.defineProperty(Ah,"__esModule",{value:!0});var W1=R$(),X1=J$(),Y1=xx(),Q1=kx(),zx=Sx(),eA=[W1.default,X1.default,(0,Y1.default)(),Q1.default,zx.metadataVocabulary,zx.contentVocabulary];Ah.default=eA});var Tx=A(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.DiscrError=void 0;var Ex;(function(e){e.Tag="tag",e.Mapping="mapping"})(Ex||(Cl.DiscrError=Ex={}))});var Ox=A(Ch=>{"use strict";Object.defineProperty(Ch,"__esModule",{value:!0});var To=re(),Dh=Tx(),Px=yl(),tA=_a(),rA=fe(),nA={message:({params:{discrError:e,tagName:t}})=>e===Dh.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:n}})=>(0,To._)`{error: ${e}, tag: ${n}, tagValue: ${t}}`},oA={keyword:"discriminator",type:"object",schemaType:"object",error:nA,code(e){let{gen:t,data:n,schema:o,parentSchema:r,it:i}=e,{oneOf:a}=r;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=o.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(o.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let c=t.let("valid",!1),l=t.const("tag",(0,To._)`${n}${(0,To.getProperty)(s)}`);t.if((0,To._)`typeof ${l} == "string"`,()=>d(),()=>e.error(!1,{discrError:Dh.DiscrError.Tag,tag:l,tagName:s})),e.ok(c);function d(){let v=_();t.if(!1);for(let g in v)t.elseIf((0,To._)`${l} === ${g}`),t.assign(c,f(v[g]));t.else(),e.error(!1,{discrError:Dh.DiscrError.Mapping,tag:l,tagName:s}),t.endIf()}function f(v){let g=t.name("valid"),b=e.subschema({keyword:"oneOf",schemaProp:v},g);return e.mergeEvaluated(b,To.Name),g}function _(){var v;let g={},b=I(r),x=!0;for(let M=0;M<a.length;M++){let V=a[M];if(V?.$ref&&!(0,rA.schemaHasRulesButRef)(V,i.self.RULES)){let ct=V.$ref;if(V=Px.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,ct),V instanceof Px.SchemaEnv&&(V=V.schema),V===void 0)throw new tA.default(i.opts.uriResolver,i.baseId,ct)}let Me=(v=V?.properties)===null||v===void 0?void 0:v[s];if(typeof Me!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);x=x&&(b||I(V)),R(Me,M)}if(!x)throw new Error(`discriminator: "${s}" must be required`);return g;function I({required:M}){return Array.isArray(M)&&M.includes(s)}function R(M,V){if(M.const)P(M.const,V);else if(M.enum)for(let Me of M.enum)P(Me,V);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function P(M,V){if(typeof M!="string"||M in g)throw new Error(`discriminator: "${s}" values must be unique strings`);g[M]=V}}}};Ch.default=oA});var jx=A((_q,iA)=>{iA.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Zh=A((ze,Uh)=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.MissingRefError=ze.ValidationError=ze.CodeGen=ze.Name=ze.nil=ze.stringify=ze.str=ze._=ze.KeywordCxt=ze.Ajv=void 0;var aA=E$(),sA=Ix(),cA=Ox(),Nx=jx(),uA=["/properties"],Ul="http://json-schema.org/draft-07/schema",Po=class extends aA.default{_addVocabularies(){super._addVocabularies(),sA.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(cA.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(Nx,uA):Nx;this.addMetaSchema(t,Ul,!1),this.refs["http://json-schema.org/schema"]=Ul}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Ul)?Ul:void 0)}};ze.Ajv=Po;Uh.exports=ze=Po;Uh.exports.Ajv=Po;Object.defineProperty(ze,"__esModule",{value:!0});ze.default=Po;var lA=va();Object.defineProperty(ze,"KeywordCxt",{enumerable:!0,get:function(){return lA.KeywordCxt}});var Oo=re();Object.defineProperty(ze,"_",{enumerable:!0,get:function(){return Oo._}});Object.defineProperty(ze,"str",{enumerable:!0,get:function(){return Oo.str}});Object.defineProperty(ze,"stringify",{enumerable:!0,get:function(){return Oo.stringify}});Object.defineProperty(ze,"nil",{enumerable:!0,get:function(){return Oo.nil}});Object.defineProperty(ze,"Name",{enumerable:!0,get:function(){return Oo.Name}});Object.defineProperty(ze,"CodeGen",{enumerable:!0,get:function(){return Oo.CodeGen}});var dA=vl();Object.defineProperty(ze,"ValidationError",{enumerable:!0,get:function(){return dA.default}});var fA=_a();Object.defineProperty(ze,"MissingRefError",{enumerable:!0,get:function(){return fA.default}})});var Lx=A(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.formatNames=Jt.fastFormats=Jt.fullFormats=void 0;function Ht(e,t){return{validate:e,compare:t}}Jt.fullFormats={date:Ht(Cx,Vh),time:Ht(Lh(!0),Fh),"date-time":Ht(Rx(!0),Zx),"iso-time":Ht(Lh(),Ux),"iso-date-time":Ht(Rx(),Mx),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:_A,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:SA,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:yA,int32:{type:"number",validate:xA},int64:{type:"number",validate:wA},float:{type:"number",validate:Dx},double:{type:"number",validate:Dx},password:!0,binary:!0};Jt.fastFormats={...Jt.fullFormats,date:Ht(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Vh),time:Ht(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Fh),"date-time":Ht(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Zx),"iso-time":Ht(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Ux),"iso-date-time":Ht(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Mx),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i};Jt.formatNames=Object.keys(Jt.fullFormats);function pA(e){return e%4===0&&(e%100!==0||e%400===0)}var mA=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,hA=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Cx(e){let t=mA.exec(e);if(!t)return!1;let n=+t[1],o=+t[2],r=+t[3];return o>=1&&o<=12&&r>=1&&r<=(o===2&&pA(n)?29:hA[o])}function Vh(e,t){if(e&&t)return e>t?1:e<t?-1:0}var Mh=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Lh(e){return function(n){let o=Mh.exec(n);if(!o)return!1;let r=+o[1],i=+o[2],a=+o[3],s=o[4],c=o[5]==="-"?-1:1,l=+(o[6]||0),d=+(o[7]||0);if(l>23||d>59||e&&!s)return!1;if(r<=23&&i<=59&&a<60)return!0;let f=i-d*c,_=r-l*c-(f<0?1:0);return(_===23||_===-1)&&(f===59||f===-1)&&a<61}}function Fh(e,t){if(!(e&&t))return;let n=new Date("2020-01-01T"+e).valueOf(),o=new Date("2020-01-01T"+t).valueOf();if(n&&o)return n-o}function Ux(e,t){if(!(e&&t))return;let n=Mh.exec(e),o=Mh.exec(t);if(n&&o)return e=n[1]+n[2]+n[3],t=o[1]+o[2]+o[3],e>t?1:e<t?-1:0}var qh=/t|\s/i;function Rx(e){let t=Lh(e);return function(o){let r=o.split(qh);return r.length===2&&Cx(r[0])&&t(r[1])}}function Zx(e,t){if(!(e&&t))return;let n=new Date(e).valueOf(),o=new Date(t).valueOf();if(n&&o)return n-o}function Mx(e,t){if(!(e&&t))return;let[n,o]=e.split(qh),[r,i]=t.split(qh),a=Vh(n,r);if(a!==void 0)return a||Fh(o,i)}var gA=/\/|:/,vA=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function _A(e){return gA.test(e)&&vA.test(e)}var Ax=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function yA(e){return Ax.lastIndex=0,Ax.test(e)}var bA=-(2**31),$A=2**31-1;function xA(e){return Number.isInteger(e)&&e<=$A&&e>=bA}function wA(e){return Number.isInteger(e)}function Dx(){return!0}var kA=/[^\\]\\Z/;function SA(e){if(kA.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var qx=A(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});jo.formatLimitDefinition=void 0;var zA=Zh(),Dt=re(),Ur=Dt.operators,Zl={formatMaximum:{okStr:"<=",ok:Ur.LTE,fail:Ur.GT},formatMinimum:{okStr:">=",ok:Ur.GTE,fail:Ur.LT},formatExclusiveMaximum:{okStr:"<",ok:Ur.LT,fail:Ur.GTE},formatExclusiveMinimum:{okStr:">",ok:Ur.GT,fail:Ur.LTE}},IA={message:({keyword:e,schemaCode:t})=>(0,Dt.str)`should be ${Zl[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Dt._)`{comparison: ${Zl[e].okStr}, limit: ${t}}`};jo.formatLimitDefinition={keyword:Object.keys(Zl),type:"string",schemaType:"string",$data:!0,error:IA,code(e){let{gen:t,data:n,schemaCode:o,keyword:r,it:i}=e,{opts:a,self:s}=i;if(!a.validateFormats)return;let c=new zA.KeywordCxt(i,s.RULES.all.format.definition,"format");c.$data?l():d();function l(){let _=t.scopeValue("formats",{ref:s.formats,code:a.code.formats}),v=t.const("fmt",(0,Dt._)`${_}[${c.schemaCode}]`);e.fail$data((0,Dt.or)((0,Dt._)`typeof ${v} != "object"`,(0,Dt._)`${v} instanceof RegExp`,(0,Dt._)`typeof ${v}.compare != "function"`,f(v)))}function d(){let _=c.schema,v=s.formats[_];if(!v||v===!0)return;if(typeof v!="object"||v instanceof RegExp||typeof v.compare!="function")throw new Error(`"${r}": format "${_}" does not define "compare" function`);let g=t.scopeValue("formats",{key:_,ref:v,code:a.code.formats?(0,Dt._)`${a.code.formats}${(0,Dt.getProperty)(_)}`:void 0});e.fail$data(f(g))}function f(_){return(0,Dt._)`${_}.compare(${n}, ${o}) ${Zl[r].fail} 0`}},dependencies:["format"]};var EA=e=>(e.addKeyword(jo.formatLimitDefinition),e);jo.default=EA});var Kx=A((ja,Bx)=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});var No=Lx(),TA=qx(),Bh=re(),Vx=new Bh.Name("fullFormats"),PA=new Bh.Name("fastFormats"),Kh=(e,t={keywords:!0})=>{if(Array.isArray(t))return Fx(e,t,No.fullFormats,Vx),e;let[n,o]=t.mode==="fast"?[No.fastFormats,PA]:[No.fullFormats,Vx],r=t.formats||No.formatNames;return Fx(e,r,n,o),t.keywords&&(0,TA.default)(e),e};Kh.get=(e,t="full")=>{let o=(t==="fast"?No.fastFormats:No.fullFormats)[e];if(!o)throw new Error(`Unknown format "${e}"`);return o};function Fx(e,t,n,o){var r,i;(r=(i=e.opts.code).formats)!==null&&r!==void 0||(i.formats=(0,Bh._)`require("ajv-formats/dist/formats").${o}`);for(let a of t)e.addFormat(a,n[a])}Bx.exports=ja=Kh;Object.defineProperty(ja,"__esModule",{value:!0});ja.default=Kh});var Yh=A((Xh,ow)=>{(function(e,t){"use strict";typeof define=="function"&&define.amd?define("stackframe",[],t):typeof Xh=="object"?ow.exports=t():e.StackFrame=t()})(Xh,function(){"use strict";function e(v){return!isNaN(parseFloat(v))&&isFinite(v)}function t(v){return v.charAt(0).toUpperCase()+v.substring(1)}function n(v){return function(){return this[v]}}var o=["isConstructor","isEval","isNative","isToplevel"],r=["columnNumber","lineNumber"],i=["fileName","functionName","source"],a=["args"],s=["evalOrigin"],c=o.concat(r,i,a,s);function l(v){if(v)for(var g=0;g<c.length;g++)v[c[g]]!==void 0&&this["set"+t(c[g])](v[c[g]])}l.prototype={getArgs:function(){return this.args},setArgs:function(v){if(Object.prototype.toString.call(v)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=v},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(v){if(v instanceof l)this.evalOrigin=v;else if(v instanceof Object)this.evalOrigin=new l(v);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var v=this.getFileName()||"",g=this.getLineNumber()||"",b=this.getColumnNumber()||"",x=this.getFunctionName()||"";return this.getIsEval()?v?"[eval] ("+v+":"+g+":"+b+")":"[eval]:"+g+":"+b:x?x+" ("+v+":"+g+":"+b+")":v+":"+g+":"+b}},l.fromString=function(g){var b=g.indexOf("("),x=g.lastIndexOf(")"),I=g.substring(0,b),R=g.substring(b+1,x).split(","),P=g.substring(x+1);if(P.indexOf("@")===0)var M=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(P,""),V=M[1],Me=M[2],ct=M[3];return new l({functionName:I,args:R||void 0,fileName:V,lineNumber:Me||void 0,columnNumber:ct||void 0})};for(var d=0;d<o.length;d++)l.prototype["get"+t(o[d])]=n(o[d]),l.prototype["set"+t(o[d])]=(function(v){return function(g){this[v]=!!g}})(o[d]);for(var f=0;f<r.length;f++)l.prototype["get"+t(r[f])]=n(r[f]),l.prototype["set"+t(r[f])]=(function(v){return function(g){if(!e(g))throw new TypeError(v+" must be a Number");this[v]=Number(g)}})(r[f]);for(var _=0;_<i.length;_++)l.prototype["get"+t(i[_])]=n(i[_]),l.prototype["set"+t(i[_])]=(function(v){return function(g){this[v]=String(g)}})(i[_]);return l})});var aw=A((Qh,iw)=>{(function(e,t){"use strict";typeof define=="function"&&define.amd?define("error-stack-parser",["stackframe"],t):typeof Qh=="object"?iw.exports=t(Yh()):e.ErrorStackParser=t(e.StackFrame)})(Qh,function(t){"use strict";var n=/(^|@)\S+:\d+/,o=/^\s*at .*(\S+:\d+|\(native\))/m,r=/^(eval@)?(\[native code])?$/;return{parse:function(a){if(typeof a.stacktrace<"u"||typeof a["opera#sourceloc"]<"u")return this.parseOpera(a);if(a.stack&&a.stack.match(o))return this.parseV8OrIE(a);if(a.stack)return this.parseFFOrSafari(a);throw new Error("Cannot parse given Error object")},extractLocation:function(a){if(a.indexOf(":")===-1)return[a];var s=/(.+?)(?::(\d+))?(?::(\d+))?$/,c=s.exec(a.replace(/[()]/g,""));return[c[1],c[2]||void 0,c[3]||void 0]},parseV8OrIE:function(a){var s=a.stack.split(`
|
|
12
|
+
`).filter(function(c){return!!c.match(o)},this);return s.map(function(c){c.indexOf("(eval ")>-1&&(c=c.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var l=c.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),d=l.match(/ (\(.+\)$)/);l=d?l.replace(d[0],""):l;var f=this.extractLocation(d?d[1]:l),_=d&&l||void 0,v=["eval","<anonymous>"].indexOf(f[0])>-1?void 0:f[0];return new t({functionName:_,fileName:v,lineNumber:f[1],columnNumber:f[2],source:c})},this)},parseFFOrSafari:function(a){var s=a.stack.split(`
|
|
13
|
+
`).filter(function(c){return!c.match(r)},this);return s.map(function(c){if(c.indexOf(" > eval")>-1&&(c=c.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),c.indexOf("@")===-1&&c.indexOf(":")===-1)return new t({functionName:c});var l=/((.*".+"[^@]*)?[^@]*)(?:@)/,d=c.match(l),f=d&&d[1]?d[1]:void 0,_=this.extractLocation(c.replace(l,""));return new t({functionName:f,fileName:_[0],lineNumber:_[1],columnNumber:_[2],source:c})},this)},parseOpera:function(a){return!a.stacktrace||a.message.indexOf(`
|
|
14
14
|
`)>-1&&a.message.split(`
|
|
15
15
|
`).length>a.stacktrace.split(`
|
|
16
16
|
`).length?this.parseOpera9(a):a.stack?this.parseOpera11(a):this.parseOpera10(a)},parseOpera9:function(a){for(var s=/Line (\d+).*script (?:in )?(\S+)/i,c=a.message.split(`
|
|
17
|
-
`),l=[],d=2,f=c.length;d<f;d+=2){var
|
|
18
|
-
`),l=[],d=0,f=c.length;d<f;d+=2){var
|
|
19
|
-
`).filter(function(c){return!!c.match(n)&&!c.match(/^Error created at/)},this);return s.map(function(c){var l=c.split("@"),d=this.extractLocation(l.pop()),f=l.shift()||"",
|
|
20
|
-
`&&o.shift(),this._lineBuffer.length>0&&(this._lineBuffer[this._lineBuffer.length-1]+=o[0],o.shift()),this._lastChunkEndedWithCR=e[e.length-1]=="\r",this._lineBuffer=this._lineBuffer.concat(o),this._pushBuffer(t,1,n)};Zr.prototype._pushBuffer=function(e,t,n){for(;this._lineBuffer.length>t;){var o=this._lineBuffer.shift();if((this._keepEmptyLines||o.length>0)&&!this.push(this._reencode(o,e))){var r=this;FA.setImmediate(function(){r._pushBuffer(e,t,n)});return}}n()};Zr.prototype._flush=function(e){this._pushBuffer(this._chunkEncoding,0,e)};Zr.prototype._reencode=function(e,t){return this.encoding&&this.encoding!=t?new Buffer(e,t).toString(this.encoding):this.encoding?e:new Buffer(e,t)}});var yw=A((_w,Qh)=>{(function(e){if(typeof _w=="object"&&typeof Qh<"u")Qh.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var t;typeof window<"u"?t=window:typeof global<"u"?t=global:typeof self<"u"?t=self:t=this,t.bugsnag=e()}})(function(){var e,t,n,o=(function(){function u(h,p,_,w){w===void 0&&(w=new Date),this.type=_,this.message=h,this.metadata=p,this.timestamp=w}var m=u.prototype;return m.toJSON=function(){return{type:this.type,name:this.message,timestamp:this.timestamp,metaData:this.metadata}},u})(),r=o,i=["navigation","request","process","log","user","state","error","manual"],a=function(u,m,h){for(var p=h,_=0,w=u.length;_<w;_++)p=m(p,u[_],_,u);return p},s=function(u,m){return a(u,function(h,p,_,w){return m(p,_,w)?h.concat(p):h},[])},c=function(u,m){return a(u,function(h,p,_,w){return h===!0||p===m},!1)},l=function(u){return Object.prototype.toString.call(u)==="[object Array]"},d=!{toString:null}.propertyIsEnumerable("toString"),f=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],y=function(u){var m=[],h;for(h in u)Object.prototype.hasOwnProperty.call(u,h)&&m.push(h);if(!d)return m;for(var p=0,_=f.length;p<_;p++)Object.prototype.hasOwnProperty.call(u,f[p])&&m.push(f[p]);return m},v=function(u,m){return u===void 0&&(u=1),m===void 0&&(m=1/0),function(h){return typeof h=="number"&&parseInt(""+h,10)===h&&h>=u&&h<=m}},g=function(u){return typeof u=="function"||l(u)&&s(u,function(m){return typeof m=="function"}).length===u.length},b=function(u){return typeof u=="string"&&!!u.length},x={},I=function(){return{unhandledExceptions:!0,unhandledRejections:!0}};x.schema={apiKey:{defaultValue:function(){return null},message:"is required",validate:b},appVersion:{defaultValue:function(){},message:"should be a string",validate:function(u){return u===void 0||b(u)}},appType:{defaultValue:function(){},message:"should be a string",validate:function(u){return u===void 0||b(u)}},autoDetectErrors:{defaultValue:function(){return!0},message:"should be true|false",validate:function(u){return u===!0||u===!1}},enabledErrorTypes:{defaultValue:function(){return I()},message:"should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }",allowPartialObject:!0,validate:function(u){if(typeof u!="object"||!u)return!1;var m=y(u),h=y(I());return!(s(m,function(p){return c(h,p)}).length<m.length||s(y(u),function(p){return typeof u[p]!="boolean"}).length>0)}},onError:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:g},onSession:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:g},onBreadcrumb:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:g},endpoints:{defaultValue:function(u){return typeof u>"u"?{notify:"https://notify.bugsnag.com",sessions:"https://sessions.bugsnag.com"}:{notify:null,sessions:null}},message:"should be an object containing endpoint URLs { notify, sessions }",validate:function(u){return u&&typeof u=="object"&&b(u.notify)&&b(u.sessions)&&s(y(u),function(m){return!c(["notify","sessions"],m)}).length===0}},autoTrackSessions:{defaultValue:function(u){return!0},message:"should be true|false",validate:function(u){return u===!0||u===!1}},enabledReleaseStages:{defaultValue:function(){return null},message:"should be an array of strings",validate:function(u){return u===null||l(u)&&s(u,function(m){return typeof m=="string"}).length===u.length}},releaseStage:{defaultValue:function(){return"production"},message:"should be a string",validate:function(u){return typeof u=="string"&&u.length}},maxBreadcrumbs:{defaultValue:function(){return 25},message:"should be a number \u2264100",validate:function(u){return v(0,100)(u)}},enabledBreadcrumbTypes:{defaultValue:function(){return i},message:"should be null or a list of available breadcrumb types ("+i.join(",")+")",validate:function(u){return u===null||l(u)&&a(u,function(m,h){return m===!1?m:c(i,h)},!0)}},context:{defaultValue:function(){},message:"should be a string",validate:function(u){return u===void 0||typeof u=="string"}},user:{defaultValue:function(){return{}},message:"should be an object with { id, email, name } properties",validate:function(u){return u===null||u&&a(y(u),function(m,h){return m&&c(["id","email","name"],h)},!0)}},metadata:{defaultValue:function(){return{}},message:"should be an object",validate:function(u){return typeof u=="object"&&u!==null}},logger:{defaultValue:function(){},message:"should be null or an object with methods { debug, info, warn, error }",validate:function(u){return!u||u&&a(["debug","info","warn","error"],function(m,h){return m&&typeof u[h]=="function"},!0)}},redactedKeys:{defaultValue:function(){return["password"]},message:"should be an array of strings|regexes",validate:function(u){return l(u)&&u.length===s(u,function(m){return typeof m=="string"||m&&typeof m.test=="function"}).length}},plugins:{defaultValue:function(){return[]},message:"should be an array of plugin objects",validate:function(u){return l(u)&&u.length===s(u,function(m){return m&&typeof m=="object"&&typeof m.load=="function"}).length}},featureFlags:{defaultValue:function(){return[]},message:'should be an array of objects that have a "name" property',validate:function(u){return l(u)&&u.length===s(u,function(m){return m&&typeof m=="object"&&typeof m.name=="string"}).length}},reportUnhandledPromiseRejectionsAsHandled:{defaultValue:function(){return!1},message:"should be true|false",validate:function(u){return u===!0||u===!1}},sendPayloadChecksums:{defaultValue:function(){return!1},message:"should be true|false",validate:function(u){return u===!0||u===!1}}};var R=ew(),P=function(u){for(var m=1;m<arguments.length;m++){var h=arguments[m];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(u[p]=h[p])}return u},M=function(u,m){return a(u,function(h,p,_,w){return h.concat(m(p,_,w))},[])},V=function(u,m,h,p){var _=p&&p.redactedKeys?p.redactedKeys:[],w=p&&p.redactedPaths?p.redactedPaths:[];return JSON.stringify(Vw(u,_,w),m,h)},Me=20,st=25e3,No=8,sr="...";function Ur(u){return u instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(u))}function fn(u){return"[Throws: "+(u?u.message:"?")+"]"}function Aa(u,m){for(var h=0,p=u.length;h<p;h++)if(u[h]===m)return!0;return!1}function Da(u,m){for(var h=0,p=u.length;h<p;h++)if(m.indexOf(u[h])===0)return!0;return!1}function Xl(u,m){for(var h=0,p=u.length;h<p;h++)if(typeof u[h]=="string"&&u[h].toLowerCase()===m.toLowerCase()||u[h]&&typeof u[h].test=="function"&&u[h].test(m))return!0;return!1}function Lw(u){return Object.prototype.toString.call(u)==="[object Array]"}function qw(u,m){try{return u[m]}catch(h){return fn(h)}}function Vw(u,m,h){var p=[],_=0;function w(z,D){function L(){return D.length>No&&_>st}if(_++,D.length>Me||L())return sr;if(z===null||typeof z!="object")return z;if(Aa(p,z))return"[Circular]";if(p.push(z),typeof z.toJSON=="function")try{_--;var Q=w(z.toJSON(),D);return p.pop(),Q}catch(gn){return fn(gn)}var de=Ur(z);if(de){_--;var Re=w({name:z.name,message:z.message},D);return p.pop(),Re}if(Lw(z)){for(var Le=[],lr=0,kt=z.length;lr<kt;lr++){if(L()){Le.push(sr);break}Le.push(w(z[lr],D.concat("[]")))}return p.pop(),Le}var hn={};try{for(var Ht in z)if(Object.prototype.hasOwnProperty.call(z,Ht)){if(Da(h,D.join("."))&&Xl(m,Ht)){hn[Ht]="[REDACTED]";continue}if(L()){hn[Ht]=sr;break}hn[Ht]=w(qw(z,Ht),D.concat(Ht))}}catch{}return p.pop(),hn}return w(u,[])}function sg(u,m,h,p){if(typeof h=="string"){p===void 0?p=null:p!==null&&typeof p!="string"&&(p=V(p));var _=m[h];if(typeof _=="number"){u[_]={name:h,variant:p};return}u.push({name:h,variant:p}),m[h]=u.length-1}}function Fw(u,m,h){if(l(m)){for(var p=0;p<m.length;++p){var _=m[p];_===null||typeof _!="object"||sg(u,h,_.name,_.variant)}return u}}function Bw(u){return M(s(u,Boolean),function(m){var h=m.name,p=m.variant,_={featureFlag:h};return typeof p=="string"&&(_.variant=p),_})}function Kw(u,m,h){var p=m[h];typeof p=="number"&&(u[p]=null,delete m[h])}var Mr={add:sg,clear:Kw,merge:Fw,toEventApi:Bw},Ca=function(u){return!!u&&(!!u.stack||!!u.stacktrace||!!u["opera#sourceloc"])&&typeof(u.stack||u.stacktrace||u["opera#sourceloc"])=="string"&&u.stack!==u.name+": "+u.message},Yl=rw(),Hw=function(u,m,h,p){var _;if(m){var w;if(h===null)return cg(u,m);typeof h=="object"&&(w=h),typeof h=="string"&&(w=(_={},_[h]=p,_)),w&&(m==="__proto__"||m==="constructor"||m==="prototype"||(u[m]||(u[m]={}),u[m]=P({},u[m],w)))}},Jw=function(u,m,h){if(typeof m=="string"){if(!h)return u[m];if(u[m])return u[m][h]}},cg=function(u,m,h){if(typeof m=="string"){if(!h){delete u[m];return}m==="__proto__"||m==="constructor"||m==="prototype"||u[m]&&delete u[m][h]}},pn={add:Hw,get:Jw,clear:cg};function Ql(){return Ql=Object.assign?Object.assign.bind():function(u){for(var m=1;m<arguments.length;m++){var h=arguments[m];for(var p in h)({}).hasOwnProperty.call(h,p)&&(u[p]=h[p])}return u},Ql.apply(null,arguments)}var Gw=ow(),cr=(function(){function u(h,p,_,w,z){_===void 0&&(_=[]),w===void 0&&(w=Yw()),this.apiKey=void 0,this.context=void 0,this.groupingHash=void 0,this.originalError=z,this._handledState=w,this.severity=this._handledState.severity,this.unhandled=this._handledState.unhandled,this.app={},this.device={},this.request={},this.response={},this.breadcrumbs=[],this.threads=[],this._metadata={},this._features=[],this._featuresIndex={},this._user={},this._session=void 0,this._correlation=void 0,this._groupingDiscriminator=void 0,this.errors=[lg(h,p,u.__type,_)]}var m=u.prototype;return m.addMetadata=function(p,_,w){return pn.add(this._metadata,p,_,w)},m.setTraceCorrelation=function(p,_){typeof p=="string"&&(this._correlation=Ql({traceId:p},typeof _=="string"?{spanId:_}:{}))},m.getGroupingDiscriminator=function(){return this._groupingDiscriminator},m.setGroupingDiscriminator=function(p){var _=this._groupingDiscriminator;return(typeof p=="string"||p===null||p===void 0)&&(this._groupingDiscriminator=p),_},m.getMetadata=function(p,_){return pn.get(this._metadata,p,_)},m.clearMetadata=function(p,_){return pn.clear(this._metadata,p,_)},m.addFeatureFlag=function(p,_){_===void 0&&(_=null),Mr.add(this._features,this._featuresIndex,p,_)},m.addFeatureFlags=function(p){Mr.merge(this._features,p,this._featuresIndex)},m.getFeatureFlags=function(){return Mr.toEventApi(this._features)},m.clearFeatureFlag=function(p){Mr.clear(this._features,this._featuresIndex,p)},m.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},m.getUser=function(){return this._user},m.setUser=function(p,_,w){this._user={id:p,email:_,name:w}},m.toJSON=function(){return{payloadVersion:"4",exceptions:M(this.errors,function(p){return P({},p,{message:p.errorMessage})}),severity:this.severity,unhandled:this._handledState.unhandled,severityReason:this._handledState.severityReason,app:this.app,device:this.device,request:this.request,response:this.response,breadcrumbs:this.breadcrumbs,context:this.context,groupingHash:this.groupingHash,groupingDiscriminator:this._groupingDiscriminator,metaData:this._metadata,user:this._user,session:this._session,featureFlags:this.getFeatureFlags(),correlation:this._correlation}},u})(),Ww=function(u){var m={file:u.fileName,method:Xw(u.functionName),lineNumber:u.lineNumber,columnNumber:u.columnNumber,code:void 0,inProject:void 0};return m.lineNumber>-1&&!m.file&&!m.method&&(m.file="global code"),m},Xw=function(u){return/^global code$/i.test(u)?"global code":u},Yw=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},ug=function(u){return typeof u=="string"?u:""};function lg(u,m,h,p){return{errorClass:ug(u),errorMessage:ug(m),type:h,stacktrace:a(p,function(_,w){var z=Ww(w);try{return JSON.stringify(z)==="{}"?_:_.concat(z)}catch{return _}},[])}}function dg(u){return u.cause?[u].concat(dg(u.cause)):[u]}cr.getStacktrace=function(u,m,h){if(Ca(u))return R.parse(u).slice(m);try{return s(Gw.backtrace(),function(p){return(p.functionName||"").indexOf("StackGenerator$$")===-1}).slice(1+h)}catch{return[]}},cr.create=function(u,m,h,p,_,w){_===void 0&&(_=0);var z=pg(u,m,p,w),D=z[0],L=z[1],Q;try{var de=cr.getStacktrace(D,L>0?1+L+_:0,1+_);Q=new cr(D.name,D.message,de,h,u)}catch{Q=new cr(D.name,D.message,[],h,u)}if(D.name==="InvalidError"&&Q.addMetadata(""+p,"non-error parameter",fg(u)),D.cause){var Re,Le=dg(D).slice(1),lr=M(Le,function(kt){var hn=Yl(kt)&&Ca(kt)?R.parse(kt):[],Ht=pg(kt,!0,"error cause"),gn=Ht[0];return gn.name==="InvalidError"&&Q.addMetadata("error cause",fg(kt)),lg(gn.name,gn.message,cr.__type,hn)});(Re=Q.errors).push.apply(Re,lr)}return Q};var fg=function(u){return u===null?"null":u===void 0?"undefined":u},pg=function(u,m,h,p){var _,w=0,z=function(D){var L=h==="error cause"?"was":"received";p&&p.warn(h+" "+L+' a non-error: "'+D+'"');var Q=new Error(h+" "+L+' a non-error. See "'+h+'" tab for more detail.');return Q.name="InvalidError",Q};if(!m)Yl(u)?_=u:(_=z(typeof u),w+=2);else switch(typeof u){case"string":case"number":case"boolean":_=new Error(String(u)),w+=1;break;case"function":_=z("function"),w+=2;break;case"object":u!==null&&Yl(u)?_=u:u!==null&&Qw(u)?(_=new Error(u.message||u.errorMessage),_.name=u.name||u.errorClass,w+=1):(_=z(u===null?"null":"unsupported object"),w+=2);break;default:_=z("nothing"),w+=2}if(!Ca(_))try{throw _}catch(D){Ca(D)&&(_=D,w=1)}return[_,w]};cr.__type="browserjs";var Qw=function(u){return(typeof u.name=="string"||typeof u.errorClass=="string")&&(typeof u.message=="string"||typeof u.errorMessage=="string")},Za=cr,ek=function(u,m,h){var p=0,_=function(){if(p>=u.length)return h(null,!0);m(u[p],function(w,z){if(w)return h(w);if(z===!1)return h(null,!1);p++,_()})};_()},tk=function(u,m,h,p){var _=function(w,z){if(typeof w!="function")return z(null);try{if(w.length!==2){var D=w(m);return D&&typeof D.then=="function"?D.then(function(L){return setTimeout(function(){return z(null,L)})},function(L){setTimeout(function(){return h(L),z(null,!0)})}):z(null,D)}w(m,function(L,Q){if(L)return h(L),z(null);z(null,Q)})}catch(L){h(L),z(null)}};ek(u,_,p)},ed=function(u,m,h,p){for(var _=!1,w=u.slice();!_&&w.length;)try{_=w.pop()(m)===!1}catch(z){p.error("Error occurred in "+h+" callback, continuing anyway\u2026"),p.error(z)}return _},Ua=function(m,h){var p="000000000"+m;return p.substr(p.length-h)},rk=require("os");function nk(){try{return rk.hostname()}catch{return process.env._CLUSTER_NETWORK_NAME_||process.env.COMPUTERNAME||"hostname"}}var mg=2,ok=Ua(process.pid.toString(36),mg),hg=nk(),ik=hg.length,ak=Ua(hg.split("").reduce(function(u,m){return+u+m.charCodeAt(0)},+ik+36).toString(36),mg),gg=function(){return ok+ak},sk=function(m){return typeof m=="string"&&/^c[a-z0-9]{20,32}$/.test(m)},Ro=0,td=4,Ma=36,vg=Math.pow(Ma,td);function _g(){return Ua((Math.random()*vg<<0).toString(Ma),td)}function ck(){return Ro=Ro<vg?Ro:0,Ro++,Ro-1}function rd(){var u="c",m=new Date().getTime().toString(Ma),h=Ua(ck().toString(Ma),td),p=gg(),_=_g()+_g();return u+m+h+p+_}rd.fingerprint=gg,rd.isCuid=sk;var uk=rd,lk=(function(){function u(){this.id=uk(),this.startedAt=new Date,this._handled=0,this._unhandled=0,this._user={},this.app={},this.device={}}var m=u.prototype;return m.getUser=function(){return this._user},m.setUser=function(p,_,w){this._user={id:p,email:_,name:w}},m.toJSON=function(){return{id:this.id,startedAt:this.startedAt,events:{handled:this._handled,unhandled:this._unhandled}}},m._track=function(p){this[p._handledState.unhandled?"_unhandled":"_handled"]+=1},u})(),nd=lk,dk=Mr.add,fk=Mr.clear,od=Mr.merge,pk="00000",mk="https://notify.bugsnag.smartbear.com",hk="https://sessions.bugsnag.smartbear.com",ur=function(){},gk=(function(){function u(h,p,_,w){var z=this;p===void 0&&(p=x.schema),_===void 0&&(_=[]),this._notifier=w,this._config={},this._schema=p,this._delivery={sendSession:ur,sendEvent:ur},this._logger={debug:ur,info:ur,warn:ur,error:ur},this._plugins={},this._breadcrumbs=[],this._session=null,this._metadata={},this._featuresIndex={},this._features=[],this._context=void 0,this._user={},this._groupingDiscriminator=void 0,this._cbs={e:[],s:[],sp:[],b:[]},this.Client=u,this.Event=Za,this.Breadcrumb=r,this.Session=nd,this._config=this._configure(h,_),M(_.concat(this._config.plugins),function(Q){Q&&z._loadPlugin(Q)}),this._depth=1;var D=this,L=this.notify;this.notify=function(){return L.apply(D,arguments)}}var m=u.prototype;return m.addMetadata=function(p,_,w){return pn.add(this._metadata,p,_,w)},m.getMetadata=function(p,_){return pn.get(this._metadata,p,_)},m.clearMetadata=function(p,_){return pn.clear(this._metadata,p,_)},m.addFeatureFlag=function(p,_){_===void 0&&(_=null),dk(this._features,this._featuresIndex,p,_)},m.addFeatureFlags=function(p){od(this._features,p,this._featuresIndex)},m.clearFeatureFlag=function(p){fk(this._features,this._featuresIndex,p)},m.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},m.getContext=function(){return this._context},m.setContext=function(p){this._context=p},m.getGroupingDiscriminator=function(){return this._groupingDiscriminator},m.setGroupingDiscriminator=function(p){var _=this._groupingDiscriminator;return(typeof p=="string"||p===null||p===void 0)&&(this._groupingDiscriminator=p),_},m._configure=function(p,_){var w=a(_,function(Q,de){return de&&de.configSchema?P({},Q,de.configSchema):Q},this._schema);p.endpoints||(p.sendPayloadChecksums="sendPayloadChecksums"in p?p.sendPayloadChecksums:!0);var z=a(y(w),function(Q,de){var Re=w[de].defaultValue(p[de]);if(p[de]!==void 0){var Le=w[de].validate(p[de]);Le?w[de].allowPartialObject?Q.config[de]=P(Re,p[de]):Q.config[de]=p[de]:(Q.errors[de]=w[de].message,Q.config[de]=Re)}else Q.config[de]=Re;return Q},{errors:{},config:{}}),D=z.errors,L=z.config;if(w.apiKey){if(!L.apiKey)throw new Error("No Bugsnag API Key set");/^[0-9a-f]{32}$/i.test(L.apiKey)||(D.apiKey="should be a string of 32 hexadecimal characters"),p.endpoints===void 0&&L.apiKey.indexOf(pk)===0&&(L.endpoints={notify:mk,sessions:hk})}return this._metadata=P({},L.metadata),od(this._features,L.featureFlags,this._featuresIndex),this._user=P({},L.user),this._context=L.context,L.logger&&(this._logger=L.logger),L.onError&&(this._cbs.e=this._cbs.e.concat(L.onError)),L.onBreadcrumb&&(this._cbs.b=this._cbs.b.concat(L.onBreadcrumb)),L.onSession&&(this._cbs.s=this._cbs.s.concat(L.onSession)),y(D).length&&this._logger.warn(vk(D,p)),L},m.getUser=function(){return this._user},m.setUser=function(p,_,w){this._user={id:p,email:_,name:w}},m._loadPlugin=function(p){var _=p.load(this);p.name&&(this._plugins["~"+p.name+"~"]=_)},m.getPlugin=function(p){return this._plugins["~"+p+"~"]},m._setDelivery=function(p){this._delivery=p(this)},m.startSession=function(){var p=new nd;p.app.releaseStage=this._config.releaseStage,p.app.version=this._config.appVersion,p.app.type=this._config.appType,p._user=P({},this._user);var _=ed(this._cbs.s,p,"onSession",this._logger);return _?(this._logger.debug("Session not started due to onSession callback"),this):this._sessionDelegate.startSession(this,p)},m.addOnError=function(p,_){_===void 0&&(_=!1),this._cbs.e[_?"unshift":"push"](p)},m.removeOnError=function(p){this._cbs.e=s(this._cbs.e,function(_){return _!==p})},m._addOnSessionPayload=function(p){this._cbs.sp.push(p)},m.addOnSession=function(p){this._cbs.s.push(p)},m.removeOnSession=function(p){this._cbs.s=s(this._cbs.s,function(_){return _!==p})},m.addOnBreadcrumb=function(p,_){_===void 0&&(_=!1),this._cbs.b[_?"unshift":"push"](p)},m.removeOnBreadcrumb=function(p){this._cbs.b=s(this._cbs.b,function(_){return _!==p})},m.pauseSession=function(){return this._sessionDelegate.pauseSession(this)},m.resumeSession=function(){return this._sessionDelegate.resumeSession(this)},m.leaveBreadcrumb=function(p,_,w){if(p=typeof p=="string"?p:"",w=typeof w=="string"&&c(i,w)?w:"manual",_=typeof _=="object"&&_!==null?_:{},!!p){var z=new r(p,_,w),D=ed(this._cbs.b,z,"onBreadcrumb",this._logger);if(D){this._logger.debug("Breadcrumb not attached due to onBreadcrumb callback");return}this._breadcrumbs.push(z),this._breadcrumbs.length>this._config.maxBreadcrumbs&&(this._breadcrumbs=this._breadcrumbs.slice(this._breadcrumbs.length-this._config.maxBreadcrumbs))}},m._isBreadcrumbTypeEnabled=function(p){var _=this._config.enabledBreadcrumbTypes;return _===null||c(_,p)},m.notify=function(p,_,w){w===void 0&&(w=ur);var z=Za.create(p,!0,void 0,"notify()",this._depth+1,this._logger);this._notify(z,_,w)},m._notify=function(p,_,w){var z=this;if(w===void 0&&(w=ur),p.app=P({},p.app,{releaseStage:this._config.releaseStage,version:this._config.appVersion,type:this._config.appType}),p.context=p.context||this._context,p._metadata=P({},p._metadata,this._metadata),p._user=P({},p._user,this._user),p.breadcrumbs=this._breadcrumbs.slice(),p.setGroupingDiscriminator(this._groupingDiscriminator),od(p._features,this._features,p._featuresIndex),this._config.enabledReleaseStages!==null&&!c(this._config.enabledReleaseStages,this._config.releaseStage))return this._logger.warn("Event not sent due to releaseStage/enabledReleaseStages configuration"),w(null,p);var D=p.severity,L=function(de){z._logger.error("Error occurred in onError callback, continuing anyway\u2026"),z._logger.error(de)},Q=[].concat(this._cbs.e).concat(_);tk(Q,p,L,function(de,Re){if(de&&L(de),!Re)return z._logger.debug("Event not sent due to onError callback"),w(null,p);z._isBreadcrumbTypeEnabled("error")&&u.prototype.leaveBreadcrumb.call(z,p.errors[0].errorClass,{errorClass:p.errors[0].errorClass,errorMessage:p.errors[0].errorMessage,severity:p.severity},"error"),D!==p.severity&&(p._handledState.severityReason={type:"userCallbackSetSeverity"}),p.unhandled!==p._handledState.unhandled&&(p._handledState.severityReason.unhandledOverridden=!0,p._handledState.unhandled=p.unhandled),z._session&&(z._session._track(p),p._session=z._session),z._delivery.sendEvent({apiKey:p.apiKey||z._config.apiKey,notifier:z._notifier,events:[p]},function(Le){return w(Le,p)})})},u})(),vk=function(u,m){var h=new Error(`Invalid configuration
|
|
21
|
-
`+M(
|
|
17
|
+
`),l=[],d=2,f=c.length;d<f;d+=2){var _=s.exec(c[d]);_&&l.push(new t({fileName:_[2],lineNumber:_[1],source:c[d]}))}return l},parseOpera10:function(a){for(var s=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,c=a.stacktrace.split(`
|
|
18
|
+
`),l=[],d=0,f=c.length;d<f;d+=2){var _=s.exec(c[d]);_&&l.push(new t({functionName:_[3]||void 0,fileName:_[2],lineNumber:_[1],source:c[d]}))}return l},parseOpera11:function(a){var s=a.stack.split(`
|
|
19
|
+
`).filter(function(c){return!!c.match(n)&&!c.match(/^Error created at/)},this);return s.map(function(c){var l=c.split("@"),d=this.extractLocation(l.pop()),f=l.shift()||"",_=f.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,v;f.match(/\(([^)]*)\)/)&&(v=f.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var g=v===void 0||v==="[arguments not available]"?void 0:v.split(",");return new t({functionName:_,args:g,fileName:d[0],lineNumber:d[1],columnNumber:d[2],source:c})},this)}}})});var cw=A((e9,sw)=>{sw.exports=MA;function MA(e){switch(Object.prototype.toString.call(e)){case"[object Error]":return!0;case"[object Exception]":return!0;case"[object DOMException]":return!0;default:return e instanceof Error}}});var lw=A((eg,uw)=>{(function(e,t){"use strict";typeof define=="function"&&define.amd?define("stack-generator",["stackframe"],t):typeof eg=="object"?uw.exports=t(Yh()):e.StackGenerator=t(e.StackFrame)})(eg,function(e){return{backtrace:function(n){var o=[],r=10;typeof n=="object"&&typeof n.maxStackSize=="number"&&(r=n.maxStackSize);for(var i=arguments.callee;i&&o.length<r&&i.arguments;){for(var a=new Array(i.arguments.length),s=0;s<a.length;++s)a[s]=i.arguments[s];/function(?:\s+([\w$]+))+\s*\(/.test(i.toString())?o.push(new e({functionName:RegExp.$1||void 0,args:a})):o.push(new e({args:a}));try{i=i.caller}catch{break}}return o}}})});var pw=A((t9,fw)=>{fw.exports=dw;function dw(e,t){if(e&&t)return dw(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(o){n[o]=e[o]}),n;function n(){for(var o=new Array(arguments.length),r=0;r<o.length;r++)o[r]=arguments[r];var i=e.apply(this,o),a=o[o.length-1];return typeof i=="function"&&i!==a&&Object.keys(a).forEach(function(s){i[s]=a[s]}),i}}});var rg=A((r9,tg)=>{var mw=pw();tg.exports=mw(Jl);tg.exports.strict=mw(hw);Jl.proto=Jl(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Jl(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return hw(this)},configurable:!0})});function Jl(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function hw(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}});var _w=A((n9,vw)=>{var LA=rg(),qA=function(){},VA=global.Bare?queueMicrotask:process.nextTick.bind(process),FA=function(e){return e.setHeader&&typeof e.abort=="function"},BA=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},gw=function(e,t,n){if(typeof t=="function")return gw(e,null,t);t||(t={}),n=LA(n||qA);var o=e._writableState,r=e._readableState,i=t.readable||t.readable!==!1&&e.readable,a=t.writable||t.writable!==!1&&e.writable,s=!1,c=function(){e.writable||l()},l=function(){a=!1,i||n.call(e)},d=function(){i=!1,a||n.call(e)},f=function(x){n.call(e,x?new Error("exited with error code: "+x):null)},_=function(x){n.call(e,x)},v=function(){VA(g)},g=function(){if(!s){if(i&&!(r&&r.ended&&!r.destroyed))return n.call(e,new Error("premature close"));if(a&&!(o&&o.ended&&!o.destroyed))return n.call(e,new Error("premature close"))}},b=function(){e.req.on("finish",l)};return FA(e)?(e.on("complete",l),e.on("abort",v),e.req?b():e.on("request",b)):a&&!o&&(e.on("end",c),e.on("close",c)),BA(e)&&e.on("exit",f),e.on("end",d),e.on("finish",l),t.error!==!1&&e.on("error",_),e.on("close",v),function(){s=!0,e.removeListener("complete",l),e.removeListener("abort",v),e.removeListener("request",b),e.req&&e.req.removeListener("finish",l),e.removeListener("end",c),e.removeListener("close",c),e.removeListener("finish",l),e.removeListener("exit",f),e.removeListener("end",d),e.removeListener("error",_),e.removeListener("close",v)}};vw.exports=gw});var $w=A((o9,bw)=>{var KA=rg(),HA=_w(),Gl;try{Gl=require("fs")}catch{}var Ra=function(){},JA=typeof process>"u"?!1:/^v?\.0/.test(process.version),Wl=function(e){return typeof e=="function"},GA=function(e){return!JA||!Gl?!1:(e instanceof(Gl.ReadStream||Ra)||e instanceof(Gl.WriteStream||Ra))&&Wl(e.close)},WA=function(e){return e.setHeader&&Wl(e.abort)},XA=function(e,t,n,o){o=KA(o);var r=!1;e.on("close",function(){r=!0}),HA(e,{readable:t,writable:n},function(a){if(a)return o(a);r=!0,o()});var i=!1;return function(a){if(!r&&!i){if(i=!0,GA(e))return e.close(Ra);if(WA(e))return e.abort();if(Wl(e.destroy))return e.destroy();o(a||new Error("stream was destroyed"))}}},yw=function(e){e()},YA=function(e,t){return e.pipe(t)},QA=function(){var e=Array.prototype.slice.call(arguments),t=Wl(e[e.length-1]||Ra)&&e.pop()||Ra;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var n,o=e.map(function(r,i){var a=i<e.length-1,s=i>0;return XA(r,a,s,function(c){n||(n=c),c&&o.forEach(yw),!a&&(o.forEach(yw),t(n))})});return e.reduce(YA)};bw.exports=QA});var ww=A((i9,Ro)=>{var ng=require("stream"),e4=require("util"),t4=require("timers");Ro.exports=function(e,t){return Ro.exports.createStream(e,t)};Ro.exports.createStream=function(e,t){return e?xw(e,t):new Mr(t)};Ro.exports.createLineStream=function(e){return console.log("WARNING: byline#createLineStream is deprecated and will be removed soon"),xw(e)};function xw(e,t){if(!e)throw new Error("expected readStream");if(!e.readable)throw new Error("readStream must be readable");var n=new Mr(t);return e.pipe(n),n}Ro.exports.LineStream=Mr;function Mr(e){ng.Transform.call(this,e),e=e||{},this._readableState.objectMode=!0,this._lineBuffer=[],this._keepEmptyLines=e.keepEmptyLines||!1,this._lastChunkEndedWithCR=!1;var t=this;this.on("pipe",function(n){t.encoding||n instanceof ng.Readable&&(t.encoding=n._readableState.encoding)})}e4.inherits(Mr,ng.Transform);Mr.prototype._transform=function(e,t,n){t=t||"utf8",Buffer.isBuffer(e)&&(t=="buffer"?(e=e.toString(),t="utf8"):e=e.toString(t)),this._chunkEncoding=t;var o=e.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/g);this._lastChunkEndedWithCR&&e[0]==`
|
|
20
|
+
`&&o.shift(),this._lineBuffer.length>0&&(this._lineBuffer[this._lineBuffer.length-1]+=o[0],o.shift()),this._lastChunkEndedWithCR=e[e.length-1]=="\r",this._lineBuffer=this._lineBuffer.concat(o),this._pushBuffer(t,1,n)};Mr.prototype._pushBuffer=function(e,t,n){for(;this._lineBuffer.length>t;){var o=this._lineBuffer.shift();if((this._keepEmptyLines||o.length>0)&&!this.push(this._reencode(o,e))){var r=this;t4.setImmediate(function(){r._pushBuffer(e,t,n)});return}}n()};Mr.prototype._flush=function(e){this._pushBuffer(this._chunkEncoding,0,e)};Mr.prototype._reencode=function(e,t){return this.encoding&&this.encoding!=t?new Buffer(e,t).toString(this.encoding):this.encoding?e:new Buffer(e,t)}});var Sw=A((kw,og)=>{(function(e){if(typeof kw=="object"&&typeof og<"u")og.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var t;typeof window<"u"?t=window:typeof global<"u"?t=global:typeof self<"u"?t=self:t=this,t.bugsnag=e()}})(function(){var e,t,n,o=(function(){function u(h,p,y,w){w===void 0&&(w=new Date),this.type=y,this.message=h,this.metadata=p,this.timestamp=w}var m=u.prototype;return m.toJSON=function(){return{type:this.type,name:this.message,timestamp:this.timestamp,metaData:this.metadata}},u})(),r=o,i=["navigation","request","process","log","user","state","error","manual"],a=function(u,m,h){for(var p=h,y=0,w=u.length;y<w;y++)p=m(p,u[y],y,u);return p},s=function(u,m){return a(u,function(h,p,y,w){return m(p,y,w)?h.concat(p):h},[])},c=function(u,m){return a(u,function(h,p,y,w){return h===!0||p===m},!1)},l=function(u){return Object.prototype.toString.call(u)==="[object Array]"},d=!{toString:null}.propertyIsEnumerable("toString"),f=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],_=function(u){var m=[],h;for(h in u)Object.prototype.hasOwnProperty.call(u,h)&&m.push(h);if(!d)return m;for(var p=0,y=f.length;p<y;p++)Object.prototype.hasOwnProperty.call(u,f[p])&&m.push(f[p]);return m},v=function(u,m){return u===void 0&&(u=1),m===void 0&&(m=1/0),function(h){return typeof h=="number"&&parseInt(""+h,10)===h&&h>=u&&h<=m}},g=function(u){return typeof u=="function"||l(u)&&s(u,function(m){return typeof m=="function"}).length===u.length},b=function(u){return typeof u=="string"&&!!u.length},x={},I=function(){return{unhandledExceptions:!0,unhandledRejections:!0}};x.schema={apiKey:{defaultValue:function(){return null},message:"is required",validate:b},appVersion:{defaultValue:function(){},message:"should be a string",validate:function(u){return u===void 0||b(u)}},appType:{defaultValue:function(){},message:"should be a string",validate:function(u){return u===void 0||b(u)}},autoDetectErrors:{defaultValue:function(){return!0},message:"should be true|false",validate:function(u){return u===!0||u===!1}},enabledErrorTypes:{defaultValue:function(){return I()},message:"should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }",allowPartialObject:!0,validate:function(u){if(typeof u!="object"||!u)return!1;var m=_(u),h=_(I());return!(s(m,function(p){return c(h,p)}).length<m.length||s(_(u),function(p){return typeof u[p]!="boolean"}).length>0)}},onError:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:g},onSession:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:g},onBreadcrumb:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:g},endpoints:{defaultValue:function(u){return typeof u>"u"?{notify:"https://notify.bugsnag.com",sessions:"https://sessions.bugsnag.com"}:{notify:null,sessions:null}},message:"should be an object containing endpoint URLs { notify, sessions }",validate:function(u){return u&&typeof u=="object"&&b(u.notify)&&b(u.sessions)&&s(_(u),function(m){return!c(["notify","sessions"],m)}).length===0}},autoTrackSessions:{defaultValue:function(u){return!0},message:"should be true|false",validate:function(u){return u===!0||u===!1}},enabledReleaseStages:{defaultValue:function(){return null},message:"should be an array of strings",validate:function(u){return u===null||l(u)&&s(u,function(m){return typeof m=="string"}).length===u.length}},releaseStage:{defaultValue:function(){return"production"},message:"should be a string",validate:function(u){return typeof u=="string"&&u.length}},maxBreadcrumbs:{defaultValue:function(){return 25},message:"should be a number \u2264100",validate:function(u){return v(0,100)(u)}},enabledBreadcrumbTypes:{defaultValue:function(){return i},message:"should be null or a list of available breadcrumb types ("+i.join(",")+")",validate:function(u){return u===null||l(u)&&a(u,function(m,h){return m===!1?m:c(i,h)},!0)}},context:{defaultValue:function(){},message:"should be a string",validate:function(u){return u===void 0||typeof u=="string"}},user:{defaultValue:function(){return{}},message:"should be an object with { id, email, name } properties",validate:function(u){return u===null||u&&a(_(u),function(m,h){return m&&c(["id","email","name"],h)},!0)}},metadata:{defaultValue:function(){return{}},message:"should be an object",validate:function(u){return typeof u=="object"&&u!==null}},logger:{defaultValue:function(){},message:"should be null or an object with methods { debug, info, warn, error }",validate:function(u){return!u||u&&a(["debug","info","warn","error"],function(m,h){return m&&typeof u[h]=="function"},!0)}},redactedKeys:{defaultValue:function(){return["password"]},message:"should be an array of strings|regexes",validate:function(u){return l(u)&&u.length===s(u,function(m){return typeof m=="string"||m&&typeof m.test=="function"}).length}},plugins:{defaultValue:function(){return[]},message:"should be an array of plugin objects",validate:function(u){return l(u)&&u.length===s(u,function(m){return m&&typeof m=="object"&&typeof m.load=="function"}).length}},featureFlags:{defaultValue:function(){return[]},message:'should be an array of objects that have a "name" property',validate:function(u){return l(u)&&u.length===s(u,function(m){return m&&typeof m=="object"&&typeof m.name=="string"}).length}},reportUnhandledPromiseRejectionsAsHandled:{defaultValue:function(){return!1},message:"should be true|false",validate:function(u){return u===!0||u===!1}},sendPayloadChecksums:{defaultValue:function(){return!1},message:"should be true|false",validate:function(u){return u===!0||u===!1}}};var R=aw(),P=function(u){for(var m=1;m<arguments.length;m++){var h=arguments[m];for(var p in h)Object.prototype.hasOwnProperty.call(h,p)&&(u[p]=h[p])}return u},M=function(u,m){return a(u,function(h,p,y,w){return h.concat(m(p,y,w))},[])},V=function(u,m,h,p){var y=p&&p.redactedKeys?p.redactedKeys:[],w=p&&p.redactedPaths?p.redactedPaths:[];return JSON.stringify(ek(u,y,w),m,h)},Me=20,ct=25e3,Ao=8,ur="...";function Lr(u){return u instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(u))}function mn(u){return"[Throws: "+(u?u.message:"?")+"]"}function Ca(u,m){for(var h=0,p=u.length;h<p;h++)if(u[h]===m)return!0;return!1}function Ua(u,m){for(var h=0,p=u.length;h<p;h++)if(m.indexOf(u[h])===0)return!0;return!1}function rd(u,m){for(var h=0,p=u.length;h<p;h++)if(typeof u[h]=="string"&&u[h].toLowerCase()===m.toLowerCase()||u[h]&&typeof u[h].test=="function"&&u[h].test(m))return!0;return!1}function Yw(u){return Object.prototype.toString.call(u)==="[object Array]"}function Qw(u,m){try{return u[m]}catch(h){return mn(h)}}function ek(u,m,h){var p=[],y=0;function w(z,D){function L(){return D.length>Ao&&y>ct}if(y++,D.length>Me||L())return ur;if(z===null||typeof z!="object")return z;if(Ca(p,z))return"[Circular]";if(p.push(z),typeof z.toJSON=="function")try{y--;var Q=w(z.toJSON(),D);return p.pop(),Q}catch(_n){return mn(_n)}var de=Lr(z);if(de){y--;var Re=w({name:z.name,message:z.message},D);return p.pop(),Re}if(Yw(z)){for(var Le=[],fr=0,St=z.length;fr<St;fr++){if(L()){Le.push(ur);break}Le.push(w(z[fr],D.concat("[]")))}return p.pop(),Le}var vn={};try{for(var Gt in z)if(Object.prototype.hasOwnProperty.call(z,Gt)){if(Ua(h,D.join("."))&&rd(m,Gt)){vn[Gt]="[REDACTED]";continue}if(L()){vn[Gt]=ur;break}vn[Gt]=w(Qw(z,Gt),D.concat(Gt))}}catch{}return p.pop(),vn}return w(u,[])}function pg(u,m,h,p){if(typeof h=="string"){p===void 0?p=null:p!==null&&typeof p!="string"&&(p=V(p));var y=m[h];if(typeof y=="number"){u[y]={name:h,variant:p};return}u.push({name:h,variant:p}),m[h]=u.length-1}}function tk(u,m,h){if(l(m)){for(var p=0;p<m.length;++p){var y=m[p];y===null||typeof y!="object"||pg(u,h,y.name,y.variant)}return u}}function rk(u){return M(s(u,Boolean),function(m){var h=m.name,p=m.variant,y={featureFlag:h};return typeof p=="string"&&(y.variant=p),y})}function nk(u,m,h){var p=m[h];typeof p=="number"&&(u[p]=null,delete m[h])}var qr={add:pg,clear:nk,merge:tk,toEventApi:rk},Za=function(u){return!!u&&(!!u.stack||!!u.stacktrace||!!u["opera#sourceloc"])&&typeof(u.stack||u.stacktrace||u["opera#sourceloc"])=="string"&&u.stack!==u.name+": "+u.message},nd=cw(),ok=function(u,m,h,p){var y;if(m){var w;if(h===null)return mg(u,m);typeof h=="object"&&(w=h),typeof h=="string"&&(w=(y={},y[h]=p,y)),w&&(m==="__proto__"||m==="constructor"||m==="prototype"||(u[m]||(u[m]={}),u[m]=P({},u[m],w)))}},ik=function(u,m,h){if(typeof m=="string"){if(!h)return u[m];if(u[m])return u[m][h]}},mg=function(u,m,h){if(typeof m=="string"){if(!h){delete u[m];return}m==="__proto__"||m==="constructor"||m==="prototype"||u[m]&&delete u[m][h]}},hn={add:ok,get:ik,clear:mg};function od(){return od=Object.assign?Object.assign.bind():function(u){for(var m=1;m<arguments.length;m++){var h=arguments[m];for(var p in h)({}).hasOwnProperty.call(h,p)&&(u[p]=h[p])}return u},od.apply(null,arguments)}var ak=lw(),lr=(function(){function u(h,p,y,w,z){y===void 0&&(y=[]),w===void 0&&(w=uk()),this.apiKey=void 0,this.context=void 0,this.groupingHash=void 0,this.originalError=z,this._handledState=w,this.severity=this._handledState.severity,this.unhandled=this._handledState.unhandled,this.app={},this.device={},this.request={},this.response={},this.breadcrumbs=[],this.threads=[],this._metadata={},this._features=[],this._featuresIndex={},this._user={},this._session=void 0,this._correlation=void 0,this._groupingDiscriminator=void 0,this.errors=[gg(h,p,u.__type,y)]}var m=u.prototype;return m.addMetadata=function(p,y,w){return hn.add(this._metadata,p,y,w)},m.setTraceCorrelation=function(p,y){typeof p=="string"&&(this._correlation=od({traceId:p},typeof y=="string"?{spanId:y}:{}))},m.getGroupingDiscriminator=function(){return this._groupingDiscriminator},m.setGroupingDiscriminator=function(p){var y=this._groupingDiscriminator;return(typeof p=="string"||p===null||p===void 0)&&(this._groupingDiscriminator=p),y},m.getMetadata=function(p,y){return hn.get(this._metadata,p,y)},m.clearMetadata=function(p,y){return hn.clear(this._metadata,p,y)},m.addFeatureFlag=function(p,y){y===void 0&&(y=null),qr.add(this._features,this._featuresIndex,p,y)},m.addFeatureFlags=function(p){qr.merge(this._features,p,this._featuresIndex)},m.getFeatureFlags=function(){return qr.toEventApi(this._features)},m.clearFeatureFlag=function(p){qr.clear(this._features,this._featuresIndex,p)},m.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},m.getUser=function(){return this._user},m.setUser=function(p,y,w){this._user={id:p,email:y,name:w}},m.toJSON=function(){return{payloadVersion:"4",exceptions:M(this.errors,function(p){return P({},p,{message:p.errorMessage})}),severity:this.severity,unhandled:this._handledState.unhandled,severityReason:this._handledState.severityReason,app:this.app,device:this.device,request:this.request,response:this.response,breadcrumbs:this.breadcrumbs,context:this.context,groupingHash:this.groupingHash,groupingDiscriminator:this._groupingDiscriminator,metaData:this._metadata,user:this._user,session:this._session,featureFlags:this.getFeatureFlags(),correlation:this._correlation}},u})(),sk=function(u){var m={file:u.fileName,method:ck(u.functionName),lineNumber:u.lineNumber,columnNumber:u.columnNumber,code:void 0,inProject:void 0};return m.lineNumber>-1&&!m.file&&!m.method&&(m.file="global code"),m},ck=function(u){return/^global code$/i.test(u)?"global code":u},uk=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},hg=function(u){return typeof u=="string"?u:""};function gg(u,m,h,p){return{errorClass:hg(u),errorMessage:hg(m),type:h,stacktrace:a(p,function(y,w){var z=sk(w);try{return JSON.stringify(z)==="{}"?y:y.concat(z)}catch{return y}},[])}}function vg(u){return u.cause?[u].concat(vg(u.cause)):[u]}lr.getStacktrace=function(u,m,h){if(Za(u))return R.parse(u).slice(m);try{return s(ak.backtrace(),function(p){return(p.functionName||"").indexOf("StackGenerator$$")===-1}).slice(1+h)}catch{return[]}},lr.create=function(u,m,h,p,y,w){y===void 0&&(y=0);var z=yg(u,m,p,w),D=z[0],L=z[1],Q;try{var de=lr.getStacktrace(D,L>0?1+L+y:0,1+y);Q=new lr(D.name,D.message,de,h,u)}catch{Q=new lr(D.name,D.message,[],h,u)}if(D.name==="InvalidError"&&Q.addMetadata(""+p,"non-error parameter",_g(u)),D.cause){var Re,Le=vg(D).slice(1),fr=M(Le,function(St){var vn=nd(St)&&Za(St)?R.parse(St):[],Gt=yg(St,!0,"error cause"),_n=Gt[0];return _n.name==="InvalidError"&&Q.addMetadata("error cause",_g(St)),gg(_n.name,_n.message,lr.__type,vn)});(Re=Q.errors).push.apply(Re,fr)}return Q};var _g=function(u){return u===null?"null":u===void 0?"undefined":u},yg=function(u,m,h,p){var y,w=0,z=function(D){var L=h==="error cause"?"was":"received";p&&p.warn(h+" "+L+' a non-error: "'+D+'"');var Q=new Error(h+" "+L+' a non-error. See "'+h+'" tab for more detail.');return Q.name="InvalidError",Q};if(!m)nd(u)?y=u:(y=z(typeof u),w+=2);else switch(typeof u){case"string":case"number":case"boolean":y=new Error(String(u)),w+=1;break;case"function":y=z("function"),w+=2;break;case"object":u!==null&&nd(u)?y=u:u!==null&&lk(u)?(y=new Error(u.message||u.errorMessage),y.name=u.name||u.errorClass,w+=1):(y=z(u===null?"null":"unsupported object"),w+=2);break;default:y=z("nothing"),w+=2}if(!Za(y))try{throw y}catch(D){Za(D)&&(y=D,w=1)}return[y,w]};lr.__type="browserjs";var lk=function(u){return(typeof u.name=="string"||typeof u.errorClass=="string")&&(typeof u.message=="string"||typeof u.errorMessage=="string")},Ma=lr,dk=function(u,m,h){var p=0,y=function(){if(p>=u.length)return h(null,!0);m(u[p],function(w,z){if(w)return h(w);if(z===!1)return h(null,!1);p++,y()})};y()},fk=function(u,m,h,p){var y=function(w,z){if(typeof w!="function")return z(null);try{if(w.length!==2){var D=w(m);return D&&typeof D.then=="function"?D.then(function(L){return setTimeout(function(){return z(null,L)})},function(L){setTimeout(function(){return h(L),z(null,!0)})}):z(null,D)}w(m,function(L,Q){if(L)return h(L),z(null);z(null,Q)})}catch(L){h(L),z(null)}};dk(u,y,p)},id=function(u,m,h,p){for(var y=!1,w=u.slice();!y&&w.length;)try{y=w.pop()(m)===!1}catch(z){p.error("Error occurred in "+h+" callback, continuing anyway\u2026"),p.error(z)}return y},La=function(m,h){var p="000000000"+m;return p.substr(p.length-h)},pk=require("os");function mk(){try{return pk.hostname()}catch{return process.env._CLUSTER_NETWORK_NAME_||process.env.COMPUTERNAME||"hostname"}}var bg=2,hk=La(process.pid.toString(36),bg),$g=mk(),gk=$g.length,vk=La($g.split("").reduce(function(u,m){return+u+m.charCodeAt(0)},+gk+36).toString(36),bg),xg=function(){return hk+vk},_k=function(m){return typeof m=="string"&&/^c[a-z0-9]{20,32}$/.test(m)},Do=0,ad=4,qa=36,wg=Math.pow(qa,ad);function kg(){return La((Math.random()*wg<<0).toString(qa),ad)}function yk(){return Do=Do<wg?Do:0,Do++,Do-1}function sd(){var u="c",m=new Date().getTime().toString(qa),h=La(yk().toString(qa),ad),p=xg(),y=kg()+kg();return u+m+h+p+y}sd.fingerprint=xg,sd.isCuid=_k;var bk=sd,$k=(function(){function u(){this.id=bk(),this.startedAt=new Date,this._handled=0,this._unhandled=0,this._user={},this.app={},this.device={}}var m=u.prototype;return m.getUser=function(){return this._user},m.setUser=function(p,y,w){this._user={id:p,email:y,name:w}},m.toJSON=function(){return{id:this.id,startedAt:this.startedAt,events:{handled:this._handled,unhandled:this._unhandled}}},m._track=function(p){this[p._handledState.unhandled?"_unhandled":"_handled"]+=1},u})(),cd=$k,xk=qr.add,wk=qr.clear,ud=qr.merge,kk="00000",Sk="https://notify.bugsnag.smartbear.com",zk="https://sessions.bugsnag.smartbear.com",dr=function(){},Ik=(function(){function u(h,p,y,w){var z=this;p===void 0&&(p=x.schema),y===void 0&&(y=[]),this._notifier=w,this._config={},this._schema=p,this._delivery={sendSession:dr,sendEvent:dr},this._logger={debug:dr,info:dr,warn:dr,error:dr},this._plugins={},this._breadcrumbs=[],this._session=null,this._metadata={},this._featuresIndex={},this._features=[],this._context=void 0,this._user={},this._groupingDiscriminator=void 0,this._cbs={e:[],s:[],sp:[],b:[]},this.Client=u,this.Event=Ma,this.Breadcrumb=r,this.Session=cd,this._config=this._configure(h,y),M(y.concat(this._config.plugins),function(Q){Q&&z._loadPlugin(Q)}),this._depth=1;var D=this,L=this.notify;this.notify=function(){return L.apply(D,arguments)}}var m=u.prototype;return m.addMetadata=function(p,y,w){return hn.add(this._metadata,p,y,w)},m.getMetadata=function(p,y){return hn.get(this._metadata,p,y)},m.clearMetadata=function(p,y){return hn.clear(this._metadata,p,y)},m.addFeatureFlag=function(p,y){y===void 0&&(y=null),xk(this._features,this._featuresIndex,p,y)},m.addFeatureFlags=function(p){ud(this._features,p,this._featuresIndex)},m.clearFeatureFlag=function(p){wk(this._features,this._featuresIndex,p)},m.clearFeatureFlags=function(){this._features=[],this._featuresIndex={}},m.getContext=function(){return this._context},m.setContext=function(p){this._context=p},m.getGroupingDiscriminator=function(){return this._groupingDiscriminator},m.setGroupingDiscriminator=function(p){var y=this._groupingDiscriminator;return(typeof p=="string"||p===null||p===void 0)&&(this._groupingDiscriminator=p),y},m._configure=function(p,y){var w=a(y,function(Q,de){return de&&de.configSchema?P({},Q,de.configSchema):Q},this._schema);p.endpoints||(p.sendPayloadChecksums="sendPayloadChecksums"in p?p.sendPayloadChecksums:!0);var z=a(_(w),function(Q,de){var Re=w[de].defaultValue(p[de]);if(p[de]!==void 0){var Le=w[de].validate(p[de]);Le?w[de].allowPartialObject?Q.config[de]=P(Re,p[de]):Q.config[de]=p[de]:(Q.errors[de]=w[de].message,Q.config[de]=Re)}else Q.config[de]=Re;return Q},{errors:{},config:{}}),D=z.errors,L=z.config;if(w.apiKey){if(!L.apiKey)throw new Error("No Bugsnag API Key set");/^[0-9a-f]{32}$/i.test(L.apiKey)||(D.apiKey="should be a string of 32 hexadecimal characters"),p.endpoints===void 0&&L.apiKey.indexOf(kk)===0&&(L.endpoints={notify:Sk,sessions:zk})}return this._metadata=P({},L.metadata),ud(this._features,L.featureFlags,this._featuresIndex),this._user=P({},L.user),this._context=L.context,L.logger&&(this._logger=L.logger),L.onError&&(this._cbs.e=this._cbs.e.concat(L.onError)),L.onBreadcrumb&&(this._cbs.b=this._cbs.b.concat(L.onBreadcrumb)),L.onSession&&(this._cbs.s=this._cbs.s.concat(L.onSession)),_(D).length&&this._logger.warn(Ek(D,p)),L},m.getUser=function(){return this._user},m.setUser=function(p,y,w){this._user={id:p,email:y,name:w}},m._loadPlugin=function(p){var y=p.load(this);p.name&&(this._plugins["~"+p.name+"~"]=y)},m.getPlugin=function(p){return this._plugins["~"+p+"~"]},m._setDelivery=function(p){this._delivery=p(this)},m.startSession=function(){var p=new cd;p.app.releaseStage=this._config.releaseStage,p.app.version=this._config.appVersion,p.app.type=this._config.appType,p._user=P({},this._user);var y=id(this._cbs.s,p,"onSession",this._logger);return y?(this._logger.debug("Session not started due to onSession callback"),this):this._sessionDelegate.startSession(this,p)},m.addOnError=function(p,y){y===void 0&&(y=!1),this._cbs.e[y?"unshift":"push"](p)},m.removeOnError=function(p){this._cbs.e=s(this._cbs.e,function(y){return y!==p})},m._addOnSessionPayload=function(p){this._cbs.sp.push(p)},m.addOnSession=function(p){this._cbs.s.push(p)},m.removeOnSession=function(p){this._cbs.s=s(this._cbs.s,function(y){return y!==p})},m.addOnBreadcrumb=function(p,y){y===void 0&&(y=!1),this._cbs.b[y?"unshift":"push"](p)},m.removeOnBreadcrumb=function(p){this._cbs.b=s(this._cbs.b,function(y){return y!==p})},m.pauseSession=function(){return this._sessionDelegate.pauseSession(this)},m.resumeSession=function(){return this._sessionDelegate.resumeSession(this)},m.leaveBreadcrumb=function(p,y,w){if(p=typeof p=="string"?p:"",w=typeof w=="string"&&c(i,w)?w:"manual",y=typeof y=="object"&&y!==null?y:{},!!p){var z=new r(p,y,w),D=id(this._cbs.b,z,"onBreadcrumb",this._logger);if(D){this._logger.debug("Breadcrumb not attached due to onBreadcrumb callback");return}this._breadcrumbs.push(z),this._breadcrumbs.length>this._config.maxBreadcrumbs&&(this._breadcrumbs=this._breadcrumbs.slice(this._breadcrumbs.length-this._config.maxBreadcrumbs))}},m._isBreadcrumbTypeEnabled=function(p){var y=this._config.enabledBreadcrumbTypes;return y===null||c(y,p)},m.notify=function(p,y,w){w===void 0&&(w=dr);var z=Ma.create(p,!0,void 0,"notify()",this._depth+1,this._logger);this._notify(z,y,w)},m._notify=function(p,y,w){var z=this;if(w===void 0&&(w=dr),p.app=P({},p.app,{releaseStage:this._config.releaseStage,version:this._config.appVersion,type:this._config.appType}),p.context=p.context||this._context,p._metadata=P({},p._metadata,this._metadata),p._user=P({},p._user,this._user),p.breadcrumbs=this._breadcrumbs.slice(),p.setGroupingDiscriminator(this._groupingDiscriminator),ud(p._features,this._features,p._featuresIndex),this._config.enabledReleaseStages!==null&&!c(this._config.enabledReleaseStages,this._config.releaseStage))return this._logger.warn("Event not sent due to releaseStage/enabledReleaseStages configuration"),w(null,p);var D=p.severity,L=function(de){z._logger.error("Error occurred in onError callback, continuing anyway\u2026"),z._logger.error(de)},Q=[].concat(this._cbs.e).concat(y);fk(Q,p,L,function(de,Re){if(de&&L(de),!Re)return z._logger.debug("Event not sent due to onError callback"),w(null,p);z._isBreadcrumbTypeEnabled("error")&&u.prototype.leaveBreadcrumb.call(z,p.errors[0].errorClass,{errorClass:p.errors[0].errorClass,errorMessage:p.errors[0].errorMessage,severity:p.severity},"error"),D!==p.severity&&(p._handledState.severityReason={type:"userCallbackSetSeverity"}),p.unhandled!==p._handledState.unhandled&&(p._handledState.severityReason.unhandledOverridden=!0,p._handledState.unhandled=p.unhandled),z._session&&(z._session._track(p),p._session=z._session),z._delivery.sendEvent({apiKey:p.apiKey||z._config.apiKey,notifier:z._notifier,events:[p]},function(Le){return w(Le,p)})})},u})(),Ek=function(u,m){var h=new Error(`Invalid configuration
|
|
21
|
+
`+M(_(u),function(p){return" - "+p+" "+u[p]+", got "+Tk(m[p])}).join(`
|
|
22
22
|
|
|
23
|
-
`));return h},
|
|
23
|
+
`));return h},Tk=function(u){switch(typeof u){case"string":case"number":case"object":return JSON.stringify(u);default:return String(u)}},Va=Ik,Fa={},Sg=["events.[].metaData","events.[].breadcrumbs.[].metaData","events.[].request","events.[].response"];Fa.event=function(u,m){var h=V(u,null,null,{redactedPaths:Sg,redactedKeys:m});return h.length>1e6&&(u.events[0]._metadata={notifier:`WARNING!
|
|
24
24
|
Serialized payload was `+h.length/1e6+`MB (limit = 1MB)
|
|
25
|
-
metadata was removed`},h=V(u,null,null,{redactedPaths:
|
|
26
|
-
`+
|
|
27
|
-
`+(z&&z.stack?z.stack:z),z),p.length>1e6&&u._logger.warn("Event oversized ("+(p.length/1e6).toFixed(2)+" MB)"),h(z)};if(u._config.endpoints.notify===null){var w=new Error("Event not sent due to incomplete endpoint configuration");return
|
|
28
|
-
`+(w&&w.stack?w.stack:w),w),h(w)};if(u._config.endpoints.session===null){var
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
metadata was removed`},h=V(u,null,null,{redactedPaths:Sg,redactedKeys:m})),h},Fa.session=function(u,m){var h=V(u,null,null);return h};var Pk=require("http"),Ok=require("https"),jk=require("url"),Nk=jk.parse,zg=function(u,m){var h=u.url,p=u.headers,y=u.body,w=u.agent,z=!1,D=function(Le){z||(z=!0,m(Le))},L=Nk(h),Q=L.protocol==="https:",de=Q?Ok:Pk,Re=de.request({method:"POST",hostname:L.hostname,port:L.port,path:L.path,headers:p,agent:w});Re.on("error",D),Re.on("response",function(Le){Rk(Le,function(fr,St){if(fr)return D(fr);if(Le.statusCode<200||Le.statusCode>=300)return D(new Error("Bad statusCode from API: "+Le.statusCode+`
|
|
26
|
+
`+St));m(null,St)})}),Re.write(y),Re.end()},Rk=function(u,m){var h="";u.on("error",m),u.setEncoding("utf8"),u.on("data",function(p){h+=p}),u.on("end",function(){return m(null,h)})},Ak=function(u){return{sendEvent:function(m,h){h===void 0&&(h=function(){});var p=Fa.event(m,u._config.redactedKeys),y=function(z){z&&u._logger.error(`Event failed to send\u2026
|
|
27
|
+
`+(z&&z.stack?z.stack:z),z),p.length>1e6&&u._logger.warn("Event oversized ("+(p.length/1e6).toFixed(2)+" MB)"),h(z)};if(u._config.endpoints.notify===null){var w=new Error("Event not sent due to incomplete endpoint configuration");return y(w)}try{zg({url:u._config.endpoints.notify,headers:{"Content-Type":"application/json","Bugsnag-Api-Key":m.apiKey||u._config.apiKey,"Bugsnag-Payload-Version":"4","Bugsnag-Sent-At":new Date().toISOString()},body:p,agent:u._config.agent},function(z,D){return y(z)})}catch(z){y(z)}},sendSession:function(m,h){h===void 0&&(h=function(){});var p=function(w){w&&u._logger.error(`Session failed to send\u2026
|
|
28
|
+
`+(w&&w.stack?w.stack:w),w),h(w)};if(u._config.endpoints.session===null){var y=new Error("Session not sent due to incomplete endpoint configuration");return p(y)}try{zg({url:u._config.endpoints.sessions,headers:{"Content-Type":"application/json","Bugsnag-Api-Key":u._config.apiKey,"Bugsnag-Payload-Version":"1","Bugsnag-Sent-At":new Date().toISOString()},body:Fa.session(m,u._config.redactedKeys),agent:u._config.agent},function(w){return p(w)})}catch(w){p(w)}}}};function Co(){return Co=Object.assign?Object.assign.bind():function(u){for(var m=1;m<arguments.length;m++){var h=arguments[m];for(var p in h)({}).hasOwnProperty.call(h,p)&&(u[p]=h[p])}return u},Co.apply(null,arguments)}var ld=x.schema,Dk=require("os"),Ck=require("util"),Uk=Ck.inspect,Zk={appType:Co({},ld.appType,{defaultValue:function(){return"node"}}),projectRoot:{defaultValue:function(){return process.cwd()},validate:function(u){return u===null||b(u)},message:"should be string"},hostname:{defaultValue:function(){return Dk.hostname()},message:"should be a string",validate:function(u){return u===null||b(u)}},logger:Co({},ld.logger,{defaultValue:function(){return Mk()}}),releaseStage:Co({},ld.releaseStage,{defaultValue:function(){return process.env.NODE_ENV||"production"}}),agent:{defaultValue:function(){},message:"should be an HTTP(s) agent",validate:function(u){return u===void 0||Lk(u)}},onUncaughtException:{defaultValue:function(){return function(u,m,h){h.error("Uncaught exception"+Eg(m)+`, the process will now terminate\u2026
|
|
29
|
+
`+Ig(u)),process.exit(1)}},message:"should be a function",validate:function(u){return typeof u=="function"}},onUnhandledRejection:{defaultValue:function(){return function(u,m,h){h.error("Unhandled rejection"+Eg(m)+`\u2026
|
|
30
|
+
`+Ig(u))}},message:"should be a function",validate:function(u){return typeof u=="function"}}},Ig=function(u){return u&&u.stack?u.stack:Uk(u)},Mk=function(){return["debug","info","warn","error"].reduce(function(u,m){var h=console[m]||console.log;return u[m]=h.bind(console,"[bugsnag]"),u},{})},Eg=function(u){return u.request&&Object.keys(u.request).length?" at "+u.request.httpMethod+" "+(u.request.path||u.request.url):""},Lk=function(u){return typeof u=="object"&&u!==null||typeof u=="boolean"},Tg=new Date,qk=function(){Tg=new Date},Vk={name:"appDuration",load:function(u){return u.addOnError(function(m){var h=new Date;m.app.duration=h-Tg},!0),{reset:qk}}},dd={};dd.load=function(u){var m=/^(local-)?dev(elopment)?$/.test(u._config.releaseStage);m||!u._isBreadcrumbTypeEnabled("log")||M(Pg,function(h){var p=console[h];console[h]=function(){for(var y=arguments.length,w=new Array(y),z=0;z<y;z++)w[z]=arguments[z];u.leaveBreadcrumb("Console output",a(w,function(D,L,Q){var de="[Unknown value]";try{de=String(L)}catch{}if(de==="[object Object]")try{de=JSON.stringify(L)}catch{}return D["["+Q+"]"]=de,D},{severity:h.indexOf("group")===0?"log":h}),"log"),p.apply(console,w)},console[h]._restore=function(){console[h]=p}})},process.env.NODE_ENV!=="production"&&(dd.destroy=function(){return Pg.forEach(function(u){typeof console[u]._restore=="function"&&console[u]._restore()})});var Pg=s(["log","debug","info","warn","error"],function(u){return typeof console<"u"&&typeof console[u]=="function"}),fd={},Og=[];fd=function(u){var m=new u.Client({},{},[],u._notifier);return m._config=u._config,m._breadcrumbs=u._breadcrumbs.slice(),m._metadata=P({},u._metadata),m._features=[].concat(u._features),m._featuresIndex=P({},u._featuresIndex),m._user=P({},u._user),m._context=u._context,m._cbs={e:u._cbs.e.slice(),s:u._cbs.s.slice(),sp:u._cbs.sp.slice(),b:u._cbs.b.slice()},m._logger=u._logger,m._delivery=u._delivery,m._sessionDelegate=u._sessionDelegate,Og.forEach(function(h){h(m)}),m},fd.registerCallback=function(u){Og.push(u)};var gn={};gn.getStack=function(){return new Error().stack.split(`
|
|
31
31
|
`).slice(3).join(`
|
|
32
|
-
`)},
|
|
32
|
+
`)},gn.maybeUseFallbackStack=function(u,m){var h=u.stack.split(`
|
|
33
33
|
`);return(h.length===1||h.length===2&&/at Error \(native\)/.test(h[1]))&&(u.stack=h[0]+`
|
|
34
|
-
`+m),u};var Va={},Nk=mn.getStack;Va={name:"contextualize",load:function(u){var m=function(h,p){var _=Nk(),w=sd(u);return w.fallbackStack=_,w.addOnError(p),u._clientContext.run(w,h)};return m}},Va.default=Va;var Fa={},Rk=mn.getStack,Ak=mn.maybeUseFallbackStack;Fa={name:"intercept",load:function(u){var m=function(h,p){h===void 0&&(h=function(){}),typeof p!="function"&&(p=h,h=function(){});var _=Rk();return function(w){if(w){w.stack&&Ak(w,_);var z=u.Event.create(w,!0,{severity:"warning",unhandled:!1,severityReason:{type:"callbackErrorIntercept"}},"intercept()",1);u._notify(z,h);return}for(var D=arguments.length,L=new Array(D>1?D-1:0),Q=1;Q<D;Q++)L[Q-1]=arguments[Q];p.apply(void 0,L)}};return m}},Fa.default=Fa;function Ba(){return Ba=Object.assign?Object.assign.bind():function(u){for(var m=1;m<arguments.length;m++){var h=arguments[m];for(var p in h)({}).hasOwnProperty.call(h,p)&&(u[p]=h[p])}return u},Ba.apply(null,arguments)}var Do=require("os"),Dk={load:function(u){var m={osName:Do.platform()+" ("+Do.arch()+")",osVersion:Do.release(),totalMemory:Do.totalmem(),hostname:u._config.hostname,runtimeVersions:{node:process.versions.node}};u._addOnSessionPayload(function(h){h.device=Ba({},h.device,m)}),u.addOnError(function(h){h.device=Ba({},h.device,m,{freeMemory:Do.freemem(),time:new Date})},!0)}},zg=require("path"),Ck=zg.join,Zk=zg.resolve,Ig=function(u){return Ck(Zk(u),"/")},Uk={load:function(u){return u.addOnError(function(m){if(u._config.projectRoot){var h=Ig(u._config.projectRoot),p=m.errors.reduce(function(_,w){return _.concat(w.stacktrace)},[]);p.map(function(_){_.inProject=typeof _.file=="string"&&_.file.indexOf(h)===0&&!/\/node_modules\//.test(_.file)})}})}};function cd(){return cd=Object.assign?Object.assign.bind():function(u){for(var m=1;m<arguments.length;m++){var h=arguments[m];for(var p in h)({}).hasOwnProperty.call(h,p)&&(u[p]=h[p])}return u},cd.apply(null,arguments)}function Mk(u,m){u.prototype=Object.create(m.prototype),u.prototype.constructor=u,ud(u,m)}function ud(u,m){return ud=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,p){return h.__proto__=p,h},ud(u,m)}var Eg=3,Tg=200,Lk=require("fs"),qk=Lk.createReadStream,Vk=require("stream"),Fk=Vk.Writable,Bk=hw(),Kk=vw(),Hk=require("path"),Jk={load:function(u){if(u._config.sendCode){var m=function(h,p){return new Promise(function(_,w){try{if(!h.lineNumber||!h.file)return _(h);var z=Hk.resolve(u._config.projectRoot,h.file),D=z+"@"+h.lineNumber;if(D in p)return h.code=p[D],_(h);Gk(z,h.lineNumber,function(L,Q){return L||(h.code=p[D]=Q),_(h)})}catch{return _(h)}})};u.addOnError(function(h){return new Promise(function(p,_){var w=Object.create(null),z=h.errors.reduce(function(D,L){return D.concat(L.stacktrace)},[]);Xk(z.map(function(D){return function(){return m(D,w)}})).then(p).catch(_)})})}},configSchema:{sendCode:{defaultValue:function(){return!0},validate:function(u){return u===!0||u===!1},message:"should be true or false"}}},Gk=function(u,m,h){var p=m-Eg,_=m+Eg,w=qk(u,{encoding:"utf8"}),z=new Kk.LineStream({keepEmptyLines:!0}),D=new Wk({start:p,end:_});D.on("done",function(){return w.destroy()}),Bk(w,z,D,function(L){if(L&&L.message!=="premature close")return h(L);h(null,D.getCode())})},Wk=(function(u){function m(p){var _;return _=u.call(this,cd({},p,{decodeStrings:!1}))||this,_._start=p.start,_._end=p.end,_._n=0,_._code={},_}Mk(m,u);var h=m.prototype;return h._write=function(_,w,z){return this._n++,this._n<this._start?z(null):this._n<=this._end?(this._code[String(this._n)]=_.length<=Tg?_:_.substr(0,Tg),z(null)):(this.emit("done"),z(null))},h.getCode=function(){return this._code},m})(Fk),Xk=function(u){return new Promise(function(m,h){var p=[];u.reduce(function(_,w){return _.then(function(z){return p.push(z),w()})},Promise.resolve()).then(function(_){p.push(_)}).then(function(){m(p.slice(1))})})},Yk=mn.maybeUseFallbackStack,ld,Qk={load:function(u){u._config.autoDetectErrors&&u._config.enabledErrorTypes.unhandledExceptions&&(ld=function(m){var h=u._clientContext&&u._clientContext.getStore(),p=h||u;m.stack&&p.fallbackStack&&Yk(m,p.fallbackStack);var _=p.Event.create(m,!1,{severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},"uncaughtException handler",1);return new Promise(function(w){p._notify(_,function(){},function(z,D){z&&p._logger.error("Failed to send event to Bugsnag"),p._config.onUncaughtException(m,D,p._logger),w()})})},process.prependListener("uncaughtException",ld))},destroy:function(){process.removeListener("uncaughtException",ld)}},Ka,eS={load:function(u){!u._config.autoDetectErrors||!u._config.enabledErrorTypes.unhandledRejections||(Ka=function(m){var h=u._clientContext&&u._clientContext.getStore(),p=h||u,_=!u._config.reportUnhandledPromiseRejectionsAsHandled,w=p.Event.create(m,!1,{severity:"error",unhandled:_,severityReason:{type:"unhandledPromiseRejection"}},"unhandledRejection handler",1);return new Promise(function(z){p._notify(w,function(){},function(D,L){D&&p._logger.error("Failed to send event to Bugsnag"),p._config.onUnhandledRejection(m,L,p._logger),z()})})},process.prependListener?process.prependListener("unhandledRejection",Ka):process.on("unhandledRejection",Ka))},destroy:function(){process.removeListener("unhandledRejection",Ka)}},tS=dd;function dd(u){u=u||{},this.ms=u.min||100,this.max=u.max||1e4,this.factor=u.factor||2,this.jitter=u.jitter>0&&u.jitter<=1?u.jitter:0,this.attempts=0}dd.prototype.duration=function(){var u=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var m=Math.random(),h=Math.floor(m*this.jitter*u);u=(Math.floor(m*10)&1)==0?u-h:u+h}return Math.min(u,this.max)|0},dd.prototype.reset=function(){this.attempts=0};function rS(u,m){u.prototype=Object.create(m.prototype),u.prototype.constructor=u,fd(u,m)}function fd(u,m){return fd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,p){return h.__proto__=p,h},fd(u,m)}var nS=10*1e3,oS=require("events").EventEmitter,iS=(function(u){function m(p){var _;return _=u.call(this)||this,_._sessions=new Map,_._interval=null,_._intervalLength=p||nS,_._summarize=_._summarize.bind(_),_}rS(m,u);var h=m.prototype;return h.start=function(){this._interval||(this._interval=setInterval(this._summarize,this._intervalLength).unref())},h.stop=function(){clearInterval(this._interval),this._interval=null},h.track=function(_){var w=aS(_.startedAt),z=this._sessions.get(w);return this._sessions.set(w,typeof z>"u"?1:z+1),_},h._summarize=function(){var _=this,w=[];this._sessions.forEach(function(z,D){w.push({startedAt:D,sessionsStarted:z}),_._sessions.delete(D)}),w.length&&this.emit("summary",w)},m})(oS),aS=function(u){var m=new Date(u);return m.setSeconds(0),m.setMilliseconds(0),m.toISOString()},sS={load:function(u){var m=null;u._sessionDelegate={startSession:function(h,p){return m||(m=new iS(h._config.sessionSummaryInterval),m.on("summary",cS(h)),m.start()),h._session=p,h._pausedSession=null,m.track(h._session),h},pauseSession:function(h){h._pausedSession=h._session,h._session=null},resumeSession:function(h){return h._session?h:h._pausedSession?(h._session=h._pausedSession,h._pausedSession=null,h):h.startSession()}}},configSchema:{sessionSummaryInterval:{defaultValue:function(){},validate:function(u){return u===void 0||v()(u)},message:"should be a positive integer"}}},cS=function(u){return function(m){if(u._config.enabledReleaseStages!==null&&!u._config.enabledReleaseStages.includes(u._config.releaseStage)){u._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration");return}if(!m.length)return;var h=new tS({min:1e3,max:1e4}),p=10;w(_);function _(z){if(!z){var D=m.reduce(function(L,Q){return L+Q.sessionsStarted},0);return u._logger.debug(D+" session(s) reported")}if(h.attempts===10){u._logger.error("Session delivery failed, max retries exceeded",z);return}u._logger.debug("Session delivery failed, retry #"+(h.attempts+1)+"/"+p,z),setTimeout(function(){return w(_)},h.duration())}function w(z){var D={notifier:u._notifier,device:{},app:{releaseStage:u._config.releaseStage,version:u._config.appVersion,type:u._config.appType},sessionCounts:m},L=ed(u._cbs.sp,D,"onSessionPayload",u._logger);if(L)return u._logger.debug("Session not sent due to onSessionPayload callback"),z(null);u._delivery.sendSession(D,z)}}},uS={load:function(u){u.addOnError(function(m){var h=m.errors.reduce(function(p,_){return p.concat(_.stacktrace)},[]);h.forEach(function(p){typeof p.file=="string"&&(p.file=p.file.replace(/\\/g,"/"))})})}},lS={load:function(u){return u.addOnError(function(m){if(u._config.projectRoot){var h=Ig(u._config.projectRoot),p=m.errors.reduce(function(_,w){return _.concat(w.stacktrace)},[]);p.map(function(_){typeof _.file=="string"&&_.file.indexOf(h)===0&&(_.file=_.file.replace(h,""))})}})}},Lr={};function pd(){return pd=Object.assign?Object.assign.bind():function(u){for(var m=1;m<arguments.length;m++){var h=arguments[m];for(var p in h)({}).hasOwnProperty.call(h,p)&&(u[p]=h[p])}return u},pd.apply(null,arguments)}var dS="Bugsnag Node",fS="8.8.0",pS="https://github.com/bugsnag/bugsnag-js",mS=require("async_hooks"),hS=mS.AsyncLocalStorage;Za.__type="nodejs";var gS=pd({},x.schema,Ek),vS=[Ok,Jk,Uk,lS,sS,Dk,Qk,eS,Fa,Va,uS,ad],wt={_client:null,createClient:function(u){typeof u=="string"&&(u={apiKey:u}),u||(u={});var m=new La(u,gS,vS,{name:dS,version:fS,url:pS});return Object.keys(La.prototype).forEach(function(h){var p=m[h];m[h]=function(){var _=m._clientContext&&typeof m._clientContext.getStore=="function"?m._clientContext.getStore():null,w=_||m,z=_?_[h]:p;w._depth+=1;var D=z.apply(w,arguments);return w._depth-=1,D}}),m._clientContext=new hS,m._setDelivery(kk),m._logger.debug("Loaded!"),m},start:function(u){return wt._client?(wt._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."),wt._client):(wt._client=wt.createClient(u),wt._client)},isStarted:function(){return wt._client!=null}};return Object.keys(La.prototype).forEach(function(u){/^_/.test(u)||(wt[u]=function(){var m=wt._client,h=m&&m._clientContext&&m._clientContext.getStore();if(h&&(m=h),!m)return console.error("Bugsnag."+u+"() was called before Bugsnag.start()");m._depth+=1;var p=m[u].apply(m,arguments);return m._depth-=1,p})}),Lr=wt,Lr.Client=La,Lr.Event=Za,Lr.Session=nd,Lr.Breadcrumb=r,Lr.default=wt,Lr})});var $w=A((Aq,bw)=>{bw.exports=yw()});var vd=mt(Ag()),Dg=mt(require("path"));process.env.DOTENV_CONFIG_SILENT="true";vd.default.config();vd.default.config({path:Dg.default.resolve(__dirname,"../../.env")});var ce;(function(e){e.assertEqual=r=>{};function t(r){}e.assertIs=t;function n(r){throw new Error}e.assertNever=n,e.arrayToEnum=r=>{let i={};for(let a of r)i[a]=a;return i},e.getValidEnumValues=r=>{let i=e.objectKeys(r).filter(s=>typeof r[r[s]]!="number"),a={};for(let s of i)a[s]=r[s];return e.objectValues(a)},e.objectValues=r=>e.objectKeys(r).map(function(i){return r[i]}),e.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{let i=[];for(let a in r)Object.prototype.hasOwnProperty.call(r,a)&&i.push(a);return i},e.find=(r,i)=>{for(let a of r)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function o(r,i=" | "){return r.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(r,i)=>typeof i=="bigint"?i.toString():i})(ce||(ce={}));var Cg;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Cg||(Cg={}));var Z=ce.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Gt=e=>{switch(typeof e){case"undefined":return Z.undefined;case"string":return Z.string;case"number":return Number.isNaN(e)?Z.nan:Z.number;case"boolean":return Z.boolean;case"function":return Z.function;case"bigint":return Z.bigint;case"symbol":return Z.symbol;case"object":return Array.isArray(e)?Z.array:e===null?Z.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Z.promise:typeof Map<"u"&&e instanceof Map?Z.map:typeof Set<"u"&&e instanceof Set?Z.set:typeof Date<"u"&&e instanceof Date?Z.date:Z.object;default:return Z.unknown}};var T=ce.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var ct=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){let n=t||function(i){return i.message},o={_errors:[]},r=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(r);else if(a.code==="invalid_return_type")r(a.returnTypeError);else if(a.code==="invalid_arguments")r(a.argumentsError);else if(a.path.length===0)o._errors.push(n(a));else{let s=o,c=0;for(;c<a.path.length;){let l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return r(this),o}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ce.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n={},o=[];for(let r of this.issues)if(r.path.length>0){let i=r.path[0];n[i]=n[i]||[],n[i].push(t(r))}else o.push(t(r));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}};ct.create=e=>new ct(e);var ZS=(e,t)=>{let n;switch(e.code){case T.invalid_type:e.received===Z.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case T.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ce.jsonStringifyReplacer)}`;break;case T.unrecognized_keys:n=`Unrecognized key(s) in object: ${ce.joinValues(e.keys,", ")}`;break;case T.invalid_union:n="Invalid input";break;case T.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ce.joinValues(e.options)}`;break;case T.invalid_enum_value:n=`Invalid enum value. Expected ${ce.joinValues(e.options)}, received '${e.received}'`;break;case T.invalid_arguments:n="Invalid function arguments";break;case T.invalid_return_type:n="Invalid function return type";break;case T.invalid_date:n="Invalid date";break;case T.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ce.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case T.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case T.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case T.custom:n="Invalid input";break;case T.invalid_intersection_types:n="Intersection results could not be merged";break;case T.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case T.not_finite:n="Number must be finite";break;default:n=t.defaultError,ce.assertNever(e)}return{message:n}},dr=ZS;var US=dr;function Zo(){return US}var Ja=e=>{let{data:t,path:n,errorMaps:o,issueData:r}=e,i=[...n,...r.path||[]],a={...r,path:i};if(r.message!==void 0)return{...r,path:i,message:r.message};let s="",c=o.filter(l=>!!l).slice().reverse();for(let l of c)s=l(a,{data:t,defaultError:s}).message;return{...r,path:i,message:s}};function C(e,t){let n=Zo(),o=Ja({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===dr?void 0:dr].filter(r=>!!r)});e.common.issues.push(o)}var qe=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let o=[];for(let r of n){if(r.status==="aborted")return J;r.status==="dirty"&&t.dirty(),o.push(r.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,n){let o=[];for(let r of n){let i=await r.key,a=await r.value;o.push({key:i,value:a})}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,n){let o={};for(let r of n){let{key:i,value:a}=r;if(i.status==="aborted"||a.status==="aborted")return J;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||r.alwaysSet)&&(o[i.value]=a.value)}return{status:t.value,value:o}}},J=Object.freeze({status:"aborted"}),vn=e=>({status:"dirty",value:e}),Ge=e=>({status:"valid",value:e}),_d=e=>e.status==="aborted",yd=e=>e.status==="dirty",Vr=e=>e.status==="valid",Uo=e=>typeof Promise<"u"&&e instanceof Promise;var q;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(q||(q={}));var ht=class{constructor(t,n,o,r){this._cachedPath=[],this.parent=t,this.data=n,this._path=o,this._key=r}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}},Zg=(e,t)=>{if(Vr(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new ct(e.common.issues);return this._error=n,this._error}}};function Y(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:o,description:r}=e;if(t&&(n||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:r}:{errorMap:(a,s)=>{let{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??o??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:c??n??s.defaultError}},description:r}}var ne=class{get description(){return this._def.description}_getType(t){return Gt(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Gt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qe,ctx:{common:t.parent.common,data:t.data,parsedType:Gt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(Uo(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let o=this.safeParse(t,n);if(o.success)return o.data;throw o.error}safeParse(t,n){let o={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Gt(t)},r=this._parseSync({data:t,path:o.path,parent:o});return Zg(o,r)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Gt(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:n});return Vr(o)?{value:o.value}:{issues:n.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(o=>Vr(o)?{value:o.value}:{issues:n.common.issues})}async parseAsync(t,n){let o=await this.safeParseAsync(t,n);if(o.success)return o.data;throw o.error}async safeParseAsync(t,n){let o={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Gt(t)},r=this._parse({data:t,path:o.path,parent:o}),i=await(Uo(r)?r:Promise.resolve(r));return Zg(o,i)}refine(t,n){let o=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,i)=>{let a=t(r),s=()=>i.addIssue({code:T.custom,...o(r)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((o,r)=>t(o)?!0:(r.addIssue(typeof n=="function"?n(o,r):n),!1))}_refinement(t){return new zt({schema:this,typeName:j.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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:n=>this["~validate"](n)}}optional(){return St.create(this,this._def)}nullable(){return Yt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pr.create(this)}promise(){return Fr.create(this,this._def)}or(t){return xn.create([this,t],this._def)}and(t){return wn.create(this,t,this._def)}transform(t){return new zt({...Y(this._def),schema:this,typeName:j.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new En({...Y(this._def),innerType:this,defaultValue:n,typeName:j.ZodDefault})}brand(){return new Ga({typeName:j.ZodBranded,type:this,...Y(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new Tn({...Y(this._def),innerType:this,catchValue:n,typeName:j.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Wa.create(this,t)}readonly(){return Pn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},MS=/^c[^\s-]{8,}$/i,LS=/^[0-9a-z]+$/,qS=/^[0-9A-HJKMNP-TV-Z]{26}$/i,VS=/^[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,FS=/^[a-z0-9_-]{21}$/i,BS=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,KS=/^[-+]?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)?)??$/,HS=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,JS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",bd,GS=/^(?:(?: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])$/,WS=/^(?:(?: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])$/,XS=/^(([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]))$/,YS=/^(([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])$/,QS=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,e0=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ug="((\\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])))",t0=new RegExp(`^${Ug}$`);function Mg(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function r0(e){return new RegExp(`^${Mg(e)}$`)}function n0(e){let t=`${Ug}T${Mg(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function o0(e,t){return!!((t==="v4"||!t)&&GS.test(e)||(t==="v6"||!t)&&XS.test(e))}function i0(e,t){if(!BS.test(e))return!1;try{let[n]=e.split(".");if(!n)return!1;let o=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(o));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||t&&r.alg!==t)}catch{return!1}}function a0(e,t){return!!((t==="v4"||!t)&&WS.test(e)||(t==="v6"||!t)&&YS.test(e))}var yn=class e extends ne{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Z.string){let i=this._getOrReturnCtx(t);return C(i,{code:T.invalid_type,expected:Z.string,received:i.parsedType}),J}let o=new qe,r;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(r=this._getOrReturnCtx(t,r),C(r,{code:T.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="max")t.data.length>i.value&&(r=this._getOrReturnCtx(t,r),C(r,{code:T.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="length"){let a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(r=this._getOrReturnCtx(t,r),a?C(r,{code:T.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&C(r,{code:T.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),o.dirty())}else if(i.kind==="email")HS.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"email",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")bd||(bd=new RegExp(JS,"u")),bd.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"emoji",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")VS.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"uuid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")FS.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"nanoid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")MS.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"cuid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")LS.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"cuid2",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")qS.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"ulid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),C(r,{validation:"url",code:T.invalid_string,message:i.message}),o.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"regex",code:T.invalid_string,message:i.message}),o.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(r=this._getOrReturnCtx(t,r),C(r,{code:T.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(r=this._getOrReturnCtx(t,r),C(r,{code:T.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(r=this._getOrReturnCtx(t,r),C(r,{code:T.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?n0(i).test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{code:T.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?t0.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{code:T.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?r0(i).test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{code:T.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?KS.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"duration",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?o0(t.data,i.version)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"ip",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?i0(t.data,i.alg)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"jwt",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?a0(t.data,i.version)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"cidr",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?QS.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"base64",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?e0.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"base64url",code:T.invalid_string,message:i.message}),o.dirty()):ce.assertNever(i);return{status:o.value,value:t.data}}_regex(t,n,o){return this.refinement(r=>t.test(r),{validation:n,code:T.invalid_string,...q.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...q.errToObj(t)})}url(t){return this._addCheck({kind:"url",...q.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...q.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...q.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...q.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...q.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...q.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...q.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...q.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...q.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...q.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...q.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...q.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...q.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...q.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...q.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...q.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...q.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...q.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...q.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...q.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...q.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...q.errToObj(n)})}nonempty(t){return this.min(1,q.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};yn.create=e=>new yn({checks:[],typeName:j.ZodString,coerce:e?.coerce??!1,...Y(e)});function s0(e,t){let n=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,r=n>o?n:o,i=Number.parseInt(e.toFixed(r).replace(".","")),a=Number.parseInt(t.toFixed(r).replace(".",""));return i%a/10**r}var Mo=class e extends ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Z.number){let i=this._getOrReturnCtx(t);return C(i,{code:T.invalid_type,expected:Z.number,received:i.parsedType}),J}let o,r=new qe;for(let i of this._def.checks)i.kind==="int"?ce.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),C(o,{code:T.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),C(o,{code:T.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),C(o,{code:T.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="multipleOf"?s0(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),C(o,{code:T.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),C(o,{code:T.not_finite,message:i.message}),r.dirty()):ce.assertNever(i);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,q.toString(n))}gt(t,n){return this.setLimit("min",t,!1,q.toString(n))}lte(t,n){return this.setLimit("max",t,!0,q.toString(n))}lt(t,n){return this.setLimit("max",t,!1,q.toString(n))}setLimit(t,n,o,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:q.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:q.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:q.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:q.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:q.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:q.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:q.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ce.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value)}return Number.isFinite(n)&&Number.isFinite(t)}};Mo.create=e=>new Mo({checks:[],typeName:j.ZodNumber,coerce:e?.coerce||!1,...Y(e)});var Lo=class e extends ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Z.bigint)return this._getInvalidInput(t);let o,r=new qe;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),C(o,{code:T.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),C(o,{code:T.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),C(o,{code:T.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):ce.assertNever(i);return{status:r.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return C(n,{code:T.invalid_type,expected:Z.bigint,received:n.parsedType}),J}gte(t,n){return this.setLimit("min",t,!0,q.toString(n))}gt(t,n){return this.setLimit("min",t,!1,q.toString(n))}lte(t,n){return this.setLimit("max",t,!0,q.toString(n))}lt(t,n){return this.setLimit("max",t,!1,q.toString(n))}setLimit(t,n,o,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:q.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:q.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:q.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};Lo.create=e=>new Lo({checks:[],typeName:j.ZodBigInt,coerce:e?.coerce??!1,...Y(e)});var qo=class extends ne{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Z.boolean){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:Z.boolean,received:o.parsedType}),J}return Ge(t.data)}};qo.create=e=>new qo({typeName:j.ZodBoolean,coerce:e?.coerce||!1,...Y(e)});var Vo=class e extends ne{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Z.date){let i=this._getOrReturnCtx(t);return C(i,{code:T.invalid_type,expected:Z.date,received:i.parsedType}),J}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return C(i,{code:T.invalid_date}),J}let o=new qe,r;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(r=this._getOrReturnCtx(t,r),C(r,{code:T.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(r=this._getOrReturnCtx(t,r),C(r,{code:T.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),o.dirty()):ce.assertNever(i);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:q.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:q.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};Vo.create=e=>new Vo({checks:[],coerce:e?.coerce||!1,typeName:j.ZodDate,...Y(e)});var Fo=class extends ne{_parse(t){if(this._getType(t)!==Z.symbol){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:Z.symbol,received:o.parsedType}),J}return Ge(t.data)}};Fo.create=e=>new Fo({typeName:j.ZodSymbol,...Y(e)});var bn=class extends ne{_parse(t){if(this._getType(t)!==Z.undefined){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:Z.undefined,received:o.parsedType}),J}return Ge(t.data)}};bn.create=e=>new bn({typeName:j.ZodUndefined,...Y(e)});var $n=class extends ne{_parse(t){if(this._getType(t)!==Z.null){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:Z.null,received:o.parsedType}),J}return Ge(t.data)}};$n.create=e=>new $n({typeName:j.ZodNull,...Y(e)});var Bo=class extends ne{constructor(){super(...arguments),this._any=!0}_parse(t){return Ge(t.data)}};Bo.create=e=>new Bo({typeName:j.ZodAny,...Y(e)});var fr=class extends ne{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ge(t.data)}};fr.create=e=>new fr({typeName:j.ZodUnknown,...Y(e)});var Dt=class extends ne{_parse(t){let n=this._getOrReturnCtx(t);return C(n,{code:T.invalid_type,expected:Z.never,received:n.parsedType}),J}};Dt.create=e=>new Dt({typeName:j.ZodNever,...Y(e)});var Ko=class extends ne{_parse(t){if(this._getType(t)!==Z.undefined){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:Z.void,received:o.parsedType}),J}return Ge(t.data)}};Ko.create=e=>new Ko({typeName:j.ZodVoid,...Y(e)});var pr=class e extends ne{_parse(t){let{ctx:n,status:o}=this._processInputParams(t),r=this._def;if(n.parsedType!==Z.array)return C(n,{code:T.invalid_type,expected:Z.array,received:n.parsedType}),J;if(r.exactLength!==null){let a=n.data.length>r.exactLength.value,s=n.data.length<r.exactLength.value;(a||s)&&(C(n,{code:a?T.too_big:T.too_small,minimum:s?r.exactLength.value:void 0,maximum:a?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),o.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(C(n,{code:T.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),o.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(C(n,{code:T.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>r.type._parseAsync(new ht(n,a,n.path,s)))).then(a=>qe.mergeArray(o,a));let i=[...n.data].map((a,s)=>r.type._parseSync(new ht(n,a,n.path,s)));return qe.mergeArray(o,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:q.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:q.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:q.toString(n)}})}nonempty(t){return this.min(1,t)}};pr.create=(e,t)=>new pr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:j.ZodArray,...Y(t)});function _n(e){if(e instanceof ut){let t={};for(let n in e.shape){let o=e.shape[n];t[n]=St.create(_n(o))}return new ut({...e._def,shape:()=>t})}else return e instanceof pr?new pr({...e._def,type:_n(e.element)}):e instanceof St?St.create(_n(e.unwrap())):e instanceof Yt?Yt.create(_n(e.unwrap())):e instanceof Xt?Xt.create(e.items.map(t=>_n(t))):e}var ut=class e extends ne{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=ce.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Z.object){let l=this._getOrReturnCtx(t);return C(l,{code:T.invalid_type,expected:Z.object,received:l.parsedType}),J}let{status:o,ctx:r}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Dt&&this._def.unknownKeys==="strip"))for(let l in r.data)a.includes(l)||s.push(l);let c=[];for(let l of a){let d=i[l],f=r.data[l];c.push({key:{status:"valid",value:l},value:d._parse(new ht(r,f,r.path,l)),alwaysSet:l in r.data})}if(this._def.catchall instanceof Dt){let l=this._def.unknownKeys;if(l==="passthrough")for(let d of s)c.push({key:{status:"valid",value:d},value:{status:"valid",value:r.data[d]}});else if(l==="strict")s.length>0&&(C(r,{code:T.unrecognized_keys,keys:s}),o.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let d of s){let f=r.data[d];c.push({key:{status:"valid",value:d},value:l._parse(new ht(r,f,r.path,d)),alwaysSet:d in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let l=[];for(let d of c){let f=await d.key,y=await d.value;l.push({key:f,value:y,alwaysSet:d.alwaysSet})}return l}).then(l=>qe.mergeObjectSync(o,l)):qe.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return q.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,o)=>{let r=this._def.errorMap?.(n,o).message??o.defaultError;return n.code==="unrecognized_keys"?{message:q.errToObj(t).message??r}:{message:r}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:j.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let o of ce.objectKeys(t))t[o]&&this.shape[o]&&(n[o]=this.shape[o]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let o of ce.objectKeys(this.shape))t[o]||(n[o]=this.shape[o]);return new e({...this._def,shape:()=>n})}deepPartial(){return _n(this)}partial(t){let n={};for(let o of ce.objectKeys(this.shape)){let r=this.shape[o];t&&!t[o]?n[o]=r:n[o]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let o of ce.objectKeys(this.shape))if(t&&!t[o])n[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof St;)i=i._def.innerType;n[o]=i}return new e({...this._def,shape:()=>n})}keyof(){return Lg(ce.objectKeys(this.shape))}};ut.create=(e,t)=>new ut({shape:()=>e,unknownKeys:"strip",catchall:Dt.create(),typeName:j.ZodObject,...Y(t)});ut.strictCreate=(e,t)=>new ut({shape:()=>e,unknownKeys:"strict",catchall:Dt.create(),typeName:j.ZodObject,...Y(t)});ut.lazycreate=(e,t)=>new ut({shape:e,unknownKeys:"strip",catchall:Dt.create(),typeName:j.ZodObject,...Y(t)});var xn=class extends ne{_parse(t){let{ctx:n}=this._processInputParams(t),o=this._def.options;function r(i){for(let s of i)if(s.result.status==="valid")return s.result;for(let s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(s=>new ct(s.ctx.common.issues));return C(n,{code:T.invalid_union,unionErrors:a}),J}if(n.common.async)return Promise.all(o.map(async i=>{let a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(r);{let i,a=[];for(let c of o){let l={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:l});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let s=a.map(c=>new ct(c));return C(n,{code:T.invalid_union,unionErrors:s}),J}}get options(){return this._def.options}};xn.create=(e,t)=>new xn({options:e,typeName:j.ZodUnion,...Y(t)});var Wt=e=>e instanceof kn?Wt(e.schema):e instanceof zt?Wt(e.innerType()):e instanceof Sn?[e.value]:e instanceof zn?e.options:e instanceof In?ce.objectValues(e.enum):e instanceof En?Wt(e._def.innerType):e instanceof bn?[void 0]:e instanceof $n?[null]:e instanceof St?[void 0,...Wt(e.unwrap())]:e instanceof Yt?[null,...Wt(e.unwrap())]:e instanceof Ga||e instanceof Pn?Wt(e.unwrap()):e instanceof Tn?Wt(e._def.innerType):[],$d=class e extends ne{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==Z.object)return C(n,{code:T.invalid_type,expected:Z.object,received:n.parsedType}),J;let o=this.discriminator,r=n.data[o],i=this.optionsMap.get(r);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(C(n,{code:T.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),J)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,o){let r=new Map;for(let i of n){let a=Wt(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let s of a){if(r.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);r.set(s,i)}}return new e({typeName:j.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:r,...Y(o)})}};function xd(e,t){let n=Gt(e),o=Gt(t);if(e===t)return{valid:!0,data:e};if(n===Z.object&&o===Z.object){let r=ce.objectKeys(t),i=ce.objectKeys(e).filter(s=>r.indexOf(s)!==-1),a={...e,...t};for(let s of i){let c=xd(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(n===Z.array&&o===Z.array){if(e.length!==t.length)return{valid:!1};let r=[];for(let i=0;i<e.length;i++){let a=e[i],s=t[i],c=xd(a,s);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return n===Z.date&&o===Z.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var wn=class extends ne{_parse(t){let{status:n,ctx:o}=this._processInputParams(t),r=(i,a)=>{if(_d(i)||_d(a))return J;let s=xd(i.value,a.value);return s.valid?((yd(i)||yd(a))&&n.dirty(),{status:n.value,value:s.data}):(C(o,{code:T.invalid_intersection_types}),J)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,a])=>r(i,a)):r(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};wn.create=(e,t,n)=>new wn({left:e,right:t,typeName:j.ZodIntersection,...Y(n)});var Xt=class e extends ne{_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==Z.array)return C(o,{code:T.invalid_type,expected:Z.array,received:o.parsedType}),J;if(o.data.length<this._def.items.length)return C(o,{code:T.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),J;!this._def.rest&&o.data.length>this._def.items.length&&(C(o,{code:T.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...o.data].map((a,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new ht(o,a,o.path,s)):null}).filter(a=>!!a);return o.common.async?Promise.all(i).then(a=>qe.mergeArray(n,a)):qe.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Xt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Xt({items:e,typeName:j.ZodTuple,rest:null,...Y(t)})};var wd=class e extends ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==Z.object)return C(o,{code:T.invalid_type,expected:Z.object,received:o.parsedType}),J;let r=[],i=this._def.keyType,a=this._def.valueType;for(let s in o.data)r.push({key:i._parse(new ht(o,s,o.path,s)),value:a._parse(new ht(o,o.data[s],o.path,s)),alwaysSet:s in o.data});return o.common.async?qe.mergeObjectAsync(n,r):qe.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(t,n,o){return n instanceof ne?new e({keyType:t,valueType:n,typeName:j.ZodRecord,...Y(o)}):new e({keyType:yn.create(),valueType:t,typeName:j.ZodRecord,...Y(n)})}},Ho=class extends ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==Z.map)return C(o,{code:T.invalid_type,expected:Z.map,received:o.parsedType}),J;let r=this._def.keyType,i=this._def.valueType,a=[...o.data.entries()].map(([s,c],l)=>({key:r._parse(new ht(o,s,o.path,[l,"key"])),value:i._parse(new ht(o,c,o.path,[l,"value"]))}));if(o.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of a){let l=await c.key,d=await c.value;if(l.status==="aborted"||d.status==="aborted")return J;(l.status==="dirty"||d.status==="dirty")&&n.dirty(),s.set(l.value,d.value)}return{status:n.value,value:s}})}else{let s=new Map;for(let c of a){let l=c.key,d=c.value;if(l.status==="aborted"||d.status==="aborted")return J;(l.status==="dirty"||d.status==="dirty")&&n.dirty(),s.set(l.value,d.value)}return{status:n.value,value:s}}}};Ho.create=(e,t,n)=>new Ho({valueType:t,keyType:e,typeName:j.ZodMap,...Y(n)});var Jo=class e extends ne{_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==Z.set)return C(o,{code:T.invalid_type,expected:Z.set,received:o.parsedType}),J;let r=this._def;r.minSize!==null&&o.data.size<r.minSize.value&&(C(o,{code:T.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&o.data.size>r.maxSize.value&&(C(o,{code:T.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());let i=this._def.valueType;function a(c){let l=new Set;for(let d of c){if(d.status==="aborted")return J;d.status==="dirty"&&n.dirty(),l.add(d.value)}return{status:n.value,value:l}}let s=[...o.data.values()].map((c,l)=>i._parse(new ht(o,c,o.path,l)));return o.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,n){return new e({...this._def,minSize:{value:t,message:q.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:q.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};Jo.create=(e,t)=>new Jo({valueType:e,minSize:null,maxSize:null,typeName:j.ZodSet,...Y(t)});var kd=class e extends ne{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==Z.function)return C(n,{code:T.invalid_type,expected:Z.function,received:n.parsedType}),J;function o(s,c){return Ja({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Zo(),dr].filter(l=>!!l),issueData:{code:T.invalid_arguments,argumentsError:c}})}function r(s,c){return Ja({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Zo(),dr].filter(l=>!!l),issueData:{code:T.invalid_return_type,returnTypeError:c}})}let i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Fr){let s=this;return Ge(async function(...c){let l=new ct([]),d=await s._def.args.parseAsync(c,i).catch(v=>{throw l.addIssue(o(c,v)),l}),f=await Reflect.apply(a,this,d);return await s._def.returns._def.type.parseAsync(f,i).catch(v=>{throw l.addIssue(r(f,v)),l})})}else{let s=this;return Ge(function(...c){let l=s._def.args.safeParse(c,i);if(!l.success)throw new ct([o(c,l.error)]);let d=Reflect.apply(a,this,l.data),f=s._def.returns.safeParse(d,i);if(!f.success)throw new ct([r(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Xt.create(t).rest(fr.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,o){return new e({args:t||Xt.create([]).rest(fr.create()),returns:n||fr.create(),typeName:j.ZodFunction,...Y(o)})}},kn=class extends ne{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};kn.create=(e,t)=>new kn({getter:e,typeName:j.ZodLazy,...Y(t)});var Sn=class extends ne{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return C(n,{received:n.data,code:T.invalid_literal,expected:this._def.value}),J}return{status:"valid",value:t.data}}get value(){return this._def.value}};Sn.create=(e,t)=>new Sn({value:e,typeName:j.ZodLiteral,...Y(t)});function Lg(e,t){return new zn({values:e,typeName:j.ZodEnum,...Y(t)})}var zn=class e extends ne{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),o=this._def.values;return C(n,{expected:ce.joinValues(o),received:n.parsedType,code:T.invalid_type}),J}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),o=this._def.values;return C(n,{received:n.data,code:T.invalid_enum_value,options:o}),J}return Ge(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...n})}};zn.create=Lg;var In=class extends ne{_parse(t){let n=ce.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==Z.string&&o.parsedType!==Z.number){let r=ce.objectValues(n);return C(o,{expected:ce.joinValues(r),received:o.parsedType,code:T.invalid_type}),J}if(this._cache||(this._cache=new Set(ce.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let r=ce.objectValues(n);return C(o,{received:o.data,code:T.invalid_enum_value,options:r}),J}return Ge(t.data)}get enum(){return this._def.values}};In.create=(e,t)=>new In({values:e,typeName:j.ZodNativeEnum,...Y(t)});var Fr=class extends ne{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==Z.promise&&n.common.async===!1)return C(n,{code:T.invalid_type,expected:Z.promise,received:n.parsedType}),J;let o=n.parsedType===Z.promise?n.data:Promise.resolve(n.data);return Ge(o.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}};Fr.create=(e,t)=>new Fr({type:e,typeName:j.ZodPromise,...Y(t)});var zt=class extends ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===j.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:o}=this._processInputParams(t),r=this._def.effect||null,i={addIssue:a=>{C(o,a),a.fatal?n.abort():n.dirty()},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),r.type==="preprocess"){let a=r.transform(o.data,i);if(o.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return J;let c=await this._def.schema._parseAsync({data:s,path:o.path,parent:o});return c.status==="aborted"?J:c.status==="dirty"?vn(c.value):n.value==="dirty"?vn(c.value):c});{if(n.value==="aborted")return J;let s=this._def.schema._parseSync({data:a,path:o.path,parent:o});return s.status==="aborted"?J:s.status==="dirty"?vn(s.value):n.value==="dirty"?vn(s.value):s}}if(r.type==="refinement"){let a=s=>{let c=r.refinement(s,i);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(o.common.async===!1){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?J:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>s.status==="aborted"?J:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(r.type==="transform")if(o.common.async===!1){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Vr(a))return J;let s=r.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>Vr(a)?Promise.resolve(r.transform(a.value,i)).then(s=>({status:n.value,value:s})):J);ce.assertNever(r)}};zt.create=(e,t,n)=>new zt({schema:e,typeName:j.ZodEffects,effect:t,...Y(n)});zt.createWithPreprocess=(e,t,n)=>new zt({schema:t,effect:{type:"preprocess",transform:e},typeName:j.ZodEffects,...Y(n)});var St=class extends ne{_parse(t){return this._getType(t)===Z.undefined?Ge(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};St.create=(e,t)=>new St({innerType:e,typeName:j.ZodOptional,...Y(t)});var Yt=class extends ne{_parse(t){return this._getType(t)===Z.null?Ge(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Yt.create=(e,t)=>new Yt({innerType:e,typeName:j.ZodNullable,...Y(t)});var En=class extends ne{_parse(t){let{ctx:n}=this._processInputParams(t),o=n.data;return n.parsedType===Z.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};En.create=(e,t)=>new En({innerType:e,typeName:j.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Y(t)});var Tn=class extends ne{_parse(t){let{ctx:n}=this._processInputParams(t),o={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Uo(r)?r.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ct(o.common.issues)},input:o.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new ct(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};Tn.create=(e,t)=>new Tn({innerType:e,typeName:j.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Y(t)});var Go=class extends ne{_parse(t){if(this._getType(t)!==Z.nan){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:Z.nan,received:o.parsedType}),J}return{status:"valid",value:t.data}}};Go.create=e=>new Go({typeName:j.ZodNaN,...Y(e)});var Ga=class extends ne{_parse(t){let{ctx:n}=this._processInputParams(t),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}},Wa=class e extends ne{_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?J:i.status==="dirty"?(n.dirty(),vn(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let r=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return r.status==="aborted"?J:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:o.path,parent:o})}}static create(t,n){return new e({in:t,out:n,typeName:j.ZodPipeline})}},Pn=class extends ne{_parse(t){let n=this._def.innerType._parse(t),o=r=>(Vr(r)&&(r.value=Object.freeze(r.value)),r);return Uo(n)?n.then(r=>o(r)):o(n)}unwrap(){return this._def.innerType}};Pn.create=(e,t)=>new Pn({innerType:e,typeName:j.ZodReadonly,...Y(t)});var D4={object:ut.lazycreate},j;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(j||(j={}));var C4=yn.create,Z4=Mo.create,U4=Go.create,M4=Lo.create,L4=qo.create,q4=Vo.create,V4=Fo.create,F4=bn.create,B4=$n.create,K4=Bo.create,H4=fr.create,J4=Dt.create,G4=Ko.create,W4=pr.create,qg=ut.create,X4=ut.strictCreate,Y4=xn.create,Q4=$d.create,eD=wn.create,tD=Xt.create,rD=wd.create,nD=Ho.create,oD=Jo.create,iD=kd.create,aD=kn.create,sD=Sn.create,cD=zn.create,uD=In.create,lD=Fr.create,dD=zt.create,fD=St.create,pD=Yt.create,mD=zt.createWithPreprocess,hD=Wa.create;var ft={};qr(ft,{$ZodAny:()=>Hs,$ZodArray:()=>Ys,$ZodAsyncError:()=>It,$ZodBase64:()=>Cs,$ZodBase64URL:()=>Zs,$ZodBigInt:()=>ui,$ZodBigIntFormat:()=>Vs,$ZodBoolean:()=>Ln,$ZodCIDRv4:()=>As,$ZodCIDRv6:()=>Ds,$ZodCUID:()=>ks,$ZodCUID2:()=>Ss,$ZodCatch:()=>hc,$ZodCheck:()=>$e,$ZodCheckBigIntFormat:()=>ff,$ZodCheckEndsWith:()=>kf,$ZodCheckGreaterThan:()=>fs,$ZodCheckIncludes:()=>xf,$ZodCheckLengthEquals:()=>_f,$ZodCheckLessThan:()=>ds,$ZodCheckLowerCase:()=>bf,$ZodCheckMaxLength:()=>gf,$ZodCheckMaxSize:()=>pf,$ZodCheckMimeType:()=>zf,$ZodCheckMinLength:()=>vf,$ZodCheckMinSize:()=>mf,$ZodCheckMultipleOf:()=>lf,$ZodCheckNumberFormat:()=>df,$ZodCheckOverwrite:()=>If,$ZodCheckProperty:()=>Sf,$ZodCheckRegex:()=>yf,$ZodCheckSizeEquals:()=>hf,$ZodCheckStartsWith:()=>wf,$ZodCheckStringFormat:()=>Mn,$ZodCheckUpperCase:()=>$f,$ZodCodec:()=>qn,$ZodCustom:()=>wc,$ZodCustomStringFormat:()=>Ls,$ZodDate:()=>Xs,$ZodDefault:()=>dc,$ZodDiscriminatedUnion:()=>ec,$ZodE164:()=>Us,$ZodEmail:()=>bs,$ZodEmoji:()=>xs,$ZodEncodeError:()=>mr,$ZodEnum:()=>ic,$ZodError:()=>oi,$ZodFile:()=>sc,$ZodFunction:()=>bc,$ZodGUID:()=>_s,$ZodIPv4:()=>Ns,$ZodIPv6:()=>Rs,$ZodISODate:()=>Ps,$ZodISODateTime:()=>Ts,$ZodISODuration:()=>Os,$ZodISOTime:()=>js,$ZodIntersection:()=>tc,$ZodJWT:()=>Ms,$ZodKSUID:()=>Es,$ZodLazy:()=>xc,$ZodLiteral:()=>ac,$ZodMap:()=>nc,$ZodNaN:()=>gc,$ZodNanoID:()=>ws,$ZodNever:()=>Gs,$ZodNonOptional:()=>pc,$ZodNull:()=>Ks,$ZodNullable:()=>lc,$ZodNumber:()=>ci,$ZodNumberFormat:()=>qs,$ZodObject:()=>Qs,$ZodObjectJIT:()=>jf,$ZodOptional:()=>uc,$ZodPipe:()=>vc,$ZodPrefault:()=>fc,$ZodPromise:()=>$c,$ZodReadonly:()=>_c,$ZodRealError:()=>Qe,$ZodRecord:()=>rc,$ZodRegistry:()=>Fn,$ZodSet:()=>oc,$ZodString:()=>xr,$ZodStringFormat:()=>ge,$ZodSuccess:()=>mc,$ZodSymbol:()=>Fs,$ZodTemplateLiteral:()=>yc,$ZodTransform:()=>cc,$ZodTuple:()=>di,$ZodType:()=>W,$ZodULID:()=>zs,$ZodURL:()=>$s,$ZodUUID:()=>ys,$ZodUndefined:()=>Bs,$ZodUnion:()=>li,$ZodUnknown:()=>Js,$ZodVoid:()=>Ws,$ZodXID:()=>Is,$brand:()=>Xo,$constructor:()=>$,$input:()=>Ec,$output:()=>Ic,Doc:()=>si,JSONSchema:()=>h_,JSONSchemaGenerator:()=>Ai,NEVER:()=>Xa,TimePrecision:()=>jc,_any:()=>Yc,_array:()=>Of,_base64:()=>ji,_base64url:()=>Oi,_bigint:()=>Bc,_boolean:()=>Vc,_catch:()=>$I,_check:()=>m_,_cidrv4:()=>Ti,_cidrv6:()=>Pi,_coercedBigint:()=>Kc,_coercedBoolean:()=>Fc,_coercedDate:()=>nu,_coercedNumber:()=>Cc,_coercedString:()=>Pc,_cuid:()=>xi,_cuid2:()=>wi,_custom:()=>du,_date:()=>ru,_decode:()=>ns,_decodeAsync:()=>is,_default:()=>_I,_discriminatedUnion:()=>aI,_e164:()=>Ni,_email:()=>hi,_emoji:()=>bi,_encode:()=>rs,_encodeAsync:()=>os,_endsWith:()=>Qn,_enum:()=>fI,_file:()=>lu,_float32:()=>Uc,_float64:()=>Mc,_gt:()=>Ut,_gte:()=>Ve,_guid:()=>Bn,_includes:()=>Xn,_int:()=>Zc,_int32:()=>Lc,_int64:()=>Hc,_intersection:()=>sI,_ipv4:()=>Ii,_ipv6:()=>Ei,_isoDate:()=>Nc,_isoDateTime:()=>Oc,_isoDuration:()=>Ac,_isoTime:()=>Rc,_jwt:()=>Ri,_ksuid:()=>zi,_lazy:()=>SI,_length:()=>Xr,_literal:()=>mI,_lowercase:()=>Gn,_lt:()=>Zt,_lte:()=>tt,_map:()=>lI,_max:()=>tt,_maxLength:()=>Wr,_maxSize:()=>Gr,_mime:()=>eo,_min:()=>Ve,_minLength:()=>Qt,_minSize:()=>kr,_multipleOf:()=>wr,_nan:()=>ou,_nanoid:()=>$i,_nativeEnum:()=>pI,_negative:()=>au,_never:()=>eu,_nonnegative:()=>cu,_nonoptional:()=>yI,_nonpositive:()=>su,_normalize:()=>to,_null:()=>Xc,_nullable:()=>vI,_number:()=>Dc,_optional:()=>gI,_overwrite:()=>Mt,_parse:()=>Dn,_parseAsync:()=>Cn,_pipe:()=>xI,_positive:()=>iu,_promise:()=>zI,_property:()=>uu,_readonly:()=>wI,_record:()=>uI,_refine:()=>fu,_regex:()=>Jn,_safeDecode:()=>ss,_safeDecodeAsync:()=>us,_safeEncode:()=>as,_safeEncodeAsync:()=>cs,_safeParse:()=>Zn,_safeParseAsync:()=>Un,_set:()=>dI,_size:()=>Hn,_startsWith:()=>Yn,_string:()=>Tc,_stringFormat:()=>Yr,_stringbool:()=>mu,_success:()=>bI,_superRefine:()=>pu,_symbol:()=>Gc,_templateLiteral:()=>kI,_toLowerCase:()=>no,_toUpperCase:()=>oo,_transform:()=>hI,_trim:()=>ro,_tuple:()=>cI,_uint32:()=>qc,_uint64:()=>Jc,_ulid:()=>ki,_undefined:()=>Wc,_union:()=>iI,_unknown:()=>Qc,_uppercase:()=>Wn,_url:()=>Kn,_uuid:()=>gi,_uuidv4:()=>vi,_uuidv6:()=>_i,_uuidv7:()=>yi,_void:()=>tu,_xid:()=>Si,clone:()=>Ne,config:()=>Ee,decode:()=>Gg,decodeAsync:()=>Xg,encode:()=>Jg,encodeAsync:()=>Wg,flattenError:()=>Rn,formatError:()=>An,globalConfig:()=>Wo,globalRegistry:()=>Et,isValidBase64:()=>Pf,isValidBase64URL:()=>_v,isValidJWT:()=>yv,locales:()=>Vn,parse:()=>Kr,parseAsync:()=>Hr,prettifyError:()=>ts,regexes:()=>et,registry:()=>mi,safeDecode:()=>Qg,safeDecodeAsync:()=>tv,safeEncode:()=>Yg,safeEncodeAsync:()=>ev,safeParse:()=>br,safeParseAsync:()=>$r,toDotPath:()=>Hg,toJSONSchema:()=>io,treeifyError:()=>es,util:()=>E,version:()=>Ef});var Xa=Object.freeze({status:"aborted"});function $(e,t,n){function o(s,c){var l;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(l=s._zod).traits??(l.traits=new Set),s._zod.traits.add(e),t(s,c);for(let d in a.prototype)d in s||Object.defineProperty(s,d,{value:a.prototype[d].bind(s)});s._zod.constr=a,s._zod.def=c}let r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,"name",{value:e});function a(s){var c;let l=n?.Parent?new i:this;o(l,s),(c=l._zod).deferred??(c.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Xo=Symbol("zod_brand"),It=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},mr=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},Wo={};function Ee(e){return e&&Object.assign(Wo,e),Wo}var E={};qr(E,{BIGINT_FORMAT_RANGES:()=>Nd,Class:()=>zd,NUMBER_FORMAT_RANGES:()=>Od,aborted:()=>yr,allowsEval:()=>Ed,assert:()=>m0,assertEqual:()=>l0,assertIs:()=>f0,assertNever:()=>p0,assertNotEqual:()=>d0,assignProp:()=>gr,base64ToUint8Array:()=>Fg,base64urlToUint8Array:()=>j0,cached:()=>On,captureStackTrace:()=>Qa,cleanEnum:()=>P0,cleanRegex:()=>ei,clone:()=>Ne,cloneDef:()=>g0,createTransparentProxy:()=>x0,defineLazy:()=>se,esc:()=>Ya,escapeRegex:()=>Ct,extend:()=>S0,finalizeIssue:()=>dt,floatSafeRemainder:()=>Id,getElementAtPath:()=>v0,getEnumValues:()=>Qo,getLengthableOrigin:()=>ni,getParsedType:()=>$0,getSizableOrigin:()=>ri,hexToUint8Array:()=>N0,isObject:()=>Br,isPlainObject:()=>_r,issue:()=>Nn,joinValues:()=>S,jsonStringifyReplacer:()=>jn,merge:()=>I0,mergeDefs:()=>vr,normalizeParams:()=>N,nullish:()=>hr,numKeys:()=>b0,objectClone:()=>h0,omit:()=>k0,optionalKeys:()=>jd,partial:()=>E0,pick:()=>w0,prefixIssues:()=>lt,primitiveTypes:()=>Pd,promiseAllObject:()=>_0,propertyKeyTypes:()=>ti,randomString:()=>y0,required:()=>T0,safeExtend:()=>z0,shallowClone:()=>Td,stringifyPrimitive:()=>O,uint8ArrayToBase64:()=>Bg,uint8ArrayToBase64url:()=>O0,uint8ArrayToHex:()=>R0,unwrapMessage:()=>Yo});function l0(e){return e}function d0(e){return e}function f0(e){}function p0(e){throw new Error}function m0(e){}function Qo(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function S(e,t="|"){return e.map(n=>O(n)).join(t)}function jn(e,t){return typeof t=="bigint"?t.toString():t}function On(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function hr(e){return e==null}function ei(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Id(e,t){let n=(e.toString().split(".")[1]||"").length,o=t.toString(),r=(o.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(o)){let c=o.match(/\d?e-(\d?)/);c?.[1]&&(r=Number.parseInt(c[1]))}let i=n>r?n:r,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}var Vg=Symbol("evaluating");function se(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==Vg)return o===void 0&&(o=Vg,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function h0(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function gr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function vr(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function g0(e){return vr(e._zod.def)}function v0(e,t){return t?t.reduce((n,o)=>n?.[o],e):e}function _0(e){let t=Object.keys(e),n=t.map(o=>e[o]);return Promise.all(n).then(o=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=o[i];return r})}function y0(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n}function Ya(e){return JSON.stringify(e)}var Qa="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Br(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Ed=On(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function _r(e){if(Br(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(Br(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Td(e){return _r(e)?{...e}:Array.isArray(e)?[...e]:e}function b0(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var $0=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},ti=new Set(["string","number","symbol"]),Pd=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ct(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ne(e,t,n){let o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function N(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function x0(e){let t;return new Proxy({},{get(n,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(n,o,r,i){return t??(t=e()),Reflect.set(t,o,r,i)},has(n,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(n,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(n,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}function O(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function jd(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Od={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Nd={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function w0(e,t){let n=e._zod.def,o=vr(e._zod.def,{get shape(){let r={};for(let i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(r[i]=n.shape[i])}return gr(this,"shape",r),r},checks:[]});return Ne(e,o)}function k0(e,t){let n=e._zod.def,o=vr(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete r[i]}return gr(this,"shape",r),r},checks:[]});return Ne(e,o)}function S0(e,t){if(!_r(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let r=vr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return gr(this,"shape",i),i},checks:[]});return Ne(e,r)}function z0(e,t){if(!_r(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n={...e._zod.def,get shape(){let o={...e._zod.def.shape,...t};return gr(this,"shape",o),o},checks:e._zod.def.checks};return Ne(e,n)}function I0(e,t){let n=vr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return gr(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Ne(e,n)}function E0(e,t,n){let o=vr(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let a in n){if(!(a in r))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=e?new e({type:"optional",innerType:r[a]}):r[a])}else for(let a in r)i[a]=e?new e({type:"optional",innerType:r[a]}):r[a];return gr(this,"shape",i),i},checks:[]});return Ne(t,o)}function T0(e,t,n){let o=vr(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let a in n){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(let a in r)i[a]=new e({type:"nonoptional",innerType:r[a]});return gr(this,"shape",i),i},checks:[]});return Ne(t,o)}function yr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function lt(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function Yo(e){return typeof e=="string"?e:e?.message}function dt(e,t,n){let o={...e,path:e.path??[]};if(!e.message){let r=Yo(e.inst?._zod.def?.error?.(e))??Yo(t?.error?.(e))??Yo(n.customError?.(e))??Yo(n.localeError?.(e))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function ri(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function ni(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Nn(...e){let[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}function P0(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Fg(e){let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}function Bg(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function j0(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return Fg(t+n)}function O0(e){return Bg(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function N0(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)n[o/2]=Number.parseInt(t.slice(o,o+2),16);return n}function R0(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var zd=class{constructor(...t){}};var Kg=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,jn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},oi=$("$ZodError",Kg),Qe=$("$ZodError",Kg,{Parent:Error});function Rn(e,t=n=>n.message){let n={},o=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}function An(e,t){let n=t||function(i){return i.message},o={_errors:[]},r=i=>{for(let a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>r({issues:s}));else if(a.code==="invalid_key")r({issues:a.issues});else if(a.code==="invalid_element")r({issues:a.issues});else if(a.path.length===0)o._errors.push(n(a));else{let s=o,c=0;for(;c<a.path.length;){let l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return r(e),o}function es(e,t){let n=t||function(i){return i.message},o={errors:[]},r=(i,a=[])=>{var s,c;for(let l of i.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(d=>r({issues:d},l.path));else if(l.code==="invalid_key")r({issues:l.issues},l.path);else if(l.code==="invalid_element")r({issues:l.issues},l.path);else{let d=[...a,...l.path];if(d.length===0){o.errors.push(n(l));continue}let f=o,y=0;for(;y<d.length;){let v=d[y],g=y===d.length-1;typeof v=="string"?(f.properties??(f.properties={}),(s=f.properties)[v]??(s[v]={errors:[]}),f=f.properties[v]):(f.items??(f.items=[]),(c=f.items)[v]??(c[v]={errors:[]}),f=f.items[v]),g&&f.errors.push(n(l)),y++}}};return r(e),o}function Hg(e){let t=[],n=e.map(o=>typeof o=="object"?o.key:o);for(let o of n)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function ts(e){let t=[],n=[...e.issues].sort((o,r)=>(o.path??[]).length-(r.path??[]).length);for(let o of n)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Hg(o.path)}`);return t.join(`
|
|
35
|
-
`)}var Dn=e=>(t,n,o,r)=>{let i=o?Object.assign(o,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new It;if(a.issues.length){let s=new(r?.Err??e)(a.issues.map(c=>dt(c,i,Ee())));throw Qa(s,r?.callee),s}return a.value},Kr=Dn(Qe),Cn=e=>async(t,n,o,r)=>{let i=o?Object.assign(o,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(r?.Err??e)(a.issues.map(c=>dt(c,i,Ee())));throw Qa(s,r?.callee),s}return a.value},Hr=Cn(Qe),Zn=e=>(t,n,o)=>{let r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new It;return i.issues.length?{success:!1,error:new(e??oi)(i.issues.map(a=>dt(a,r,Ee())))}:{success:!0,data:i.value}},br=Zn(Qe),Un=e=>async(t,n,o)=>{let r=o?Object.assign(o,{async:!0}):{async:!0},i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>dt(a,r,Ee())))}:{success:!0,data:i.value}},$r=Un(Qe),rs=e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Dn(e)(t,n,r)},Jg=rs(Qe),ns=e=>(t,n,o)=>Dn(e)(t,n,o),Gg=ns(Qe),os=e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Cn(e)(t,n,r)},Wg=os(Qe),is=e=>async(t,n,o)=>Cn(e)(t,n,o),Xg=is(Qe),as=e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Zn(e)(t,n,r)},Yg=as(Qe),ss=e=>(t,n,o)=>Zn(e)(t,n,o),Qg=ss(Qe),cs=e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Un(e)(t,n,r)},ev=cs(Qe),us=e=>async(t,n,o)=>Un(e)(t,n,o),tv=us(Qe);var et={};qr(et,{base64:()=>Jd,base64url:()=>ls,bigint:()=>tf,boolean:()=>of,browserEmail:()=>V0,cidrv4:()=>Kd,cidrv6:()=>Hd,cuid:()=>Rd,cuid2:()=>Ad,date:()=>Xd,datetime:()=>Qd,domain:()=>B0,duration:()=>Md,e164:()=>Wd,email:()=>qd,emoji:()=>Vd,extendedDuration:()=>D0,guid:()=>Ld,hex:()=>K0,hostname:()=>Gd,html5Email:()=>M0,idnEmail:()=>q0,integer:()=>rf,ipv4:()=>Fd,ipv6:()=>Bd,ksuid:()=>Zd,lowercase:()=>cf,md5_base64:()=>J0,md5_base64url:()=>G0,md5_hex:()=>H0,nanoid:()=>Ud,null:()=>af,number:()=>nf,rfc5322Email:()=>L0,sha1_base64:()=>X0,sha1_base64url:()=>Y0,sha1_hex:()=>W0,sha256_base64:()=>ez,sha256_base64url:()=>tz,sha256_hex:()=>Q0,sha384_base64:()=>nz,sha384_base64url:()=>oz,sha384_hex:()=>rz,sha512_base64:()=>az,sha512_base64url:()=>sz,sha512_hex:()=>iz,string:()=>ef,time:()=>Yd,ulid:()=>Dd,undefined:()=>sf,unicodeEmail:()=>rv,uppercase:()=>uf,uuid:()=>Jr,uuid4:()=>C0,uuid6:()=>Z0,uuid7:()=>U0,xid:()=>Cd});var Rd=/^[cC][^\s-]{8,}$/,Ad=/^[0-9a-z]+$/,Dd=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Cd=/^[0-9a-vA-V]{20}$/,Zd=/^[A-Za-z0-9]{27}$/,Ud=/^[a-zA-Z0-9_-]{21}$/,Md=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,D0=/^[-+]?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)?)??$/,Ld=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Jr=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,C0=Jr(4),Z0=Jr(6),U0=Jr(7),qd=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,M0=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,L0=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,rv=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,q0=rv,V0=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,F0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Vd(){return new RegExp(F0,"u")}var Fd=/^(?:(?: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])$/,Bd=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,Kd=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,Hd=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Jd=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ls=/^[A-Za-z0-9_-]*$/,Gd=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,B0=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Wd=/^\+(?:[0-9]){6,14}[0-9]$/,nv="(?:(?:\\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])))",Xd=new RegExp(`^${nv}$`);function ov(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Yd(e){return new RegExp(`^${ov(e)}$`)}function Qd(e){let t=ov({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${n.join("|")})`;return new RegExp(`^${nv}T(?:${o})$`)}var ef=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},tf=/^-?\d+n?$/,rf=/^-?\d+$/,nf=/^-?\d+(?:\.\d+)?/,of=/^(?:true|false)$/i,af=/^null$/i;var sf=/^undefined$/i;var cf=/^[^A-Z]*$/,uf=/^[^a-z]*$/,K0=/^[0-9a-fA-F]*$/;function ii(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ai(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var H0=/^[0-9a-fA-F]{32}$/,J0=ii(22,"=="),G0=ai(22),W0=/^[0-9a-fA-F]{40}$/,X0=ii(27,"="),Y0=ai(27),Q0=/^[0-9a-fA-F]{64}$/,ez=ii(43,"="),tz=ai(43),rz=/^[0-9a-fA-F]{96}$/,nz=ii(64,""),oz=ai(64),iz=/^[0-9a-fA-F]{128}$/,az=ii(86,"=="),sz=ai(86);var $e=$("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),av={number:"number",bigint:"bigint",object:"date"},ds=$("$ZodCheckLessThan",(e,t)=>{$e.init(e,t);let n=av[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),fs=$("$ZodCheckGreaterThan",(e,t)=>{$e.init(e,t);let n=av[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),lf=$("$ZodCheckMultipleOf",(e,t)=>{$e.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Id(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),df=$("$ZodCheckNumberFormat",(e,t)=>{$e.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),o=n?"int":"number",[r,i]=Od[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=r,s.maximum=i,n&&(s.pattern=rf)}),e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort});return}}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inst:e})}}),ff=$("$ZodCheckBigIntFormat",(e,t)=>{$e.init(e,t);let[n,o]=Nd[t.format];e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,i.minimum=n,i.maximum=o}),e._zod.check=r=>{let i=r.value;i<n&&r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),i>o&&r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inst:e})}}),pf=$("$ZodCheckMaxSize",(e,t)=>{var n;$e.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!hr(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;r.size<=t.maximum||o.issues.push({origin:ri(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),mf=$("$ZodCheckMinSize",(e,t)=>{var n;$e.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!hr(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;r.size>=t.minimum||o.issues.push({origin:ri(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),hf=$("$ZodCheckSizeEquals",(e,t)=>{var n;$e.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!hr(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=o=>{let r=o.value,i=r.size;if(i===t.size)return;let a=i>t.size;o.issues.push({origin:ri(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),gf=$("$ZodCheckMaxLength",(e,t)=>{var n;$e.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!hr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;if(r.length<=t.maximum)return;let a=ni(r);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),vf=$("$ZodCheckMinLength",(e,t)=>{var n;$e.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!hr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;if(r.length>=t.minimum)return;let a=ni(r);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),_f=$("$ZodCheckLengthEquals",(e,t)=>{var n;$e.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!hr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=o=>{let r=o.value,i=r.length;if(i===t.length)return;let a=ni(r),s=i>t.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Mn=$("$ZodCheckStringFormat",(e,t)=>{var n,o;$e.init(e,t),e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),yf=$("$ZodCheckRegex",(e,t)=>{Mn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),bf=$("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=cf),Mn.init(e,t)}),$f=$("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=uf),Mn.init(e,t)}),xf=$("$ZodCheckIncludes",(e,t)=>{$e.init(e,t);let n=Ct(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(r=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),wf=$("$ZodCheckStartsWith",(e,t)=>{$e.init(e,t);let n=new RegExp(`^${Ct(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),kf=$("$ZodCheckEndsWith",(e,t)=>{$e.init(e,t);let n=new RegExp(`.*${Ct(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function iv(e,t,n){e.issues.length&&t.issues.push(...lt(n,e.issues))}var Sf=$("$ZodCheckProperty",(e,t)=>{$e.init(e,t),e._zod.check=n=>{let o=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(r=>iv(r,n,t.property));iv(o,n,t.property)}}),zf=$("$ZodCheckMimeType",(e,t)=>{$e.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),If=$("$ZodCheckOverwrite",(e,t)=>{$e.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var si=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
|
|
34
|
+
`+m),u};var Ba={},Fk=gn.getStack;Ba={name:"contextualize",load:function(u){var m=function(h,p){var y=Fk(),w=fd(u);return w.fallbackStack=y,w.addOnError(p),u._clientContext.run(w,h)};return m}},Ba.default=Ba;var Ka={},Bk=gn.getStack,Kk=gn.maybeUseFallbackStack;Ka={name:"intercept",load:function(u){var m=function(h,p){h===void 0&&(h=function(){}),typeof p!="function"&&(p=h,h=function(){});var y=Bk();return function(w){if(w){w.stack&&Kk(w,y);var z=u.Event.create(w,!0,{severity:"warning",unhandled:!1,severityReason:{type:"callbackErrorIntercept"}},"intercept()",1);u._notify(z,h);return}for(var D=arguments.length,L=new Array(D>1?D-1:0),Q=1;Q<D;Q++)L[Q-1]=arguments[Q];p.apply(void 0,L)}};return m}},Ka.default=Ka;function Ha(){return Ha=Object.assign?Object.assign.bind():function(u){for(var m=1;m<arguments.length;m++){var h=arguments[m];for(var p in h)({}).hasOwnProperty.call(h,p)&&(u[p]=h[p])}return u},Ha.apply(null,arguments)}var Uo=require("os"),Hk={load:function(u){var m={osName:Uo.platform()+" ("+Uo.arch()+")",osVersion:Uo.release(),totalMemory:Uo.totalmem(),hostname:u._config.hostname,runtimeVersions:{node:process.versions.node}};u._addOnSessionPayload(function(h){h.device=Ha({},h.device,m)}),u.addOnError(function(h){h.device=Ha({},h.device,m,{freeMemory:Uo.freemem(),time:new Date})},!0)}},jg=require("path"),Jk=jg.join,Gk=jg.resolve,Ng=function(u){return Jk(Gk(u),"/")},Wk={load:function(u){return u.addOnError(function(m){if(u._config.projectRoot){var h=Ng(u._config.projectRoot),p=m.errors.reduce(function(y,w){return y.concat(w.stacktrace)},[]);p.map(function(y){y.inProject=typeof y.file=="string"&&y.file.indexOf(h)===0&&!/\/node_modules\//.test(y.file)})}})}};function pd(){return pd=Object.assign?Object.assign.bind():function(u){for(var m=1;m<arguments.length;m++){var h=arguments[m];for(var p in h)({}).hasOwnProperty.call(h,p)&&(u[p]=h[p])}return u},pd.apply(null,arguments)}function Xk(u,m){u.prototype=Object.create(m.prototype),u.prototype.constructor=u,md(u,m)}function md(u,m){return md=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,p){return h.__proto__=p,h},md(u,m)}var Rg=3,Ag=200,Yk=require("fs"),Qk=Yk.createReadStream,eS=require("stream"),tS=eS.Writable,rS=$w(),nS=ww(),oS=require("path"),iS={load:function(u){if(u._config.sendCode){var m=function(h,p){return new Promise(function(y,w){try{if(!h.lineNumber||!h.file)return y(h);var z=oS.resolve(u._config.projectRoot,h.file),D=z+"@"+h.lineNumber;if(D in p)return h.code=p[D],y(h);aS(z,h.lineNumber,function(L,Q){return L||(h.code=p[D]=Q),y(h)})}catch{return y(h)}})};u.addOnError(function(h){return new Promise(function(p,y){var w=Object.create(null),z=h.errors.reduce(function(D,L){return D.concat(L.stacktrace)},[]);cS(z.map(function(D){return function(){return m(D,w)}})).then(p).catch(y)})})}},configSchema:{sendCode:{defaultValue:function(){return!0},validate:function(u){return u===!0||u===!1},message:"should be true or false"}}},aS=function(u,m,h){var p=m-Rg,y=m+Rg,w=Qk(u,{encoding:"utf8"}),z=new nS.LineStream({keepEmptyLines:!0}),D=new sS({start:p,end:y});D.on("done",function(){return w.destroy()}),rS(w,z,D,function(L){if(L&&L.message!=="premature close")return h(L);h(null,D.getCode())})},sS=(function(u){function m(p){var y;return y=u.call(this,pd({},p,{decodeStrings:!1}))||this,y._start=p.start,y._end=p.end,y._n=0,y._code={},y}Xk(m,u);var h=m.prototype;return h._write=function(y,w,z){return this._n++,this._n<this._start?z(null):this._n<=this._end?(this._code[String(this._n)]=y.length<=Ag?y:y.substr(0,Ag),z(null)):(this.emit("done"),z(null))},h.getCode=function(){return this._code},m})(tS),cS=function(u){return new Promise(function(m,h){var p=[];u.reduce(function(y,w){return y.then(function(z){return p.push(z),w()})},Promise.resolve()).then(function(y){p.push(y)}).then(function(){m(p.slice(1))})})},uS=gn.maybeUseFallbackStack,hd,lS={load:function(u){u._config.autoDetectErrors&&u._config.enabledErrorTypes.unhandledExceptions&&(hd=function(m){var h=u._clientContext&&u._clientContext.getStore(),p=h||u;m.stack&&p.fallbackStack&&uS(m,p.fallbackStack);var y=p.Event.create(m,!1,{severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},"uncaughtException handler",1);return new Promise(function(w){p._notify(y,function(){},function(z,D){z&&p._logger.error("Failed to send event to Bugsnag"),p._config.onUncaughtException(m,D,p._logger),w()})})},process.prependListener("uncaughtException",hd))},destroy:function(){process.removeListener("uncaughtException",hd)}},Ja,dS={load:function(u){!u._config.autoDetectErrors||!u._config.enabledErrorTypes.unhandledRejections||(Ja=function(m){var h=u._clientContext&&u._clientContext.getStore(),p=h||u,y=!u._config.reportUnhandledPromiseRejectionsAsHandled,w=p.Event.create(m,!1,{severity:"error",unhandled:y,severityReason:{type:"unhandledPromiseRejection"}},"unhandledRejection handler",1);return new Promise(function(z){p._notify(w,function(){},function(D,L){D&&p._logger.error("Failed to send event to Bugsnag"),p._config.onUnhandledRejection(m,L,p._logger),z()})})},process.prependListener?process.prependListener("unhandledRejection",Ja):process.on("unhandledRejection",Ja))},destroy:function(){process.removeListener("unhandledRejection",Ja)}},fS=gd;function gd(u){u=u||{},this.ms=u.min||100,this.max=u.max||1e4,this.factor=u.factor||2,this.jitter=u.jitter>0&&u.jitter<=1?u.jitter:0,this.attempts=0}gd.prototype.duration=function(){var u=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var m=Math.random(),h=Math.floor(m*this.jitter*u);u=(Math.floor(m*10)&1)==0?u-h:u+h}return Math.min(u,this.max)|0},gd.prototype.reset=function(){this.attempts=0};function pS(u,m){u.prototype=Object.create(m.prototype),u.prototype.constructor=u,vd(u,m)}function vd(u,m){return vd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,p){return h.__proto__=p,h},vd(u,m)}var mS=10*1e3,hS=require("events").EventEmitter,gS=(function(u){function m(p){var y;return y=u.call(this)||this,y._sessions=new Map,y._interval=null,y._intervalLength=p||mS,y._summarize=y._summarize.bind(y),y}pS(m,u);var h=m.prototype;return h.start=function(){this._interval||(this._interval=setInterval(this._summarize,this._intervalLength).unref())},h.stop=function(){clearInterval(this._interval),this._interval=null},h.track=function(y){var w=vS(y.startedAt),z=this._sessions.get(w);return this._sessions.set(w,typeof z>"u"?1:z+1),y},h._summarize=function(){var y=this,w=[];this._sessions.forEach(function(z,D){w.push({startedAt:D,sessionsStarted:z}),y._sessions.delete(D)}),w.length&&this.emit("summary",w)},m})(hS),vS=function(u){var m=new Date(u);return m.setSeconds(0),m.setMilliseconds(0),m.toISOString()},_S={load:function(u){var m=null;u._sessionDelegate={startSession:function(h,p){return m||(m=new gS(h._config.sessionSummaryInterval),m.on("summary",yS(h)),m.start()),h._session=p,h._pausedSession=null,m.track(h._session),h},pauseSession:function(h){h._pausedSession=h._session,h._session=null},resumeSession:function(h){return h._session?h:h._pausedSession?(h._session=h._pausedSession,h._pausedSession=null,h):h.startSession()}}},configSchema:{sessionSummaryInterval:{defaultValue:function(){},validate:function(u){return u===void 0||v()(u)},message:"should be a positive integer"}}},yS=function(u){return function(m){if(u._config.enabledReleaseStages!==null&&!u._config.enabledReleaseStages.includes(u._config.releaseStage)){u._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration");return}if(!m.length)return;var h=new fS({min:1e3,max:1e4}),p=10;w(y);function y(z){if(!z){var D=m.reduce(function(L,Q){return L+Q.sessionsStarted},0);return u._logger.debug(D+" session(s) reported")}if(h.attempts===10){u._logger.error("Session delivery failed, max retries exceeded",z);return}u._logger.debug("Session delivery failed, retry #"+(h.attempts+1)+"/"+p,z),setTimeout(function(){return w(y)},h.duration())}function w(z){var D={notifier:u._notifier,device:{},app:{releaseStage:u._config.releaseStage,version:u._config.appVersion,type:u._config.appType},sessionCounts:m},L=id(u._cbs.sp,D,"onSessionPayload",u._logger);if(L)return u._logger.debug("Session not sent due to onSessionPayload callback"),z(null);u._delivery.sendSession(D,z)}}},bS={load:function(u){u.addOnError(function(m){var h=m.errors.reduce(function(p,y){return p.concat(y.stacktrace)},[]);h.forEach(function(p){typeof p.file=="string"&&(p.file=p.file.replace(/\\/g,"/"))})})}},$S={load:function(u){return u.addOnError(function(m){if(u._config.projectRoot){var h=Ng(u._config.projectRoot),p=m.errors.reduce(function(y,w){return y.concat(w.stacktrace)},[]);p.map(function(y){typeof y.file=="string"&&y.file.indexOf(h)===0&&(y.file=y.file.replace(h,""))})}})}},Vr={};function _d(){return _d=Object.assign?Object.assign.bind():function(u){for(var m=1;m<arguments.length;m++){var h=arguments[m];for(var p in h)({}).hasOwnProperty.call(h,p)&&(u[p]=h[p])}return u},_d.apply(null,arguments)}var xS="Bugsnag Node",wS="8.8.0",kS="https://github.com/bugsnag/bugsnag-js",SS=require("async_hooks"),zS=SS.AsyncLocalStorage;Ma.__type="nodejs";var IS=_d({},x.schema,Zk),ES=[Vk,iS,Wk,$S,_S,Hk,lS,dS,Ka,Ba,bS,dd],kt={_client:null,createClient:function(u){typeof u=="string"&&(u={apiKey:u}),u||(u={});var m=new Va(u,IS,ES,{name:xS,version:wS,url:kS});return Object.keys(Va.prototype).forEach(function(h){var p=m[h];m[h]=function(){var y=m._clientContext&&typeof m._clientContext.getStore=="function"?m._clientContext.getStore():null,w=y||m,z=y?y[h]:p;w._depth+=1;var D=z.apply(w,arguments);return w._depth-=1,D}}),m._clientContext=new zS,m._setDelivery(Ak),m._logger.debug("Loaded!"),m},start:function(u){return kt._client?(kt._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."),kt._client):(kt._client=kt.createClient(u),kt._client)},isStarted:function(){return kt._client!=null}};return Object.keys(Va.prototype).forEach(function(u){/^_/.test(u)||(kt[u]=function(){var m=kt._client,h=m&&m._clientContext&&m._clientContext.getStore();if(h&&(m=h),!m)return console.error("Bugsnag."+u+"() was called before Bugsnag.start()");m._depth+=1;var p=m[u].apply(m,arguments);return m._depth-=1,p})}),Vr=kt,Vr.Client=Va,Vr.Event=Ma,Vr.Session=cd,Vr.Breadcrumb=r,Vr.default=kt,Vr})});var Iw=A((a9,zw)=>{zw.exports=Sw()});var xd=ht(Lg()),qg=ht(require("path"));process.env.DOTENV_CONFIG_SILENT="true";xd.default.config();xd.default.config({path:qg.default.resolve(__dirname,"../../.env")});var ce;(function(e){e.assertEqual=r=>{};function t(r){}e.assertIs=t;function n(r){throw new Error}e.assertNever=n,e.arrayToEnum=r=>{let i={};for(let a of r)i[a]=a;return i},e.getValidEnumValues=r=>{let i=e.objectKeys(r).filter(s=>typeof r[r[s]]!="number"),a={};for(let s of i)a[s]=r[s];return e.objectValues(a)},e.objectValues=r=>e.objectKeys(r).map(function(i){return r[i]}),e.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{let i=[];for(let a in r)Object.prototype.hasOwnProperty.call(r,a)&&i.push(a);return i},e.find=(r,i)=>{for(let a of r)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function o(r,i=" | "){return r.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(r,i)=>typeof i=="bigint"?i.toString():i})(ce||(ce={}));var Vg;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Vg||(Vg={}));var U=ce.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xt=e=>{switch(typeof e){case"undefined":return U.undefined;case"string":return U.string;case"number":return Number.isNaN(e)?U.nan:U.number;case"boolean":return U.boolean;case"function":return U.function;case"bigint":return U.bigint;case"symbol":return U.symbol;case"object":return Array.isArray(e)?U.array:e===null?U.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?U.promise:typeof Map<"u"&&e instanceof Map?U.map:typeof Set<"u"&&e instanceof Set?U.set:typeof Date<"u"&&e instanceof Date?U.date:U.object;default:return U.unknown}};var T=ce.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var ut=class e extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){let n=t||function(i){return i.message},o={_errors:[]},r=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(r);else if(a.code==="invalid_return_type")r(a.returnTypeError);else if(a.code==="invalid_arguments")r(a.argumentsError);else if(a.path.length===0)o._errors.push(n(a));else{let s=o,c=0;for(;c<a.path.length;){let l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return r(this),o}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ce.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n={},o=[];for(let r of this.issues)if(r.path.length>0){let i=r.path[0];n[i]=n[i]||[],n[i].push(t(r))}else o.push(t(r));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}};ut.create=e=>new ut(e);var GS=(e,t)=>{let n;switch(e.code){case T.invalid_type:e.received===U.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case T.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ce.jsonStringifyReplacer)}`;break;case T.unrecognized_keys:n=`Unrecognized key(s) in object: ${ce.joinValues(e.keys,", ")}`;break;case T.invalid_union:n="Invalid input";break;case T.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ce.joinValues(e.options)}`;break;case T.invalid_enum_value:n=`Invalid enum value. Expected ${ce.joinValues(e.options)}, received '${e.received}'`;break;case T.invalid_arguments:n="Invalid function arguments";break;case T.invalid_return_type:n="Invalid function return type";break;case T.invalid_date:n="Invalid date";break;case T.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ce.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case T.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case T.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case T.custom:n="Invalid input";break;case T.invalid_intersection_types:n="Intersection results could not be merged";break;case T.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case T.not_finite:n="Number must be finite";break;default:n=t.defaultError,ce.assertNever(e)}return{message:n}},pr=GS;var WS=pr;function Mo(){return WS}var Wa=e=>{let{data:t,path:n,errorMaps:o,issueData:r}=e,i=[...n,...r.path||[]],a={...r,path:i};if(r.message!==void 0)return{...r,path:i,message:r.message};let s="",c=o.filter(l=>!!l).slice().reverse();for(let l of c)s=l(a,{data:t,defaultError:s}).message;return{...r,path:i,message:s}};function C(e,t){let n=Mo(),o=Wa({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===pr?void 0:pr].filter(r=>!!r)});e.common.issues.push(o)}var qe=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let o=[];for(let r of n){if(r.status==="aborted")return J;r.status==="dirty"&&t.dirty(),o.push(r.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,n){let o=[];for(let r of n){let i=await r.key,a=await r.value;o.push({key:i,value:a})}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,n){let o={};for(let r of n){let{key:i,value:a}=r;if(i.status==="aborted"||a.status==="aborted")return J;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||r.alwaysSet)&&(o[i.value]=a.value)}return{status:t.value,value:o}}},J=Object.freeze({status:"aborted"}),yn=e=>({status:"dirty",value:e}),Ge=e=>({status:"valid",value:e}),wd=e=>e.status==="aborted",kd=e=>e.status==="dirty",Br=e=>e.status==="valid",Lo=e=>typeof Promise<"u"&&e instanceof Promise;var q;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(q||(q={}));var gt=class{constructor(t,n,o,r){this._cachedPath=[],this.parent=t,this.data=n,this._path=o,this._key=r}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}},Fg=(e,t)=>{if(Br(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new ut(e.common.issues);return this._error=n,this._error}}};function Y(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:o,description:r}=e;if(t&&(n||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:r}:{errorMap:(a,s)=>{let{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??o??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:c??n??s.defaultError}},description:r}}var ne=class{get description(){return this._def.description}_getType(t){return Xt(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Xt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qe,ctx:{common:t.parent.common,data:t.data,parsedType:Xt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(Lo(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let o=this.safeParse(t,n);if(o.success)return o.data;throw o.error}safeParse(t,n){let o={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xt(t)},r=this._parseSync({data:t,path:o.path,parent:o});return Fg(o,r)}"~validate"(t){let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xt(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:n});return Br(o)?{value:o.value}:{issues:n.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(o=>Br(o)?{value:o.value}:{issues:n.common.issues})}async parseAsync(t,n){let o=await this.safeParseAsync(t,n);if(o.success)return o.data;throw o.error}async safeParseAsync(t,n){let o={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xt(t)},r=this._parse({data:t,path:o.path,parent:o}),i=await(Lo(r)?r:Promise.resolve(r));return Fg(o,i)}refine(t,n){let o=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,i)=>{let a=t(r),s=()=>i.addIssue({code:T.custom,...o(r)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((o,r)=>t(o)?!0:(r.addIssue(typeof n=="function"?n(o,r):n),!1))}_refinement(t){return new It({schema:this,typeName:O.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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:n=>this["~validate"](n)}}optional(){return zt.create(this,this._def)}nullable(){return er.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return hr.create(this)}promise(){return Kr.create(this,this._def)}or(t){return kn.create([this,t],this._def)}and(t){return Sn.create(this,t,this._def)}transform(t){return new It({...Y(this._def),schema:this,typeName:O.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new Pn({...Y(this._def),innerType:this,defaultValue:n,typeName:O.ZodDefault})}brand(){return new Xa({typeName:O.ZodBranded,type:this,...Y(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new On({...Y(this._def),innerType:this,catchValue:n,typeName:O.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Ya.create(this,t)}readonly(){return jn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},XS=/^c[^\s-]{8,}$/i,YS=/^[0-9a-z]+$/,QS=/^[0-9A-HJKMNP-TV-Z]{26}$/i,e0=/^[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,t0=/^[a-z0-9_-]{21}$/i,r0=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,n0=/^[-+]?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)?)??$/,o0=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,i0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Sd,a0=/^(?:(?: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])$/,s0=/^(?:(?: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])$/,c0=/^(([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]))$/,u0=/^(([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])$/,l0=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,d0=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Bg="((\\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])))",f0=new RegExp(`^${Bg}$`);function Kg(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function p0(e){return new RegExp(`^${Kg(e)}$`)}function m0(e){let t=`${Bg}T${Kg(e)}`,n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function h0(e,t){return!!((t==="v4"||!t)&&a0.test(e)||(t==="v6"||!t)&&c0.test(e))}function g0(e,t){if(!r0.test(e))return!1;try{let[n]=e.split(".");if(!n)return!1;let o=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(o));return!(typeof r!="object"||r===null||"typ"in r&&r?.typ!=="JWT"||!r.alg||t&&r.alg!==t)}catch{return!1}}function v0(e,t){return!!((t==="v4"||!t)&&s0.test(e)||(t==="v6"||!t)&&u0.test(e))}var $n=class e extends ne{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==U.string){let i=this._getOrReturnCtx(t);return C(i,{code:T.invalid_type,expected:U.string,received:i.parsedType}),J}let o=new qe,r;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(r=this._getOrReturnCtx(t,r),C(r,{code:T.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="max")t.data.length>i.value&&(r=this._getOrReturnCtx(t,r),C(r,{code:T.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),o.dirty());else if(i.kind==="length"){let a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(r=this._getOrReturnCtx(t,r),a?C(r,{code:T.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&C(r,{code:T.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),o.dirty())}else if(i.kind==="email")o0.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"email",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")Sd||(Sd=new RegExp(i0,"u")),Sd.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"emoji",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")e0.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"uuid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")t0.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"nanoid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")XS.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"cuid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")YS.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"cuid2",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")QS.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"ulid",code:T.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),C(r,{validation:"url",code:T.invalid_string,message:i.message}),o.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"regex",code:T.invalid_string,message:i.message}),o.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(r=this._getOrReturnCtx(t,r),C(r,{code:T.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),o.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(r=this._getOrReturnCtx(t,r),C(r,{code:T.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(r=this._getOrReturnCtx(t,r),C(r,{code:T.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?m0(i).test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{code:T.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?f0.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{code:T.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?p0(i).test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{code:T.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?n0.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"duration",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?h0(t.data,i.version)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"ip",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?g0(t.data,i.alg)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"jwt",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?v0(t.data,i.version)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"cidr",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?l0.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"base64",code:T.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?d0.test(t.data)||(r=this._getOrReturnCtx(t,r),C(r,{validation:"base64url",code:T.invalid_string,message:i.message}),o.dirty()):ce.assertNever(i);return{status:o.value,value:t.data}}_regex(t,n,o){return this.refinement(r=>t.test(r),{validation:n,code:T.invalid_string,...q.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...q.errToObj(t)})}url(t){return this._addCheck({kind:"url",...q.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...q.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...q.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...q.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...q.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...q.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...q.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...q.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...q.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...q.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...q.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...q.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...q.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...q.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...q.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...q.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...q.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...q.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...q.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...q.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...q.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...q.errToObj(n)})}nonempty(t){return this.min(1,q.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};$n.create=e=>new $n({checks:[],typeName:O.ZodString,coerce:e?.coerce??!1,...Y(e)});function _0(e,t){let n=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,r=n>o?n:o,i=Number.parseInt(e.toFixed(r).replace(".","")),a=Number.parseInt(t.toFixed(r).replace(".",""));return i%a/10**r}var qo=class e extends ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==U.number){let i=this._getOrReturnCtx(t);return C(i,{code:T.invalid_type,expected:U.number,received:i.parsedType}),J}let o,r=new qe;for(let i of this._def.checks)i.kind==="int"?ce.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),C(o,{code:T.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),C(o,{code:T.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),C(o,{code:T.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):i.kind==="multipleOf"?_0(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),C(o,{code:T.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),C(o,{code:T.not_finite,message:i.message}),r.dirty()):ce.assertNever(i);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,q.toString(n))}gt(t,n){return this.setLimit("min",t,!1,q.toString(n))}lte(t,n){return this.setLimit("max",t,!0,q.toString(n))}lt(t,n){return this.setLimit("max",t,!1,q.toString(n))}setLimit(t,n,o,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:q.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:q.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:q.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:q.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:q.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:q.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:q.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ce.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value)}return Number.isFinite(n)&&Number.isFinite(t)}};qo.create=e=>new qo({checks:[],typeName:O.ZodNumber,coerce:e?.coerce||!1,...Y(e)});var Vo=class e extends ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==U.bigint)return this._getInvalidInput(t);let o,r=new qe;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),C(o,{code:T.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),C(o,{code:T.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),C(o,{code:T.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):ce.assertNever(i);return{status:r.value,value:t.data}}_getInvalidInput(t){let n=this._getOrReturnCtx(t);return C(n,{code:T.invalid_type,expected:U.bigint,received:n.parsedType}),J}gte(t,n){return this.setLimit("min",t,!0,q.toString(n))}gt(t,n){return this.setLimit("min",t,!1,q.toString(n))}lte(t,n){return this.setLimit("max",t,!0,q.toString(n))}lt(t,n){return this.setLimit("max",t,!1,q.toString(n))}setLimit(t,n,o,r){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:q.toString(r)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:q.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:q.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:q.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:q.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:q.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};Vo.create=e=>new Vo({checks:[],typeName:O.ZodBigInt,coerce:e?.coerce??!1,...Y(e)});var Fo=class extends ne{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==U.boolean){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:U.boolean,received:o.parsedType}),J}return Ge(t.data)}};Fo.create=e=>new Fo({typeName:O.ZodBoolean,coerce:e?.coerce||!1,...Y(e)});var Bo=class e extends ne{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==U.date){let i=this._getOrReturnCtx(t);return C(i,{code:T.invalid_type,expected:U.date,received:i.parsedType}),J}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return C(i,{code:T.invalid_date}),J}let o=new qe,r;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(r=this._getOrReturnCtx(t,r),C(r,{code:T.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(r=this._getOrReturnCtx(t,r),C(r,{code:T.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),o.dirty()):ce.assertNever(i);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:q.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:q.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};Bo.create=e=>new Bo({checks:[],coerce:e?.coerce||!1,typeName:O.ZodDate,...Y(e)});var Ko=class extends ne{_parse(t){if(this._getType(t)!==U.symbol){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:U.symbol,received:o.parsedType}),J}return Ge(t.data)}};Ko.create=e=>new Ko({typeName:O.ZodSymbol,...Y(e)});var xn=class extends ne{_parse(t){if(this._getType(t)!==U.undefined){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:U.undefined,received:o.parsedType}),J}return Ge(t.data)}};xn.create=e=>new xn({typeName:O.ZodUndefined,...Y(e)});var wn=class extends ne{_parse(t){if(this._getType(t)!==U.null){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:U.null,received:o.parsedType}),J}return Ge(t.data)}};wn.create=e=>new wn({typeName:O.ZodNull,...Y(e)});var Ho=class extends ne{constructor(){super(...arguments),this._any=!0}_parse(t){return Ge(t.data)}};Ho.create=e=>new Ho({typeName:O.ZodAny,...Y(e)});var mr=class extends ne{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ge(t.data)}};mr.create=e=>new mr({typeName:O.ZodUnknown,...Y(e)});var Ct=class extends ne{_parse(t){let n=this._getOrReturnCtx(t);return C(n,{code:T.invalid_type,expected:U.never,received:n.parsedType}),J}};Ct.create=e=>new Ct({typeName:O.ZodNever,...Y(e)});var Jo=class extends ne{_parse(t){if(this._getType(t)!==U.undefined){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:U.void,received:o.parsedType}),J}return Ge(t.data)}};Jo.create=e=>new Jo({typeName:O.ZodVoid,...Y(e)});var hr=class e extends ne{_parse(t){let{ctx:n,status:o}=this._processInputParams(t),r=this._def;if(n.parsedType!==U.array)return C(n,{code:T.invalid_type,expected:U.array,received:n.parsedType}),J;if(r.exactLength!==null){let a=n.data.length>r.exactLength.value,s=n.data.length<r.exactLength.value;(a||s)&&(C(n,{code:a?T.too_big:T.too_small,minimum:s?r.exactLength.value:void 0,maximum:a?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),o.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(C(n,{code:T.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),o.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(C(n,{code:T.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>r.type._parseAsync(new gt(n,a,n.path,s)))).then(a=>qe.mergeArray(o,a));let i=[...n.data].map((a,s)=>r.type._parseSync(new gt(n,a,n.path,s)));return qe.mergeArray(o,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:q.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:q.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:q.toString(n)}})}nonempty(t){return this.min(1,t)}};hr.create=(e,t)=>new hr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:O.ZodArray,...Y(t)});function bn(e){if(e instanceof lt){let t={};for(let n in e.shape){let o=e.shape[n];t[n]=zt.create(bn(o))}return new lt({...e._def,shape:()=>t})}else return e instanceof hr?new hr({...e._def,type:bn(e.element)}):e instanceof zt?zt.create(bn(e.unwrap())):e instanceof er?er.create(bn(e.unwrap())):e instanceof Qt?Qt.create(e.items.map(t=>bn(t))):e}var lt=class e extends ne{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=ce.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==U.object){let l=this._getOrReturnCtx(t);return C(l,{code:T.invalid_type,expected:U.object,received:l.parsedType}),J}let{status:o,ctx:r}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Ct&&this._def.unknownKeys==="strip"))for(let l in r.data)a.includes(l)||s.push(l);let c=[];for(let l of a){let d=i[l],f=r.data[l];c.push({key:{status:"valid",value:l},value:d._parse(new gt(r,f,r.path,l)),alwaysSet:l in r.data})}if(this._def.catchall instanceof Ct){let l=this._def.unknownKeys;if(l==="passthrough")for(let d of s)c.push({key:{status:"valid",value:d},value:{status:"valid",value:r.data[d]}});else if(l==="strict")s.length>0&&(C(r,{code:T.unrecognized_keys,keys:s}),o.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let d of s){let f=r.data[d];c.push({key:{status:"valid",value:d},value:l._parse(new gt(r,f,r.path,d)),alwaysSet:d in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let l=[];for(let d of c){let f=await d.key,_=await d.value;l.push({key:f,value:_,alwaysSet:d.alwaysSet})}return l}).then(l=>qe.mergeObjectSync(o,l)):qe.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return q.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,o)=>{let r=this._def.errorMap?.(n,o).message??o.defaultError;return n.code==="unrecognized_keys"?{message:q.errToObj(t).message??r}:{message:r}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:O.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let o of ce.objectKeys(t))t[o]&&this.shape[o]&&(n[o]=this.shape[o]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let o of ce.objectKeys(this.shape))t[o]||(n[o]=this.shape[o]);return new e({...this._def,shape:()=>n})}deepPartial(){return bn(this)}partial(t){let n={};for(let o of ce.objectKeys(this.shape)){let r=this.shape[o];t&&!t[o]?n[o]=r:n[o]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let o of ce.objectKeys(this.shape))if(t&&!t[o])n[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof zt;)i=i._def.innerType;n[o]=i}return new e({...this._def,shape:()=>n})}keyof(){return Hg(ce.objectKeys(this.shape))}};lt.create=(e,t)=>new lt({shape:()=>e,unknownKeys:"strip",catchall:Ct.create(),typeName:O.ZodObject,...Y(t)});lt.strictCreate=(e,t)=>new lt({shape:()=>e,unknownKeys:"strict",catchall:Ct.create(),typeName:O.ZodObject,...Y(t)});lt.lazycreate=(e,t)=>new lt({shape:e,unknownKeys:"strip",catchall:Ct.create(),typeName:O.ZodObject,...Y(t)});var kn=class extends ne{_parse(t){let{ctx:n}=this._processInputParams(t),o=this._def.options;function r(i){for(let s of i)if(s.result.status==="valid")return s.result;for(let s of i)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(s=>new ut(s.ctx.common.issues));return C(n,{code:T.invalid_union,unionErrors:a}),J}if(n.common.async)return Promise.all(o.map(async i=>{let a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(r);{let i,a=[];for(let c of o){let l={...n,common:{...n.common,issues:[]},parent:null},d=c._parseSync({data:n.data,path:n.path,parent:l});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let s=a.map(c=>new ut(c));return C(n,{code:T.invalid_union,unionErrors:s}),J}}get options(){return this._def.options}};kn.create=(e,t)=>new kn({options:e,typeName:O.ZodUnion,...Y(t)});var Yt=e=>e instanceof zn?Yt(e.schema):e instanceof It?Yt(e.innerType()):e instanceof In?[e.value]:e instanceof En?e.options:e instanceof Tn?ce.objectValues(e.enum):e instanceof Pn?Yt(e._def.innerType):e instanceof xn?[void 0]:e instanceof wn?[null]:e instanceof zt?[void 0,...Yt(e.unwrap())]:e instanceof er?[null,...Yt(e.unwrap())]:e instanceof Xa||e instanceof jn?Yt(e.unwrap()):e instanceof On?Yt(e._def.innerType):[],zd=class e extends ne{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==U.object)return C(n,{code:T.invalid_type,expected:U.object,received:n.parsedType}),J;let o=this.discriminator,r=n.data[o],i=this.optionsMap.get(r);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(C(n,{code:T.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),J)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,o){let r=new Map;for(let i of n){let a=Yt(i.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let s of a){if(r.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);r.set(s,i)}}return new e({typeName:O.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:r,...Y(o)})}};function Id(e,t){let n=Xt(e),o=Xt(t);if(e===t)return{valid:!0,data:e};if(n===U.object&&o===U.object){let r=ce.objectKeys(t),i=ce.objectKeys(e).filter(s=>r.indexOf(s)!==-1),a={...e,...t};for(let s of i){let c=Id(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(n===U.array&&o===U.array){if(e.length!==t.length)return{valid:!1};let r=[];for(let i=0;i<e.length;i++){let a=e[i],s=t[i],c=Id(a,s);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return n===U.date&&o===U.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Sn=class extends ne{_parse(t){let{status:n,ctx:o}=this._processInputParams(t),r=(i,a)=>{if(wd(i)||wd(a))return J;let s=Id(i.value,a.value);return s.valid?((kd(i)||kd(a))&&n.dirty(),{status:n.value,value:s.data}):(C(o,{code:T.invalid_intersection_types}),J)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([i,a])=>r(i,a)):r(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};Sn.create=(e,t,n)=>new Sn({left:e,right:t,typeName:O.ZodIntersection,...Y(n)});var Qt=class e extends ne{_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==U.array)return C(o,{code:T.invalid_type,expected:U.array,received:o.parsedType}),J;if(o.data.length<this._def.items.length)return C(o,{code:T.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),J;!this._def.rest&&o.data.length>this._def.items.length&&(C(o,{code:T.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...o.data].map((a,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new gt(o,a,o.path,s)):null}).filter(a=>!!a);return o.common.async?Promise.all(i).then(a=>qe.mergeArray(n,a)):qe.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Qt.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qt({items:e,typeName:O.ZodTuple,rest:null,...Y(t)})};var Ed=class e extends ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==U.object)return C(o,{code:T.invalid_type,expected:U.object,received:o.parsedType}),J;let r=[],i=this._def.keyType,a=this._def.valueType;for(let s in o.data)r.push({key:i._parse(new gt(o,s,o.path,s)),value:a._parse(new gt(o,o.data[s],o.path,s)),alwaysSet:s in o.data});return o.common.async?qe.mergeObjectAsync(n,r):qe.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(t,n,o){return n instanceof ne?new e({keyType:t,valueType:n,typeName:O.ZodRecord,...Y(o)}):new e({keyType:$n.create(),valueType:t,typeName:O.ZodRecord,...Y(n)})}},Go=class extends ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==U.map)return C(o,{code:T.invalid_type,expected:U.map,received:o.parsedType}),J;let r=this._def.keyType,i=this._def.valueType,a=[...o.data.entries()].map(([s,c],l)=>({key:r._parse(new gt(o,s,o.path,[l,"key"])),value:i._parse(new gt(o,c,o.path,[l,"value"]))}));if(o.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of a){let l=await c.key,d=await c.value;if(l.status==="aborted"||d.status==="aborted")return J;(l.status==="dirty"||d.status==="dirty")&&n.dirty(),s.set(l.value,d.value)}return{status:n.value,value:s}})}else{let s=new Map;for(let c of a){let l=c.key,d=c.value;if(l.status==="aborted"||d.status==="aborted")return J;(l.status==="dirty"||d.status==="dirty")&&n.dirty(),s.set(l.value,d.value)}return{status:n.value,value:s}}}};Go.create=(e,t,n)=>new Go({valueType:t,keyType:e,typeName:O.ZodMap,...Y(n)});var Wo=class e extends ne{_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==U.set)return C(o,{code:T.invalid_type,expected:U.set,received:o.parsedType}),J;let r=this._def;r.minSize!==null&&o.data.size<r.minSize.value&&(C(o,{code:T.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&o.data.size>r.maxSize.value&&(C(o,{code:T.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());let i=this._def.valueType;function a(c){let l=new Set;for(let d of c){if(d.status==="aborted")return J;d.status==="dirty"&&n.dirty(),l.add(d.value)}return{status:n.value,value:l}}let s=[...o.data.values()].map((c,l)=>i._parse(new gt(o,c,o.path,l)));return o.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,n){return new e({...this._def,minSize:{value:t,message:q.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:q.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};Wo.create=(e,t)=>new Wo({valueType:e,minSize:null,maxSize:null,typeName:O.ZodSet,...Y(t)});var Td=class e extends ne{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==U.function)return C(n,{code:T.invalid_type,expected:U.function,received:n.parsedType}),J;function o(s,c){return Wa({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Mo(),pr].filter(l=>!!l),issueData:{code:T.invalid_arguments,argumentsError:c}})}function r(s,c){return Wa({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Mo(),pr].filter(l=>!!l),issueData:{code:T.invalid_return_type,returnTypeError:c}})}let i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Kr){let s=this;return Ge(async function(...c){let l=new ut([]),d=await s._def.args.parseAsync(c,i).catch(v=>{throw l.addIssue(o(c,v)),l}),f=await Reflect.apply(a,this,d);return await s._def.returns._def.type.parseAsync(f,i).catch(v=>{throw l.addIssue(r(f,v)),l})})}else{let s=this;return Ge(function(...c){let l=s._def.args.safeParse(c,i);if(!l.success)throw new ut([o(c,l.error)]);let d=Reflect.apply(a,this,l.data),f=s._def.returns.safeParse(d,i);if(!f.success)throw new ut([r(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Qt.create(t).rest(mr.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,o){return new e({args:t||Qt.create([]).rest(mr.create()),returns:n||mr.create(),typeName:O.ZodFunction,...Y(o)})}},zn=class extends ne{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};zn.create=(e,t)=>new zn({getter:e,typeName:O.ZodLazy,...Y(t)});var In=class extends ne{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return C(n,{received:n.data,code:T.invalid_literal,expected:this._def.value}),J}return{status:"valid",value:t.data}}get value(){return this._def.value}};In.create=(e,t)=>new In({value:e,typeName:O.ZodLiteral,...Y(t)});function Hg(e,t){return new En({values:e,typeName:O.ZodEnum,...Y(t)})}var En=class e extends ne{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),o=this._def.values;return C(n,{expected:ce.joinValues(o),received:n.parsedType,code:T.invalid_type}),J}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let n=this._getOrReturnCtx(t),o=this._def.values;return C(n,{received:n.data,code:T.invalid_enum_value,options:o}),J}return Ge(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...n})}};En.create=Hg;var Tn=class extends ne{_parse(t){let n=ce.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==U.string&&o.parsedType!==U.number){let r=ce.objectValues(n);return C(o,{expected:ce.joinValues(r),received:o.parsedType,code:T.invalid_type}),J}if(this._cache||(this._cache=new Set(ce.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let r=ce.objectValues(n);return C(o,{received:o.data,code:T.invalid_enum_value,options:r}),J}return Ge(t.data)}get enum(){return this._def.values}};Tn.create=(e,t)=>new Tn({values:e,typeName:O.ZodNativeEnum,...Y(t)});var Kr=class extends ne{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==U.promise&&n.common.async===!1)return C(n,{code:T.invalid_type,expected:U.promise,received:n.parsedType}),J;let o=n.parsedType===U.promise?n.data:Promise.resolve(n.data);return Ge(o.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}};Kr.create=(e,t)=>new Kr({type:e,typeName:O.ZodPromise,...Y(t)});var It=class extends ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===O.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:o}=this._processInputParams(t),r=this._def.effect||null,i={addIssue:a=>{C(o,a),a.fatal?n.abort():n.dirty()},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),r.type==="preprocess"){let a=r.transform(o.data,i);if(o.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return J;let c=await this._def.schema._parseAsync({data:s,path:o.path,parent:o});return c.status==="aborted"?J:c.status==="dirty"?yn(c.value):n.value==="dirty"?yn(c.value):c});{if(n.value==="aborted")return J;let s=this._def.schema._parseSync({data:a,path:o.path,parent:o});return s.status==="aborted"?J:s.status==="dirty"?yn(s.value):n.value==="dirty"?yn(s.value):s}}if(r.type==="refinement"){let a=s=>{let c=r.refinement(s,i);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(o.common.async===!1){let s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?J:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>s.status==="aborted"?J:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(r.type==="transform")if(o.common.async===!1){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Br(a))return J;let s=r.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>Br(a)?Promise.resolve(r.transform(a.value,i)).then(s=>({status:n.value,value:s})):J);ce.assertNever(r)}};It.create=(e,t,n)=>new It({schema:e,typeName:O.ZodEffects,effect:t,...Y(n)});It.createWithPreprocess=(e,t,n)=>new It({schema:t,effect:{type:"preprocess",transform:e},typeName:O.ZodEffects,...Y(n)});var zt=class extends ne{_parse(t){return this._getType(t)===U.undefined?Ge(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};zt.create=(e,t)=>new zt({innerType:e,typeName:O.ZodOptional,...Y(t)});var er=class extends ne{_parse(t){return this._getType(t)===U.null?Ge(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};er.create=(e,t)=>new er({innerType:e,typeName:O.ZodNullable,...Y(t)});var Pn=class extends ne{_parse(t){let{ctx:n}=this._processInputParams(t),o=n.data;return n.parsedType===U.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Pn.create=(e,t)=>new Pn({innerType:e,typeName:O.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Y(t)});var On=class extends ne{_parse(t){let{ctx:n}=this._processInputParams(t),o={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Lo(r)?r.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ut(o.common.issues)},input:o.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new ut(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};On.create=(e,t)=>new On({innerType:e,typeName:O.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Y(t)});var Xo=class extends ne{_parse(t){if(this._getType(t)!==U.nan){let o=this._getOrReturnCtx(t);return C(o,{code:T.invalid_type,expected:U.nan,received:o.parsedType}),J}return{status:"valid",value:t.data}}};Xo.create=e=>new Xo({typeName:O.ZodNaN,...Y(e)});var Xa=class extends ne{_parse(t){let{ctx:n}=this._processInputParams(t),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}},Ya=class e extends ne{_parse(t){let{status:n,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?J:i.status==="dirty"?(n.dirty(),yn(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let r=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return r.status==="aborted"?J:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:o.path,parent:o})}}static create(t,n){return new e({in:t,out:n,typeName:O.ZodPipeline})}},jn=class extends ne{_parse(t){let n=this._def.innerType._parse(t),o=r=>(Br(r)&&(r.value=Object.freeze(r.value)),r);return Lo(n)?n.then(r=>o(r)):o(n)}unwrap(){return this._def.innerType}};jn.create=(e,t)=>new jn({innerType:e,typeName:O.ZodReadonly,...Y(t)});var sD={object:lt.lazycreate},O;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(O||(O={}));var cD=$n.create,uD=qo.create,lD=Xo.create,dD=Vo.create,fD=Fo.create,pD=Bo.create,mD=Ko.create,hD=xn.create,gD=wn.create,vD=Ho.create,_D=mr.create,yD=Ct.create,bD=Jo.create,$D=hr.create,Jg=lt.create,xD=lt.strictCreate,wD=kn.create,kD=zd.create,SD=Sn.create,zD=Qt.create,ID=Ed.create,ED=Go.create,TD=Wo.create,PD=Td.create,OD=zn.create,jD=In.create,ND=En.create,RD=Tn.create,AD=Kr.create,DD=It.create,CD=zt.create,UD=er.create,ZD=It.createWithPreprocess,MD=Ya.create;var pt={};Fr(pt,{$ZodAny:()=>Gs,$ZodArray:()=>ec,$ZodAsyncError:()=>Et,$ZodBase64:()=>Zs,$ZodBase64URL:()=>Ms,$ZodBigInt:()=>di,$ZodBigIntFormat:()=>Bs,$ZodBoolean:()=>Vn,$ZodCIDRv4:()=>Cs,$ZodCIDRv6:()=>Us,$ZodCUID:()=>zs,$ZodCUID2:()=>Is,$ZodCatch:()=>vc,$ZodCheck:()=>$e,$ZodCheckBigIntFormat:()=>vf,$ZodCheckEndsWith:()=>Tf,$ZodCheckGreaterThan:()=>ms,$ZodCheckIncludes:()=>If,$ZodCheckLengthEquals:()=>wf,$ZodCheckLessThan:()=>ps,$ZodCheckLowerCase:()=>Sf,$ZodCheckMaxLength:()=>$f,$ZodCheckMaxSize:()=>_f,$ZodCheckMimeType:()=>Of,$ZodCheckMinLength:()=>xf,$ZodCheckMinSize:()=>yf,$ZodCheckMultipleOf:()=>hf,$ZodCheckNumberFormat:()=>gf,$ZodCheckOverwrite:()=>jf,$ZodCheckProperty:()=>Pf,$ZodCheckRegex:()=>kf,$ZodCheckSizeEquals:()=>bf,$ZodCheckStartsWith:()=>Ef,$ZodCheckStringFormat:()=>qn,$ZodCheckUpperCase:()=>zf,$ZodCodec:()=>Fn,$ZodCustom:()=>Sc,$ZodCustomStringFormat:()=>Vs,$ZodDate:()=>Qs,$ZodDefault:()=>pc,$ZodDiscriminatedUnion:()=>rc,$ZodE164:()=>Ls,$ZodEmail:()=>xs,$ZodEmoji:()=>ks,$ZodEncodeError:()=>gr,$ZodEnum:()=>sc,$ZodError:()=>ai,$ZodFile:()=>uc,$ZodFunction:()=>xc,$ZodGUID:()=>bs,$ZodIPv4:()=>As,$ZodIPv6:()=>Ds,$ZodISODate:()=>js,$ZodISODateTime:()=>Os,$ZodISODuration:()=>Rs,$ZodISOTime:()=>Ns,$ZodIntersection:()=>nc,$ZodJWT:()=>qs,$ZodKSUID:()=>Ps,$ZodLazy:()=>kc,$ZodLiteral:()=>cc,$ZodMap:()=>ic,$ZodNaN:()=>_c,$ZodNanoID:()=>Ss,$ZodNever:()=>Xs,$ZodNonOptional:()=>hc,$ZodNull:()=>Js,$ZodNullable:()=>fc,$ZodNumber:()=>li,$ZodNumberFormat:()=>Fs,$ZodObject:()=>tc,$ZodObjectJIT:()=>Df,$ZodOptional:()=>dc,$ZodPipe:()=>yc,$ZodPrefault:()=>mc,$ZodPromise:()=>wc,$ZodReadonly:()=>bc,$ZodRealError:()=>et,$ZodRecord:()=>oc,$ZodRegistry:()=>Kn,$ZodSet:()=>ac,$ZodString:()=>kr,$ZodStringFormat:()=>ge,$ZodSuccess:()=>gc,$ZodSymbol:()=>Ks,$ZodTemplateLiteral:()=>$c,$ZodTransform:()=>lc,$ZodTuple:()=>pi,$ZodType:()=>W,$ZodULID:()=>Es,$ZodURL:()=>ws,$ZodUUID:()=>$s,$ZodUndefined:()=>Hs,$ZodUnion:()=>fi,$ZodUnknown:()=>Ws,$ZodVoid:()=>Ys,$ZodXID:()=>Ts,$brand:()=>Qo,$constructor:()=>$,$input:()=>Pc,$output:()=>Tc,Doc:()=>ui,JSONSchema:()=>$_,JSONSchemaGenerator:()=>Ci,NEVER:()=>Qa,TimePrecision:()=>Nc,_any:()=>eu,_array:()=>Cf,_base64:()=>Ni,_base64url:()=>Ri,_bigint:()=>Hc,_boolean:()=>Bc,_catch:()=>jI,_check:()=>b_,_cidrv4:()=>Oi,_cidrv6:()=>ji,_coercedBigint:()=>Jc,_coercedBoolean:()=>Kc,_coercedDate:()=>iu,_coercedNumber:()=>Zc,_coercedString:()=>jc,_cuid:()=>ki,_cuid2:()=>Si,_custom:()=>pu,_date:()=>ou,_decode:()=>is,_decodeAsync:()=>ss,_default:()=>TI,_discriminatedUnion:()=>vI,_e164:()=>Ai,_email:()=>vi,_emoji:()=>xi,_encode:()=>os,_encodeAsync:()=>as,_endsWith:()=>to,_enum:()=>wI,_file:()=>fu,_float32:()=>Lc,_float64:()=>qc,_gt:()=>Mt,_gte:()=>Ve,_guid:()=>Hn,_includes:()=>Qn,_int:()=>Mc,_int32:()=>Vc,_int64:()=>Gc,_intersection:()=>_I,_ipv4:()=>Ti,_ipv6:()=>Pi,_isoDate:()=>Ac,_isoDateTime:()=>Rc,_isoDuration:()=>Cc,_isoTime:()=>Dc,_jwt:()=>Di,_ksuid:()=>Ei,_lazy:()=>DI,_length:()=>Qr,_literal:()=>SI,_lowercase:()=>Xn,_lt:()=>Zt,_lte:()=>rt,_map:()=>$I,_max:()=>rt,_maxLength:()=>Yr,_maxSize:()=>Xr,_mime:()=>ro,_min:()=>Ve,_minLength:()=>tr,_minSize:()=>zr,_multipleOf:()=>Sr,_nan:()=>au,_nanoid:()=>wi,_nativeEnum:()=>kI,_negative:()=>cu,_never:()=>ru,_nonnegative:()=>lu,_nonoptional:()=>PI,_nonpositive:()=>uu,_normalize:()=>no,_null:()=>Qc,_nullable:()=>EI,_number:()=>Uc,_optional:()=>II,_overwrite:()=>Lt,_parse:()=>Un,_parseAsync:()=>Zn,_pipe:()=>NI,_positive:()=>su,_promise:()=>CI,_property:()=>du,_readonly:()=>RI,_record:()=>bI,_refine:()=>mu,_regex:()=>Wn,_safeDecode:()=>us,_safeDecodeAsync:()=>ds,_safeEncode:()=>cs,_safeEncodeAsync:()=>ls,_safeParse:()=>Mn,_safeParseAsync:()=>Ln,_set:()=>xI,_size:()=>Gn,_startsWith:()=>eo,_string:()=>Oc,_stringFormat:()=>en,_stringbool:()=>gu,_success:()=>OI,_superRefine:()=>hu,_symbol:()=>Xc,_templateLiteral:()=>AI,_toLowerCase:()=>io,_toUpperCase:()=>ao,_transform:()=>zI,_trim:()=>oo,_tuple:()=>yI,_uint32:()=>Fc,_uint64:()=>Wc,_ulid:()=>zi,_undefined:()=>Yc,_union:()=>gI,_unknown:()=>tu,_uppercase:()=>Yn,_url:()=>Jn,_uuid:()=>_i,_uuidv4:()=>yi,_uuidv6:()=>bi,_uuidv7:()=>$i,_void:()=>nu,_xid:()=>Ii,clone:()=>Ne,config:()=>Ee,decode:()=>tv,decodeAsync:()=>nv,encode:()=>ev,encodeAsync:()=>rv,flattenError:()=>Dn,formatError:()=>Cn,globalConfig:()=>Yo,globalRegistry:()=>Tt,isValidBase64:()=>Af,isValidBase64URL:()=>kv,isValidJWT:()=>Sv,locales:()=>Bn,parse:()=>Jr,parseAsync:()=>Gr,prettifyError:()=>ns,regexes:()=>tt,registry:()=>gi,safeDecode:()=>iv,safeDecodeAsync:()=>sv,safeEncode:()=>ov,safeEncodeAsync:()=>av,safeParse:()=>xr,safeParseAsync:()=>wr,toDotPath:()=>Qg,toJSONSchema:()=>so,treeifyError:()=>rs,util:()=>E,version:()=>Nf});var Qa=Object.freeze({status:"aborted"});function $(e,t,n){function o(s,c){var l;Object.defineProperty(s,"_zod",{value:s._zod??{},enumerable:!1}),(l=s._zod).traits??(l.traits=new Set),s._zod.traits.add(e),t(s,c);for(let d in a.prototype)d in s||Object.defineProperty(s,d,{value:a.prototype[d].bind(s)});s._zod.constr=a,s._zod.def=c}let r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,"name",{value:e});function a(s){var c;let l=n?.Parent?new i:this;o(l,s),(c=l._zod).deferred??(c.deferred=[]);for(let d of l._zod.deferred)d();return l}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Qo=Symbol("zod_brand"),Et=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},gr=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},Yo={};function Ee(e){return e&&Object.assign(Yo,e),Yo}var E={};Fr(E,{BIGINT_FORMAT_RANGES:()=>Ud,Class:()=>Od,NUMBER_FORMAT_RANGES:()=>Cd,aborted:()=>$r,allowsEval:()=>Nd,assert:()=>S0,assertEqual:()=>$0,assertIs:()=>w0,assertNever:()=>k0,assertNotEqual:()=>x0,assignProp:()=>_r,base64ToUint8Array:()=>Wg,base64urlToUint8Array:()=>q0,cached:()=>Rn,captureStackTrace:()=>ts,cleanEnum:()=>L0,cleanRegex:()=>ri,clone:()=>Ne,cloneDef:()=>I0,createTransparentProxy:()=>N0,defineLazy:()=>se,esc:()=>es,escapeRegex:()=>Ut,extend:()=>D0,finalizeIssue:()=>ft,floatSafeRemainder:()=>jd,getElementAtPath:()=>E0,getEnumValues:()=>ti,getLengthableOrigin:()=>ii,getParsedType:()=>j0,getSizableOrigin:()=>oi,hexToUint8Array:()=>F0,isObject:()=>Hr,isPlainObject:()=>br,issue:()=>An,joinValues:()=>S,jsonStringifyReplacer:()=>Nn,merge:()=>U0,mergeDefs:()=>yr,normalizeParams:()=>N,nullish:()=>vr,numKeys:()=>O0,objectClone:()=>z0,omit:()=>A0,optionalKeys:()=>Dd,partial:()=>Z0,pick:()=>R0,prefixIssues:()=>dt,primitiveTypes:()=>Ad,promiseAllObject:()=>T0,propertyKeyTypes:()=>ni,randomString:()=>P0,required:()=>M0,safeExtend:()=>C0,shallowClone:()=>Rd,stringifyPrimitive:()=>j,uint8ArrayToBase64:()=>Xg,uint8ArrayToBase64url:()=>V0,uint8ArrayToHex:()=>B0,unwrapMessage:()=>ei});function $0(e){return e}function x0(e){return e}function w0(e){}function k0(e){throw new Error}function S0(e){}function ti(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function S(e,t="|"){return e.map(n=>j(n)).join(t)}function Nn(e,t){return typeof t=="bigint"?t.toString():t}function Rn(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function vr(e){return e==null}function ri(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function jd(e,t){let n=(e.toString().split(".")[1]||"").length,o=t.toString(),r=(o.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(o)){let c=o.match(/\d?e-(\d?)/);c?.[1]&&(r=Number.parseInt(c[1]))}let i=n>r?n:r,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}var Gg=Symbol("evaluating");function se(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==Gg)return o===void 0&&(o=Gg,o=n()),o},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function z0(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function _r(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function yr(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o)}return Object.defineProperties({},t)}function I0(e){return yr(e._zod.def)}function E0(e,t){return t?t.reduce((n,o)=>n?.[o],e):e}function T0(e){let t=Object.keys(e),n=t.map(o=>e[o]);return Promise.all(n).then(o=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=o[i];return r})}function P0(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n}function es(e){return JSON.stringify(e)}var ts="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Hr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Nd=Rn(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function br(e){if(Hr(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(Hr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Rd(e){return br(e)?{...e}:Array.isArray(e)?[...e]:e}function O0(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var j0=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},ni=new Set(["string","number","symbol"]),Ad=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ut(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ne(e,t,n){let o=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(o._zod.parent=e),o}function N(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function N0(e){let t;return new Proxy({},{get(n,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(n,o,r,i){return t??(t=e()),Reflect.set(t,o,r,i)},has(n,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(n,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(n,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}function j(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Dd(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Cd={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ud={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function R0(e,t){let n=e._zod.def,o=yr(e._zod.def,{get shape(){let r={};for(let i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&(r[i]=n.shape[i])}return _r(this,"shape",r),r},checks:[]});return Ne(e,o)}function A0(e,t){let n=e._zod.def,o=yr(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let i in t){if(!(i in n.shape))throw new Error(`Unrecognized key: "${i}"`);t[i]&&delete r[i]}return _r(this,"shape",r),r},checks:[]});return Ne(e,o)}function D0(e,t){if(!br(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");let r=yr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return _r(this,"shape",i),i},checks:[]});return Ne(e,r)}function C0(e,t){if(!br(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n={...e._zod.def,get shape(){let o={...e._zod.def.shape,...t};return _r(this,"shape",o),o},checks:e._zod.def.checks};return Ne(e,n)}function U0(e,t){let n=yr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return _r(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return Ne(e,n)}function Z0(e,t,n){let o=yr(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let a in n){if(!(a in r))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=e?new e({type:"optional",innerType:r[a]}):r[a])}else for(let a in r)i[a]=e?new e({type:"optional",innerType:r[a]}):r[a];return _r(this,"shape",i),i},checks:[]});return Ne(t,o)}function M0(e,t,n){let o=yr(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let a in n){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(let a in r)i[a]=new e({type:"nonoptional",innerType:r[a]});return _r(this,"shape",i),i},checks:[]});return Ne(t,o)}function $r(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function dt(e,t){return t.map(n=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function ei(e){return typeof e=="string"?e:e?.message}function ft(e,t,n){let o={...e,path:e.path??[]};if(!e.message){let r=ei(e.inst?._zod.def?.error?.(e))??ei(t?.error?.(e))??ei(n.customError?.(e))??ei(n.localeError?.(e))??"Invalid input";o.message=r}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function oi(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function ii(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function An(...e){let[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}function L0(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Wg(e){let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}function Xg(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function q0(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return Wg(t+n)}function V0(e){return Xg(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function F0(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)n[o/2]=Number.parseInt(t.slice(o,o+2),16);return n}function B0(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Od=class{constructor(...t){}};var Yg=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Nn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ai=$("$ZodError",Yg),et=$("$ZodError",Yg,{Parent:Error});function Dn(e,t=n=>n.message){let n={},o=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return{formErrors:o,fieldErrors:n}}function Cn(e,t){let n=t||function(i){return i.message},o={_errors:[]},r=i=>{for(let a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>r({issues:s}));else if(a.code==="invalid_key")r({issues:a.issues});else if(a.code==="invalid_element")r({issues:a.issues});else if(a.path.length===0)o._errors.push(n(a));else{let s=o,c=0;for(;c<a.path.length;){let l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return r(e),o}function rs(e,t){let n=t||function(i){return i.message},o={errors:[]},r=(i,a=[])=>{var s,c;for(let l of i.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(d=>r({issues:d},l.path));else if(l.code==="invalid_key")r({issues:l.issues},l.path);else if(l.code==="invalid_element")r({issues:l.issues},l.path);else{let d=[...a,...l.path];if(d.length===0){o.errors.push(n(l));continue}let f=o,_=0;for(;_<d.length;){let v=d[_],g=_===d.length-1;typeof v=="string"?(f.properties??(f.properties={}),(s=f.properties)[v]??(s[v]={errors:[]}),f=f.properties[v]):(f.items??(f.items=[]),(c=f.items)[v]??(c[v]={errors:[]}),f=f.items[v]),g&&f.errors.push(n(l)),_++}}};return r(e),o}function Qg(e){let t=[],n=e.map(o=>typeof o=="object"?o.key:o);for(let o of n)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function ns(e){let t=[],n=[...e.issues].sort((o,r)=>(o.path??[]).length-(r.path??[]).length);for(let o of n)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Qg(o.path)}`);return t.join(`
|
|
35
|
+
`)}var Un=e=>(t,n,o,r)=>{let i=o?Object.assign(o,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Et;if(a.issues.length){let s=new(r?.Err??e)(a.issues.map(c=>ft(c,i,Ee())));throw ts(s,r?.callee),s}return a.value},Jr=Un(et),Zn=e=>async(t,n,o,r)=>{let i=o?Object.assign(o,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(r?.Err??e)(a.issues.map(c=>ft(c,i,Ee())));throw ts(s,r?.callee),s}return a.value},Gr=Zn(et),Mn=e=>(t,n,o)=>{let r=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new Et;return i.issues.length?{success:!1,error:new(e??ai)(i.issues.map(a=>ft(a,r,Ee())))}:{success:!0,data:i.value}},xr=Mn(et),Ln=e=>async(t,n,o)=>{let r=o?Object.assign(o,{async:!0}):{async:!0},i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>ft(a,r,Ee())))}:{success:!0,data:i.value}},wr=Ln(et),os=e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Un(e)(t,n,r)},ev=os(et),is=e=>(t,n,o)=>Un(e)(t,n,o),tv=is(et),as=e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Zn(e)(t,n,r)},rv=as(et),ss=e=>async(t,n,o)=>Zn(e)(t,n,o),nv=ss(et),cs=e=>(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Mn(e)(t,n,r)},ov=cs(et),us=e=>(t,n,o)=>Mn(e)(t,n,o),iv=us(et),ls=e=>async(t,n,o)=>{let r=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ln(e)(t,n,r)},av=ls(et),ds=e=>async(t,n,o)=>Ln(e)(t,n,o),sv=ds(et);var tt={};Fr(tt,{base64:()=>Qd,base64url:()=>fs,bigint:()=>sf,boolean:()=>lf,browserEmail:()=>ez,cidrv4:()=>Xd,cidrv6:()=>Yd,cuid:()=>Zd,cuid2:()=>Md,date:()=>rf,datetime:()=>of,domain:()=>rz,duration:()=>Bd,e164:()=>tf,email:()=>Hd,emoji:()=>Jd,extendedDuration:()=>H0,guid:()=>Kd,hex:()=>nz,hostname:()=>ef,html5Email:()=>X0,idnEmail:()=>Q0,integer:()=>cf,ipv4:()=>Gd,ipv6:()=>Wd,ksuid:()=>Vd,lowercase:()=>pf,md5_base64:()=>iz,md5_base64url:()=>az,md5_hex:()=>oz,nanoid:()=>Fd,null:()=>df,number:()=>uf,rfc5322Email:()=>Y0,sha1_base64:()=>cz,sha1_base64url:()=>uz,sha1_hex:()=>sz,sha256_base64:()=>dz,sha256_base64url:()=>fz,sha256_hex:()=>lz,sha384_base64:()=>mz,sha384_base64url:()=>hz,sha384_hex:()=>pz,sha512_base64:()=>vz,sha512_base64url:()=>_z,sha512_hex:()=>gz,string:()=>af,time:()=>nf,ulid:()=>Ld,undefined:()=>ff,unicodeEmail:()=>cv,uppercase:()=>mf,uuid:()=>Wr,uuid4:()=>J0,uuid6:()=>G0,uuid7:()=>W0,xid:()=>qd});var Zd=/^[cC][^\s-]{8,}$/,Md=/^[0-9a-z]+$/,Ld=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,qd=/^[0-9a-vA-V]{20}$/,Vd=/^[A-Za-z0-9]{27}$/,Fd=/^[a-zA-Z0-9_-]{21}$/,Bd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,H0=/^[-+]?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)?)??$/,Kd=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Wr=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,J0=Wr(4),G0=Wr(6),W0=Wr(7),Hd=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,X0=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Y0=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,cv=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Q0=cv,ez=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,tz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Jd(){return new RegExp(tz,"u")}var Gd=/^(?:(?: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])$/,Wd=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,Xd=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,Yd=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Qd=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,fs=/^[A-Za-z0-9_-]*$/,ef=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,rz=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,tf=/^\+(?:[0-9]){6,14}[0-9]$/,uv="(?:(?:\\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])))",rf=new RegExp(`^${uv}$`);function lv(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function nf(e){return new RegExp(`^${lv(e)}$`)}function of(e){let t=lv({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${n.join("|")})`;return new RegExp(`^${uv}T(?:${o})$`)}var af=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},sf=/^-?\d+n?$/,cf=/^-?\d+$/,uf=/^-?\d+(?:\.\d+)?/,lf=/^(?:true|false)$/i,df=/^null$/i;var ff=/^undefined$/i;var pf=/^[^A-Z]*$/,mf=/^[^a-z]*$/,nz=/^[0-9a-fA-F]*$/;function si(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ci(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var oz=/^[0-9a-fA-F]{32}$/,iz=si(22,"=="),az=ci(22),sz=/^[0-9a-fA-F]{40}$/,cz=si(27,"="),uz=ci(27),lz=/^[0-9a-fA-F]{64}$/,dz=si(43,"="),fz=ci(43),pz=/^[0-9a-fA-F]{96}$/,mz=si(64,""),hz=ci(64),gz=/^[0-9a-fA-F]{128}$/,vz=si(86,"=="),_z=ci(86);var $e=$("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),fv={number:"number",bigint:"bigint",object:"date"},ps=$("$ZodCheckLessThan",(e,t)=>{$e.init(e,t);let n=fv[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ms=$("$ZodCheckGreaterThan",(e,t)=>{$e.init(e,t);let n=fv[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),hf=$("$ZodCheckMultipleOf",(e,t)=>{$e.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):jd(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),gf=$("$ZodCheckNumberFormat",(e,t)=>{$e.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),o=n?"int":"number",[r,i]=Cd[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=r,s.maximum=i,n&&(s.pattern=cf)}),e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:o,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort});return}}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inst:e})}}),vf=$("$ZodCheckBigIntFormat",(e,t)=>{$e.init(e,t);let[n,o]=Ud[t.format];e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,i.minimum=n,i.maximum=o}),e._zod.check=r=>{let i=r.value;i<n&&r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),i>o&&r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inst:e})}}),_f=$("$ZodCheckMaxSize",(e,t)=>{var n;$e.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!vr(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;r.size<=t.maximum||o.issues.push({origin:oi(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),yf=$("$ZodCheckMinSize",(e,t)=>{var n;$e.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!vr(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;r.size>=t.minimum||o.issues.push({origin:oi(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),bf=$("$ZodCheckSizeEquals",(e,t)=>{var n;$e.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!vr(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=o=>{let r=o.value,i=r.size;if(i===t.size)return;let a=i>t.size;o.issues.push({origin:oi(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),$f=$("$ZodCheckMaxLength",(e,t)=>{var n;$e.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!vr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let r=o.value;if(r.length<=t.maximum)return;let a=ii(r);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),xf=$("$ZodCheckMinLength",(e,t)=>{var n;$e.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!vr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let r=o.value;if(r.length>=t.minimum)return;let a=ii(r);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),wf=$("$ZodCheckLengthEquals",(e,t)=>{var n;$e.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return!vr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=o=>{let r=o.value,i=r.length;if(i===t.length)return;let a=ii(r),s=i>t.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),qn=$("$ZodCheckStringFormat",(e,t)=>{var n,o;$e.init(e,t),e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),kf=$("$ZodCheckRegex",(e,t)=>{qn.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Sf=$("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=pf),qn.init(e,t)}),zf=$("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=mf),qn.init(e,t)}),If=$("$ZodCheckIncludes",(e,t)=>{$e.init(e,t);let n=Ut(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(r=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),Ef=$("$ZodCheckStartsWith",(e,t)=>{$e.init(e,t);let n=new RegExp(`^${Ut(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Tf=$("$ZodCheckEndsWith",(e,t)=>{$e.init(e,t);let n=new RegExp(`.*${Ut(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function dv(e,t,n){e.issues.length&&t.issues.push(...dt(n,e.issues))}var Pf=$("$ZodCheckProperty",(e,t)=>{$e.init(e,t),e._zod.check=n=>{let o=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(r=>dv(r,n,t.property));dv(o,n,t.property)}}),Of=$("$ZodCheckMimeType",(e,t)=>{$e.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),jf=$("$ZodCheckOverwrite",(e,t)=>{$e.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var ui=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
|
|
36
36
|
`).filter(a=>a),r=Math.min(...o.map(a=>a.length-a.trimStart().length)),i=o.map(a=>a.slice(r)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let t=Function,n=this?.args,r=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,r.join(`
|
|
37
|
-
`))}};var Ef={major:4,minor:1,patch:9};var W=$("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ef;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let r of o)for(let i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,s,c)=>{let l=yr(a),d;for(let f of s){if(f._zod.def.when){if(!f._zod.def.when(a))continue}else if(l)continue;let y=a.issues.length,v=f._zod.check(a);if(v instanceof Promise&&c?.async===!1)throw new It;if(d||v instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await v,a.issues.length!==y&&(l||(l=yr(a,y)))});else{if(a.issues.length===y)continue;l||(l=yr(a,y))}}return d?d.then(()=>a):a},i=(a,s,c)=>{if(yr(a))return a.aborted=!0,a;let l=r(s,o,c);if(l instanceof Promise){if(c.async===!1)throw new It;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(d=>i(d,a,s)):i(l,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new It;return c.then(l=>r(l,o,s))}return r(c,o,s)}}e["~standard"]={validate:r=>{try{let i=br(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return $r(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}}),xr=$("$ZodString",(e,t)=>{W.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ef(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),ge=$("$ZodStringFormat",(e,t)=>{Mn.init(e,t),xr.init(e,t)}),_s=$("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Ld),ge.init(e,t)}),ys=$("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Jr(o))}else t.pattern??(t.pattern=Jr());ge.init(e,t)}),bs=$("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=qd),ge.init(e,t)}),$s=$("$ZodURL",(e,t)=>{ge.init(e,t),e._zod.check=n=>{try{let o=n.value.trim(),r=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Gd.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),xs=$("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Vd()),ge.init(e,t)}),ws=$("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ud),ge.init(e,t)}),ks=$("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Rd),ge.init(e,t)}),Ss=$("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Ad),ge.init(e,t)}),zs=$("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Dd),ge.init(e,t)}),Is=$("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Cd),ge.init(e,t)}),Es=$("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Zd),ge.init(e,t)}),Ts=$("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Qd(t)),ge.init(e,t)}),Ps=$("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Xd),ge.init(e,t)}),js=$("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Yd(t)),ge.init(e,t)}),Os=$("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Md),ge.init(e,t)}),Ns=$("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Fd),ge.init(e,t),e._zod.onattach.push(n=>{let o=n._zod.bag;o.format="ipv4"})}),Rs=$("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Bd),ge.init(e,t),e._zod.onattach.push(n=>{let o=n._zod.bag;o.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),As=$("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Kd),ge.init(e,t)}),Ds=$("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Hd),ge.init(e,t),e._zod.check=n=>{let o=n.value.split("/");try{if(o.length!==2)throw new Error;let[r,i]=o;if(!i)throw new Error;let a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Pf(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Cs=$("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Jd),ge.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Pf(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function _v(e){if(!ls.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Pf(n)}var Zs=$("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ls),ge.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{_v(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Us=$("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Wd),ge.init(e,t)});function yv(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let r=JSON.parse(atob(o));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var Ms=$("$ZodJWT",(e,t)=>{ge.init(e,t),e._zod.check=n=>{yv(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Ls=$("$ZodCustomStringFormat",(e,t)=>{ge.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),ci=$("$ZodNumber",(e,t)=>{W.init(e,t),e._zod.pattern=e._zod.bag.pattern??nf,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let i=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),qs=$("$ZodNumber",(e,t)=>{df.init(e,t),ci.init(e,t)}),Ln=$("$ZodBoolean",(e,t)=>{W.init(e,t),e._zod.pattern=of,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),ui=$("$ZodBigInt",(e,t)=>{W.init(e,t),e._zod.pattern=tf,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Vs=$("$ZodBigInt",(e,t)=>{ff.init(e,t),ui.init(e,t)}),Fs=$("$ZodSymbol",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),Bs=$("$ZodUndefined",(e,t)=>{W.init(e,t),e._zod.pattern=sf,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),Ks=$("$ZodNull",(e,t)=>{W.init(e,t),e._zod.pattern=af,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),Hs=$("$ZodAny",(e,t)=>{W.init(e,t),e._zod.parse=n=>n}),Js=$("$ZodUnknown",(e,t)=>{W.init(e,t),e._zod.parse=n=>n}),Gs=$("$ZodNever",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Ws=$("$ZodVoid",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),Xs=$("$ZodDate",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,i=r instanceof Date;return i&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:e}),n}});function cv(e,t,n){e.issues.length&&t.issues.push(...lt(n,e.issues)),t.value[n]=e.value}var Ys=$("$ZodArray",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let i=[];for(let a=0;a<r.length;a++){let s=r[a],c=t.element._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(l=>cv(l,n,a))):cv(c,n,a)}return i.length?Promise.all(i).then(()=>n):n}});function vs(e,t,n,o){e.issues.length&&t.issues.push(...lt(n,e.issues)),e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}function bv(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let n=jd(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function $v(e,t,n,o,r,i){let a=[],s=r.keySet,c=r.catchall._zod,l=c.def.type;for(let d of Object.keys(t)){if(s.has(d))continue;if(l==="never"){a.push(d);continue}let f=c.run({value:t[d],issues:[]},o);f instanceof Promise?e.push(f.then(y=>vs(y,n,d,t))):vs(f,n,d,t)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}var Qs=$("$ZodObject",(e,t)=>{W.init(e,t);let n=On(()=>bv(t));se(e._zod,"propValues",()=>{let a=t.shape,s={};for(let c in a){let l=a[c]._zod;if(l.values){s[c]??(s[c]=new Set);for(let d of l.values)s[c].add(d)}}return s});let o=Br,r=t.catchall,i;e._zod.parse=(a,s)=>{i??(i=n.value);let c=a.value;if(!o(c))return a.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),a;a.value={};let l=[],d=i.shape;for(let f of i.keys){let v=d[f]._zod.run({value:c[f],issues:[]},s);v instanceof Promise?l.push(v.then(g=>vs(g,a,f,c))):vs(v,a,f,c)}return r?$v(l,c,a,s,n.value,e):l.length?Promise.all(l).then(()=>a):a}}),jf=$("$ZodObjectJIT",(e,t)=>{Qs.init(e,t);let n=e._zod.parse,o=On(()=>bv(t)),r=y=>{let v=new si(["shape","payload","ctx"]),g=o.value,b=P=>{let M=Ya(P);return`shape[${M}]._zod.run({ value: input[${M}], issues: [] }, ctx)`};v.write("const input = payload.value;");let x=Object.create(null),I=0;for(let P of g.keys)x[P]=`key_${I++}`;v.write("const newResult = {};");for(let P of g.keys){let M=x[P],V=Ya(P);v.write(`const ${M} = ${b(P)};`),v.write(`
|
|
37
|
+
`))}};var Nf={major:4,minor:1,patch:9};var W=$("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Nf;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let r of o)for(let i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,s,c)=>{let l=$r(a),d;for(let f of s){if(f._zod.def.when){if(!f._zod.def.when(a))continue}else if(l)continue;let _=a.issues.length,v=f._zod.check(a);if(v instanceof Promise&&c?.async===!1)throw new Et;if(d||v instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await v,a.issues.length!==_&&(l||(l=$r(a,_)))});else{if(a.issues.length===_)continue;l||(l=$r(a,_))}}return d?d.then(()=>a):a},i=(a,s,c)=>{if($r(a))return a.aborted=!0,a;let l=r(s,o,c);if(l instanceof Promise){if(c.async===!1)throw new Et;return l.then(d=>e._zod.parse(d,c))}return e._zod.parse(l,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(d=>i(d,a,s)):i(l,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Et;return c.then(l=>r(l,o,s))}return r(c,o,s)}}e["~standard"]={validate:r=>{try{let i=xr(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return wr(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}}),kr=$("$ZodString",(e,t)=>{W.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??af(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),ge=$("$ZodStringFormat",(e,t)=>{qn.init(e,t),kr.init(e,t)}),bs=$("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Kd),ge.init(e,t)}),$s=$("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Wr(o))}else t.pattern??(t.pattern=Wr());ge.init(e,t)}),xs=$("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Hd),ge.init(e,t)}),ws=$("$ZodURL",(e,t)=>{ge.init(e,t),e._zod.check=n=>{try{let o=n.value.trim(),r=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:ef.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),ks=$("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Jd()),ge.init(e,t)}),Ss=$("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Fd),ge.init(e,t)}),zs=$("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Zd),ge.init(e,t)}),Is=$("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Md),ge.init(e,t)}),Es=$("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ld),ge.init(e,t)}),Ts=$("$ZodXID",(e,t)=>{t.pattern??(t.pattern=qd),ge.init(e,t)}),Ps=$("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Vd),ge.init(e,t)}),Os=$("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=of(t)),ge.init(e,t)}),js=$("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=rf),ge.init(e,t)}),Ns=$("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=nf(t)),ge.init(e,t)}),Rs=$("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Bd),ge.init(e,t)}),As=$("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Gd),ge.init(e,t),e._zod.onattach.push(n=>{let o=n._zod.bag;o.format="ipv4"})}),Ds=$("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Wd),ge.init(e,t),e._zod.onattach.push(n=>{let o=n._zod.bag;o.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Cs=$("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Xd),ge.init(e,t)}),Us=$("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Yd),ge.init(e,t),e._zod.check=n=>{let o=n.value.split("/");try{if(o.length!==2)throw new Error;let[r,i]=o;if(!i)throw new Error;let a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Af(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Zs=$("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Qd),ge.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{Af(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function kv(e){if(!fs.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Af(n)}var Ms=$("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=fs),ge.init(e,t),e._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{kv(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Ls=$("$ZodE164",(e,t)=>{t.pattern??(t.pattern=tf),ge.init(e,t)});function Sv(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let r=JSON.parse(atob(o));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var qs=$("$ZodJWT",(e,t)=>{ge.init(e,t),e._zod.check=n=>{Sv(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Vs=$("$ZodCustomStringFormat",(e,t)=>{ge.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),li=$("$ZodNumber",(e,t)=>{W.init(e,t),e._zod.pattern=e._zod.bag.pattern??uf,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let i=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n}}),Fs=$("$ZodNumber",(e,t)=>{gf.init(e,t),li.init(e,t)}),Vn=$("$ZodBoolean",(e,t)=>{W.init(e,t),e._zod.pattern=lf,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n}}),di=$("$ZodBigInt",(e,t)=>{W.init(e,t),e._zod.pattern=sf,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Bs=$("$ZodBigInt",(e,t)=>{vf.init(e,t),di.init(e,t)}),Ks=$("$ZodSymbol",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),Hs=$("$ZodUndefined",(e,t)=>{W.init(e,t),e._zod.pattern=ff,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),Js=$("$ZodNull",(e,t)=>{W.init(e,t),e._zod.pattern=df,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),Gs=$("$ZodAny",(e,t)=>{W.init(e,t),e._zod.parse=n=>n}),Ws=$("$ZodUnknown",(e,t)=>{W.init(e,t),e._zod.parse=n=>n}),Xs=$("$ZodNever",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Ys=$("$ZodVoid",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),Qs=$("$ZodDate",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,i=r instanceof Date;return i&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:e}),n}});function mv(e,t,n){e.issues.length&&t.issues.push(...dt(n,e.issues)),t.value[n]=e.value}var ec=$("$ZodArray",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let i=[];for(let a=0;a<r.length;a++){let s=r[a],c=t.element._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(l=>mv(l,n,a))):mv(c,n,a)}return i.length?Promise.all(i).then(()=>n):n}});function ys(e,t,n,o){e.issues.length&&t.issues.push(...dt(n,e.issues)),e.value===void 0?n in o&&(t.value[n]=void 0):t.value[n]=e.value}function zv(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let n=Dd(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Iv(e,t,n,o,r,i){let a=[],s=r.keySet,c=r.catchall._zod,l=c.def.type;for(let d of Object.keys(t)){if(s.has(d))continue;if(l==="never"){a.push(d);continue}let f=c.run({value:t[d],issues:[]},o);f instanceof Promise?e.push(f.then(_=>ys(_,n,d,t))):ys(f,n,d,t)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}var tc=$("$ZodObject",(e,t)=>{W.init(e,t);let n=Rn(()=>zv(t));se(e._zod,"propValues",()=>{let a=t.shape,s={};for(let c in a){let l=a[c]._zod;if(l.values){s[c]??(s[c]=new Set);for(let d of l.values)s[c].add(d)}}return s});let o=Hr,r=t.catchall,i;e._zod.parse=(a,s)=>{i??(i=n.value);let c=a.value;if(!o(c))return a.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),a;a.value={};let l=[],d=i.shape;for(let f of i.keys){let v=d[f]._zod.run({value:c[f],issues:[]},s);v instanceof Promise?l.push(v.then(g=>ys(g,a,f,c))):ys(v,a,f,c)}return r?Iv(l,c,a,s,n.value,e):l.length?Promise.all(l).then(()=>a):a}}),Df=$("$ZodObjectJIT",(e,t)=>{tc.init(e,t);let n=e._zod.parse,o=Rn(()=>zv(t)),r=_=>{let v=new ui(["shape","payload","ctx"]),g=o.value,b=P=>{let M=es(P);return`shape[${M}]._zod.run({ value: input[${M}], issues: [] }, ctx)`};v.write("const input = payload.value;");let x=Object.create(null),I=0;for(let P of g.keys)x[P]=`key_${I++}`;v.write("const newResult = {};");for(let P of g.keys){let M=x[P],V=es(P);v.write(`const ${M} = ${b(P)};`),v.write(`
|
|
38
38
|
if (${M}.issues.length) {
|
|
39
39
|
payload.issues = payload.issues.concat(${M}.issues.map(iss => ({
|
|
40
40
|
...iss,
|
|
@@ -51,15 +51,15 @@ metadata was removed`},h=V(u,null,null,{redactedPaths:yg,redactedKeys:m})),h},qa
|
|
|
51
51
|
newResult[${V}] = ${M}.value;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
`)}v.write("payload.value = newResult;"),v.write("return payload;");let R=v.compile();return(P,M)=>R(y,P,M)},i,a=Br,s=!Wo.jitless,l=s&&Ed.value,d=t.catchall,f;e._zod.parse=(y,v)=>{f??(f=o.value);let g=y.value;return a(g)?s&&l&&v?.async===!1&&v.jitless!==!0?(i||(i=r(t.shape)),y=i(y,v),d?$v([],g,y,v,f,e):y):n(y,v):(y.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),y)}});function uv(e,t,n,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let r=e.filter(i=>!yr(i));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(a=>dt(a,o,Ee())))}),t)}var li=$("$ZodUnion",(e,t)=>{W.init(e,t),se(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),se(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),se(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),se(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>ei(i.source)).join("|")})$`)}});let n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let a=!1,s=[];for(let c of t.options){let l=c._zod.run({value:r.value,issues:[]},i);if(l instanceof Promise)s.push(l),a=!0;else{if(l.issues.length===0)return l;s.push(l)}}return a?Promise.all(s).then(c=>uv(c,r,e,i)):uv(s,r,e,i)}}),ec=$("$ZodDiscriminatedUnion",(e,t)=>{li.init(e,t);let n=e._zod.parse;se(e._zod,"propValues",()=>{let r={};for(let i of t.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[s,c]of Object.entries(a)){r[s]||(r[s]=new Set);for(let l of c)r[s].add(l)}}return r});let o=On(()=>{let r=t.options,i=new Map;for(let a of r){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let c of s){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});e._zod.parse=(r,i)=>{let a=r.value;if(!Br(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(r,i):t.unionFallback?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),r)}}),tc=$("$ZodIntersection",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),a=t.right._zod.run({value:r,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,l])=>lv(n,c,l)):lv(n,i,a)}});function Tf(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(_r(e)&&_r(t)){let n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),r={...e,...t};for(let i of o){let a=Tf(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r[i]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let r=e[o],i=t[o],a=Tf(r,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function lv(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),yr(e))return e;let o=Tf(t.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var di=$("$ZodTuple",(e,t)=>{W.init(e,t);let n=t.items,o=n.length-[...n].reverse().findIndex(r=>r._zod.optin!=="optional");e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];let s=[];if(!t.rest){let l=a.length>n.length,d=a.length<o-1;if(l||d)return r.issues.push({...l?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},input:a,inst:e,origin:"array"}),r}let c=-1;for(let l of n){if(c++,c>=a.length&&c>=o)continue;let d=l._zod.run({value:a[c],issues:[]},i);d instanceof Promise?s.push(d.then(f=>ps(f,r,c))):ps(d,r,c)}if(t.rest){let l=a.slice(n.length);for(let d of l){c++;let f=t.rest._zod.run({value:d,issues:[]},i);f instanceof Promise?s.push(f.then(y=>ps(y,r,c))):ps(f,r,c)}}return s.length?Promise.all(s).then(()=>r):r}});function ps(e,t,n){e.issues.length&&t.issues.push(...lt(n,e.issues)),t.value[n]=e.value}var rc=$("$ZodRecord",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!_r(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let i=[];if(t.keyType._zod.values){let a=t.keyType._zod.values;n.value={};for(let c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let l=t.valueType._zod.run({value:r[c],issues:[]},o);l instanceof Promise?i.push(l.then(d=>{d.issues.length&&n.issues.push(...lt(c,d.issues)),n.value[c]=d.value})):(l.issues.length&&n.issues.push(...lt(c,l.issues)),n.value[c]=l.value)}let s;for(let c in r)a.has(c)||(s=s??[],s.push(c));s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:s})}else{n.value={};for(let a of Reflect.ownKeys(r)){if(a==="__proto__")continue;let s=t.keyType._zod.run({value:a,issues:[]},o);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(s.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(l=>dt(l,o,Ee())),input:a,path:[a],inst:e}),n.value[s.value]=s.value;continue}let c=t.valueType._zod.run({value:r[a],issues:[]},o);c instanceof Promise?i.push(c.then(l=>{l.issues.length&&n.issues.push(...lt(a,l.issues)),n.value[s.value]=l.value})):(c.issues.length&&n.issues.push(...lt(a,c.issues)),n.value[s.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),nc=$("$ZodMap",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let i=[];n.value=new Map;for(let[a,s]of r){let c=t.keyType._zod.run({value:a,issues:[]},o),l=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||l instanceof Promise?i.push(Promise.all([c,l]).then(([d,f])=>{dv(d,f,n,a,r,e,o)})):dv(c,l,n,a,r,e,o)}return i.length?Promise.all(i).then(()=>n):n}});function dv(e,t,n,o,r,i,a){e.issues.length&&(ti.has(typeof o)?n.issues.push(...lt(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map(s=>dt(s,a,Ee()))})),t.issues.length&&(ti.has(typeof o)?n.issues.push(...lt(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map(s=>dt(s,a,Ee()))})),n.value.set(e.value,t.value)}var oc=$("$ZodSet",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let a of r){let s=t.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(c=>fv(c,n))):fv(s,n)}return i.length?Promise.all(i).then(()=>n):n}});function fv(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var ic=$("$ZodEnum",(e,t)=>{W.init(e,t);let n=Qo(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(r=>ti.has(typeof r)).map(r=>typeof r=="string"?Ct(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{let a=r.value;return o.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),ac=$("$ZodLiteral",(e,t)=>{if(W.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Ct(n):n?Ct(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let r=n.value;return e._zod.values.has(r)||n.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),n}}),sc=$("$ZodFile",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),cc=$("$ZodTransform",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new mr(e.constructor.name);let r=t.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n));if(r instanceof Promise)throw new It;return n.value=r,n}});function pv(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var uc=$("$ZodOptional",(e,t)=>{W.init(e,t),e._zod.optin="optional",e._zod.optout="optional",se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),se(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${ei(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>pv(i,n.value)):pv(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),lc=$("$ZodNullable",(e,t)=>{W.init(e,t),se(e._zod,"optin",()=>t.innerType._zod.optin),se(e._zod,"optout",()=>t.innerType._zod.optout),se(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${ei(n.source)}|null)$`):void 0}),se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),dc=$("$ZodDefault",(e,t)=>{W.init(e,t),e._zod.optin="optional",se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>mv(i,t)):mv(r,t)}});function mv(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var fc=$("$ZodPrefault",(e,t)=>{W.init(e,t),e._zod.optin="optional",se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),pc=$("$ZodNonOptional",(e,t)=>{W.init(e,t),se(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>hv(i,e)):hv(r,e)}});function hv(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var mc=$("$ZodSuccess",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new mr("ZodSuccess");let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),hc=$("$ZodCatch",(e,t)=>{W.init(e,t),se(e._zod,"optin",()=>t.innerType._zod.optin),se(e._zod,"optout",()=>t.innerType._zod.optout),se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(a=>dt(a,o,Ee()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>dt(i,o,Ee()))},input:n.value}),n.issues=[]),n)}}),gc=$("$ZodNaN",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),vc=$("$ZodPipe",(e,t)=>{W.init(e,t),se(e._zod,"values",()=>t.in._zod.values),se(e._zod,"optin",()=>t.in._zod.optin),se(e._zod,"optout",()=>t.out._zod.optout),se(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(a=>ms(a,t.in,o)):ms(i,t.in,o)}let r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>ms(i,t.out,o)):ms(r,t.out,o)}});function ms(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var qn=$("$ZodCodec",(e,t)=>{W.init(e,t),se(e._zod,"values",()=>t.in._zod.values),se(e._zod,"optin",()=>t.in._zod.optin),se(e._zod,"optout",()=>t.out._zod.optout),se(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(n,o);return i instanceof Promise?i.then(a=>hs(a,t,o)):hs(i,t,o)}else{let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(a=>hs(a,t,o)):hs(i,t,o)}}});function hs(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(i=>gs(e,i,t.out,n)):gs(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(i=>gs(e,i,t.in,n)):gs(e,r,t.in,n)}}function gs(e,t,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},o)}var _c=$("$ZodReadonly",(e,t)=>{W.init(e,t),se(e._zod,"propValues",()=>t.innerType._zod.propValues),se(e._zod,"values",()=>t.innerType._zod.values),se(e._zod,"optin",()=>t.innerType._zod.optin),se(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(gv):gv(r)}});function gv(e){return e.value=Object.freeze(e.value),e}var yc=$("$ZodTemplateLiteral",(e,t)=>{W.init(e,t);let n=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let r=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(i,a))}else if(o===null||Pd.has(typeof o))n.push(Ct(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,r)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"template_literal",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),bc=$("$ZodFunction",(e,t)=>(W.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...o){let r=e._def.input?Kr(e._def.input,o):o,i=Reflect.apply(n,this,r);return e._def.output?Kr(e._def.output,i):i}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let r=e._def.input?await Hr(e._def.input,o):o,i=await Reflect.apply(n,this,r);return e._def.output?await Hr(e._def.output,i):i}},e._zod.parse=(n,o)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let o=e.constructor;return Array.isArray(n[0])?new o({type:"function",input:new di({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new o({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:n})},e)),$c=$("$ZodPromise",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},o))}),xc=$("$ZodLazy",(e,t)=>{W.init(e,t),se(e._zod,"innerType",()=>t.getter()),se(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),se(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),se(e._zod,"optin",()=>e._zod.innerType._zod.optin??void 0),se(e._zod,"optout",()=>e._zod.innerType._zod.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),wc=$("$ZodCustom",(e,t)=>{$e.init(e,t),W.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(i=>vv(i,n,o,e));vv(r,n,o,e)}});function vv(e,t,n,o){if(!e){let r={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(r.params=o._zod.def.params),t.issues.push(Nn(r))}}var Vn={};qr(Vn,{ar:()=>xv,az:()=>wv,be:()=>Sv,ca:()=>zv,cs:()=>Iv,da:()=>Ev,de:()=>Tv,en:()=>kc,eo:()=>Pv,es:()=>jv,fa:()=>Ov,fi:()=>Nv,fr:()=>Rv,frCA:()=>Av,he:()=>Dv,hu:()=>Cv,id:()=>Zv,is:()=>Uv,it:()=>Mv,ja:()=>Lv,ka:()=>qv,kh:()=>Vv,km:()=>Sc,ko:()=>Fv,lt:()=>Kv,mk:()=>Hv,ms:()=>Jv,nl:()=>Gv,no:()=>Wv,ota:()=>Xv,pl:()=>Qv,ps:()=>Yv,pt:()=>e_,ru:()=>r_,sl:()=>n_,sv:()=>o_,ta:()=>i_,th:()=>a_,tr:()=>s_,ua:()=>c_,uk:()=>zc,ur:()=>u_,vi:()=>l_,yo:()=>p_,zhCN:()=>d_,zhTW:()=>f_});var uz=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return r=>{switch(r.code){case"invalid_type":return`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${O(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${o[i.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${S(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function xv(){return{localeError:uz()}}var lz=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${r.expected}, daxil olan ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${O(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${o[i.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${S(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function wv(){return{localeError:lz()}}function kv(e,t,n,o){let r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?n:o}var dz=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u043B\u0456\u043A";case"object":{if(Array.isArray(r))return"\u043C\u0430\u0441\u0456\u045E";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return r=>{switch(r.code){case"invalid_type":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${O(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=kv(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${r.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=kv(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${r.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${o[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${S(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Sv(){return{localeError:dz()}}var fz=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return r=>{switch(r.code){case"invalid_type":return`Tipus inv\xE0lid: s'esperava ${r.expected}, s'ha rebut ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${O(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${S(r.values," o ")}`;case"too_big":{let i=r.inclusive?"com a m\xE0xim":"menys de",a=t(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${i} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${i} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${o[i.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${S(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function zv(){return{localeError:fz()}}var pz=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u010D\xEDslo";case"string":return"\u0159et\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(r))return"pole";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return r=>{switch(r.code){case"invalid_type":return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${r.expected}, obdr\u017Eeno ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${O(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${o[i.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${S(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function Iv(){return{localeError:pz()}}var mz=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};function n(a){return e[a]??null}function o(a){return t[a]??a}let r=a=>{let s=typeof a;switch(s){case"number":return Number.isNaN(a)?"NaN":"tal";case"object":return Array.isArray(a)?"liste":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype&&a.constructor?a.constructor.name:"objekt"}return s},i={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return a=>{switch(a.code){case"invalid_type":return`Ugyldigt input: forventede ${o(a.expected)}, fik ${o(r(a.input))}`;case"invalid_value":return a.values.length===1?`Ugyldig v\xE6rdi: forventede ${O(a.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${S(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",c=n(a.origin),l=o(a.origin);return c?`For stor: forventede ${l??"value"} ${c.verb} ${s} ${a.maximum.toString()} ${c.unit??"elementer"}`:`For stor: forventede ${l??"value"} havde ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",c=n(a.origin),l=o(a.origin);return c?`For lille: forventede ${l} ${c.verb} ${s} ${a.minimum.toString()} ${c.unit}`:`For lille: forventede ${l} havde ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Ugyldig streng: skal starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: skal ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: skal indeholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${s.pattern}`:`Ugyldig ${i[s.format]??a.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${a.divisor}`;case"unrecognized_keys":return`${a.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${S(a.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${a.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${a.origin}`;default:return"Ugyldigt input"}}};function Ev(){return{localeError:mz()}}var hz=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"Zahl";case"object":{if(Array.isArray(r))return"Array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return r=>{switch(r.code){case"invalid_type":return`Ung\xFCltige Eingabe: erwartet ${r.expected}, erhalten ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${O(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ist`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ist`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${o[i.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${S(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function Tv(){return{localeError:hz()}}var gz=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},vz=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(o){return e[o]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Invalid input: expected ${o.expected}, received ${gz(o.input)}`;case"invalid_value":return o.values.length===1?`Invalid input: expected ${O(o.values[0])}`:`Invalid option: expected one of ${S(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",i=t(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${r}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",i=t(o.origin);return i?`Too small: expected ${o.origin} to have ${r}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Invalid string: must start with "${r.prefix}"`:r.format==="ends_with"?`Invalid string: must end with "${r.suffix}"`:r.format==="includes"?`Invalid string: must include "${r.includes}"`:r.format==="regex"?`Invalid string: must match pattern ${r.pattern}`:`Invalid ${n[r.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${S(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function kc(){return{localeError:vz()}}var _z=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},yz=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return o=>{switch(o.code){case"invalid_type":return`Nevalida enigo: atendi\u011Dis ${o.expected}, ricevi\u011Dis ${_z(o.input)}`;case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${O(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${S(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",i=t(o.origin);return i?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${r}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",i=t(o.origin);return i?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${r}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${r.prefix}"`:r.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${r.suffix}"`:r.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${r.includes}"`:r.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${r.pattern}`:`Nevalida ${n[r.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${S(o.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}};function Pv(){return{localeError:yz()}}var bz=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};function n(a){return e[a]??null}function o(a){return t[a]??a}let r=a=>{let s=typeof a;switch(s){case"number":return Number.isNaN(a)?"NaN":"number";case"object":return Array.isArray(a)?"array":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype?a.constructor.name:"object"}return s},i={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return a=>{switch(a.code){case"invalid_type":return`Entrada inv\xE1lida: se esperaba ${o(a.expected)}, recibido ${o(r(a.input))}`;case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: se esperaba ${O(a.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${S(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",c=n(a.origin),l=o(a.origin);return c?`Demasiado grande: se esperaba que ${l??"valor"} tuviera ${s}${a.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${l??"valor"} fuera ${s}${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",c=n(a.origin),l=o(a.origin);return c?`Demasiado peque\xF1o: se esperaba que ${l} tuviera ${s}${a.minimum.toString()} ${c.unit}`:`Demasiado peque\xF1o: se esperaba que ${l} fuera ${s}${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${s.prefix}"`:s.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${s.suffix}"`:s.format==="includes"?`Cadena inv\xE1lida: debe incluir "${s.includes}"`:s.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${s.pattern}`:`Inv\xE1lido ${i[s.format]??a.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":return`Llave${a.keys.length>1?"s":""} desconocida${a.keys.length>1?"s":""}: ${S(a.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o(a.origin)}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o(a.origin)}`;default:return"Entrada inv\xE1lida"}}};function jv(){return{localeError:bz()}}var $z=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(r))return"\u0622\u0631\u0627\u06CC\u0647";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return r=>{switch(r.code){case"invalid_type":return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${n(r.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${O(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${S(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${o[i.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${S(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Ov(){return{localeError:$z()}}var xz=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return r=>{switch(r.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${r.expected}, oli ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${O(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${o[i.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${S(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function Nv(){return{localeError:xz()}}var wz=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"nombre";case"object":{if(Array.isArray(r))return"tableau";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return r=>{switch(r.code){case"invalid_type":return`Entr\xE9e invalide : ${r.expected} attendu, ${n(r.input)} re\xE7u`;case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${O(r.values[0])} attendu`:`Option invalide : une valeur parmi ${S(r.values,"|")} attendue`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${r.origin??"valeur"} doit ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${r.origin??"valeur"} doit \xEAtre ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${r.origin} doit ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${r.origin} doit \xEAtre ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${o[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${S(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function Rv(){return{localeError:wz()}}var kz=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return r=>{switch(r.code){case"invalid_type":return`Entr\xE9e invalide : attendu ${r.expected}, re\xE7u ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${O(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${i}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${i}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${S(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function Av(){return{localeError:kz()}}var Sz=()=>{let e={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return r=>{switch(r.code){case"invalid_type":return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${r.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${O(r.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${r.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${r.maximum.toString()} ${a.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${r.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${r.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${r.minimum.toString()} ${a.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${r.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${i.prefix}"`:i.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${i.suffix}"`:i.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${i.includes}"`:i.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${i.pattern}`:`${o[i.format]??r.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${r.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${r.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${r.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${S(r.keys,", ")}`;case"invalid_key":return`\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r.origin}`;case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r.origin}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Dv(){return{localeError:Sz()}}var zz=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"sz\xE1m";case"object":{if(Array.isArray(r))return"t\xF6mb";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return r=>{switch(r.code){case"invalid_type":return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${r.expected}, a kapott \xE9rt\xE9k ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${O(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${i}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${o[i.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${S(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Cv(){return{localeError:zz()}}var Iz=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Input tidak valid: diharapkan ${r.expected}, diterima ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${O(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${i}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${i}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${S(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function Zv(){return{localeError:Iz()}}var Ez=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"n\xFAmer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Tz=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"};return o=>{switch(o.code){case"invalid_type":return`Rangt gildi: \xDE\xFA sl\xF3st inn ${Ez(o.input)} \xFEar sem \xE1 a\xF0 vera ${o.expected}`;case"invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${O(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${S(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",i=t(o.origin);return i?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${r}${o.maximum.toString()} ${i.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",i=t(o.origin);return i?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${r}${o.minimum.toString()} ${i.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${r.prefix}"`:r.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${r.suffix}"`:r.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${r.includes}"`:r.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${r.pattern}`:`Rangt ${n[r.format]??o.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${S(o.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${o.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${o.origin}`;default:return"Rangt gildi"}}};function Uv(){return{localeError:Tz()}}var Pz=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"numero";case"object":{if(Array.isArray(r))return"vettore";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Input non valido: atteso ${r.expected}, ricevuto ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Input non valido: atteso ${O(r.values[0])}`:`Opzione non valida: atteso uno tra ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${i}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${i}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${o[i.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${S(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function Mv(){return{localeError:Pz()}}var jz=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u6570\u5024";case"object":{if(Array.isArray(r))return"\u914D\u5217";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return r=>{switch(r.code){case"invalid_type":return`\u7121\u52B9\u306A\u5165\u529B: ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${n(r.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${O(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${S(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${o[i.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${S(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Lv(){return{localeError:jz()}}var Oz=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8";case"object":{if(Array.isArray(e))return"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return{string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0"}[t]??t},Nz=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"};return o=>{switch(o.code){case"invalid_type":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${Oz(o.input)}`;case"invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${O(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${S(o.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let r=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${i.verb} ${r}${o.maximum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${i.verb} ${r}${o.minimum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${r.prefix}"-\u10D8\u10D7`:r.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${r.suffix}"-\u10D8\u10D7`:r.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${r.includes}"-\u10E1`:r.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${r.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[r.format]??o.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${S(o.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function qv(){return{localeError:Nz()}}var Rz=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case"object":{if(Array.isArray(r))return"\u17A2\u17B6\u179A\u17C1 (Array)";if(r===null)return"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return r=>{switch(r.code){case"invalid_type":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${O(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${o[i.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${S(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Sc(){return{localeError:Rz()}}function Vv(){return Sc()}var Az=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return r=>{switch(r.code){case"invalid_type":return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${n(r.input)}\uC785\uB2C8\uB2E4`;case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${O(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${S(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${c} ${i}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${i}${a}`}case"too_small":{let i=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${c} ${i}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${o[i.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${S(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Fv(){return{localeError:Az()}}var Dz=e=>pi(typeof e,e),pi=(e,t=void 0)=>{switch(e){case"number":return Number.isNaN(t)?"NaN":"skai\u010Dius";case"bigint":return"sveikasis skai\u010Dius";case"string":return"eilut\u0117";case"boolean":return"login\u0117 reik\u0161m\u0117";case"undefined":case"void":return"neapibr\u0117\u017Eta reik\u0161m\u0117";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return t===void 0?"ne\u017Einomas objektas":t===null?"nulin\u0117 reik\u0161m\u0117":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case"null":return"nulin\u0117 reik\u0161m\u0117"}return e},fi=e=>e.charAt(0).toUpperCase()+e.slice(1);function Bv(e){let t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19||n===0?"many":n===1?"one":"few"}var Cz=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,r,i,a){let s=e[o]??null;return s===null?s:{unit:s.unit[r],verb:s.verb[a][i?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"};return o=>{switch(o.code){case"invalid_type":return`Gautas tipas ${Dz(o.input)}, o tik\u0117tasi - ${pi(o.expected)}`;case"invalid_value":return o.values.length===1?`Privalo b\u016Bti ${O(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${S(o.values,"|")} pasirinkim\u0173`;case"too_big":{let r=pi(o.origin),i=t(o.origin,Bv(Number(o.maximum)),o.inclusive??!1,"smaller");if(i?.verb)return`${fi(r??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.maximum.toString()} ${i.unit??"element\u0173"}`;let a=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${fi(r??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${o.maximum.toString()} ${i?.unit}`}case"too_small":{let r=pi(o.origin),i=t(o.origin,Bv(Number(o.minimum)),o.inclusive??!1,"bigger");if(i?.verb)return`${fi(r??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.minimum.toString()} ${i.unit??"element\u0173"}`;let a=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${fi(r??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${o.minimum.toString()} ${i?.unit}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${r.prefix}"`:r.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${r.suffix}"`:r.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${r.includes}"`:r.format==="regex"?`Eilut\u0117 privalo atitikti ${r.pattern}`:`Neteisingas ${n[r.format]??o.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${S(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let r=pi(o.origin);return`${fi(r??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Kv(){return{localeError:Cz()}}var Zz=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u0431\u0440\u043E\u0458";case"object":{if(Array.isArray(r))return"\u043D\u0438\u0437\u0430";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return r=>{switch(r.code){case"invalid_type":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Invalid input: expected ${O(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${o[i.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${S(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function Hv(){return{localeError:Zz()}}var Uz=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"nombor";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Input tidak sah: dijangka ${r.expected}, diterima ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${O(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${S(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function Jv(){return{localeError:Uz()}}var Mz=()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"getal";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return r=>{switch(r.code){case"invalid_type":return`Ongeldige invoer: verwacht ${r.expected}, ontving ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${O(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Te lang: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} ${a.unit??"elementen"} bevat`:`Te lang: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} is`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Te kort: verwacht dat ${r.origin} ${i}${r.minimum.toString()} ${a.unit} bevat`:`Te kort: verwacht dat ${r.origin} ${i}${r.minimum.toString()} is`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${S(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function Gv(){return{localeError:Mz()}}var Lz=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"tall";case"object":{if(Array.isArray(r))return"liste";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Ugyldig input: forventet ${r.expected}, fikk ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${O(r.values[0])}`:`Ugyldig valg: forventet en av ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${o[i.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${S(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function Wv(){return{localeError:Lz()}}var qz=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"numara";case"object":{if(Array.isArray(r))return"saf";if(r===null)return"gayb";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return r=>{switch(r.code){case"invalid_type":return`F\xE2sit giren: umulan ${r.expected}, al\u0131nan ${n(r.input)}`;case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${O(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=r;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${o[i.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${S(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function Xv(){return{localeError:qz()}}var Vz=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(r))return"\u0627\u0631\u06D0";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return r=>{switch(r.code){case"invalid_type":return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${n(r.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${O(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${S(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${o[i.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${S(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function Yv(){return{localeError:Vz()}}var Fz=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"liczba";case"object":{if(Array.isArray(r))return"tablica";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return r=>{switch(r.code){case"invalid_type":return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${r.expected}, otrzymano ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${O(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${o[i.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${S(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function Qv(){return{localeError:Fz()}}var Bz=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(r))return"array";if(r===null)return"nulo";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return r=>{switch(r.code){case"invalid_type":return`Tipo inv\xE1lido: esperado ${r.expected}, recebido ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${O(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${i}${r.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Muito pequeno: esperado que ${r.origin} tivesse ${i}${r.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${o[i.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${S(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}};function e_(){return{localeError:Bz()}}function t_(e,t,n,o){let r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?n:o}var Kz=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(r))return"\u043C\u0430\u0441\u0441\u0438\u0432";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return r=>{switch(r.code){case"invalid_type":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${O(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=t_(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=t_(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${o[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${S(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function r_(){return{localeError:Kz()}}var Hz=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u0161tevilo";case"object":{if(Array.isArray(r))return"tabela";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return r=>{switch(r.code){case"invalid_type":return`Neveljaven vnos: pri\u010Dakovano ${r.expected}, prejeto ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${O(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${i}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${i}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${S(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function n_(){return{localeError:Hz()}}var Jz=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"antal";case"object":{if(Array.isArray(r))return"lista";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return r=>{switch(r.code){case"invalid_type":return`Ogiltig inmatning: f\xF6rv\xE4ntat ${r.expected}, fick ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${O(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${o[i.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${S(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function o_(){return{localeError:Jz()}}var Gz=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case"object":{if(Array.isArray(r))return"\u0B85\u0BA3\u0BBF";if(r===null)return"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${O(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${S(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${i}${r.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${i}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${o[i.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${S(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function i_(){return{localeError:Gz()}}var Wz=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case"object":{if(Array.isArray(r))return"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(r===null)return"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return r=>{switch(r.code){case"invalid_type":return`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${O(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${o[i.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${S(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function a_(){return{localeError:Wz()}}var Xz=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Yz=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return o=>{switch(o.code){case"invalid_type":return`Ge\xE7ersiz de\u011Fer: beklenen ${o.expected}, al\u0131nan ${Xz(o.input)}`;case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${O(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${S(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",i=t(o.origin);return i?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${r}${o.maximum.toString()} ${i.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",i=t(o.origin);return i?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${r}${o.minimum.toString()} ${i.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Ge\xE7ersiz metin: "${r.prefix}" ile ba\u015Flamal\u0131`:r.format==="ends_with"?`Ge\xE7ersiz metin: "${r.suffix}" ile bitmeli`:r.format==="includes"?`Ge\xE7ersiz metin: "${r.includes}" i\xE7ermeli`:r.format==="regex"?`Ge\xE7ersiz metin: ${r.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[r.format]??o.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${S(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function s_(){return{localeError:Yz()}}var Qz=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(r))return"\u043C\u0430\u0441\u0438\u0432";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return r=>{switch(r.code){case"invalid_type":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${O(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${o[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${S(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function zc(){return{localeError:Qz()}}function c_(){return zc()}var eI=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u0646\u0645\u0628\u0631";case"object":{if(Array.isArray(r))return"\u0622\u0631\u06D2";if(r===null)return"\u0646\u0644";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return r=>{switch(r.code){case"invalid_type":return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${n(r.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${O(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${S(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${i}${r.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${i}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${o[i.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${S(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function u_(){return{localeError:eI()}}var tI=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"s\u1ED1";case"object":{if(Array.isArray(r))return"m\u1EA3ng";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return r=>{switch(r.code){case"invalid_type":return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${O(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${o[i.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${S(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function l_(){return{localeError:tI()}}var rI=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case"object":{if(Array.isArray(r))return"\u6570\u7EC4";if(r===null)return"\u7A7A\u503C(null)";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return r=>{switch(r.code){case"invalid_type":return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${O(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${o[i.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${S(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function d_(){return{localeError:rI()}}var nI=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return r=>{switch(r.code){case"invalid_type":return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${r.expected}\uFF0C\u4F46\u6536\u5230 ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${O(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${o[i.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${S(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function f_(){return{localeError:nI()}}var oI=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"n\u1ECD\u0301mb\xE0";case"object":{if(Array.isArray(r))return"akop\u1ECD";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"};return r=>{switch(r.code){case"invalid_type":return`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${O(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${i}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.maximum}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${i}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.minimum}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${o[i.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${S(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function p_(){return{localeError:oI()}}var Ic=Symbol("ZodOutput"),Ec=Symbol("ZodInput"),Fn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let o=n[0];if(this._map.set(t,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let o={...this.get(n)??{}};delete o.id;let r={...o,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function mi(){return new Fn}var Et=mi();function Tc(e,t){return new e({type:"string",...N(t)})}function Pc(e,t){return new e({type:"string",coerce:!0,...N(t)})}function hi(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...N(t)})}function Bn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...N(t)})}function gi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...N(t)})}function vi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...N(t)})}function _i(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...N(t)})}function yi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...N(t)})}function Kn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...N(t)})}function bi(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...N(t)})}function $i(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...N(t)})}function xi(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...N(t)})}function wi(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...N(t)})}function ki(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...N(t)})}function Si(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...N(t)})}function zi(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...N(t)})}function Ii(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...N(t)})}function Ei(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...N(t)})}function Ti(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...N(t)})}function Pi(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...N(t)})}function ji(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...N(t)})}function Oi(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...N(t)})}function Ni(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...N(t)})}function Ri(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...N(t)})}var jc={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Oc(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...N(t)})}function Nc(e,t){return new e({type:"string",format:"date",check:"string_format",...N(t)})}function Rc(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...N(t)})}function Ac(e,t){return new e({type:"string",format:"duration",check:"string_format",...N(t)})}function Dc(e,t){return new e({type:"number",checks:[],...N(t)})}function Cc(e,t){return new e({type:"number",coerce:!0,checks:[],...N(t)})}function Zc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...N(t)})}function Uc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...N(t)})}function Mc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...N(t)})}function Lc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...N(t)})}function qc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...N(t)})}function Vc(e,t){return new e({type:"boolean",...N(t)})}function Fc(e,t){return new e({type:"boolean",coerce:!0,...N(t)})}function Bc(e,t){return new e({type:"bigint",...N(t)})}function Kc(e,t){return new e({type:"bigint",coerce:!0,...N(t)})}function Hc(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...N(t)})}function Jc(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...N(t)})}function Gc(e,t){return new e({type:"symbol",...N(t)})}function Wc(e,t){return new e({type:"undefined",...N(t)})}function Xc(e,t){return new e({type:"null",...N(t)})}function Yc(e){return new e({type:"any"})}function Qc(e){return new e({type:"unknown"})}function eu(e,t){return new e({type:"never",...N(t)})}function tu(e,t){return new e({type:"void",...N(t)})}function ru(e,t){return new e({type:"date",...N(t)})}function nu(e,t){return new e({type:"date",coerce:!0,...N(t)})}function ou(e,t){return new e({type:"nan",...N(t)})}function Zt(e,t){return new ds({check:"less_than",...N(t),value:e,inclusive:!1})}function tt(e,t){return new ds({check:"less_than",...N(t),value:e,inclusive:!0})}function Ut(e,t){return new fs({check:"greater_than",...N(t),value:e,inclusive:!1})}function Ve(e,t){return new fs({check:"greater_than",...N(t),value:e,inclusive:!0})}function iu(e){return Ut(0,e)}function au(e){return Zt(0,e)}function su(e){return tt(0,e)}function cu(e){return Ve(0,e)}function wr(e,t){return new lf({check:"multiple_of",...N(t),value:e})}function Gr(e,t){return new pf({check:"max_size",...N(t),maximum:e})}function kr(e,t){return new mf({check:"min_size",...N(t),minimum:e})}function Hn(e,t){return new hf({check:"size_equals",...N(t),size:e})}function Wr(e,t){return new gf({check:"max_length",...N(t),maximum:e})}function Qt(e,t){return new vf({check:"min_length",...N(t),minimum:e})}function Xr(e,t){return new _f({check:"length_equals",...N(t),length:e})}function Jn(e,t){return new yf({check:"string_format",format:"regex",...N(t),pattern:e})}function Gn(e){return new bf({check:"string_format",format:"lowercase",...N(e)})}function Wn(e){return new $f({check:"string_format",format:"uppercase",...N(e)})}function Xn(e,t){return new xf({check:"string_format",format:"includes",...N(t),includes:e})}function Yn(e,t){return new wf({check:"string_format",format:"starts_with",...N(t),prefix:e})}function Qn(e,t){return new kf({check:"string_format",format:"ends_with",...N(t),suffix:e})}function uu(e,t,n){return new Sf({check:"property",property:e,schema:t,...N(n)})}function eo(e,t){return new zf({check:"mime_type",mime:e,...N(t)})}function Mt(e){return new If({check:"overwrite",tx:e})}function to(e){return Mt(t=>t.normalize(e))}function ro(){return Mt(e=>e.trim())}function no(){return Mt(e=>e.toLowerCase())}function oo(){return Mt(e=>e.toUpperCase())}function Of(e,t,n){return new e({type:"array",element:t,...N(n)})}function iI(e,t,n){return new e({type:"union",options:t,...N(n)})}function aI(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...N(o)})}function sI(e,t,n){return new e({type:"intersection",left:t,right:n})}function cI(e,t,n,o){let r=n instanceof W,i=r?o:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...N(i)})}function uI(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...N(o)})}function lI(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...N(o)})}function dI(e,t,n){return new e({type:"set",valueType:t,...N(n)})}function fI(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:o,...N(n)})}function pI(e,t,n){return new e({type:"enum",entries:t,...N(n)})}function mI(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...N(n)})}function lu(e,t){return new e({type:"file",...N(t)})}function hI(e,t){return new e({type:"transform",transform:t})}function gI(e,t){return new e({type:"optional",innerType:t})}function vI(e,t){return new e({type:"nullable",innerType:t})}function _I(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Td(n)}})}function yI(e,t,n){return new e({type:"nonoptional",innerType:t,...N(n)})}function bI(e,t){return new e({type:"success",innerType:t})}function $I(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function xI(e,t,n){return new e({type:"pipe",in:t,out:n})}function wI(e,t){return new e({type:"readonly",innerType:t})}function kI(e,t,n){return new e({type:"template_literal",parts:t,...N(n)})}function SI(e,t){return new e({type:"lazy",getter:t})}function zI(e,t){return new e({type:"promise",innerType:t})}function du(e,t,n){let o=N(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function fu(e,t,n){return new e({type:"custom",check:"custom",fn:t,...N(n)})}function pu(e){let t=m_(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(Nn(o,n.value,t._zod.def));else{let r=o;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(Nn(r))}},e(n.value,n)));return t}function m_(e,t){let n=new $e({check:"custom",...N(t)});return n._zod.check=e,n}function mu(e,t){let n=N(t),o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(o=o.map(v=>typeof v=="string"?v.toLowerCase():v),r=r.map(v=>typeof v=="string"?v.toLowerCase():v));let i=new Set(o),a=new Set(r),s=e.Codec??qn,c=e.Boolean??Ln,l=e.String??xr,d=new l({type:"string",error:n.error}),f=new c({type:"boolean",error:n.error}),y=new s({type:"pipe",in:d,out:f,transform:((v,g)=>{let b=v;return n.case!=="sensitive"&&(b=b.toLowerCase()),i.has(b)?!0:a.has(b)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:g.value,inst:y,continue:!1}),{})}),reverseTransform:((v,g)=>v===!0?o[0]||"true":r[0]||"false"),error:n.error});return y}function Yr(e,t,n,o={}){let r=N(o),i={...N(o),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(i.pattern=n),new e(i)}var Ai=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Et,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,n={path:[],schemaPath:[]}){var o;let r=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},a=this.seen.get(t);if(a)return a.count++,n.schemaPath.includes(t)&&(a.cycle=n.path),a.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(t,s);let c=t._zod.toJSONSchema?.();if(c)s.schema=c;else{let f={...n,schemaPath:[...n.schemaPath,t],path:n.path},y=t._zod.parent;if(y)s.ref=y,this.process(y,f),this.seen.get(y).isParent=!0;else{let v=s.schema;switch(r.type){case"string":{let g=v;g.type="string";let{minimum:b,maximum:x,format:I,patterns:R,contentEncoding:P}=t._zod.bag;if(typeof b=="number"&&(g.minLength=b),typeof x=="number"&&(g.maxLength=x),I&&(g.format=i[I]??I,g.format===""&&delete g.format),P&&(g.contentEncoding=P),R&&R.size>0){let M=[...R];M.length===1?g.pattern=M[0].source:M.length>1&&(s.schema.allOf=[...M.map(V=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:V.source}))])}break}case"number":{let g=v,{minimum:b,maximum:x,format:I,multipleOf:R,exclusiveMaximum:P,exclusiveMinimum:M}=t._zod.bag;typeof I=="string"&&I.includes("int")?g.type="integer":g.type="number",typeof M=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(g.minimum=M,g.exclusiveMinimum=!0):g.exclusiveMinimum=M),typeof b=="number"&&(g.minimum=b,typeof M=="number"&&this.target!=="draft-4"&&(M>=b?delete g.minimum:delete g.exclusiveMinimum)),typeof P=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(g.maximum=P,g.exclusiveMaximum=!0):g.exclusiveMaximum=P),typeof x=="number"&&(g.maximum=x,typeof P=="number"&&this.target!=="draft-4"&&(P<=x?delete g.maximum:delete g.exclusiveMaximum)),typeof R=="number"&&(g.multipleOf=R);break}case"boolean":{let g=v;g.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{this.target==="openapi-3.0"?(v.type="string",v.nullable=!0,v.enum=[null]):v.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{v.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let g=v,{minimum:b,maximum:x}=t._zod.bag;typeof b=="number"&&(g.minItems=b),typeof x=="number"&&(g.maxItems=x),g.type="array",g.items=this.process(r.element,{...f,path:[...f.path,"items"]});break}case"object":{let g=v;g.type="object",g.properties={};let b=r.shape;for(let R in b)g.properties[R]=this.process(b[R],{...f,path:[...f.path,"properties",R]});let x=new Set(Object.keys(b)),I=new Set([...x].filter(R=>{let P=r.shape[R]._zod;return this.io==="input"?P.optin===void 0:P.optout===void 0}));I.size>0&&(g.required=Array.from(I)),r.catchall?._zod.def.type==="never"?g.additionalProperties=!1:r.catchall?r.catchall&&(g.additionalProperties=this.process(r.catchall,{...f,path:[...f.path,"additionalProperties"]})):this.io==="output"&&(g.additionalProperties=!1);break}case"union":{let g=v,b=r.options.map((x,I)=>this.process(x,{...f,path:[...f.path,"anyOf",I]}));g.anyOf=b;break}case"intersection":{let g=v,b=this.process(r.left,{...f,path:[...f.path,"allOf",0]}),x=this.process(r.right,{...f,path:[...f.path,"allOf",1]}),I=P=>"allOf"in P&&Object.keys(P).length===1,R=[...I(b)?b.allOf:[b],...I(x)?x.allOf:[x]];g.allOf=R;break}case"tuple":{let g=v;g.type="array";let b=this.target==="draft-2020-12"?"prefixItems":"items",x=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",I=r.items.map((V,Me)=>this.process(V,{...f,path:[...f.path,b,Me]})),R=r.rest?this.process(r.rest,{...f,path:[...f.path,x,...this.target==="openapi-3.0"?[r.items.length]:[]]}):null;this.target==="draft-2020-12"?(g.prefixItems=I,R&&(g.items=R)):this.target==="openapi-3.0"?(g.items={anyOf:I},R&&g.items.anyOf.push(R),g.minItems=I.length,R||(g.maxItems=I.length)):(g.items=I,R&&(g.additionalItems=R));let{minimum:P,maximum:M}=t._zod.bag;typeof P=="number"&&(g.minItems=P),typeof M=="number"&&(g.maxItems=M);break}case"record":{let g=v;g.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(g.propertyNames=this.process(r.keyType,{...f,path:[...f.path,"propertyNames"]})),g.additionalProperties=this.process(r.valueType,{...f,path:[...f.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let g=v,b=Qo(r.entries);b.every(x=>typeof x=="number")&&(g.type="number"),b.every(x=>typeof x=="string")&&(g.type="string"),g.enum=b;break}case"literal":{let g=v,b=[];for(let x of r.values)if(x===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof x=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");b.push(Number(x))}else b.push(x);if(b.length!==0)if(b.length===1){let x=b[0];g.type=x===null?"null":typeof x,this.target==="draft-4"||this.target==="openapi-3.0"?g.enum=[x]:g.const=x}else b.every(x=>typeof x=="number")&&(g.type="number"),b.every(x=>typeof x=="string")&&(g.type="string"),b.every(x=>typeof x=="boolean")&&(g.type="string"),b.every(x=>x===null)&&(g.type="null"),g.enum=b;break}case"file":{let g=v,b={type:"string",format:"binary",contentEncoding:"binary"},{minimum:x,maximum:I,mime:R}=t._zod.bag;x!==void 0&&(b.minLength=x),I!==void 0&&(b.maxLength=I),R?R.length===1?(b.contentMediaType=R[0],Object.assign(g,b)):g.anyOf=R.map(P=>({...b,contentMediaType:P})):Object.assign(g,b);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let g=this.process(r.innerType,f);this.target==="openapi-3.0"?(s.ref=r.innerType,v.nullable=!0):v.anyOf=[g,{type:"null"}];break}case"nonoptional":{this.process(r.innerType,f),s.ref=r.innerType;break}case"success":{let g=v;g.type="boolean";break}case"default":{this.process(r.innerType,f),s.ref=r.innerType,v.default=JSON.parse(JSON.stringify(r.defaultValue));break}case"prefault":{this.process(r.innerType,f),s.ref=r.innerType,this.io==="input"&&(v._prefault=JSON.parse(JSON.stringify(r.defaultValue)));break}case"catch":{this.process(r.innerType,f),s.ref=r.innerType;let g;try{g=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}v.default=g;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let g=v,b=t._zod.pattern;if(!b)throw new Error("Pattern not found in template literal");g.type="string",g.pattern=b.source;break}case"pipe":{let g=this.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;this.process(g,f),s.ref=g;break}case"readonly":{this.process(r.innerType,f),s.ref=r.innerType,v.readOnly=!0;break}case"promise":{this.process(r.innerType,f),s.ref=r.innerType;break}case"optional":{this.process(r.innerType,f),s.ref=r.innerType;break}case"lazy":{let g=t._zod.innerType;this.process(g,f),s.ref=g;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}default:}}}let l=this.metadataRegistry.get(t);return l&&Object.assign(s.schema,l),this.io==="input"&&Oe(t)&&(delete s.schema.examples,delete s.schema.default),this.io==="input"&&s.schema._prefault&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,this.seen.get(t).schema}emit(t,n){let o={cycles:n?.cycles??"ref",reused:n?.reused??"inline",external:n?.external??void 0},r=this.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=d=>{let f=this.target==="draft-2020-12"?"$defs":"definitions";if(o.external){let b=o.external.registry.get(d[0])?.id,x=o.external.uri??(R=>R);if(b)return{ref:x(b)};let I=d[1].defId??d[1].schema.id??`schema${this.counter++}`;return d[1].defId=I,{defId:I,ref:`${x("__shared")}#/${f}/${I}`}}if(d[1]===r)return{ref:"#"};let v=`#/${f}/`,g=d[1].schema.id??`__schema${this.counter++}`;return{defId:g,ref:v+g}},a=d=>{if(d[1].schema.$ref)return;let f=d[1],{ref:y,defId:v}=i(d);f.def={...f.schema},v&&(f.defId=v);let g=f.schema;for(let b in g)delete g[b];g.$ref=y};if(o.cycles==="throw")for(let d of this.seen.entries()){let f=d[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/<root>
|
|
54
|
+
`)}v.write("payload.value = newResult;"),v.write("return payload;");let R=v.compile();return(P,M)=>R(_,P,M)},i,a=Hr,s=!Yo.jitless,l=s&&Nd.value,d=t.catchall,f;e._zod.parse=(_,v)=>{f??(f=o.value);let g=_.value;return a(g)?s&&l&&v?.async===!1&&v.jitless!==!0?(i||(i=r(t.shape)),_=i(_,v),d?Iv([],g,_,v,f,e):_):n(_,v):(_.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),_)}});function hv(e,t,n,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let r=e.filter(i=>!$r(i));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(a=>ft(a,o,Ee())))}),t)}var fi=$("$ZodUnion",(e,t)=>{W.init(e,t),se(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),se(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),se(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),se(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>ri(i.source)).join("|")})$`)}});let n=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(r,i)=>{if(n)return o(r,i);let a=!1,s=[];for(let c of t.options){let l=c._zod.run({value:r.value,issues:[]},i);if(l instanceof Promise)s.push(l),a=!0;else{if(l.issues.length===0)return l;s.push(l)}}return a?Promise.all(s).then(c=>hv(c,r,e,i)):hv(s,r,e,i)}}),rc=$("$ZodDiscriminatedUnion",(e,t)=>{fi.init(e,t);let n=e._zod.parse;se(e._zod,"propValues",()=>{let r={};for(let i of t.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[s,c]of Object.entries(a)){r[s]||(r[s]=new Set);for(let l of c)r[s].add(l)}}return r});let o=Rn(()=>{let r=t.options,i=new Map;for(let a of r){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let c of s){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});e._zod.parse=(r,i)=>{let a=r.value;if(!Hr(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(r,i):t.unionFallback?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),r)}}),nc=$("$ZodIntersection",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),a=t.right._zod.run({value:r,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,l])=>gv(n,c,l)):gv(n,i,a)}});function Rf(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(br(e)&&br(t)){let n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),r={...e,...t};for(let i of o){let a=Rf(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r[i]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let r=e[o],i=t[o],a=Rf(r,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function gv(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),$r(e))return e;let o=Rf(t.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var pi=$("$ZodTuple",(e,t)=>{W.init(e,t);let n=t.items,o=n.length-[...n].reverse().findIndex(r=>r._zod.optin!=="optional");e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];let s=[];if(!t.rest){let l=a.length>n.length,d=a.length<o-1;if(l||d)return r.issues.push({...l?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},input:a,inst:e,origin:"array"}),r}let c=-1;for(let l of n){if(c++,c>=a.length&&c>=o)continue;let d=l._zod.run({value:a[c],issues:[]},i);d instanceof Promise?s.push(d.then(f=>hs(f,r,c))):hs(d,r,c)}if(t.rest){let l=a.slice(n.length);for(let d of l){c++;let f=t.rest._zod.run({value:d,issues:[]},i);f instanceof Promise?s.push(f.then(_=>hs(_,r,c))):hs(f,r,c)}}return s.length?Promise.all(s).then(()=>r):r}});function hs(e,t,n){e.issues.length&&t.issues.push(...dt(n,e.issues)),t.value[n]=e.value}var oc=$("$ZodRecord",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!br(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let i=[];if(t.keyType._zod.values){let a=t.keyType._zod.values;n.value={};for(let c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let l=t.valueType._zod.run({value:r[c],issues:[]},o);l instanceof Promise?i.push(l.then(d=>{d.issues.length&&n.issues.push(...dt(c,d.issues)),n.value[c]=d.value})):(l.issues.length&&n.issues.push(...dt(c,l.issues)),n.value[c]=l.value)}let s;for(let c in r)a.has(c)||(s=s??[],s.push(c));s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:s})}else{n.value={};for(let a of Reflect.ownKeys(r)){if(a==="__proto__")continue;let s=t.keyType._zod.run({value:a,issues:[]},o);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(s.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(l=>ft(l,o,Ee())),input:a,path:[a],inst:e}),n.value[s.value]=s.value;continue}let c=t.valueType._zod.run({value:r[a],issues:[]},o);c instanceof Promise?i.push(c.then(l=>{l.issues.length&&n.issues.push(...dt(a,l.issues)),n.value[s.value]=l.value})):(c.issues.length&&n.issues.push(...dt(a,c.issues)),n.value[s.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),ic=$("$ZodMap",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let i=[];n.value=new Map;for(let[a,s]of r){let c=t.keyType._zod.run({value:a,issues:[]},o),l=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||l instanceof Promise?i.push(Promise.all([c,l]).then(([d,f])=>{vv(d,f,n,a,r,e,o)})):vv(c,l,n,a,r,e,o)}return i.length?Promise.all(i).then(()=>n):n}});function vv(e,t,n,o,r,i,a){e.issues.length&&(ni.has(typeof o)?n.issues.push(...dt(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map(s=>ft(s,a,Ee()))})),t.issues.length&&(ni.has(typeof o)?n.issues.push(...dt(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map(s=>ft(s,a,Ee()))})),n.value.set(e.value,t.value)}var ac=$("$ZodSet",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let a of r){let s=t.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(c=>_v(c,n))):_v(s,n)}return i.length?Promise.all(i).then(()=>n):n}});function _v(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var sc=$("$ZodEnum",(e,t)=>{W.init(e,t);let n=ti(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(r=>ni.has(typeof r)).map(r=>typeof r=="string"?Ut(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{let a=r.value;return o.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),cc=$("$ZodLiteral",(e,t)=>{if(W.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?Ut(n):n?Ut(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let r=n.value;return e._zod.values.has(r)||n.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),n}}),uc=$("$ZodFile",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),lc=$("$ZodTransform",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new gr(e.constructor.name);let r=t.transform(n.value,n);if(o.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n));if(r instanceof Promise)throw new Et;return n.value=r,n}});function yv(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var dc=$("$ZodOptional",(e,t)=>{W.init(e,t),e._zod.optin="optional",e._zod.optout="optional",se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),se(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${ri(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>yv(i,n.value)):yv(r,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,o)}}),fc=$("$ZodNullable",(e,t)=>{W.init(e,t),se(e._zod,"optin",()=>t.innerType._zod.optin),se(e._zod,"optout",()=>t.innerType._zod.optout),se(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${ri(n.source)}|null)$`):void 0}),se(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o)}),pc=$("$ZodDefault",(e,t)=>{W.init(e,t),e._zod.optin="optional",se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>bv(i,t)):bv(r,t)}});function bv(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var mc=$("$ZodPrefault",(e,t)=>{W.init(e,t),e._zod.optin="optional",se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o))}),hc=$("$ZodNonOptional",(e,t)=>{W.init(e,t),se(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>$v(i,e)):$v(r,e)}});function $v(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var gc=$("$ZodSuccess",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new gr("ZodSuccess");let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),vc=$("$ZodCatch",(e,t)=>{W.init(e,t),se(e._zod,"optin",()=>t.innerType._zod.optin),se(e._zod,"optout",()=>t.innerType._zod.optout),se(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(a=>ft(a,o,Ee()))},input:n.value}),n.issues=[]),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>ft(i,o,Ee()))},input:n.value}),n.issues=[]),n)}}),_c=$("$ZodNaN",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),yc=$("$ZodPipe",(e,t)=>{W.init(e,t),se(e._zod,"values",()=>t.in._zod.values),se(e._zod,"optin",()=>t.in._zod.optin),se(e._zod,"optout",()=>t.out._zod.optout),se(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(a=>gs(a,t.in,o)):gs(i,t.in,o)}let r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>gs(i,t.out,o)):gs(r,t.out,o)}});function gs(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Fn=$("$ZodCodec",(e,t)=>{W.init(e,t),se(e._zod,"values",()=>t.in._zod.values),se(e._zod,"optin",()=>t.in._zod.optin),se(e._zod,"optout",()=>t.out._zod.optout),se(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(n,o);return i instanceof Promise?i.then(a=>vs(a,t,o)):vs(i,t,o)}else{let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(a=>vs(a,t,o)):vs(i,t,o)}}});function vs(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(i=>_s(e,i,t.out,n)):_s(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(i=>_s(e,i,t.in,n)):_s(e,r,t.in,n)}}function _s(e,t,n,o){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},o)}var bc=$("$ZodReadonly",(e,t)=>{W.init(e,t),se(e._zod,"propValues",()=>t.innerType._zod.propValues),se(e._zod,"values",()=>t.innerType._zod.values),se(e._zod,"optin",()=>t.innerType._zod.optin),se(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(xv):xv(r)}});function xv(e){return e.value=Object.freeze(e.value),e}var $c=$("$ZodTemplateLiteral",(e,t)=>{W.init(e,t);let n=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let r=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(i,a))}else if(o===null||Ad.has(typeof o))n.push(Ut(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,r)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"template_literal",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),xc=$("$ZodFunction",(e,t)=>(W.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...o){let r=e._def.input?Jr(e._def.input,o):o,i=Reflect.apply(n,this,r);return e._def.output?Jr(e._def.output,i):i}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let r=e._def.input?await Gr(e._def.input,o):o,i=await Reflect.apply(n,this,r);return e._def.output?await Gr(e._def.output,i):i}},e._zod.parse=(n,o)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let o=e.constructor;return Array.isArray(n[0])?new o({type:"function",input:new pi({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new o({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:n})},e)),wc=$("$ZodPromise",(e,t)=>{W.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},o))}),kc=$("$ZodLazy",(e,t)=>{W.init(e,t),se(e._zod,"innerType",()=>t.getter()),se(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),se(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),se(e._zod,"optin",()=>e._zod.innerType._zod.optin??void 0),se(e._zod,"optout",()=>e._zod.innerType._zod.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),Sc=$("$ZodCustom",(e,t)=>{$e.init(e,t),W.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(i=>wv(i,n,o,e));wv(r,n,o,e)}});function wv(e,t,n,o){if(!e){let r={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(r.params=o._zod.def.params),t.issues.push(An(r))}}var Bn={};Fr(Bn,{ar:()=>Ev,az:()=>Tv,be:()=>Ov,ca:()=>jv,cs:()=>Nv,da:()=>Rv,de:()=>Av,en:()=>zc,eo:()=>Dv,es:()=>Cv,fa:()=>Uv,fi:()=>Zv,fr:()=>Mv,frCA:()=>Lv,he:()=>qv,hu:()=>Vv,id:()=>Fv,is:()=>Bv,it:()=>Kv,ja:()=>Hv,ka:()=>Jv,kh:()=>Gv,km:()=>Ic,ko:()=>Wv,lt:()=>Yv,mk:()=>Qv,ms:()=>e_,nl:()=>t_,no:()=>r_,ota:()=>n_,pl:()=>i_,ps:()=>o_,pt:()=>a_,ru:()=>c_,sl:()=>u_,sv:()=>l_,ta:()=>d_,th:()=>f_,tr:()=>p_,ua:()=>m_,uk:()=>Ec,ur:()=>h_,vi:()=>g_,yo:()=>y_,zhCN:()=>v_,zhTW:()=>__});var bz=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"};return r=>{switch(r.code){case"invalid_type":return`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${j(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${o[i.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${S(r.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Ev(){return{localeError:bz()}}var $z=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${r.expected}, daxil olan ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${j(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${o[i.format]??r.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${S(r.keys,", ")}`;case"invalid_key":return`${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Tv(){return{localeError:$z()}}function Pv(e,t,n,o){let r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?n:o}var xz=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u043B\u0456\u043A";case"object":{if(Array.isArray(r))return"\u043C\u0430\u0441\u0456\u045E";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"};return r=>{switch(r.code){case"invalid_type":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${j(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=Pv(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${r.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=Pv(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${r.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${o[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${S(r.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Ov(){return{localeError:xz()}}var wz=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return r=>{switch(r.code){case"invalid_type":return`Tipus inv\xE0lid: s'esperava ${r.expected}, s'ha rebut ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${j(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${S(r.values," o ")}`;case"too_big":{let i=r.inclusive?"com a m\xE0xim":"menys de",a=t(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${i} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${i} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${o[i.format]??r.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case"unrecognized_keys":return`Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${S(r.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${r.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${r.origin}`;default:return"Entrada inv\xE0lida"}}};function jv(){return{localeError:wz()}}var kz=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u010D\xEDslo";case"string":return"\u0159et\u011Bzec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(r))return"pole";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"};return r=>{switch(r.code){case"invalid_type":return`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${r.expected}, obdr\u017Eeno ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${j(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${o[i.format]??r.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${S(r.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${r.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${r.origin}`;default:return"Neplatn\xFD vstup"}}};function Nv(){return{localeError:kz()}}var Sz=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};function n(a){return e[a]??null}function o(a){return t[a]??a}let r=a=>{let s=typeof a;switch(s){case"number":return Number.isNaN(a)?"NaN":"tal";case"object":return Array.isArray(a)?"liste":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype&&a.constructor?a.constructor.name:"objekt"}return s},i={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return a=>{switch(a.code){case"invalid_type":return`Ugyldigt input: forventede ${o(a.expected)}, fik ${o(r(a.input))}`;case"invalid_value":return a.values.length===1?`Ugyldig v\xE6rdi: forventede ${j(a.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${S(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",c=n(a.origin),l=o(a.origin);return c?`For stor: forventede ${l??"value"} ${c.verb} ${s} ${a.maximum.toString()} ${c.unit??"elementer"}`:`For stor: forventede ${l??"value"} havde ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",c=n(a.origin),l=o(a.origin);return c?`For lille: forventede ${l} ${c.verb} ${s} ${a.minimum.toString()} ${c.unit}`:`For lille: forventede ${l} havde ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Ugyldig streng: skal starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: skal ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: skal indeholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${s.pattern}`:`Ugyldig ${i[s.format]??a.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${a.divisor}`;case"unrecognized_keys":return`${a.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${S(a.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${a.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${a.origin}`;default:return"Ugyldigt input"}}};function Rv(){return{localeError:Sz()}}var zz=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"Zahl";case"object":{if(Array.isArray(r))return"Array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return r=>{switch(r.code){case"invalid_type":return`Ung\xFCltige Eingabe: erwartet ${r.expected}, erhalten ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${j(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ist`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ist`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${o[i.format]??r.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case"unrecognized_keys":return`${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${S(r.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${r.origin}`;default:return"Ung\xFCltige Eingabe"}}};function Av(){return{localeError:zz()}}var Iz=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Ez=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(o){return e[o]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Invalid input: expected ${o.expected}, received ${Iz(o.input)}`;case"invalid_value":return o.values.length===1?`Invalid input: expected ${j(o.values[0])}`:`Invalid option: expected one of ${S(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",i=t(o.origin);return i?`Too big: expected ${o.origin??"value"} to have ${r}${o.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",i=t(o.origin);return i?`Too small: expected ${o.origin} to have ${r}${o.minimum.toString()} ${i.unit}`:`Too small: expected ${o.origin} to be ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Invalid string: must start with "${r.prefix}"`:r.format==="ends_with"?`Invalid string: must end with "${r.suffix}"`:r.format==="includes"?`Invalid string: must include "${r.includes}"`:r.format==="regex"?`Invalid string: must match pattern ${r.pattern}`:`Invalid ${n[r.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${S(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function zc(){return{localeError:Ez()}}var Tz=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Pz=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return o=>{switch(o.code){case"invalid_type":return`Nevalida enigo: atendi\u011Dis ${o.expected}, ricevi\u011Dis ${Tz(o.input)}`;case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${j(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${S(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",i=t(o.origin);return i?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${r}${o.maximum.toString()} ${i.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",i=t(o.origin);return i?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${r}${o.minimum.toString()} ${i.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${r.prefix}"`:r.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${r.suffix}"`:r.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${r.includes}"`:r.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${r.pattern}`:`Nevalida ${n[r.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${S(o.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}};function Dv(){return{localeError:Pz()}}var Oz=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};function n(a){return e[a]??null}function o(a){return t[a]??a}let r=a=>{let s=typeof a;switch(s){case"number":return Number.isNaN(a)?"NaN":"number";case"object":return Array.isArray(a)?"array":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype?a.constructor.name:"object"}return s},i={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return a=>{switch(a.code){case"invalid_type":return`Entrada inv\xE1lida: se esperaba ${o(a.expected)}, recibido ${o(r(a.input))}`;case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: se esperaba ${j(a.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${S(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",c=n(a.origin),l=o(a.origin);return c?`Demasiado grande: se esperaba que ${l??"valor"} tuviera ${s}${a.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${l??"valor"} fuera ${s}${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",c=n(a.origin),l=o(a.origin);return c?`Demasiado peque\xF1o: se esperaba que ${l} tuviera ${s}${a.minimum.toString()} ${c.unit}`:`Demasiado peque\xF1o: se esperaba que ${l} fuera ${s}${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${s.prefix}"`:s.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${s.suffix}"`:s.format==="includes"?`Cadena inv\xE1lida: debe incluir "${s.includes}"`:s.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${s.pattern}`:`Inv\xE1lido ${i[s.format]??a.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":return`Llave${a.keys.length>1?"s":""} desconocida${a.keys.length>1?"s":""}: ${S(a.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o(a.origin)}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o(a.origin)}`;default:return"Entrada inv\xE1lida"}}};function Cv(){return{localeError:Oz()}}var jz=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(r))return"\u0622\u0631\u0627\u06CC\u0647";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"};return r=>{switch(r.code){case"invalid_type":return`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${n(r.input)} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`;case"invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${j(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${S(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${o[i.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${S(r.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Uv(){return{localeError:jz()}}var Nz=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return r=>{switch(r.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${r.expected}, oli ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${j(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${o[i.format]??r.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case"unrecognized_keys":return`${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${S(r.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function Zv(){return{localeError:Nz()}}var Rz=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"nombre";case"object":{if(Array.isArray(r))return"tableau";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return r=>{switch(r.code){case"invalid_type":return`Entr\xE9e invalide : ${r.expected} attendu, ${n(r.input)} re\xE7u`;case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${j(r.values[0])} attendu`:`Option invalide : une valeur parmi ${S(r.values,"|")} attendue`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${r.origin??"valeur"} doit ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${r.origin??"valeur"} doit \xEAtre ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${r.origin} doit ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${r.origin} doit \xEAtre ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${o[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${S(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function Mv(){return{localeError:Rz()}}var Az=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"};return r=>{switch(r.code){case"invalid_type":return`Entr\xE9e invalide : attendu ${r.expected}, re\xE7u ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${j(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${i}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${i}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${o[i.format]??r.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case"unrecognized_keys":return`Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${S(r.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${r.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${r.origin}`;default:return"Entr\xE9e invalide"}}};function Lv(){return{localeError:Az()}}var Dz=()=>{let e={string:{unit:"\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",verb:"\u05DC\u05DB\u05DC\u05D5\u05DC"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u05E7\u05DC\u05D8",email:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",url:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",emoji:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",date:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",time:"\u05D6\u05DE\u05DF ISO",duration:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",ipv4:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",ipv6:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",cidrv4:"\u05D8\u05D5\u05D5\u05D7 IPv4",cidrv6:"\u05D8\u05D5\u05D5\u05D7 IPv6",base64:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",base64url:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",json_string:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",e164:"\u05DE\u05E1\u05E4\u05E8 E.164",jwt:"JWT",template_literal:"\u05E7\u05DC\u05D8"};return r=>{switch(r.code){case"invalid_type":return`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${r.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA ${j(r.values[0])}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05D0\u05D7\u05EA \u05DE\u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${r.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${r.maximum.toString()} ${a.unit??"elements"}`:`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${r.origin??"value"} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${r.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${r.minimum.toString()} ${a.unit}`:`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${r.origin} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1"${i.prefix}"`:i.format==="ends_with"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${i.suffix}"`:i.format==="includes"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${i.includes}"`:i.format==="regex"?`\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4: \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${i.pattern}`:`${o[i.format]??r.format} \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${r.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${r.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${r.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${S(r.keys,", ")}`;case"invalid_key":return`\u05DE\u05E4\u05EA\u05D7 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r.origin}`;case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r.origin}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function qv(){return{localeError:Dz()}}var Cz=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"sz\xE1m";case"object":{if(Array.isArray(r))return"t\xF6mb";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"};return r=>{switch(r.code){case"invalid_type":return`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${r.expected}, a kapott \xE9rt\xE9k ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${j(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${i}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${o[i.format]??r.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${r.keys.length>1?"s":""}: ${S(r.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${r.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Vv(){return{localeError:Cz()}}var Uz=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Input tidak valid: diharapkan ${r.expected}, diterima ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${j(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${i}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${i}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${o[i.format]??r.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${S(r.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${r.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${r.origin}`;default:return"Input tidak valid"}}};function Fv(){return{localeError:Uz()}}var Zz=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"n\xFAmer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Mz=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"};return o=>{switch(o.code){case"invalid_type":return`Rangt gildi: \xDE\xFA sl\xF3st inn ${Zz(o.input)} \xFEar sem \xE1 a\xF0 vera ${o.expected}`;case"invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${j(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${S(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",i=t(o.origin);return i?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${r}${o.maximum.toString()} ${i.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",i=t(o.origin);return i?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${r}${o.minimum.toString()} ${i.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${r.prefix}"`:r.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${r.suffix}"`:r.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${r.includes}"`:r.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${r.pattern}`:`Rangt ${n[r.format]??o.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${S(o.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${o.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${o.origin}`;default:return"Rangt gildi"}}};function Bv(){return{localeError:Mz()}}var Lz=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"numero";case"object":{if(Array.isArray(r))return"vettore";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Input non valido: atteso ${r.expected}, ricevuto ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Input non valido: atteso ${j(r.values[0])}`:`Opzione non valida: atteso uno tra ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${i}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${i}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Invalid ${o[i.format]??r.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${r.divisor}`;case"unrecognized_keys":return`Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${S(r.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${r.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${r.origin}`;default:return"Input non valido"}}};function Kv(){return{localeError:Lz()}}var qz=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u6570\u5024";case"object":{if(Array.isArray(r))return"\u914D\u5217";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"};return r=>{switch(r.code){case"invalid_type":return`\u7121\u52B9\u306A\u5165\u529B: ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${n(r.input)}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`;case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${j(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${S(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${o[i.format]??r.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${S(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Hv(){return{localeError:qz()}}var Vz=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8";case"object":{if(Array.isArray(e))return"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return{string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0"}[t]??t},Fz=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",json_string:"JSON \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"};return o=>{switch(o.code){case"invalid_type":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${Vz(o.input)}`;case"invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${j(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${S(o.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let r=o.inclusive?"<=":"<",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${i.verb} ${r}${o.maximum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",i=t(o.origin);return i?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${i.verb} ${r}${o.minimum.toString()} ${i.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${r.prefix}"-\u10D8\u10D7`:r.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${r.suffix}"-\u10D8\u10D7`:r.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${r.includes}"-\u10E1`:r.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${r.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[r.format]??o.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${S(o.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Jv(){return{localeError:Fz()}}var Bz=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"\u1798\u17B7\u1793\u1798\u17C2\u1793\u1787\u17B6\u179B\u17C1\u1781 (NaN)":"\u179B\u17C1\u1781";case"object":{if(Array.isArray(r))return"\u17A2\u17B6\u179A\u17C1 (Array)";if(r===null)return"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"};return r=>{switch(r.code){case"invalid_type":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${j(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${o[i.format]??r.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${S(r.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Ic(){return{localeError:Bz()}}function Gv(){return Ic()}var Kz=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"};return r=>{switch(r.code){case"invalid_type":return`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${n(r.input)}\uC785\uB2C8\uB2E4`;case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${j(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${S(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${c} ${i}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${i}${a}`}case"too_small":{let i=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${c} ${i}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${o[i.format]??r.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${S(r.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Wv(){return{localeError:Kz()}}var Hz=e=>hi(typeof e,e),hi=(e,t=void 0)=>{switch(e){case"number":return Number.isNaN(t)?"NaN":"skai\u010Dius";case"bigint":return"sveikasis skai\u010Dius";case"string":return"eilut\u0117";case"boolean":return"login\u0117 reik\u0161m\u0117";case"undefined":case"void":return"neapibr\u0117\u017Eta reik\u0161m\u0117";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return t===void 0?"ne\u017Einomas objektas":t===null?"nulin\u0117 reik\u0161m\u0117":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case"null":return"nulin\u0117 reik\u0161m\u0117"}return e},mi=e=>e.charAt(0).toUpperCase()+e.slice(1);function Xv(e){let t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19||n===0?"many":n===1?"one":"few"}var Jz=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,r,i,a){let s=e[o]??null;return s===null?s:{unit:s.unit[r],verb:s.verb[a][i?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"};return o=>{switch(o.code){case"invalid_type":return`Gautas tipas ${Hz(o.input)}, o tik\u0117tasi - ${hi(o.expected)}`;case"invalid_value":return o.values.length===1?`Privalo b\u016Bti ${j(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${S(o.values,"|")} pasirinkim\u0173`;case"too_big":{let r=hi(o.origin),i=t(o.origin,Xv(Number(o.maximum)),o.inclusive??!1,"smaller");if(i?.verb)return`${mi(r??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.maximum.toString()} ${i.unit??"element\u0173"}`;let a=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${mi(r??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${o.maximum.toString()} ${i?.unit}`}case"too_small":{let r=hi(o.origin),i=t(o.origin,Xv(Number(o.minimum)),o.inclusive??!1,"bigger");if(i?.verb)return`${mi(r??o.origin??"reik\u0161m\u0117")} ${i.verb} ${o.minimum.toString()} ${i.unit??"element\u0173"}`;let a=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${mi(r??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${o.minimum.toString()} ${i?.unit}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${r.prefix}"`:r.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${r.suffix}"`:r.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${r.includes}"`:r.format==="regex"?`Eilut\u0117 privalo atitikti ${r.pattern}`:`Neteisingas ${n[r.format]??o.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${S(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let r=hi(o.origin);return`${mi(r??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Yv(){return{localeError:Jz()}}var Gz=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u0431\u0440\u043E\u0458";case"object":{if(Array.isArray(r))return"\u043D\u0438\u0437\u0430";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"};return r=>{switch(r.code){case"invalid_type":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Invalid input: expected ${j(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${o[i.format]??r.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${S(r.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function Qv(){return{localeError:Gz()}}var Wz=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"nombor";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Input tidak sah: dijangka ${r.expected}, diterima ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${j(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${o[i.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${S(r.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${r.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${r.origin}`;default:return"Input tidak sah"}}};function e_(){return{localeError:Wz()}}var Xz=()=>{let e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"getal";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return r=>{switch(r.code){case"invalid_type":return`Ongeldige invoer: verwacht ${r.expected}, ontving ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${j(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Te lang: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} ${a.unit??"elementen"} bevat`:`Te lang: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} is`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Te kort: verwacht dat ${r.origin} ${i}${r.minimum.toString()} ${a.unit} bevat`:`Te kort: verwacht dat ${r.origin} ${i}${r.minimum.toString()} is`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${o[i.format]??r.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${r.keys.length>1?"s":""}: ${S(r.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${r.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${r.origin}`;default:return"Ongeldige invoer"}}};function t_(){return{localeError:Xz()}}var Yz=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"tall";case"object":{if(Array.isArray(r))return"liste";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Ugyldig input: forventet ${r.expected}, fikk ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${j(r.values[0])}`:`Ugyldig valg: forventet en av ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${o[i.format]??r.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${S(r.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${r.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${r.origin}`;default:return"Ugyldig input"}}};function r_(){return{localeError:Yz()}}var Qz=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"numara";case"object":{if(Array.isArray(r))return"saf";if(r===null)return"gayb";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"};return r=>{switch(r.code){case"invalid_type":return`F\xE2sit giren: umulan ${r.expected}, al\u0131nan ${n(r.input)}`;case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${j(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=r;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${o[i.format]??r.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${S(r.keys,", ")}`;case"invalid_key":return`${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function n_(){return{localeError:Qz()}}var eI=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u0639\u062F\u062F";case"object":{if(Array.isArray(r))return"\u0627\u0631\u06D0";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"};return r=>{switch(r.code){case"invalid_type":return`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${n(r.input)} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`;case"invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${j(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${S(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${o[i.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${S(r.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function o_(){return{localeError:eI()}}var tI=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"liczba";case"object":{if(Array.isArray(r))return"tablica";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"};return r=>{switch(r.code){case"invalid_type":return`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${r.expected}, otrzymano ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${j(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${o[i.format]??r.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${r.keys.length>1?"s":""}: ${S(r.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${r.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function i_(){return{localeError:tI()}}var rI=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"n\xFAmero";case"object":{if(Array.isArray(r))return"array";if(r===null)return"nulo";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"};return r=>{switch(r.code){case"invalid_type":return`Tipo inv\xE1lido: esperado ${r.expected}, recebido ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${j(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${i}${r.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Muito pequeno: esperado que ${r.origin} tivesse ${i}${r.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${o[i.format]??r.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case"unrecognized_keys":return`Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${S(r.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${r.origin}`;default:return"Campo inv\xE1lido"}}};function a_(){return{localeError:rI()}}function s_(e,t,n,o){let r=Math.abs(e),i=r%10,a=r%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?n:o}var nI=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(r))return"\u043C\u0430\u0441\u0441\u0438\u0432";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"};return r=>{switch(r.code){case"invalid_type":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${j(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=s_(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=s_(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${o[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${S(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function c_(){return{localeError:nI()}}var oI=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u0161tevilo";case"object":{if(Array.isArray(r))return"tabela";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"};return r=>{switch(r.code){case"invalid_type":return`Neveljaven vnos: pri\u010Dakovano ${r.expected}, prejeto ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${j(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${i}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${i}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${o[i.format]??r.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case"unrecognized_keys":return`Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${S(r.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${r.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${r.origin}`;default:return"Neveljaven vnos"}}};function u_(){return{localeError:oI()}}var iI=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"antal";case"object":{if(Array.isArray(r))return"lista";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return r=>{switch(r.code){case"invalid_type":return`Ogiltig inmatning: f\xF6rv\xE4ntat ${r.expected}, fick ${n(r.input)}`;case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${j(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${o[i.format]??r.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${S(r.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function l_(){return{localeError:iI()}}var aI=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"\u0B8E\u0BA3\u0BCD \u0B85\u0BB2\u0BCD\u0BB2\u0BBE\u0BA4\u0BA4\u0BC1":"\u0B8E\u0BA3\u0BCD";case"object":{if(Array.isArray(r))return"\u0B85\u0BA3\u0BBF";if(r===null)return"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${j(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${S(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${i}${r.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${i}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${o[i.format]??r.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${S(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function d_(){return{localeError:aI()}}var sI=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"\u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02 (NaN)":"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02";case"object":{if(Array.isArray(r))return"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)";if(r===null)return"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"};return r=>{switch(r.code){case"invalid_type":return`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${j(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${o[i.format]??r.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${S(r.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function f_(){return{localeError:sI()}}var cI=e=>{let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},uI=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"};return o=>{switch(o.code){case"invalid_type":return`Ge\xE7ersiz de\u011Fer: beklenen ${o.expected}, al\u0131nan ${cI(o.input)}`;case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${j(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${S(o.values,"|")}`;case"too_big":{let r=o.inclusive?"<=":"<",i=t(o.origin);return i?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${r}${o.maximum.toString()} ${i.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${r}${o.maximum.toString()}`}case"too_small":{let r=o.inclusive?">=":">",i=t(o.origin);return i?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${r}${o.minimum.toString()} ${i.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${r}${o.minimum.toString()}`}case"invalid_format":{let r=o;return r.format==="starts_with"?`Ge\xE7ersiz metin: "${r.prefix}" ile ba\u015Flamal\u0131`:r.format==="ends_with"?`Ge\xE7ersiz metin: "${r.suffix}" ile bitmeli`:r.format==="includes"?`Ge\xE7ersiz metin: "${r.includes}" i\xE7ermeli`:r.format==="regex"?`Ge\xE7ersiz metin: ${r.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[r.format]??o.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${S(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function p_(){return{localeError:uI()}}var lI=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u0447\u0438\u0441\u043B\u043E";case"object":{if(Array.isArray(r))return"\u043C\u0430\u0441\u0438\u0432";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"};return r=>{switch(r.code){case"invalid_type":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${j(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${o[i.format]??r.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${S(r.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Ec(){return{localeError:lI()}}function m_(){return Ec()}var dI=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"\u0646\u0645\u0628\u0631";case"object":{if(Array.isArray(r))return"\u0622\u0631\u06D2";if(r===null)return"\u0646\u0644";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"};return r=>{switch(r.code){case"invalid_type":return`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${n(r.input)} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`;case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${j(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${S(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${r.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${i}${r.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${i}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${o[i.format]??r.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${S(r.keys,"\u060C ")}`;case"invalid_key":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function h_(){return{localeError:dI()}}var fI=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"s\u1ED1";case"object":{if(Array.isArray(r))return"m\u1EA3ng";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"};return r=>{switch(r.code){case"invalid_type":return`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${j(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${o[i.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${S(r.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function g_(){return{localeError:fI()}}var pI=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"\u975E\u6570\u5B57(NaN)":"\u6570\u5B57";case"object":{if(Array.isArray(r))return"\u6570\u7EC4";if(r===null)return"\u7A7A\u503C(null)";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"};return r=>{switch(r.code){case"invalid_type":return`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${j(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${o[i.format]??r.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${S(r.keys,", ")}`;case"invalid_key":return`${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function v_(){return{localeError:pI()}}var mI=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"number";case"object":{if(Array.isArray(r))return"array";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"};return r=>{switch(r.code){case"invalid_type":return`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${r.expected}\uFF0C\u4F46\u6536\u5230 ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${j(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${o[i.format]??r.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${S(r.keys,"\u3001")}`;case"invalid_key":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function __(){return{localeError:mI()}}var hI=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n=r=>{let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"NaN":"n\u1ECD\u0301mb\xE0";case"object":{if(Array.isArray(r))return"akop\u1ECD";if(r===null)return"null";if(Object.getPrototypeOf(r)!==Object.prototype&&r.constructor)return r.constructor.name}}return i},o={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"};return r=>{switch(r.code){case"invalid_type":return`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${n(r.input)}`;case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${j(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${S(r.values,"|")}`;case"too_big":{let i=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${i}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.maximum}`}case"too_small":{let i=r.inclusive?">=":">",a=t(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${i}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.minimum}`}case"invalid_format":{let i=r;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${o[i.format]??r.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${S(r.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function y_(){return{localeError:hI()}}var Tc=Symbol("ZodOutput"),Pc=Symbol("ZodInput"),Kn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let o=n[0];if(this._map.set(t,o),o&&typeof o=="object"&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let o={...this.get(n)??{}};delete o.id;let r={...o,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function gi(){return new Kn}var Tt=gi();function Oc(e,t){return new e({type:"string",...N(t)})}function jc(e,t){return new e({type:"string",coerce:!0,...N(t)})}function vi(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...N(t)})}function Hn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...N(t)})}function _i(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...N(t)})}function yi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...N(t)})}function bi(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...N(t)})}function $i(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...N(t)})}function Jn(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...N(t)})}function xi(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...N(t)})}function wi(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...N(t)})}function ki(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...N(t)})}function Si(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...N(t)})}function zi(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...N(t)})}function Ii(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...N(t)})}function Ei(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...N(t)})}function Ti(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...N(t)})}function Pi(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...N(t)})}function Oi(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...N(t)})}function ji(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...N(t)})}function Ni(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...N(t)})}function Ri(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...N(t)})}function Ai(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...N(t)})}function Di(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...N(t)})}var Nc={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Rc(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...N(t)})}function Ac(e,t){return new e({type:"string",format:"date",check:"string_format",...N(t)})}function Dc(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...N(t)})}function Cc(e,t){return new e({type:"string",format:"duration",check:"string_format",...N(t)})}function Uc(e,t){return new e({type:"number",checks:[],...N(t)})}function Zc(e,t){return new e({type:"number",coerce:!0,checks:[],...N(t)})}function Mc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...N(t)})}function Lc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...N(t)})}function qc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...N(t)})}function Vc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...N(t)})}function Fc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...N(t)})}function Bc(e,t){return new e({type:"boolean",...N(t)})}function Kc(e,t){return new e({type:"boolean",coerce:!0,...N(t)})}function Hc(e,t){return new e({type:"bigint",...N(t)})}function Jc(e,t){return new e({type:"bigint",coerce:!0,...N(t)})}function Gc(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...N(t)})}function Wc(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...N(t)})}function Xc(e,t){return new e({type:"symbol",...N(t)})}function Yc(e,t){return new e({type:"undefined",...N(t)})}function Qc(e,t){return new e({type:"null",...N(t)})}function eu(e){return new e({type:"any"})}function tu(e){return new e({type:"unknown"})}function ru(e,t){return new e({type:"never",...N(t)})}function nu(e,t){return new e({type:"void",...N(t)})}function ou(e,t){return new e({type:"date",...N(t)})}function iu(e,t){return new e({type:"date",coerce:!0,...N(t)})}function au(e,t){return new e({type:"nan",...N(t)})}function Zt(e,t){return new ps({check:"less_than",...N(t),value:e,inclusive:!1})}function rt(e,t){return new ps({check:"less_than",...N(t),value:e,inclusive:!0})}function Mt(e,t){return new ms({check:"greater_than",...N(t),value:e,inclusive:!1})}function Ve(e,t){return new ms({check:"greater_than",...N(t),value:e,inclusive:!0})}function su(e){return Mt(0,e)}function cu(e){return Zt(0,e)}function uu(e){return rt(0,e)}function lu(e){return Ve(0,e)}function Sr(e,t){return new hf({check:"multiple_of",...N(t),value:e})}function Xr(e,t){return new _f({check:"max_size",...N(t),maximum:e})}function zr(e,t){return new yf({check:"min_size",...N(t),minimum:e})}function Gn(e,t){return new bf({check:"size_equals",...N(t),size:e})}function Yr(e,t){return new $f({check:"max_length",...N(t),maximum:e})}function tr(e,t){return new xf({check:"min_length",...N(t),minimum:e})}function Qr(e,t){return new wf({check:"length_equals",...N(t),length:e})}function Wn(e,t){return new kf({check:"string_format",format:"regex",...N(t),pattern:e})}function Xn(e){return new Sf({check:"string_format",format:"lowercase",...N(e)})}function Yn(e){return new zf({check:"string_format",format:"uppercase",...N(e)})}function Qn(e,t){return new If({check:"string_format",format:"includes",...N(t),includes:e})}function eo(e,t){return new Ef({check:"string_format",format:"starts_with",...N(t),prefix:e})}function to(e,t){return new Tf({check:"string_format",format:"ends_with",...N(t),suffix:e})}function du(e,t,n){return new Pf({check:"property",property:e,schema:t,...N(n)})}function ro(e,t){return new Of({check:"mime_type",mime:e,...N(t)})}function Lt(e){return new jf({check:"overwrite",tx:e})}function no(e){return Lt(t=>t.normalize(e))}function oo(){return Lt(e=>e.trim())}function io(){return Lt(e=>e.toLowerCase())}function ao(){return Lt(e=>e.toUpperCase())}function Cf(e,t,n){return new e({type:"array",element:t,...N(n)})}function gI(e,t,n){return new e({type:"union",options:t,...N(n)})}function vI(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...N(o)})}function _I(e,t,n){return new e({type:"intersection",left:t,right:n})}function yI(e,t,n,o){let r=n instanceof W,i=r?o:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...N(i)})}function bI(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...N(o)})}function $I(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...N(o)})}function xI(e,t,n){return new e({type:"set",valueType:t,...N(n)})}function wI(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:o,...N(n)})}function kI(e,t,n){return new e({type:"enum",entries:t,...N(n)})}function SI(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...N(n)})}function fu(e,t){return new e({type:"file",...N(t)})}function zI(e,t){return new e({type:"transform",transform:t})}function II(e,t){return new e({type:"optional",innerType:t})}function EI(e,t){return new e({type:"nullable",innerType:t})}function TI(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Rd(n)}})}function PI(e,t,n){return new e({type:"nonoptional",innerType:t,...N(n)})}function OI(e,t){return new e({type:"success",innerType:t})}function jI(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function NI(e,t,n){return new e({type:"pipe",in:t,out:n})}function RI(e,t){return new e({type:"readonly",innerType:t})}function AI(e,t,n){return new e({type:"template_literal",parts:t,...N(n)})}function DI(e,t){return new e({type:"lazy",getter:t})}function CI(e,t){return new e({type:"promise",innerType:t})}function pu(e,t,n){let o=N(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function mu(e,t,n){return new e({type:"custom",check:"custom",fn:t,...N(n)})}function hu(e){let t=b_(n=>(n.addIssue=o=>{if(typeof o=="string")n.issues.push(An(o,n.value,t._zod.def));else{let r=o;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=n.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),n.issues.push(An(r))}},e(n.value,n)));return t}function b_(e,t){let n=new $e({check:"custom",...N(t)});return n._zod.check=e,n}function gu(e,t){let n=N(t),o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(o=o.map(v=>typeof v=="string"?v.toLowerCase():v),r=r.map(v=>typeof v=="string"?v.toLowerCase():v));let i=new Set(o),a=new Set(r),s=e.Codec??Fn,c=e.Boolean??Vn,l=e.String??kr,d=new l({type:"string",error:n.error}),f=new c({type:"boolean",error:n.error}),_=new s({type:"pipe",in:d,out:f,transform:((v,g)=>{let b=v;return n.case!=="sensitive"&&(b=b.toLowerCase()),i.has(b)?!0:a.has(b)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:g.value,inst:_,continue:!1}),{})}),reverseTransform:((v,g)=>v===!0?o[0]||"true":r[0]||"false"),error:n.error});return _}function en(e,t,n,o={}){let r=N(o),i={...N(o),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(i.pattern=n),new e(i)}var Ci=class{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Tt,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,n={path:[],schemaPath:[]}){var o;let r=t._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},a=this.seen.get(t);if(a)return a.count++,n.schemaPath.includes(t)&&(a.cycle=n.path),a.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(t,s);let c=t._zod.toJSONSchema?.();if(c)s.schema=c;else{let f={...n,schemaPath:[...n.schemaPath,t],path:n.path},_=t._zod.parent;if(_)s.ref=_,this.process(_,f),this.seen.get(_).isParent=!0;else{let v=s.schema;switch(r.type){case"string":{let g=v;g.type="string";let{minimum:b,maximum:x,format:I,patterns:R,contentEncoding:P}=t._zod.bag;if(typeof b=="number"&&(g.minLength=b),typeof x=="number"&&(g.maxLength=x),I&&(g.format=i[I]??I,g.format===""&&delete g.format),P&&(g.contentEncoding=P),R&&R.size>0){let M=[...R];M.length===1?g.pattern=M[0].source:M.length>1&&(s.schema.allOf=[...M.map(V=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:V.source}))])}break}case"number":{let g=v,{minimum:b,maximum:x,format:I,multipleOf:R,exclusiveMaximum:P,exclusiveMinimum:M}=t._zod.bag;typeof I=="string"&&I.includes("int")?g.type="integer":g.type="number",typeof M=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(g.minimum=M,g.exclusiveMinimum=!0):g.exclusiveMinimum=M),typeof b=="number"&&(g.minimum=b,typeof M=="number"&&this.target!=="draft-4"&&(M>=b?delete g.minimum:delete g.exclusiveMinimum)),typeof P=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(g.maximum=P,g.exclusiveMaximum=!0):g.exclusiveMaximum=P),typeof x=="number"&&(g.maximum=x,typeof P=="number"&&this.target!=="draft-4"&&(P<=x?delete g.maximum:delete g.exclusiveMaximum)),typeof R=="number"&&(g.multipleOf=R);break}case"boolean":{let g=v;g.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{this.target==="openapi-3.0"?(v.type="string",v.nullable=!0,v.enum=[null]):v.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{v.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let g=v,{minimum:b,maximum:x}=t._zod.bag;typeof b=="number"&&(g.minItems=b),typeof x=="number"&&(g.maxItems=x),g.type="array",g.items=this.process(r.element,{...f,path:[...f.path,"items"]});break}case"object":{let g=v;g.type="object",g.properties={};let b=r.shape;for(let R in b)g.properties[R]=this.process(b[R],{...f,path:[...f.path,"properties",R]});let x=new Set(Object.keys(b)),I=new Set([...x].filter(R=>{let P=r.shape[R]._zod;return this.io==="input"?P.optin===void 0:P.optout===void 0}));I.size>0&&(g.required=Array.from(I)),r.catchall?._zod.def.type==="never"?g.additionalProperties=!1:r.catchall?r.catchall&&(g.additionalProperties=this.process(r.catchall,{...f,path:[...f.path,"additionalProperties"]})):this.io==="output"&&(g.additionalProperties=!1);break}case"union":{let g=v,b=r.options.map((x,I)=>this.process(x,{...f,path:[...f.path,"anyOf",I]}));g.anyOf=b;break}case"intersection":{let g=v,b=this.process(r.left,{...f,path:[...f.path,"allOf",0]}),x=this.process(r.right,{...f,path:[...f.path,"allOf",1]}),I=P=>"allOf"in P&&Object.keys(P).length===1,R=[...I(b)?b.allOf:[b],...I(x)?x.allOf:[x]];g.allOf=R;break}case"tuple":{let g=v;g.type="array";let b=this.target==="draft-2020-12"?"prefixItems":"items",x=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",I=r.items.map((V,Me)=>this.process(V,{...f,path:[...f.path,b,Me]})),R=r.rest?this.process(r.rest,{...f,path:[...f.path,x,...this.target==="openapi-3.0"?[r.items.length]:[]]}):null;this.target==="draft-2020-12"?(g.prefixItems=I,R&&(g.items=R)):this.target==="openapi-3.0"?(g.items={anyOf:I},R&&g.items.anyOf.push(R),g.minItems=I.length,R||(g.maxItems=I.length)):(g.items=I,R&&(g.additionalItems=R));let{minimum:P,maximum:M}=t._zod.bag;typeof P=="number"&&(g.minItems=P),typeof M=="number"&&(g.maxItems=M);break}case"record":{let g=v;g.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(g.propertyNames=this.process(r.keyType,{...f,path:[...f.path,"propertyNames"]})),g.additionalProperties=this.process(r.valueType,{...f,path:[...f.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let g=v,b=ti(r.entries);b.every(x=>typeof x=="number")&&(g.type="number"),b.every(x=>typeof x=="string")&&(g.type="string"),g.enum=b;break}case"literal":{let g=v,b=[];for(let x of r.values)if(x===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof x=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");b.push(Number(x))}else b.push(x);if(b.length!==0)if(b.length===1){let x=b[0];g.type=x===null?"null":typeof x,this.target==="draft-4"||this.target==="openapi-3.0"?g.enum=[x]:g.const=x}else b.every(x=>typeof x=="number")&&(g.type="number"),b.every(x=>typeof x=="string")&&(g.type="string"),b.every(x=>typeof x=="boolean")&&(g.type="string"),b.every(x=>x===null)&&(g.type="null"),g.enum=b;break}case"file":{let g=v,b={type:"string",format:"binary",contentEncoding:"binary"},{minimum:x,maximum:I,mime:R}=t._zod.bag;x!==void 0&&(b.minLength=x),I!==void 0&&(b.maxLength=I),R?R.length===1?(b.contentMediaType=R[0],Object.assign(g,b)):g.anyOf=R.map(P=>({...b,contentMediaType:P})):Object.assign(g,b);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let g=this.process(r.innerType,f);this.target==="openapi-3.0"?(s.ref=r.innerType,v.nullable=!0):v.anyOf=[g,{type:"null"}];break}case"nonoptional":{this.process(r.innerType,f),s.ref=r.innerType;break}case"success":{let g=v;g.type="boolean";break}case"default":{this.process(r.innerType,f),s.ref=r.innerType,v.default=JSON.parse(JSON.stringify(r.defaultValue));break}case"prefault":{this.process(r.innerType,f),s.ref=r.innerType,this.io==="input"&&(v._prefault=JSON.parse(JSON.stringify(r.defaultValue)));break}case"catch":{this.process(r.innerType,f),s.ref=r.innerType;let g;try{g=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}v.default=g;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let g=v,b=t._zod.pattern;if(!b)throw new Error("Pattern not found in template literal");g.type="string",g.pattern=b.source;break}case"pipe":{let g=this.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;this.process(g,f),s.ref=g;break}case"readonly":{this.process(r.innerType,f),s.ref=r.innerType,v.readOnly=!0;break}case"promise":{this.process(r.innerType,f),s.ref=r.innerType;break}case"optional":{this.process(r.innerType,f),s.ref=r.innerType;break}case"lazy":{let g=t._zod.innerType;this.process(g,f),s.ref=g;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}default:}}}let l=this.metadataRegistry.get(t);return l&&Object.assign(s.schema,l),this.io==="input"&&je(t)&&(delete s.schema.examples,delete s.schema.default),this.io==="input"&&s.schema._prefault&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,this.seen.get(t).schema}emit(t,n){let o={cycles:n?.cycles??"ref",reused:n?.reused??"inline",external:n?.external??void 0},r=this.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=d=>{let f=this.target==="draft-2020-12"?"$defs":"definitions";if(o.external){let b=o.external.registry.get(d[0])?.id,x=o.external.uri??(R=>R);if(b)return{ref:x(b)};let I=d[1].defId??d[1].schema.id??`schema${this.counter++}`;return d[1].defId=I,{defId:I,ref:`${x("__shared")}#/${f}/${I}`}}if(d[1]===r)return{ref:"#"};let v=`#/${f}/`,g=d[1].schema.id??`__schema${this.counter++}`;return{defId:g,ref:v+g}},a=d=>{if(d[1].schema.$ref)return;let f=d[1],{ref:_,defId:v}=i(d);f.def={...f.schema},v&&(f.defId=v);let g=f.schema;for(let b in g)delete g[b];g.$ref=_};if(o.cycles==="throw")for(let d of this.seen.entries()){let f=d[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/<root>
|
|
55
55
|
|
|
56
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let d of this.seen.entries()){let f=d[1];if(t===d[0]){a(d);continue}if(o.external){let v=o.external.registry.get(d[0])?.id;if(t!==d[0]&&v){a(d);continue}}if(this.metadataRegistry.get(d[0])?.id){a(d);continue}if(f.cycle){a(d);continue}if(f.count>1&&o.reused==="ref"){a(d);continue}}let s=(d,f)=>{let y=this.seen.get(d),v=y.def??y.schema,g={...v};if(y.ref===null)return;let b=y.ref;if(y.ref=null,b){s(b,f);let x=this.seen.get(b).schema;x.$ref&&(f.target==="draft-7"||f.target==="draft-4"||f.target==="openapi-3.0")?(v.allOf=v.allOf??[],v.allOf.push(x)):(Object.assign(v,x),Object.assign(v,g))}y.isParent||this.override({zodSchema:d,jsonSchema:v,path:y.path??[]})};for(let d of[...this.seen.entries()].reverse())s(d[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?c.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),o.external?.uri){let d=o.external.registry.get(t)?.id;if(!d)throw new Error("Schema is missing an `id` property");c.$id=o.external.uri(d)}Object.assign(c,r.def);let l=o.external?.defs??{};for(let d of this.seen.entries()){let f=d[1];f.def&&f.defId&&(l[f.defId]=f.def)}o.external||Object.keys(l).length>0&&(this.target==="draft-2020-12"?c.$defs=l:c.definitions=l);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}};function io(e,t){if(e instanceof Fn){let o=new Ai(t),r={};for(let s of e._idmap.entries()){let[c,l]=s;o.process(l)}let i={},a={registry:e,uri:t?.uri,defs:r};for(let s of e._idmap.entries()){let[c,l]=s;i[c]=o.emit(l,{...t,external:a})}if(Object.keys(r).length>0){let s=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[s]:r}}return{schemas:i}}let n=new Ai(t);return n.process(e),n.emit(e,t)}function Oe(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;switch(r.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Oe(r.element,n);case"object":{for(let i in r.shape)if(Oe(r.shape[i],n))return!0;return!1}case"union":{for(let i of r.options)if(Oe(i,n))return!0;return!1}case"intersection":return Oe(r.left,n)||Oe(r.right,n);case"tuple":{for(let i of r.items)if(Oe(i,n))return!0;return!!(r.rest&&Oe(r.rest,n))}case"record":return Oe(r.keyType,n)||Oe(r.valueType,n);case"map":return Oe(r.keyType,n)||Oe(r.valueType,n);case"set":return Oe(r.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Oe(r.innerType,n);case"lazy":return Oe(r.getter(),n);case"default":return Oe(r.innerType,n);case"prefault":return Oe(r.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return Oe(r.in,n)||Oe(r.out,n);case"success":return!1;case"catch":return!1;case"function":return!1;default:}throw new Error(`Unknown schema type: ${r.type}`)}var h_={};var EI=$("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");W.init(e,t),e.def=t,e.type=t.type,e.parse=(n,o)=>Kr(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>br(e,n,o),e.parseAsync=async(n,o)=>Hr(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>$r(e,n,o),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),e.clone=(n,o)=>Ne(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e))});var TI=$("ZodMiniObject",(e,t)=>{Qs.init(e,t),EI.init(e,t),E.defineLazy(e,"shape",()=>t.shape)});function Nf(e,t){let n={type:"object",get shape(){return E.assignProp(this,"shape",{...e}),this.shape},...E.normalizeParams(t)};return new TI(n)}function gt(e){return!!e._zod}function Qr(e){let t=Object.values(e);if(t.length===0)return Nf({});let n=t.every(gt),o=t.every(r=>!gt(r));if(n)return Nf(e);if(o)return qg(e);throw new Error("Mixed Zod versions detected in object shape.")}function Sr(e,t){return gt(e)?br(e,t):e.safeParse(t)}async function hu(e,t){return gt(e)?await $r(e,t):await e.safeParseAsync(t)}function zr(e){if(!e)return;let t;if(gt(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function ao(e){if(e){if(typeof e=="object"){let t=e,n=e;if(!t._def&&!n._zod){let o=Object.values(e);if(o.length>0&&o.every(r=>typeof r=="object"&&r!==null&&(r._def!==void 0||r._zod!==void 0||typeof r.parse=="function")))return Qr(e)}}if(gt(e)){let n=e._zod?.def;if(n&&(n.type==="object"||n.shape!==void 0))return e}else if(e.shape!==void 0)return e}}function gu(e){if(e&&typeof e=="object"){if("message"in e&&typeof e.message=="string")return e.message;if("issues"in e&&Array.isArray(e.issues)&&e.issues.length>0){let t=e.issues[0];if(t&&typeof t=="object"&&"message"in t)return String(t.message)}try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function __(e){return e.description}function y_(e){if(gt(e))return e._zod?.def?.type==="optional";let t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function vu(e){if(gt(e)){let i=e._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.values[0]}}let n=e._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}let o=e.value;if(o!==void 0)return o}var tr={};qr(tr,{$brand:()=>Xo,$input:()=>Ec,$output:()=>Ic,NEVER:()=>Xa,TimePrecision:()=>jc,ZodAny:()=>S_,ZodArray:()=>T_,ZodBase64:()=>lp,ZodBase64URL:()=>dp,ZodBigInt:()=>Li,ZodBigIntFormat:()=>mp,ZodBoolean:()=>Mi,ZodCIDRv4:()=>cp,ZodCIDRv6:()=>up,ZodCUID:()=>tp,ZodCUID2:()=>rp,ZodCatch:()=>K_,ZodCodec:()=>$p,ZodCustom:()=>Tu,ZodCustomStringFormat:()=>Zi,ZodDate:()=>zu,ZodDefault:()=>M_,ZodDiscriminatedUnion:()=>P_,ZodE164:()=>fp,ZodEmail:()=>Yf,ZodEmoji:()=>Qf,ZodEnum:()=>Di,ZodError:()=>RI,ZodFile:()=>C_,ZodFirstPartyTypeKind:()=>wp,ZodFunction:()=>ty,ZodGUID:()=>xu,ZodIPv4:()=>ap,ZodIPv6:()=>sp,ZodISODate:()=>yu,ZodISODateTime:()=>_u,ZodISODuration:()=>$u,ZodISOTime:()=>bu,ZodIntersection:()=>j_,ZodIssueCode:()=>UE,ZodJWT:()=>pp,ZodKSUID:()=>ip,ZodLazy:()=>Y_,ZodLiteral:()=>D_,ZodMap:()=>R_,ZodNaN:()=>J_,ZodNanoID:()=>ep,ZodNever:()=>I_,ZodNonOptional:()=>yp,ZodNull:()=>k_,ZodNullable:()=>U_,ZodNumber:()=>Ui,ZodNumberFormat:()=>co,ZodObject:()=>Iu,ZodOptional:()=>Fi,ZodPipe:()=>bp,ZodPrefault:()=>q_,ZodPromise:()=>ey,ZodReadonly:()=>G_,ZodRealError:()=>rt,ZodRecord:()=>vp,ZodSet:()=>A_,ZodString:()=>Ci,ZodStringFormat:()=>xe,ZodSuccess:()=>B_,ZodSymbol:()=>x_,ZodTemplateLiteral:()=>X_,ZodTransform:()=>Z_,ZodTuple:()=>O_,ZodType:()=>te,ZodULID:()=>np,ZodURL:()=>Su,ZodUUID:()=>er,ZodUndefined:()=>w_,ZodUnion:()=>gp,ZodUnknown:()=>z_,ZodVoid:()=>E_,ZodXID:()=>op,_ZodString:()=>Xf,_default:()=>L_,_function:()=>RE,any:()=>_E,array:()=>ie,base64:()=>tE,base64url:()=>rE,bigint:()=>pE,boolean:()=>Pe,catch:()=>H_,check:()=>AE,cidrv4:()=>QI,cidrv6:()=>eE,clone:()=>Ne,codec:()=>jE,coerce:()=>kp,config:()=>Ee,core:()=>ft,cuid:()=>KI,cuid2:()=>HI,custom:()=>xp,date:()=>bE,decode:()=>Vf,decodeAsync:()=>Bf,discriminatedUnion:()=>Eu,e164:()=>nE,email:()=>DI,emoji:()=>FI,encode:()=>qf,encodeAsync:()=>Ff,endsWith:()=>Qn,enum:()=>Be,file:()=>IE,flattenError:()=>Rn,float32:()=>uE,float64:()=>lE,formatError:()=>An,function:()=>RE,getErrorMap:()=>LE,globalRegistry:()=>Et,gt:()=>Ut,gte:()=>Ve,guid:()=>CI,hash:()=>cE,hex:()=>sE,hostname:()=>aE,httpUrl:()=>VI,includes:()=>Xn,instanceof:()=>DE,int:()=>Wf,int32:()=>dE,int64:()=>mE,intersection:()=>Vi,ipv4:()=>XI,ipv6:()=>YI,iso:()=>so,json:()=>ZE,jwt:()=>oE,keyof:()=>$E,ksuid:()=>WI,lazy:()=>Q_,length:()=>Xr,literal:()=>B,locales:()=>Vn,looseObject:()=>Fe,lowercase:()=>Gn,lt:()=>Zt,lte:()=>tt,map:()=>kE,maxLength:()=>Wr,maxSize:()=>Gr,mime:()=>eo,minLength:()=>Qt,minSize:()=>kr,multipleOf:()=>wr,nan:()=>PE,nanoid:()=>BI,nativeEnum:()=>zE,negative:()=>au,never:()=>hp,nonnegative:()=>cu,nonoptional:()=>F_,nonpositive:()=>su,normalize:()=>to,null:()=>qi,nullable:()=>wu,nullish:()=>EE,number:()=>he,object:()=>U,optional:()=>ke,overwrite:()=>Mt,parse:()=>Zf,parseAsync:()=>Uf,partialRecord:()=>wE,pipe:()=>ku,positive:()=>iu,prefault:()=>V_,preprocess:()=>Pu,prettifyError:()=>ts,promise:()=>NE,property:()=>uu,readonly:()=>W_,record:()=>we,refine:()=>ry,regex:()=>Jn,regexes:()=>et,registry:()=>mi,safeDecode:()=>Hf,safeDecodeAsync:()=>Gf,safeEncode:()=>Kf,safeEncodeAsync:()=>Jf,safeParse:()=>Mf,safeParseAsync:()=>Lf,set:()=>SE,setErrorMap:()=>ME,size:()=>Hn,startsWith:()=>Yn,strictObject:()=>xE,string:()=>k,stringFormat:()=>iE,stringbool:()=>CE,success:()=>TE,superRefine:()=>ny,symbol:()=>gE,templateLiteral:()=>OE,toJSONSchema:()=>io,toLowerCase:()=>no,toUpperCase:()=>oo,transform:()=>_p,treeifyError:()=>es,trim:()=>ro,tuple:()=>N_,uint32:()=>fE,uint64:()=>hE,ulid:()=>JI,undefined:()=>vE,union:()=>ve,unknown:()=>ye,uppercase:()=>Wn,url:()=>qI,util:()=>E,uuid:()=>ZI,uuidv4:()=>UI,uuidv6:()=>MI,uuidv7:()=>LI,void:()=>yE,xid:()=>GI});var so={};qr(so,{ZodISODate:()=>yu,ZodISODateTime:()=>_u,ZodISODuration:()=>$u,ZodISOTime:()=>bu,date:()=>Af,datetime:()=>Rf,duration:()=>Cf,time:()=>Df});var _u=$("ZodISODateTime",(e,t)=>{Ts.init(e,t),xe.init(e,t)});function Rf(e){return Oc(_u,e)}var yu=$("ZodISODate",(e,t)=>{Ps.init(e,t),xe.init(e,t)});function Af(e){return Nc(yu,e)}var bu=$("ZodISOTime",(e,t)=>{js.init(e,t),xe.init(e,t)});function Df(e){return Rc(bu,e)}var $u=$("ZodISODuration",(e,t)=>{Os.init(e,t),xe.init(e,t)});function Cf(e){return Ac($u,e)}var $_=(e,t)=>{oi.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>An(e,n)},flatten:{value:n=>Rn(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,jn,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,jn,2)}},isEmpty:{get(){return e.issues.length===0}}})},RI=$("ZodError",$_),rt=$("ZodError",$_,{Parent:Error});var Zf=Dn(rt),Uf=Cn(rt),Mf=Zn(rt),Lf=Un(rt),qf=rs(rt),Vf=ns(rt),Ff=os(rt),Bf=is(rt),Kf=as(rt),Hf=ss(rt),Jf=cs(rt),Gf=us(rt);var te=$("ZodType",(e,t)=>(W.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),e.clone=(n,o)=>Ne(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>Zf(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Mf(e,n,o),e.parseAsync=async(n,o)=>Uf(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Lf(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>qf(e,n,o),e.decode=(n,o)=>Vf(e,n,o),e.encodeAsync=async(n,o)=>Ff(e,n,o),e.decodeAsync=async(n,o)=>Bf(e,n,o),e.safeEncode=(n,o)=>Kf(e,n,o),e.safeDecode=(n,o)=>Hf(e,n,o),e.safeEncodeAsync=async(n,o)=>Jf(e,n,o),e.safeDecodeAsync=async(n,o)=>Gf(e,n,o),e.refine=(n,o)=>e.check(ry(n,o)),e.superRefine=n=>e.check(ny(n)),e.overwrite=n=>e.check(Mt(n)),e.optional=()=>ke(e),e.nullable=()=>wu(e),e.nullish=()=>ke(wu(e)),e.nonoptional=n=>F_(e,n),e.array=()=>ie(e),e.or=n=>ve([e,n]),e.and=n=>Vi(e,n),e.transform=n=>ku(e,_p(n)),e.default=n=>L_(e,n),e.prefault=n=>V_(e,n),e.catch=n=>H_(e,n),e.pipe=n=>ku(e,n),e.readonly=()=>W_(e),e.describe=n=>{let o=e.clone();return Et.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return Et.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Et.get(e);let o=e.clone();return Et.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Xf=$("_ZodString",(e,t)=>{xr.init(e,t),te.init(e,t);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...o)=>e.check(Jn(...o)),e.includes=(...o)=>e.check(Xn(...o)),e.startsWith=(...o)=>e.check(Yn(...o)),e.endsWith=(...o)=>e.check(Qn(...o)),e.min=(...o)=>e.check(Qt(...o)),e.max=(...o)=>e.check(Wr(...o)),e.length=(...o)=>e.check(Xr(...o)),e.nonempty=(...o)=>e.check(Qt(1,...o)),e.lowercase=o=>e.check(Gn(o)),e.uppercase=o=>e.check(Wn(o)),e.trim=()=>e.check(ro()),e.normalize=(...o)=>e.check(to(...o)),e.toLowerCase=()=>e.check(no()),e.toUpperCase=()=>e.check(oo())}),Ci=$("ZodString",(e,t)=>{xr.init(e,t),Xf.init(e,t),e.email=n=>e.check(hi(Yf,n)),e.url=n=>e.check(Kn(Su,n)),e.jwt=n=>e.check(Ri(pp,n)),e.emoji=n=>e.check(bi(Qf,n)),e.guid=n=>e.check(Bn(xu,n)),e.uuid=n=>e.check(gi(er,n)),e.uuidv4=n=>e.check(vi(er,n)),e.uuidv6=n=>e.check(_i(er,n)),e.uuidv7=n=>e.check(yi(er,n)),e.nanoid=n=>e.check($i(ep,n)),e.guid=n=>e.check(Bn(xu,n)),e.cuid=n=>e.check(xi(tp,n)),e.cuid2=n=>e.check(wi(rp,n)),e.ulid=n=>e.check(ki(np,n)),e.base64=n=>e.check(ji(lp,n)),e.base64url=n=>e.check(Oi(dp,n)),e.xid=n=>e.check(Si(op,n)),e.ksuid=n=>e.check(zi(ip,n)),e.ipv4=n=>e.check(Ii(ap,n)),e.ipv6=n=>e.check(Ei(sp,n)),e.cidrv4=n=>e.check(Ti(cp,n)),e.cidrv6=n=>e.check(Pi(up,n)),e.e164=n=>e.check(Ni(fp,n)),e.datetime=n=>e.check(Rf(n)),e.date=n=>e.check(Af(n)),e.time=n=>e.check(Df(n)),e.duration=n=>e.check(Cf(n))});function k(e){return Tc(Ci,e)}var xe=$("ZodStringFormat",(e,t)=>{ge.init(e,t),Xf.init(e,t)}),Yf=$("ZodEmail",(e,t)=>{bs.init(e,t),xe.init(e,t)});function DI(e){return hi(Yf,e)}var xu=$("ZodGUID",(e,t)=>{_s.init(e,t),xe.init(e,t)});function CI(e){return Bn(xu,e)}var er=$("ZodUUID",(e,t)=>{ys.init(e,t),xe.init(e,t)});function ZI(e){return gi(er,e)}function UI(e){return vi(er,e)}function MI(e){return _i(er,e)}function LI(e){return yi(er,e)}var Su=$("ZodURL",(e,t)=>{$s.init(e,t),xe.init(e,t)});function qI(e){return Kn(Su,e)}function VI(e){return Kn(Su,{protocol:/^https?$/,hostname:et.domain,...E.normalizeParams(e)})}var Qf=$("ZodEmoji",(e,t)=>{xs.init(e,t),xe.init(e,t)});function FI(e){return bi(Qf,e)}var ep=$("ZodNanoID",(e,t)=>{ws.init(e,t),xe.init(e,t)});function BI(e){return $i(ep,e)}var tp=$("ZodCUID",(e,t)=>{ks.init(e,t),xe.init(e,t)});function KI(e){return xi(tp,e)}var rp=$("ZodCUID2",(e,t)=>{Ss.init(e,t),xe.init(e,t)});function HI(e){return wi(rp,e)}var np=$("ZodULID",(e,t)=>{zs.init(e,t),xe.init(e,t)});function JI(e){return ki(np,e)}var op=$("ZodXID",(e,t)=>{Is.init(e,t),xe.init(e,t)});function GI(e){return Si(op,e)}var ip=$("ZodKSUID",(e,t)=>{Es.init(e,t),xe.init(e,t)});function WI(e){return zi(ip,e)}var ap=$("ZodIPv4",(e,t)=>{Ns.init(e,t),xe.init(e,t)});function XI(e){return Ii(ap,e)}var sp=$("ZodIPv6",(e,t)=>{Rs.init(e,t),xe.init(e,t)});function YI(e){return Ei(sp,e)}var cp=$("ZodCIDRv4",(e,t)=>{As.init(e,t),xe.init(e,t)});function QI(e){return Ti(cp,e)}var up=$("ZodCIDRv6",(e,t)=>{Ds.init(e,t),xe.init(e,t)});function eE(e){return Pi(up,e)}var lp=$("ZodBase64",(e,t)=>{Cs.init(e,t),xe.init(e,t)});function tE(e){return ji(lp,e)}var dp=$("ZodBase64URL",(e,t)=>{Zs.init(e,t),xe.init(e,t)});function rE(e){return Oi(dp,e)}var fp=$("ZodE164",(e,t)=>{Us.init(e,t),xe.init(e,t)});function nE(e){return Ni(fp,e)}var pp=$("ZodJWT",(e,t)=>{Ms.init(e,t),xe.init(e,t)});function oE(e){return Ri(pp,e)}var Zi=$("ZodCustomStringFormat",(e,t)=>{Ls.init(e,t),xe.init(e,t)});function iE(e,t,n={}){return Yr(Zi,e,t,n)}function aE(e){return Yr(Zi,"hostname",et.hostname,e)}function sE(e){return Yr(Zi,"hex",et.hex,e)}function cE(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=et[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return Yr(Zi,o,r,t)}var Ui=$("ZodNumber",(e,t)=>{ci.init(e,t),te.init(e,t),e.gt=(o,r)=>e.check(Ut(o,r)),e.gte=(o,r)=>e.check(Ve(o,r)),e.min=(o,r)=>e.check(Ve(o,r)),e.lt=(o,r)=>e.check(Zt(o,r)),e.lte=(o,r)=>e.check(tt(o,r)),e.max=(o,r)=>e.check(tt(o,r)),e.int=o=>e.check(Wf(o)),e.safe=o=>e.check(Wf(o)),e.positive=o=>e.check(Ut(0,o)),e.nonnegative=o=>e.check(Ve(0,o)),e.negative=o=>e.check(Zt(0,o)),e.nonpositive=o=>e.check(tt(0,o)),e.multipleOf=(o,r)=>e.check(wr(o,r)),e.step=(o,r)=>e.check(wr(o,r)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function he(e){return Dc(Ui,e)}var co=$("ZodNumberFormat",(e,t)=>{qs.init(e,t),Ui.init(e,t)});function Wf(e){return Zc(co,e)}function uE(e){return Uc(co,e)}function lE(e){return Mc(co,e)}function dE(e){return Lc(co,e)}function fE(e){return qc(co,e)}var Mi=$("ZodBoolean",(e,t)=>{Ln.init(e,t),te.init(e,t)});function Pe(e){return Vc(Mi,e)}var Li=$("ZodBigInt",(e,t)=>{ui.init(e,t),te.init(e,t),e.gte=(o,r)=>e.check(Ve(o,r)),e.min=(o,r)=>e.check(Ve(o,r)),e.gt=(o,r)=>e.check(Ut(o,r)),e.gte=(o,r)=>e.check(Ve(o,r)),e.min=(o,r)=>e.check(Ve(o,r)),e.lt=(o,r)=>e.check(Zt(o,r)),e.lte=(o,r)=>e.check(tt(o,r)),e.max=(o,r)=>e.check(tt(o,r)),e.positive=o=>e.check(Ut(BigInt(0),o)),e.negative=o=>e.check(Zt(BigInt(0),o)),e.nonpositive=o=>e.check(tt(BigInt(0),o)),e.nonnegative=o=>e.check(Ve(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(wr(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function pE(e){return Bc(Li,e)}var mp=$("ZodBigIntFormat",(e,t)=>{Vs.init(e,t),Li.init(e,t)});function mE(e){return Hc(mp,e)}function hE(e){return Jc(mp,e)}var x_=$("ZodSymbol",(e,t)=>{Fs.init(e,t),te.init(e,t)});function gE(e){return Gc(x_,e)}var w_=$("ZodUndefined",(e,t)=>{Bs.init(e,t),te.init(e,t)});function vE(e){return Wc(w_,e)}var k_=$("ZodNull",(e,t)=>{Ks.init(e,t),te.init(e,t)});function qi(e){return Xc(k_,e)}var S_=$("ZodAny",(e,t)=>{Hs.init(e,t),te.init(e,t)});function _E(){return Yc(S_)}var z_=$("ZodUnknown",(e,t)=>{Js.init(e,t),te.init(e,t)});function ye(){return Qc(z_)}var I_=$("ZodNever",(e,t)=>{Gs.init(e,t),te.init(e,t)});function hp(e){return eu(I_,e)}var E_=$("ZodVoid",(e,t)=>{Ws.init(e,t),te.init(e,t)});function yE(e){return tu(E_,e)}var zu=$("ZodDate",(e,t)=>{Xs.init(e,t),te.init(e,t),e.min=(o,r)=>e.check(Ve(o,r)),e.max=(o,r)=>e.check(tt(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function bE(e){return ru(zu,e)}var T_=$("ZodArray",(e,t)=>{Ys.init(e,t),te.init(e,t),e.element=t.element,e.min=(n,o)=>e.check(Qt(n,o)),e.nonempty=n=>e.check(Qt(1,n)),e.max=(n,o)=>e.check(Wr(n,o)),e.length=(n,o)=>e.check(Xr(n,o)),e.unwrap=()=>e.element});function ie(e,t){return Of(T_,e,t)}function $E(e){let t=e._zod.def.shape;return Be(Object.keys(t))}var Iu=$("ZodObject",(e,t)=>{jf.init(e,t),te.init(e,t),E.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Be(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ye()}),e.loose=()=>e.clone({...e._zod.def,catchall:ye()}),e.strict=()=>e.clone({...e._zod.def,catchall:hp()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>E.extend(e,n),e.safeExtend=n=>E.safeExtend(e,n),e.merge=n=>E.merge(e,n),e.pick=n=>E.pick(e,n),e.omit=n=>E.omit(e,n),e.partial=(...n)=>E.partial(Fi,e,n[0]),e.required=(...n)=>E.required(yp,e,n[0])});function U(e,t){let n={type:"object",get shape(){return E.assignProp(this,"shape",e?E.objectClone(e):{}),this.shape},...E.normalizeParams(t)};return new Iu(n)}function xE(e,t){return new Iu({type:"object",get shape(){return E.assignProp(this,"shape",E.objectClone(e)),this.shape},catchall:hp(),...E.normalizeParams(t)})}function Fe(e,t){return new Iu({type:"object",get shape(){return E.assignProp(this,"shape",E.objectClone(e)),this.shape},catchall:ye(),...E.normalizeParams(t)})}var gp=$("ZodUnion",(e,t)=>{li.init(e,t),te.init(e,t),e.options=t.options});function ve(e,t){return new gp({type:"union",options:e,...E.normalizeParams(t)})}var P_=$("ZodDiscriminatedUnion",(e,t)=>{gp.init(e,t),ec.init(e,t)});function Eu(e,t,n){return new P_({type:"union",options:t,discriminator:e,...E.normalizeParams(n)})}var j_=$("ZodIntersection",(e,t)=>{tc.init(e,t),te.init(e,t)});function Vi(e,t){return new j_({type:"intersection",left:e,right:t})}var O_=$("ZodTuple",(e,t)=>{di.init(e,t),te.init(e,t),e.rest=n=>e.clone({...e._zod.def,rest:n})});function N_(e,t,n){let o=t instanceof W,r=o?n:t,i=o?t:null;return new O_({type:"tuple",items:e,rest:i,...E.normalizeParams(r)})}var vp=$("ZodRecord",(e,t)=>{rc.init(e,t),te.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function we(e,t,n){return new vp({type:"record",keyType:e,valueType:t,...E.normalizeParams(n)})}function wE(e,t,n){let o=Ne(e);return o._zod.values=void 0,new vp({type:"record",keyType:o,valueType:t,...E.normalizeParams(n)})}var R_=$("ZodMap",(e,t)=>{nc.init(e,t),te.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function kE(e,t,n){return new R_({type:"map",keyType:e,valueType:t,...E.normalizeParams(n)})}var A_=$("ZodSet",(e,t)=>{oc.init(e,t),te.init(e,t),e.min=(...n)=>e.check(kr(...n)),e.nonempty=n=>e.check(kr(1,n)),e.max=(...n)=>e.check(Gr(...n)),e.size=(...n)=>e.check(Hn(...n))});function SE(e,t){return new A_({type:"set",valueType:e,...E.normalizeParams(t)})}var Di=$("ZodEnum",(e,t)=>{ic.init(e,t),te.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let a of o)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Di({...t,checks:[],...E.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let a of o)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Di({...t,checks:[],...E.normalizeParams(r),entries:i})}});function Be(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Di({type:"enum",entries:n,...E.normalizeParams(t)})}function zE(e,t){return new Di({type:"enum",entries:e,...E.normalizeParams(t)})}var D_=$("ZodLiteral",(e,t)=>{ac.init(e,t),te.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function B(e,t){return new D_({type:"literal",values:Array.isArray(e)?e:[e],...E.normalizeParams(t)})}var C_=$("ZodFile",(e,t)=>{sc.init(e,t),te.init(e,t),e.min=(n,o)=>e.check(kr(n,o)),e.max=(n,o)=>e.check(Gr(n,o)),e.mime=(n,o)=>e.check(eo(Array.isArray(n)?n:[n],o))});function IE(e){return lu(C_,e)}var Z_=$("ZodTransform",(e,t)=>{cc.init(e,t),te.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new mr(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(E.issue(i,n.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(E.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n)):(n.value=r,n)}});function _p(e){return new Z_({type:"transform",transform:e})}var Fi=$("ZodOptional",(e,t)=>{uc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ke(e){return new Fi({type:"optional",innerType:e})}var U_=$("ZodNullable",(e,t)=>{lc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function wu(e){return new U_({type:"nullable",innerType:e})}function EE(e){return ke(wu(e))}var M_=$("ZodDefault",(e,t)=>{dc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function L_(e,t){return new M_({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():E.shallowClone(t)}})}var q_=$("ZodPrefault",(e,t)=>{fc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function V_(e,t){return new q_({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():E.shallowClone(t)}})}var yp=$("ZodNonOptional",(e,t)=>{pc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function F_(e,t){return new yp({type:"nonoptional",innerType:e,...E.normalizeParams(t)})}var B_=$("ZodSuccess",(e,t)=>{mc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function TE(e){return new B_({type:"success",innerType:e})}var K_=$("ZodCatch",(e,t)=>{hc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function H_(e,t){return new K_({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var J_=$("ZodNaN",(e,t)=>{gc.init(e,t),te.init(e,t)});function PE(e){return ou(J_,e)}var bp=$("ZodPipe",(e,t)=>{vc.init(e,t),te.init(e,t),e.in=t.in,e.out=t.out});function ku(e,t){return new bp({type:"pipe",in:e,out:t})}var $p=$("ZodCodec",(e,t)=>{bp.init(e,t),qn.init(e,t)});function jE(e,t,n){return new $p({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}var G_=$("ZodReadonly",(e,t)=>{_c.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function W_(e){return new G_({type:"readonly",innerType:e})}var X_=$("ZodTemplateLiteral",(e,t)=>{yc.init(e,t),te.init(e,t)});function OE(e,t){return new X_({type:"template_literal",parts:e,...E.normalizeParams(t)})}var Y_=$("ZodLazy",(e,t)=>{xc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.getter()});function Q_(e){return new Y_({type:"lazy",getter:e})}var ey=$("ZodPromise",(e,t)=>{$c.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function NE(e){return new ey({type:"promise",innerType:e})}var ty=$("ZodFunction",(e,t)=>{bc.init(e,t),te.init(e,t)});function RE(e){return new ty({type:"function",input:Array.isArray(e?.input)?N_(e?.input):e?.input??ie(ye()),output:e?.output??ye()})}var Tu=$("ZodCustom",(e,t)=>{wc.init(e,t),te.init(e,t)});function AE(e){let t=new $e({check:"custom"});return t._zod.check=e,t}function xp(e,t){return du(Tu,e??(()=>!0),t)}function ry(e,t={}){return fu(Tu,e,t)}function ny(e){return pu(e)}function DE(e,t={error:`Input not instance of ${e.name}`}){let n=new Tu({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...E.normalizeParams(t)});return n._zod.bag.Class=e,n}var CE=(...e)=>mu({Codec:$p,Boolean:Mi,String:Ci},...e);function ZE(e){let t=Q_(()=>ve([k(e),he(),Pe(),qi(),ie(t),we(k(),t)]));return t}function Pu(e,t){return ku(_p(e),t)}var UE={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function ME(e){Ee({customError:e})}function LE(){return Ee().customError}var wp;wp||(wp={});var kp={};qr(kp,{bigint:()=>BE,boolean:()=>FE,date:()=>KE,number:()=>VE,string:()=>qE});function qE(e){return Pc(Ci,e)}function VE(e){return Cc(Ui,e)}function FE(e){return Fc(Mi,e)}function BE(e){return Kc(Li,e)}function KE(e){return nu(zu,e)}Ee(kc());var zp="2025-11-25";var oy=[zp,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Ir="io.modelcontextprotocol/related-task",Ou="2.0",Ae=xp(e=>e!==null&&(typeof e=="object"||typeof e=="function")),iy=ve([k(),he().int()]),ay=k(),wU=Fe({ttl:ve([he(),qi()]).optional(),pollInterval:he().optional()}),JE=U({ttl:he().optional()}),GE=U({taskId:k()}),Ip=Fe({progressToken:iy.optional(),[Ir]:GE.optional()}),pt=U({_meta:Ip.optional()}),Bi=pt.extend({task:JE.optional()}),sy=e=>Bi.safeParse(e).success,De=U({method:k(),params:pt.loose().optional()}),vt=U({_meta:Ip.optional()}),_t=U({method:k(),params:vt.loose().optional()}),Ce=Fe({_meta:Ip.optional()}),Nu=ve([k(),he().int()]),cy=U({jsonrpc:B(Ou),id:Nu,...De.shape}).strict(),Ep=e=>cy.safeParse(e).success,uy=U({jsonrpc:B(Ou),..._t.shape}).strict(),ly=e=>uy.safeParse(e).success,Tp=U({jsonrpc:B(Ou),id:Nu,result:Ce}).strict(),Ki=e=>Tp.safeParse(e).success;var H;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(H||(H={}));var Pp=U({jsonrpc:B(Ou),id:Nu.optional(),error:U({code:he().int(),message:k(),data:ye().optional()})}).strict();var dy=e=>Pp.safeParse(e).success;var fy=ve([cy,uy,Tp,Pp]),kU=ve([Tp,Pp]),Ru=Ce.strict(),WE=vt.extend({requestId:Nu.optional(),reason:k().optional()}),Au=_t.extend({method:B("notifications/cancelled"),params:WE}),XE=U({src:k(),mimeType:k().optional(),sizes:ie(k()).optional(),theme:Be(["light","dark"]).optional()}),Hi=U({icons:ie(XE).optional()}),uo=U({name:k(),title:k().optional()}),py=uo.extend({...uo.shape,...Hi.shape,version:k(),websiteUrl:k().optional(),description:k().optional()}),YE=Vi(U({applyDefaults:Pe().optional()}),we(k(),ye())),QE=Pu(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Vi(U({form:YE.optional(),url:Ae.optional()}),we(k(),ye()).optional())),eT=Fe({list:Ae.optional(),cancel:Ae.optional(),requests:Fe({sampling:Fe({createMessage:Ae.optional()}).optional(),elicitation:Fe({create:Ae.optional()}).optional()}).optional()}),tT=Fe({list:Ae.optional(),cancel:Ae.optional(),requests:Fe({tools:Fe({call:Ae.optional()}).optional()}).optional()}),rT=U({experimental:we(k(),Ae).optional(),sampling:U({context:Ae.optional(),tools:Ae.optional()}).optional(),elicitation:QE.optional(),roots:U({listChanged:Pe().optional()}).optional(),tasks:eT.optional()}),nT=pt.extend({protocolVersion:k(),capabilities:rT,clientInfo:py}),jp=De.extend({method:B("initialize"),params:nT});var oT=U({experimental:we(k(),Ae).optional(),logging:Ae.optional(),completions:Ae.optional(),prompts:U({listChanged:Pe().optional()}).optional(),resources:U({subscribe:Pe().optional(),listChanged:Pe().optional()}).optional(),tools:U({listChanged:Pe().optional()}).optional(),tasks:tT.optional()}),iT=Ce.extend({protocolVersion:k(),capabilities:oT,serverInfo:py,instructions:k().optional()}),Op=_t.extend({method:B("notifications/initialized"),params:vt.optional()});var Du=De.extend({method:B("ping"),params:pt.optional()}),aT=U({progress:he(),total:ke(he()),message:ke(k())}),sT=U({...vt.shape,...aT.shape,progressToken:iy}),Cu=_t.extend({method:B("notifications/progress"),params:sT}),cT=pt.extend({cursor:ay.optional()}),Ji=De.extend({params:cT.optional()}),Gi=Ce.extend({nextCursor:ay.optional()}),uT=Be(["working","input_required","completed","failed","cancelled"]),Wi=U({taskId:k(),status:uT,ttl:ve([he(),qi()]),createdAt:k(),lastUpdatedAt:k(),pollInterval:ke(he()),statusMessage:ke(k())}),lo=Ce.extend({task:Wi}),lT=vt.merge(Wi),Xi=_t.extend({method:B("notifications/tasks/status"),params:lT}),Zu=De.extend({method:B("tasks/get"),params:pt.extend({taskId:k()})}),Uu=Ce.merge(Wi),Mu=De.extend({method:B("tasks/result"),params:pt.extend({taskId:k()})}),SU=Ce.loose(),Lu=Ji.extend({method:B("tasks/list")}),qu=Gi.extend({tasks:ie(Wi)}),Vu=De.extend({method:B("tasks/cancel"),params:pt.extend({taskId:k()})}),my=Ce.merge(Wi),hy=U({uri:k(),mimeType:ke(k()),_meta:we(k(),ye()).optional()}),gy=hy.extend({text:k()}),Np=k().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),vy=hy.extend({blob:Np}),Yi=Be(["user","assistant"]),fo=U({audience:ie(Yi).optional(),priority:he().min(0).max(1).optional(),lastModified:so.datetime({offset:!0}).optional()}),_y=U({...uo.shape,...Hi.shape,uri:k(),description:ke(k()),mimeType:ke(k()),annotations:fo.optional(),_meta:ke(Fe({}))}),dT=U({...uo.shape,...Hi.shape,uriTemplate:k(),description:ke(k()),mimeType:ke(k()),annotations:fo.optional(),_meta:ke(Fe({}))}),Fu=Ji.extend({method:B("resources/list")}),fT=Gi.extend({resources:ie(_y)}),Bu=Ji.extend({method:B("resources/templates/list")}),pT=Gi.extend({resourceTemplates:ie(dT)}),Rp=pt.extend({uri:k()}),mT=Rp,Ku=De.extend({method:B("resources/read"),params:mT}),hT=Ce.extend({contents:ie(ve([gy,vy]))}),gT=_t.extend({method:B("notifications/resources/list_changed"),params:vt.optional()}),vT=Rp,_T=De.extend({method:B("resources/subscribe"),params:vT}),yT=Rp,bT=De.extend({method:B("resources/unsubscribe"),params:yT}),$T=vt.extend({uri:k()}),xT=_t.extend({method:B("notifications/resources/updated"),params:$T}),wT=U({name:k(),description:ke(k()),required:ke(Pe())}),kT=U({...uo.shape,...Hi.shape,description:ke(k()),arguments:ke(ie(wT)),_meta:ke(Fe({}))}),Hu=Ji.extend({method:B("prompts/list")}),ST=Gi.extend({prompts:ie(kT)}),zT=pt.extend({name:k(),arguments:we(k(),k()).optional()}),Ju=De.extend({method:B("prompts/get"),params:zT}),Ap=U({type:B("text"),text:k(),annotations:fo.optional(),_meta:we(k(),ye()).optional()}),Dp=U({type:B("image"),data:Np,mimeType:k(),annotations:fo.optional(),_meta:we(k(),ye()).optional()}),Cp=U({type:B("audio"),data:Np,mimeType:k(),annotations:fo.optional(),_meta:we(k(),ye()).optional()}),IT=U({type:B("tool_use"),name:k(),id:k(),input:we(k(),ye()),_meta:we(k(),ye()).optional()}),ET=U({type:B("resource"),resource:ve([gy,vy]),annotations:fo.optional(),_meta:we(k(),ye()).optional()}),TT=_y.extend({type:B("resource_link")}),Zp=ve([Ap,Dp,Cp,TT,ET]),PT=U({role:Yi,content:Zp}),jT=Ce.extend({description:k().optional(),messages:ie(PT)}),OT=_t.extend({method:B("notifications/prompts/list_changed"),params:vt.optional()}),NT=U({title:k().optional(),readOnlyHint:Pe().optional(),destructiveHint:Pe().optional(),idempotentHint:Pe().optional(),openWorldHint:Pe().optional()}),RT=U({taskSupport:Be(["required","optional","forbidden"]).optional()}),yy=U({...uo.shape,...Hi.shape,description:k().optional(),inputSchema:U({type:B("object"),properties:we(k(),Ae).optional(),required:ie(k()).optional()}).catchall(ye()),outputSchema:U({type:B("object"),properties:we(k(),Ae).optional(),required:ie(k()).optional()}).catchall(ye()).optional(),annotations:NT.optional(),execution:RT.optional(),_meta:we(k(),ye()).optional()}),Gu=Ji.extend({method:B("tools/list")}),AT=Gi.extend({tools:ie(yy)}),Wu=Ce.extend({content:ie(Zp).default([]),structuredContent:we(k(),ye()).optional(),isError:Pe().optional()}),zU=Wu.or(Ce.extend({toolResult:ye()})),DT=Bi.extend({name:k(),arguments:we(k(),ye()).optional()}),po=De.extend({method:B("tools/call"),params:DT}),CT=_t.extend({method:B("notifications/tools/list_changed"),params:vt.optional()}),IU=U({autoRefresh:Pe().default(!0),debounceMs:he().int().nonnegative().default(300)}),Qi=Be(["debug","info","notice","warning","error","critical","alert","emergency"]),ZT=pt.extend({level:Qi}),Up=De.extend({method:B("logging/setLevel"),params:ZT}),UT=vt.extend({level:Qi,logger:k().optional(),data:ye()}),MT=_t.extend({method:B("notifications/message"),params:UT}),LT=U({name:k().optional()}),qT=U({hints:ie(LT).optional(),costPriority:he().min(0).max(1).optional(),speedPriority:he().min(0).max(1).optional(),intelligencePriority:he().min(0).max(1).optional()}),VT=U({mode:Be(["auto","required","none"]).optional()}),FT=U({type:B("tool_result"),toolUseId:k().describe("The unique identifier for the corresponding tool call."),content:ie(Zp).default([]),structuredContent:U({}).loose().optional(),isError:Pe().optional(),_meta:we(k(),ye()).optional()}),BT=Eu("type",[Ap,Dp,Cp]),ju=Eu("type",[Ap,Dp,Cp,IT,FT]),KT=U({role:Yi,content:ve([ju,ie(ju)]),_meta:we(k(),ye()).optional()}),HT=Bi.extend({messages:ie(KT),modelPreferences:qT.optional(),systemPrompt:k().optional(),includeContext:Be(["none","thisServer","allServers"]).optional(),temperature:he().optional(),maxTokens:he().int(),stopSequences:ie(k()).optional(),metadata:Ae.optional(),tools:ie(yy).optional(),toolChoice:VT.optional()}),JT=De.extend({method:B("sampling/createMessage"),params:HT}),ea=Ce.extend({model:k(),stopReason:ke(Be(["endTurn","stopSequence","maxTokens"]).or(k())),role:Yi,content:BT}),Mp=Ce.extend({model:k(),stopReason:ke(Be(["endTurn","stopSequence","maxTokens","toolUse"]).or(k())),role:Yi,content:ve([ju,ie(ju)])}),GT=U({type:B("boolean"),title:k().optional(),description:k().optional(),default:Pe().optional()}),WT=U({type:B("string"),title:k().optional(),description:k().optional(),minLength:he().optional(),maxLength:he().optional(),format:Be(["email","uri","date","date-time"]).optional(),default:k().optional()}),XT=U({type:Be(["number","integer"]),title:k().optional(),description:k().optional(),minimum:he().optional(),maximum:he().optional(),default:he().optional()}),YT=U({type:B("string"),title:k().optional(),description:k().optional(),enum:ie(k()),default:k().optional()}),QT=U({type:B("string"),title:k().optional(),description:k().optional(),oneOf:ie(U({const:k(),title:k()})),default:k().optional()}),eP=U({type:B("string"),title:k().optional(),description:k().optional(),enum:ie(k()),enumNames:ie(k()).optional(),default:k().optional()}),tP=ve([YT,QT]),rP=U({type:B("array"),title:k().optional(),description:k().optional(),minItems:he().optional(),maxItems:he().optional(),items:U({type:B("string"),enum:ie(k())}),default:ie(k()).optional()}),nP=U({type:B("array"),title:k().optional(),description:k().optional(),minItems:he().optional(),maxItems:he().optional(),items:U({anyOf:ie(U({const:k(),title:k()}))}),default:ie(k()).optional()}),oP=ve([rP,nP]),iP=ve([eP,tP,oP]),aP=ve([iP,GT,WT,XT]),sP=Bi.extend({mode:B("form").optional(),message:k(),requestedSchema:U({type:B("object"),properties:we(k(),aP),required:ie(k()).optional()})}),cP=Bi.extend({mode:B("url"),message:k(),elicitationId:k(),url:k().url()}),uP=ve([sP,cP]),lP=De.extend({method:B("elicitation/create"),params:uP}),dP=vt.extend({elicitationId:k()}),fP=_t.extend({method:B("notifications/elicitation/complete"),params:dP}),mo=Ce.extend({action:Be(["accept","decline","cancel"]),content:Pu(e=>e===null?void 0:e,we(k(),ve([k(),he(),Pe(),ie(k())])).optional())}),pP=U({type:B("ref/resource"),uri:k()});var mP=U({type:B("ref/prompt"),name:k()}),hP=pt.extend({ref:ve([mP,pP]),argument:U({name:k(),value:k()}),context:U({arguments:we(k(),k()).optional()}).optional()}),Xu=De.extend({method:B("completion/complete"),params:hP});function by(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function $y(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var gP=Ce.extend({completion:Fe({values:ie(k()).max(100),total:ke(he().int()),hasMore:ke(Pe())})}),vP=U({uri:k().startsWith("file://"),name:k().optional(),_meta:we(k(),ye()).optional()}),_P=De.extend({method:B("roots/list"),params:pt.optional()}),Lp=Ce.extend({roots:ie(vP)}),yP=_t.extend({method:B("notifications/roots/list_changed"),params:vt.optional()}),EU=ve([Du,jp,Xu,Up,Ju,Hu,Fu,Bu,Ku,_T,bT,po,Gu,Zu,Mu,Lu,Vu]),TU=ve([Au,Cu,Op,yP,Xi]),PU=ve([Ru,ea,Mp,mo,Lp,Uu,qu,lo]),jU=ve([Du,JT,lP,_P,Zu,Mu,Lu,Vu]),OU=ve([Au,Cu,MT,xT,gT,CT,OT,Xi,fP]),NU=ve([Ru,iT,gP,jT,ST,fT,pT,hT,Wu,AT,Uu,qu,lo]),F=class e extends Error{constructor(t,n,o){super(`MCP error ${t}: ${n}`),this.code=t,this.data=o,this.name="McpError"}static fromError(t,n,o){if(t===H.UrlElicitationRequired&&o){let r=o;if(r.elicitations)return new Sp(r.elicitations,n)}return new e(t,n,o)}},Sp=class extends F{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(H.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}};function Er(e){return e==="completed"||e==="failed"||e==="cancelled"}var wy=Symbol("Let zodToJsonSchema decide on which parser to use");var xy={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},ky=e=>typeof e=="string"?{...xy,name:e}:{...xy,...e};var Sy=e=>{let t=ky(e),n=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([o,r])=>[r._def,{def:r._def,path:[...t.basePath,t.definitionPath,o],jsonSchema:void 0}]))}};function qp(e,t,n,o){o?.errorMessages&&n&&(e.errorMessage={...e.errorMessage,[t]:n})}function ue(e,t,n,o,r){e[t]=n,qp(e,t,o,r)}var Yu=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")};function Ie(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?Yu(t,e.currentPath):t.join("/")}}function zy(e,t){let n={type:"array"};return e.type?._def&&e.type?._def?.typeName!==j.ZodAny&&(n.items=G(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&ue(n,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&ue(n,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(ue(n,"minItems",e.exactLength.value,e.exactLength.message,t),ue(n,"maxItems",e.exactLength.value,e.exactLength.message,t)),n}function Iy(e,t){let n={type:"integer",format:"int64"};if(!e.checks)return n;for(let o of e.checks)switch(o.kind){case"min":t.target==="jsonSchema7"?o.inclusive?ue(n,"minimum",o.value,o.message,t):ue(n,"exclusiveMinimum",o.value,o.message,t):(o.inclusive||(n.exclusiveMinimum=!0),ue(n,"minimum",o.value,o.message,t));break;case"max":t.target==="jsonSchema7"?o.inclusive?ue(n,"maximum",o.value,o.message,t):ue(n,"exclusiveMaximum",o.value,o.message,t):(o.inclusive||(n.exclusiveMaximum=!0),ue(n,"maximum",o.value,o.message,t));break;case"multipleOf":ue(n,"multipleOf",o.value,o.message,t);break}return n}function Ey(){return{type:"boolean"}}function Qu(e,t){return G(e.type._def,t)}var Ty=(e,t)=>G(e.innerType._def,t);function Vp(e,t,n){let o=n??t.dateStrategy;if(Array.isArray(o))return{anyOf:o.map((r,i)=>Vp(e,t,r))};switch(o){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return bP(e,t)}}var bP=(e,t)=>{let n={type:"integer",format:"unix-time"};if(t.target==="openApi3")return n;for(let o of e.checks)switch(o.kind){case"min":ue(n,"minimum",o.value,o.message,t);break;case"max":ue(n,"maximum",o.value,o.message,t);break}return n};function Py(e,t){return{...G(e.innerType._def,t),default:e.defaultValue()}}function jy(e,t){return t.effectStrategy==="input"?G(e.schema._def,t):Ie(t)}function Oy(e){return{type:"string",enum:Array.from(e.values)}}var $P=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function Ny(e,t){let n=[G(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),G(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i),o=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,r=[];return n.forEach(i=>{if($P(i))r.push(...i.allOf),i.unevaluatedProperties===void 0&&(o=void 0);else{let a=i;if("additionalProperties"in i&&i.additionalProperties===!1){let{additionalProperties:s,...c}=i;a=c}else o=void 0;r.push(a)}}),r.length?{allOf:r,...o}:void 0}function Ry(e,t){let n=typeof e.value;return n!=="bigint"&&n!=="number"&&n!=="boolean"&&n!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:n==="bigint"?"integer":n,enum:[e.value]}:{type:n==="bigint"?"integer":n,const:e.value}}var Fp,Tt={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Fp===void 0&&(Fp=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Fp),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function el(e,t){let n={type:"string"};if(e.checks)for(let o of e.checks)switch(o.kind){case"min":ue(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,o.value):o.value,o.message,t);break;case"max":ue(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,o.value):o.value,o.message,t);break;case"email":switch(t.emailStrategy){case"format:email":Pt(n,"email",o.message,t);break;case"format:idn-email":Pt(n,"idn-email",o.message,t);break;case"pattern:zod":We(n,Tt.email,o.message,t);break}break;case"url":Pt(n,"uri",o.message,t);break;case"uuid":Pt(n,"uuid",o.message,t);break;case"regex":We(n,o.regex,o.message,t);break;case"cuid":We(n,Tt.cuid,o.message,t);break;case"cuid2":We(n,Tt.cuid2,o.message,t);break;case"startsWith":We(n,RegExp(`^${Bp(o.value,t)}`),o.message,t);break;case"endsWith":We(n,RegExp(`${Bp(o.value,t)}$`),o.message,t);break;case"datetime":Pt(n,"date-time",o.message,t);break;case"date":Pt(n,"date",o.message,t);break;case"time":Pt(n,"time",o.message,t);break;case"duration":Pt(n,"duration",o.message,t);break;case"length":ue(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,o.value):o.value,o.message,t),ue(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,o.value):o.value,o.message,t);break;case"includes":{We(n,RegExp(Bp(o.value,t)),o.message,t);break}case"ip":{o.version!=="v6"&&Pt(n,"ipv4",o.message,t),o.version!=="v4"&&Pt(n,"ipv6",o.message,t);break}case"base64url":We(n,Tt.base64url,o.message,t);break;case"jwt":We(n,Tt.jwt,o.message,t);break;case"cidr":{o.version!=="v6"&&We(n,Tt.ipv4Cidr,o.message,t),o.version!=="v4"&&We(n,Tt.ipv6Cidr,o.message,t);break}case"emoji":We(n,Tt.emoji(),o.message,t);break;case"ulid":{We(n,Tt.ulid,o.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Pt(n,"binary",o.message,t);break}case"contentEncoding:base64":{ue(n,"contentEncoding","base64",o.message,t);break}case"pattern:zod":{We(n,Tt.base64,o.message,t);break}}break}case"nanoid":We(n,Tt.nanoid,o.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return n}function Bp(e,t){return t.patternStrategy==="escape"?wP(e):e}var xP=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function wP(e){let t="";for(let n=0;n<e.length;n++)xP.has(e[n])||(t+="\\"),t+=e[n];return t}function Pt(e,t,n,o){e.format||e.anyOf?.some(r=>r.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&o.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...n&&o.errorMessages&&{errorMessage:{format:n}}})):ue(e,"format",t,n,o)}function We(e,t,n,o){e.pattern||e.allOf?.some(r=>r.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&o.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:Ay(t,o),...n&&o.errorMessages&&{errorMessage:{pattern:n}}})):ue(e,"pattern",Ay(t,o),n,o)}function Ay(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let n={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},o=n.i?e.source.toLowerCase():e.source,r="",i=!1,a=!1,s=!1;for(let c=0;c<o.length;c++){if(i){r+=o[c],i=!1;continue}if(n.i){if(a){if(o[c].match(/[a-z]/)){s?(r+=o[c],r+=`${o[c-2]}-${o[c]}`.toUpperCase(),s=!1):o[c+1]==="-"&&o[c+2]?.match(/[a-z]/)?(r+=o[c],s=!0):r+=`${o[c]}${o[c].toUpperCase()}`;continue}}else if(o[c].match(/[a-z]/)){r+=`[${o[c]}${o[c].toUpperCase()}]`;continue}}if(n.m){if(o[c]==="^"){r+=`(^|(?<=[\r
|
|
56
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let d of this.seen.entries()){let f=d[1];if(t===d[0]){a(d);continue}if(o.external){let v=o.external.registry.get(d[0])?.id;if(t!==d[0]&&v){a(d);continue}}if(this.metadataRegistry.get(d[0])?.id){a(d);continue}if(f.cycle){a(d);continue}if(f.count>1&&o.reused==="ref"){a(d);continue}}let s=(d,f)=>{let _=this.seen.get(d),v=_.def??_.schema,g={...v};if(_.ref===null)return;let b=_.ref;if(_.ref=null,b){s(b,f);let x=this.seen.get(b).schema;x.$ref&&(f.target==="draft-7"||f.target==="draft-4"||f.target==="openapi-3.0")?(v.allOf=v.allOf??[],v.allOf.push(x)):(Object.assign(v,x),Object.assign(v,g))}_.isParent||this.override({zodSchema:d,jsonSchema:v,path:_.path??[]})};for(let d of[...this.seen.entries()].reverse())s(d[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?c.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),o.external?.uri){let d=o.external.registry.get(t)?.id;if(!d)throw new Error("Schema is missing an `id` property");c.$id=o.external.uri(d)}Object.assign(c,r.def);let l=o.external?.defs??{};for(let d of this.seen.entries()){let f=d[1];f.def&&f.defId&&(l[f.defId]=f.def)}o.external||Object.keys(l).length>0&&(this.target==="draft-2020-12"?c.$defs=l:c.definitions=l);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}};function so(e,t){if(e instanceof Kn){let o=new Ci(t),r={};for(let s of e._idmap.entries()){let[c,l]=s;o.process(l)}let i={},a={registry:e,uri:t?.uri,defs:r};for(let s of e._idmap.entries()){let[c,l]=s;i[c]=o.emit(l,{...t,external:a})}if(Object.keys(r).length>0){let s=o.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[s]:r}}return{schemas:i}}let n=new Ci(t);return n.process(e),n.emit(e,t)}function je(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;switch(r.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return je(r.element,n);case"object":{for(let i in r.shape)if(je(r.shape[i],n))return!0;return!1}case"union":{for(let i of r.options)if(je(i,n))return!0;return!1}case"intersection":return je(r.left,n)||je(r.right,n);case"tuple":{for(let i of r.items)if(je(i,n))return!0;return!!(r.rest&&je(r.rest,n))}case"record":return je(r.keyType,n)||je(r.valueType,n);case"map":return je(r.keyType,n)||je(r.valueType,n);case"set":return je(r.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return je(r.innerType,n);case"lazy":return je(r.getter(),n);case"default":return je(r.innerType,n);case"prefault":return je(r.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return je(r.in,n)||je(r.out,n);case"success":return!1;case"catch":return!1;case"function":return!1;default:}throw new Error(`Unknown schema type: ${r.type}`)}var $_={};var ZI=$("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");W.init(e,t),e.def=t,e.type=t.type,e.parse=(n,o)=>Jr(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>xr(e,n,o),e.parseAsync=async(n,o)=>Gr(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>wr(e,n,o),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),e.clone=(n,o)=>Ne(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e))});var MI=$("ZodMiniObject",(e,t)=>{tc.init(e,t),ZI.init(e,t),E.defineLazy(e,"shape",()=>t.shape)});function Uf(e,t){let n={type:"object",get shape(){return E.assignProp(this,"shape",{...e}),this.shape},...E.normalizeParams(t)};return new MI(n)}function vt(e){return!!e._zod}function tn(e){let t=Object.values(e);if(t.length===0)return Uf({});let n=t.every(vt),o=t.every(r=>!vt(r));if(n)return Uf(e);if(o)return Jg(e);throw new Error("Mixed Zod versions detected in object shape.")}function Ir(e,t){return vt(e)?xr(e,t):e.safeParse(t)}async function vu(e,t){return vt(e)?await wr(e,t):await e.safeParseAsync(t)}function Er(e){if(!e)return;let t;if(vt(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function co(e){if(e){if(typeof e=="object"){let t=e,n=e;if(!t._def&&!n._zod){let o=Object.values(e);if(o.length>0&&o.every(r=>typeof r=="object"&&r!==null&&(r._def!==void 0||r._zod!==void 0||typeof r.parse=="function")))return tn(e)}}if(vt(e)){let n=e._zod?.def;if(n&&(n.type==="object"||n.shape!==void 0))return e}else if(e.shape!==void 0)return e}}function _u(e){if(e&&typeof e=="object"){if("message"in e&&typeof e.message=="string")return e.message;if("issues"in e&&Array.isArray(e.issues)&&e.issues.length>0){let t=e.issues[0];if(t&&typeof t=="object"&&"message"in t)return String(t.message)}try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function k_(e){return e.description}function S_(e){if(vt(e))return e._zod?.def?.type==="optional";let t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function yu(e){if(vt(e)){let i=e._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.values[0]}}let n=e._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}let o=e.value;if(o!==void 0)return o}var qt={};Fr(qt,{$brand:()=>Qo,$input:()=>Pc,$output:()=>Tc,NEVER:()=>Qa,TimePrecision:()=>Nc,ZodAny:()=>O_,ZodArray:()=>A_,ZodBase64:()=>hp,ZodBase64URL:()=>gp,ZodBigInt:()=>Vi,ZodBigIntFormat:()=>yp,ZodBoolean:()=>qi,ZodCIDRv4:()=>pp,ZodCIDRv6:()=>mp,ZodCUID:()=>ap,ZodCUID2:()=>sp,ZodCatch:()=>Y_,ZodCodec:()=>zp,ZodCustom:()=>Ou,ZodCustomStringFormat:()=>Mi,ZodDate:()=>Eu,ZodDefault:()=>K_,ZodDiscriminatedUnion:()=>D_,ZodE164:()=>vp,ZodEmail:()=>np,ZodEmoji:()=>op,ZodEnum:()=>Ui,ZodError:()=>BI,ZodFile:()=>V_,ZodFirstPartyTypeKind:()=>Ep,ZodFunction:()=>sy,ZodGUID:()=>ku,ZodIPv4:()=>dp,ZodIPv6:()=>fp,ZodISODate:()=>$u,ZodISODateTime:()=>bu,ZodISODuration:()=>wu,ZodISOTime:()=>xu,ZodIntersection:()=>C_,ZodIssueCode:()=>WE,ZodJWT:()=>_p,ZodKSUID:()=>lp,ZodLazy:()=>oy,ZodLiteral:()=>q_,ZodMap:()=>M_,ZodNaN:()=>ey,ZodNanoID:()=>ip,ZodNever:()=>N_,ZodNonOptional:()=>kp,ZodNull:()=>P_,ZodNullable:()=>B_,ZodNumber:()=>Li,ZodNumberFormat:()=>lo,ZodObject:()=>Tu,ZodOptional:()=>Ki,ZodPipe:()=>Sp,ZodPrefault:()=>J_,ZodPromise:()=>ay,ZodReadonly:()=>ty,ZodRealError:()=>nt,ZodRecord:()=>xp,ZodSet:()=>L_,ZodString:()=>Zi,ZodStringFormat:()=>xe,ZodSuccess:()=>X_,ZodSymbol:()=>E_,ZodTemplateLiteral:()=>ny,ZodTransform:()=>F_,ZodTuple:()=>U_,ZodType:()=>te,ZodULID:()=>cp,ZodURL:()=>Iu,ZodUUID:()=>rr,ZodUndefined:()=>T_,ZodUnion:()=>$p,ZodUnknown:()=>j_,ZodVoid:()=>R_,ZodXID:()=>up,_ZodString:()=>rp,_default:()=>H_,_function:()=>BE,any:()=>TE,array:()=>ie,base64:()=>fE,base64url:()=>pE,bigint:()=>kE,boolean:()=>Pe,catch:()=>Q_,check:()=>KE,cidrv4:()=>lE,cidrv6:()=>dE,clone:()=>Ne,codec:()=>qE,coerce:()=>Tp,config:()=>Ee,core:()=>pt,cuid:()=>nE,cuid2:()=>oE,custom:()=>Ip,date:()=>OE,decode:()=>Jf,decodeAsync:()=>Wf,discriminatedUnion:()=>Pu,e164:()=>mE,email:()=>HI,emoji:()=>tE,encode:()=>Hf,encodeAsync:()=>Gf,endsWith:()=>to,enum:()=>Be,file:()=>UE,flattenError:()=>Dn,float32:()=>bE,float64:()=>$E,formatError:()=>Cn,function:()=>BE,getErrorMap:()=>YE,globalRegistry:()=>Tt,gt:()=>Mt,gte:()=>Ve,guid:()=>JI,hash:()=>yE,hex:()=>_E,hostname:()=>vE,httpUrl:()=>eE,includes:()=>Qn,instanceof:()=>HE,int:()=>tp,int32:()=>xE,int64:()=>SE,intersection:()=>Bi,ipv4:()=>cE,ipv6:()=>uE,iso:()=>uo,json:()=>GE,jwt:()=>hE,keyof:()=>jE,ksuid:()=>sE,lazy:()=>iy,length:()=>Qr,literal:()=>B,locales:()=>Bn,looseObject:()=>Fe,lowercase:()=>Xn,lt:()=>Zt,lte:()=>rt,map:()=>AE,maxLength:()=>Yr,maxSize:()=>Xr,mime:()=>ro,minLength:()=>tr,minSize:()=>zr,multipleOf:()=>Sr,nan:()=>LE,nanoid:()=>rE,nativeEnum:()=>CE,negative:()=>cu,never:()=>bp,nonnegative:()=>lu,nonoptional:()=>W_,nonpositive:()=>uu,normalize:()=>no,null:()=>Fi,nullable:()=>Su,nullish:()=>ZE,number:()=>he,object:()=>Z,optional:()=>ke,overwrite:()=>Lt,parse:()=>Vf,parseAsync:()=>Ff,partialRecord:()=>RE,pipe:()=>zu,positive:()=>su,prefault:()=>G_,preprocess:()=>ju,prettifyError:()=>ns,promise:()=>FE,property:()=>du,readonly:()=>ry,record:()=>we,refine:()=>cy,regex:()=>Wn,regexes:()=>tt,registry:()=>gi,safeDecode:()=>Yf,safeDecodeAsync:()=>ep,safeEncode:()=>Xf,safeEncodeAsync:()=>Qf,safeParse:()=>Bf,safeParseAsync:()=>Kf,set:()=>DE,setErrorMap:()=>XE,size:()=>Gn,startsWith:()=>eo,strictObject:()=>NE,string:()=>k,stringFormat:()=>gE,stringbool:()=>JE,success:()=>ME,superRefine:()=>uy,symbol:()=>IE,templateLiteral:()=>VE,toJSONSchema:()=>so,toLowerCase:()=>io,toUpperCase:()=>ao,transform:()=>wp,treeifyError:()=>rs,trim:()=>oo,tuple:()=>Z_,uint32:()=>wE,uint64:()=>zE,ulid:()=>iE,undefined:()=>EE,union:()=>ve,unknown:()=>ye,uppercase:()=>Yn,url:()=>QI,util:()=>E,uuid:()=>GI,uuidv4:()=>WI,uuidv6:()=>XI,uuidv7:()=>YI,void:()=>PE,xid:()=>aE});var uo={};Fr(uo,{ZodISODate:()=>$u,ZodISODateTime:()=>bu,ZodISODuration:()=>wu,ZodISOTime:()=>xu,date:()=>Mf,datetime:()=>Zf,duration:()=>qf,time:()=>Lf});var bu=$("ZodISODateTime",(e,t)=>{Os.init(e,t),xe.init(e,t)});function Zf(e){return Rc(bu,e)}var $u=$("ZodISODate",(e,t)=>{js.init(e,t),xe.init(e,t)});function Mf(e){return Ac($u,e)}var xu=$("ZodISOTime",(e,t)=>{Ns.init(e,t),xe.init(e,t)});function Lf(e){return Dc(xu,e)}var wu=$("ZodISODuration",(e,t)=>{Rs.init(e,t),xe.init(e,t)});function qf(e){return Cc(wu,e)}var I_=(e,t)=>{ai.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Cn(e,n)},flatten:{value:n=>Dn(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Nn,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Nn,2)}},isEmpty:{get(){return e.issues.length===0}}})},BI=$("ZodError",I_),nt=$("ZodError",I_,{Parent:Error});var Vf=Un(nt),Ff=Zn(nt),Bf=Mn(nt),Kf=Ln(nt),Hf=os(nt),Jf=is(nt),Gf=as(nt),Wf=ss(nt),Xf=cs(nt),Yf=us(nt),Qf=ls(nt),ep=ds(nt);var te=$("ZodType",(e,t)=>(W.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),e.clone=(n,o)=>Ne(e,n,o),e.brand=()=>e,e.register=((n,o)=>(n.add(e,o),e)),e.parse=(n,o)=>Vf(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Bf(e,n,o),e.parseAsync=async(n,o)=>Ff(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Kf(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Hf(e,n,o),e.decode=(n,o)=>Jf(e,n,o),e.encodeAsync=async(n,o)=>Gf(e,n,o),e.decodeAsync=async(n,o)=>Wf(e,n,o),e.safeEncode=(n,o)=>Xf(e,n,o),e.safeDecode=(n,o)=>Yf(e,n,o),e.safeEncodeAsync=async(n,o)=>Qf(e,n,o),e.safeDecodeAsync=async(n,o)=>ep(e,n,o),e.refine=(n,o)=>e.check(cy(n,o)),e.superRefine=n=>e.check(uy(n)),e.overwrite=n=>e.check(Lt(n)),e.optional=()=>ke(e),e.nullable=()=>Su(e),e.nullish=()=>ke(Su(e)),e.nonoptional=n=>W_(e,n),e.array=()=>ie(e),e.or=n=>ve([e,n]),e.and=n=>Bi(e,n),e.transform=n=>zu(e,wp(n)),e.default=n=>H_(e,n),e.prefault=n=>G_(e,n),e.catch=n=>Q_(e,n),e.pipe=n=>zu(e,n),e.readonly=()=>ry(e),e.describe=n=>{let o=e.clone();return Tt.add(o,{description:n}),o},Object.defineProperty(e,"description",{get(){return Tt.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Tt.get(e);let o=e.clone();return Tt.add(o,n[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),rp=$("_ZodString",(e,t)=>{kr.init(e,t),te.init(e,t);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...o)=>e.check(Wn(...o)),e.includes=(...o)=>e.check(Qn(...o)),e.startsWith=(...o)=>e.check(eo(...o)),e.endsWith=(...o)=>e.check(to(...o)),e.min=(...o)=>e.check(tr(...o)),e.max=(...o)=>e.check(Yr(...o)),e.length=(...o)=>e.check(Qr(...o)),e.nonempty=(...o)=>e.check(tr(1,...o)),e.lowercase=o=>e.check(Xn(o)),e.uppercase=o=>e.check(Yn(o)),e.trim=()=>e.check(oo()),e.normalize=(...o)=>e.check(no(...o)),e.toLowerCase=()=>e.check(io()),e.toUpperCase=()=>e.check(ao())}),Zi=$("ZodString",(e,t)=>{kr.init(e,t),rp.init(e,t),e.email=n=>e.check(vi(np,n)),e.url=n=>e.check(Jn(Iu,n)),e.jwt=n=>e.check(Di(_p,n)),e.emoji=n=>e.check(xi(op,n)),e.guid=n=>e.check(Hn(ku,n)),e.uuid=n=>e.check(_i(rr,n)),e.uuidv4=n=>e.check(yi(rr,n)),e.uuidv6=n=>e.check(bi(rr,n)),e.uuidv7=n=>e.check($i(rr,n)),e.nanoid=n=>e.check(wi(ip,n)),e.guid=n=>e.check(Hn(ku,n)),e.cuid=n=>e.check(ki(ap,n)),e.cuid2=n=>e.check(Si(sp,n)),e.ulid=n=>e.check(zi(cp,n)),e.base64=n=>e.check(Ni(hp,n)),e.base64url=n=>e.check(Ri(gp,n)),e.xid=n=>e.check(Ii(up,n)),e.ksuid=n=>e.check(Ei(lp,n)),e.ipv4=n=>e.check(Ti(dp,n)),e.ipv6=n=>e.check(Pi(fp,n)),e.cidrv4=n=>e.check(Oi(pp,n)),e.cidrv6=n=>e.check(ji(mp,n)),e.e164=n=>e.check(Ai(vp,n)),e.datetime=n=>e.check(Zf(n)),e.date=n=>e.check(Mf(n)),e.time=n=>e.check(Lf(n)),e.duration=n=>e.check(qf(n))});function k(e){return Oc(Zi,e)}var xe=$("ZodStringFormat",(e,t)=>{ge.init(e,t),rp.init(e,t)}),np=$("ZodEmail",(e,t)=>{xs.init(e,t),xe.init(e,t)});function HI(e){return vi(np,e)}var ku=$("ZodGUID",(e,t)=>{bs.init(e,t),xe.init(e,t)});function JI(e){return Hn(ku,e)}var rr=$("ZodUUID",(e,t)=>{$s.init(e,t),xe.init(e,t)});function GI(e){return _i(rr,e)}function WI(e){return yi(rr,e)}function XI(e){return bi(rr,e)}function YI(e){return $i(rr,e)}var Iu=$("ZodURL",(e,t)=>{ws.init(e,t),xe.init(e,t)});function QI(e){return Jn(Iu,e)}function eE(e){return Jn(Iu,{protocol:/^https?$/,hostname:tt.domain,...E.normalizeParams(e)})}var op=$("ZodEmoji",(e,t)=>{ks.init(e,t),xe.init(e,t)});function tE(e){return xi(op,e)}var ip=$("ZodNanoID",(e,t)=>{Ss.init(e,t),xe.init(e,t)});function rE(e){return wi(ip,e)}var ap=$("ZodCUID",(e,t)=>{zs.init(e,t),xe.init(e,t)});function nE(e){return ki(ap,e)}var sp=$("ZodCUID2",(e,t)=>{Is.init(e,t),xe.init(e,t)});function oE(e){return Si(sp,e)}var cp=$("ZodULID",(e,t)=>{Es.init(e,t),xe.init(e,t)});function iE(e){return zi(cp,e)}var up=$("ZodXID",(e,t)=>{Ts.init(e,t),xe.init(e,t)});function aE(e){return Ii(up,e)}var lp=$("ZodKSUID",(e,t)=>{Ps.init(e,t),xe.init(e,t)});function sE(e){return Ei(lp,e)}var dp=$("ZodIPv4",(e,t)=>{As.init(e,t),xe.init(e,t)});function cE(e){return Ti(dp,e)}var fp=$("ZodIPv6",(e,t)=>{Ds.init(e,t),xe.init(e,t)});function uE(e){return Pi(fp,e)}var pp=$("ZodCIDRv4",(e,t)=>{Cs.init(e,t),xe.init(e,t)});function lE(e){return Oi(pp,e)}var mp=$("ZodCIDRv6",(e,t)=>{Us.init(e,t),xe.init(e,t)});function dE(e){return ji(mp,e)}var hp=$("ZodBase64",(e,t)=>{Zs.init(e,t),xe.init(e,t)});function fE(e){return Ni(hp,e)}var gp=$("ZodBase64URL",(e,t)=>{Ms.init(e,t),xe.init(e,t)});function pE(e){return Ri(gp,e)}var vp=$("ZodE164",(e,t)=>{Ls.init(e,t),xe.init(e,t)});function mE(e){return Ai(vp,e)}var _p=$("ZodJWT",(e,t)=>{qs.init(e,t),xe.init(e,t)});function hE(e){return Di(_p,e)}var Mi=$("ZodCustomStringFormat",(e,t)=>{Vs.init(e,t),xe.init(e,t)});function gE(e,t,n={}){return en(Mi,e,t,n)}function vE(e){return en(Mi,"hostname",tt.hostname,e)}function _E(e){return en(Mi,"hex",tt.hex,e)}function yE(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=tt[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return en(Mi,o,r,t)}var Li=$("ZodNumber",(e,t)=>{li.init(e,t),te.init(e,t),e.gt=(o,r)=>e.check(Mt(o,r)),e.gte=(o,r)=>e.check(Ve(o,r)),e.min=(o,r)=>e.check(Ve(o,r)),e.lt=(o,r)=>e.check(Zt(o,r)),e.lte=(o,r)=>e.check(rt(o,r)),e.max=(o,r)=>e.check(rt(o,r)),e.int=o=>e.check(tp(o)),e.safe=o=>e.check(tp(o)),e.positive=o=>e.check(Mt(0,o)),e.nonnegative=o=>e.check(Ve(0,o)),e.negative=o=>e.check(Zt(0,o)),e.nonpositive=o=>e.check(rt(0,o)),e.multipleOf=(o,r)=>e.check(Sr(o,r)),e.step=(o,r)=>e.check(Sr(o,r)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function he(e){return Uc(Li,e)}var lo=$("ZodNumberFormat",(e,t)=>{Fs.init(e,t),Li.init(e,t)});function tp(e){return Mc(lo,e)}function bE(e){return Lc(lo,e)}function $E(e){return qc(lo,e)}function xE(e){return Vc(lo,e)}function wE(e){return Fc(lo,e)}var qi=$("ZodBoolean",(e,t)=>{Vn.init(e,t),te.init(e,t)});function Pe(e){return Bc(qi,e)}var Vi=$("ZodBigInt",(e,t)=>{di.init(e,t),te.init(e,t),e.gte=(o,r)=>e.check(Ve(o,r)),e.min=(o,r)=>e.check(Ve(o,r)),e.gt=(o,r)=>e.check(Mt(o,r)),e.gte=(o,r)=>e.check(Ve(o,r)),e.min=(o,r)=>e.check(Ve(o,r)),e.lt=(o,r)=>e.check(Zt(o,r)),e.lte=(o,r)=>e.check(rt(o,r)),e.max=(o,r)=>e.check(rt(o,r)),e.positive=o=>e.check(Mt(BigInt(0),o)),e.negative=o=>e.check(Zt(BigInt(0),o)),e.nonpositive=o=>e.check(rt(BigInt(0),o)),e.nonnegative=o=>e.check(Ve(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(Sr(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function kE(e){return Hc(Vi,e)}var yp=$("ZodBigIntFormat",(e,t)=>{Bs.init(e,t),Vi.init(e,t)});function SE(e){return Gc(yp,e)}function zE(e){return Wc(yp,e)}var E_=$("ZodSymbol",(e,t)=>{Ks.init(e,t),te.init(e,t)});function IE(e){return Xc(E_,e)}var T_=$("ZodUndefined",(e,t)=>{Hs.init(e,t),te.init(e,t)});function EE(e){return Yc(T_,e)}var P_=$("ZodNull",(e,t)=>{Js.init(e,t),te.init(e,t)});function Fi(e){return Qc(P_,e)}var O_=$("ZodAny",(e,t)=>{Gs.init(e,t),te.init(e,t)});function TE(){return eu(O_)}var j_=$("ZodUnknown",(e,t)=>{Ws.init(e,t),te.init(e,t)});function ye(){return tu(j_)}var N_=$("ZodNever",(e,t)=>{Xs.init(e,t),te.init(e,t)});function bp(e){return ru(N_,e)}var R_=$("ZodVoid",(e,t)=>{Ys.init(e,t),te.init(e,t)});function PE(e){return nu(R_,e)}var Eu=$("ZodDate",(e,t)=>{Qs.init(e,t),te.init(e,t),e.min=(o,r)=>e.check(Ve(o,r)),e.max=(o,r)=>e.check(rt(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function OE(e){return ou(Eu,e)}var A_=$("ZodArray",(e,t)=>{ec.init(e,t),te.init(e,t),e.element=t.element,e.min=(n,o)=>e.check(tr(n,o)),e.nonempty=n=>e.check(tr(1,n)),e.max=(n,o)=>e.check(Yr(n,o)),e.length=(n,o)=>e.check(Qr(n,o)),e.unwrap=()=>e.element});function ie(e,t){return Cf(A_,e,t)}function jE(e){let t=e._zod.def.shape;return Be(Object.keys(t))}var Tu=$("ZodObject",(e,t)=>{Df.init(e,t),te.init(e,t),E.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Be(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ye()}),e.loose=()=>e.clone({...e._zod.def,catchall:ye()}),e.strict=()=>e.clone({...e._zod.def,catchall:bp()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>E.extend(e,n),e.safeExtend=n=>E.safeExtend(e,n),e.merge=n=>E.merge(e,n),e.pick=n=>E.pick(e,n),e.omit=n=>E.omit(e,n),e.partial=(...n)=>E.partial(Ki,e,n[0]),e.required=(...n)=>E.required(kp,e,n[0])});function Z(e,t){let n={type:"object",get shape(){return E.assignProp(this,"shape",e?E.objectClone(e):{}),this.shape},...E.normalizeParams(t)};return new Tu(n)}function NE(e,t){return new Tu({type:"object",get shape(){return E.assignProp(this,"shape",E.objectClone(e)),this.shape},catchall:bp(),...E.normalizeParams(t)})}function Fe(e,t){return new Tu({type:"object",get shape(){return E.assignProp(this,"shape",E.objectClone(e)),this.shape},catchall:ye(),...E.normalizeParams(t)})}var $p=$("ZodUnion",(e,t)=>{fi.init(e,t),te.init(e,t),e.options=t.options});function ve(e,t){return new $p({type:"union",options:e,...E.normalizeParams(t)})}var D_=$("ZodDiscriminatedUnion",(e,t)=>{$p.init(e,t),rc.init(e,t)});function Pu(e,t,n){return new D_({type:"union",options:t,discriminator:e,...E.normalizeParams(n)})}var C_=$("ZodIntersection",(e,t)=>{nc.init(e,t),te.init(e,t)});function Bi(e,t){return new C_({type:"intersection",left:e,right:t})}var U_=$("ZodTuple",(e,t)=>{pi.init(e,t),te.init(e,t),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Z_(e,t,n){let o=t instanceof W,r=o?n:t,i=o?t:null;return new U_({type:"tuple",items:e,rest:i,...E.normalizeParams(r)})}var xp=$("ZodRecord",(e,t)=>{oc.init(e,t),te.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function we(e,t,n){return new xp({type:"record",keyType:e,valueType:t,...E.normalizeParams(n)})}function RE(e,t,n){let o=Ne(e);return o._zod.values=void 0,new xp({type:"record",keyType:o,valueType:t,...E.normalizeParams(n)})}var M_=$("ZodMap",(e,t)=>{ic.init(e,t),te.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function AE(e,t,n){return new M_({type:"map",keyType:e,valueType:t,...E.normalizeParams(n)})}var L_=$("ZodSet",(e,t)=>{ac.init(e,t),te.init(e,t),e.min=(...n)=>e.check(zr(...n)),e.nonempty=n=>e.check(zr(1,n)),e.max=(...n)=>e.check(Xr(...n)),e.size=(...n)=>e.check(Gn(...n))});function DE(e,t){return new L_({type:"set",valueType:e,...E.normalizeParams(t)})}var Ui=$("ZodEnum",(e,t)=>{sc.init(e,t),te.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let a of o)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Ui({...t,checks:[],...E.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let a of o)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Ui({...t,checks:[],...E.normalizeParams(r),entries:i})}});function Be(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Ui({type:"enum",entries:n,...E.normalizeParams(t)})}function CE(e,t){return new Ui({type:"enum",entries:e,...E.normalizeParams(t)})}var q_=$("ZodLiteral",(e,t)=>{cc.init(e,t),te.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function B(e,t){return new q_({type:"literal",values:Array.isArray(e)?e:[e],...E.normalizeParams(t)})}var V_=$("ZodFile",(e,t)=>{uc.init(e,t),te.init(e,t),e.min=(n,o)=>e.check(zr(n,o)),e.max=(n,o)=>e.check(Xr(n,o)),e.mime=(n,o)=>e.check(ro(Array.isArray(n)?n:[n],o))});function UE(e){return fu(V_,e)}var F_=$("ZodTransform",(e,t)=>{lc.init(e,t),te.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new gr(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(E.issue(i,n.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(E.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n)):(n.value=r,n)}});function wp(e){return new F_({type:"transform",transform:e})}var Ki=$("ZodOptional",(e,t)=>{dc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ke(e){return new Ki({type:"optional",innerType:e})}var B_=$("ZodNullable",(e,t)=>{fc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function Su(e){return new B_({type:"nullable",innerType:e})}function ZE(e){return ke(Su(e))}var K_=$("ZodDefault",(e,t)=>{pc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function H_(e,t){return new K_({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():E.shallowClone(t)}})}var J_=$("ZodPrefault",(e,t)=>{mc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function G_(e,t){return new J_({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():E.shallowClone(t)}})}var kp=$("ZodNonOptional",(e,t)=>{hc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function W_(e,t){return new kp({type:"nonoptional",innerType:e,...E.normalizeParams(t)})}var X_=$("ZodSuccess",(e,t)=>{gc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ME(e){return new X_({type:"success",innerType:e})}var Y_=$("ZodCatch",(e,t)=>{vc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Q_(e,t){return new Y_({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var ey=$("ZodNaN",(e,t)=>{_c.init(e,t),te.init(e,t)});function LE(e){return au(ey,e)}var Sp=$("ZodPipe",(e,t)=>{yc.init(e,t),te.init(e,t),e.in=t.in,e.out=t.out});function zu(e,t){return new Sp({type:"pipe",in:e,out:t})}var zp=$("ZodCodec",(e,t)=>{Sp.init(e,t),Fn.init(e,t)});function qE(e,t,n){return new zp({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}var ty=$("ZodReadonly",(e,t)=>{bc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ry(e){return new ty({type:"readonly",innerType:e})}var ny=$("ZodTemplateLiteral",(e,t)=>{$c.init(e,t),te.init(e,t)});function VE(e,t){return new ny({type:"template_literal",parts:e,...E.normalizeParams(t)})}var oy=$("ZodLazy",(e,t)=>{kc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.getter()});function iy(e){return new oy({type:"lazy",getter:e})}var ay=$("ZodPromise",(e,t)=>{wc.init(e,t),te.init(e,t),e.unwrap=()=>e._zod.def.innerType});function FE(e){return new ay({type:"promise",innerType:e})}var sy=$("ZodFunction",(e,t)=>{xc.init(e,t),te.init(e,t)});function BE(e){return new sy({type:"function",input:Array.isArray(e?.input)?Z_(e?.input):e?.input??ie(ye()),output:e?.output??ye()})}var Ou=$("ZodCustom",(e,t)=>{Sc.init(e,t),te.init(e,t)});function KE(e){let t=new $e({check:"custom"});return t._zod.check=e,t}function Ip(e,t){return pu(Ou,e??(()=>!0),t)}function cy(e,t={}){return mu(Ou,e,t)}function uy(e){return hu(e)}function HE(e,t={error:`Input not instance of ${e.name}`}){let n=new Ou({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...E.normalizeParams(t)});return n._zod.bag.Class=e,n}var JE=(...e)=>gu({Codec:zp,Boolean:qi,String:Zi},...e);function GE(e){let t=iy(()=>ve([k(e),he(),Pe(),Fi(),ie(t),we(k(),t)]));return t}function ju(e,t){return zu(wp(e),t)}var WE={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function XE(e){Ee({customError:e})}function YE(){return Ee().customError}var Ep;Ep||(Ep={});var Tp={};Fr(Tp,{bigint:()=>rT,boolean:()=>tT,date:()=>nT,number:()=>eT,string:()=>QE});function QE(e){return jc(Zi,e)}function eT(e){return Zc(Li,e)}function tT(e){return Kc(qi,e)}function rT(e){return Jc(Vi,e)}function nT(e){return iu(Eu,e)}Ee(zc());var Op="2025-11-25";var ly=[Op,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Tr="io.modelcontextprotocol/related-task",Ru="2.0",Ae=Ip(e=>e!==null&&(typeof e=="object"||typeof e=="function")),dy=ve([k(),he().int()]),fy=k(),JZ=Fe({ttl:ve([he(),Fi()]).optional(),pollInterval:he().optional()}),iT=Z({ttl:he().optional()}),aT=Z({taskId:k()}),jp=Fe({progressToken:dy.optional(),[Tr]:aT.optional()}),mt=Z({_meta:jp.optional()}),Hi=mt.extend({task:iT.optional()}),py=e=>Hi.safeParse(e).success,De=Z({method:k(),params:mt.loose().optional()}),_t=Z({_meta:jp.optional()}),yt=Z({method:k(),params:_t.loose().optional()}),Ce=Fe({_meta:jp.optional()}),Au=ve([k(),he().int()]),my=Z({jsonrpc:B(Ru),id:Au,...De.shape}).strict(),Np=e=>my.safeParse(e).success,hy=Z({jsonrpc:B(Ru),...yt.shape}).strict(),gy=e=>hy.safeParse(e).success,Rp=Z({jsonrpc:B(Ru),id:Au,result:Ce}).strict(),Ji=e=>Rp.safeParse(e).success;var H;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(H||(H={}));var Ap=Z({jsonrpc:B(Ru),id:Au.optional(),error:Z({code:he().int(),message:k(),data:ye().optional()})}).strict();var vy=e=>Ap.safeParse(e).success;var _y=ve([my,hy,Rp,Ap]),GZ=ve([Rp,Ap]),Du=Ce.strict(),sT=_t.extend({requestId:Au.optional(),reason:k().optional()}),Cu=yt.extend({method:B("notifications/cancelled"),params:sT}),cT=Z({src:k(),mimeType:k().optional(),sizes:ie(k()).optional(),theme:Be(["light","dark"]).optional()}),Gi=Z({icons:ie(cT).optional()}),fo=Z({name:k(),title:k().optional()}),yy=fo.extend({...fo.shape,...Gi.shape,version:k(),websiteUrl:k().optional(),description:k().optional()}),uT=Bi(Z({applyDefaults:Pe().optional()}),we(k(),ye())),lT=ju(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Bi(Z({form:uT.optional(),url:Ae.optional()}),we(k(),ye()).optional())),dT=Fe({list:Ae.optional(),cancel:Ae.optional(),requests:Fe({sampling:Fe({createMessage:Ae.optional()}).optional(),elicitation:Fe({create:Ae.optional()}).optional()}).optional()}),fT=Fe({list:Ae.optional(),cancel:Ae.optional(),requests:Fe({tools:Fe({call:Ae.optional()}).optional()}).optional()}),pT=Z({experimental:we(k(),Ae).optional(),sampling:Z({context:Ae.optional(),tools:Ae.optional()}).optional(),elicitation:lT.optional(),roots:Z({listChanged:Pe().optional()}).optional(),tasks:dT.optional()}),mT=mt.extend({protocolVersion:k(),capabilities:pT,clientInfo:yy}),Dp=De.extend({method:B("initialize"),params:mT});var hT=Z({experimental:we(k(),Ae).optional(),logging:Ae.optional(),completions:Ae.optional(),prompts:Z({listChanged:Pe().optional()}).optional(),resources:Z({subscribe:Pe().optional(),listChanged:Pe().optional()}).optional(),tools:Z({listChanged:Pe().optional()}).optional(),tasks:fT.optional()}),gT=Ce.extend({protocolVersion:k(),capabilities:hT,serverInfo:yy,instructions:k().optional()}),Cp=yt.extend({method:B("notifications/initialized"),params:_t.optional()});var Uu=De.extend({method:B("ping"),params:mt.optional()}),vT=Z({progress:he(),total:ke(he()),message:ke(k())}),_T=Z({..._t.shape,...vT.shape,progressToken:dy}),Zu=yt.extend({method:B("notifications/progress"),params:_T}),yT=mt.extend({cursor:fy.optional()}),Wi=De.extend({params:yT.optional()}),Xi=Ce.extend({nextCursor:fy.optional()}),bT=Be(["working","input_required","completed","failed","cancelled"]),Yi=Z({taskId:k(),status:bT,ttl:ve([he(),Fi()]),createdAt:k(),lastUpdatedAt:k(),pollInterval:ke(he()),statusMessage:ke(k())}),po=Ce.extend({task:Yi}),$T=_t.merge(Yi),Qi=yt.extend({method:B("notifications/tasks/status"),params:$T}),Mu=De.extend({method:B("tasks/get"),params:mt.extend({taskId:k()})}),Lu=Ce.merge(Yi),qu=De.extend({method:B("tasks/result"),params:mt.extend({taskId:k()})}),WZ=Ce.loose(),Vu=Wi.extend({method:B("tasks/list")}),Fu=Xi.extend({tasks:ie(Yi)}),Bu=De.extend({method:B("tasks/cancel"),params:mt.extend({taskId:k()})}),by=Ce.merge(Yi),$y=Z({uri:k(),mimeType:ke(k()),_meta:we(k(),ye()).optional()}),xy=$y.extend({text:k()}),Up=k().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),wy=$y.extend({blob:Up}),ea=Be(["user","assistant"]),mo=Z({audience:ie(ea).optional(),priority:he().min(0).max(1).optional(),lastModified:uo.datetime({offset:!0}).optional()}),ky=Z({...fo.shape,...Gi.shape,uri:k(),description:ke(k()),mimeType:ke(k()),annotations:mo.optional(),_meta:ke(Fe({}))}),xT=Z({...fo.shape,...Gi.shape,uriTemplate:k(),description:ke(k()),mimeType:ke(k()),annotations:mo.optional(),_meta:ke(Fe({}))}),Ku=Wi.extend({method:B("resources/list")}),wT=Xi.extend({resources:ie(ky)}),Hu=Wi.extend({method:B("resources/templates/list")}),kT=Xi.extend({resourceTemplates:ie(xT)}),Zp=mt.extend({uri:k()}),ST=Zp,Ju=De.extend({method:B("resources/read"),params:ST}),zT=Ce.extend({contents:ie(ve([xy,wy]))}),IT=yt.extend({method:B("notifications/resources/list_changed"),params:_t.optional()}),ET=Zp,TT=De.extend({method:B("resources/subscribe"),params:ET}),PT=Zp,OT=De.extend({method:B("resources/unsubscribe"),params:PT}),jT=_t.extend({uri:k()}),NT=yt.extend({method:B("notifications/resources/updated"),params:jT}),RT=Z({name:k(),description:ke(k()),required:ke(Pe())}),AT=Z({...fo.shape,...Gi.shape,description:ke(k()),arguments:ke(ie(RT)),_meta:ke(Fe({}))}),Gu=Wi.extend({method:B("prompts/list")}),DT=Xi.extend({prompts:ie(AT)}),CT=mt.extend({name:k(),arguments:we(k(),k()).optional()}),Wu=De.extend({method:B("prompts/get"),params:CT}),Mp=Z({type:B("text"),text:k(),annotations:mo.optional(),_meta:we(k(),ye()).optional()}),Lp=Z({type:B("image"),data:Up,mimeType:k(),annotations:mo.optional(),_meta:we(k(),ye()).optional()}),qp=Z({type:B("audio"),data:Up,mimeType:k(),annotations:mo.optional(),_meta:we(k(),ye()).optional()}),UT=Z({type:B("tool_use"),name:k(),id:k(),input:we(k(),ye()),_meta:we(k(),ye()).optional()}),ZT=Z({type:B("resource"),resource:ve([xy,wy]),annotations:mo.optional(),_meta:we(k(),ye()).optional()}),MT=ky.extend({type:B("resource_link")}),Vp=ve([Mp,Lp,qp,MT,ZT]),LT=Z({role:ea,content:Vp}),qT=Ce.extend({description:k().optional(),messages:ie(LT)}),VT=yt.extend({method:B("notifications/prompts/list_changed"),params:_t.optional()}),FT=Z({title:k().optional(),readOnlyHint:Pe().optional(),destructiveHint:Pe().optional(),idempotentHint:Pe().optional(),openWorldHint:Pe().optional()}),BT=Z({taskSupport:Be(["required","optional","forbidden"]).optional()}),Sy=Z({...fo.shape,...Gi.shape,description:k().optional(),inputSchema:Z({type:B("object"),properties:we(k(),Ae).optional(),required:ie(k()).optional()}).catchall(ye()),outputSchema:Z({type:B("object"),properties:we(k(),Ae).optional(),required:ie(k()).optional()}).catchall(ye()).optional(),annotations:FT.optional(),execution:BT.optional(),_meta:we(k(),ye()).optional()}),Xu=Wi.extend({method:B("tools/list")}),KT=Xi.extend({tools:ie(Sy)}),Yu=Ce.extend({content:ie(Vp).default([]),structuredContent:we(k(),ye()).optional(),isError:Pe().optional()}),XZ=Yu.or(Ce.extend({toolResult:ye()})),HT=Hi.extend({name:k(),arguments:we(k(),ye()).optional()}),ho=De.extend({method:B("tools/call"),params:HT}),JT=yt.extend({method:B("notifications/tools/list_changed"),params:_t.optional()}),YZ=Z({autoRefresh:Pe().default(!0),debounceMs:he().int().nonnegative().default(300)}),ta=Be(["debug","info","notice","warning","error","critical","alert","emergency"]),GT=mt.extend({level:ta}),Fp=De.extend({method:B("logging/setLevel"),params:GT}),WT=_t.extend({level:ta,logger:k().optional(),data:ye()}),XT=yt.extend({method:B("notifications/message"),params:WT}),YT=Z({name:k().optional()}),QT=Z({hints:ie(YT).optional(),costPriority:he().min(0).max(1).optional(),speedPriority:he().min(0).max(1).optional(),intelligencePriority:he().min(0).max(1).optional()}),eP=Z({mode:Be(["auto","required","none"]).optional()}),tP=Z({type:B("tool_result"),toolUseId:k().describe("The unique identifier for the corresponding tool call."),content:ie(Vp).default([]),structuredContent:Z({}).loose().optional(),isError:Pe().optional(),_meta:we(k(),ye()).optional()}),rP=Pu("type",[Mp,Lp,qp]),Nu=Pu("type",[Mp,Lp,qp,UT,tP]),nP=Z({role:ea,content:ve([Nu,ie(Nu)]),_meta:we(k(),ye()).optional()}),oP=Hi.extend({messages:ie(nP),modelPreferences:QT.optional(),systemPrompt:k().optional(),includeContext:Be(["none","thisServer","allServers"]).optional(),temperature:he().optional(),maxTokens:he().int(),stopSequences:ie(k()).optional(),metadata:Ae.optional(),tools:ie(Sy).optional(),toolChoice:eP.optional()}),iP=De.extend({method:B("sampling/createMessage"),params:oP}),ra=Ce.extend({model:k(),stopReason:ke(Be(["endTurn","stopSequence","maxTokens"]).or(k())),role:ea,content:rP}),Bp=Ce.extend({model:k(),stopReason:ke(Be(["endTurn","stopSequence","maxTokens","toolUse"]).or(k())),role:ea,content:ve([Nu,ie(Nu)])}),aP=Z({type:B("boolean"),title:k().optional(),description:k().optional(),default:Pe().optional()}),sP=Z({type:B("string"),title:k().optional(),description:k().optional(),minLength:he().optional(),maxLength:he().optional(),format:Be(["email","uri","date","date-time"]).optional(),default:k().optional()}),cP=Z({type:Be(["number","integer"]),title:k().optional(),description:k().optional(),minimum:he().optional(),maximum:he().optional(),default:he().optional()}),uP=Z({type:B("string"),title:k().optional(),description:k().optional(),enum:ie(k()),default:k().optional()}),lP=Z({type:B("string"),title:k().optional(),description:k().optional(),oneOf:ie(Z({const:k(),title:k()})),default:k().optional()}),dP=Z({type:B("string"),title:k().optional(),description:k().optional(),enum:ie(k()),enumNames:ie(k()).optional(),default:k().optional()}),fP=ve([uP,lP]),pP=Z({type:B("array"),title:k().optional(),description:k().optional(),minItems:he().optional(),maxItems:he().optional(),items:Z({type:B("string"),enum:ie(k())}),default:ie(k()).optional()}),mP=Z({type:B("array"),title:k().optional(),description:k().optional(),minItems:he().optional(),maxItems:he().optional(),items:Z({anyOf:ie(Z({const:k(),title:k()}))}),default:ie(k()).optional()}),hP=ve([pP,mP]),gP=ve([dP,fP,hP]),vP=ve([gP,aP,sP,cP]),_P=Hi.extend({mode:B("form").optional(),message:k(),requestedSchema:Z({type:B("object"),properties:we(k(),vP),required:ie(k()).optional()})}),yP=Hi.extend({mode:B("url"),message:k(),elicitationId:k(),url:k().url()}),bP=ve([_P,yP]),$P=De.extend({method:B("elicitation/create"),params:bP}),xP=_t.extend({elicitationId:k()}),wP=yt.extend({method:B("notifications/elicitation/complete"),params:xP}),go=Ce.extend({action:Be(["accept","decline","cancel"]),content:ju(e=>e===null?void 0:e,we(k(),ve([k(),he(),Pe(),ie(k())])).optional())}),kP=Z({type:B("ref/resource"),uri:k()});var SP=Z({type:B("ref/prompt"),name:k()}),zP=mt.extend({ref:ve([SP,kP]),argument:Z({name:k(),value:k()}),context:Z({arguments:we(k(),k()).optional()}).optional()}),Qu=De.extend({method:B("completion/complete"),params:zP});function zy(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function Iy(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var IP=Ce.extend({completion:Fe({values:ie(k()).max(100),total:ke(he().int()),hasMore:ke(Pe())})}),EP=Z({uri:k().startsWith("file://"),name:k().optional(),_meta:we(k(),ye()).optional()}),TP=De.extend({method:B("roots/list"),params:mt.optional()}),Kp=Ce.extend({roots:ie(EP)}),PP=yt.extend({method:B("notifications/roots/list_changed"),params:_t.optional()}),QZ=ve([Uu,Dp,Qu,Fp,Wu,Gu,Ku,Hu,Ju,TT,OT,ho,Xu,Mu,qu,Vu,Bu]),e6=ve([Cu,Zu,Cp,PP,Qi]),t6=ve([Du,ra,Bp,go,Kp,Lu,Fu,po]),r6=ve([Uu,iP,$P,TP,Mu,qu,Vu,Bu]),n6=ve([Cu,Zu,XT,NT,IT,JT,VT,Qi,wP]),o6=ve([Du,gT,IP,qT,DT,wT,kT,zT,Yu,KT,Lu,Fu,po]),F=class e extends Error{constructor(t,n,o){super(`MCP error ${t}: ${n}`),this.code=t,this.data=o,this.name="McpError"}static fromError(t,n,o){if(t===H.UrlElicitationRequired&&o){let r=o;if(r.elicitations)return new Pp(r.elicitations,n)}return new e(t,n,o)}},Pp=class extends F{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(H.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}};function Pr(e){return e==="completed"||e==="failed"||e==="cancelled"}var Ty=Symbol("Let zodToJsonSchema decide on which parser to use");var Ey={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},Py=e=>typeof e=="string"?{...Ey,name:e}:{...Ey,...e};var Oy=e=>{let t=Py(e),n=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([o,r])=>[r._def,{def:r._def,path:[...t.basePath,t.definitionPath,o],jsonSchema:void 0}]))}};function Hp(e,t,n,o){o?.errorMessages&&n&&(e.errorMessage={...e.errorMessage,[t]:n})}function ue(e,t,n,o,r){e[t]=n,Hp(e,t,o,r)}var el=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join("/")};function Ie(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?el(t,e.currentPath):t.join("/")}}function jy(e,t){let n={type:"array"};return e.type?._def&&e.type?._def?.typeName!==O.ZodAny&&(n.items=G(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&ue(n,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&ue(n,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(ue(n,"minItems",e.exactLength.value,e.exactLength.message,t),ue(n,"maxItems",e.exactLength.value,e.exactLength.message,t)),n}function Ny(e,t){let n={type:"integer",format:"int64"};if(!e.checks)return n;for(let o of e.checks)switch(o.kind){case"min":t.target==="jsonSchema7"?o.inclusive?ue(n,"minimum",o.value,o.message,t):ue(n,"exclusiveMinimum",o.value,o.message,t):(o.inclusive||(n.exclusiveMinimum=!0),ue(n,"minimum",o.value,o.message,t));break;case"max":t.target==="jsonSchema7"?o.inclusive?ue(n,"maximum",o.value,o.message,t):ue(n,"exclusiveMaximum",o.value,o.message,t):(o.inclusive||(n.exclusiveMaximum=!0),ue(n,"maximum",o.value,o.message,t));break;case"multipleOf":ue(n,"multipleOf",o.value,o.message,t);break}return n}function Ry(){return{type:"boolean"}}function tl(e,t){return G(e.type._def,t)}var Ay=(e,t)=>G(e.innerType._def,t);function Jp(e,t,n){let o=n??t.dateStrategy;if(Array.isArray(o))return{anyOf:o.map((r,i)=>Jp(e,t,r))};switch(o){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return OP(e,t)}}var OP=(e,t)=>{let n={type:"integer",format:"unix-time"};if(t.target==="openApi3")return n;for(let o of e.checks)switch(o.kind){case"min":ue(n,"minimum",o.value,o.message,t);break;case"max":ue(n,"maximum",o.value,o.message,t);break}return n};function Dy(e,t){return{...G(e.innerType._def,t),default:e.defaultValue()}}function Cy(e,t){return t.effectStrategy==="input"?G(e.schema._def,t):Ie(t)}function Uy(e){return{type:"string",enum:Array.from(e.values)}}var jP=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function Zy(e,t){let n=[G(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),G(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i),o=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,r=[];return n.forEach(i=>{if(jP(i))r.push(...i.allOf),i.unevaluatedProperties===void 0&&(o=void 0);else{let a=i;if("additionalProperties"in i&&i.additionalProperties===!1){let{additionalProperties:s,...c}=i;a=c}else o=void 0;r.push(a)}}),r.length?{allOf:r,...o}:void 0}function My(e,t){let n=typeof e.value;return n!=="bigint"&&n!=="number"&&n!=="boolean"&&n!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:n==="bigint"?"integer":n,enum:[e.value]}:{type:n==="bigint"?"integer":n,const:e.value}}var Gp,Pt={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(Gp===void 0&&(Gp=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Gp),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function rl(e,t){let n={type:"string"};if(e.checks)for(let o of e.checks)switch(o.kind){case"min":ue(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,o.value):o.value,o.message,t);break;case"max":ue(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,o.value):o.value,o.message,t);break;case"email":switch(t.emailStrategy){case"format:email":Ot(n,"email",o.message,t);break;case"format:idn-email":Ot(n,"idn-email",o.message,t);break;case"pattern:zod":We(n,Pt.email,o.message,t);break}break;case"url":Ot(n,"uri",o.message,t);break;case"uuid":Ot(n,"uuid",o.message,t);break;case"regex":We(n,o.regex,o.message,t);break;case"cuid":We(n,Pt.cuid,o.message,t);break;case"cuid2":We(n,Pt.cuid2,o.message,t);break;case"startsWith":We(n,RegExp(`^${Wp(o.value,t)}`),o.message,t);break;case"endsWith":We(n,RegExp(`${Wp(o.value,t)}$`),o.message,t);break;case"datetime":Ot(n,"date-time",o.message,t);break;case"date":Ot(n,"date",o.message,t);break;case"time":Ot(n,"time",o.message,t);break;case"duration":Ot(n,"duration",o.message,t);break;case"length":ue(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,o.value):o.value,o.message,t),ue(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,o.value):o.value,o.message,t);break;case"includes":{We(n,RegExp(Wp(o.value,t)),o.message,t);break}case"ip":{o.version!=="v6"&&Ot(n,"ipv4",o.message,t),o.version!=="v4"&&Ot(n,"ipv6",o.message,t);break}case"base64url":We(n,Pt.base64url,o.message,t);break;case"jwt":We(n,Pt.jwt,o.message,t);break;case"cidr":{o.version!=="v6"&&We(n,Pt.ipv4Cidr,o.message,t),o.version!=="v4"&&We(n,Pt.ipv6Cidr,o.message,t);break}case"emoji":We(n,Pt.emoji(),o.message,t);break;case"ulid":{We(n,Pt.ulid,o.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Ot(n,"binary",o.message,t);break}case"contentEncoding:base64":{ue(n,"contentEncoding","base64",o.message,t);break}case"pattern:zod":{We(n,Pt.base64,o.message,t);break}}break}case"nanoid":We(n,Pt.nanoid,o.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return n}function Wp(e,t){return t.patternStrategy==="escape"?RP(e):e}var NP=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function RP(e){let t="";for(let n=0;n<e.length;n++)NP.has(e[n])||(t+="\\"),t+=e[n];return t}function Ot(e,t,n,o){e.format||e.anyOf?.some(r=>r.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&o.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...n&&o.errorMessages&&{errorMessage:{format:n}}})):ue(e,"format",t,n,o)}function We(e,t,n,o){e.pattern||e.allOf?.some(r=>r.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&o.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:Ly(t,o),...n&&o.errorMessages&&{errorMessage:{pattern:n}}})):ue(e,"pattern",Ly(t,o),n,o)}function Ly(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let n={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},o=n.i?e.source.toLowerCase():e.source,r="",i=!1,a=!1,s=!1;for(let c=0;c<o.length;c++){if(i){r+=o[c],i=!1;continue}if(n.i){if(a){if(o[c].match(/[a-z]/)){s?(r+=o[c],r+=`${o[c-2]}-${o[c]}`.toUpperCase(),s=!1):o[c+1]==="-"&&o[c+2]?.match(/[a-z]/)?(r+=o[c],s=!0):r+=`${o[c]}${o[c].toUpperCase()}`;continue}}else if(o[c].match(/[a-z]/)){r+=`[${o[c]}${o[c].toUpperCase()}]`;continue}}if(n.m){if(o[c]==="^"){r+=`(^|(?<=[\r
|
|
57
57
|
]))`;continue}else if(o[c]==="$"){r+=`($|(?=[\r
|
|
58
58
|
]))`;continue}}if(n.s&&o[c]==="."){r+=a?`${o[c]}\r
|
|
59
59
|
`:`[${o[c]}\r
|
|
60
|
-
]`;continue}r+=o[c],o[c]==="\\"?i=!0:a&&o[c]==="]"?a=!1:!a&&o[c]==="["&&(a=!0)}try{new RegExp(r)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return r}function tl(e,t){if(t.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),t.target==="openApi3"&&e.keyType?._def.typeName===j.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((o,r)=>({...o,[r]:G(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",r]})??Ie(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let n={type:"object",additionalProperties:G(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return n;if(e.keyType?._def.typeName===j.ZodString&&e.keyType._def.checks?.length){let{type:o,...r}=el(e.keyType._def,t);return{...n,propertyNames:r}}else{if(e.keyType?._def.typeName===j.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===j.ZodBranded&&e.keyType._def.type._def.typeName===j.ZodString&&e.keyType._def.type._def.checks?.length){let{type:o,...r}=Qu(e.keyType._def,t);return{...n,propertyNames:r}}}return n}function Dy(e,t){if(t.mapStrategy==="record")return tl(e,t);let n=G(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Ie(t),o=G(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Ie(t);return{type:"array",maxItems:125,items:{type:"array",items:[n,o],minItems:2,maxItems:2}}}function Cy(e){let t=e.values,o=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),r=Array.from(new Set(o.map(i=>typeof i)));return{type:r.length===1?r[0]==="string"?"string":"number":["string","number"],enum:o}}function Zy(e){return e.target==="openAi"?void 0:{not:Ie({...e,currentPath:[...e.currentPath,"not"]})}}function Uy(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var ta={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Ly(e,t){if(t.target==="openApi3")return My(e,t);let n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(o=>o._def.typeName in ta&&(!o._def.checks||!o._def.checks.length))){let o=n.reduce((r,i)=>{let a=ta[i._def.typeName];return a&&!r.includes(a)?[...r,a]:r},[]);return{type:o.length>1?o:o[0]}}else if(n.every(o=>o._def.typeName==="ZodLiteral"&&!o.description)){let o=n.reduce((r,i)=>{let a=typeof i._def.value;switch(a){case"string":case"number":case"boolean":return[...r,a];case"bigint":return[...r,"integer"];case"object":if(i._def.value===null)return[...r,"null"];default:return r}},[]);if(o.length===n.length){let r=o.filter((i,a,s)=>s.indexOf(i)===a);return{type:r.length>1?r:r[0],enum:n.reduce((i,a)=>i.includes(a._def.value)?i:[...i,a._def.value],[])}}}else if(n.every(o=>o._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((o,r)=>[...o,...r._def.values.filter(i=>!o.includes(i))],[])};return My(e,t)}var My=(e,t)=>{let n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((o,r)=>G(o._def,{...t,currentPath:[...t.currentPath,"anyOf",`${r}`]})).filter(o=>!!o&&(!t.strictUnions||typeof o=="object"&&Object.keys(o).length>0));return n.length?{anyOf:n}:void 0};function qy(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:ta[e.innerType._def.typeName],nullable:!0}:{type:[ta[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let o=G(e.innerType._def,{...t,currentPath:[...t.currentPath]});return o&&"$ref"in o?{allOf:[o],nullable:!0}:o&&{...o,nullable:!0}}let n=G(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}function Vy(e,t){let n={type:"number"};if(!e.checks)return n;for(let o of e.checks)switch(o.kind){case"int":n.type="integer",qp(n,"type",o.message,t);break;case"min":t.target==="jsonSchema7"?o.inclusive?ue(n,"minimum",o.value,o.message,t):ue(n,"exclusiveMinimum",o.value,o.message,t):(o.inclusive||(n.exclusiveMinimum=!0),ue(n,"minimum",o.value,o.message,t));break;case"max":t.target==="jsonSchema7"?o.inclusive?ue(n,"maximum",o.value,o.message,t):ue(n,"exclusiveMaximum",o.value,o.message,t):(o.inclusive||(n.exclusiveMaximum=!0),ue(n,"maximum",o.value,o.message,t));break;case"multipleOf":ue(n,"multipleOf",o.value,o.message,t);break}return n}function Fy(e,t){let n=t.target==="openAi",o={type:"object",properties:{}},r=[],i=e.shape();for(let s in i){let c=i[s];if(c===void 0||c._def===void 0)continue;let l=SP(c);l&&n&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),l=!1);let d=G(c._def,{...t,currentPath:[...t.currentPath,"properties",s],propertyPath:[...t.currentPath,"properties",s]});d!==void 0&&(o.properties[s]=d,l||r.push(s))}r.length&&(o.required=r);let a=kP(e,t);return a!==void 0&&(o.additionalProperties=a),o}function kP(e,t){if(e.catchall._def.typeName!=="ZodNever")return G(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function SP(e){try{return e.isOptional()}catch{return!0}}var By=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return G(e.innerType._def,t);let n=G(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:Ie(t)},n]}:Ie(t)};var Ky=(e,t)=>{if(t.pipeStrategy==="input")return G(e.in._def,t);if(t.pipeStrategy==="output")return G(e.out._def,t);let n=G(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),o=G(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]});return{allOf:[n,o].filter(r=>r!==void 0)}};function Hy(e,t){return G(e.type._def,t)}function Jy(e,t){let o={type:"array",uniqueItems:!0,items:G(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&ue(o,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&ue(o,"maxItems",e.maxSize.value,e.maxSize.message,t),o}function Gy(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((n,o)=>G(n._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((n,o)=>o===void 0?n:[...n,o],[]),additionalItems:G(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((n,o)=>G(n._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((n,o)=>o===void 0?n:[...n,o],[])}}function Wy(e){return{not:Ie(e)}}function Xy(e){return Ie(e)}var Yy=(e,t)=>G(e.innerType._def,t);var Qy=(e,t,n)=>{switch(t){case j.ZodString:return el(e,n);case j.ZodNumber:return Vy(e,n);case j.ZodObject:return Fy(e,n);case j.ZodBigInt:return Iy(e,n);case j.ZodBoolean:return Ey();case j.ZodDate:return Vp(e,n);case j.ZodUndefined:return Wy(n);case j.ZodNull:return Uy(n);case j.ZodArray:return zy(e,n);case j.ZodUnion:case j.ZodDiscriminatedUnion:return Ly(e,n);case j.ZodIntersection:return Ny(e,n);case j.ZodTuple:return Gy(e,n);case j.ZodRecord:return tl(e,n);case j.ZodLiteral:return Ry(e,n);case j.ZodEnum:return Oy(e);case j.ZodNativeEnum:return Cy(e);case j.ZodNullable:return qy(e,n);case j.ZodOptional:return By(e,n);case j.ZodMap:return Dy(e,n);case j.ZodSet:return Jy(e,n);case j.ZodLazy:return()=>e.getter()._def;case j.ZodPromise:return Hy(e,n);case j.ZodNaN:case j.ZodNever:return Zy(n);case j.ZodEffects:return jy(e,n);case j.ZodAny:return Ie(n);case j.ZodUnknown:return Xy(n);case j.ZodDefault:return Py(e,n);case j.ZodBranded:return Qu(e,n);case j.ZodReadonly:return Yy(e,n);case j.ZodCatch:return Ty(e,n);case j.ZodPipeline:return Ky(e,n);case j.ZodFunction:case j.ZodVoid:case j.ZodSymbol:return;default:return(o=>{})(t)}};function G(e,t,n=!1){let o=t.seen.get(e);if(t.override){let s=t.override?.(e,t,o,n);if(s!==wy)return s}if(o&&!n){let s=zP(o,t);if(s!==void 0)return s}let r={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,r);let i=Qy(e,e.typeName,t),a=typeof i=="function"?G(i(),t):i;if(a&&IP(e,t,a),t.postProcess){let s=t.postProcess(a,e,t);return r.jsonSchema=a,s}return r.jsonSchema=a,a}var zP=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Yu(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((n,o)=>t.currentPath[o]===n)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Ie(t)):t.$refStrategy==="seen"?Ie(t):void 0}},IP=(e,t,n)=>(e.description&&(n.description=e.description,t.markdownDescription&&(n.markdownDescription=e.description)),n);var Kp=(e,t)=>{let n=Sy(t),o=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[l,d])=>({...c,[l]:G(d._def,{...n,currentPath:[...n.basePath,n.definitionPath,l]},!0)??Ie(n)}),{}):void 0,r=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=G(e._def,r===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,r]},!1)??Ie(n),a=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;a!==void 0&&(i.title=a),n.flags.hasReferencedOpenAiAnyType&&(o||(o={}),o[n.openAiAnyTypeName]||(o[n.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:n.$refStrategy==="relative"?"1":[...n.basePath,n.definitionPath,n.openAiAnyTypeName].join("/")}}));let s=r===void 0?o?{...i,[n.definitionPath]:o}:i:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,r].join("/"),[n.definitionPath]:{...o,[r]:i}};return n.target==="jsonSchema7"?s.$schema="http://json-schema.org/draft-07/schema#":(n.target==="jsonSchema2019-09"||n.target==="openAi")&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),n.target==="openAi"&&("anyOf"in s||"oneOf"in s||"allOf"in s||"type"in s&&Array.isArray(s.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),s};function EP(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function Hp(e,t){return gt(e)?io(e,{target:EP(t?.target),io:t?.pipeStrategy??"input"}):Kp(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function Jp(e){let n=zr(e)?.method;if(!n)throw new Error("Schema is missing a method literal");let o=vu(n);if(typeof o!="string")throw new Error("Schema method literal must be a string");return o}function Gp(e,t){let n=Sr(e,t);if(!n.success)throw n.error;return n.data}var TP=6e4,rl=class{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Au,n=>{this._oncancel(n)}),this.setNotificationHandler(Cu,n=>{this._onprogress(n)}),this.setRequestHandler(Du,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Zu,async(n,o)=>{let r=await this._taskStore.getTask(n.params.taskId,o.sessionId);if(!r)throw new F(H.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(Mu,async(n,o)=>{let r=async()=>{let i=n.params.taskId;if(this._taskMessageQueue){let s;for(;s=await this._taskMessageQueue.dequeue(i,o.sessionId);){if(s.type==="response"||s.type==="error"){let c=s.message,l=c.id,d=this._requestResolvers.get(l);if(d)if(this._requestResolvers.delete(l),s.type==="response")d(c);else{let f=c,y=new F(f.error.code,f.error.message,f.error.data);d(y)}else{let f=s.type==="response"?"Response":"Error";this._onerror(new Error(`${f} handler missing for request ${l}`))}continue}await this._transport?.send(s.message,{relatedRequestId:o.requestId})}}let a=await this._taskStore.getTask(i,o.sessionId);if(!a)throw new F(H.InvalidParams,`Task not found: ${i}`);if(!Er(a.status))return await this._waitForTaskUpdate(i,o.signal),await r();if(Er(a.status)){let s=await this._taskStore.getTaskResult(i,o.sessionId);return this._clearTaskQueue(i),{...s,_meta:{...s._meta,[Ir]:{taskId:i}}}}return await r()};return await r()}),this.setRequestHandler(Lu,async(n,o)=>{try{let{tasks:r,nextCursor:i}=await this._taskStore.listTasks(n.params?.cursor,o.sessionId);return{tasks:r,nextCursor:i,_meta:{}}}catch(r){throw new F(H.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(Vu,async(n,o)=>{try{let r=await this._taskStore.getTask(n.params.taskId,o.sessionId);if(!r)throw new F(H.InvalidParams,`Task not found: ${n.params.taskId}`);if(Er(r.status))throw new F(H.InvalidParams,`Cannot cancel task in terminal status: ${r.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",o.sessionId),this._clearTaskQueue(n.params.taskId);let i=await this._taskStore.getTask(n.params.taskId,o.sessionId);if(!i)throw new F(H.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...i}}catch(r){throw r instanceof F?r:new F(H.InvalidRequest,`Failed to cancel task: ${r instanceof Error?r.message:String(r)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,n,o,r,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(r,n),startTime:Date.now(),timeout:n,maxTotalTimeout:o,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(t){let n=this._timeoutInfo.get(t);if(!n)return!1;let o=Date.now()-n.startTime;if(n.maxTotalTimeout&&o>=n.maxTotalTimeout)throw this._timeoutInfo.delete(t),F.fromError(H.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:o});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(t){let n=this._timeoutInfo.get(t);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;let n=this.transport?.onclose;this._transport.onclose=()=>{n?.(),this._onclose()};let o=this.transport?.onerror;this._transport.onerror=i=>{o?.(i),this._onerror(i)};let r=this._transport?.onmessage;this._transport.onmessage=(i,a)=>{r?.(i,a),Ki(i)||dy(i)?this._onresponse(i):Ep(i)?this._onrequest(i,a):ly(i)?this._onnotification(i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(i)}`))},await this._transport.start()}_onclose(){let t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let o of this._requestHandlerAbortControllers.values())o.abort();this._requestHandlerAbortControllers.clear();let n=F.fromError(H.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let o of t.values())o(n)}_onerror(t){this.onerror?.(t)}_onnotification(t){let n=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(t)).catch(o=>this._onerror(new Error(`Uncaught error in notification handler: ${o}`)))}_onrequest(t,n){let o=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,r=this._transport,i=t.params?._meta?.[Ir]?.taskId;if(o===void 0){let d={jsonrpc:"2.0",id:t.id,error:{code:H.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:d,timestamp:Date.now()},r?.sessionId).catch(f=>this._onerror(new Error(`Failed to enqueue error response: ${f}`))):r?.send(d).catch(f=>this._onerror(new Error(`Failed to send an error response: ${f}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(t.id,a);let s=sy(t.params)?t.params.task:void 0,c=this._taskStore?this.requestTaskStore(t,r?.sessionId):void 0,l={signal:a.signal,sessionId:r?.sessionId,_meta:t.params?._meta,sendNotification:async d=>{if(a.signal.aborted)return;let f={relatedRequestId:t.id};i&&(f.relatedTask={taskId:i}),await this.notification(d,f)},sendRequest:async(d,f,y)=>{if(a.signal.aborted)throw new F(H.ConnectionClosed,"Request was cancelled");let v={...y,relatedRequestId:t.id};i&&!v.relatedTask&&(v.relatedTask={taskId:i});let g=v.relatedTask?.taskId??i;return g&&c&&await c.updateTaskStatus(g,"input_required"),await this.request(d,f,v)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:i,taskStore:c,taskRequestedTtl:s?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};Promise.resolve().then(()=>{s&&this.assertTaskHandlerCapability(t.method)}).then(()=>o(t,l)).then(async d=>{if(a.signal.aborted)return;let f={result:d,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:f,timestamp:Date.now()},r?.sessionId):await r?.send(f)},async d=>{if(a.signal.aborted)return;let f={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(d.code)?d.code:H.InternalError,message:d.message??"Internal error",...d.data!==void 0&&{data:d.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:f,timestamp:Date.now()},r?.sessionId):await r?.send(f)}).catch(d=>this._onerror(new Error(`Failed to send response: ${d}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:n,...o}=t.params,r=Number(n),i=this._progressHandlers.get(r);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let a=this._responseHandlers.get(r),s=this._timeoutInfo.get(r);if(s&&a&&s.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(c){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(c);return}i(o)}_onresponse(t){let n=Number(t.id),o=this._requestResolvers.get(n);if(o){if(this._requestResolvers.delete(n),Ki(t))o(t);else{let a=new F(t.error.code,t.error.message,t.error.data);o(a)}return}let r=this._responseHandlers.get(n);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let i=!1;if(Ki(t)&&t.result&&typeof t.result=="object"){let a=t.result;if(a.task&&typeof a.task=="object"){let s=a.task;typeof s.taskId=="string"&&(i=!0,this._taskProgressTokens.set(s.taskId,n))}}if(i||this._progressHandlers.delete(n),Ki(t))r(t);else{let a=F.fromError(t.error.code,t.error.message,t.error.data);r(a)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,n,o){let{task:r}=o??{};if(!r){try{yield{type:"result",result:await this.request(t,n,o)}}catch(a){yield{type:"error",error:a instanceof F?a:new F(H.InternalError,String(a))}}return}let i;try{let a=await this.request(t,lo,o);if(a.task)i=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new F(H.InternalError,"Task creation did not return a task");for(;;){let s=await this.getTask({taskId:i},o);if(yield{type:"taskStatus",task:s},Er(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},n,o)}:s.status==="failed"?yield{type:"error",error:new F(H.InternalError,`Task ${i} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new F(H.InternalError,`Task ${i} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},n,o)};return}let c=s.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(l=>setTimeout(l,c)),o?.signal?.throwIfAborted()}}catch(a){yield{type:"error",error:a instanceof F?a:new F(H.InternalError,String(a))}}}request(t,n,o){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:s,relatedTask:c}=o??{};return new Promise((l,d)=>{let f=R=>{d(R)};if(!this._transport){f(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),s&&this.assertTaskCapability(t.method)}catch(R){f(R);return}o?.signal?.throwIfAborted();let y=this._requestMessageId++,v={...t,jsonrpc:"2.0",id:y};o?.onprogress&&(this._progressHandlers.set(y,o.onprogress),v.params={...t.params,_meta:{...t.params?._meta||{},progressToken:y}}),s&&(v.params={...v.params,task:s}),c&&(v.params={...v.params,_meta:{...v.params?._meta||{},[Ir]:c}});let g=R=>{this._responseHandlers.delete(y),this._progressHandlers.delete(y),this._cleanupTimeout(y),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:y,reason:String(R)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(M=>this._onerror(new Error(`Failed to send cancellation: ${M}`)));let P=R instanceof F?R:new F(H.RequestTimeout,String(R));d(P)};this._responseHandlers.set(y,R=>{if(!o?.signal?.aborted){if(R instanceof Error)return d(R);try{let P=Sr(n,R.result);P.success?l(P.data):d(P.error)}catch(P){d(P)}}}),o?.signal?.addEventListener("abort",()=>{g(o?.signal?.reason)});let b=o?.timeout??TP,x=()=>g(F.fromError(H.RequestTimeout,"Request timed out",{timeout:b}));this._setupTimeout(y,b,o?.maxTotalTimeout,x,o?.resetTimeoutOnProgress??!1);let I=c?.taskId;if(I){let R=P=>{let M=this._responseHandlers.get(y);M?M(P):this._onerror(new Error(`Response handler missing for side-channeled request ${y}`))};this._requestResolvers.set(y,R),this._enqueueTaskMessage(I,{type:"request",message:v,timestamp:Date.now()}).catch(P=>{this._cleanupTimeout(y),d(P)})}else this._transport.send(v,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(R=>{this._cleanupTimeout(y),d(R)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},Uu,n)}async getTaskResult(t,n,o){return this.request({method:"tasks/result",params:t},n,o)}async listTasks(t,n){return this.request({method:"tasks/list",params:t},qu,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},my,n)}async notification(t,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let o=n?.relatedTask?.taskId;if(o){let s={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Ir]:n.relatedTask}}};await this._enqueueTaskMessage(o,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId&&!n?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let s={...t,jsonrpc:"2.0"};n?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[Ir]:n.relatedTask}}}),this._transport?.send(s,n).catch(c=>this._onerror(c))});return}let a={...t,jsonrpc:"2.0"};n?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[Ir]:n.relatedTask}}}),await this._transport.send(a,n)}setRequestHandler(t,n){let o=Jp(t);this.assertRequestHandlerCapability(o),this._requestHandlers.set(o,(r,i)=>{let a=Gp(t,r);return Promise.resolve(n(a,i))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,n){let o=Jp(t);this._notificationHandlers.set(o,r=>{let i=Gp(t,r);return Promise.resolve(n(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let n=this._taskProgressTokens.get(t);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,n,o){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,n,o,r)}async _clearTaskQueue(t,n){if(this._taskMessageQueue){let o=await this._taskMessageQueue.dequeueAll(t,n);for(let r of o)if(r.type==="request"&&Ep(r.message)){let i=r.message.id,a=this._requestResolvers.get(i);a?(a(new F(H.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,n){let o=this._options?.defaultTaskPollInterval??1e3;try{let r=await this._taskStore?.getTask(t);r?.pollInterval&&(o=r.pollInterval)}catch{}return new Promise((r,i)=>{if(n.aborted){i(new F(H.InvalidRequest,"Request cancelled"));return}let a=setTimeout(r,o);n.addEventListener("abort",()=>{clearTimeout(a),i(new F(H.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,n){let o=this._taskStore;if(!o)throw new Error("No task store configured");return{createTask:async r=>{if(!t)throw new Error("No request provided");return await o.createTask(r,t.id,{method:t.method,params:t.params},n)},getTask:async r=>{let i=await o.getTask(r,n);if(!i)throw new F(H.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(r,i,a)=>{await o.storeTaskResult(r,i,a,n);let s=await o.getTask(r,n);if(s){let c=Xi.parse({method:"notifications/tasks/status",params:s});await this.notification(c),Er(s.status)&&this._cleanupTaskProgressHandler(r)}},getTaskResult:r=>o.getTaskResult(r,n),updateTaskStatus:async(r,i,a)=>{let s=await o.getTask(r,n);if(!s)throw new F(H.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(Er(s.status))throw new F(H.InvalidParams,`Cannot update task "${r}" from terminal status "${s.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await o.updateTaskStatus(r,i,a,n);let c=await o.getTask(r,n);if(c){let l=Xi.parse({method:"notifications/tasks/status",params:c});await this.notification(l),Er(c.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>o.listTasks(r,n)}}};function eb(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function tb(e,t){let n={...e};for(let o in t){let r=o,i=t[r];if(i===void 0)continue;let a=n[r];eb(a)&&eb(i)?n[r]={...a,...i}:n[r]=i}return n}var Lx=mt(Rh(),1),qx=mt(Mx(),1);function bA(){let e=new Lx.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,qx.default)(e),e}var Zl=class{constructor(t){this._ajv=t??bA()}getValidator(t){let n="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return o=>n(o)?{valid:!0,data:o,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(n.errors)}}};var Ul=class{constructor(t){this._server=t}requestStream(t,n,o){return this._server.requestStream(t,n,o)}createMessageStream(t,n){let o=this._server.getClientCapabilities();if((t.tools||t.toolChoice)&&!o?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){let r=t.messages[t.messages.length-1],i=Array.isArray(r.content)?r.content:[r.content],a=i.some(d=>d.type==="tool_result"),s=t.messages.length>1?t.messages[t.messages.length-2]:void 0,c=s?Array.isArray(s.content)?s.content:[s.content]:[],l=c.some(d=>d.type==="tool_use");if(a){if(i.some(d=>d.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!l)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(l){let d=new Set(c.filter(y=>y.type==="tool_use").map(y=>y.id)),f=new Set(i.filter(y=>y.type==="tool_result").map(y=>y.toolUseId));if(d.size!==f.size||![...d].every(y=>f.has(y)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:t},ea,n)}elicitInputStream(t,n){let o=this._server.getClientCapabilities(),r=t.mode??"form";switch(r){case"url":{if(!o?.elicitation?.url)throw new Error("Client does not support url elicitation.");break}case"form":{if(!o?.elicitation?.form)throw new Error("Client does not support form elicitation.");break}}let i=r==="form"&&t.mode===void 0?{...t,mode:"form"}:t;return this.requestStream({method:"elicitation/create",params:i},mo,n)}async getTask(t,n){return this._server.getTask({taskId:t},n)}async getTaskResult(t,n,o){return this._server.getTaskResult({taskId:t},n,o)}async listTasks(t,n){return this._server.listTasks(t?{cursor:t}:void 0,n)}async cancelTask(t,n){return this._server.cancelTask({taskId:t},n)}};function Vx(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${n} does not support task creation for tools/call (required for ${t})`);break;default:break}}function Fx(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${n} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${n} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}var Ml=class extends rl{constructor(t,n){super(n),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Qi.options.map((o,r)=>[o,r])),this.isMessageIgnored=(o,r)=>{let i=this._loggingLevels.get(r);return i?this.LOG_LEVEL_SEVERITY.get(o)<this.LOG_LEVEL_SEVERITY.get(i):!1},this._capabilities=n?.capabilities??{},this._instructions=n?.instructions,this._jsonSchemaValidator=n?.jsonSchemaValidator??new Zl,this.setRequestHandler(jp,o=>this._oninitialize(o)),this.setNotificationHandler(Op,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Up,async(o,r)=>{let i=r.sessionId||r.requestInfo?.headers["mcp-session-id"]||void 0,{level:a}=o.params,s=Qi.safeParse(a);return s.success&&this._loggingLevels.set(i,s.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new Ul(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=tb(this._capabilities,t)}setRequestHandler(t,n){let r=zr(t)?.method;if(!r)throw new Error("Schema is missing a method literal");let i;if(gt(r)){let s=r;i=s._zod?.def?.value??s.value}else{let s=r;i=s._def?.value??s.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");if(i==="tools/call"){let s=async(c,l)=>{let d=Sr(po,c);if(!d.success){let g=d.error instanceof Error?d.error.message:String(d.error);throw new F(H.InvalidParams,`Invalid tools/call request: ${g}`)}let{params:f}=d.data,y=await Promise.resolve(n(c,l));if(f.task){let g=Sr(lo,y);if(!g.success){let b=g.error instanceof Error?g.error.message:String(g.error);throw new F(H.InvalidParams,`Invalid task creation result: ${b}`)}return g.data}let v=Sr(Wu,y);if(!v.success){let g=v.error instanceof Error?v.error.message:String(v.error);throw new F(H.InvalidParams,`Invalid tools/call result: ${g}`)}return v.data};return super.setRequestHandler(t,s)}return super.setRequestHandler(t,n)}assertCapabilityForMethod(t){switch(t){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new Error(`Client does not support sampling (required for ${t})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new Error(`Client does not support elicitation (required for ${t})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new Error(`Client does not support listing roots (required for ${t})`);break;case"ping":break}}assertNotificationCapability(t){switch(t){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${t})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${t})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${t})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new Error(`Client does not support URL elicitation (required for ${t})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${t})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Server does not support tasks capability (required for ${t})`);break;case"ping":case"initialize":break}}assertTaskCapability(t){Fx(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&Vx(this._capabilities.tasks?.requests,t,"Server")}async _oninitialize(t){let n=t.params.protocolVersion;return this._clientCapabilities=t.params.capabilities,this._clientVersion=t.params.clientInfo,{protocolVersion:oy.includes(n)?n:zp,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},Ru)}async createMessage(t,n){if((t.tools||t.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){let o=t.messages[t.messages.length-1],r=Array.isArray(o.content)?o.content:[o.content],i=r.some(l=>l.type==="tool_result"),a=t.messages.length>1?t.messages[t.messages.length-2]:void 0,s=a?Array.isArray(a.content)?a.content:[a.content]:[],c=s.some(l=>l.type==="tool_use");if(i){if(r.some(l=>l.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!c)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(c){let l=new Set(s.filter(f=>f.type==="tool_use").map(f=>f.id)),d=new Set(r.filter(f=>f.type==="tool_result").map(f=>f.toolUseId));if(l.size!==d.size||![...l].every(f=>d.has(f)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return t.tools?this.request({method:"sampling/createMessage",params:t},Mp,n):this.request({method:"sampling/createMessage",params:t},ea,n)}async elicitInput(t,n){switch(t.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");let r=t;return this.request({method:"elicitation/create",params:r},mo,n)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");let r=t.mode==="form"?t:{...t,mode:"form"},i=await this.request({method:"elicitation/create",params:r},mo,n);if(i.action==="accept"&&i.content&&r.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(r.requestedSchema)(i.content);if(!s.valid)throw new F(H.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(a){throw a instanceof F?a:new F(H.InternalError,`Error validating elicitation response: ${a instanceof Error?a.message:String(a)}`)}return i}}}createElicitationCompletionNotifier(t,n){if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:t}},n)}async listRoots(t,n){return this.request({method:"roots/list",params:t},Lp,n)}async sendLoggingMessage(t,n){if(this._capabilities.logging&&!this.isMessageIgnored(t.level,n))return this.notification({method:"notifications/message",params:t})}async sendResourceUpdated(t){return this.notification({method:"notifications/resources/updated",params:t})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};var Kx=Symbol.for("mcp.completable");function qh(e){return!!e&&typeof e=="object"&&Kx in e}function Hx(e){return e[Kx]?.complete}var Bx;(function(e){e.Completable="McpCompletable"})(Bx||(Bx={}));var $A=/^[A-Za-z0-9._-]{1,128}$/;function xA(e){let t=[];if(e.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!$A.test(e)){let n=e.split("").filter(o=>!/[A-Za-z0-9._-]/.test(o)).filter((o,r,i)=>i.indexOf(o)===r);return t.push(`Tool name contains invalid characters: ${n.map(o=>`"${o}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function wA(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let n of t)console.warn(` - ${n}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function Vh(e){let t=xA(e);return wA(e,t.warnings),t.isValid}var Ll=class{constructor(t){this._mcpServer=t}registerToolTask(t,n,o){let r={taskSupport:"required",...n.execution};if(r.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${t}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(t,n.title,n.description,n.inputSchema,n.outputSchema,n.annotations,r,n._meta,o)}};var ql=class{constructor(t,n){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new Ml(t,n)}get experimental(){return this._experimental||(this._experimental={tasks:new Ll(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(Cr(Gu)),this.server.assertCanSetRequestHandler(Cr(po)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(Gu,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,n])=>{let o={name:t,title:n.title,description:n.description,inputSchema:(()=>{let r=ao(n.inputSchema);return r?Hp(r,{strictUnions:!0,pipeStrategy:"input"}):kA})(),annotations:n.annotations,execution:n.execution,_meta:n._meta};if(n.outputSchema){let r=ao(n.outputSchema);r&&(o.outputSchema=Hp(r,{strictUnions:!0,pipeStrategy:"output"}))}return o})})),this.server.setRequestHandler(po,async(t,n)=>{try{let o=this._registeredTools[t.params.name];if(!o)throw new F(H.InvalidParams,`Tool ${t.params.name} not found`);if(!o.enabled)throw new F(H.InvalidParams,`Tool ${t.params.name} disabled`);let r=!!t.params.task,i=o.execution?.taskSupport,a="createTask"in o.handler;if((i==="required"||i==="optional")&&!a)throw new F(H.InternalError,`Tool ${t.params.name} has taskSupport '${i}' but was not registered with registerToolTask`);if(i==="required"&&!r)throw new F(H.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(i==="optional"&&!r&&a)return await this.handleAutomaticTaskPolling(o,t,n);let s=await this.validateToolInput(o,t.params.arguments,t.params.name),c=await this.executeToolHandler(o,s,n);return r||await this.validateToolOutput(o,c,t.params.name),c}catch(o){if(o instanceof F&&o.code===H.UrlElicitationRequired)throw o;return this.createToolError(o instanceof Error?o.message:String(o))}}),this._toolHandlersInitialized=!0)}createToolError(t){return{content:[{type:"text",text:t}],isError:!0}}async validateToolInput(t,n,o){if(!t.inputSchema)return;let i=ao(t.inputSchema)??t.inputSchema,a=await hu(i,n);if(!a.success){let s="error"in a?a.error:"Unknown error",c=gu(s);throw new F(H.InvalidParams,`Input validation error: Invalid arguments for tool ${o}: ${c}`)}return a.data}async validateToolOutput(t,n,o){if(!t.outputSchema||!("content"in n)||n.isError)return;if(!n.structuredContent)throw new F(H.InvalidParams,`Output validation error: Tool ${o} has an output schema but no structured content was provided`);let r=ao(t.outputSchema),i=await hu(r,n.structuredContent);if(!i.success){let a="error"in i?i.error:"Unknown error",s=gu(a);throw new F(H.InvalidParams,`Output validation error: Invalid structured content for tool ${o}: ${s}`)}}async executeToolHandler(t,n,o){let r=t.handler;if("createTask"in r){if(!o.taskStore)throw new Error("No task store provided.");let a={...o,taskStore:o.taskStore};if(t.inputSchema){let s=r;return await Promise.resolve(s.createTask(n,a))}else{let s=r;return await Promise.resolve(s.createTask(a))}}if(t.inputSchema){let a=r;return await Promise.resolve(a(n,o))}else{let a=r;return await Promise.resolve(a(o))}}async handleAutomaticTaskPolling(t,n,o){if(!o.taskStore)throw new Error("No task store provided for task-capable tool.");let r=await this.validateToolInput(t,n.params.arguments,n.params.name),i=t.handler,a={...o,taskStore:o.taskStore},s=r?await Promise.resolve(i.createTask(r,a)):await Promise.resolve(i.createTask(a)),c=s.task.taskId,l=s.task,d=l.pollInterval??5e3;for(;l.status!=="completed"&&l.status!=="failed"&&l.status!=="cancelled";){await new Promise(y=>setTimeout(y,d));let f=await o.taskStore.getTask(c);if(!f)throw new F(H.InternalError,`Task ${c} not found during polling`);l=f}return await o.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(Cr(Xu)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(Xu,async t=>{switch(t.params.ref.type){case"ref/prompt":return by(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return $y(t),this.handleResourceCompletion(t,t.params.ref);default:throw new F(H.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,n){let o=this._registeredPrompts[n.name];if(!o)throw new F(H.InvalidParams,`Prompt ${n.name} not found`);if(!o.enabled)throw new F(H.InvalidParams,`Prompt ${n.name} disabled`);if(!o.argsSchema)return ja;let i=zr(o.argsSchema)?.[t.params.argument.name];if(!qh(i))return ja;let a=Hx(i);if(!a)return ja;let s=await a(t.params.argument.value,t.params.context);return Gx(s)}async handleResourceCompletion(t,n){let o=Object.values(this._registeredResourceTemplates).find(a=>a.resourceTemplate.uriTemplate.toString()===n.uri);if(!o){if(this._registeredResources[n.uri])return ja;throw new F(H.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let r=o.resourceTemplate.completeCallback(t.params.argument.name);if(!r)return ja;let i=await r(t.params.argument.value,t.params.context);return Gx(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(Cr(Fu)),this.server.assertCanSetRequestHandler(Cr(Bu)),this.server.assertCanSetRequestHandler(Cr(Ku)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(Fu,async(t,n)=>{let o=Object.entries(this._registeredResources).filter(([i,a])=>a.enabled).map(([i,a])=>({uri:i,name:a.name,...a.metadata})),r=[];for(let i of Object.values(this._registeredResourceTemplates)){if(!i.resourceTemplate.listCallback)continue;let a=await i.resourceTemplate.listCallback(n);for(let s of a.resources)r.push({...i.metadata,...s})}return{resources:[...o,...r]}}),this.server.setRequestHandler(Bu,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([n,o])=>({name:n,uriTemplate:o.resourceTemplate.uriTemplate.toString(),...o.metadata}))})),this.server.setRequestHandler(Ku,async(t,n)=>{let o=new URL(t.params.uri),r=this._registeredResources[o.toString()];if(r){if(!r.enabled)throw new F(H.InvalidParams,`Resource ${o} disabled`);return r.readCallback(o,n)}for(let i of Object.values(this._registeredResourceTemplates)){let a=i.resourceTemplate.uriTemplate.match(o.toString());if(a)return i.readCallback(o,a,n)}throw new F(H.InvalidParams,`Resource ${o} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(Cr(Hu)),this.server.assertCanSetRequestHandler(Cr(Ju)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(Hu,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,n])=>({name:t,title:n.title,description:n.description,arguments:n.argsSchema?zA(n.argsSchema):void 0}))})),this.server.setRequestHandler(Ju,async(t,n)=>{let o=this._registeredPrompts[t.params.name];if(!o)throw new F(H.InvalidParams,`Prompt ${t.params.name} not found`);if(!o.enabled)throw new F(H.InvalidParams,`Prompt ${t.params.name} disabled`);if(o.argsSchema){let r=ao(o.argsSchema),i=await hu(r,t.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",l=gu(c);throw new F(H.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${l}`)}let a=i.data,s=o.callback;return await Promise.resolve(s(a,n))}else{let r=o.callback;return await Promise.resolve(r(n))}}),this._promptHandlersInitialized=!0)}resource(t,n,...o){let r;typeof o[0]=="object"&&(r=o.shift());let i=o[0];if(typeof n=="string"){if(this._registeredResources[n])throw new Error(`Resource ${n} is already registered`);let a=this._createRegisteredResource(t,void 0,n,r,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let a=this._createRegisteredResourceTemplate(t,void 0,n,r,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}}registerResource(t,n,o,r){if(typeof n=="string"){if(this._registeredResources[n])throw new Error(`Resource ${n} is already registered`);let i=this._createRegisteredResource(t,o.title,n,o,r);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let i=this._createRegisteredResourceTemplate(t,o.title,n,o,r);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}}_createRegisteredResource(t,n,o,r,i){let a={name:t,title:n,metadata:r,readCallback:i,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:s=>{typeof s.uri<"u"&&s.uri!==o&&(delete this._registeredResources[o],s.uri&&(this._registeredResources[s.uri]=a)),typeof s.name<"u"&&(a.name=s.name),typeof s.title<"u"&&(a.title=s.title),typeof s.metadata<"u"&&(a.metadata=s.metadata),typeof s.callback<"u"&&(a.readCallback=s.callback),typeof s.enabled<"u"&&(a.enabled=s.enabled),this.sendResourceListChanged()}};return this._registeredResources[o]=a,a}_createRegisteredResourceTemplate(t,n,o,r,i){let a={resourceTemplate:o,title:n,metadata:r,readCallback:i,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:l=>{typeof l.name<"u"&&l.name!==t&&(delete this._registeredResourceTemplates[t],l.name&&(this._registeredResourceTemplates[l.name]=a)),typeof l.title<"u"&&(a.title=l.title),typeof l.template<"u"&&(a.resourceTemplate=l.template),typeof l.metadata<"u"&&(a.metadata=l.metadata),typeof l.callback<"u"&&(a.readCallback=l.callback),typeof l.enabled<"u"&&(a.enabled=l.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[t]=a;let s=o.uriTemplate.variableNames;return Array.isArray(s)&&s.some(l=>!!o.completeCallback(l))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(t,n,o,r,i){let a={title:n,description:o,argsSchema:r===void 0?void 0:Qr(r),callback:i,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:s=>{typeof s.name<"u"&&s.name!==t&&(delete this._registeredPrompts[t],s.name&&(this._registeredPrompts[s.name]=a)),typeof s.title<"u"&&(a.title=s.title),typeof s.description<"u"&&(a.description=s.description),typeof s.argsSchema<"u"&&(a.argsSchema=Qr(s.argsSchema)),typeof s.callback<"u"&&(a.callback=s.callback),typeof s.enabled<"u"&&(a.enabled=s.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[t]=a,r&&Object.values(r).some(c=>{let l=c instanceof Fi?c._def?.innerType:c;return qh(l)})&&this.setCompletionRequestHandler(),a}_createRegisteredTool(t,n,o,r,i,a,s,c,l){Vh(t);let d={title:n,description:o,inputSchema:Jx(r),outputSchema:Jx(i),annotations:a,execution:s,_meta:c,handler:l,enabled:!0,disable:()=>d.update({enabled:!1}),enable:()=>d.update({enabled:!0}),remove:()=>d.update({name:null}),update:f=>{typeof f.name<"u"&&f.name!==t&&(typeof f.name=="string"&&Vh(f.name),delete this._registeredTools[t],f.name&&(this._registeredTools[f.name]=d)),typeof f.title<"u"&&(d.title=f.title),typeof f.description<"u"&&(d.description=f.description),typeof f.paramsSchema<"u"&&(d.inputSchema=Qr(f.paramsSchema)),typeof f.outputSchema<"u"&&(d.outputSchema=Qr(f.outputSchema)),typeof f.callback<"u"&&(d.handler=f.callback),typeof f.annotations<"u"&&(d.annotations=f.annotations),typeof f._meta<"u"&&(d._meta=f._meta),typeof f.enabled<"u"&&(d.enabled=f.enabled),this.sendToolListChanged()}};return this._registeredTools[t]=d,this.setToolRequestHandlers(),this.sendToolListChanged(),d}tool(t,...n){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let o,r,i,a;if(typeof n[0]=="string"&&(o=n.shift()),n.length>1){let c=n[0];Fh(c)?(r=n.shift(),n.length>1&&typeof n[0]=="object"&&n[0]!==null&&!Fh(n[0])&&(a=n.shift())):typeof c=="object"&&c!==null&&(a=n.shift())}let s=n[0];return this._createRegisteredTool(t,void 0,o,r,i,a,{taskSupport:"forbidden"},void 0,s)}registerTool(t,n,o){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let{title:r,description:i,inputSchema:a,outputSchema:s,annotations:c,_meta:l}=n;return this._createRegisteredTool(t,r,i,a,s,c,{taskSupport:"forbidden"},l,o)}prompt(t,...n){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let o;typeof n[0]=="string"&&(o=n.shift());let r;n.length>1&&(r=n.shift());let i=n[0],a=this._createRegisteredPrompt(t,void 0,o,r,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}registerPrompt(t,n,o){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let{title:r,description:i,argsSchema:a}=n,s=this._createRegisteredPrompt(t,r,i,a,o);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(t,n){return this.server.sendLoggingMessage(t,n)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};var kA={type:"object",properties:{}};function Wx(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function SA(e){return"_def"in e||"_zod"in e||Wx(e)}function Fh(e){return typeof e!="object"||e===null||SA(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(Wx)}function Jx(e){if(e)return Fh(e)?Qr(e):e}function zA(e){let t=zr(e);return t?Object.entries(t).map(([n,o])=>{let r=__(o),i=y_(o);return{name:n,description:r,required:!i}}):[]}function Cr(e){let n=zr(e)?.method;if(!n)throw new Error("Schema is missing a method literal");let o=vu(n);if(typeof o=="string")return o;throw new Error("Schema method literal must be a string")}function Gx(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}var ja={completion:{values:[],hasMore:!1}};var Bh=mt(require("node:process"),1);var Vl=class{append(t){this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;let t=this._buffer.indexOf(`
|
|
61
|
-
`);if(t===-1)return null;let n=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),
|
|
62
|
-
`}var
|
|
60
|
+
]`;continue}r+=o[c],o[c]==="\\"?i=!0:a&&o[c]==="]"?a=!1:!a&&o[c]==="["&&(a=!0)}try{new RegExp(r)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return r}function nl(e,t){if(t.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),t.target==="openApi3"&&e.keyType?._def.typeName===O.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((o,r)=>({...o,[r]:G(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",r]})??Ie(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let n={type:"object",additionalProperties:G(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return n;if(e.keyType?._def.typeName===O.ZodString&&e.keyType._def.checks?.length){let{type:o,...r}=rl(e.keyType._def,t);return{...n,propertyNames:r}}else{if(e.keyType?._def.typeName===O.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===O.ZodBranded&&e.keyType._def.type._def.typeName===O.ZodString&&e.keyType._def.type._def.checks?.length){let{type:o,...r}=tl(e.keyType._def,t);return{...n,propertyNames:r}}}return n}function qy(e,t){if(t.mapStrategy==="record")return nl(e,t);let n=G(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Ie(t),o=G(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Ie(t);return{type:"array",maxItems:125,items:{type:"array",items:[n,o],minItems:2,maxItems:2}}}function Vy(e){let t=e.values,o=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),r=Array.from(new Set(o.map(i=>typeof i)));return{type:r.length===1?r[0]==="string"?"string":"number":["string","number"],enum:o}}function Fy(e){return e.target==="openAi"?void 0:{not:Ie({...e,currentPath:[...e.currentPath,"not"]})}}function By(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var na={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Hy(e,t){if(t.target==="openApi3")return Ky(e,t);let n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(o=>o._def.typeName in na&&(!o._def.checks||!o._def.checks.length))){let o=n.reduce((r,i)=>{let a=na[i._def.typeName];return a&&!r.includes(a)?[...r,a]:r},[]);return{type:o.length>1?o:o[0]}}else if(n.every(o=>o._def.typeName==="ZodLiteral"&&!o.description)){let o=n.reduce((r,i)=>{let a=typeof i._def.value;switch(a){case"string":case"number":case"boolean":return[...r,a];case"bigint":return[...r,"integer"];case"object":if(i._def.value===null)return[...r,"null"];default:return r}},[]);if(o.length===n.length){let r=o.filter((i,a,s)=>s.indexOf(i)===a);return{type:r.length>1?r:r[0],enum:n.reduce((i,a)=>i.includes(a._def.value)?i:[...i,a._def.value],[])}}}else if(n.every(o=>o._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((o,r)=>[...o,...r._def.values.filter(i=>!o.includes(i))],[])};return Ky(e,t)}var Ky=(e,t)=>{let n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((o,r)=>G(o._def,{...t,currentPath:[...t.currentPath,"anyOf",`${r}`]})).filter(o=>!!o&&(!t.strictUnions||typeof o=="object"&&Object.keys(o).length>0));return n.length?{anyOf:n}:void 0};function Jy(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:na[e.innerType._def.typeName],nullable:!0}:{type:[na[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let o=G(e.innerType._def,{...t,currentPath:[...t.currentPath]});return o&&"$ref"in o?{allOf:[o],nullable:!0}:o&&{...o,nullable:!0}}let n=G(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}function Gy(e,t){let n={type:"number"};if(!e.checks)return n;for(let o of e.checks)switch(o.kind){case"int":n.type="integer",Hp(n,"type",o.message,t);break;case"min":t.target==="jsonSchema7"?o.inclusive?ue(n,"minimum",o.value,o.message,t):ue(n,"exclusiveMinimum",o.value,o.message,t):(o.inclusive||(n.exclusiveMinimum=!0),ue(n,"minimum",o.value,o.message,t));break;case"max":t.target==="jsonSchema7"?o.inclusive?ue(n,"maximum",o.value,o.message,t):ue(n,"exclusiveMaximum",o.value,o.message,t):(o.inclusive||(n.exclusiveMaximum=!0),ue(n,"maximum",o.value,o.message,t));break;case"multipleOf":ue(n,"multipleOf",o.value,o.message,t);break}return n}function Wy(e,t){let n=t.target==="openAi",o={type:"object",properties:{}},r=[],i=e.shape();for(let s in i){let c=i[s];if(c===void 0||c._def===void 0)continue;let l=DP(c);l&&n&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),l=!1);let d=G(c._def,{...t,currentPath:[...t.currentPath,"properties",s],propertyPath:[...t.currentPath,"properties",s]});d!==void 0&&(o.properties[s]=d,l||r.push(s))}r.length&&(o.required=r);let a=AP(e,t);return a!==void 0&&(o.additionalProperties=a),o}function AP(e,t){if(e.catchall._def.typeName!=="ZodNever")return G(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function DP(e){try{return e.isOptional()}catch{return!0}}var Xy=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return G(e.innerType._def,t);let n=G(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:Ie(t)},n]}:Ie(t)};var Yy=(e,t)=>{if(t.pipeStrategy==="input")return G(e.in._def,t);if(t.pipeStrategy==="output")return G(e.out._def,t);let n=G(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),o=G(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",n?"1":"0"]});return{allOf:[n,o].filter(r=>r!==void 0)}};function Qy(e,t){return G(e.type._def,t)}function eb(e,t){let o={type:"array",uniqueItems:!0,items:G(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&ue(o,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&ue(o,"maxItems",e.maxSize.value,e.maxSize.message,t),o}function tb(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((n,o)=>G(n._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((n,o)=>o===void 0?n:[...n,o],[]),additionalItems:G(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((n,o)=>G(n._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((n,o)=>o===void 0?n:[...n,o],[])}}function rb(e){return{not:Ie(e)}}function nb(e){return Ie(e)}var ob=(e,t)=>G(e.innerType._def,t);var ib=(e,t,n)=>{switch(t){case O.ZodString:return rl(e,n);case O.ZodNumber:return Gy(e,n);case O.ZodObject:return Wy(e,n);case O.ZodBigInt:return Ny(e,n);case O.ZodBoolean:return Ry();case O.ZodDate:return Jp(e,n);case O.ZodUndefined:return rb(n);case O.ZodNull:return By(n);case O.ZodArray:return jy(e,n);case O.ZodUnion:case O.ZodDiscriminatedUnion:return Hy(e,n);case O.ZodIntersection:return Zy(e,n);case O.ZodTuple:return tb(e,n);case O.ZodRecord:return nl(e,n);case O.ZodLiteral:return My(e,n);case O.ZodEnum:return Uy(e);case O.ZodNativeEnum:return Vy(e);case O.ZodNullable:return Jy(e,n);case O.ZodOptional:return Xy(e,n);case O.ZodMap:return qy(e,n);case O.ZodSet:return eb(e,n);case O.ZodLazy:return()=>e.getter()._def;case O.ZodPromise:return Qy(e,n);case O.ZodNaN:case O.ZodNever:return Fy(n);case O.ZodEffects:return Cy(e,n);case O.ZodAny:return Ie(n);case O.ZodUnknown:return nb(n);case O.ZodDefault:return Dy(e,n);case O.ZodBranded:return tl(e,n);case O.ZodReadonly:return ob(e,n);case O.ZodCatch:return Ay(e,n);case O.ZodPipeline:return Yy(e,n);case O.ZodFunction:case O.ZodVoid:case O.ZodSymbol:return;default:return(o=>{})(t)}};function G(e,t,n=!1){let o=t.seen.get(e);if(t.override){let s=t.override?.(e,t,o,n);if(s!==Ty)return s}if(o&&!n){let s=CP(o,t);if(s!==void 0)return s}let r={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,r);let i=ib(e,e.typeName,t),a=typeof i=="function"?G(i(),t):i;if(a&&UP(e,t,a),t.postProcess){let s=t.postProcess(a,e,t);return r.jsonSchema=a,s}return r.jsonSchema=a,a}var CP=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:el(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((n,o)=>t.currentPath[o]===n)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Ie(t)):t.$refStrategy==="seen"?Ie(t):void 0}},UP=(e,t,n)=>(e.description&&(n.description=e.description,t.markdownDescription&&(n.markdownDescription=e.description)),n);var Xp=(e,t)=>{let n=Oy(t),o=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[l,d])=>({...c,[l]:G(d._def,{...n,currentPath:[...n.basePath,n.definitionPath,l]},!0)??Ie(n)}),{}):void 0,r=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=G(e._def,r===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,r]},!1)??Ie(n),a=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;a!==void 0&&(i.title=a),n.flags.hasReferencedOpenAiAnyType&&(o||(o={}),o[n.openAiAnyTypeName]||(o[n.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:n.$refStrategy==="relative"?"1":[...n.basePath,n.definitionPath,n.openAiAnyTypeName].join("/")}}));let s=r===void 0?o?{...i,[n.definitionPath]:o}:i:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,r].join("/"),[n.definitionPath]:{...o,[r]:i}};return n.target==="jsonSchema7"?s.$schema="http://json-schema.org/draft-07/schema#":(n.target==="jsonSchema2019-09"||n.target==="openAi")&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),n.target==="openAi"&&("anyOf"in s||"oneOf"in s||"allOf"in s||"type"in s&&Array.isArray(s.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),s};function ZP(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function Yp(e,t){return vt(e)?so(e,{target:ZP(t?.target),io:t?.pipeStrategy??"input"}):Xp(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function Qp(e){let n=Er(e)?.method;if(!n)throw new Error("Schema is missing a method literal");let o=yu(n);if(typeof o!="string")throw new Error("Schema method literal must be a string");return o}function em(e,t){let n=Ir(e,t);if(!n.success)throw n.error;return n.data}var MP=6e4,ol=class{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Cu,n=>{this._oncancel(n)}),this.setNotificationHandler(Zu,n=>{this._onprogress(n)}),this.setRequestHandler(Uu,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Mu,async(n,o)=>{let r=await this._taskStore.getTask(n.params.taskId,o.sessionId);if(!r)throw new F(H.InvalidParams,"Failed to retrieve task: Task not found");return{...r}}),this.setRequestHandler(qu,async(n,o)=>{let r=async()=>{let i=n.params.taskId;if(this._taskMessageQueue){let s;for(;s=await this._taskMessageQueue.dequeue(i,o.sessionId);){if(s.type==="response"||s.type==="error"){let c=s.message,l=c.id,d=this._requestResolvers.get(l);if(d)if(this._requestResolvers.delete(l),s.type==="response")d(c);else{let f=c,_=new F(f.error.code,f.error.message,f.error.data);d(_)}else{let f=s.type==="response"?"Response":"Error";this._onerror(new Error(`${f} handler missing for request ${l}`))}continue}await this._transport?.send(s.message,{relatedRequestId:o.requestId})}}let a=await this._taskStore.getTask(i,o.sessionId);if(!a)throw new F(H.InvalidParams,`Task not found: ${i}`);if(!Pr(a.status))return await this._waitForTaskUpdate(i,o.signal),await r();if(Pr(a.status)){let s=await this._taskStore.getTaskResult(i,o.sessionId);return this._clearTaskQueue(i),{...s,_meta:{...s._meta,[Tr]:{taskId:i}}}}return await r()};return await r()}),this.setRequestHandler(Vu,async(n,o)=>{try{let{tasks:r,nextCursor:i}=await this._taskStore.listTasks(n.params?.cursor,o.sessionId);return{tasks:r,nextCursor:i,_meta:{}}}catch(r){throw new F(H.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(Bu,async(n,o)=>{try{let r=await this._taskStore.getTask(n.params.taskId,o.sessionId);if(!r)throw new F(H.InvalidParams,`Task not found: ${n.params.taskId}`);if(Pr(r.status))throw new F(H.InvalidParams,`Cannot cancel task in terminal status: ${r.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",o.sessionId),this._clearTaskQueue(n.params.taskId);let i=await this._taskStore.getTask(n.params.taskId,o.sessionId);if(!i)throw new F(H.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...i}}catch(r){throw r instanceof F?r:new F(H.InvalidRequest,`Failed to cancel task: ${r instanceof Error?r.message:String(r)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,n,o,r,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(r,n),startTime:Date.now(),timeout:n,maxTotalTimeout:o,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(t){let n=this._timeoutInfo.get(t);if(!n)return!1;let o=Date.now()-n.startTime;if(n.maxTotalTimeout&&o>=n.maxTotalTimeout)throw this._timeoutInfo.delete(t),F.fromError(H.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:o});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(t){let n=this._timeoutInfo.get(t);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;let n=this.transport?.onclose;this._transport.onclose=()=>{n?.(),this._onclose()};let o=this.transport?.onerror;this._transport.onerror=i=>{o?.(i),this._onerror(i)};let r=this._transport?.onmessage;this._transport.onmessage=(i,a)=>{r?.(i,a),Ji(i)||vy(i)?this._onresponse(i):Np(i)?this._onrequest(i,a):gy(i)?this._onnotification(i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(i)}`))},await this._transport.start()}_onclose(){let t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let o of this._requestHandlerAbortControllers.values())o.abort();this._requestHandlerAbortControllers.clear();let n=F.fromError(H.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let o of t.values())o(n)}_onerror(t){this.onerror?.(t)}_onnotification(t){let n=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(t)).catch(o=>this._onerror(new Error(`Uncaught error in notification handler: ${o}`)))}_onrequest(t,n){let o=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,r=this._transport,i=t.params?._meta?.[Tr]?.taskId;if(o===void 0){let d={jsonrpc:"2.0",id:t.id,error:{code:H.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:d,timestamp:Date.now()},r?.sessionId).catch(f=>this._onerror(new Error(`Failed to enqueue error response: ${f}`))):r?.send(d).catch(f=>this._onerror(new Error(`Failed to send an error response: ${f}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(t.id,a);let s=py(t.params)?t.params.task:void 0,c=this._taskStore?this.requestTaskStore(t,r?.sessionId):void 0,l={signal:a.signal,sessionId:r?.sessionId,_meta:t.params?._meta,sendNotification:async d=>{if(a.signal.aborted)return;let f={relatedRequestId:t.id};i&&(f.relatedTask={taskId:i}),await this.notification(d,f)},sendRequest:async(d,f,_)=>{if(a.signal.aborted)throw new F(H.ConnectionClosed,"Request was cancelled");let v={..._,relatedRequestId:t.id};i&&!v.relatedTask&&(v.relatedTask={taskId:i});let g=v.relatedTask?.taskId??i;return g&&c&&await c.updateTaskStatus(g,"input_required"),await this.request(d,f,v)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:i,taskStore:c,taskRequestedTtl:s?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};Promise.resolve().then(()=>{s&&this.assertTaskHandlerCapability(t.method)}).then(()=>o(t,l)).then(async d=>{if(a.signal.aborted)return;let f={result:d,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:f,timestamp:Date.now()},r?.sessionId):await r?.send(f)},async d=>{if(a.signal.aborted)return;let f={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(d.code)?d.code:H.InternalError,message:d.message??"Internal error",...d.data!==void 0&&{data:d.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:f,timestamp:Date.now()},r?.sessionId):await r?.send(f)}).catch(d=>this._onerror(new Error(`Failed to send response: ${d}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:n,...o}=t.params,r=Number(n),i=this._progressHandlers.get(r);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let a=this._responseHandlers.get(r),s=this._timeoutInfo.get(r);if(s&&a&&s.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(c){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(c);return}i(o)}_onresponse(t){let n=Number(t.id),o=this._requestResolvers.get(n);if(o){if(this._requestResolvers.delete(n),Ji(t))o(t);else{let a=new F(t.error.code,t.error.message,t.error.data);o(a)}return}let r=this._responseHandlers.get(n);if(r===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let i=!1;if(Ji(t)&&t.result&&typeof t.result=="object"){let a=t.result;if(a.task&&typeof a.task=="object"){let s=a.task;typeof s.taskId=="string"&&(i=!0,this._taskProgressTokens.set(s.taskId,n))}}if(i||this._progressHandlers.delete(n),Ji(t))r(t);else{let a=F.fromError(t.error.code,t.error.message,t.error.data);r(a)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,n,o){let{task:r}=o??{};if(!r){try{yield{type:"result",result:await this.request(t,n,o)}}catch(a){yield{type:"error",error:a instanceof F?a:new F(H.InternalError,String(a))}}return}let i;try{let a=await this.request(t,po,o);if(a.task)i=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new F(H.InternalError,"Task creation did not return a task");for(;;){let s=await this.getTask({taskId:i},o);if(yield{type:"taskStatus",task:s},Pr(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},n,o)}:s.status==="failed"?yield{type:"error",error:new F(H.InternalError,`Task ${i} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new F(H.InternalError,`Task ${i} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},n,o)};return}let c=s.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(l=>setTimeout(l,c)),o?.signal?.throwIfAborted()}}catch(a){yield{type:"error",error:a instanceof F?a:new F(H.InternalError,String(a))}}}request(t,n,o){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:s,relatedTask:c}=o??{};return new Promise((l,d)=>{let f=R=>{d(R)};if(!this._transport){f(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),s&&this.assertTaskCapability(t.method)}catch(R){f(R);return}o?.signal?.throwIfAborted();let _=this._requestMessageId++,v={...t,jsonrpc:"2.0",id:_};o?.onprogress&&(this._progressHandlers.set(_,o.onprogress),v.params={...t.params,_meta:{...t.params?._meta||{},progressToken:_}}),s&&(v.params={...v.params,task:s}),c&&(v.params={...v.params,_meta:{...v.params?._meta||{},[Tr]:c}});let g=R=>{this._responseHandlers.delete(_),this._progressHandlers.delete(_),this._cleanupTimeout(_),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:_,reason:String(R)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(M=>this._onerror(new Error(`Failed to send cancellation: ${M}`)));let P=R instanceof F?R:new F(H.RequestTimeout,String(R));d(P)};this._responseHandlers.set(_,R=>{if(!o?.signal?.aborted){if(R instanceof Error)return d(R);try{let P=Ir(n,R.result);P.success?l(P.data):d(P.error)}catch(P){d(P)}}}),o?.signal?.addEventListener("abort",()=>{g(o?.signal?.reason)});let b=o?.timeout??MP,x=()=>g(F.fromError(H.RequestTimeout,"Request timed out",{timeout:b}));this._setupTimeout(_,b,o?.maxTotalTimeout,x,o?.resetTimeoutOnProgress??!1);let I=c?.taskId;if(I){let R=P=>{let M=this._responseHandlers.get(_);M?M(P):this._onerror(new Error(`Response handler missing for side-channeled request ${_}`))};this._requestResolvers.set(_,R),this._enqueueTaskMessage(I,{type:"request",message:v,timestamp:Date.now()}).catch(P=>{this._cleanupTimeout(_),d(P)})}else this._transport.send(v,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(R=>{this._cleanupTimeout(_),d(R)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},Lu,n)}async getTaskResult(t,n,o){return this.request({method:"tasks/result",params:t},n,o)}async listTasks(t,n){return this.request({method:"tasks/list",params:t},Fu,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},by,n)}async notification(t,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let o=n?.relatedTask?.taskId;if(o){let s={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Tr]:n.relatedTask}}};await this._enqueueTaskMessage(o,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId&&!n?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let s={...t,jsonrpc:"2.0"};n?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[Tr]:n.relatedTask}}}),this._transport?.send(s,n).catch(c=>this._onerror(c))});return}let a={...t,jsonrpc:"2.0"};n?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[Tr]:n.relatedTask}}}),await this._transport.send(a,n)}setRequestHandler(t,n){let o=Qp(t);this.assertRequestHandlerCapability(o),this._requestHandlers.set(o,(r,i)=>{let a=em(t,r);return Promise.resolve(n(a,i))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,n){let o=Qp(t);this._notificationHandlers.set(o,r=>{let i=em(t,r);return Promise.resolve(n(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let n=this._taskProgressTokens.get(t);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,n,o){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,n,o,r)}async _clearTaskQueue(t,n){if(this._taskMessageQueue){let o=await this._taskMessageQueue.dequeueAll(t,n);for(let r of o)if(r.type==="request"&&Np(r.message)){let i=r.message.id,a=this._requestResolvers.get(i);a?(a(new F(H.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,n){let o=this._options?.defaultTaskPollInterval??1e3;try{let r=await this._taskStore?.getTask(t);r?.pollInterval&&(o=r.pollInterval)}catch{}return new Promise((r,i)=>{if(n.aborted){i(new F(H.InvalidRequest,"Request cancelled"));return}let a=setTimeout(r,o);n.addEventListener("abort",()=>{clearTimeout(a),i(new F(H.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,n){let o=this._taskStore;if(!o)throw new Error("No task store configured");return{createTask:async r=>{if(!t)throw new Error("No request provided");return await o.createTask(r,t.id,{method:t.method,params:t.params},n)},getTask:async r=>{let i=await o.getTask(r,n);if(!i)throw new F(H.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(r,i,a)=>{await o.storeTaskResult(r,i,a,n);let s=await o.getTask(r,n);if(s){let c=Qi.parse({method:"notifications/tasks/status",params:s});await this.notification(c),Pr(s.status)&&this._cleanupTaskProgressHandler(r)}},getTaskResult:r=>o.getTaskResult(r,n),updateTaskStatus:async(r,i,a)=>{let s=await o.getTask(r,n);if(!s)throw new F(H.InvalidParams,`Task "${r}" not found - it may have been cleaned up`);if(Pr(s.status))throw new F(H.InvalidParams,`Cannot update task "${r}" from terminal status "${s.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await o.updateTaskStatus(r,i,a,n);let c=await o.getTask(r,n);if(c){let l=Qi.parse({method:"notifications/tasks/status",params:c});await this.notification(l),Pr(c.status)&&this._cleanupTaskProgressHandler(r)}},listTasks:r=>o.listTasks(r,n)}}};function ab(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function sb(e,t){let n={...e};for(let o in t){let r=o,i=t[r];if(i===void 0)continue;let a=n[r];ab(a)&&ab(i)?n[r]={...a,...i}:n[r]=i}return n}var Hx=ht(Zh(),1),Jx=ht(Kx(),1);function OA(){let e=new Hx.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,Jx.default)(e),e}var Ml=class{constructor(t){this._ajv=t??OA()}getValidator(t){let n="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return o=>n(o)?{valid:!0,data:o,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(n.errors)}}};var Ll=class{constructor(t){this._server=t}requestStream(t,n,o){return this._server.requestStream(t,n,o)}createMessageStream(t,n){let o=this._server.getClientCapabilities();if((t.tools||t.toolChoice)&&!o?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){let r=t.messages[t.messages.length-1],i=Array.isArray(r.content)?r.content:[r.content],a=i.some(d=>d.type==="tool_result"),s=t.messages.length>1?t.messages[t.messages.length-2]:void 0,c=s?Array.isArray(s.content)?s.content:[s.content]:[],l=c.some(d=>d.type==="tool_use");if(a){if(i.some(d=>d.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!l)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(l){let d=new Set(c.filter(_=>_.type==="tool_use").map(_=>_.id)),f=new Set(i.filter(_=>_.type==="tool_result").map(_=>_.toolUseId));if(d.size!==f.size||![...d].every(_=>f.has(_)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:t},ra,n)}elicitInputStream(t,n){let o=this._server.getClientCapabilities(),r=t.mode??"form";switch(r){case"url":{if(!o?.elicitation?.url)throw new Error("Client does not support url elicitation.");break}case"form":{if(!o?.elicitation?.form)throw new Error("Client does not support form elicitation.");break}}let i=r==="form"&&t.mode===void 0?{...t,mode:"form"}:t;return this.requestStream({method:"elicitation/create",params:i},go,n)}async getTask(t,n){return this._server.getTask({taskId:t},n)}async getTaskResult(t,n,o){return this._server.getTaskResult({taskId:t},n,o)}async listTasks(t,n){return this._server.listTasks(t?{cursor:t}:void 0,n)}async cancelTask(t,n){return this._server.cancelTask({taskId:t},n)}};function Gx(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${n} does not support task creation for tools/call (required for ${t})`);break;default:break}}function Wx(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${n} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${n} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}var ql=class extends ol{constructor(t,n){super(n),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(ta.options.map((o,r)=>[o,r])),this.isMessageIgnored=(o,r)=>{let i=this._loggingLevels.get(r);return i?this.LOG_LEVEL_SEVERITY.get(o)<this.LOG_LEVEL_SEVERITY.get(i):!1},this._capabilities=n?.capabilities??{},this._instructions=n?.instructions,this._jsonSchemaValidator=n?.jsonSchemaValidator??new Ml,this.setRequestHandler(Dp,o=>this._oninitialize(o)),this.setNotificationHandler(Cp,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Fp,async(o,r)=>{let i=r.sessionId||r.requestInfo?.headers["mcp-session-id"]||void 0,{level:a}=o.params,s=ta.safeParse(a);return s.success&&this._loggingLevels.set(i,s.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new Ll(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=sb(this._capabilities,t)}setRequestHandler(t,n){let r=Er(t)?.method;if(!r)throw new Error("Schema is missing a method literal");let i;if(vt(r)){let s=r;i=s._zod?.def?.value??s.value}else{let s=r;i=s._def?.value??s.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");if(i==="tools/call"){let s=async(c,l)=>{let d=Ir(ho,c);if(!d.success){let g=d.error instanceof Error?d.error.message:String(d.error);throw new F(H.InvalidParams,`Invalid tools/call request: ${g}`)}let{params:f}=d.data,_=await Promise.resolve(n(c,l));if(f.task){let g=Ir(po,_);if(!g.success){let b=g.error instanceof Error?g.error.message:String(g.error);throw new F(H.InvalidParams,`Invalid task creation result: ${b}`)}return g.data}let v=Ir(Yu,_);if(!v.success){let g=v.error instanceof Error?v.error.message:String(v.error);throw new F(H.InvalidParams,`Invalid tools/call result: ${g}`)}return v.data};return super.setRequestHandler(t,s)}return super.setRequestHandler(t,n)}assertCapabilityForMethod(t){switch(t){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new Error(`Client does not support sampling (required for ${t})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new Error(`Client does not support elicitation (required for ${t})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new Error(`Client does not support listing roots (required for ${t})`);break;case"ping":break}}assertNotificationCapability(t){switch(t){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${t})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${t})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${t})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new Error(`Client does not support URL elicitation (required for ${t})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${t})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Server does not support tasks capability (required for ${t})`);break;case"ping":case"initialize":break}}assertTaskCapability(t){Wx(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&Gx(this._capabilities.tasks?.requests,t,"Server")}async _oninitialize(t){let n=t.params.protocolVersion;return this._clientCapabilities=t.params.capabilities,this._clientVersion=t.params.clientInfo,{protocolVersion:ly.includes(n)?n:Op,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},Du)}async createMessage(t,n){if((t.tools||t.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){let o=t.messages[t.messages.length-1],r=Array.isArray(o.content)?o.content:[o.content],i=r.some(l=>l.type==="tool_result"),a=t.messages.length>1?t.messages[t.messages.length-2]:void 0,s=a?Array.isArray(a.content)?a.content:[a.content]:[],c=s.some(l=>l.type==="tool_use");if(i){if(r.some(l=>l.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!c)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(c){let l=new Set(s.filter(f=>f.type==="tool_use").map(f=>f.id)),d=new Set(r.filter(f=>f.type==="tool_result").map(f=>f.toolUseId));if(l.size!==d.size||![...l].every(f=>d.has(f)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return t.tools?this.request({method:"sampling/createMessage",params:t},Bp,n):this.request({method:"sampling/createMessage",params:t},ra,n)}async elicitInput(t,n){switch(t.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");let r=t;return this.request({method:"elicitation/create",params:r},go,n)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");let r=t.mode==="form"?t:{...t,mode:"form"},i=await this.request({method:"elicitation/create",params:r},go,n);if(i.action==="accept"&&i.content&&r.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(r.requestedSchema)(i.content);if(!s.valid)throw new F(H.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(a){throw a instanceof F?a:new F(H.InternalError,`Error validating elicitation response: ${a instanceof Error?a.message:String(a)}`)}return i}}}createElicitationCompletionNotifier(t,n){if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:t}},n)}async listRoots(t,n){return this.request({method:"roots/list",params:t},Kp,n)}async sendLoggingMessage(t,n){if(this._capabilities.logging&&!this.isMessageIgnored(t.level,n))return this.notification({method:"notifications/message",params:t})}async sendResourceUpdated(t){return this.notification({method:"notifications/resources/updated",params:t})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};var Yx=Symbol.for("mcp.completable");function Hh(e){return!!e&&typeof e=="object"&&Yx in e}function Qx(e){return e[Yx]?.complete}var Xx;(function(e){e.Completable="McpCompletable"})(Xx||(Xx={}));var jA=/^[A-Za-z0-9._-]{1,128}$/;function NA(e){let t=[];if(e.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!jA.test(e)){let n=e.split("").filter(o=>!/[A-Za-z0-9._-]/.test(o)).filter((o,r,i)=>i.indexOf(o)===r);return t.push(`Tool name contains invalid characters: ${n.map(o=>`"${o}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function RA(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let n of t)console.warn(` - ${n}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function Jh(e){let t=NA(e);return RA(e,t.warnings),t.isValid}var Vl=class{constructor(t){this._mcpServer=t}registerToolTask(t,n,o){let r={taskSupport:"required",...n.execution};if(r.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${t}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(t,n.title,n.description,n.inputSchema,n.outputSchema,n.annotations,r,n._meta,o)}};var Fl=class{constructor(t,n){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new ql(t,n)}get experimental(){return this._experimental||(this._experimental={tasks:new Vl(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(Zr(Xu)),this.server.assertCanSetRequestHandler(Zr(ho)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(Xu,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,n])=>{let o={name:t,title:n.title,description:n.description,inputSchema:(()=>{let r=co(n.inputSchema);return r?Yp(r,{strictUnions:!0,pipeStrategy:"input"}):AA})(),annotations:n.annotations,execution:n.execution,_meta:n._meta};if(n.outputSchema){let r=co(n.outputSchema);r&&(o.outputSchema=Yp(r,{strictUnions:!0,pipeStrategy:"output"}))}return o})})),this.server.setRequestHandler(ho,async(t,n)=>{try{let o=this._registeredTools[t.params.name];if(!o)throw new F(H.InvalidParams,`Tool ${t.params.name} not found`);if(!o.enabled)throw new F(H.InvalidParams,`Tool ${t.params.name} disabled`);let r=!!t.params.task,i=o.execution?.taskSupport,a="createTask"in o.handler;if((i==="required"||i==="optional")&&!a)throw new F(H.InternalError,`Tool ${t.params.name} has taskSupport '${i}' but was not registered with registerToolTask`);if(i==="required"&&!r)throw new F(H.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(i==="optional"&&!r&&a)return await this.handleAutomaticTaskPolling(o,t,n);let s=await this.validateToolInput(o,t.params.arguments,t.params.name),c=await this.executeToolHandler(o,s,n);return r||await this.validateToolOutput(o,c,t.params.name),c}catch(o){if(o instanceof F&&o.code===H.UrlElicitationRequired)throw o;return this.createToolError(o instanceof Error?o.message:String(o))}}),this._toolHandlersInitialized=!0)}createToolError(t){return{content:[{type:"text",text:t}],isError:!0}}async validateToolInput(t,n,o){if(!t.inputSchema)return;let i=co(t.inputSchema)??t.inputSchema,a=await vu(i,n);if(!a.success){let s="error"in a?a.error:"Unknown error",c=_u(s);throw new F(H.InvalidParams,`Input validation error: Invalid arguments for tool ${o}: ${c}`)}return a.data}async validateToolOutput(t,n,o){if(!t.outputSchema||!("content"in n)||n.isError)return;if(!n.structuredContent)throw new F(H.InvalidParams,`Output validation error: Tool ${o} has an output schema but no structured content was provided`);let r=co(t.outputSchema),i=await vu(r,n.structuredContent);if(!i.success){let a="error"in i?i.error:"Unknown error",s=_u(a);throw new F(H.InvalidParams,`Output validation error: Invalid structured content for tool ${o}: ${s}`)}}async executeToolHandler(t,n,o){let r=t.handler;if("createTask"in r){if(!o.taskStore)throw new Error("No task store provided.");let a={...o,taskStore:o.taskStore};if(t.inputSchema){let s=r;return await Promise.resolve(s.createTask(n,a))}else{let s=r;return await Promise.resolve(s.createTask(a))}}if(t.inputSchema){let a=r;return await Promise.resolve(a(n,o))}else{let a=r;return await Promise.resolve(a(o))}}async handleAutomaticTaskPolling(t,n,o){if(!o.taskStore)throw new Error("No task store provided for task-capable tool.");let r=await this.validateToolInput(t,n.params.arguments,n.params.name),i=t.handler,a={...o,taskStore:o.taskStore},s=r?await Promise.resolve(i.createTask(r,a)):await Promise.resolve(i.createTask(a)),c=s.task.taskId,l=s.task,d=l.pollInterval??5e3;for(;l.status!=="completed"&&l.status!=="failed"&&l.status!=="cancelled";){await new Promise(_=>setTimeout(_,d));let f=await o.taskStore.getTask(c);if(!f)throw new F(H.InternalError,`Task ${c} not found during polling`);l=f}return await o.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(Zr(Qu)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(Qu,async t=>{switch(t.params.ref.type){case"ref/prompt":return zy(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return Iy(t),this.handleResourceCompletion(t,t.params.ref);default:throw new F(H.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,n){let o=this._registeredPrompts[n.name];if(!o)throw new F(H.InvalidParams,`Prompt ${n.name} not found`);if(!o.enabled)throw new F(H.InvalidParams,`Prompt ${n.name} disabled`);if(!o.argsSchema)return Na;let i=Er(o.argsSchema)?.[t.params.argument.name];if(!Hh(i))return Na;let a=Qx(i);if(!a)return Na;let s=await a(t.params.argument.value,t.params.context);return tw(s)}async handleResourceCompletion(t,n){let o=Object.values(this._registeredResourceTemplates).find(a=>a.resourceTemplate.uriTemplate.toString()===n.uri);if(!o){if(this._registeredResources[n.uri])return Na;throw new F(H.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let r=o.resourceTemplate.completeCallback(t.params.argument.name);if(!r)return Na;let i=await r(t.params.argument.value,t.params.context);return tw(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(Zr(Ku)),this.server.assertCanSetRequestHandler(Zr(Hu)),this.server.assertCanSetRequestHandler(Zr(Ju)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(Ku,async(t,n)=>{let o=Object.entries(this._registeredResources).filter(([i,a])=>a.enabled).map(([i,a])=>({uri:i,name:a.name,...a.metadata})),r=[];for(let i of Object.values(this._registeredResourceTemplates)){if(!i.resourceTemplate.listCallback)continue;let a=await i.resourceTemplate.listCallback(n);for(let s of a.resources)r.push({...i.metadata,...s})}return{resources:[...o,...r]}}),this.server.setRequestHandler(Hu,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([n,o])=>({name:n,uriTemplate:o.resourceTemplate.uriTemplate.toString(),...o.metadata}))})),this.server.setRequestHandler(Ju,async(t,n)=>{let o=new URL(t.params.uri),r=this._registeredResources[o.toString()];if(r){if(!r.enabled)throw new F(H.InvalidParams,`Resource ${o} disabled`);return r.readCallback(o,n)}for(let i of Object.values(this._registeredResourceTemplates)){let a=i.resourceTemplate.uriTemplate.match(o.toString());if(a)return i.readCallback(o,a,n)}throw new F(H.InvalidParams,`Resource ${o} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(Zr(Gu)),this.server.assertCanSetRequestHandler(Zr(Wu)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(Gu,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,n])=>({name:t,title:n.title,description:n.description,arguments:n.argsSchema?CA(n.argsSchema):void 0}))})),this.server.setRequestHandler(Wu,async(t,n)=>{let o=this._registeredPrompts[t.params.name];if(!o)throw new F(H.InvalidParams,`Prompt ${t.params.name} not found`);if(!o.enabled)throw new F(H.InvalidParams,`Prompt ${t.params.name} disabled`);if(o.argsSchema){let r=co(o.argsSchema),i=await vu(r,t.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",l=_u(c);throw new F(H.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${l}`)}let a=i.data,s=o.callback;return await Promise.resolve(s(a,n))}else{let r=o.callback;return await Promise.resolve(r(n))}}),this._promptHandlersInitialized=!0)}resource(t,n,...o){let r;typeof o[0]=="object"&&(r=o.shift());let i=o[0];if(typeof n=="string"){if(this._registeredResources[n])throw new Error(`Resource ${n} is already registered`);let a=this._createRegisteredResource(t,void 0,n,r,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let a=this._createRegisteredResourceTemplate(t,void 0,n,r,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}}registerResource(t,n,o,r){if(typeof n=="string"){if(this._registeredResources[n])throw new Error(`Resource ${n} is already registered`);let i=this._createRegisteredResource(t,o.title,n,o,r);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);let i=this._createRegisteredResourceTemplate(t,o.title,n,o,r);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}}_createRegisteredResource(t,n,o,r,i){let a={name:t,title:n,metadata:r,readCallback:i,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:s=>{typeof s.uri<"u"&&s.uri!==o&&(delete this._registeredResources[o],s.uri&&(this._registeredResources[s.uri]=a)),typeof s.name<"u"&&(a.name=s.name),typeof s.title<"u"&&(a.title=s.title),typeof s.metadata<"u"&&(a.metadata=s.metadata),typeof s.callback<"u"&&(a.readCallback=s.callback),typeof s.enabled<"u"&&(a.enabled=s.enabled),this.sendResourceListChanged()}};return this._registeredResources[o]=a,a}_createRegisteredResourceTemplate(t,n,o,r,i){let a={resourceTemplate:o,title:n,metadata:r,readCallback:i,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:l=>{typeof l.name<"u"&&l.name!==t&&(delete this._registeredResourceTemplates[t],l.name&&(this._registeredResourceTemplates[l.name]=a)),typeof l.title<"u"&&(a.title=l.title),typeof l.template<"u"&&(a.resourceTemplate=l.template),typeof l.metadata<"u"&&(a.metadata=l.metadata),typeof l.callback<"u"&&(a.readCallback=l.callback),typeof l.enabled<"u"&&(a.enabled=l.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[t]=a;let s=o.uriTemplate.variableNames;return Array.isArray(s)&&s.some(l=>!!o.completeCallback(l))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(t,n,o,r,i){let a={title:n,description:o,argsSchema:r===void 0?void 0:tn(r),callback:i,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:s=>{typeof s.name<"u"&&s.name!==t&&(delete this._registeredPrompts[t],s.name&&(this._registeredPrompts[s.name]=a)),typeof s.title<"u"&&(a.title=s.title),typeof s.description<"u"&&(a.description=s.description),typeof s.argsSchema<"u"&&(a.argsSchema=tn(s.argsSchema)),typeof s.callback<"u"&&(a.callback=s.callback),typeof s.enabled<"u"&&(a.enabled=s.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[t]=a,r&&Object.values(r).some(c=>{let l=c instanceof Ki?c._def?.innerType:c;return Hh(l)})&&this.setCompletionRequestHandler(),a}_createRegisteredTool(t,n,o,r,i,a,s,c,l){Jh(t);let d={title:n,description:o,inputSchema:ew(r),outputSchema:ew(i),annotations:a,execution:s,_meta:c,handler:l,enabled:!0,disable:()=>d.update({enabled:!1}),enable:()=>d.update({enabled:!0}),remove:()=>d.update({name:null}),update:f=>{typeof f.name<"u"&&f.name!==t&&(typeof f.name=="string"&&Jh(f.name),delete this._registeredTools[t],f.name&&(this._registeredTools[f.name]=d)),typeof f.title<"u"&&(d.title=f.title),typeof f.description<"u"&&(d.description=f.description),typeof f.paramsSchema<"u"&&(d.inputSchema=tn(f.paramsSchema)),typeof f.outputSchema<"u"&&(d.outputSchema=tn(f.outputSchema)),typeof f.callback<"u"&&(d.handler=f.callback),typeof f.annotations<"u"&&(d.annotations=f.annotations),typeof f._meta<"u"&&(d._meta=f._meta),typeof f.enabled<"u"&&(d.enabled=f.enabled),this.sendToolListChanged()}};return this._registeredTools[t]=d,this.setToolRequestHandlers(),this.sendToolListChanged(),d}tool(t,...n){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let o,r,i,a;if(typeof n[0]=="string"&&(o=n.shift()),n.length>1){let c=n[0];Gh(c)?(r=n.shift(),n.length>1&&typeof n[0]=="object"&&n[0]!==null&&!Gh(n[0])&&(a=n.shift())):typeof c=="object"&&c!==null&&(a=n.shift())}let s=n[0];return this._createRegisteredTool(t,void 0,o,r,i,a,{taskSupport:"forbidden"},void 0,s)}registerTool(t,n,o){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let{title:r,description:i,inputSchema:a,outputSchema:s,annotations:c,_meta:l}=n;return this._createRegisteredTool(t,r,i,a,s,c,{taskSupport:"forbidden"},l,o)}prompt(t,...n){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let o;typeof n[0]=="string"&&(o=n.shift());let r;n.length>1&&(r=n.shift());let i=n[0],a=this._createRegisteredPrompt(t,void 0,o,r,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}registerPrompt(t,n,o){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let{title:r,description:i,argsSchema:a}=n,s=this._createRegisteredPrompt(t,r,i,a,o);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(t,n){return this.server.sendLoggingMessage(t,n)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};var AA={type:"object",properties:{}};function rw(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function DA(e){return"_def"in e||"_zod"in e||rw(e)}function Gh(e){return typeof e!="object"||e===null||DA(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(rw)}function ew(e){if(e)return Gh(e)?tn(e):e}function CA(e){let t=Er(e);return t?Object.entries(t).map(([n,o])=>{let r=k_(o),i=S_(o);return{name:n,description:r,required:!i}}):[]}function Zr(e){let n=Er(e)?.method;if(!n)throw new Error("Schema is missing a method literal");let o=yu(n);if(typeof o=="string")return o;throw new Error("Schema method literal must be a string")}function tw(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}var Na={completion:{values:[],hasMore:!1}};var Wh=ht(require("node:process"),1);var Bl=class{append(t){this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;let t=this._buffer.indexOf(`
|
|
61
|
+
`);if(t===-1)return null;let n=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),UA(n)}clear(){this._buffer=void 0}};function UA(e){return _y.parse(JSON.parse(e))}function nw(e){return JSON.stringify(e)+`
|
|
62
|
+
`}var Kl=class{constructor(t=Wh.default.stdin,n=Wh.default.stdout){this._stdin=t,this._stdout=n,this._readBuffer=new Bl,this._started=!1,this._ondata=o=>{this._readBuffer.append(o),this.processReadBuffer()},this._onerror=o=>{this.onerror?.(o)}}async start(){if(this._started)throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=!0,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror)}processReadBuffer(){for(;;)try{let t=this._readBuffer.readMessage();if(t===null)break;this.onmessage?.(t)}catch(t){this.onerror?.(t)}}async close(){this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.()}send(t){return new Promise(n=>{let o=nw(t);this._stdout.write(o)?n():this._stdout.once("drain",n)})}};var Hl="0.3.0";var cg=require("child_process");var sg=ht(Iw()),r4="ed1a4165d4f8fd836bf16f3ca1915a67",ig=!1,ag=!1,n4=["error","manual"];function o4(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);try{return new Error(JSON.stringify(e))}catch{return new Error(String(e))}}function Ew(e){ig||(ag=e.isDevelopment,!ag&&(sg.default.start({apiKey:r4,autoTrackSessions:!1,appVersion:e.appVersion,logger:null,enabledBreadcrumbTypes:e.enabledBreadcrumbTypes??n4}),ig=!0))}function Tw(e,t={},n){!ig||ag||sg.default.notify(o4(e),o=>{o.addMetadata("metadata",t),n&&n(o)})}var i4=process.env.NODE_ENV=="development";Ew({isDevelopment:i4,appVersion:Hl});var Aw=ht(require("fs")),Dw=ht(require("path"));var a4=new Set(["actionable_bug","apple_contract_change","upstream_terminal_failure","unknown"]),s4=new Set(["INVALID_REQUEST","PAYLOAD_TOO_LARGE","AUTH_REQUIRED","AUTH_IN_PROGRESS","TTY_REQUIRED","AUTHORIZATION_FAILED","NOT_FOUND"]),c4=new Set(["invalid_credentials","two_factor_required","upgrade_required"]);function Pw(e){if(!(!e||typeof e!="object"||Array.isArray(e)))return e}function Ow(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"&&e.trim()!==""){let t=Number(e);if(Number.isFinite(t))return t}}function Qe(e){if(typeof e!="string")return;let t=e.trim();return t===""?void 0:t}function Xl(e){let t=Pw(e.telemetryHint);if(t)return{classification:Qe(t.classification),isTerminal:typeof t.isTerminal=="boolean"?t.isTerminal:void 0,isUserFault:typeof t.isUserFault=="boolean"?t.isUserFault:void 0,source:Qe(t.source),operation:Qe(t.operation),surface:Qe(t.surface),statusCode:Ow(t.statusCode),errorCode:Qe(t.errorCode),tool:Qe(t.tool),stage:Qe(t.stage),upstreamProvider:Qe(t.upstreamProvider)}}function Yl(e){return Pw(e)}function u4(e,t){let n=Xl(t);if(n?.statusCode!=null)return n.statusCode;let o=Yl(e);return Ow(o?.status??o?.statusCode??t.statusCode)}function l4(e,t){let n=Xl(t);if(n?.errorCode)return n.errorCode;let o=Yl(e);return Qe(o?.errorCode??o?.code??t.errorCode)}function d4(e){let t=Yl(e);return Qe(t?.name)==="DashboardApiError"}function f4(e){let t=Yl(e);return Qe(t?.name)==="AppleAuthResponseError"}function p4(e){if(!(e instanceof Error))return!1;let t=e.message.toLowerCase();return t.includes("invalid apple id credentials")||t.includes("invalid credentials")||t.includes("incorrect verification code")}function m4(e){if(!(e instanceof Error))return!1;let t=e.message.toLowerCase();return t.includes("primary app id")&&(t.includes("not accessible")||t.includes("you can access"))}function h4(e,t){let n=Xl(t);if(n?.classification)return{report:a4.has(n.classification),classification:n.classification,reason:"explicit_hint_classification"};if(n?.isUserFault)return{report:!1,classification:"user_fault",reason:"explicit_hint_user_fault"};if(f4(e)){let a=Qe(e.reason);return a&&c4.has(a)?{report:!1,classification:"user_fault",reason:`apple_auth_${a}`}:{report:!0,classification:"apple_contract_change",reason:`apple_auth_${a??"unknown"}`}}if(n?.isTerminal===!1)return{report:!1,classification:"transient_non_terminal",reason:"explicit_hint_non_terminal"};if(n?.upstreamProvider&&n?.isTerminal===!0)return{report:!0,classification:"upstream_terminal_failure",reason:"explicit_hint_terminal_upstream"};if(p4(e))return{report:!1,classification:"user_fault",reason:"credential_user_fault_message"};let o=u4(e,t),r=l4(e,t);if(d4(e)&&o!=null&&o>=400&&o<500)return{report:!1,classification:"expected_flow",reason:"dashboard_api_4xx"};if(r&&s4.has(r))return{report:!1,classification:"expected_flow",reason:`dashboard_error_code_${r}`};if(m4(e))return{report:!1,classification:"expected_flow",reason:"primary_app_setup_flow"};if(o!=null&&o>=400&&o<500)return{report:!1,classification:"validation_error",reason:"generic_4xx"}}function jw(e,t={}){let n=h4(e,t);return n||{report:!0,classification:"unknown",reason:"default_report"}}function Nw(e,t){let n=Xl(e),o=Qe(e.surface)??n?.surface??"unknown",r=Qe(e.source)??n?.source??"unknown",i=Qe(e.operation)??n?.operation??"unknown",a=typeof e.isTerminal=="boolean"?e.isTerminal:n?.isTerminal??null;return{...e,surface:o,source:r,operation:i,isTerminal:a,telemetryClassification:t.classification,telemetryDecisionReason:t.reason}}var g4="__asoBugsnagMetadata";function v4(e){if(!(!e||typeof e!="object"||Array.isArray(e)))return e}function Rw(e){if(e instanceof Error)return v4(e[g4])}function cr(e,t={}){let n=Rw(e)||{},o={...t,...n},r=jw(e,o);r.report&&Tw(e,Nw(o,r))}function _4(){let e=[Dw.default.resolve(__dirname,"cli.js")];for(let t of e)if(Aw.default.existsSync(t))return t;return null}function y4(e){let t=_4();return t?(0,cg.spawn)(process.execPath,[t,...e],{env:process.env}):(0,cg.spawn)("aso",e,{env:process.env})}function Cw(e){return new Promise((t,n)=>{let o,r=typeof e[0]=="string"?e[0]:"unknown";try{o=y4(e)}catch(s){cr(s,{command:r,argCount:e.length,stage:"spawn",surface:"aso-mcp",telemetryHint:{classification:"actionable_bug",surface:"aso-mcp",source:"mcp.execute-aso-cli.spawn",stage:"spawn",tool:"aso_evaluate_keywords"}}),n(s);return}let i="",a="";o.stdout?.on("data",s=>{i+=s.toString()}),o.stderr?.on("data",s=>{a+=s.toString()}),o.on("close",s=>{t({stdout:i,stderr:a,exitCode:s??1})}),o.on("error",s=>{cr(s,{command:r,argCount:e.length,stage:"transport",surface:"aso-mcp",telemetryHint:{classification:"actionable_bug",surface:"aso-mcp",source:"mcp.execute-aso-cli.transport",stage:"transport",tool:"aso_evaluate_keywords"}}),t({stdout:i,stderr:s.message,exitCode:1})})})}function Uw(e){return e.exitCode!==0?{content:[{type:"text",text:`Error: ${e.stderr||e.stdout}`}],isError:!0}:{content:[{type:"text",text:e.stdout}]}}var b4="research";var Ql=b4,Zw="Research";var ed=ht(require("fs")),pn=ht(require("path")),Mw=ht(require("os")),Lw=ht(require("better-sqlite3")),$4=pn.join(Mw.homedir(),".aso"),x4=pn.join($4,"aso-db.sqlite"),Aa=null;function w4(){let e=process.env.ASO_DB_PATH;return e&&e.trim()!==""?pn.resolve(e):x4}function k4(e){e.pragma("journal_mode = WAL"),e.pragma("foreign_keys = ON"),e.exec(`
|
|
63
63
|
CREATE TABLE IF NOT EXISTS apps (
|
|
64
64
|
id TEXT PRIMARY KEY,
|
|
65
65
|
name TEXT NOT NULL
|
|
@@ -77,11 +77,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
77
77
|
ordered_app_ids TEXT NOT NULL,
|
|
78
78
|
created_at TEXT NOT NULL,
|
|
79
79
|
updated_at TEXT NOT NULL,
|
|
80
|
-
|
|
80
|
+
order_expires_at TEXT NOT NULL,
|
|
81
|
+
popularity_expires_at TEXT NOT NULL,
|
|
81
82
|
PRIMARY KEY (country, normalized_keyword)
|
|
82
83
|
);
|
|
83
|
-
CREATE INDEX IF NOT EXISTS
|
|
84
|
-
ON aso_keywords(country,
|
|
84
|
+
CREATE INDEX IF NOT EXISTS idx_aso_keywords_country_order_expires
|
|
85
|
+
ON aso_keywords(country, order_expires_at);
|
|
85
86
|
|
|
86
87
|
CREATE TABLE IF NOT EXISTS aso_apps (
|
|
87
88
|
bucket TEXT NOT NULL,
|
|
@@ -121,13 +122,31 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
121
122
|
value TEXT NOT NULL,
|
|
122
123
|
updated_at TEXT NOT NULL
|
|
123
124
|
);
|
|
124
|
-
|
|
125
|
+
|
|
126
|
+
CREATE TABLE IF NOT EXISTS aso_keyword_failures (
|
|
127
|
+
country TEXT NOT NULL,
|
|
128
|
+
normalized_keyword TEXT NOT NULL,
|
|
129
|
+
keyword TEXT NOT NULL,
|
|
130
|
+
status TEXT NOT NULL,
|
|
131
|
+
stage TEXT NOT NULL,
|
|
132
|
+
reason_code TEXT NOT NULL,
|
|
133
|
+
message TEXT NOT NULL,
|
|
134
|
+
status_code INTEGER,
|
|
135
|
+
retryable INTEGER NOT NULL,
|
|
136
|
+
attempts INTEGER NOT NULL,
|
|
137
|
+
request_id TEXT,
|
|
138
|
+
updated_at TEXT NOT NULL,
|
|
139
|
+
PRIMARY KEY (country, normalized_keyword)
|
|
140
|
+
);
|
|
141
|
+
CREATE INDEX IF NOT EXISTS idx_aso_keyword_failures_country_stage
|
|
142
|
+
ON aso_keyword_failures(country, stage);
|
|
143
|
+
`);let t=new Set(e.prepare("PRAGMA table_info(aso_apps)").all().map(n=>n.name).filter(n=>typeof n=="string"));t.has("previous_average_user_rating")||e.exec("ALTER TABLE aso_apps ADD COLUMN previous_average_user_rating REAL"),t.has("previous_user_rating_count")||e.exec("ALTER TABLE aso_apps ADD COLUMN previous_user_rating_count INTEGER"),t.has("last_fetched_at")||e.exec("ALTER TABLE aso_apps ADD COLUMN last_fetched_at TEXT"),t.has("previous_fetched_at")||e.exec("ALTER TABLE aso_apps ADD COLUMN previous_fetched_at TEXT")}function Da(){if(Aa)return Aa;let e=w4(),t=pn.dirname(e);return ed.existsSync(t)||ed.mkdirSync(t,{recursive:!0}),Aa=new Lw.default(e),k4(Aa),Aa}function ug(e){return e.trim().toLowerCase()}function qw(e){let t=new Set;for(let n of e){let o=ug(n);o&&t.add(o)}return Array.from(t)}var z4="US";function Vw(e,t,n=z4){if(t.length===0)return;let o=Da(),r=o.prepare(`INSERT OR IGNORE INTO app_keywords (
|
|
125
144
|
app_id, keyword, country, previous_position, added_at
|
|
126
145
|
)
|
|
127
|
-
VALUES (?, ?, ?, NULL, ?)`),i=new Date().toISOString();o.transaction(()=>{for(let s of t){let c=
|
|
146
|
+
VALUES (?, ?, ?, NULL, ?)`),i=new Date().toISOString();o.transaction(()=>{for(let s of t){let c=ug(s);c&&r.run(e,c,n,i)}})()}function Fw(e){if(e.length===0)return;let t=Da(),n=t.prepare(`
|
|
128
147
|
INSERT INTO apps (id, name)
|
|
129
148
|
VALUES (@id, @name)
|
|
130
149
|
ON CONFLICT(id) DO UPDATE SET
|
|
131
150
|
name = excluded.name
|
|
132
|
-
`);t.transaction(r=>{for(let i of r)n.run({id:i.id,name:i.name})})(e)}function
|
|
151
|
+
`);t.transaction(r=>{for(let i of r)n.run({id:i.id,name:i.name})})(e)}function lg(e){return Da().prepare("SELECT id, name FROM apps WHERE id = ?").get(e)??null}function I4(e){let t=e.trim()||Ql,n=t.match(/^id(\d+)$/i);if(!n)return t;let o=n[1];return lg(o)?o:`id${o}`}function Bw(e,t,n=Ql){if(e.length===0)return 0;let o=Array.from(new Set(e.map(i=>i.trim().toLowerCase()).filter(i=>i.length>0)));if(o.length===0)return 0;let r=I4(n);return lg(r)||Fw([{id:r,name:r===Ql?Zw:r}]),Vw(r,o,t),o.length}var E4=15,T4=70,Kw=6,Hw=qt.object({keywords:qt.array(qt.string().min(1).describe("ASO search term candidate. Can be a single word or a multi-word long-tail phrase.")).min(1).max(100).describe("List of ASO search term candidates. Comma-separated entries are split and normalized."),minPopularity:qt.number().min(Kw).optional(),maxDifficulty:qt.number().optional(),appId:qt.string().trim().min(1).optional().describe("Optional local app id to associate accepted keywords with. Defaults to the research app when omitted.")});function P4(e){return e.length>=2&&/[a-z0-9]/.test(e)}function O4(e){if(!e||e.length<2||e.length>60)return!1;let t=e.split(" ").filter(Boolean);return t.length===0||t.length>4?!1:t.every(n=>P4(n))}function j4(e){return e.flatMap(t=>t.split(","))}function N4(e){return qw(e).filter(t=>O4(t))}function R4(e){let t=e.trim();if(!t)return null;try{return JSON.parse(t)}catch{return null}}function A4(e){if(!e||typeof e!="object")return null;let t=e;return!Array.isArray(t.items)||!Array.isArray(t.failedKeywords)?null:t.items}function dg(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"&&e.trim()!==""){let t=Number(e);return Number.isFinite(t)?t:null}return null}function D4(e){return typeof e=="string"?e:""}function C4(e){let t=e??{};return{keyword:D4(t.keyword),popularity:dg(t.popularity),difficulty:dg(t.difficulty??t.difficultyScore),minDifficultyScore:dg(t.minDifficultyScore)}}function td(e){return{content:[{type:"text",text:e}],isError:!0}}async function Jw(e){let t=Math.max(e.minPopularity??E4,Kw),n=e.maxDifficulty??T4,o=e.appId,r=j4(e.keywords),i=N4(r);if(r.length>100)return td(`Too many keywords: received ${r.length}, max is ${100}.`);if(i.length===0)return td("No valid keywords were found in `keywords`.");let a=i.join(","),s=await Cw(["keywords",a,"--stdout"]);if(s.exitCode!==0)return Uw(s);let c=R4(s.stdout);if(c==null)return cr(new Error("MCP expected JSON output from aso keywords"),{surface:"aso-mcp",tool:"aso_evaluate_keywords",stage:"parse-json",command:"keywords",exitCode:s.exitCode,stdoutLength:s.stdout.length,stderrLength:s.stderr.length,telemetryHint:{classification:"actionable_bug",surface:"aso-mcp",source:"mcp.aso-evaluate-keywords.parse-json",stage:"parse",tool:"aso_evaluate_keywords"}}),td("ASO command succeeded but response was not valid JSON.");let l=A4(c);if(l==null)return cr(new Error("MCP expected `{ items, failedKeywords }` envelope from aso keywords"),{surface:"aso-mcp",tool:"aso_evaluate_keywords",stage:"parse-envelope",command:"keywords",exitCode:s.exitCode,stdoutLength:s.stdout.length,stderrLength:s.stderr.length,telemetryHint:{classification:"actionable_bug",surface:"aso-mcp",source:"mcp.aso-evaluate-keywords.parse-envelope",stage:"parse",tool:"aso_evaluate_keywords"}}),td("ASO command succeeded but response format was not valid `{ items, failedKeywords }` payload.");let f=l.map(C4).filter(_=>_.keyword!=="").map(_=>{let v=_.popularity,g=_.difficulty,b=v!=null&&v>=t,x=g!=null&&g<=n;return{..._,passes:b&&x}}).flatMap(_=>!_.passes||_.popularity==null||_.difficulty==null?[]:[{keyword:_.keyword,popularity:_.popularity,difficulty:_.difficulty,minDifficultyScore:_.minDifficultyScore}]);if(f.length>0)try{Bw(f.map(_=>_.keyword),"US",o)}catch(_){throw cr(_,{surface:"aso-mcp",tool:"aso_evaluate_keywords",stage:"persist",acceptedCount:f.length,telemetryHint:{classification:"actionable_bug",surface:"aso-mcp",source:"mcp.aso-evaluate-keywords.persist",stage:"persist",tool:"aso_evaluate_keywords"}}),_}return{content:[{type:"text",text:JSON.stringify(f,null,2)}]}}var Gw=[20,18,1];function U4(e){let[t="0",n="0",o="0"]=e.replace(/^v/,"").split(".");return[Number.parseInt(t,10)||0,Number.parseInt(n,10)||0,Number.parseInt(o,10)||0]}function Z4(e,t){for(let n=0;n<3;n+=1){if(e[n]>t[n])return!0;if(e[n]<t[n])return!1}return!0}function Ww(e=process.version){let t=U4(e);if(!Z4(t,Gw))throw new Error(`aso-cli requires Node.js >= ${Gw.join(".")}. Current runtime: ${e}.`)}Ww();var Xw=new Fl({name:"aso-mcp",title:"ASO MCP Server",version:Hl,description:"MCP server for ASO keyword evaluation and scoring through the standalone ASO CLI.",websiteUrl:"https://github.com/semihcihan/App-Store-Optimization-CLI"},{instructions:"Use `aso_evaluate_keywords` to evaluate explicit ASO keyword candidates. The tool returns only accepted keywords with compact scores."});Xw.registerTool("aso_evaluate_keywords",{title:"Evaluate ASO keywords",description:"Evaluates explicit ASO search terms (single-word or multi-word long-tail phrases) and returns only accepted keywords with compact metrics: keyword, popularity, difficulty, minDifficultyScore.",inputSchema:Hw},Jw);async function M4(){let e=new Kl;await Xw.connect(e)}M4().catch(e=>{cr(e,{surface:"aso-mcp",stage:"bootstrap",telemetryHint:{classification:"actionable_bug",surface:"aso-mcp",source:"mcp.index.main",stage:"bootstrap"}}),console.error("MCP server error:",e),process.exitCode=1});
|
|
133
152
|
//# sourceMappingURL=mcp.js.map
|