@octavus/agent 0.1.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.
@@ -0,0 +1,148 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire}from'module';const require=createRequire(import.meta.url);
3
+ var fE=Object.create;var Vl=Object.defineProperty;var mE=Object.getOwnPropertyDescriptor;var hE=Object.getOwnPropertyNames;var gE=Object.getPrototypeOf,vE=Object.prototype.hasOwnProperty;var R=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ct=(e,t)=>{for(var r in t)Vl(e,r,{get:t[r],enumerable:!0})},yE=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of hE(t))!vE.call(e,n)&&n!==r&&Vl(e,n,{get:()=>t[n],enumerable:!(o=mE(t,n))||o.enumerable});return e};var ox=(e,t,r)=>(r=e!=null?fE(gE(e)):{},yE(t||!e||!e.__esModule?Vl(r,"default",{value:e,enumerable:!0}):r,e));var Qi=R(le=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.regexpCode=le.getEsmExportName=le.getProperty=le.safeStringify=le.stringify=le.strConcat=le.addCodeArg=le.str=le._=le.nil=le._Code=le.Name=le.IDENTIFIER=le._CodeOrName=void 0;var Xi=class{};le._CodeOrName=Xi;le.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var hn=class extends Xi{constructor(t){if(super(),!le.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}}};le.Name=hn;var Ot=class extends Xi{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((r,o)=>`${r}${o}`,"")}get names(){var t;return(t=this._names)!==null&&t!==void 0?t:this._names=this._items.reduce((r,o)=>(o instanceof hn&&(r[o.str]=(r[o.str]||0)+1),r),{})}};le._Code=Ot;le.nil=new Ot("");function Fk(e,...t){let r=[e[0]],o=0;for(;o<t.length;)Xf(r,t[o]),r.push(e[++o]);return new Ot(r)}le._=Fk;var Kf=new Ot("+");function qk(e,...t){let r=[Yi(e[0])],o=0;for(;o<t.length;)r.push(Kf),Xf(r,t[o]),r.push(Kf,Yi(e[++o]));return M1(r),new Ot(r)}le.str=qk;function Xf(e,t){t instanceof Ot?e.push(...t._items):t instanceof hn?e.push(t):e.push(q1(t))}le.addCodeArg=Xf;function M1(e){let t=1;for(;t<e.length-1;){if(e[t]===Kf){let r=L1(e[t-1],e[t+1]);if(r!==void 0){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}function L1(e,t){if(t==='""')return e;if(e==='""')return t;if(typeof e=="string")return t instanceof hn||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 hn))return`"${e}${t.slice(1)}`}function F1(e,t){return t.emptyStr()?e:e.emptyStr()?t:qk`${e}${t}`}le.strConcat=F1;function q1(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:Yi(Array.isArray(e)?e.join(","):e)}function V1(e){return new Ot(Yi(e))}le.stringify=V1;function Yi(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}le.safeStringify=Yi;function J1(e){return typeof e=="string"&&le.IDENTIFIER.test(e)?new Ot(`.${e}`):Fk`[${e}]`}le.getProperty=J1;function H1(e){if(typeof e=="string"&&le.IDENTIFIER.test(e))return new Ot(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}le.getEsmExportName=H1;function B1(e){return new Ot(e.toString())}le.regexpCode=B1});var em=R(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.ValueScope=ut.ValueScopeName=ut.Scope=ut.varKinds=ut.UsedValueState=void 0;var ct=Qi(),Yf=class extends Error{constructor(t){super(`CodeGen: "code" for ${t} not defined`),this.value=t.value}},dc;(function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"})(dc||(ut.UsedValueState=dc={}));ut.varKinds={const:new ct.Name("const"),let:new ct.Name("let"),var:new ct.Name("var")};var pc=class{constructor({prefixes:t,parent:r}={}){this._names={},this._prefixes=t,this._parent=r}toName(t){return t instanceof ct.Name?t:this.name(t)}name(t){return new ct.Name(this._newName(t))}_newName(t){let r=this._names[t]||this._nameGroup(t);return`${t}${r.index++}`}_nameGroup(t){var r,o;if(!((o=(r=this._parent)===null||r===void 0?void 0:r._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}}};ut.Scope=pc;var fc=class extends ct.Name{constructor(t,r){super(r),this.prefix=t}setValue(t,{property:r,itemIndex:o}){this.value=t,this.scopePath=(0,ct._)`.${new ct.Name(r)}[${o}]`}};ut.ValueScopeName=fc;var W1=(0,ct._)`\n`,Qf=class extends pc{constructor(t){super(t),this._values={},this._scope=t.scope,this.opts={...t,_n:t.lines?W1:ct.nil}}get(){return this._scope}name(t){return new fc(t,this._newName(t))}value(t,r){var o;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(t),{prefix:i}=n,a=(o=r.key)!==null&&o!==void 0?o:r.ref,s=this._values[i];if(s){let l=s.get(a);if(l)return l}else s=this._values[i]=new Map;s.set(a,n);let c=this._scope[i]||(this._scope[i]=[]),u=c.length;return c[u]=r.ref,n.setValue(r,{property:i,itemIndex:u}),n}getValue(t,r){let o=this._values[t];if(o)return o.get(r)}scopeRefs(t,r=this._values){return this._reduceValues(r,o=>{if(o.scopePath===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return(0,ct._)`${t}${o.scopePath}`})}scopeCode(t=this._values,r,o){return this._reduceValues(t,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},r,o)}_reduceValues(t,r,o={},n){let i=ct.nil;for(let a in t){let s=t[a];if(!s)continue;let c=o[a]=o[a]||new Map;s.forEach(u=>{if(c.has(u))return;c.set(u,dc.Started);let l=r(u);if(l){let d=this.opts.es5?ut.varKinds.var:ut.varKinds.const;i=(0,ct._)`${i}${d} ${u} = ${l};${this.opts._n}`}else if(l=n?.(u))i=(0,ct._)`${i}${l}${this.opts._n}`;else throw new Yf(u);c.set(u,dc.Completed)})}return i}};ut.ValueScope=Qf});var X=R(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.or=ee.and=ee.not=ee.CodeGen=ee.operators=ee.varKinds=ee.ValueScopeName=ee.ValueScope=ee.Scope=ee.Name=ee.regexpCode=ee.stringify=ee.getProperty=ee.nil=ee.strConcat=ee.str=ee._=void 0;var ae=Qi(),qt=em(),Ur=Qi();Object.defineProperty(ee,"_",{enumerable:!0,get:function(){return Ur._}});Object.defineProperty(ee,"str",{enumerable:!0,get:function(){return Ur.str}});Object.defineProperty(ee,"strConcat",{enumerable:!0,get:function(){return Ur.strConcat}});Object.defineProperty(ee,"nil",{enumerable:!0,get:function(){return Ur.nil}});Object.defineProperty(ee,"getProperty",{enumerable:!0,get:function(){return Ur.getProperty}});Object.defineProperty(ee,"stringify",{enumerable:!0,get:function(){return Ur.stringify}});Object.defineProperty(ee,"regexpCode",{enumerable:!0,get:function(){return Ur.regexpCode}});Object.defineProperty(ee,"Name",{enumerable:!0,get:function(){return Ur.Name}});var vc=em();Object.defineProperty(ee,"Scope",{enumerable:!0,get:function(){return vc.Scope}});Object.defineProperty(ee,"ValueScope",{enumerable:!0,get:function(){return vc.ValueScope}});Object.defineProperty(ee,"ValueScopeName",{enumerable:!0,get:function(){return vc.ValueScopeName}});Object.defineProperty(ee,"varKinds",{enumerable:!0,get:function(){return vc.varKinds}});ee.operators={GT:new ae._Code(">"),GTE:new ae._Code(">="),LT:new ae._Code("<"),LTE:new ae._Code("<="),EQ:new ae._Code("==="),NEQ:new ae._Code("!=="),NOT:new ae._Code("!"),OR:new ae._Code("||"),AND:new ae._Code("&&"),ADD:new ae._Code("+")};var vr=class{optimizeNodes(){return this}optimizeNames(t,r){return this}},tm=class extends vr{constructor(t,r,o){super(),this.varKind=t,this.name=r,this.rhs=o}render({es5:t,_n:r}){let o=t?qt.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${o} ${this.name}${n};`+r}optimizeNames(t,r){if(t[this.name.str])return this.rhs&&(this.rhs=uo(this.rhs,t,r)),this}get names(){return this.rhs instanceof ae._CodeOrName?this.rhs.names:{}}},mc=class extends vr{constructor(t,r,o){super(),this.lhs=t,this.rhs=r,this.sideEffects=o}render({_n:t}){return`${this.lhs} = ${this.rhs};`+t}optimizeNames(t,r){if(!(this.lhs instanceof ae.Name&&!t[this.lhs.str]&&!this.sideEffects))return this.rhs=uo(this.rhs,t,r),this}get names(){let t=this.lhs instanceof ae.Name?{}:{...this.lhs.names};return gc(t,this.rhs)}},rm=class extends mc{constructor(t,r,o,n){super(t,o,n),this.op=r}render({_n:t}){return`${this.lhs} ${this.op}= ${this.rhs};`+t}},nm=class extends vr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`${this.label}:`+t}},om=class extends vr{constructor(t){super(),this.label=t,this.names={}}render({_n:t}){return`break${this.label?` ${this.label}`:""};`+t}},im=class extends vr{constructor(t){super(),this.error=t}render({_n:t}){return`throw ${this.error};`+t}get names(){return this.error.names}},am=class extends vr{constructor(t){super(),this.code=t}render({_n:t}){return`${this.code};`+t}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(t,r){return this.code=uo(this.code,t,r),this}get names(){return this.code instanceof ae._CodeOrName?this.code.names:{}}},ea=class extends vr{constructor(t=[]){super(),this.nodes=t}render(t){return this.nodes.reduce((r,o)=>r+o.render(t),"")}optimizeNodes(){let{nodes:t}=this,r=t.length;for(;r--;){let o=t[r].optimizeNodes();Array.isArray(o)?t.splice(r,1,...o):o?t[r]=o:t.splice(r,1)}return t.length>0?this:void 0}optimizeNames(t,r){let{nodes:o}=this,n=o.length;for(;n--;){let i=o[n];i.optimizeNames(t,r)||(G1(t,i.names),o.splice(n,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((t,r)=>yn(t,r.names),{})}},yr=class extends ea{render(t){return"{"+t._n+super.render(t)+"}"+t._n}},sm=class extends ea{},co=class extends yr{};co.kind="else";var gn=class e extends yr{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let o=r.optimizeNodes();r=this.else=Array.isArray(o)?new co(o):o}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(Vk(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=uo(this.condition,t,r),this}get names(){let t=super.names;return gc(t,this.condition),this.else&&yn(t,this.else.names),t}};gn.kind="if";var vn=class extends yr{};vn.kind="for";var cm=class extends vn{constructor(t){super(),this.iteration=t}render(t){return`for(${this.iteration})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iteration=uo(this.iteration,t,r),this}get names(){return yn(super.names,this.iteration.names)}},um=class extends vn{constructor(t,r,o,n){super(),this.varKind=t,this.name=r,this.from=o,this.to=n}render(t){let r=t.es5?qt.varKinds.var:this.varKind,{name:o,from:n,to:i}=this;return`for(${r} ${o}=${n}; ${o}<${i}; ${o}++)`+super.render(t)}get names(){let t=gc(super.names,this.from);return gc(t,this.to)}},hc=class extends vn{constructor(t,r,o,n){super(),this.loop=t,this.varKind=r,this.name=o,this.iterable=n}render(t){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(t)}optimizeNames(t,r){if(super.optimizeNames(t,r))return this.iterable=uo(this.iterable,t,r),this}get names(){return yn(super.names,this.iterable.names)}},ta=class extends yr{constructor(t,r,o){super(),this.name=t,this.args=r,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}};ta.kind="func";var ra=class extends ea{render(t){return"return "+super.render(t)}};ra.kind="return";var lm=class extends yr{render(t){let r="try"+super.render(t);return this.catch&&(r+=this.catch.render(t)),this.finally&&(r+=this.finally.render(t)),r}optimizeNodes(){var t,r;return super.optimizeNodes(),(t=this.catch)===null||t===void 0||t.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(t,r){var o,n;return super.optimizeNames(t,r),(o=this.catch)===null||o===void 0||o.optimizeNames(t,r),(n=this.finally)===null||n===void 0||n.optimizeNames(t,r),this}get names(){let t=super.names;return this.catch&&yn(t,this.catch.names),this.finally&&yn(t,this.finally.names),t}},na=class extends yr{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}};na.kind="catch";var oa=class extends yr{render(t){return"finally"+super.render(t)}};oa.kind="finally";var dm=class{constructor(t,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
4
+ `:""},this._extScope=t,this._scope=new qt.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,r){let o=this._extScope.value(t,r);return(this._values[o.prefix]||(this._values[o.prefix]=new Set)).add(o),o}getScopeValue(t,r){return this._extScope.getValue(t,r)}scopeRefs(t){return this._extScope.scopeRefs(t,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(t,r,o,n){let i=this._scope.toName(r);return o!==void 0&&n&&(this._constants[i.str]=o),this._leafNode(new tm(t,i,o)),i}const(t,r,o){return this._def(qt.varKinds.const,t,r,o)}let(t,r,o){return this._def(qt.varKinds.let,t,r,o)}var(t,r,o){return this._def(qt.varKinds.var,t,r,o)}assign(t,r,o){return this._leafNode(new mc(t,r,o))}add(t,r){return this._leafNode(new rm(t,ee.operators.ADD,r))}code(t){return typeof t=="function"?t():t!==ae.nil&&this._leafNode(new am(t)),this}object(...t){let r=["{"];for(let[o,n]of t)r.length>1&&r.push(","),r.push(o),(o!==n||this.opts.es5)&&(r.push(":"),(0,ae.addCodeArg)(r,n));return r.push("}"),new ae._Code(r)}if(t,r,o){if(this._blockNode(new gn(t)),r&&o)this.code(r).else().code(o).endIf();else if(r)this.code(r).endIf();else if(o)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(t){return this._elseNode(new gn(t))}else(){return this._elseNode(new co)}endIf(){return this._endBlockNode(gn,co)}_for(t,r){return this._blockNode(t),r&&this.code(r).endFor(),this}for(t,r){return this._for(new cm(t),r)}forRange(t,r,o,n,i=this.opts.es5?qt.varKinds.var:qt.varKinds.let){let a=this._scope.toName(t);return this._for(new um(i,a,r,o),()=>n(a))}forOf(t,r,o,n=qt.varKinds.const){let i=this._scope.toName(t);if(this.opts.es5){let a=r instanceof ae.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,ae._)`${a}.length`,s=>{this.var(i,(0,ae._)`${a}[${s}]`),o(i)})}return this._for(new hc("of",n,i,r),()=>o(i))}forIn(t,r,o,n=this.opts.es5?qt.varKinds.var:qt.varKinds.const){if(this.opts.ownProperties)return this.forOf(t,(0,ae._)`Object.keys(${r})`,o);let i=this._scope.toName(t);return this._for(new hc("in",n,i,r),()=>o(i))}endFor(){return this._endBlockNode(vn)}label(t){return this._leafNode(new nm(t))}break(t){return this._leafNode(new om(t))}return(t){let r=new ra;if(this._blockNode(r),this.code(t),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ra)}try(t,r,o){if(!r&&!o)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new lm;if(this._blockNode(n),this.code(t),r){let i=this.name("e");this._currNode=n.catch=new na(i),r(i)}return o&&(this._currNode=n.finally=new oa,this.code(o)),this._endBlockNode(na,oa)}throw(t){return this._leafNode(new im(t))}block(t,r){return this._blockStarts.push(this._nodes.length),t&&this.code(t).endBlock(r),this}endBlock(t){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let o=this._nodes.length-r;if(o<0||t!==void 0&&o!==t)throw new Error(`CodeGen: wrong number of nodes: ${o} vs ${t} expected`);return this._nodes.length=r,this}func(t,r=ae.nil,o,n){return this._blockNode(new ta(t,r,o)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(ta)}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,r){let o=this._currNode;if(o instanceof t||r&&o instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${t.kind}/${r.kind}`:t.kind}"`)}_elseNode(t){let r=this._currNode;if(!(r instanceof gn))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=t,this}get _root(){return this._nodes[0]}get _currNode(){let t=this._nodes;return t[t.length-1]}set _currNode(t){let r=this._nodes;r[r.length-1]=t}};ee.CodeGen=dm;function yn(e,t){for(let r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function gc(e,t){return t instanceof ae._CodeOrName?yn(e,t.names):e}function uo(e,t,r){if(e instanceof ae.Name)return o(e);if(!n(e))return e;return new ae._Code(e._items.reduce((i,a)=>(a instanceof ae.Name&&(a=o(a)),a instanceof ae._Code?i.push(...a._items):i.push(a),i),[]));function o(i){let a=r[i.str];return a===void 0||t[i.str]!==1?i:(delete t[i.str],a)}function n(i){return i instanceof ae._Code&&i._items.some(a=>a instanceof ae.Name&&t[a.str]===1&&r[a.str]!==void 0)}}function G1(e,t){for(let r in t)e[r]=(e[r]||0)-(t[r]||0)}function Vk(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,ae._)`!${pm(e)}`}ee.not=Vk;var K1=Jk(ee.operators.AND);function X1(...e){return e.reduce(K1)}ee.and=X1;var Y1=Jk(ee.operators.OR);function Q1(...e){return e.reduce(Y1)}ee.or=Q1;function Jk(e){return(t,r)=>t===ae.nil?r:r===ae.nil?t:(0,ae._)`${pm(t)} ${e} ${pm(r)}`}function pm(e){return e instanceof ae.Name?e:(0,ae._)`(${e})`}});var se=R(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.checkStrictMode=te.getErrorPath=te.Type=te.useFunc=te.setEvaluated=te.evaluatedPropsToName=te.mergeEvaluated=te.eachItem=te.unescapeJsonPointer=te.escapeJsonPointer=te.escapeFragment=te.unescapeFragment=te.schemaRefOrVal=te.schemaHasRulesButRef=te.schemaHasRules=te.checkUnknownRules=te.alwaysValidSchema=te.toHash=void 0;var $e=X(),eN=Qi();function tN(e){let t={};for(let r of e)t[r]=!0;return t}te.toHash=tN;function rN(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(Wk(e,t),!Gk(t,e.self.RULES.all))}te.alwaysValidSchema=rN;function Wk(e,t=e.schema){let{opts:r,self:o}=e;if(!r.strictSchema||typeof t=="boolean")return;let n=o.RULES.keywords;for(let i in t)n[i]||Yk(e,`unknown keyword: "${i}"`)}te.checkUnknownRules=Wk;function Gk(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(t[r])return!0;return!1}te.schemaHasRules=Gk;function nN(e,t){if(typeof e=="boolean")return!e;for(let r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}te.schemaHasRulesButRef=nN;function oN({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,$e._)`${r}`}return(0,$e._)`${e}${t}${(0,$e.getProperty)(o)}`}te.schemaRefOrVal=oN;function iN(e){return Kk(decodeURIComponent(e))}te.unescapeFragment=iN;function aN(e){return encodeURIComponent(mm(e))}te.escapeFragment=aN;function mm(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}te.escapeJsonPointer=mm;function Kk(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}te.unescapeJsonPointer=Kk;function sN(e,t){if(Array.isArray(e))for(let r of e)t(r);else t(e)}te.eachItem=sN;function Hk({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,i,a,s)=>{let c=a===void 0?i:a instanceof $e.Name?(i instanceof $e.Name?e(n,i,a):t(n,i,a),a):i instanceof $e.Name?(t(n,a,i),i):r(i,a);return s===$e.Name&&!(c instanceof $e.Name)?o(n,c):c}}te.mergeEvaluated={props:Hk({mergeNames:(e,t,r)=>e.if((0,$e._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,$e._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,$e._)`${r} || {}`).code((0,$e._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,$e._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,$e._)`${r} || {}`),hm(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:Xk}),items:Hk({mergeNames:(e,t,r)=>e.if((0,$e._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,$e._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,$e._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,$e._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function Xk(e,t){if(t===!0)return e.var("props",!0);let r=e.var("props",(0,$e._)`{}`);return t!==void 0&&hm(e,r,t),r}te.evaluatedPropsToName=Xk;function hm(e,t,r){Object.keys(r).forEach(o=>e.assign((0,$e._)`${t}${(0,$e.getProperty)(o)}`,!0))}te.setEvaluated=hm;var Bk={};function cN(e,t){return e.scopeValue("func",{ref:t,code:Bk[t.code]||(Bk[t.code]=new eN._Code(t.code))})}te.useFunc=cN;var fm;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(fm||(te.Type=fm={}));function uN(e,t,r){if(e instanceof $e.Name){let o=t===fm.Num;return r?o?(0,$e._)`"[" + ${e} + "]"`:(0,$e._)`"['" + ${e} + "']"`:o?(0,$e._)`"/" + ${e}`:(0,$e._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,$e.getProperty)(e).toString():"/"+mm(e)}te.getErrorPath=uN;function Yk(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}te.checkStrictMode=Yk});var _r=R(gm=>{"use strict";Object.defineProperty(gm,"__esModule",{value:!0});var Je=X(),lN={data:new Je.Name("data"),valCxt:new Je.Name("valCxt"),instancePath:new Je.Name("instancePath"),parentData:new Je.Name("parentData"),parentDataProperty:new Je.Name("parentDataProperty"),rootData:new Je.Name("rootData"),dynamicAnchors:new Je.Name("dynamicAnchors"),vErrors:new Je.Name("vErrors"),errors:new Je.Name("errors"),this:new Je.Name("this"),self:new Je.Name("self"),scope:new Je.Name("scope"),json:new Je.Name("json"),jsonPos:new Je.Name("jsonPos"),jsonLen:new Je.Name("jsonLen"),jsonPart:new Je.Name("jsonPart")};gm.default=lN});var ia=R(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 ce=X(),yc=se(),tt=_r();He.keywordError={message:({keyword:e})=>(0,ce.str)`must pass "${e}" keyword validation`};He.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,ce.str)`"${e}" keyword must be ${t} ($data)`:(0,ce.str)`"${e}" keyword is invalid ($data)`};function dN(e,t=He.keywordError,r,o){let{it:n}=e,{gen:i,compositeRule:a,allErrors:s}=n,c=tz(e,t,r);o??(a||s)?Qk(i,c):ez(n,(0,ce._)`[${c}]`)}He.reportError=dN;function pN(e,t=He.keywordError,r){let{it:o}=e,{gen:n,compositeRule:i,allErrors:a}=o,s=tz(e,t,r);Qk(n,s),i||a||ez(o,tt.default.vErrors)}He.reportExtraError=pN;function fN(e,t){e.assign(tt.default.errors,t),e.if((0,ce._)`${tt.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,ce._)`${tt.default.vErrors}.length`,t),()=>e.assign(tt.default.vErrors,null)))}He.resetErrorsCount=fN;function mN({gen:e,keyword:t,schemaValue:r,data:o,errsCount:n,it:i}){if(n===void 0)throw new Error("ajv implementation error");let a=e.name("err");e.forRange("i",n,tt.default.errors,s=>{e.const(a,(0,ce._)`${tt.default.vErrors}[${s}]`),e.if((0,ce._)`${a}.instancePath === undefined`,()=>e.assign((0,ce._)`${a}.instancePath`,(0,ce.strConcat)(tt.default.instancePath,i.errorPath))),e.assign((0,ce._)`${a}.schemaPath`,(0,ce.str)`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign((0,ce._)`${a}.schema`,r),e.assign((0,ce._)`${a}.data`,o))})}He.extendErrors=mN;function Qk(e,t){let r=e.const("err",t);e.if((0,ce._)`${tt.default.vErrors} === null`,()=>e.assign(tt.default.vErrors,(0,ce._)`[${r}]`),(0,ce._)`${tt.default.vErrors}.push(${r})`),e.code((0,ce._)`${tt.default.errors}++`)}function ez(e,t){let{gen:r,validateName:o,schemaEnv:n}=e;n.$async?r.throw((0,ce._)`new ${e.ValidationError}(${t})`):(r.assign((0,ce._)`${o}.errors`,t),r.return(!1))}var _n={keyword:new ce.Name("keyword"),schemaPath:new ce.Name("schemaPath"),params:new ce.Name("params"),propertyName:new ce.Name("propertyName"),message:new ce.Name("message"),schema:new ce.Name("schema"),parentSchema:new ce.Name("parentSchema")};function tz(e,t,r){let{createErrors:o}=e.it;return o===!1?(0,ce._)`{}`:hN(e,t,r)}function hN(e,t,r={}){let{gen:o,it:n}=e,i=[gN(n,r),vN(e,r)];return yN(e,t,i),o.object(...i)}function gN({errorPath:e},{instancePath:t}){let r=t?(0,ce.str)`${e}${(0,yc.getErrorPath)(t,yc.Type.Str)}`:e;return[tt.default.instancePath,(0,ce.strConcat)(tt.default.instancePath,r)]}function vN({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let n=o?t:(0,ce.str)`${t}/${e}`;return r&&(n=(0,ce.str)`${n}${(0,yc.getErrorPath)(r,yc.Type.Str)}`),[_n.schemaPath,n]}function yN(e,{params:t,message:r},o){let{keyword:n,data:i,schemaValue:a,it:s}=e,{opts:c,propertyName:u,topSchemaRef:l,schemaPath:d}=s;o.push([_n.keyword,n],[_n.params,typeof t=="function"?t(e):t||(0,ce._)`{}`]),c.messages&&o.push([_n.message,typeof r=="function"?r(e):r]),c.verbose&&o.push([_n.schema,a],[_n.parentSchema,(0,ce._)`${l}${d}`],[tt.default.data,i]),u&&o.push([_n.propertyName,u])}});var nz=R(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.boolOrEmptySchema=lo.topBoolOrEmptySchema=void 0;var _N=ia(),$N=X(),xN=_r(),bN={message:"boolean schema is false"};function wN(e){let{gen:t,schema:r,validateName:o}=e;r===!1?rz(e,!1):typeof r=="object"&&r.$async===!0?t.return(xN.default.data):(t.assign((0,$N._)`${o}.errors`,null),t.return(!0))}lo.topBoolOrEmptySchema=wN;function kN(e,t){let{gen:r,schema:o}=e;o===!1?(r.var(t,!1),rz(e)):r.var(t,!0)}lo.boolOrEmptySchema=kN;function rz(e,t){let{gen:r,data:o}=e,n={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,_N.reportError)(n,bN,void 0,t)}});var vm=R(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.getRules=po.isJSONType=void 0;var zN=["string","number","integer","boolean","null","object","array"],SN=new Set(zN);function IN(e){return typeof e=="string"&&SN.has(e)}po.isJSONType=IN;function PN(){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:{}}}po.getRules=PN});var ym=R(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.shouldUseRule=Mr.shouldUseGroup=Mr.schemaHasRulesForType=void 0;function TN({schema:e,self:t},r){let o=t.RULES.types[r];return o&&o!==!0&&oz(e,o)}Mr.schemaHasRulesForType=TN;function oz(e,t){return t.rules.some(r=>iz(e,r))}Mr.shouldUseGroup=oz;function iz(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(o=>e[o]!==void 0))}Mr.shouldUseRule=iz});var aa=R(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.reportTypeError=Be.checkDataTypes=Be.checkDataType=Be.coerceAndCheckDataType=Be.getJSONTypes=Be.getSchemaTypes=Be.DataType=void 0;var EN=vm(),ON=ym(),jN=ia(),K=X(),az=se(),fo;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(fo||(Be.DataType=fo={}));function ZN(e){let t=sz(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}Be.getSchemaTypes=ZN;function sz(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(EN.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Be.getJSONTypes=sz;function NN(e,t){let{gen:r,data:o,opts:n}=e,i=RN(t,n.coerceTypes),a=t.length>0&&!(i.length===0&&t.length===1&&(0,ON.schemaHasRulesForType)(e,t[0]));if(a){let s=$m(t,o,n.strictNumbers,fo.Wrong);r.if(s,()=>{i.length?DN(e,t,i):xm(e)})}return a}Be.coerceAndCheckDataType=NN;var cz=new Set(["string","number","integer","boolean","null"]);function RN(e,t){return t?e.filter(r=>cz.has(r)||t==="array"&&r==="array"):[]}function DN(e,t,r){let{gen:o,data:n,opts:i}=e,a=o.let("dataType",(0,K._)`typeof ${n}`),s=o.let("coerced",(0,K._)`undefined`);i.coerceTypes==="array"&&o.if((0,K._)`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>o.assign(n,(0,K._)`${n}[0]`).assign(a,(0,K._)`typeof ${n}`).if($m(t,n,i.strictNumbers),()=>o.assign(s,n))),o.if((0,K._)`${s} !== undefined`);for(let u of r)(cz.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);o.else(),xm(e),o.endIf(),o.if((0,K._)`${s} !== undefined`,()=>{o.assign(n,s),AN(e,s)});function c(u){switch(u){case"string":o.elseIf((0,K._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,K._)`"" + ${n}`).elseIf((0,K._)`${n} === null`).assign(s,(0,K._)`""`);return;case"number":o.elseIf((0,K._)`${a} == "boolean" || ${n} === null
5
+ || (${a} == "string" && ${n} && ${n} == +${n})`).assign(s,(0,K._)`+${n}`);return;case"integer":o.elseIf((0,K._)`${a} === "boolean" || ${n} === null
6
+ || (${a} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(s,(0,K._)`+${n}`);return;case"boolean":o.elseIf((0,K._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(s,!1).elseIf((0,K._)`${n} === "true" || ${n} === 1`).assign(s,!0);return;case"null":o.elseIf((0,K._)`${n} === "" || ${n} === 0 || ${n} === false`),o.assign(s,null);return;case"array":o.elseIf((0,K._)`${a} === "string" || ${a} === "number"
7
+ || ${a} === "boolean" || ${n} === null`).assign(s,(0,K._)`[${n}]`)}}}function AN({gen:e,parentData:t,parentDataProperty:r},o){e.if((0,K._)`${t} !== undefined`,()=>e.assign((0,K._)`${t}[${r}]`,o))}function _m(e,t,r,o=fo.Correct){let n=o===fo.Correct?K.operators.EQ:K.operators.NEQ,i;switch(e){case"null":return(0,K._)`${t} ${n} null`;case"array":i=(0,K._)`Array.isArray(${t})`;break;case"object":i=(0,K._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a((0,K._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return(0,K._)`typeof ${t} ${n} ${e}`}return o===fo.Correct?i:(0,K.not)(i);function a(s=K.nil){return(0,K.and)((0,K._)`typeof ${t} == "number"`,s,r?(0,K._)`isFinite(${t})`:K.nil)}}Be.checkDataType=_m;function $m(e,t,r,o){if(e.length===1)return _m(e[0],t,r,o);let n,i=(0,az.toHash)(e);if(i.array&&i.object){let a=(0,K._)`typeof ${t} != "object"`;n=i.null?a:(0,K._)`!${t} || ${a}`,delete i.null,delete i.array,delete i.object}else n=K.nil;i.number&&delete i.integer;for(let a in i)n=(0,K.and)(n,_m(a,t,r,o));return n}Be.checkDataTypes=$m;var CN={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,K._)`{type: ${e}}`:(0,K._)`{type: ${t}}`};function xm(e){let t=UN(e);(0,jN.reportError)(t,CN)}Be.reportTypeError=xm;function UN(e){let{gen:t,data:r,schema:o}=e,n=(0,az.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:r,schema:o.type,schemaCode:n,schemaValue:n,parentSchema:o,params:{},it:e}}});var lz=R(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});_c.assignDefaults=void 0;var mo=X(),MN=se();function LN(e,t){let{properties:r,items:o}=e.schema;if(t==="object"&&r)for(let n in r)uz(e,n,r[n].default);else t==="array"&&Array.isArray(o)&&o.forEach((n,i)=>uz(e,i,n.default))}_c.assignDefaults=LN;function uz(e,t,r){let{gen:o,compositeRule:n,data:i,opts:a}=e;if(r===void 0)return;let s=(0,mo._)`${i}${(0,mo.getProperty)(t)}`;if(n){(0,MN.checkStrictMode)(e,`default is ignored for: ${s}`);return}let c=(0,mo._)`${s} === undefined`;a.useDefaults==="empty"&&(c=(0,mo._)`${c} || ${s} === null || ${s} === ""`),o.if(c,(0,mo._)`${s} = ${(0,mo.stringify)(r)}`)}});var jt=R(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.validateUnion=he.validateArray=he.usePattern=he.callValidateCode=he.schemaProperties=he.allSchemaProperties=he.noPropertyInData=he.propertyInData=he.isOwnProperty=he.hasPropFunc=he.reportMissingProp=he.checkMissingProp=he.checkReportMissingProp=void 0;var ze=X(),bm=se(),Lr=_r(),FN=se();function qN(e,t){let{gen:r,data:o,it:n}=e;r.if(km(r,o,t,n.opts.ownProperties),()=>{e.setParams({missingProperty:(0,ze._)`${t}`},!0),e.error()})}he.checkReportMissingProp=qN;function VN({gen:e,data:t,it:{opts:r}},o,n){return(0,ze.or)(...o.map(i=>(0,ze.and)(km(e,t,i,r.ownProperties),(0,ze._)`${n} = ${i}`)))}he.checkMissingProp=VN;function JN(e,t){e.setParams({missingProperty:t},!0),e.error()}he.reportMissingProp=JN;function dz(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ze._)`Object.prototype.hasOwnProperty`})}he.hasPropFunc=dz;function wm(e,t,r){return(0,ze._)`${dz(e)}.call(${t}, ${r})`}he.isOwnProperty=wm;function HN(e,t,r,o){let n=(0,ze._)`${t}${(0,ze.getProperty)(r)} !== undefined`;return o?(0,ze._)`${n} && ${wm(e,t,r)}`:n}he.propertyInData=HN;function km(e,t,r,o){let n=(0,ze._)`${t}${(0,ze.getProperty)(r)} === undefined`;return o?(0,ze.or)(n,(0,ze.not)(wm(e,t,r))):n}he.noPropertyInData=km;function pz(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}he.allSchemaProperties=pz;function BN(e,t){return pz(t).filter(r=>!(0,bm.alwaysValidSchema)(e,t[r]))}he.schemaProperties=BN;function WN({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:n,errorPath:i},it:a},s,c,u){let l=u?(0,ze._)`${e}, ${t}, ${o}${n}`:t,d=[[Lr.default.instancePath,(0,ze.strConcat)(Lr.default.instancePath,i)],[Lr.default.parentData,a.parentData],[Lr.default.parentDataProperty,a.parentDataProperty],[Lr.default.rootData,Lr.default.rootData]];a.opts.dynamicRef&&d.push([Lr.default.dynamicAnchors,Lr.default.dynamicAnchors]);let p=(0,ze._)`${l}, ${r.object(...d)}`;return c!==ze.nil?(0,ze._)`${s}.call(${c}, ${p})`:(0,ze._)`${s}(${p})`}he.callValidateCode=WN;var GN=(0,ze._)`new RegExp`;function KN({gen:e,it:{opts:t}},r){let o=t.unicodeRegExp?"u":"",{regExp:n}=t.code,i=n(r,o);return e.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,ze._)`${n.code==="new RegExp"?GN:(0,FN.useFunc)(e,n)}(${r}, ${o})`})}he.usePattern=KN;function XN(e){let{gen:t,data:r,keyword:o,it:n}=e,i=t.name("valid");if(n.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,ze._)`${r}.length`);t.forRange("i",0,c,u=>{e.subschema({keyword:o,dataProp:u,dataPropType:bm.Type.Num},i),t.if((0,ze.not)(i),s)})}}he.validateArray=XN;function YN(e){let{gen:t,schema:r,keyword:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(c=>(0,bm.alwaysValidSchema)(n,c))&&!n.opts.unevaluated)return;let a=t.let("valid",!1),s=t.name("_valid");t.block(()=>r.forEach((c,u)=>{let l=e.subschema({keyword:o,schemaProp:u,compositeRule:!0},s);t.assign(a,(0,ze._)`${a} || ${s}`),e.mergeValidEvaluated(l,s)||t.if((0,ze.not)(a))})),e.result(a,()=>e.reset(),()=>e.error(!0))}he.validateUnion=YN});var hz=R(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.validateKeywordUsage=Qt.validSchemaType=Qt.funcKeywordCode=Qt.macroKeywordCode=void 0;var rt=X(),$n=_r(),QN=jt(),e4=ia();function t4(e,t){let{gen:r,keyword:o,schema:n,parentSchema:i,it:a}=e,s=t.macro.call(a.self,n,i,a),c=mz(r,o,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let u=r.name("valid");e.subschema({schema:s,schemaPath:rt.nil,errSchemaPath:`${a.errSchemaPath}/${o}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))}Qt.macroKeywordCode=t4;function r4(e,t){var r;let{gen:o,keyword:n,schema:i,parentSchema:a,$data:s,it:c}=e;o4(c,t);let u=!s&&t.compile?t.compile.call(c.self,i,a,c):t.validate,l=mz(o,n,u),d=o.let("valid");e.block$data(d,p),e.ok((r=t.valid)!==null&&r!==void 0?r:d);function p(){if(t.errors===!1)h(),t.modifying&&fz(e),y(()=>e.error());else{let x=t.async?f():m();t.modifying&&fz(e),y(()=>n4(e,x))}}function f(){let x=o.let("ruleErrs",null);return o.try(()=>h((0,rt._)`await `),E=>o.assign(d,!1).if((0,rt._)`${E} instanceof ${c.ValidationError}`,()=>o.assign(x,(0,rt._)`${E}.errors`),()=>o.throw(E))),x}function m(){let x=(0,rt._)`${l}.errors`;return o.assign(x,null),h(rt.nil),x}function h(x=t.async?(0,rt._)`await `:rt.nil){let E=c.opts.passContext?$n.default.this:$n.default.self,w=!("compile"in t&&!s||t.schema===!1);o.assign(d,(0,rt._)`${x}${(0,QN.callValidateCode)(e,l,E,w)}`,t.modifying)}function y(x){var E;o.if((0,rt.not)((E=t.valid)!==null&&E!==void 0?E:d),x)}}Qt.funcKeywordCode=r4;function fz(e){let{gen:t,data:r,it:o}=e;t.if(o.parentData,()=>t.assign(r,(0,rt._)`${o.parentData}[${o.parentDataProperty}]`))}function n4(e,t){let{gen:r}=e;r.if((0,rt._)`Array.isArray(${t})`,()=>{r.assign($n.default.vErrors,(0,rt._)`${$n.default.vErrors} === null ? ${t} : ${$n.default.vErrors}.concat(${t})`).assign($n.default.errors,(0,rt._)`${$n.default.vErrors}.length`),(0,e4.extendErrors)(e)},()=>e.error())}function o4({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function mz(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,rt.stringify)(r)})}function i4(e,t,r=!1){return!t.length||t.some(o=>o==="array"?Array.isArray(e):o==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==o||r&&typeof e>"u")}Qt.validSchemaType=i4;function a4({schema:e,opts:t,self:r,errSchemaPath:o},n,i){if(Array.isArray(n.keyword)?!n.keyword.includes(i):n.keyword!==i)throw new Error("ajv implementation error");let a=n.dependencies;if(a?.some(s=>!Object.prototype.hasOwnProperty.call(e,s)))throw new Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(n.validateSchema&&!n.validateSchema(e[i])){let c=`keyword "${i}" value is invalid at path "${o}": `+r.errorsText(n.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(c);else throw new Error(c)}}Qt.validateKeywordUsage=a4});var vz=R(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.extendSubschemaMode=Fr.extendSubschemaData=Fr.getSubschema=void 0;var er=X(),gz=se();function s4(e,{keyword:t,schemaProp:r,schema:o,schemaPath:n,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 r===void 0?{schema:s,schemaPath:(0,er._)`${e.schemaPath}${(0,er.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[r],schemaPath:(0,er._)`${e.schemaPath}${(0,er.getProperty)(t)}${(0,er.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,gz.escapeFragment)(r)}`}}if(o!==void 0){if(n===void 0||i===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:n,topSchemaRef:a,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Fr.getSubschema=s4;function c4(e,t,{dataProp:r,dataPropType:o,data:n,dataTypes:i,propertyName:a}){if(n!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=t;if(r!==void 0){let{errorPath:u,dataPathArr:l,opts:d}=t,p=s.let("data",(0,er._)`${t.data}${(0,er.getProperty)(r)}`,!0);c(p),e.errorPath=(0,er.str)`${u}${(0,gz.getErrorPath)(r,o,d.jsPropertySyntax)}`,e.parentDataProperty=(0,er._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(n!==void 0){let u=n instanceof er.Name?n:s.let("data",n,!0);c(u),a!==void 0&&(e.propertyName=a)}i&&(e.dataTypes=i);function c(u){e.data=u,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,u]}}Fr.extendSubschemaData=c4;function u4(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:o,createErrors:n,allErrors:i}){o!==void 0&&(e.compositeRule=o),n!==void 0&&(e.createErrors=n),i!==void 0&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}Fr.extendSubschemaMode=u4});var zm=R((LJ,yz)=>{"use strict";yz.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}});var $z=R((FJ,_z)=>{"use strict";var qr=_z.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var o=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};$c(t,o,n,e,"",e)};qr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};qr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};qr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};qr.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 $c(e,t,r,o,n,i,a,s,c,u){if(o&&typeof o=="object"&&!Array.isArray(o)){t(o,n,i,a,s,c,u);for(var l in o){var d=o[l];if(Array.isArray(d)){if(l in qr.arrayKeywords)for(var p=0;p<d.length;p++)$c(e,t,r,d[p],n+"/"+l+"/"+p,i,n,l,o,p)}else if(l in qr.propsKeywords){if(d&&typeof d=="object")for(var f in d)$c(e,t,r,d[f],n+"/"+l+"/"+l4(f),i,n,l,o,f)}else(l in qr.keywords||e.allKeys&&!(l in qr.skipKeywords))&&$c(e,t,r,d,n+"/"+l,i,n,l,o)}r(o,n,i,a,s,c,u)}}function l4(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}});var sa=R(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.getSchemaRefs=lt.resolveUrl=lt.normalizeId=lt._getFullPath=lt.getFullPath=lt.inlineRef=void 0;var d4=se(),p4=zm(),f4=$z(),m4=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function h4(e,t=!0){return typeof e=="boolean"?!0:t===!0?!Sm(e):t?xz(e)<=t:!1}lt.inlineRef=h4;var g4=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Sm(e){for(let t in e){if(g4.has(t))return!0;let r=e[t];if(Array.isArray(r)&&r.some(Sm)||typeof r=="object"&&Sm(r))return!0}return!1}function xz(e){let t=0;for(let r in e){if(r==="$ref")return 1/0;if(t++,!m4.has(r)&&(typeof e[r]=="object"&&(0,d4.eachItem)(e[r],o=>t+=xz(o)),t===1/0))return 1/0}return t}function bz(e,t="",r){r!==!1&&(t=ho(t));let o=e.parse(t);return wz(e,o)}lt.getFullPath=bz;function wz(e,t){return e.serialize(t).split("#")[0]+"#"}lt._getFullPath=wz;var v4=/#\/?$/;function ho(e){return e?e.replace(v4,""):""}lt.normalizeId=ho;function y4(e,t,r){return r=ho(r),e.resolve(t,r)}lt.resolveUrl=y4;var _4=/^[a-z_][-a-z0-9._]*$/i;function $4(e,t){if(typeof e=="boolean")return{};let{schemaId:r,uriResolver:o}=this.opts,n=ho(e[r]||t),i={"":n},a=bz(o,n,!1),s={},c=new Set;return f4(e,{allKeys:!0},(d,p,f,m)=>{if(m===void 0)return;let h=a+p,y=i[m];typeof d[r]=="string"&&(y=x.call(this,d[r])),E.call(this,d.$anchor),E.call(this,d.$dynamicAnchor),i[p]=y;function x(w){let b=this.opts.uriResolver.resolve;if(w=ho(y?b(y,w):w),c.has(w))throw l(w);c.add(w);let k=this.refs[w];return typeof k=="string"&&(k=this.refs[k]),typeof k=="object"?u(d,k.schema,w):w!==ho(h)&&(w[0]==="#"?(u(d,s[w],w),s[w]=d):this.refs[w]=h),w}function E(w){if(typeof w=="string"){if(!_4.test(w))throw new Error(`invalid anchor "${w}"`);x.call(this,`#${w}`)}}}),s;function u(d,p,f){if(p!==void 0&&!p4(d,p))throw l(f)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}lt.getSchemaRefs=$4});var la=R(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.getData=Vr.KeywordCxt=Vr.validateFunctionCode=void 0;var Pz=nz(),kz=aa(),Pm=ym(),xc=aa(),x4=lz(),ua=hz(),Im=vz(),L=X(),H=_r(),b4=sa(),$r=se(),ca=ia();function w4(e){if(Oz(e)&&(jz(e),Ez(e))){S4(e);return}Tz(e,()=>(0,Pz.topBoolOrEmptySchema)(e))}Vr.validateFunctionCode=w4;function Tz({gen:e,validateName:t,schema:r,schemaEnv:o,opts:n},i){n.code.es5?e.func(t,(0,L._)`${H.default.data}, ${H.default.valCxt}`,o.$async,()=>{e.code((0,L._)`"use strict"; ${zz(r,n)}`),z4(e,n),e.code(i)}):e.func(t,(0,L._)`${H.default.data}, ${k4(n)}`,o.$async,()=>e.code(zz(r,n)).code(i))}function k4(e){return(0,L._)`{${H.default.instancePath}="", ${H.default.parentData}, ${H.default.parentDataProperty}, ${H.default.rootData}=${H.default.data}${e.dynamicRef?(0,L._)`, ${H.default.dynamicAnchors}={}`:L.nil}}={}`}function z4(e,t){e.if(H.default.valCxt,()=>{e.var(H.default.instancePath,(0,L._)`${H.default.valCxt}.${H.default.instancePath}`),e.var(H.default.parentData,(0,L._)`${H.default.valCxt}.${H.default.parentData}`),e.var(H.default.parentDataProperty,(0,L._)`${H.default.valCxt}.${H.default.parentDataProperty}`),e.var(H.default.rootData,(0,L._)`${H.default.valCxt}.${H.default.rootData}`),t.dynamicRef&&e.var(H.default.dynamicAnchors,(0,L._)`${H.default.valCxt}.${H.default.dynamicAnchors}`)},()=>{e.var(H.default.instancePath,(0,L._)`""`),e.var(H.default.parentData,(0,L._)`undefined`),e.var(H.default.parentDataProperty,(0,L._)`undefined`),e.var(H.default.rootData,H.default.data),t.dynamicRef&&e.var(H.default.dynamicAnchors,(0,L._)`{}`)})}function S4(e){let{schema:t,opts:r,gen:o}=e;Tz(e,()=>{r.$comment&&t.$comment&&Nz(e),O4(e),o.let(H.default.vErrors,null),o.let(H.default.errors,0),r.unevaluated&&I4(e),Zz(e),N4(e)})}function I4(e){let{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,L._)`${r}.evaluated`),t.if((0,L._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,L._)`${e.evaluated}.props`,(0,L._)`undefined`)),t.if((0,L._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,L._)`${e.evaluated}.items`,(0,L._)`undefined`))}function zz(e,t){let r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,L._)`/*# sourceURL=${r} */`:L.nil}function P4(e,t){if(Oz(e)&&(jz(e),Ez(e))){T4(e,t);return}(0,Pz.boolOrEmptySchema)(e,t)}function Ez({schema:e,self:t}){if(typeof e=="boolean")return!e;for(let r in e)if(t.RULES.all[r])return!0;return!1}function Oz(e){return typeof e.schema!="boolean"}function T4(e,t){let{schema:r,gen:o,opts:n}=e;n.$comment&&r.$comment&&Nz(e),j4(e),Z4(e);let i=o.const("_errs",H.default.errors);Zz(e,i),o.var(t,(0,L._)`${i} === ${H.default.errors}`)}function jz(e){(0,$r.checkUnknownRules)(e),E4(e)}function Zz(e,t){if(e.opts.jtd)return Sz(e,[],!1,t);let r=(0,kz.getSchemaTypes)(e.schema),o=(0,kz.coerceAndCheckDataType)(e,r);Sz(e,r,!o,t)}function E4(e){let{schema:t,errSchemaPath:r,opts:o,self:n}=e;t.$ref&&o.ignoreKeywordsWithRef&&(0,$r.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function O4(e){let{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,$r.checkStrictMode)(e,"default is ignored in the schema root")}function j4(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,b4.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function Z4(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function Nz({gen:e,schemaEnv:t,schema:r,errSchemaPath:o,opts:n}){let i=r.$comment;if(n.$comment===!0)e.code((0,L._)`${H.default.self}.logger.log(${i})`);else if(typeof n.$comment=="function"){let a=(0,L.str)`${o}/$comment`,s=e.scopeValue("root",{ref:t.root});e.code((0,L._)`${H.default.self}.opts.$comment(${i}, ${a}, ${s}.schema)`)}}function N4(e){let{gen:t,schemaEnv:r,validateName:o,ValidationError:n,opts:i}=e;r.$async?t.if((0,L._)`${H.default.errors} === 0`,()=>t.return(H.default.data),()=>t.throw((0,L._)`new ${n}(${H.default.vErrors})`)):(t.assign((0,L._)`${o}.errors`,H.default.vErrors),i.unevaluated&&R4(e),t.return((0,L._)`${H.default.errors} === 0`))}function R4({gen:e,evaluated:t,props:r,items:o}){r instanceof L.Name&&e.assign((0,L._)`${t}.props`,r),o instanceof L.Name&&e.assign((0,L._)`${t}.items`,o)}function Sz(e,t,r,o){let{gen:n,schema:i,data:a,allErrors:s,opts:c,self:u}=e,{RULES:l}=u;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,$r.schemaHasRulesButRef)(i,l))){n.block(()=>Dz(e,"$ref",l.all.$ref.definition));return}c.jtd||D4(e,t),n.block(()=>{for(let p of l.rules)d(p);d(l.post)});function d(p){(0,Pm.shouldUseGroup)(i,p)&&(p.type?(n.if((0,xc.checkDataType)(p.type,a,c.strictNumbers)),Iz(e,p),t.length===1&&t[0]===p.type&&r&&(n.else(),(0,xc.reportTypeError)(e)),n.endIf()):Iz(e,p),s||n.if((0,L._)`${H.default.errors} === ${o||0}`))}}function Iz(e,t){let{gen:r,schema:o,opts:{useDefaults:n}}=e;n&&(0,x4.assignDefaults)(e,t.type),r.block(()=>{for(let i of t.rules)(0,Pm.shouldUseRule)(o,i)&&Dz(e,i.keyword,i.definition,t.type)})}function D4(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(A4(e,t),e.opts.allowUnionTypes||C4(e,t),U4(e,e.dataTypes))}function A4(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{Rz(e.dataTypes,r)||Tm(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),L4(e,t)}}function C4(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Tm(e,"use allowUnionTypes to allow union type keyword")}function U4(e,t){let r=e.self.RULES.all;for(let o in r){let n=r[o];if(typeof n=="object"&&(0,Pm.shouldUseRule)(e.schema,n)){let{type:i}=n.definition;i.length&&!i.some(a=>M4(t,a))&&Tm(e,`missing type "${i.join(",")}" for keyword "${o}"`)}}}function M4(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function Rz(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function L4(e,t){let r=[];for(let o of e.dataTypes)Rz(t,o)?r.push(o):t.includes("integer")&&o==="number"&&r.push("integer");e.dataTypes=r}function Tm(e,t){let r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,$r.checkStrictMode)(e,t,e.opts.strictTypes)}var bc=class{constructor(t,r,o){if((0,ua.validateKeywordUsage)(t,r,o),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=o,this.data=t.data,this.schema=t.schema[o],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,$r.schemaRefOrVal)(t,this.schema,o,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",Az(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,ua.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${o} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",H.default.errors))}result(t,r,o){this.failResult((0,L.not)(t),r,o)}failResult(t,r,o){this.gen.if(t),o?o():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,L.not)(t),void 0,r)}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:r}=this;this.fail((0,L._)`${r} !== undefined && (${(0,L.or)(this.invalid$data(),t)})`)}error(t,r,o){if(r){this.setParams(r),this._error(t,o),this.setParams({});return}this._error(t,o)}_error(t,r){(t?ca.reportExtraError:ca.reportError)(this,this.def.error,r)}$dataError(){(0,ca.reportError)(this,this.def.$dataError||ca.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,ca.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,o=L.nil){this.gen.block(()=>{this.check$data(t,o),r()})}check$data(t=L.nil,r=L.nil){if(!this.$data)return;let{gen:o,schemaCode:n,schemaType:i,def:a}=this;o.if((0,L.or)((0,L._)`${n} === undefined`,r)),t!==L.nil&&o.assign(t,!0),(i.length||a.validateSchema)&&(o.elseIf(this.invalid$data()),this.$dataError(),t!==L.nil&&o.assign(t,!1)),o.else()}invalid$data(){let{gen:t,schemaCode:r,schemaType:o,def:n,it:i}=this;return(0,L.or)(a(),s());function a(){if(o.length){if(!(r instanceof L.Name))throw new Error("ajv implementation error");let c=Array.isArray(o)?o:[o];return(0,L._)`${(0,xc.checkDataTypes)(c,r,i.opts.strictNumbers,xc.DataType.Wrong)}`}return L.nil}function s(){if(n.validateSchema){let c=t.scopeValue("validate$data",{ref:n.validateSchema});return(0,L._)`!${c}(${r})`}return L.nil}}subschema(t,r){let o=(0,Im.getSubschema)(this.it,t);(0,Im.extendSubschemaData)(o,this.it,t),(0,Im.extendSubschemaMode)(o,t);let n={...this.it,...o,items:void 0,props:void 0};return P4(n,r),n}mergeEvaluated(t,r){let{it:o,gen:n}=this;o.opts.unevaluated&&(o.props!==!0&&t.props!==void 0&&(o.props=$r.mergeEvaluated.props(n,t.props,o.props,r)),o.items!==!0&&t.items!==void 0&&(o.items=$r.mergeEvaluated.items(n,t.items,o.items,r)))}mergeValidEvaluated(t,r){let{it:o,gen:n}=this;if(o.opts.unevaluated&&(o.props!==!0||o.items!==!0))return n.if(r,()=>this.mergeEvaluated(t,L.Name)),!0}};Vr.KeywordCxt=bc;function Dz(e,t,r,o){let n=new bc(e,r,t);"code"in r?r.code(n,o):n.$data&&r.validate?(0,ua.funcKeywordCode)(n,r):"macro"in r?(0,ua.macroKeywordCode)(n,r):(r.compile||r.validate)&&(0,ua.funcKeywordCode)(n,r)}var F4=/^\/(?:[^~]|~0|~1)*$/,q4=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Az(e,{dataLevel:t,dataNames:r,dataPathArr:o}){let n,i;if(e==="")return H.default.rootData;if(e[0]==="/"){if(!F4.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);n=e,i=H.default.rootData}else{let u=q4.exec(e);if(!u)throw new Error(`Invalid JSON-pointer: ${e}`);let l=+u[1];if(n=u[2],n==="#"){if(l>=t)throw new Error(c("property/index",l));return o[t-l]}if(l>t)throw new Error(c("data",l));if(i=r[t-l],!n)return i}let a=i,s=n.split("/");for(let u of s)u&&(i=(0,L._)`${i}${(0,L.getProperty)((0,$r.unescapeJsonPointer)(u))}`,a=(0,L._)`${a} && ${i}`);return a;function c(u,l){return`Cannot access ${u} ${l} levels up, current level is ${t}`}}Vr.getData=Az});var wc=R(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});var Em=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Om.default=Em});var da=R(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var jm=sa(),Zm=class extends Error{constructor(t,r,o,n){super(n||`can't resolve reference ${o} from id ${r}`),this.missingRef=(0,jm.resolveUrl)(t,r,o),this.missingSchema=(0,jm.normalizeId)((0,jm.getFullPath)(t,this.missingRef))}};Nm.default=Zm});var zc=R(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.resolveSchema=Zt.getCompilingSchema=Zt.resolveRef=Zt.compileSchema=Zt.SchemaEnv=void 0;var Vt=X(),V4=wc(),xn=_r(),Jt=sa(),Cz=se(),J4=la(),go=class{constructor(t){var r;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=(r=t.baseId)!==null&&r!==void 0?r:(0,Jt.normalizeId)(o?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=o?.$async,this.refs={}}};Zt.SchemaEnv=go;function Dm(e){let t=Uz.call(this,e);if(t)return t;let r=(0,Jt.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:o,lines:n}=this.opts.code,{ownProperties:i}=this.opts,a=new Vt.CodeGen(this.scope,{es5:o,lines:n,ownProperties:i}),s;e.$async&&(s=a.scopeValue("Error",{ref:V4.default,code:(0,Vt._)`require("ajv/dist/runtime/validation_error").default`}));let c=a.scopeName("validate");e.validateName=c;let u={gen:a,allErrors:this.opts.allErrors,data:xn.default.data,parentData:xn.default.parentData,parentDataProperty:xn.default.parentDataProperty,dataNames:[xn.default.data],dataPathArr:[Vt.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Vt.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Vt.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Vt._)`""`,opts:this.opts,self:this},l;try{this._compilations.add(e),(0,J4.validateFunctionCode)(u),a.optimize(this.opts.code.optimize);let d=a.toString();l=`${a.scopeRefs(xn.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));let f=new Function(`${xn.default.self}`,`${xn.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:f}),f.errors=null,f.schema=e.schema,f.schemaEnv=e,e.$async&&(f.$async=!0),this.opts.code.source===!0&&(f.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:m,items:h}=u;f.evaluated={props:m instanceof Vt.Name?void 0:m,items:h instanceof Vt.Name?void 0:h,dynamicProps:m instanceof Vt.Name,dynamicItems:h instanceof Vt.Name},f.source&&(f.source.evaluated=(0,Vt.stringify)(f.evaluated))}return e.validate=f,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}Zt.compileSchema=Dm;function H4(e,t,r){var o;r=(0,Jt.resolveUrl)(this.opts.uriResolver,t,r);let n=e.refs[r];if(n)return n;let i=G4.call(this,e,r);if(i===void 0){let a=(o=e.localRefs)===null||o===void 0?void 0:o[r],{schemaId:s}=this.opts;a&&(i=new go({schema:a,schemaId:s,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=B4.call(this,i)}Zt.resolveRef=H4;function B4(e){return(0,Jt.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:Dm.call(this,e)}function Uz(e){for(let t of this._compilations)if(W4(t,e))return t}Zt.getCompilingSchema=Uz;function W4(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function G4(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||kc.call(this,e,t)}function kc(e,t){let r=this.opts.uriResolver.parse(t),o=(0,Jt._getFullPath)(this.opts.uriResolver,r),n=(0,Jt.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===n)return Rm.call(this,r,e);let i=(0,Jt.normalizeId)(o),a=this.refs[i]||this.schemas[i];if(typeof a=="string"){let s=kc.call(this,e,a);return typeof s?.schema!="object"?void 0:Rm.call(this,r,s)}if(typeof a?.schema=="object"){if(a.validate||Dm.call(this,a),i===(0,Jt.normalizeId)(t)){let{schema:s}=a,{schemaId:c}=this.opts,u=s[c];return u&&(n=(0,Jt.resolveUrl)(this.opts.uriResolver,n,u)),new go({schema:s,schemaId:c,root:e,baseId:n})}return Rm.call(this,r,a)}}Zt.resolveSchema=kc;var K4=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Rm(e,{baseId:t,schema:r,root:o}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(let s of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let c=r[(0,Cz.unescapeFragment)(s)];if(c===void 0)return;r=c;let u=typeof r=="object"&&r[this.opts.schemaId];!K4.has(s)&&u&&(t=(0,Jt.resolveUrl)(this.opts.uriResolver,t,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,Cz.schemaHasRulesButRef)(r,this.RULES)){let s=(0,Jt.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=kc.call(this,o,s)}let{schemaId:a}=this.opts;if(i=i||new go({schema:r,schemaId:a,root:o,baseId:t}),i.schema!==i.root.schema)return i}});var Mz=R((WJ,X4)=>{X4.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 Cm=R((GJ,Vz)=>{"use strict";var Y4=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Fz=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 Am(e){let t="",r=0,o=0;for(o=0;o<e.length;o++)if(r=e[o].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[o];break}for(o+=1;o<e.length;o++){if(r=e[o].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[o]}return t}var Q4=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Lz(e){return e.length=0,!0}function eR(e,t,r){if(e.length){let o=Am(e);if(o!=="")t.push(o);else return r.error=!0,!1;e.length=0}return!0}function tR(e){let t=0,r={error:!1,address:"",zone:""},o=[],n=[],i=!1,a=!1,s=eR;for(let c=0;c<e.length;c++){let u=e[c];if(!(u==="["||u==="]"))if(u===":"){if(i===!0&&(a=!0),!s(n,o,r))break;if(++t>7){r.error=!0;break}c>0&&e[c-1]===":"&&(i=!0),o.push(":");continue}else if(u==="%"){if(!s(n,o,r))break;s=Lz}else{n.push(u);continue}}return n.length&&(s===Lz?r.zone=n.join(""):a?o.push(n.join("")):o.push(Am(n))),r.address=o.join(""),r}function qz(e){if(rR(e,":")<2)return{host:e,isIPV6:!1};let t=tR(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,o=t.address;return t.zone&&(r+="%"+t.zone,o+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:o}}}function rR(e,t){let r=0;for(let o=0;o<e.length;o++)e[o]===t&&r++;return r}function nR(e){let t=e,r=[],o=-1,n=0;for(;n=t.length;){if(n===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(n===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(n===3&&t==="/.."){r.length!==0&&r.pop(),r.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),r.length!==0&&r.pop();continue}}if((o=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,o)),t=t.slice(o)}return r.join("")}function oR(e,t){let r=t!==!0?escape:unescape;return e.scheme!==void 0&&(e.scheme=r(e.scheme)),e.userinfo!==void 0&&(e.userinfo=r(e.userinfo)),e.host!==void 0&&(e.host=r(e.host)),e.path!==void 0&&(e.path=r(e.path)),e.query!==void 0&&(e.query=r(e.query)),e.fragment!==void 0&&(e.fragment=r(e.fragment)),e}function iR(e){let t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!Fz(r)){let o=qz(r);o.isIPV6===!0?r=`[${o.escapedHost}]`:r=e.host}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}Vz.exports={nonSimpleDomain:Q4,recomposeAuthority:iR,normalizeComponentEncoding:oR,removeDotSegments:nR,isIPv4:Fz,isUUID:Y4,normalizeIPv6:qz,stringArrayToHexStripped:Am}});var Gz=R((KJ,Wz)=>{"use strict";var{isUUID:aR}=Cm(),sR=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,cR=["http","https","ws","wss","urn","urn:uuid"];function uR(e){return cR.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 Jz(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function Hz(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 lR(e){return e.secure=Um(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function dR(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,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function pR(e,t){if(!e.path)return e.error="URN can not be parsed",e;let r=e.path.match(sR);if(r){let o=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];let n=`${o}:${t.nid||e.nid}`,i=Mm(n);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function fR(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=t.scheme||e.scheme||"urn",o=e.nid.toLowerCase(),n=`${r}:${t.nid||o}`,i=Mm(n);i&&(e=i.serialize(e,t));let a=e,s=e.nss;return a.path=`${o||t.nid}:${s}`,t.skipEscape=!0,a}function mR(e,t){let r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!aR(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function hR(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}var Bz={scheme:"http",domainHost:!0,parse:Jz,serialize:Hz},gR={scheme:"https",domainHost:Bz.domainHost,parse:Jz,serialize:Hz},Sc={scheme:"ws",domainHost:!0,parse:lR,serialize:dR},vR={scheme:"wss",domainHost:Sc.domainHost,parse:Sc.parse,serialize:Sc.serialize},yR={scheme:"urn",parse:pR,serialize:fR,skipNormalize:!0},_R={scheme:"urn:uuid",parse:mR,serialize:hR,skipNormalize:!0},Ic={http:Bz,https:gR,ws:Sc,wss:vR,urn:yR,"urn:uuid":_R};Object.setPrototypeOf(Ic,null);function Mm(e){return e&&(Ic[e]||Ic[e.toLowerCase()])||void 0}Wz.exports={wsIsSecure:Um,SCHEMES:Ic,isValidSchemeName:uR,getSchemeHandler:Mm}});var Yz=R((XJ,Tc)=>{"use strict";var{normalizeIPv6:$R,removeDotSegments:pa,recomposeAuthority:xR,normalizeComponentEncoding:Pc,isIPv4:bR,nonSimpleDomain:wR}=Cm(),{SCHEMES:kR,getSchemeHandler:Kz}=Gz();function zR(e,t){return typeof e=="string"?e=tr(xr(e,t),t):typeof e=="object"&&(e=xr(tr(e,t),t)),e}function SR(e,t,r){let o=r?Object.assign({scheme:"null"},r):{scheme:"null"},n=Xz(xr(e,o),xr(t,o),o,!0);return o.skipEscape=!0,tr(n,o)}function Xz(e,t,r,o){let n={};return o||(e=xr(tr(e,r),r),t=xr(tr(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=pa(t.path||""),n.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=pa(t.path||""),n.query=t.query):(t.path?(t.path[0]==="/"?n.path=pa(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?n.path="/"+t.path:e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path,n.path=pa(n.path)),n.query=t.query):(n.path=e.path,t.query!==void 0?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function IR(e,t,r){return typeof e=="string"?(e=unescape(e),e=tr(Pc(xr(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=tr(Pc(e,!0),{...r,skipEscape:!0})),typeof t=="string"?(t=unescape(t),t=tr(Pc(xr(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=tr(Pc(t,!0),{...r,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()}function tr(e,t){let r={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),n=[],i=Kz(o.scheme||r.scheme);i&&i.serialize&&i.serialize(r,o),r.path!==void 0&&(o.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),o.reference!=="suffix"&&r.scheme&&n.push(r.scheme,":");let a=xR(r);if(a!==void 0&&(o.reference!=="suffix"&&n.push("//"),n.push(a),r.path&&r.path[0]!=="/"&&n.push("/")),r.path!==void 0){let s=r.path;!o.absolutePath&&(!i||!i.absolutePath)&&(s=pa(s)),a===void 0&&s[0]==="/"&&s[1]==="/"&&(s="/%2F"+s.slice(2)),n.push(s)}return r.query!==void 0&&n.push("?",r.query),r.fragment!==void 0&&n.push("#",r.fragment),n.join("")}var PR=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function xr(e,t){let r=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},n=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);let i=e.match(PR);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(bR(o.host)===!1){let c=$R(o.host);o.host=c.host.toLowerCase(),n=c.isIPV6}else n=!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",r.reference&&r.reference!=="suffix"&&r.reference!==o.reference&&(o.error=o.error||"URI is not a "+r.reference+" reference.");let a=Kz(r.scheme||o.scheme);if(!r.unicodeSupport&&(!a||!a.unicodeSupport)&&o.host&&(r.domainHost||a&&a.domainHost)&&n===!1&&wR(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,r)}else o.error=o.error||"URI can not be parsed.";return o}var Lm={SCHEMES:kR,normalize:zR,resolve:SR,resolveComponent:Xz,equal:IR,serialize:tr,parse:xr};Tc.exports=Lm;Tc.exports.default=Lm;Tc.exports.fastUri=Lm});var eS=R(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});var Qz=Yz();Qz.code='require("ajv/dist/runtime/uri").default';Fm.default=Qz});var cS=R(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.CodeGen=Le.Name=Le.nil=Le.stringify=Le.str=Le._=Le.KeywordCxt=void 0;var TR=la();Object.defineProperty(Le,"KeywordCxt",{enumerable:!0,get:function(){return TR.KeywordCxt}});var vo=X();Object.defineProperty(Le,"_",{enumerable:!0,get:function(){return vo._}});Object.defineProperty(Le,"str",{enumerable:!0,get:function(){return vo.str}});Object.defineProperty(Le,"stringify",{enumerable:!0,get:function(){return vo.stringify}});Object.defineProperty(Le,"nil",{enumerable:!0,get:function(){return vo.nil}});Object.defineProperty(Le,"Name",{enumerable:!0,get:function(){return vo.Name}});Object.defineProperty(Le,"CodeGen",{enumerable:!0,get:function(){return vo.CodeGen}});var ER=wc(),iS=da(),OR=vm(),fa=zc(),jR=X(),ma=sa(),Ec=aa(),Vm=se(),tS=Mz(),ZR=eS(),aS=(e,t)=>new RegExp(e,t);aS.code="new RegExp";var NR=["removeAdditional","useDefaults","coerceTypes"],RR=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),DR={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."},AR={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},rS=200;function CR(e){var t,r,o,n,i,a,s,c,u,l,d,p,f,m,h,y,x,E,w,b,k,fe,me,kt,Kt;let zt=e.strict,Rn=(t=e.code)===null||t===void 0?void 0:t.optimize,us=Rn===!0||Rn===void 0?1:Rn||0,ai=(o=(r=e.code)===null||r===void 0?void 0:r.regExp)!==null&&o!==void 0?o:aS,ql=(n=e.uriResolver)!==null&&n!==void 0?n:ZR.default;return{strictSchema:(a=(i=e.strictSchema)!==null&&i!==void 0?i:zt)!==null&&a!==void 0?a:!0,strictNumbers:(c=(s=e.strictNumbers)!==null&&s!==void 0?s:zt)!==null&&c!==void 0?c:!0,strictTypes:(l=(u=e.strictTypes)!==null&&u!==void 0?u:zt)!==null&&l!==void 0?l:"log",strictTuples:(p=(d=e.strictTuples)!==null&&d!==void 0?d:zt)!==null&&p!==void 0?p:"log",strictRequired:(m=(f=e.strictRequired)!==null&&f!==void 0?f:zt)!==null&&m!==void 0?m:!1,code:e.code?{...e.code,optimize:us,regExp:ai}:{optimize:us,regExp:ai},loopRequired:(h=e.loopRequired)!==null&&h!==void 0?h:rS,loopEnum:(y=e.loopEnum)!==null&&y!==void 0?y:rS,meta:(x=e.meta)!==null&&x!==void 0?x:!0,messages:(E=e.messages)!==null&&E!==void 0?E:!0,inlineRefs:(w=e.inlineRefs)!==null&&w!==void 0?w:!0,schemaId:(b=e.schemaId)!==null&&b!==void 0?b:"$id",addUsedSchema:(k=e.addUsedSchema)!==null&&k!==void 0?k:!0,validateSchema:(fe=e.validateSchema)!==null&&fe!==void 0?fe:!0,validateFormats:(me=e.validateFormats)!==null&&me!==void 0?me:!0,unicodeRegExp:(kt=e.unicodeRegExp)!==null&&kt!==void 0?kt:!0,int32range:(Kt=e.int32range)!==null&&Kt!==void 0?Kt:!0,uriResolver:ql}}var ha=class{constructor(t={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,t=this.opts={...t,...CR(t)};let{es5:r,lines:o}=this.opts.code;this.scope=new jR.ValueScope({scope:{},prefixes:RR,es5:r,lines:o}),this.logger=VR(t.logger);let n=t.validateFormats;t.validateFormats=!1,this.RULES=(0,OR.getRules)(),nS.call(this,DR,t,"NOT SUPPORTED"),nS.call(this,AR,t,"DEPRECATED","warn"),this._metaOpts=FR.call(this),t.formats&&MR.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),t.keywords&&LR.call(this,t.keywords),typeof t.meta=="object"&&this.addMetaSchema(t.meta),UR.call(this),t.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:t,meta:r,schemaId:o}=this.opts,n=tS;o==="id"&&(n={...tS},n.id=n.$id,delete n.$id),r&&t&&this.addMetaSchema(n,n[o],!1)}defaultMeta(){let{meta:t,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof t=="object"?t[r]||t:void 0}validate(t,r){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 n=o(r);return"$async"in o||(this.errors=o.errors),n}compile(t,r){let o=this._addSchema(t,r);return o.validate||this._compileSchemaEnv(o)}compileAsync(t,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:o}=this.opts;return n.call(this,t,r);async function n(l,d){await i.call(this,l.$schema);let p=this._addSchema(l,d);return p.validate||a.call(this,p)}async function i(l){l&&!this.getSchema(l)&&await n.call(this,{$ref:l},!0)}async function a(l){try{return this._compileSchemaEnv(l)}catch(d){if(!(d instanceof iS.default))throw d;return s.call(this,d),await c.call(this,d.missingSchema),a.call(this,l)}}function s({missingSchema:l,missingRef:d}){if(this.refs[l])throw new Error(`AnySchema ${l} is loaded but ${d} cannot be resolved`)}async function c(l){let d=await u.call(this,l);this.refs[l]||await i.call(this,d.$schema),this.refs[l]||this.addSchema(d,l,r)}async function u(l){let d=this._loading[l];if(d)return d;try{return await(this._loading[l]=o(l))}finally{delete this._loading[l]}}}addSchema(t,r,o,n=this.opts.validateSchema){if(Array.isArray(t)){for(let a of t)this.addSchema(a,void 0,o,n);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 r=(0,ma.normalizeId)(r||i),this._checkUnique(r),this.schemas[r]=this._addSchema(t,o,r,n,!0),this}addMetaSchema(t,r,o=this.opts.validateSchema){return this.addSchema(t,r,!0,o),this}validateSchema(t,r){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 n=this.validate(o,t);if(!n&&r){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return n}getSchema(t){let r;for(;typeof(r=oS.call(this,t))=="string";)t=r;if(r===void 0){let{schemaId:o}=this.opts,n=new fa.SchemaEnv({schema:{},schemaId:o});if(r=fa.resolveSchema.call(this,n,t),!r)return;this.refs[t]=r}return r.validate||this._compileSchemaEnv(r)}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 r=oS.call(this,t);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[t],delete this.refs[t],this}case"object":{let r=t;this._cache.delete(r);let o=t[this.opts.schemaId];return o&&(o=(0,ma.normalizeId)(o),delete this.schemas[o],delete this.refs[o]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(t){for(let r of t)this.addKeyword(r);return this}addKeyword(t,r){let o;if(typeof t=="string")o=t,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=o);else if(typeof t=="object"&&r===void 0){if(r=t,o=r.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(HR.call(this,o,r),!r)return(0,Vm.eachItem)(o,i=>qm.call(this,i)),this;WR.call(this,r);let n={...r,type:(0,Ec.getJSONTypes)(r.type),schemaType:(0,Ec.getJSONTypes)(r.schemaType)};return(0,Vm.eachItem)(o,n.type.length===0?i=>qm.call(this,i,n):i=>n.type.forEach(a=>qm.call(this,i,n,a))),this}getKeyword(t){let r=this.RULES.all[t];return typeof r=="object"?r.definition:!!r}removeKeyword(t){let{RULES:r}=this;delete r.keywords[t],delete r.all[t];for(let o of r.rules){let n=o.rules.findIndex(i=>i.keyword===t);n>=0&&o.rules.splice(n,1)}return this}addFormat(t,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[t]=r,this}errorsText(t=this.errors,{separator:r=", ",dataVar:o="data"}={}){return!t||t.length===0?"No errors":t.map(n=>`${o}${n.instancePath} ${n.message}`).reduce((n,i)=>n+r+i)}$dataMetaSchema(t,r){let o=this.RULES.all;t=JSON.parse(JSON.stringify(t));for(let n of r){let i=n.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:u}=c.definition,l=a[s];u&&l&&(a[s]=sS(l))}}return t}_removeAllSchemas(t,r){for(let o in t){let n=t[o];(!r||r.test(o))&&(typeof n=="string"?delete t[o]:n&&!n.meta&&(this._cache.delete(n.schema),delete t[o]))}}_addSchema(t,r,o,n=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,ma.normalizeId)(a||o);let u=ma.getSchemaRefs.call(this,t,o);return c=new fa.SchemaEnv({schema:t,schemaId:s,meta:r,baseId:o,localRefs:u}),this._cache.set(c.schema,c),i&&!o.startsWith("#")&&(o&&this._checkUnique(o),this.refs[o]=c),n&&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):fa.compileSchema.call(this,t),!t.validate)throw new Error("ajv implementation error");return t.validate}_compileMetaSchema(t){let r=this.opts;this.opts=this._metaOpts;try{fa.compileSchema.call(this,t)}finally{this.opts=r}}};ha.ValidationError=ER.default;ha.MissingRefError=iS.default;Le.default=ha;function nS(e,t,r,o="error"){for(let n in e){let i=n;i in t&&this.logger[o](`${r}: option ${n}. ${e[i]}`)}}function oS(e){return e=(0,ma.normalizeId)(e),this.schemas[e]||this.refs[e]}function UR(){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 MR(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function LR(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 r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}function FR(){let e={...this.opts};for(let t of NR)delete e[t];return e}var qR={log(){},warn(){},error(){}};function VR(e){if(e===!1)return qR;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 JR=/^[a-z_$][a-z0-9_$:-]*$/i;function HR(e,t){let{RULES:r}=this;if((0,Vm.eachItem)(e,o=>{if(r.keywords[o])throw new Error(`Keyword ${o} is already defined`);if(!JR.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 qm(e,t,r){var o;let n=t?.post;if(r&&n)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,a=n?i.post:i.rules.find(({type:c})=>c===r);if(a||(a={type:r,rules:[]},i.rules.push(a)),i.keywords[e]=!0,!t)return;let s={keyword:e,definition:{...t,type:(0,Ec.getJSONTypes)(t.type),schemaType:(0,Ec.getJSONTypes)(t.schemaType)}};t.before?BR.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 BR(e,t,r){let o=e.rules.findIndex(n=>n.keyword===r);o>=0?e.rules.splice(o,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function WR(e){let{metaSchema:t}=e;t!==void 0&&(e.$data&&this.opts.$data&&(t=sS(t)),e.validateSchema=this.compile(t,!0))}var GR={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function sS(e){return{anyOf:[e,GR]}}});var uS=R(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});var KR={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Jm.default=KR});var fS=R(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.callRef=bn.getValidate=void 0;var XR=da(),lS=jt(),dt=X(),yo=_r(),dS=zc(),Oc=se(),YR={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:r,it:o}=e,{baseId:n,schemaEnv:i,validateName:a,opts:s,self:c}=o,{root:u}=i;if((r==="#"||r==="#/")&&n===u.baseId)return d();let l=dS.resolveRef.call(c,u,n,r);if(l===void 0)throw new XR.default(o.opts.uriResolver,n,r);if(l instanceof dS.SchemaEnv)return p(l);return f(l);function d(){if(i===u)return jc(e,a,i,i.$async);let m=t.scopeValue("root",{ref:u});return jc(e,(0,dt._)`${m}.validate`,u,u.$async)}function p(m){let h=pS(e,m);jc(e,h,m,m.$async)}function f(m){let h=t.scopeValue("schema",s.code.source===!0?{ref:m,code:(0,dt.stringify)(m)}:{ref:m}),y=t.name("valid"),x=e.subschema({schema:m,dataTypes:[],schemaPath:dt.nil,topSchemaRef:h,errSchemaPath:r},y);e.mergeEvaluated(x),e.ok(y)}}};function pS(e,t){let{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,dt._)`${r.scopeValue("wrapper",{ref:t})}.validate`}bn.getValidate=pS;function jc(e,t,r,o){let{gen:n,it:i}=e,{allErrors:a,schemaEnv:s,opts:c}=i,u=c.passContext?yo.default.this:dt.nil;o?l():d();function l(){if(!s.$async)throw new Error("async schema referenced by sync schema");let m=n.let("valid");n.try(()=>{n.code((0,dt._)`await ${(0,lS.callValidateCode)(e,t,u)}`),f(t),a||n.assign(m,!0)},h=>{n.if((0,dt._)`!(${h} instanceof ${i.ValidationError})`,()=>n.throw(h)),p(h),a||n.assign(m,!1)}),e.ok(m)}function d(){e.result((0,lS.callValidateCode)(e,t,u),()=>f(t),()=>p(t))}function p(m){let h=(0,dt._)`${m}.errors`;n.assign(yo.default.vErrors,(0,dt._)`${yo.default.vErrors} === null ? ${h} : ${yo.default.vErrors}.concat(${h})`),n.assign(yo.default.errors,(0,dt._)`${yo.default.vErrors}.length`)}function f(m){var h;if(!i.opts.unevaluated)return;let y=(h=r?.validate)===null||h===void 0?void 0:h.evaluated;if(i.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(i.props=Oc.mergeEvaluated.props(n,y.props,i.props));else{let x=n.var("props",(0,dt._)`${m}.evaluated.props`);i.props=Oc.mergeEvaluated.props(n,x,i.props,dt.Name)}if(i.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(i.items=Oc.mergeEvaluated.items(n,y.items,i.items));else{let x=n.var("items",(0,dt._)`${m}.evaluated.items`);i.items=Oc.mergeEvaluated.items(n,x,i.items,dt.Name)}}}bn.callRef=jc;bn.default=YR});var mS=R(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0});var QR=uS(),eD=fS(),tD=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",QR.default,eD.default];Hm.default=tD});var hS=R(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});var Zc=X(),Jr=Zc.operators,Nc={maximum:{okStr:"<=",ok:Jr.LTE,fail:Jr.GT},minimum:{okStr:">=",ok:Jr.GTE,fail:Jr.LT},exclusiveMaximum:{okStr:"<",ok:Jr.LT,fail:Jr.GTE},exclusiveMinimum:{okStr:">",ok:Jr.GT,fail:Jr.LTE}},rD={message:({keyword:e,schemaCode:t})=>(0,Zc.str)`must be ${Nc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Zc._)`{comparison: ${Nc[e].okStr}, limit: ${t}}`},nD={keyword:Object.keys(Nc),type:"number",schemaType:"number",$data:!0,error:rD,code(e){let{keyword:t,data:r,schemaCode:o}=e;e.fail$data((0,Zc._)`${r} ${Nc[t].fail} ${o} || isNaN(${r})`)}};Bm.default=nD});var gS=R(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0});var ga=X(),oD={message:({schemaCode:e})=>(0,ga.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,ga._)`{multipleOf: ${e}}`},iD={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:oD,code(e){let{gen:t,data:r,schemaCode:o,it:n}=e,i=n.opts.multipleOfPrecision,a=t.let("res"),s=i?(0,ga._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:(0,ga._)`${a} !== parseInt(${a})`;e.fail$data((0,ga._)`(${o} === 0 || (${a} = ${r}/${o}, ${s}))`)}};Wm.default=iD});var yS=R(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0});function vS(e){let t=e.length,r=0,o=0,n;for(;o<t;)r++,n=e.charCodeAt(o++),n>=55296&&n<=56319&&o<t&&(n=e.charCodeAt(o),(n&64512)===56320&&o++);return r}Gm.default=vS;vS.code='require("ajv/dist/runtime/ucs2length").default'});var _S=R(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});var wn=X(),aD=se(),sD=yS(),cD={message({keyword:e,schemaCode:t}){let r=e==="maxLength"?"more":"fewer";return(0,wn.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,wn._)`{limit: ${e}}`},uD={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:cD,code(e){let{keyword:t,data:r,schemaCode:o,it:n}=e,i=t==="maxLength"?wn.operators.GT:wn.operators.LT,a=n.opts.unicode===!1?(0,wn._)`${r}.length`:(0,wn._)`${(0,aD.useFunc)(e.gen,sD.default)}(${r})`;e.fail$data((0,wn._)`${a} ${i} ${o}`)}};Km.default=uD});var $S=R(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0});var lD=jt(),dD=se(),_o=X(),pD={message:({schemaCode:e})=>(0,_o.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,_o._)`{pattern: ${e}}`},fD={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:pD,code(e){let{gen:t,data:r,$data:o,schema:n,schemaCode:i,it:a}=e,s=a.opts.unicodeRegExp?"u":"";if(o){let{regExp:c}=a.opts.code,u=c.code==="new RegExp"?(0,_o._)`new RegExp`:(0,dD.useFunc)(t,c),l=t.let("valid");t.try(()=>t.assign(l,(0,_o._)`${u}(${i}, ${s}).test(${r})`),()=>t.assign(l,!1)),e.fail$data((0,_o._)`!${l}`)}else{let c=(0,lD.usePattern)(e,n);e.fail$data((0,_o._)`!${c}.test(${r})`)}}};Xm.default=fD});var xS=R(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0});var va=X(),mD={message({keyword:e,schemaCode:t}){let r=e==="maxProperties"?"more":"fewer";return(0,va.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,va._)`{limit: ${e}}`},hD={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:mD,code(e){let{keyword:t,data:r,schemaCode:o}=e,n=t==="maxProperties"?va.operators.GT:va.operators.LT;e.fail$data((0,va._)`Object.keys(${r}).length ${n} ${o}`)}};Ym.default=hD});var bS=R(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0});var ya=jt(),_a=X(),gD=se(),vD={message:({params:{missingProperty:e}})=>(0,_a.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,_a._)`{missingProperty: ${e}}`},yD={keyword:"required",type:"object",schemaType:"array",$data:!0,error:vD,code(e){let{gen:t,schema:r,schemaCode:o,data:n,$data:i,it:a}=e,{opts:s}=a;if(!i&&r.length===0)return;let c=r.length>=s.loopRequired;if(a.allErrors?u():l(),s.strictRequired){let f=e.parentSchema.properties,{definedProperties:m}=e.it;for(let h of r)if(f?.[h]===void 0&&!m.has(h)){let y=a.schemaEnv.baseId+a.errSchemaPath,x=`required property "${h}" is not defined at "${y}" (strictRequired)`;(0,gD.checkStrictMode)(a,x,a.opts.strictRequired)}}function u(){if(c||i)e.block$data(_a.nil,d);else for(let f of r)(0,ya.checkReportMissingProp)(e,f)}function l(){let f=t.let("missing");if(c||i){let m=t.let("valid",!0);e.block$data(m,()=>p(f,m)),e.ok(m)}else t.if((0,ya.checkMissingProp)(e,r,f)),(0,ya.reportMissingProp)(e,f),t.else()}function d(){t.forOf("prop",o,f=>{e.setParams({missingProperty:f}),t.if((0,ya.noPropertyInData)(t,n,f,s.ownProperties),()=>e.error())})}function p(f,m){e.setParams({missingProperty:f}),t.forOf(f,o,()=>{t.assign(m,(0,ya.propertyInData)(t,n,f,s.ownProperties)),t.if((0,_a.not)(m),()=>{e.error(),t.break()})},_a.nil)}}};Qm.default=yD});var wS=R(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0});var $a=X(),_D={message({keyword:e,schemaCode:t}){let r=e==="maxItems"?"more":"fewer";return(0,$a.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,$a._)`{limit: ${e}}`},$D={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:_D,code(e){let{keyword:t,data:r,schemaCode:o}=e,n=t==="maxItems"?$a.operators.GT:$a.operators.LT;e.fail$data((0,$a._)`${r}.length ${n} ${o}`)}};eh.default=$D});var Rc=R(th=>{"use strict";Object.defineProperty(th,"__esModule",{value:!0});var kS=zm();kS.code='require("ajv/dist/runtime/equal").default';th.default=kS});var zS=R(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0});var rh=aa(),Fe=X(),xD=se(),bD=Rc(),wD={message:({params:{i:e,j:t}})=>(0,Fe.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Fe._)`{i: ${e}, j: ${t}}`},kD={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:wD,code(e){let{gen:t,data:r,$data:o,schema:n,parentSchema:i,schemaCode:a,it:s}=e;if(!o&&!n)return;let c=t.let("valid"),u=i.items?(0,rh.getSchemaTypes)(i.items):[];e.block$data(c,l,(0,Fe._)`${a} === false`),e.ok(c);function l(){let m=t.let("i",(0,Fe._)`${r}.length`),h=t.let("j");e.setParams({i:m,j:h}),t.assign(c,!0),t.if((0,Fe._)`${m} > 1`,()=>(d()?p:f)(m,h))}function d(){return u.length>0&&!u.some(m=>m==="object"||m==="array")}function p(m,h){let y=t.name("item"),x=(0,rh.checkDataTypes)(u,y,s.opts.strictNumbers,rh.DataType.Wrong),E=t.const("indices",(0,Fe._)`{}`);t.for((0,Fe._)`;${m}--;`,()=>{t.let(y,(0,Fe._)`${r}[${m}]`),t.if(x,(0,Fe._)`continue`),u.length>1&&t.if((0,Fe._)`typeof ${y} == "string"`,(0,Fe._)`${y} += "_"`),t.if((0,Fe._)`typeof ${E}[${y}] == "number"`,()=>{t.assign(h,(0,Fe._)`${E}[${y}]`),e.error(),t.assign(c,!1).break()}).code((0,Fe._)`${E}[${y}] = ${m}`)})}function f(m,h){let y=(0,xD.useFunc)(t,bD.default),x=t.name("outer");t.label(x).for((0,Fe._)`;${m}--;`,()=>t.for((0,Fe._)`${h} = ${m}; ${h}--;`,()=>t.if((0,Fe._)`${y}(${r}[${m}], ${r}[${h}])`,()=>{e.error(),t.assign(c,!1).break(x)})))}}};nh.default=kD});var SS=R(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});var oh=X(),zD=se(),SD=Rc(),ID={message:"must be equal to constant",params:({schemaCode:e})=>(0,oh._)`{allowedValue: ${e}}`},PD={keyword:"const",$data:!0,error:ID,code(e){let{gen:t,data:r,$data:o,schemaCode:n,schema:i}=e;o||i&&typeof i=="object"?e.fail$data((0,oh._)`!${(0,zD.useFunc)(t,SD.default)}(${r}, ${n})`):e.fail((0,oh._)`${i} !== ${r}`)}};ih.default=PD});var IS=R(ah=>{"use strict";Object.defineProperty(ah,"__esModule",{value:!0});var xa=X(),TD=se(),ED=Rc(),OD={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,xa._)`{allowedValues: ${e}}`},jD={keyword:"enum",schemaType:"array",$data:!0,error:OD,code(e){let{gen:t,data:r,$data:o,schema:n,schemaCode:i,it:a}=e;if(!o&&n.length===0)throw new Error("enum must have non-empty array");let s=n.length>=a.opts.loopEnum,c,u=()=>c??(c=(0,TD.useFunc)(t,ED.default)),l;if(s||o)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(n))throw new Error("ajv implementation error");let f=t.const("vSchema",i);l=(0,xa.or)(...n.map((m,h)=>p(f,h)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",i,f=>t.if((0,xa._)`${u()}(${r}, ${f})`,()=>t.assign(l,!0).break()))}function p(f,m){let h=n[m];return typeof h=="object"&&h!==null?(0,xa._)`${u()}(${r}, ${f}[${m}])`:(0,xa._)`${r} === ${h}`}}};ah.default=jD});var PS=R(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0});var ZD=hS(),ND=gS(),RD=_S(),DD=$S(),AD=xS(),CD=bS(),UD=wS(),MD=zS(),LD=SS(),FD=IS(),qD=[ZD.default,ND.default,RD.default,DD.default,AD.default,CD.default,UD.default,MD.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},LD.default,FD.default];sh.default=qD});var uh=R(ba=>{"use strict";Object.defineProperty(ba,"__esModule",{value:!0});ba.validateAdditionalItems=void 0;var kn=X(),ch=se(),VD={message:({params:{len:e}})=>(0,kn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,kn._)`{limit: ${e}}`},JD={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:VD,code(e){let{parentSchema:t,it:r}=e,{items:o}=t;if(!Array.isArray(o)){(0,ch.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}TS(e,o)}};function TS(e,t){let{gen:r,schema:o,data:n,keyword:i,it:a}=e;a.items=!0;let s=r.const("len",(0,kn._)`${n}.length`);if(o===!1)e.setParams({len:t.length}),e.pass((0,kn._)`${s} <= ${t.length}`);else if(typeof o=="object"&&!(0,ch.alwaysValidSchema)(a,o)){let u=r.var("valid",(0,kn._)`${s} <= ${t.length}`);r.if((0,kn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,s,l=>{e.subschema({keyword:i,dataProp:l,dataPropType:ch.Type.Num},u),a.allErrors||r.if((0,kn.not)(u),()=>r.break())})}}ba.validateAdditionalItems=TS;ba.default=JD});var lh=R(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.validateTuple=void 0;var ES=X(),Dc=se(),HD=jt(),BD={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:r}=e;if(Array.isArray(t))return OS(e,"additionalItems",t);r.items=!0,!(0,Dc.alwaysValidSchema)(r,t)&&e.ok((0,HD.validateArray)(e))}};function OS(e,t,r=e.schema){let{gen:o,parentSchema:n,data:i,keyword:a,it:s}=e;l(n),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=Dc.mergeEvaluated.items(o,r.length,s.items));let c=o.name("valid"),u=o.const("len",(0,ES._)`${i}.length`);r.forEach((d,p)=>{(0,Dc.alwaysValidSchema)(s,d)||(o.if((0,ES._)`${u} > ${p}`,()=>e.subschema({keyword:a,schemaProp:p,dataProp:p},c)),e.ok(c))});function l(d){let{opts:p,errSchemaPath:f}=s,m=r.length,h=m===d.minItems&&(m===d.maxItems||d[t]===!1);if(p.strictTuples&&!h){let y=`"${a}" is ${m}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;(0,Dc.checkStrictMode)(s,y,p.strictTuples)}}}wa.validateTuple=OS;wa.default=BD});var jS=R(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});var WD=lh(),GD={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,WD.validateTuple)(e,"items")};dh.default=GD});var NS=R(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});var ZS=X(),KD=se(),XD=jt(),YD=uh(),QD={message:({params:{len:e}})=>(0,ZS.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,ZS._)`{limit: ${e}}`},eA={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:QD,code(e){let{schema:t,parentSchema:r,it:o}=e,{prefixItems:n}=r;o.items=!0,!(0,KD.alwaysValidSchema)(o,t)&&(n?(0,YD.validateAdditionalItems)(e,n):e.ok((0,XD.validateArray)(e)))}};ph.default=eA});var RS=R(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});var Nt=X(),Ac=se(),tA={message:({params:{min:e,max:t}})=>t===void 0?(0,Nt.str)`must contain at least ${e} valid item(s)`:(0,Nt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,Nt._)`{minContains: ${e}}`:(0,Nt._)`{minContains: ${e}, maxContains: ${t}}`},rA={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:tA,code(e){let{gen:t,schema:r,parentSchema:o,data:n,it:i}=e,a,s,{minContains:c,maxContains:u}=o;i.opts.next?(a=c===void 0?1:c,s=u):a=1;let l=t.const("len",(0,Nt._)`${n}.length`);if(e.setParams({min:a,max:s}),s===void 0&&a===0){(0,Ac.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,Ac.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Ac.alwaysValidSchema)(i,r)){let h=(0,Nt._)`${l} >= ${a}`;s!==void 0&&(h=(0,Nt._)`${h} && ${l} <= ${s}`),e.pass(h);return}i.items=!0;let d=t.name("valid");s===void 0&&a===1?f(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),s!==void 0&&t.if((0,Nt._)`${n}.length > 0`,p)):(t.let(d,!1),p()),e.result(d,()=>e.reset());function p(){let h=t.name("_valid"),y=t.let("count",0);f(h,()=>t.if(h,()=>m(y)))}function f(h,y){t.forRange("i",0,l,x=>{e.subschema({keyword:"contains",dataProp:x,dataPropType:Ac.Type.Num,compositeRule:!0},h),y()})}function m(h){t.code((0,Nt._)`${h}++`),s===void 0?t.if((0,Nt._)`${h} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,Nt._)`${h} > ${s}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,Nt._)`${h} >= ${a}`,()=>t.assign(d,!0)))}}};fh.default=rA});var CS=R(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.validateSchemaDeps=rr.validatePropertyDeps=rr.error=void 0;var mh=X(),nA=se(),ka=jt();rr.error={message:({params:{property:e,depsCount:t,deps:r}})=>{let o=t===1?"property":"properties";return(0,mh.str)`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>(0,mh._)`{property: ${e},
8
+ missingProperty: ${o},
9
+ depsCount: ${t},
10
+ deps: ${r}}`};var oA={keyword:"dependencies",type:"object",schemaType:"object",error:rr.error,code(e){let[t,r]=iA(e);DS(e,t),AS(e,r)}};function iA({schema:e}){let t={},r={};for(let o in e){if(o==="__proto__")continue;let n=Array.isArray(e[o])?t:r;n[o]=e[o]}return[t,r]}function DS(e,t=e.schema){let{gen:r,data:o,it:n}=e;if(Object.keys(t).length===0)return;let i=r.let("missing");for(let a in t){let s=t[a];if(s.length===0)continue;let c=(0,ka.propertyInData)(r,o,a,n.opts.ownProperties);e.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),n.allErrors?r.if(c,()=>{for(let u of s)(0,ka.checkReportMissingProp)(e,u)}):(r.if((0,mh._)`${c} && (${(0,ka.checkMissingProp)(e,s,i)})`),(0,ka.reportMissingProp)(e,i),r.else())}}rr.validatePropertyDeps=DS;function AS(e,t=e.schema){let{gen:r,data:o,keyword:n,it:i}=e,a=r.name("valid");for(let s in t)(0,nA.alwaysValidSchema)(i,t[s])||(r.if((0,ka.propertyInData)(r,o,s,i.opts.ownProperties),()=>{let c=e.subschema({keyword:n,schemaProp:s},a);e.mergeValidEvaluated(c,a)},()=>r.var(a,!0)),e.ok(a))}rr.validateSchemaDeps=AS;rr.default=oA});var MS=R(hh=>{"use strict";Object.defineProperty(hh,"__esModule",{value:!0});var US=X(),aA=se(),sA={message:"property name must be valid",params:({params:e})=>(0,US._)`{propertyName: ${e.propertyName}}`},cA={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:sA,code(e){let{gen:t,schema:r,data:o,it:n}=e;if((0,aA.alwaysValidSchema)(n,r))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,US.not)(i),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(i)}};hh.default=cA});var vh=R(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});var Cc=jt(),Ht=X(),uA=_r(),Uc=se(),lA={message:"must NOT have additional properties",params:({params:e})=>(0,Ht._)`{additionalProperty: ${e.additionalProperty}}`},dA={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:lA,code(e){let{gen:t,schema:r,parentSchema:o,data:n,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,Uc.alwaysValidSchema)(a,r))return;let u=(0,Cc.allSchemaProperties)(o.properties),l=(0,Cc.allSchemaProperties)(o.patternProperties);d(),e.ok((0,Ht._)`${i} === ${uA.default.errors}`);function d(){t.forIn("key",n,y=>{!u.length&&!l.length?m(y):t.if(p(y),()=>m(y))})}function p(y){let x;if(u.length>8){let E=(0,Uc.schemaRefOrVal)(a,o.properties,"properties");x=(0,Cc.isOwnProperty)(t,E,y)}else u.length?x=(0,Ht.or)(...u.map(E=>(0,Ht._)`${y} === ${E}`)):x=Ht.nil;return l.length&&(x=(0,Ht.or)(x,...l.map(E=>(0,Ht._)`${(0,Cc.usePattern)(e,E)}.test(${y})`))),(0,Ht.not)(x)}function f(y){t.code((0,Ht._)`delete ${n}[${y}]`)}function m(y){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){f(y);return}if(r===!1){e.setParams({additionalProperty:y}),e.error(),s||t.break();return}if(typeof r=="object"&&!(0,Uc.alwaysValidSchema)(a,r)){let x=t.name("valid");c.removeAdditional==="failing"?(h(y,x,!1),t.if((0,Ht.not)(x),()=>{e.reset(),f(y)})):(h(y,x),s||t.if((0,Ht.not)(x),()=>t.break()))}}function h(y,x,E){let w={keyword:"additionalProperties",dataProp:y,dataPropType:Uc.Type.Str};E===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(w,x)}}};gh.default=dA});var qS=R(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});var pA=la(),LS=jt(),yh=se(),FS=vh(),fA={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,parentSchema:o,data:n,it:i}=e;i.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&FS.default.code(new pA.KeywordCxt(i,FS.default,"additionalProperties"));let a=(0,LS.allSchemaProperties)(r);for(let d of a)i.definedProperties.add(d);i.opts.unevaluated&&a.length&&i.props!==!0&&(i.props=yh.mergeEvaluated.props(t,(0,yh.toHash)(a),i.props));let s=a.filter(d=>!(0,yh.alwaysValidSchema)(i,r[d]));if(s.length===0)return;let c=t.name("valid");for(let d of s)u(d)?l(d):(t.if((0,LS.propertyInData)(t,n,d,i.opts.ownProperties)),l(d),i.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function u(d){return i.opts.useDefaults&&!i.compositeRule&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};_h.default=fA});var BS=R($h=>{"use strict";Object.defineProperty($h,"__esModule",{value:!0});var VS=jt(),Mc=X(),JS=se(),HS=se(),mA={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:r,data:o,parentSchema:n,it:i}=e,{opts:a}=i,s=(0,VS.allSchemaProperties)(r),c=s.filter(h=>(0,JS.alwaysValidSchema)(i,r[h]));if(s.length===0||c.length===s.length&&(!i.opts.unevaluated||i.props===!0))return;let u=a.strictSchema&&!a.allowMatchingProperties&&n.properties,l=t.name("valid");i.props!==!0&&!(i.props instanceof Mc.Name)&&(i.props=(0,HS.evaluatedPropsToName)(t,i.props));let{props:d}=i;p();function p(){for(let h of s)u&&f(h),i.allErrors?m(h):(t.var(l,!0),m(h),t.if(l))}function f(h){for(let y in u)new RegExp(h).test(y)&&(0,JS.checkStrictMode)(i,`property ${y} matches pattern ${h} (use allowMatchingProperties)`)}function m(h){t.forIn("key",o,y=>{t.if((0,Mc._)`${(0,VS.usePattern)(e,h)}.test(${y})`,()=>{let x=c.includes(h);x||e.subschema({keyword:"patternProperties",schemaProp:h,dataProp:y,dataPropType:HS.Type.Str},l),i.opts.unevaluated&&d!==!0?t.assign((0,Mc._)`${d}[${y}]`,!0):!x&&!i.allErrors&&t.if((0,Mc.not)(l),()=>t.break())})})}}};$h.default=mA});var WS=R(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});var hA=se(),gA={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:r,it:o}=e;if((0,hA.alwaysValidSchema)(o,r)){e.fail();return}let n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};xh.default=gA});var GS=R(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});var vA=jt(),yA={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:vA.validateUnion,error:{message:"must match a schema in anyOf"}};bh.default=yA});var KS=R(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});var Lc=X(),_A=se(),$A={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Lc._)`{passingSchemas: ${e.passing}}`},xA={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:$A,code(e){let{gen:t,schema:r,parentSchema:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&o.discriminator)return;let i=r,a=t.let("valid",!1),s=t.let("passing",null),c=t.name("_valid");e.setParams({passing:s}),t.block(u),e.result(a,()=>e.reset(),()=>e.error(!0));function u(){i.forEach((l,d)=>{let p;(0,_A.alwaysValidSchema)(n,l)?t.var(c,!0):p=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,Lc._)`${c} && ${a}`).assign(a,!1).assign(s,(0,Lc._)`[${s}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(s,d),p&&e.mergeEvaluated(p,Lc.Name)})})}}};wh.default=xA});var XS=R(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});var bA=se(),wA={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");let n=t.name("valid");r.forEach((i,a)=>{if((0,bA.alwaysValidSchema)(o,i))return;let s=e.subschema({keyword:"allOf",schemaProp:a},n);e.ok(n),e.mergeEvaluated(s)})}};kh.default=wA});var e0=R(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});var Fc=X(),QS=se(),kA={message:({params:e})=>(0,Fc.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,Fc._)`{failingKeyword: ${e.ifClause}}`},zA={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:kA,code(e){let{gen:t,parentSchema:r,it:o}=e;r.then===void 0&&r.else===void 0&&(0,QS.checkStrictMode)(o,'"if" without "then" and "else" is ignored');let n=YS(o,"then"),i=YS(o,"else");if(!n&&!i)return;let a=t.let("valid",!0),s=t.name("_valid");if(c(),e.reset(),n&&i){let l=t.let("ifClause");e.setParams({ifClause:l}),t.if(s,u("then",l),u("else",l))}else n?t.if(s,u("then")):t.if((0,Fc.not)(s),u("else"));e.pass(a,()=>e.error(!0));function c(){let l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);e.mergeEvaluated(l)}function u(l,d){return()=>{let p=e.subschema({keyword:l},s);t.assign(a,s),e.mergeValidEvaluated(p,a),d?t.assign(d,(0,Fc._)`${l}`):e.setParams({ifClause:l})}}}};function YS(e,t){let r=e.schema[t];return r!==void 0&&!(0,QS.alwaysValidSchema)(e,r)}zh.default=zA});var t0=R(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});var SA=se(),IA={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,SA.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Sh.default=IA});var r0=R(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var PA=uh(),TA=jS(),EA=lh(),OA=NS(),jA=RS(),ZA=CS(),NA=MS(),RA=vh(),DA=qS(),AA=BS(),CA=WS(),UA=GS(),MA=KS(),LA=XS(),FA=e0(),qA=t0();function VA(e=!1){let t=[CA.default,UA.default,MA.default,LA.default,FA.default,qA.default,NA.default,RA.default,ZA.default,DA.default,AA.default];return e?t.push(TA.default,OA.default):t.push(PA.default,EA.default),t.push(jA.default),t}Ih.default=VA});var n0=R(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});var Ne=X(),JA={message:({schemaCode:e})=>(0,Ne.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ne._)`{format: ${e}}`},HA={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:JA,code(e,t){let{gen:r,data:o,$data:n,schema:i,schemaCode:a,it:s}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=s;if(!c.validateFormats)return;n?p():f();function p(){let m=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),h=r.const("fDef",(0,Ne._)`${m}[${a}]`),y=r.let("fType"),x=r.let("format");r.if((0,Ne._)`typeof ${h} == "object" && !(${h} instanceof RegExp)`,()=>r.assign(y,(0,Ne._)`${h}.type || "string"`).assign(x,(0,Ne._)`${h}.validate`),()=>r.assign(y,(0,Ne._)`"string"`).assign(x,h)),e.fail$data((0,Ne.or)(E(),w()));function E(){return c.strictSchema===!1?Ne.nil:(0,Ne._)`${a} && !${x}`}function w(){let b=l.$async?(0,Ne._)`(${h}.async ? await ${x}(${o}) : ${x}(${o}))`:(0,Ne._)`${x}(${o})`,k=(0,Ne._)`(typeof ${x} == "function" ? ${b} : ${x}.test(${o}))`;return(0,Ne._)`${x} && ${x} !== true && ${y} === ${t} && !${k}`}}function f(){let m=d.formats[i];if(!m){E();return}if(m===!0)return;let[h,y,x]=w(m);h===t&&e.pass(b());function E(){if(c.strictSchema===!1){d.logger.warn(k());return}throw new Error(k());function k(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function w(k){let fe=k instanceof RegExp?(0,Ne.regexpCode)(k):c.code.formats?(0,Ne._)`${c.code.formats}${(0,Ne.getProperty)(i)}`:void 0,me=r.scopeValue("formats",{key:i,ref:k,code:fe});return typeof k=="object"&&!(k instanceof RegExp)?[k.type||"string",k.validate,(0,Ne._)`${me}.validate`]:["string",k,me]}function b(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Ne._)`await ${x}(${o})`}return typeof y=="function"?(0,Ne._)`${x}(${o})`:(0,Ne._)`${x}.test(${o})`}}}};Ph.default=HA});var o0=R(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});var BA=n0(),WA=[BA.default];Th.default=WA});var i0=R($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.contentVocabulary=$o.metadataVocabulary=void 0;$o.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];$o.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var s0=R(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});var GA=mS(),KA=PS(),XA=r0(),YA=o0(),a0=i0(),QA=[GA.default,KA.default,(0,XA.default)(),YA.default,a0.metadataVocabulary,a0.contentVocabulary];Eh.default=QA});var u0=R(qc=>{"use strict";Object.defineProperty(qc,"__esModule",{value:!0});qc.DiscrError=void 0;var c0;(function(e){e.Tag="tag",e.Mapping="mapping"})(c0||(qc.DiscrError=c0={}))});var d0=R(jh=>{"use strict";Object.defineProperty(jh,"__esModule",{value:!0});var xo=X(),Oh=u0(),l0=zc(),eC=da(),tC=se(),rC={message:({params:{discrError:e,tagName:t}})=>e===Oh.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,xo._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},nC={keyword:"discriminator",type:"object",schemaType:"object",error:rC,code(e){let{gen:t,data:r,schema:o,parentSchema:n,it:i}=e,{oneOf:a}=n;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),u=t.const("tag",(0,xo._)`${r}${(0,xo.getProperty)(s)}`);t.if((0,xo._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:Oh.DiscrError.Tag,tag:u,tagName:s})),e.ok(c);function l(){let f=p();t.if(!1);for(let m in f)t.elseIf((0,xo._)`${u} === ${m}`),t.assign(c,d(f[m]));t.else(),e.error(!1,{discrError:Oh.DiscrError.Mapping,tag:u,tagName:s}),t.endIf()}function d(f){let m=t.name("valid"),h=e.subschema({keyword:"oneOf",schemaProp:f},m);return e.mergeEvaluated(h,xo.Name),m}function p(){var f;let m={},h=x(n),y=!0;for(let b=0;b<a.length;b++){let k=a[b];if(k?.$ref&&!(0,tC.schemaHasRulesButRef)(k,i.self.RULES)){let me=k.$ref;if(k=l0.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,me),k instanceof l0.SchemaEnv&&(k=k.schema),k===void 0)throw new eC.default(i.opts.uriResolver,i.baseId,me)}let fe=(f=k?.properties)===null||f===void 0?void 0:f[s];if(typeof fe!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);y=y&&(h||x(k)),E(fe,b)}if(!y)throw new Error(`discriminator: "${s}" must be required`);return m;function x({required:b}){return Array.isArray(b)&&b.includes(s)}function E(b,k){if(b.const)w(b.const,k);else if(b.enum)for(let fe of b.enum)w(fe,k);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function w(b,k){if(typeof b!="string"||b in m)throw new Error(`discriminator: "${s}" values must be unique strings`);m[b]=k}}}};jh.default=nC});var p0=R((U3,oC)=>{oC.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 Nh=R((Se,Zh)=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.MissingRefError=Se.ValidationError=Se.CodeGen=Se.Name=Se.nil=Se.stringify=Se.str=Se._=Se.KeywordCxt=Se.Ajv=void 0;var iC=cS(),aC=s0(),sC=d0(),f0=p0(),cC=["/properties"],Vc="http://json-schema.org/draft-07/schema",bo=class extends iC.default{_addVocabularies(){super._addVocabularies(),aC.default.forEach(t=>this.addVocabulary(t)),this.opts.discriminator&&this.addKeyword(sC.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let t=this.opts.$data?this.$dataMetaSchema(f0,cC):f0;this.addMetaSchema(t,Vc,!1),this.refs["http://json-schema.org/schema"]=Vc}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Vc)?Vc:void 0)}};Se.Ajv=bo;Zh.exports=Se=bo;Zh.exports.Ajv=bo;Object.defineProperty(Se,"__esModule",{value:!0});Se.default=bo;var uC=la();Object.defineProperty(Se,"KeywordCxt",{enumerable:!0,get:function(){return uC.KeywordCxt}});var wo=X();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return wo._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return wo.str}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return wo.stringify}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return wo.nil}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return wo.Name}});Object.defineProperty(Se,"CodeGen",{enumerable:!0,get:function(){return wo.CodeGen}});var lC=wc();Object.defineProperty(Se,"ValidationError",{enumerable:!0,get:function(){return lC.default}});var dC=da();Object.defineProperty(Se,"MissingRefError",{enumerable:!0,get:function(){return dC.default}})});var x0=R(or=>{"use strict";Object.defineProperty(or,"__esModule",{value:!0});or.formatNames=or.fastFormats=or.fullFormats=void 0;function nr(e,t){return{validate:e,compare:t}}or.fullFormats={date:nr(v0,Ch),time:nr(Dh(!0),Uh),"date-time":nr(m0(!0),_0),"iso-time":nr(Dh(),y0),"iso-date-time":nr(m0(),$0),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:vC,"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:kC,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:yC,int32:{type:"number",validate:xC},int64:{type:"number",validate:bC},float:{type:"number",validate:g0},double:{type:"number",validate:g0},password:!0,binary:!0};or.fastFormats={...or.fullFormats,date:nr(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Ch),time:nr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Uh),"date-time":nr(/^\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,_0),"iso-time":nr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,y0),"iso-date-time":nr(/^\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,$0),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};or.formatNames=Object.keys(or.fullFormats);function pC(e){return e%4===0&&(e%100!==0||e%400===0)}var fC=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,mC=[0,31,28,31,30,31,30,31,31,30,31,30,31];function v0(e){let t=fC.exec(e);if(!t)return!1;let r=+t[1],o=+t[2],n=+t[3];return o>=1&&o<=12&&n>=1&&n<=(o===2&&pC(r)?29:mC[o])}function Ch(e,t){if(e&&t)return e>t?1:e<t?-1:0}var Rh=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Dh(e){return function(r){let o=Rh.exec(r);if(!o)return!1;let n=+o[1],i=+o[2],a=+o[3],s=o[4],c=o[5]==="-"?-1:1,u=+(o[6]||0),l=+(o[7]||0);if(u>23||l>59||e&&!s)return!1;if(n<=23&&i<=59&&a<60)return!0;let d=i-l*c,p=n-u*c-(d<0?1:0);return(p===23||p===-1)&&(d===59||d===-1)&&a<61}}function Uh(e,t){if(!(e&&t))return;let r=new Date("2020-01-01T"+e).valueOf(),o=new Date("2020-01-01T"+t).valueOf();if(r&&o)return r-o}function y0(e,t){if(!(e&&t))return;let r=Rh.exec(e),o=Rh.exec(t);if(r&&o)return e=r[1]+r[2]+r[3],t=o[1]+o[2]+o[3],e>t?1:e<t?-1:0}var Ah=/t|\s/i;function m0(e){let t=Dh(e);return function(o){let n=o.split(Ah);return n.length===2&&v0(n[0])&&t(n[1])}}function _0(e,t){if(!(e&&t))return;let r=new Date(e).valueOf(),o=new Date(t).valueOf();if(r&&o)return r-o}function $0(e,t){if(!(e&&t))return;let[r,o]=e.split(Ah),[n,i]=t.split(Ah),a=Ch(r,n);if(a!==void 0)return a||Uh(o,i)}var hC=/\/|:/,gC=/^(?:[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 vC(e){return hC.test(e)&&gC.test(e)}var h0=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function yC(e){return h0.lastIndex=0,h0.test(e)}var _C=-(2**31),$C=2**31-1;function xC(e){return Number.isInteger(e)&&e<=$C&&e>=_C}function bC(e){return Number.isInteger(e)}function g0(){return!0}var wC=/[^\\]\\Z/;function kC(e){if(wC.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var b0=R(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.formatLimitDefinition=void 0;var zC=Nh(),Bt=X(),Hr=Bt.operators,Jc={formatMaximum:{okStr:"<=",ok:Hr.LTE,fail:Hr.GT},formatMinimum:{okStr:">=",ok:Hr.GTE,fail:Hr.LT},formatExclusiveMaximum:{okStr:"<",ok:Hr.LT,fail:Hr.GTE},formatExclusiveMinimum:{okStr:">",ok:Hr.GT,fail:Hr.LTE}},SC={message:({keyword:e,schemaCode:t})=>(0,Bt.str)`should be ${Jc[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Bt._)`{comparison: ${Jc[e].okStr}, limit: ${t}}`};ko.formatLimitDefinition={keyword:Object.keys(Jc),type:"string",schemaType:"string",$data:!0,error:SC,code(e){let{gen:t,data:r,schemaCode:o,keyword:n,it:i}=e,{opts:a,self:s}=i;if(!a.validateFormats)return;let c=new zC.KeywordCxt(i,s.RULES.all.format.definition,"format");c.$data?u():l();function u(){let p=t.scopeValue("formats",{ref:s.formats,code:a.code.formats}),f=t.const("fmt",(0,Bt._)`${p}[${c.schemaCode}]`);e.fail$data((0,Bt.or)((0,Bt._)`typeof ${f} != "object"`,(0,Bt._)`${f} instanceof RegExp`,(0,Bt._)`typeof ${f}.compare != "function"`,d(f)))}function l(){let p=c.schema,f=s.formats[p];if(!f||f===!0)return;if(typeof f!="object"||f instanceof RegExp||typeof f.compare!="function")throw new Error(`"${n}": format "${p}" does not define "compare" function`);let m=t.scopeValue("formats",{key:p,ref:f,code:a.code.formats?(0,Bt._)`${a.code.formats}${(0,Bt.getProperty)(p)}`:void 0});e.fail$data(d(m))}function d(p){return(0,Bt._)`${p}.compare(${r}, ${o}) ${Jc[n].fail} 0`}},dependencies:["format"]};var IC=e=>(e.addKeyword(ko.formatLimitDefinition),e);ko.default=IC});var S0=R((za,z0)=>{"use strict";Object.defineProperty(za,"__esModule",{value:!0});var zo=x0(),PC=b0(),Mh=X(),w0=new Mh.Name("fullFormats"),TC=new Mh.Name("fastFormats"),Lh=(e,t={keywords:!0})=>{if(Array.isArray(t))return k0(e,t,zo.fullFormats,w0),e;let[r,o]=t.mode==="fast"?[zo.fastFormats,TC]:[zo.fullFormats,w0],n=t.formats||zo.formatNames;return k0(e,n,r,o),t.keywords&&(0,PC.default)(e),e};Lh.get=(e,t="full")=>{let o=(t==="fast"?zo.fastFormats:zo.fullFormats)[e];if(!o)throw new Error(`Unknown format "${e}"`);return o};function k0(e,t,r,o){var n,i;(n=(i=e.opts.code).formats)!==null&&n!==void 0||(i.formats=(0,Mh._)`require("ajv-formats/dist/formats").${o}`);for(let a of t)e.addFormat(a,r[a])}z0.exports=za=Lh;Object.defineProperty(za,"__esModule",{value:!0});za.default=Lh});var re;(function(e){e.assertEqual=n=>{};function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let i={};for(let a of n)i[a]=a;return i},e.getValidEnumValues=n=>{let i=e.objectKeys(n).filter(s=>typeof n[n[s]]!="number"),a={};for(let s of i)a[s]=n[s];return e.objectValues(a)},e.objectValues=n=>e.objectKeys(n).map(function(i){return n[i]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let i=[];for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&i.push(a);return i},e.find=(n,i)=>{for(let a of n)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function o(n,i=" | "){return n.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=o,e.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(re||(re={}));var ix;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(ix||(ix={}));var D=re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),lr=e=>{switch(typeof e){case"undefined":return D.undefined;case"string":return D.string;case"number":return Number.isNaN(e)?D.nan:D.number;case"boolean":return D.boolean;case"function":return D.function;case"bigint":return D.bigint;case"symbol":return D.symbol;case"object":return Array.isArray(e)?D.array:e===null?D.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?D.promise:typeof Map<"u"&&e instanceof Map?D.map:typeof Set<"u"&&e instanceof Set?D.set:typeof Date<"u"&&e instanceof Date?D.date:D.object;default:return D.unknown}};var S=re.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 gt=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 r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}format(t){let r=t||function(i){return i.message},o={_errors:[]},n=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(n);else if(a.code==="invalid_return_type")n(a.returnTypeError);else if(a.code==="invalid_arguments")n(a.argumentsError);else if(a.path.length===0)o._errors.push(r(a));else{let s=o,c=0;for(;c<a.path.length;){let u=a.path[c];c===a.path.length-1?(s[u]=s[u]||{_errors:[]},s[u]._errors.push(r(a))):s[u]=s[u]||{_errors:[]},s=s[u],c++}}};return n(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,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r=Object.create(null),o=[];for(let n of this.issues)if(n.path.length>0){let i=n.path[0];r[i]=r[i]||[],r[i].push(t(n))}else o.push(t(n));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}};gt.create=e=>new gt(e);var _E=(e,t)=>{let r;switch(e.code){case S.invalid_type:e.received===D.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case S.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,re.jsonStringifyReplacer)}`;break;case S.unrecognized_keys:r=`Unrecognized key(s) in object: ${re.joinValues(e.keys,", ")}`;break;case S.invalid_union:r="Invalid input";break;case S.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${re.joinValues(e.options)}`;break;case S.invalid_enum_value:r=`Invalid enum value. Expected ${re.joinValues(e.options)}, received '${e.received}'`;break;case S.invalid_arguments:r="Invalid function arguments";break;case S.invalid_return_type:r="Invalid function return type";break;case S.invalid_date:r="Invalid date";break;case S.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:re.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case S.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case S.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case S.custom:r="Invalid input";break;case S.invalid_intersection_types:r="Intersection results could not be merged";break;case S.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case S.not_finite:r="Number must be finite";break;default:r=t.defaultError,re.assertNever(e)}return{message:r}},Pr=_E;var $E=Pr;function si(){return $E}var ls=e=>{let{data:t,path:r,errorMaps:o,issueData:n}=e,i=[...r,...n.path||[]],a={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let s="",c=o.filter(u=>!!u).slice().reverse();for(let u of c)s=u(a,{data:t,defaultError:s}).message;return{...n,path:i,message:s}};function Z(e,t){let r=si(),o=ls({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===Pr?void 0:Pr].filter(n=>!!n)});e.common.issues.push(o)}var Ve=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let o=[];for(let n of r){if(n.status==="aborted")return V;n.status==="dirty"&&t.dirty(),o.push(n.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,r){let o=[];for(let n of r){let i=await n.key,a=await n.value;o.push({key:i,value:a})}return e.mergeObjectSync(t,o)}static mergeObjectSync(t,r){let o={};for(let n of r){let{key:i,value:a}=n;if(i.status==="aborted"||a.status==="aborted")return V;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||n.alwaysSet)&&(o[i.value]=a.value)}return{status:t.value,value:o}}},V=Object.freeze({status:"aborted"}),Dn=e=>({status:"dirty",value:e}),Xe=e=>({status:"valid",value:e}),Jl=e=>e.status==="aborted",Hl=e=>e.status==="dirty",sn=e=>e.status==="valid",ci=e=>typeof Promise<"u"&&e instanceof Promise;var C;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(C||(C={}));var St=class{constructor(t,r,o,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=o,this._key=n}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}},ax=(e,t)=>{if(sn(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 r=new gt(e.common.issues);return this._error=r,this._error}}};function W(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:o,description:n}=e;if(t&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{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??r??s.defaultError}},description:n}}var Q=class{get description(){return this._def.description}_getType(t){return lr(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:lr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ve,ctx:{common:t.parent.common,data:t.data,parsedType:lr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(ci(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let o=this.safeParse(t,r);if(o.success)return o.data;throw o.error}safeParse(t,r){let o={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lr(t)},n=this._parseSync({data:t,path:o.path,parent:o});return ax(o,n)}"~validate"(t){let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lr(t)};if(!this["~standard"].async)try{let o=this._parseSync({data:t,path:[],parent:r});return sn(o)?{value:o.value}:{issues:r.common.issues}}catch(o){o?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:r}).then(o=>sn(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(t,r){let o=await this.safeParseAsync(t,r);if(o.success)return o.data;throw o.error}async safeParseAsync(t,r){let o={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:lr(t)},n=this._parse({data:t,path:o.path,parent:o}),i=await(ci(n)?n:Promise.resolve(n));return ax(o,i)}refine(t,r){let o=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,i)=>{let a=t(n),s=()=>i.addIssue({code:S.custom,...o(n)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,r){return this._refinement((o,n)=>t(o)?!0:(n.addIssue(typeof r=="function"?r(o,n):r),!1))}_refinement(t){return new Mt({schema:this,typeName:T.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:r=>this["~validate"](r)}}optional(){return Ut.create(this,this._def)}nullable(){return fr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Er.create(this)}promise(){return cn.create(this,this._def)}or(t){return Ln.create([this,t],this._def)}and(t){return Fn.create(this,t,this._def)}transform(t){return new Mt({...W(this._def),schema:this,typeName:T.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new Bn({...W(this._def),innerType:this,defaultValue:r,typeName:T.ZodDefault})}brand(){return new ds({typeName:T.ZodBranded,type:this,...W(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Wn({...W(this._def),innerType:this,catchValue:r,typeName:T.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return ps.create(this,t)}readonly(){return Gn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},xE=/^c[^\s-]{8,}$/i,bE=/^[0-9a-z]+$/,wE=/^[0-9A-HJKMNP-TV-Z]{26}$/i,kE=/^[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,zE=/^[a-z0-9_-]{21}$/i,SE=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,IE=/^[-+]?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)?)??$/,PE=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,TE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Bl,EE=/^(?:(?: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])$/,OE=/^(?:(?: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])$/,jE=/^(([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]))$/,ZE=/^(([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])$/,NE=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,RE=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,sx="((\\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])))",DE=new RegExp(`^${sx}$`);function cx(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function AE(e){return new RegExp(`^${cx(e)}$`)}function CE(e){let t=`${sx}T${cx(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function UE(e,t){return!!((t==="v4"||!t)&&EE.test(e)||(t==="v6"||!t)&&jE.test(e))}function ME(e,t){if(!SE.test(e))return!1;try{let[r]=e.split(".");if(!r)return!1;let o=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(o));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||t&&n.alg!==t)}catch{return!1}}function LE(e,t){return!!((t==="v4"||!t)&&OE.test(e)||(t==="v6"||!t)&&ZE.test(e))}var Cn=class e extends Q{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==D.string){let i=this._getOrReturnCtx(t);return Z(i,{code:S.invalid_type,expected:D.string,received:i.parsedType}),V}let o=new Ve,n;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(n=this._getOrReturnCtx(t,n),Z(n,{code:S.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&&(n=this._getOrReturnCtx(t,n),Z(n,{code:S.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)&&(n=this._getOrReturnCtx(t,n),a?Z(n,{code:S.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&Z(n,{code:S.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),o.dirty())}else if(i.kind==="email")PE.test(t.data)||(n=this._getOrReturnCtx(t,n),Z(n,{validation:"email",code:S.invalid_string,message:i.message}),o.dirty());else if(i.kind==="emoji")Bl||(Bl=new RegExp(TE,"u")),Bl.test(t.data)||(n=this._getOrReturnCtx(t,n),Z(n,{validation:"emoji",code:S.invalid_string,message:i.message}),o.dirty());else if(i.kind==="uuid")kE.test(t.data)||(n=this._getOrReturnCtx(t,n),Z(n,{validation:"uuid",code:S.invalid_string,message:i.message}),o.dirty());else if(i.kind==="nanoid")zE.test(t.data)||(n=this._getOrReturnCtx(t,n),Z(n,{validation:"nanoid",code:S.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid")xE.test(t.data)||(n=this._getOrReturnCtx(t,n),Z(n,{validation:"cuid",code:S.invalid_string,message:i.message}),o.dirty());else if(i.kind==="cuid2")bE.test(t.data)||(n=this._getOrReturnCtx(t,n),Z(n,{validation:"cuid2",code:S.invalid_string,message:i.message}),o.dirty());else if(i.kind==="ulid")wE.test(t.data)||(n=this._getOrReturnCtx(t,n),Z(n,{validation:"ulid",code:S.invalid_string,message:i.message}),o.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),Z(n,{validation:"url",code:S.invalid_string,message:i.message}),o.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),Z(n,{validation:"regex",code:S.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)||(n=this._getOrReturnCtx(t,n),Z(n,{code:S.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)||(n=this._getOrReturnCtx(t,n),Z(n,{code:S.invalid_string,validation:{startsWith:i.value},message:i.message}),o.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(n=this._getOrReturnCtx(t,n),Z(n,{code:S.invalid_string,validation:{endsWith:i.value},message:i.message}),o.dirty()):i.kind==="datetime"?CE(i).test(t.data)||(n=this._getOrReturnCtx(t,n),Z(n,{code:S.invalid_string,validation:"datetime",message:i.message}),o.dirty()):i.kind==="date"?DE.test(t.data)||(n=this._getOrReturnCtx(t,n),Z(n,{code:S.invalid_string,validation:"date",message:i.message}),o.dirty()):i.kind==="time"?AE(i).test(t.data)||(n=this._getOrReturnCtx(t,n),Z(n,{code:S.invalid_string,validation:"time",message:i.message}),o.dirty()):i.kind==="duration"?IE.test(t.data)||(n=this._getOrReturnCtx(t,n),Z(n,{validation:"duration",code:S.invalid_string,message:i.message}),o.dirty()):i.kind==="ip"?UE(t.data,i.version)||(n=this._getOrReturnCtx(t,n),Z(n,{validation:"ip",code:S.invalid_string,message:i.message}),o.dirty()):i.kind==="jwt"?ME(t.data,i.alg)||(n=this._getOrReturnCtx(t,n),Z(n,{validation:"jwt",code:S.invalid_string,message:i.message}),o.dirty()):i.kind==="cidr"?LE(t.data,i.version)||(n=this._getOrReturnCtx(t,n),Z(n,{validation:"cidr",code:S.invalid_string,message:i.message}),o.dirty()):i.kind==="base64"?NE.test(t.data)||(n=this._getOrReturnCtx(t,n),Z(n,{validation:"base64",code:S.invalid_string,message:i.message}),o.dirty()):i.kind==="base64url"?RE.test(t.data)||(n=this._getOrReturnCtx(t,n),Z(n,{validation:"base64url",code:S.invalid_string,message:i.message}),o.dirty()):re.assertNever(i);return{status:o.value,value:t.data}}_regex(t,r,o){return this.refinement(n=>t.test(n),{validation:r,code:S.invalid_string,...C.errToObj(o)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...C.errToObj(t)})}url(t){return this._addCheck({kind:"url",...C.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...C.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...C.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...C.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...C.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...C.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...C.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...C.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...C.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...C.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...C.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...C.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,...C.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,...C.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...C.errToObj(t)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...C.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...C.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...C.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...C.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...C.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...C.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...C.errToObj(r)})}nonempty(t){return this.min(1,C.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 r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};Cn.create=e=>new Cn({checks:[],typeName:T.ZodString,coerce:e?.coerce??!1,...W(e)});function FE(e,t){let r=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,n=r>o?r:o,i=Number.parseInt(e.toFixed(n).replace(".","")),a=Number.parseInt(t.toFixed(n).replace(".",""));return i%a/10**n}var ui=class e extends Q{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)!==D.number){let i=this._getOrReturnCtx(t);return Z(i,{code:S.invalid_type,expected:D.number,received:i.parsedType}),V}let o,n=new Ve;for(let i of this._def.checks)i.kind==="int"?re.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),Z(o,{code:S.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(o=this._getOrReturnCtx(t,o),Z(o,{code:S.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),Z(o,{code:S.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?FE(t.data,i.value)!==0&&(o=this._getOrReturnCtx(t,o),Z(o,{code:S.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),Z(o,{code:S.not_finite,message:i.message}),n.dirty()):re.assertNever(i);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,C.toString(r))}gt(t,r){return this.setLimit("min",t,!1,C.toString(r))}lte(t,r){return this.setLimit("max",t,!0,C.toString(r))}lt(t,r){return this.setLimit("max",t,!1,C.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:C.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:C.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:C.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:C.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:C.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:C.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:C.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:C.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:C.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:C.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&re.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value)}return Number.isFinite(r)&&Number.isFinite(t)}};ui.create=e=>new ui({checks:[],typeName:T.ZodNumber,coerce:e?.coerce||!1,...W(e)});var li=class e extends Q{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)!==D.bigint)return this._getInvalidInput(t);let o,n=new Ve;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),Z(o,{code:S.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(o=this._getOrReturnCtx(t,o),Z(o,{code:S.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),Z(o,{code:S.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):re.assertNever(i);return{status:n.value,value:t.data}}_getInvalidInput(t){let r=this._getOrReturnCtx(t);return Z(r,{code:S.invalid_type,expected:D.bigint,received:r.parsedType}),V}gte(t,r){return this.setLimit("min",t,!0,C.toString(r))}gt(t,r){return this.setLimit("min",t,!1,C.toString(r))}lte(t,r){return this.setLimit("max",t,!0,C.toString(r))}lt(t,r){return this.setLimit("max",t,!1,C.toString(r))}setLimit(t,r,o,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:o,message:C.toString(n)}]})}_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:C.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:C.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:C.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:C.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:C.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};li.create=e=>new li({checks:[],typeName:T.ZodBigInt,coerce:e?.coerce??!1,...W(e)});var di=class extends Q{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==D.boolean){let o=this._getOrReturnCtx(t);return Z(o,{code:S.invalid_type,expected:D.boolean,received:o.parsedType}),V}return Xe(t.data)}};di.create=e=>new di({typeName:T.ZodBoolean,coerce:e?.coerce||!1,...W(e)});var pi=class e extends Q{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==D.date){let i=this._getOrReturnCtx(t);return Z(i,{code:S.invalid_type,expected:D.date,received:i.parsedType}),V}if(Number.isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return Z(i,{code:S.invalid_date}),V}let o=new Ve,n;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(n=this._getOrReturnCtx(t,n),Z(n,{code:S.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),o.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(n=this._getOrReturnCtx(t,n),Z(n,{code:S.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),o.dirty()):re.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,r){return this._addCheck({kind:"min",value:t.getTime(),message:C.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:C.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};pi.create=e=>new pi({checks:[],coerce:e?.coerce||!1,typeName:T.ZodDate,...W(e)});var fi=class extends Q{_parse(t){if(this._getType(t)!==D.symbol){let o=this._getOrReturnCtx(t);return Z(o,{code:S.invalid_type,expected:D.symbol,received:o.parsedType}),V}return Xe(t.data)}};fi.create=e=>new fi({typeName:T.ZodSymbol,...W(e)});var Un=class extends Q{_parse(t){if(this._getType(t)!==D.undefined){let o=this._getOrReturnCtx(t);return Z(o,{code:S.invalid_type,expected:D.undefined,received:o.parsedType}),V}return Xe(t.data)}};Un.create=e=>new Un({typeName:T.ZodUndefined,...W(e)});var Mn=class extends Q{_parse(t){if(this._getType(t)!==D.null){let o=this._getOrReturnCtx(t);return Z(o,{code:S.invalid_type,expected:D.null,received:o.parsedType}),V}return Xe(t.data)}};Mn.create=e=>new Mn({typeName:T.ZodNull,...W(e)});var mi=class extends Q{constructor(){super(...arguments),this._any=!0}_parse(t){return Xe(t.data)}};mi.create=e=>new mi({typeName:T.ZodAny,...W(e)});var Tr=class extends Q{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Xe(t.data)}};Tr.create=e=>new Tr({typeName:T.ZodUnknown,...W(e)});var Xt=class extends Q{_parse(t){let r=this._getOrReturnCtx(t);return Z(r,{code:S.invalid_type,expected:D.never,received:r.parsedType}),V}};Xt.create=e=>new Xt({typeName:T.ZodNever,...W(e)});var hi=class extends Q{_parse(t){if(this._getType(t)!==D.undefined){let o=this._getOrReturnCtx(t);return Z(o,{code:S.invalid_type,expected:D.void,received:o.parsedType}),V}return Xe(t.data)}};hi.create=e=>new hi({typeName:T.ZodVoid,...W(e)});var Er=class e extends Q{_parse(t){let{ctx:r,status:o}=this._processInputParams(t),n=this._def;if(r.parsedType!==D.array)return Z(r,{code:S.invalid_type,expected:D.array,received:r.parsedType}),V;if(n.exactLength!==null){let a=r.data.length>n.exactLength.value,s=r.data.length<n.exactLength.value;(a||s)&&(Z(r,{code:a?S.too_big:S.too_small,minimum:s?n.exactLength.value:void 0,maximum:a?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),o.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(Z(r,{code:S.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),o.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(Z(r,{code:S.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>n.type._parseAsync(new St(r,a,r.path,s)))).then(a=>Ve.mergeArray(o,a));let i=[...r.data].map((a,s)=>n.type._parseSync(new St(r,a,r.path,s)));return Ve.mergeArray(o,i)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:C.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:C.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:C.toString(r)}})}nonempty(t){return this.min(1,t)}};Er.create=(e,t)=>new Er({type:e,minLength:null,maxLength:null,exactLength:null,typeName:T.ZodArray,...W(t)});function An(e){if(e instanceof vt){let t={};for(let r in e.shape){let o=e.shape[r];t[r]=Ut.create(An(o))}return new vt({...e._def,shape:()=>t})}else return e instanceof Er?new Er({...e._def,type:An(e.element)}):e instanceof Ut?Ut.create(An(e.unwrap())):e instanceof fr?fr.create(An(e.unwrap())):e instanceof pr?pr.create(e.items.map(t=>An(t))):e}var vt=class e extends Q{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(),r=re.objectKeys(t);return this._cached={shape:t,keys:r},this._cached}_parse(t){if(this._getType(t)!==D.object){let u=this._getOrReturnCtx(t);return Z(u,{code:S.invalid_type,expected:D.object,received:u.parsedType}),V}let{status:o,ctx:n}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Xt&&this._def.unknownKeys==="strip"))for(let u in n.data)a.includes(u)||s.push(u);let c=[];for(let u of a){let l=i[u],d=n.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new St(n,d,n.path,u)),alwaysSet:u in n.data})}if(this._def.catchall instanceof Xt){let u=this._def.unknownKeys;if(u==="passthrough")for(let l of s)c.push({key:{status:"valid",value:l},value:{status:"valid",value:n.data[l]}});else if(u==="strict")s.length>0&&(Z(n,{code:S.unrecognized_keys,keys:s}),o.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let u=this._def.catchall;for(let l of s){let d=n.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new St(n,d,n.path,l)),alwaysSet:l in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let u=[];for(let l of c){let d=await l.key,p=await l.value;u.push({key:d,value:p,alwaysSet:l.alwaysSet})}return u}).then(u=>Ve.mergeObjectSync(o,u)):Ve.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return C.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,o)=>{let n=this._def.errorMap?.(r,o).message??o.defaultError;return r.code==="unrecognized_keys"?{message:C.errToObj(t).message??n}:{message:n}}}:{}})}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:T.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};for(let o of re.objectKeys(t))t[o]&&this.shape[o]&&(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}omit(t){let r={};for(let o of re.objectKeys(this.shape))t[o]||(r[o]=this.shape[o]);return new e({...this._def,shape:()=>r})}deepPartial(){return An(this)}partial(t){let r={};for(let o of re.objectKeys(this.shape)){let n=this.shape[o];t&&!t[o]?r[o]=n:r[o]=n.optional()}return new e({...this._def,shape:()=>r})}required(t){let r={};for(let o of re.objectKeys(this.shape))if(t&&!t[o])r[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof Ut;)i=i._def.innerType;r[o]=i}return new e({...this._def,shape:()=>r})}keyof(){return ux(re.objectKeys(this.shape))}};vt.create=(e,t)=>new vt({shape:()=>e,unknownKeys:"strip",catchall:Xt.create(),typeName:T.ZodObject,...W(t)});vt.strictCreate=(e,t)=>new vt({shape:()=>e,unknownKeys:"strict",catchall:Xt.create(),typeName:T.ZodObject,...W(t)});vt.lazycreate=(e,t)=>new vt({shape:e,unknownKeys:"strip",catchall:Xt.create(),typeName:T.ZodObject,...W(t)});var Ln=class extends Q{_parse(t){let{ctx:r}=this._processInputParams(t),o=this._def.options;function n(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 r.common.issues.push(...s.ctx.common.issues),s.result;let a=i.map(s=>new gt(s.ctx.common.issues));return Z(r,{code:S.invalid_union,unionErrors:a}),V}if(r.common.async)return Promise.all(o.map(async i=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(n);{let i,a=[];for(let c of o){let u={...r,common:{...r.common,issues:[]},parent:null},l=c._parseSync({data:r.data,path:r.path,parent:u});if(l.status==="valid")return l;l.status==="dirty"&&!i&&(i={result:l,ctx:u}),u.common.issues.length&&a.push(u.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;let s=a.map(c=>new gt(c));return Z(r,{code:S.invalid_union,unionErrors:s}),V}}get options(){return this._def.options}};Ln.create=(e,t)=>new Ln({options:e,typeName:T.ZodUnion,...W(t)});var dr=e=>e instanceof qn?dr(e.schema):e instanceof Mt?dr(e.innerType()):e instanceof Vn?[e.value]:e instanceof Jn?e.options:e instanceof Hn?re.objectValues(e.enum):e instanceof Bn?dr(e._def.innerType):e instanceof Un?[void 0]:e instanceof Mn?[null]:e instanceof Ut?[void 0,...dr(e.unwrap())]:e instanceof fr?[null,...dr(e.unwrap())]:e instanceof ds||e instanceof Gn?dr(e.unwrap()):e instanceof Wn?dr(e._def.innerType):[],Wl=class e extends Q{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==D.object)return Z(r,{code:S.invalid_type,expected:D.object,received:r.parsedType}),V;let o=this.discriminator,n=r.data[o],i=this.optionsMap.get(n);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(Z(r,{code:S.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),V)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,o){let n=new Map;for(let i of r){let a=dr(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(n.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);n.set(s,i)}}return new e({typeName:T.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...W(o)})}};function Gl(e,t){let r=lr(e),o=lr(t);if(e===t)return{valid:!0,data:e};if(r===D.object&&o===D.object){let n=re.objectKeys(t),i=re.objectKeys(e).filter(s=>n.indexOf(s)!==-1),a={...e,...t};for(let s of i){let c=Gl(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(r===D.array&&o===D.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let i=0;i<e.length;i++){let a=e[i],s=t[i],c=Gl(a,s);if(!c.valid)return{valid:!1};n.push(c.data)}return{valid:!0,data:n}}else return r===D.date&&o===D.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Fn=class extends Q{_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=(i,a)=>{if(Jl(i)||Jl(a))return V;let s=Gl(i.value,a.value);return s.valid?((Hl(i)||Hl(a))&&r.dirty(),{status:r.value,value:s.data}):(Z(o,{code:S.invalid_intersection_types}),V)};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])=>n(i,a)):n(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}};Fn.create=(e,t,r)=>new Fn({left:e,right:t,typeName:T.ZodIntersection,...W(r)});var pr=class e extends Q{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==D.array)return Z(o,{code:S.invalid_type,expected:D.array,received:o.parsedType}),V;if(o.data.length<this._def.items.length)return Z(o,{code:S.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),V;!this._def.rest&&o.data.length>this._def.items.length&&(Z(o,{code:S.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let i=[...o.data].map((a,s)=>{let c=this._def.items[s]||this._def.rest;return c?c._parse(new St(o,a,o.path,s)):null}).filter(a=>!!a);return o.common.async?Promise.all(i).then(a=>Ve.mergeArray(r,a)):Ve.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};pr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new pr({items:e,typeName:T.ZodTuple,rest:null,...W(t)})};var Kl=class e extends Q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==D.object)return Z(o,{code:S.invalid_type,expected:D.object,received:o.parsedType}),V;let n=[],i=this._def.keyType,a=this._def.valueType;for(let s in o.data)n.push({key:i._parse(new St(o,s,o.path,s)),value:a._parse(new St(o,o.data[s],o.path,s)),alwaysSet:s in o.data});return o.common.async?Ve.mergeObjectAsync(r,n):Ve.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,o){return r instanceof Q?new e({keyType:t,valueType:r,typeName:T.ZodRecord,...W(o)}):new e({keyType:Cn.create(),valueType:t,typeName:T.ZodRecord,...W(r)})}},gi=class extends Q{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==D.map)return Z(o,{code:S.invalid_type,expected:D.map,received:o.parsedType}),V;let n=this._def.keyType,i=this._def.valueType,a=[...o.data.entries()].map(([s,c],u)=>({key:n._parse(new St(o,s,o.path,[u,"key"])),value:i._parse(new St(o,c,o.path,[u,"value"]))}));if(o.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let c of a){let u=await c.key,l=await c.value;if(u.status==="aborted"||l.status==="aborted")return V;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let c of a){let u=c.key,l=c.value;if(u.status==="aborted"||l.status==="aborted")return V;(u.status==="dirty"||l.status==="dirty")&&r.dirty(),s.set(u.value,l.value)}return{status:r.value,value:s}}}};gi.create=(e,t,r)=>new gi({valueType:t,keyType:e,typeName:T.ZodMap,...W(r)});var vi=class e extends Q{_parse(t){let{status:r,ctx:o}=this._processInputParams(t);if(o.parsedType!==D.set)return Z(o,{code:S.invalid_type,expected:D.set,received:o.parsedType}),V;let n=this._def;n.minSize!==null&&o.data.size<n.minSize.value&&(Z(o,{code:S.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&o.data.size>n.maxSize.value&&(Z(o,{code:S.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let i=this._def.valueType;function a(c){let u=new Set;for(let l of c){if(l.status==="aborted")return V;l.status==="dirty"&&r.dirty(),u.add(l.value)}return{status:r.value,value:u}}let s=[...o.data.values()].map((c,u)=>i._parse(new St(o,c,o.path,u)));return o.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,r){return new e({...this._def,minSize:{value:t,message:C.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:C.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};vi.create=(e,t)=>new vi({valueType:e,minSize:null,maxSize:null,typeName:T.ZodSet,...W(t)});var Xl=class e extends Q{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==D.function)return Z(r,{code:S.invalid_type,expected:D.function,received:r.parsedType}),V;function o(s,c){return ls({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,si(),Pr].filter(u=>!!u),issueData:{code:S.invalid_arguments,argumentsError:c}})}function n(s,c){return ls({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,si(),Pr].filter(u=>!!u),issueData:{code:S.invalid_return_type,returnTypeError:c}})}let i={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof cn){let s=this;return Xe(async function(...c){let u=new gt([]),l=await s._def.args.parseAsync(c,i).catch(f=>{throw u.addIssue(o(c,f)),u}),d=await Reflect.apply(a,this,l);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw u.addIssue(n(d,f)),u})})}else{let s=this;return Xe(function(...c){let u=s._def.args.safeParse(c,i);if(!u.success)throw new gt([o(c,u.error)]);let l=Reflect.apply(a,this,u.data),d=s._def.returns.safeParse(l,i);if(!d.success)throw new gt([n(l,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:pr.create(t).rest(Tr.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,r,o){return new e({args:t||pr.create([]).rest(Tr.create()),returns:r||Tr.create(),typeName:T.ZodFunction,...W(o)})}},qn=class extends Q{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};qn.create=(e,t)=>new qn({getter:e,typeName:T.ZodLazy,...W(t)});var Vn=class extends Q{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return Z(r,{received:r.data,code:S.invalid_literal,expected:this._def.value}),V}return{status:"valid",value:t.data}}get value(){return this._def.value}};Vn.create=(e,t)=>new Vn({value:e,typeName:T.ZodLiteral,...W(t)});function ux(e,t){return new Jn({values:e,typeName:T.ZodEnum,...W(t)})}var Jn=class e extends Q{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),o=this._def.values;return Z(r,{expected:re.joinValues(o),received:r.parsedType,code:S.invalid_type}),V}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){let r=this._getOrReturnCtx(t),o=this._def.values;return Z(r,{received:r.data,code:S.invalid_enum_value,options:o}),V}return Xe(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t,r=this._def){return e.create(t,{...this._def,...r})}exclude(t,r=this._def){return e.create(this.options.filter(o=>!t.includes(o)),{...this._def,...r})}};Jn.create=ux;var Hn=class extends Q{_parse(t){let r=re.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==D.string&&o.parsedType!==D.number){let n=re.objectValues(r);return Z(o,{expected:re.joinValues(n),received:o.parsedType,code:S.invalid_type}),V}if(this._cache||(this._cache=new Set(re.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){let n=re.objectValues(r);return Z(o,{received:o.data,code:S.invalid_enum_value,options:n}),V}return Xe(t.data)}get enum(){return this._def.values}};Hn.create=(e,t)=>new Hn({values:e,typeName:T.ZodNativeEnum,...W(t)});var cn=class extends Q{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==D.promise&&r.common.async===!1)return Z(r,{code:S.invalid_type,expected:D.promise,received:r.parsedType}),V;let o=r.parsedType===D.promise?r.data:Promise.resolve(r.data);return Xe(o.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};cn.create=(e,t)=>new cn({type:e,typeName:T.ZodPromise,...W(t)});var Mt=class extends Q{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===T.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:o}=this._processInputParams(t),n=this._def.effect||null,i={addIssue:a=>{Z(o,a),a.fatal?r.abort():r.dirty()},get path(){return o.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){let a=n.transform(o.data,i);if(o.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return V;let c=await this._def.schema._parseAsync({data:s,path:o.path,parent:o});return c.status==="aborted"?V:c.status==="dirty"?Dn(c.value):r.value==="dirty"?Dn(c.value):c});{if(r.value==="aborted")return V;let s=this._def.schema._parseSync({data:a,path:o.path,parent:o});return s.status==="aborted"?V:s.status==="dirty"?Dn(s.value):r.value==="dirty"?Dn(s.value):s}}if(n.type==="refinement"){let a=s=>{let c=n.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"?V:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>s.status==="aborted"?V:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(n.type==="transform")if(o.common.async===!1){let a=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!sn(a))return V;let s=n.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(a=>sn(a)?Promise.resolve(n.transform(a.value,i)).then(s=>({status:r.value,value:s})):V);re.assertNever(n)}};Mt.create=(e,t,r)=>new Mt({schema:e,typeName:T.ZodEffects,effect:t,...W(r)});Mt.createWithPreprocess=(e,t,r)=>new Mt({schema:t,effect:{type:"preprocess",transform:e},typeName:T.ZodEffects,...W(r)});var Ut=class extends Q{_parse(t){return this._getType(t)===D.undefined?Xe(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ut.create=(e,t)=>new Ut({innerType:e,typeName:T.ZodOptional,...W(t)});var fr=class extends Q{_parse(t){return this._getType(t)===D.null?Xe(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};fr.create=(e,t)=>new fr({innerType:e,typeName:T.ZodNullable,...W(t)});var Bn=class extends Q{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return r.parsedType===D.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Bn.create=(e,t)=>new Bn({innerType:e,typeName:T.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...W(t)});var Wn=class extends Q{_parse(t){let{ctx:r}=this._processInputParams(t),o={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return ci(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new gt(o.common.issues)},input:o.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new gt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}};Wn.create=(e,t)=>new Wn({innerType:e,typeName:T.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...W(t)});var yi=class extends Q{_parse(t){if(this._getType(t)!==D.nan){let o=this._getOrReturnCtx(t);return Z(o,{code:S.invalid_type,expected:D.nan,received:o.parsedType}),V}return{status:"valid",value:t.data}}};yi.create=e=>new yi({typeName:T.ZodNaN,...W(e)});var ds=class extends Q{_parse(t){let{ctx:r}=this._processInputParams(t),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}},ps=class e extends Q{_parse(t){let{status:r,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"?V:i.status==="dirty"?(r.dirty(),Dn(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{let n=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return n.status==="aborted"?V:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:o.path,parent:o})}}static create(t,r){return new e({in:t,out:r,typeName:T.ZodPipeline})}},Gn=class extends Q{_parse(t){let r=this._def.innerType._parse(t),o=n=>(sn(n)&&(n.value=Object.freeze(n.value)),n);return ci(r)?r.then(n=>o(n)):o(r)}unwrap(){return this._def.innerType}};Gn.create=(e,t)=>new Gn({innerType:e,typeName:T.ZodReadonly,...W(t)});var d2={object:vt.lazycreate},T;(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"})(T||(T={}));var p2=Cn.create,f2=ui.create,m2=yi.create,h2=li.create,g2=di.create,v2=pi.create,y2=fi.create,_2=Un.create,$2=Mn.create,x2=mi.create,b2=Tr.create,w2=Xt.create,k2=hi.create,z2=Er.create,lx=vt.create,S2=vt.strictCreate,I2=Ln.create,P2=Wl.create,T2=Fn.create,E2=pr.create,O2=Kl.create,j2=gi.create,Z2=vi.create,N2=Xl.create,R2=qn.create,D2=Vn.create,A2=Jn.create,C2=Hn.create,U2=cn.create,M2=Mt.create,L2=Ut.create,F2=fr.create,q2=Mt.createWithPreprocess,V2=ps.create;var dx;function $(e,t,r){function o(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);let u=a.prototype,l=Object.keys(u);for(let d=0;d<l.length;d++){let p=l[d];p in s||(s[p]=u[p].bind(s))}}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function a(s){var c;let u=r?.Parent?new i:this;o(u,s),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Yt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Kn=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(dx=globalThis).__zod_globalConfig??(dx.__zod_globalConfig={});var Xn=globalThis.__zod_globalConfig;function yt(e){return e&&Object.assign(Xn,e),Xn}var ne={};Ct(ne,{BIGINT_FORMAT_RANGES:()=>mx,Class:()=>Ql,NUMBER_FORMAT_RANGES:()=>ad,aborted:()=>Zr,allowsEval:()=>rd,assert:()=>BE,assertEqual:()=>qE,assertIs:()=>JE,assertNever:()=>HE,assertNotEqual:()=>VE,assignProp:()=>Or,base64ToUint8Array:()=>bx,base64urlToUint8Array:()=>oO,cached:()=>Qn,captureStackTrace:()=>hs,cleanEnum:()=>nO,cleanRegex:()=>bi,clone:()=>_t,cloneDef:()=>GE,createTransparentProxy:()=>tO,defineLazy:()=>ue,esc:()=>ms,escapeRegex:()=>hr,explicitlyAborted:()=>sd,extend:()=>vx,finalizeIssue:()=>It,floatSafeRemainder:()=>ed,getElementAtPath:()=>KE,getEnumValues:()=>$i,getLengthableOrigin:()=>wi,getParsedType:()=>eO,getSizableOrigin:()=>xx,hexToUint8Array:()=>aO,isObject:()=>un,isPlainObject:()=>jr,issue:()=>eo,joinValues:()=>fs,jsonStringifyReplacer:()=>Yn,merge:()=>rO,mergeDefs:()=>mr,normalizeParams:()=>q,nullish:()=>xi,numKeys:()=>QE,objectClone:()=>WE,omit:()=>gx,optionalKeys:()=>id,parsedType:()=>cd,partial:()=>_x,pick:()=>hx,prefixIssues:()=>gr,primitiveTypes:()=>fx,promiseAllObject:()=>XE,propertyKeyTypes:()=>od,randomString:()=>YE,required:()=>$x,safeExtend:()=>yx,shallowClone:()=>nd,slugify:()=>td,stringifyPrimitive:()=>gs,uint8ArrayToBase64:()=>wx,uint8ArrayToBase64url:()=>iO,uint8ArrayToHex:()=>sO,unwrapMessage:()=>_i});function qE(e){return e}function VE(e){return e}function JE(e){}function HE(e){throw new Error("Unexpected value in exhaustive check")}function BE(e){}function $i(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function fs(e,t="|"){return e.map(r=>gs(r)).join(t)}function Yn(e,t){return typeof t=="bigint"?t.toString():t}function Qn(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function xi(e){return e==null}function bi(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function ed(e,t){let r=e/t,o=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-o)<n?0:r-o}var px=Symbol("evaluating");function ue(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==px)return o===void 0&&(o=px,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function WE(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Or(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function mr(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function GE(e){return mr(e._zod.def)}function KE(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function XE(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function YE(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function ms(e){return JSON.stringify(e)}function td(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var hs="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function un(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var rd=Qn(()=>{if(Xn.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function jr(e){if(un(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(un(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function nd(e){return jr(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function QE(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var eO=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}`)}},od=new Set(["string","number","symbol"]),fx=new Set(["string","number","bigint","boolean","symbol","undefined"]);function hr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _t(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function q(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 tO(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function gs(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function id(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var ad={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]},mx={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function hx(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=mr(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=r.shape[s])}return Or(this,"shape",a),a},checks:[]});return _t(e,i)}function gx(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=mr(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return Or(this,"shape",a),a},checks:[]});return _t(e,i)}function vx(e,t){if(!jr(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=mr(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Or(this,"shape",i),i}});return _t(e,n)}function yx(e,t){if(!jr(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=mr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Or(this,"shape",o),o}});return _t(e,r)}function rO(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=mr(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Or(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return _t(e,r)}function _x(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=mr(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(r)for(let u in r){if(!(u in s))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=e?new e({type:"optional",innerType:s[u]}):s[u])}else for(let u in s)c[u]=e?new e({type:"optional",innerType:s[u]}):s[u];return Or(this,"shape",c),c},checks:[]});return _t(t,a)}function $x(e,t,r){let o=mr(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(let a in n)i[a]=new e({type:"nonoptional",innerType:n[a]});return Or(this,"shape",i),i}});return _t(t,o)}function Zr(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function sd(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function gr(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function _i(e){return typeof e=="string"?e:e?.message}function It(e,t,r){let o=e.message?e.message:_i(e.inst?._zod.def?.error?.(e))??_i(t?.error?.(e))??_i(r.customError?.(e))??_i(r.localeError?.(e))??"Invalid input",{inst:n,continue:i,input:a,...s}=e;return s.path??(s.path=[]),s.message=o,t?.reportInput&&(s.input=a),s}function xx(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function wi(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function cd(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function eo(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function nO(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function bx(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function wx(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function oO(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return bx(t+r)}function iO(e){return wx(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function aO(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function sO(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Ql=class{constructor(...t){}};var kx=(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,Yn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},vs=$("$ZodError",kx),ki=$("$ZodError",kx,{Parent:Error});function zx(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function Sx(e,t=r=>r.message){let r={_errors:[]},o=(n,i=[])=>{for(let a of n.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>o({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...i,...a.path]);else{let s=[...i,...a.path];if(s.length===0)r._errors.push(t(a));else{let c=r,u=0;for(;u<s.length;){let l=s[u];u===s.length-1?(c[l]=c[l]||{_errors:[]},c[l]._errors.push(t(a))):c[l]=c[l]||{_errors:[]},c=c[l],u++}}}};return o(e),r}var zi=e=>(t,r,o,n)=>{let i=o?{...o,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new Yt;if(a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>It(c,i,yt())));throw hs(s,n?.callee),s}return a.value},ys=zi(ki),Si=e=>async(t,r,o,n)=>{let i=o?{...o,async:!0}:{async:!0},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>It(c,i,yt())));throw hs(s,n?.callee),s}return a.value},_s=Si(ki),Ii=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new Yt;return i.issues.length?{success:!1,error:new(e??vs)(i.issues.map(a=>It(a,n,yt())))}:{success:!0,data:i.value}},ln=Ii(ki),Pi=e=>async(t,r,o)=>{let n=o?{...o,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>It(a,n,yt())))}:{success:!0,data:i.value}},dn=Pi(ki),Ix=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return zi(e)(t,r,n)};var Px=e=>(t,r,o)=>zi(e)(t,r,o);var Tx=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return Si(e)(t,r,n)};var Ex=e=>async(t,r,o)=>Si(e)(t,r,o);var Ox=e=>(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return Ii(e)(t,r,n)};var jx=e=>(t,r,o)=>Ii(e)(t,r,o);var Zx=e=>async(t,r,o)=>{let n=o?{...o,direction:"backward"}:{direction:"backward"};return Pi(e)(t,r,n)};var Nx=e=>async(t,r,o)=>Pi(e)(t,r,o);var Rx=/^[cC][0-9a-z]{6,}$/,Dx=/^[0-9a-z]+$/,Ax=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Cx=/^[0-9a-vA-V]{20}$/,Ux=/^[A-Za-z0-9]{27}$/,Mx=/^[a-zA-Z0-9_-]{21}$/,Lx=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Fx=/^([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})$/,ud=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)$/;var qx=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var uO="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Vx(){return new RegExp(uO,"u")}var Jx=/^(?:(?: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])$/,Hx=/^(([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}|:))$/;var Bx=/^((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])$/,Wx=/^(([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])$/,Gx=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ld=/^[A-Za-z0-9_-]*$/;var Kx=/^https?$/,Xx=/^\+[1-9]\d{6,14}$/,Yx="(?:(?:\\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])))",Qx=new RegExp(`^${Yx}$`);function eb(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 tb(e){return new RegExp(`^${eb(e)}$`)}function rb(e){let t=eb({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${Yx}T(?:${o})$`)}var nb=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)};var ob=/^-?\d+$/,dd=/^-?\d+(?:\.\d+)?$/,ib=/^(?:true|false)$/i,ab=/^null$/i;var sb=/^[^A-Z]*$/,cb=/^[^a-z]*$/;var Ae=$("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),ub={number:"number",bigint:"bigint",object:"date"},pd=$("$ZodCheckLessThan",(e,t)=>{Ae.init(e,t);let r=ub[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),fd=$("$ZodCheckGreaterThan",(e,t)=>{Ae.init(e,t);let r=ub[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),lb=$("$ZodCheckMultipleOf",(e,t)=>{Ae.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):ed(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),db=$("$ZodCheckNumberFormat",(e,t)=>{Ae.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=ad[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=n,s.maximum=i,r&&(s.pattern=ob)}),e._zod.check=a=>{let s=a.value;if(r){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,inclusive:!0,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,inclusive:!0,continue:!t.abort});return}}s<n&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}});var pb=$("$ZodCheckMaxLength",(e,t)=>{var r;Ae.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!xi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let a=wi(n);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),fb=$("$ZodCheckMinLength",(e,t)=>{var r;Ae.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!xi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let a=wi(n);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),mb=$("$ZodCheckLengthEquals",(e,t)=>{var r;Ae.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!xi(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let a=wi(n),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})}}),Ei=$("$ZodCheckStringFormat",(e,t)=>{var r,o;Ae.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),hb=$("$ZodCheckRegex",(e,t)=>{Ei.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),gb=$("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=sb),Ei.init(e,t)}),vb=$("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=cb),Ei.init(e,t)}),yb=$("$ZodCheckIncludes",(e,t)=>{Ae.init(e,t);let r=hr(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),_b=$("$ZodCheckStartsWith",(e,t)=>{Ae.init(e,t);let r=new RegExp(`^${hr(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),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})}}),$b=$("$ZodCheckEndsWith",(e,t)=>{Ae.init(e,t);let r=new RegExp(`.*${hr(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),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})}});var xb=$("$ZodCheckOverwrite",(e,t)=>{Ae.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var $s=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(`
11
+ `).filter(a=>a),n=Math.min(...o.map(a=>a.length-a.trimStart().length)),i=o.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
12
+ `))}};var wb={major:4,minor:4,patch:1};var ye=$("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wb;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(a,s,c)=>{let u=Zr(a),l;for(let d of s){if(d._zod.def.when){if(sd(a)||!d._zod.def.when(a))continue}else if(u)continue;let p=a.issues.length,f=d._zod.check(a);if(f instanceof Promise&&c?.async===!1)throw new Yt;if(l||f instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await f,a.issues.length!==p&&(u||(u=Zr(a,p)))});else{if(a.issues.length===p)continue;u||(u=Zr(a,p))}}return l?l.then(()=>a):a},i=(a,s,c)=>{if(Zr(a))return a.aborted=!0,a;let u=n(s,o,c);if(u instanceof Promise){if(c.async===!1)throw new Yt;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let u=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(l=>i(l,a,s)):i(u,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Yt;return c.then(u=>n(u,o,s))}return n(c,o,s)}}ue(e,"~standard",()=>({validate:n=>{try{let i=ln(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return dn(e,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Oi=$("$ZodString",(e,t)=>{ye.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??nb(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),be=$("$ZodStringFormat",(e,t)=>{Ei.init(e,t),Oi.init(e,t)}),hd=$("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Fx),be.init(e,t)}),gd=$("$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=ud(o))}else t.pattern??(t.pattern=ud());be.init(e,t)}),vd=$("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=qx),be.init(e,t)}),yd=$("$ZodURL",(e,t)=>{be.init(e,t),e._zod.check=r=>{try{let o=r.value.trim();if(!t.normalize&&t.protocol?.source===Kx.source&&!/^https?:\/\//i.test(o)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}let n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),_d=$("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Vx()),be.init(e,t)}),$d=$("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Mx),be.init(e,t)}),xd=$("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Rx),be.init(e,t)}),bd=$("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Dx),be.init(e,t)}),wd=$("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ax),be.init(e,t)}),kd=$("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Cx),be.init(e,t)}),zd=$("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Ux),be.init(e,t)}),jb=$("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=rb(t)),be.init(e,t)}),Zb=$("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Qx),be.init(e,t)}),Nb=$("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=tb(t)),be.init(e,t)}),Rb=$("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Lx),be.init(e,t)}),Sd=$("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Jx),be.init(e,t),e._zod.bag.format="ipv4"}),Id=$("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Hx),be.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}});var Pd=$("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Bx),be.init(e,t)}),Td=$("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Wx),be.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,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://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Db(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Ed=$("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Gx),be.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Db(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function lO(e){if(!ld.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Db(r)}var Od=$("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=ld),be.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{lO(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),jd=$("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Xx),be.init(e,t)});function dO(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var Zd=$("$ZodJWT",(e,t)=>{be.init(e,t),e._zod.check=r=>{dO(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}});var ws=$("$ZodNumber",(e,t)=>{ye.init(e,t),e._zod.pattern=e._zod.bag.pattern??dd,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r}}),Nd=$("$ZodNumberFormat",(e,t)=>{db.init(e,t),ws.init(e,t)}),Rd=$("$ZodBoolean",(e,t)=>{ye.init(e,t),e._zod.pattern=ib,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}});var Dd=$("$ZodNull",(e,t)=>{ye.init(e,t),e._zod.pattern=ab,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}});var Ad=$("$ZodUnknown",(e,t)=>{ye.init(e,t),e._zod.parse=r=>r}),Cd=$("$ZodNever",(e,t)=>{ye.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function kb(e,t,r){e.issues.length&&t.issues.push(...gr(r,e.issues)),t.value[r]=e.value}var Ud=$("$ZodArray",(e,t)=>{ye.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let a=0;a<n.length;a++){let s=n[a],c=t.element._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(u=>kb(u,r,a))):kb(c,r,a)}return i.length?Promise.all(i).then(()=>r):r}});function bs(e,t,r,o,n,i){let a=r in o;if(e.issues.length){if(n&&i&&!a)return;t.issues.push(...gr(r,e.issues))}if(!a&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}function Ab(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 r=id(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function Cb(e,t,r,o,n,i){let a=[],s=n.keySet,c=n.catchall._zod,u=c.def.type,l=c.optin==="optional",d=c.optout==="optional";for(let p in t){if(p==="__proto__"||s.has(p))continue;if(u==="never"){a.push(p);continue}let f=c.run({value:t[p],issues:[]},o);f instanceof Promise?e.push(f.then(m=>bs(m,r,p,t,l,d))):bs(f,r,p,t,l,d)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var Md=$("$ZodObject",(e,t)=>{if(ye.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let o=Qn(()=>Ab(t));ue(e._zod,"propValues",()=>{let s=t.shape,c={};for(let u in s){let l=s[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let d of l.values)c[u].add(d)}}return c});let n=un,i=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=o.value);let u=s.value;if(!n(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),s;s.value={};let l=[],d=a.shape;for(let p of a.keys){let f=d[p],m=f._zod.optin==="optional",h=f._zod.optout==="optional",y=f._zod.run({value:u[p],issues:[]},c);y instanceof Promise?l.push(y.then(x=>bs(x,s,p,u,m,h))):bs(y,s,p,u,m,h)}return i?Cb(l,u,s,c,o.value,e):l.length?Promise.all(l).then(()=>s):s}}),Ub=$("$ZodObjectJIT",(e,t)=>{Md.init(e,t);let r=e._zod.parse,o=Qn(()=>Ab(t)),n=p=>{let f=new $s(["shape","payload","ctx"]),m=o.value,h=w=>{let b=ms(w);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};f.write("const input = payload.value;");let y=Object.create(null),x=0;for(let w of m.keys)y[w]=`key_${x++}`;f.write("const newResult = {};");for(let w of m.keys){let b=y[w],k=ms(w),fe=p[w],me=fe?._zod?.optin==="optional",kt=fe?._zod?.optout==="optional";f.write(`const ${b} = ${h(w)};`),me&&kt?f.write(`
13
+ if (${b}.issues.length) {
14
+ if (${k} in input) {
15
+ payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
16
+ ...iss,
17
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
18
+ })));
19
+ }
20
+ }
21
+
22
+ if (${b}.value === undefined) {
23
+ if (${k} in input) {
24
+ newResult[${k}] = undefined;
25
+ }
26
+ } else {
27
+ newResult[${k}] = ${b}.value;
28
+ }
29
+
30
+ `):me?f.write(`
31
+ if (${b}.issues.length) {
32
+ payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
33
+ ...iss,
34
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
35
+ })));
36
+ }
37
+
38
+ if (${b}.value === undefined) {
39
+ if (${k} in input) {
40
+ newResult[${k}] = undefined;
41
+ }
42
+ } else {
43
+ newResult[${k}] = ${b}.value;
44
+ }
45
+
46
+ `):f.write(`
47
+ const ${b}_present = ${k} in input;
48
+ if (${b}.issues.length) {
49
+ payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
50
+ ...iss,
51
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
52
+ })));
53
+ }
54
+ if (!${b}_present && !${b}.issues.length) {
55
+ payload.issues.push({
56
+ code: "invalid_type",
57
+ expected: "nonoptional",
58
+ input: undefined,
59
+ path: [${k}]
60
+ });
61
+ }
62
+
63
+ if (${b}_present) {
64
+ if (${b}.value === undefined) {
65
+ newResult[${k}] = undefined;
66
+ } else {
67
+ newResult[${k}] = ${b}.value;
68
+ }
69
+ }
70
+
71
+ `)}f.write("payload.value = newResult;"),f.write("return payload;");let E=f.compile();return(w,b)=>E(p,w,b)},i,a=un,s=!Xn.jitless,u=s&&rd.value,l=t.catchall,d;e._zod.parse=(p,f)=>{d??(d=o.value);let m=p.value;return a(m)?s&&u&&f?.async===!1&&f.jitless!==!0?(i||(i=n(t.shape)),p=i(p,f),l?Cb([],m,p,f,d,e):p):r(p,f):(p.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),p)}});function zb(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!Zr(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>It(a,o,yt())))}),t)}var ks=$("$ZodUnion",(e,t)=>{ye.init(e,t),ue(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ue(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ue(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ue(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${o.map(n=>bi(n.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1,a=[];for(let s of t.options){let c=s._zod.run({value:o.value,issues:[]},n);if(c instanceof Promise)a.push(c),i=!0;else{if(c.issues.length===0)return c;a.push(c)}}return i?Promise.all(a).then(s=>zb(s,o,e,n)):zb(a,o,e,n)}});var Ld=$("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ks.init(e,t);let r=e._zod.parse;ue(e._zod,"propValues",()=>{let n={};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)){n[s]||(n[s]=new Set);for(let u of c)n[s].add(u)}}return n});let o=Qn(()=>{let n=t.options,i=new Map;for(let a of n){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=(n,i)=>{let a=n.value;if(!un(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;let s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(n,i):t.unionFallback||i.direction==="backward"?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:a,path:[t.discriminator],inst:e}),n)}}),Fd=$("$ZodIntersection",(e,t)=>{ye.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),a=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,u])=>Sb(r,c,u)):Sb(r,i,a)}});function md(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(jr(e)&&jr(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let a=md(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n[i]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],a=md(n,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Sb(e,t,r){let o=new Map,n;for(let s of t.issues)if(s.code==="unrecognized_keys"){n??(n=s);for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).l=!0}else e.issues.push(s);for(let s of r.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).r=!0;else e.issues.push(s);let i=[...o].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&n&&e.issues.push({...n,keys:i}),Zr(e))return e;let a=md(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var qd=$("$ZodRecord",(e,t)=>{ye.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!jr(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[],a=t.keyType._zod.values;if(a){r.value={};let s=new Set;for(let u of a)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){s.add(typeof u=="number"?u.toString():u);let l=t.keyType._zod.run({value:u,issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(f=>It(f,o,yt())),input:u,path:[u],inst:e});continue}let d=l.value,p=t.valueType._zod.run({value:n[u],issues:[]},o);p instanceof Promise?i.push(p.then(f=>{f.issues.length&&r.issues.push(...gr(u,f.issues)),r.value[d]=f.value})):(p.issues.length&&r.issues.push(...gr(u,p.issues)),r.value[d]=p.value)}let c;for(let u in n)s.has(u)||(c=c??[],c.push(u));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:c})}else{r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,s))continue;let c=t.keyType._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&dd.test(s)&&c.issues.length){let d=t.keyType._zod.run({value:Number(s),issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){t.mode==="loose"?r.value[s]=n[s]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>It(d,o,yt())),input:s,path:[s],inst:e});continue}let l=t.valueType._zod.run({value:n[s],issues:[]},o);l instanceof Promise?i.push(l.then(d=>{d.issues.length&&r.issues.push(...gr(s,d.issues)),r.value[c.value]=d.value})):(l.issues.length&&r.issues.push(...gr(s,l.issues)),r.value[c.value]=l.value)}}return i.length?Promise.all(i).then(()=>r):r}});var Vd=$("$ZodEnum",(e,t)=>{ye.init(e,t);let r=$i(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>od.has(typeof n)).map(n=>typeof n=="string"?hr(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let a=n.value;return o.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),Jd=$("$ZodLiteral",(e,t)=>{if(ye.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?hr(o):o?hr(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{let i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}});var Hd=$("$ZodTransform",(e,t)=>{ye.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Kn(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new Yt;return r.value=n,r}});function Ib(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var zs=$("$ZodOptional",(e,t)=>{ye.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ue(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ue(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${bi(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Ib(i,r.value)):Ib(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),Bd=$("$ZodExactOptional",(e,t)=>{zs.init(e,t),ue(e._zod,"values",()=>t.innerType._zod.values),ue(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),Wd=$("$ZodNullable",(e,t)=>{ye.init(e,t),ue(e._zod,"optin",()=>t.innerType._zod.optin),ue(e._zod,"optout",()=>t.innerType._zod.optout),ue(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${bi(r.source)}|null)$`):void 0}),ue(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),Gd=$("$ZodDefault",(e,t)=>{ye.init(e,t),e._zod.optin="optional",ue(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Pb(i,t)):Pb(n,t)}});function Pb(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Kd=$("$ZodPrefault",(e,t)=>{ye.init(e,t),e._zod.optin="optional",ue(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),Xd=$("$ZodNonOptional",(e,t)=>{ye.init(e,t),ue(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Tb(i,e)):Tb(n,e)}});function Tb(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 Yd=$("$ZodCatch",(e,t)=>{ye.init(e,t),ue(e._zod,"optin",()=>t.innerType._zod.optin),ue(e._zod,"optout",()=>t.innerType._zod.optout),ue(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(a=>It(a,o,yt()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>It(i,o,yt()))},input:r.value}),r.issues=[]),r)}});var Qd=$("$ZodPipe",(e,t)=>{ye.init(e,t),ue(e._zod,"values",()=>t.in._zod.values),ue(e._zod,"optin",()=>t.in._zod.optin),ue(e._zod,"optout",()=>t.out._zod.optout),ue(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>xs(a,t.in,o)):xs(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>xs(i,t.out,o)):xs(n,t.out,o)}});function xs(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var ep=$("$ZodReadonly",(e,t)=>{ye.init(e,t),ue(e._zod,"propValues",()=>t.innerType._zod.propValues),ue(e._zod,"values",()=>t.innerType._zod.values),ue(e._zod,"optin",()=>t.innerType?._zod?.optin),ue(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(Eb):Eb(n)}});function Eb(e){return e.value=Object.freeze(e.value),e}var tp=$("$ZodCustom",(e,t)=>{Ae.init(e,t),ye.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>Ob(i,r,o,e));Ob(n,r,o,e)}});function Ob(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(eo(n))}}var pO=()=>{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"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}let r={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",mac:"MAC 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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=cd(n.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${gs(n.values[0])}`:`Invalid option: expected one of ${fs(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${a.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${fs(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`Invalid discriminator value. Expected ${n.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function Mb(){return{localeError:pO()}}var Lb;var rp=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let o=r[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function fO(){return new rp}(Lb=globalThis).__zod_globalRegistry??(Lb.__zod_globalRegistry=fO());var pn=globalThis.__zod_globalRegistry;function np(e,t){return new e({type:"string",...q(t)})}function op(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...q(t)})}function Ss(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...q(t)})}function ip(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...q(t)})}function ap(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...q(t)})}function sp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...q(t)})}function cp(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...q(t)})}function up(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...q(t)})}function lp(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...q(t)})}function dp(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...q(t)})}function pp(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...q(t)})}function fp(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...q(t)})}function mp(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...q(t)})}function hp(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...q(t)})}function gp(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...q(t)})}function vp(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...q(t)})}function yp(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...q(t)})}function _p(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...q(t)})}function $p(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...q(t)})}function xp(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...q(t)})}function bp(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...q(t)})}function wp(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...q(t)})}function kp(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...q(t)})}function Fb(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...q(t)})}function qb(e,t){return new e({type:"string",format:"date",check:"string_format",...q(t)})}function Vb(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...q(t)})}function Jb(e,t){return new e({type:"string",format:"duration",check:"string_format",...q(t)})}function zp(e,t){return new e({type:"number",checks:[],...q(t)})}function Sp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...q(t)})}function Ip(e,t){return new e({type:"boolean",...q(t)})}function Pp(e,t){return new e({type:"null",...q(t)})}function Tp(e){return new e({type:"unknown"})}function Ep(e,t){return new e({type:"never",...q(t)})}function Is(e,t){return new pd({check:"less_than",...q(t),value:e,inclusive:!1})}function ji(e,t){return new pd({check:"less_than",...q(t),value:e,inclusive:!0})}function Ps(e,t){return new fd({check:"greater_than",...q(t),value:e,inclusive:!1})}function Zi(e,t){return new fd({check:"greater_than",...q(t),value:e,inclusive:!0})}function Ts(e,t){return new lb({check:"multiple_of",...q(t),value:e})}function Es(e,t){return new pb({check:"max_length",...q(t),maximum:e})}function to(e,t){return new fb({check:"min_length",...q(t),minimum:e})}function Os(e,t){return new mb({check:"length_equals",...q(t),length:e})}function Op(e,t){return new hb({check:"string_format",format:"regex",...q(t),pattern:e})}function jp(e){return new gb({check:"string_format",format:"lowercase",...q(e)})}function Zp(e){return new vb({check:"string_format",format:"uppercase",...q(e)})}function Np(e,t){return new yb({check:"string_format",format:"includes",...q(t),includes:e})}function Rp(e,t){return new _b({check:"string_format",format:"starts_with",...q(t),prefix:e})}function Dp(e,t){return new $b({check:"string_format",format:"ends_with",...q(t),suffix:e})}function Nr(e){return new xb({check:"overwrite",tx:e})}function Ap(e){return Nr(t=>t.normalize(e))}function Cp(){return Nr(e=>e.trim())}function Up(){return Nr(e=>e.toLowerCase())}function Mp(){return Nr(e=>e.toUpperCase())}function Lp(){return Nr(e=>td(e))}function Hb(e,t,r){return new e({type:"array",element:t,...q(r)})}function Fp(e,t,r){let o=q(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function qp(e,t,r){return new e({type:"custom",check:"custom",fn:t,...q(r)})}function Vp(e,t){let r=mO(o=>(o.addIssue=n=>{if(typeof n=="string")o.issues.push(eo(n,o.value,r._zod.def));else{let i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),o.issues.push(eo(i))}},e(o.value,o)),t);return r}function mO(e,t){let r=new Ae({check:"custom",...q(t)});return r._zod.check=e,r}function Ri(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??pn,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function _e(e,t,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,l);else{let p=a.schema,f=t.processors[n.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);f(e,t,p,l)}let d=e._zod.parent;d&&(a.ref||(a.ref=d),_e(d,t,l),t.seen.get(d).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&Ye(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Di(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=o.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(s,a[0])}}let n=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(a[0])?.id,p=e.external.uri??(m=>m);if(d)return{ref:p(d)};let f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${p("__shared")}#/${s}/${f}`}}if(a[1]===r)return{ref:"#"};let u=`#/${s}/`,l=a[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},i=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:u}=n(a);s.def={...s.schema},u&&(s.defId=u);let l=s.schema;for(let d in l)delete l[d];l.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
72
+
73
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let u=e.external.registry.get(a[0])?.id;if(t!==a[0]&&u){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function Ai(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=s=>{let c=e.seen.get(s);if(c.ref===null)return;let u=c.def??c.schema,l={...u},d=c.ref;if(c.ref=null,d){o(d);let f=e.seen.get(d),m=f.schema;if(m.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(m)):Object.assign(u,m),Object.assign(u,l),s._zod.parent===d)for(let y in u)y==="$ref"||y==="allOf"||y in l||delete u[y];if(m.$ref&&f.def)for(let y in u)y==="$ref"||y==="allOf"||y in f.def&&JSON.stringify(u[y])===JSON.stringify(f.def[y])&&delete u[y]}let p=s._zod.parent;if(p&&p!==d){o(p);let f=e.seen.get(p);if(f?.schema.$ref&&(u.$ref=f.schema.$ref,f.def))for(let m in u)m==="$ref"||m==="allOf"||m in f.def&&JSON.stringify(u[m])===JSON.stringify(f.def[m])&&delete u[m]}e.override({zodSchema:s,jsonSchema:u,path:c.path??[]})};for(let s of[...e.seen.entries()].reverse())o(s[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(s)}Object.assign(n,r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&n.id===i&&delete n.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,a[c.defId]=c.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?n.$defs=a:n.definitions=a);try{let s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ni(t,"input",e.processors),output:Ni(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function Ye(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Ye(o.element,r);if(o.type==="set")return Ye(o.valueType,r);if(o.type==="lazy")return Ye(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Ye(o.innerType,r);if(o.type==="intersection")return Ye(o.left,r)||Ye(o.right,r);if(o.type==="record"||o.type==="map")return Ye(o.keyType,r)||Ye(o.valueType,r);if(o.type==="pipe")return Ye(o.in,r)||Ye(o.out,r);if(o.type==="object"){for(let n in o.shape)if(Ye(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(Ye(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(Ye(n,r))return!0;return!!(o.rest&&Ye(o.rest,r))}return!1}var Bb=(e,t={})=>r=>{let o=Ri({...r,processors:t});return _e(e,o),Di(o,e),Ai(o,e)},Ni=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},a=Ri({...n??{},target:i,io:t,processors:r});return _e(e,a),Di(a,e),Ai(a,e)};var hO={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Jp=(e,t,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof a=="number"&&(n.maxLength=a),s&&(n.format=hO[s]??s,n.format===""&&delete n.format,s==="time"&&delete n.format),u&&(n.contentEncoding=u),c&&c.size>0){let l=[...c];l.length===1?n.pattern=l[0].source:l.length>1&&(n.allOf=[...l.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Hp=(e,t,r,o)=>{let n=r,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;typeof s=="string"&&s.includes("int")?n.type="integer":n.type="number";let d=typeof l=="number"&&l>=(i??Number.NEGATIVE_INFINITY),p=typeof u=="number"&&u<=(a??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";d?f?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l:typeof i=="number"&&(n.minimum=i),p?f?(n.maximum=u,n.exclusiveMaximum=!0):n.exclusiveMaximum=u:typeof a=="number"&&(n.maximum=a),typeof c=="number"&&(n.multipleOf=c)},Bp=(e,t,r,o)=>{r.type="boolean"},Gb=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Kb=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Wp=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},Xb=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Yb=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Gp=(e,t,r,o)=>{r.not={}},Qb=(e,t,r,o)=>{},Kp=(e,t,r,o)=>{},ew=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Xp=(e,t,r,o)=>{let n=e._zod.def,i=$i(n.entries);i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},Yp=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let a of n.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},tw=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},rw=(e,t,r,o)=>{let n=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},nw=(e,t,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(i.minLength=a),s!==void 0&&(i.maxLength=s),c?c.length===1?(i.contentMediaType=c[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(n,i)},ow=(e,t,r,o)=>{r.type="boolean"},Qp=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},iw=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},ef=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},aw=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},sw=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},tf=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=_e(i.element,t,{...o,path:[...o.path,"items"]})},rf=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object",n.properties={};let a=i.shape;for(let u in a)n.properties[u]=_e(a[u],t,{...o,path:[...o.path,"properties",u]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(u=>{let l=i.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(n.required=Array.from(c)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=_e(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},nf=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,a=n.options.map((s,c)=>_e(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=a:r.anyOf=a},of=(e,t,r,o)=>{let n=e._zod.def,i=_e(n.left,t,{...o,path:[...o.path,"allOf",0]}),a=_e(n.right,t,{...o,path:[...o.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=c},cw=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((p,f)=>_e(p,t,{...o,path:[...o.path,a,f]})),u=i.rest?_e(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=c,u&&(n.items=u)):t.target==="openapi-3.0"?(n.items={anyOf:c},u&&n.items.anyOf.push(u),n.minItems=c.length,u||(n.maxItems=c.length)):(n.items=c,u&&(n.additionalItems=u));let{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(n.minItems=l),typeof d=="number"&&(n.maxItems=d)},af=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let a=i.keyType,c=a._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let l=_e(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let d of c)n.patternProperties[d.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=_e(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=_e(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let u=a._zod.values;if(u){let l=[...u].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(n.required=l)}},sf=(e,t,r,o)=>{let n=e._zod.def,i=_e(n.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},cf=(e,t,r,o)=>{let n=e._zod.def;_e(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},uf=(e,t,r,o)=>{let n=e._zod.def;_e(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},lf=(e,t,r,o)=>{let n=e._zod.def;_e(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},df=(e,t,r,o)=>{let n=e._zod.def;_e(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},pf=(e,t,r,o)=>{let n=e._zod.def,i=t.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;_e(i,t,o);let a=t.seen.get(e);a.ref=i},ff=(e,t,r,o)=>{let n=e._zod.def;_e(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},uw=(e,t,r,o)=>{let n=e._zod.def;_e(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},js=(e,t,r,o)=>{let n=e._zod.def;_e(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},lw=(e,t,r,o)=>{let n=e._zod.innerType;_e(n,t,o);let i=t.seen.get(e);i.ref=n},Wb={string:Jp,number:Hp,boolean:Bp,bigint:Gb,symbol:Kb,null:Wp,undefined:Xb,void:Yb,never:Gp,any:Qb,unknown:Kp,date:ew,enum:Xp,literal:Yp,nan:tw,template_literal:rw,file:nw,success:ow,custom:Qp,function:iw,transform:ef,map:aw,set:sw,array:tf,object:rf,union:nf,intersection:of,tuple:cw,record:af,nullable:sf,nonoptional:cf,default:uf,prefault:lf,catch:df,pipe:pf,readonly:ff,promise:uw,optional:js,lazy:lw};function mf(e,t){if("_idmap"in e){let o=e,n=Ri({...t,processors:Wb}),i={};for(let c of o._idmap.entries()){let[u,l]=c;_e(l,n)}let a={},s={registry:o,uri:t?.uri,defs:i};n.external=s;for(let c of o._idmap.entries()){let[u,l]=c;Di(n,l),a[u]=Ai(n,l)}if(Object.keys(i).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:i}}return{schemas:a}}let r=Ri({...t,processors:Wb});return _e(e,r),Di(r,e),Ai(r,e)}var oj=$("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");ye.init(e,t),e.def=t,e.type=t.type,e.parse=(r,o)=>ys(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>ln(e,r,o),e.parseAsync=async(r,o)=>_s(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>dn(e,r,o),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]},{parent:!0}),e.with=e.check,e.clone=(r,o)=>_t(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.apply=r=>r(e)});var ij=$("ZodMiniObject",(e,t)=>{Md.init(e,t),oj.init(e,t),ue(e,"shape",()=>t.shape)});function hf(e,t){let r={type:"object",shape:e??{},...q(t)};return new ij(r)}function Pt(e){return!!e._zod}function mn(e){let t=Object.values(e);if(t.length===0)return hf({});let r=t.every(Pt),o=t.every(n=>!Pt(n));if(r)return hf(e);if(o)return lx(e);throw new Error("Mixed Zod versions detected in object shape.")}function Rr(e,t){return Pt(e)?ln(e,t):e.safeParse(t)}async function Zs(e,t){return Pt(e)?await dn(e,t):await e.safeParseAsync(t)}function Dr(e){if(!e)return;let t;if(Pt(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function ro(e){if(e){if(typeof e=="object"){let t=e,r=e;if(!t._def&&!r._zod){let o=Object.values(e);if(o.length>0&&o.every(n=>typeof n=="object"&&n!==null&&(n._def!==void 0||n._zod!==void 0||typeof n.parse=="function")))return mn(e)}}if(Pt(e)){let r=e._zod?.def;if(r&&(r.type==="object"||r.shape!==void 0))return e}else if(e.shape!==void 0)return e}}function Ns(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 pw(e){return e.description}function fw(e){if(Pt(e))return e._zod?.def?.type==="optional";let t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function Rs(e){if(Pt(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 r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let o=e.value;if(o!==void 0)return o}var Ci={};Ct(Ci,{ZodISODate:()=>hw,ZodISODateTime:()=>mw,ZodISODuration:()=>vw,ZodISOTime:()=>gw,date:()=>vf,datetime:()=>gf,duration:()=>_f,time:()=>yf});var mw=$("ZodISODateTime",(e,t)=>{jb.init(e,t),Ie.init(e,t)});function gf(e){return Fb(mw,e)}var hw=$("ZodISODate",(e,t)=>{Zb.init(e,t),Ie.init(e,t)});function vf(e){return qb(hw,e)}var gw=$("ZodISOTime",(e,t)=>{Nb.init(e,t),Ie.init(e,t)});function yf(e){return Vb(gw,e)}var vw=$("ZodISODuration",(e,t)=>{Rb.init(e,t),Ie.init(e,t)});function _f(e){return Jb(vw,e)}var fj=(e,t)=>{vs.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Sx(e,r)},flatten:{value:r=>zx(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Yn,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Yn,2)}},isEmpty:{get(){return e.issues.length===0}}})};var $t=$("ZodError",fj,{Parent:Error});var yw=zi($t),_w=Si($t),$w=Ii($t),xw=Pi($t),bw=Ix($t),ww=Px($t),kw=Tx($t),zw=Ex($t),Sw=Ox($t),Iw=jx($t),Pw=Zx($t),Tw=Nx($t);var Ew=new WeakMap;function Ui(e,t,r){let o=Object.getPrototypeOf(e),n=Ew.get(o);if(n||(n=new Set,Ew.set(o,n)),!n.has(t)){n.add(t);for(let i in r){let a=r[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}var Ee=$("ZodType",(e,t)=>(ye.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ni(e,"input"),output:Ni(e,"output")}}),e.toJSONSchema=Bb(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,o)=>yw(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>$w(e,r,o),e.parseAsync=async(r,o)=>_w(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>xw(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>bw(e,r,o),e.decode=(r,o)=>ww(e,r,o),e.encodeAsync=async(r,o)=>kw(e,r,o),e.decodeAsync=async(r,o)=>zw(e,r,o),e.safeEncode=(r,o)=>Sw(e,r,o),e.safeDecode=(r,o)=>Iw(e,r,o),e.safeEncodeAsync=async(r,o)=>Pw(e,r,o),e.safeDecodeAsync=async(r,o)=>Tw(e,r,o),Ui(e,"ZodType",{check(...r){let o=this.def;return this.clone(ne.mergeDefs(o,{checks:[...o.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,o){return _t(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(nZ(r,o))},superRefine(r,o){return this.check(oZ(r,o))},overwrite(r){return this.check(Nr(r))},optional(){return Te(this)},exactOptional(){return Jj(this)},nullable(){return Nw(this)},nullish(){return Te(Nw(this))},nonoptional(r){return Xj(this,r)},array(){return oe(this)},or(r){return ke([this,r])},and(r){return As(this,r)},transform(r){return xf(this,Mw(r))},default(r){return Wj(this,r)},prefault(r){return Kj(this,r)},catch(r){return Qj(this,r)},pipe(r){return xf(this,r)},readonly(){return rZ(this)},describe(r){let o=this.clone();return pn.add(o,{description:r}),o},meta(...r){if(r.length===0)return pn.get(this);let o=this.clone();return pn.add(o,r[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return pn.get(e)?.description},configurable:!0}),e)),Rw=$("_ZodString",(e,t)=>{Oi.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Jp(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Ui(e,"_ZodString",{regex(...o){return this.check(Op(...o))},includes(...o){return this.check(Np(...o))},startsWith(...o){return this.check(Rp(...o))},endsWith(...o){return this.check(Dp(...o))},min(...o){return this.check(to(...o))},max(...o){return this.check(Es(...o))},length(...o){return this.check(Os(...o))},nonempty(...o){return this.check(to(1,...o))},lowercase(o){return this.check(jp(o))},uppercase(o){return this.check(Zp(o))},trim(){return this.check(Cp())},normalize(...o){return this.check(Ap(...o))},toLowerCase(){return this.check(Up())},toUpperCase(){return this.check(Mp())},slugify(){return this.check(Lp())}})}),hj=$("ZodString",(e,t)=>{Oi.init(e,t),Rw.init(e,t),e.email=r=>e.check(op(gj,r)),e.url=r=>e.check(up(vj,r)),e.jwt=r=>e.check(kp(jj,r)),e.emoji=r=>e.check(lp(yj,r)),e.guid=r=>e.check(Ss(Ow,r)),e.uuid=r=>e.check(ip(Ds,r)),e.uuidv4=r=>e.check(ap(Ds,r)),e.uuidv6=r=>e.check(sp(Ds,r)),e.uuidv7=r=>e.check(cp(Ds,r)),e.nanoid=r=>e.check(dp(_j,r)),e.guid=r=>e.check(Ss(Ow,r)),e.cuid=r=>e.check(pp($j,r)),e.cuid2=r=>e.check(fp(xj,r)),e.ulid=r=>e.check(mp(bj,r)),e.base64=r=>e.check(xp(Tj,r)),e.base64url=r=>e.check(bp(Ej,r)),e.xid=r=>e.check(hp(wj,r)),e.ksuid=r=>e.check(gp(kj,r)),e.ipv4=r=>e.check(vp(zj,r)),e.ipv6=r=>e.check(yp(Sj,r)),e.cidrv4=r=>e.check(_p(Ij,r)),e.cidrv6=r=>e.check($p(Pj,r)),e.e164=r=>e.check(wp(Oj,r)),e.datetime=r=>e.check(gf(r)),e.date=r=>e.check(vf(r)),e.time=r=>e.check(yf(r)),e.duration=r=>e.check(_f(r))});function _(e){return np(hj,e)}var Ie=$("ZodStringFormat",(e,t)=>{be.init(e,t),Rw.init(e,t)}),gj=$("ZodEmail",(e,t)=>{vd.init(e,t),Ie.init(e,t)});var Ow=$("ZodGUID",(e,t)=>{hd.init(e,t),Ie.init(e,t)});var Ds=$("ZodUUID",(e,t)=>{gd.init(e,t),Ie.init(e,t)});var vj=$("ZodURL",(e,t)=>{yd.init(e,t),Ie.init(e,t)});var yj=$("ZodEmoji",(e,t)=>{_d.init(e,t),Ie.init(e,t)});var _j=$("ZodNanoID",(e,t)=>{$d.init(e,t),Ie.init(e,t)});var $j=$("ZodCUID",(e,t)=>{xd.init(e,t),Ie.init(e,t)});var xj=$("ZodCUID2",(e,t)=>{bd.init(e,t),Ie.init(e,t)});var bj=$("ZodULID",(e,t)=>{wd.init(e,t),Ie.init(e,t)});var wj=$("ZodXID",(e,t)=>{kd.init(e,t),Ie.init(e,t)});var kj=$("ZodKSUID",(e,t)=>{zd.init(e,t),Ie.init(e,t)});var zj=$("ZodIPv4",(e,t)=>{Sd.init(e,t),Ie.init(e,t)});var Sj=$("ZodIPv6",(e,t)=>{Id.init(e,t),Ie.init(e,t)});var Ij=$("ZodCIDRv4",(e,t)=>{Pd.init(e,t),Ie.init(e,t)});var Pj=$("ZodCIDRv6",(e,t)=>{Td.init(e,t),Ie.init(e,t)});var Tj=$("ZodBase64",(e,t)=>{Ed.init(e,t),Ie.init(e,t)});var Ej=$("ZodBase64URL",(e,t)=>{Od.init(e,t),Ie.init(e,t)});var Oj=$("ZodE164",(e,t)=>{jd.init(e,t),Ie.init(e,t)});var jj=$("ZodJWT",(e,t)=>{Zd.init(e,t),Ie.init(e,t)});var Dw=$("ZodNumber",(e,t)=>{ws.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Hp(e,o,n,i),Ui(e,"ZodNumber",{gt(o,n){return this.check(Ps(o,n))},gte(o,n){return this.check(Zi(o,n))},min(o,n){return this.check(Zi(o,n))},lt(o,n){return this.check(Is(o,n))},lte(o,n){return this.check(ji(o,n))},max(o,n){return this.check(ji(o,n))},int(o){return this.check(jw(o))},safe(o){return this.check(jw(o))},positive(o){return this.check(Ps(0,o))},nonnegative(o){return this.check(Zi(0,o))},negative(o){return this.check(Is(0,o))},nonpositive(o){return this.check(ji(0,o))},multipleOf(o,n){return this.check(Ts(o,n))},step(o,n){return this.check(Ts(o,n))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function de(e){return zp(Dw,e)}var Zj=$("ZodNumberFormat",(e,t)=>{Nd.init(e,t),Dw.init(e,t)});function jw(e){return Sp(Zj,e)}var Nj=$("ZodBoolean",(e,t)=>{Rd.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Bp(e,r,o,n)});function Ce(e){return Ip(Nj,e)}var Rj=$("ZodNull",(e,t)=>{Dd.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Wp(e,r,o,n)});function Aw(e){return Pp(Rj,e)}var Dj=$("ZodUnknown",(e,t)=>{Ad.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Kp(e,r,o,n)});function Pe(){return Tp(Dj)}var Aj=$("ZodNever",(e,t)=>{Cd.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gp(e,r,o,n)});function Cj(e){return Ep(Aj,e)}var Uj=$("ZodArray",(e,t)=>{Ud.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>tf(e,r,o,n),e.element=t.element,Ui(e,"ZodArray",{min(r,o){return this.check(to(r,o))},nonempty(r){return this.check(to(1,r))},max(r,o){return this.check(Es(r,o))},length(r,o){return this.check(Os(r,o))},unwrap(){return this.element}})});function oe(e,t){return Hb(Uj,e,t)}var Cw=$("ZodObject",(e,t)=>{Ub.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>rf(e,r,o,n),ne.defineLazy(e,"shape",()=>t.shape),Ui(e,"ZodObject",{keyof(){return st(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Pe()})},loose(){return this.clone({...this._zod.def,catchall:Pe()})},strict(){return this.clone({...this._zod.def,catchall:Cj()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return ne.extend(this,r)},safeExtend(r){return ne.safeExtend(this,r)},merge(r){return ne.merge(this,r)},pick(r){return ne.pick(this,r)},omit(r){return ne.omit(this,r)},partial(...r){return ne.partial(Cs,this,r[0])},required(...r){return ne.required(Lw,this,r[0])}})});function A(e,t){let r={type:"object",shape:e??{},...ne.normalizeParams(t)};return new Cw(r)}function Qe(e,t){return new Cw({type:"object",shape:e,catchall:Pe(),...ne.normalizeParams(t)})}var Uw=$("ZodUnion",(e,t)=>{ks.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>nf(e,r,o,n),e.options=t.options});function ke(e,t){return new Uw({type:"union",options:e,...ne.normalizeParams(t)})}var Mj=$("ZodDiscriminatedUnion",(e,t)=>{Uw.init(e,t),Ld.init(e,t)});function bf(e,t,r){return new Mj({type:"union",options:t,discriminator:e,...ne.normalizeParams(r)})}var Lj=$("ZodIntersection",(e,t)=>{Fd.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>of(e,r,o,n)});function As(e,t){return new Lj({type:"intersection",left:e,right:t})}var Zw=$("ZodRecord",(e,t)=>{qd.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>af(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function we(e,t,r){return!t||!t._zod?new Zw({type:"record",keyType:_(),valueType:e,...ne.normalizeParams(t)}):new Zw({type:"record",keyType:e,valueType:t,...ne.normalizeParams(r)})}var $f=$("ZodEnum",(e,t)=>{Vd.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Xp(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let a of o)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new $f({...t,checks:[],...ne.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new $f({...t,checks:[],...ne.normalizeParams(n),entries:i})}});function st(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new $f({type:"enum",entries:r,...ne.normalizeParams(t)})}var Fj=$("ZodLiteral",(e,t)=>{Jd.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Yp(e,r,o,n),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 M(e,t){return new Fj({type:"literal",values:Array.isArray(e)?e:[e],...ne.normalizeParams(t)})}var qj=$("ZodTransform",(e,t)=>{Hd.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ef(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Kn(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(ne.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(ne.issue(a))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)}});function Mw(e){return new qj({type:"transform",transform:e})}var Cs=$("ZodOptional",(e,t)=>{zs.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>js(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Te(e){return new Cs({type:"optional",innerType:e})}var Vj=$("ZodExactOptional",(e,t)=>{Bd.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>js(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Jj(e){return new Vj({type:"optional",innerType:e})}var Hj=$("ZodNullable",(e,t)=>{Wd.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>sf(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Nw(e){return new Hj({type:"nullable",innerType:e})}var Bj=$("ZodDefault",(e,t)=>{Gd.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>uf(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Wj(e,t){return new Bj({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():ne.shallowClone(t)}})}var Gj=$("ZodPrefault",(e,t)=>{Kd.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>lf(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Kj(e,t){return new Gj({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():ne.shallowClone(t)}})}var Lw=$("ZodNonOptional",(e,t)=>{Xd.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>cf(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Xj(e,t){return new Lw({type:"nonoptional",innerType:e,...ne.normalizeParams(t)})}var Yj=$("ZodCatch",(e,t)=>{Yd.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>df(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Qj(e,t){return new Yj({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var eZ=$("ZodPipe",(e,t)=>{Qd.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>pf(e,r,o,n),e.in=t.in,e.out=t.out});function xf(e,t){return new eZ({type:"pipe",in:e,out:t})}var tZ=$("ZodReadonly",(e,t)=>{ep.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>ff(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function rZ(e){return new tZ({type:"readonly",innerType:e})}var Fw=$("ZodCustom",(e,t)=>{tp.init(e,t),Ee.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qp(e,r,o,n)});function qw(e,t){return Fp(Fw,e??(()=>!0),t)}function nZ(e,t={}){return qp(Fw,e,t)}function oZ(e,t){return Vp(e,t)}function wf(e,t){return xf(Mw(e),t)}yt(Mb());var zf="2025-11-25";var Vw=[zf,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Ar="io.modelcontextprotocol/related-task",Ms="2.0",De=qw(e=>e!==null&&(typeof e=="object"||typeof e=="function")),Jw=ke([_(),de().int()]),Hw=_(),hF=Qe({ttl:de().optional(),pollInterval:de().optional()}),iZ=A({ttl:de().optional()}),aZ=A({taskId:_()}),Sf=Qe({progressToken:Jw.optional(),[Ar]:aZ.optional()}),xt=A({_meta:Sf.optional()}),Mi=xt.extend({task:iZ.optional()}),Bw=e=>Mi.safeParse(e).success,Ue=A({method:_(),params:xt.loose().optional()}),Tt=A({_meta:Sf.optional()}),Et=A({method:_(),params:Tt.loose().optional()}),Me=Qe({_meta:Sf.optional()}),Ls=ke([_(),de().int()]),Ww=A({jsonrpc:M(Ms),id:Ls,...Ue.shape}).strict(),If=e=>Ww.safeParse(e).success,Gw=A({jsonrpc:M(Ms),...Et.shape}).strict(),Kw=e=>Gw.safeParse(e).success,Pf=A({jsonrpc:M(Ms),id:Ls,result:Me}).strict(),Li=e=>Pf.safeParse(e).success;var F;(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"})(F||(F={}));var Tf=A({jsonrpc:M(Ms),id:Ls.optional(),error:A({code:de().int(),message:_(),data:Pe().optional()})}).strict();var Xw=e=>Tf.safeParse(e).success;var Yw=ke([Ww,Gw,Pf,Tf]),gF=ke([Pf,Tf]),Fs=Me.strict(),sZ=Tt.extend({requestId:Ls.optional(),reason:_().optional()}),qs=Et.extend({method:M("notifications/cancelled"),params:sZ}),cZ=A({src:_(),mimeType:_().optional(),sizes:oe(_()).optional(),theme:st(["light","dark"]).optional()}),Fi=A({icons:oe(cZ).optional()}),no=A({name:_(),title:_().optional()}),Qw=no.extend({...no.shape,...Fi.shape,version:_(),websiteUrl:_().optional(),description:_().optional()}),uZ=As(A({applyDefaults:Ce().optional()}),we(_(),Pe())),lZ=wf(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,As(A({form:uZ.optional(),url:De.optional()}),we(_(),Pe()).optional())),dZ=Qe({list:De.optional(),cancel:De.optional(),requests:Qe({sampling:Qe({createMessage:De.optional()}).optional(),elicitation:Qe({create:De.optional()}).optional()}).optional()}),pZ=Qe({list:De.optional(),cancel:De.optional(),requests:Qe({tools:Qe({call:De.optional()}).optional()}).optional()}),fZ=A({experimental:we(_(),De).optional(),sampling:A({context:De.optional(),tools:De.optional()}).optional(),elicitation:lZ.optional(),roots:A({listChanged:Ce().optional()}).optional(),tasks:dZ.optional(),extensions:we(_(),De).optional()}),mZ=xt.extend({protocolVersion:_(),capabilities:fZ,clientInfo:Qw}),Ef=Ue.extend({method:M("initialize"),params:mZ});var hZ=A({experimental:we(_(),De).optional(),logging:De.optional(),completions:De.optional(),prompts:A({listChanged:Ce().optional()}).optional(),resources:A({subscribe:Ce().optional(),listChanged:Ce().optional()}).optional(),tools:A({listChanged:Ce().optional()}).optional(),tasks:pZ.optional(),extensions:we(_(),De).optional()}),gZ=Me.extend({protocolVersion:_(),capabilities:hZ,serverInfo:Qw,instructions:_().optional()}),Of=Et.extend({method:M("notifications/initialized"),params:Tt.optional()});var Vs=Ue.extend({method:M("ping"),params:xt.optional()}),vZ=A({progress:de(),total:Te(de()),message:Te(_())}),yZ=A({...Tt.shape,...vZ.shape,progressToken:Jw}),Js=Et.extend({method:M("notifications/progress"),params:yZ}),_Z=xt.extend({cursor:Hw.optional()}),qi=Ue.extend({params:_Z.optional()}),Vi=Me.extend({nextCursor:Hw.optional()}),$Z=st(["working","input_required","completed","failed","cancelled"]),Ji=A({taskId:_(),status:$Z,ttl:ke([de(),Aw()]),createdAt:_(),lastUpdatedAt:_(),pollInterval:Te(de()),statusMessage:Te(_())}),oo=Me.extend({task:Ji}),xZ=Tt.merge(Ji),Hi=Et.extend({method:M("notifications/tasks/status"),params:xZ}),Hs=Ue.extend({method:M("tasks/get"),params:xt.extend({taskId:_()})}),Bs=Me.merge(Ji),Ws=Ue.extend({method:M("tasks/result"),params:xt.extend({taskId:_()})}),vF=Me.loose(),Gs=qi.extend({method:M("tasks/list")}),Ks=Vi.extend({tasks:oe(Ji)}),Xs=Ue.extend({method:M("tasks/cancel"),params:xt.extend({taskId:_()})}),ek=Me.merge(Ji),tk=A({uri:_(),mimeType:Te(_()),_meta:we(_(),Pe()).optional()}),rk=tk.extend({text:_()}),jf=_().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),nk=tk.extend({blob:jf}),Bi=st(["user","assistant"]),io=A({audience:oe(Bi).optional(),priority:de().min(0).max(1).optional(),lastModified:Ci.datetime({offset:!0}).optional()}),ok=A({...no.shape,...Fi.shape,uri:_(),description:Te(_()),mimeType:Te(_()),size:Te(de()),annotations:io.optional(),_meta:Te(Qe({}))}),bZ=A({...no.shape,...Fi.shape,uriTemplate:_(),description:Te(_()),mimeType:Te(_()),annotations:io.optional(),_meta:Te(Qe({}))}),Ys=qi.extend({method:M("resources/list")}),wZ=Vi.extend({resources:oe(ok)}),Qs=qi.extend({method:M("resources/templates/list")}),kZ=Vi.extend({resourceTemplates:oe(bZ)}),Zf=xt.extend({uri:_()}),zZ=Zf,ec=Ue.extend({method:M("resources/read"),params:zZ}),SZ=Me.extend({contents:oe(ke([rk,nk]))}),IZ=Et.extend({method:M("notifications/resources/list_changed"),params:Tt.optional()}),PZ=Zf,TZ=Ue.extend({method:M("resources/subscribe"),params:PZ}),EZ=Zf,OZ=Ue.extend({method:M("resources/unsubscribe"),params:EZ}),jZ=Tt.extend({uri:_()}),ZZ=Et.extend({method:M("notifications/resources/updated"),params:jZ}),NZ=A({name:_(),description:Te(_()),required:Te(Ce())}),RZ=A({...no.shape,...Fi.shape,description:Te(_()),arguments:Te(oe(NZ)),_meta:Te(Qe({}))}),tc=qi.extend({method:M("prompts/list")}),DZ=Vi.extend({prompts:oe(RZ)}),AZ=xt.extend({name:_(),arguments:we(_(),_()).optional()}),rc=Ue.extend({method:M("prompts/get"),params:AZ}),Nf=A({type:M("text"),text:_(),annotations:io.optional(),_meta:we(_(),Pe()).optional()}),Rf=A({type:M("image"),data:jf,mimeType:_(),annotations:io.optional(),_meta:we(_(),Pe()).optional()}),Df=A({type:M("audio"),data:jf,mimeType:_(),annotations:io.optional(),_meta:we(_(),Pe()).optional()}),CZ=A({type:M("tool_use"),name:_(),id:_(),input:we(_(),Pe()),_meta:we(_(),Pe()).optional()}),UZ=A({type:M("resource"),resource:ke([rk,nk]),annotations:io.optional(),_meta:we(_(),Pe()).optional()}),MZ=ok.extend({type:M("resource_link")}),Af=ke([Nf,Rf,Df,MZ,UZ]),LZ=A({role:Bi,content:Af}),FZ=Me.extend({description:_().optional(),messages:oe(LZ)}),qZ=Et.extend({method:M("notifications/prompts/list_changed"),params:Tt.optional()}),VZ=A({title:_().optional(),readOnlyHint:Ce().optional(),destructiveHint:Ce().optional(),idempotentHint:Ce().optional(),openWorldHint:Ce().optional()}),JZ=A({taskSupport:st(["required","optional","forbidden"]).optional()}),ik=A({...no.shape,...Fi.shape,description:_().optional(),inputSchema:A({type:M("object"),properties:we(_(),De).optional(),required:oe(_()).optional()}).catchall(Pe()),outputSchema:A({type:M("object"),properties:we(_(),De).optional(),required:oe(_()).optional()}).catchall(Pe()).optional(),annotations:VZ.optional(),execution:JZ.optional(),_meta:we(_(),Pe()).optional()}),nc=qi.extend({method:M("tools/list")}),HZ=Vi.extend({tools:oe(ik)}),oc=Me.extend({content:oe(Af).default([]),structuredContent:we(_(),Pe()).optional(),isError:Ce().optional()}),yF=oc.or(Me.extend({toolResult:Pe()})),BZ=Mi.extend({name:_(),arguments:we(_(),Pe()).optional()}),ao=Ue.extend({method:M("tools/call"),params:BZ}),WZ=Et.extend({method:M("notifications/tools/list_changed"),params:Tt.optional()}),_F=A({autoRefresh:Ce().default(!0),debounceMs:de().int().nonnegative().default(300)}),Wi=st(["debug","info","notice","warning","error","critical","alert","emergency"]),GZ=xt.extend({level:Wi}),Cf=Ue.extend({method:M("logging/setLevel"),params:GZ}),KZ=Tt.extend({level:Wi,logger:_().optional(),data:Pe()}),XZ=Et.extend({method:M("notifications/message"),params:KZ}),YZ=A({name:_().optional()}),QZ=A({hints:oe(YZ).optional(),costPriority:de().min(0).max(1).optional(),speedPriority:de().min(0).max(1).optional(),intelligencePriority:de().min(0).max(1).optional()}),e1=A({mode:st(["auto","required","none"]).optional()}),t1=A({type:M("tool_result"),toolUseId:_().describe("The unique identifier for the corresponding tool call."),content:oe(Af).default([]),structuredContent:A({}).loose().optional(),isError:Ce().optional(),_meta:we(_(),Pe()).optional()}),r1=bf("type",[Nf,Rf,Df]),Us=bf("type",[Nf,Rf,Df,CZ,t1]),n1=A({role:Bi,content:ke([Us,oe(Us)]),_meta:we(_(),Pe()).optional()}),o1=Mi.extend({messages:oe(n1),modelPreferences:QZ.optional(),systemPrompt:_().optional(),includeContext:st(["none","thisServer","allServers"]).optional(),temperature:de().optional(),maxTokens:de().int(),stopSequences:oe(_()).optional(),metadata:De.optional(),tools:oe(ik).optional(),toolChoice:e1.optional()}),i1=Ue.extend({method:M("sampling/createMessage"),params:o1}),Gi=Me.extend({model:_(),stopReason:Te(st(["endTurn","stopSequence","maxTokens"]).or(_())),role:Bi,content:r1}),Uf=Me.extend({model:_(),stopReason:Te(st(["endTurn","stopSequence","maxTokens","toolUse"]).or(_())),role:Bi,content:ke([Us,oe(Us)])}),a1=A({type:M("boolean"),title:_().optional(),description:_().optional(),default:Ce().optional()}),s1=A({type:M("string"),title:_().optional(),description:_().optional(),minLength:de().optional(),maxLength:de().optional(),format:st(["email","uri","date","date-time"]).optional(),default:_().optional()}),c1=A({type:st(["number","integer"]),title:_().optional(),description:_().optional(),minimum:de().optional(),maximum:de().optional(),default:de().optional()}),u1=A({type:M("string"),title:_().optional(),description:_().optional(),enum:oe(_()),default:_().optional()}),l1=A({type:M("string"),title:_().optional(),description:_().optional(),oneOf:oe(A({const:_(),title:_()})),default:_().optional()}),d1=A({type:M("string"),title:_().optional(),description:_().optional(),enum:oe(_()),enumNames:oe(_()).optional(),default:_().optional()}),p1=ke([u1,l1]),f1=A({type:M("array"),title:_().optional(),description:_().optional(),minItems:de().optional(),maxItems:de().optional(),items:A({type:M("string"),enum:oe(_())}),default:oe(_()).optional()}),m1=A({type:M("array"),title:_().optional(),description:_().optional(),minItems:de().optional(),maxItems:de().optional(),items:A({anyOf:oe(A({const:_(),title:_()}))}),default:oe(_()).optional()}),h1=ke([f1,m1]),g1=ke([d1,p1,h1]),v1=ke([g1,a1,s1,c1]),y1=Mi.extend({mode:M("form").optional(),message:_(),requestedSchema:A({type:M("object"),properties:we(_(),v1),required:oe(_()).optional()})}),_1=Mi.extend({mode:M("url"),message:_(),elicitationId:_(),url:_().url()}),$1=ke([y1,_1]),x1=Ue.extend({method:M("elicitation/create"),params:$1}),b1=Tt.extend({elicitationId:_()}),w1=Et.extend({method:M("notifications/elicitation/complete"),params:b1}),so=Me.extend({action:st(["accept","decline","cancel"]),content:wf(e=>e===null?void 0:e,we(_(),ke([_(),de(),Ce(),oe(_())])).optional())}),k1=A({type:M("ref/resource"),uri:_()});var z1=A({type:M("ref/prompt"),name:_()}),S1=xt.extend({ref:ke([z1,k1]),argument:A({name:_(),value:_()}),context:A({arguments:we(_(),_()).optional()}).optional()}),ic=Ue.extend({method:M("completion/complete"),params:S1});function ak(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function sk(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var I1=Me.extend({completion:Qe({values:oe(_()).max(100),total:Te(de().int()),hasMore:Te(Ce())})}),P1=A({uri:_().startsWith("file://"),name:_().optional(),_meta:we(_(),Pe()).optional()}),T1=Ue.extend({method:M("roots/list"),params:xt.optional()}),Mf=Me.extend({roots:oe(P1)}),Lf=Et.extend({method:M("notifications/roots/list_changed"),params:Tt.optional()}),$F=ke([Vs,Ef,ic,Cf,rc,tc,Ys,Qs,ec,TZ,OZ,ao,nc,Hs,Ws,Gs,Xs]),xF=ke([qs,Js,Of,Lf,Hi]),bF=ke([Fs,Gi,Uf,so,Mf,Bs,Ks,oo]),wF=ke([Vs,i1,x1,T1,Hs,Ws,Gs,Xs]),kF=ke([qs,Js,XZ,ZZ,IZ,WZ,qZ,Hi,w1]),zF=ke([Fs,gZ,I1,FZ,DZ,wZ,kZ,SZ,oc,HZ,Bs,Ks,oo]),U=class e extends Error{constructor(t,r,o){super(`MCP error ${t}: ${r}`),this.code=t,this.data=o,this.name="McpError"}static fromError(t,r,o){if(t===F.UrlElicitationRequired&&o){let n=o;if(n.elicitations)return new kf(n.elicitations,r)}return new e(t,r,o)}},kf=class extends U{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(F.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}};function Cr(e){return e==="completed"||e==="failed"||e==="cancelled"}var uk=Symbol("Let zodToJsonSchema decide on which parser to use");var ck={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"},lk=e=>typeof e=="string"?{...ck,name:e}:{...ck,...e};var dk=e=>{let t=lk(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([o,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,o],jsonSchema:void 0}]))}};function Ff(e,t,r,o){o?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function ie(e,t,r,o,n){e[t]=r,Ff(e,t,o,n)}var ac=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")};function Oe(e){if(e.target!=="openAi")return{};let t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?ac(t,e.currentPath):t.join("/")}}function pk(e,t){let r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==T.ZodAny&&(r.items=J(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&ie(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&ie(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(ie(r,"minItems",e.exactLength.value,e.exactLength.message,t),ie(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}function fk(e,t){let r={type:"integer",format:"int64"};if(!e.checks)return r;for(let o of e.checks)switch(o.kind){case"min":t.target==="jsonSchema7"?o.inclusive?ie(r,"minimum",o.value,o.message,t):ie(r,"exclusiveMinimum",o.value,o.message,t):(o.inclusive||(r.exclusiveMinimum=!0),ie(r,"minimum",o.value,o.message,t));break;case"max":t.target==="jsonSchema7"?o.inclusive?ie(r,"maximum",o.value,o.message,t):ie(r,"exclusiveMaximum",o.value,o.message,t):(o.inclusive||(r.exclusiveMaximum=!0),ie(r,"maximum",o.value,o.message,t));break;case"multipleOf":ie(r,"multipleOf",o.value,o.message,t);break}return r}function mk(){return{type:"boolean"}}function sc(e,t){return J(e.type._def,t)}var hk=(e,t)=>J(e.innerType._def,t);function qf(e,t,r){let o=r??t.dateStrategy;if(Array.isArray(o))return{anyOf:o.map((n,i)=>qf(e,t,n))};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 E1(e,t)}}var E1=(e,t)=>{let r={type:"integer",format:"unix-time"};if(t.target==="openApi3")return r;for(let o of e.checks)switch(o.kind){case"min":ie(r,"minimum",o.value,o.message,t);break;case"max":ie(r,"maximum",o.value,o.message,t);break}return r};function gk(e,t){return{...J(e.innerType._def,t),default:e.defaultValue()}}function vk(e,t){return t.effectStrategy==="input"?J(e.schema._def,t):Oe(t)}function yk(e){return{type:"string",enum:Array.from(e.values)}}var O1=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function _k(e,t){let r=[J(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),J(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i),o=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,n=[];return r.forEach(i=>{if(O1(i))n.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;n.push(a)}}),n.length?{allOf:n,...o}:void 0}function $k(e,t){let r=typeof e.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[e.value]}:{type:r==="bigint"?"integer":r,const:e.value}}var Vf,Lt={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:()=>(Vf===void 0&&(Vf=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Vf),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 cc(e,t){let r={type:"string"};if(e.checks)for(let o of e.checks)switch(o.kind){case"min":ie(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value,o.message,t);break;case"max":ie(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value,o.message,t);break;case"email":switch(t.emailStrategy){case"format:email":Ft(r,"email",o.message,t);break;case"format:idn-email":Ft(r,"idn-email",o.message,t);break;case"pattern:zod":et(r,Lt.email,o.message,t);break}break;case"url":Ft(r,"uri",o.message,t);break;case"uuid":Ft(r,"uuid",o.message,t);break;case"regex":et(r,o.regex,o.message,t);break;case"cuid":et(r,Lt.cuid,o.message,t);break;case"cuid2":et(r,Lt.cuid2,o.message,t);break;case"startsWith":et(r,RegExp(`^${Jf(o.value,t)}`),o.message,t);break;case"endsWith":et(r,RegExp(`${Jf(o.value,t)}$`),o.message,t);break;case"datetime":Ft(r,"date-time",o.message,t);break;case"date":Ft(r,"date",o.message,t);break;case"time":Ft(r,"time",o.message,t);break;case"duration":Ft(r,"duration",o.message,t);break;case"length":ie(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value,o.message,t),ie(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value,o.message,t);break;case"includes":{et(r,RegExp(Jf(o.value,t)),o.message,t);break}case"ip":{o.version!=="v6"&&Ft(r,"ipv4",o.message,t),o.version!=="v4"&&Ft(r,"ipv6",o.message,t);break}case"base64url":et(r,Lt.base64url,o.message,t);break;case"jwt":et(r,Lt.jwt,o.message,t);break;case"cidr":{o.version!=="v6"&&et(r,Lt.ipv4Cidr,o.message,t),o.version!=="v4"&&et(r,Lt.ipv6Cidr,o.message,t);break}case"emoji":et(r,Lt.emoji(),o.message,t);break;case"ulid":{et(r,Lt.ulid,o.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{Ft(r,"binary",o.message,t);break}case"contentEncoding:base64":{ie(r,"contentEncoding","base64",o.message,t);break}case"pattern:zod":{et(r,Lt.base64,o.message,t);break}}break}case"nanoid":et(r,Lt.nanoid,o.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return r}function Jf(e,t){return t.patternStrategy==="escape"?Z1(e):e}var j1=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function Z1(e){let t="";for(let r=0;r<e.length;r++)j1.has(e[r])||(t+="\\"),t+=e[r];return t}function Ft(e,t,r,o){e.format||e.anyOf?.some(n=>n.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,...r&&o.errorMessages&&{errorMessage:{format:r}}})):ie(e,"format",t,r,o)}function et(e,t,r,o){e.pattern||e.allOf?.some(n=>n.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:xk(t,o),...r&&o.errorMessages&&{errorMessage:{pattern:r}}})):ie(e,"pattern",xk(t,o),r,o)}function xk(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},o=r.i?e.source.toLowerCase():e.source,n="",i=!1,a=!1,s=!1;for(let c=0;c<o.length;c++){if(i){n+=o[c],i=!1;continue}if(r.i){if(a){if(o[c].match(/[a-z]/)){s?(n+=o[c],n+=`${o[c-2]}-${o[c]}`.toUpperCase(),s=!1):o[c+1]==="-"&&o[c+2]?.match(/[a-z]/)?(n+=o[c],s=!0):n+=`${o[c]}${o[c].toUpperCase()}`;continue}}else if(o[c].match(/[a-z]/)){n+=`[${o[c]}${o[c].toUpperCase()}]`;continue}}if(r.m){if(o[c]==="^"){n+=`(^|(?<=[\r
74
+ ]))`;continue}else if(o[c]==="$"){n+=`($|(?=[\r
75
+ ]))`;continue}}if(r.s&&o[c]==="."){n+=a?`${o[c]}\r
76
+ `:`[${o[c]}\r
77
+ ]`;continue}n+=o[c],o[c]==="\\"?i=!0:a&&o[c]==="]"?a=!1:!a&&o[c]==="["&&(a=!0)}try{new RegExp(n)}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 n}function uc(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===T.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((o,n)=>({...o,[n]:J(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",n]})??Oe(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};let r={type:"object",additionalProperties:J(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return r;if(e.keyType?._def.typeName===T.ZodString&&e.keyType._def.checks?.length){let{type:o,...n}=cc(e.keyType._def,t);return{...r,propertyNames:n}}else{if(e.keyType?._def.typeName===T.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===T.ZodBranded&&e.keyType._def.type._def.typeName===T.ZodString&&e.keyType._def.type._def.checks?.length){let{type:o,...n}=sc(e.keyType._def,t);return{...r,propertyNames:n}}}return r}function bk(e,t){if(t.mapStrategy==="record")return uc(e,t);let r=J(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Oe(t),o=J(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Oe(t);return{type:"array",maxItems:125,items:{type:"array",items:[r,o],minItems:2,maxItems:2}}}function wk(e){let t=e.values,o=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),n=Array.from(new Set(o.map(i=>typeof i)));return{type:n.length===1?n[0]==="string"?"string":"number":["string","number"],enum:o}}function kk(e){return e.target==="openAi"?void 0:{not:Oe({...e,currentPath:[...e.currentPath,"not"]})}}function zk(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Ki={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Ik(e,t){if(t.target==="openApi3")return Sk(e,t);let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(o=>o._def.typeName in Ki&&(!o._def.checks||!o._def.checks.length))){let o=r.reduce((n,i)=>{let a=Ki[i._def.typeName];return a&&!n.includes(a)?[...n,a]:n},[]);return{type:o.length>1?o:o[0]}}else if(r.every(o=>o._def.typeName==="ZodLiteral"&&!o.description)){let o=r.reduce((n,i)=>{let a=typeof i._def.value;switch(a){case"string":case"number":case"boolean":return[...n,a];case"bigint":return[...n,"integer"];case"object":if(i._def.value===null)return[...n,"null"];default:return n}},[]);if(o.length===r.length){let n=o.filter((i,a,s)=>s.indexOf(i)===a);return{type:n.length>1?n:n[0],enum:r.reduce((i,a)=>i.includes(a._def.value)?i:[...i,a._def.value],[])}}}else if(r.every(o=>o._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((o,n)=>[...o,...n._def.values.filter(i=>!o.includes(i))],[])};return Sk(e,t)}var Sk=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((o,n)=>J(o._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]})).filter(o=>!!o&&(!t.strictUnions||typeof o=="object"&&Object.keys(o).length>0));return r.length?{anyOf:r}:void 0};function Pk(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:Ki[e.innerType._def.typeName],nullable:!0}:{type:[Ki[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){let o=J(e.innerType._def,{...t,currentPath:[...t.currentPath]});return o&&"$ref"in o?{allOf:[o],nullable:!0}:o&&{...o,nullable:!0}}let r=J(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function Tk(e,t){let r={type:"number"};if(!e.checks)return r;for(let o of e.checks)switch(o.kind){case"int":r.type="integer",Ff(r,"type",o.message,t);break;case"min":t.target==="jsonSchema7"?o.inclusive?ie(r,"minimum",o.value,o.message,t):ie(r,"exclusiveMinimum",o.value,o.message,t):(o.inclusive||(r.exclusiveMinimum=!0),ie(r,"minimum",o.value,o.message,t));break;case"max":t.target==="jsonSchema7"?o.inclusive?ie(r,"maximum",o.value,o.message,t):ie(r,"exclusiveMaximum",o.value,o.message,t):(o.inclusive||(r.exclusiveMaximum=!0),ie(r,"maximum",o.value,o.message,t));break;case"multipleOf":ie(r,"multipleOf",o.value,o.message,t);break}return r}function Ek(e,t){let r=t.target==="openAi",o={type:"object",properties:{}},n=[],i=e.shape();for(let s in i){let c=i[s];if(c===void 0||c._def===void 0)continue;let u=R1(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);let l=J(c._def,{...t,currentPath:[...t.currentPath,"properties",s],propertyPath:[...t.currentPath,"properties",s]});l!==void 0&&(o.properties[s]=l,u||n.push(s))}n.length&&(o.required=n);let a=N1(e,t);return a!==void 0&&(o.additionalProperties=a),o}function N1(e,t){if(e.catchall._def.typeName!=="ZodNever")return J(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 R1(e){try{return e.isOptional()}catch{return!0}}var Ok=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return J(e.innerType._def,t);let r=J(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Oe(t)},r]}:Oe(t)};var jk=(e,t)=>{if(t.pipeStrategy==="input")return J(e.in._def,t);if(t.pipeStrategy==="output")return J(e.out._def,t);let r=J(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),o=J(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,o].filter(n=>n!==void 0)}};function Zk(e,t){return J(e.type._def,t)}function Nk(e,t){let o={type:"array",uniqueItems:!0,items:J(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&ie(o,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&ie(o,"maxItems",e.maxSize.value,e.maxSize.message,t),o}function Rk(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,o)=>J(r._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[]),additionalItems:J(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,o)=>J(r._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[])}}function Dk(e){return{not:Oe(e)}}function Ak(e){return Oe(e)}var Ck=(e,t)=>J(e.innerType._def,t);var Uk=(e,t,r)=>{switch(t){case T.ZodString:return cc(e,r);case T.ZodNumber:return Tk(e,r);case T.ZodObject:return Ek(e,r);case T.ZodBigInt:return fk(e,r);case T.ZodBoolean:return mk();case T.ZodDate:return qf(e,r);case T.ZodUndefined:return Dk(r);case T.ZodNull:return zk(r);case T.ZodArray:return pk(e,r);case T.ZodUnion:case T.ZodDiscriminatedUnion:return Ik(e,r);case T.ZodIntersection:return _k(e,r);case T.ZodTuple:return Rk(e,r);case T.ZodRecord:return uc(e,r);case T.ZodLiteral:return $k(e,r);case T.ZodEnum:return yk(e);case T.ZodNativeEnum:return wk(e);case T.ZodNullable:return Pk(e,r);case T.ZodOptional:return Ok(e,r);case T.ZodMap:return bk(e,r);case T.ZodSet:return Nk(e,r);case T.ZodLazy:return()=>e.getter()._def;case T.ZodPromise:return Zk(e,r);case T.ZodNaN:case T.ZodNever:return kk(r);case T.ZodEffects:return vk(e,r);case T.ZodAny:return Oe(r);case T.ZodUnknown:return Ak(r);case T.ZodDefault:return gk(e,r);case T.ZodBranded:return sc(e,r);case T.ZodReadonly:return Ck(e,r);case T.ZodCatch:return hk(e,r);case T.ZodPipeline:return jk(e,r);case T.ZodFunction:case T.ZodVoid:case T.ZodSymbol:return;default:return(o=>{})(t)}};function J(e,t,r=!1){let o=t.seen.get(e);if(t.override){let s=t.override?.(e,t,o,r);if(s!==uk)return s}if(o&&!r){let s=D1(o,t);if(s!==void 0)return s}let n={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,n);let i=Uk(e,e.typeName,t),a=typeof i=="function"?J(i(),t):i;if(a&&A1(e,t,a),t.postProcess){let s=t.postProcess(a,e,t);return n.jsonSchema=a,s}return n.jsonSchema=a,a}var D1=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:ac(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,o)=>t.currentPath[o]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Oe(t)):t.$refStrategy==="seen"?Oe(t):void 0}},A1=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r);var Hf=(e,t)=>{let r=dk(t),o=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,l])=>({...c,[u]:J(l._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??Oe(r)}),{}):void 0,n=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=J(e._def,n===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,n]},!1)??Oe(r),a=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;a!==void 0&&(i.title=a),r.flags.hasReferencedOpenAiAnyType&&(o||(o={}),o[r.openAiAnyTypeName]||(o[r.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:r.$refStrategy==="relative"?"1":[...r.basePath,r.definitionPath,r.openAiAnyTypeName].join("/")}}));let s=n===void 0?o?{...i,[r.definitionPath]:o}:i:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,n].join("/"),[r.definitionPath]:{...o,[n]:i}};return r.target==="jsonSchema7"?s.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),r.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 C1(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function Bf(e,t){return Pt(e)?mf(e,{target:C1(t?.target),io:t?.pipeStrategy??"input"}):Hf(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function Wf(e){let r=Dr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let o=Rs(r);if(typeof o!="string")throw new Error("Schema method literal must be a string");return o}function Gf(e,t){let r=Rr(e,t);if(!r.success)throw r.error;return r.data}var U1=6e4,lc=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(qs,r=>{this._oncancel(r)}),this.setNotificationHandler(Js,r=>{this._onprogress(r)}),this.setRequestHandler(Vs,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Hs,async(r,o)=>{let n=await this._taskStore.getTask(r.params.taskId,o.sessionId);if(!n)throw new U(F.InvalidParams,"Failed to retrieve task: Task not found");return{...n}}),this.setRequestHandler(Ws,async(r,o)=>{let n=async()=>{let i=r.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,u=c.id,l=this._requestResolvers.get(u);if(l)if(this._requestResolvers.delete(u),s.type==="response")l(c);else{let d=c,p=new U(d.error.code,d.error.message,d.error.data);l(p)}else{let d=s.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${u}`))}continue}await this._transport?.send(s.message,{relatedRequestId:o.requestId})}}let a=await this._taskStore.getTask(i,o.sessionId);if(!a)throw new U(F.InvalidParams,`Task not found: ${i}`);if(!Cr(a.status))return await this._waitForTaskUpdate(i,o.signal),await n();if(Cr(a.status)){let s=await this._taskStore.getTaskResult(i,o.sessionId);return this._clearTaskQueue(i),{...s,_meta:{...s._meta,[Ar]:{taskId:i}}}}return await n()};return await n()}),this.setRequestHandler(Gs,async(r,o)=>{try{let{tasks:n,nextCursor:i}=await this._taskStore.listTasks(r.params?.cursor,o.sessionId);return{tasks:n,nextCursor:i,_meta:{}}}catch(n){throw new U(F.InvalidParams,`Failed to list tasks: ${n instanceof Error?n.message:String(n)}`)}}),this.setRequestHandler(Xs,async(r,o)=>{try{let n=await this._taskStore.getTask(r.params.taskId,o.sessionId);if(!n)throw new U(F.InvalidParams,`Task not found: ${r.params.taskId}`);if(Cr(n.status))throw new U(F.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",o.sessionId),this._clearTaskQueue(r.params.taskId);let i=await this._taskStore.getTask(r.params.taskId,o.sessionId);if(!i)throw new U(F.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...i}}catch(n){throw n instanceof U?n:new U(F.InvalidRequest,`Failed to cancel task: ${n instanceof Error?n.message:String(n)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,r,o,n,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(n,r),startTime:Date.now(),timeout:r,maxTotalTimeout:o,resetTimeoutOnProgress:i,onTimeout:n})}_resetTimeout(t){let r=this._timeoutInfo.get(t);if(!r)return!1;let o=Date.now()-r.startTime;if(r.maxTotalTimeout&&o>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),U.fromError(F.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:o});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){let r=this._timeoutInfo.get(t);r&&(clearTimeout(r.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 r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};let o=this.transport?.onerror;this._transport.onerror=i=>{o?.(i),this._onerror(i)};let n=this._transport?.onmessage;this._transport.onmessage=(i,a)=>{n?.(i,a),Li(i)||Xw(i)?this._onresponse(i):If(i)?this._onrequest(i,a):Kw(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._timeoutInfo.values())clearTimeout(o.timeoutId);this._timeoutInfo.clear();for(let o of this._requestHandlerAbortControllers.values())o.abort();this._requestHandlerAbortControllers.clear();let r=U.fromError(F.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(let o of t.values())o(r)}_onerror(t){this.onerror?.(t)}_onnotification(t){let r=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(o=>this._onerror(new Error(`Uncaught error in notification handler: ${o}`)))}_onrequest(t,r){let o=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,n=this._transport,i=t.params?._meta?.[Ar]?.taskId;if(o===void 0){let l={jsonrpc:"2.0",id:t.id,error:{code:F.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:l,timestamp:Date.now()},n?.sessionId).catch(d=>this._onerror(new Error(`Failed to enqueue error response: ${d}`))):n?.send(l).catch(d=>this._onerror(new Error(`Failed to send an error response: ${d}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(t.id,a);let s=Bw(t.params)?t.params.task:void 0,c=this._taskStore?this.requestTaskStore(t,n?.sessionId):void 0,u={signal:a.signal,sessionId:n?.sessionId,_meta:t.params?._meta,sendNotification:async l=>{if(a.signal.aborted)return;let d={relatedRequestId:t.id};i&&(d.relatedTask={taskId:i}),await this.notification(l,d)},sendRequest:async(l,d,p)=>{if(a.signal.aborted)throw new U(F.ConnectionClosed,"Request was cancelled");let f={...p,relatedRequestId:t.id};i&&!f.relatedTask&&(f.relatedTask={taskId:i});let m=f.relatedTask?.taskId??i;return m&&c&&await c.updateTaskStatus(m,"input_required"),await this.request(l,d,f)},authInfo:r?.authInfo,requestId:t.id,requestInfo:r?.requestInfo,taskId:i,taskStore:c,taskRequestedTtl:s?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{s&&this.assertTaskHandlerCapability(t.method)}).then(()=>o(t,u)).then(async l=>{if(a.signal.aborted)return;let d={result:l,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:d,timestamp:Date.now()},n?.sessionId):await n?.send(d)},async l=>{if(a.signal.aborted)return;let d={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(l.code)?l.code:F.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:d,timestamp:Date.now()},n?.sessionId):await n?.send(d)}).catch(l=>this._onerror(new Error(`Failed to send response: ${l}`))).finally(()=>{this._requestHandlerAbortControllers.get(t.id)===a&&this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){let{progressToken:r,...o}=t.params,n=Number(r),i=this._progressHandlers.get(n);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}let a=this._responseHandlers.get(n),s=this._timeoutInfo.get(n);if(s&&a&&s.resetTimeoutOnProgress)try{this._resetTimeout(n)}catch(c){this._responseHandlers.delete(n),this._progressHandlers.delete(n),this._cleanupTimeout(n),a(c);return}i(o)}_onresponse(t){let r=Number(t.id),o=this._requestResolvers.get(r);if(o){if(this._requestResolvers.delete(r),Li(t))o(t);else{let a=new U(t.error.code,t.error.message,t.error.data);o(a)}return}let n=this._responseHandlers.get(r);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let i=!1;if(Li(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,r))}}if(i||this._progressHandlers.delete(r),Li(t))n(t);else{let a=U.fromError(t.error.code,t.error.message,t.error.data);n(a)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,r,o){let{task:n}=o??{};if(!n){try{yield{type:"result",result:await this.request(t,r,o)}}catch(a){yield{type:"error",error:a instanceof U?a:new U(F.InternalError,String(a))}}return}let i;try{let a=await this.request(t,oo,o);if(a.task)i=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new U(F.InternalError,"Task creation did not return a task");for(;;){let s=await this.getTask({taskId:i},o);if(yield{type:"taskStatus",task:s},Cr(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},r,o)}:s.status==="failed"?yield{type:"error",error:new U(F.InternalError,`Task ${i} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new U(F.InternalError,`Task ${i} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},r,o)};return}let c=s.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),o?.signal?.throwIfAborted()}}catch(a){yield{type:"error",error:a instanceof U?a:new U(F.InternalError,String(a))}}}request(t,r,o){let{relatedRequestId:n,resumptionToken:i,onresumptiontoken:a,task:s,relatedTask:c}=o??{};return new Promise((u,l)=>{let d=E=>{l(E)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),s&&this.assertTaskCapability(t.method)}catch(E){d(E);return}o?.signal?.throwIfAborted();let p=this._requestMessageId++,f={...t,jsonrpc:"2.0",id:p};o?.onprogress&&(this._progressHandlers.set(p,o.onprogress),f.params={...t.params,_meta:{...t.params?._meta||{},progressToken:p}}),s&&(f.params={...f.params,task:s}),c&&(f.params={...f.params,_meta:{...f.params?._meta||{},[Ar]:c}});let m=E=>{this._responseHandlers.delete(p),this._progressHandlers.delete(p),this._cleanupTimeout(p),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:p,reason:String(E)}},{relatedRequestId:n,resumptionToken:i,onresumptiontoken:a}).catch(b=>this._onerror(new Error(`Failed to send cancellation: ${b}`)));let w=E instanceof U?E:new U(F.RequestTimeout,String(E));l(w)};this._responseHandlers.set(p,E=>{if(!o?.signal?.aborted){if(E instanceof Error)return l(E);try{let w=Rr(r,E.result);w.success?u(w.data):l(w.error)}catch(w){l(w)}}}),o?.signal?.addEventListener("abort",()=>{m(o?.signal?.reason)});let h=o?.timeout??U1,y=()=>m(U.fromError(F.RequestTimeout,"Request timed out",{timeout:h}));this._setupTimeout(p,h,o?.maxTotalTimeout,y,o?.resetTimeoutOnProgress??!1);let x=c?.taskId;if(x){let E=w=>{let b=this._responseHandlers.get(p);b?b(w):this._onerror(new Error(`Response handler missing for side-channeled request ${p}`))};this._requestResolvers.set(p,E),this._enqueueTaskMessage(x,{type:"request",message:f,timestamp:Date.now()}).catch(w=>{this._cleanupTimeout(p),l(w)})}else this._transport.send(f,{relatedRequestId:n,resumptionToken:i,onresumptiontoken:a}).catch(E=>{this._cleanupTimeout(p),l(E)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},Bs,r)}async getTaskResult(t,r,o){return this.request({method:"tasks/result",params:t},r,o)}async listTasks(t,r){return this.request({method:"tasks/list",params:t},Ks,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},ek,r)}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);let o=r?.relatedTask?.taskId;if(o){let s={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Ar]:r.relatedTask}}};await this._enqueueTaskMessage(o,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId&&!r?.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"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[Ar]:r.relatedTask}}}),this._transport?.send(s,r).catch(c=>this._onerror(c))});return}let a={...t,jsonrpc:"2.0"};r?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[Ar]:r.relatedTask}}}),await this._transport.send(a,r)}setRequestHandler(t,r){let o=Wf(t);this.assertRequestHandlerCapability(o),this._requestHandlers.set(o,(n,i)=>{let a=Gf(t,n);return Promise.resolve(r(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,r){let o=Wf(t);this._notificationHandlers.set(o,n=>{let i=Gf(t,n);return Promise.resolve(r(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){let r=this._taskProgressTokens.get(t);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,r,o){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let n=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,r,o,n)}async _clearTaskQueue(t,r){if(this._taskMessageQueue){let o=await this._taskMessageQueue.dequeueAll(t,r);for(let n of o)if(n.type==="request"&&If(n.message)){let i=n.message.id,a=this._requestResolvers.get(i);a?(a(new U(F.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,r){let o=this._options?.defaultTaskPollInterval??1e3;try{let n=await this._taskStore?.getTask(t);n?.pollInterval&&(o=n.pollInterval)}catch{}return new Promise((n,i)=>{if(r.aborted){i(new U(F.InvalidRequest,"Request cancelled"));return}let a=setTimeout(n,o);r.addEventListener("abort",()=>{clearTimeout(a),i(new U(F.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,r){let o=this._taskStore;if(!o)throw new Error("No task store configured");return{createTask:async n=>{if(!t)throw new Error("No request provided");return await o.createTask(n,t.id,{method:t.method,params:t.params},r)},getTask:async n=>{let i=await o.getTask(n,r);if(!i)throw new U(F.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(n,i,a)=>{await o.storeTaskResult(n,i,a,r);let s=await o.getTask(n,r);if(s){let c=Hi.parse({method:"notifications/tasks/status",params:s});await this.notification(c),Cr(s.status)&&this._cleanupTaskProgressHandler(n)}},getTaskResult:n=>o.getTaskResult(n,r),updateTaskStatus:async(n,i,a)=>{let s=await o.getTask(n,r);if(!s)throw new U(F.InvalidParams,`Task "${n}" not found - it may have been cleaned up`);if(Cr(s.status))throw new U(F.InvalidParams,`Cannot update task "${n}" from terminal status "${s.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await o.updateTaskStatus(n,i,a,r);let c=await o.getTask(n,r);if(c){let u=Hi.parse({method:"notifications/tasks/status",params:c});await this.notification(u),Cr(c.status)&&this._cleanupTaskProgressHandler(n)}},listTasks:n=>o.listTasks(n,r)}}};function Mk(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Lk(e,t){let r={...e};for(let o in t){let n=o,i=t[n];if(i===void 0)continue;let a=r[n];Mk(a)&&Mk(i)?r[n]={...a,...i}:r[n]=i}return r}var I0=ox(Nh(),1),P0=ox(S0(),1);function EC(){let e=new I0.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,P0.default)(e),e}var Hc=class{constructor(t){this._ajv=t??EC()}getValidator(t){let r="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return o=>r(o)?{valid:!0,data:o,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}};var Bc=class{constructor(t){this._server=t}requestStream(t,r,o){return this._server.requestStream(t,r,o)}createMessageStream(t,r){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 n=t.messages[t.messages.length-1],i=Array.isArray(n.content)?n.content:[n.content],a=i.some(l=>l.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]:[],u=c.some(l=>l.type==="tool_use");if(a){if(i.some(l=>l.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!u)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(u){let l=new Set(c.filter(p=>p.type==="tool_use").map(p=>p.id)),d=new Set(i.filter(p=>p.type==="tool_result").map(p=>p.toolUseId));if(l.size!==d.size||![...l].every(p=>d.has(p)))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},Gi,r)}elicitInputStream(t,r){let o=this._server.getClientCapabilities(),n=t.mode??"form";switch(n){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=n==="form"&&t.mode===void 0?{...t,mode:"form"}:t;return this.requestStream({method:"elicitation/create",params:i},so,r)}async getTask(t,r){return this._server.getTask({taskId:t},r)}async getTaskResult(t,r,o){return this._server.getTaskResult({taskId:t},r,o)}async listTasks(t,r){return this._server.listTasks(t?{cursor:t}:void 0,r)}async cancelTask(t,r){return this._server.cancelTask({taskId:t},r)}};function T0(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${t})`);break;default:break}}function E0(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${t})`);break;default:break}}var Wc=class extends lc{constructor(t,r){super(r),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Wi.options.map((o,n)=>[o,n])),this.isMessageIgnored=(o,n)=>{let i=this._loggingLevels.get(n);return i?this.LOG_LEVEL_SEVERITY.get(o)<this.LOG_LEVEL_SEVERITY.get(i):!1},this._capabilities=r?.capabilities??{},this._instructions=r?.instructions,this._jsonSchemaValidator=r?.jsonSchemaValidator??new Hc,this.setRequestHandler(Ef,o=>this._oninitialize(o)),this.setNotificationHandler(Of,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Cf,async(o,n)=>{let i=n.sessionId||n.requestInfo?.headers["mcp-session-id"]||void 0,{level:a}=o.params,s=Wi.safeParse(a);return s.success&&this._loggingLevels.set(i,s.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new Bc(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=Lk(this._capabilities,t)}setRequestHandler(t,r){let n=Dr(t)?.method;if(!n)throw new Error("Schema is missing a method literal");let i;if(Pt(n)){let s=n;i=s._zod?.def?.value??s.value}else{let s=n;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,u)=>{let l=Rr(ao,c);if(!l.success){let m=l.error instanceof Error?l.error.message:String(l.error);throw new U(F.InvalidParams,`Invalid tools/call request: ${m}`)}let{params:d}=l.data,p=await Promise.resolve(r(c,u));if(d.task){let m=Rr(oo,p);if(!m.success){let h=m.error instanceof Error?m.error.message:String(m.error);throw new U(F.InvalidParams,`Invalid task creation result: ${h}`)}return m.data}let f=Rr(oc,p);if(!f.success){let m=f.error instanceof Error?f.error.message:String(f.error);throw new U(F.InvalidParams,`Invalid tools/call result: ${m}`)}return f.data};return super.setRequestHandler(t,s)}return super.setRequestHandler(t,r)}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){E0(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&T0(this._capabilities.tasks?.requests,t,"Server")}async _oninitialize(t){let r=t.params.protocolVersion;return this._clientCapabilities=t.params.capabilities,this._clientVersion=t.params.clientInfo,{protocolVersion:Vw.includes(r)?r:zf,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"},Fs)}async createMessage(t,r){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],n=Array.isArray(o.content)?o.content:[o.content],i=n.some(u=>u.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(u=>u.type==="tool_use");if(i){if(n.some(u=>u.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 u=new Set(s.filter(d=>d.type==="tool_use").map(d=>d.id)),l=new Set(n.filter(d=>d.type==="tool_result").map(d=>d.toolUseId));if(u.size!==l.size||![...u].every(d=>l.has(d)))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},Uf,r):this.request({method:"sampling/createMessage",params:t},Gi,r)}async elicitInput(t,r){switch(t.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");let n=t;return this.request({method:"elicitation/create",params:n},so,r)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");let n=t.mode==="form"?t:{...t,mode:"form"},i=await this.request({method:"elicitation/create",params:n},so,r);if(i.action==="accept"&&i.content&&n.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(n.requestedSchema)(i.content);if(!s.valid)throw new U(F.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(a){throw a instanceof U?a:new U(F.InternalError,`Error validating elicitation response: ${a instanceof Error?a.message:String(a)}`)}return i}}}createElicitationCompletionNotifier(t,r){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}},r)}async listRoots(t,r){return this.request({method:"roots/list",params:t},Mf,r)}async sendLoggingMessage(t,r){if(this._capabilities.logging&&!this.isMessageIgnored(t.level,r))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 j0=Symbol.for("mcp.completable");function Fh(e){return!!e&&typeof e=="object"&&j0 in e}function Z0(e){return e[j0]?.complete}var O0;(function(e){e.Completable="McpCompletable"})(O0||(O0={}));var OC=/^[A-Za-z0-9._-]{1,128}$/;function jC(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"),!OC.test(e)){let r=e.split("").filter(o=>!/[A-Za-z0-9._-]/.test(o)).filter((o,n,i)=>i.indexOf(o)===n);return t.push(`Tool name contains invalid characters: ${r.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 ZC(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let r of t)console.warn(` - ${r}`);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 qh(e){let t=jC(e);return ZC(e,t.warnings),t.isValid}var Gc=class{constructor(t){this._mcpServer=t}registerToolTask(t,r,o){let n={taskSupport:"required",...r.execution};if(n.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${t}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(t,r.title,r.description,r.inputSchema,r.outputSchema,r.annotations,n,r._meta,o)}};var Kc=class{constructor(t,r){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new Wc(t,r)}get experimental(){return this._experimental||(this._experimental={tasks:new Gc(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(Br(nc)),this.server.assertCanSetRequestHandler(Br(ao)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(nc,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,r])=>{let o={name:t,title:r.title,description:r.description,inputSchema:(()=>{let n=ro(r.inputSchema);return n?Bf(n,{strictUnions:!0,pipeStrategy:"input"}):NC})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){let n=ro(r.outputSchema);n&&(o.outputSchema=Bf(n,{strictUnions:!0,pipeStrategy:"output"}))}return o})})),this.server.setRequestHandler(ao,async(t,r)=>{try{let o=this._registeredTools[t.params.name];if(!o)throw new U(F.InvalidParams,`Tool ${t.params.name} not found`);if(!o.enabled)throw new U(F.InvalidParams,`Tool ${t.params.name} disabled`);let n=!!t.params.task,i=o.execution?.taskSupport,a="createTask"in o.handler;if((i==="required"||i==="optional")&&!a)throw new U(F.InternalError,`Tool ${t.params.name} has taskSupport '${i}' but was not registered with registerToolTask`);if(i==="required"&&!n)throw new U(F.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(i==="optional"&&!n&&a)return await this.handleAutomaticTaskPolling(o,t,r);let s=await this.validateToolInput(o,t.params.arguments,t.params.name),c=await this.executeToolHandler(o,s,r);return n||await this.validateToolOutput(o,c,t.params.name),c}catch(o){if(o instanceof U&&o.code===F.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,r,o){if(!t.inputSchema)return;let i=ro(t.inputSchema)??t.inputSchema,a=await Zs(i,r);if(!a.success){let s="error"in a?a.error:"Unknown error",c=Ns(s);throw new U(F.InvalidParams,`Input validation error: Invalid arguments for tool ${o}: ${c}`)}return a.data}async validateToolOutput(t,r,o){if(!t.outputSchema||!("content"in r)||r.isError)return;if(!r.structuredContent)throw new U(F.InvalidParams,`Output validation error: Tool ${o} has an output schema but no structured content was provided`);let n=ro(t.outputSchema),i=await Zs(n,r.structuredContent);if(!i.success){let a="error"in i?i.error:"Unknown error",s=Ns(a);throw new U(F.InvalidParams,`Output validation error: Invalid structured content for tool ${o}: ${s}`)}}async executeToolHandler(t,r,o){let n=t.handler;if("createTask"in n){if(!o.taskStore)throw new Error("No task store provided.");let a={...o,taskStore:o.taskStore};if(t.inputSchema){let s=n;return await Promise.resolve(s.createTask(r,a))}else{let s=n;return await Promise.resolve(s.createTask(a))}}if(t.inputSchema){let a=n;return await Promise.resolve(a(r,o))}else{let a=n;return await Promise.resolve(a(o))}}async handleAutomaticTaskPolling(t,r,o){if(!o.taskStore)throw new Error("No task store provided for task-capable tool.");let n=await this.validateToolInput(t,r.params.arguments,r.params.name),i=t.handler,a={...o,taskStore:o.taskStore},s=n?await Promise.resolve(i.createTask(n,a)):await Promise.resolve(i.createTask(a)),c=s.task.taskId,u=s.task,l=u.pollInterval??5e3;for(;u.status!=="completed"&&u.status!=="failed"&&u.status!=="cancelled";){await new Promise(p=>setTimeout(p,l));let d=await o.taskStore.getTask(c);if(!d)throw new U(F.InternalError,`Task ${c} not found during polling`);u=d}return await o.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(Br(ic)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(ic,async t=>{switch(t.params.ref.type){case"ref/prompt":return ak(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return sk(t),this.handleResourceCompletion(t,t.params.ref);default:throw new U(F.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,r){let o=this._registeredPrompts[r.name];if(!o)throw new U(F.InvalidParams,`Prompt ${r.name} not found`);if(!o.enabled)throw new U(F.InvalidParams,`Prompt ${r.name} disabled`);if(!o.argsSchema)return Sa;let i=Dr(o.argsSchema)?.[t.params.argument.name];if(!Fh(i))return Sa;let a=Z0(i);if(!a)return Sa;let s=await a(t.params.argument.value,t.params.context);return R0(s)}async handleResourceCompletion(t,r){let o=Object.values(this._registeredResourceTemplates).find(a=>a.resourceTemplate.uriTemplate.toString()===r.uri);if(!o){if(this._registeredResources[r.uri])return Sa;throw new U(F.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}let n=o.resourceTemplate.completeCallback(t.params.argument.name);if(!n)return Sa;let i=await n(t.params.argument.value,t.params.context);return R0(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(Br(Ys)),this.server.assertCanSetRequestHandler(Br(Qs)),this.server.assertCanSetRequestHandler(Br(ec)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(Ys,async(t,r)=>{let o=Object.entries(this._registeredResources).filter(([i,a])=>a.enabled).map(([i,a])=>({uri:i,name:a.name,...a.metadata})),n=[];for(let i of Object.values(this._registeredResourceTemplates)){if(!i.resourceTemplate.listCallback)continue;let a=await i.resourceTemplate.listCallback(r);for(let s of a.resources)n.push({...i.metadata,...s})}return{resources:[...o,...n]}}),this.server.setRequestHandler(Qs,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,o])=>({name:r,uriTemplate:o.resourceTemplate.uriTemplate.toString(),...o.metadata}))})),this.server.setRequestHandler(ec,async(t,r)=>{let o=new URL(t.params.uri),n=this._registeredResources[o.toString()];if(n){if(!n.enabled)throw new U(F.InvalidParams,`Resource ${o} disabled`);return n.readCallback(o,r)}for(let i of Object.values(this._registeredResourceTemplates)){let a=i.resourceTemplate.uriTemplate.match(o.toString());if(a)return i.readCallback(o,a,r)}throw new U(F.InvalidParams,`Resource ${o} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(Br(tc)),this.server.assertCanSetRequestHandler(Br(rc)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(tc,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,r])=>({name:t,title:r.title,description:r.description,arguments:r.argsSchema?RC(r.argsSchema):void 0}))})),this.server.setRequestHandler(rc,async(t,r)=>{let o=this._registeredPrompts[t.params.name];if(!o)throw new U(F.InvalidParams,`Prompt ${t.params.name} not found`);if(!o.enabled)throw new U(F.InvalidParams,`Prompt ${t.params.name} disabled`);if(o.argsSchema){let n=ro(o.argsSchema),i=await Zs(n,t.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",u=Ns(c);throw new U(F.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${u}`)}let a=i.data,s=o.callback;return await Promise.resolve(s(a,r))}else{let n=o.callback;return await Promise.resolve(n(r))}}),this._promptHandlersInitialized=!0)}resource(t,r,...o){let n;typeof o[0]=="object"&&(n=o.shift());let i=o[0];if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let a=this._createRegisteredResource(t,void 0,r,n,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,r,n,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}}registerResource(t,r,o,n){if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);let i=this._createRegisteredResource(t,o.title,r,o,n);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,r,o,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}}_createRegisteredResource(t,r,o,n,i){let a={name:t,title:r,metadata:n,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,r,o,n,i){let a={resourceTemplate:o,title:r,metadata:n,readCallback:i,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:u=>{typeof u.name<"u"&&u.name!==t&&(delete this._registeredResourceTemplates[t],u.name&&(this._registeredResourceTemplates[u.name]=a)),typeof u.title<"u"&&(a.title=u.title),typeof u.template<"u"&&(a.resourceTemplate=u.template),typeof u.metadata<"u"&&(a.metadata=u.metadata),typeof u.callback<"u"&&(a.readCallback=u.callback),typeof u.enabled<"u"&&(a.enabled=u.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[t]=a;let s=o.uriTemplate.variableNames;return Array.isArray(s)&&s.some(u=>!!o.completeCallback(u))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(t,r,o,n,i){let a={title:r,description:o,argsSchema:n===void 0?void 0:mn(n),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=mn(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,n&&Object.values(n).some(c=>{let u=c instanceof Cs?c._def?.innerType:c;return Fh(u)})&&this.setCompletionRequestHandler(),a}_createRegisteredTool(t,r,o,n,i,a,s,c,u){qh(t);let l={title:r,description:o,inputSchema:N0(n),outputSchema:N0(i),annotations:a,execution:s,_meta:c,handler:u,enabled:!0,disable:()=>l.update({enabled:!1}),enable:()=>l.update({enabled:!0}),remove:()=>l.update({name:null}),update:d=>{typeof d.name<"u"&&d.name!==t&&(typeof d.name=="string"&&qh(d.name),delete this._registeredTools[t],d.name&&(this._registeredTools[d.name]=l)),typeof d.title<"u"&&(l.title=d.title),typeof d.description<"u"&&(l.description=d.description),typeof d.paramsSchema<"u"&&(l.inputSchema=mn(d.paramsSchema)),typeof d.outputSchema<"u"&&(l.outputSchema=mn(d.outputSchema)),typeof d.callback<"u"&&(l.handler=d.callback),typeof d.annotations<"u"&&(l.annotations=d.annotations),typeof d._meta<"u"&&(l._meta=d._meta),typeof d.enabled<"u"&&(l.enabled=d.enabled),this.sendToolListChanged()}};return this._registeredTools[t]=l,this.setToolRequestHandlers(),this.sendToolListChanged(),l}tool(t,...r){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let o,n,i,a;if(typeof r[0]=="string"&&(o=r.shift()),r.length>1){let c=r[0];if(Vh(c))n=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!Vh(r[0])&&(a=r.shift());else if(typeof c=="object"&&c!==null){if(Object.values(c).some(u=>typeof u=="object"&&u!==null))throw new Error(`Tool ${t} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);a=r.shift()}}let s=r[0];return this._createRegisteredTool(t,void 0,o,n,i,a,{taskSupport:"forbidden"},void 0,s)}registerTool(t,r,o){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let{title:n,description:i,inputSchema:a,outputSchema:s,annotations:c,_meta:u}=r;return this._createRegisteredTool(t,n,i,a,s,c,{taskSupport:"forbidden"},u,o)}prompt(t,...r){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let o;typeof r[0]=="string"&&(o=r.shift());let n;r.length>1&&(n=r.shift());let i=r[0],a=this._createRegisteredPrompt(t,void 0,o,n,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}registerPrompt(t,r,o){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let{title:n,description:i,argsSchema:a}=r,s=this._createRegisteredPrompt(t,n,i,a,o);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(t,r){return this.server.sendLoggingMessage(t,r)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};var NC={type:"object",properties:{}};function D0(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function A0(e){return"_def"in e||"_zod"in e||D0(e)}function Vh(e){return typeof e!="object"||e===null||A0(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some(D0)}function N0(e){if(e){if(Vh(e))return mn(e);if(!A0(e))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return e}}function RC(e){let t=Dr(e);return t?Object.entries(t).map(([r,o])=>{let n=pw(o),i=fw(o);return{name:r,description:n,required:!i}}):[]}function Br(e){let r=Dr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");let o=Rs(r);if(typeof o=="string")return o;throw new Error("Schema method literal must be a string")}function R0(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}var Sa={completion:{values:[],hasMore:!1}};import U0 from"node:process";var Xc=class{append(t){this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;let t=this._buffer.indexOf(`
78
+ `);if(t===-1)return null;let r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),DC(r)}clear(){this._buffer=void 0}};function DC(e){return Yw.parse(JSON.parse(e))}function C0(e){return JSON.stringify(e)+`
79
+ `}var Yc=class{constructor(t=U0.stdin,r=U0.stdout){this._stdin=t,this._stdout=r,this._readBuffer=new Xc,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(r=>{let o=C0(t);this._stdout.write(o)?r():this._stdout.once("drain",r)})}};import an from"fs/promises";import{createReadStream as FL}from"fs";import ii from"path";var j={};Ct(j,{$brand:()=>Qc,$input:()=>ly,$output:()=>uy,NEVER:()=>Jh,TimePrecision:()=>my,ZodAny:()=>n$,ZodArray:()=>s$,ZodBase64:()=>Sl,ZodBase64URL:()=>Il,ZodBigInt:()=>ti,ZodBigIntFormat:()=>El,ZodBoolean:()=>ei,ZodCIDRv4:()=>kl,ZodCIDRv6:()=>zl,ZodCUID:()=>vl,ZodCUID2:()=>yl,ZodCatch:()=>T$,ZodCodec:()=>Cl,ZodCustom:()=>os,ZodCustomStringFormat:()=>Yo,ZodDate:()=>Qa,ZodDefault:()=>w$,ZodDiscriminatedUnion:()=>u$,ZodE164:()=>Pl,ZodEmail:()=>ml,ZodEmoji:()=>hl,ZodEnum:()=>Ko,ZodError:()=>lM,ZodExactOptional:()=>$$,ZodFile:()=>y$,ZodFirstPartyTypeKind:()=>L$,ZodFunction:()=>C$,ZodGUID:()=>Wa,ZodIPv4:()=>bl,ZodIPv6:()=>wl,ZodISODate:()=>cl,ZodISODateTime:()=>sl,ZodISODuration:()=>ll,ZodISOTime:()=>ul,ZodIntersection:()=>l$,ZodIssueCode:()=>pM,ZodJWT:()=>Tl,ZodKSUID:()=>xl,ZodLazy:()=>R$,ZodLiteral:()=>v$,ZodMAC:()=>K_,ZodMap:()=>h$,ZodNaN:()=>O$,ZodNanoID:()=>gl,ZodNever:()=>i$,ZodNonOptional:()=>Dl,ZodNull:()=>t$,ZodNullable:()=>b$,ZodNumber:()=>Qo,ZodNumberFormat:()=>jn,ZodObject:()=>ts,ZodOptional:()=>Rl,ZodPipe:()=>Al,ZodPrefault:()=>z$,ZodPromise:()=>A$,ZodReadonly:()=>j$,ZodRealError:()=>mt,ZodRecord:()=>ns,ZodSet:()=>g$,ZodString:()=>Xo,ZodStringFormat:()=>ve,ZodSuccess:()=>P$,ZodSymbol:()=>Q_,ZodTemplateLiteral:()=>N$,ZodTransform:()=>_$,ZodTuple:()=>p$,ZodType:()=>G,ZodULID:()=>_l,ZodURL:()=>Ya,ZodUUID:()=>cr,ZodUndefined:()=>e$,ZodUnion:()=>rs,ZodUnknown:()=>o$,ZodVoid:()=>a$,ZodXID:()=>$l,ZodXor:()=>c$,_ZodString:()=>fl,_default:()=>k$,_function:()=>yT,any:()=>KP,array:()=>es,base64:()=>ZP,base64url:()=>NP,bigint:()=>JP,boolean:()=>Y_,catch:()=>E$,check:()=>_T,cidrv4:()=>OP,cidrv6:()=>jP,clone:()=>nt,codec:()=>hT,coerce:()=>F$,config:()=>Ze,core:()=>kr,cuid:()=>wP,cuid2:()=>kP,custom:()=>$T,date:()=>YP,decode:()=>q_,decodeAsync:()=>J_,describe:()=>xT,discriminatedUnion:()=>oT,e164:()=>RP,email:()=>fP,emoji:()=>xP,encode:()=>F_,encodeAsync:()=>V_,endsWith:()=>Mo,enum:()=>Zl,exactOptional:()=>x$,file:()=>dT,flattenError:()=>Ra,float32:()=>LP,float64:()=>FP,formatError:()=>Da,fromJSONSchema:()=>PT,function:()=>yT,getErrorMap:()=>mM,globalRegistry:()=>qe,gt:()=>ar,gte:()=>ot,guid:()=>mP,hash:()=>MP,hex:()=>UP,hostname:()=>CP,httpUrl:()=>$P,includes:()=>Co,instanceof:()=>wT,int:()=>pl,int32:()=>qP,int64:()=>HP,intersection:()=>d$,ipv4:()=>PP,ipv6:()=>EP,iso:()=>Go,json:()=>zT,jwt:()=>DP,keyof:()=>QP,ksuid:()=>IP,lazy:()=>D$,length:()=>En,literal:()=>lT,locales:()=>Va,looseObject:()=>rT,looseRecord:()=>aT,lowercase:()=>Do,lt:()=>ir,lte:()=>wt,mac:()=>TP,map:()=>sT,maxLength:()=>Tn,maxSize:()=>en,meta:()=>bT,mime:()=>Lo,minLength:()=>wr,minSize:()=>sr,multipleOf:()=>Qr,nan:()=>mT,nanoid:()=>bP,nativeEnum:()=>uT,negative:()=>Xu,never:()=>Ol,nonnegative:()=>Qu,nonoptional:()=>I$,nonpositive:()=>Yu,normalize:()=>Fo,null:()=>r$,nullable:()=>Ka,nullish:()=>pT,number:()=>X_,object:()=>eT,optional:()=>Ga,overwrite:()=>Gt,parse:()=>C_,parseAsync:()=>U_,partialRecord:()=>iT,pipe:()=>Xa,positive:()=>Ku,prefault:()=>S$,preprocess:()=>ST,prettifyError:()=>ng,promise:()=>vT,property:()=>el,readonly:()=>Z$,record:()=>m$,refine:()=>U$,regex:()=>Ro,regexes:()=>Dt,registry:()=>Tu,safeDecode:()=>B_,safeDecodeAsync:()=>G_,safeEncode:()=>H_,safeEncodeAsync:()=>W_,safeParse:()=>M_,safeParseAsync:()=>L_,set:()=>cT,setErrorMap:()=>fM,size:()=>Pn,slugify:()=>Ho,startsWith:()=>Uo,strictObject:()=>tT,string:()=>dl,stringFormat:()=>AP,stringbool:()=>kT,success:()=>fT,superRefine:()=>M$,symbol:()=>WP,templateLiteral:()=>gT,toJSONSchema:()=>ol,toLowerCase:()=>Vo,toUpperCase:()=>Jo,transform:()=>Nl,treeifyError:()=>rg,trim:()=>qo,tuple:()=>f$,uint32:()=>VP,uint64:()=>BP,ulid:()=>zP,undefined:()=>GP,union:()=>jl,unknown:()=>On,uppercase:()=>Ao,url:()=>_P,util:()=>P,uuid:()=>hP,uuidv4:()=>gP,uuidv6:()=>vP,uuidv7:()=>yP,void:()=>XP,xid:()=>SP,xor:()=>nT});var kr={};Ct(kr,{$ZodAny:()=>Ov,$ZodArray:()=>Dv,$ZodAsyncError:()=>Wt,$ZodBase64:()=>xv,$ZodBase64URL:()=>bv,$ZodBigInt:()=>bu,$ZodBigIntFormat:()=>Iv,$ZodBoolean:()=>Ma,$ZodCIDRv4:()=>yv,$ZodCIDRv6:()=>_v,$ZodCUID:()=>av,$ZodCUID2:()=>sv,$ZodCatch:()=>ey,$ZodCheck:()=>xe,$ZodCheckBigIntFormat:()=>Dg,$ZodCheckEndsWith:()=>Wg,$ZodCheckGreaterThan:()=>hu,$ZodCheckIncludes:()=>Hg,$ZodCheckLengthEquals:()=>Fg,$ZodCheckLessThan:()=>mu,$ZodCheckLowerCase:()=>Vg,$ZodCheckMaxLength:()=>Mg,$ZodCheckMaxSize:()=>Ag,$ZodCheckMimeType:()=>Kg,$ZodCheckMinLength:()=>Lg,$ZodCheckMinSize:()=>Cg,$ZodCheckMultipleOf:()=>Ng,$ZodCheckNumberFormat:()=>Rg,$ZodCheckOverwrite:()=>Xg,$ZodCheckProperty:()=>Gg,$ZodCheckRegex:()=>qg,$ZodCheckSizeEquals:()=>Ug,$ZodCheckStartsWith:()=>Bg,$ZodCheckStringFormat:()=>Zo,$ZodCheckUpperCase:()=>Jg,$ZodCodec:()=>Fa,$ZodCustom:()=>cy,$ZodCustomStringFormat:()=>zv,$ZodDate:()=>Rv,$ZodDefault:()=>Kv,$ZodDiscriminatedUnion:()=>Uv,$ZodE164:()=>wv,$ZodEmail:()=>rv,$ZodEmoji:()=>ov,$ZodEncodeError:()=>Wr,$ZodEnum:()=>Vv,$ZodError:()=>Na,$ZodExactOptional:()=>Wv,$ZodFile:()=>Hv,$ZodFunction:()=>iy,$ZodGUID:()=>ev,$ZodIPv4:()=>hv,$ZodIPv6:()=>gv,$ZodISODate:()=>pv,$ZodISODateTime:()=>dv,$ZodISODuration:()=>mv,$ZodISOTime:()=>fv,$ZodIntersection:()=>Mv,$ZodJWT:()=>kv,$ZodKSUID:()=>lv,$ZodLazy:()=>sy,$ZodLiteral:()=>Jv,$ZodMAC:()=>vv,$ZodMap:()=>Fv,$ZodNaN:()=>ty,$ZodNanoID:()=>iv,$ZodNever:()=>Zv,$ZodNonOptional:()=>Yv,$ZodNull:()=>Ev,$ZodNullable:()=>Gv,$ZodNumber:()=>xu,$ZodNumberFormat:()=>Sv,$ZodObject:()=>pI,$ZodObjectJIT:()=>Av,$ZodOptional:()=>ku,$ZodPipe:()=>ry,$ZodPrefault:()=>Xv,$ZodPromise:()=>ay,$ZodReadonly:()=>ny,$ZodRealError:()=>ft,$ZodRecord:()=>Lv,$ZodRegistry:()=>Pu,$ZodSet:()=>qv,$ZodString:()=>In,$ZodStringFormat:()=>ge,$ZodSuccess:()=>Qv,$ZodSymbol:()=>Pv,$ZodTemplateLiteral:()=>oy,$ZodTransform:()=>Bv,$ZodTuple:()=>wu,$ZodType:()=>B,$ZodULID:()=>cv,$ZodURL:()=>nv,$ZodUUID:()=>tv,$ZodUndefined:()=>Tv,$ZodUnion:()=>La,$ZodUnknown:()=>jv,$ZodVoid:()=>Nv,$ZodXID:()=>uv,$ZodXor:()=>Cv,$brand:()=>Qc,$constructor:()=>g,$input:()=>ly,$output:()=>uy,Doc:()=>Ua,JSONSchema:()=>dP,JSONSchemaGenerator:()=>il,NEVER:()=>Jh,TimePrecision:()=>my,_any:()=>Ry,_array:()=>Fy,_base64:()=>Hu,_base64url:()=>Bu,_bigint:()=>Py,_boolean:()=>Sy,_catch:()=>rM,_check:()=>lP,_cidrv4:()=>Vu,_cidrv6:()=>Ju,_coercedBigint:()=>Ty,_coercedBoolean:()=>Iy,_coercedDate:()=>My,_coercedNumber:()=>$y,_coercedString:()=>py,_cuid:()=>Au,_cuid2:()=>Cu,_custom:()=>Vy,_date:()=>Uy,_decode:()=>iu,_decodeAsync:()=>su,_default:()=>QU,_discriminatedUnion:()=>LU,_e164:()=>Wu,_email:()=>Eu,_emoji:()=>Ru,_encode:()=>ou,_encodeAsync:()=>au,_endsWith:()=>Mo,_enum:()=>BU,_file:()=>qy,_float32:()=>by,_float64:()=>wy,_gt:()=>ar,_gte:()=>ot,_guid:()=>Ja,_includes:()=>Co,_int:()=>xy,_int32:()=>ky,_int64:()=>Ey,_intersection:()=>FU,_ipv4:()=>Fu,_ipv6:()=>qu,_isoDate:()=>gy,_isoDateTime:()=>hy,_isoDuration:()=>yy,_isoTime:()=>vy,_jwt:()=>Gu,_ksuid:()=>Lu,_lazy:()=>aM,_length:()=>En,_literal:()=>GU,_lowercase:()=>Do,_lt:()=>ir,_lte:()=>wt,_mac:()=>fy,_map:()=>JU,_max:()=>wt,_maxLength:()=>Tn,_maxSize:()=>en,_mime:()=>Lo,_min:()=>ot,_minLength:()=>wr,_minSize:()=>sr,_multipleOf:()=>Qr,_nan:()=>Ly,_nanoid:()=>Du,_nativeEnum:()=>WU,_negative:()=>Xu,_never:()=>Ay,_nonnegative:()=>Qu,_nonoptional:()=>eM,_nonpositive:()=>Yu,_normalize:()=>Fo,_null:()=>Ny,_nullable:()=>YU,_number:()=>_y,_optional:()=>XU,_overwrite:()=>Gt,_parse:()=>To,_parseAsync:()=>Eo,_pipe:()=>nM,_positive:()=>Ku,_promise:()=>sM,_property:()=>el,_readonly:()=>oM,_record:()=>VU,_refine:()=>Jy,_regex:()=>Ro,_safeDecode:()=>uu,_safeDecodeAsync:()=>du,_safeEncode:()=>cu,_safeEncodeAsync:()=>lu,_safeParse:()=>Oo,_safeParseAsync:()=>jo,_set:()=>HU,_size:()=>Pn,_slugify:()=>Ho,_startsWith:()=>Uo,_string:()=>dy,_stringFormat:()=>Bo,_stringbool:()=>Gy,_success:()=>tM,_superRefine:()=>Hy,_symbol:()=>jy,_templateLiteral:()=>iM,_toLowerCase:()=>Vo,_toUpperCase:()=>Jo,_transform:()=>KU,_trim:()=>qo,_tuple:()=>qU,_uint32:()=>zy,_uint64:()=>Oy,_ulid:()=>Uu,_undefined:()=>Zy,_union:()=>UU,_unknown:()=>Dy,_uppercase:()=>Ao,_url:()=>Ha,_uuid:()=>Ou,_uuidv4:()=>ju,_uuidv6:()=>Zu,_uuidv7:()=>Nu,_void:()=>Cy,_xid:()=>Mu,_xor:()=>MU,clone:()=>nt,config:()=>Ze,createStandardJSONSchemaMethod:()=>Wo,createToJSONSchemaMethod:()=>Ky,decode:()=>l6,decodeAsync:()=>p6,describe:()=>By,encode:()=>u6,encodeAsync:()=>d6,extractDefs:()=>rn,finalize:()=>nn,flattenError:()=>Ra,formatError:()=>Da,globalConfig:()=>Ia,globalRegistry:()=>qe,initializeContext:()=>tn,isValidBase64:()=>$v,isValidBase64URL:()=>cI,isValidJWT:()=>uI,locales:()=>Va,meta:()=>Wy,parse:()=>ru,parseAsync:()=>nu,prettifyError:()=>ng,process:()=>pe,regexes:()=>Dt,registry:()=>Tu,safeDecode:()=>m6,safeDecodeAsync:()=>g6,safeEncode:()=>f6,safeEncodeAsync:()=>h6,safeParse:()=>og,safeParseAsync:()=>ig,toDotPath:()=>V0,toJSONSchema:()=>ol,treeifyError:()=>rg,util:()=>P,version:()=>Yg});var Jh=Object.freeze({status:"aborted"});function g(e,t,r){function o(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);let u=a.prototype,l=Object.keys(u);for(let d=0;d<l.length;d++){let p=l[d];p in s||(s[p]=u[p].bind(s))}}let n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function a(s){var c;let u=r?.Parent?new i:this;o(u,s),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Qc=Symbol("zod_brand"),Wt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Wr=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},Ia={};function Ze(e){return e&&Object.assign(Ia,e),Ia}var P={};Ct(P,{BIGINT_FORMAT_RANGES:()=>tg,Class:()=>Bh,NUMBER_FORMAT_RANGES:()=>eg,aborted:()=>Yr,allowsEval:()=>Kh,assert:()=>LC,assertEqual:()=>AC,assertIs:()=>UC,assertNever:()=>MC,assertNotEqual:()=>CC,assignProp:()=>Kr,base64ToUint8Array:()=>L0,base64urlToUint8Array:()=>o6,cached:()=>Io,captureStackTrace:()=>tu,cleanEnum:()=>n6,cleanRegex:()=>Ea,clone:()=>nt,cloneDef:()=>qC,createTransparentProxy:()=>GC,defineLazy:()=>Y,esc:()=>eu,escapeRegex:()=>Rt,extend:()=>YC,finalizeIssue:()=>pt,floatSafeRemainder:()=>Wh,getElementAtPath:()=>VC,getEnumValues:()=>Ta,getLengthableOrigin:()=>Za,getParsedType:()=>WC,getSizableOrigin:()=>ja,hexToUint8Array:()=>a6,isObject:()=>zn,isPlainObject:()=>Xr,issue:()=>Po,joinValues:()=>v,jsonStringifyReplacer:()=>So,merge:()=>e6,mergeDefs:()=>br,normalizeParams:()=>O,nullish:()=>Gr,numKeys:()=>BC,objectClone:()=>FC,omit:()=>XC,optionalKeys:()=>Qh,parsedType:()=>I,partial:()=>t6,pick:()=>KC,prefixIssues:()=>bt,primitiveTypes:()=>Yh,promiseAllObject:()=>JC,propertyKeyTypes:()=>Oa,randomString:()=>HC,required:()=>r6,safeExtend:()=>QC,shallowClone:()=>Xh,slugify:()=>Gh,stringifyPrimitive:()=>z,uint8ArrayToBase64:()=>F0,uint8ArrayToBase64url:()=>i6,uint8ArrayToHex:()=>s6,unwrapMessage:()=>Pa});function AC(e){return e}function CC(e){return e}function UC(e){}function MC(e){throw new Error("Unexpected value in exhaustive check")}function LC(e){}function Ta(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function v(e,t="|"){return e.map(r=>z(r)).join(t)}function So(e,t){return typeof t=="bigint"?t.toString():t}function Io(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function Gr(e){return e==null}function Ea(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function Wh(e,t){let r=(e.toString().split(".")[1]||"").length,o=t.toString(),n=(o.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(o)){let c=o.match(/\d?e-(\d?)/);c?.[1]&&(n=Number.parseInt(c[1]))}let i=r>n?r:n,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}var M0=Symbol("evaluating");function Y(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==M0)return o===void 0&&(o=M0,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function FC(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Kr(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function br(...e){let t={};for(let r of e){let o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function qC(e){return br(e._zod.def)}function VC(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function JC(e){let t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{let n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function HC(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function eu(e){return JSON.stringify(e)}function Gh(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var tu="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function zn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Kh=Io(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Xr(e){if(zn(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(zn(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Xh(e){return Xr(e)?{...e}:Array.isArray(e)?[...e]:e}function BC(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var WC=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}`)}},Oa=new Set(["string","number","symbol"]),Yh=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Rt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function nt(e,t,r){let o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function O(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 GC(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function z(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Qh(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var eg={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]},tg={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function KC(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=br(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=r.shape[s])}return Kr(this,"shape",a),a},checks:[]});return nt(e,i)}function XC(e,t){let r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=br(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return Kr(this,"shape",a),a},checks:[]});return nt(e,i)}function YC(e,t){if(!Xr(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=br(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Kr(this,"shape",i),i}});return nt(e,n)}function QC(e,t){if(!Xr(t))throw new Error("Invalid input to safeExtend: expected a plain object");let r=br(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Kr(this,"shape",o),o}});return nt(e,r)}function e6(e,t){let r=br(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Kr(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:[]});return nt(e,r)}function t6(e,t,r){let n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=br(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(r)for(let u in r){if(!(u in s))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=e?new e({type:"optional",innerType:s[u]}):s[u])}else for(let u in s)c[u]=e?new e({type:"optional",innerType:s[u]}):s[u];return Kr(this,"shape",c),c},checks:[]});return nt(t,a)}function r6(e,t,r){let o=br(t._zod.def,{get shape(){let n=t._zod.def.shape,i={...n};if(r)for(let a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(let a in n)i[a]=new e({type:"nonoptional",innerType:n[a]});return Kr(this,"shape",i),i}});return nt(t,o)}function Yr(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function bt(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Pa(e){return typeof e=="string"?e:e?.message}function pt(e,t,r){let o={...e,path:e.path??[]};if(!e.message){let n=Pa(e.inst?._zod.def?.error?.(e))??Pa(t?.error?.(e))??Pa(r.customError?.(e))??Pa(r.localeError?.(e))??"Invalid input";o.message=n}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function ja(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Za(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function I(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function Po(...e){let[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function n6(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function L0(e){let t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function F0(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function o6(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return L0(t+r)}function i6(e){return F0(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function a6(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function s6(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Bh=class{constructor(...t){}};var q0=(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,So,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Na=g("$ZodError",q0),ft=g("$ZodError",q0,{Parent:Error});function Ra(e,t=r=>r.message){let r={},o=[];for(let n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function Da(e,t=r=>r.message){let r={_errors:[]},o=n=>{for(let i of n.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>o({issues:a}));else if(i.code==="invalid_key")o({issues:i.issues});else if(i.code==="invalid_element")o({issues:i.issues});else if(i.path.length===0)r._errors.push(t(i));else{let a=r,s=0;for(;s<i.path.length;){let c=i.path[s];s===i.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(t(i))):a[c]=a[c]||{_errors:[]},a=a[c],s++}}};return o(e),r}function rg(e,t=r=>r.message){let r={errors:[]},o=(n,i=[])=>{var a,s;for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>o({issues:u},c.path));else if(c.code==="invalid_key")o({issues:c.issues},c.path);else if(c.code==="invalid_element")o({issues:c.issues},c.path);else{let u=[...i,...c.path];if(u.length===0){r.errors.push(t(c));continue}let l=r,d=0;for(;d<u.length;){let p=u[d],f=d===u.length-1;typeof p=="string"?(l.properties??(l.properties={}),(a=l.properties)[p]??(a[p]={errors:[]}),l=l.properties[p]):(l.items??(l.items=[]),(s=l.items)[p]??(s[p]={errors:[]}),l=l.items[p]),f&&l.errors.push(t(c)),d++}}};return o(e),r}function V0(e){let t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(let o of r)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 ng(e){let t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${V0(o.path)}`);return t.join(`
80
+ `)}var To=e=>(t,r,o,n)=>{let i=o?Object.assign(o,{async:!1}):{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new Wt;if(a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>pt(c,i,Ze())));throw tu(s,n?.callee),s}return a.value},ru=To(ft),Eo=e=>async(t,r,o,n)=>{let i=o?Object.assign(o,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(n?.Err??e)(a.issues.map(c=>pt(c,i,Ze())));throw tu(s,n?.callee),s}return a.value},nu=Eo(ft),Oo=e=>(t,r,o)=>{let n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new Wt;return i.issues.length?{success:!1,error:new(e??Na)(i.issues.map(a=>pt(a,n,Ze())))}:{success:!0,data:i.value}},og=Oo(ft),jo=e=>async(t,r,o)=>{let n=o?Object.assign(o,{async:!0}):{async:!0},i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>pt(a,n,Ze())))}:{success:!0,data:i.value}},ig=jo(ft),ou=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return To(e)(t,r,n)},u6=ou(ft),iu=e=>(t,r,o)=>To(e)(t,r,o),l6=iu(ft),au=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Eo(e)(t,r,n)},d6=au(ft),su=e=>async(t,r,o)=>Eo(e)(t,r,o),p6=su(ft),cu=e=>(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Oo(e)(t,r,n)},f6=cu(ft),uu=e=>(t,r,o)=>Oo(e)(t,r,o),m6=uu(ft),lu=e=>async(t,r,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return jo(e)(t,r,n)},h6=lu(ft),du=e=>async(t,r,o)=>jo(e)(t,r,o),g6=du(ft);var Dt={};Ct(Dt,{base64:()=>xg,base64url:()=>pu,bigint:()=>Ig,boolean:()=>Tg,browserEmail:()=>k6,cidrv4:()=>_g,cidrv6:()=>$g,cuid:()=>ag,cuid2:()=>sg,date:()=>wg,datetime:()=>zg,domain:()=>I6,duration:()=>pg,e164:()=>bg,email:()=>mg,emoji:()=>hg,extendedDuration:()=>v6,guid:()=>fg,hex:()=>P6,hostname:()=>S6,html5Email:()=>x6,idnEmail:()=>w6,integer:()=>Pg,ipv4:()=>gg,ipv6:()=>vg,ksuid:()=>lg,lowercase:()=>jg,mac:()=>yg,md5_base64:()=>E6,md5_base64url:()=>O6,md5_hex:()=>T6,nanoid:()=>dg,null:()=>Eg,number:()=>fu,rfc5322Email:()=>b6,sha1_base64:()=>Z6,sha1_base64url:()=>N6,sha1_hex:()=>j6,sha256_base64:()=>D6,sha256_base64url:()=>A6,sha256_hex:()=>R6,sha384_base64:()=>U6,sha384_base64url:()=>M6,sha384_hex:()=>C6,sha512_base64:()=>F6,sha512_base64url:()=>q6,sha512_hex:()=>L6,string:()=>Sg,time:()=>kg,ulid:()=>cg,undefined:()=>Og,unicodeEmail:()=>J0,uppercase:()=>Zg,uuid:()=>Sn,uuid4:()=>y6,uuid6:()=>_6,uuid7:()=>$6,xid:()=>ug});var ag=/^[cC][^\s-]{8,}$/,sg=/^[0-9a-z]+$/,cg=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ug=/^[0-9a-vA-V]{20}$/,lg=/^[A-Za-z0-9]{27}$/,dg=/^[a-zA-Z0-9_-]{21}$/,pg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,v6=/^[-+]?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)?)??$/,fg=/^([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})$/,Sn=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)$/,y6=Sn(4),_6=Sn(6),$6=Sn(7),mg=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,x6=/^[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])?)*$/,b6=/^(([^<>()\[\]\\.,;:\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,}))$/,J0=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,w6=J0,k6=/^[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])?)*$/,z6="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function hg(){return new RegExp(z6,"u")}var gg=/^(?:(?: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])$/,vg=/^(([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}|:))$/,yg=e=>{let t=Rt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},_g=/^((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])$/,$g=/^(([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])$/,xg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,pu=/^[A-Za-z0-9_-]*$/,S6=/^(?=.{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])?)*\.?$/,I6=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,bg=/^\+[1-9]\d{6,14}$/,H0="(?:(?:\\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])))",wg=new RegExp(`^${H0}$`);function B0(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 kg(e){return new RegExp(`^${B0(e)}$`)}function zg(e){let t=B0({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${r.join("|")})`;return new RegExp(`^${H0}T(?:${o})$`)}var Sg=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Ig=/^-?\d+n?$/,Pg=/^-?\d+$/,fu=/^-?\d+(?:\.\d+)?$/,Tg=/^(?:true|false)$/i,Eg=/^null$/i;var Og=/^undefined$/i;var jg=/^[^A-Z]*$/,Zg=/^[^a-z]*$/,P6=/^[0-9a-fA-F]*$/;function Aa(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Ca(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var T6=/^[0-9a-fA-F]{32}$/,E6=Aa(22,"=="),O6=Ca(22),j6=/^[0-9a-fA-F]{40}$/,Z6=Aa(27,"="),N6=Ca(27),R6=/^[0-9a-fA-F]{64}$/,D6=Aa(43,"="),A6=Ca(43),C6=/^[0-9a-fA-F]{96}$/,U6=Aa(64,""),M6=Ca(64),L6=/^[0-9a-fA-F]{128}$/,F6=Aa(86,"=="),q6=Ca(86);var xe=g("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),G0={number:"number",bigint:"bigint",object:"date"},mu=g("$ZodCheckLessThan",(e,t)=>{xe.init(e,t);let r=G0[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),hu=g("$ZodCheckGreaterThan",(e,t)=>{xe.init(e,t);let r=G0[typeof t.value];e._zod.onattach.push(o=>{let n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ng=g("$ZodCheckMultipleOf",(e,t)=>{xe.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):Wh(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),Rg=g("$ZodCheckNumberFormat",(e,t)=>{xe.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),o=r?"int":"number",[n,i]=eg[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=n,s.maximum=i,r&&(s.pattern=Pg)}),e._zod.check=a=>{let s=a.value;if(r){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,inclusive:!0,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,inclusive:!0,continue:!t.abort});return}}s<n&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Dg=g("$ZodCheckBigIntFormat",(e,t)=>{xe.init(e,t);let[r,o]=tg[t.format];e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o}),e._zod.check=n=>{let i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Ag=g("$ZodCheckMaxSize",(e,t)=>{var r;xe.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Gr(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;n.size<=t.maximum||o.issues.push({origin:ja(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Cg=g("$ZodCheckMinSize",(e,t)=>{var r;xe.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Gr(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;n.size>=t.minimum||o.issues.push({origin:ja(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Ug=g("$ZodCheckSizeEquals",(e,t)=>{var r;xe.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Gr(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=o=>{let n=o.value,i=n.size;if(i===t.size)return;let a=i>t.size;o.issues.push({origin:ja(n),...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})}}),Mg=g("$ZodCheckMaxLength",(e,t)=>{var r;xe.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Gr(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{let n=o.value;if(n.length<=t.maximum)return;let a=Za(n);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Lg=g("$ZodCheckMinLength",(e,t)=>{var r;xe.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Gr(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{let n=o.value;if(n.length>=t.minimum)return;let a=Za(n);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Fg=g("$ZodCheckLengthEquals",(e,t)=>{var r;xe.init(e,t),(r=e._zod.def).when??(r.when=o=>{let n=o.value;return!Gr(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{let n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{let n=o.value,i=n.length;if(i===t.length)return;let a=Za(n),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})}}),Zo=g("$ZodCheckStringFormat",(e,t)=>{var r,o;xe.init(e,t),e._zod.onattach.push(n=>{let i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),qg=g("$ZodCheckRegex",(e,t)=>{Zo.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Vg=g("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=jg),Zo.init(e,t)}),Jg=g("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Zg),Zo.init(e,t)}),Hg=g("$ZodCheckIncludes",(e,t)=>{xe.init(e,t);let r=Rt(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Bg=g("$ZodCheckStartsWith",(e,t)=>{xe.init(e,t);let r=new RegExp(`^${Rt(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),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})}}),Wg=g("$ZodCheckEndsWith",(e,t)=>{xe.init(e,t);let r=new RegExp(`.*${Rt(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),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 W0(e,t,r){e.issues.length&&t.issues.push(...bt(r,e.issues))}var Gg=g("$ZodCheckProperty",(e,t)=>{xe.init(e,t),e._zod.check=r=>{let o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>W0(n,r,t.property));W0(o,r,t.property)}}),Kg=g("$ZodCheckMimeType",(e,t)=>{xe.init(e,t);let r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),Xg=g("$ZodCheckOverwrite",(e,t)=>{xe.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var Ua=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(`
81
+ `).filter(a=>a),n=Math.min(...o.map(a=>a.length-a.trimStart().length)),i=o.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(let a of i)this.content.push(a)}compile(){let t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
82
+ `))}};var Yg={major:4,minor:3,patch:5};var B=g("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Yg;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let n of o)for(let i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(a,s,c)=>{let u=Yr(a),l;for(let d of s){if(d._zod.def.when){if(!d._zod.def.when(a))continue}else if(u)continue;let p=a.issues.length,f=d._zod.check(a);if(f instanceof Promise&&c?.async===!1)throw new Wt;if(l||f instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await f,a.issues.length!==p&&(u||(u=Yr(a,p)))});else{if(a.issues.length===p)continue;u||(u=Yr(a,p))}}return l?l.then(()=>a):a},i=(a,s,c)=>{if(Yr(a))return a.aborted=!0,a;let u=n(s,o,c);if(u instanceof Promise){if(c.async===!1)throw new Wt;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let u=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(l=>i(l,a,s)):i(u,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Wt;return c.then(u=>n(u,o,s))}return n(c,o,s)}}Y(e,"~standard",()=>({validate:n=>{try{let i=og(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return ig(e,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),In=g("$ZodString",(e,t)=>{B.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Sg(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),ge=g("$ZodStringFormat",(e,t)=>{Zo.init(e,t),In.init(e,t)}),ev=g("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=fg),ge.init(e,t)}),tv=g("$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=Sn(o))}else t.pattern??(t.pattern=Sn());ge.init(e,t)}),rv=g("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=mg),ge.init(e,t)}),nv=g("$ZodURL",(e,t)=>{ge.init(e,t),e._zod.check=r=>{try{let o=r.value.trim(),n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),ov=g("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=hg()),ge.init(e,t)}),iv=g("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=dg),ge.init(e,t)}),av=g("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ag),ge.init(e,t)}),sv=g("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=sg),ge.init(e,t)}),cv=g("$ZodULID",(e,t)=>{t.pattern??(t.pattern=cg),ge.init(e,t)}),uv=g("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ug),ge.init(e,t)}),lv=g("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=lg),ge.init(e,t)}),dv=g("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=zg(t)),ge.init(e,t)}),pv=g("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=wg),ge.init(e,t)}),fv=g("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=kg(t)),ge.init(e,t)}),mv=g("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=pg),ge.init(e,t)}),hv=g("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=gg),ge.init(e,t),e._zod.bag.format="ipv4"}),gv=g("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=vg),ge.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),vv=g("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=yg(t.delimiter)),ge.init(e,t),e._zod.bag.format="mac"}),yv=g("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=_g),ge.init(e,t)}),_v=g("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=$g),ge.init(e,t),e._zod.check=r=>{let o=r.value.split("/");try{if(o.length!==2)throw new Error;let[n,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://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function $v(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var xv=g("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=xg),ge.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{$v(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function cI(e){if(!pu.test(e))return!1;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return $v(r)}var bv=g("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=pu),ge.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{cI(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),wv=g("$ZodE164",(e,t)=>{t.pattern??(t.pattern=bg),ge.init(e,t)});function uI(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[o]=r;if(!o)return!1;let n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var kv=g("$ZodJWT",(e,t)=>{ge.init(e,t),e._zod.check=r=>{uI(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),zv=g("$ZodCustomStringFormat",(e,t)=>{ge.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),xu=g("$ZodNumber",(e,t)=>{B.init(e,t),e._zod.pattern=e._zod.bag.pattern??fu,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r}}),Sv=g("$ZodNumberFormat",(e,t)=>{Rg.init(e,t),xu.init(e,t)}),Ma=g("$ZodBoolean",(e,t)=>{B.init(e,t),e._zod.pattern=Tg,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),bu=g("$ZodBigInt",(e,t)=>{B.init(e,t),e._zod.pattern=Ig,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Iv=g("$ZodBigIntFormat",(e,t)=>{Dg.init(e,t),bu.init(e,t)}),Pv=g("$ZodSymbol",(e,t)=>{B.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Tv=g("$ZodUndefined",(e,t)=>{B.init(e,t),e._zod.pattern=Og,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Ev=g("$ZodNull",(e,t)=>{B.init(e,t),e._zod.pattern=Eg,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),Ov=g("$ZodAny",(e,t)=>{B.init(e,t),e._zod.parse=r=>r}),jv=g("$ZodUnknown",(e,t)=>{B.init(e,t),e._zod.parse=r=>r}),Zv=g("$ZodNever",(e,t)=>{B.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Nv=g("$ZodVoid",(e,t)=>{B.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),Rv=g("$ZodDate",(e,t)=>{B.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r}});function X0(e,t,r){e.issues.length&&t.issues.push(...bt(r,e.issues)),t.value[r]=e.value}var Dv=g("$ZodArray",(e,t)=>{B.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);let i=[];for(let a=0;a<n.length;a++){let s=n[a],c=t.element._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(u=>X0(u,r,a))):X0(c,r,a)}return i.length?Promise.all(i).then(()=>r):r}});function $u(e,t,r,o,n){if(e.issues.length){if(n&&!(r in o))return;t.issues.push(...bt(r,e.issues))}e.value===void 0?r in o&&(t.value[r]=void 0):t.value[r]=e.value}function lI(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 r=Qh(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function dI(e,t,r,o,n,i){let a=[],s=n.keySet,c=n.catchall._zod,u=c.def.type,l=c.optout==="optional";for(let d in t){if(s.has(d))continue;if(u==="never"){a.push(d);continue}let p=c.run({value:t[d],issues:[]},o);p instanceof Promise?e.push(p.then(f=>$u(f,r,d,t,l))):$u(p,r,d,t,l)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}var pI=g("$ZodObject",(e,t)=>{if(B.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let o=Io(()=>lI(t));Y(e._zod,"propValues",()=>{let s=t.shape,c={};for(let u in s){let l=s[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let d of l.values)c[u].add(d)}}return c});let n=zn,i=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=o.value);let u=s.value;if(!n(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),s;s.value={};let l=[],d=a.shape;for(let p of a.keys){let f=d[p],m=f._zod.optout==="optional",h=f._zod.run({value:u[p],issues:[]},c);h instanceof Promise?l.push(h.then(y=>$u(y,s,p,u,m))):$u(h,s,p,u,m)}return i?dI(l,u,s,c,o.value,e):l.length?Promise.all(l).then(()=>s):s}}),Av=g("$ZodObjectJIT",(e,t)=>{pI.init(e,t);let r=e._zod.parse,o=Io(()=>lI(t)),n=p=>{let f=new Ua(["shape","payload","ctx"]),m=o.value,h=w=>{let b=eu(w);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};f.write("const input = payload.value;");let y=Object.create(null),x=0;for(let w of m.keys)y[w]=`key_${x++}`;f.write("const newResult = {};");for(let w of m.keys){let b=y[w],k=eu(w),me=p[w]?._zod?.optout==="optional";f.write(`const ${b} = ${h(w)};`),me?f.write(`
83
+ if (${b}.issues.length) {
84
+ if (${k} in input) {
85
+ payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
86
+ ...iss,
87
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
88
+ })));
89
+ }
90
+ }
91
+
92
+ if (${b}.value === undefined) {
93
+ if (${k} in input) {
94
+ newResult[${k}] = undefined;
95
+ }
96
+ } else {
97
+ newResult[${k}] = ${b}.value;
98
+ }
99
+
100
+ `):f.write(`
101
+ if (${b}.issues.length) {
102
+ payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
103
+ ...iss,
104
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
105
+ })));
106
+ }
107
+
108
+ if (${b}.value === undefined) {
109
+ if (${k} in input) {
110
+ newResult[${k}] = undefined;
111
+ }
112
+ } else {
113
+ newResult[${k}] = ${b}.value;
114
+ }
115
+
116
+ `)}f.write("payload.value = newResult;"),f.write("return payload;");let E=f.compile();return(w,b)=>E(p,w,b)},i,a=zn,s=!Ia.jitless,u=s&&Kh.value,l=t.catchall,d;e._zod.parse=(p,f)=>{d??(d=o.value);let m=p.value;return a(m)?s&&u&&f?.async===!1&&f.jitless!==!0?(i||(i=n(t.shape)),p=i(p,f),l?dI([],m,p,f,d,e):p):r(p,f):(p.issues.push({expected:"object",code:"invalid_type",input:m,inst:e}),p)}});function Y0(e,t,r,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let n=e.filter(i=>!Yr(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>pt(a,o,Ze())))}),t)}var La=g("$ZodUnion",(e,t)=>{B.init(e,t),Y(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Y(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Y(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Y(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){let n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>Ea(i.source)).join("|")})$`)}});let r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(r)return o(n,i);let a=!1,s=[];for(let c of t.options){let u=c._zod.run({value:n.value,issues:[]},i);if(u instanceof Promise)s.push(u),a=!0;else{if(u.issues.length===0)return u;s.push(u)}}return a?Promise.all(s).then(c=>Y0(c,n,e,i)):Y0(s,n,e,i)}});function Q0(e,t,r,o){let n=e.filter(i=>i.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>pt(a,o,Ze())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}var Cv=g("$ZodXor",(e,t)=>{La.init(e,t),t.inclusive=!1;let r=t.options.length===1,o=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(r)return o(n,i);let a=!1,s=[];for(let c of t.options){let u=c._zod.run({value:n.value,issues:[]},i);u instanceof Promise?(s.push(u),a=!0):s.push(u)}return a?Promise.all(s).then(c=>Q0(c,n,e,i)):Q0(s,n,e,i)}}),Uv=g("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,La.init(e,t);let r=e._zod.parse;Y(e._zod,"propValues",()=>{let n={};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)){n[s]||(n[s]=new Set);for(let u of c)n[s].add(u)}}return n});let o=Io(()=>{let n=t.options,i=new Map;for(let a of n){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=(n,i)=>{let a=n.value;if(!zn(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;let s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(n,i):t.unionFallback?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),n)}}),Mv=g("$ZodIntersection",(e,t)=>{B.init(e,t),e._zod.parse=(r,o)=>{let n=r.value,i=t.left._zod.run({value:n,issues:[]},o),a=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,u])=>eI(r,c,u)):eI(r,i,a)}});function Qg(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(Xr(e)&&Xr(t)){let r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(let i of o){let a=Qg(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n[i]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let o=0;o<e.length;o++){let n=e[o],i=t[o],a=Qg(n,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function eI(e,t,r){let o=new Map,n;for(let s of t.issues)if(s.code==="unrecognized_keys"){n??(n=s);for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).l=!0}else e.issues.push(s);for(let s of r.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)o.has(c)||o.set(c,{}),o.get(c).r=!0;else e.issues.push(s);let i=[...o].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&n&&e.issues.push({...n,keys:i}),Yr(e))return e;let a=Qg(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var wu=g("$ZodTuple",(e,t)=>{B.init(e,t);let r=t.items;e._zod.parse=(o,n)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let a=[],s=[...r].reverse().findIndex(l=>l._zod.optin!=="optional"),c=s===-1?0:r.length-s;if(!t.rest){let l=i.length>r.length,d=i.length<c-1;if(l||d)return o.issues.push({...l?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:i,inst:e,origin:"array"}),o}let u=-1;for(let l of r){if(u++,u>=i.length&&u>=c)continue;let d=l._zod.run({value:i[u],issues:[]},n);d instanceof Promise?a.push(d.then(p=>gu(p,o,u))):gu(d,o,u)}if(t.rest){let l=i.slice(r.length);for(let d of l){u++;let p=t.rest._zod.run({value:d,issues:[]},n);p instanceof Promise?a.push(p.then(f=>gu(f,o,u))):gu(p,o,u)}}return a.length?Promise.all(a).then(()=>o):o}});function gu(e,t,r){e.issues.length&&t.issues.push(...bt(r,e.issues)),t.value[r]=e.value}var Lv=g("$ZodRecord",(e,t)=>{B.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!Xr(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;let i=[],a=t.keyType._zod.values;if(a){r.value={};let s=new Set;for(let u of a)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){s.add(typeof u=="number"?u.toString():u);let l=t.valueType._zod.run({value:n[u],issues:[]},o);l instanceof Promise?i.push(l.then(d=>{d.issues.length&&r.issues.push(...bt(u,d.issues)),r.value[u]=d.value})):(l.issues.length&&r.issues.push(...bt(u,l.issues)),r.value[u]=l.value)}let c;for(let u in n)s.has(u)||(c=c??[],c.push(u));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:c})}else{r.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__")continue;let c=t.keyType._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&fu.test(s)&&c.issues.length&&c.issues.some(d=>d.code==="invalid_type"&&d.expected==="number")){let d=t.keyType._zod.run({value:Number(s),issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){t.mode==="loose"?r.value[s]=n[s]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>pt(d,o,Ze())),input:s,path:[s],inst:e});continue}let l=t.valueType._zod.run({value:n[s],issues:[]},o);l instanceof Promise?i.push(l.then(d=>{d.issues.length&&r.issues.push(...bt(s,d.issues)),r.value[c.value]=d.value})):(l.issues.length&&r.issues.push(...bt(s,l.issues)),r.value[c.value]=l.value)}}return i.length?Promise.all(i).then(()=>r):r}}),Fv=g("$ZodMap",(e,t)=>{B.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;let i=[];r.value=new Map;for(let[a,s]of n){let c=t.keyType._zod.run({value:a,issues:[]},o),u=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([l,d])=>{tI(l,d,r,a,n,e,o)})):tI(c,u,r,a,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function tI(e,t,r,o,n,i,a){e.issues.length&&(Oa.has(typeof o)?r.issues.push(...bt(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(s=>pt(s,a,Ze()))})),t.issues.length&&(Oa.has(typeof o)?r.issues.push(...bt(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(s=>pt(s,a,Ze()))})),r.value.set(e.value,t.value)}var qv=g("$ZodSet",(e,t)=>{B.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;let i=[];r.value=new Set;for(let a of n){let s=t.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(c=>rI(c,r))):rI(s,r)}return i.length?Promise.all(i).then(()=>r):r}});function rI(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Vv=g("$ZodEnum",(e,t)=>{B.init(e,t);let r=Ta(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>Oa.has(typeof n)).map(n=>typeof n=="string"?Rt(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{let a=n.value;return o.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),Jv=g("$ZodLiteral",(e,t)=>{if(B.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?Rt(o):o?Rt(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{let i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),Hv=g("$ZodFile",(e,t)=>{B.init(e,t),e._zod.parse=(r,o)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),Bv=g("$ZodTransform",(e,t)=>{B.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Wr(e.constructor.name);let n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new Wt;return r.value=n,r}});function nI(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var ku=g("$ZodOptional",(e,t)=>{B.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Y(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ea(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>nI(i,r.value)):nI(n,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),Wv=g("$ZodExactOptional",(e,t)=>{ku.init(e,t),Y(e._zod,"values",()=>t.innerType._zod.values),Y(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),Gv=g("$ZodNullable",(e,t)=>{B.init(e,t),Y(e._zod,"optin",()=>t.innerType._zod.optin),Y(e._zod,"optout",()=>t.innerType._zod.optout),Y(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ea(r.source)}|null)$`):void 0}),Y(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),Kv=g("$ZodDefault",(e,t)=>{B.init(e,t),e._zod.optin="optional",Y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>oI(i,t)):oI(n,t)}});function oI(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Xv=g("$ZodPrefault",(e,t)=>{B.init(e,t),e._zod.optin="optional",Y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),Yv=g("$ZodNonOptional",(e,t)=>{B.init(e,t),Y(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>iI(i,e)):iI(n,e)}});function iI(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 Qv=g("$ZodSuccess",(e,t)=>{B.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Wr("ZodSuccess");let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),ey=g("$ZodCatch",(e,t)=>{B.init(e,t),Y(e._zod,"optin",()=>t.innerType._zod.optin),Y(e._zod,"optout",()=>t.innerType._zod.optout),Y(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(a=>pt(a,o,Ze()))},input:r.value}),r.issues=[]),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>pt(i,o,Ze()))},input:r.value}),r.issues=[]),r)}}),ty=g("$ZodNaN",(e,t)=>{B.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),ry=g("$ZodPipe",(e,t)=>{B.init(e,t),Y(e._zod,"values",()=>t.in._zod.values),Y(e._zod,"optin",()=>t.in._zod.optin),Y(e._zod,"optout",()=>t.out._zod.optout),Y(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>vu(a,t.in,o)):vu(i,t.in,o)}let n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>vu(i,t.out,o)):vu(n,t.out,o)}});function vu(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var Fa=g("$ZodCodec",(e,t)=>{B.init(e,t),Y(e._zod,"values",()=>t.in._zod.values),Y(e._zod,"optin",()=>t.in._zod.optin),Y(e._zod,"optout",()=>t.out._zod.optout),Y(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(r,o);return i instanceof Promise?i.then(a=>yu(a,t,o)):yu(i,t,o)}else{let i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>yu(a,t,o)):yu(i,t,o)}}});function yu(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>_u(e,i,t.out,r)):_u(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>_u(e,i,t.in,r)):_u(e,n,t.in,r)}}function _u(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}var ny=g("$ZodReadonly",(e,t)=>{B.init(e,t),Y(e._zod,"propValues",()=>t.innerType._zod.propValues),Y(e._zod,"values",()=>t.innerType._zod.values),Y(e._zod,"optin",()=>t.innerType?._zod?.optin),Y(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);let n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(aI):aI(n)}});function aI(e){return e.value=Object.freeze(e.value),e}var oy=g("$ZodTemplateLiteral",(e,t)=>{B.init(e,t);let r=[];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 n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,a))}else if(o===null||Yh.has(typeof o))r.push(Rt(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",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)}),iy=g("$ZodFunction",(e,t)=>(B.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){let n=e._def.input?ru(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?ru(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await nu(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await nu(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new wu({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),ay=g("$ZodPromise",(e,t)=>{B.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),sy=g("$ZodLazy",(e,t)=>{B.init(e,t),Y(e._zod,"innerType",()=>t.getter()),Y(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Y(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Y(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Y(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),cy=g("$ZodCustom",(e,t)=>{xe.init(e,t),B.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{let o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>sI(i,r,o,e));sI(n,r,o,e)}});function sI(e,t,r,o){if(!e){let n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(Po(n))}}var Va={};Ct(Va,{ar:()=>fI,az:()=>mI,be:()=>gI,bg:()=>vI,ca:()=>yI,cs:()=>_I,da:()=>$I,de:()=>xI,en:()=>zu,eo:()=>bI,es:()=>wI,fa:()=>kI,fi:()=>zI,fr:()=>SI,frCA:()=>II,he:()=>PI,hu:()=>TI,hy:()=>OI,id:()=>jI,is:()=>ZI,it:()=>NI,ja:()=>RI,ka:()=>DI,kh:()=>AI,km:()=>Su,ko:()=>CI,lt:()=>MI,mk:()=>LI,ms:()=>FI,nl:()=>qI,no:()=>VI,ota:()=>JI,pl:()=>BI,ps:()=>HI,pt:()=>WI,ru:()=>KI,sl:()=>XI,sv:()=>YI,ta:()=>QI,th:()=>eP,tr:()=>tP,ua:()=>rP,uk:()=>Iu,ur:()=>nP,uz:()=>oP,vi:()=>iP,yo:()=>cP,zhCN:()=>aP,zhTW:()=>sP});var J6=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\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 instanceof ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\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 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return n.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 ${z(n.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: ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;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 "${n.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}`:`${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${v(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.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 ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function fI(){return{localeError:J6()}}var H6=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${z(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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 ${r[i.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${v(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function mI(){return{localeError:H6()}}function hI(e,t,r,o){let n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}var B6=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return n.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 ${z(n.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 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=hI(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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=hI(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 ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${n.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 ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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 ${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${v(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.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 ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function gI(){return{localeError:B6()}}var W6=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",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:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${z(n.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${n.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[i.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${v(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function vI(){return{localeError:W6()}}var G6=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${z(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${v(n.values," o ")}`;case"too_big":{let i=n.inclusive?"com a m\xE0xim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;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 ${r[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}};function yI(){return{localeError:G6()}}var K6=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${z(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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 ${r[i.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${v(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function _I(){return{localeError:K6()}}var X6=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}let r={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"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${z(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${v(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}};function $I(){return{localeError:X6()}}var Y6=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${z(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{let i=n;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: ${r[i.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${v(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}};function xI(){return{localeError:Y6()}}var Q6=()=>{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"},map:{unit:"entries",verb:"to have"}};function t(n){return e[n]??null}let r={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",mac:"MAC 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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${z(n.values[0])}`:`Invalid option: expected one of ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${a.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function zu(){return{localeError:Q6()}}var eU=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${z(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function bI(){return{localeError:eU()}}var tU=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let r={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"},o={nan:"NaN",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"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${z(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${n.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function wI(){return{localeError:tU()}}var rU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${z(n.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 ${v(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=n;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`:`${r[i.format]??n.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 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${v(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.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 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function kI(){return{localeError:rU()}}var nU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${z(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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 ${r[i.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${v(n.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 zI(){return{localeError:nU()}}var oU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"nombre",array:"tableau"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${z(n.values[0])} attendu`:`Option invalide : une valeur parmi ${v(n.values,"|")} attendue`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${n.origin??"valeur"} doit ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${n.origin??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${n.origin} doit ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${n.origin} doit \xEAtre ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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}`:`${r[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${v(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function SI(){return{localeError:oU()}}var iU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${z(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u2264":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u2265":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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}`:`${r[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${v(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function II(){return{localeError:iU()}}var aU=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},r=u=>u?e[u]:void 0,o=u=>{let l=r(u);return l?l.label:u??e.unknown.label},n=u=>`\u05D4${o(u)}`,i=u=>(r(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=u=>u?t[u]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let l=u.expected,d=c[l??""]??o(l),p=I(u.input),f=c[p]??e[p]?.label??p;return/^[A-Z]/.test(u.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${u.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}case"invalid_value":{if(u.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${z(u.values[0])}`;let l=u.values.map(f=>z(f));if(u.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l[0]} \u05D0\u05D5 ${l[1]}`;let d=l[l.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let l=a(u.origin),d=n(u.origin??"value");if(u.origin==="string")return`${l?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let m=u.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${u.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(u.origin==="array"||u.origin==="set"){let m=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",h=u.inclusive?`${u.maximum} ${l?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${l?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let p=u.inclusive?"<=":"<",f=i(u.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${u.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${u.maximum.toString()}`}case"too_small":{let l=a(u.origin),d=n(u.origin??"value");if(u.origin==="string")return`${l?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let m=u.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${u.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}`}if(u.origin==="array"||u.origin==="set"){let m=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let y=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`}let h=u.inclusive?`${u.minimum} ${l?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${l?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${m} \u05DC\u05D4\u05DB\u05D9\u05DC ${h}`.trim()}let p=u.inclusive?">=":">",f=i(u.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${u.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${f} ${p}${u.minimum.toString()}`}case"invalid_format":{let l=u;if(l.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${l.prefix}"`;if(l.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${l.suffix}"`;if(l.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${l.includes}"`;if(l.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${l.pattern}`;let d=s[l.format],p=d?.label??l.format,m=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${p} \u05DC\u05D0 ${m}`}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 ${u.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${v(u.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";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${n(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function PI(){return{localeError:aU()}}var sU=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${z(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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 ${r[i.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function TI(){return{localeError:sU()}}function EI(e,t,r){return Math.abs(e)===1?t:r}function No(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}var cU=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(n){return e[n]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return n.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${z(n.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=EI(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${No(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${No(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=EI(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${No(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${No(n.origin)} \u056C\u056B\u0576\u056B ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.format]??n.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${v(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${No(n.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${No(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function OI(){return{localeError:cU()}}var uU=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r={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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${z(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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}`:`${r[i.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function jI(){return{localeError:uU()}}var lU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${z(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${i}${n.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${i}${n.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${v(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}};function ZI(){return{localeError:lU()}}var dU=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${z(n.values[0])}`:`Opzione non valida: atteso uno tra ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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 ${r[i.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${v(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function NI(){return{localeError:dU()}}var pU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${z(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${v(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(n.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(n.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=n;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${r[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.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${n.keys.length>1?"\u7FA4":""}: ${v(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function RI(){return{localeError:pU()}}var fU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10E1\u10E2\u10E0\u10D8\u10DC\u10D2\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\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 instanceof ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\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 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return n.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 ${z(n.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 ${v(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\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 ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.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 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.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 "${i.prefix}"-\u10D8\u10D7`:i.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 "${i.suffix}"-\u10D8\u10D7`:i.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 "${i.includes}"-\u10E1`:i.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 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.format]??n.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 ${n.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${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${v(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.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 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function DI(){return{localeError:fU()}}var mU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\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 instanceof ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\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 ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return n.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 ${z(n.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 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;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 ${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${v(n.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 ${n.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 ${n.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 Su(){return{localeError:mU()}}function AI(){return Su()}var hU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${z(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${v(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${a}`}case"too_small":{let i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=n;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 ${r[i.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${v(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function CI(){return{localeError:hU()}}var qa=e=>e.charAt(0).toUpperCase()+e.slice(1);function UI(e){let t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}var gU=()=>{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(n,i,a,s){let c=e[n]??null;return c===null?c:{unit:c.unit[i],verb:c.verb[s][a?"inclusive":"notInclusive"]}}let r={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"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${z(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${v(n.values,"|")} pasirinkim\u0173`;case"too_big":{let i=o[n.origin]??n.origin,a=t(n.origin,UI(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${qa(i??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.maximum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${qa(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.maximum.toString()} ${a?.unit}`}case"too_small":{let i=o[n.origin]??n.origin,a=t(n.origin,UI(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${qa(i??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.minimum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${qa(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${v(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=o[n.origin]??n.origin;return`${qa(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function MI(){return{localeError:gU()}}var vU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${z(n.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 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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 ${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`${n.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"}: ${v(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.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 ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function LI(){return{localeError:vU()}}var yU=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${z(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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}`:`${r[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${v(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function FI(){return{localeError:yU()}}var _U=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${z(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin),s=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin),s=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{let i=n;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: ${r[i.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function qI(){return{localeError:_U()}}var $U=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${z(n.values[0])}`:`Ugyldig valg: forventet en av ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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 ${r[i.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${v(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function VI(){return{localeError:$U()}}var xU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${z(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=n;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 ${r[i.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function JI(){return{localeError:xU()}}var bU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${z(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${v(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=n;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`:`${r[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${v(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.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 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function HI(){return{localeError:bU()}}var wU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${z(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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) ${r[i.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function BI(){return{localeError:wU()}}var kU=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${z(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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}`:`${r[i.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${v(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}};function WI(){return{localeError:kU()}}function GI(e,t,r,o){let n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}var zU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${z(n.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 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=GI(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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=GI(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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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 ${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${v(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.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 ${n.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 KI(){return{localeError:zU()}}var SU=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${z(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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 ${r[i.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${v(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function XI(){return{localeError:SU()}}var IU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${z(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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) ${r[i.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${v(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function YI(){return{localeError:IU()}}var PU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\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 instanceof ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\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 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return n.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 ${z(n.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 ${v(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.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 ${n.origin} ${i}${n.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 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=n;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 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.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${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${v(n.keys,", ")}`;case"invalid_key":return`${n.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`${n.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 QI(){return{localeError:PU()}}var TU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\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 instanceof ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\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 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${z(n.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 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case"invalid_format":{let i=n;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: ${r[i.format]??n.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 ${n.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: ${v(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.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 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function eP(){return{localeError:TU()}}var EU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${z(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${v(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function tP(){return{localeError:EU()}}var OU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\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 instanceof ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\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 ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return n.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 ${z(n.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 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.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 ${n.origin} ${a.verb} ${i}${n.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 ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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 ${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${v(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.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 ${n.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 Iu(){return{localeError:OU()}}function rP(){return Iu()}var jU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${z(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${v(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.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: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=n;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 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.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${n.keys.length>1?"\u0632":""}: ${v(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function nP(){return{localeError:jU()}}var ZU=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"}};function t(n){return e[n]??null}let r={regex:"kirish",email:"elektron pochta manzili",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 sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${z(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${v(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function oP(){return{localeError:ZU()}}var NU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${z(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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}`:`${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${v(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.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 ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function iP(){return{localeError:NU()}}var RU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${z(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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${r[i.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${v(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function aP(){return{localeError:RU()}}var DU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${z(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case"invalid_format":{let i=n;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 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${v(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function sP(){return{localeError:DU()}}var AU=()=>{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(n){return e[n]??null}let r={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"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let i=o[n.expected]??n.expected,a=I(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${z(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${v(n.values,"|")}`;case"too_big":{let i=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${a.verb} ${i}${n.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case"too_small":{let i=n.inclusive?">=":">",a=t(n.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${a.verb} ${i}${n.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case"invalid_format":{let i=n;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: ${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${v(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.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 ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function cP(){return{localeError:AU()}}var uP,uy=Symbol("ZodOutput"),ly=Symbol("ZodInput"),Pu=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let o=r[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let o={...this.get(r)??{}};delete o.id;let n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Tu(){return new Pu}(uP=globalThis).__zod_globalRegistry??(uP.__zod_globalRegistry=Tu());var qe=globalThis.__zod_globalRegistry;function dy(e,t){return new e({type:"string",...O(t)})}function py(e,t){return new e({type:"string",coerce:!0,...O(t)})}function Eu(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...O(t)})}function Ja(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...O(t)})}function Ou(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...O(t)})}function ju(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...O(t)})}function Zu(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...O(t)})}function Nu(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...O(t)})}function Ha(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...O(t)})}function Ru(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...O(t)})}function Du(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...O(t)})}function Au(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...O(t)})}function Cu(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...O(t)})}function Uu(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...O(t)})}function Mu(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...O(t)})}function Lu(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...O(t)})}function Fu(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...O(t)})}function qu(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...O(t)})}function fy(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...O(t)})}function Vu(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...O(t)})}function Ju(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...O(t)})}function Hu(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...O(t)})}function Bu(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...O(t)})}function Wu(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...O(t)})}function Gu(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...O(t)})}var my={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function hy(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...O(t)})}function gy(e,t){return new e({type:"string",format:"date",check:"string_format",...O(t)})}function vy(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...O(t)})}function yy(e,t){return new e({type:"string",format:"duration",check:"string_format",...O(t)})}function _y(e,t){return new e({type:"number",checks:[],...O(t)})}function $y(e,t){return new e({type:"number",coerce:!0,checks:[],...O(t)})}function xy(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...O(t)})}function by(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...O(t)})}function wy(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...O(t)})}function ky(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...O(t)})}function zy(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...O(t)})}function Sy(e,t){return new e({type:"boolean",...O(t)})}function Iy(e,t){return new e({type:"boolean",coerce:!0,...O(t)})}function Py(e,t){return new e({type:"bigint",...O(t)})}function Ty(e,t){return new e({type:"bigint",coerce:!0,...O(t)})}function Ey(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...O(t)})}function Oy(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...O(t)})}function jy(e,t){return new e({type:"symbol",...O(t)})}function Zy(e,t){return new e({type:"undefined",...O(t)})}function Ny(e,t){return new e({type:"null",...O(t)})}function Ry(e){return new e({type:"any"})}function Dy(e){return new e({type:"unknown"})}function Ay(e,t){return new e({type:"never",...O(t)})}function Cy(e,t){return new e({type:"void",...O(t)})}function Uy(e,t){return new e({type:"date",...O(t)})}function My(e,t){return new e({type:"date",coerce:!0,...O(t)})}function Ly(e,t){return new e({type:"nan",...O(t)})}function ir(e,t){return new mu({check:"less_than",...O(t),value:e,inclusive:!1})}function wt(e,t){return new mu({check:"less_than",...O(t),value:e,inclusive:!0})}function ar(e,t){return new hu({check:"greater_than",...O(t),value:e,inclusive:!1})}function ot(e,t){return new hu({check:"greater_than",...O(t),value:e,inclusive:!0})}function Ku(e){return ar(0,e)}function Xu(e){return ir(0,e)}function Yu(e){return wt(0,e)}function Qu(e){return ot(0,e)}function Qr(e,t){return new Ng({check:"multiple_of",...O(t),value:e})}function en(e,t){return new Ag({check:"max_size",...O(t),maximum:e})}function sr(e,t){return new Cg({check:"min_size",...O(t),minimum:e})}function Pn(e,t){return new Ug({check:"size_equals",...O(t),size:e})}function Tn(e,t){return new Mg({check:"max_length",...O(t),maximum:e})}function wr(e,t){return new Lg({check:"min_length",...O(t),minimum:e})}function En(e,t){return new Fg({check:"length_equals",...O(t),length:e})}function Ro(e,t){return new qg({check:"string_format",format:"regex",...O(t),pattern:e})}function Do(e){return new Vg({check:"string_format",format:"lowercase",...O(e)})}function Ao(e){return new Jg({check:"string_format",format:"uppercase",...O(e)})}function Co(e,t){return new Hg({check:"string_format",format:"includes",...O(t),includes:e})}function Uo(e,t){return new Bg({check:"string_format",format:"starts_with",...O(t),prefix:e})}function Mo(e,t){return new Wg({check:"string_format",format:"ends_with",...O(t),suffix:e})}function el(e,t,r){return new Gg({check:"property",property:e,schema:t,...O(r)})}function Lo(e,t){return new Kg({check:"mime_type",mime:e,...O(t)})}function Gt(e){return new Xg({check:"overwrite",tx:e})}function Fo(e){return Gt(t=>t.normalize(e))}function qo(){return Gt(e=>e.trim())}function Vo(){return Gt(e=>e.toLowerCase())}function Jo(){return Gt(e=>e.toUpperCase())}function Ho(){return Gt(e=>Gh(e))}function Fy(e,t,r){return new e({type:"array",element:t,...O(r)})}function UU(e,t,r){return new e({type:"union",options:t,...O(r)})}function MU(e,t,r){return new e({type:"union",options:t,inclusive:!1,...O(r)})}function LU(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...O(o)})}function FU(e,t,r){return new e({type:"intersection",left:t,right:r})}function qU(e,t,r,o){let n=r instanceof B,i=n?o:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...O(i)})}function VU(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...O(o)})}function JU(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...O(o)})}function HU(e,t,r){return new e({type:"set",valueType:t,...O(r)})}function BU(e,t,r){let o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...O(r)})}function WU(e,t,r){return new e({type:"enum",entries:t,...O(r)})}function GU(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...O(r)})}function qy(e,t){return new e({type:"file",...O(t)})}function KU(e,t){return new e({type:"transform",transform:t})}function XU(e,t){return new e({type:"optional",innerType:t})}function YU(e,t){return new e({type:"nullable",innerType:t})}function QU(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Xh(r)}})}function eM(e,t,r){return new e({type:"nonoptional",innerType:t,...O(r)})}function tM(e,t){return new e({type:"success",innerType:t})}function rM(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function nM(e,t,r){return new e({type:"pipe",in:t,out:r})}function oM(e,t){return new e({type:"readonly",innerType:t})}function iM(e,t,r){return new e({type:"template_literal",parts:t,...O(r)})}function aM(e,t){return new e({type:"lazy",getter:t})}function sM(e,t){return new e({type:"promise",innerType:t})}function Vy(e,t,r){let o=O(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function Jy(e,t,r){return new e({type:"custom",check:"custom",fn:t,...O(r)})}function Hy(e){let t=lP(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(Po(o,r.value,t._zod.def));else{let n=o;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=r.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),r.issues.push(Po(n))}},e(r.value,r)));return t}function lP(e,t){let r=new xe({check:"custom",...O(t)});return r._zod.check=e,r}function By(e){let t=new xe({check:"describe"});return t._zod.onattach=[r=>{let o=qe.get(r)??{};qe.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function Wy(e){let t=new xe({check:"meta"});return t._zod.onattach=[r=>{let o=qe.get(r)??{};qe.add(r,{...o,...e})}],t._zod.check=()=>{},t}function Gy(e,t){let r=O(t),o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(f=>typeof f=="string"?f.toLowerCase():f),n=n.map(f=>typeof f=="string"?f.toLowerCase():f));let i=new Set(o),a=new Set(n),s=e.Codec??Fa,c=e.Boolean??Ma,u=e.String??In,l=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),p=new s({type:"pipe",in:l,out:d,transform:((f,m)=>{let h=f;return r.case!=="sensitive"&&(h=h.toLowerCase()),i.has(h)?!0:a.has(h)?!1:(m.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:m.value,inst:p,continue:!1}),{})}),reverseTransform:((f,m)=>f===!0?o[0]||"true":n[0]||"false"),error:r.error});return p}function Bo(e,t,r,o={}){let n=O(o),i={...O(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}function tn(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??qe,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function pe(e,t,r={path:[],schemaPath:[]}){var o;let n=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,l);else{let p=a.schema,f=t.processors[n.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);f(e,t,p,l)}let d=e._zod.parent;d&&(a.ref||(a.ref=d),pe(d,t,l),t.seen.get(d).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&it(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function rn(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=o.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(s,a[0])}}let n=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(a[0])?.id,p=e.external.uri??(m=>m);if(d)return{ref:p(d)};let f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${p("__shared")}#/${s}/${f}`}}if(a[1]===r)return{ref:"#"};let u=`#/${s}/`,l=a[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},i=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:u}=n(a);s.def={...s.schema},u&&(s.defId=u);let l=s.schema;for(let d in l)delete l[d];l.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
117
+
118
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){i(a);continue}if(e.external){let u=e.external.registry.get(a[0])?.id;if(t!==a[0]&&u){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function nn(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=a=>{let s=e.seen.get(a);if(s.ref===null)return;let c=s.def??s.schema,u={...c},l=s.ref;if(s.ref=null,l){o(l);let p=e.seen.get(l),f=p.schema;if(f.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(f)):Object.assign(c,f),Object.assign(c,u),a._zod.parent===l)for(let h in c)h==="$ref"||h==="allOf"||h in u||delete c[h];if(f.$ref)for(let h in c)h==="$ref"||h==="allOf"||h in p.def&&JSON.stringify(c[h])===JSON.stringify(p.def[h])&&delete c[h]}let d=a._zod.parent;if(d&&d!==l){o(d);let p=e.seen.get(d);if(p?.schema.$ref&&(c.$ref=p.schema.$ref,p.def))for(let f in c)f==="$ref"||f==="allOf"||f in p.def&&JSON.stringify(c[f])===JSON.stringify(p.def[f])&&delete c[f]}e.override({zodSchema:a,jsonSchema:c,path:s.path??[]})};for(let a of[...e.seen.entries()].reverse())o(a[0]);let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(a)}Object.assign(n,r.def??r.schema);let i=e.external?.defs??{};for(let a of e.seen.entries()){let s=a[1];s.def&&s.defId&&(i[s.defId]=s.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?n.$defs=i:n.definitions=i);try{let a=JSON.parse(JSON.stringify(n));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:Wo(t,"input",e.processors),output:Wo(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function it(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return it(o.element,r);if(o.type==="set")return it(o.valueType,r);if(o.type==="lazy")return it(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return it(o.innerType,r);if(o.type==="intersection")return it(o.left,r)||it(o.right,r);if(o.type==="record"||o.type==="map")return it(o.keyType,r)||it(o.valueType,r);if(o.type==="pipe")return it(o.in,r)||it(o.out,r);if(o.type==="object"){for(let n in o.shape)if(it(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(let n of o.options)if(it(n,r))return!0;return!1}if(o.type==="tuple"){for(let n of o.items)if(it(n,r))return!0;return!!(o.rest&&it(o.rest,r))}return!1}var Ky=(e,t={})=>r=>{let o=tn({...r,processors:t});return pe(e,o),rn(o,e),nn(o,e)},Wo=(e,t,r={})=>o=>{let{libraryOptions:n,target:i}=o??{},a=tn({...n??{},target:i,io:t,processors:r});return pe(e,a),rn(a,e),nn(a,e)};var cM={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Xy=(e,t,r,o)=>{let n=r;n.type="string";let{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof a=="number"&&(n.maxLength=a),s&&(n.format=cM[s]??s,n.format===""&&delete n.format,s==="time"&&delete n.format),u&&(n.contentEncoding=u),c&&c.size>0){let l=[...c];l.length===1?n.pattern=l[0].source:l.length>1&&(n.allOf=[...l.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Yy=(e,t,r,o)=>{let n=r,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;typeof s=="string"&&s.includes("int")?n.type="integer":n.type="number",typeof l=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l),typeof i=="number"&&(n.minimum=i,typeof l=="number"&&t.target!=="draft-04"&&(l>=i?delete n.minimum:delete n.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.maximum=u,n.exclusiveMaximum=!0):n.exclusiveMaximum=u),typeof a=="number"&&(n.maximum=a,typeof u=="number"&&t.target!=="draft-04"&&(u<=a?delete n.maximum:delete n.exclusiveMaximum)),typeof c=="number"&&(n.multipleOf=c)},Qy=(e,t,r,o)=>{r.type="boolean"},e_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},t_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},r_=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},n_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},o_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},i_=(e,t,r,o)=>{r.not={}},a_=(e,t,r,o)=>{},s_=(e,t,r,o)=>{},c_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},u_=(e,t,r,o)=>{let n=e._zod.def,i=Ta(n.entries);i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},l_=(e,t,r,o)=>{let n=e._zod.def,i=[];for(let a of n.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){let a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},d_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},p_=(e,t,r,o)=>{let n=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},f_=(e,t,r,o)=>{let n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(i.minLength=a),s!==void 0&&(i.maxLength=s),c?c.length===1?(i.contentMediaType=c[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(n,i)},m_=(e,t,r,o)=>{r.type="boolean"},h_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},g_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},v_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},y_=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},__=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},$_=(e,t,r,o)=>{let n=r,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=pe(i.element,t,{...o,path:[...o.path,"items"]})},x_=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object",n.properties={};let a=i.shape;for(let u in a)n.properties[u]=pe(a[u],t,{...o,path:[...o.path,"properties",u]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(u=>{let l=i.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(n.required=Array.from(c)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=pe(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},rl=(e,t,r,o)=>{let n=e._zod.def,i=n.inclusive===!1,a=n.options.map((s,c)=>pe(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=a:r.anyOf=a},b_=(e,t,r,o)=>{let n=e._zod.def,i=pe(n.left,t,{...o,path:[...o.path,"allOf",0]}),a=pe(n.right,t,{...o,path:[...o.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=c},w_=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((p,f)=>pe(p,t,{...o,path:[...o.path,a,f]})),u=i.rest?pe(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=c,u&&(n.items=u)):t.target==="openapi-3.0"?(n.items={anyOf:c},u&&n.items.anyOf.push(u),n.minItems=c.length,u||(n.maxItems=c.length)):(n.items=c,u&&(n.additionalItems=u));let{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(n.minItems=l),typeof d=="number"&&(n.maxItems=d)},k_=(e,t,r,o)=>{let n=r,i=e._zod.def;n.type="object";let a=i.keyType,c=a._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let l=pe(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let d of c)n.patternProperties[d.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=pe(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=pe(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let u=a._zod.values;if(u){let l=[...u].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(n.required=l)}},z_=(e,t,r,o)=>{let n=e._zod.def,i=pe(n.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},S_=(e,t,r,o)=>{let n=e._zod.def;pe(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},I_=(e,t,r,o)=>{let n=e._zod.def;pe(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},P_=(e,t,r,o)=>{let n=e._zod.def;pe(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},T_=(e,t,r,o)=>{let n=e._zod.def;pe(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},E_=(e,t,r,o)=>{let n=e._zod.def,i=t.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;pe(i,t,o);let a=t.seen.get(e);a.ref=i},O_=(e,t,r,o)=>{let n=e._zod.def;pe(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},j_=(e,t,r,o)=>{let n=e._zod.def;pe(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},nl=(e,t,r,o)=>{let n=e._zod.def;pe(n.innerType,t,o);let i=t.seen.get(e);i.ref=n.innerType},Z_=(e,t,r,o)=>{let n=e._zod.innerType;pe(n,t,o);let i=t.seen.get(e);i.ref=n},tl={string:Xy,number:Yy,boolean:Qy,bigint:e_,symbol:t_,null:r_,undefined:n_,void:o_,never:i_,any:a_,unknown:s_,date:c_,enum:u_,literal:l_,nan:d_,template_literal:p_,file:f_,success:m_,custom:h_,function:g_,transform:v_,map:y_,set:__,array:$_,object:x_,union:rl,intersection:b_,tuple:w_,record:k_,nullable:z_,nonoptional:S_,default:I_,prefault:P_,catch:T_,pipe:E_,readonly:O_,promise:j_,optional:nl,lazy:Z_};function ol(e,t){if("_idmap"in e){let o=e,n=tn({...t,processors:tl}),i={};for(let c of o._idmap.entries()){let[u,l]=c;pe(l,n)}let a={},s={registry:o,uri:t?.uri,defs:i};n.external=s;for(let c of o._idmap.entries()){let[u,l]=c;rn(n,l),a[u]=nn(n,l)}if(Object.keys(i).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:i}}return{schemas:a}}let r=tn({...t,processors:tl});return pe(e,r),rn(r,e),nn(r,e)}var il=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=tn({processors:tl,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return pe(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),rn(this.ctx,t);let o=nn(this.ctx,t),{"~standard":n,...i}=o;return i}};var dP={};var Ba={};Ct(Ba,{ZodAny:()=>n$,ZodArray:()=>s$,ZodBase64:()=>Sl,ZodBase64URL:()=>Il,ZodBigInt:()=>ti,ZodBigIntFormat:()=>El,ZodBoolean:()=>ei,ZodCIDRv4:()=>kl,ZodCIDRv6:()=>zl,ZodCUID:()=>vl,ZodCUID2:()=>yl,ZodCatch:()=>T$,ZodCodec:()=>Cl,ZodCustom:()=>os,ZodCustomStringFormat:()=>Yo,ZodDate:()=>Qa,ZodDefault:()=>w$,ZodDiscriminatedUnion:()=>u$,ZodE164:()=>Pl,ZodEmail:()=>ml,ZodEmoji:()=>hl,ZodEnum:()=>Ko,ZodExactOptional:()=>$$,ZodFile:()=>y$,ZodFunction:()=>C$,ZodGUID:()=>Wa,ZodIPv4:()=>bl,ZodIPv6:()=>wl,ZodIntersection:()=>l$,ZodJWT:()=>Tl,ZodKSUID:()=>xl,ZodLazy:()=>R$,ZodLiteral:()=>v$,ZodMAC:()=>K_,ZodMap:()=>h$,ZodNaN:()=>O$,ZodNanoID:()=>gl,ZodNever:()=>i$,ZodNonOptional:()=>Dl,ZodNull:()=>t$,ZodNullable:()=>b$,ZodNumber:()=>Qo,ZodNumberFormat:()=>jn,ZodObject:()=>ts,ZodOptional:()=>Rl,ZodPipe:()=>Al,ZodPrefault:()=>z$,ZodPromise:()=>A$,ZodReadonly:()=>j$,ZodRecord:()=>ns,ZodSet:()=>g$,ZodString:()=>Xo,ZodStringFormat:()=>ve,ZodSuccess:()=>P$,ZodSymbol:()=>Q_,ZodTemplateLiteral:()=>N$,ZodTransform:()=>_$,ZodTuple:()=>p$,ZodType:()=>G,ZodULID:()=>_l,ZodURL:()=>Ya,ZodUUID:()=>cr,ZodUndefined:()=>e$,ZodUnion:()=>rs,ZodUnknown:()=>o$,ZodVoid:()=>a$,ZodXID:()=>$l,ZodXor:()=>c$,_ZodString:()=>fl,_default:()=>k$,_function:()=>yT,any:()=>KP,array:()=>es,base64:()=>ZP,base64url:()=>NP,bigint:()=>JP,boolean:()=>Y_,catch:()=>E$,check:()=>_T,cidrv4:()=>OP,cidrv6:()=>jP,codec:()=>hT,cuid:()=>wP,cuid2:()=>kP,custom:()=>$T,date:()=>YP,describe:()=>xT,discriminatedUnion:()=>oT,e164:()=>RP,email:()=>fP,emoji:()=>xP,enum:()=>Zl,exactOptional:()=>x$,file:()=>dT,float32:()=>LP,float64:()=>FP,function:()=>yT,guid:()=>mP,hash:()=>MP,hex:()=>UP,hostname:()=>CP,httpUrl:()=>$P,instanceof:()=>wT,int:()=>pl,int32:()=>qP,int64:()=>HP,intersection:()=>d$,ipv4:()=>PP,ipv6:()=>EP,json:()=>zT,jwt:()=>DP,keyof:()=>QP,ksuid:()=>IP,lazy:()=>D$,literal:()=>lT,looseObject:()=>rT,looseRecord:()=>aT,mac:()=>TP,map:()=>sT,meta:()=>bT,nan:()=>mT,nanoid:()=>bP,nativeEnum:()=>uT,never:()=>Ol,nonoptional:()=>I$,null:()=>r$,nullable:()=>Ka,nullish:()=>pT,number:()=>X_,object:()=>eT,optional:()=>Ga,partialRecord:()=>iT,pipe:()=>Xa,prefault:()=>S$,preprocess:()=>ST,promise:()=>vT,readonly:()=>Z$,record:()=>m$,refine:()=>U$,set:()=>cT,strictObject:()=>tT,string:()=>dl,stringFormat:()=>AP,stringbool:()=>kT,success:()=>fT,superRefine:()=>M$,symbol:()=>WP,templateLiteral:()=>gT,transform:()=>Nl,tuple:()=>f$,uint32:()=>VP,uint64:()=>BP,ulid:()=>zP,undefined:()=>GP,union:()=>jl,unknown:()=>On,url:()=>_P,uuid:()=>hP,uuidv4:()=>gP,uuidv6:()=>vP,uuidv7:()=>yP,void:()=>XP,xid:()=>SP,xor:()=>nT});var al={};Ct(al,{endsWith:()=>Mo,gt:()=>ar,gte:()=>ot,includes:()=>Co,length:()=>En,lowercase:()=>Do,lt:()=>ir,lte:()=>wt,maxLength:()=>Tn,maxSize:()=>en,mime:()=>Lo,minLength:()=>wr,minSize:()=>sr,multipleOf:()=>Qr,negative:()=>Xu,nonnegative:()=>Qu,nonpositive:()=>Yu,normalize:()=>Fo,overwrite:()=>Gt,positive:()=>Ku,property:()=>el,regex:()=>Ro,size:()=>Pn,slugify:()=>Ho,startsWith:()=>Uo,toLowerCase:()=>Vo,toUpperCase:()=>Jo,trim:()=>qo,uppercase:()=>Ao});var Go={};Ct(Go,{ZodISODate:()=>cl,ZodISODateTime:()=>sl,ZodISODuration:()=>ll,ZodISOTime:()=>ul,date:()=>R_,datetime:()=>N_,duration:()=>A_,time:()=>D_});var sl=g("ZodISODateTime",(e,t)=>{dv.init(e,t),ve.init(e,t)});function N_(e){return hy(sl,e)}var cl=g("ZodISODate",(e,t)=>{pv.init(e,t),ve.init(e,t)});function R_(e){return gy(cl,e)}var ul=g("ZodISOTime",(e,t)=>{fv.init(e,t),ve.init(e,t)});function D_(e){return vy(ul,e)}var ll=g("ZodISODuration",(e,t)=>{mv.init(e,t),ve.init(e,t)});function A_(e){return yy(ll,e)}var pP=(e,t)=>{Na.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>Da(e,r)},flatten:{value:r=>Ra(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,So,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,So,2)}},isEmpty:{get(){return e.issues.length===0}}})},lM=g("ZodError",pP),mt=g("ZodError",pP,{Parent:Error});var C_=To(mt),U_=Eo(mt),M_=Oo(mt),L_=jo(mt),F_=ou(mt),q_=iu(mt),V_=au(mt),J_=su(mt),H_=cu(mt),B_=uu(mt),W_=lu(mt),G_=du(mt);var G=g("ZodType",(e,t)=>(B.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Wo(e,"input"),output:Wo(e,"output")}}),e.toJSONSchema=Ky(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...r)=>e.clone(P.mergeDefs(t,{checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(r,o)=>nt(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.parse=(r,o)=>C_(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>M_(e,r,o),e.parseAsync=async(r,o)=>U_(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>L_(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>F_(e,r,o),e.decode=(r,o)=>q_(e,r,o),e.encodeAsync=async(r,o)=>V_(e,r,o),e.decodeAsync=async(r,o)=>J_(e,r,o),e.safeEncode=(r,o)=>H_(e,r,o),e.safeDecode=(r,o)=>B_(e,r,o),e.safeEncodeAsync=async(r,o)=>W_(e,r,o),e.safeDecodeAsync=async(r,o)=>G_(e,r,o),e.refine=(r,o)=>e.check(U$(r,o)),e.superRefine=r=>e.check(M$(r)),e.overwrite=r=>e.check(Gt(r)),e.optional=()=>Ga(e),e.exactOptional=()=>x$(e),e.nullable=()=>Ka(e),e.nullish=()=>Ga(Ka(e)),e.nonoptional=r=>I$(e,r),e.array=()=>es(e),e.or=r=>jl([e,r]),e.and=r=>d$(e,r),e.transform=r=>Xa(e,Nl(r)),e.default=r=>k$(e,r),e.prefault=r=>S$(e,r),e.catch=r=>E$(e,r),e.pipe=r=>Xa(e,r),e.readonly=()=>Z$(e),e.describe=r=>{let o=e.clone();return qe.add(o,{description:r}),o},Object.defineProperty(e,"description",{get(){return qe.get(e)?.description},configurable:!0}),e.meta=(...r)=>{if(r.length===0)return qe.get(e);let o=e.clone();return qe.add(o,r[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=r=>r(e),e)),fl=g("_ZodString",(e,t)=>{In.init(e,t),G.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Xy(e,o,n,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,e.regex=(...o)=>e.check(Ro(...o)),e.includes=(...o)=>e.check(Co(...o)),e.startsWith=(...o)=>e.check(Uo(...o)),e.endsWith=(...o)=>e.check(Mo(...o)),e.min=(...o)=>e.check(wr(...o)),e.max=(...o)=>e.check(Tn(...o)),e.length=(...o)=>e.check(En(...o)),e.nonempty=(...o)=>e.check(wr(1,...o)),e.lowercase=o=>e.check(Do(o)),e.uppercase=o=>e.check(Ao(o)),e.trim=()=>e.check(qo()),e.normalize=(...o)=>e.check(Fo(...o)),e.toLowerCase=()=>e.check(Vo()),e.toUpperCase=()=>e.check(Jo()),e.slugify=()=>e.check(Ho())}),Xo=g("ZodString",(e,t)=>{In.init(e,t),fl.init(e,t),e.email=r=>e.check(Eu(ml,r)),e.url=r=>e.check(Ha(Ya,r)),e.jwt=r=>e.check(Gu(Tl,r)),e.emoji=r=>e.check(Ru(hl,r)),e.guid=r=>e.check(Ja(Wa,r)),e.uuid=r=>e.check(Ou(cr,r)),e.uuidv4=r=>e.check(ju(cr,r)),e.uuidv6=r=>e.check(Zu(cr,r)),e.uuidv7=r=>e.check(Nu(cr,r)),e.nanoid=r=>e.check(Du(gl,r)),e.guid=r=>e.check(Ja(Wa,r)),e.cuid=r=>e.check(Au(vl,r)),e.cuid2=r=>e.check(Cu(yl,r)),e.ulid=r=>e.check(Uu(_l,r)),e.base64=r=>e.check(Hu(Sl,r)),e.base64url=r=>e.check(Bu(Il,r)),e.xid=r=>e.check(Mu($l,r)),e.ksuid=r=>e.check(Lu(xl,r)),e.ipv4=r=>e.check(Fu(bl,r)),e.ipv6=r=>e.check(qu(wl,r)),e.cidrv4=r=>e.check(Vu(kl,r)),e.cidrv6=r=>e.check(Ju(zl,r)),e.e164=r=>e.check(Wu(Pl,r)),e.datetime=r=>e.check(N_(r)),e.date=r=>e.check(R_(r)),e.time=r=>e.check(D_(r)),e.duration=r=>e.check(A_(r))});function dl(e){return dy(Xo,e)}var ve=g("ZodStringFormat",(e,t)=>{ge.init(e,t),fl.init(e,t)}),ml=g("ZodEmail",(e,t)=>{rv.init(e,t),ve.init(e,t)});function fP(e){return Eu(ml,e)}var Wa=g("ZodGUID",(e,t)=>{ev.init(e,t),ve.init(e,t)});function mP(e){return Ja(Wa,e)}var cr=g("ZodUUID",(e,t)=>{tv.init(e,t),ve.init(e,t)});function hP(e){return Ou(cr,e)}function gP(e){return ju(cr,e)}function vP(e){return Zu(cr,e)}function yP(e){return Nu(cr,e)}var Ya=g("ZodURL",(e,t)=>{nv.init(e,t),ve.init(e,t)});function _P(e){return Ha(Ya,e)}function $P(e){return Ha(Ya,{protocol:/^https?$/,hostname:Dt.domain,...P.normalizeParams(e)})}var hl=g("ZodEmoji",(e,t)=>{ov.init(e,t),ve.init(e,t)});function xP(e){return Ru(hl,e)}var gl=g("ZodNanoID",(e,t)=>{iv.init(e,t),ve.init(e,t)});function bP(e){return Du(gl,e)}var vl=g("ZodCUID",(e,t)=>{av.init(e,t),ve.init(e,t)});function wP(e){return Au(vl,e)}var yl=g("ZodCUID2",(e,t)=>{sv.init(e,t),ve.init(e,t)});function kP(e){return Cu(yl,e)}var _l=g("ZodULID",(e,t)=>{cv.init(e,t),ve.init(e,t)});function zP(e){return Uu(_l,e)}var $l=g("ZodXID",(e,t)=>{uv.init(e,t),ve.init(e,t)});function SP(e){return Mu($l,e)}var xl=g("ZodKSUID",(e,t)=>{lv.init(e,t),ve.init(e,t)});function IP(e){return Lu(xl,e)}var bl=g("ZodIPv4",(e,t)=>{hv.init(e,t),ve.init(e,t)});function PP(e){return Fu(bl,e)}var K_=g("ZodMAC",(e,t)=>{vv.init(e,t),ve.init(e,t)});function TP(e){return fy(K_,e)}var wl=g("ZodIPv6",(e,t)=>{gv.init(e,t),ve.init(e,t)});function EP(e){return qu(wl,e)}var kl=g("ZodCIDRv4",(e,t)=>{yv.init(e,t),ve.init(e,t)});function OP(e){return Vu(kl,e)}var zl=g("ZodCIDRv6",(e,t)=>{_v.init(e,t),ve.init(e,t)});function jP(e){return Ju(zl,e)}var Sl=g("ZodBase64",(e,t)=>{xv.init(e,t),ve.init(e,t)});function ZP(e){return Hu(Sl,e)}var Il=g("ZodBase64URL",(e,t)=>{bv.init(e,t),ve.init(e,t)});function NP(e){return Bu(Il,e)}var Pl=g("ZodE164",(e,t)=>{wv.init(e,t),ve.init(e,t)});function RP(e){return Wu(Pl,e)}var Tl=g("ZodJWT",(e,t)=>{kv.init(e,t),ve.init(e,t)});function DP(e){return Gu(Tl,e)}var Yo=g("ZodCustomStringFormat",(e,t)=>{zv.init(e,t),ve.init(e,t)});function AP(e,t,r={}){return Bo(Yo,e,t,r)}function CP(e){return Bo(Yo,"hostname",Dt.hostname,e)}function UP(e){return Bo(Yo,"hex",Dt.hex,e)}function MP(e,t){let r=t?.enc??"hex",o=`${e}_${r}`,n=Dt[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return Bo(Yo,o,n,t)}var Qo=g("ZodNumber",(e,t)=>{xu.init(e,t),G.init(e,t),e._zod.processJSONSchema=(o,n,i)=>Yy(e,o,n,i),e.gt=(o,n)=>e.check(ar(o,n)),e.gte=(o,n)=>e.check(ot(o,n)),e.min=(o,n)=>e.check(ot(o,n)),e.lt=(o,n)=>e.check(ir(o,n)),e.lte=(o,n)=>e.check(wt(o,n)),e.max=(o,n)=>e.check(wt(o,n)),e.int=o=>e.check(pl(o)),e.safe=o=>e.check(pl(o)),e.positive=o=>e.check(ar(0,o)),e.nonnegative=o=>e.check(ot(0,o)),e.negative=o=>e.check(ir(0,o)),e.nonpositive=o=>e.check(wt(0,o)),e.multipleOf=(o,n)=>e.check(Qr(o,n)),e.step=(o,n)=>e.check(Qr(o,n)),e.finite=()=>e;let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function X_(e){return _y(Qo,e)}var jn=g("ZodNumberFormat",(e,t)=>{Sv.init(e,t),Qo.init(e,t)});function pl(e){return xy(jn,e)}function LP(e){return by(jn,e)}function FP(e){return wy(jn,e)}function qP(e){return ky(jn,e)}function VP(e){return zy(jn,e)}var ei=g("ZodBoolean",(e,t)=>{Ma.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Qy(e,r,o,n)});function Y_(e){return Sy(ei,e)}var ti=g("ZodBigInt",(e,t)=>{bu.init(e,t),G.init(e,t),e._zod.processJSONSchema=(o,n,i)=>e_(e,o,n,i),e.gte=(o,n)=>e.check(ot(o,n)),e.min=(o,n)=>e.check(ot(o,n)),e.gt=(o,n)=>e.check(ar(o,n)),e.gte=(o,n)=>e.check(ot(o,n)),e.min=(o,n)=>e.check(ot(o,n)),e.lt=(o,n)=>e.check(ir(o,n)),e.lte=(o,n)=>e.check(wt(o,n)),e.max=(o,n)=>e.check(wt(o,n)),e.positive=o=>e.check(ar(BigInt(0),o)),e.negative=o=>e.check(ir(BigInt(0),o)),e.nonpositive=o=>e.check(wt(BigInt(0),o)),e.nonnegative=o=>e.check(ot(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(Qr(o,n));let r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function JP(e){return Py(ti,e)}var El=g("ZodBigIntFormat",(e,t)=>{Iv.init(e,t),ti.init(e,t)});function HP(e){return Ey(El,e)}function BP(e){return Oy(El,e)}var Q_=g("ZodSymbol",(e,t)=>{Pv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>t_(e,r,o,n)});function WP(e){return jy(Q_,e)}var e$=g("ZodUndefined",(e,t)=>{Tv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>n_(e,r,o,n)});function GP(e){return Zy(e$,e)}var t$=g("ZodNull",(e,t)=>{Ev.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>r_(e,r,o,n)});function r$(e){return Ny(t$,e)}var n$=g("ZodAny",(e,t)=>{Ov.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>a_(e,r,o,n)});function KP(){return Ry(n$)}var o$=g("ZodUnknown",(e,t)=>{jv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>s_(e,r,o,n)});function On(){return Dy(o$)}var i$=g("ZodNever",(e,t)=>{Zv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>i_(e,r,o,n)});function Ol(e){return Ay(i$,e)}var a$=g("ZodVoid",(e,t)=>{Nv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>o_(e,r,o,n)});function XP(e){return Cy(a$,e)}var Qa=g("ZodDate",(e,t)=>{Rv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(o,n,i)=>c_(e,o,n,i),e.min=(o,n)=>e.check(ot(o,n)),e.max=(o,n)=>e.check(wt(o,n));let r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function YP(e){return Uy(Qa,e)}var s$=g("ZodArray",(e,t)=>{Dv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>$_(e,r,o,n),e.element=t.element,e.min=(r,o)=>e.check(wr(r,o)),e.nonempty=r=>e.check(wr(1,r)),e.max=(r,o)=>e.check(Tn(r,o)),e.length=(r,o)=>e.check(En(r,o)),e.unwrap=()=>e.element});function es(e,t){return Fy(s$,e,t)}function QP(e){let t=e._zod.def.shape;return Zl(Object.keys(t))}var ts=g("ZodObject",(e,t)=>{Av.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>x_(e,r,o,n),P.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>Zl(Object.keys(e._zod.def.shape)),e.catchall=r=>e.clone({...e._zod.def,catchall:r}),e.passthrough=()=>e.clone({...e._zod.def,catchall:On()}),e.loose=()=>e.clone({...e._zod.def,catchall:On()}),e.strict=()=>e.clone({...e._zod.def,catchall:Ol()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=r=>P.extend(e,r),e.safeExtend=r=>P.safeExtend(e,r),e.merge=r=>P.merge(e,r),e.pick=r=>P.pick(e,r),e.omit=r=>P.omit(e,r),e.partial=(...r)=>P.partial(Rl,e,r[0]),e.required=(...r)=>P.required(Dl,e,r[0])});function eT(e,t){let r={type:"object",shape:e??{},...P.normalizeParams(t)};return new ts(r)}function tT(e,t){return new ts({type:"object",shape:e,catchall:Ol(),...P.normalizeParams(t)})}function rT(e,t){return new ts({type:"object",shape:e,catchall:On(),...P.normalizeParams(t)})}var rs=g("ZodUnion",(e,t)=>{La.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>rl(e,r,o,n),e.options=t.options});function jl(e,t){return new rs({type:"union",options:e,...P.normalizeParams(t)})}var c$=g("ZodXor",(e,t)=>{rs.init(e,t),Cv.init(e,t),e._zod.processJSONSchema=(r,o,n)=>rl(e,r,o,n),e.options=t.options});function nT(e,t){return new c$({type:"union",options:e,inclusive:!1,...P.normalizeParams(t)})}var u$=g("ZodDiscriminatedUnion",(e,t)=>{rs.init(e,t),Uv.init(e,t)});function oT(e,t,r){return new u$({type:"union",options:t,discriminator:e,...P.normalizeParams(r)})}var l$=g("ZodIntersection",(e,t)=>{Mv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>b_(e,r,o,n)});function d$(e,t){return new l$({type:"intersection",left:e,right:t})}var p$=g("ZodTuple",(e,t)=>{wu.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>w_(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function f$(e,t,r){let o=t instanceof B,n=o?r:t,i=o?t:null;return new p$({type:"tuple",items:e,rest:i,...P.normalizeParams(n)})}var ns=g("ZodRecord",(e,t)=>{Lv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>k_(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function m$(e,t,r){return new ns({type:"record",keyType:e,valueType:t,...P.normalizeParams(r)})}function iT(e,t,r){let o=nt(e);return o._zod.values=void 0,new ns({type:"record",keyType:o,valueType:t,...P.normalizeParams(r)})}function aT(e,t,r){return new ns({type:"record",keyType:e,valueType:t,mode:"loose",...P.normalizeParams(r)})}var h$=g("ZodMap",(e,t)=>{Fv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>y_(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(sr(...r)),e.nonempty=r=>e.check(sr(1,r)),e.max=(...r)=>e.check(en(...r)),e.size=(...r)=>e.check(Pn(...r))});function sT(e,t,r){return new h$({type:"map",keyType:e,valueType:t,...P.normalizeParams(r)})}var g$=g("ZodSet",(e,t)=>{qv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>__(e,r,o,n),e.min=(...r)=>e.check(sr(...r)),e.nonempty=r=>e.check(sr(1,r)),e.max=(...r)=>e.check(en(...r)),e.size=(...r)=>e.check(Pn(...r))});function cT(e,t){return new g$({type:"set",valueType:e,...P.normalizeParams(t)})}var Ko=g("ZodEnum",(e,t)=>{Vv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(o,n,i)=>u_(e,o,n,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{let i={};for(let a of o)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Ko({...t,checks:[],...P.normalizeParams(n),entries:i})},e.exclude=(o,n)=>{let i={...t.entries};for(let a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new Ko({...t,checks:[],...P.normalizeParams(n),entries:i})}});function Zl(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new Ko({type:"enum",entries:r,...P.normalizeParams(t)})}function uT(e,t){return new Ko({type:"enum",entries:e,...P.normalizeParams(t)})}var v$=g("ZodLiteral",(e,t)=>{Jv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>l_(e,r,o,n),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 lT(e,t){return new v$({type:"literal",values:Array.isArray(e)?e:[e],...P.normalizeParams(t)})}var y$=g("ZodFile",(e,t)=>{Hv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>f_(e,r,o,n),e.min=(r,o)=>e.check(sr(r,o)),e.max=(r,o)=>e.check(en(r,o)),e.mime=(r,o)=>e.check(Lo(Array.isArray(r)?r:[r],o))});function dT(e){return qy(y$,e)}var _$=g("ZodTransform",(e,t)=>{Bv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>v_(e,r,o,n),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new Wr(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(P.issue(i,r.value,t));else{let a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(P.issue(a))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r)):(r.value=n,r)}});function Nl(e){return new _$({type:"transform",transform:e})}var Rl=g("ZodOptional",(e,t)=>{ku.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>nl(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Ga(e){return new Rl({type:"optional",innerType:e})}var $$=g("ZodExactOptional",(e,t)=>{Wv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>nl(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function x$(e){return new $$({type:"optional",innerType:e})}var b$=g("ZodNullable",(e,t)=>{Gv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>z_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Ka(e){return new b$({type:"nullable",innerType:e})}function pT(e){return Ga(Ka(e))}var w$=g("ZodDefault",(e,t)=>{Kv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>I_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function k$(e,t){return new w$({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():P.shallowClone(t)}})}var z$=g("ZodPrefault",(e,t)=>{Xv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>P_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function S$(e,t){return new z$({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():P.shallowClone(t)}})}var Dl=g("ZodNonOptional",(e,t)=>{Yv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>S_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function I$(e,t){return new Dl({type:"nonoptional",innerType:e,...P.normalizeParams(t)})}var P$=g("ZodSuccess",(e,t)=>{Qv.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>m_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function fT(e){return new P$({type:"success",innerType:e})}var T$=g("ZodCatch",(e,t)=>{ey.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>T_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function E$(e,t){return new T$({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var O$=g("ZodNaN",(e,t)=>{ty.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>d_(e,r,o,n)});function mT(e){return Ly(O$,e)}var Al=g("ZodPipe",(e,t)=>{ry.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>E_(e,r,o,n),e.in=t.in,e.out=t.out});function Xa(e,t){return new Al({type:"pipe",in:e,out:t})}var Cl=g("ZodCodec",(e,t)=>{Al.init(e,t),Fa.init(e,t)});function hT(e,t,r){return new Cl({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}var j$=g("ZodReadonly",(e,t)=>{ny.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>O_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Z$(e){return new j$({type:"readonly",innerType:e})}var N$=g("ZodTemplateLiteral",(e,t)=>{oy.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>p_(e,r,o,n)});function gT(e,t){return new N$({type:"template_literal",parts:e,...P.normalizeParams(t)})}var R$=g("ZodLazy",(e,t)=>{sy.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Z_(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});function D$(e){return new R$({type:"lazy",getter:e})}var A$=g("ZodPromise",(e,t)=>{ay.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>j_(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function vT(e){return new A$({type:"promise",innerType:e})}var C$=g("ZodFunction",(e,t)=>{iy.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>g_(e,r,o,n)});function yT(e){return new C$({type:"function",input:Array.isArray(e?.input)?f$(e?.input):e?.input??es(On()),output:e?.output??On()})}var os=g("ZodCustom",(e,t)=>{cy.init(e,t),G.init(e,t),e._zod.processJSONSchema=(r,o,n)=>h_(e,r,o,n)});function _T(e){let t=new xe({check:"custom"});return t._zod.check=e,t}function $T(e,t){return Vy(os,e??(()=>!0),t)}function U$(e,t={}){return Jy(os,e,t)}function M$(e){return Hy(e)}var xT=By,bT=Wy;function wT(e,t={}){let r=new os({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...P.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:r,path:[...r._zod.def.path??[]]})},r}var kT=(...e)=>Gy({Codec:Cl,Boolean:ei,String:Xo},...e);function zT(e){let t=D$(()=>jl([dl(e),X_(),Y_(),r$(),es(t),m$(dl(),t)]));return t}function ST(e,t){return Xa(Nl(e),t)}var pM={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 fM(e){Ze({customError:e})}function mM(){return Ze().customError}var L$;L$||(L$={});var N={...Ba,...al,iso:Go},hM=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function gM(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function vM(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){let n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function IT(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return N.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return N.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let i=vM(n,t),a=We(i,t);return t.refs.set(n,a),t.processing.delete(n),a}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return N.null();if(n.length===0)return N.never();if(n.length===1)return N.literal(n[0]);if(n.every(a=>typeof a=="string"))return N.enum(n);let i=n.map(a=>N.literal(a));return i.length<2?i[0]:N.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return N.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(i=>{let a={...e,type:i};return IT(a,t)});return n.length===0?N.never():n.length===1?n[0]:N.union(n)}if(!r)return N.any();let o;switch(r){case"string":{let n=N.string();if(e.format){let i=e.format;i==="email"?n=n.check(N.email()):i==="uri"||i==="uri-reference"?n=n.check(N.url()):i==="uuid"||i==="guid"?n=n.check(N.uuid()):i==="date-time"?n=n.check(N.iso.datetime()):i==="date"?n=n.check(N.iso.date()):i==="time"?n=n.check(N.iso.time()):i==="duration"?n=n.check(N.iso.duration()):i==="ipv4"?n=n.check(N.ipv4()):i==="ipv6"?n=n.check(N.ipv6()):i==="mac"?n=n.check(N.mac()):i==="cidr"?n=n.check(N.cidrv4()):i==="cidr-v6"?n=n.check(N.cidrv6()):i==="base64"?n=n.check(N.base64()):i==="base64url"?n=n.check(N.base64url()):i==="e164"?n=n.check(N.e164()):i==="jwt"?n=n.check(N.jwt()):i==="emoji"?n=n.check(N.emoji()):i==="nanoid"?n=n.check(N.nanoid()):i==="cuid"?n=n.check(N.cuid()):i==="cuid2"?n=n.check(N.cuid2()):i==="ulid"?n=n.check(N.ulid()):i==="xid"?n=n.check(N.xid()):i==="ksuid"&&(n=n.check(N.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),o=n;break}case"number":case"integer":{let n=r==="integer"?N.number().int():N.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),o=n;break}case"boolean":{o=N.boolean();break}case"null":{o=N.null();break}case"object":{let n={},i=e.properties||{},a=new Set(e.required||[]);for(let[c,u]of Object.entries(i)){let l=We(u,t);n[c]=a.has(c)?l:l.optional()}if(e.propertyNames){let c=We(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?We(e.additionalProperties,t):N.any();if(Object.keys(n).length===0){o=N.record(c,u);break}let l=N.object(n).passthrough(),d=N.looseRecord(c,u);o=N.intersection(l,d);break}if(e.patternProperties){let c=e.patternProperties,u=Object.keys(c),l=[];for(let p of u){let f=We(c[p],t),m=N.string().regex(new RegExp(p));l.push(N.looseRecord(m,f))}let d=[];if(Object.keys(n).length>0&&d.push(N.object(n).passthrough()),d.push(...l),d.length===0)o=N.object({}).passthrough();else if(d.length===1)o=d[0];else{let p=N.intersection(d[0],d[1]);for(let f=2;f<d.length;f++)p=N.intersection(p,d[f]);o=p}break}let s=N.object(n);e.additionalProperties===!1?o=s.strict():typeof e.additionalProperties=="object"?o=s.catchall(We(e.additionalProperties,t)):o=s.passthrough();break}case"array":{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=n.map(c=>We(c,t)),s=i&&typeof i=="object"&&!Array.isArray(i)?We(i,t):void 0;s?o=N.tuple(a).rest(s):o=N.tuple(a),typeof e.minItems=="number"&&(o=o.check(N.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(N.maxLength(e.maxItems)))}else if(Array.isArray(i)){let a=i.map(c=>We(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?We(e.additionalItems,t):void 0;s?o=N.tuple(a).rest(s):o=N.tuple(a),typeof e.minItems=="number"&&(o=o.check(N.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(N.maxLength(e.maxItems)))}else if(i!==void 0){let a=We(i,t),s=N.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),o=s}else o=N.array(N.any());break}default:throw new Error(`Unsupported type: ${r}`)}return e.description&&(o=o.describe(e.description)),e.default!==void 0&&(o=o.default(e.default)),o}function We(e,t){if(typeof e=="boolean")return e?N.any():N.never();let r=IT(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(u=>We(u,t)),c=N.union(s);r=o?N.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(u=>We(u,t)),c=N.xor(s);r=o?N.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:N.any();else{let s=o?r:We(e.allOf[0],t),c=o?0:1;for(let u=c;u<e.allOf.length;u++)s=N.intersection(s,We(e.allOf[u],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=N.nullable(r)),e.readOnly===!0&&(r=N.readonly(r));let n={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)s in e&&(n[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(n[s]=e[s]);for(let s of Object.keys(e))hM.has(s)||(n[s]=e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),r}function PT(e,t){if(typeof e=="boolean")return e?N.any():N.never();let r=gM(e,t?.defaultTarget),o=e.$defs||e.definitions||{},n={version:r,defs:o,refs:new Map,processing:new Set,rootSchema:e,registry:t?.registry??qe};return We(e,n)}var F$={};Ct(F$,{bigint:()=>xM,boolean:()=>$M,date:()=>bM,number:()=>_M,string:()=>yM});function yM(e){return py(Xo,e)}function _M(e){return $y(Qo,e)}function $M(e){return Iy(ei,e)}function xM(e){return Ty(ti,e)}function bM(e){return My(Qa,e)}Ze(zu());var q$=(e,t,r)=>{let o=e instanceof RegExp?TT(e,r):e,n=t instanceof RegExp?TT(t,r):t,i=o!==null&&n!=null&&wM(o,n,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+o.length,i[1]),post:r.slice(i[1]+n.length)}},TT=(e,t)=>{let r=t.match(e);return r?r[0]:null},wM=(e,t,r)=>{let o,n,i,a,s,c=r.indexOf(e),u=r.indexOf(t,c+1),l=c;if(c>=0&&u>0){if(e===t)return[c,u];for(o=[],i=r.length;l>=0&&!s;){if(l===c)o.push(l),c=r.indexOf(e,l+1);else if(o.length===1){let d=o.pop();d!==void 0&&(s=[d,u])}else n=o.pop(),n!==void 0&&n<i&&(i=n,a=u),u=r.indexOf(t,l+1);l=c<u&&c>=0?c:u}o.length&&a!==void 0&&(s=[i,a])}return s};var ET="\0SLASH"+Math.random()+"\0",OT="\0OPEN"+Math.random()+"\0",J$="\0CLOSE"+Math.random()+"\0",jT="\0COMMA"+Math.random()+"\0",ZT="\0PERIOD"+Math.random()+"\0",kM=new RegExp(ET,"g"),zM=new RegExp(OT,"g"),SM=new RegExp(J$,"g"),IM=new RegExp(jT,"g"),PM=new RegExp(ZT,"g"),TM=/\\\\/g,EM=/\\{/g,OM=/\\}/g,jM=/\\,/g,ZM=/\\\./g,NM=1e5;function V$(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function RM(e){return e.replace(TM,ET).replace(EM,OT).replace(OM,J$).replace(jM,jT).replace(ZM,ZT)}function DM(e){return e.replace(kM,"\\").replace(zM,"{").replace(SM,"}").replace(IM,",").replace(PM,".")}function NT(e){if(!e)return[""];let t=[],r=q$("{","}",e);if(!r)return e.split(",");let{pre:o,body:n,post:i}=r,a=o.split(",");a[a.length-1]+="{"+n+"}";let s=NT(i);return i.length&&(a[a.length-1]+=s.shift(),a.push.apply(a,s)),t.push.apply(t,a),t}function RT(e,t={}){if(!e)return[];let{max:r=NM}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),is(RM(e),r,!0).map(DM)}function AM(e){return"{"+e+"}"}function CM(e){return/^-?0\d/.test(e)}function UM(e,t){return e<=t}function MM(e,t){return e>=t}function is(e,t,r){let o=[],n=q$("{","}",e);if(!n)return[e];let i=n.pre,a=n.post.length?is(n.post,t,!1):[""];if(/\$$/.test(n.pre))for(let s=0;s<a.length&&s<t;s++){let c=i+"{"+n.body+"}"+a[s];o.push(c)}else{let s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),u=s||c,l=n.body.indexOf(",")>=0;if(!u&&!l)return n.post.match(/,(?!,).*\}/)?(e=n.pre+"{"+n.body+J$+n.post,is(e,t,!0)):[e];let d;if(u)d=n.body.split(/\.\./);else if(d=NT(n.body),d.length===1&&d[0]!==void 0&&(d=is(d[0],t,!1).map(AM),d.length===1))return a.map(f=>n.pre+d[0]+f);let p;if(u&&d[0]!==void 0&&d[1]!==void 0){let f=V$(d[0]),m=V$(d[1]),h=Math.max(d[0].length,d[1].length),y=d.length===3&&d[2]!==void 0?Math.abs(V$(d[2])):1,x=UM;m<f&&(y*=-1,x=MM);let w=d.some(CM);p=[];for(let b=f;x(b,m);b+=y){let k;if(c)k=String.fromCharCode(b),k==="\\"&&(k="");else if(k=String(b),w){let fe=h-k.length;if(fe>0){let me=new Array(fe+1).join("0");b<0?k="-"+me+k.slice(1):k=me+k}}p.push(k)}}else{p=[];for(let f=0;f<d.length;f++)p.push.apply(p,is(d[f],t,!1))}for(let f=0;f<p.length;f++)for(let m=0;m<a.length&&o.length<t;m++){let h=i+p[f]+a[m];(!r||u||h)&&o.push(h)}}return o}var as=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};var LM={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ss=e=>e.replace(/[[\]\\-]/g,"\\$&"),FM=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),DT=e=>e.join(""),AT=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let o=[],n=[],i=r+1,a=!1,s=!1,c=!1,u=!1,l=r,d="";e:for(;i<e.length;){let h=e.charAt(i);if((h==="!"||h==="^")&&i===r+1){u=!0,i++;continue}if(h==="]"&&a&&!c){l=i+1;break}if(a=!0,h==="\\"&&!c){c=!0,i++;continue}if(h==="["&&!c){for(let[y,[x,E,w]]of Object.entries(LM))if(e.startsWith(y,i)){if(d)return["$.",!1,e.length-r,!0];i+=y.length,w?n.push(x):o.push(x),s=s||E;continue e}}if(c=!1,d){h>d?o.push(ss(d)+"-"+ss(h)):h===d&&o.push(ss(h)),d="",i++;continue}if(e.startsWith("-]",i+1)){o.push(ss(h+"-")),i+=2;continue}if(e.startsWith("-",i+1)){d=h,i+=2;continue}o.push(ss(h)),i++}if(l<i)return["",!1,0,!1];if(!o.length&&!n.length)return["$.",!1,e.length-r,!0];if(n.length===0&&o.length===1&&/^\\?.$/.test(o[0])&&!u){let h=o[0].length===2?o[0].slice(-1):o[0];return[FM(h),!1,l-r,!1]}let p="["+(u?"^":"")+DT(o)+"]",f="["+(u?"":"^")+DT(n)+"]";return[o.length&&n.length?"("+p+"|"+f+")":o.length?p:f,s,l-r,!0]};var on=(e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!0}={})=>r?t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?e.replace(/\[([^\/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");var ht,qM=new Set(["!","?","+","*","@"]),H$=e=>qM.has(e),CT=e=>H$(e.type),VM=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),JM=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),HM=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),UT=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),BM="(?!(?:^|/)\\.\\.?(?:$|/))",Ul="(?!\\.)",WM=new Set(["[","."]),GM=new Set(["..","."]),KM=new Set("().*{}+?[]^$\\!"),XM=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),B$="[^/]",MT=B$+"*?",LT=B$+"+?",YM=0,Zn=class{type;#r;#n;#o=!1;#e=[];#t;#s;#u;#c=!1;#i;#a;#l=!1;id=++YM;get depth(){return(this.#t?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#r.id,parent:this.#t?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(t,r,o={}){this.type=t,t&&(this.#n=!0),this.#t=r,this.#r=this.#t?this.#t.#r:this,this.#i=this.#r===this?o:this.#r.#i,this.#u=this.#r===this?[]:this.#r.#u,t==="!"&&!this.#r.#c&&this.#u.push(this),this.#s=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#a!==void 0?this.#a:this.type?this.#a=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#a=this.#e.map(t=>String(t)).join("")}#v(){if(this!==this.#r)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let t;for(;t=this.#u.pop();){if(t.type!=="!")continue;let r=t,o=r.#t;for(;o;){for(let n=r.#s+1;!o.type&&n<o.#e.length;n++)for(let i of t.#e){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(o.#e[n])}r=o,o=r.#t}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof ht&&r.#t===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let t=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#c&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#s===0)return!0;let t=this.#t;for(let r=0;r<this.#s;r++){let o=t.#e[r];if(!(o instanceof ht&&o.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#s===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new ht(this.type,t);for(let o of this.#e)r.copyIn(o);return r}static#d(t,r,o,n,i){let a=n.maxExtglobRecursion??2,s=!1,c=!1,u=-1,l=!1;if(r.type===null){let h=o,y="";for(;h<t.length;){let x=t.charAt(h++);if(s||x==="\\"){s=!s,y+=x;continue}if(c){h===u+1?(x==="^"||x==="!")&&(l=!0):x==="]"&&!(h===u+2&&l)&&(c=!1),y+=x;continue}else if(x==="["){c=!0,u=h,l=!1,y+=x;continue}if(!n.noext&&H$(x)&&t.charAt(h)==="("&&i<=a){r.push(y),y="";let w=new ht(x,r);h=ht.#d(t,w,h,n,i+1),r.push(w);continue}y+=x}return r.push(y),h}let d=o+1,p=new ht(null,r),f=[],m="";for(;d<t.length;){let h=t.charAt(d++);if(s||h==="\\"){s=!s,m+=h;continue}if(c){d===u+1?(h==="^"||h==="!")&&(l=!0):h==="]"&&!(d===u+2&&l)&&(c=!1),m+=h;continue}else if(h==="["){c=!0,u=d,l=!1,m+=h;continue}if(!n.noext&&H$(h)&&t.charAt(d)==="("&&(i<=a||r&&r.#p(h))){let x=r&&r.#p(h)?0:1;p.push(m),m="";let E=new ht(h,p);p.push(E),d=ht.#d(t,E,d,n,i+x);continue}if(h==="|"){p.push(m),m="",f.push(p),p=new ht(null,r);continue}if(h===")")return m===""&&r.#e.length===0&&(r.#l=!0),p.push(m),m="",r.push(...f,p),d;m+=h}return r.type=null,r.#n=void 0,r.#e=[t.substring(o-1)],d}#y(t){return this.#m(t,JM)}#m(t,r=VM){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null)return!1;let o=t.#e[0];return!o||typeof o!="object"||o.type===null?!1:this.#p(o.type,r)}#p(t,r=HM){return!!r.get(this.type)?.includes(t)}#_(t,r){let o=t.#e[0],n=new ht(null,o,this.options);n.#e.push(""),o.push(n),this.#h(t,r)}#h(t,r){let o=t.#e[0];this.#e.splice(r,1,...o.#e);for(let n of o.#e)typeof n=="object"&&(n.#t=this);this.#a=void 0}#$(t){return!!UT.get(this.type)?.has(t)}#x(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=t.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#$(r.type)}#b(t){let r=UT.get(this.type),o=t.#e[0],n=r?.get(o.type);if(!n)return!1;this.#e=o.#e;for(let i of this.#e)typeof i=="object"&&(i.#t=this);this.type=n,this.#a=void 0,this.#l=!1}static fromGlob(t,r={}){let o=new ht(null,void 0,r);return ht.#d(t,o,0,r,0),o}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let t=this.toString(),[r,o,n,i]=this.toRegExpSource();if(!(n||this.#n||this.#i.nocase&&!this.#i.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return o;let s=(this.#i.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${r}$`,s),{_src:r,_glob:t})}get options(){return this.#i}toRegExpSource(t){let r=t??!!this.#i.dot;if(this.#r===this&&(this.#f(),this.#v()),!CT(this)){let c=this.isStart()&&this.isEnd()&&!this.#e.some(f=>typeof f!="string"),u=this.#e.map(f=>{let[m,h,y,x]=typeof f=="string"?ht.#w(f,this.#n,c):f.toRegExpSource(t);return this.#n=this.#n||y,this.#o=this.#o||x,m}).join(""),l="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&GM.has(this.#e[0]))){let m=WM,h=r&&m.has(u.charAt(0))||u.startsWith("\\.")&&m.has(u.charAt(2))||u.startsWith("\\.\\.")&&m.has(u.charAt(4)),y=!r&&!t&&m.has(u.charAt(0));l=h?BM:y?Ul:""}let d="";return this.isEnd()&&this.#r.#c&&this.#t?.type==="!"&&(d="(?:$|\\/)"),[l+u+d,on(u),this.#n=!!this.#n,this.#o]}let o=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",i=this.#g(r);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){let c=this.toString(),u=this;return u.#e=[c],u.type=null,u.#n=void 0,[c,on(this.toString()),!1,!1]}let a=!o||t||r||!Ul?"":this.#g(!0);a===i&&(a=""),a&&(i=`(?:${i})(?:${a})*?`);let s="";if(this.type==="!"&&this.#l)s=(this.isStart()&&!r?Ul:"")+LT;else{let c=this.type==="!"?"))"+(this.isStart()&&!r&&!t?Ul:"")+MT+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;s=n+i+c}return[s,on(i),this.#n=!!this.#n,this.#o]}#f(){if(CT(this)){let t=0,r=!1;do{r=!0;for(let o=0;o<this.#e.length;o++){let n=this.#e[o];typeof n=="object"&&(n.#f(),this.#m(n)?(r=!1,this.#h(n,o)):this.#y(n)?(r=!1,this.#_(n,o)):this.#x(n)&&(r=!1,this.#b(n)))}}while(!r&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#f();this.#a=void 0}#g(t){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[o,n,i,a]=r.toRegExpSource(t);return this.#o=this.#o||a,o}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#w(t,r,o=!1){let n=!1,i="",a=!1,s=!1;for(let c=0;c<t.length;c++){let u=t.charAt(c);if(n){n=!1,i+=(KM.has(u)?"\\":"")+u;continue}if(u==="*"){if(s)continue;s=!0,i+=o&&/^[*]+$/.test(t)?LT:MT,r=!0;continue}else s=!1;if(u==="\\"){c===t.length-1?i+="\\\\":n=!0;continue}if(u==="["){let[l,d,p,f]=AT(t,c);if(p){i+=l,a=a||d,c+=p-1,r=r||f;continue}}if(u==="?"){i+=B$,r=!0;continue}i+=XM(u)}return[i,on(t),!!r,a]}};ht=Zn;var W$=(e,{windowsPathsNoEscape:t=!1,magicalBraces:r=!1}={})=>r?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");var je=(e,t,r={})=>(as(t),!r.nocomment&&t.charAt(0)==="#"?!1:new ri(t,r).match(e)),QM=/^\*+([^+@!?\*\[\(]*)$/,eL=e=>t=>!t.startsWith(".")&&t.endsWith(e),tL=e=>t=>t.endsWith(e),rL=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),nL=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),oL=/^\*+\.\*+$/,iL=e=>!e.startsWith(".")&&e.includes("."),aL=e=>e!=="."&&e!==".."&&e.includes("."),sL=/^\.\*+$/,cL=e=>e!=="."&&e!==".."&&e.startsWith("."),uL=/^\*+$/,lL=e=>e.length!==0&&!e.startsWith("."),dL=e=>e.length!==0&&e!=="."&&e!=="..",pL=/^\?+([^+@!?\*\[\(]*)?$/,fL=([e,t=""])=>{let r=VT([e]);return t?(t=t.toLowerCase(),o=>r(o)&&o.toLowerCase().endsWith(t)):r},mL=([e,t=""])=>{let r=JT([e]);return t?(t=t.toLowerCase(),o=>r(o)&&o.toLowerCase().endsWith(t)):r},hL=([e,t=""])=>{let r=JT([e]);return t?o=>r(o)&&o.endsWith(t):r},gL=([e,t=""])=>{let r=VT([e]);return t?o=>r(o)&&o.endsWith(t):r},VT=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},JT=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},HT=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",FT={win32:{sep:"\\"},posix:{sep:"/"}},vL=HT==="win32"?FT.win32.sep:FT.posix.sep;je.sep=vL;var Ge=Symbol("globstar **");je.GLOBSTAR=Ge;var yL="[^/]",_L=yL+"*?",$L="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",xL="(?:(?!(?:\\/|^)\\.).)*?",bL=(e,t={})=>r=>je(r,e,t);je.filter=bL;var At=(e,t={})=>Object.assign({},e,t),wL=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return je;let t=je;return Object.assign((o,n,i={})=>t(o,n,At(e,i)),{Minimatch:class extends t.Minimatch{constructor(n,i={}){super(n,At(e,i))}static defaults(n){return t.defaults(At(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,i,a={}){super(n,i,At(e,a))}static fromGlob(n,i={}){return t.AST.fromGlob(n,At(e,i))}},unescape:(o,n={})=>t.unescape(o,At(e,n)),escape:(o,n={})=>t.escape(o,At(e,n)),filter:(o,n={})=>t.filter(o,At(e,n)),defaults:o=>t.defaults(At(e,o)),makeRe:(o,n={})=>t.makeRe(o,At(e,n)),braceExpand:(o,n={})=>t.braceExpand(o,At(e,n)),match:(o,n,i={})=>t.match(o,n,At(e,i)),sep:t.sep,GLOBSTAR:Ge})};je.defaults=wL;var BT=(e,t={})=>(as(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:RT(e,{max:t.braceExpandMax}));je.braceExpand=BT;var kL=(e,t={})=>new ri(e,t).makeRe();je.makeRe=kL;var zL=(e,t,r={})=>{let o=new ri(t,r);return e=e.filter(n=>o.match(n)),o.options.nonull&&!e.length&&e.push(t),e};je.match=zL;var qT=/[?*]|[+@!]\(.*?\)|\[|\]/,SL=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ri=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,r={}){as(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||HT,this.isWindows=this.platform==="win32";let o="allowWindowsEscape";this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r[o]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);let o=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(o),this.debug(this.pattern,this.globParts);let n=this.globParts.map((i,a,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=i[0]===""&&i[1]===""&&(i[2]==="?"||!qT.test(i[2]))&&!qT.test(i[3]),u=/^[a-z]:/i.test(i[0]);if(c)return[...i.slice(0,4),...i.slice(4).map(l=>this.parse(l))];if(u)return[i[0],...i.slice(1).map(l=>this.parse(l))]}return i.map(c=>this.parse(c))});if(this.debug(this.pattern,n),this.set=n.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){let a=this.set[i];a[0]===""&&a[1]===""&&this.globParts[i][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let o=0;o<t.length;o++)for(let n=0;n<t[o].length;n++)t[o][n]==="**"&&(t[o][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let o=-1;for(;(o=r.indexOf("**",o+1))!==-1;){let n=o;for(;r[n+1]==="**";)n++;n!==o&&r.splice(o,n-o)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((o,n)=>{let i=o[o.length-1];return n==="**"&&i==="**"?o:n===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(o.pop(),o):(o.push(n),o)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let i=t[n];n===1&&i===""&&t[0]===""||(i==="."||i==="")&&(r=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let o=0;for(;(o=t.indexOf("..",o+1))!==-1;){let n=t[o-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,t.splice(o-1,2),o-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let o of t){let n=-1;for(;(n=o.indexOf("**",n+1))!==-1;){let a=n;for(;o[a+1]==="**";)a++;a>n&&o.splice(n+1,a-n);let s=o[n+1],c=o[n+2],u=o[n+3];if(s!==".."||!c||c==="."||c===".."||!u||u==="."||u==="..")continue;r=!0,o.splice(n,1);let l=o.slice(0);l[n]="**",t.push(l),n--}if(!this.preserveMultipleSlashes){for(let a=1;a<o.length-1;a++){let s=o[a];a===1&&s===""&&o[0]===""||(s==="."||s==="")&&(r=!0,o.splice(a,1),a--)}o[0]==="."&&o.length===2&&(o[1]==="."||o[1]==="")&&(r=!0,o.pop())}let i=0;for(;(i=o.indexOf("..",i+1))!==-1;){let a=o[i-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let c=i===1&&o[i+1]==="**"?["."]:[];o.splice(i-1,2,...c),o.length===0&&o.push(""),i-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let o=r+1;o<t.length;o++){let n=this.partsMatch(t[r],t[o],!this.preserveMultipleSlashes);if(n){t[r]=[],t[o]=n;break}}return t.filter(r=>r.length)}partsMatch(t,r,o=!1){let n=0,i=0,a=[],s="";for(;n<t.length&&i<r.length;)if(t[n]===r[i])a.push(s==="b"?r[i]:t[n]),n++,i++;else if(o&&t[n]==="**"&&r[i]===t[n+1])a.push(t[n]),n++;else if(o&&r[i]==="**"&&t[n]===r[i+1])a.push(r[i]),i++;else if(t[n]==="*"&&r[i]&&(this.options.dot||!r[i].startsWith("."))&&r[i]!=="**"){if(s==="b")return!1;s="a",a.push(t[n]),n++,i++}else if(r[i]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(s==="a")return!1;s="b",a.push(r[i]),n++,i++}else return!1;return t.length===r.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,o=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)r=!r,o++;o&&(this.pattern=t.slice(o)),this.negate=r}matchOne(t,r,o=!1){let n=0,i=0;if(this.isWindows){let s=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),c=!s&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),u=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),l=!u&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),d=c?3:s?0:void 0,p=l?3:u?0:void 0;if(typeof d=="number"&&typeof p=="number"){let[f,m]=[t[d],r[p]];f.toLowerCase()===m.toLowerCase()&&(r[p]=f,i=p,n=d)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(Ge)?this.#r(t,r,o,n,i):this.#o(t,r,o,n,i)}#r(t,r,o,n,i){let a=r.indexOf(Ge,i),s=r.lastIndexOf(Ge),[c,u,l]=o?[r.slice(i,a),r.slice(a+1),[]]:[r.slice(i,a),r.slice(a+1,s),r.slice(s+1)];if(c.length){let E=t.slice(n,n+c.length);if(!this.#o(E,c,o,0,0))return!1;n+=c.length,i+=c.length}let d=0;if(l.length){if(l.length+n>t.length)return!1;let E=t.length-l.length;if(this.#o(t,l,o,E,0))d=l.length;else{if(t[t.length-1]!==""||n+l.length===t.length||(E--,!this.#o(t,l,o,E,0)))return!1;d=l.length+1}}if(!u.length){let E=!!d;for(let w=n;w<t.length-d;w++){let b=String(t[w]);if(E=!0,b==="."||b===".."||!this.options.dot&&b.startsWith("."))return!1}return o||E}let p=[[[],0]],f=p[0],m=0,h=[0];for(let E of u)E===Ge?(h.push(m),f=[[],0],p.push(f)):(f[0].push(E),m++);let y=p.length-1,x=t.length-d;for(let E of p)E[1]=x-(h[y--]+E[0].length);return!!this.#n(t,p,n,0,o,0,!!d)}#n(t,r,o,n,i,a,s){let c=r[n];if(!c){for(let d=o;d<t.length;d++){s=!0;let p=t[d];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return s}let[u,l]=c;for(;o<=l;){if(this.#o(t.slice(0,o+u.length),u,i,o,0)&&a<this.maxGlobstarRecursion){let f=this.#n(t,r,o+u.length,n+1,i,a+1,s);if(f!==!1)return f}let p=t[o];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;o++}return i||null}#o(t,r,o,n,i){let a,s,c,u;for(a=n,s=i,u=t.length,c=r.length;a<u&&s<c;a++,s++){this.debug("matchOne loop");let l=r[s],d=t[a];if(this.debug(r,l,d),l===!1||l===Ge)return!1;let p;if(typeof l=="string"?(p=d===l,this.debug("string match",l,d,p)):(p=l.test(d),this.debug("pattern match",l,d,p)),!p)return!1}if(a===u&&s===c)return!0;if(a===u)return o;if(s===c)return a===u-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return BT(this.pattern,this.options)}parse(t){as(t);let r=this.options;if(t==="**")return Ge;if(t==="")return"";let o,n=null;(o=t.match(uL))?n=r.dot?dL:lL:(o=t.match(QM))?n=(r.nocase?r.dot?nL:rL:r.dot?tL:eL)(o[1]):(o=t.match(pL))?n=(r.nocase?r.dot?mL:fL:r.dot?hL:gL)(o):(o=t.match(oL))?n=r.dot?aL:iL:(o=t.match(sL))&&(n=cL);let i=Zn.fromGlob(t,this.options).toMMPattern();return n&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:n}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,o=r.noglobstar?_L:r.dot?$L:xL,n=new Set(r.nocase?["i"]:[]),i=t.map(c=>{let u=c.map(d=>{if(d instanceof RegExp)for(let p of d.flags.split(""))n.add(p);return typeof d=="string"?SL(d):d===Ge?Ge:d._src});u.forEach((d,p)=>{let f=u[p+1],m=u[p-1];d!==Ge||m===Ge||(m===void 0?f!==void 0&&f!==Ge?u[p+1]="(?:\\/|"+o+"\\/)?"+f:u[p]=o:f===void 0?u[p-1]=m+"(?:\\/|\\/"+o+")?":f!==Ge&&(u[p-1]=m+"(?:\\/|\\/"+o+"\\/)"+f,u[p+1]=Ge))});let l=u.filter(d=>d!==Ge);if(this.partial&&l.length>=1){let d=[];for(let p=1;p<=l.length;p++)d.push(l.slice(0,p).join("/"));return"(?:"+d.join("|")+")"}return l.join("/")}).join("|"),[a,s]=t.length>1?["(?:",")"]:["",""];i="^"+a+i+s+"$",this.partial&&(i="^(?:\\/|"+a+i.slice(1,-1)+s+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let o=this.options;this.isWindows&&(t=t.split("\\").join("/"));let n=this.slashSplit(t);this.debug(this.pattern,"split",n);let i=this.set;this.debug(this.pattern,"set",i);let a=n[n.length-1];if(!a)for(let s=n.length-2;!a&&s>=0;s--)a=n[s];for(let s=0;s<i.length;s++){let c=i[s],u=n;if(o.matchBase&&c.length===1&&(u=[a]),this.matchOne(u,c,r))return o.flipNegate?!0:!this.negate}return o.flipNegate?!1:this.negate}static defaults(t){return je.defaults(t).Minimatch}};je.AST=Zn;je.Minimatch=ri;je.escape=W$;je.unescape=on;import WT from"path";import IL from"os";function PL(e){if(e.startsWith("/mnt/"))return e;if(e.match(/^\/[a-zA-Z]\//)&&process.platform==="win32"){let t=e.charAt(1).toUpperCase(),r=e.slice(2).replace(/\//g,"\\");return`${t}:${r}`}return e.match(/^[a-zA-Z]:/)?e.replace(/\//g,"\\"):e}function zr(e){if(e=e.trim().replace(/^["']|["']$/g,""),e.startsWith("/")&&(e.match(/^\/mnt\/[a-z]\//i)||process.platform!=="win32"||process.platform==="win32"&&!e.match(/^\/[a-zA-Z]\//)))return e.replace(/\/+/g,"/").replace(/(?<!^)\/$/,"");if(e=PL(e),e.startsWith("\\\\")){let o=e;o=o.replace(/^\\{2,}/,"\\\\"),e="\\\\"+o.substring(2).replace(/\\\\/g,"\\")}else e=e.replace(/\\\\/g,"\\");let r=WT.normalize(e);if(e.startsWith("\\\\")&&!r.startsWith("\\\\")&&(r="\\"+r),r.match(/^[a-zA-Z]:/)){let o=r.replace(/\//g,"\\");return/^[a-z]:/.test(o)&&(o=o.charAt(0).toUpperCase()+o.slice(1)),o}return process.platform==="win32"?r.replace(/\//g,"\\"):r}function Ml(e){return e.startsWith("~/")||e==="~"?WT.join(IL.homedir(),e.slice(1)):e}import{promises as KT}from"fs";import GT from"path";import TL from"os";async function EL(e){try{let t=e.startsWith("file://")?e.slice(7):e,r=t.startsWith("~/")||t==="~"?GT.join(TL.homedir(),t.slice(1)):t,o=GT.resolve(r),n=await KT.realpath(o);return zr(n)}catch{return null}}function G$(e,t,r){if(r)return`Skipping ${r}: ${e}`;let o=t instanceof Error?t.message:String(t);return`Skipping invalid directory: ${e} due to error: ${o}`}async function XT(e){let t=[];for(let r of e){let o=await EL(r.uri);if(!o){console.error(G$(r.uri,void 0,"invalid path or inaccessible"));continue}try{(await KT.stat(o)).isDirectory()?t.push(o):console.error(G$(o,void 0,"non-directory root"))}catch(n){console.error(G$(o,n))}}return t}import Ke from"fs/promises";import ni from"path";import{randomBytes as nE}from"crypto";function Sr(){}Sr.prototype={diff:function(t,r){var o,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.callback;typeof n=="function"&&(i=n,n={}),this.options=n;var a=this;function s(b){return i?(setTimeout(function(){i(void 0,b)},0),!0):b}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var c=r.length,u=t.length,l=1,d=c+u;n.maxEditLength&&(d=Math.min(d,n.maxEditLength));var p=(o=n.timeout)!==null&&o!==void 0?o:1/0,f=Date.now()+p,m=[{oldPos:-1,lastComponent:void 0}],h=this.extractCommon(m[0],r,t,0);if(m[0].oldPos+1>=u&&h+1>=c)return s([{value:this.join(r),count:r.length}]);var y=-1/0,x=1/0;function E(){for(var b=Math.max(y,-l);b<=Math.min(x,l);b+=2){var k=void 0,fe=m[b-1],me=m[b+1];fe&&(m[b-1]=void 0);var kt=!1;if(me){var Kt=me.oldPos-b;kt=me&&0<=Kt&&Kt<c}var zt=fe&&fe.oldPos+1<u;if(!kt&&!zt){m[b]=void 0;continue}if(!zt||kt&&fe.oldPos+1<me.oldPos?k=a.addToPath(me,!0,void 0,0):k=a.addToPath(fe,void 0,!0,1),h=a.extractCommon(k,r,t,b),k.oldPos+1>=u&&h+1>=c)return s(OL(a,k.lastComponent,r,t,a.useLongestToken));m[b]=k,k.oldPos+1>=u&&(x=Math.min(x,b-1)),h+1>=c&&(y=Math.max(y,b+1))}l++}if(i)(function b(){setTimeout(function(){if(l>d||Date.now()>f)return i();E()||b()},0)})();else for(;l<=d&&Date.now()<=f;){var w=E();if(w)return w}},addToPath:function(t,r,o,n){var i=t.lastComponent;return i&&i.added===r&&i.removed===o?{oldPos:t.oldPos+n,lastComponent:{count:i.count+1,added:r,removed:o,previousComponent:i.previousComponent}}:{oldPos:t.oldPos+n,lastComponent:{count:1,added:r,removed:o,previousComponent:i}}},extractCommon:function(t,r,o,n){for(var i=r.length,a=o.length,s=t.oldPos,c=s-n,u=0;c+1<i&&s+1<a&&this.equals(r[c+1],o[s+1]);)c++,s++,u++;return u&&(t.lastComponent={count:u,previousComponent:t.lastComponent}),t.oldPos=s,c},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],o=0;o<t.length;o++)t[o]&&r.push(t[o]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function OL(e,t,r,o,n){for(var i=[],a;t;)i.push(t),a=t.previousComponent,delete t.previousComponent,t=a;i.reverse();for(var s=0,c=i.length,u=0,l=0;s<c;s++){var d=i[s];if(d.removed){if(d.value=e.join(o.slice(l,l+d.count)),l+=d.count,s&&i[s-1].added){var f=i[s-1];i[s-1]=i[s],i[s]=f}}else{if(!d.added&&n){var p=r.slice(u,u+d.count);p=p.map(function(h,y){var x=o[l+y];return x.length>h.length?x:h}),d.value=e.join(p)}else d.value=e.join(r.slice(u,u+d.count));u+=d.count,d.added||(l+=d.count)}}var m=i[c-1];return c>1&&typeof m.value=="string"&&(m.added||m.removed)&&e.equals("",m.value)&&(i[c-2].value+=m.value,i.pop()),i}var AW=new Sr;var YT=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,QT=/\S/,eE=new Sr;eE.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!QT.test(e)&&!QT.test(t)};eE.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&YT.test(t[r])&&YT.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};var ex=new Sr;ex.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
119
+ `));var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var o=0;o<r.length;o++){var n=r[o];o%2&&!this.options.newlineIsToken?t[t.length-1]+=n:(this.options.ignoreWhitespace&&(n=n.trim()),t.push(n))}return t};function jL(e,t,r){return ex.diff(e,t,r)}var ZL=new Sr;ZL.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var NL=new Sr;NL.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Ll(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ll=function(t){return typeof t}:Ll=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ll(e)}function K$(e){return RL(e)||DL(e)||AL(e)||CL()}function RL(e){if(Array.isArray(e))return X$(e)}function DL(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function AL(e,t){if(e){if(typeof e=="string")return X$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X$(e,t)}}function X$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function CL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
120
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var UL=Object.prototype.toString,cs=new Sr;cs.useLongestToken=!0;cs.tokenize=ex.tokenize;cs.castInput=function(e){var t=this.options,r=t.undefinedReplacement,o=t.stringifyReplacer,n=o===void 0?function(i,a){return typeof a>"u"?r:a}:o;return typeof e=="string"?e:JSON.stringify(Y$(e,null,null,n),n," ")};cs.equals=function(e,t){return Sr.prototype.equals.call(cs,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Y$(e,t,r,o,n){t=t||[],r=r||[],o&&(e=o(n,e));var i;for(i=0;i<t.length;i+=1)if(t[i]===e)return r[i];var a;if(UL.call(e)==="[object Array]"){for(t.push(e),a=new Array(e.length),r.push(a),i=0;i<e.length;i+=1)a[i]=Y$(e[i],t,r,o,n);return t.pop(),r.pop(),a}if(e&&e.toJSON&&(e=e.toJSON()),Ll(e)==="object"&&e!==null){t.push(e),a={},r.push(a);var s=[],c;for(c in e)e.hasOwnProperty(c)&&s.push(c);for(s.sort(),i=0;i<s.length;i+=1)c=s[i],a[c]=Y$(e[c],t,r,o,c);t.pop(),r.pop()}else a=e;return a}var Q$=new Sr;Q$.tokenize=function(e){return e.slice()};Q$.join=Q$.removeEmpty=function(e){return e};function ML(e,t,r,o,n,i,a){a||(a={}),typeof a.context>"u"&&(a.context=4);var s=jL(r,o,a);if(!s)return;s.push({value:"",lines:[]});function c(x){return x.map(function(E){return" "+E})}for(var u=[],l=0,d=0,p=[],f=1,m=1,h=function(E){var w=s[E],b=w.lines||w.value.replace(/\n$/,"").split(`
121
+ `);if(w.lines=b,w.added||w.removed){var k;if(!l){var fe=s[E-1];l=f,d=m,fe&&(p=a.context>0?c(fe.lines.slice(-a.context)):[],l-=p.length,d-=p.length)}(k=p).push.apply(k,K$(b.map(function(ql){return(w.added?"+":"-")+ql}))),w.added?m+=b.length:f+=b.length}else{if(l)if(b.length<=a.context*2&&E<s.length-2){var me;(me=p).push.apply(me,K$(c(b)))}else{var kt,Kt=Math.min(b.length,a.context);(kt=p).push.apply(kt,K$(c(b.slice(0,Kt))));var zt={oldStart:l,oldLines:f-l+Kt,newStart:d,newLines:m-d+Kt,lines:p};if(E>=s.length-2&&b.length<=a.context){var Rn=/\n$/.test(r),us=/\n$/.test(o),ai=b.length==0&&p.length>zt.oldLines;!Rn&&ai&&r.length>0&&p.splice(zt.oldLines,0,"\"),(!Rn&&!ai||!us)&&p.push("\")}u.push(zt),l=0,d=0,p=[]}f+=b.length,m+=b.length}},y=0;y<s.length;y++)h(y);return{oldFileName:e,newFileName:t,oldHeader:n,newHeader:i,hunks:u}}function tE(e){if(Array.isArray(e))return e.map(tE).join(`
122
+ `);var t=[];e.oldFileName==e.newFileName&&t.push("Index: "+e.oldFileName),t.push("==================================================================="),t.push("--- "+e.oldFileName+(typeof e.oldHeader>"u"?"":" "+e.oldHeader)),t.push("+++ "+e.newFileName+(typeof e.newHeader>"u"?"":" "+e.newHeader));for(var r=0;r<e.hunks.length;r++){var o=e.hunks[r];o.oldLines===0&&(o.oldStart-=1),o.newLines===0&&(o.newStart-=1),t.push("@@ -"+o.oldStart+","+o.oldLines+" +"+o.newStart+","+o.newLines+" @@"),t.push.apply(t,o.lines)}return t.join(`
123
+ `)+`
124
+ `}function rE(e,t,r,o,n,i,a){return tE(ML(e,t,r,o,n,i,a))}import ur from"path";function Fl(e,t){if(typeof e!="string"||!Array.isArray(t)||!e||t.length===0||e.includes("\0"))return!1;let r;try{r=ur.resolve(ur.normalize(e))}catch{return!1}if(!ur.isAbsolute(r))throw new Error("Path must be absolute after normalization");return t.some(o=>{if(typeof o!="string"||!o||o.includes("\0"))return!1;let n;try{n=ur.resolve(ur.normalize(o))}catch{return!1}if(!ur.isAbsolute(n))throw new Error("Allowed directories must be absolute paths after normalization");if(r===n)return!0;if(n===ur.sep)return r.startsWith(ur.sep);if(ur.sep==="\\"&&n.match(/^[A-Za-z]:\\?$/)){let i=n.charAt(0).toLowerCase();return r.charAt(0).toLowerCase()===i&&r.startsWith(n.replace(/\\?$/,"\\"))}return r.startsWith(n+ur.sep)})}var Nn=[];function tx(e){Nn=[...e]}function rx(e){let t=["B","KB","MB","GB","TB"];if(e===0)return"0 B";let r=Math.floor(Math.log(e)/Math.log(1024));if(r<0||r===0)return`${e} ${t[0]}`;let o=Math.min(r,t.length-1);return`${(e/Math.pow(1024,o)).toFixed(2)} ${t[o]}`}function oi(e){return e.replace(/\r\n/g,`
125
+ `)}function LL(e,t,r="file"){let o=oi(e),n=oi(t);return rE(r,r,o,n,"original","modified")}async function at(e){let t=Ml(e),r=ni.isAbsolute(t)?ni.resolve(t):ni.resolve(process.cwd(),t),o=zr(r);if(!Fl(o,Nn))throw new Error(`Access denied - path outside allowed directories: ${r} not in ${Nn.join(", ")}`);try{let i=await Ke.realpath(r),a=zr(i);if(!Fl(a,Nn))throw new Error(`Access denied - symlink target outside allowed directories: ${i} not in ${Nn.join(", ")}`);return i}catch(i){if(i.code==="ENOENT"){let a=ni.dirname(r);try{let s=await Ke.realpath(a),c=zr(s);if(!Fl(c,Nn))throw new Error(`Access denied - parent directory outside allowed directories: ${s} not in ${Nn.join(", ")}`);return r}catch{throw new Error(`Parent directory does not exist: ${a}`)}}throw i}}async function oE(e){let t=await Ke.stat(e);return{size:t.size,created:t.birthtime,modified:t.mtime,accessed:t.atime,isDirectory:t.isDirectory(),isFile:t.isFile(),permissions:t.mode.toString(8).slice(-3)}}async function nx(e,t="utf-8"){return await Ke.readFile(e,t)}async function iE(e,t){try{await Ke.writeFile(e,t,{encoding:"utf-8",flag:"wx"})}catch(r){if(r.code==="EEXIST"){let o=`${e}.${nE(16).toString("hex")}.tmp`;try{await Ke.writeFile(o,t,"utf-8"),await Ke.rename(o,e)}catch(n){try{await Ke.unlink(o)}catch{}throw n}}else throw r}}async function aE(e,t,r=!1){let o=oi(await Ke.readFile(e,"utf-8")),n=o;for(let c of t){let u=oi(c.oldText),l=oi(c.newText);if(n.includes(u)){n=n.replace(u,l);continue}let d=u.split(`
126
+ `),p=n.split(`
127
+ `),f=!1;for(let m=0;m<=p.length-d.length;m++){let h=p.slice(m,m+d.length);if(d.every((x,E)=>{let w=h[E];return x.trim()===w.trim()})){let x=p[m].match(/^\s*/)?.[0]||"",E=l.split(`
128
+ `).map((w,b)=>{if(b===0)return x+w.trimStart();let k=d[b]?.match(/^\s*/)?.[0]||"",fe=w.match(/^\s*/)?.[0]||"";if(k&&fe){let me=fe.length-k.length;return x+" ".repeat(Math.max(0,me))+w.trimStart()}return w});p.splice(m,d.length,...E),n=p.join(`
129
+ `),f=!0;break}}if(!f)throw new Error(`Could not find exact match for edit:
130
+ ${c.oldText}`)}let i=LL(o,n,e),a=3;for(;i.includes("`".repeat(a));)a++;let s=`${"`".repeat(a)}diff
131
+ ${i}${"`".repeat(a)}
132
+
133
+ `;if(!r){let c=`${e}.${nE(16).toString("hex")}.tmp`;try{await Ke.writeFile(c,n,"utf-8"),await Ke.rename(c,e)}catch(u){try{await Ke.unlink(c)}catch{}throw u}}return s}async function sE(e,t){let n=(await Ke.stat(e)).size;if(n===0)return"";let i=await Ke.open(e,"r");try{let a=[],s=n,c=Buffer.alloc(1024),u=0,l="";for(;s>0&&u<t;){let d=Math.min(1024,s);s-=d;let{bytesRead:p}=await i.read(c,0,d,s);if(!p)break;let m=c.slice(0,p).toString("utf-8")+l,h=oi(m).split(`
134
+ `);s>0&&(l=h[0],h.shift());for(let y=h.length-1;y>=0&&u<t;y--)a.unshift(h[y]),u++}return a.join(`
135
+ `)}finally{await i.close()}}async function cE(e,t){let r=await Ke.open(e,"r");try{let o=[],n="",i=0,a=Buffer.alloc(1024);for(;o.length<t;){let s=await r.read(a,0,a.length,i);if(s.bytesRead===0)break;i+=s.bytesRead,n+=a.slice(0,s.bytesRead).toString("utf-8");let c=n.lastIndexOf(`
136
+ `);if(c!==-1){let u=n.slice(0,c).split(`
137
+ `);n=n.slice(c+1);for(let l of u)if(o.push(l),o.length>=t)break}}return n.length>0&&o.length<t&&o.push(n),o.join(`
138
+ `)}finally{await r.close()}}async function uE(e,t,r,o={}){let{excludePatterns:n=[]}=o,i=[];async function a(s){let c=await Ke.readdir(s,{withFileTypes:!0});for(let u of c){let l=ni.join(s,u.name);try{await at(l);let d=ni.relative(e,l);if(n.some(f=>je(d,f,{dot:!0})))continue;je(d,t,{dot:!0})&&i.push(l),u.isDirectory()&&await a(l)}catch{continue}}}return await a(e),i}var lE=process.argv.slice(2);lE.length===0&&(console.error("Usage: mcp-server-filesystem [allowed-directory] [additional-directories...]"),console.error("Note: Allowed directories can be provided via:"),console.error(" 1. Command-line arguments (shown above)"),console.error(" 2. MCP roots protocol (if client supports it)"),console.error("At least one directory must be provided by EITHER method for the server to operate."));var Ir=await Promise.all(lE.map(async e=>{let t=Ml(e),r=ii.resolve(t);try{let o=await an.realpath(r);return zr(o)}catch{return zr(r)}}));await Promise.all(Ir.map(async e=>{try{(await an.stat(e)).isDirectory()||(console.error(`Error: ${e} is not a directory`),process.exit(1))}catch(t){console.error(`Error accessing directory ${e}:`,t),process.exit(1)}}));tx(Ir);var qL=j.object({path:j.string(),tail:j.number().optional().describe("If provided, returns only the last N lines of the file"),head:j.number().optional().describe("If provided, returns only the first N lines of the file")}),aG=j.object({path:j.string()}),sG=j.object({paths:j.array(j.string()).min(1,"At least one file path must be provided").describe("Array of file paths to read. Each path must be a string pointing to a valid file within allowed directories.")}),cG=j.object({path:j.string(),content:j.string()}),VL=j.object({oldText:j.string().describe("Text to search for - must match exactly"),newText:j.string().describe("Text to replace with")}),uG=j.object({path:j.string(),edits:j.array(VL),dryRun:j.boolean().default(!1).describe("Preview changes using git-style diff format")}),lG=j.object({path:j.string()}),dG=j.object({path:j.string()}),pG=j.object({path:j.string(),sortBy:j.enum(["name","size"]).optional().default("name").describe("Sort entries by name or size")}),fG=j.object({path:j.string(),excludePatterns:j.array(j.string()).optional().default([])}),mG=j.object({source:j.string(),destination:j.string()}),hG=j.object({path:j.string(),pattern:j.string(),excludePatterns:j.array(j.string()).optional().default([])}),gG=j.object({path:j.string()}),Re=new Kc({name:"secure-filesystem-server",version:"0.2.0"});async function JL(e){return new Promise((t,r)=>{let o=FL(e),n=[];o.on("data",i=>{n.push(i)}),o.on("end",()=>{let i=Buffer.concat(n);t(i.toString("base64"))}),o.on("error",i=>r(i))})}var dE=async e=>{let t=await at(e.path);if(e.head&&e.tail)throw new Error("Cannot specify both head and tail parameters simultaneously");let r;return e.tail?r=await sE(t,e.tail):e.head?r=await cE(t,e.head):r=await nx(t),{content:[{type:"text",text:r}],structuredContent:{content:r}}};Re.registerTool("read_file",{title:"Read File (Deprecated)",description:"Read the complete contents of a file as text. DEPRECATED: Use read_text_file instead.",inputSchema:qL.shape,outputSchema:{content:j.string()},annotations:{readOnlyHint:!0}},dE);Re.registerTool("read_text_file",{title:"Read Text File",description:"Read the complete contents of a file from the file system as text. Handles various text encodings and provides detailed error messages if the file cannot be read. Use this tool when you need to examine the contents of a single file. Use the 'head' parameter to read only the first N lines of a file, or the 'tail' parameter to read only the last N lines of a file. Operates on the file as text regardless of extension. Only works within allowed directories.",inputSchema:{path:j.string(),tail:j.number().optional().describe("If provided, returns only the last N lines of the file"),head:j.number().optional().describe("If provided, returns only the first N lines of the file")},outputSchema:{content:j.string()},annotations:{readOnlyHint:!0}},dE);Re.registerTool("read_media_file",{title:"Read Media File",description:"Read an image or audio file. Returns the base64 encoded data and MIME type. Only works within allowed directories.",inputSchema:{path:j.string()},outputSchema:{content:j.array(j.object({type:j.enum(["image","audio","blob"]),data:j.string(),mimeType:j.string()}))},annotations:{readOnlyHint:!0}},async e=>{let t=await at(e.path),r=ii.extname(t).toLowerCase(),n={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".bmp":"image/bmp",".svg":"image/svg+xml",".mp3":"audio/mpeg",".wav":"audio/wav",".ogg":"audio/ogg",".flac":"audio/flac"}[r]||"application/octet-stream",i=await JL(t),s={type:n.startsWith("image/")?"image":n.startsWith("audio/")?"audio":"blob",data:i,mimeType:n};return{content:[s],structuredContent:{content:[s]}}});Re.registerTool("read_multiple_files",{title:"Read Multiple Files",description:"Read the contents of multiple files simultaneously. This is more efficient than reading files one by one when you need to analyze or compare multiple files. Each file's content is returned with its path as a reference. Failed reads for individual files won't stop the entire operation. Only works within allowed directories.",inputSchema:{paths:j.array(j.string()).min(1).describe("Array of file paths to read. Each path must be a string pointing to a valid file within allowed directories.")},outputSchema:{content:j.string()},annotations:{readOnlyHint:!0}},async e=>{let r=(await Promise.all(e.paths.map(async o=>{try{let n=await at(o),i=await nx(n);return`${o}:
139
+ ${i}
140
+ `}catch(n){let i=n instanceof Error?n.message:String(n);return`${o}: Error - ${i}`}}))).join(`
141
+ ---
142
+ `);return{content:[{type:"text",text:r}],structuredContent:{content:r}}});Re.registerTool("write_file",{title:"Write File",description:"Create a new file or completely overwrite an existing file with new content. Use with caution as it will overwrite existing files without warning. Handles text content with proper encoding. Only works within allowed directories.",inputSchema:{path:j.string(),content:j.string()},outputSchema:{content:j.string()},annotations:{readOnlyHint:!1,idempotentHint:!0,destructiveHint:!0}},async e=>{let t=await at(e.path);await iE(t,e.content);let r=`Successfully wrote to ${e.path}`;return{content:[{type:"text",text:r}],structuredContent:{content:r}}});Re.registerTool("edit_file",{title:"Edit File",description:"Make line-based edits to a text file. Each edit replaces exact line sequences with new content. Returns a git-style diff showing the changes made. Only works within allowed directories.",inputSchema:{path:j.string(),edits:j.array(j.object({oldText:j.string().describe("Text to search for - must match exactly"),newText:j.string().describe("Text to replace with")})),dryRun:j.boolean().default(!1).describe("Preview changes using git-style diff format")},outputSchema:{content:j.string()},annotations:{readOnlyHint:!1,idempotentHint:!1,destructiveHint:!0}},async e=>{let t=await at(e.path),r=await aE(t,e.edits,e.dryRun);return{content:[{type:"text",text:r}],structuredContent:{content:r}}});Re.registerTool("create_directory",{title:"Create Directory",description:"Create a new directory or ensure a directory exists. Can create multiple nested directories in one operation. If the directory already exists, this operation will succeed silently. Perfect for setting up directory structures for projects or ensuring required paths exist. Only works within allowed directories.",inputSchema:{path:j.string()},outputSchema:{content:j.string()},annotations:{readOnlyHint:!1,idempotentHint:!0,destructiveHint:!1}},async e=>{let t=await at(e.path);await an.mkdir(t,{recursive:!0});let r=`Successfully created directory ${e.path}`;return{content:[{type:"text",text:r}],structuredContent:{content:r}}});Re.registerTool("list_directory",{title:"List Directory",description:"Get a detailed listing of all files and directories in a specified path. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is essential for understanding directory structure and finding specific files within a directory. Only works within allowed directories.",inputSchema:{path:j.string()},outputSchema:{content:j.string()},annotations:{readOnlyHint:!0}},async e=>{let t=await at(e.path),o=(await an.readdir(t,{withFileTypes:!0})).map(n=>`${n.isDirectory()?"[DIR]":"[FILE]"} ${n.name}`).join(`
143
+ `);return{content:[{type:"text",text:o}],structuredContent:{content:o}}});Re.registerTool("list_directory_with_sizes",{title:"List Directory with Sizes",description:"Get a detailed listing of all files and directories in a specified path, including sizes. Results clearly distinguish between files and directories with [FILE] and [DIR] prefixes. This tool is useful for understanding directory structure and finding specific files within a directory. Only works within allowed directories.",inputSchema:{path:j.string(),sortBy:j.enum(["name","size"]).optional().default("name").describe("Sort entries by name or size")},outputSchema:{content:j.string()},annotations:{readOnlyHint:!0}},async e=>{let t=await at(e.path),r=await an.readdir(t,{withFileTypes:!0}),o=await Promise.all(r.map(async p=>{let f=ii.join(t,p.name);try{let m=await an.stat(f);return{name:p.name,isDirectory:p.isDirectory(),size:m.size,mtime:m.mtime}}catch{return{name:p.name,isDirectory:p.isDirectory(),size:0,mtime:new Date(0)}}})),i=[...o].sort((p,f)=>e.sortBy==="size"?f.size-p.size:p.name.localeCompare(f.name)).map(p=>`${p.isDirectory?"[DIR]":"[FILE]"} ${p.name.padEnd(30)} ${p.isDirectory?"":rx(p.size).padStart(10)}`),a=o.filter(p=>!p.isDirectory).length,s=o.filter(p=>p.isDirectory).length,c=o.reduce((p,f)=>p+(f.isDirectory?0:f.size),0),u=["",`Total: ${a} files, ${s} directories`,`Combined size: ${rx(c)}`],l=[...i,...u].join(`
144
+ `);return{content:[{type:"text",text:l}],structuredContent:{content:l}}});Re.registerTool("directory_tree",{title:"Directory Tree",description:"Get a recursive tree view of files and directories as a JSON structure. Each entry includes 'name', 'type' (file/directory), and 'children' for directories. Files have no children array, while directories always have a children array (which may be empty). The output is formatted with 2-space indentation for readability. Only works within allowed directories.",inputSchema:{path:j.string(),excludePatterns:j.array(j.string()).optional().default([])},outputSchema:{content:j.string()},annotations:{readOnlyHint:!0}},async e=>{let t=e.path;async function r(a,s=[]){let c=await at(a),u=await an.readdir(c,{withFileTypes:!0}),l=[];for(let d of u){let p=ii.relative(t,ii.join(a,d.name));if(s.some(h=>h.includes("*")?je(p,h,{dot:!0}):je(p,h,{dot:!0})||je(p,`**/${h}`,{dot:!0})||je(p,`**/${h}/**`,{dot:!0})))continue;let m={name:d.name,type:d.isDirectory()?"directory":"file"};if(d.isDirectory()){let h=ii.join(a,d.name);m.children=await r(h,s)}l.push(m)}return l}let o=await r(t,e.excludePatterns),n=JSON.stringify(o,null,2);return{content:[{type:"text",text:n}],structuredContent:{content:n}}});Re.registerTool("move_file",{title:"Move File",description:"Move or rename files and directories. Can move files between directories and rename them in a single operation. If the destination exists, the operation will fail. Works across different directories and can be used for simple renaming within the same directory. Both source and destination must be within allowed directories.",inputSchema:{source:j.string(),destination:j.string()},outputSchema:{content:j.string()},annotations:{readOnlyHint:!1,idempotentHint:!1,destructiveHint:!1}},async e=>{let t=await at(e.source),r=await at(e.destination);await an.rename(t,r);let o=`Successfully moved ${e.source} to ${e.destination}`;return{content:[{type:"text",text:o}],structuredContent:{content:o}}});Re.registerTool("search_files",{title:"Search Files",description:"Recursively search for files and directories matching a pattern. The patterns should be glob-style patterns that match paths relative to the working directory. Use pattern like '*.ext' to match files in current directory, and '**/*.ext' to match files in all subdirectories. Returns full paths to all matching items. Great for finding files when you don't know their exact location. Only searches within allowed directories.",inputSchema:{path:j.string(),pattern:j.string(),excludePatterns:j.array(j.string()).optional().default([])},outputSchema:{content:j.string()},annotations:{readOnlyHint:!0}},async e=>{let t=await at(e.path),r=await uE(t,e.pattern,Ir,{excludePatterns:e.excludePatterns}),o=r.length>0?r.join(`
145
+ `):"No matches found";return{content:[{type:"text",text:o}],structuredContent:{content:o}}});Re.registerTool("get_file_info",{title:"Get File Info",description:"Retrieve detailed metadata about a file or directory. Returns comprehensive information including size, creation time, last modified time, permissions, and type. This tool is perfect for understanding file characteristics without reading the actual content. Only works within allowed directories.",inputSchema:{path:j.string()},outputSchema:{content:j.string()},annotations:{readOnlyHint:!0}},async e=>{let t=await at(e.path),r=await oE(t),o=Object.entries(r).map(([n,i])=>`${n}: ${i}`).join(`
146
+ `);return{content:[{type:"text",text:o}],structuredContent:{content:o}}});Re.registerTool("list_allowed_directories",{title:"List Allowed Directories",description:"Returns the list of directories that this server is allowed to access. Subdirectories within these allowed directories are also accessible. Use this to understand which directories and their nested paths are available before trying to access files.",inputSchema:{},outputSchema:{content:j.string()},annotations:{readOnlyHint:!0}},async()=>{let e=`Allowed directories:
147
+ ${Ir.join(`
148
+ `)}`;return{content:[{type:"text",text:e}],structuredContent:{content:e}}});async function pE(e){let t=await XT(e);t.length>0?(Ir=[...t],tx(Ir),console.error(`Updated allowed directories from MCP roots: ${t.length} valid directories`)):console.error("No valid root directories provided by client")}Re.server.setNotificationHandler(Lf,async()=>{try{let e=await Re.server.listRoots();e&&"roots"in e&&await pE(e.roots)}catch(e){console.error("Failed to request roots from client:",e instanceof Error?e.message:String(e))}});Re.server.oninitialized=async()=>{if(Re.server.getClientCapabilities()?.roots)try{let t=await Re.server.listRoots();t&&"roots"in t?await pE(t.roots):console.error("Client returned no roots set, keeping current settings")}catch(t){console.error("Failed to request initial roots from client:",t instanceof Error?t.message:String(t))}else if(Ir.length>0)console.error("Client does not support MCP Roots, using allowed directories set from server args:",Ir);else throw new Error("Server cannot operate: No allowed directories available. Server was started without command-line directories and client either does not support MCP roots protocol or provided empty roots. Please either: 1) Start server with directory arguments, or 2) Use a client that supports MCP roots protocol and provides valid root directories.")};async function HL(){let e=new Yc;await Re.connect(e),console.error("Secure MCP Filesystem Server running on stdio"),Ir.length===0&&console.error("Started without allowed directories - waiting for client to provide roots via MCP protocol")}HL().catch(e=>{console.error("Fatal error running server:",e),process.exit(1)});