@mastergo/magic-mcp 0.2.5 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/README.zh-CN.md +3 -1
- package/dist/index.js +71 -70
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var j$=Object.create;var bu=Object.defineProperty;var L$=Object.getOwnPropertyDescriptor;var D$=Object.getOwnPropertyNames;var M$=Object.getPrototypeOf,F$=Object.prototype.hasOwnProperty;var $=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),za=(t,e)=>{for(var n in e)bu(t,n,{get:e[n],enumerable:!0})},U$=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of D$(e))!F$.call(t,o)&&o!==n&&bu(t,o,{get:()=>e[o],enumerable:!(r=L$(e,o))||r.enumerable});return t};var Ee=(t,e,n)=>(n=t!=null?j$(M$(t)):{},U$(e||!t||!t.__esModule?bu(n,"default",{value:t,enumerable:!0}):n,t));var Is=$(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.regexpCode=Ze.getEsmExportName=Ze.getProperty=Ze.safeStringify=Ze.stringify=Ze.strConcat=Ze.addCodeArg=Ze.str=Ze._=Ze.nil=Ze._Code=Ze.Name=Ze.IDENTIFIER=Ze._CodeOrName=void 0;var Rs=class{};Ze._CodeOrName=Rs;Ze.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var So=class extends Rs{constructor(e){if(super(),!Ze.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Ze.Name=So;var $n=class extends Rs{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((n,r)=>`${n}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((n,r)=>(r instanceof So&&(n[r.str]=(n[r.str]||0)+1),n),{})}};Ze._Code=$n;Ze.nil=new $n("");function pb(t,...e){let n=[t[0]],r=0;for(;r<e.length;)nf(n,e[r]),n.push(t[++r]);return new $n(n)}Ze._=pb;var tf=new $n("+");function db(t,...e){let n=[As(t[0])],r=0;for(;r<e.length;)n.push(tf),nf(n,e[r]),n.push(tf,As(t[++r]));return UP(n),new $n(n)}Ze.str=db;function nf(t,e){e instanceof $n?t.push(...e._items):e instanceof So?t.push(e):t.push(BP(e))}Ze.addCodeArg=nf;function UP(t){let e=1;for(;e<t.length-1;){if(t[e]===tf){let n=qP(t[e-1],t[e+1]);if(n!==void 0){t.splice(e-1,3,n);continue}t[e++]="+"}e++}}function qP(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof So||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof So))return`"${t}${e.slice(1)}`}function ZP(t,e){return e.emptyStr()?t:t.emptyStr()?e:db`${t}${e}`}Ze.strConcat=ZP;function BP(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:As(Array.isArray(t)?t.join(","):t)}function HP(t){return new $n(As(t))}Ze.stringify=HP;function As(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Ze.safeStringify=As;function VP(t){return typeof t=="string"&&Ze.IDENTIFIER.test(t)?new $n(`.${t}`):pb`[${t}]`}Ze.getProperty=VP;function GP(t){if(typeof t=="string"&&Ze.IDENTIFIER.test(t))return new $n(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}Ze.getEsmExportName=GP;function WP(t){return new $n(t.toString())}Ze.regexpCode=WP});var sf=$(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.ValueScope=ln.ValueScopeName=ln.Scope=ln.varKinds=ln.UsedValueState=void 0;var cn=Is(),rf=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Nc;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Nc||(ln.UsedValueState=Nc={}));ln.varKinds={const:new cn.Name("const"),let:new cn.Name("let"),var:new cn.Name("var")};var jc=class{constructor({prefixes:e,parent:n}={}){this._names={},this._prefixes=e,this._parent=n}toName(e){return e instanceof cn.Name?e:this.name(e)}name(e){return new cn.Name(this._newName(e))}_newName(e){let n=this._names[e]||this._nameGroup(e);return`${e}${n.index++}`}_nameGroup(e){var n,r;if(!((r=(n=this._parent)===null||n===void 0?void 0:n._prefixes)===null||r===void 0)&&r.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};ln.Scope=jc;var Lc=class extends cn.Name{constructor(e,n){super(n),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,cn._)`.${new cn.Name(n)}[${r}]`}};ln.ValueScopeName=Lc;var KP=(0,cn._)`\n`,of=class extends jc{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?KP:cn.nil}}get(){return this._scope}name(e){return new Lc(e,this._newName(e))}value(e,n){var r;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(e),{prefix:i}=o,s=(r=n.key)!==null&&r!==void 0?r:n.ref,a=this._values[i];if(a){let p=a.get(s);if(p)return p}else a=this._values[i]=new Map;a.set(s,o);let c=this._scope[i]||(this._scope[i]=[]),l=c.length;return c[l]=n.ref,o.setValue(n,{property:i,itemIndex:l}),o}getValue(e,n){let r=this._values[e];if(r)return r.get(n)}scopeRefs(e,n=this._values){return this._reduceValues(n,r=>{if(r.scopePath===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return(0,cn._)`${e}${r.scopePath}`})}scopeCode(e=this._values,n,r){return this._reduceValues(e,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},n,r)}_reduceValues(e,n,r={},o){let i=cn.nil;for(let s in e){let a=e[s];if(!a)continue;let c=r[s]=r[s]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,Nc.Started);let p=n(l);if(p){let d=this.opts.es5?ln.varKinds.var:ln.varKinds.const;i=(0,cn._)`${i}${d} ${l} = ${p};${this.opts._n}`}else if(p=o==null?void 0:o(l))i=(0,cn._)`${i}${p}${this.opts._n}`;else throw new rf(l);c.set(l,Nc.Completed)})}return i}};ln.ValueScope=of});var we=$(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.or=Se.and=Se.not=Se.CodeGen=Se.operators=Se.varKinds=Se.ValueScopeName=Se.ValueScope=Se.Scope=Se.Name=Se.regexpCode=Se.stringify=Se.getProperty=Se.nil=Se.strConcat=Se.str=Se._=void 0;var Le=Is(),Dn=sf(),Pr=Is();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return Pr._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return Pr.str}});Object.defineProperty(Se,"strConcat",{enumerable:!0,get:function(){return Pr.strConcat}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return Pr.nil}});Object.defineProperty(Se,"getProperty",{enumerable:!0,get:function(){return Pr.getProperty}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return Pr.stringify}});Object.defineProperty(Se,"regexpCode",{enumerable:!0,get:function(){return Pr.regexpCode}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return Pr.Name}});var Uc=sf();Object.defineProperty(Se,"Scope",{enumerable:!0,get:function(){return Uc.Scope}});Object.defineProperty(Se,"ValueScope",{enumerable:!0,get:function(){return Uc.ValueScope}});Object.defineProperty(Se,"ValueScopeName",{enumerable:!0,get:function(){return Uc.ValueScopeName}});Object.defineProperty(Se,"varKinds",{enumerable:!0,get:function(){return Uc.varKinds}});Se.operators={GT:new Le._Code(">"),GTE:new Le._Code(">="),LT:new Le._Code("<"),LTE:new Le._Code("<="),EQ:new Le._Code("==="),NEQ:new Le._Code("!=="),NOT:new Le._Code("!"),OR:new Le._Code("||"),AND:new Le._Code("&&"),ADD:new Le._Code("+")};var mr=class{optimizeNodes(){return this}optimizeNames(e,n){return this}},af=class extends mr{constructor(e,n,r){super(),this.varKind=e,this.name=n,this.rhs=r}render({es5:e,_n:n}){let r=e?Dn.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${o};`+n}optimizeNames(e,n){if(e[this.name.str])return this.rhs&&(this.rhs=di(this.rhs,e,n)),this}get names(){return this.rhs instanceof Le._CodeOrName?this.rhs.names:{}}},Dc=class extends mr{constructor(e,n,r){super(),this.lhs=e,this.rhs=n,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof Le.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=di(this.rhs,e,n),this}get names(){let e=this.lhs instanceof Le.Name?{}:{...this.lhs.names};return Fc(e,this.rhs)}},cf=class extends Dc{constructor(e,n,r,o){super(e,r,o),this.op=n}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},lf=class extends mr{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},uf=class extends mr{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},pf=class extends mr{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},df=class extends mr{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,n){return this.code=di(this.code,e,n),this}get names(){return this.code instanceof Le._CodeOrName?this.code.names:{}}},Cs=class extends mr{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((n,r)=>n+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,n=e.length;for(;n--;){let r=e[n].optimizeNodes();Array.isArray(r)?e.splice(n,1,...r):r?e[n]=r:e.splice(n,1)}return e.length>0?this:void 0}optimizeNames(e,n){let{nodes:r}=this,o=r.length;for(;o--;){let i=r[o];i.optimizeNames(e,n)||(JP(e,i.names),r.splice(o,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,n)=>Eo(e,n.names),{})}},hr=class extends Cs{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},ff=class extends Cs{},pi=class extends hr{};pi.kind="else";var ko=class t extends hr{constructor(e,n){super(n),this.condition=e}render(e){let n=`if(${this.condition})`+super.render(e);return this.else&&(n+="else "+this.else.render(e)),n}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let n=this.else;if(n){let r=n.optimizeNodes();n=this.else=Array.isArray(r)?new pi(r):r}if(n)return e===!1?n instanceof t?n:n.nodes:this.nodes.length?this:new t(fb(e),n instanceof t?[n]:n.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,n){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,n),!!(super.optimizeNames(e,n)||this.else))return this.condition=di(this.condition,e,n),this}get names(){let e=super.names;return Fc(e,this.condition),this.else&&Eo(e,this.else.names),e}};ko.kind="if";var To=class extends hr{};To.kind="for";var mf=class extends To{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iteration=di(this.iteration,e,n),this}get names(){return Eo(super.names,this.iteration.names)}},hf=class extends To{constructor(e,n,r,o){super(),this.varKind=e,this.name=n,this.from=r,this.to=o}render(e){let n=e.es5?Dn.varKinds.var:this.varKind,{name:r,from:o,to:i}=this;return`for(${n} ${r}=${o}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){let e=Fc(super.names,this.from);return Fc(e,this.to)}},Mc=class extends To{constructor(e,n,r,o){super(),this.loop=e,this.varKind=n,this.name=r,this.iterable=o}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iterable=di(this.iterable,e,n),this}get names(){return Eo(super.names,this.iterable.names)}},Ps=class extends hr{constructor(e,n,r){super(),this.name=e,this.args=n,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Ps.kind="func";var Os=class extends Cs{render(e){return"return "+super.render(e)}};Os.kind="return";var gf=class extends hr{render(e){let n="try"+super.render(e);return this.catch&&(n+=this.catch.render(e)),this.finally&&(n+=this.finally.render(e)),n}optimizeNodes(){var e,n;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(e,n){var r,o;return super.optimizeNames(e,n),(r=this.catch)===null||r===void 0||r.optimizeNames(e,n),(o=this.finally)===null||o===void 0||o.optimizeNames(e,n),this}get names(){let e=super.names;return this.catch&&Eo(e,this.catch.names),this.finally&&Eo(e,this.finally.names),e}},zs=class extends hr{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};zs.kind="catch";var Ns=class extends hr{render(e){return"finally"+super.render(e)}};Ns.kind="finally";var yf=class{constructor(e,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
|
|
3
|
-
`:""},this._extScope=e,this._scope=new Dn.Scope({parent:e}),this._nodes=[new ff]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let r=this._extScope.value(e,n);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,r,o){let i=this._scope.toName(n);return r!==void 0&&o&&(this._constants[i.str]=r),this._leafNode(new af(e,i,r)),i}const(e,n,r){return this._def(Dn.varKinds.const,e,n,r)}let(e,n,r){return this._def(Dn.varKinds.let,e,n,r)}var(e,n,r){return this._def(Dn.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new Dc(e,n,r))}add(e,n){return this._leafNode(new cf(e,Se.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Le.nil&&this._leafNode(new df(e)),this}object(...e){let n=["{"];for(let[r,o]of e)n.length>1&&n.push(","),n.push(r),(r!==o||this.opts.es5)&&(n.push(":"),(0,Le.addCodeArg)(n,o));return n.push("}"),new Le._Code(n)}if(e,n,r){if(this._blockNode(new ko(e)),n&&r)this.code(n).else().code(r).endIf();else if(n)this.code(n).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new ko(e))}else(){return this._elseNode(new pi)}endIf(){return this._endBlockNode(ko,pi)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new mf(e),n)}forRange(e,n,r,o,i=this.opts.es5?Dn.varKinds.var:Dn.varKinds.let){let s=this._scope.toName(e);return this._for(new hf(i,s,n,r),()=>o(s))}forOf(e,n,r,o=Dn.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=n instanceof Le.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Le._)`${s}.length`,a=>{this.var(i,(0,Le._)`${s}[${a}]`),r(i)})}return this._for(new Mc("of",o,i,n),()=>r(i))}forIn(e,n,r,o=this.opts.es5?Dn.varKinds.var:Dn.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Le._)`Object.keys(${n})`,r);let i=this._scope.toName(e);return this._for(new Mc("in",o,i,n),()=>r(i))}endFor(){return this._endBlockNode(To)}label(e){return this._leafNode(new lf(e))}break(e){return this._leafNode(new uf(e))}return(e){let n=new Os;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Os)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new gf;if(this._blockNode(o),this.code(e),n){let i=this.name("e");this._currNode=o.catch=new zs(i),n(i)}return r&&(this._currNode=o.finally=new Ns,this.code(r)),this._endBlockNode(zs,Ns)}throw(e){return this._leafNode(new pf(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-n;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=Le.nil,r,o){return this._blockNode(new Ps(e,n,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Ps)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,n){let r=this._currNode;if(r instanceof e||n&&r instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof ko))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};Se.CodeGen=yf;function Eo(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function Fc(t,e){return e instanceof Le._CodeOrName?Eo(t,e.names):t}function di(t,e,n){if(t instanceof Le.Name)return r(t);if(!o(t))return t;return new Le._Code(t._items.reduce((i,s)=>(s instanceof Le.Name&&(s=r(s)),s instanceof Le._Code?i.push(...s._items):i.push(s),i),[]));function r(i){let s=n[i.str];return s===void 0||e[i.str]!==1?i:(delete e[i.str],s)}function o(i){return i instanceof Le._Code&&i._items.some(s=>s instanceof Le.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function JP(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function fb(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Le._)`!${xf(t)}`}Se.not=fb;var YP=mb(Se.operators.AND);function XP(...t){return t.reduce(YP)}Se.and=XP;var QP=mb(Se.operators.OR);function eO(...t){return t.reduce(QP)}Se.or=eO;function mb(t){return(e,n)=>e===Le.nil?n:n===Le.nil?e:(0,Le._)`${xf(e)} ${t} ${xf(n)}`}function xf(t){return t instanceof Le.Name?t:(0,Le._)`(${t})`}});var Me=$($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.checkStrictMode=$e.getErrorPath=$e.Type=$e.useFunc=$e.setEvaluated=$e.evaluatedPropsToName=$e.mergeEvaluated=$e.eachItem=$e.unescapeJsonPointer=$e.escapeJsonPointer=$e.escapeFragment=$e.unescapeFragment=$e.schemaRefOrVal=$e.schemaHasRulesButRef=$e.schemaHasRules=$e.checkUnknownRules=$e.alwaysValidSchema=$e.toHash=void 0;var Xe=we(),tO=Is();function nO(t){let e={};for(let n of t)e[n]=!0;return e}$e.toHash=nO;function rO(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(yb(t,e),!xb(e,t.self.RULES.all))}$e.alwaysValidSchema=rO;function yb(t,e=t.schema){let{opts:n,self:r}=t;if(!n.strictSchema||typeof e=="boolean")return;let o=r.RULES.keywords;for(let i in e)o[i]||_b(t,`unknown keyword: "${i}"`)}$e.checkUnknownRules=yb;function xb(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(e[n])return!0;return!1}$e.schemaHasRules=xb;function oO(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(n!=="$ref"&&e.all[n])return!0;return!1}$e.schemaHasRulesButRef=oO;function iO({topSchemaRef:t,schemaPath:e},n,r,o){if(!o){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,Xe._)`${n}`}return(0,Xe._)`${t}${e}${(0,Xe.getProperty)(r)}`}$e.schemaRefOrVal=iO;function sO(t){return vb(decodeURIComponent(t))}$e.unescapeFragment=sO;function aO(t){return encodeURIComponent(bf(t))}$e.escapeFragment=aO;function bf(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}$e.escapeJsonPointer=bf;function vb(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}$e.unescapeJsonPointer=vb;function cO(t,e){if(Array.isArray(t))for(let n of t)e(n);else e(t)}$e.eachItem=cO;function hb({mergeNames:t,mergeToName:e,mergeValues:n,resultToName:r}){return(o,i,s,a)=>{let c=s===void 0?i:s instanceof Xe.Name?(i instanceof Xe.Name?t(o,i,s):e(o,i,s),s):i instanceof Xe.Name?(e(o,s,i),i):n(i,s);return a===Xe.Name&&!(c instanceof Xe.Name)?r(o,c):c}}$e.mergeEvaluated={props:hb({mergeNames:(t,e,n)=>t.if((0,Xe._)`${n} !== true && ${e} !== undefined`,()=>{t.if((0,Xe._)`${e} === true`,()=>t.assign(n,!0),()=>t.assign(n,(0,Xe._)`${n} || {}`).code((0,Xe._)`Object.assign(${n}, ${e})`))}),mergeToName:(t,e,n)=>t.if((0,Xe._)`${n} !== true`,()=>{e===!0?t.assign(n,!0):(t.assign(n,(0,Xe._)`${n} || {}`),_f(t,n,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:bb}),items:hb({mergeNames:(t,e,n)=>t.if((0,Xe._)`${n} !== true && ${e} !== undefined`,()=>t.assign(n,(0,Xe._)`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`)),mergeToName:(t,e,n)=>t.if((0,Xe._)`${n} !== true`,()=>t.assign(n,e===!0?!0:(0,Xe._)`${n} > ${e} ? ${n} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function bb(t,e){if(e===!0)return t.var("props",!0);let n=t.var("props",(0,Xe._)`{}`);return e!==void 0&&_f(t,n,e),n}$e.evaluatedPropsToName=bb;function _f(t,e,n){Object.keys(n).forEach(r=>t.assign((0,Xe._)`${e}${(0,Xe.getProperty)(r)}`,!0))}$e.setEvaluated=_f;var gb={};function lO(t,e){return t.scopeValue("func",{ref:e,code:gb[e.code]||(gb[e.code]=new tO._Code(e.code))})}$e.useFunc=lO;var vf;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(vf||($e.Type=vf={}));function uO(t,e,n){if(t instanceof Xe.Name){let r=e===vf.Num;return n?r?(0,Xe._)`"[" + ${t} + "]"`:(0,Xe._)`"['" + ${t} + "']"`:r?(0,Xe._)`"/" + ${t}`:(0,Xe._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,Xe.getProperty)(t).toString():"/"+bf(t)}$e.getErrorPath=uO;function _b(t,e,n=t.opts.strictSchema){if(n){if(e=`strict mode: ${e}`,n===!0)throw new Error(e);t.self.logger.warn(e)}}$e.checkStrictMode=_b});var gr=$(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});var Vt=we(),pO={data:new Vt.Name("data"),valCxt:new Vt.Name("valCxt"),instancePath:new Vt.Name("instancePath"),parentData:new Vt.Name("parentData"),parentDataProperty:new Vt.Name("parentDataProperty"),rootData:new Vt.Name("rootData"),dynamicAnchors:new Vt.Name("dynamicAnchors"),vErrors:new Vt.Name("vErrors"),errors:new Vt.Name("errors"),this:new Vt.Name("this"),self:new Vt.Name("self"),scope:new Vt.Name("scope"),json:new Vt.Name("json"),jsonPos:new Vt.Name("jsonPos"),jsonLen:new Vt.Name("jsonLen"),jsonPart:new Vt.Name("jsonPart")};wf.default=pO});var js=$(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.extendErrors=Gt.resetErrorsCount=Gt.reportExtraError=Gt.reportError=Gt.keyword$DataError=Gt.keywordError=void 0;var Fe=we(),qc=Me(),en=gr();Gt.keywordError={message:({keyword:t})=>(0,Fe.str)`must pass "${t}" keyword validation`};Gt.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,Fe.str)`"${t}" keyword must be ${e} ($data)`:(0,Fe.str)`"${t}" keyword is invalid ($data)`};function dO(t,e=Gt.keywordError,n,r){let{it:o}=t,{gen:i,compositeRule:s,allErrors:a}=o,c=kb(t,e,n);r??(s||a)?wb(i,c):Sb(o,(0,Fe._)`[${c}]`)}Gt.reportError=dO;function fO(t,e=Gt.keywordError,n){let{it:r}=t,{gen:o,compositeRule:i,allErrors:s}=r,a=kb(t,e,n);wb(o,a),i||s||Sb(r,en.default.vErrors)}Gt.reportExtraError=fO;function mO(t,e){t.assign(en.default.errors,e),t.if((0,Fe._)`${en.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,Fe._)`${en.default.vErrors}.length`,e),()=>t.assign(en.default.vErrors,null)))}Gt.resetErrorsCount=mO;function hO({gen:t,keyword:e,schemaValue:n,data:r,errsCount:o,it:i}){if(o===void 0)throw new Error("ajv implementation error");let s=t.name("err");t.forRange("i",o,en.default.errors,a=>{t.const(s,(0,Fe._)`${en.default.vErrors}[${a}]`),t.if((0,Fe._)`${s}.instancePath === undefined`,()=>t.assign((0,Fe._)`${s}.instancePath`,(0,Fe.strConcat)(en.default.instancePath,i.errorPath))),t.assign((0,Fe._)`${s}.schemaPath`,(0,Fe.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(t.assign((0,Fe._)`${s}.schema`,n),t.assign((0,Fe._)`${s}.data`,r))})}Gt.extendErrors=hO;function wb(t,e){let n=t.const("err",e);t.if((0,Fe._)`${en.default.vErrors} === null`,()=>t.assign(en.default.vErrors,(0,Fe._)`[${n}]`),(0,Fe._)`${en.default.vErrors}.push(${n})`),t.code((0,Fe._)`${en.default.errors}++`)}function Sb(t,e){let{gen:n,validateName:r,schemaEnv:o}=t;o.$async?n.throw((0,Fe._)`new ${t.ValidationError}(${e})`):(n.assign((0,Fe._)`${r}.errors`,e),n.return(!1))}var $o={keyword:new Fe.Name("keyword"),schemaPath:new Fe.Name("schemaPath"),params:new Fe.Name("params"),propertyName:new Fe.Name("propertyName"),message:new Fe.Name("message"),schema:new Fe.Name("schema"),parentSchema:new Fe.Name("parentSchema")};function kb(t,e,n){let{createErrors:r}=t.it;return r===!1?(0,Fe._)`{}`:gO(t,e,n)}function gO(t,e,n={}){let{gen:r,it:o}=t,i=[yO(o,n),xO(t,n)];return vO(t,e,i),r.object(...i)}function yO({errorPath:t},{instancePath:e}){let n=e?(0,Fe.str)`${t}${(0,qc.getErrorPath)(e,qc.Type.Str)}`:t;return[en.default.instancePath,(0,Fe.strConcat)(en.default.instancePath,n)]}function xO({keyword:t,it:{errSchemaPath:e}},{schemaPath:n,parentSchema:r}){let o=r?e:(0,Fe.str)`${e}/${t}`;return n&&(o=(0,Fe.str)`${o}${(0,qc.getErrorPath)(n,qc.Type.Str)}`),[$o.schemaPath,o]}function vO(t,{params:e,message:n},r){let{keyword:o,data:i,schemaValue:s,it:a}=t,{opts:c,propertyName:l,topSchemaRef:p,schemaPath:d}=a;r.push([$o.keyword,o],[$o.params,typeof e=="function"?e(t):e||(0,Fe._)`{}`]),c.messages&&r.push([$o.message,typeof n=="function"?n(t):n]),c.verbose&&r.push([$o.schema,s],[$o.parentSchema,(0,Fe._)`${p}${d}`],[en.default.data,i]),l&&r.push([$o.propertyName,l])}});var Eb=$(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.boolOrEmptySchema=fi.topBoolOrEmptySchema=void 0;var bO=js(),_O=we(),wO=gr(),SO={message:"boolean schema is false"};function kO(t){let{gen:e,schema:n,validateName:r}=t;n===!1?Tb(t,!1):typeof n=="object"&&n.$async===!0?e.return(wO.default.data):(e.assign((0,_O._)`${r}.errors`,null),e.return(!0))}fi.topBoolOrEmptySchema=kO;function TO(t,e){let{gen:n,schema:r}=t;r===!1?(n.var(e,!1),Tb(t)):n.var(e,!0)}fi.boolOrEmptySchema=TO;function Tb(t,e){let{gen:n,data:r}=t,o={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,bO.reportError)(o,SO,void 0,e)}});var Sf=$(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.getRules=mi.isJSONType=void 0;var EO=["string","number","integer","boolean","null","object","array"],$O=new Set(EO);function RO(t){return typeof t=="string"&&$O.has(t)}mi.isJSONType=RO;function AO(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}mi.getRules=AO});var kf=$(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.shouldUseRule=Or.shouldUseGroup=Or.schemaHasRulesForType=void 0;function IO({schema:t,self:e},n){let r=e.RULES.types[n];return r&&r!==!0&&$b(t,r)}Or.schemaHasRulesForType=IO;function $b(t,e){return e.rules.some(n=>Rb(t,n))}Or.shouldUseGroup=$b;function Rb(t,e){var n;return t[e.keyword]!==void 0||((n=e.definition.implements)===null||n===void 0?void 0:n.some(r=>t[r]!==void 0))}Or.shouldUseRule=Rb});var Ls=$(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.reportTypeError=Wt.checkDataTypes=Wt.checkDataType=Wt.coerceAndCheckDataType=Wt.getJSONTypes=Wt.getSchemaTypes=Wt.DataType=void 0;var CO=Sf(),PO=kf(),OO=js(),ve=we(),Ab=Me(),hi;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(hi||(Wt.DataType=hi={}));function zO(t){let e=Ib(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}Wt.getSchemaTypes=zO;function Ib(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(CO.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Wt.getJSONTypes=Ib;function NO(t,e){let{gen:n,data:r,opts:o}=t,i=jO(e,o.coerceTypes),s=e.length>0&&!(i.length===0&&e.length===1&&(0,PO.schemaHasRulesForType)(t,e[0]));if(s){let a=Ef(e,r,o.strictNumbers,hi.Wrong);n.if(a,()=>{i.length?LO(t,e,i):$f(t)})}return s}Wt.coerceAndCheckDataType=NO;var Cb=new Set(["string","number","integer","boolean","null"]);function jO(t,e){return e?t.filter(n=>Cb.has(n)||e==="array"&&n==="array"):[]}function LO(t,e,n){let{gen:r,data:o,opts:i}=t,s=r.let("dataType",(0,ve._)`typeof ${o}`),a=r.let("coerced",(0,ve._)`undefined`);i.coerceTypes==="array"&&r.if((0,ve._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>r.assign(o,(0,ve._)`${o}[0]`).assign(s,(0,ve._)`typeof ${o}`).if(Ef(e,o,i.strictNumbers),()=>r.assign(a,o))),r.if((0,ve._)`${a} !== undefined`);for(let l of n)(Cb.has(l)||l==="array"&&i.coerceTypes==="array")&&c(l);r.else(),$f(t),r.endIf(),r.if((0,ve._)`${a} !== undefined`,()=>{r.assign(o,a),DO(t,a)});function c(l){switch(l){case"string":r.elseIf((0,ve._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,ve._)`"" + ${o}`).elseIf((0,ve._)`${o} === null`).assign(a,(0,ve._)`""`);return;case"number":r.elseIf((0,ve._)`${s} == "boolean" || ${o} === null
|
|
2
|
+
"use strict";var W$=Object.create;var Tu=Object.defineProperty;var K$=Object.getOwnPropertyDescriptor;var J$=Object.getOwnPropertyNames;var Y$=Object.getPrototypeOf,X$=Object.prototype.hasOwnProperty;var $=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Da=(t,e)=>{for(var n in e)Tu(t,n,{get:e[n],enumerable:!0})},Q$=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of J$(e))!X$.call(t,o)&&o!==n&&Tu(t,o,{get:()=>e[o],enumerable:!(r=K$(e,o))||r.enumerable});return t};var Ee=(t,e,n)=>(n=t!=null?W$(Y$(t)):{},Q$(e||!t||!t.__esModule?Tu(n,"default",{value:t,enumerable:!0}):n,t));var Os=$(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.regexpCode=Ze.getEsmExportName=Ze.getProperty=Ze.safeStringify=Ze.stringify=Ze.strConcat=Ze.addCodeArg=Ze.str=Ze._=Ze.nil=Ze._Code=Ze.Name=Ze.IDENTIFIER=Ze._CodeOrName=void 0;var Cs=class{};Ze._CodeOrName=Cs;Ze.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var To=class extends Cs{constructor(e){if(super(),!Ze.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Ze.Name=To;var Rn=class extends Cs{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((n,r)=>`${n}${r}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((n,r)=>(r instanceof To&&(n[r.str]=(n[r.str]||0)+1),n),{})}};Ze._Code=Rn;Ze.nil=new Rn("");function _b(t,...e){let n=[t[0]],r=0;for(;r<e.length;)cf(n,e[r]),n.push(t[++r]);return new Rn(n)}Ze._=_b;var af=new Rn("+");function wb(t,...e){let n=[Is(t[0])],r=0;for(;r<e.length;)n.push(af),cf(n,e[r]),n.push(af,Is(t[++r]));return eO(n),new Rn(n)}Ze.str=wb;function cf(t,e){e instanceof Rn?t.push(...e._items):e instanceof To?t.push(e):t.push(rO(e))}Ze.addCodeArg=cf;function eO(t){let e=1;for(;e<t.length-1;){if(t[e]===af){let n=tO(t[e-1],t[e+1]);if(n!==void 0){t.splice(e-1,3,n);continue}t[e++]="+"}e++}}function tO(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof To||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof To))return`"${t}${e.slice(1)}`}function nO(t,e){return e.emptyStr()?t:t.emptyStr()?e:wb`${t}${e}`}Ze.strConcat=nO;function rO(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Is(Array.isArray(t)?t.join(","):t)}function oO(t){return new Rn(Is(t))}Ze.stringify=oO;function Is(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Ze.safeStringify=Is;function iO(t){return typeof t=="string"&&Ze.IDENTIFIER.test(t)?new Rn(`.${t}`):_b`[${t}]`}Ze.getProperty=iO;function sO(t){if(typeof t=="string"&&Ze.IDENTIFIER.test(t))return new Rn(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}Ze.getEsmExportName=sO;function aO(t){return new Rn(t.toString())}Ze.regexpCode=aO});var pf=$(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.ValueScope=pn.ValueScopeName=pn.Scope=pn.varKinds=pn.UsedValueState=void 0;var un=Os(),lf=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},Dc;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(Dc||(pn.UsedValueState=Dc={}));pn.varKinds={const:new un.Name("const"),let:new un.Name("let"),var:new un.Name("var")};var Mc=class{constructor({prefixes:e,parent:n}={}){this._names={},this._prefixes=e,this._parent=n}toName(e){return e instanceof un.Name?e:this.name(e)}name(e){return new un.Name(this._newName(e))}_newName(e){let n=this._names[e]||this._nameGroup(e);return`${e}${n.index++}`}_nameGroup(e){var n,r;if(!((r=(n=this._parent)===null||n===void 0?void 0:n._prefixes)===null||r===void 0)&&r.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};pn.Scope=Mc;var Fc=class extends un.Name{constructor(e,n){super(n),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=(0,un._)`.${new un.Name(n)}[${r}]`}};pn.ValueScopeName=Fc;var cO=(0,un._)`\n`,uf=class extends Mc{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?cO:un.nil}}get(){return this._scope}name(e){return new Fc(e,this._newName(e))}value(e,n){var r;if(n.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(e),{prefix:i}=o,s=(r=n.key)!==null&&r!==void 0?r:n.ref,a=this._values[i];if(a){let p=a.get(s);if(p)return p}else a=this._values[i]=new Map;a.set(s,o);let c=this._scope[i]||(this._scope[i]=[]),l=c.length;return c[l]=n.ref,o.setValue(n,{property:i,itemIndex:l}),o}getValue(e,n){let r=this._values[e];if(r)return r.get(n)}scopeRefs(e,n=this._values){return this._reduceValues(n,r=>{if(r.scopePath===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return(0,un._)`${e}${r.scopePath}`})}scopeCode(e=this._values,n,r){return this._reduceValues(e,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},n,r)}_reduceValues(e,n,r={},o){let i=un.nil;for(let s in e){let a=e[s];if(!a)continue;let c=r[s]=r[s]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,Dc.Started);let p=n(l);if(p){let d=this.opts.es5?pn.varKinds.var:pn.varKinds.const;i=(0,un._)`${i}${d} ${l} = ${p};${this.opts._n}`}else if(p=o==null?void 0:o(l))i=(0,un._)`${i}${p}${this.opts._n}`;else throw new lf(l);c.set(l,Dc.Completed)})}return i}};pn.ValueScope=uf});var we=$(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});Se.or=Se.and=Se.not=Se.CodeGen=Se.operators=Se.varKinds=Se.ValueScopeName=Se.ValueScope=Se.Scope=Se.Name=Se.regexpCode=Se.stringify=Se.getProperty=Se.nil=Se.strConcat=Se.str=Se._=void 0;var Le=Os(),Mn=pf(),Nr=Os();Object.defineProperty(Se,"_",{enumerable:!0,get:function(){return Nr._}});Object.defineProperty(Se,"str",{enumerable:!0,get:function(){return Nr.str}});Object.defineProperty(Se,"strConcat",{enumerable:!0,get:function(){return Nr.strConcat}});Object.defineProperty(Se,"nil",{enumerable:!0,get:function(){return Nr.nil}});Object.defineProperty(Se,"getProperty",{enumerable:!0,get:function(){return Nr.getProperty}});Object.defineProperty(Se,"stringify",{enumerable:!0,get:function(){return Nr.stringify}});Object.defineProperty(Se,"regexpCode",{enumerable:!0,get:function(){return Nr.regexpCode}});Object.defineProperty(Se,"Name",{enumerable:!0,get:function(){return Nr.Name}});var Bc=pf();Object.defineProperty(Se,"Scope",{enumerable:!0,get:function(){return Bc.Scope}});Object.defineProperty(Se,"ValueScope",{enumerable:!0,get:function(){return Bc.ValueScope}});Object.defineProperty(Se,"ValueScopeName",{enumerable:!0,get:function(){return Bc.ValueScopeName}});Object.defineProperty(Se,"varKinds",{enumerable:!0,get:function(){return Bc.varKinds}});Se.operators={GT:new Le._Code(">"),GTE:new Le._Code(">="),LT:new Le._Code("<"),LTE:new Le._Code("<="),EQ:new Le._Code("==="),NEQ:new Le._Code("!=="),NOT:new Le._Code("!"),OR:new Le._Code("||"),AND:new Le._Code("&&"),ADD:new Le._Code("+")};var gr=class{optimizeNodes(){return this}optimizeNames(e,n){return this}},df=class extends gr{constructor(e,n,r){super(),this.varKind=e,this.name=n,this.rhs=r}render({es5:e,_n:n}){let r=e?Mn.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${o};`+n}optimizeNames(e,n){if(e[this.name.str])return this.rhs&&(this.rhs=hi(this.rhs,e,n)),this}get names(){return this.rhs instanceof Le._CodeOrName?this.rhs.names:{}}},Uc=class extends gr{constructor(e,n,r){super(),this.lhs=e,this.rhs=n,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof Le.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=hi(this.rhs,e,n),this}get names(){let e=this.lhs instanceof Le.Name?{}:{...this.lhs.names};return Zc(e,this.rhs)}},ff=class extends Uc{constructor(e,n,r,o){super(e,r,o),this.op=n}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},mf=class extends gr{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},hf=class extends gr{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},gf=class extends gr{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},yf=class extends gr{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,n){return this.code=hi(this.code,e,n),this}get names(){return this.code instanceof Le._CodeOrName?this.code.names:{}}},zs=class extends gr{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((n,r)=>n+r.render(e),"")}optimizeNodes(){let{nodes:e}=this,n=e.length;for(;n--;){let r=e[n].optimizeNodes();Array.isArray(r)?e.splice(n,1,...r):r?e[n]=r:e.splice(n,1)}return e.length>0?this:void 0}optimizeNames(e,n){let{nodes:r}=this,o=r.length;for(;o--;){let i=r[o];i.optimizeNames(e,n)||(lO(e,i.names),r.splice(o,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,n)=>Ro(e,n.names),{})}},yr=class extends zs{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},xf=class extends zs{},mi=class extends yr{};mi.kind="else";var Eo=class t extends yr{constructor(e,n){super(n),this.condition=e}render(e){let n=`if(${this.condition})`+super.render(e);return this.else&&(n+="else "+this.else.render(e)),n}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let n=this.else;if(n){let r=n.optimizeNodes();n=this.else=Array.isArray(r)?new mi(r):r}if(n)return e===!1?n instanceof t?n:n.nodes:this.nodes.length?this:new t(Sb(e),n instanceof t?[n]:n.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,n){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(e,n),!!(super.optimizeNames(e,n)||this.else))return this.condition=hi(this.condition,e,n),this}get names(){let e=super.names;return Zc(e,this.condition),this.else&&Ro(e,this.else.names),e}};Eo.kind="if";var $o=class extends yr{};$o.kind="for";var vf=class extends $o{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iteration=hi(this.iteration,e,n),this}get names(){return Ro(super.names,this.iteration.names)}},bf=class extends $o{constructor(e,n,r,o){super(),this.varKind=e,this.name=n,this.from=r,this.to=o}render(e){let n=e.es5?Mn.varKinds.var:this.varKind,{name:r,from:o,to:i}=this;return`for(${n} ${r}=${o}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){let e=Zc(super.names,this.from);return Zc(e,this.to)}},qc=class extends $o{constructor(e,n,r,o){super(),this.loop=e,this.varKind=n,this.name=r,this.iterable=o}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,n){if(super.optimizeNames(e,n))return this.iterable=hi(this.iterable,e,n),this}get names(){return Ro(super.names,this.iterable.names)}},Ns=class extends yr{constructor(e,n,r){super(),this.name=e,this.args=n,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Ns.kind="func";var js=class extends zs{render(e){return"return "+super.render(e)}};js.kind="return";var _f=class extends yr{render(e){let n="try"+super.render(e);return this.catch&&(n+=this.catch.render(e)),this.finally&&(n+=this.finally.render(e)),n}optimizeNodes(){var e,n;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(n=this.finally)===null||n===void 0||n.optimizeNodes(),this}optimizeNames(e,n){var r,o;return super.optimizeNames(e,n),(r=this.catch)===null||r===void 0||r.optimizeNames(e,n),(o=this.finally)===null||o===void 0||o.optimizeNames(e,n),this}get names(){let e=super.names;return this.catch&&Ro(e,this.catch.names),this.finally&&Ro(e,this.finally.names),e}},Ls=class extends yr{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Ls.kind="catch";var Ds=class extends yr{render(e){return"finally"+super.render(e)}};Ds.kind="finally";var wf=class{constructor(e,n={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...n,_n:n.lines?`
|
|
3
|
+
`:""},this._extScope=e,this._scope=new Mn.Scope({parent:e}),this._nodes=[new xf]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let r=this._extScope.value(e,n);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,r,o){let i=this._scope.toName(n);return r!==void 0&&o&&(this._constants[i.str]=r),this._leafNode(new df(e,i,r)),i}const(e,n,r){return this._def(Mn.varKinds.const,e,n,r)}let(e,n,r){return this._def(Mn.varKinds.let,e,n,r)}var(e,n,r){return this._def(Mn.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new Uc(e,n,r))}add(e,n){return this._leafNode(new ff(e,Se.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Le.nil&&this._leafNode(new yf(e)),this}object(...e){let n=["{"];for(let[r,o]of e)n.length>1&&n.push(","),n.push(r),(r!==o||this.opts.es5)&&(n.push(":"),(0,Le.addCodeArg)(n,o));return n.push("}"),new Le._Code(n)}if(e,n,r){if(this._blockNode(new Eo(e)),n&&r)this.code(n).else().code(r).endIf();else if(n)this.code(n).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Eo(e))}else(){return this._elseNode(new mi)}endIf(){return this._endBlockNode(Eo,mi)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new vf(e),n)}forRange(e,n,r,o,i=this.opts.es5?Mn.varKinds.var:Mn.varKinds.let){let s=this._scope.toName(e);return this._for(new bf(i,s,n,r),()=>o(s))}forOf(e,n,r,o=Mn.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=n instanceof Le.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Le._)`${s}.length`,a=>{this.var(i,(0,Le._)`${s}[${a}]`),r(i)})}return this._for(new qc("of",o,i,n),()=>r(i))}forIn(e,n,r,o=this.opts.es5?Mn.varKinds.var:Mn.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Le._)`Object.keys(${n})`,r);let i=this._scope.toName(e);return this._for(new qc("in",o,i,n),()=>r(i))}endFor(){return this._endBlockNode($o)}label(e){return this._leafNode(new mf(e))}break(e){return this._leafNode(new hf(e))}return(e){let n=new js;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(js)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new _f;if(this._blockNode(o),this.code(e),n){let i=this.name("e");this._currNode=o.catch=new Ls(i),n(i)}return r&&(this._currNode=o.finally=new Ds,this.code(r)),this._endBlockNode(Ls,Ds)}throw(e){return this._leafNode(new gf(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-n;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=Le.nil,r,o){return this._blockNode(new Ns(e,n,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Ns)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,n){let r=this._currNode;if(r instanceof e||n&&r instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof Eo))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};Se.CodeGen=wf;function Ro(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function Zc(t,e){return e instanceof Le._CodeOrName?Ro(t,e.names):t}function hi(t,e,n){if(t instanceof Le.Name)return r(t);if(!o(t))return t;return new Le._Code(t._items.reduce((i,s)=>(s instanceof Le.Name&&(s=r(s)),s instanceof Le._Code?i.push(...s._items):i.push(s),i),[]));function r(i){let s=n[i.str];return s===void 0||e[i.str]!==1?i:(delete e[i.str],s)}function o(i){return i instanceof Le._Code&&i._items.some(s=>s instanceof Le.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function lO(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function Sb(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Le._)`!${Sf(t)}`}Se.not=Sb;var uO=kb(Se.operators.AND);function pO(...t){return t.reduce(uO)}Se.and=pO;var dO=kb(Se.operators.OR);function fO(...t){return t.reduce(dO)}Se.or=fO;function kb(t){return(e,n)=>e===Le.nil?n:n===Le.nil?e:(0,Le._)`${Sf(e)} ${t} ${Sf(n)}`}function Sf(t){return t instanceof Le.Name?t:(0,Le._)`(${t})`}});var Me=$($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.checkStrictMode=$e.getErrorPath=$e.Type=$e.useFunc=$e.setEvaluated=$e.evaluatedPropsToName=$e.mergeEvaluated=$e.eachItem=$e.unescapeJsonPointer=$e.escapeJsonPointer=$e.escapeFragment=$e.unescapeFragment=$e.schemaRefOrVal=$e.schemaHasRulesButRef=$e.schemaHasRules=$e.checkUnknownRules=$e.alwaysValidSchema=$e.toHash=void 0;var Xe=we(),mO=Os();function hO(t){let e={};for(let n of t)e[n]=!0;return e}$e.toHash=hO;function gO(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:($b(t,e),!Rb(e,t.self.RULES.all))}$e.alwaysValidSchema=gO;function $b(t,e=t.schema){let{opts:n,self:r}=t;if(!n.strictSchema||typeof e=="boolean")return;let o=r.RULES.keywords;for(let i in e)o[i]||Cb(t,`unknown keyword: "${i}"`)}$e.checkUnknownRules=$b;function Rb(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(e[n])return!0;return!1}$e.schemaHasRules=Rb;function yO(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(n!=="$ref"&&e.all[n])return!0;return!1}$e.schemaHasRulesButRef=yO;function xO({topSchemaRef:t,schemaPath:e},n,r,o){if(!o){if(typeof n=="number"||typeof n=="boolean")return n;if(typeof n=="string")return(0,Xe._)`${n}`}return(0,Xe._)`${t}${e}${(0,Xe.getProperty)(r)}`}$e.schemaRefOrVal=xO;function vO(t){return Ab(decodeURIComponent(t))}$e.unescapeFragment=vO;function bO(t){return encodeURIComponent(Tf(t))}$e.escapeFragment=bO;function Tf(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}$e.escapeJsonPointer=Tf;function Ab(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}$e.unescapeJsonPointer=Ab;function _O(t,e){if(Array.isArray(t))for(let n of t)e(n);else e(t)}$e.eachItem=_O;function Tb({mergeNames:t,mergeToName:e,mergeValues:n,resultToName:r}){return(o,i,s,a)=>{let c=s===void 0?i:s instanceof Xe.Name?(i instanceof Xe.Name?t(o,i,s):e(o,i,s),s):i instanceof Xe.Name?(e(o,s,i),i):n(i,s);return a===Xe.Name&&!(c instanceof Xe.Name)?r(o,c):c}}$e.mergeEvaluated={props:Tb({mergeNames:(t,e,n)=>t.if((0,Xe._)`${n} !== true && ${e} !== undefined`,()=>{t.if((0,Xe._)`${e} === true`,()=>t.assign(n,!0),()=>t.assign(n,(0,Xe._)`${n} || {}`).code((0,Xe._)`Object.assign(${n}, ${e})`))}),mergeToName:(t,e,n)=>t.if((0,Xe._)`${n} !== true`,()=>{e===!0?t.assign(n,!0):(t.assign(n,(0,Xe._)`${n} || {}`),Ef(t,n,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Pb}),items:Tb({mergeNames:(t,e,n)=>t.if((0,Xe._)`${n} !== true && ${e} !== undefined`,()=>t.assign(n,(0,Xe._)`${e} === true ? true : ${n} > ${e} ? ${n} : ${e}`)),mergeToName:(t,e,n)=>t.if((0,Xe._)`${n} !== true`,()=>t.assign(n,e===!0?!0:(0,Xe._)`${n} > ${e} ? ${n} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Pb(t,e){if(e===!0)return t.var("props",!0);let n=t.var("props",(0,Xe._)`{}`);return e!==void 0&&Ef(t,n,e),n}$e.evaluatedPropsToName=Pb;function Ef(t,e,n){Object.keys(n).forEach(r=>t.assign((0,Xe._)`${e}${(0,Xe.getProperty)(r)}`,!0))}$e.setEvaluated=Ef;var Eb={};function wO(t,e){return t.scopeValue("func",{ref:e,code:Eb[e.code]||(Eb[e.code]=new mO._Code(e.code))})}$e.useFunc=wO;var kf;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(kf||($e.Type=kf={}));function SO(t,e,n){if(t instanceof Xe.Name){let r=e===kf.Num;return n?r?(0,Xe._)`"[" + ${t} + "]"`:(0,Xe._)`"['" + ${t} + "']"`:r?(0,Xe._)`"/" + ${t}`:(0,Xe._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,Xe.getProperty)(t).toString():"/"+Tf(t)}$e.getErrorPath=SO;function Cb(t,e,n=t.opts.strictSchema){if(n){if(e=`strict mode: ${e}`,n===!0)throw new Error(e);t.self.logger.warn(e)}}$e.checkStrictMode=Cb});var xr=$($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});var Gt=we(),kO={data:new Gt.Name("data"),valCxt:new Gt.Name("valCxt"),instancePath:new Gt.Name("instancePath"),parentData:new Gt.Name("parentData"),parentDataProperty:new Gt.Name("parentDataProperty"),rootData:new Gt.Name("rootData"),dynamicAnchors:new Gt.Name("dynamicAnchors"),vErrors:new Gt.Name("vErrors"),errors:new Gt.Name("errors"),this:new Gt.Name("this"),self:new Gt.Name("self"),scope:new Gt.Name("scope"),json:new Gt.Name("json"),jsonPos:new Gt.Name("jsonPos"),jsonLen:new Gt.Name("jsonLen"),jsonPart:new Gt.Name("jsonPart")};$f.default=kO});var Ms=$(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.extendErrors=Wt.resetErrorsCount=Wt.reportExtraError=Wt.reportError=Wt.keyword$DataError=Wt.keywordError=void 0;var Fe=we(),Hc=Me(),tn=xr();Wt.keywordError={message:({keyword:t})=>(0,Fe.str)`must pass "${t}" keyword validation`};Wt.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,Fe.str)`"${t}" keyword must be ${e} ($data)`:(0,Fe.str)`"${t}" keyword is invalid ($data)`};function TO(t,e=Wt.keywordError,n,r){let{it:o}=t,{gen:i,compositeRule:s,allErrors:a}=o,c=zb(t,e,n);r??(s||a)?Ib(i,c):Ob(o,(0,Fe._)`[${c}]`)}Wt.reportError=TO;function EO(t,e=Wt.keywordError,n){let{it:r}=t,{gen:o,compositeRule:i,allErrors:s}=r,a=zb(t,e,n);Ib(o,a),i||s||Ob(r,tn.default.vErrors)}Wt.reportExtraError=EO;function $O(t,e){t.assign(tn.default.errors,e),t.if((0,Fe._)`${tn.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,Fe._)`${tn.default.vErrors}.length`,e),()=>t.assign(tn.default.vErrors,null)))}Wt.resetErrorsCount=$O;function RO({gen:t,keyword:e,schemaValue:n,data:r,errsCount:o,it:i}){if(o===void 0)throw new Error("ajv implementation error");let s=t.name("err");t.forRange("i",o,tn.default.errors,a=>{t.const(s,(0,Fe._)`${tn.default.vErrors}[${a}]`),t.if((0,Fe._)`${s}.instancePath === undefined`,()=>t.assign((0,Fe._)`${s}.instancePath`,(0,Fe.strConcat)(tn.default.instancePath,i.errorPath))),t.assign((0,Fe._)`${s}.schemaPath`,(0,Fe.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(t.assign((0,Fe._)`${s}.schema`,n),t.assign((0,Fe._)`${s}.data`,r))})}Wt.extendErrors=RO;function Ib(t,e){let n=t.const("err",e);t.if((0,Fe._)`${tn.default.vErrors} === null`,()=>t.assign(tn.default.vErrors,(0,Fe._)`[${n}]`),(0,Fe._)`${tn.default.vErrors}.push(${n})`),t.code((0,Fe._)`${tn.default.errors}++`)}function Ob(t,e){let{gen:n,validateName:r,schemaEnv:o}=t;o.$async?n.throw((0,Fe._)`new ${t.ValidationError}(${e})`):(n.assign((0,Fe._)`${r}.errors`,e),n.return(!1))}var Ao={keyword:new Fe.Name("keyword"),schemaPath:new Fe.Name("schemaPath"),params:new Fe.Name("params"),propertyName:new Fe.Name("propertyName"),message:new Fe.Name("message"),schema:new Fe.Name("schema"),parentSchema:new Fe.Name("parentSchema")};function zb(t,e,n){let{createErrors:r}=t.it;return r===!1?(0,Fe._)`{}`:AO(t,e,n)}function AO(t,e,n={}){let{gen:r,it:o}=t,i=[PO(o,n),CO(t,n)];return IO(t,e,i),r.object(...i)}function PO({errorPath:t},{instancePath:e}){let n=e?(0,Fe.str)`${t}${(0,Hc.getErrorPath)(e,Hc.Type.Str)}`:t;return[tn.default.instancePath,(0,Fe.strConcat)(tn.default.instancePath,n)]}function CO({keyword:t,it:{errSchemaPath:e}},{schemaPath:n,parentSchema:r}){let o=r?e:(0,Fe.str)`${e}/${t}`;return n&&(o=(0,Fe.str)`${o}${(0,Hc.getErrorPath)(n,Hc.Type.Str)}`),[Ao.schemaPath,o]}function IO(t,{params:e,message:n},r){let{keyword:o,data:i,schemaValue:s,it:a}=t,{opts:c,propertyName:l,topSchemaRef:p,schemaPath:d}=a;r.push([Ao.keyword,o],[Ao.params,typeof e=="function"?e(t):e||(0,Fe._)`{}`]),c.messages&&r.push([Ao.message,typeof n=="function"?n(t):n]),c.verbose&&r.push([Ao.schema,s],[Ao.parentSchema,(0,Fe._)`${p}${d}`],[tn.default.data,i]),l&&r.push([Ao.propertyName,l])}});var jb=$(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.boolOrEmptySchema=gi.topBoolOrEmptySchema=void 0;var OO=Ms(),zO=we(),NO=xr(),jO={message:"boolean schema is false"};function LO(t){let{gen:e,schema:n,validateName:r}=t;n===!1?Nb(t,!1):typeof n=="object"&&n.$async===!0?e.return(NO.default.data):(e.assign((0,zO._)`${r}.errors`,null),e.return(!0))}gi.topBoolOrEmptySchema=LO;function DO(t,e){let{gen:n,schema:r}=t;r===!1?(n.var(e,!1),Nb(t)):n.var(e,!0)}gi.boolOrEmptySchema=DO;function Nb(t,e){let{gen:n,data:r}=t,o={gen:n,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,OO.reportError)(o,jO,void 0,e)}});var Rf=$(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.getRules=yi.isJSONType=void 0;var MO=["string","number","integer","boolean","null","object","array"],FO=new Set(MO);function UO(t){return typeof t=="string"&&FO.has(t)}yi.isJSONType=UO;function qO(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}yi.getRules=qO});var Af=$(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.shouldUseRule=jr.shouldUseGroup=jr.schemaHasRulesForType=void 0;function ZO({schema:t,self:e},n){let r=e.RULES.types[n];return r&&r!==!0&&Lb(t,r)}jr.schemaHasRulesForType=ZO;function Lb(t,e){return e.rules.some(n=>Db(t,n))}jr.shouldUseGroup=Lb;function Db(t,e){var n;return t[e.keyword]!==void 0||((n=e.definition.implements)===null||n===void 0?void 0:n.some(r=>t[r]!==void 0))}jr.shouldUseRule=Db});var Fs=$(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.reportTypeError=Kt.checkDataTypes=Kt.checkDataType=Kt.coerceAndCheckDataType=Kt.getJSONTypes=Kt.getSchemaTypes=Kt.DataType=void 0;var BO=Rf(),HO=Af(),VO=Ms(),ve=we(),Mb=Me(),xi;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(xi||(Kt.DataType=xi={}));function GO(t){let e=Fb(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}Kt.getSchemaTypes=GO;function Fb(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(BO.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Kt.getJSONTypes=Fb;function WO(t,e){let{gen:n,data:r,opts:o}=t,i=KO(e,o.coerceTypes),s=e.length>0&&!(i.length===0&&e.length===1&&(0,HO.schemaHasRulesForType)(t,e[0]));if(s){let a=Cf(e,r,o.strictNumbers,xi.Wrong);n.if(a,()=>{i.length?JO(t,e,i):If(t)})}return s}Kt.coerceAndCheckDataType=WO;var Ub=new Set(["string","number","integer","boolean","null"]);function KO(t,e){return e?t.filter(n=>Ub.has(n)||e==="array"&&n==="array"):[]}function JO(t,e,n){let{gen:r,data:o,opts:i}=t,s=r.let("dataType",(0,ve._)`typeof ${o}`),a=r.let("coerced",(0,ve._)`undefined`);i.coerceTypes==="array"&&r.if((0,ve._)`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>r.assign(o,(0,ve._)`${o}[0]`).assign(s,(0,ve._)`typeof ${o}`).if(Cf(e,o,i.strictNumbers),()=>r.assign(a,o))),r.if((0,ve._)`${a} !== undefined`);for(let l of n)(Ub.has(l)||l==="array"&&i.coerceTypes==="array")&&c(l);r.else(),If(t),r.endIf(),r.if((0,ve._)`${a} !== undefined`,()=>{r.assign(o,a),YO(t,a)});function c(l){switch(l){case"string":r.elseIf((0,ve._)`${s} == "number" || ${s} == "boolean"`).assign(a,(0,ve._)`"" + ${o}`).elseIf((0,ve._)`${o} === null`).assign(a,(0,ve._)`""`);return;case"number":r.elseIf((0,ve._)`${s} == "boolean" || ${o} === null
|
|
4
4
|
|| (${s} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,ve._)`+${o}`);return;case"integer":r.elseIf((0,ve._)`${s} === "boolean" || ${o} === null
|
|
5
5
|
|| (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,ve._)`+${o}`);return;case"boolean":r.elseIf((0,ve._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf((0,ve._)`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":r.elseIf((0,ve._)`${o} === "" || ${o} === 0 || ${o} === false`),r.assign(a,null);return;case"array":r.elseIf((0,ve._)`${s} === "string" || ${s} === "number"
|
|
6
|
-
|| ${s} === "boolean" || ${o} === null`).assign(a,(0,ve._)`[${o}]`)}}}function DO({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,ve._)`${e} !== undefined`,()=>t.assign((0,ve._)`${e}[${n}]`,r))}function Tf(t,e,n,r=hi.Correct){let o=r===hi.Correct?ve.operators.EQ:ve.operators.NEQ,i;switch(t){case"null":return(0,ve._)`${e} ${o} null`;case"array":i=(0,ve._)`Array.isArray(${e})`;break;case"object":i=(0,ve._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,ve._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,ve._)`typeof ${e} ${o} ${t}`}return r===hi.Correct?i:(0,ve.not)(i);function s(a=ve.nil){return(0,ve.and)((0,ve._)`typeof ${e} == "number"`,a,n?(0,ve._)`isFinite(${e})`:ve.nil)}}Wt.checkDataType=Tf;function Ef(t,e,n,r){if(t.length===1)return Tf(t[0],e,n,r);let o,i=(0,Ab.toHash)(t);if(i.array&&i.object){let s=(0,ve._)`typeof ${e} != "object"`;o=i.null?s:(0,ve._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else o=ve.nil;i.number&&delete i.integer;for(let s in i)o=(0,ve.and)(o,Tf(s,e,n,r));return o}Wt.checkDataTypes=Ef;var MO={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ve._)`{type: ${t}}`:(0,ve._)`{type: ${e}}`};function $f(t){let e=FO(t);(0,OO.reportError)(e,MO)}Wt.reportTypeError=$f;function FO(t){let{gen:e,data:n,schema:r}=t,o=(0,Ab.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:o,schemaValue:o,parentSchema:r,params:{},it:t}}});var Ob=$(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.assignDefaults=void 0;var gi=we(),UO=Me();function qO(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let o in n)Pb(t,o,n[o].default);else e==="array"&&Array.isArray(r)&&r.forEach((o,i)=>Pb(t,i,o.default))}Zc.assignDefaults=qO;function Pb(t,e,n){let{gen:r,compositeRule:o,data:i,opts:s}=t;if(n===void 0)return;let a=(0,gi._)`${i}${(0,gi.getProperty)(e)}`;if(o){(0,UO.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,gi._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,gi._)`${c} || ${a} === null || ${a} === ""`),r.if(c,(0,gi._)`${a} = ${(0,gi.stringify)(n)}`)}});var Rn=$(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.validateUnion=Je.validateArray=Je.usePattern=Je.callValidateCode=Je.schemaProperties=Je.allSchemaProperties=Je.noPropertyInData=Je.propertyInData=Je.isOwnProperty=Je.hasPropFunc=Je.reportMissingProp=Je.checkMissingProp=Je.checkReportMissingProp=void 0;var ct=we(),Rf=Me(),zr=gr(),ZO=Me();function BO(t,e){let{gen:n,data:r,it:o}=t;n.if(If(n,r,e,o.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ct._)`${e}`},!0),t.error()})}Je.checkReportMissingProp=BO;function HO({gen:t,data:e,it:{opts:n}},r,o){return(0,ct.or)(...r.map(i=>(0,ct.and)(If(t,e,i,n.ownProperties),(0,ct._)`${o} = ${i}`)))}Je.checkMissingProp=HO;function VO(t,e){t.setParams({missingProperty:e},!0),t.error()}Je.reportMissingProp=VO;function zb(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ct._)`Object.prototype.hasOwnProperty`})}Je.hasPropFunc=zb;function Af(t,e,n){return(0,ct._)`${zb(t)}.call(${e}, ${n})`}Je.isOwnProperty=Af;function GO(t,e,n,r){let o=(0,ct._)`${e}${(0,ct.getProperty)(n)} !== undefined`;return r?(0,ct._)`${o} && ${Af(t,e,n)}`:o}Je.propertyInData=GO;function If(t,e,n,r){let o=(0,ct._)`${e}${(0,ct.getProperty)(n)} === undefined`;return r?(0,ct.or)(o,(0,ct.not)(Af(t,e,n))):o}Je.noPropertyInData=If;function Nb(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Je.allSchemaProperties=Nb;function WO(t,e){return Nb(e).filter(n=>!(0,Rf.alwaysValidSchema)(t,e[n]))}Je.schemaProperties=WO;function KO({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:o,errorPath:i},it:s},a,c,l){let p=l?(0,ct._)`${t}, ${e}, ${r}${o}`:e,d=[[zr.default.instancePath,(0,ct.strConcat)(zr.default.instancePath,i)],[zr.default.parentData,s.parentData],[zr.default.parentDataProperty,s.parentDataProperty],[zr.default.rootData,zr.default.rootData]];s.opts.dynamicRef&&d.push([zr.default.dynamicAnchors,zr.default.dynamicAnchors]);let f=(0,ct._)`${p}, ${n.object(...d)}`;return c!==ct.nil?(0,ct._)`${a}.call(${c}, ${f})`:(0,ct._)`${a}(${f})`}Je.callValidateCode=KO;var JO=(0,ct._)`new RegExp`;function YO({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:o}=e.code,i=o(n,r);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,ct._)`${o.code==="new RegExp"?JO:(0,ZO.useFunc)(t,o)}(${n}, ${r})`})}Je.usePattern=YO;function XO(t){let{gen:e,data:n,keyword:r,it:o}=t,i=e.name("valid");if(o.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(i,!0),s(()=>e.break()),i;function s(a){let c=e.const("len",(0,ct._)`${n}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:r,dataProp:l,dataPropType:Rf.Type.Num},i),e.if((0,ct.not)(i),a)})}}Je.validateArray=XO;function QO(t){let{gen:e,schema:n,keyword:r,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(c=>(0,Rf.alwaysValidSchema)(o,c))&&!o.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>n.forEach((c,l)=>{let p=t.subschema({keyword:r,schemaProp:l,compositeRule:!0},a);e.assign(s,(0,ct._)`${s} || ${a}`),t.mergeValidEvaluated(p,a)||e.if((0,ct.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}Je.validateUnion=QO});var Db=$(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.validateKeywordUsage=Yn.validSchemaType=Yn.funcKeywordCode=Yn.macroKeywordCode=void 0;var tn=we(),Ro=gr(),e1=Rn(),t1=js();function n1(t,e){let{gen:n,keyword:r,schema:o,parentSchema:i,it:s}=t,a=e.macro.call(s.self,o,i,s),c=Lb(n,r,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let l=n.name("valid");t.subschema({schema:a,schemaPath:tn.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}Yn.macroKeywordCode=n1;function r1(t,e){var n;let{gen:r,keyword:o,schema:i,parentSchema:s,$data:a,it:c}=t;i1(c,e);let l=!a&&e.compile?e.compile.call(c.self,i,s,c):e.validate,p=Lb(r,o,l),d=r.let("valid");t.block$data(d,f),t.ok((n=e.valid)!==null&&n!==void 0?n:d);function f(){if(e.errors===!1)v(),e.modifying&&jb(t),x(()=>t.error());else{let m=e.async?h():y();e.modifying&&jb(t),x(()=>o1(t,m))}}function h(){let m=r.let("ruleErrs",null);return r.try(()=>v((0,tn._)`await `),b=>r.assign(d,!1).if((0,tn._)`${b} instanceof ${c.ValidationError}`,()=>r.assign(m,(0,tn._)`${b}.errors`),()=>r.throw(b))),m}function y(){let m=(0,tn._)`${p}.errors`;return r.assign(m,null),v(tn.nil),m}function v(m=e.async?(0,tn._)`await `:tn.nil){let b=c.opts.passContext?Ro.default.this:Ro.default.self,w=!("compile"in e&&!a||e.schema===!1);r.assign(d,(0,tn._)`${m}${(0,e1.callValidateCode)(t,p,b,w)}`,e.modifying)}function x(m){var b;r.if((0,tn.not)((b=e.valid)!==null&&b!==void 0?b:d),m)}}Yn.funcKeywordCode=r1;function jb(t){let{gen:e,data:n,it:r}=t;e.if(r.parentData,()=>e.assign(n,(0,tn._)`${r.parentData}[${r.parentDataProperty}]`))}function o1(t,e){let{gen:n}=t;n.if((0,tn._)`Array.isArray(${e})`,()=>{n.assign(Ro.default.vErrors,(0,tn._)`${Ro.default.vErrors} === null ? ${e} : ${Ro.default.vErrors}.concat(${e})`).assign(Ro.default.errors,(0,tn._)`${Ro.default.vErrors}.length`),(0,t1.extendErrors)(t)},()=>t.error())}function i1({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Lb(t,e,n){if(n===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,tn.stringify)(n)})}function s1(t,e,n=!1){return!e.length||e.some(r=>r==="array"?Array.isArray(t):r==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==r||n&&typeof t>"u")}Yn.validSchemaType=s1;function a1({schema:t,opts:e,self:n,errSchemaPath:r},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");let s=o.dependencies;if(s!=null&&s.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(o.validateSchema&&!o.validateSchema(t[i])){let c=`keyword "${i}" value is invalid at path "${r}": `+n.errorsText(o.validateSchema.errors);if(e.validateSchema==="log")n.logger.error(c);else throw new Error(c)}}Yn.validateKeywordUsage=a1});var Fb=$(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.extendSubschemaMode=Nr.extendSubschemaData=Nr.getSubschema=void 0;var Xn=we(),Mb=Me();function c1(t,{keyword:e,schemaProp:n,schema:r,schemaPath:o,errSchemaPath:i,topSchemaRef:s}){if(e!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return n===void 0?{schema:a,schemaPath:(0,Xn._)`${t.schemaPath}${(0,Xn.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[n],schemaPath:(0,Xn._)`${t.schemaPath}${(0,Xn.getProperty)(e)}${(0,Xn.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Mb.escapeFragment)(n)}`}}if(r!==void 0){if(o===void 0||i===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:o,topSchemaRef:s,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Nr.getSubschema=c1;function l1(t,e,{dataProp:n,dataPropType:r,data:o,dataTypes:i,propertyName:s}){if(o!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(n!==void 0){let{errorPath:l,dataPathArr:p,opts:d}=e,f=a.let("data",(0,Xn._)`${e.data}${(0,Xn.getProperty)(n)}`,!0);c(f),t.errorPath=(0,Xn.str)`${l}${(0,Mb.getErrorPath)(n,r,d.jsPropertySyntax)}`,t.parentDataProperty=(0,Xn._)`${n}`,t.dataPathArr=[...p,t.parentDataProperty]}if(o!==void 0){let l=o instanceof Xn.Name?o:a.let("data",o,!0);c(l),s!==void 0&&(t.propertyName=s)}i&&(t.dataTypes=i);function c(l){t.data=l,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,l]}}Nr.extendSubschemaData=l1;function u1(t,{jtdDiscriminator:e,jtdMetadata:n,compositeRule:r,createErrors:o,allErrors:i}){r!==void 0&&(t.compositeRule=r),o!==void 0&&(t.createErrors=o),i!==void 0&&(t.allErrors=i),t.jtdDiscriminator=e,t.jtdMetadata=n}Nr.extendSubschemaMode=u1});var Cf=$((UB,Ub)=>{"use strict";Ub.exports=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}});var Zb=$((qB,qb)=>{"use strict";var jr=qb.exports=function(t,e,n){typeof e=="function"&&(n=e,e={}),n=e.cb||n;var r=typeof n=="function"?n:n.pre||function(){},o=n.post||function(){};Bc(e,r,o,t,"",t)};jr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};jr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};jr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};jr.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 Bc(t,e,n,r,o,i,s,a,c,l){if(r&&typeof r=="object"&&!Array.isArray(r)){e(r,o,i,s,a,c,l);for(var p in r){var d=r[p];if(Array.isArray(d)){if(p in jr.arrayKeywords)for(var f=0;f<d.length;f++)Bc(t,e,n,d[f],o+"/"+p+"/"+f,i,o,p,r,f)}else if(p in jr.propsKeywords){if(d&&typeof d=="object")for(var h in d)Bc(t,e,n,d[h],o+"/"+p+"/"+p1(h),i,o,p,r,h)}else(p in jr.keywords||t.allKeys&&!(p in jr.skipKeywords))&&Bc(t,e,n,d,o+"/"+p,i,o,p,r)}n(r,o,i,s,a,c,l)}}function p1(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ds=$(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.getSchemaRefs=un.resolveUrl=un.normalizeId=un._getFullPath=un.getFullPath=un.inlineRef=void 0;var d1=Me(),f1=Cf(),m1=Zb(),h1=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function g1(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Pf(t):e?Bb(t)<=e:!1}un.inlineRef=g1;var y1=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Pf(t){for(let e in t){if(y1.has(e))return!0;let n=t[e];if(Array.isArray(n)&&n.some(Pf)||typeof n=="object"&&Pf(n))return!0}return!1}function Bb(t){let e=0;for(let n in t){if(n==="$ref")return 1/0;if(e++,!h1.has(n)&&(typeof t[n]=="object"&&(0,d1.eachItem)(t[n],r=>e+=Bb(r)),e===1/0))return 1/0}return e}function Hb(t,e="",n){n!==!1&&(e=yi(e));let r=t.parse(e);return Vb(t,r)}un.getFullPath=Hb;function Vb(t,e){return t.serialize(e).split("#")[0]+"#"}un._getFullPath=Vb;var x1=/#\/?$/;function yi(t){return t?t.replace(x1,""):""}un.normalizeId=yi;function v1(t,e,n){return n=yi(n),t.resolve(e,n)}un.resolveUrl=v1;var b1=/^[a-z_][-a-z0-9._]*$/i;function _1(t,e){if(typeof t=="boolean")return{};let{schemaId:n,uriResolver:r}=this.opts,o=yi(t[n]||e),i={"":o},s=Hb(r,o,!1),a={},c=new Set;return m1(t,{allKeys:!0},(d,f,h,y)=>{if(y===void 0)return;let v=s+f,x=i[y];typeof d[n]=="string"&&(x=m.call(this,d[n])),b.call(this,d.$anchor),b.call(this,d.$dynamicAnchor),i[f]=x;function m(w){let k=this.opts.uriResolver.resolve;if(w=yi(x?k(x,w):w),c.has(w))throw p(w);c.add(w);let E=this.refs[w];return typeof E=="string"&&(E=this.refs[E]),typeof E=="object"?l(d,E.schema,w):w!==yi(v)&&(w[0]==="#"?(l(d,a[w],w),a[w]=d):this.refs[w]=v),w}function b(w){if(typeof w=="string"){if(!b1.test(w))throw new Error(`invalid anchor "${w}"`);m.call(this,`#${w}`)}}}),a;function l(d,f,h){if(f!==void 0&&!f1(d,f))throw p(h)}function p(d){return new Error(`reference "${d}" resolves to more than one schema`)}}un.getSchemaRefs=_1});var Us=$(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.getData=Lr.KeywordCxt=Lr.validateFunctionCode=void 0;var Yb=Eb(),Gb=Ls(),zf=kf(),Hc=Ls(),w1=Ob(),Fs=Db(),Of=Fb(),re=we(),he=gr(),S1=Ds(),yr=Me(),Ms=js();function k1(t){if(e_(t)&&(t_(t),Qb(t))){$1(t);return}Xb(t,()=>(0,Yb.topBoolOrEmptySchema)(t))}Lr.validateFunctionCode=k1;function Xb({gen:t,validateName:e,schema:n,schemaEnv:r,opts:o},i){o.code.es5?t.func(e,(0,re._)`${he.default.data}, ${he.default.valCxt}`,r.$async,()=>{t.code((0,re._)`"use strict"; ${Wb(n,o)}`),E1(t,o),t.code(i)}):t.func(e,(0,re._)`${he.default.data}, ${T1(o)}`,r.$async,()=>t.code(Wb(n,o)).code(i))}function T1(t){return(0,re._)`{${he.default.instancePath}="", ${he.default.parentData}, ${he.default.parentDataProperty}, ${he.default.rootData}=${he.default.data}${t.dynamicRef?(0,re._)`, ${he.default.dynamicAnchors}={}`:re.nil}}={}`}function E1(t,e){t.if(he.default.valCxt,()=>{t.var(he.default.instancePath,(0,re._)`${he.default.valCxt}.${he.default.instancePath}`),t.var(he.default.parentData,(0,re._)`${he.default.valCxt}.${he.default.parentData}`),t.var(he.default.parentDataProperty,(0,re._)`${he.default.valCxt}.${he.default.parentDataProperty}`),t.var(he.default.rootData,(0,re._)`${he.default.valCxt}.${he.default.rootData}`),e.dynamicRef&&t.var(he.default.dynamicAnchors,(0,re._)`${he.default.valCxt}.${he.default.dynamicAnchors}`)},()=>{t.var(he.default.instancePath,(0,re._)`""`),t.var(he.default.parentData,(0,re._)`undefined`),t.var(he.default.parentDataProperty,(0,re._)`undefined`),t.var(he.default.rootData,he.default.data),e.dynamicRef&&t.var(he.default.dynamicAnchors,(0,re._)`{}`)})}function $1(t){let{schema:e,opts:n,gen:r}=t;Xb(t,()=>{n.$comment&&e.$comment&&r_(t),P1(t),r.let(he.default.vErrors,null),r.let(he.default.errors,0),n.unevaluated&&R1(t),n_(t),N1(t)})}function R1(t){let{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",(0,re._)`${n}.evaluated`),e.if((0,re._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,re._)`${t.evaluated}.props`,(0,re._)`undefined`)),e.if((0,re._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,re._)`${t.evaluated}.items`,(0,re._)`undefined`))}function Wb(t,e){let n=typeof t=="object"&&t[e.schemaId];return n&&(e.code.source||e.code.process)?(0,re._)`/*# sourceURL=${n} */`:re.nil}function A1(t,e){if(e_(t)&&(t_(t),Qb(t))){I1(t,e);return}(0,Yb.boolOrEmptySchema)(t,e)}function Qb({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let n in t)if(e.RULES.all[n])return!0;return!1}function e_(t){return typeof t.schema!="boolean"}function I1(t,e){let{schema:n,gen:r,opts:o}=t;o.$comment&&n.$comment&&r_(t),O1(t),z1(t);let i=r.const("_errs",he.default.errors);n_(t,i),r.var(e,(0,re._)`${i} === ${he.default.errors}`)}function t_(t){(0,yr.checkUnknownRules)(t),C1(t)}function n_(t,e){if(t.opts.jtd)return Kb(t,[],!1,e);let n=(0,Gb.getSchemaTypes)(t.schema),r=(0,Gb.coerceAndCheckDataType)(t,n);Kb(t,n,!r,e)}function C1(t){let{schema:e,errSchemaPath:n,opts:r,self:o}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,yr.schemaHasRulesButRef)(e,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function P1(t){let{schema:e,opts:n}=t;e.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,yr.checkStrictMode)(t,"default is ignored in the schema root")}function O1(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,S1.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function z1(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function r_({gen:t,schemaEnv:e,schema:n,errSchemaPath:r,opts:o}){let i=n.$comment;if(o.$comment===!0)t.code((0,re._)`${he.default.self}.logger.log(${i})`);else if(typeof o.$comment=="function"){let s=(0,re.str)`${r}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,re._)`${he.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function N1(t){let{gen:e,schemaEnv:n,validateName:r,ValidationError:o,opts:i}=t;n.$async?e.if((0,re._)`${he.default.errors} === 0`,()=>e.return(he.default.data),()=>e.throw((0,re._)`new ${o}(${he.default.vErrors})`)):(e.assign((0,re._)`${r}.errors`,he.default.vErrors),i.unevaluated&&j1(t),e.return((0,re._)`${he.default.errors} === 0`))}function j1({gen:t,evaluated:e,props:n,items:r}){n instanceof re.Name&&t.assign((0,re._)`${e}.props`,n),r instanceof re.Name&&t.assign((0,re._)`${e}.items`,r)}function Kb(t,e,n,r){let{gen:o,schema:i,data:s,allErrors:a,opts:c,self:l}=t,{RULES:p}=l;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,yr.schemaHasRulesButRef)(i,p))){o.block(()=>i_(t,"$ref",p.all.$ref.definition));return}c.jtd||L1(t,e),o.block(()=>{for(let f of p.rules)d(f);d(p.post)});function d(f){(0,zf.shouldUseGroup)(i,f)&&(f.type?(o.if((0,Hc.checkDataType)(f.type,s,c.strictNumbers)),Jb(t,f),e.length===1&&e[0]===f.type&&n&&(o.else(),(0,Hc.reportTypeError)(t)),o.endIf()):Jb(t,f),a||o.if((0,re._)`${he.default.errors} === ${r||0}`))}}function Jb(t,e){let{gen:n,schema:r,opts:{useDefaults:o}}=t;o&&(0,w1.assignDefaults)(t,e.type),n.block(()=>{for(let i of e.rules)(0,zf.shouldUseRule)(r,i)&&i_(t,i.keyword,i.definition,e.type)})}function L1(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(D1(t,e),t.opts.allowUnionTypes||M1(t,e),F1(t,t.dataTypes))}function D1(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(n=>{o_(t.dataTypes,n)||Nf(t,`type "${n}" not allowed by context "${t.dataTypes.join(",")}"`)}),q1(t,e)}}function M1(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Nf(t,"use allowUnionTypes to allow union type keyword")}function F1(t,e){let n=t.self.RULES.all;for(let r in n){let o=n[r];if(typeof o=="object"&&(0,zf.shouldUseRule)(t.schema,o)){let{type:i}=o.definition;i.length&&!i.some(s=>U1(e,s))&&Nf(t,`missing type "${i.join(",")}" for keyword "${r}"`)}}}function U1(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function o_(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function q1(t,e){let n=[];for(let r of t.dataTypes)o_(e,r)?n.push(r):e.includes("integer")&&r==="number"&&n.push("integer");t.dataTypes=n}function Nf(t,e){let n=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${n}" (strictTypes)`,(0,yr.checkStrictMode)(t,e,t.opts.strictTypes)}var Vc=class{constructor(e,n,r){if((0,Fs.validateKeywordUsage)(e,n,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=n.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,yr.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=n,this.$data)this.schemaCode=e.gen.const("vSchema",s_(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Fs.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=e.gen.const("_errs",he.default.errors))}result(e,n,r){this.failResult((0,re.not)(e),n,r)}failResult(e,n,r){this.gen.if(e),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,n){this.failResult((0,re.not)(e),void 0,n)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:n}=this;this.fail((0,re._)`${n} !== undefined && (${(0,re.or)(this.invalid$data(),e)})`)}error(e,n,r){if(n){this.setParams(n),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,n){(e?Ms.reportExtraError:Ms.reportError)(this,this.def.error,n)}$dataError(){(0,Ms.reportError)(this,this.def.$dataError||Ms.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ms.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,n){n?Object.assign(this.params,e):this.params=e}block$data(e,n,r=re.nil){this.gen.block(()=>{this.check$data(e,r),n()})}check$data(e=re.nil,n=re.nil){if(!this.$data)return;let{gen:r,schemaCode:o,schemaType:i,def:s}=this;r.if((0,re.or)((0,re._)`${o} === undefined`,n)),e!==re.nil&&r.assign(e,!0),(i.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==re.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:n,schemaType:r,def:o,it:i}=this;return(0,re.or)(s(),a());function s(){if(r.length){if(!(n instanceof re.Name))throw new Error("ajv implementation error");let c=Array.isArray(r)?r:[r];return(0,re._)`${(0,Hc.checkDataTypes)(c,n,i.opts.strictNumbers,Hc.DataType.Wrong)}`}return re.nil}function a(){if(o.validateSchema){let c=e.scopeValue("validate$data",{ref:o.validateSchema});return(0,re._)`!${c}(${n})`}return re.nil}}subschema(e,n){let r=(0,Of.getSubschema)(this.it,e);(0,Of.extendSubschemaData)(r,this.it,e),(0,Of.extendSubschemaMode)(r,e);let o={...this.it,...r,items:void 0,props:void 0};return A1(o,n),o}mergeEvaluated(e,n){let{it:r,gen:o}=this;r.opts.unevaluated&&(r.props!==!0&&e.props!==void 0&&(r.props=yr.mergeEvaluated.props(o,e.props,r.props,n)),r.items!==!0&&e.items!==void 0&&(r.items=yr.mergeEvaluated.items(o,e.items,r.items,n)))}mergeValidEvaluated(e,n){let{it:r,gen:o}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return o.if(n,()=>this.mergeEvaluated(e,re.Name)),!0}};Lr.KeywordCxt=Vc;function i_(t,e,n,r){let o=new Vc(t,n,e);"code"in n?n.code(o,r):o.$data&&n.validate?(0,Fs.funcKeywordCode)(o,n):"macro"in n?(0,Fs.macroKeywordCode)(o,n):(n.compile||n.validate)&&(0,Fs.funcKeywordCode)(o,n)}var Z1=/^\/(?:[^~]|~0|~1)*$/,B1=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function s_(t,{dataLevel:e,dataNames:n,dataPathArr:r}){let o,i;if(t==="")return he.default.rootData;if(t[0]==="/"){if(!Z1.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);o=t,i=he.default.rootData}else{let l=B1.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let p=+l[1];if(o=l[2],o==="#"){if(p>=e)throw new Error(c("property/index",p));return r[e-p]}if(p>e)throw new Error(c("data",p));if(i=n[e-p],!o)return i}let s=i,a=o.split("/");for(let l of a)l&&(i=(0,re._)`${i}${(0,re.getProperty)((0,yr.unescapeJsonPointer)(l))}`,s=(0,re._)`${s} && ${i}`);return s;function c(l,p){return`Cannot access ${l} ${p} levels up, current level is ${e}`}}Lr.getData=s_});var Gc=$(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});var jf=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Lf.default=jf});var qs=$(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});var Df=Ds(),Mf=class extends Error{constructor(e,n,r,o){super(o||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,Df.resolveUrl)(e,n,r),this.missingSchema=(0,Df.normalizeId)((0,Df.getFullPath)(e,this.missingRef))}};Ff.default=Mf});var Kc=$(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.resolveSchema=An.getCompilingSchema=An.resolveRef=An.compileSchema=An.SchemaEnv=void 0;var Mn=we(),H1=Gc(),Ao=gr(),Fn=Ds(),a_=Me(),V1=Us(),xi=class{constructor(e){var n;this.refs={},this.dynamicAnchors={};let r;typeof e.schema=="object"&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(n=e.baseId)!==null&&n!==void 0?n:(0,Fn.normalizeId)(r==null?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r==null?void 0:r.$async,this.refs={}}};An.SchemaEnv=xi;function qf(t){let e=c_.call(this,t);if(e)return e;let n=(0,Fn.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:r,lines:o}=this.opts.code,{ownProperties:i}=this.opts,s=new Mn.CodeGen(this.scope,{es5:r,lines:o,ownProperties:i}),a;t.$async&&(a=s.scopeValue("Error",{ref:H1.default,code:(0,Mn._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");t.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:Ao.default.data,parentData:Ao.default.parentData,parentDataProperty:Ao.default.parentDataProperty,dataNames:[Ao.default.data],dataPathArr:[Mn.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Mn.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:Mn.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Mn._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(t),(0,V1.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let d=s.toString();p=`${s.scopeRefs(Ao.default.scope)}return ${d}`,this.opts.code.process&&(p=this.opts.code.process(p,t));let h=new Function(`${Ao.default.self}`,`${Ao.default.scope}`,p)(this,this.scope.get());if(this.scope.value(c,{ref:h}),h.errors=null,h.schema=t.schema,h.schemaEnv=t,t.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:c,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){let{props:y,items:v}=l;h.evaluated={props:y instanceof Mn.Name?void 0:y,items:v instanceof Mn.Name?void 0:v,dynamicProps:y instanceof Mn.Name,dynamicItems:v instanceof Mn.Name},h.source&&(h.source.evaluated=(0,Mn.stringify)(h.evaluated))}return t.validate=h,t}catch(d){throw delete t.validate,delete t.validateName,p&&this.logger.error("Error compiling schema, function code:",p),d}finally{this._compilations.delete(t)}}An.compileSchema=qf;function G1(t,e,n){var r;n=(0,Fn.resolveUrl)(this.opts.uriResolver,e,n);let o=t.refs[n];if(o)return o;let i=J1.call(this,t,n);if(i===void 0){let s=(r=t.localRefs)===null||r===void 0?void 0:r[n],{schemaId:a}=this.opts;s&&(i=new xi({schema:s,schemaId:a,root:t,baseId:e}))}if(i!==void 0)return t.refs[n]=W1.call(this,i)}An.resolveRef=G1;function W1(t){return(0,Fn.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:qf.call(this,t)}function c_(t){for(let e of this._compilations)if(K1(e,t))return e}An.getCompilingSchema=c_;function K1(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function J1(t,e){let n;for(;typeof(n=this.refs[e])=="string";)e=n;return n||this.schemas[e]||Wc.call(this,t,e)}function Wc(t,e){let n=this.opts.uriResolver.parse(e),r=(0,Fn._getFullPath)(this.opts.uriResolver,n),o=(0,Fn.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&r===o)return Uf.call(this,n,t);let i=(0,Fn.normalizeId)(r),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=Wc.call(this,t,s);return typeof(a==null?void 0:a.schema)!="object"?void 0:Uf.call(this,n,a)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||qf.call(this,s),i===(0,Fn.normalizeId)(e)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];return l&&(o=(0,Fn.resolveUrl)(this.opts.uriResolver,o,l)),new xi({schema:a,schemaId:c,root:t,baseId:o})}return Uf.call(this,n,s)}}An.resolveSchema=Wc;var Y1=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Uf(t,{baseId:e,schema:n,root:r}){var o;if(((o=t.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof n=="boolean")return;let c=n[(0,a_.unescapeFragment)(a)];if(c===void 0)return;n=c;let l=typeof n=="object"&&n[this.opts.schemaId];!Y1.has(a)&&l&&(e=(0,Fn.resolveUrl)(this.opts.uriResolver,e,l))}let i;if(typeof n!="boolean"&&n.$ref&&!(0,a_.schemaHasRulesButRef)(n,this.RULES)){let a=(0,Fn.resolveUrl)(this.opts.uriResolver,e,n.$ref);i=Wc.call(this,r,a)}let{schemaId:s}=this.opts;if(i=i||new xi({schema:n,schemaId:s,root:r,baseId:e}),i.schema!==i.root.schema)return i}});var l_=$((WB,X1)=>{X1.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 Hf=$((KB,h_)=>{"use strict";var Q1=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),p_=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),Zf=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),d_=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),ez=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Bf(t){let e="",n=0,r=0;for(r=0;r<t.length;r++)if(n=t[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r];break}for(r+=1;r<t.length;r++){if(n=t[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r]}return e}var tz=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function u_(t){return t.length=0,!0}function nz(t,e,n){if(t.length){let r=Bf(t);if(r!=="")e.push(r);else return n.error=!0,!1;t.length=0}return!0}function rz(t){let e=0,n={error:!1,address:"",zone:""},r=[],o=[],i=!1,s=!1,a=nz;for(let c=0;c<t.length;c++){let l=t[c];if(!(l==="["||l==="]"))if(l===":"){if(i===!0&&(s=!0),!a(o,r,n))break;if(++e>7){n.error=!0;break}c>0&&t[c-1]===":"&&(i=!0),r.push(":");continue}else if(l==="%"){if(!a(o,r,n))break;a=u_}else{o.push(l);continue}}return o.length&&(a===u_?n.zone=o.join(""):s?r.push(o.join("")):r.push(Bf(o))),n.address=r.join(""),n}function f_(t){if(oz(t,":")<2)return{host:t,isIPV6:!1};let e=rz(t);if(e.error)return{host:t,isIPV6:!1};{let n=e.address,r=e.address;return e.zone&&(n+="%"+e.zone,r+="%25"+e.zone),{host:n,isIPV6:!0,escapedHost:r}}}function oz(t,e){let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n}function iz(t){let e=t,n=[],r=-1,o=0;for(;o=e.length;){if(o===1){if(e===".")break;if(e==="/"){n.push("/");break}else{n.push(e);break}}else if(o===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){n.push("/");break}}else if(o===3&&e==="/.."){n.length!==0&&n.pop(),n.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),n.length!==0&&n.pop();continue}}if((r=e.indexOf("/",1))===-1){n.push(e);break}else n.push(e.slice(0,r)),e=e.slice(r)}return n.join("")}var sz={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},az=/[@/?#:]/g,cz=/[@/?#]/g;function m_(t,e){let n=e?cz:az;return n.lastIndex=0,t.replace(n,r=>sz[r])}function lz(t,e=!1){if(t.indexOf("%")===-1)return t;let n="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let o=t.slice(r+1,r+3);if(Zf(o)){let i=o.toUpperCase(),s=String.fromCharCode(parseInt(i,16));e&&d_(s)?n+=s:n+="%"+i,r+=2;continue}}n+=t[r]}return n}function uz(t){let e="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let r=t.slice(n+1,n+3);if(Zf(r)){let o=r.toUpperCase(),i=String.fromCharCode(parseInt(o,16));i!=="."&&d_(i)?e+=i:e+="%"+o,n+=2;continue}}ez(t[n])?e+=t[n]:e+=escape(t[n])}return e}function pz(t){let e="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let r=t.slice(n+1,n+3);if(Zf(r)){e+="%"+r.toUpperCase(),n+=2;continue}}e+=escape(t[n])}return e}function dz(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let n=unescape(t.host);if(!p_(n)){let r=f_(n);r.isIPV6===!0?n=`[${r.escapedHost}]`:n=m_(n,!1)}e.push(n)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}h_.exports={nonSimpleDomain:tz,recomposeAuthority:dz,reescapeHostDelimiters:m_,normalizePercentEncoding:lz,normalizePathEncoding:uz,escapePreservingEscapes:pz,removeDotSegments:iz,isIPv4:p_,isUUID:Q1,normalizeIPv6:f_,stringArrayToHexStripped:Bf}});var b_=$((JB,v_)=>{"use strict";var{isUUID:fz}=Hf(),mz=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,hz=["http","https","ws","wss","urn","urn:uuid"];function gz(t){return hz.indexOf(t)!==-1}function Vf(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function g_(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function y_(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function yz(t){return t.secure=Vf(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function xz(t){if((t.port===(Vf(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,n]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=n,t.resourceName=void 0}return t.fragment=void 0,t}function vz(t,e){if(!t.path)return t.error="URN can not be parsed",t;let n=t.path.match(mz);if(n){let r=e.scheme||t.scheme||"urn";t.nid=n[1].toLowerCase(),t.nss=n[2];let o=`${r}:${e.nid||t.nid}`,i=Gf(o);t.path=void 0,i&&(t=i.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function bz(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let n=e.scheme||t.scheme||"urn",r=t.nid.toLowerCase(),o=`${n}:${e.nid||r}`,i=Gf(o);i&&(t=i.serialize(t,e));let s=t,a=t.nss;return s.path=`${r||e.nid}:${a}`,e.skipEscape=!0,s}function _z(t,e){let n=t;return n.uuid=n.nss,n.nss=void 0,!e.tolerant&&(!n.uuid||!fz(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function wz(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var x_={scheme:"http",domainHost:!0,parse:g_,serialize:y_},Sz={scheme:"https",domainHost:x_.domainHost,parse:g_,serialize:y_},Jc={scheme:"ws",domainHost:!0,parse:yz,serialize:xz},kz={scheme:"wss",domainHost:Jc.domainHost,parse:Jc.parse,serialize:Jc.serialize},Tz={scheme:"urn",parse:vz,serialize:bz,skipNormalize:!0},Ez={scheme:"urn:uuid",parse:_z,serialize:wz,skipNormalize:!0},Yc={http:x_,https:Sz,ws:Jc,wss:kz,urn:Tz,"urn:uuid":Ez};Object.setPrototypeOf(Yc,null);function Gf(t){return t&&(Yc[t]||Yc[t.toLowerCase()])||void 0}v_.exports={wsIsSecure:Vf,SCHEMES:Yc,isValidSchemeName:gz,getSchemeHandler:Gf}});var E_=$((YB,Xc)=>{"use strict";var{normalizeIPv6:$z,removeDotSegments:Zs,recomposeAuthority:Rz,normalizePercentEncoding:Az,normalizePathEncoding:Iz,escapePreservingEscapes:Cz,reescapeHostDelimiters:Pz,isIPv4:Oz,nonSimpleDomain:zz}=Hf(),{SCHEMES:Nz,getSchemeHandler:w_}=b_();function jz(t,e){return typeof t=="string"?t=Uz(t,e):typeof t=="object"&&(t=vi(Io(t,e),e)),t}function Lz(t,e,n){let r=n?Object.assign({scheme:"null"},n):{scheme:"null"},o=S_(vi(t,r),vi(e,r),r,!0);return r.skipEscape=!0,Io(o,r)}function S_(t,e,n,r){let o={};return r||(t=vi(Io(t,n),n),e=vi(Io(e,n),n)),n=n||{},!n.tolerant&&e.scheme?(o.scheme=e.scheme,o.userinfo=e.userinfo,o.host=e.host,o.port=e.port,o.path=Zs(e.path||""),o.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(o.userinfo=e.userinfo,o.host=e.host,o.port=e.port,o.path=Zs(e.path||""),o.query=e.query):(e.path?(e.path[0]==="/"?o.path=Zs(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?o.path="/"+e.path:t.path?o.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:o.path=e.path,o.path=Zs(o.path)),o.query=e.query):(o.path=t.path,e.query!==void 0?o.query=e.query:o.query=t.query),o.userinfo=t.userinfo,o.host=t.host,o.port=t.port),o.scheme=t.scheme),o.fragment=e.fragment,o}function Dz(t,e,n){let r=__(t,n),o=__(e,n);return r!==void 0&&o!==void 0&&r.toLowerCase()===o.toLowerCase()}function Io(t,e){let n={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},r=Object.assign({},e),o=[],i=w_(r.scheme||n.scheme);i&&i.serialize&&i.serialize(n,r),n.path!==void 0&&(r.skipEscape?n.path=Az(n.path):(n.path=Cz(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),r.reference!=="suffix"&&n.scheme&&o.push(n.scheme,":");let s=Rz(n);if(s!==void 0&&(r.reference!=="suffix"&&o.push("//"),o.push(s),n.path&&n.path[0]!=="/"&&o.push("/")),n.path!==void 0){let a=n.path;!r.absolutePath&&(!i||!i.absolutePath)&&(a=Zs(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),o.push(a)}return n.query!==void 0&&o.push("?",n.query),n.fragment!==void 0&&o.push("#",n.fragment),o.join("")}var Mz=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Fz(t,e){if(e[2]!==void 0&&t.path&&t.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof t.port=="number"&&(t.port<0||t.port>65535))return"URI port is malformed."}function k_(t,e){let n=Object.assign({},e),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=!1,i=!1;n.reference==="suffix"&&(n.scheme?t=n.scheme+":"+t:t="//"+t);let s=t.match(Mz);if(s){r.scheme=s[1],r.userinfo=s[3],r.host=s[4],r.port=parseInt(s[5],10),r.path=s[6]||"",r.query=s[7],r.fragment=s[8],isNaN(r.port)&&(r.port=s[5]);let a=Fz(r,s);if(a!==void 0&&(r.error=r.error||a,o=!0),r.host)if(Oz(r.host)===!1){let p=$z(r.host);r.host=p.host.toLowerCase(),i=p.isIPV6}else i=!0;r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&r.query===void 0&&!r.path?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");let c=w_(n.scheme||r.scheme);if(!n.unicodeSupport&&(!c||!c.unicodeSupport)&&r.host&&(n.domainHost||c&&c.domainHost)&&i===!1&&zz(r.host))try{r.host=new URL("http://"+r.host).hostname}catch(l){r.error=r.error||"Host's domain name can not be converted to ASCII: "+l}if((!c||c&&!c.skipNormalize)&&(t.indexOf("%")!==-1&&(r.scheme!==void 0&&(r.scheme=unescape(r.scheme)),r.host!==void 0&&(r.host=Pz(unescape(r.host),i))),r.path&&(r.path=Iz(r.path)),r.fragment))try{r.fragment=encodeURI(decodeURIComponent(r.fragment))}catch{r.error=r.error||"URI malformed"}c&&c.parse&&c.parse(r,n)}else r.error=r.error||"URI can not be parsed.";return{parsed:r,malformedAuthorityOrPort:o}}function vi(t,e){return k_(t,e).parsed}function Uz(t,e){return T_(t,e).normalized}function T_(t,e){let{parsed:n,malformedAuthorityOrPort:r}=k_(t,e);return{normalized:r?t:Io(n,e),malformedAuthorityOrPort:r}}function __(t,e){if(typeof t=="string"){let{normalized:n,malformedAuthorityOrPort:r}=T_(t,e);return r?void 0:n}if(typeof t=="object")return Io(t,e)}var Wf={SCHEMES:Nz,normalize:jz,resolve:Lz,resolveComponent:S_,equal:Dz,serialize:Io,parse:vi};Xc.exports=Wf;Xc.exports.default=Wf;Xc.exports.fastUri=Wf});var R_=$(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});var $_=E_();$_.code='require("ajv/dist/runtime/uri").default';Kf.default=$_});var j_=$(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.CodeGen=Mt.Name=Mt.nil=Mt.stringify=Mt.str=Mt._=Mt.KeywordCxt=void 0;var qz=Us();Object.defineProperty(Mt,"KeywordCxt",{enumerable:!0,get:function(){return qz.KeywordCxt}});var bi=we();Object.defineProperty(Mt,"_",{enumerable:!0,get:function(){return bi._}});Object.defineProperty(Mt,"str",{enumerable:!0,get:function(){return bi.str}});Object.defineProperty(Mt,"stringify",{enumerable:!0,get:function(){return bi.stringify}});Object.defineProperty(Mt,"nil",{enumerable:!0,get:function(){return bi.nil}});Object.defineProperty(Mt,"Name",{enumerable:!0,get:function(){return bi.Name}});Object.defineProperty(Mt,"CodeGen",{enumerable:!0,get:function(){return bi.CodeGen}});var Zz=Gc(),O_=qs(),Bz=Sf(),Bs=Kc(),Hz=we(),Hs=Ds(),Qc=Ls(),Yf=Me(),A_=l_(),Vz=R_(),z_=(t,e)=>new RegExp(t,e);z_.code="new RegExp";var Gz=["removeAdditional","useDefaults","coerceTypes"],Wz=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Kz={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."},Jz={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},I_=200;function Yz(t){var e,n,r,o,i,s,a,c,l,p,d,f,h,y,v,x,m,b,w,k,E,F,j,me,de;let oe=t.strict,Re=(e=t.code)===null||e===void 0?void 0:e.optimize,bt=Re===!0||Re===void 0?1:Re||0,Ve=(r=(n=t.code)===null||n===void 0?void 0:n.regExp)!==null&&r!==void 0?r:z_,ae=(o=t.uriResolver)!==null&&o!==void 0?o:Vz.default;return{strictSchema:(s=(i=t.strictSchema)!==null&&i!==void 0?i:oe)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:oe)!==null&&c!==void 0?c:!0,strictTypes:(p=(l=t.strictTypes)!==null&&l!==void 0?l:oe)!==null&&p!==void 0?p:"log",strictTuples:(f=(d=t.strictTuples)!==null&&d!==void 0?d:oe)!==null&&f!==void 0?f:"log",strictRequired:(y=(h=t.strictRequired)!==null&&h!==void 0?h:oe)!==null&&y!==void 0?y:!1,code:t.code?{...t.code,optimize:bt,regExp:Ve}:{optimize:bt,regExp:Ve},loopRequired:(v=t.loopRequired)!==null&&v!==void 0?v:I_,loopEnum:(x=t.loopEnum)!==null&&x!==void 0?x:I_,meta:(m=t.meta)!==null&&m!==void 0?m:!0,messages:(b=t.messages)!==null&&b!==void 0?b:!0,inlineRefs:(w=t.inlineRefs)!==null&&w!==void 0?w:!0,schemaId:(k=t.schemaId)!==null&&k!==void 0?k:"$id",addUsedSchema:(E=t.addUsedSchema)!==null&&E!==void 0?E:!0,validateSchema:(F=t.validateSchema)!==null&&F!==void 0?F:!0,validateFormats:(j=t.validateFormats)!==null&&j!==void 0?j:!0,unicodeRegExp:(me=t.unicodeRegExp)!==null&&me!==void 0?me:!0,int32range:(de=t.int32range)!==null&&de!==void 0?de:!0,uriResolver:ae}}var Vs=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Yz(e)};let{es5:n,lines:r}=this.opts.code;this.scope=new Hz.ValueScope({scope:{},prefixes:Wz,es5:n,lines:r}),this.logger=rN(e.logger);let o=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Bz.getRules)(),C_.call(this,Kz,e,"NOT SUPPORTED"),C_.call(this,Jz,e,"DEPRECATED","warn"),this._metaOpts=tN.call(this),e.formats&&Qz.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&eN.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Xz.call(this),e.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:n,schemaId:r}=this.opts,o=A_;r==="id"&&(o={...A_},o.id=o.$id,delete o.$id),n&&e&&this.addMetaSchema(o,o[r],!1)}defaultMeta(){let{meta:e,schemaId:n}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[n]||e:void 0}validate(e,n){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let o=r(n);return"$async"in r||(this.errors=r.errors),o}compile(e,n){let r=this._addSchema(e,n);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,n){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return o.call(this,e,n);async function o(p,d){await i.call(this,p.$schema);let f=this._addSchema(p,d);return f.validate||s.call(this,f)}async function i(p){p&&!this.getSchema(p)&&await o.call(this,{$ref:p},!0)}async function s(p){try{return this._compileSchemaEnv(p)}catch(d){if(!(d instanceof O_.default))throw d;return a.call(this,d),await c.call(this,d.missingSchema),s.call(this,p)}}function a({missingSchema:p,missingRef:d}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${d} cannot be resolved`)}async function c(p){let d=await l.call(this,p);this.refs[p]||await i.call(this,d.$schema),this.refs[p]||this.addSchema(d,p,n)}async function l(p){let d=this._loading[p];if(d)return d;try{return await(this._loading[p]=r(p))}finally{delete this._loading[p]}}}addSchema(e,n,r,o=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,r,o);return this}let i;if(typeof e=="object"){let{schemaId:s}=this.opts;if(i=e[s],i!==void 0&&typeof i!="string")throw new Error(`schema ${s} must be string`)}return n=(0,Hs.normalizeId)(n||i),this._checkUnique(n),this.schemas[n]=this._addSchema(e,r,n,o,!0),this}addMetaSchema(e,n,r=this.opts.validateSchema){return this.addSchema(e,n,!0,r),this}validateSchema(e,n){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(r,e);if(!o&&n){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return o}getSchema(e){let n;for(;typeof(n=P_.call(this,e))=="string";)e=n;if(n===void 0){let{schemaId:r}=this.opts,o=new Bs.SchemaEnv({schema:{},schemaId:r});if(n=Bs.resolveSchema.call(this,o,e),!n)return;this.refs[e]=n}return n.validate||this._compileSchemaEnv(n)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let n=P_.call(this,e);return typeof n=="object"&&this._cache.delete(n.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let n=e;this._cache.delete(n);let r=e[this.opts.schemaId];return r&&(r=(0,Hs.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let n of e)this.addKeyword(n);return this}addKeyword(e,n){let r;if(typeof e=="string")r=e,typeof n=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),n.keyword=r);else if(typeof e=="object"&&n===void 0){if(n=e,r=n.keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(iN.call(this,r,n),!n)return(0,Yf.eachItem)(r,i=>Jf.call(this,i)),this;aN.call(this,n);let o={...n,type:(0,Qc.getJSONTypes)(n.type),schemaType:(0,Qc.getJSONTypes)(n.schemaType)};return(0,Yf.eachItem)(r,o.type.length===0?i=>Jf.call(this,i,o):i=>o.type.forEach(s=>Jf.call(this,i,o,s))),this}getKeyword(e){let n=this.RULES.all[e];return typeof n=="object"?n.definition:!!n}removeKeyword(e){let{RULES:n}=this;delete n.keywords[e],delete n.all[e];for(let r of n.rules){let o=r.rules.findIndex(i=>i.keyword===e);o>=0&&r.rules.splice(o,1)}return this}addFormat(e,n){return typeof n=="string"&&(n=new RegExp(n)),this.formats[e]=n,this}errorsText(e=this.errors,{separator:n=", ",dataVar:r="data"}={}){return!e||e.length===0?"No errors":e.map(o=>`${r}${o.instancePath} ${o.message}`).reduce((o,i)=>o+n+i)}$dataMetaSchema(e,n){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let o of n){let i=o.split("/").slice(1),s=e;for(let a of i)s=s[a];for(let a in r){let c=r[a];if(typeof c!="object")continue;let{$data:l}=c.definition,p=s[a];l&&p&&(s[a]=N_(p))}}return e}_removeAllSchemas(e,n){for(let r in e){let o=e[r];(!n||n.test(r))&&(typeof o=="string"?delete e[r]:o&&!o.meta&&(this._cache.delete(o.schema),delete e[r]))}}_addSchema(e,n,r,o=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;r=(0,Hs.normalizeId)(s||r);let l=Hs.getSchemaRefs.call(this,e,r);return c=new Bs.SchemaEnv({schema:e,schemaId:a,meta:n,baseId:r,localRefs:l}),this._cache.set(c.schema,c),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=c),o&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Bs.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let n=this.opts;this.opts=this._metaOpts;try{Bs.compileSchema.call(this,e)}finally{this.opts=n}}};Vs.ValidationError=Zz.default;Vs.MissingRefError=O_.default;Mt.default=Vs;function C_(t,e,n,r="error"){for(let o in t){let i=o;i in e&&this.logger[r](`${n}: option ${o}. ${t[i]}`)}}function P_(t){return t=(0,Hs.normalizeId)(t),this.schemas[t]||this.refs[t]}function Xz(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function Qz(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function eN(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let n=t[e];n.keyword||(n.keyword=e),this.addKeyword(n)}}function tN(){let t={...this.opts};for(let e of Gz)delete t[e];return t}var nN={log(){},warn(){},error(){}};function rN(t){if(t===!1)return nN;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var oN=/^[a-z_$][a-z0-9_$:-]*$/i;function iN(t,e){let{RULES:n}=this;if((0,Yf.eachItem)(t,r=>{if(n.keywords[r])throw new Error(`Keyword ${r} is already defined`);if(!oN.test(r))throw new Error(`Keyword ${r} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Jf(t,e,n){var r;let o=e==null?void 0:e.post;if(n&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,s=o?i.post:i.rules.find(({type:c})=>c===n);if(s||(s={type:n,rules:[]},i.rules.push(s)),i.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,Qc.getJSONTypes)(e.type),schemaType:(0,Qc.getJSONTypes)(e.schemaType)}};e.before?sN.call(this,s,a,e.before):s.rules.push(a),i.all[t]=a,(r=e.implements)===null||r===void 0||r.forEach(c=>this.addKeyword(c))}function sN(t,e,n){let r=t.rules.findIndex(o=>o.keyword===n);r>=0?t.rules.splice(r,0,e):(t.rules.push(e),this.logger.warn(`rule ${n} is not defined`))}function aN(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=N_(e)),t.validateSchema=this.compile(e,!0))}var cN={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function N_(t){return{anyOf:[t,cN]}}});var L_=$(Xf=>{"use strict";Object.defineProperty(Xf,"__esModule",{value:!0});var lN={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Xf.default=lN});var U_=$(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});Co.callRef=Co.getValidate=void 0;var uN=qs(),D_=Rn(),pn=we(),_i=gr(),M_=Kc(),el=Me(),pN={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:n,it:r}=t,{baseId:o,schemaEnv:i,validateName:s,opts:a,self:c}=r,{root:l}=i;if((n==="#"||n==="#/")&&o===l.baseId)return d();let p=M_.resolveRef.call(c,l,o,n);if(p===void 0)throw new uN.default(r.opts.uriResolver,o,n);if(p instanceof M_.SchemaEnv)return f(p);return h(p);function d(){if(i===l)return tl(t,s,i,i.$async);let y=e.scopeValue("root",{ref:l});return tl(t,(0,pn._)`${y}.validate`,l,l.$async)}function f(y){let v=F_(t,y);tl(t,v,y,y.$async)}function h(y){let v=e.scopeValue("schema",a.code.source===!0?{ref:y,code:(0,pn.stringify)(y)}:{ref:y}),x=e.name("valid"),m=t.subschema({schema:y,dataTypes:[],schemaPath:pn.nil,topSchemaRef:v,errSchemaPath:n},x);t.mergeEvaluated(m),t.ok(x)}}};function F_(t,e){let{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):(0,pn._)`${n.scopeValue("wrapper",{ref:e})}.validate`}Co.getValidate=F_;function tl(t,e,n,r){let{gen:o,it:i}=t,{allErrors:s,schemaEnv:a,opts:c}=i,l=c.passContext?_i.default.this:pn.nil;r?p():d();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let y=o.let("valid");o.try(()=>{o.code((0,pn._)`await ${(0,D_.callValidateCode)(t,e,l)}`),h(e),s||o.assign(y,!0)},v=>{o.if((0,pn._)`!(${v} instanceof ${i.ValidationError})`,()=>o.throw(v)),f(v),s||o.assign(y,!1)}),t.ok(y)}function d(){t.result((0,D_.callValidateCode)(t,e,l),()=>h(e),()=>f(e))}function f(y){let v=(0,pn._)`${y}.errors`;o.assign(_i.default.vErrors,(0,pn._)`${_i.default.vErrors} === null ? ${v} : ${_i.default.vErrors}.concat(${v})`),o.assign(_i.default.errors,(0,pn._)`${_i.default.vErrors}.length`)}function h(y){var v;if(!i.opts.unevaluated)return;let x=(v=n==null?void 0:n.validate)===null||v===void 0?void 0:v.evaluated;if(i.props!==!0)if(x&&!x.dynamicProps)x.props!==void 0&&(i.props=el.mergeEvaluated.props(o,x.props,i.props));else{let m=o.var("props",(0,pn._)`${y}.evaluated.props`);i.props=el.mergeEvaluated.props(o,m,i.props,pn.Name)}if(i.items!==!0)if(x&&!x.dynamicItems)x.items!==void 0&&(i.items=el.mergeEvaluated.items(o,x.items,i.items));else{let m=o.var("items",(0,pn._)`${y}.evaluated.items`);i.items=el.mergeEvaluated.items(o,m,i.items,pn.Name)}}}Co.callRef=tl;Co.default=pN});var q_=$(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var dN=L_(),fN=U_(),mN=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",dN.default,fN.default];Qf.default=mN});var Z_=$(em=>{"use strict";Object.defineProperty(em,"__esModule",{value:!0});var nl=we(),Dr=nl.operators,rl={maximum:{okStr:"<=",ok:Dr.LTE,fail:Dr.GT},minimum:{okStr:">=",ok:Dr.GTE,fail:Dr.LT},exclusiveMaximum:{okStr:"<",ok:Dr.LT,fail:Dr.GTE},exclusiveMinimum:{okStr:">",ok:Dr.GT,fail:Dr.LTE}},hN={message:({keyword:t,schemaCode:e})=>(0,nl.str)`must be ${rl[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,nl._)`{comparison: ${rl[t].okStr}, limit: ${e}}`},gN={keyword:Object.keys(rl),type:"number",schemaType:"number",$data:!0,error:hN,code(t){let{keyword:e,data:n,schemaCode:r}=t;t.fail$data((0,nl._)`${n} ${rl[e].fail} ${r} || isNaN(${n})`)}};em.default=gN});var B_=$(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});var Gs=we(),yN={message:({schemaCode:t})=>(0,Gs.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Gs._)`{multipleOf: ${t}}`},xN={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:yN,code(t){let{gen:e,data:n,schemaCode:r,it:o}=t,i=o.opts.multipleOfPrecision,s=e.let("res"),a=i?(0,Gs._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,Gs._)`${s} !== parseInt(${s})`;t.fail$data((0,Gs._)`(${r} === 0 || (${s} = ${n}/${r}, ${a}))`)}};tm.default=xN});var V_=$(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});function H_(t){let e=t.length,n=0,r=0,o;for(;r<e;)n++,o=t.charCodeAt(r++),o>=55296&&o<=56319&&r<e&&(o=t.charCodeAt(r),(o&64512)===56320&&r++);return n}nm.default=H_;H_.code='require("ajv/dist/runtime/ucs2length").default'});var G_=$(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});var Po=we(),vN=Me(),bN=V_(),_N={message({keyword:t,schemaCode:e}){let n=t==="maxLength"?"more":"fewer";return(0,Po.str)`must NOT have ${n} than ${e} characters`},params:({schemaCode:t})=>(0,Po._)`{limit: ${t}}`},wN={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:_N,code(t){let{keyword:e,data:n,schemaCode:r,it:o}=t,i=e==="maxLength"?Po.operators.GT:Po.operators.LT,s=o.opts.unicode===!1?(0,Po._)`${n}.length`:(0,Po._)`${(0,vN.useFunc)(t.gen,bN.default)}(${n})`;t.fail$data((0,Po._)`${s} ${i} ${r}`)}};rm.default=wN});var W_=$(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var SN=Rn(),kN=Me(),wi=we(),TN={message:({schemaCode:t})=>(0,wi.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,wi._)`{pattern: ${t}}`},EN={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:TN,code(t){let{gen:e,data:n,$data:r,schema:o,schemaCode:i,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(r){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?(0,wi._)`new RegExp`:(0,kN.useFunc)(e,c),p=e.let("valid");e.try(()=>e.assign(p,(0,wi._)`${l}(${i}, ${a}).test(${n})`),()=>e.assign(p,!1)),t.fail$data((0,wi._)`!${p}`)}else{let c=(0,SN.usePattern)(t,o);t.fail$data((0,wi._)`!${c}.test(${n})`)}}};om.default=EN});var K_=$(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var Ws=we(),$N={message({keyword:t,schemaCode:e}){let n=t==="maxProperties"?"more":"fewer";return(0,Ws.str)`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>(0,Ws._)`{limit: ${t}}`},RN={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:$N,code(t){let{keyword:e,data:n,schemaCode:r}=t,o=e==="maxProperties"?Ws.operators.GT:Ws.operators.LT;t.fail$data((0,Ws._)`Object.keys(${n}).length ${o} ${r}`)}};im.default=RN});var J_=$(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});var Ks=Rn(),Js=we(),AN=Me(),IN={message:({params:{missingProperty:t}})=>(0,Js.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Js._)`{missingProperty: ${t}}`},CN={keyword:"required",type:"object",schemaType:"array",$data:!0,error:IN,code(t){let{gen:e,schema:n,schemaCode:r,data:o,$data:i,it:s}=t,{opts:a}=s;if(!i&&n.length===0)return;let c=n.length>=a.loopRequired;if(s.allErrors?l():p(),a.strictRequired){let h=t.parentSchema.properties,{definedProperties:y}=t.it;for(let v of n)if((h==null?void 0:h[v])===void 0&&!y.has(v)){let x=s.schemaEnv.baseId+s.errSchemaPath,m=`required property "${v}" is not defined at "${x}" (strictRequired)`;(0,AN.checkStrictMode)(s,m,s.opts.strictRequired)}}function l(){if(c||i)t.block$data(Js.nil,d);else for(let h of n)(0,Ks.checkReportMissingProp)(t,h)}function p(){let h=e.let("missing");if(c||i){let y=e.let("valid",!0);t.block$data(y,()=>f(h,y)),t.ok(y)}else e.if((0,Ks.checkMissingProp)(t,n,h)),(0,Ks.reportMissingProp)(t,h),e.else()}function d(){e.forOf("prop",r,h=>{t.setParams({missingProperty:h}),e.if((0,Ks.noPropertyInData)(e,o,h,a.ownProperties),()=>t.error())})}function f(h,y){t.setParams({missingProperty:h}),e.forOf(h,r,()=>{e.assign(y,(0,Ks.propertyInData)(e,o,h,a.ownProperties)),e.if((0,Js.not)(y),()=>{t.error(),e.break()})},Js.nil)}}};sm.default=CN});var Y_=$(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});var Ys=we(),PN={message({keyword:t,schemaCode:e}){let n=t==="maxItems"?"more":"fewer";return(0,Ys.str)`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>(0,Ys._)`{limit: ${t}}`},ON={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:PN,code(t){let{keyword:e,data:n,schemaCode:r}=t,o=e==="maxItems"?Ys.operators.GT:Ys.operators.LT;t.fail$data((0,Ys._)`${n}.length ${o} ${r}`)}};am.default=ON});var ol=$(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});var X_=Cf();X_.code='require("ajv/dist/runtime/equal").default';cm.default=X_});var Q_=$(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});var lm=Ls(),Ft=we(),zN=Me(),NN=ol(),jN={message:({params:{i:t,j:e}})=>(0,Ft.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Ft._)`{i: ${t}, j: ${e}}`},LN={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:jN,code(t){let{gen:e,data:n,$data:r,schema:o,parentSchema:i,schemaCode:s,it:a}=t;if(!r&&!o)return;let c=e.let("valid"),l=i.items?(0,lm.getSchemaTypes)(i.items):[];t.block$data(c,p,(0,Ft._)`${s} === false`),t.ok(c);function p(){let y=e.let("i",(0,Ft._)`${n}.length`),v=e.let("j");t.setParams({i:y,j:v}),e.assign(c,!0),e.if((0,Ft._)`${y} > 1`,()=>(d()?f:h)(y,v))}function d(){return l.length>0&&!l.some(y=>y==="object"||y==="array")}function f(y,v){let x=e.name("item"),m=(0,lm.checkDataTypes)(l,x,a.opts.strictNumbers,lm.DataType.Wrong),b=e.const("indices",(0,Ft._)`{}`);e.for((0,Ft._)`;${y}--;`,()=>{e.let(x,(0,Ft._)`${n}[${y}]`),e.if(m,(0,Ft._)`continue`),l.length>1&&e.if((0,Ft._)`typeof ${x} == "string"`,(0,Ft._)`${x} += "_"`),e.if((0,Ft._)`typeof ${b}[${x}] == "number"`,()=>{e.assign(v,(0,Ft._)`${b}[${x}]`),t.error(),e.assign(c,!1).break()}).code((0,Ft._)`${b}[${x}] = ${y}`)})}function h(y,v){let x=(0,zN.useFunc)(e,NN.default),m=e.name("outer");e.label(m).for((0,Ft._)`;${y}--;`,()=>e.for((0,Ft._)`${v} = ${y}; ${v}--;`,()=>e.if((0,Ft._)`${x}(${n}[${y}], ${n}[${v}])`,()=>{t.error(),e.assign(c,!1).break(m)})))}}};um.default=LN});var ew=$(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var pm=we(),DN=Me(),MN=ol(),FN={message:"must be equal to constant",params:({schemaCode:t})=>(0,pm._)`{allowedValue: ${t}}`},UN={keyword:"const",$data:!0,error:FN,code(t){let{gen:e,data:n,$data:r,schemaCode:o,schema:i}=t;r||i&&typeof i=="object"?t.fail$data((0,pm._)`!${(0,DN.useFunc)(e,MN.default)}(${n}, ${o})`):t.fail((0,pm._)`${i} !== ${n}`)}};dm.default=UN});var tw=$(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});var Xs=we(),qN=Me(),ZN=ol(),BN={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Xs._)`{allowedValues: ${t}}`},HN={keyword:"enum",schemaType:"array",$data:!0,error:BN,code(t){let{gen:e,data:n,$data:r,schema:o,schemaCode:i,it:s}=t;if(!r&&o.length===0)throw new Error("enum must have non-empty array");let a=o.length>=s.opts.loopEnum,c,l=()=>c??(c=(0,qN.useFunc)(e,ZN.default)),p;if(a||r)p=e.let("valid"),t.block$data(p,d);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let h=e.const("vSchema",i);p=(0,Xs.or)(...o.map((y,v)=>f(h,v)))}t.pass(p);function d(){e.assign(p,!1),e.forOf("v",i,h=>e.if((0,Xs._)`${l()}(${n}, ${h})`,()=>e.assign(p,!0).break()))}function f(h,y){let v=o[y];return typeof v=="object"&&v!==null?(0,Xs._)`${l()}(${n}, ${h}[${y}])`:(0,Xs._)`${n} === ${v}`}}};fm.default=HN});var nw=$(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});var VN=Z_(),GN=B_(),WN=G_(),KN=W_(),JN=K_(),YN=J_(),XN=Y_(),QN=Q_(),ej=ew(),tj=tw(),nj=[VN.default,GN.default,WN.default,KN.default,JN.default,YN.default,XN.default,QN.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},ej.default,tj.default];mm.default=nj});var gm=$(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:!0});Qs.validateAdditionalItems=void 0;var Oo=we(),hm=Me(),rj={message:({params:{len:t}})=>(0,Oo.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Oo._)`{limit: ${t}}`},oj={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:rj,code(t){let{parentSchema:e,it:n}=t,{items:r}=e;if(!Array.isArray(r)){(0,hm.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}rw(t,r)}};function rw(t,e){let{gen:n,schema:r,data:o,keyword:i,it:s}=t;s.items=!0;let a=n.const("len",(0,Oo._)`${o}.length`);if(r===!1)t.setParams({len:e.length}),t.pass((0,Oo._)`${a} <= ${e.length}`);else if(typeof r=="object"&&!(0,hm.alwaysValidSchema)(s,r)){let l=n.var("valid",(0,Oo._)`${a} <= ${e.length}`);n.if((0,Oo.not)(l),()=>c(l)),t.ok(l)}function c(l){n.forRange("i",e.length,a,p=>{t.subschema({keyword:i,dataProp:p,dataPropType:hm.Type.Num},l),s.allErrors||n.if((0,Oo.not)(l),()=>n.break())})}}Qs.validateAdditionalItems=rw;Qs.default=oj});var ym=$(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.validateTuple=void 0;var ow=we(),il=Me(),ij=Rn(),sj={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:n}=t;if(Array.isArray(e))return iw(t,"additionalItems",e);n.items=!0,!(0,il.alwaysValidSchema)(n,e)&&t.ok((0,ij.validateArray)(t))}};function iw(t,e,n=t.schema){let{gen:r,parentSchema:o,data:i,keyword:s,it:a}=t;p(o),a.opts.unevaluated&&n.length&&a.items!==!0&&(a.items=il.mergeEvaluated.items(r,n.length,a.items));let c=r.name("valid"),l=r.const("len",(0,ow._)`${i}.length`);n.forEach((d,f)=>{(0,il.alwaysValidSchema)(a,d)||(r.if((0,ow._)`${l} > ${f}`,()=>t.subschema({keyword:s,schemaProp:f,dataProp:f},c)),t.ok(c))});function p(d){let{opts:f,errSchemaPath:h}=a,y=n.length,v=y===d.minItems&&(y===d.maxItems||d[e]===!1);if(f.strictTuples&&!v){let x=`"${s}" is ${y}-tuple, but minItems or maxItems/${e} are not specified or different at path "${h}"`;(0,il.checkStrictMode)(a,x,f.strictTuples)}}}ea.validateTuple=iw;ea.default=sj});var sw=$(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});var aj=ym(),cj={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,aj.validateTuple)(t,"items")};xm.default=cj});var cw=$(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});var aw=we(),lj=Me(),uj=Rn(),pj=gm(),dj={message:({params:{len:t}})=>(0,aw.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,aw._)`{limit: ${t}}`},fj={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:dj,code(t){let{schema:e,parentSchema:n,it:r}=t,{prefixItems:o}=n;r.items=!0,!(0,lj.alwaysValidSchema)(r,e)&&(o?(0,pj.validateAdditionalItems)(t,o):t.ok((0,uj.validateArray)(t)))}};vm.default=fj});var lw=$(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});var In=we(),sl=Me(),mj={message:({params:{min:t,max:e}})=>e===void 0?(0,In.str)`must contain at least ${t} valid item(s)`:(0,In.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,In._)`{minContains: ${t}}`:(0,In._)`{minContains: ${t}, maxContains: ${e}}`},hj={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:mj,code(t){let{gen:e,schema:n,parentSchema:r,data:o,it:i}=t,s,a,{minContains:c,maxContains:l}=r;i.opts.next?(s=c===void 0?1:c,a=l):s=1;let p=e.const("len",(0,In._)`${o}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,sl.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,sl.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,sl.alwaysValidSchema)(i,n)){let v=(0,In._)`${p} >= ${s}`;a!==void 0&&(v=(0,In._)`${v} && ${p} <= ${a}`),t.pass(v);return}i.items=!0;let d=e.name("valid");a===void 0&&s===1?h(d,()=>e.if(d,()=>e.break())):s===0?(e.let(d,!0),a!==void 0&&e.if((0,In._)`${o}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let v=e.name("_valid"),x=e.let("count",0);h(v,()=>e.if(v,()=>y(x)))}function h(v,x){e.forRange("i",0,p,m=>{t.subschema({keyword:"contains",dataProp:m,dataPropType:sl.Type.Num,compositeRule:!0},v),x()})}function y(v){e.code((0,In._)`${v}++`),a===void 0?e.if((0,In._)`${v} >= ${s}`,()=>e.assign(d,!0).break()):(e.if((0,In._)`${v} > ${a}`,()=>e.assign(d,!1).break()),s===1?e.assign(d,!0):e.if((0,In._)`${v} >= ${s}`,()=>e.assign(d,!0)))}}};bm.default=hj});var dw=$(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.validateSchemaDeps=Qn.validatePropertyDeps=Qn.error=void 0;var _m=we(),gj=Me(),ta=Rn();Qn.error={message:({params:{property:t,depsCount:e,deps:n}})=>{let r=e===1?"property":"properties";return(0,_m.str)`must have ${r} ${n} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:n,missingProperty:r}})=>(0,_m._)`{property: ${t},
|
|
6
|
+
|| ${s} === "boolean" || ${o} === null`).assign(a,(0,ve._)`[${o}]`)}}}function YO({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,ve._)`${e} !== undefined`,()=>t.assign((0,ve._)`${e}[${n}]`,r))}function Pf(t,e,n,r=xi.Correct){let o=r===xi.Correct?ve.operators.EQ:ve.operators.NEQ,i;switch(t){case"null":return(0,ve._)`${e} ${o} null`;case"array":i=(0,ve._)`Array.isArray(${e})`;break;case"object":i=(0,ve._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,ve._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,ve._)`typeof ${e} ${o} ${t}`}return r===xi.Correct?i:(0,ve.not)(i);function s(a=ve.nil){return(0,ve.and)((0,ve._)`typeof ${e} == "number"`,a,n?(0,ve._)`isFinite(${e})`:ve.nil)}}Kt.checkDataType=Pf;function Cf(t,e,n,r){if(t.length===1)return Pf(t[0],e,n,r);let o,i=(0,Mb.toHash)(t);if(i.array&&i.object){let s=(0,ve._)`typeof ${e} != "object"`;o=i.null?s:(0,ve._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else o=ve.nil;i.number&&delete i.integer;for(let s in i)o=(0,ve.and)(o,Pf(s,e,n,r));return o}Kt.checkDataTypes=Cf;var XO={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ve._)`{type: ${t}}`:(0,ve._)`{type: ${e}}`};function If(t){let e=QO(t);(0,VO.reportError)(e,XO)}Kt.reportTypeError=If;function QO(t){let{gen:e,data:n,schema:r}=t,o=(0,Mb.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:o,schemaValue:o,parentSchema:r,params:{},it:t}}});var Zb=$(Vc=>{"use strict";Object.defineProperty(Vc,"__esModule",{value:!0});Vc.assignDefaults=void 0;var vi=we(),e1=Me();function t1(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let o in n)qb(t,o,n[o].default);else e==="array"&&Array.isArray(r)&&r.forEach((o,i)=>qb(t,i,o.default))}Vc.assignDefaults=t1;function qb(t,e,n){let{gen:r,compositeRule:o,data:i,opts:s}=t;if(n===void 0)return;let a=(0,vi._)`${i}${(0,vi.getProperty)(e)}`;if(o){(0,e1.checkStrictMode)(t,`default is ignored for: ${a}`);return}let c=(0,vi._)`${a} === undefined`;s.useDefaults==="empty"&&(c=(0,vi._)`${c} || ${a} === null || ${a} === ""`),r.if(c,(0,vi._)`${a} = ${(0,vi.stringify)(n)}`)}});var An=$(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je.validateUnion=Je.validateArray=Je.usePattern=Je.callValidateCode=Je.schemaProperties=Je.allSchemaProperties=Je.noPropertyInData=Je.propertyInData=Je.isOwnProperty=Je.hasPropFunc=Je.reportMissingProp=Je.checkMissingProp=Je.checkReportMissingProp=void 0;var ct=we(),Of=Me(),Lr=xr(),n1=Me();function r1(t,e){let{gen:n,data:r,it:o}=t;n.if(Nf(n,r,e,o.opts.ownProperties),()=>{t.setParams({missingProperty:(0,ct._)`${e}`},!0),t.error()})}Je.checkReportMissingProp=r1;function o1({gen:t,data:e,it:{opts:n}},r,o){return(0,ct.or)(...r.map(i=>(0,ct.and)(Nf(t,e,i,n.ownProperties),(0,ct._)`${o} = ${i}`)))}Je.checkMissingProp=o1;function i1(t,e){t.setParams({missingProperty:e},!0),t.error()}Je.reportMissingProp=i1;function Bb(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ct._)`Object.prototype.hasOwnProperty`})}Je.hasPropFunc=Bb;function zf(t,e,n){return(0,ct._)`${Bb(t)}.call(${e}, ${n})`}Je.isOwnProperty=zf;function s1(t,e,n,r){let o=(0,ct._)`${e}${(0,ct.getProperty)(n)} !== undefined`;return r?(0,ct._)`${o} && ${zf(t,e,n)}`:o}Je.propertyInData=s1;function Nf(t,e,n,r){let o=(0,ct._)`${e}${(0,ct.getProperty)(n)} === undefined`;return r?(0,ct.or)(o,(0,ct.not)(zf(t,e,n))):o}Je.noPropertyInData=Nf;function Hb(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Je.allSchemaProperties=Hb;function a1(t,e){return Hb(e).filter(n=>!(0,Of.alwaysValidSchema)(t,e[n]))}Je.schemaProperties=a1;function c1({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:o,errorPath:i},it:s},a,c,l){let p=l?(0,ct._)`${t}, ${e}, ${r}${o}`:e,d=[[Lr.default.instancePath,(0,ct.strConcat)(Lr.default.instancePath,i)],[Lr.default.parentData,s.parentData],[Lr.default.parentDataProperty,s.parentDataProperty],[Lr.default.rootData,Lr.default.rootData]];s.opts.dynamicRef&&d.push([Lr.default.dynamicAnchors,Lr.default.dynamicAnchors]);let f=(0,ct._)`${p}, ${n.object(...d)}`;return c!==ct.nil?(0,ct._)`${a}.call(${c}, ${f})`:(0,ct._)`${a}(${f})`}Je.callValidateCode=c1;var l1=(0,ct._)`new RegExp`;function u1({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:o}=e.code,i=o(n,r);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,ct._)`${o.code==="new RegExp"?l1:(0,n1.useFunc)(t,o)}(${n}, ${r})`})}Je.usePattern=u1;function p1(t){let{gen:e,data:n,keyword:r,it:o}=t,i=e.name("valid");if(o.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(i,!0),s(()=>e.break()),i;function s(a){let c=e.const("len",(0,ct._)`${n}.length`);e.forRange("i",0,c,l=>{t.subschema({keyword:r,dataProp:l,dataPropType:Of.Type.Num},i),e.if((0,ct.not)(i),a)})}}Je.validateArray=p1;function d1(t){let{gen:e,schema:n,keyword:r,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(n.some(c=>(0,Of.alwaysValidSchema)(o,c))&&!o.opts.unevaluated)return;let s=e.let("valid",!1),a=e.name("_valid");e.block(()=>n.forEach((c,l)=>{let p=t.subschema({keyword:r,schemaProp:l,compositeRule:!0},a);e.assign(s,(0,ct._)`${s} || ${a}`),t.mergeValidEvaluated(p,a)||e.if((0,ct.not)(s))})),t.result(s,()=>t.reset(),()=>t.error(!0))}Je.validateUnion=d1});var Wb=$(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.validateKeywordUsage=Qn.validSchemaType=Qn.funcKeywordCode=Qn.macroKeywordCode=void 0;var nn=we(),Po=xr(),f1=An(),m1=Ms();function h1(t,e){let{gen:n,keyword:r,schema:o,parentSchema:i,it:s}=t,a=e.macro.call(s.self,o,i,s),c=Gb(n,r,a);s.opts.validateSchema!==!1&&s.self.validateSchema(a,!0);let l=n.name("valid");t.subschema({schema:a,schemaPath:nn.nil,errSchemaPath:`${s.errSchemaPath}/${r}`,topSchemaRef:c,compositeRule:!0},l),t.pass(l,()=>t.error(!0))}Qn.macroKeywordCode=h1;function g1(t,e){var n;let{gen:r,keyword:o,schema:i,parentSchema:s,$data:a,it:c}=t;x1(c,e);let l=!a&&e.compile?e.compile.call(c.self,i,s,c):e.validate,p=Gb(r,o,l),d=r.let("valid");t.block$data(d,f),t.ok((n=e.valid)!==null&&n!==void 0?n:d);function f(){if(e.errors===!1)b(),e.modifying&&Vb(t),x(()=>t.error());else{let m=e.async?h():y();e.modifying&&Vb(t),x(()=>y1(t,m))}}function h(){let m=r.let("ruleErrs",null);return r.try(()=>b((0,nn._)`await `),v=>r.assign(d,!1).if((0,nn._)`${v} instanceof ${c.ValidationError}`,()=>r.assign(m,(0,nn._)`${v}.errors`),()=>r.throw(v))),m}function y(){let m=(0,nn._)`${p}.errors`;return r.assign(m,null),b(nn.nil),m}function b(m=e.async?(0,nn._)`await `:nn.nil){let v=c.opts.passContext?Po.default.this:Po.default.self,w=!("compile"in e&&!a||e.schema===!1);r.assign(d,(0,nn._)`${m}${(0,f1.callValidateCode)(t,p,v,w)}`,e.modifying)}function x(m){var v;r.if((0,nn.not)((v=e.valid)!==null&&v!==void 0?v:d),m)}}Qn.funcKeywordCode=g1;function Vb(t){let{gen:e,data:n,it:r}=t;e.if(r.parentData,()=>e.assign(n,(0,nn._)`${r.parentData}[${r.parentDataProperty}]`))}function y1(t,e){let{gen:n}=t;n.if((0,nn._)`Array.isArray(${e})`,()=>{n.assign(Po.default.vErrors,(0,nn._)`${Po.default.vErrors} === null ? ${e} : ${Po.default.vErrors}.concat(${e})`).assign(Po.default.errors,(0,nn._)`${Po.default.vErrors}.length`),(0,m1.extendErrors)(t)},()=>t.error())}function x1({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function Gb(t,e,n){if(n===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof n=="function"?{ref:n}:{ref:n,code:(0,nn.stringify)(n)})}function v1(t,e,n=!1){return!e.length||e.some(r=>r==="array"?Array.isArray(t):r==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==r||n&&typeof t>"u")}Qn.validSchemaType=v1;function b1({schema:t,opts:e,self:n,errSchemaPath:r},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");let s=o.dependencies;if(s!=null&&s.some(a=>!Object.prototype.hasOwnProperty.call(t,a)))throw new Error(`parent schema must have dependencies of ${i}: ${s.join(",")}`);if(o.validateSchema&&!o.validateSchema(t[i])){let c=`keyword "${i}" value is invalid at path "${r}": `+n.errorsText(o.validateSchema.errors);if(e.validateSchema==="log")n.logger.error(c);else throw new Error(c)}}Qn.validateKeywordUsage=b1});var Jb=$(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.extendSubschemaMode=Dr.extendSubschemaData=Dr.getSubschema=void 0;var er=we(),Kb=Me();function _1(t,{keyword:e,schemaProp:n,schema:r,schemaPath:o,errSchemaPath:i,topSchemaRef:s}){if(e!==void 0&&r!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let a=t.schema[e];return n===void 0?{schema:a,schemaPath:(0,er._)`${t.schemaPath}${(0,er.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:a[n],schemaPath:(0,er._)`${t.schemaPath}${(0,er.getProperty)(e)}${(0,er.getProperty)(n)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,Kb.escapeFragment)(n)}`}}if(r!==void 0){if(o===void 0||i===void 0||s===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:o,topSchemaRef:s,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}Dr.getSubschema=_1;function w1(t,e,{dataProp:n,dataPropType:r,data:o,dataTypes:i,propertyName:s}){if(o!==void 0&&n!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:a}=e;if(n!==void 0){let{errorPath:l,dataPathArr:p,opts:d}=e,f=a.let("data",(0,er._)`${e.data}${(0,er.getProperty)(n)}`,!0);c(f),t.errorPath=(0,er.str)`${l}${(0,Kb.getErrorPath)(n,r,d.jsPropertySyntax)}`,t.parentDataProperty=(0,er._)`${n}`,t.dataPathArr=[...p,t.parentDataProperty]}if(o!==void 0){let l=o instanceof er.Name?o:a.let("data",o,!0);c(l),s!==void 0&&(t.propertyName=s)}i&&(t.dataTypes=i);function c(l){t.data=l,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,l]}}Dr.extendSubschemaData=w1;function S1(t,{jtdDiscriminator:e,jtdMetadata:n,compositeRule:r,createErrors:o,allErrors:i}){r!==void 0&&(t.compositeRule=r),o!==void 0&&(t.createErrors=o),i!==void 0&&(t.allErrors=i),t.jtdDiscriminator=e,t.jtdMetadata=n}Dr.extendSubschemaMode=S1});var jf=$((nH,Yb)=>{"use strict";Yb.exports=function t(e,n){if(e===n)return!0;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(e.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(e)){if(r=e.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!t(e[o],n[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===n.source&&e.flags===n.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===n.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===n.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!t(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}});var Qb=$((rH,Xb)=>{"use strict";var Mr=Xb.exports=function(t,e,n){typeof e=="function"&&(n=e,e={}),n=e.cb||n;var r=typeof n=="function"?n:n.pre||function(){},o=n.post||function(){};Gc(e,r,o,t,"",t)};Mr.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Mr.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Mr.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Mr.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 Gc(t,e,n,r,o,i,s,a,c,l){if(r&&typeof r=="object"&&!Array.isArray(r)){e(r,o,i,s,a,c,l);for(var p in r){var d=r[p];if(Array.isArray(d)){if(p in Mr.arrayKeywords)for(var f=0;f<d.length;f++)Gc(t,e,n,d[f],o+"/"+p+"/"+f,i,o,p,r,f)}else if(p in Mr.propsKeywords){if(d&&typeof d=="object")for(var h in d)Gc(t,e,n,d[h],o+"/"+p+"/"+k1(h),i,o,p,r,h)}else(p in Mr.keywords||t.allKeys&&!(p in Mr.skipKeywords))&&Gc(t,e,n,d,o+"/"+p,i,o,p,r)}n(r,o,i,s,a,c,l)}}function k1(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Us=$(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.getSchemaRefs=dn.resolveUrl=dn.normalizeId=dn._getFullPath=dn.getFullPath=dn.inlineRef=void 0;var T1=Me(),E1=jf(),$1=Qb(),R1=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function A1(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Lf(t):e?e_(t)<=e:!1}dn.inlineRef=A1;var P1=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Lf(t){for(let e in t){if(P1.has(e))return!0;let n=t[e];if(Array.isArray(n)&&n.some(Lf)||typeof n=="object"&&Lf(n))return!0}return!1}function e_(t){let e=0;for(let n in t){if(n==="$ref")return 1/0;if(e++,!R1.has(n)&&(typeof t[n]=="object"&&(0,T1.eachItem)(t[n],r=>e+=e_(r)),e===1/0))return 1/0}return e}function t_(t,e="",n){n!==!1&&(e=bi(e));let r=t.parse(e);return n_(t,r)}dn.getFullPath=t_;function n_(t,e){return t.serialize(e).split("#")[0]+"#"}dn._getFullPath=n_;var C1=/#\/?$/;function bi(t){return t?t.replace(C1,""):""}dn.normalizeId=bi;function I1(t,e,n){return n=bi(n),t.resolve(e,n)}dn.resolveUrl=I1;var O1=/^[a-z_][-a-z0-9._]*$/i;function z1(t,e){if(typeof t=="boolean")return{};let{schemaId:n,uriResolver:r}=this.opts,o=bi(t[n]||e),i={"":o},s=t_(r,o,!1),a={},c=new Set;return $1(t,{allKeys:!0},(d,f,h,y)=>{if(y===void 0)return;let b=s+f,x=i[y];typeof d[n]=="string"&&(x=m.call(this,d[n])),v.call(this,d.$anchor),v.call(this,d.$dynamicAnchor),i[f]=x;function m(w){let k=this.opts.uriResolver.resolve;if(w=bi(x?k(x,w):w),c.has(w))throw p(w);c.add(w);let E=this.refs[w];return typeof E=="string"&&(E=this.refs[E]),typeof E=="object"?l(d,E.schema,w):w!==bi(b)&&(w[0]==="#"?(l(d,a[w],w),a[w]=d):this.refs[w]=b),w}function v(w){if(typeof w=="string"){if(!O1.test(w))throw new Error(`invalid anchor "${w}"`);m.call(this,`#${w}`)}}}),a;function l(d,f,h){if(f!==void 0&&!E1(d,f))throw p(h)}function p(d){return new Error(`reference "${d}" resolves to more than one schema`)}}dn.getSchemaRefs=z1});var Bs=$(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.getData=Fr.KeywordCxt=Fr.validateFunctionCode=void 0;var a_=jb(),r_=Fs(),Mf=Af(),Wc=Fs(),N1=Zb(),Zs=Wb(),Df=Jb(),re=we(),he=xr(),j1=Us(),vr=Me(),qs=Ms();function L1(t){if(u_(t)&&(p_(t),l_(t))){F1(t);return}c_(t,()=>(0,a_.topBoolOrEmptySchema)(t))}Fr.validateFunctionCode=L1;function c_({gen:t,validateName:e,schema:n,schemaEnv:r,opts:o},i){o.code.es5?t.func(e,(0,re._)`${he.default.data}, ${he.default.valCxt}`,r.$async,()=>{t.code((0,re._)`"use strict"; ${o_(n,o)}`),M1(t,o),t.code(i)}):t.func(e,(0,re._)`${he.default.data}, ${D1(o)}`,r.$async,()=>t.code(o_(n,o)).code(i))}function D1(t){return(0,re._)`{${he.default.instancePath}="", ${he.default.parentData}, ${he.default.parentDataProperty}, ${he.default.rootData}=${he.default.data}${t.dynamicRef?(0,re._)`, ${he.default.dynamicAnchors}={}`:re.nil}}={}`}function M1(t,e){t.if(he.default.valCxt,()=>{t.var(he.default.instancePath,(0,re._)`${he.default.valCxt}.${he.default.instancePath}`),t.var(he.default.parentData,(0,re._)`${he.default.valCxt}.${he.default.parentData}`),t.var(he.default.parentDataProperty,(0,re._)`${he.default.valCxt}.${he.default.parentDataProperty}`),t.var(he.default.rootData,(0,re._)`${he.default.valCxt}.${he.default.rootData}`),e.dynamicRef&&t.var(he.default.dynamicAnchors,(0,re._)`${he.default.valCxt}.${he.default.dynamicAnchors}`)},()=>{t.var(he.default.instancePath,(0,re._)`""`),t.var(he.default.parentData,(0,re._)`undefined`),t.var(he.default.parentDataProperty,(0,re._)`undefined`),t.var(he.default.rootData,he.default.data),e.dynamicRef&&t.var(he.default.dynamicAnchors,(0,re._)`{}`)})}function F1(t){let{schema:e,opts:n,gen:r}=t;c_(t,()=>{n.$comment&&e.$comment&&f_(t),H1(t),r.let(he.default.vErrors,null),r.let(he.default.errors,0),n.unevaluated&&U1(t),d_(t),W1(t)})}function U1(t){let{gen:e,validateName:n}=t;t.evaluated=e.const("evaluated",(0,re._)`${n}.evaluated`),e.if((0,re._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,re._)`${t.evaluated}.props`,(0,re._)`undefined`)),e.if((0,re._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,re._)`${t.evaluated}.items`,(0,re._)`undefined`))}function o_(t,e){let n=typeof t=="object"&&t[e.schemaId];return n&&(e.code.source||e.code.process)?(0,re._)`/*# sourceURL=${n} */`:re.nil}function q1(t,e){if(u_(t)&&(p_(t),l_(t))){Z1(t,e);return}(0,a_.boolOrEmptySchema)(t,e)}function l_({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let n in t)if(e.RULES.all[n])return!0;return!1}function u_(t){return typeof t.schema!="boolean"}function Z1(t,e){let{schema:n,gen:r,opts:o}=t;o.$comment&&n.$comment&&f_(t),V1(t),G1(t);let i=r.const("_errs",he.default.errors);d_(t,i),r.var(e,(0,re._)`${i} === ${he.default.errors}`)}function p_(t){(0,vr.checkUnknownRules)(t),B1(t)}function d_(t,e){if(t.opts.jtd)return i_(t,[],!1,e);let n=(0,r_.getSchemaTypes)(t.schema),r=(0,r_.coerceAndCheckDataType)(t,n);i_(t,n,!r,e)}function B1(t){let{schema:e,errSchemaPath:n,opts:r,self:o}=t;e.$ref&&r.ignoreKeywordsWithRef&&(0,vr.schemaHasRulesButRef)(e,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}function H1(t){let{schema:e,opts:n}=t;e.default!==void 0&&n.useDefaults&&n.strictSchema&&(0,vr.checkStrictMode)(t,"default is ignored in the schema root")}function V1(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,j1.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function G1(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function f_({gen:t,schemaEnv:e,schema:n,errSchemaPath:r,opts:o}){let i=n.$comment;if(o.$comment===!0)t.code((0,re._)`${he.default.self}.logger.log(${i})`);else if(typeof o.$comment=="function"){let s=(0,re.str)`${r}/$comment`,a=t.scopeValue("root",{ref:e.root});t.code((0,re._)`${he.default.self}.opts.$comment(${i}, ${s}, ${a}.schema)`)}}function W1(t){let{gen:e,schemaEnv:n,validateName:r,ValidationError:o,opts:i}=t;n.$async?e.if((0,re._)`${he.default.errors} === 0`,()=>e.return(he.default.data),()=>e.throw((0,re._)`new ${o}(${he.default.vErrors})`)):(e.assign((0,re._)`${r}.errors`,he.default.vErrors),i.unevaluated&&K1(t),e.return((0,re._)`${he.default.errors} === 0`))}function K1({gen:t,evaluated:e,props:n,items:r}){n instanceof re.Name&&t.assign((0,re._)`${e}.props`,n),r instanceof re.Name&&t.assign((0,re._)`${e}.items`,r)}function i_(t,e,n,r){let{gen:o,schema:i,data:s,allErrors:a,opts:c,self:l}=t,{RULES:p}=l;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,vr.schemaHasRulesButRef)(i,p))){o.block(()=>h_(t,"$ref",p.all.$ref.definition));return}c.jtd||J1(t,e),o.block(()=>{for(let f of p.rules)d(f);d(p.post)});function d(f){(0,Mf.shouldUseGroup)(i,f)&&(f.type?(o.if((0,Wc.checkDataType)(f.type,s,c.strictNumbers)),s_(t,f),e.length===1&&e[0]===f.type&&n&&(o.else(),(0,Wc.reportTypeError)(t)),o.endIf()):s_(t,f),a||o.if((0,re._)`${he.default.errors} === ${r||0}`))}}function s_(t,e){let{gen:n,schema:r,opts:{useDefaults:o}}=t;o&&(0,N1.assignDefaults)(t,e.type),n.block(()=>{for(let i of e.rules)(0,Mf.shouldUseRule)(r,i)&&h_(t,i.keyword,i.definition,e.type)})}function J1(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Y1(t,e),t.opts.allowUnionTypes||X1(t,e),Q1(t,t.dataTypes))}function Y1(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(n=>{m_(t.dataTypes,n)||Ff(t,`type "${n}" not allowed by context "${t.dataTypes.join(",")}"`)}),tz(t,e)}}function X1(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Ff(t,"use allowUnionTypes to allow union type keyword")}function Q1(t,e){let n=t.self.RULES.all;for(let r in n){let o=n[r];if(typeof o=="object"&&(0,Mf.shouldUseRule)(t.schema,o)){let{type:i}=o.definition;i.length&&!i.some(s=>ez(e,s))&&Ff(t,`missing type "${i.join(",")}" for keyword "${r}"`)}}}function ez(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function m_(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function tz(t,e){let n=[];for(let r of t.dataTypes)m_(e,r)?n.push(r):e.includes("integer")&&r==="number"&&n.push("integer");t.dataTypes=n}function Ff(t,e){let n=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${n}" (strictTypes)`,(0,vr.checkStrictMode)(t,e,t.opts.strictTypes)}var Kc=class{constructor(e,n,r){if((0,Zs.validateKeywordUsage)(e,n,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=n.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,vr.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=n.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=n,this.$data)this.schemaCode=e.gen.const("vSchema",g_(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Zs.validSchemaType)(this.schema,n.schemaType,n.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);("code"in n?n.trackErrors:n.errors!==!1)&&(this.errsCount=e.gen.const("_errs",he.default.errors))}result(e,n,r){this.failResult((0,re.not)(e),n,r)}failResult(e,n,r){this.gen.if(e),r?r():this.error(),n?(this.gen.else(),n(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,n){this.failResult((0,re.not)(e),void 0,n)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:n}=this;this.fail((0,re._)`${n} !== undefined && (${(0,re.or)(this.invalid$data(),e)})`)}error(e,n,r){if(n){this.setParams(n),this._error(e,r),this.setParams({});return}this._error(e,r)}_error(e,n){(e?qs.reportExtraError:qs.reportError)(this,this.def.error,n)}$dataError(){(0,qs.reportError)(this,this.def.$dataError||qs.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,qs.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,n){n?Object.assign(this.params,e):this.params=e}block$data(e,n,r=re.nil){this.gen.block(()=>{this.check$data(e,r),n()})}check$data(e=re.nil,n=re.nil){if(!this.$data)return;let{gen:r,schemaCode:o,schemaType:i,def:s}=this;r.if((0,re.or)((0,re._)`${o} === undefined`,n)),e!==re.nil&&r.assign(e,!0),(i.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==re.nil&&r.assign(e,!1)),r.else()}invalid$data(){let{gen:e,schemaCode:n,schemaType:r,def:o,it:i}=this;return(0,re.or)(s(),a());function s(){if(r.length){if(!(n instanceof re.Name))throw new Error("ajv implementation error");let c=Array.isArray(r)?r:[r];return(0,re._)`${(0,Wc.checkDataTypes)(c,n,i.opts.strictNumbers,Wc.DataType.Wrong)}`}return re.nil}function a(){if(o.validateSchema){let c=e.scopeValue("validate$data",{ref:o.validateSchema});return(0,re._)`!${c}(${n})`}return re.nil}}subschema(e,n){let r=(0,Df.getSubschema)(this.it,e);(0,Df.extendSubschemaData)(r,this.it,e),(0,Df.extendSubschemaMode)(r,e);let o={...this.it,...r,items:void 0,props:void 0};return q1(o,n),o}mergeEvaluated(e,n){let{it:r,gen:o}=this;r.opts.unevaluated&&(r.props!==!0&&e.props!==void 0&&(r.props=vr.mergeEvaluated.props(o,e.props,r.props,n)),r.items!==!0&&e.items!==void 0&&(r.items=vr.mergeEvaluated.items(o,e.items,r.items,n)))}mergeValidEvaluated(e,n){let{it:r,gen:o}=this;if(r.opts.unevaluated&&(r.props!==!0||r.items!==!0))return o.if(n,()=>this.mergeEvaluated(e,re.Name)),!0}};Fr.KeywordCxt=Kc;function h_(t,e,n,r){let o=new Kc(t,n,e);"code"in n?n.code(o,r):o.$data&&n.validate?(0,Zs.funcKeywordCode)(o,n):"macro"in n?(0,Zs.macroKeywordCode)(o,n):(n.compile||n.validate)&&(0,Zs.funcKeywordCode)(o,n)}var nz=/^\/(?:[^~]|~0|~1)*$/,rz=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function g_(t,{dataLevel:e,dataNames:n,dataPathArr:r}){let o,i;if(t==="")return he.default.rootData;if(t[0]==="/"){if(!nz.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);o=t,i=he.default.rootData}else{let l=rz.exec(t);if(!l)throw new Error(`Invalid JSON-pointer: ${t}`);let p=+l[1];if(o=l[2],o==="#"){if(p>=e)throw new Error(c("property/index",p));return r[e-p]}if(p>e)throw new Error(c("data",p));if(i=n[e-p],!o)return i}let s=i,a=o.split("/");for(let l of a)l&&(i=(0,re._)`${i}${(0,re.getProperty)((0,vr.unescapeJsonPointer)(l))}`,s=(0,re._)`${s} && ${i}`);return s;function c(l,p){return`Cannot access ${l} ${p} levels up, current level is ${e}`}}Fr.getData=g_});var Jc=$(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});var Uf=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};qf.default=Uf});var Hs=$(Hf=>{"use strict";Object.defineProperty(Hf,"__esModule",{value:!0});var Zf=Us(),Bf=class extends Error{constructor(e,n,r,o){super(o||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,Zf.resolveUrl)(e,n,r),this.missingSchema=(0,Zf.normalizeId)((0,Zf.getFullPath)(e,this.missingRef))}};Hf.default=Bf});var Xc=$(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.resolveSchema=Pn.getCompilingSchema=Pn.resolveRef=Pn.compileSchema=Pn.SchemaEnv=void 0;var Fn=we(),oz=Jc(),Co=xr(),Un=Us(),y_=Me(),iz=Bs(),_i=class{constructor(e){var n;this.refs={},this.dynamicAnchors={};let r;typeof e.schema=="object"&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(n=e.baseId)!==null&&n!==void 0?n:(0,Un.normalizeId)(r==null?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=r==null?void 0:r.$async,this.refs={}}};Pn.SchemaEnv=_i;function Gf(t){let e=x_.call(this,t);if(e)return e;let n=(0,Un.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:r,lines:o}=this.opts.code,{ownProperties:i}=this.opts,s=new Fn.CodeGen(this.scope,{es5:r,lines:o,ownProperties:i}),a;t.$async&&(a=s.scopeValue("Error",{ref:oz.default,code:(0,Fn._)`require("ajv/dist/runtime/validation_error").default`}));let c=s.scopeName("validate");t.validateName=c;let l={gen:s,allErrors:this.opts.allErrors,data:Co.default.data,parentData:Co.default.parentData,parentDataProperty:Co.default.parentDataProperty,dataNames:[Co.default.data],dataPathArr:[Fn.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:s.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,Fn.stringify)(t.schema)}:{ref:t.schema}),validateName:c,ValidationError:a,schema:t.schema,schemaEnv:t,rootId:n,baseId:t.baseId||n,schemaPath:Fn.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Fn._)`""`,opts:this.opts,self:this},p;try{this._compilations.add(t),(0,iz.validateFunctionCode)(l),s.optimize(this.opts.code.optimize);let d=s.toString();p=`${s.scopeRefs(Co.default.scope)}return ${d}`,this.opts.code.process&&(p=this.opts.code.process(p,t));let h=new Function(`${Co.default.self}`,`${Co.default.scope}`,p)(this,this.scope.get());if(this.scope.value(c,{ref:h}),h.errors=null,h.schema=t.schema,h.schemaEnv=t,t.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:c,validateCode:d,scopeValues:s._values}),this.opts.unevaluated){let{props:y,items:b}=l;h.evaluated={props:y instanceof Fn.Name?void 0:y,items:b instanceof Fn.Name?void 0:b,dynamicProps:y instanceof Fn.Name,dynamicItems:b instanceof Fn.Name},h.source&&(h.source.evaluated=(0,Fn.stringify)(h.evaluated))}return t.validate=h,t}catch(d){throw delete t.validate,delete t.validateName,p&&this.logger.error("Error compiling schema, function code:",p),d}finally{this._compilations.delete(t)}}Pn.compileSchema=Gf;function sz(t,e,n){var r;n=(0,Un.resolveUrl)(this.opts.uriResolver,e,n);let o=t.refs[n];if(o)return o;let i=lz.call(this,t,n);if(i===void 0){let s=(r=t.localRefs)===null||r===void 0?void 0:r[n],{schemaId:a}=this.opts;s&&(i=new _i({schema:s,schemaId:a,root:t,baseId:e}))}if(i!==void 0)return t.refs[n]=az.call(this,i)}Pn.resolveRef=sz;function az(t){return(0,Un.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Gf.call(this,t)}function x_(t){for(let e of this._compilations)if(cz(e,t))return e}Pn.getCompilingSchema=x_;function cz(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function lz(t,e){let n;for(;typeof(n=this.refs[e])=="string";)e=n;return n||this.schemas[e]||Yc.call(this,t,e)}function Yc(t,e){let n=this.opts.uriResolver.parse(e),r=(0,Un._getFullPath)(this.opts.uriResolver,n),o=(0,Un.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&r===o)return Vf.call(this,n,t);let i=(0,Un.normalizeId)(r),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=Yc.call(this,t,s);return typeof(a==null?void 0:a.schema)!="object"?void 0:Vf.call(this,n,a)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||Gf.call(this,s),i===(0,Un.normalizeId)(e)){let{schema:a}=s,{schemaId:c}=this.opts,l=a[c];return l&&(o=(0,Un.resolveUrl)(this.opts.uriResolver,o,l)),new _i({schema:a,schemaId:c,root:t,baseId:o})}return Vf.call(this,n,s)}}Pn.resolveSchema=Yc;var uz=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Vf(t,{baseId:e,schema:n,root:r}){var o;if(((o=t.fragment)===null||o===void 0?void 0:o[0])!=="/")return;for(let a of t.fragment.slice(1).split("/")){if(typeof n=="boolean")return;let c=n[(0,y_.unescapeFragment)(a)];if(c===void 0)return;n=c;let l=typeof n=="object"&&n[this.opts.schemaId];!uz.has(a)&&l&&(e=(0,Un.resolveUrl)(this.opts.uriResolver,e,l))}let i;if(typeof n!="boolean"&&n.$ref&&!(0,y_.schemaHasRulesButRef)(n,this.RULES)){let a=(0,Un.resolveUrl)(this.opts.uriResolver,e,n.$ref);i=Yc.call(this,r,a)}let{schemaId:s}=this.opts;if(i=i||new _i({schema:n,schemaId:s,root:r,baseId:e}),i.schema!==i.root.schema)return i}});var v_=$((lH,pz)=>{pz.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 Jf=$((uH,T_)=>{"use strict";var dz=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),__=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),Wf=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),w_=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),fz=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Kf(t){let e="",n=0,r=0;for(r=0;r<t.length;r++)if(n=t[r].charCodeAt(0),n!==48){if(!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r];break}for(r+=1;r<t.length;r++){if(n=t[r].charCodeAt(0),!(n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102))return"";e+=t[r]}return e}var mz=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function b_(t){return t.length=0,!0}function hz(t,e,n){if(t.length){let r=Kf(t);if(r!=="")e.push(r);else return n.error=!0,!1;t.length=0}return!0}function gz(t){let e=0,n={error:!1,address:"",zone:""},r=[],o=[],i=!1,s=!1,a=hz;for(let c=0;c<t.length;c++){let l=t[c];if(!(l==="["||l==="]"))if(l===":"){if(i===!0&&(s=!0),!a(o,r,n))break;if(++e>7){n.error=!0;break}c>0&&t[c-1]===":"&&(i=!0),r.push(":");continue}else if(l==="%"){if(!a(o,r,n))break;a=b_}else{o.push(l);continue}}return o.length&&(a===b_?n.zone=o.join(""):s?r.push(o.join("")):r.push(Kf(o))),n.address=r.join(""),n}function S_(t){if(yz(t,":")<2)return{host:t,isIPV6:!1};let e=gz(t);if(e.error)return{host:t,isIPV6:!1};{let n=e.address,r=e.address;return e.zone&&(n+="%"+e.zone,r+="%25"+e.zone),{host:n,isIPV6:!0,escapedHost:r}}}function yz(t,e){let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n}function xz(t){let e=t,n=[],r=-1,o=0;for(;o=e.length;){if(o===1){if(e===".")break;if(e==="/"){n.push("/");break}else{n.push(e);break}}else if(o===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){n.push("/");break}}else if(o===3&&e==="/.."){n.length!==0&&n.pop(),n.push("/");break}if(e[0]==="."){if(e[1]==="."){if(e[2]==="/"){e=e.slice(3);continue}}else if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&e[1]==="."){if(e[2]==="/"){e=e.slice(2);continue}else if(e[2]==="."&&e[3]==="/"){e=e.slice(3),n.length!==0&&n.pop();continue}}if((r=e.indexOf("/",1))===-1){n.push(e);break}else n.push(e.slice(0,r)),e=e.slice(r)}return n.join("")}var vz={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},bz=/[@/?#:]/g,_z=/[@/?#]/g;function k_(t,e){let n=e?_z:bz;return n.lastIndex=0,t.replace(n,r=>vz[r])}function wz(t,e=!1){if(t.indexOf("%")===-1)return t;let n="";for(let r=0;r<t.length;r++){if(t[r]==="%"&&r+2<t.length){let o=t.slice(r+1,r+3);if(Wf(o)){let i=o.toUpperCase(),s=String.fromCharCode(parseInt(i,16));e&&w_(s)?n+=s:n+="%"+i,r+=2;continue}}n+=t[r]}return n}function Sz(t){let e="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let r=t.slice(n+1,n+3);if(Wf(r)){let o=r.toUpperCase(),i=String.fromCharCode(parseInt(o,16));i!=="."&&w_(i)?e+=i:e+="%"+o,n+=2;continue}}fz(t[n])?e+=t[n]:e+=escape(t[n])}return e}function kz(t){let e="";for(let n=0;n<t.length;n++){if(t[n]==="%"&&n+2<t.length){let r=t.slice(n+1,n+3);if(Wf(r)){e+="%"+r.toUpperCase(),n+=2;continue}}e+=escape(t[n])}return e}function Tz(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let n=unescape(t.host);if(!__(n)){let r=S_(n);r.isIPV6===!0?n=`[${r.escapedHost}]`:n=k_(n,!1)}e.push(n)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}T_.exports={nonSimpleDomain:mz,recomposeAuthority:Tz,reescapeHostDelimiters:k_,normalizePercentEncoding:wz,normalizePathEncoding:Sz,escapePreservingEscapes:kz,removeDotSegments:xz,isIPv4:__,isUUID:dz,normalizeIPv6:S_,stringArrayToHexStripped:Kf}});var P_=$((pH,A_)=>{"use strict";var{isUUID:Ez}=Jf(),$z=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Rz=["http","https","ws","wss","urn","urn:uuid"];function Az(t){return Rz.indexOf(t)!==-1}function Yf(t){return t.secure===!0?!0:t.secure===!1?!1:t.scheme?t.scheme.length===3&&(t.scheme[0]==="w"||t.scheme[0]==="W")&&(t.scheme[1]==="s"||t.scheme[1]==="S")&&(t.scheme[2]==="s"||t.scheme[2]==="S"):!1}function E_(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function $_(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function Pz(t){return t.secure=Yf(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function Cz(t){if((t.port===(Yf(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,n]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=n,t.resourceName=void 0}return t.fragment=void 0,t}function Iz(t,e){if(!t.path)return t.error="URN can not be parsed",t;let n=t.path.match($z);if(n){let r=e.scheme||t.scheme||"urn";t.nid=n[1].toLowerCase(),t.nss=n[2];let o=`${r}:${e.nid||t.nid}`,i=Xf(o);t.path=void 0,i&&(t=i.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function Oz(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let n=e.scheme||t.scheme||"urn",r=t.nid.toLowerCase(),o=`${n}:${e.nid||r}`,i=Xf(o);i&&(t=i.serialize(t,e));let s=t,a=t.nss;return s.path=`${r||e.nid}:${a}`,e.skipEscape=!0,s}function zz(t,e){let n=t;return n.uuid=n.nss,n.nss=void 0,!e.tolerant&&(!n.uuid||!Ez(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function Nz(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var R_={scheme:"http",domainHost:!0,parse:E_,serialize:$_},jz={scheme:"https",domainHost:R_.domainHost,parse:E_,serialize:$_},Qc={scheme:"ws",domainHost:!0,parse:Pz,serialize:Cz},Lz={scheme:"wss",domainHost:Qc.domainHost,parse:Qc.parse,serialize:Qc.serialize},Dz={scheme:"urn",parse:Iz,serialize:Oz,skipNormalize:!0},Mz={scheme:"urn:uuid",parse:zz,serialize:Nz,skipNormalize:!0},el={http:R_,https:jz,ws:Qc,wss:Lz,urn:Dz,"urn:uuid":Mz};Object.setPrototypeOf(el,null);function Xf(t){return t&&(el[t]||el[t.toLowerCase()])||void 0}A_.exports={wsIsSecure:Yf,SCHEMES:el,isValidSchemeName:Az,getSchemeHandler:Xf}});var N_=$((dH,rl)=>{"use strict";var{normalizeIPv6:Fz,removeDotSegments:Vs,recomposeAuthority:Uz,normalizePercentEncoding:qz,normalizePathEncoding:Zz,escapePreservingEscapes:Bz,reescapeHostDelimiters:Hz,isIPv4:Vz,nonSimpleDomain:Gz}=Jf(),{SCHEMES:Wz,getSchemeHandler:I_}=P_();function Kz(t,e){return typeof t=="string"?t=nN(t,e):typeof t=="object"&&(t=nl(Io(t,e),e)),t}function Jz(t,e,n){let r=n?Object.assign({scheme:"null"},n):{scheme:"null"},{parsed:o,malformedAuthorityOrPort:i}=tl(t,r),{parsed:s,malformedAuthorityOrPort:a}=tl(e,r);if(i||a)throw new Error(o.error||s.error||"URI is malformed.");let c=O_(o,s,r,!0);return r.skipEscape=!0,Io(c,r)}function O_(t,e,n,r){let o={};return r||(t=nl(Io(t,n),n),e=nl(Io(e,n),n)),n=n||{},!n.tolerant&&e.scheme?(o.scheme=e.scheme,o.userinfo=e.userinfo,o.host=e.host,o.port=e.port,o.path=Vs(e.path||""),o.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(o.userinfo=e.userinfo,o.host=e.host,o.port=e.port,o.path=Vs(e.path||""),o.query=e.query):(e.path?(e.path[0]==="/"?o.path=Vs(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?o.path="/"+e.path:t.path?o.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:o.path=e.path,o.path=Vs(o.path)),o.query=e.query):(o.path=t.path,e.query!==void 0?o.query=e.query:o.query=t.query),o.userinfo=t.userinfo,o.host=t.host,o.port=t.port),o.scheme=t.scheme),o.fragment=e.fragment,o}function Yz(t,e,n){let r=C_(t,n),o=C_(e,n);return r!==void 0&&o!==void 0&&r.toLowerCase()===o.toLowerCase()}function Io(t,e){let n={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},r=Object.assign({},e),o=[],i=I_(r.scheme||n.scheme);i&&i.serialize&&i.serialize(n,r),n.path!==void 0&&(r.skipEscape?n.path=qz(n.path):(n.path=Bz(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),r.reference!=="suffix"&&n.scheme&&o.push(n.scheme,":");let s=Uz(n);if(s!==void 0&&(r.reference!=="suffix"&&o.push("//"),o.push(s),n.path&&n.path[0]!=="/"&&o.push("/")),n.path!==void 0){let a=n.path;!r.absolutePath&&(!i||!i.absolutePath)&&(a=Vs(a)),s===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),o.push(a)}return n.query!==void 0&&o.push("?",n.query),n.fragment!==void 0&&o.push("#",n.fragment),o.join("")}var Xz=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,Qz=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,eN=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function tN(t,e){if(e[2]!==void 0&&t.path&&t.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof t.port=="number"&&(t.port<0||t.port>65535))return"URI port is malformed."}function tl(t,e){let n=Object.assign({},e),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},o=!1,i=!1;n.reference==="suffix"&&(n.scheme?t=n.scheme+":"+t:t="//"+t);let s=t.match(Qz);s!==null&&s[1].indexOf("\\")!==-1&&(r.error="URI authority must not contain a literal backslash.",o=!0);let a=t.match(eN);if(a!==null){let l=a[1],p=l.replace(/[\t\n\r]/g,"");p.length>=2&&(p.slice(0,2)!=="//"?(r.error=r.error||"URI authority must not contain a literal backslash.",o=!0):l.length!==p.length&&(r.error=r.error||"URI authority introducer must not contain whitespace.",o=!0))}let c=t.match(Xz);if(c){r.scheme=c[1],r.userinfo=c[3],r.host=c[4],r.port=parseInt(c[5],10),r.path=c[6]||"",r.query=c[7],r.fragment=c[8],isNaN(r.port)&&(r.port=c[5]);let l=tN(r,c);if(l!==void 0&&(r.error=r.error||l,o=!0),r.host)if(Vz(r.host)===!1){let f=Fz(r.host);r.host=f.host.toLowerCase(),i=f.isIPV6}else i=!0;r.scheme===void 0&&r.userinfo===void 0&&r.host===void 0&&r.port===void 0&&r.query===void 0&&!r.path?r.reference="same-document":r.scheme===void 0?r.reference="relative":r.fragment===void 0?r.reference="absolute":r.reference="uri",n.reference&&n.reference!=="suffix"&&n.reference!==r.reference&&(r.error=r.error||"URI is not a "+n.reference+" reference.");let p=I_(n.scheme||r.scheme);if(!n.unicodeSupport&&(!p||!p.unicodeSupport)&&r.host&&(n.domainHost||p&&p.domainHost)&&i===!1&&Gz(r.host))try{r.host=new URL("http://"+r.host).hostname}catch(d){r.error=r.error||"Host's domain name can not be converted to ASCII: "+d}if((!p||p&&!p.skipNormalize)&&(t.indexOf("%")!==-1&&(r.scheme!==void 0&&(r.scheme=unescape(r.scheme)),r.host!==void 0&&(r.host=Hz(unescape(r.host),i))),r.path&&(r.path=Zz(r.path)),r.fragment))try{r.fragment=encodeURI(decodeURIComponent(r.fragment))}catch{r.error=r.error||"URI malformed"}p&&p.parse&&p.parse(r,n)}else r.error=r.error||"URI can not be parsed.";return{parsed:r,malformedAuthorityOrPort:o}}function nl(t,e){return tl(t,e).parsed}function nN(t,e){return z_(t,e).normalized}function z_(t,e){let{parsed:n,malformedAuthorityOrPort:r}=tl(t,e);return{normalized:r?t:Io(n,e),malformedAuthorityOrPort:r}}function C_(t,e){if(typeof t=="string"){let{normalized:n,malformedAuthorityOrPort:r}=z_(t,e);return r?void 0:n}if(typeof t=="object")return Io(t,e)}var Qf={SCHEMES:Wz,normalize:Kz,resolve:Jz,resolveComponent:O_,equal:Yz,serialize:Io,parse:nl};rl.exports=Qf;rl.exports.default=Qf;rl.exports.fastUri=Qf});var L_=$(em=>{"use strict";Object.defineProperty(em,"__esModule",{value:!0});var j_=N_();j_.code='require("ajv/dist/runtime/uri").default';em.default=j_});var H_=$(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.CodeGen=Ft.Name=Ft.nil=Ft.stringify=Ft.str=Ft._=Ft.KeywordCxt=void 0;var rN=Bs();Object.defineProperty(Ft,"KeywordCxt",{enumerable:!0,get:function(){return rN.KeywordCxt}});var wi=we();Object.defineProperty(Ft,"_",{enumerable:!0,get:function(){return wi._}});Object.defineProperty(Ft,"str",{enumerable:!0,get:function(){return wi.str}});Object.defineProperty(Ft,"stringify",{enumerable:!0,get:function(){return wi.stringify}});Object.defineProperty(Ft,"nil",{enumerable:!0,get:function(){return wi.nil}});Object.defineProperty(Ft,"Name",{enumerable:!0,get:function(){return wi.Name}});Object.defineProperty(Ft,"CodeGen",{enumerable:!0,get:function(){return wi.CodeGen}});var oN=Jc(),q_=Hs(),iN=Rf(),Gs=Xc(),sN=we(),Ws=Us(),ol=Fs(),nm=Me(),D_=v_(),aN=L_(),Z_=(t,e)=>new RegExp(t,e);Z_.code="new RegExp";var cN=["removeAdditional","useDefaults","coerceTypes"],lN=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),uN={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."},pN={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},M_=200;function dN(t){var e,n,r,o,i,s,a,c,l,p,d,f,h,y,b,x,m,v,w,k,E,F,j,me,de;let oe=t.strict,Re=(e=t.code)===null||e===void 0?void 0:e.optimize,bt=Re===!0||Re===void 0?1:Re||0,Ve=(r=(n=t.code)===null||n===void 0?void 0:n.regExp)!==null&&r!==void 0?r:Z_,ae=(o=t.uriResolver)!==null&&o!==void 0?o:aN.default;return{strictSchema:(s=(i=t.strictSchema)!==null&&i!==void 0?i:oe)!==null&&s!==void 0?s:!0,strictNumbers:(c=(a=t.strictNumbers)!==null&&a!==void 0?a:oe)!==null&&c!==void 0?c:!0,strictTypes:(p=(l=t.strictTypes)!==null&&l!==void 0?l:oe)!==null&&p!==void 0?p:"log",strictTuples:(f=(d=t.strictTuples)!==null&&d!==void 0?d:oe)!==null&&f!==void 0?f:"log",strictRequired:(y=(h=t.strictRequired)!==null&&h!==void 0?h:oe)!==null&&y!==void 0?y:!1,code:t.code?{...t.code,optimize:bt,regExp:Ve}:{optimize:bt,regExp:Ve},loopRequired:(b=t.loopRequired)!==null&&b!==void 0?b:M_,loopEnum:(x=t.loopEnum)!==null&&x!==void 0?x:M_,meta:(m=t.meta)!==null&&m!==void 0?m:!0,messages:(v=t.messages)!==null&&v!==void 0?v:!0,inlineRefs:(w=t.inlineRefs)!==null&&w!==void 0?w:!0,schemaId:(k=t.schemaId)!==null&&k!==void 0?k:"$id",addUsedSchema:(E=t.addUsedSchema)!==null&&E!==void 0?E:!0,validateSchema:(F=t.validateSchema)!==null&&F!==void 0?F:!0,validateFormats:(j=t.validateFormats)!==null&&j!==void 0?j:!0,unicodeRegExp:(me=t.unicodeRegExp)!==null&&me!==void 0?me:!0,int32range:(de=t.int32range)!==null&&de!==void 0?de:!0,uriResolver:ae}}var Ks=class{constructor(e={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...dN(e)};let{es5:n,lines:r}=this.opts.code;this.scope=new sN.ValueScope({scope:{},prefixes:lN,es5:n,lines:r}),this.logger=xN(e.logger);let o=e.validateFormats;e.validateFormats=!1,this.RULES=(0,iN.getRules)(),F_.call(this,uN,e,"NOT SUPPORTED"),F_.call(this,pN,e,"DEPRECATED","warn"),this._metaOpts=gN.call(this),e.formats&&mN.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&hN.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),fN.call(this),e.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:n,schemaId:r}=this.opts,o=D_;r==="id"&&(o={...D_},o.id=o.$id,delete o.$id),n&&e&&this.addMetaSchema(o,o[r],!1)}defaultMeta(){let{meta:e,schemaId:n}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[n]||e:void 0}validate(e,n){let r;if(typeof e=="string"){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);let o=r(n);return"$async"in r||(this.errors=r.errors),o}compile(e,n){let r=this._addSchema(e,n);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,n){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:r}=this.opts;return o.call(this,e,n);async function o(p,d){await i.call(this,p.$schema);let f=this._addSchema(p,d);return f.validate||s.call(this,f)}async function i(p){p&&!this.getSchema(p)&&await o.call(this,{$ref:p},!0)}async function s(p){try{return this._compileSchemaEnv(p)}catch(d){if(!(d instanceof q_.default))throw d;return a.call(this,d),await c.call(this,d.missingSchema),s.call(this,p)}}function a({missingSchema:p,missingRef:d}){if(this.refs[p])throw new Error(`AnySchema ${p} is loaded but ${d} cannot be resolved`)}async function c(p){let d=await l.call(this,p);this.refs[p]||await i.call(this,d.$schema),this.refs[p]||this.addSchema(d,p,n)}async function l(p){let d=this._loading[p];if(d)return d;try{return await(this._loading[p]=r(p))}finally{delete this._loading[p]}}}addSchema(e,n,r,o=this.opts.validateSchema){if(Array.isArray(e)){for(let s of e)this.addSchema(s,void 0,r,o);return this}let i;if(typeof e=="object"){let{schemaId:s}=this.opts;if(i=e[s],i!==void 0&&typeof i!="string")throw new Error(`schema ${s} must be string`)}return n=(0,Ws.normalizeId)(n||i),this._checkUnique(n),this.schemas[n]=this._addSchema(e,r,n,o,!0),this}addMetaSchema(e,n,r=this.opts.validateSchema){return this.addSchema(e,n,!0,r),this}validateSchema(e,n){if(typeof e=="boolean")return!0;let r;if(r=e.$schema,r!==void 0&&typeof r!="string")throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let o=this.validate(r,e);if(!o&&n){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return o}getSchema(e){let n;for(;typeof(n=U_.call(this,e))=="string";)e=n;if(n===void 0){let{schemaId:r}=this.opts,o=new Gs.SchemaEnv({schema:{},schemaId:r});if(n=Gs.resolveSchema.call(this,o,e),!n)return;this.refs[e]=n}return n.validate||this._compileSchemaEnv(n)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let n=U_.call(this,e);return typeof n=="object"&&this._cache.delete(n.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let n=e;this._cache.delete(n);let r=e[this.opts.schemaId];return r&&(r=(0,Ws.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let n of e)this.addKeyword(n);return this}addKeyword(e,n){let r;if(typeof e=="string")r=e,typeof n=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),n.keyword=r);else if(typeof e=="object"&&n===void 0){if(n=e,r=n.keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(bN.call(this,r,n),!n)return(0,nm.eachItem)(r,i=>tm.call(this,i)),this;wN.call(this,n);let o={...n,type:(0,ol.getJSONTypes)(n.type),schemaType:(0,ol.getJSONTypes)(n.schemaType)};return(0,nm.eachItem)(r,o.type.length===0?i=>tm.call(this,i,o):i=>o.type.forEach(s=>tm.call(this,i,o,s))),this}getKeyword(e){let n=this.RULES.all[e];return typeof n=="object"?n.definition:!!n}removeKeyword(e){let{RULES:n}=this;delete n.keywords[e],delete n.all[e];for(let r of n.rules){let o=r.rules.findIndex(i=>i.keyword===e);o>=0&&r.rules.splice(o,1)}return this}addFormat(e,n){return typeof n=="string"&&(n=new RegExp(n)),this.formats[e]=n,this}errorsText(e=this.errors,{separator:n=", ",dataVar:r="data"}={}){return!e||e.length===0?"No errors":e.map(o=>`${r}${o.instancePath} ${o.message}`).reduce((o,i)=>o+n+i)}$dataMetaSchema(e,n){let r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let o of n){let i=o.split("/").slice(1),s=e;for(let a of i)s=s[a];for(let a in r){let c=r[a];if(typeof c!="object")continue;let{$data:l}=c.definition,p=s[a];l&&p&&(s[a]=B_(p))}}return e}_removeAllSchemas(e,n){for(let r in e){let o=e[r];(!n||n.test(r))&&(typeof o=="string"?delete e[r]:o&&!o.meta&&(this._cache.delete(o.schema),delete e[r]))}}_addSchema(e,n,r,o=this.opts.validateSchema,i=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if(typeof e=="object")s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let c=this._cache.get(e);if(c!==void 0)return c;r=(0,Ws.normalizeId)(s||r);let l=Ws.getSchemaRefs.call(this,e,r);return c=new Gs.SchemaEnv({schema:e,schemaId:a,meta:n,baseId:r,localRefs:l}),this._cache.set(c.schema,c),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=c),o&&this.validateSchema(e,!0),c}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Gs.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let n=this.opts;this.opts=this._metaOpts;try{Gs.compileSchema.call(this,e)}finally{this.opts=n}}};Ks.ValidationError=oN.default;Ks.MissingRefError=q_.default;Ft.default=Ks;function F_(t,e,n,r="error"){for(let o in t){let i=o;i in e&&this.logger[r](`${n}: option ${o}. ${t[i]}`)}}function U_(t){return t=(0,Ws.normalizeId)(t),this.schemas[t]||this.refs[t]}function fN(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function mN(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function hN(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let n=t[e];n.keyword||(n.keyword=e),this.addKeyword(n)}}function gN(){let t={...this.opts};for(let e of cN)delete t[e];return t}var yN={log(){},warn(){},error(){}};function xN(t){if(t===!1)return yN;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var vN=/^[a-z_$][a-z0-9_$:-]*$/i;function bN(t,e){let{RULES:n}=this;if((0,nm.eachItem)(t,r=>{if(n.keywords[r])throw new Error(`Keyword ${r} is already defined`);if(!vN.test(r))throw new Error(`Keyword ${r} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function tm(t,e,n){var r;let o=e==null?void 0:e.post;if(n&&o)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,s=o?i.post:i.rules.find(({type:c})=>c===n);if(s||(s={type:n,rules:[]},i.rules.push(s)),i.keywords[t]=!0,!e)return;let a={keyword:t,definition:{...e,type:(0,ol.getJSONTypes)(e.type),schemaType:(0,ol.getJSONTypes)(e.schemaType)}};e.before?_N.call(this,s,a,e.before):s.rules.push(a),i.all[t]=a,(r=e.implements)===null||r===void 0||r.forEach(c=>this.addKeyword(c))}function _N(t,e,n){let r=t.rules.findIndex(o=>o.keyword===n);r>=0?t.rules.splice(r,0,e):(t.rules.push(e),this.logger.warn(`rule ${n} is not defined`))}function wN(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=B_(e)),t.validateSchema=this.compile(e,!0))}var SN={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function B_(t){return{anyOf:[t,SN]}}});var V_=$(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});var kN={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};rm.default=kN});var J_=$(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});Oo.callRef=Oo.getValidate=void 0;var TN=Hs(),G_=An(),fn=we(),Si=xr(),W_=Xc(),il=Me(),EN={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:n,it:r}=t,{baseId:o,schemaEnv:i,validateName:s,opts:a,self:c}=r,{root:l}=i;if((n==="#"||n==="#/")&&o===l.baseId)return d();let p=W_.resolveRef.call(c,l,o,n);if(p===void 0)throw new TN.default(r.opts.uriResolver,o,n);if(p instanceof W_.SchemaEnv)return f(p);return h(p);function d(){if(i===l)return sl(t,s,i,i.$async);let y=e.scopeValue("root",{ref:l});return sl(t,(0,fn._)`${y}.validate`,l,l.$async)}function f(y){let b=K_(t,y);sl(t,b,y,y.$async)}function h(y){let b=e.scopeValue("schema",a.code.source===!0?{ref:y,code:(0,fn.stringify)(y)}:{ref:y}),x=e.name("valid"),m=t.subschema({schema:y,dataTypes:[],schemaPath:fn.nil,topSchemaRef:b,errSchemaPath:n},x);t.mergeEvaluated(m),t.ok(x)}}};function K_(t,e){let{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):(0,fn._)`${n.scopeValue("wrapper",{ref:e})}.validate`}Oo.getValidate=K_;function sl(t,e,n,r){let{gen:o,it:i}=t,{allErrors:s,schemaEnv:a,opts:c}=i,l=c.passContext?Si.default.this:fn.nil;r?p():d();function p(){if(!a.$async)throw new Error("async schema referenced by sync schema");let y=o.let("valid");o.try(()=>{o.code((0,fn._)`await ${(0,G_.callValidateCode)(t,e,l)}`),h(e),s||o.assign(y,!0)},b=>{o.if((0,fn._)`!(${b} instanceof ${i.ValidationError})`,()=>o.throw(b)),f(b),s||o.assign(y,!1)}),t.ok(y)}function d(){t.result((0,G_.callValidateCode)(t,e,l),()=>h(e),()=>f(e))}function f(y){let b=(0,fn._)`${y}.errors`;o.assign(Si.default.vErrors,(0,fn._)`${Si.default.vErrors} === null ? ${b} : ${Si.default.vErrors}.concat(${b})`),o.assign(Si.default.errors,(0,fn._)`${Si.default.vErrors}.length`)}function h(y){var b;if(!i.opts.unevaluated)return;let x=(b=n==null?void 0:n.validate)===null||b===void 0?void 0:b.evaluated;if(i.props!==!0)if(x&&!x.dynamicProps)x.props!==void 0&&(i.props=il.mergeEvaluated.props(o,x.props,i.props));else{let m=o.var("props",(0,fn._)`${y}.evaluated.props`);i.props=il.mergeEvaluated.props(o,m,i.props,fn.Name)}if(i.items!==!0)if(x&&!x.dynamicItems)x.items!==void 0&&(i.items=il.mergeEvaluated.items(o,x.items,i.items));else{let m=o.var("items",(0,fn._)`${y}.evaluated.items`);i.items=il.mergeEvaluated.items(o,m,i.items,fn.Name)}}}Oo.callRef=sl;Oo.default=EN});var Y_=$(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var $N=V_(),RN=J_(),AN=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",$N.default,RN.default];om.default=AN});var X_=$(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var al=we(),Ur=al.operators,cl={maximum:{okStr:"<=",ok:Ur.LTE,fail:Ur.GT},minimum:{okStr:">=",ok:Ur.GTE,fail:Ur.LT},exclusiveMaximum:{okStr:"<",ok:Ur.LT,fail:Ur.GTE},exclusiveMinimum:{okStr:">",ok:Ur.GT,fail:Ur.LTE}},PN={message:({keyword:t,schemaCode:e})=>(0,al.str)`must be ${cl[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,al._)`{comparison: ${cl[t].okStr}, limit: ${e}}`},CN={keyword:Object.keys(cl),type:"number",schemaType:"number",$data:!0,error:PN,code(t){let{keyword:e,data:n,schemaCode:r}=t;t.fail$data((0,al._)`${n} ${cl[e].fail} ${r} || isNaN(${n})`)}};im.default=CN});var Q_=$(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});var Js=we(),IN={message:({schemaCode:t})=>(0,Js.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Js._)`{multipleOf: ${t}}`},ON={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:IN,code(t){let{gen:e,data:n,schemaCode:r,it:o}=t,i=o.opts.multipleOfPrecision,s=e.let("res"),a=i?(0,Js._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,Js._)`${s} !== parseInt(${s})`;t.fail$data((0,Js._)`(${r} === 0 || (${s} = ${n}/${r}, ${a}))`)}};sm.default=ON});var tw=$(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});function ew(t){let e=t.length,n=0,r=0,o;for(;r<e;)n++,o=t.charCodeAt(r++),o>=55296&&o<=56319&&r<e&&(o=t.charCodeAt(r),(o&64512)===56320&&r++);return n}am.default=ew;ew.code='require("ajv/dist/runtime/ucs2length").default'});var nw=$(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});var zo=we(),zN=Me(),NN=tw(),jN={message({keyword:t,schemaCode:e}){let n=t==="maxLength"?"more":"fewer";return(0,zo.str)`must NOT have ${n} than ${e} characters`},params:({schemaCode:t})=>(0,zo._)`{limit: ${t}}`},LN={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:jN,code(t){let{keyword:e,data:n,schemaCode:r,it:o}=t,i=e==="maxLength"?zo.operators.GT:zo.operators.LT,s=o.opts.unicode===!1?(0,zo._)`${n}.length`:(0,zo._)`${(0,zN.useFunc)(t.gen,NN.default)}(${n})`;t.fail$data((0,zo._)`${s} ${i} ${r}`)}};cm.default=LN});var rw=$(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});var DN=An(),MN=Me(),ki=we(),FN={message:({schemaCode:t})=>(0,ki.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,ki._)`{pattern: ${t}}`},UN={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:FN,code(t){let{gen:e,data:n,$data:r,schema:o,schemaCode:i,it:s}=t,a=s.opts.unicodeRegExp?"u":"";if(r){let{regExp:c}=s.opts.code,l=c.code==="new RegExp"?(0,ki._)`new RegExp`:(0,MN.useFunc)(e,c),p=e.let("valid");e.try(()=>e.assign(p,(0,ki._)`${l}(${i}, ${a}).test(${n})`),()=>e.assign(p,!1)),t.fail$data((0,ki._)`!${p}`)}else{let c=(0,DN.usePattern)(t,o);t.fail$data((0,ki._)`!${c}.test(${n})`)}}};lm.default=UN});var ow=$(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});var Ys=we(),qN={message({keyword:t,schemaCode:e}){let n=t==="maxProperties"?"more":"fewer";return(0,Ys.str)`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>(0,Ys._)`{limit: ${t}}`},ZN={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:qN,code(t){let{keyword:e,data:n,schemaCode:r}=t,o=e==="maxProperties"?Ys.operators.GT:Ys.operators.LT;t.fail$data((0,Ys._)`Object.keys(${n}).length ${o} ${r}`)}};um.default=ZN});var iw=$(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});var Xs=An(),Qs=we(),BN=Me(),HN={message:({params:{missingProperty:t}})=>(0,Qs.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Qs._)`{missingProperty: ${t}}`},VN={keyword:"required",type:"object",schemaType:"array",$data:!0,error:HN,code(t){let{gen:e,schema:n,schemaCode:r,data:o,$data:i,it:s}=t,{opts:a}=s;if(!i&&n.length===0)return;let c=n.length>=a.loopRequired;if(s.allErrors?l():p(),a.strictRequired){let h=t.parentSchema.properties,{definedProperties:y}=t.it;for(let b of n)if((h==null?void 0:h[b])===void 0&&!y.has(b)){let x=s.schemaEnv.baseId+s.errSchemaPath,m=`required property "${b}" is not defined at "${x}" (strictRequired)`;(0,BN.checkStrictMode)(s,m,s.opts.strictRequired)}}function l(){if(c||i)t.block$data(Qs.nil,d);else for(let h of n)(0,Xs.checkReportMissingProp)(t,h)}function p(){let h=e.let("missing");if(c||i){let y=e.let("valid",!0);t.block$data(y,()=>f(h,y)),t.ok(y)}else e.if((0,Xs.checkMissingProp)(t,n,h)),(0,Xs.reportMissingProp)(t,h),e.else()}function d(){e.forOf("prop",r,h=>{t.setParams({missingProperty:h}),e.if((0,Xs.noPropertyInData)(e,o,h,a.ownProperties),()=>t.error())})}function f(h,y){t.setParams({missingProperty:h}),e.forOf(h,r,()=>{e.assign(y,(0,Xs.propertyInData)(e,o,h,a.ownProperties)),e.if((0,Qs.not)(y),()=>{t.error(),e.break()})},Qs.nil)}}};pm.default=VN});var sw=$(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var ea=we(),GN={message({keyword:t,schemaCode:e}){let n=t==="maxItems"?"more":"fewer";return(0,ea.str)`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>(0,ea._)`{limit: ${t}}`},WN={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:GN,code(t){let{keyword:e,data:n,schemaCode:r}=t,o=e==="maxItems"?ea.operators.GT:ea.operators.LT;t.fail$data((0,ea._)`${n}.length ${o} ${r}`)}};dm.default=WN});var ll=$(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});var aw=jf();aw.code='require("ajv/dist/runtime/equal").default';fm.default=aw});var cw=$(hm=>{"use strict";Object.defineProperty(hm,"__esModule",{value:!0});var mm=Fs(),Ut=we(),KN=Me(),JN=ll(),YN={message:({params:{i:t,j:e}})=>(0,Ut.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Ut._)`{i: ${t}, j: ${e}}`},XN={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:YN,code(t){let{gen:e,data:n,$data:r,schema:o,parentSchema:i,schemaCode:s,it:a}=t;if(!r&&!o)return;let c=e.let("valid"),l=i.items?(0,mm.getSchemaTypes)(i.items):[];t.block$data(c,p,(0,Ut._)`${s} === false`),t.ok(c);function p(){let y=e.let("i",(0,Ut._)`${n}.length`),b=e.let("j");t.setParams({i:y,j:b}),e.assign(c,!0),e.if((0,Ut._)`${y} > 1`,()=>(d()?f:h)(y,b))}function d(){return l.length>0&&!l.some(y=>y==="object"||y==="array")}function f(y,b){let x=e.name("item"),m=(0,mm.checkDataTypes)(l,x,a.opts.strictNumbers,mm.DataType.Wrong),v=e.const("indices",(0,Ut._)`{}`);e.for((0,Ut._)`;${y}--;`,()=>{e.let(x,(0,Ut._)`${n}[${y}]`),e.if(m,(0,Ut._)`continue`),l.length>1&&e.if((0,Ut._)`typeof ${x} == "string"`,(0,Ut._)`${x} += "_"`),e.if((0,Ut._)`typeof ${v}[${x}] == "number"`,()=>{e.assign(b,(0,Ut._)`${v}[${x}]`),t.error(),e.assign(c,!1).break()}).code((0,Ut._)`${v}[${x}] = ${y}`)})}function h(y,b){let x=(0,KN.useFunc)(e,JN.default),m=e.name("outer");e.label(m).for((0,Ut._)`;${y}--;`,()=>e.for((0,Ut._)`${b} = ${y}; ${b}--;`,()=>e.if((0,Ut._)`${x}(${n}[${y}], ${n}[${b}])`,()=>{t.error(),e.assign(c,!1).break(m)})))}}};hm.default=XN});var lw=$(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});var gm=we(),QN=Me(),ej=ll(),tj={message:"must be equal to constant",params:({schemaCode:t})=>(0,gm._)`{allowedValue: ${t}}`},nj={keyword:"const",$data:!0,error:tj,code(t){let{gen:e,data:n,$data:r,schemaCode:o,schema:i}=t;r||i&&typeof i=="object"?t.fail$data((0,gm._)`!${(0,QN.useFunc)(e,ej.default)}(${n}, ${o})`):t.fail((0,gm._)`${i} !== ${n}`)}};ym.default=nj});var uw=$(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});var ta=we(),rj=Me(),oj=ll(),ij={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,ta._)`{allowedValues: ${t}}`},sj={keyword:"enum",schemaType:"array",$data:!0,error:ij,code(t){let{gen:e,data:n,$data:r,schema:o,schemaCode:i,it:s}=t;if(!r&&o.length===0)throw new Error("enum must have non-empty array");let a=o.length>=s.opts.loopEnum,c,l=()=>c??(c=(0,rj.useFunc)(e,oj.default)),p;if(a||r)p=e.let("valid"),t.block$data(p,d);else{if(!Array.isArray(o))throw new Error("ajv implementation error");let h=e.const("vSchema",i);p=(0,ta.or)(...o.map((y,b)=>f(h,b)))}t.pass(p);function d(){e.assign(p,!1),e.forOf("v",i,h=>e.if((0,ta._)`${l()}(${n}, ${h})`,()=>e.assign(p,!0).break()))}function f(h,y){let b=o[y];return typeof b=="object"&&b!==null?(0,ta._)`${l()}(${n}, ${h}[${y}])`:(0,ta._)`${n} === ${b}`}}};xm.default=sj});var pw=$(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});var aj=X_(),cj=Q_(),lj=nw(),uj=rw(),pj=ow(),dj=iw(),fj=sw(),mj=cw(),hj=lw(),gj=uw(),yj=[aj.default,cj.default,lj.default,uj.default,pj.default,dj.default,fj.default,mj.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},hj.default,gj.default];vm.default=yj});var _m=$(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.validateAdditionalItems=void 0;var No=we(),bm=Me(),xj={message:({params:{len:t}})=>(0,No.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,No._)`{limit: ${t}}`},vj={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:xj,code(t){let{parentSchema:e,it:n}=t,{items:r}=e;if(!Array.isArray(r)){(0,bm.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}dw(t,r)}};function dw(t,e){let{gen:n,schema:r,data:o,keyword:i,it:s}=t;s.items=!0;let a=n.const("len",(0,No._)`${o}.length`);if(r===!1)t.setParams({len:e.length}),t.pass((0,No._)`${a} <= ${e.length}`);else if(typeof r=="object"&&!(0,bm.alwaysValidSchema)(s,r)){let l=n.var("valid",(0,No._)`${a} <= ${e.length}`);n.if((0,No.not)(l),()=>c(l)),t.ok(l)}function c(l){n.forRange("i",e.length,a,p=>{t.subschema({keyword:i,dataProp:p,dataPropType:bm.Type.Num},l),s.allErrors||n.if((0,No.not)(l),()=>n.break())})}}na.validateAdditionalItems=dw;na.default=vj});var wm=$(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.validateTuple=void 0;var fw=we(),ul=Me(),bj=An(),_j={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:n}=t;if(Array.isArray(e))return mw(t,"additionalItems",e);n.items=!0,!(0,ul.alwaysValidSchema)(n,e)&&t.ok((0,bj.validateArray)(t))}};function mw(t,e,n=t.schema){let{gen:r,parentSchema:o,data:i,keyword:s,it:a}=t;p(o),a.opts.unevaluated&&n.length&&a.items!==!0&&(a.items=ul.mergeEvaluated.items(r,n.length,a.items));let c=r.name("valid"),l=r.const("len",(0,fw._)`${i}.length`);n.forEach((d,f)=>{(0,ul.alwaysValidSchema)(a,d)||(r.if((0,fw._)`${l} > ${f}`,()=>t.subschema({keyword:s,schemaProp:f,dataProp:f},c)),t.ok(c))});function p(d){let{opts:f,errSchemaPath:h}=a,y=n.length,b=y===d.minItems&&(y===d.maxItems||d[e]===!1);if(f.strictTuples&&!b){let x=`"${s}" is ${y}-tuple, but minItems or maxItems/${e} are not specified or different at path "${h}"`;(0,ul.checkStrictMode)(a,x,f.strictTuples)}}}ra.validateTuple=mw;ra.default=_j});var hw=$(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});var wj=wm(),Sj={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,wj.validateTuple)(t,"items")};Sm.default=Sj});var yw=$(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});var gw=we(),kj=Me(),Tj=An(),Ej=_m(),$j={message:({params:{len:t}})=>(0,gw.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,gw._)`{limit: ${t}}`},Rj={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:$j,code(t){let{schema:e,parentSchema:n,it:r}=t,{prefixItems:o}=n;r.items=!0,!(0,kj.alwaysValidSchema)(r,e)&&(o?(0,Ej.validateAdditionalItems)(t,o):t.ok((0,Tj.validateArray)(t)))}};km.default=Rj});var xw=$(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});var Cn=we(),pl=Me(),Aj={message:({params:{min:t,max:e}})=>e===void 0?(0,Cn.str)`must contain at least ${t} valid item(s)`:(0,Cn.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Cn._)`{minContains: ${t}}`:(0,Cn._)`{minContains: ${t}, maxContains: ${e}}`},Pj={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Aj,code(t){let{gen:e,schema:n,parentSchema:r,data:o,it:i}=t,s,a,{minContains:c,maxContains:l}=r;i.opts.next?(s=c===void 0?1:c,a=l):s=1;let p=e.const("len",(0,Cn._)`${o}.length`);if(t.setParams({min:s,max:a}),a===void 0&&s===0){(0,pl.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,pl.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,pl.alwaysValidSchema)(i,n)){let b=(0,Cn._)`${p} >= ${s}`;a!==void 0&&(b=(0,Cn._)`${b} && ${p} <= ${a}`),t.pass(b);return}i.items=!0;let d=e.name("valid");a===void 0&&s===1?h(d,()=>e.if(d,()=>e.break())):s===0?(e.let(d,!0),a!==void 0&&e.if((0,Cn._)`${o}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let b=e.name("_valid"),x=e.let("count",0);h(b,()=>e.if(b,()=>y(x)))}function h(b,x){e.forRange("i",0,p,m=>{t.subschema({keyword:"contains",dataProp:m,dataPropType:pl.Type.Num,compositeRule:!0},b),x()})}function y(b){e.code((0,Cn._)`${b}++`),a===void 0?e.if((0,Cn._)`${b} >= ${s}`,()=>e.assign(d,!0).break()):(e.if((0,Cn._)`${b} > ${a}`,()=>e.assign(d,!1).break()),s===1?e.assign(d,!0):e.if((0,Cn._)`${b} >= ${s}`,()=>e.assign(d,!0)))}}};Tm.default=Pj});var _w=$(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.validateSchemaDeps=tr.validatePropertyDeps=tr.error=void 0;var Em=we(),Cj=Me(),oa=An();tr.error={message:({params:{property:t,depsCount:e,deps:n}})=>{let r=e===1?"property":"properties";return(0,Em.str)`must have ${r} ${n} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:n,missingProperty:r}})=>(0,Em._)`{property: ${t},
|
|
7
7
|
missingProperty: ${r},
|
|
8
8
|
depsCount: ${e},
|
|
9
|
-
deps: ${n}}`};var yj={keyword:"dependencies",type:"object",schemaType:"object",error:Qn.error,code(t){let[e,n]=xj(t);uw(t,e),pw(t,n)}};function xj({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let o=Array.isArray(t[r])?e:n;o[r]=t[r]}return[e,n]}function uw(t,e=t.schema){let{gen:n,data:r,it:o}=t;if(Object.keys(e).length===0)return;let i=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let c=(0,ta.propertyInData)(n,r,s,o.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),o.allErrors?n.if(c,()=>{for(let l of a)(0,ta.checkReportMissingProp)(t,l)}):(n.if((0,_m._)`${c} && (${(0,ta.checkMissingProp)(t,a,i)})`),(0,ta.reportMissingProp)(t,i),n.else())}}Qn.validatePropertyDeps=uw;function pw(t,e=t.schema){let{gen:n,data:r,keyword:o,it:i}=t,s=n.name("valid");for(let a in e)(0,gj.alwaysValidSchema)(i,e[a])||(n.if((0,ta.propertyInData)(n,r,a,i.opts.ownProperties),()=>{let c=t.subschema({keyword:o,schemaProp:a},s);t.mergeValidEvaluated(c,s)},()=>n.var(s,!0)),t.ok(s))}Qn.validateSchemaDeps=pw;Qn.default=yj});var mw=$(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});var fw=we(),vj=Me(),bj={message:"property name must be valid",params:({params:t})=>(0,fw._)`{propertyName: ${t.propertyName}}`},_j={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:bj,code(t){let{gen:e,schema:n,data:r,it:o}=t;if((0,vj.alwaysValidSchema)(o,n))return;let i=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,fw.not)(i),()=>{t.error(!0),o.allErrors||e.break()})}),t.ok(i)}};wm.default=_j});var km=$(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});var al=Rn(),Un=we(),wj=gr(),cl=Me(),Sj={message:"must NOT have additional properties",params:({params:t})=>(0,Un._)`{additionalProperty: ${t.additionalProperty}}`},kj={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Sj,code(t){let{gen:e,schema:n,parentSchema:r,data:o,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,cl.alwaysValidSchema)(s,n))return;let l=(0,al.allSchemaProperties)(r.properties),p=(0,al.allSchemaProperties)(r.patternProperties);d(),t.ok((0,Un._)`${i} === ${wj.default.errors}`);function d(){e.forIn("key",o,x=>{!l.length&&!p.length?y(x):e.if(f(x),()=>y(x))})}function f(x){let m;if(l.length>8){let b=(0,cl.schemaRefOrVal)(s,r.properties,"properties");m=(0,al.isOwnProperty)(e,b,x)}else l.length?m=(0,Un.or)(...l.map(b=>(0,Un._)`${x} === ${b}`)):m=Un.nil;return p.length&&(m=(0,Un.or)(m,...p.map(b=>(0,Un._)`${(0,al.usePattern)(t,b)}.test(${x})`))),(0,Un.not)(m)}function h(x){e.code((0,Un._)`delete ${o}[${x}]`)}function y(x){if(c.removeAdditional==="all"||c.removeAdditional&&n===!1){h(x);return}if(n===!1){t.setParams({additionalProperty:x}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,cl.alwaysValidSchema)(s,n)){let m=e.name("valid");c.removeAdditional==="failing"?(v(x,m,!1),e.if((0,Un.not)(m),()=>{t.reset(),h(x)})):(v(x,m),a||e.if((0,Un.not)(m),()=>e.break()))}}function v(x,m,b){let w={keyword:"additionalProperties",dataProp:x,dataPropType:cl.Type.Str};b===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(w,m)}}};Sm.default=kj});var yw=$(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});var Tj=Us(),hw=Rn(),Tm=Me(),gw=km(),Ej={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:o,it:i}=t;i.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&gw.default.code(new Tj.KeywordCxt(i,gw.default,"additionalProperties"));let s=(0,hw.allSchemaProperties)(n);for(let d of s)i.definedProperties.add(d);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Tm.mergeEvaluated.props(e,(0,Tm.toHash)(s),i.props));let a=s.filter(d=>!(0,Tm.alwaysValidSchema)(i,n[d]));if(a.length===0)return;let c=e.name("valid");for(let d of a)l(d)?p(d):(e.if((0,hw.propertyInData)(e,o,d,i.opts.ownProperties)),p(d),i.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function l(d){return i.opts.useDefaults&&!i.compositeRule&&n[d].default!==void 0}function p(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};Em.default=Ej});var _w=$($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});var xw=Rn(),ll=we(),vw=Me(),bw=Me(),$j={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:o,it:i}=t,{opts:s}=i,a=(0,xw.allSchemaProperties)(n),c=a.filter(v=>(0,vw.alwaysValidSchema)(i,n[v]));if(a.length===0||c.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let l=s.strictSchema&&!s.allowMatchingProperties&&o.properties,p=e.name("valid");i.props!==!0&&!(i.props instanceof ll.Name)&&(i.props=(0,bw.evaluatedPropsToName)(e,i.props));let{props:d}=i;f();function f(){for(let v of a)l&&h(v),i.allErrors?y(v):(e.var(p,!0),y(v),e.if(p))}function h(v){for(let x in l)new RegExp(v).test(x)&&(0,vw.checkStrictMode)(i,`property ${x} matches pattern ${v} (use allowMatchingProperties)`)}function y(v){e.forIn("key",r,x=>{e.if((0,ll._)`${(0,xw.usePattern)(t,v)}.test(${x})`,()=>{let m=c.includes(v);m||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:x,dataPropType:bw.Type.Str},p),i.opts.unevaluated&&d!==!0?e.assign((0,ll._)`${d}[${x}]`,!0):!m&&!i.allErrors&&e.if((0,ll.not)(p),()=>e.break())})})}}};$m.default=$j});var ww=$(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});var Rj=Me(),Aj={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:n,it:r}=t;if((0,Rj.alwaysValidSchema)(r,n)){t.fail();return}let o=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),t.failResult(o,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Rm.default=Aj});var Sw=$(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});var Ij=Rn(),Cj={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ij.validateUnion,error:{message:"must match a schema in anyOf"}};Am.default=Cj});var kw=$(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});var ul=we(),Pj=Me(),Oj={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,ul._)`{passingSchemas: ${t.passing}}`},zj={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Oj,code(t){let{gen:e,schema:n,parentSchema:r,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(o.opts.discriminator&&r.discriminator)return;let i=n,s=e.let("valid",!1),a=e.let("passing",null),c=e.name("_valid");t.setParams({passing:a}),e.block(l),t.result(s,()=>t.reset(),()=>t.error(!0));function l(){i.forEach((p,d)=>{let f;(0,Pj.alwaysValidSchema)(o,p)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,ul._)`${c} && ${s}`).assign(s,!1).assign(a,(0,ul._)`[${a}, ${d}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,d),f&&t.mergeEvaluated(f,ul.Name)})})}}};Im.default=zj});var Tw=$(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});var Nj=Me(),jj={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:n,it:r}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");let o=e.name("valid");n.forEach((i,s)=>{if((0,Nj.alwaysValidSchema)(r,i))return;let a=t.subschema({keyword:"allOf",schemaProp:s},o);t.ok(o),t.mergeEvaluated(a)})}};Cm.default=jj});var Rw=$(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});var pl=we(),$w=Me(),Lj={message:({params:t})=>(0,pl.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,pl._)`{failingKeyword: ${t.ifClause}}`},Dj={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Lj,code(t){let{gen:e,parentSchema:n,it:r}=t;n.then===void 0&&n.else===void 0&&(0,$w.checkStrictMode)(r,'"if" without "then" and "else" is ignored');let o=Ew(r,"then"),i=Ew(r,"else");if(!o&&!i)return;let s=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),o&&i){let p=e.let("ifClause");t.setParams({ifClause:p}),e.if(a,l("then",p),l("else",p))}else o?e.if(a,l("then")):e.if((0,pl.not)(a),l("else"));t.pass(s,()=>t.error(!0));function c(){let p=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(p)}function l(p,d){return()=>{let f=t.subschema({keyword:p},a);e.assign(s,a),t.mergeValidEvaluated(f,s),d?e.assign(d,(0,pl._)`${p}`):t.setParams({ifClause:p})}}}};function Ew(t,e){let n=t.schema[e];return n!==void 0&&!(0,$w.alwaysValidSchema)(t,n)}Pm.default=Dj});var Aw=$(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});var Mj=Me(),Fj={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){e.if===void 0&&(0,Mj.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};Om.default=Fj});var Iw=$(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});var Uj=gm(),qj=sw(),Zj=ym(),Bj=cw(),Hj=lw(),Vj=dw(),Gj=mw(),Wj=km(),Kj=yw(),Jj=_w(),Yj=ww(),Xj=Sw(),Qj=kw(),eL=Tw(),tL=Rw(),nL=Aw();function rL(t=!1){let e=[Yj.default,Xj.default,Qj.default,eL.default,tL.default,nL.default,Gj.default,Wj.default,Vj.default,Kj.default,Jj.default];return t?e.push(qj.default,Bj.default):e.push(Uj.default,Zj.default),e.push(Hj.default),e}zm.default=rL});var Cw=$(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var wt=we(),oL={message:({schemaCode:t})=>(0,wt.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,wt._)`{format: ${t}}`},iL={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:oL,code(t,e){let{gen:n,data:r,$data:o,schema:i,schemaCode:s,it:a}=t,{opts:c,errSchemaPath:l,schemaEnv:p,self:d}=a;if(!c.validateFormats)return;o?f():h();function f(){let y=n.scopeValue("formats",{ref:d.formats,code:c.code.formats}),v=n.const("fDef",(0,wt._)`${y}[${s}]`),x=n.let("fType"),m=n.let("format");n.if((0,wt._)`typeof ${v} == "object" && !(${v} instanceof RegExp)`,()=>n.assign(x,(0,wt._)`${v}.type || "string"`).assign(m,(0,wt._)`${v}.validate`),()=>n.assign(x,(0,wt._)`"string"`).assign(m,v)),t.fail$data((0,wt.or)(b(),w()));function b(){return c.strictSchema===!1?wt.nil:(0,wt._)`${s} && !${m}`}function w(){let k=p.$async?(0,wt._)`(${v}.async ? await ${m}(${r}) : ${m}(${r}))`:(0,wt._)`${m}(${r})`,E=(0,wt._)`(typeof ${m} == "function" ? ${k} : ${m}.test(${r}))`;return(0,wt._)`${m} && ${m} !== true && ${x} === ${e} && !${E}`}}function h(){let y=d.formats[i];if(!y){b();return}if(y===!0)return;let[v,x,m]=w(y);v===e&&t.pass(k());function b(){if(c.strictSchema===!1){d.logger.warn(E());return}throw new Error(E());function E(){return`unknown format "${i}" ignored in schema at path "${l}"`}}function w(E){let F=E instanceof RegExp?(0,wt.regexpCode)(E):c.code.formats?(0,wt._)`${c.code.formats}${(0,wt.getProperty)(i)}`:void 0,j=n.scopeValue("formats",{key:i,ref:E,code:F});return typeof E=="object"&&!(E instanceof RegExp)?[E.type||"string",E.validate,(0,wt._)`${j}.validate`]:["string",E,j]}function k(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!p.$async)throw new Error("async format in sync schema");return(0,wt._)`await ${m}(${r})`}return typeof x=="function"?(0,wt._)`${m}(${r})`:(0,wt._)`${m}.test(${r})`}}}};Nm.default=iL});var Pw=$(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});var sL=Cw(),aL=[sL.default];jm.default=aL});var Ow=$(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.contentVocabulary=Si.metadataVocabulary=void 0;Si.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Si.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Nw=$(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});var cL=q_(),lL=nw(),uL=Iw(),pL=Pw(),zw=Ow(),dL=[cL.default,lL.default,(0,uL.default)(),pL.default,zw.metadataVocabulary,zw.contentVocabulary];Lm.default=dL});var Lw=$(dl=>{"use strict";Object.defineProperty(dl,"__esModule",{value:!0});dl.DiscrError=void 0;var jw;(function(t){t.Tag="tag",t.Mapping="mapping"})(jw||(dl.DiscrError=jw={}))});var Mw=$(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});var ki=we(),Dm=Lw(),Dw=Kc(),fL=qs(),mL=Me(),hL={message:({params:{discrError:t,tagName:e}})=>t===Dm.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:n}})=>(0,ki._)`{error: ${t}, tag: ${n}, tagValue: ${e}}`},gL={keyword:"discriminator",type:"object",schemaType:"object",error:hL,code(t){let{gen:e,data:n,schema:r,parentSchema:o,it:i}=t,{oneOf:s}=o;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=r.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),l=e.const("tag",(0,ki._)`${n}${(0,ki.getProperty)(a)}`);e.if((0,ki._)`typeof ${l} == "string"`,()=>p(),()=>t.error(!1,{discrError:Dm.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function p(){let h=f();e.if(!1);for(let y in h)e.elseIf((0,ki._)`${l} === ${y}`),e.assign(c,d(h[y]));e.else(),t.error(!1,{discrError:Dm.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function d(h){let y=e.name("valid"),v=t.subschema({keyword:"oneOf",schemaProp:h},y);return t.mergeEvaluated(v,ki.Name),y}function f(){var h;let y={},v=m(o),x=!0;for(let k=0;k<s.length;k++){let E=s[k];if(E!=null&&E.$ref&&!(0,mL.schemaHasRulesButRef)(E,i.self.RULES)){let j=E.$ref;if(E=Dw.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,j),E instanceof Dw.SchemaEnv&&(E=E.schema),E===void 0)throw new fL.default(i.opts.uriResolver,i.baseId,j)}let F=(h=E==null?void 0:E.properties)===null||h===void 0?void 0:h[a];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);x=x&&(v||m(E)),b(F,k)}if(!x)throw new Error(`discriminator: "${a}" must be required`);return y;function m({required:k}){return Array.isArray(k)&&k.includes(a)}function b(k,E){if(k.const)w(k.const,E);else if(k.enum)for(let F of k.enum)w(F,E);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function w(k,E){if(typeof k!="string"||k in y)throw new Error(`discriminator: "${a}" values must be unique strings`);y[k]=E}}}};Mm.default=gL});var Fw=$((MH,yL)=>{yL.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 Um=$((lt,Fm)=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.MissingRefError=lt.ValidationError=lt.CodeGen=lt.Name=lt.nil=lt.stringify=lt.str=lt._=lt.KeywordCxt=lt.Ajv=void 0;var xL=j_(),vL=Nw(),bL=Mw(),Uw=Fw(),_L=["/properties"],fl="http://json-schema.org/draft-07/schema",Ti=class extends xL.default{_addVocabularies(){super._addVocabularies(),vL.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(bL.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Uw,_L):Uw;this.addMetaSchema(e,fl,!1),this.refs["http://json-schema.org/schema"]=fl}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(fl)?fl:void 0)}};lt.Ajv=Ti;Fm.exports=lt=Ti;Fm.exports.Ajv=Ti;Object.defineProperty(lt,"__esModule",{value:!0});lt.default=Ti;var wL=Us();Object.defineProperty(lt,"KeywordCxt",{enumerable:!0,get:function(){return wL.KeywordCxt}});var Ei=we();Object.defineProperty(lt,"_",{enumerable:!0,get:function(){return Ei._}});Object.defineProperty(lt,"str",{enumerable:!0,get:function(){return Ei.str}});Object.defineProperty(lt,"stringify",{enumerable:!0,get:function(){return Ei.stringify}});Object.defineProperty(lt,"nil",{enumerable:!0,get:function(){return Ei.nil}});Object.defineProperty(lt,"Name",{enumerable:!0,get:function(){return Ei.Name}});Object.defineProperty(lt,"CodeGen",{enumerable:!0,get:function(){return Ei.CodeGen}});var SL=Gc();Object.defineProperty(lt,"ValidationError",{enumerable:!0,get:function(){return SL.default}});var kL=qs();Object.defineProperty(lt,"MissingRefError",{enumerable:!0,get:function(){return kL.default}})});var Kw=$(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.formatNames=tr.fastFormats=tr.fullFormats=void 0;function er(t,e){return{validate:t,compare:e}}tr.fullFormats={date:er(Hw,Hm),time:er(Zm(!0),Vm),"date-time":er(qw(!0),Gw),"iso-time":er(Zm(),Vw),"iso-date-time":er(qw(),Ww),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:IL,"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:LL,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:CL,int32:{type:"number",validate:zL},int64:{type:"number",validate:NL},float:{type:"number",validate:Bw},double:{type:"number",validate:Bw},password:!0,binary:!0};tr.fastFormats={...tr.fullFormats,date:er(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Hm),time:er(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Vm),"date-time":er(/^\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,Gw),"iso-time":er(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Vw),"iso-date-time":er(/^\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,Ww),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};tr.formatNames=Object.keys(tr.fullFormats);function TL(t){return t%4===0&&(t%100!==0||t%400===0)}var EL=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,$L=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Hw(t){let e=EL.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],o=+e[3];return r>=1&&r<=12&&o>=1&&o<=(r===2&&TL(n)?29:$L[r])}function Hm(t,e){if(t&&e)return t>e?1:t<e?-1:0}var qm=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Zm(t){return function(n){let r=qm.exec(n);if(!r)return!1;let o=+r[1],i=+r[2],s=+r[3],a=r[4],c=r[5]==="-"?-1:1,l=+(r[6]||0),p=+(r[7]||0);if(l>23||p>59||t&&!a)return!1;if(o<=23&&i<=59&&s<60)return!0;let d=i-p*c,f=o-l*c-(d<0?1:0);return(f===23||f===-1)&&(d===59||d===-1)&&s<61}}function Vm(t,e){if(!(t&&e))return;let n=new Date("2020-01-01T"+t).valueOf(),r=new Date("2020-01-01T"+e).valueOf();if(n&&r)return n-r}function Vw(t,e){if(!(t&&e))return;let n=qm.exec(t),r=qm.exec(e);if(n&&r)return t=n[1]+n[2]+n[3],e=r[1]+r[2]+r[3],t>e?1:t<e?-1:0}var Bm=/t|\s/i;function qw(t){let e=Zm(t);return function(r){let o=r.split(Bm);return o.length===2&&Hw(o[0])&&e(o[1])}}function Gw(t,e){if(!(t&&e))return;let n=new Date(t).valueOf(),r=new Date(e).valueOf();if(n&&r)return n-r}function Ww(t,e){if(!(t&&e))return;let[n,r]=t.split(Bm),[o,i]=e.split(Bm),s=Hm(n,o);if(s!==void 0)return s||Vm(r,i)}var RL=/\/|:/,AL=/^(?:[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 IL(t){return RL.test(t)&&AL.test(t)}var Zw=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function CL(t){return Zw.lastIndex=0,Zw.test(t)}var PL=-(2**31),OL=2**31-1;function zL(t){return Number.isInteger(t)&&t<=OL&&t>=PL}function NL(t){return Number.isInteger(t)}function Bw(){return!0}var jL=/[^\\]\\Z/;function LL(t){if(jL.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var Jw=$($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.formatLimitDefinition=void 0;var DL=Um(),qn=we(),Mr=qn.operators,ml={formatMaximum:{okStr:"<=",ok:Mr.LTE,fail:Mr.GT},formatMinimum:{okStr:">=",ok:Mr.GTE,fail:Mr.LT},formatExclusiveMaximum:{okStr:"<",ok:Mr.LT,fail:Mr.GTE},formatExclusiveMinimum:{okStr:">",ok:Mr.GT,fail:Mr.LTE}},ML={message:({keyword:t,schemaCode:e})=>(0,qn.str)`should be ${ml[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,qn._)`{comparison: ${ml[t].okStr}, limit: ${e}}`};$i.formatLimitDefinition={keyword:Object.keys(ml),type:"string",schemaType:"string",$data:!0,error:ML,code(t){let{gen:e,data:n,schemaCode:r,keyword:o,it:i}=t,{opts:s,self:a}=i;if(!s.validateFormats)return;let c=new DL.KeywordCxt(i,a.RULES.all.format.definition,"format");c.$data?l():p();function l(){let f=e.scopeValue("formats",{ref:a.formats,code:s.code.formats}),h=e.const("fmt",(0,qn._)`${f}[${c.schemaCode}]`);t.fail$data((0,qn.or)((0,qn._)`typeof ${h} != "object"`,(0,qn._)`${h} instanceof RegExp`,(0,qn._)`typeof ${h}.compare != "function"`,d(h)))}function p(){let f=c.schema,h=a.formats[f];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${o}": format "${f}" does not define "compare" function`);let y=e.scopeValue("formats",{key:f,ref:h,code:s.code.formats?(0,qn._)`${s.code.formats}${(0,qn.getProperty)(f)}`:void 0});t.fail$data(d(y))}function d(f){return(0,qn._)`${f}.compare(${n}, ${r}) ${ml[o].fail} 0`}},dependencies:["format"]};var FL=t=>(t.addKeyword($i.formatLimitDefinition),t);$i.default=FL});var e0=$((na,Qw)=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});var Ri=Kw(),UL=Jw(),Gm=we(),Yw=new Gm.Name("fullFormats"),qL=new Gm.Name("fastFormats"),Wm=(t,e={keywords:!0})=>{if(Array.isArray(e))return Xw(t,e,Ri.fullFormats,Yw),t;let[n,r]=e.mode==="fast"?[Ri.fastFormats,qL]:[Ri.fullFormats,Yw],o=e.formats||Ri.formatNames;return Xw(t,o,n,r),e.keywords&&(0,UL.default)(t),t};Wm.get=(t,e="full")=>{let r=(e==="fast"?Ri.fastFormats:Ri.fullFormats)[t];if(!r)throw new Error(`Unknown format "${t}"`);return r};function Xw(t,e,n,r){var o,i;(o=(i=t.opts.code).formats)!==null&&o!==void 0||(i.formats=(0,Gm._)`require("ajv-formats/dist/formats").${r}`);for(let s of e)t.addFormat(s,n[s])}Qw.exports=na=Wm;Object.defineProperty(na,"__esModule",{value:!0});na.default=Wm});var R0=$((NV,$0)=>{var E0=require("stream").Stream,XD=require("util");$0.exports=Bn;function Bn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}XD.inherits(Bn,E0);Bn.create=function(t,e){var n=new this;e=e||{};for(var r in e)n[r]=e[r];n.source=t;var o=t.emit;return t.emit=function(){return n._handleEmit(arguments),o.apply(t,arguments)},t.on("error",function(){}),n.pauseStream&&t.pause(),n};Object.defineProperty(Bn.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Bn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Bn.prototype.resume=function(){this._released||this.release(),this.source.resume()};Bn.prototype.pause=function(){this.source.pause()};Bn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};Bn.prototype.pipe=function(){var t=E0.prototype.pipe.apply(this,arguments);return this.resume(),t};Bn.prototype._handleEmit=function(t){if(this._released){this.emit.apply(this,t);return}t[0]==="data"&&(this.dataSize+=t[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(t)};Bn.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(t))}}});var P0=$((jV,C0)=>{var QD=require("util"),I0=require("stream").Stream,A0=R0();C0.exports=_t;function _t(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}QD.inherits(_t,I0);_t.create=function(t){var e=new this;t=t||{};for(var n in t)e[n]=t[n];return e};_t.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};_t.prototype.append=function(t){var e=_t.isStreamLike(t);if(e){if(!(t instanceof A0)){var n=A0.create(t,{maxDataSize:1/0,pauseStream:this.pauseStreams});t.on("data",this._checkDataSize.bind(this)),t=n}this._handleErrors(t),this.pauseStreams&&t.pause()}return this._streams.push(t),this};_t.prototype.pipe=function(t,e){return I0.prototype.pipe.call(this,t,e),this.resume(),t};_t.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};_t.prototype._realGetNext=function(){var t=this._streams.shift();if(typeof t>"u"){this.end();return}if(typeof t!="function"){this._pipeNext(t);return}var e=t;e(function(n){var r=_t.isStreamLike(n);r&&(n.on("data",this._checkDataSize.bind(this)),this._handleErrors(n)),this._pipeNext(n)}.bind(this))};_t.prototype._pipeNext=function(t){this._currentStream=t;var e=_t.isStreamLike(t);if(e){t.on("end",this._getNext.bind(this)),t.pipe(this,{end:!1});return}var n=t;this.write(n),this._getNext()};_t.prototype._handleErrors=function(t){var e=this;t.on("error",function(n){e._emitError(n)})};_t.prototype.write=function(t){this.emit("data",t)};_t.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};_t.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};_t.prototype.end=function(){this._reset(),this.emit("end")};_t.prototype.destroy=function(){this._reset(),this.emit("close")};_t.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};_t.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};_t.prototype._updateDataSize=function(){this.dataSize=0;var t=this;this._streams.forEach(function(e){e.dataSize&&(t.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};_t.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var O0=$((LV,eM)=>{eM.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var N0=$((DV,z0)=>{z0.exports=O0()});var D0=$(fn=>{"use strict";var El=N0(),tM=require("path").extname,j0=/^\s*([^;\s]*)(?:;|\s|$)/,nM=/^text\//i;fn.charset=L0;fn.charsets={lookup:L0};fn.contentType=rM;fn.extension=oM;fn.extensions=Object.create(null);fn.lookup=iM;fn.types=Object.create(null);sM(fn.extensions,fn.types);function L0(t){if(!t||typeof t!="string")return!1;var e=j0.exec(t),n=e&&El[e[1].toLowerCase()];return n&&n.charset?n.charset:e&&nM.test(e[1])?"UTF-8":!1}function rM(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?fn.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var n=fn.charset(e);n&&(e+="; charset="+n.toLowerCase())}return e}function oM(t){if(!t||typeof t!="string")return!1;var e=j0.exec(t),n=e&&fn.extensions[e[1].toLowerCase()];return!n||!n.length?!1:n[0]}function iM(t){if(!t||typeof t!="string")return!1;var e=tM("x."+t).toLowerCase().substr(1);return e&&fn.types[e]||!1}function sM(t,e){var n=["nginx","apache",void 0,"iana"];Object.keys(El).forEach(function(o){var i=El[o],s=i.extensions;if(!(!s||!s.length)){t[o]=s;for(var a=0;a<s.length;a++){var c=s[a];if(e[c]){var l=n.indexOf(El[e[c]].source),p=n.indexOf(i.source);if(e[c]!=="application/octet-stream"&&(l>p||l===p&&e[c].substr(0,12)==="application/"))continue}e[c]=o}}})}});var F0=$((FV,M0)=>{M0.exports=aM;function aM(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}});var rh=$((UV,q0)=>{var U0=F0();q0.exports=cM;function cM(t){var e=!1;return U0(function(){e=!0}),function(r,o){e?t(r,o):U0(function(){t(r,o)})}}});var oh=$((qV,Z0)=>{Z0.exports=lM;function lM(t){Object.keys(t.jobs).forEach(uM.bind(t)),t.jobs={}}function uM(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}});var ih=$((ZV,H0)=>{var B0=rh(),pM=oh();H0.exports=dM;function dM(t,e,n,r){var o=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[o]=fM(e,o,t[o],function(i,s){o in n.jobs&&(delete n.jobs[o],i?pM(n):n.results[o]=s,r(i,n.results))})}function fM(t,e,n,r){var o;return t.length==2?o=t(n,B0(r)):o=t(n,e,B0(r)),o}});var sh=$((BV,V0)=>{V0.exports=mM;function mM(t,e){var n=!Array.isArray(t),r={index:0,keyedList:n||e?Object.keys(t):null,jobs:{},results:n?{}:[],size:n?Object.keys(t).length:t.length};return e&&r.keyedList.sort(n?e:function(o,i){return e(t[o],t[i])}),r}});var ah=$((HV,G0)=>{var hM=oh(),gM=rh();G0.exports=yM;function yM(t){Object.keys(this.jobs).length&&(this.index=this.size,hM(this),gM(t)(null,this.results))}});var K0=$((VV,W0)=>{var xM=ih(),vM=sh(),bM=ah();W0.exports=_M;function _M(t,e,n){for(var r=vM(t);r.index<(r.keyedList||t).length;)xM(t,e,r,function(o,i){if(o){n(o,i);return}if(Object.keys(r.jobs).length===0){n(null,r.results);return}}),r.index++;return bM.bind(r,n)}});var ch=$((GV,$l)=>{var J0=ih(),wM=sh(),SM=ah();$l.exports=kM;$l.exports.ascending=Y0;$l.exports.descending=TM;function kM(t,e,n,r){var o=wM(t,n);return J0(t,e,o,function i(s,a){if(s){r(s,a);return}if(o.index++,o.index<(o.keyedList||t).length){J0(t,e,o,i);return}r(null,o.results)}),SM.bind(o,r)}function Y0(t,e){return t<e?-1:t>e?1:0}function TM(t,e){return-1*Y0(t,e)}});var Q0=$((WV,X0)=>{var EM=ch();X0.exports=$M;function $M(t,e,n){return EM(t,e,null,n)}});var tS=$((KV,eS)=>{eS.exports={parallel:K0(),serial:Q0(),serialOrdered:ch()}});var lh=$((JV,nS)=>{"use strict";nS.exports=Object});var oS=$((YV,rS)=>{"use strict";rS.exports=Error});var sS=$((XV,iS)=>{"use strict";iS.exports=EvalError});var cS=$((QV,aS)=>{"use strict";aS.exports=RangeError});var uS=$((e5,lS)=>{"use strict";lS.exports=ReferenceError});var dS=$((t5,pS)=>{"use strict";pS.exports=SyntaxError});var Rl=$((n5,fS)=>{"use strict";fS.exports=TypeError});var hS=$((r5,mS)=>{"use strict";mS.exports=URIError});var yS=$((o5,gS)=>{"use strict";gS.exports=Math.abs});var vS=$((i5,xS)=>{"use strict";xS.exports=Math.floor});var _S=$((s5,bS)=>{"use strict";bS.exports=Math.max});var SS=$((a5,wS)=>{"use strict";wS.exports=Math.min});var TS=$((c5,kS)=>{"use strict";kS.exports=Math.pow});var $S=$((l5,ES)=>{"use strict";ES.exports=Math.round});var AS=$((u5,RS)=>{"use strict";RS.exports=Number.isNaN||function(e){return e!==e}});var CS=$((p5,IS)=>{"use strict";var RM=AS();IS.exports=function(e){return RM(e)||e===0?e:e<0?-1:1}});var OS=$((d5,PS)=>{"use strict";PS.exports=Object.getOwnPropertyDescriptor});var uh=$((f5,zS)=>{"use strict";var Al=OS();if(Al)try{Al([],"length")}catch{Al=null}zS.exports=Al});var jS=$((m5,NS)=>{"use strict";var Il=Object.defineProperty||!1;if(Il)try{Il({},"a",{value:1})}catch{Il=!1}NS.exports=Il});var ph=$((h5,LS)=>{"use strict";LS.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;e[n]=o;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0}});var FS=$((g5,MS)=>{"use strict";var DS=typeof Symbol<"u"&&Symbol,AM=ph();MS.exports=function(){return typeof DS!="function"||typeof Symbol!="function"||typeof DS("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:AM()}});var dh=$((y5,US)=>{"use strict";US.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var fh=$((x5,qS)=>{"use strict";var IM=lh();qS.exports=IM.getPrototypeOf||null});var HS=$((v5,BS)=>{"use strict";var CM="Function.prototype.bind called on incompatible ",PM=Object.prototype.toString,OM=Math.max,zM="[object Function]",ZS=function(e,n){for(var r=[],o=0;o<e.length;o+=1)r[o]=e[o];for(var i=0;i<n.length;i+=1)r[i+e.length]=n[i];return r},NM=function(e,n){for(var r=[],o=n||0,i=0;o<e.length;o+=1,i+=1)r[i]=e[o];return r},jM=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};BS.exports=function(e){var n=this;if(typeof n!="function"||PM.apply(n)!==zM)throw new TypeError(CM+n);for(var r=NM(arguments,1),o,i=function(){if(this instanceof o){var p=n.apply(this,ZS(r,arguments));return Object(p)===p?p:this}return n.apply(e,ZS(r,arguments))},s=OM(0,n.length-r.length),a=[],c=0;c<s;c++)a[c]="$"+c;if(o=Function("binder","return function ("+jM(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var l=function(){};l.prototype=n.prototype,o.prototype=new l,l.prototype=null}return o}});var la=$((b5,VS)=>{"use strict";var LM=HS();VS.exports=Function.prototype.bind||LM});var Cl=$((_5,GS)=>{"use strict";GS.exports=Function.prototype.call});var mh=$((w5,WS)=>{"use strict";WS.exports=Function.prototype.apply});var JS=$((S5,KS)=>{"use strict";KS.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var XS=$((k5,YS)=>{"use strict";var DM=la(),MM=mh(),FM=Cl(),UM=JS();YS.exports=UM||DM.call(FM,MM)});var ek=$((T5,QS)=>{"use strict";var qM=la(),ZM=Rl(),BM=Cl(),HM=XS();QS.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new ZM("a function is required");return HM(qM,BM,e)}});var sk=$((E5,ik)=>{"use strict";var VM=ek(),tk=uh(),rk;try{rk=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var hh=!!rk&&tk&&tk(Object.prototype,"__proto__"),ok=Object,nk=ok.getPrototypeOf;ik.exports=hh&&typeof hh.get=="function"?VM([hh.get]):typeof nk=="function"?function(e){return nk(e==null?e:ok(e))}:!1});var pk=$(($5,uk)=>{"use strict";var ak=dh(),ck=fh(),lk=sk();uk.exports=ak?function(e){return ak(e)}:ck?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return ck(e)}:lk?function(e){return lk(e)}:null});var Pl=$((R5,dk)=>{"use strict";var GM=Function.prototype.call,WM=Object.prototype.hasOwnProperty,KM=la();dk.exports=KM.call(GM,WM)});var vk=$((A5,xk)=>{"use strict";var Ie,JM=lh(),YM=oS(),XM=sS(),QM=cS(),e2=uS(),Di=dS(),Li=Rl(),t2=hS(),n2=yS(),r2=vS(),o2=_S(),i2=SS(),s2=TS(),a2=$S(),c2=CS(),gk=Function,gh=function(t){try{return gk('"use strict"; return ('+t+").constructor;")()}catch{}},ua=uh(),l2=jS(),yh=function(){throw new Li},u2=ua?(function(){try{return arguments.callee,yh}catch{try{return ua(arguments,"callee").get}catch{return yh}}})():yh,Ni=FS()(),Ct=pk(),p2=fh(),d2=dh(),yk=mh(),pa=Cl(),ji={},f2=typeof Uint8Array>"u"||!Ct?Ie:Ct(Uint8Array),jo={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ie:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ie:ArrayBuffer,"%ArrayIteratorPrototype%":Ni&&Ct?Ct([][Symbol.iterator]()):Ie,"%AsyncFromSyncIteratorPrototype%":Ie,"%AsyncFunction%":ji,"%AsyncGenerator%":ji,"%AsyncGeneratorFunction%":ji,"%AsyncIteratorPrototype%":ji,"%Atomics%":typeof Atomics>"u"?Ie:Atomics,"%BigInt%":typeof BigInt>"u"?Ie:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ie:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ie:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ie:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":YM,"%eval%":eval,"%EvalError%":XM,"%Float16Array%":typeof Float16Array>"u"?Ie:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Ie:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ie:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ie:FinalizationRegistry,"%Function%":gk,"%GeneratorFunction%":ji,"%Int8Array%":typeof Int8Array>"u"?Ie:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ie:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ie:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ni&&Ct?Ct(Ct([][Symbol.iterator]())):Ie,"%JSON%":typeof JSON=="object"?JSON:Ie,"%Map%":typeof Map>"u"?Ie:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ni||!Ct?Ie:Ct(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":JM,"%Object.getOwnPropertyDescriptor%":ua,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ie:Promise,"%Proxy%":typeof Proxy>"u"?Ie:Proxy,"%RangeError%":QM,"%ReferenceError%":e2,"%Reflect%":typeof Reflect>"u"?Ie:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ie:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ni||!Ct?Ie:Ct(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ie:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ni&&Ct?Ct(""[Symbol.iterator]()):Ie,"%Symbol%":Ni?Symbol:Ie,"%SyntaxError%":Di,"%ThrowTypeError%":u2,"%TypedArray%":f2,"%TypeError%":Li,"%Uint8Array%":typeof Uint8Array>"u"?Ie:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ie:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ie:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ie:Uint32Array,"%URIError%":t2,"%WeakMap%":typeof WeakMap>"u"?Ie:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ie:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ie:WeakSet,"%Function.prototype.call%":pa,"%Function.prototype.apply%":yk,"%Object.defineProperty%":l2,"%Object.getPrototypeOf%":p2,"%Math.abs%":n2,"%Math.floor%":r2,"%Math.max%":o2,"%Math.min%":i2,"%Math.pow%":s2,"%Math.round%":a2,"%Math.sign%":c2,"%Reflect.getPrototypeOf%":d2};if(Ct)try{null.error}catch(t){fk=Ct(Ct(t)),jo["%Error.prototype%"]=fk}var fk,m2=function t(e){var n;if(e==="%AsyncFunction%")n=gh("async function () {}");else if(e==="%GeneratorFunction%")n=gh("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=gh("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&Ct&&(n=Ct(o.prototype))}return jo[e]=n,n},mk={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},da=la(),Ol=Pl(),h2=da.call(pa,Array.prototype.concat),g2=da.call(yk,Array.prototype.splice),hk=da.call(pa,String.prototype.replace),zl=da.call(pa,String.prototype.slice),y2=da.call(pa,RegExp.prototype.exec),x2=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,v2=/\\(\\)?/g,b2=function(e){var n=zl(e,0,1),r=zl(e,-1);if(n==="%"&&r!=="%")throw new Di("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Di("invalid intrinsic syntax, expected opening `%`");var o=[];return hk(e,x2,function(i,s,a,c){o[o.length]=a?hk(c,v2,"$1"):s||i}),o},_2=function(e,n){var r=e,o;if(Ol(mk,r)&&(o=mk[r],r="%"+o[0]+"%"),Ol(jo,r)){var i=jo[r];if(i===ji&&(i=m2(r)),typeof i>"u"&&!n)throw new Li("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Di("intrinsic "+e+" does not exist!")};xk.exports=function(e,n){if(typeof e!="string"||e.length===0)throw new Li("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Li('"allowMissing" argument must be a boolean');if(y2(/^%?[^%]*%?$/,e)===null)throw new Di("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=b2(e),o=r.length>0?r[0]:"",i=_2("%"+o+"%",n),s=i.name,a=i.value,c=!1,l=i.alias;l&&(o=l[0],g2(r,h2([0,1],l)));for(var p=1,d=!0;p<r.length;p+=1){var f=r[p],h=zl(f,0,1),y=zl(f,-1);if((h==='"'||h==="'"||h==="`"||y==='"'||y==="'"||y==="`")&&h!==y)throw new Di("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(c=!0),o+="."+f,s="%"+o+"%",Ol(jo,s))a=jo[s];else if(a!=null){if(!(f in a)){if(!n)throw new Li("base intrinsic for "+e+" exists, but the property is not available.");return}if(ua&&p+1>=r.length){var v=ua(a,f);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?a=v.get:a=a[f]}else d=Ol(a,f),a=a[f];d&&!c&&(jo[s]=a)}}return a}});var _k=$((I5,bk)=>{"use strict";var w2=ph();bk.exports=function(){return w2()&&!!Symbol.toStringTag}});var kk=$((C5,Sk)=>{"use strict";var S2=vk(),wk=S2("%Object.defineProperty%",!0),k2=_k()(),T2=Pl(),E2=Rl(),Nl=k2?Symbol.toStringTag:null;Sk.exports=function(e,n){var r=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof r<"u"&&typeof r!="boolean"||typeof o<"u"&&typeof o!="boolean")throw new E2("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Nl&&(r||!T2(e,Nl))&&(wk?wk(e,Nl,{configurable:!o,enumerable:!1,value:n,writable:!1}):e[Nl]=n)}});var Ek=$((P5,Tk)=>{"use strict";Tk.exports=function(t,e){return Object.keys(e).forEach(function(n){t[n]=t[n]||e[n]}),t}});var Ak=$((O5,Rk)=>{"use strict";var _h=P0(),$2=require("util"),xh=require("path"),R2=require("http"),A2=require("https"),I2=require("url").parse,C2=require("fs"),P2=require("stream").Stream,O2=require("crypto"),vh=D0(),z2=tS(),N2=kk(),Ur=Pl(),bh=Ek();function $k(t){return String(t).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function Ue(t){if(!(this instanceof Ue))return new Ue(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],_h.call(this),t=t||{};for(var e in t)this[e]=t[e]}$2.inherits(Ue,_h);Ue.LINE_BREAK=`\r
|
|
10
|
-
`;Ue.DEFAULT_CONTENT_TYPE="application/octet-stream";Ue.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=_h.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(t,e,n),i=this._multiPartFooter();r(o),r(e),r(i),this._trackLength(o,e,n)};Ue.prototype._trackLength=function(t,e,n){var r=0;n.knownLength!=null?r+=Number(n.knownLength):Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+Ue.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&Ur(e,"httpVersion"))&&!(e instanceof P2))&&(n.knownLength||this._valuesToMeasure.push(e))};Ue.prototype._lengthRetriever=function(t,e){Ur(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):C2.stat(t.path,function(n,r){if(n){e(n);return}var o=r.size-(t.start?t.start:0);e(null,o)}):Ur(t,"httpVersion")?e(null,Number(t.headers["content-length"])):Ur(t,"httpModule")?(t.on("response",function(n){t.pause(),e(null,Number(n.headers["content-length"]))}),t.resume()):e("Unknown stream")};Ue.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(e,n),o=this._getContentType(e,n),i="",s={"Content-Disposition":["form-data",'name="'+$k(t)+'"'].concat(r||[]),"Content-Type":[].concat(o||[])};typeof n.header=="object"&&bh(s,n.header);var a;for(var c in s)if(Ur(s,c)){if(a=s[c],a==null)continue;Array.isArray(a)||(a=[a]),a.length&&(i+=c+": "+a.join("; ")+Ue.LINE_BREAK)}return"--"+this.getBoundary()+Ue.LINE_BREAK+i+Ue.LINE_BREAK};Ue.prototype._getContentDisposition=function(t,e){var n;if(typeof e.filepath=="string"?n=xh.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?n=xh.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&Ur(t,"httpVersion")&&(n=xh.basename(t.client._httpMessage.path||"")),n)return'filename="'+$k(n)+'"'};Ue.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t&&t.name&&(n=vh.lookup(t.name)),!n&&t&&t.path&&(n=vh.lookup(t.path)),!n&&t&&t.readable&&Ur(t,"httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=vh.lookup(e.filepath||e.filename)),!n&&t&&typeof t=="object"&&(n=Ue.DEFAULT_CONTENT_TYPE),n};Ue.prototype._multiPartFooter=function(){return function(t){var e=Ue.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};Ue.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Ue.LINE_BREAK};Ue.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)Ur(t,e)&&(n[e.toLowerCase()]=t[e]);return n};Ue.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};Ue.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Ue.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?t=Buffer.concat([t,this._streams[n]]):t=Buffer.concat([t,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(Ue.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};Ue.prototype._generateBoundary=function(){this._boundary="--------------------------"+O2.randomBytes(12).toString("hex")};Ue.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};Ue.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};Ue.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}z2.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){t(n);return}r.forEach(function(o){e+=o}),t(null,e)})};Ue.prototype.submit=function(t,e){var n,r,o={method:"post"};return typeof t=="string"?(t=I2(t),r=bh({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},o)):(r=bh(t,o),r.port||(r.port=r.protocol==="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol==="https:"?n=A2.request(r):n=R2.request(r),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&n.setHeader("Content-Length",s),this.pipe(n),e){var a,c=function(l,p){return n.removeListener("error",c),n.removeListener("response",a),e.call(this,l,p)};a=c.bind(this,null),n.on("error",c),n.on("response",a)}}.bind(this)),n};Ue.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))};Ue.prototype.toString=function(){return"[object FormData]"};N2(Ue.prototype,"FormData");Rk.exports=Ue});var Gk=$((CG,Vk)=>{var Ui=1e3,qi=Ui*60,Zi=qi*60,Mo=Zi*24,tF=Mo*7,nF=Mo*365.25;Vk.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return rF(t);if(n==="number"&&isFinite(t))return e.long?iF(t):oF(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function rF(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*nF;case"weeks":case"week":case"w":return n*tF;case"days":case"day":case"d":return n*Mo;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Zi;case"minutes":case"minute":case"mins":case"min":case"m":return n*qi;case"seconds":case"second":case"secs":case"sec":case"s":return n*Ui;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function oF(t){var e=Math.abs(t);return e>=Mo?Math.round(t/Mo)+"d":e>=Zi?Math.round(t/Zi)+"h":e>=qi?Math.round(t/qi)+"m":e>=Ui?Math.round(t/Ui)+"s":t+"ms"}function iF(t){var e=Math.abs(t);return e>=Mo?Dl(t,e,Mo,"day"):e>=Zi?Dl(t,e,Zi,"hour"):e>=qi?Dl(t,e,qi,"minute"):e>=Ui?Dl(t,e,Ui,"second"):t+" ms"}function Dl(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}});var Lh=$((PG,Wk)=>{function sF(t){n.debug=n,n.default=n,n.coerce=c,n.disable=s,n.enable=o,n.enabled=a,n.humanize=Gk(),n.destroy=l,Object.keys(t).forEach(p=>{n[p]=t[p]}),n.names=[],n.skips=[],n.formatters={};function e(p){let d=0;for(let f=0;f<p.length;f++)d=(d<<5)-d+p.charCodeAt(f),d|=0;return n.colors[Math.abs(d)%n.colors.length]}n.selectColor=e;function n(p){let d,f=null,h,y;function v(...x){if(!v.enabled)return;let m=v,b=Number(new Date),w=b-(d||b);m.diff=w,m.prev=d,m.curr=b,d=b,x[0]=n.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let k=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(F,j)=>{if(F==="%%")return"%";k++;let me=n.formatters[j];if(typeof me=="function"){let de=x[k];F=me.call(m,de),x.splice(k,1),k--}return F}),n.formatArgs.call(m,x),(m.log||n.log).apply(m,x)}return v.namespace=p,v.useColors=n.useColors(),v.color=n.selectColor(p),v.extend=r,v.destroy=n.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(h!==n.namespaces&&(h=n.namespaces,y=n.enabled(p)),y),set:x=>{f=x}}),typeof n.init=="function"&&n.init(v),v}function r(p,d){let f=n(this.namespace+(typeof d>"u"?":":d)+p);return f.log=this.log,f}function o(p){n.save(p),n.namespaces=p,n.names=[],n.skips=[];let d=(typeof p=="string"?p:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of d)f[0]==="-"?n.skips.push(f.slice(1)):n.names.push(f)}function i(p,d){let f=0,h=0,y=-1,v=0;for(;f<p.length;)if(h<d.length&&(d[h]===p[f]||d[h]==="*"))d[h]==="*"?(y=h,v=f,h++):(f++,h++);else if(y!==-1)h=y+1,v++,f=v;else return!1;for(;h<d.length&&d[h]==="*";)h++;return h===d.length}function s(){let p=[...n.names,...n.skips.map(d=>"-"+d)].join(",");return n.enable(""),p}function a(p){for(let d of n.skips)if(i(p,d))return!1;for(let d of n.names)if(i(p,d))return!0;return!1}function c(p){return p instanceof Error?p.stack||p.message:p}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}Wk.exports=sF});var Kk=$((mn,Ml)=>{mn.formatArgs=cF;mn.save=lF;mn.load=uF;mn.useColors=aF;mn.storage=pF();mn.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();mn.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function aF(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function cF(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Ml.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let n=0,r=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),t.splice(r,0,e)}mn.log=console.debug||console.log||(()=>{});function lF(t){try{t?mn.storage.setItem("debug",t):mn.storage.removeItem("debug")}catch{}}function uF(){let t;try{t=mn.storage.getItem("debug")||mn.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function pF(){try{return localStorage}catch{}}Ml.exports=Lh()(mn);var{formatters:dF}=Ml.exports;dF.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Yk=$((OG,Jk)=>{"use strict";Jk.exports=(t,e=process.argv)=>{let n=t.startsWith("-")?"":t.length===1?"-":"--",r=e.indexOf(n+t),o=e.indexOf("--");return r!==-1&&(o===-1||r<o)}});var eT=$((zG,Qk)=>{"use strict";var fF=require("os"),Xk=require("tty"),Cn=Yk(),{env:Pt}=process,Br;Cn("no-color")||Cn("no-colors")||Cn("color=false")||Cn("color=never")?Br=0:(Cn("color")||Cn("colors")||Cn("color=true")||Cn("color=always"))&&(Br=1);"FORCE_COLOR"in Pt&&(Pt.FORCE_COLOR==="true"?Br=1:Pt.FORCE_COLOR==="false"?Br=0:Br=Pt.FORCE_COLOR.length===0?1:Math.min(parseInt(Pt.FORCE_COLOR,10),3));function Dh(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Mh(t,e){if(Br===0)return 0;if(Cn("color=16m")||Cn("color=full")||Cn("color=truecolor"))return 3;if(Cn("color=256"))return 2;if(t&&!e&&Br===void 0)return 0;let n=Br||0;if(Pt.TERM==="dumb")return n;if(process.platform==="win32"){let r=fF.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Pt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Pt)||Pt.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Pt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Pt.TEAMCITY_VERSION)?1:0;if(Pt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Pt){let r=parseInt((Pt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Pt.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Pt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Pt.TERM)||"COLORTERM"in Pt?1:n}function mF(t){let e=Mh(t,t&&t.isTTY);return Dh(e)}Qk.exports={supportsColor:mF,stdout:Dh(Mh(!0,Xk.isatty(1))),stderr:Dh(Mh(!0,Xk.isatty(2)))}});var nT=$((Ot,Ul)=>{var hF=require("tty"),Fl=require("util");Ot.init=wF;Ot.log=vF;Ot.formatArgs=yF;Ot.save=bF;Ot.load=_F;Ot.useColors=gF;Ot.destroy=Fl.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ot.colors=[6,2,3,4,5,1];try{let t=eT();t&&(t.stderr||t).level>=2&&(Ot.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Ot.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let n=e.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),r=process.env[e];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),t[n]=r,t},{});function gF(){return"colors"in Ot.inspectOpts?!!Ot.inspectOpts.colors:hF.isatty(process.stderr.fd)}function yF(t){let{namespace:e,useColors:n}=this;if(n){let r=this.color,o="\x1B[3"+(r<8?r:"8;5;"+r),i=` ${o};1m${e} \x1B[0m`;t[0]=i+t[0].split(`
|
|
9
|
+
deps: ${n}}`};var Ij={keyword:"dependencies",type:"object",schemaType:"object",error:tr.error,code(t){let[e,n]=Oj(t);vw(t,e),bw(t,n)}};function Oj({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let o=Array.isArray(t[r])?e:n;o[r]=t[r]}return[e,n]}function vw(t,e=t.schema){let{gen:n,data:r,it:o}=t;if(Object.keys(e).length===0)return;let i=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let c=(0,oa.propertyInData)(n,r,s,o.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),o.allErrors?n.if(c,()=>{for(let l of a)(0,oa.checkReportMissingProp)(t,l)}):(n.if((0,Em._)`${c} && (${(0,oa.checkMissingProp)(t,a,i)})`),(0,oa.reportMissingProp)(t,i),n.else())}}tr.validatePropertyDeps=vw;function bw(t,e=t.schema){let{gen:n,data:r,keyword:o,it:i}=t,s=n.name("valid");for(let a in e)(0,Cj.alwaysValidSchema)(i,e[a])||(n.if((0,oa.propertyInData)(n,r,a,i.opts.ownProperties),()=>{let c=t.subschema({keyword:o,schemaProp:a},s);t.mergeValidEvaluated(c,s)},()=>n.var(s,!0)),t.ok(s))}tr.validateSchemaDeps=bw;tr.default=Ij});var Sw=$($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});var ww=we(),zj=Me(),Nj={message:"property name must be valid",params:({params:t})=>(0,ww._)`{propertyName: ${t.propertyName}}`},jj={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Nj,code(t){let{gen:e,schema:n,data:r,it:o}=t;if((0,zj.alwaysValidSchema)(o,n))return;let i=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,ww.not)(i),()=>{t.error(!0),o.allErrors||e.break()})}),t.ok(i)}};$m.default=jj});var Am=$(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});var dl=An(),qn=we(),Lj=xr(),fl=Me(),Dj={message:"must NOT have additional properties",params:({params:t})=>(0,qn._)`{additionalProperty: ${t.additionalProperty}}`},Mj={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Dj,code(t){let{gen:e,schema:n,parentSchema:r,data:o,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=s;if(s.props=!0,c.removeAdditional!=="all"&&(0,fl.alwaysValidSchema)(s,n))return;let l=(0,dl.allSchemaProperties)(r.properties),p=(0,dl.allSchemaProperties)(r.patternProperties);d(),t.ok((0,qn._)`${i} === ${Lj.default.errors}`);function d(){e.forIn("key",o,x=>{!l.length&&!p.length?y(x):e.if(f(x),()=>y(x))})}function f(x){let m;if(l.length>8){let v=(0,fl.schemaRefOrVal)(s,r.properties,"properties");m=(0,dl.isOwnProperty)(e,v,x)}else l.length?m=(0,qn.or)(...l.map(v=>(0,qn._)`${x} === ${v}`)):m=qn.nil;return p.length&&(m=(0,qn.or)(m,...p.map(v=>(0,qn._)`${(0,dl.usePattern)(t,v)}.test(${x})`))),(0,qn.not)(m)}function h(x){e.code((0,qn._)`delete ${o}[${x}]`)}function y(x){if(c.removeAdditional==="all"||c.removeAdditional&&n===!1){h(x);return}if(n===!1){t.setParams({additionalProperty:x}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,fl.alwaysValidSchema)(s,n)){let m=e.name("valid");c.removeAdditional==="failing"?(b(x,m,!1),e.if((0,qn.not)(m),()=>{t.reset(),h(x)})):(b(x,m),a||e.if((0,qn.not)(m),()=>e.break()))}}function b(x,m,v){let w={keyword:"additionalProperties",dataProp:x,dataPropType:fl.Type.Str};v===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(w,m)}}};Rm.default=Mj});var Ew=$(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});var Fj=Bs(),kw=An(),Pm=Me(),Tw=Am(),Uj={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:o,it:i}=t;i.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&Tw.default.code(new Fj.KeywordCxt(i,Tw.default,"additionalProperties"));let s=(0,kw.allSchemaProperties)(n);for(let d of s)i.definedProperties.add(d);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Pm.mergeEvaluated.props(e,(0,Pm.toHash)(s),i.props));let a=s.filter(d=>!(0,Pm.alwaysValidSchema)(i,n[d]));if(a.length===0)return;let c=e.name("valid");for(let d of a)l(d)?p(d):(e.if((0,kw.propertyInData)(e,o,d,i.opts.ownProperties)),p(d),i.allErrors||e.else().var(c,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(c);function l(d){return i.opts.useDefaults&&!i.compositeRule&&n[d].default!==void 0}function p(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};Cm.default=Uj});var Pw=$(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});var $w=An(),ml=we(),Rw=Me(),Aw=Me(),qj={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:o,it:i}=t,{opts:s}=i,a=(0,$w.allSchemaProperties)(n),c=a.filter(b=>(0,Rw.alwaysValidSchema)(i,n[b]));if(a.length===0||c.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let l=s.strictSchema&&!s.allowMatchingProperties&&o.properties,p=e.name("valid");i.props!==!0&&!(i.props instanceof ml.Name)&&(i.props=(0,Aw.evaluatedPropsToName)(e,i.props));let{props:d}=i;f();function f(){for(let b of a)l&&h(b),i.allErrors?y(b):(e.var(p,!0),y(b),e.if(p))}function h(b){for(let x in l)new RegExp(b).test(x)&&(0,Rw.checkStrictMode)(i,`property ${x} matches pattern ${b} (use allowMatchingProperties)`)}function y(b){e.forIn("key",r,x=>{e.if((0,ml._)`${(0,$w.usePattern)(t,b)}.test(${x})`,()=>{let m=c.includes(b);m||t.subschema({keyword:"patternProperties",schemaProp:b,dataProp:x,dataPropType:Aw.Type.Str},p),i.opts.unevaluated&&d!==!0?e.assign((0,ml._)`${d}[${x}]`,!0):!m&&!i.allErrors&&e.if((0,ml.not)(p),()=>e.break())})})}}};Im.default=qj});var Cw=$(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});var Zj=Me(),Bj={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:n,it:r}=t;if((0,Zj.alwaysValidSchema)(r,n)){t.fail();return}let o=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),t.failResult(o,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};Om.default=Bj});var Iw=$(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});var Hj=An(),Vj={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Hj.validateUnion,error:{message:"must match a schema in anyOf"}};zm.default=Vj});var Ow=$(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var hl=we(),Gj=Me(),Wj={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,hl._)`{passingSchemas: ${t.passing}}`},Kj={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Wj,code(t){let{gen:e,schema:n,parentSchema:r,it:o}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");if(o.opts.discriminator&&r.discriminator)return;let i=n,s=e.let("valid",!1),a=e.let("passing",null),c=e.name("_valid");t.setParams({passing:a}),e.block(l),t.result(s,()=>t.reset(),()=>t.error(!0));function l(){i.forEach((p,d)=>{let f;(0,Gj.alwaysValidSchema)(o,p)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,hl._)`${c} && ${s}`).assign(s,!1).assign(a,(0,hl._)`[${a}, ${d}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,d),f&&t.mergeEvaluated(f,hl.Name)})})}}};Nm.default=Kj});var zw=$(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});var Jj=Me(),Yj={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:n,it:r}=t;if(!Array.isArray(n))throw new Error("ajv implementation error");let o=e.name("valid");n.forEach((i,s)=>{if((0,Jj.alwaysValidSchema)(r,i))return;let a=t.subschema({keyword:"allOf",schemaProp:s},o);t.ok(o),t.mergeEvaluated(a)})}};jm.default=Yj});var Lw=$(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});var gl=we(),jw=Me(),Xj={message:({params:t})=>(0,gl.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,gl._)`{failingKeyword: ${t.ifClause}}`},Qj={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Xj,code(t){let{gen:e,parentSchema:n,it:r}=t;n.then===void 0&&n.else===void 0&&(0,jw.checkStrictMode)(r,'"if" without "then" and "else" is ignored');let o=Nw(r,"then"),i=Nw(r,"else");if(!o&&!i)return;let s=e.let("valid",!0),a=e.name("_valid");if(c(),t.reset(),o&&i){let p=e.let("ifClause");t.setParams({ifClause:p}),e.if(a,l("then",p),l("else",p))}else o?e.if(a,l("then")):e.if((0,gl.not)(a),l("else"));t.pass(s,()=>t.error(!0));function c(){let p=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);t.mergeEvaluated(p)}function l(p,d){return()=>{let f=t.subschema({keyword:p},a);e.assign(s,a),t.mergeValidEvaluated(f,s),d?e.assign(d,(0,gl._)`${p}`):t.setParams({ifClause:p})}}}};function Nw(t,e){let n=t.schema[e];return n!==void 0&&!(0,jw.alwaysValidSchema)(t,n)}Lm.default=Qj});var Dw=$(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});var eL=Me(),tL={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){e.if===void 0&&(0,eL.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};Dm.default=tL});var Mw=$(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});var nL=_m(),rL=hw(),oL=wm(),iL=yw(),sL=xw(),aL=_w(),cL=Sw(),lL=Am(),uL=Ew(),pL=Pw(),dL=Cw(),fL=Iw(),mL=Ow(),hL=zw(),gL=Lw(),yL=Dw();function xL(t=!1){let e=[dL.default,fL.default,mL.default,hL.default,gL.default,yL.default,cL.default,lL.default,aL.default,uL.default,pL.default];return t?e.push(rL.default,iL.default):e.push(nL.default,oL.default),e.push(sL.default),e}Mm.default=xL});var Fw=$(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});var wt=we(),vL={message:({schemaCode:t})=>(0,wt.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,wt._)`{format: ${t}}`},bL={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:vL,code(t,e){let{gen:n,data:r,$data:o,schema:i,schemaCode:s,it:a}=t,{opts:c,errSchemaPath:l,schemaEnv:p,self:d}=a;if(!c.validateFormats)return;o?f():h();function f(){let y=n.scopeValue("formats",{ref:d.formats,code:c.code.formats}),b=n.const("fDef",(0,wt._)`${y}[${s}]`),x=n.let("fType"),m=n.let("format");n.if((0,wt._)`typeof ${b} == "object" && !(${b} instanceof RegExp)`,()=>n.assign(x,(0,wt._)`${b}.type || "string"`).assign(m,(0,wt._)`${b}.validate`),()=>n.assign(x,(0,wt._)`"string"`).assign(m,b)),t.fail$data((0,wt.or)(v(),w()));function v(){return c.strictSchema===!1?wt.nil:(0,wt._)`${s} && !${m}`}function w(){let k=p.$async?(0,wt._)`(${b}.async ? await ${m}(${r}) : ${m}(${r}))`:(0,wt._)`${m}(${r})`,E=(0,wt._)`(typeof ${m} == "function" ? ${k} : ${m}.test(${r}))`;return(0,wt._)`${m} && ${m} !== true && ${x} === ${e} && !${E}`}}function h(){let y=d.formats[i];if(!y){v();return}if(y===!0)return;let[b,x,m]=w(y);b===e&&t.pass(k());function v(){if(c.strictSchema===!1){d.logger.warn(E());return}throw new Error(E());function E(){return`unknown format "${i}" ignored in schema at path "${l}"`}}function w(E){let F=E instanceof RegExp?(0,wt.regexpCode)(E):c.code.formats?(0,wt._)`${c.code.formats}${(0,wt.getProperty)(i)}`:void 0,j=n.scopeValue("formats",{key:i,ref:E,code:F});return typeof E=="object"&&!(E instanceof RegExp)?[E.type||"string",E.validate,(0,wt._)`${j}.validate`]:["string",E,j]}function k(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!p.$async)throw new Error("async format in sync schema");return(0,wt._)`await ${m}(${r})`}return typeof x=="function"?(0,wt._)`${m}(${r})`:(0,wt._)`${m}.test(${r})`}}}};Fm.default=bL});var Uw=$(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});var _L=Fw(),wL=[_L.default];Um.default=wL});var qw=$(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.contentVocabulary=Ti.metadataVocabulary=void 0;Ti.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ti.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Bw=$(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0});var SL=Y_(),kL=pw(),TL=Mw(),EL=Uw(),Zw=qw(),$L=[SL.default,kL.default,(0,TL.default)(),EL.default,Zw.metadataVocabulary,Zw.contentVocabulary];qm.default=$L});var Vw=$(yl=>{"use strict";Object.defineProperty(yl,"__esModule",{value:!0});yl.DiscrError=void 0;var Hw;(function(t){t.Tag="tag",t.Mapping="mapping"})(Hw||(yl.DiscrError=Hw={}))});var Ww=$(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});var Ei=we(),Zm=Vw(),Gw=Xc(),RL=Hs(),AL=Me(),PL={message:({params:{discrError:t,tagName:e}})=>t===Zm.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:n}})=>(0,Ei._)`{error: ${t}, tag: ${n}, tagValue: ${e}}`},CL={keyword:"discriminator",type:"object",schemaType:"object",error:PL,code(t){let{gen:e,data:n,schema:r,parentSchema:o,it:i}=t,{oneOf:s}=o;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=r.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(r.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),l=e.const("tag",(0,Ei._)`${n}${(0,Ei.getProperty)(a)}`);e.if((0,Ei._)`typeof ${l} == "string"`,()=>p(),()=>t.error(!1,{discrError:Zm.DiscrError.Tag,tag:l,tagName:a})),t.ok(c);function p(){let h=f();e.if(!1);for(let y in h)e.elseIf((0,Ei._)`${l} === ${y}`),e.assign(c,d(h[y]));e.else(),t.error(!1,{discrError:Zm.DiscrError.Mapping,tag:l,tagName:a}),e.endIf()}function d(h){let y=e.name("valid"),b=t.subschema({keyword:"oneOf",schemaProp:h},y);return t.mergeEvaluated(b,Ei.Name),y}function f(){var h;let y={},b=m(o),x=!0;for(let k=0;k<s.length;k++){let E=s[k];if(E!=null&&E.$ref&&!(0,AL.schemaHasRulesButRef)(E,i.self.RULES)){let j=E.$ref;if(E=Gw.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,j),E instanceof Gw.SchemaEnv&&(E=E.schema),E===void 0)throw new RL.default(i.opts.uriResolver,i.baseId,j)}let F=(h=E==null?void 0:E.properties)===null||h===void 0?void 0:h[a];if(typeof F!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);x=x&&(b||m(E)),v(F,k)}if(!x)throw new Error(`discriminator: "${a}" must be required`);return y;function m({required:k}){return Array.isArray(k)&&k.includes(a)}function v(k,E){if(k.const)w(k.const,E);else if(k.enum)for(let F of k.enum)w(F,E);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function w(k,E){if(typeof k!="string"||k in y)throw new Error(`discriminator: "${a}" values must be unique strings`);y[k]=E}}}};Bm.default=CL});var Kw=$((eV,IL)=>{IL.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 Vm=$((lt,Hm)=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.MissingRefError=lt.ValidationError=lt.CodeGen=lt.Name=lt.nil=lt.stringify=lt.str=lt._=lt.KeywordCxt=lt.Ajv=void 0;var OL=H_(),zL=Bw(),NL=Ww(),Jw=Kw(),jL=["/properties"],xl="http://json-schema.org/draft-07/schema",$i=class extends OL.default{_addVocabularies(){super._addVocabularies(),zL.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(NL.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Jw,jL):Jw;this.addMetaSchema(e,xl,!1),this.refs["http://json-schema.org/schema"]=xl}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(xl)?xl:void 0)}};lt.Ajv=$i;Hm.exports=lt=$i;Hm.exports.Ajv=$i;Object.defineProperty(lt,"__esModule",{value:!0});lt.default=$i;var LL=Bs();Object.defineProperty(lt,"KeywordCxt",{enumerable:!0,get:function(){return LL.KeywordCxt}});var Ri=we();Object.defineProperty(lt,"_",{enumerable:!0,get:function(){return Ri._}});Object.defineProperty(lt,"str",{enumerable:!0,get:function(){return Ri.str}});Object.defineProperty(lt,"stringify",{enumerable:!0,get:function(){return Ri.stringify}});Object.defineProperty(lt,"nil",{enumerable:!0,get:function(){return Ri.nil}});Object.defineProperty(lt,"Name",{enumerable:!0,get:function(){return Ri.Name}});Object.defineProperty(lt,"CodeGen",{enumerable:!0,get:function(){return Ri.CodeGen}});var DL=Jc();Object.defineProperty(lt,"ValidationError",{enumerable:!0,get:function(){return DL.default}});var ML=Hs();Object.defineProperty(lt,"MissingRefError",{enumerable:!0,get:function(){return ML.default}})});var o0=$(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.formatNames=rr.fastFormats=rr.fullFormats=void 0;function nr(t,e){return{validate:t,compare:e}}rr.fullFormats={date:nr(e0,Jm),time:nr(Wm(!0),Ym),"date-time":nr(Yw(!0),n0),"iso-time":nr(Wm(),t0),"iso-date-time":nr(Yw(),r0),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:HL,"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:XL,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:VL,int32:{type:"number",validate:KL},int64:{type:"number",validate:JL},float:{type:"number",validate:Qw},double:{type:"number",validate:Qw},password:!0,binary:!0};rr.fastFormats={...rr.fullFormats,date:nr(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Jm),time:nr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Ym),"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,n0),"iso-time":nr(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,t0),"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,r0),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};rr.formatNames=Object.keys(rr.fullFormats);function FL(t){return t%4===0&&(t%100!==0||t%400===0)}var UL=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,qL=[0,31,28,31,30,31,30,31,31,30,31,30,31];function e0(t){let e=UL.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],o=+e[3];return r>=1&&r<=12&&o>=1&&o<=(r===2&&FL(n)?29:qL[r])}function Jm(t,e){if(t&&e)return t>e?1:t<e?-1:0}var Gm=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Wm(t){return function(n){let r=Gm.exec(n);if(!r)return!1;let o=+r[1],i=+r[2],s=+r[3],a=r[4],c=r[5]==="-"?-1:1,l=+(r[6]||0),p=+(r[7]||0);if(l>23||p>59||t&&!a)return!1;if(o<=23&&i<=59&&s<60)return!0;let d=i-p*c,f=o-l*c-(d<0?1:0);return(f===23||f===-1)&&(d===59||d===-1)&&s<61}}function Ym(t,e){if(!(t&&e))return;let n=new Date("2020-01-01T"+t).valueOf(),r=new Date("2020-01-01T"+e).valueOf();if(n&&r)return n-r}function t0(t,e){if(!(t&&e))return;let n=Gm.exec(t),r=Gm.exec(e);if(n&&r)return t=n[1]+n[2]+n[3],e=r[1]+r[2]+r[3],t>e?1:t<e?-1:0}var Km=/t|\s/i;function Yw(t){let e=Wm(t);return function(r){let o=r.split(Km);return o.length===2&&e0(o[0])&&e(o[1])}}function n0(t,e){if(!(t&&e))return;let n=new Date(t).valueOf(),r=new Date(e).valueOf();if(n&&r)return n-r}function r0(t,e){if(!(t&&e))return;let[n,r]=t.split(Km),[o,i]=e.split(Km),s=Jm(n,o);if(s!==void 0)return s||Ym(r,i)}var ZL=/\/|:/,BL=/^(?:[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 HL(t){return ZL.test(t)&&BL.test(t)}var Xw=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function VL(t){return Xw.lastIndex=0,Xw.test(t)}var GL=-(2**31),WL=2**31-1;function KL(t){return Number.isInteger(t)&&t<=WL&&t>=GL}function JL(t){return Number.isInteger(t)}function Qw(){return!0}var YL=/[^\\]\\Z/;function XL(t){if(YL.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var i0=$(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});Ai.formatLimitDefinition=void 0;var QL=Vm(),Zn=we(),qr=Zn.operators,vl={formatMaximum:{okStr:"<=",ok:qr.LTE,fail:qr.GT},formatMinimum:{okStr:">=",ok:qr.GTE,fail:qr.LT},formatExclusiveMaximum:{okStr:"<",ok:qr.LT,fail:qr.GTE},formatExclusiveMinimum:{okStr:">",ok:qr.GT,fail:qr.LTE}},eD={message:({keyword:t,schemaCode:e})=>(0,Zn.str)`should be ${vl[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Zn._)`{comparison: ${vl[t].okStr}, limit: ${e}}`};Ai.formatLimitDefinition={keyword:Object.keys(vl),type:"string",schemaType:"string",$data:!0,error:eD,code(t){let{gen:e,data:n,schemaCode:r,keyword:o,it:i}=t,{opts:s,self:a}=i;if(!s.validateFormats)return;let c=new QL.KeywordCxt(i,a.RULES.all.format.definition,"format");c.$data?l():p();function l(){let f=e.scopeValue("formats",{ref:a.formats,code:s.code.formats}),h=e.const("fmt",(0,Zn._)`${f}[${c.schemaCode}]`);t.fail$data((0,Zn.or)((0,Zn._)`typeof ${h} != "object"`,(0,Zn._)`${h} instanceof RegExp`,(0,Zn._)`typeof ${h}.compare != "function"`,d(h)))}function p(){let f=c.schema,h=a.formats[f];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${o}": format "${f}" does not define "compare" function`);let y=e.scopeValue("formats",{key:f,ref:h,code:s.code.formats?(0,Zn._)`${s.code.formats}${(0,Zn.getProperty)(f)}`:void 0});t.fail$data(d(y))}function d(f){return(0,Zn._)`${f}.compare(${n}, ${r}) ${vl[o].fail} 0`}},dependencies:["format"]};var tD=t=>(t.addKeyword(Ai.formatLimitDefinition),t);Ai.default=tD});var l0=$((ia,c0)=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});var Pi=o0(),nD=i0(),Xm=we(),s0=new Xm.Name("fullFormats"),rD=new Xm.Name("fastFormats"),Qm=(t,e={keywords:!0})=>{if(Array.isArray(e))return a0(t,e,Pi.fullFormats,s0),t;let[n,r]=e.mode==="fast"?[Pi.fastFormats,rD]:[Pi.fullFormats,s0],o=e.formats||Pi.formatNames;return a0(t,o,n,r),e.keywords&&(0,nD.default)(t),t};Qm.get=(t,e="full")=>{let r=(e==="fast"?Pi.fastFormats:Pi.fullFormats)[t];if(!r)throw new Error(`Unknown format "${t}"`);return r};function a0(t,e,n,r){var o,i;(o=(i=t.opts.code).formats)!==null&&o!==void 0||(i.formats=(0,Xm._)`require("ajv-formats/dist/formats").${r}`);for(let s of e)t.addFormat(s,n[s])}c0.exports=ia=Qm;Object.defineProperty(ia,"__esModule",{value:!0});ia.default=Qm});var M0=$((XV,D0)=>{var L0=require("stream").Stream,gM=require("util");D0.exports=Hn;function Hn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}gM.inherits(Hn,L0);Hn.create=function(t,e){var n=new this;e=e||{};for(var r in e)n[r]=e[r];n.source=t;var o=t.emit;return t.emit=function(){return n._handleEmit(arguments),o.apply(t,arguments)},t.on("error",function(){}),n.pauseStream&&t.pause(),n};Object.defineProperty(Hn.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Hn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Hn.prototype.resume=function(){this._released||this.release(),this.source.resume()};Hn.prototype.pause=function(){this.source.pause()};Hn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(t){this.emit.apply(this,t)}.bind(this)),this._bufferedEvents=[]};Hn.prototype.pipe=function(){var t=L0.prototype.pipe.apply(this,arguments);return this.resume(),t};Hn.prototype._handleEmit=function(t){if(this._released){this.emit.apply(this,t);return}t[0]==="data"&&(this.dataSize+=t[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(t)};Hn.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(t))}}});var Z0=$((QV,q0)=>{var yM=require("util"),U0=require("stream").Stream,F0=M0();q0.exports=_t;function _t(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}yM.inherits(_t,U0);_t.create=function(t){var e=new this;t=t||{};for(var n in t)e[n]=t[n];return e};_t.isStreamLike=function(t){return typeof t!="function"&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"&&!Buffer.isBuffer(t)};_t.prototype.append=function(t){var e=_t.isStreamLike(t);if(e){if(!(t instanceof F0)){var n=F0.create(t,{maxDataSize:1/0,pauseStream:this.pauseStreams});t.on("data",this._checkDataSize.bind(this)),t=n}this._handleErrors(t),this.pauseStreams&&t.pause()}return this._streams.push(t),this};_t.prototype.pipe=function(t,e){return U0.prototype.pipe.call(this,t,e),this.resume(),t};_t.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};_t.prototype._realGetNext=function(){var t=this._streams.shift();if(typeof t>"u"){this.end();return}if(typeof t!="function"){this._pipeNext(t);return}var e=t;e(function(n){var r=_t.isStreamLike(n);r&&(n.on("data",this._checkDataSize.bind(this)),this._handleErrors(n)),this._pipeNext(n)}.bind(this))};_t.prototype._pipeNext=function(t){this._currentStream=t;var e=_t.isStreamLike(t);if(e){t.on("end",this._getNext.bind(this)),t.pipe(this,{end:!1});return}var n=t;this.write(n),this._getNext()};_t.prototype._handleErrors=function(t){var e=this;t.on("error",function(n){e._emitError(n)})};_t.prototype.write=function(t){this.emit("data",t)};_t.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};_t.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};_t.prototype.end=function(){this._reset(),this.emit("end")};_t.prototype.destroy=function(){this._reset(),this.emit("close")};_t.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};_t.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var t="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(t))}};_t.prototype._updateDataSize=function(){this.dataSize=0;var t=this;this._streams.forEach(function(e){e.dataSize&&(t.dataSize+=e.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};_t.prototype._emitError=function(t){this._reset(),this.emit("error",t)}});var B0=$((e5,xM)=>{xM.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var V0=$((t5,H0)=>{H0.exports=B0()});var K0=$(hn=>{"use strict";var Cl=V0(),vM=require("path").extname,G0=/^\s*([^;\s]*)(?:;|\s|$)/,bM=/^text\//i;hn.charset=W0;hn.charsets={lookup:W0};hn.contentType=_M;hn.extension=wM;hn.extensions=Object.create(null);hn.lookup=SM;hn.types=Object.create(null);kM(hn.extensions,hn.types);function W0(t){if(!t||typeof t!="string")return!1;var e=G0.exec(t),n=e&&Cl[e[1].toLowerCase()];return n&&n.charset?n.charset:e&&bM.test(e[1])?"UTF-8":!1}function _M(t){if(!t||typeof t!="string")return!1;var e=t.indexOf("/")===-1?hn.lookup(t):t;if(!e)return!1;if(e.indexOf("charset")===-1){var n=hn.charset(e);n&&(e+="; charset="+n.toLowerCase())}return e}function wM(t){if(!t||typeof t!="string")return!1;var e=G0.exec(t),n=e&&hn.extensions[e[1].toLowerCase()];return!n||!n.length?!1:n[0]}function SM(t){if(!t||typeof t!="string")return!1;var e=vM("x."+t).toLowerCase().substr(1);return e&&hn.types[e]||!1}function kM(t,e){var n=["nginx","apache",void 0,"iana"];Object.keys(Cl).forEach(function(o){var i=Cl[o],s=i.extensions;if(!(!s||!s.length)){t[o]=s;for(var a=0;a<s.length;a++){var c=s[a];if(e[c]){var l=n.indexOf(Cl[e[c]].source),p=n.indexOf(i.source);if(e[c]!=="application/octet-stream"&&(l>p||l===p&&e[c].substr(0,12)==="application/"))continue}e[c]=o}}})}});var Y0=$((r5,J0)=>{J0.exports=TM;function TM(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}});var lh=$((o5,Q0)=>{var X0=Y0();Q0.exports=EM;function EM(t){var e=!1;return X0(function(){e=!0}),function(r,o){e?t(r,o):X0(function(){t(r,o)})}}});var uh=$((i5,eS)=>{eS.exports=$M;function $M(t){Object.keys(t.jobs).forEach(RM.bind(t)),t.jobs={}}function RM(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}});var ph=$((s5,nS)=>{var tS=lh(),AM=uh();nS.exports=PM;function PM(t,e,n,r){var o=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[o]=CM(e,o,t[o],function(i,s){o in n.jobs&&(delete n.jobs[o],i?AM(n):n.results[o]=s,r(i,n.results))})}function CM(t,e,n,r){var o;return t.length==2?o=t(n,tS(r)):o=t(n,e,tS(r)),o}});var dh=$((a5,rS)=>{rS.exports=IM;function IM(t,e){var n=!Array.isArray(t),r={index:0,keyedList:n||e?Object.keys(t):null,jobs:{},results:n?{}:[],size:n?Object.keys(t).length:t.length};return e&&r.keyedList.sort(n?e:function(o,i){return e(t[o],t[i])}),r}});var fh=$((c5,oS)=>{var OM=uh(),zM=lh();oS.exports=NM;function NM(t){Object.keys(this.jobs).length&&(this.index=this.size,OM(this),zM(t)(null,this.results))}});var sS=$((l5,iS)=>{var jM=ph(),LM=dh(),DM=fh();iS.exports=MM;function MM(t,e,n){for(var r=LM(t);r.index<(r.keyedList||t).length;)jM(t,e,r,function(o,i){if(o){n(o,i);return}if(Object.keys(r.jobs).length===0){n(null,r.results);return}}),r.index++;return DM.bind(r,n)}});var mh=$((u5,Il)=>{var aS=ph(),FM=dh(),UM=fh();Il.exports=qM;Il.exports.ascending=cS;Il.exports.descending=ZM;function qM(t,e,n,r){var o=FM(t,n);return aS(t,e,o,function i(s,a){if(s){r(s,a);return}if(o.index++,o.index<(o.keyedList||t).length){aS(t,e,o,i);return}r(null,o.results)}),UM.bind(o,r)}function cS(t,e){return t<e?-1:t>e?1:0}function ZM(t,e){return-1*cS(t,e)}});var uS=$((p5,lS)=>{var BM=mh();lS.exports=HM;function HM(t,e,n){return BM(t,e,null,n)}});var dS=$((d5,pS)=>{pS.exports={parallel:sS(),serial:uS(),serialOrdered:mh()}});var hh=$((f5,fS)=>{"use strict";fS.exports=Object});var hS=$((m5,mS)=>{"use strict";mS.exports=Error});var yS=$((h5,gS)=>{"use strict";gS.exports=EvalError});var vS=$((g5,xS)=>{"use strict";xS.exports=RangeError});var _S=$((y5,bS)=>{"use strict";bS.exports=ReferenceError});var SS=$((x5,wS)=>{"use strict";wS.exports=SyntaxError});var Ol=$((v5,kS)=>{"use strict";kS.exports=TypeError});var ES=$((b5,TS)=>{"use strict";TS.exports=URIError});var RS=$((_5,$S)=>{"use strict";$S.exports=Math.abs});var PS=$((w5,AS)=>{"use strict";AS.exports=Math.floor});var IS=$((S5,CS)=>{"use strict";CS.exports=Math.max});var zS=$((k5,OS)=>{"use strict";OS.exports=Math.min});var jS=$((T5,NS)=>{"use strict";NS.exports=Math.pow});var DS=$((E5,LS)=>{"use strict";LS.exports=Math.round});var FS=$(($5,MS)=>{"use strict";MS.exports=Number.isNaN||function(e){return e!==e}});var qS=$((R5,US)=>{"use strict";var VM=FS();US.exports=function(e){return VM(e)||e===0?e:e<0?-1:1}});var BS=$((A5,ZS)=>{"use strict";ZS.exports=Object.getOwnPropertyDescriptor});var gh=$((P5,HS)=>{"use strict";var zl=BS();if(zl)try{zl([],"length")}catch{zl=null}HS.exports=zl});var GS=$((C5,VS)=>{"use strict";var Nl=Object.defineProperty||!1;if(Nl)try{Nl({},"a",{value:1})}catch{Nl=!1}VS.exports=Nl});var yh=$((I5,WS)=>{"use strict";WS.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;e[n]=o;for(var i in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0}});var YS=$((O5,JS)=>{"use strict";var KS=typeof Symbol<"u"&&Symbol,GM=yh();JS.exports=function(){return typeof KS!="function"||typeof Symbol!="function"||typeof KS("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:GM()}});var xh=$((z5,XS)=>{"use strict";XS.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var vh=$((N5,QS)=>{"use strict";var WM=hh();QS.exports=WM.getPrototypeOf||null});var nk=$((j5,tk)=>{"use strict";var KM="Function.prototype.bind called on incompatible ",JM=Object.prototype.toString,YM=Math.max,XM="[object Function]",ek=function(e,n){for(var r=[],o=0;o<e.length;o+=1)r[o]=e[o];for(var i=0;i<n.length;i+=1)r[i+e.length]=n[i];return r},QM=function(e,n){for(var r=[],o=n||0,i=0;o<e.length;o+=1,i+=1)r[i]=e[o];return r},e2=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};tk.exports=function(e){var n=this;if(typeof n!="function"||JM.apply(n)!==XM)throw new TypeError(KM+n);for(var r=QM(arguments,1),o,i=function(){if(this instanceof o){var p=n.apply(this,ek(r,arguments));return Object(p)===p?p:this}return n.apply(e,ek(r,arguments))},s=YM(0,n.length-r.length),a=[],c=0;c<s;c++)a[c]="$"+c;if(o=Function("binder","return function ("+e2(a,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var l=function(){};l.prototype=n.prototype,o.prototype=new l,l.prototype=null}return o}});var fa=$((L5,rk)=>{"use strict";var t2=nk();rk.exports=Function.prototype.bind||t2});var jl=$((D5,ok)=>{"use strict";ok.exports=Function.prototype.call});var bh=$((M5,ik)=>{"use strict";ik.exports=Function.prototype.apply});var ak=$((F5,sk)=>{"use strict";sk.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var lk=$((U5,ck)=>{"use strict";var n2=fa(),r2=bh(),o2=jl(),i2=ak();ck.exports=i2||n2.call(o2,r2)});var pk=$((q5,uk)=>{"use strict";var s2=fa(),a2=Ol(),c2=jl(),l2=lk();uk.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new a2("a function is required");return l2(s2,c2,e)}});var yk=$((Z5,gk)=>{"use strict";var u2=pk(),dk=gh(),mk;try{mk=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var _h=!!mk&&dk&&dk(Object.prototype,"__proto__"),hk=Object,fk=hk.getPrototypeOf;gk.exports=_h&&typeof _h.get=="function"?u2([_h.get]):typeof fk=="function"?function(e){return fk(e==null?e:hk(e))}:!1});var wk=$((B5,_k)=>{"use strict";var xk=xh(),vk=vh(),bk=yk();_k.exports=xk?function(e){return xk(e)}:vk?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return vk(e)}:bk?function(e){return bk(e)}:null});var Ll=$((H5,Sk)=>{"use strict";var p2=Function.prototype.call,d2=Object.prototype.hasOwnProperty,f2=fa();Sk.exports=f2.call(p2,d2)});var Pk=$((V5,Ak)=>{"use strict";var Pe,m2=hh(),h2=hS(),g2=yS(),y2=vS(),x2=_S(),Fi=SS(),Mi=Ol(),v2=ES(),b2=RS(),_2=PS(),w2=IS(),S2=zS(),k2=jS(),T2=DS(),E2=qS(),$k=Function,wh=function(t){try{return $k('"use strict"; return ('+t+").constructor;")()}catch{}},ma=gh(),$2=GS(),Sh=function(){throw new Mi},R2=ma?(function(){try{return arguments.callee,Sh}catch{try{return ma(arguments,"callee").get}catch{return Sh}}})():Sh,Li=YS()(),It=wk(),A2=vh(),P2=xh(),Rk=bh(),ha=jl(),Di={},C2=typeof Uint8Array>"u"||!It?Pe:It(Uint8Array),Do={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Pe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Pe:ArrayBuffer,"%ArrayIteratorPrototype%":Li&&It?It([][Symbol.iterator]()):Pe,"%AsyncFromSyncIteratorPrototype%":Pe,"%AsyncFunction%":Di,"%AsyncGenerator%":Di,"%AsyncGeneratorFunction%":Di,"%AsyncIteratorPrototype%":Di,"%Atomics%":typeof Atomics>"u"?Pe:Atomics,"%BigInt%":typeof BigInt>"u"?Pe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Pe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Pe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Pe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":h2,"%eval%":eval,"%EvalError%":g2,"%Float16Array%":typeof Float16Array>"u"?Pe:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Pe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Pe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Pe:FinalizationRegistry,"%Function%":$k,"%GeneratorFunction%":Di,"%Int8Array%":typeof Int8Array>"u"?Pe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Pe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Pe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Li&&It?It(It([][Symbol.iterator]())):Pe,"%JSON%":typeof JSON=="object"?JSON:Pe,"%Map%":typeof Map>"u"?Pe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Li||!It?Pe:It(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":m2,"%Object.getOwnPropertyDescriptor%":ma,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Pe:Promise,"%Proxy%":typeof Proxy>"u"?Pe:Proxy,"%RangeError%":y2,"%ReferenceError%":x2,"%Reflect%":typeof Reflect>"u"?Pe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Pe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Li||!It?Pe:It(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Pe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Li&&It?It(""[Symbol.iterator]()):Pe,"%Symbol%":Li?Symbol:Pe,"%SyntaxError%":Fi,"%ThrowTypeError%":R2,"%TypedArray%":C2,"%TypeError%":Mi,"%Uint8Array%":typeof Uint8Array>"u"?Pe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Pe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Pe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Pe:Uint32Array,"%URIError%":v2,"%WeakMap%":typeof WeakMap>"u"?Pe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Pe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Pe:WeakSet,"%Function.prototype.call%":ha,"%Function.prototype.apply%":Rk,"%Object.defineProperty%":$2,"%Object.getPrototypeOf%":A2,"%Math.abs%":b2,"%Math.floor%":_2,"%Math.max%":w2,"%Math.min%":S2,"%Math.pow%":k2,"%Math.round%":T2,"%Math.sign%":E2,"%Reflect.getPrototypeOf%":P2};if(It)try{null.error}catch(t){kk=It(It(t)),Do["%Error.prototype%"]=kk}var kk,I2=function t(e){var n;if(e==="%AsyncFunction%")n=wh("async function () {}");else if(e==="%GeneratorFunction%")n=wh("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=wh("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");o&&It&&(n=It(o.prototype))}return Do[e]=n,n},Tk={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ga=fa(),Dl=Ll(),O2=ga.call(ha,Array.prototype.concat),z2=ga.call(Rk,Array.prototype.splice),Ek=ga.call(ha,String.prototype.replace),Ml=ga.call(ha,String.prototype.slice),N2=ga.call(ha,RegExp.prototype.exec),j2=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,L2=/\\(\\)?/g,D2=function(e){var n=Ml(e,0,1),r=Ml(e,-1);if(n==="%"&&r!=="%")throw new Fi("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Fi("invalid intrinsic syntax, expected opening `%`");var o=[];return Ek(e,j2,function(i,s,a,c){o[o.length]=a?Ek(c,L2,"$1"):s||i}),o},M2=function(e,n){var r=e,o;if(Dl(Tk,r)&&(o=Tk[r],r="%"+o[0]+"%"),Dl(Do,r)){var i=Do[r];if(i===Di&&(i=I2(r)),typeof i>"u"&&!n)throw new Mi("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:r,value:i}}throw new Fi("intrinsic "+e+" does not exist!")};Ak.exports=function(e,n){if(typeof e!="string"||e.length===0)throw new Mi("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Mi('"allowMissing" argument must be a boolean');if(N2(/^%?[^%]*%?$/,e)===null)throw new Fi("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=D2(e),o=r.length>0?r[0]:"",i=M2("%"+o+"%",n),s=i.name,a=i.value,c=!1,l=i.alias;l&&(o=l[0],z2(r,O2([0,1],l)));for(var p=1,d=!0;p<r.length;p+=1){var f=r[p],h=Ml(f,0,1),y=Ml(f,-1);if((h==='"'||h==="'"||h==="`"||y==='"'||y==="'"||y==="`")&&h!==y)throw new Fi("property names with quotes must have matching quotes");if((f==="constructor"||!d)&&(c=!0),o+="."+f,s="%"+o+"%",Dl(Do,s))a=Do[s];else if(a!=null){if(!(f in a)){if(!n)throw new Mi("base intrinsic for "+e+" exists, but the property is not available.");return}if(ma&&p+1>=r.length){var b=ma(a,f);d=!!b,d&&"get"in b&&!("originalValue"in b.get)?a=b.get:a=a[f]}else d=Dl(a,f),a=a[f];d&&!c&&(Do[s]=a)}}return a}});var Ik=$((G5,Ck)=>{"use strict";var F2=yh();Ck.exports=function(){return F2()&&!!Symbol.toStringTag}});var Nk=$((W5,zk)=>{"use strict";var U2=Pk(),Ok=U2("%Object.defineProperty%",!0),q2=Ik()(),Z2=Ll(),B2=Ol(),Fl=q2?Symbol.toStringTag:null;zk.exports=function(e,n){var r=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof r<"u"&&typeof r!="boolean"||typeof o<"u"&&typeof o!="boolean")throw new B2("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Fl&&(r||!Z2(e,Fl))&&(Ok?Ok(e,Fl,{configurable:!o,enumerable:!1,value:n,writable:!1}):e[Fl]=n)}});var Lk=$((K5,jk)=>{"use strict";jk.exports=function(t,e){return Object.keys(e).forEach(function(n){t[n]=t[n]||e[n]}),t}});var Fk=$((J5,Mk)=>{"use strict";var $h=Z0(),H2=require("util"),kh=require("path"),V2=require("http"),G2=require("https"),W2=require("url").parse,K2=require("fs"),J2=require("stream").Stream,Y2=require("crypto"),Th=K0(),X2=dS(),Q2=Nk(),Br=Ll(),Eh=Lk();function Dk(t){return String(t).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function Ue(t){if(!(this instanceof Ue))return new Ue(t);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],$h.call(this),t=t||{};for(var e in t)this[e]=t[e]}H2.inherits(Ue,$h);Ue.LINE_BREAK=`\r
|
|
10
|
+
`;Ue.DEFAULT_CONTENT_TYPE="application/octet-stream";Ue.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=$h.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(t,e,n),i=this._multiPartFooter();r(o),r(e),r(i),this._trackLength(o,e,n)};Ue.prototype._trackLength=function(t,e,n){var r=0;n.knownLength!=null?r+=Number(n.knownLength):Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+Ue.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&Br(e,"httpVersion"))&&!(e instanceof J2))&&(n.knownLength||this._valuesToMeasure.push(e))};Ue.prototype._lengthRetriever=function(t,e){Br(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):K2.stat(t.path,function(n,r){if(n){e(n);return}var o=r.size-(t.start?t.start:0);e(null,o)}):Br(t,"httpVersion")?e(null,Number(t.headers["content-length"])):Br(t,"httpModule")?(t.on("response",function(n){t.pause(),e(null,Number(n.headers["content-length"]))}),t.resume()):e("Unknown stream")};Ue.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(e,n),o=this._getContentType(e,n),i="",s={"Content-Disposition":["form-data",'name="'+Dk(t)+'"'].concat(r||[]),"Content-Type":[].concat(o||[])};typeof n.header=="object"&&Eh(s,n.header);var a;for(var c in s)if(Br(s,c)){if(a=s[c],a==null)continue;Array.isArray(a)||(a=[a]),a.length&&(i+=c+": "+a.join("; ")+Ue.LINE_BREAK)}return"--"+this.getBoundary()+Ue.LINE_BREAK+i+Ue.LINE_BREAK};Ue.prototype._getContentDisposition=function(t,e){var n;if(typeof e.filepath=="string"?n=kh.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?n=kh.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&Br(t,"httpVersion")&&(n=kh.basename(t.client._httpMessage.path||"")),n)return'filename="'+Dk(n)+'"'};Ue.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t&&t.name&&(n=Th.lookup(t.name)),!n&&t&&t.path&&(n=Th.lookup(t.path)),!n&&t&&t.readable&&Br(t,"httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=Th.lookup(e.filepath||e.filename)),!n&&t&&typeof t=="object"&&(n=Ue.DEFAULT_CONTENT_TYPE),n};Ue.prototype._multiPartFooter=function(){return function(t){var e=Ue.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};Ue.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Ue.LINE_BREAK};Ue.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)Br(t,e)&&(n[e.toLowerCase()]=t[e]);return n};Ue.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};Ue.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Ue.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?t=Buffer.concat([t,this._streams[n]]):t=Buffer.concat([t,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(Ue.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};Ue.prototype._generateBoundary=function(){this._boundary="--------------------------"+Y2.randomBytes(12).toString("hex")};Ue.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};Ue.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};Ue.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}X2.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){t(n);return}r.forEach(function(o){e+=o}),t(null,e)})};Ue.prototype.submit=function(t,e){var n,r,o={method:"post"};return typeof t=="string"?(t=W2(t),r=Eh({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},o)):(r=Eh(t,o),r.port||(r.port=r.protocol==="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol==="https:"?n=G2.request(r):n=V2.request(r),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&n.setHeader("Content-Length",s),this.pipe(n),e){var a,c=function(l,p){return n.removeListener("error",c),n.removeListener("response",a),e.call(this,l,p)};a=c.bind(this,null),n.on("error",c),n.on("response",a)}}.bind(this)),n};Ue.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error",t))};Ue.prototype.toString=function(){return"[object FormData]"};Q2(Ue.prototype,"FormData");Mk.exports=Ue});var oT=$((WG,rT)=>{var Zi=1e3,Bi=Zi*60,Hi=Bi*60,Uo=Hi*24,vF=Uo*7,bF=Uo*365.25;rT.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return _F(t);if(n==="number"&&isFinite(t))return e.long?SF(t):wF(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function _F(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*bF;case"weeks":case"week":case"w":return n*vF;case"days":case"day":case"d":return n*Uo;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Hi;case"minutes":case"minute":case"mins":case"min":case"m":return n*Bi;case"seconds":case"second":case"secs":case"sec":case"s":return n*Zi;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function wF(t){var e=Math.abs(t);return e>=Uo?Math.round(t/Uo)+"d":e>=Hi?Math.round(t/Hi)+"h":e>=Bi?Math.round(t/Bi)+"m":e>=Zi?Math.round(t/Zi)+"s":t+"ms"}function SF(t){var e=Math.abs(t);return e>=Uo?Zl(t,e,Uo,"day"):e>=Hi?Zl(t,e,Hi,"hour"):e>=Bi?Zl(t,e,Bi,"minute"):e>=Zi?Zl(t,e,Zi,"second"):t+" ms"}function Zl(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}});var Zh=$((KG,iT)=>{function kF(t){n.debug=n,n.default=n,n.coerce=c,n.disable=s,n.enable=o,n.enabled=a,n.humanize=oT(),n.destroy=l,Object.keys(t).forEach(p=>{n[p]=t[p]}),n.names=[],n.skips=[],n.formatters={};function e(p){let d=0;for(let f=0;f<p.length;f++)d=(d<<5)-d+p.charCodeAt(f),d|=0;return n.colors[Math.abs(d)%n.colors.length]}n.selectColor=e;function n(p){let d,f=null,h,y;function b(...x){if(!b.enabled)return;let m=b,v=Number(new Date),w=v-(d||v);m.diff=w,m.prev=d,m.curr=v,d=v,x[0]=n.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let k=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(F,j)=>{if(F==="%%")return"%";k++;let me=n.formatters[j];if(typeof me=="function"){let de=x[k];F=me.call(m,de),x.splice(k,1),k--}return F}),n.formatArgs.call(m,x),(m.log||n.log).apply(m,x)}return b.namespace=p,b.useColors=n.useColors(),b.color=n.selectColor(p),b.extend=r,b.destroy=n.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(h!==n.namespaces&&(h=n.namespaces,y=n.enabled(p)),y),set:x=>{f=x}}),typeof n.init=="function"&&n.init(b),b}function r(p,d){let f=n(this.namespace+(typeof d>"u"?":":d)+p);return f.log=this.log,f}function o(p){n.save(p),n.namespaces=p,n.names=[],n.skips=[];let d=(typeof p=="string"?p:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let f of d)f[0]==="-"?n.skips.push(f.slice(1)):n.names.push(f)}function i(p,d){let f=0,h=0,y=-1,b=0;for(;f<p.length;)if(h<d.length&&(d[h]===p[f]||d[h]==="*"))d[h]==="*"?(y=h,b=f,h++):(f++,h++);else if(y!==-1)h=y+1,b++,f=b;else return!1;for(;h<d.length&&d[h]==="*";)h++;return h===d.length}function s(){let p=[...n.names,...n.skips.map(d=>"-"+d)].join(",");return n.enable(""),p}function a(p){for(let d of n.skips)if(i(p,d))return!1;for(let d of n.names)if(i(p,d))return!0;return!1}function c(p){return p instanceof Error?p.stack||p.message:p}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}iT.exports=kF});var sT=$((gn,Bl)=>{gn.formatArgs=EF;gn.save=$F;gn.load=RF;gn.useColors=TF;gn.storage=AF();gn.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();gn.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function TF(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function EF(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Bl.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let n=0,r=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),t.splice(r,0,e)}gn.log=console.debug||console.log||(()=>{});function $F(t){try{t?gn.storage.setItem("debug",t):gn.storage.removeItem("debug")}catch{}}function RF(){let t;try{t=gn.storage.getItem("debug")||gn.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function AF(){try{return localStorage}catch{}}Bl.exports=Zh()(gn);var{formatters:PF}=Bl.exports;PF.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var cT=$((JG,aT)=>{"use strict";aT.exports=(t,e=process.argv)=>{let n=t.startsWith("-")?"":t.length===1?"-":"--",r=e.indexOf(n+t),o=e.indexOf("--");return r!==-1&&(o===-1||r<o)}});var pT=$((YG,uT)=>{"use strict";var CF=require("os"),lT=require("tty"),In=cT(),{env:Ot}=process,Gr;In("no-color")||In("no-colors")||In("color=false")||In("color=never")?Gr=0:(In("color")||In("colors")||In("color=true")||In("color=always"))&&(Gr=1);"FORCE_COLOR"in Ot&&(Ot.FORCE_COLOR==="true"?Gr=1:Ot.FORCE_COLOR==="false"?Gr=0:Gr=Ot.FORCE_COLOR.length===0?1:Math.min(parseInt(Ot.FORCE_COLOR,10),3));function Bh(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Hh(t,e){if(Gr===0)return 0;if(In("color=16m")||In("color=full")||In("color=truecolor"))return 3;if(In("color=256"))return 2;if(t&&!e&&Gr===void 0)return 0;let n=Gr||0;if(Ot.TERM==="dumb")return n;if(process.platform==="win32"){let r=CF.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Ot)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Ot)||Ot.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Ot)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ot.TEAMCITY_VERSION)?1:0;if(Ot.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ot){let r=parseInt((Ot.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ot.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ot.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ot.TERM)||"COLORTERM"in Ot?1:n}function IF(t){let e=Hh(t,t&&t.isTTY);return Bh(e)}uT.exports={supportsColor:IF,stdout:Bh(Hh(!0,lT.isatty(1))),stderr:Bh(Hh(!0,lT.isatty(2)))}});var fT=$((zt,Vl)=>{var OF=require("tty"),Hl=require("util");zt.init=FF;zt.log=LF;zt.formatArgs=NF;zt.save=DF;zt.load=MF;zt.useColors=zF;zt.destroy=Hl.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");zt.colors=[6,2,3,4,5,1];try{let t=pT();t&&(t.stderr||t).level>=2&&(zt.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}zt.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let n=e.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),r=process.env[e];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),t[n]=r,t},{});function zF(){return"colors"in zt.inspectOpts?!!zt.inspectOpts.colors:OF.isatty(process.stderr.fd)}function NF(t){let{namespace:e,useColors:n}=this;if(n){let r=this.color,o="\x1B[3"+(r<8?r:"8;5;"+r),i=` ${o};1m${e} \x1B[0m`;t[0]=i+t[0].split(`
|
|
11
11
|
`).join(`
|
|
12
|
-
`+i),t.push(o+"m+"+
|
|
13
|
-
`)}function
|
|
14
|
-
`).map(e=>e.trim()).join(" ")};
|
|
15
|
-
`).some(e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1)}function
|
|
12
|
+
`+i),t.push(o+"m+"+Vl.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=jF()+e+" "+t[0]}function jF(){return zt.inspectOpts.hideDate?"":new Date().toISOString()+" "}function LF(...t){return process.stderr.write(Hl.formatWithOptions(zt.inspectOpts,...t)+`
|
|
13
|
+
`)}function DF(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function MF(){return process.env.DEBUG}function FF(t){t.inspectOpts={};let e=Object.keys(zt.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=zt.inspectOpts[e[n]]}Vl.exports=Zh()(zt);var{formatters:dT}=Vl.exports;dT.o=function(t){return this.inspectOpts.colors=this.useColors,Hl.inspect(t,this.inspectOpts).split(`
|
|
14
|
+
`).map(e=>e.trim()).join(" ")};dT.O=function(t){return this.inspectOpts.colors=this.useColors,Hl.inspect(t,this.inspectOpts)}});var qo=$((XG,Vh)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Vh.exports=sT():Vh.exports=fT()});var mT=$(Gh=>{"use strict";Object.defineProperty(Gh,"__esModule",{value:!0});function UF(t){return function(e,n){return new Promise((r,o)=>{t.call(this,e,n,(i,s)=>{i?o(i):r(s)})})}}Gh.default=UF});var yT=$((Kh,gT)=>{"use strict";var hT=Kh&&Kh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},qF=require("events"),ZF=hT(qo()),BF=hT(mT()),va=ZF.default("agent-base");function HF(t){return!!t&&typeof t.addRequest=="function"}function Wh(){let{stack:t}=new Error;return typeof t!="string"?!1:t.split(`
|
|
15
|
+
`).some(e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1)}function Gl(t,e){return new Gl.Agent(t,e)}(function(t){class e extends qF.EventEmitter{constructor(r,o){super();let i=o;typeof r=="function"?this.callback=r:r&&(i=r),this.timeout=null,i&&typeof i.timeout=="number"&&(this.timeout=i.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:Wh()?443:80}set defaultPort(r){this.explicitDefaultPort=r}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:Wh()?"https:":"http:"}set protocol(r){this.explicitProtocol=r}callback(r,o,i){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(r,o){let i=Object.assign({},o);typeof i.secureEndpoint!="boolean"&&(i.secureEndpoint=Wh()),i.host==null&&(i.host="localhost"),i.port==null&&(i.port=i.secureEndpoint?443:80),i.protocol==null&&(i.protocol=i.secureEndpoint?"https:":"http:"),i.host&&i.path&&delete i.path,delete i.agent,delete i.hostname,delete i._defaultAgent,delete i.defaultPort,delete i.createConnection,r._last=!0,r.shouldKeepAlive=!1;let s=!1,a=null,c=i.timeout||this.timeout,l=h=>{r._hadError||(r.emit("error",h),r._hadError=!0)},p=()=>{a=null,s=!0;let h=new Error(`A "socket" was not created for HTTP request before ${c}ms`);h.code="ETIMEOUT",l(h)},d=h=>{s||(a!==null&&(clearTimeout(a),a=null),l(h))},f=h=>{if(s)return;if(a!=null&&(clearTimeout(a),a=null),HF(h)){va("Callback returned another Agent instance %o",h.constructor.name),h.addRequest(r,i);return}if(h){h.once("free",()=>{this.freeSocket(h,i)}),r.onSocket(h);return}let y=new Error(`no Duplex stream was returned to agent-base for \`${r.method} ${r.path}\``);l(y)};if(typeof this.callback!="function"){l(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(va("Converting legacy callback function to promise"),this.promisifiedCallback=BF.default(this.callback)):this.promisifiedCallback=this.callback),typeof c=="number"&&c>0&&(a=setTimeout(p,c)),"port"in i&&typeof i.port!="number"&&(i.port=Number(i.port));try{va("Resolving socket for %o request: %o",i.protocol,`${r.method} ${r.path}`),Promise.resolve(this.promisifiedCallback(r,i)).then(f,d)}catch(h){Promise.reject(h).catch(d)}}freeSocket(r,o){va("Freeing socket %o %o",r.constructor.name,o),r.destroy()}destroy(){va("Destroying agent %o",this.constructor.name)}}t.Agent=e,t.prototype=t.Agent.prototype})(Gl||(Gl={}));gT.exports=Gl});var xT=$(_a=>{"use strict";var VF=_a&&_a.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_a,"__esModule",{value:!0});var GF=VF(qo()),ba=GF.default("https-proxy-agent:parse-proxy-response");function WF(t){return new Promise((e,n)=>{let r=0,o=[];function i(){let d=t.read();d?p(d):t.once("readable",i)}function s(){t.removeListener("end",c),t.removeListener("error",l),t.removeListener("close",a),t.removeListener("readable",i)}function a(d){ba("onclose had error %o",d)}function c(){ba("onend")}function l(d){s(),ba("onerror %o",d),n(d)}function p(d){o.push(d),r+=d.length;let f=Buffer.concat(o,r);if(f.indexOf(`\r
|
|
16
16
|
\r
|
|
17
|
-
`)===-1){
|
|
18
|
-
`)),
|
|
19
|
-
`;r.auth&&(s["Proxy-Authorization"]=`Basic ${Buffer.from(r.auth).toString("base64")}`);let{host:l,port:p,secureEndpoint:d}=n;
|
|
20
|
-
`;let f=
|
|
21
|
-
`);let{statusCode:h,buffered:y}=yield f;if(h===200){if(e.once("socket",LF),n.secureEndpoint){xa("Upgrading socket connection to TLS");let x=n.servername||n.host;return lT.default.connect(Object.assign(Object.assign({},FF(n,"host","hostname","path","port")),{socket:i,servername:x}))}return i}i.destroy();let v=new cT.default.Socket({writable:!1});return v.readable=!0,e.once("socket",x=>{xa("replaying proxy buffer for failed request"),OF.default(x.listenerCount("data")>0),x.push(y),x.push(null)}),v})}};Uo.default=Bh;function LF(t){t.resume()}function DF(t,e){return!!(!e&&t===80||e&&t===443)}function MF(t){return typeof t=="string"?/^https:?$/i.test(t):!1}function FF(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}});var dT=$((Gh,pT)=>{"use strict";var UF=Gh&&Gh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Hh=UF(uT());function Vh(t){return new Hh.default(t)}(function(t){t.HttpsProxyAgent=Hh.default,t.prototype=Hh.default.prototype})(Vh||(Vh={}));pT.exports=Vh});var mT=$((MG,fT)=>{var va;fT.exports=function(){if(!va){try{va=Fo()("follow-redirects")}catch{}typeof va!="function"&&(va=function(){})}va.apply(null,arguments)}});var vT=$((FG,ig)=>{var _a=require("url"),ba=_a.URL,qF=require("http"),ZF=require("https"),Xh=require("stream").Writable,Qh=require("assert"),hT=mT();(function(){var e=typeof process<"u",n=typeof window<"u"&&typeof document<"u",r=Zo(Error.captureStackTrace);!e&&(n||!r)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var eg=!1;try{Qh(new ba(""))}catch(t){eg=t.code==="ERR_INVALID_URL"}var BF=["Authorization","Proxy-Authorization","Cookie"],HF=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],tg=["abort","aborted","connect","error","socket","timeout"],ng=Object.create(null);tg.forEach(function(t){ng[t]=function(e,n,r){this._redirectable.emit(t,e,n,r)}});var Kh=wa("ERR_INVALID_URL","Invalid URL",TypeError),Jh=wa("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),VF=wa("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Jh),GF=wa("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),WF=wa("ERR_STREAM_WRITE_AFTER_END","write after end"),KF=Xh.prototype.destroy||yT;function hn(t,e){Xh.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var n=this;this._onNativeResponse=function(r){try{n._processResponse(r)}catch(o){n.emit("error",o instanceof Jh?o:new Jh({cause:o}))}},this._headerFilter=new RegExp("^(?:"+BF.concat(t.sensitiveHeaders).map(tU).join("|")+")$","i"),this._performRequest()}hn.prototype=Object.create(Xh.prototype);hn.prototype.abort=function(){og(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};hn.prototype.destroy=function(t){return og(this._currentRequest,t),KF.call(this,t),this};hn.prototype.write=function(t,e,n){if(this._ending)throw new WF;if(!qo(t)&&!QF(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Zo(e)&&(n=e,e=null),t.length===0){n&&n();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,n)):(this.emit("error",new GF),this.abort())};hn.prototype.end=function(t,e,n){if(Zo(t)?(n=t,t=e=null):Zo(e)&&(n=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,n);else{var r=this,o=this._currentRequest;this.write(t,e,function(){r._ended=!0,o.end(null,null,n)}),this._ending=!0}};hn.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};hn.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};hn.prototype.setTimeout=function(t,e){var n=this;function r(s){s.setTimeout(t),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}function o(s){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout(function(){n.emit("timeout"),i()},t),r(s)}function i(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",i),n.removeListener("error",i),n.removeListener("response",i),n.removeListener("close",i),e&&n.removeListener("timeout",e),n.socket||n._currentRequest.removeListener("socket",o)}return e&&this.on("timeout",e),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",r),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){hn.prototype[t]=function(e,n){return this._currentRequest[t](e,n)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(hn.prototype,t,{get:function(){return this._currentRequest[t]}})});hn.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),XF(t.sensitiveHeaders)||(t.sensitiveHeaders=[]),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};hn.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var n=t.slice(0,-1);this._options.agent=this._options.agents[n]}var r=this._currentRequest=e.request(this._options,this._onNativeResponse);r._redirectable=this;for(var o of tg)r.on(o,ng[o]);if(this._currentUrl=/^\//.test(this._options.path)?_a.format(this._options):this._options.path,this._isRedirect){var i=0,s=this,a=this._requestBodyBuffers;(function c(l){if(r===s._currentRequest)if(l)s.emit("error",l);else if(i<a.length){var p=a[i++];r.finished||r.write(p.data,p.encoding,c)}else s._ended&&r.end()})()}};hn.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var n=t.headers.location;if(!n||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(og(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new VF;var r,o=this._options.beforeRedirect;o&&(r=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var i=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Wh(/^content-/i,this._options.headers));var s=Wh(/^host$/i,this._options.headers),a=rg(this._currentUrl),c=s||a.host,l=/^\w+:/.test(n)?this._currentUrl:_a.format(Object.assign(a,{host:c})),p=JF(n,l);if(hT("redirecting to",p.href),this._isRedirect=!0,Yh(p,this._options),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==c&&!YF(p.host,c))&&Wh(this._headerFilter,this._options.headers),Zo(o)){var d={headers:t.headers,statusCode:e},f={url:l,method:i,headers:r};o(this._options,d,f),this._sanitizeOptions(this._options)}this._performRequest()};function gT(t){var e={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(t).forEach(function(r){var o=r+":",i=n[o]=t[r],s=e[r]=Object.create(i);function a(l,p,d){return eU(l)?l=Yh(l):qo(l)?l=Yh(rg(l)):(d=p,p=xT(l),l={protocol:o}),Zo(p)&&(d=p,p=null),p=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},l,p),p.nativeProtocols=n,!qo(p.host)&&!qo(p.hostname)&&(p.hostname="::1"),Qh.equal(p.protocol,o,"protocol mismatch"),hT("options",p),new hn(p,d)}function c(l,p,d){var f=s.request(l,p,d);return f.end(),f}Object.defineProperties(s,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function yT(){}function rg(t){var e;if(eg)e=new ba(t);else if(e=xT(_a.parse(t)),!qo(e.protocol))throw new Kh({input:t});return e}function JF(t,e){return eg?new ba(t,e):rg(_a.resolve(e,t))}function xT(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new Kh({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new Kh({input:t.href||t});return t}function Yh(t,e){var n=e||{};for(var r of HF)n[r]=t[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),n.port!==""&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function Wh(t,e){var n;for(var r in e)t.test(r)&&(n=e[r],delete e[r]);return n===null||typeof n>"u"?void 0:String(n).trim()}function wa(t,e,n){function r(o){Zo(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,o||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+t+"]",enumerable:!1}}),r}function og(t,e){for(var n of tg)t.removeListener(n,ng[n]);t.on("error",yT),t.destroy(e)}function YF(t,e){Qh(qo(t)&&qo(e));var n=t.length-e.length-1;return n>0&&t[n]==="."&&t.endsWith(e)}function XF(t){return t instanceof Array}function qo(t){return typeof t=="string"||t instanceof String}function Zo(t){return typeof t=="function"}function QF(t){return typeof t=="object"&&"length"in t}function eU(t){return ba&&t instanceof ba}function tU(t){return t.replace(/[\]\\/()*+?.$]/g,"\\$&")}ig.exports=gT({http:qF,https:ZF});ig.exports.wrap=gT});var Y={};za(Y,{BRAND:()=>fR,DIRTY:()=>Qr,EMPTY_PATH:()=>H$,INVALID:()=>le,NEVER:()=>JR,OK:()=>Ht,ParseStatus:()=>Nt,Schema:()=>_e,ZodAny:()=>kr,ZodArray:()=>dr,ZodBigInt:()=>to,ZodBoolean:()=>no,ZodBranded:()=>ts,ZodCatch:()=>mo,ZodDate:()=>ro,ZodDefault:()=>fo,ZodDiscriminatedUnion:()=>La,ZodEffects:()=>Sn,ZodEnum:()=>uo,ZodError:()=>rn,ZodFirstPartyTypeKind:()=>q,ZodFunction:()=>Ma,ZodIntersection:()=>ao,ZodIssueCode:()=>U,ZodLazy:()=>co,ZodLiteral:()=>lo,ZodMap:()=>Qo,ZodNaN:()=>ti,ZodNativeEnum:()=>po,ZodNever:()=>zn,ZodNull:()=>io,ZodNullable:()=>Kn,ZodNumber:()=>eo,ZodObject:()=>sn,ZodOptional:()=>on,ZodParsedType:()=>K,ZodPipeline:()=>ns,ZodPromise:()=>Tr,ZodReadonly:()=>ho,ZodRecord:()=>Da,ZodSchema:()=>_e,ZodSet:()=>ei,ZodString:()=>Sr,ZodSymbol:()=>Yo,ZodTransformer:()=>Sn,ZodTuple:()=>Wn,ZodType:()=>_e,ZodUndefined:()=>oo,ZodUnion:()=>so,ZodUnknown:()=>pr,ZodVoid:()=>Xo,addIssueToContext:()=>H,any:()=>wR,array:()=>ER,bigint:()=>yR,boolean:()=>Ey,coerce:()=>KR,custom:()=>Sy,date:()=>xR,datetimeRegex:()=>_y,defaultErrorMap:()=>lr,discriminatedUnion:()=>AR,effect:()=>UR,enum:()=>DR,function:()=>NR,getErrorMap:()=>Wo,getParsedType:()=>Gn,instanceof:()=>hR,intersection:()=>IR,isAborted:()=>Na,isAsync:()=>Ko,isDirty:()=>ja,isValid:()=>wr,late:()=>mR,lazy:()=>jR,literal:()=>LR,makeIssue:()=>es,map:()=>OR,nan:()=>gR,nativeEnum:()=>MR,never:()=>kR,null:()=>_R,nullable:()=>ZR,number:()=>Ty,object:()=>ku,objectUtil:()=>_u,oboolean:()=>WR,onumber:()=>GR,optional:()=>qR,ostring:()=>VR,pipeline:()=>HR,preprocess:()=>BR,promise:()=>FR,quotelessJson:()=>q$,record:()=>PR,set:()=>zR,setErrorMap:()=>B$,strictObject:()=>$R,string:()=>ky,symbol:()=>vR,transformer:()=>UR,tuple:()=>CR,undefined:()=>bR,union:()=>RR,unknown:()=>SR,util:()=>Ae,void:()=>TR});var Ae;(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function n(o){throw new Error}t.assertNever=n,t.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},t.getValidEnumValues=o=>{let i=t.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(let a of i)s[a]=o[a];return t.objectValues(s)},t.objectValues=o=>t.objectKeys(o).map(function(i){return o[i]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},t.find=(o,i)=>{for(let s of o)if(i(s))return s},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ae||(Ae={}));var _u;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(_u||(_u={}));var K=Ae.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Gn=t=>{switch(typeof t){case"undefined":return K.undefined;case"string":return K.string;case"number":return Number.isNaN(t)?K.nan:K.number;case"boolean":return K.boolean;case"function":return K.function;case"bigint":return K.bigint;case"symbol":return K.symbol;case"object":return Array.isArray(t)?K.array:t===null?K.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?K.promise:typeof Map<"u"&&t instanceof Map?K.map:typeof Set<"u"&&t instanceof Set?K.set:typeof Date<"u"&&t instanceof Date?K.date:K.object;default:return K.unknown}};var U=Ae.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"]),q$=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),rn=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){let n=e||function(i){return i.message},r={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,c=0;for(;c<s.path.length;){let l=s.path[c];c===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(n(s))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(this),r}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ae.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){let n={},r=[];for(let o of this.issues)if(o.path.length>0){let i=o.path[0];n[i]=n[i]||[],n[i].push(e(o))}else r.push(e(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};rn.create=t=>new rn(t);var Z$=(t,e)=>{let n;switch(t.code){case U.invalid_type:t.received===K.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case U.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Ae.jsonStringifyReplacer)}`;break;case U.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ae.joinValues(t.keys,", ")}`;break;case U.invalid_union:n="Invalid input";break;case U.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ae.joinValues(t.options)}`;break;case U.invalid_enum_value:n=`Invalid enum value. Expected ${Ae.joinValues(t.options)}, received '${t.received}'`;break;case U.invalid_arguments:n="Invalid function arguments";break;case U.invalid_return_type:n="Invalid function return type";break;case U.invalid_date:n="Invalid date";break;case U.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Ae.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case U.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case U.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case U.custom:n="Invalid input";break;case U.invalid_intersection_types:n="Intersection results could not be merged";break;case U.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case U.not_finite:n="Number must be finite";break;default:n=e.defaultError,Ae.assertNever(t)}return{message:n}},lr=Z$;var gy=lr;function B$(t){gy=t}function Wo(){return gy}var es=t=>{let{data:e,path:n,errorMaps:r,issueData:o}=t,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",c=r.filter(l=>!!l).slice().reverse();for(let l of c)a=l(s,{data:e,defaultError:a}).message;return{...o,path:i,message:a}},H$=[];function H(t,e){let n=Wo(),r=es({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===lr?void 0:lr].filter(o=>!!o)});t.common.issues.push(r)}var Nt=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){let r=[];for(let o of n){if(o.status==="aborted")return le;o.status==="dirty"&&e.dirty(),r.push(o.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){let r=[];for(let o of n){let i=await o.key,s=await o.value;r.push({key:i,value:s})}return t.mergeObjectSync(e,r)}static mergeObjectSync(e,n){let r={};for(let o of n){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return le;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:e.value,value:r}}},le=Object.freeze({status:"aborted"}),Qr=t=>({status:"dirty",value:t}),Ht=t=>({status:"valid",value:t}),Na=t=>t.status==="aborted",ja=t=>t.status==="dirty",wr=t=>t.status==="valid",Ko=t=>typeof Promise<"u"&&t instanceof Promise;var ee;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ee||(ee={}));var wn=class{constructor(e,n,r,o){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=o}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}},yy=(t,e)=>{if(wr(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new rn(t.common.issues);return this._error=n,this._error}}};function xe(t){if(!t)return{};let{errorMap:e,invalid_type_error:n,required_error:r,description:o}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(s,a)=>{let{message:c}=t;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??n??a.defaultError}},description:o}}var _e=class{get description(){return this._def.description}_getType(e){return Gn(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Gn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Nt,ctx:{common:e.parent.common,data:e.data,parsedType:Gn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let n=this._parse(e);if(Ko(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){let n=this._parse(e);return Promise.resolve(n)}parse(e,n){let r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){let r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gn(e)},o=this._parseSync({data:e,path:r.path,parent:r});return yy(r,o)}"~validate"(e){var r,o;let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gn(e)};if(!this["~standard"].async)try{let i=this._parseSync({data:e,path:[],parent:n});return wr(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(o=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(i=>wr(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(e,n){let r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){let r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gn(e)},o=this._parse({data:e,path:r.path,parent:r}),i=await(Ko(o)?o:Promise.resolve(o));return yy(r,i)}refine(e,n){let r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{let s=e(o),a=()=>i.addIssue({code:U.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,o)=>e(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(e){return new Sn({schema:this,typeName:q.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return on.create(this,this._def)}nullable(){return Kn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return dr.create(this)}promise(){return Tr.create(this,this._def)}or(e){return so.create([this,e],this._def)}and(e){return ao.create(this,e,this._def)}transform(e){return new Sn({...xe(this._def),schema:this,typeName:q.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let n=typeof e=="function"?e:()=>e;return new fo({...xe(this._def),innerType:this,defaultValue:n,typeName:q.ZodDefault})}brand(){return new ts({typeName:q.ZodBranded,type:this,...xe(this._def)})}catch(e){let n=typeof e=="function"?e:()=>e;return new mo({...xe(this._def),innerType:this,catchValue:n,typeName:q.ZodCatch})}describe(e){let n=this.constructor;return new n({...this._def,description:e})}pipe(e){return ns.create(this,e)}readonly(){return ho.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},V$=/^c[^\s-]{8,}$/i,G$=/^[0-9a-z]+$/,W$=/^[0-9A-HJKMNP-TV-Z]{26}$/i,K$=/^[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,J$=/^[a-z0-9_-]{21}$/i,Y$=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,X$=/^[-+]?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)?)??$/,Q$=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,eR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",wu,tR=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nR=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,rR=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,oR=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,iR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,sR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,vy="((\\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])))",aR=new RegExp(`^${vy}$`);function by(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function cR(t){return new RegExp(`^${by(t)}$`)}function _y(t){let e=`${vy}T${by(t)}`,n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function lR(t,e){return!!((e==="v4"||!e)&&tR.test(t)||(e==="v6"||!e)&&rR.test(t))}function uR(t,e){if(!Y$.test(t))return!1;try{let[n]=t.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function pR(t,e){return!!((e==="v4"||!e)&&nR.test(t)||(e==="v6"||!e)&&oR.test(t))}var Sr=class t extends _e{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==K.string){let i=this._getOrReturnCtx(e);return H(i,{code:U.invalid_type,expected:K.string,received:i.parsedType}),le}let r=new Nt,o;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),H(o,{code:U.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),H(o,{code:U.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let s=e.data.length>i.value,a=e.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(e,o),s?H(o,{code:U.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&H(o,{code:U.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Q$.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"email",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")wu||(wu=new RegExp(eR,"u")),wu.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"emoji",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")K$.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"uuid",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")J$.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"nanoid",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")V$.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cuid",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")G$.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cuid2",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")W$.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"ulid",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),H(o,{validation:"url",code:U.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"regex",code:U.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?_y(i).test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?aR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?cR(i).test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?X$.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"duration",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?lR(e.data,i.version)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"ip",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?uR(e.data,i.alg)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"jwt",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?pR(e.data,i.version)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cidr",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?iR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"base64",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?sR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"base64url",code:U.invalid_string,message:i.message}),r.dirty()):Ae.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(o=>e.test(o),{validation:n,code:U.invalid_string,...ee.errToObj(r)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ee.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ee.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ee.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ee.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ee.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ee.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ee.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ee.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ee.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ee.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ee.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ee.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ee.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...ee.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ee.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ee.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...ee.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...ee.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...ee.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...ee.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...ee.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...ee.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...ee.errToObj(n)})}nonempty(e){return this.min(1,ee.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};Sr.create=t=>new Sr({checks:[],typeName:q.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...xe(t)});function dR(t,e){let n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(t.toFixed(o).replace(".","")),s=Number.parseInt(e.toFixed(o).replace(".",""));return i%s/10**o}var eo=class t extends _e{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==K.number){let i=this._getOrReturnCtx(e);return H(i,{code:U.invalid_type,expected:K.number,received:i.parsedType}),le}let r,o=new Nt;for(let i of this._def.checks)i.kind==="int"?Ae.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),H(r,{code:U.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?dR(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),H(r,{code:U.not_finite,message:i.message}),o.dirty()):Ae.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ee.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ee.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ee.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ee.toString(n))}setLimit(e,n,r,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ee.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ee.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ee.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ee.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:ee.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ee.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ee.toString(e)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ae.isInteger(e.value))}get isFinite(){let e=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}};eo.create=t=>new eo({checks:[],typeName:q.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...xe(t)});var to=class t extends _e{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==K.bigint)return this._getInvalidInput(e);let r,o=new Nt;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ae.assertNever(i);return{status:o.value,value:e.data}}_getInvalidInput(e){let n=this._getOrReturnCtx(e);return H(n,{code:U.invalid_type,expected:K.bigint,received:n.parsedType}),le}gte(e,n){return this.setLimit("min",e,!0,ee.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ee.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ee.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ee.toString(n))}setLimit(e,n,r,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ee.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ee.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ee.toString(n)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};to.create=t=>new to({checks:[],typeName:q.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...xe(t)});var no=class extends _e{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==K.boolean){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.boolean,received:r.parsedType}),le}return Ht(e.data)}};no.create=t=>new no({typeName:q.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...xe(t)});var ro=class t extends _e{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==K.date){let i=this._getOrReturnCtx(e);return H(i,{code:U.invalid_type,expected:K.date,received:i.parsedType}),le}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return H(i,{code:U.invalid_date}),le}let r=new Nt,o;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),H(o,{code:U.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),H(o,{code:U.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ae.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:ee.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:ee.toString(n)})}get minDate(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};ro.create=t=>new ro({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:q.ZodDate,...xe(t)});var Yo=class extends _e{_parse(e){if(this._getType(e)!==K.symbol){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.symbol,received:r.parsedType}),le}return Ht(e.data)}};Yo.create=t=>new Yo({typeName:q.ZodSymbol,...xe(t)});var oo=class extends _e{_parse(e){if(this._getType(e)!==K.undefined){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.undefined,received:r.parsedType}),le}return Ht(e.data)}};oo.create=t=>new oo({typeName:q.ZodUndefined,...xe(t)});var io=class extends _e{_parse(e){if(this._getType(e)!==K.null){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.null,received:r.parsedType}),le}return Ht(e.data)}};io.create=t=>new io({typeName:q.ZodNull,...xe(t)});var kr=class extends _e{constructor(){super(...arguments),this._any=!0}_parse(e){return Ht(e.data)}};kr.create=t=>new kr({typeName:q.ZodAny,...xe(t)});var pr=class extends _e{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ht(e.data)}};pr.create=t=>new pr({typeName:q.ZodUnknown,...xe(t)});var zn=class extends _e{_parse(e){let n=this._getOrReturnCtx(e);return H(n,{code:U.invalid_type,expected:K.never,received:n.parsedType}),le}};zn.create=t=>new zn({typeName:q.ZodNever,...xe(t)});var Xo=class extends _e{_parse(e){if(this._getType(e)!==K.undefined){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.void,received:r.parsedType}),le}return Ht(e.data)}};Xo.create=t=>new Xo({typeName:q.ZodVoid,...xe(t)});var dr=class t extends _e{_parse(e){let{ctx:n,status:r}=this._processInputParams(e),o=this._def;if(n.parsedType!==K.array)return H(n,{code:U.invalid_type,expected:K.array,received:n.parsedType}),le;if(o.exactLength!==null){let s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(H(n,{code:s?U.too_big:U.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(H(n,{code:U.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(H(n,{code:U.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new wn(n,s,n.path,a)))).then(s=>Nt.mergeArray(r,s));let i=[...n.data].map((s,a)=>o.type._parseSync(new wn(n,s,n.path,a)));return Nt.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new t({...this._def,minLength:{value:e,message:ee.toString(n)}})}max(e,n){return new t({...this._def,maxLength:{value:e,message:ee.toString(n)}})}length(e,n){return new t({...this._def,exactLength:{value:e,message:ee.toString(n)}})}nonempty(e){return this.min(1,e)}};dr.create=(t,e)=>new dr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:q.ZodArray,...xe(e)});function Jo(t){if(t instanceof sn){let e={};for(let n in t.shape){let r=t.shape[n];e[n]=on.create(Jo(r))}return new sn({...t._def,shape:()=>e})}else return t instanceof dr?new dr({...t._def,type:Jo(t.element)}):t instanceof on?on.create(Jo(t.unwrap())):t instanceof Kn?Kn.create(Jo(t.unwrap())):t instanceof Wn?Wn.create(t.items.map(e=>Jo(e))):t}var sn=class t extends _e{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),n=Ae.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==K.object){let l=this._getOrReturnCtx(e);return H(l,{code:U.invalid_type,expected:K.object,received:l.parsedType}),le}let{status:r,ctx:o}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof zn&&this._def.unknownKeys==="strip"))for(let l in o.data)s.includes(l)||a.push(l);let c=[];for(let l of s){let p=i[l],d=o.data[l];c.push({key:{status:"valid",value:l},value:p._parse(new wn(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof zn){let l=this._def.unknownKeys;if(l==="passthrough")for(let p of a)c.push({key:{status:"valid",value:p},value:{status:"valid",value:o.data[p]}});else if(l==="strict")a.length>0&&(H(o,{code:U.unrecognized_keys,keys:a}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let p of a){let d=o.data[p];c.push({key:{status:"valid",value:p},value:l._parse(new wn(o,d,o.path,p)),alwaysSet:p in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let l=[];for(let p of c){let d=await p.key,f=await p.value;l.push({key:d,value:f,alwaysSet:p.alwaysSet})}return l}).then(l=>Nt.mergeObjectSync(r,l)):Nt.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(e){return ee.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var i,s;let o=((s=(i=this._def).errorMap)==null?void 0:s.call(i,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:ee.errToObj(e).message??o}:{message:o}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:q.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let n={};for(let r of Ae.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}omit(e){let n={};for(let r of Ae.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}deepPartial(){return Jo(this)}partial(e){let n={};for(let r of Ae.objectKeys(this.shape)){let o=this.shape[r];e&&!e[r]?n[r]=o:n[r]=o.optional()}return new t({...this._def,shape:()=>n})}required(e){let n={};for(let r of Ae.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof on;)i=i._def.innerType;n[r]=i}return new t({...this._def,shape:()=>n})}keyof(){return wy(Ae.objectKeys(this.shape))}};sn.create=(t,e)=>new sn({shape:()=>t,unknownKeys:"strip",catchall:zn.create(),typeName:q.ZodObject,...xe(e)});sn.strictCreate=(t,e)=>new sn({shape:()=>t,unknownKeys:"strict",catchall:zn.create(),typeName:q.ZodObject,...xe(e)});sn.lazycreate=(t,e)=>new sn({shape:t,unknownKeys:"strip",catchall:zn.create(),typeName:q.ZodObject,...xe(e)});var so=class extends _e{_parse(e){let{ctx:n}=this._processInputParams(e),r=this._def.options;function o(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new rn(a.ctx.common.issues));return H(n,{code:U.invalid_union,unionErrors:s}),le}if(n.common.async)return Promise.all(r.map(async i=>{let s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let c of r){let l={...n,common:{...n.common,issues:[]},parent:null},p=c._parseSync({data:n.data,path:n.path,parent:l});if(p.status==="valid")return p;p.status==="dirty"&&!i&&(i={result:p,ctx:l}),l.common.issues.length&&s.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new rn(c));return H(n,{code:U.invalid_union,unionErrors:a}),le}}get options(){return this._def.options}};so.create=(t,e)=>new so({options:t,typeName:q.ZodUnion,...xe(e)});var ur=t=>t instanceof co?ur(t.schema):t instanceof Sn?ur(t.innerType()):t instanceof lo?[t.value]:t instanceof uo?t.options:t instanceof po?Ae.objectValues(t.enum):t instanceof fo?ur(t._def.innerType):t instanceof oo?[void 0]:t instanceof io?[null]:t instanceof on?[void 0,...ur(t.unwrap())]:t instanceof Kn?[null,...ur(t.unwrap())]:t instanceof ts||t instanceof ho?ur(t.unwrap()):t instanceof mo?ur(t._def.innerType):[],La=class t extends _e{_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==K.object)return H(n,{code:U.invalid_type,expected:K.object,received:n.parsedType}),le;let r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(H(n,{code:U.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),le)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){let o=new Map;for(let i of n){let s=ur(i.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of s){if(o.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);o.set(a,i)}}return new t({typeName:q.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:o,...xe(r)})}};function Su(t,e){let n=Gn(t),r=Gn(e);if(t===e)return{valid:!0,data:t};if(n===K.object&&r===K.object){let o=Ae.objectKeys(e),i=Ae.objectKeys(t).filter(a=>o.indexOf(a)!==-1),s={...t,...e};for(let a of i){let c=Su(t[a],e[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(n===K.array&&r===K.array){if(t.length!==e.length)return{valid:!1};let o=[];for(let i=0;i<t.length;i++){let s=t[i],a=e[i],c=Su(s,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return n===K.date&&r===K.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var ao=class extends _e{_parse(e){let{status:n,ctx:r}=this._processInputParams(e),o=(i,s)=>{if(Na(i)||Na(s))return le;let a=Su(i.value,s.value);return a.valid?((ja(i)||ja(s))&&n.dirty(),{status:n.value,value:a.data}):(H(r,{code:U.invalid_intersection_types}),le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};ao.create=(t,e,n)=>new ao({left:t,right:e,typeName:q.ZodIntersection,...xe(n)});var Wn=class t extends _e{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==K.array)return H(r,{code:U.invalid_type,expected:K.array,received:r.parsedType}),le;if(r.data.length<this._def.items.length)return H(r,{code:U.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),le;!this._def.rest&&r.data.length>this._def.items.length&&(H(r,{code:U.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new wn(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>Nt.mergeArray(n,s)):Nt.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Wn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Wn({items:t,typeName:q.ZodTuple,rest:null,...xe(e)})};var Da=class t extends _e{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==K.object)return H(r,{code:U.invalid_type,expected:K.object,received:r.parsedType}),le;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in r.data)o.push({key:i._parse(new wn(r,a,r.path,a)),value:s._parse(new wn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Nt.mergeObjectAsync(n,o):Nt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof _e?new t({keyType:e,valueType:n,typeName:q.ZodRecord,...xe(r)}):new t({keyType:Sr.create(),valueType:e,typeName:q.ZodRecord,...xe(n)})}},Qo=class extends _e{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==K.map)return H(r,{code:U.invalid_type,expected:K.map,received:r.parsedType}),le;let o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,c],l)=>({key:o._parse(new wn(r,a,r.path,[l,"key"])),value:i._parse(new wn(r,c,r.path,[l,"value"]))}));if(r.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let l=await c.key,p=await c.value;if(l.status==="aborted"||p.status==="aborted")return le;(l.status==="dirty"||p.status==="dirty")&&n.dirty(),a.set(l.value,p.value)}return{status:n.value,value:a}})}else{let a=new Map;for(let c of s){let l=c.key,p=c.value;if(l.status==="aborted"||p.status==="aborted")return le;(l.status==="dirty"||p.status==="dirty")&&n.dirty(),a.set(l.value,p.value)}return{status:n.value,value:a}}}};Qo.create=(t,e,n)=>new Qo({valueType:e,keyType:t,typeName:q.ZodMap,...xe(n)});var ei=class t extends _e{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==K.set)return H(r,{code:U.invalid_type,expected:K.set,received:r.parsedType}),le;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(H(r,{code:U.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(H(r,{code:U.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());let i=this._def.valueType;function s(c){let l=new Set;for(let p of c){if(p.status==="aborted")return le;p.status==="dirty"&&n.dirty(),l.add(p.value)}return{status:n.value,value:l}}let a=[...r.data.values()].map((c,l)=>i._parse(new wn(r,c,r.path,l)));return r.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(e,n){return new t({...this._def,minSize:{value:e,message:ee.toString(n)}})}max(e,n){return new t({...this._def,maxSize:{value:e,message:ee.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};ei.create=(t,e)=>new ei({valueType:t,minSize:null,maxSize:null,typeName:q.ZodSet,...xe(e)});var Ma=class t extends _e{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==K.function)return H(n,{code:U.invalid_type,expected:K.function,received:n.parsedType}),le;function r(a,c){return es({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Wo(),lr].filter(l=>!!l),issueData:{code:U.invalid_arguments,argumentsError:c}})}function o(a,c){return es({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Wo(),lr].filter(l=>!!l),issueData:{code:U.invalid_return_type,returnTypeError:c}})}let i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof Tr){let a=this;return Ht(async function(...c){let l=new rn([]),p=await a._def.args.parseAsync(c,i).catch(h=>{throw l.addIssue(r(c,h)),l}),d=await Reflect.apply(s,this,p);return await a._def.returns._def.type.parseAsync(d,i).catch(h=>{throw l.addIssue(o(d,h)),l})})}else{let a=this;return Ht(function(...c){let l=a._def.args.safeParse(c,i);if(!l.success)throw new rn([r(c,l.error)]);let p=Reflect.apply(s,this,l.data),d=a._def.returns.safeParse(p,i);if(!d.success)throw new rn([o(p,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Wn.create(e).rest(pr.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new t({args:e||Wn.create([]).rest(pr.create()),returns:n||pr.create(),typeName:q.ZodFunction,...xe(r)})}},co=class extends _e{get schema(){return this._def.getter()}_parse(e){let{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};co.create=(t,e)=>new co({getter:t,typeName:q.ZodLazy,...xe(e)});var lo=class extends _e{_parse(e){if(e.data!==this._def.value){let n=this._getOrReturnCtx(e);return H(n,{received:n.data,code:U.invalid_literal,expected:this._def.value}),le}return{status:"valid",value:e.data}}get value(){return this._def.value}};lo.create=(t,e)=>new lo({value:t,typeName:q.ZodLiteral,...xe(e)});function wy(t,e){return new uo({values:t,typeName:q.ZodEnum,...xe(e)})}var uo=class t extends _e{_parse(e){if(typeof e.data!="string"){let n=this._getOrReturnCtx(e),r=this._def.values;return H(n,{expected:Ae.joinValues(r),received:n.parsedType,code:U.invalid_type}),le}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let n=this._getOrReturnCtx(e),r=this._def.values;return H(n,{received:n.data,code:U.invalid_enum_value,options:r}),le}return Ht(e.data)}get options(){return this._def.values}get enum(){let e={};for(let n of this._def.values)e[n]=n;return e}get Values(){let e={};for(let n of this._def.values)e[n]=n;return e}get Enum(){let e={};for(let n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return t.create(e,{...this._def,...n})}exclude(e,n=this._def){return t.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}};uo.create=wy;var po=class extends _e{_parse(e){let n=Ae.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==K.string&&r.parsedType!==K.number){let o=Ae.objectValues(n);return H(r,{expected:Ae.joinValues(o),received:r.parsedType,code:U.invalid_type}),le}if(this._cache||(this._cache=new Set(Ae.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let o=Ae.objectValues(n);return H(r,{received:r.data,code:U.invalid_enum_value,options:o}),le}return Ht(e.data)}get enum(){return this._def.values}};po.create=(t,e)=>new po({values:t,typeName:q.ZodNativeEnum,...xe(e)});var Tr=class extends _e{unwrap(){return this._def.type}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==K.promise&&n.common.async===!1)return H(n,{code:U.invalid_type,expected:K.promise,received:n.parsedType}),le;let r=n.parsedType===K.promise?n.data:Promise.resolve(n.data);return Ht(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};Tr.create=(t,e)=>new Tr({type:t,typeName:q.ZodPromise,...xe(e)});var Sn=class extends _e{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===q.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:n,ctx:r}=this._processInputParams(e),o=this._def.effect||null,i={addIssue:s=>{H(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return le;let c=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return c.status==="aborted"?le:c.status==="dirty"?Qr(c.value):n.value==="dirty"?Qr(c.value):c});{if(n.value==="aborted")return le;let a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?le:a.status==="dirty"?Qr(a.value):n.value==="dirty"?Qr(a.value):a}}if(o.type==="refinement"){let s=a=>{let c=o.refinement(a,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?le:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?le:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!wr(s))return le;let a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>wr(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):le);Ae.assertNever(o)}};Sn.create=(t,e,n)=>new Sn({schema:t,typeName:q.ZodEffects,effect:e,...xe(n)});Sn.createWithPreprocess=(t,e,n)=>new Sn({schema:e,effect:{type:"preprocess",transform:t},typeName:q.ZodEffects,...xe(n)});var on=class extends _e{_parse(e){return this._getType(e)===K.undefined?Ht(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};on.create=(t,e)=>new on({innerType:t,typeName:q.ZodOptional,...xe(e)});var Kn=class extends _e{_parse(e){return this._getType(e)===K.null?Ht(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Kn.create=(t,e)=>new Kn({innerType:t,typeName:q.ZodNullable,...xe(e)});var fo=class extends _e{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return n.parsedType===K.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};fo.create=(t,e)=>new fo({innerType:t,typeName:q.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...xe(e)});var mo=class extends _e{_parse(e){let{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ko(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new rn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new rn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};mo.create=(t,e)=>new mo({innerType:t,typeName:q.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...xe(e)});var ti=class extends _e{_parse(e){if(this._getType(e)!==K.nan){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.nan,received:r.parsedType}),le}return{status:"valid",value:e.data}}};ti.create=t=>new ti({typeName:q.ZodNaN,...xe(t)});var fR=Symbol("zod_brand"),ts=class extends _e{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},ns=class t extends _e{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?le:i.status==="dirty"?(n.dirty(),Qr(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?le:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(e,n){return new t({in:e,out:n,typeName:q.ZodPipeline})}},ho=class extends _e{_parse(e){let n=this._def.innerType._parse(e),r=o=>(wr(o)&&(o.value=Object.freeze(o.value)),o);return Ko(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}};ho.create=(t,e)=>new ho({innerType:t,typeName:q.ZodReadonly,...xe(e)});function xy(t,e){let n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function Sy(t,e={},n){return t?kr.create().superRefine((r,o)=>{let i=t(r);if(i instanceof Promise)return i.then(s=>{if(!s){let a=xy(e,r),c=a.fatal??n??!0;o.addIssue({code:"custom",...a,fatal:c})}});if(!i){let s=xy(e,r),a=s.fatal??n??!0;o.addIssue({code:"custom",...s,fatal:a})}}):kr.create()}var mR={object:sn.lazycreate},q;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(q||(q={}));var hR=(t,e={message:`Input not instance of ${t.name}`})=>Sy(n=>n instanceof t,e),ky=Sr.create,Ty=eo.create,gR=ti.create,yR=to.create,Ey=no.create,xR=ro.create,vR=Yo.create,bR=oo.create,_R=io.create,wR=kr.create,SR=pr.create,kR=zn.create,TR=Xo.create,ER=dr.create,ku=sn.create,$R=sn.strictCreate,RR=so.create,AR=La.create,IR=ao.create,CR=Wn.create,PR=Da.create,OR=Qo.create,zR=ei.create,NR=Ma.create,jR=co.create,LR=lo.create,DR=uo.create,MR=po.create,FR=Tr.create,UR=Sn.create,qR=on.create,ZR=Kn.create,BR=Sn.createWithPreprocess,HR=ns.create,VR=()=>ky().optional(),GR=()=>Ty().optional(),WR=()=>Ey().optional(),KR={string:(t=>Sr.create({...t,coerce:!0})),number:(t=>eo.create({...t,coerce:!0})),boolean:(t=>no.create({...t,coerce:!0})),bigint:(t=>to.create({...t,coerce:!0})),date:(t=>ro.create({...t,coerce:!0}))};var JR=le;var YR=Object.freeze({status:"aborted"});function I(t,e,n){function r(a,c){var l;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(l=a._zod).traits??(l.traits=new Set),a._zod.traits.add(t),e(a,c);for(let p in s.prototype)p in a||Object.defineProperty(a,p,{value:s.prototype[p].bind(a)});a._zod.constr=s,a._zod.def=c}let o=(n==null?void 0:n.Parent)??Object;class i extends o{}Object.defineProperty(i,"name",{value:t});function s(a){var c;let l=n!=null&&n.Parent?new i:this;r(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let p of l._zod.deferred)p();return l}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>{var c,l;return n!=null&&n.Parent&&a instanceof n.Parent?!0:(l=(c=a==null?void 0:a._zod)==null?void 0:c.traits)==null?void 0:l.has(t)}}),Object.defineProperty(s,"name",{value:t}),s}var XR=Symbol("zod_brand"),fr=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Fa={};function gn(t){return t&&Object.assign(Fa,t),Fa}var Ce={};za(Ce,{BIGINT_FORMAT_RANGES:()=>Ry,Class:()=>Eu,NUMBER_FORMAT_RANGES:()=>Ou,aborted:()=>yo,allowsEval:()=>Iu,assert:()=>rA,assertEqual:()=>QR,assertIs:()=>tA,assertNever:()=>nA,assertNotEqual:()=>eA,assignProp:()=>Au,cached:()=>is,captureStackTrace:()=>qa,cleanEnum:()=>gA,cleanRegex:()=>as,clone:()=>yn,createTransparentProxy:()=>lA,defineLazy:()=>et,esc:()=>go,escapeRegex:()=>Er,extend:()=>dA,finalizeIssue:()=>Nn,floatSafeRemainder:()=>Ru,getElementAtPath:()=>oA,getEnumValues:()=>os,getLengthableOrigin:()=>cs,getParsedType:()=>cA,getSizableOrigin:()=>Ay,isObject:()=>ni,isPlainObject:()=>ri,issue:()=>zu,joinValues:()=>Ua,jsonStringifyReplacer:()=>$u,merge:()=>fA,normalizeParams:()=>ue,nullish:()=>ss,numKeys:()=>aA,omit:()=>pA,optionalKeys:()=>Pu,partial:()=>mA,pick:()=>uA,prefixIssues:()=>Jn,primitiveTypes:()=>$y,promiseAllObject:()=>iA,propertyKeyTypes:()=>Cu,randomString:()=>sA,required:()=>hA,stringifyPrimitive:()=>Za,unwrapMessage:()=>rs});function QR(t){return t}function eA(t){return t}function tA(t){}function nA(t){throw new Error}function rA(t){}function os(t){let e=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,o])=>e.indexOf(+r)===-1).map(([r,o])=>o)}function Ua(t,e="|"){return t.map(n=>Za(n)).join(e)}function $u(t,e){return typeof e=="bigint"?e.toString():e}function is(t){return{get value(){{let n=t();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function ss(t){return t==null}function as(t){let e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function Ru(t,e){let n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(t.toFixed(o).replace(".","")),s=Number.parseInt(e.toFixed(o).replace(".",""));return i%s/10**o}function et(t,e,n){Object.defineProperty(t,e,{get(){{let o=n();return t[e]=o,o}throw new Error("cached value already set")},set(o){Object.defineProperty(t,e,{value:o})},configurable:!0})}function Au(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function oA(t,e){return e?e.reduce((n,r)=>n==null?void 0:n[r],t):t}function iA(t){let e=Object.keys(t),n=e.map(r=>t[r]);return Promise.all(n).then(r=>{let o={};for(let i=0;i<e.length;i++)o[e[i]]=r[i];return o})}function sA(t=10){let e="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<t;r++)n+=e[Math.floor(Math.random()*e.length)];return n}function go(t){return JSON.stringify(t)}var qa=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};function ni(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var Iu=is(()=>{var t;if(typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)!=null&&t.includes("Cloudflare")))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function ri(t){if(ni(t)===!1)return!1;let e=t.constructor;if(e===void 0)return!0;let n=e.prototype;return!(ni(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function aA(t){let e=0;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}var cA=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},Cu=new Set(["string","number","symbol"]),$y=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Er(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yn(t,e,n){let r=new t._zod.constr(e??t._zod.def);return(!e||n!=null&&n.parent)&&(r._zod.parent=t),r}function ue(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if((e==null?void 0:e.message)!==void 0){if((e==null?void 0:e.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function lA(t){let e;return new Proxy({},{get(n,r,o){return e??(e=t()),Reflect.get(e,r,o)},set(n,r,o,i){return e??(e=t()),Reflect.set(e,r,o,i)},has(n,r){return e??(e=t()),Reflect.has(e,r)},deleteProperty(n,r){return e??(e=t()),Reflect.deleteProperty(e,r)},ownKeys(n){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(n,r){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,r)},defineProperty(n,r,o){return e??(e=t()),Reflect.defineProperty(e,r,o)}})}function Za(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Pu(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var Ou={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]},Ry={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function uA(t,e){let n={},r=t._zod.def;for(let o in e){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&(n[o]=r.shape[o])}return yn(t,{...t._zod.def,shape:n,checks:[]})}function pA(t,e){let n={...t._zod.def.shape},r=t._zod.def;for(let o in e){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&delete n[o]}return yn(t,{...t._zod.def,shape:n,checks:[]})}function dA(t,e){if(!ri(e))throw new Error("Invalid input to extend: expected a plain object");let n={...t._zod.def,get shape(){let r={...t._zod.def.shape,...e};return Au(this,"shape",r),r},checks:[]};return yn(t,n)}function fA(t,e){return yn(t,{...t._zod.def,get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return Au(this,"shape",n),n},catchall:e._zod.def.catchall,checks:[]})}function mA(t,e,n){let r=e._zod.def.shape,o={...r};if(n)for(let i in n){if(!(i in r))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(o[i]=t?new t({type:"optional",innerType:r[i]}):r[i])}else for(let i in r)o[i]=t?new t({type:"optional",innerType:r[i]}):r[i];return yn(e,{...e._zod.def,shape:o,checks:[]})}function hA(t,e,n){let r=e._zod.def.shape,o={...r};if(n)for(let i in n){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(o[i]=new t({type:"nonoptional",innerType:r[i]}))}else for(let i in r)o[i]=new t({type:"nonoptional",innerType:r[i]});return yn(e,{...e._zod.def,shape:o,checks:[]})}function yo(t,e=0){var n;for(let r=e;r<t.issues.length;r++)if(((n=t.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function Jn(t,e){return e.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(t),n})}function rs(t){return typeof t=="string"?t:t==null?void 0:t.message}function Nn(t,e,n){var o,i,s,a,c,l;let r={...t,path:t.path??[]};if(!t.message){let p=rs((s=(i=(o=t.inst)==null?void 0:o._zod.def)==null?void 0:i.error)==null?void 0:s.call(i,t))??rs((a=e==null?void 0:e.error)==null?void 0:a.call(e,t))??rs((c=n.customError)==null?void 0:c.call(n,t))??rs((l=n.localeError)==null?void 0:l.call(n,t))??"Invalid input";r.message=p}return delete r.inst,delete r.continue,e!=null&&e.reportInput||delete r.input,r}function Ay(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function cs(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function zu(...t){let[e,n,r]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:r}:{...e}}function gA(t){return Object.entries(t).filter(([e,n])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}var Eu=class{constructor(...e){}};var Iy=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),Object.defineProperty(t,"message",{get(){return JSON.stringify(e,$u,2)},enumerable:!0}),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Ba=I("$ZodError",Iy),ls=I("$ZodError",Iy,{Parent:Error});function Nu(t,e=n=>n.message){let n={},r=[];for(let o of t.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(e(o))):r.push(e(o));return{formErrors:r,fieldErrors:n}}function ju(t,e){let n=e||function(i){return i.message},r={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>o({issues:a}));else if(s.code==="invalid_key")o({issues:s.issues});else if(s.code==="invalid_element")o({issues:s.issues});else if(s.path.length===0)r._errors.push(n(s));else{let a=r,c=0;for(;c<s.path.length;){let l=s.path[c];c===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(n(s))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(t),r}var Lu=t=>(e,n,r,o)=>{let i=r?Object.assign(r,{async:!1}):{async:!1},s=e._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new fr;if(s.issues.length){let a=new((o==null?void 0:o.Err)??t)(s.issues.map(c=>Nn(c,i,gn())));throw qa(a,o==null?void 0:o.callee),a}return s.value},Du=Lu(ls),Mu=t=>async(e,n,r,o)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},s=e._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new((o==null?void 0:o.Err)??t)(s.issues.map(c=>Nn(c,i,gn())));throw qa(a,o==null?void 0:o.callee),a}return s.value},Fu=Mu(ls),Uu=t=>(e,n,r)=>{let o=r?{...r,async:!1}:{async:!1},i=e._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new fr;return i.issues.length?{success:!1,error:new(t??Ba)(i.issues.map(s=>Nn(s,o,gn())))}:{success:!0,data:i.value}},xo=Uu(ls),qu=t=>async(e,n,r)=>{let o=r?Object.assign(r,{async:!0}):{async:!0},i=e._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new t(i.issues.map(s=>Nn(s,o,gn())))}:{success:!0,data:i.value}},vo=qu(ls);var Cy=/^[cC][^\s-]{8,}$/,Py=/^[0-9a-z]+$/,Oy=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,zy=/^[0-9a-vA-V]{20}$/,Ny=/^[A-Za-z0-9]{27}$/,jy=/^[a-zA-Z0-9_-]{21}$/,Ly=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Dy=/^([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})$/,Zu=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[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)$/;var My=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var xA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Fy(){return new RegExp(xA,"u")}var Uy=/^(?:(?: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])$/,qy=/^(([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})$/,Zy=/^((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])$/,By=/^(([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])$/,Hy=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Bu=/^[A-Za-z0-9_-]*$/,Vy=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;var Gy=/^\+(?:[0-9]){6,14}[0-9]$/,Wy="(?:(?:\\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])))",Ky=new RegExp(`^${Wy}$`);function Jy(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Yy(t){return new RegExp(`^${Jy(t)}$`)}function Xy(t){let e=Jy({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-]\\d{2}:\\d{2})");let r=`${e}(?:${n.join("|")})`;return new RegExp(`^${Wy}T(?:${r})$`)}var Qy=t=>{let e=t?`[\\s\\S]{${(t==null?void 0:t.minimum)??0},${(t==null?void 0:t.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)};var ex=/^\d+$/,tx=/^-?\d+(?:\.\d+)?/i,nx=/true|false/i,rx=/null/i;var ox=/^[^A-Z]*$/,ix=/^[^a-z]*$/;var jt=I("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),sx={number:"number",bigint:"bigint",object:"date"},Hu=I("$ZodCheckLessThan",(t,e)=>{jt.init(t,e);let n=sx[typeof e.value];t._zod.onattach.push(r=>{let o=r._zod.bag,i=(e.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<i&&(e.inclusive?o.maximum=e.value:o.exclusiveMaximum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value<=e.value:r.value<e.value)||r.issues.push({origin:n,code:"too_big",maximum:e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Vu=I("$ZodCheckGreaterThan",(t,e)=>{jt.init(t,e);let n=sx[typeof e.value];t._zod.onattach.push(r=>{let o=r._zod.bag,i=(e.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>i&&(e.inclusive?o.minimum=e.value:o.exclusiveMinimum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value>=e.value:r.value>e.value)||r.issues.push({origin:n,code:"too_small",minimum:e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),ax=I("$ZodCheckMultipleOf",(t,e)=>{jt.init(t,e),t._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):Ru(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),cx=I("$ZodCheckNumberFormat",(t,e)=>{var s;jt.init(t,e),e.format=e.format||"float64";let n=(s=e.format)==null?void 0:s.includes("int"),r=n?"int":"number",[o,i]=Ou[e.format];t._zod.onattach.push(a=>{let c=a._zod.bag;c.format=e.format,c.minimum=o,c.maximum=i,n&&(c.pattern=ex)}),t._zod.check=a=>{let c=a.value;if(n){if(!Number.isInteger(c)){a.issues.push({expected:r,format:e.format,code:"invalid_type",input:c,inst:t});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,continue:!e.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,continue:!e.abort});return}}c<o&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:t,continue:!e.abort}),c>i&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inst:t})}});var lx=I("$ZodCheckMaxLength",(t,e)=>{var n;jt.init(t,e),(n=t._zod.def).when??(n.when=r=>{let o=r.value;return!ss(o)&&o.length!==void 0}),t._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<o&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{let o=r.value;if(o.length<=e.maximum)return;let s=cs(o);r.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),ux=I("$ZodCheckMinLength",(t,e)=>{var n;jt.init(t,e),(n=t._zod.def).when??(n.when=r=>{let o=r.value;return!ss(o)&&o.length!==void 0}),t._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{let o=r.value;if(o.length>=e.minimum)return;let s=cs(o);r.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),px=I("$ZodCheckLengthEquals",(t,e)=>{var n;jt.init(t,e),(n=t._zod.def).when??(n.when=r=>{let o=r.value;return!ss(o)&&o.length!==void 0}),t._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=e.length,o.maximum=e.length,o.length=e.length}),t._zod.check=r=>{let o=r.value,i=o.length;if(i===e.length)return;let s=cs(o),a=i>e.length;r.issues.push({origin:s,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),us=I("$ZodCheckStringFormat",(t,e)=>{var n,r;jt.init(t,e),t._zod.onattach.push(o=>{let i=o._zod.bag;i.format=e.format,e.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=o=>{e.pattern.lastIndex=0,!e.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:e.format,input:o.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(r=t._zod).check??(r.check=()=>{})}),dx=I("$ZodCheckRegex",(t,e)=>{us.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),fx=I("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=ox),us.init(t,e)}),mx=I("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=ix),us.init(t,e)}),hx=I("$ZodCheckIncludes",(t,e)=>{jt.init(t,e);let n=Er(e.includes),r=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=r,t._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=o=>{o.value.includes(e.includes,e.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:o.value,inst:t,continue:!e.abort})}}),gx=I("$ZodCheckStartsWith",(t,e)=>{jt.init(t,e);let n=new RegExp(`^${Er(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),t._zod.check=r=>{r.value.startsWith(e.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:r.value,inst:t,continue:!e.abort})}}),yx=I("$ZodCheckEndsWith",(t,e)=>{jt.init(t,e);let n=new RegExp(`.*${Er(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),t._zod.check=r=>{r.value.endsWith(e.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:r.value,inst:t,continue:!e.abort})}});var xx=I("$ZodCheckOverwrite",(t,e)=>{jt.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});var Va=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let r=e.split(`
|
|
17
|
+
`)===-1){ba("have not received end of HTTP headers yet..."),i();return}let y=f.toString("ascii",0,f.indexOf(`\r
|
|
18
|
+
`)),b=+y.split(" ")[1];ba("got proxy server response: %o",y),e({statusCode:b,buffered:f})}t.on("error",l),t.on("close",a),t.on("end",c),i()})}_a.default=WF});var _T=$(Zo=>{"use strict";var KF=Zo&&Zo.__awaiter||function(t,e,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(p){try{l(r.next(p))}catch(d){s(d)}}function c(p){try{l(r.throw(p))}catch(d){s(d)}}function l(p){p.done?i(p.value):o(p.value).then(a,c)}l((r=r.apply(t,e||[])).next())})},Vi=Zo&&Zo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Zo,"__esModule",{value:!0});var vT=Vi(require("net")),bT=Vi(require("tls")),JF=Vi(require("url")),YF=Vi(require("assert")),XF=Vi(qo()),QF=yT(),eU=Vi(xT()),wa=XF.default("https-proxy-agent:agent"),Jh=class extends QF.Agent{constructor(e){let n;if(typeof e=="string"?n=JF.default.parse(e):n=e,!n)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");wa("creating new HttpsProxyAgent instance: %o",n),super(n);let r=Object.assign({},n);this.secureProxy=n.secureProxy||rU(r.protocol),r.host=r.hostname||r.host,typeof r.port=="string"&&(r.port=parseInt(r.port,10)),!r.port&&r.host&&(r.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in r)&&(r.ALPNProtocols=["http 1.1"]),r.host&&r.path&&(delete r.path,delete r.pathname),this.proxy=r}callback(e,n){return KF(this,void 0,void 0,function*(){let{proxy:r,secureProxy:o}=this,i;o?(wa("Creating `tls.Socket`: %o",r),i=bT.default.connect(r)):(wa("Creating `net.Socket`: %o",r),i=vT.default.connect(r));let s=Object.assign({},r.headers),c=`CONNECT ${`${n.host}:${n.port}`} HTTP/1.1\r
|
|
19
|
+
`;r.auth&&(s["Proxy-Authorization"]=`Basic ${Buffer.from(r.auth).toString("base64")}`);let{host:l,port:p,secureEndpoint:d}=n;nU(p,d)||(l+=`:${p}`),s.Host=l,s.Connection="close";for(let x of Object.keys(s))c+=`${x}: ${s[x]}\r
|
|
20
|
+
`;let f=eU.default(i);i.write(`${c}\r
|
|
21
|
+
`);let{statusCode:h,buffered:y}=yield f;if(h===200){if(e.once("socket",tU),n.secureEndpoint){wa("Upgrading socket connection to TLS");let x=n.servername||n.host;return bT.default.connect(Object.assign(Object.assign({},oU(n,"host","hostname","path","port")),{socket:i,servername:x}))}return i}i.destroy();let b=new vT.default.Socket({writable:!1});return b.readable=!0,e.once("socket",x=>{wa("replaying proxy buffer for failed request"),YF.default(x.listenerCount("data")>0),x.push(y),x.push(null)}),b})}};Zo.default=Jh;function tU(t){t.resume()}function nU(t,e){return!!(!e&&t===80||e&&t===443)}function rU(t){return typeof t=="string"?/^https:?$/i.test(t):!1}function oU(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}});var ST=$((Qh,wT)=>{"use strict";var iU=Qh&&Qh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Yh=iU(_T());function Xh(t){return new Yh.default(t)}(function(t){t.HttpsProxyAgent=Yh.default,t.prototype=Yh.default.prototype})(Xh||(Xh={}));wT.exports=Xh});var TT=$((nW,kT)=>{var Sa;kT.exports=function(){if(!Sa){try{Sa=qo()("follow-redirects")}catch{}typeof Sa!="function"&&(Sa=function(){})}Sa.apply(null,arguments)}});var PT=$((rW,pg)=>{var Ta=require("url"),ka=Ta.URL,sU=require("http"),aU=require("https"),og=require("stream").Writable,ig=require("assert"),ET=TT();(function(){var e=typeof process<"u",n=typeof window<"u"&&typeof document<"u",r=Ho(Error.captureStackTrace);!e&&(n||!r)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var sg=!1;try{ig(new ka(""))}catch(t){sg=t.code==="ERR_INVALID_URL"}var cU=["Authorization","Proxy-Authorization","Cookie"],lU=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],ag=["abort","aborted","connect","error","socket","timeout"],cg=Object.create(null);ag.forEach(function(t){cg[t]=function(e,n,r){this._redirectable.emit(t,e,n,r)}});var tg=Ea("ERR_INVALID_URL","Invalid URL",TypeError),ng=Ea("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),uU=Ea("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",ng),pU=Ea("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),dU=Ea("ERR_STREAM_WRITE_AFTER_END","write after end"),fU=og.prototype.destroy||RT;function yn(t,e){og.call(this),this._sanitizeOptions(t),this._options=t,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var n=this;this._onNativeResponse=function(r){try{n._processResponse(r)}catch(o){n.emit("error",o instanceof ng?o:new ng({cause:o}))}},this._headerFilter=new RegExp("^(?:"+cU.concat(t.sensitiveHeaders).map(vU).join("|")+")$","i"),this._performRequest()}yn.prototype=Object.create(og.prototype);yn.prototype.abort=function(){ug(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};yn.prototype.destroy=function(t){return ug(this._currentRequest,t),fU.call(this,t),this};yn.prototype.write=function(t,e,n){if(this._ending)throw new dU;if(!Bo(t)&&!yU(t))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Ho(e)&&(n=e,e=null),t.length===0){n&&n();return}this._requestBodyLength+t.length<=this._options.maxBodyLength?(this._requestBodyLength+=t.length,this._requestBodyBuffers.push({data:t,encoding:e}),this._currentRequest.write(t,e,n)):(this.emit("error",new pU),this.abort())};yn.prototype.end=function(t,e,n){if(Ho(t)?(n=t,t=e=null):Ho(e)&&(n=e,e=null),!t)this._ended=this._ending=!0,this._currentRequest.end(null,null,n);else{var r=this,o=this._currentRequest;this.write(t,e,function(){r._ended=!0,o.end(null,null,n)}),this._ending=!0}};yn.prototype.setHeader=function(t,e){this._options.headers[t]=e,this._currentRequest.setHeader(t,e)};yn.prototype.removeHeader=function(t){delete this._options.headers[t],this._currentRequest.removeHeader(t)};yn.prototype.setTimeout=function(t,e){var n=this;function r(s){s.setTimeout(t),s.removeListener("timeout",s.destroy),s.addListener("timeout",s.destroy)}function o(s){n._timeout&&clearTimeout(n._timeout),n._timeout=setTimeout(function(){n.emit("timeout"),i()},t),r(s)}function i(){n._timeout&&(clearTimeout(n._timeout),n._timeout=null),n.removeListener("abort",i),n.removeListener("error",i),n.removeListener("response",i),n.removeListener("close",i),e&&n.removeListener("timeout",e),n.socket||n._currentRequest.removeListener("socket",o)}return e&&this.on("timeout",e),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",r),this.on("abort",i),this.on("error",i),this.on("response",i),this.on("close",i),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(t){yn.prototype[t]=function(e,n){return this._currentRequest[t](e,n)}});["aborted","connection","socket"].forEach(function(t){Object.defineProperty(yn.prototype,t,{get:function(){return this._currentRequest[t]}})});yn.prototype._sanitizeOptions=function(t){if(t.headers||(t.headers={}),gU(t.sensitiveHeaders)||(t.sensitiveHeaders=[]),t.host&&(t.hostname||(t.hostname=t.host),delete t.host),!t.pathname&&t.path){var e=t.path.indexOf("?");e<0?t.pathname=t.path:(t.pathname=t.path.substring(0,e),t.search=t.path.substring(e))}};yn.prototype._performRequest=function(){var t=this._options.protocol,e=this._options.nativeProtocols[t];if(!e)throw new TypeError("Unsupported protocol "+t);if(this._options.agents){var n=t.slice(0,-1);this._options.agent=this._options.agents[n]}var r=this._currentRequest=e.request(this._options,this._onNativeResponse);r._redirectable=this;for(var o of ag)r.on(o,cg[o]);if(this._currentUrl=/^\//.test(this._options.path)?Ta.format(this._options):this._options.path,this._isRedirect){var i=0,s=this,a=this._requestBodyBuffers;(function c(l){if(r===s._currentRequest)if(l)s.emit("error",l);else if(i<a.length){var p=a[i++];r.finished||r.write(p.data,p.encoding,c)}else s._ended&&r.end()})()}};yn.prototype._processResponse=function(t){var e=t.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:t.headers,statusCode:e});var n=t.headers.location;if(!n||this._options.followRedirects===!1||e<300||e>=400){t.responseUrl=this._currentUrl,t.redirects=this._redirects,this.emit("response",t),this._requestBodyBuffers=[];return}if(ug(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new uU;var r,o=this._options.beforeRedirect;o&&(r=Object.assign({Host:t.req.getHeader("host")},this._options.headers));var i=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],eg(/^content-/i,this._options.headers));var s=eg(/^host$/i,this._options.headers),a=lg(this._currentUrl),c=s||a.host,l=/^\w+:/.test(n)?this._currentUrl:Ta.format(Object.assign(a,{host:c})),p=mU(n,l);if(ET("redirecting to",p.href),this._isRedirect=!0,rg(p,this._options),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==c&&!hU(p.host,c))&&eg(this._headerFilter,this._options.headers),Ho(o)){var d={headers:t.headers,statusCode:e},f={url:l,method:i,headers:r};o(this._options,d,f),this._sanitizeOptions(this._options)}this._performRequest()};function $T(t){var e={maxRedirects:21,maxBodyLength:10485760},n={};return Object.keys(t).forEach(function(r){var o=r+":",i=n[o]=t[r],s=e[r]=Object.create(i);function a(l,p,d){return xU(l)?l=rg(l):Bo(l)?l=rg(lg(l)):(d=p,p=AT(l),l={protocol:o}),Ho(p)&&(d=p,p=null),p=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},l,p),p.nativeProtocols=n,!Bo(p.host)&&!Bo(p.hostname)&&(p.hostname="::1"),ig.equal(p.protocol,o,"protocol mismatch"),ET("options",p),new yn(p,d)}function c(l,p,d){var f=s.request(l,p,d);return f.end(),f}Object.defineProperties(s,{request:{value:a,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function RT(){}function lg(t){var e;if(sg)e=new ka(t);else if(e=AT(Ta.parse(t)),!Bo(e.protocol))throw new tg({input:t});return e}function mU(t,e){return sg?new ka(t,e):lg(Ta.resolve(e,t))}function AT(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new tg({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new tg({input:t.href||t});return t}function rg(t,e){var n=e||{};for(var r of lU)n[r]=t[r];return n.hostname.startsWith("[")&&(n.hostname=n.hostname.slice(1,-1)),n.port!==""&&(n.port=Number(n.port)),n.path=n.search?n.pathname+n.search:n.pathname,n}function eg(t,e){var n;for(var r in e)t.test(r)&&(n=e[r],delete e[r]);return n===null||typeof n>"u"?void 0:String(n).trim()}function Ea(t,e,n){function r(o){Ho(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,o||{}),this.code=t,this.message=this.cause?e+": "+this.cause.message:e}return r.prototype=new(n||Error),Object.defineProperties(r.prototype,{constructor:{value:r,enumerable:!1},name:{value:"Error ["+t+"]",enumerable:!1}}),r}function ug(t,e){for(var n of ag)t.removeListener(n,cg[n]);t.on("error",RT),t.destroy(e)}function hU(t,e){ig(Bo(t)&&Bo(e));var n=t.length-e.length-1;return n>0&&t[n]==="."&&t.endsWith(e)}function gU(t){return t instanceof Array}function Bo(t){return typeof t=="string"||t instanceof String}function Ho(t){return typeof t=="function"}function yU(t){return typeof t=="object"&&"length"in t}function xU(t){return ka&&t instanceof ka}function vU(t){return t.replace(/[\]\\/()*+?.$]/g,"\\$&")}pg.exports=$T({http:sU,https:aU});pg.exports.wrap=$T});var Y={};Da(Y,{BRAND:()=>TR,DIRTY:()=>to,EMPTY_PATH:()=>rR,INVALID:()=>le,NEVER:()=>cA,OK:()=>Vt,ParseStatus:()=>jt,Schema:()=>_e,ZodAny:()=>$r,ZodArray:()=>mr,ZodBigInt:()=>ro,ZodBoolean:()=>oo,ZodBranded:()=>os,ZodCatch:()=>go,ZodDate:()=>io,ZodDefault:()=>ho,ZodDiscriminatedUnion:()=>Ua,ZodEffects:()=>Tn,ZodEnum:()=>fo,ZodError:()=>sn,ZodFirstPartyTypeKind:()=>q,ZodFunction:()=>Za,ZodIntersection:()=>lo,ZodIssueCode:()=>U,ZodLazy:()=>uo,ZodLiteral:()=>po,ZodMap:()=>ti,ZodNaN:()=>ri,ZodNativeEnum:()=>mo,ZodNever:()=>Nn,ZodNull:()=>ao,ZodNullable:()=>Jn,ZodNumber:()=>no,ZodObject:()=>cn,ZodOptional:()=>an,ZodParsedType:()=>K,ZodPipeline:()=>is,ZodPromise:()=>Rr,ZodReadonly:()=>yo,ZodRecord:()=>qa,ZodSchema:()=>_e,ZodSet:()=>ni,ZodString:()=>Er,ZodSymbol:()=>Qo,ZodTransformer:()=>Tn,ZodTuple:()=>Kn,ZodType:()=>_e,ZodUndefined:()=>so,ZodUnion:()=>co,ZodUnknown:()=>fr,ZodVoid:()=>ei,addIssueToContext:()=>H,any:()=>zR,array:()=>DR,bigint:()=>AR,boolean:()=>jy,coerce:()=>aA,custom:()=>Oy,date:()=>PR,datetimeRegex:()=>Cy,defaultErrorMap:()=>pr,discriminatedUnion:()=>UR,effect:()=>QR,enum:()=>JR,function:()=>GR,getErrorMap:()=>Jo,getParsedType:()=>Wn,instanceof:()=>$R,intersection:()=>qR,isAborted:()=>Ma,isAsync:()=>Yo,isDirty:()=>Fa,isValid:()=>Tr,late:()=>ER,lazy:()=>WR,literal:()=>KR,makeIssue:()=>rs,map:()=>HR,nan:()=>RR,nativeEnum:()=>YR,never:()=>jR,null:()=>OR,nullable:()=>tA,number:()=>Ny,object:()=>Au,objectUtil:()=>Eu,oboolean:()=>sA,onumber:()=>iA,optional:()=>eA,ostring:()=>oA,pipeline:()=>rA,preprocess:()=>nA,promise:()=>XR,quotelessJson:()=>eR,record:()=>BR,set:()=>VR,setErrorMap:()=>nR,strictObject:()=>MR,string:()=>zy,symbol:()=>CR,transformer:()=>QR,tuple:()=>ZR,undefined:()=>IR,union:()=>FR,unknown:()=>NR,util:()=>Ae,void:()=>LR});var Ae;(function(t){t.assertEqual=o=>{};function e(o){}t.assertIs=e;function n(o){throw new Error}t.assertNever=n,t.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},t.getValidEnumValues=o=>{let i=t.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(let a of i)s[a]=o[a];return t.objectValues(s)},t.objectValues=o=>t.objectKeys(o).map(function(i){return o[i]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},t.find=(o,i)=>{for(let s of o)if(i(s))return s},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ae||(Ae={}));var Eu;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Eu||(Eu={}));var K=Ae.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Wn=t=>{switch(typeof t){case"undefined":return K.undefined;case"string":return K.string;case"number":return Number.isNaN(t)?K.nan:K.number;case"boolean":return K.boolean;case"function":return K.function;case"bigint":return K.bigint;case"symbol":return K.symbol;case"object":return Array.isArray(t)?K.array:t===null?K.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?K.promise:typeof Map<"u"&&t instanceof Map?K.map:typeof Set<"u"&&t instanceof Set?K.set:typeof Date<"u"&&t instanceof Date?K.date:K.object;default:return K.unknown}};var U=Ae.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"]),eR=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),sn=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}format(e){let n=e||function(i){return i.message},r={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,c=0;for(;c<s.path.length;){let l=s.path[c];c===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(n(s))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(this),r}static assert(e){if(!(e instanceof t))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ae.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){let n={},r=[];for(let o of this.issues)if(o.path.length>0){let i=o.path[0];n[i]=n[i]||[],n[i].push(e(o))}else r.push(e(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};sn.create=t=>new sn(t);var tR=(t,e)=>{let n;switch(t.code){case U.invalid_type:t.received===K.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case U.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Ae.jsonStringifyReplacer)}`;break;case U.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ae.joinValues(t.keys,", ")}`;break;case U.invalid_union:n="Invalid input";break;case U.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ae.joinValues(t.options)}`;break;case U.invalid_enum_value:n=`Invalid enum value. Expected ${Ae.joinValues(t.options)}, received '${t.received}'`;break;case U.invalid_arguments:n="Invalid function arguments";break;case U.invalid_return_type:n="Invalid function return type";break;case U.invalid_date:n="Invalid date";break;case U.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Ae.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case U.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case U.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case U.custom:n="Invalid input";break;case U.invalid_intersection_types:n="Intersection results could not be merged";break;case U.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case U.not_finite:n="Number must be finite";break;default:n=e.defaultError,Ae.assertNever(t)}return{message:n}},pr=tR;var Ey=pr;function nR(t){Ey=t}function Jo(){return Ey}var rs=t=>{let{data:e,path:n,errorMaps:r,issueData:o}=t,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="",c=r.filter(l=>!!l).slice().reverse();for(let l of c)a=l(s,{data:e,defaultError:a}).message;return{...o,path:i,message:a}},rR=[];function H(t,e){let n=Jo(),r=rs({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===pr?void 0:pr].filter(o=>!!o)});t.common.issues.push(r)}var jt=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){let r=[];for(let o of n){if(o.status==="aborted")return le;o.status==="dirty"&&e.dirty(),r.push(o.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){let r=[];for(let o of n){let i=await o.key,s=await o.value;r.push({key:i,value:s})}return t.mergeObjectSync(e,r)}static mergeObjectSync(e,n){let r={};for(let o of n){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return le;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:e.value,value:r}}},le=Object.freeze({status:"aborted"}),to=t=>({status:"dirty",value:t}),Vt=t=>({status:"valid",value:t}),Ma=t=>t.status==="aborted",Fa=t=>t.status==="dirty",Tr=t=>t.status==="valid",Yo=t=>typeof Promise<"u"&&t instanceof Promise;var ee;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(ee||(ee={}));var kn=class{constructor(e,n,r,o){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=o}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}},$y=(t,e)=>{if(Tr(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new sn(t.common.issues);return this._error=n,this._error}}};function xe(t){if(!t)return{};let{errorMap:e,invalid_type_error:n,required_error:r,description:o}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:o}:{errorMap:(s,a)=>{let{message:c}=t;return s.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:c??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:c??n??a.defaultError}},description:o}}var _e=class{get description(){return this._def.description}_getType(e){return Wn(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:Wn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new jt,ctx:{common:e.parent.common,data:e.data,parsedType:Wn(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let n=this._parse(e);if(Yo(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){let n=this._parse(e);return Promise.resolve(n)}parse(e,n){let r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){let r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Wn(e)},o=this._parseSync({data:e,path:r.path,parent:r});return $y(r,o)}"~validate"(e){var r,o;let n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Wn(e)};if(!this["~standard"].async)try{let i=this._parseSync({data:e,path:[],parent:n});return Tr(i)?{value:i.value}:{issues:n.common.issues}}catch(i){(o=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(i=>Tr(i)?{value:i.value}:{issues:n.common.issues})}async parseAsync(e,n){let r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){let r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Wn(e)},o=this._parse({data:e,path:r.path,parent:r}),i=await(Yo(o)?o:Promise.resolve(o));return $y(r,i)}refine(e,n){let r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{let s=e(o),a=()=>i.addIssue({code:U.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(e,n){return this._refinement((r,o)=>e(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(e){return new Tn({schema:this,typeName:q.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return an.create(this,this._def)}nullable(){return Jn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return mr.create(this)}promise(){return Rr.create(this,this._def)}or(e){return co.create([this,e],this._def)}and(e){return lo.create(this,e,this._def)}transform(e){return new Tn({...xe(this._def),schema:this,typeName:q.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let n=typeof e=="function"?e:()=>e;return new ho({...xe(this._def),innerType:this,defaultValue:n,typeName:q.ZodDefault})}brand(){return new os({typeName:q.ZodBranded,type:this,...xe(this._def)})}catch(e){let n=typeof e=="function"?e:()=>e;return new go({...xe(this._def),innerType:this,catchValue:n,typeName:q.ZodCatch})}describe(e){let n=this.constructor;return new n({...this._def,description:e})}pipe(e){return is.create(this,e)}readonly(){return yo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},oR=/^c[^\s-]{8,}$/i,iR=/^[0-9a-z]+$/,sR=/^[0-9A-HJKMNP-TV-Z]{26}$/i,aR=/^[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,cR=/^[a-z0-9_-]{21}$/i,lR=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,uR=/^[-+]?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)?)??$/,pR=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,dR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",$u,fR=/^(?:(?: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])$/,mR=/^(?:(?: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])$/,hR=/^(([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]))$/,gR=/^(([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])$/,yR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,xR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ay="((\\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])))",vR=new RegExp(`^${Ay}$`);function Py(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let n=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function bR(t){return new RegExp(`^${Py(t)}$`)}function Cy(t){let e=`${Ay}T${Py(t)}`,n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function _R(t,e){return!!((e==="v4"||!e)&&fR.test(t)||(e==="v6"||!e)&&hR.test(t))}function wR(t,e){if(!lR.test(t))return!1;try{let[n]=t.split(".");if(!n)return!1;let r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&o.alg!==e)}catch{return!1}}function SR(t,e){return!!((e==="v4"||!e)&&mR.test(t)||(e==="v6"||!e)&&gR.test(t))}var Er=class t extends _e{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==K.string){let i=this._getOrReturnCtx(e);return H(i,{code:U.invalid_type,expected:K.string,received:i.parsedType}),le}let r=new jt,o;for(let i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),H(o,{code:U.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),H(o,{code:U.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let s=e.data.length>i.value,a=e.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(e,o),s?H(o,{code:U.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&H(o,{code:U.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")pR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"email",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")$u||($u=new RegExp(dR,"u")),$u.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"emoji",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")aR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"uuid",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")cR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"nanoid",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")oR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cuid",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")iR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cuid2",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")sR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"ulid",code:U.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),H(o,{validation:"url",code:U.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"regex",code:U.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Cy(i).test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?vR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?bR(i).test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?uR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"duration",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?_R(e.data,i.version)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"ip",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?wR(e.data,i.alg)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"jwt",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?SR(e.data,i.version)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"cidr",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?yR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"base64",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?xR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"base64url",code:U.invalid_string,message:i.message}),r.dirty()):Ae.assertNever(i);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(o=>e.test(o),{validation:n,code:U.invalid_string,...ee.errToObj(r)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ee.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ee.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ee.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ee.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ee.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ee.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ee.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ee.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ee.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ee.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ee.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ee.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ee.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...ee.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...ee.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...ee.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...ee.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...ee.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...ee.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...ee.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...ee.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...ee.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...ee.errToObj(n)})}nonempty(e){return this.min(1,ee.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};Er.create=t=>new Er({checks:[],typeName:q.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...xe(t)});function kR(t,e){let n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(t.toFixed(o).replace(".","")),s=Number.parseInt(e.toFixed(o).replace(".",""));return i%s/10**o}var no=class t extends _e{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==K.number){let i=this._getOrReturnCtx(e);return H(i,{code:U.invalid_type,expected:K.number,received:i.parsedType}),le}let r,o=new jt;for(let i of this._def.checks)i.kind==="int"?Ae.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),H(r,{code:U.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?kR(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),H(r,{code:U.not_finite,message:i.message}),o.dirty()):Ae.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,ee.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ee.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ee.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ee.toString(n))}setLimit(e,n,r,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ee.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ee.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ee.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ee.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:ee.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ee.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ee.toString(e)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ae.isInteger(e.value))}get isFinite(){let e=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}};no.create=t=>new no({checks:[],typeName:q.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...xe(t)});var ro=class t extends _e{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==K.bigint)return this._getInvalidInput(e);let r,o=new jt;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),H(r,{code:U.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ae.assertNever(i);return{status:o.value,value:e.data}}_getInvalidInput(e){let n=this._getOrReturnCtx(e);return H(n,{code:U.invalid_type,expected:K.bigint,received:n.parsedType}),le}gte(e,n){return this.setLimit("min",e,!0,ee.toString(n))}gt(e,n){return this.setLimit("min",e,!1,ee.toString(n))}lte(e,n){return this.setLimit("max",e,!0,ee.toString(n))}lt(e,n){return this.setLimit("max",e,!1,ee.toString(n))}setLimit(e,n,r,o){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:ee.toString(o)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ee.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ee.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ee.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ee.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:ee.toString(n)})}get minValue(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}};ro.create=t=>new ro({checks:[],typeName:q.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...xe(t)});var oo=class extends _e{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==K.boolean){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.boolean,received:r.parsedType}),le}return Vt(e.data)}};oo.create=t=>new oo({typeName:q.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...xe(t)});var io=class t extends _e{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==K.date){let i=this._getOrReturnCtx(e);return H(i,{code:U.invalid_type,expected:K.date,received:i.parsedType}),le}if(Number.isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return H(i,{code:U.invalid_date}),le}let r=new jt,o;for(let i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),H(o,{code:U.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),H(o,{code:U.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ae.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:ee.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:ee.toString(n)})}get minDate(){let e=null;for(let n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}};io.create=t=>new io({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:q.ZodDate,...xe(t)});var Qo=class extends _e{_parse(e){if(this._getType(e)!==K.symbol){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.symbol,received:r.parsedType}),le}return Vt(e.data)}};Qo.create=t=>new Qo({typeName:q.ZodSymbol,...xe(t)});var so=class extends _e{_parse(e){if(this._getType(e)!==K.undefined){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.undefined,received:r.parsedType}),le}return Vt(e.data)}};so.create=t=>new so({typeName:q.ZodUndefined,...xe(t)});var ao=class extends _e{_parse(e){if(this._getType(e)!==K.null){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.null,received:r.parsedType}),le}return Vt(e.data)}};ao.create=t=>new ao({typeName:q.ZodNull,...xe(t)});var $r=class extends _e{constructor(){super(...arguments),this._any=!0}_parse(e){return Vt(e.data)}};$r.create=t=>new $r({typeName:q.ZodAny,...xe(t)});var fr=class extends _e{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Vt(e.data)}};fr.create=t=>new fr({typeName:q.ZodUnknown,...xe(t)});var Nn=class extends _e{_parse(e){let n=this._getOrReturnCtx(e);return H(n,{code:U.invalid_type,expected:K.never,received:n.parsedType}),le}};Nn.create=t=>new Nn({typeName:q.ZodNever,...xe(t)});var ei=class extends _e{_parse(e){if(this._getType(e)!==K.undefined){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.void,received:r.parsedType}),le}return Vt(e.data)}};ei.create=t=>new ei({typeName:q.ZodVoid,...xe(t)});var mr=class t extends _e{_parse(e){let{ctx:n,status:r}=this._processInputParams(e),o=this._def;if(n.parsedType!==K.array)return H(n,{code:U.invalid_type,expected:K.array,received:n.parsedType}),le;if(o.exactLength!==null){let s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(H(n,{code:s?U.too_big:U.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(H(n,{code:U.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(H(n,{code:U.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new kn(n,s,n.path,a)))).then(s=>jt.mergeArray(r,s));let i=[...n.data].map((s,a)=>o.type._parseSync(new kn(n,s,n.path,a)));return jt.mergeArray(r,i)}get element(){return this._def.type}min(e,n){return new t({...this._def,minLength:{value:e,message:ee.toString(n)}})}max(e,n){return new t({...this._def,maxLength:{value:e,message:ee.toString(n)}})}length(e,n){return new t({...this._def,exactLength:{value:e,message:ee.toString(n)}})}nonempty(e){return this.min(1,e)}};mr.create=(t,e)=>new mr({type:t,minLength:null,maxLength:null,exactLength:null,typeName:q.ZodArray,...xe(e)});function Xo(t){if(t instanceof cn){let e={};for(let n in t.shape){let r=t.shape[n];e[n]=an.create(Xo(r))}return new cn({...t._def,shape:()=>e})}else return t instanceof mr?new mr({...t._def,type:Xo(t.element)}):t instanceof an?an.create(Xo(t.unwrap())):t instanceof Jn?Jn.create(Xo(t.unwrap())):t instanceof Kn?Kn.create(t.items.map(e=>Xo(e))):t}var cn=class t extends _e{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),n=Ae.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==K.object){let l=this._getOrReturnCtx(e);return H(l,{code:U.invalid_type,expected:K.object,received:l.parsedType}),le}let{status:r,ctx:o}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Nn&&this._def.unknownKeys==="strip"))for(let l in o.data)s.includes(l)||a.push(l);let c=[];for(let l of s){let p=i[l],d=o.data[l];c.push({key:{status:"valid",value:l},value:p._parse(new kn(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Nn){let l=this._def.unknownKeys;if(l==="passthrough")for(let p of a)c.push({key:{status:"valid",value:p},value:{status:"valid",value:o.data[p]}});else if(l==="strict")a.length>0&&(H(o,{code:U.unrecognized_keys,keys:a}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let l=this._def.catchall;for(let p of a){let d=o.data[p];c.push({key:{status:"valid",value:p},value:l._parse(new kn(o,d,o.path,p)),alwaysSet:p in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let l=[];for(let p of c){let d=await p.key,f=await p.value;l.push({key:d,value:f,alwaysSet:p.alwaysSet})}return l}).then(l=>jt.mergeObjectSync(r,l)):jt.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(e){return ee.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var i,s;let o=((s=(i=this._def).errorMap)==null?void 0:s.call(i,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:ee.errToObj(e).message??o}:{message:o}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:q.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let n={};for(let r of Ae.objectKeys(e))e[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}omit(e){let n={};for(let r of Ae.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new t({...this._def,shape:()=>n})}deepPartial(){return Xo(this)}partial(e){let n={};for(let r of Ae.objectKeys(this.shape)){let o=this.shape[r];e&&!e[r]?n[r]=o:n[r]=o.optional()}return new t({...this._def,shape:()=>n})}required(e){let n={};for(let r of Ae.objectKeys(this.shape))if(e&&!e[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof an;)i=i._def.innerType;n[r]=i}return new t({...this._def,shape:()=>n})}keyof(){return Iy(Ae.objectKeys(this.shape))}};cn.create=(t,e)=>new cn({shape:()=>t,unknownKeys:"strip",catchall:Nn.create(),typeName:q.ZodObject,...xe(e)});cn.strictCreate=(t,e)=>new cn({shape:()=>t,unknownKeys:"strict",catchall:Nn.create(),typeName:q.ZodObject,...xe(e)});cn.lazycreate=(t,e)=>new cn({shape:t,unknownKeys:"strip",catchall:Nn.create(),typeName:q.ZodObject,...xe(e)});var co=class extends _e{_parse(e){let{ctx:n}=this._processInputParams(e),r=this._def.options;function o(i){for(let a of i)if(a.result.status==="valid")return a.result;for(let a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;let s=i.map(a=>new sn(a.ctx.common.issues));return H(n,{code:U.invalid_union,unionErrors:s}),le}if(n.common.async)return Promise.all(r.map(async i=>{let s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let c of r){let l={...n,common:{...n.common,issues:[]},parent:null},p=c._parseSync({data:n.data,path:n.path,parent:l});if(p.status==="valid")return p;p.status==="dirty"&&!i&&(i={result:p,ctx:l}),l.common.issues.length&&s.push(l.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let a=s.map(c=>new sn(c));return H(n,{code:U.invalid_union,unionErrors:a}),le}}get options(){return this._def.options}};co.create=(t,e)=>new co({options:t,typeName:q.ZodUnion,...xe(e)});var dr=t=>t instanceof uo?dr(t.schema):t instanceof Tn?dr(t.innerType()):t instanceof po?[t.value]:t instanceof fo?t.options:t instanceof mo?Ae.objectValues(t.enum):t instanceof ho?dr(t._def.innerType):t instanceof so?[void 0]:t instanceof ao?[null]:t instanceof an?[void 0,...dr(t.unwrap())]:t instanceof Jn?[null,...dr(t.unwrap())]:t instanceof os||t instanceof yo?dr(t.unwrap()):t instanceof go?dr(t._def.innerType):[],Ua=class t extends _e{_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==K.object)return H(n,{code:U.invalid_type,expected:K.object,received:n.parsedType}),le;let r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(H(n,{code:U.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),le)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){let o=new Map;for(let i of n){let s=dr(i.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of s){if(o.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);o.set(a,i)}}return new t({typeName:q.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:o,...xe(r)})}};function Ru(t,e){let n=Wn(t),r=Wn(e);if(t===e)return{valid:!0,data:t};if(n===K.object&&r===K.object){let o=Ae.objectKeys(e),i=Ae.objectKeys(t).filter(a=>o.indexOf(a)!==-1),s={...t,...e};for(let a of i){let c=Ru(t[a],e[a]);if(!c.valid)return{valid:!1};s[a]=c.data}return{valid:!0,data:s}}else if(n===K.array&&r===K.array){if(t.length!==e.length)return{valid:!1};let o=[];for(let i=0;i<t.length;i++){let s=t[i],a=e[i],c=Ru(s,a);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return n===K.date&&r===K.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var lo=class extends _e{_parse(e){let{status:n,ctx:r}=this._processInputParams(e),o=(i,s)=>{if(Ma(i)||Ma(s))return le;let a=Ru(i.value,s.value);return a.valid?((Fa(i)||Fa(s))&&n.dirty(),{status:n.value,value:a.data}):(H(r,{code:U.invalid_intersection_types}),le)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};lo.create=(t,e,n)=>new lo({left:t,right:e,typeName:q.ZodIntersection,...xe(n)});var Kn=class t extends _e{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==K.array)return H(r,{code:U.invalid_type,expected:K.array,received:r.parsedType}),le;if(r.data.length<this._def.items.length)return H(r,{code:U.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),le;!this._def.rest&&r.data.length>this._def.items.length&&(H(r,{code:U.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((s,a)=>{let c=this._def.items[a]||this._def.rest;return c?c._parse(new kn(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>jt.mergeArray(n,s)):jt.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Kn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Kn({items:t,typeName:q.ZodTuple,rest:null,...xe(e)})};var qa=class t extends _e{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==K.object)return H(r,{code:U.invalid_type,expected:K.object,received:r.parsedType}),le;let o=[],i=this._def.keyType,s=this._def.valueType;for(let a in r.data)o.push({key:i._parse(new kn(r,a,r.path,a)),value:s._parse(new kn(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?jt.mergeObjectAsync(n,o):jt.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof _e?new t({keyType:e,valueType:n,typeName:q.ZodRecord,...xe(r)}):new t({keyType:Er.create(),valueType:e,typeName:q.ZodRecord,...xe(n)})}},ti=class extends _e{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==K.map)return H(r,{code:U.invalid_type,expected:K.map,received:r.parsedType}),le;let o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,c],l)=>({key:o._parse(new kn(r,a,r.path,[l,"key"])),value:i._parse(new kn(r,c,r.path,[l,"value"]))}));if(r.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let c of s){let l=await c.key,p=await c.value;if(l.status==="aborted"||p.status==="aborted")return le;(l.status==="dirty"||p.status==="dirty")&&n.dirty(),a.set(l.value,p.value)}return{status:n.value,value:a}})}else{let a=new Map;for(let c of s){let l=c.key,p=c.value;if(l.status==="aborted"||p.status==="aborted")return le;(l.status==="dirty"||p.status==="dirty")&&n.dirty(),a.set(l.value,p.value)}return{status:n.value,value:a}}}};ti.create=(t,e,n)=>new ti({valueType:e,keyType:t,typeName:q.ZodMap,...xe(n)});var ni=class t extends _e{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==K.set)return H(r,{code:U.invalid_type,expected:K.set,received:r.parsedType}),le;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(H(r,{code:U.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(H(r,{code:U.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());let i=this._def.valueType;function s(c){let l=new Set;for(let p of c){if(p.status==="aborted")return le;p.status==="dirty"&&n.dirty(),l.add(p.value)}return{status:n.value,value:l}}let a=[...r.data.values()].map((c,l)=>i._parse(new kn(r,c,r.path,l)));return r.common.async?Promise.all(a).then(c=>s(c)):s(a)}min(e,n){return new t({...this._def,minSize:{value:e,message:ee.toString(n)}})}max(e,n){return new t({...this._def,maxSize:{value:e,message:ee.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}};ni.create=(t,e)=>new ni({valueType:t,minSize:null,maxSize:null,typeName:q.ZodSet,...xe(e)});var Za=class t extends _e{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==K.function)return H(n,{code:U.invalid_type,expected:K.function,received:n.parsedType}),le;function r(a,c){return rs({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Jo(),pr].filter(l=>!!l),issueData:{code:U.invalid_arguments,argumentsError:c}})}function o(a,c){return rs({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Jo(),pr].filter(l=>!!l),issueData:{code:U.invalid_return_type,returnTypeError:c}})}let i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof Rr){let a=this;return Vt(async function(...c){let l=new sn([]),p=await a._def.args.parseAsync(c,i).catch(h=>{throw l.addIssue(r(c,h)),l}),d=await Reflect.apply(s,this,p);return await a._def.returns._def.type.parseAsync(d,i).catch(h=>{throw l.addIssue(o(d,h)),l})})}else{let a=this;return Vt(function(...c){let l=a._def.args.safeParse(c,i);if(!l.success)throw new sn([r(c,l.error)]);let p=Reflect.apply(s,this,l.data),d=a._def.returns.safeParse(p,i);if(!d.success)throw new sn([o(p,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Kn.create(e).rest(fr.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new t({args:e||Kn.create([]).rest(fr.create()),returns:n||fr.create(),typeName:q.ZodFunction,...xe(r)})}},uo=class extends _e{get schema(){return this._def.getter()}_parse(e){let{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};uo.create=(t,e)=>new uo({getter:t,typeName:q.ZodLazy,...xe(e)});var po=class extends _e{_parse(e){if(e.data!==this._def.value){let n=this._getOrReturnCtx(e);return H(n,{received:n.data,code:U.invalid_literal,expected:this._def.value}),le}return{status:"valid",value:e.data}}get value(){return this._def.value}};po.create=(t,e)=>new po({value:t,typeName:q.ZodLiteral,...xe(e)});function Iy(t,e){return new fo({values:t,typeName:q.ZodEnum,...xe(e)})}var fo=class t extends _e{_parse(e){if(typeof e.data!="string"){let n=this._getOrReturnCtx(e),r=this._def.values;return H(n,{expected:Ae.joinValues(r),received:n.parsedType,code:U.invalid_type}),le}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let n=this._getOrReturnCtx(e),r=this._def.values;return H(n,{received:n.data,code:U.invalid_enum_value,options:r}),le}return Vt(e.data)}get options(){return this._def.values}get enum(){let e={};for(let n of this._def.values)e[n]=n;return e}get Values(){let e={};for(let n of this._def.values)e[n]=n;return e}get Enum(){let e={};for(let n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return t.create(e,{...this._def,...n})}exclude(e,n=this._def){return t.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}};fo.create=Iy;var mo=class extends _e{_parse(e){let n=Ae.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==K.string&&r.parsedType!==K.number){let o=Ae.objectValues(n);return H(r,{expected:Ae.joinValues(o),received:r.parsedType,code:U.invalid_type}),le}if(this._cache||(this._cache=new Set(Ae.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let o=Ae.objectValues(n);return H(r,{received:r.data,code:U.invalid_enum_value,options:o}),le}return Vt(e.data)}get enum(){return this._def.values}};mo.create=(t,e)=>new mo({values:t,typeName:q.ZodNativeEnum,...xe(e)});var Rr=class extends _e{unwrap(){return this._def.type}_parse(e){let{ctx:n}=this._processInputParams(e);if(n.parsedType!==K.promise&&n.common.async===!1)return H(n,{code:U.invalid_type,expected:K.promise,received:n.parsedType}),le;let r=n.parsedType===K.promise?n.data:Promise.resolve(n.data);return Vt(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};Rr.create=(t,e)=>new Rr({type:t,typeName:q.ZodPromise,...xe(e)});var Tn=class extends _e{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===q.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:n,ctx:r}=this._processInputParams(e),o=this._def.effect||null,i={addIssue:s=>{H(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return le;let c=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return c.status==="aborted"?le:c.status==="dirty"?to(c.value):n.value==="dirty"?to(c.value):c});{if(n.value==="aborted")return le;let a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?le:a.status==="dirty"?to(a.value):n.value==="dirty"?to(a.value):a}}if(o.type==="refinement"){let s=a=>{let c=o.refinement(a,i);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?le:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?le:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Tr(s))return le;let a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Tr(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):le);Ae.assertNever(o)}};Tn.create=(t,e,n)=>new Tn({schema:t,typeName:q.ZodEffects,effect:e,...xe(n)});Tn.createWithPreprocess=(t,e,n)=>new Tn({schema:e,effect:{type:"preprocess",transform:t},typeName:q.ZodEffects,...xe(n)});var an=class extends _e{_parse(e){return this._getType(e)===K.undefined?Vt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};an.create=(t,e)=>new an({innerType:t,typeName:q.ZodOptional,...xe(e)});var Jn=class extends _e{_parse(e){return this._getType(e)===K.null?Vt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Jn.create=(t,e)=>new Jn({innerType:t,typeName:q.ZodNullable,...xe(e)});var ho=class extends _e{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return n.parsedType===K.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};ho.create=(t,e)=>new ho({innerType:t,typeName:q.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...xe(e)});var go=class extends _e{_parse(e){let{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Yo(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new sn(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new sn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};go.create=(t,e)=>new go({innerType:t,typeName:q.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...xe(e)});var ri=class extends _e{_parse(e){if(this._getType(e)!==K.nan){let r=this._getOrReturnCtx(e);return H(r,{code:U.invalid_type,expected:K.nan,received:r.parsedType}),le}return{status:"valid",value:e.data}}};ri.create=t=>new ri({typeName:q.ZodNaN,...xe(t)});var TR=Symbol("zod_brand"),os=class extends _e{_parse(e){let{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},is=class t extends _e{_parse(e){let{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?le:i.status==="dirty"?(n.dirty(),to(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?le:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(e,n){return new t({in:e,out:n,typeName:q.ZodPipeline})}},yo=class extends _e{_parse(e){let n=this._def.innerType._parse(e),r=o=>(Tr(o)&&(o.value=Object.freeze(o.value)),o);return Yo(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}};yo.create=(t,e)=>new yo({innerType:t,typeName:q.ZodReadonly,...xe(e)});function Ry(t,e){let n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function Oy(t,e={},n){return t?$r.create().superRefine((r,o)=>{let i=t(r);if(i instanceof Promise)return i.then(s=>{if(!s){let a=Ry(e,r),c=a.fatal??n??!0;o.addIssue({code:"custom",...a,fatal:c})}});if(!i){let s=Ry(e,r),a=s.fatal??n??!0;o.addIssue({code:"custom",...s,fatal:a})}}):$r.create()}var ER={object:cn.lazycreate},q;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(q||(q={}));var $R=(t,e={message:`Input not instance of ${t.name}`})=>Oy(n=>n instanceof t,e),zy=Er.create,Ny=no.create,RR=ri.create,AR=ro.create,jy=oo.create,PR=io.create,CR=Qo.create,IR=so.create,OR=ao.create,zR=$r.create,NR=fr.create,jR=Nn.create,LR=ei.create,DR=mr.create,Au=cn.create,MR=cn.strictCreate,FR=co.create,UR=Ua.create,qR=lo.create,ZR=Kn.create,BR=qa.create,HR=ti.create,VR=ni.create,GR=Za.create,WR=uo.create,KR=po.create,JR=fo.create,YR=mo.create,XR=Rr.create,QR=Tn.create,eA=an.create,tA=Jn.create,nA=Tn.createWithPreprocess,rA=is.create,oA=()=>zy().optional(),iA=()=>Ny().optional(),sA=()=>jy().optional(),aA={string:(t=>Er.create({...t,coerce:!0})),number:(t=>no.create({...t,coerce:!0})),boolean:(t=>oo.create({...t,coerce:!0})),bigint:(t=>ro.create({...t,coerce:!0})),date:(t=>io.create({...t,coerce:!0}))};var cA=le;var lA=Object.freeze({status:"aborted"});function P(t,e,n){function r(a,c){var l;Object.defineProperty(a,"_zod",{value:a._zod??{},enumerable:!1}),(l=a._zod).traits??(l.traits=new Set),a._zod.traits.add(t),e(a,c);for(let p in s.prototype)p in a||Object.defineProperty(a,p,{value:s.prototype[p].bind(a)});a._zod.constr=s,a._zod.def=c}let o=(n==null?void 0:n.Parent)??Object;class i extends o{}Object.defineProperty(i,"name",{value:t});function s(a){var c;let l=n!=null&&n.Parent?new i:this;r(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let p of l._zod.deferred)p();return l}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>{var c,l;return n!=null&&n.Parent&&a instanceof n.Parent?!0:(l=(c=a==null?void 0:a._zod)==null?void 0:c.traits)==null?void 0:l.has(t)}}),Object.defineProperty(s,"name",{value:t}),s}var uA=Symbol("zod_brand"),hr=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ba={};function xn(t){return t&&Object.assign(Ba,t),Ba}var Ce={};Da(Ce,{BIGINT_FORMAT_RANGES:()=>Dy,Class:()=>Cu,NUMBER_FORMAT_RANGES:()=>Du,aborted:()=>vo,allowsEval:()=>Nu,assert:()=>hA,assertEqual:()=>pA,assertIs:()=>fA,assertNever:()=>mA,assertNotEqual:()=>dA,assignProp:()=>zu,cached:()=>cs,captureStackTrace:()=>Va,cleanEnum:()=>RA,cleanRegex:()=>us,clone:()=>vn,createTransparentProxy:()=>_A,defineLazy:()=>et,esc:()=>xo,escapeRegex:()=>Ar,extend:()=>kA,finalizeIssue:()=>jn,floatSafeRemainder:()=>Ou,getElementAtPath:()=>gA,getEnumValues:()=>as,getLengthableOrigin:()=>ps,getParsedType:()=>bA,getSizableOrigin:()=>My,isObject:()=>oi,isPlainObject:()=>ii,issue:()=>Mu,joinValues:()=>Ha,jsonStringifyReplacer:()=>Iu,merge:()=>TA,normalizeParams:()=>ue,nullish:()=>ls,numKeys:()=>vA,omit:()=>SA,optionalKeys:()=>Lu,partial:()=>EA,pick:()=>wA,prefixIssues:()=>Yn,primitiveTypes:()=>Ly,promiseAllObject:()=>yA,propertyKeyTypes:()=>ju,randomString:()=>xA,required:()=>$A,stringifyPrimitive:()=>Ga,unwrapMessage:()=>ss});function pA(t){return t}function dA(t){return t}function fA(t){}function mA(t){throw new Error}function hA(t){}function as(t){let e=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,o])=>e.indexOf(+r)===-1).map(([r,o])=>o)}function Ha(t,e="|"){return t.map(n=>Ga(n)).join(e)}function Iu(t,e){return typeof e=="bigint"?e.toString():e}function cs(t){return{get value(){{let n=t();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function ls(t){return t==null}function us(t){let e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function Ou(t,e){let n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(t.toFixed(o).replace(".","")),s=Number.parseInt(e.toFixed(o).replace(".",""));return i%s/10**o}function et(t,e,n){Object.defineProperty(t,e,{get(){{let o=n();return t[e]=o,o}throw new Error("cached value already set")},set(o){Object.defineProperty(t,e,{value:o})},configurable:!0})}function zu(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function gA(t,e){return e?e.reduce((n,r)=>n==null?void 0:n[r],t):t}function yA(t){let e=Object.keys(t),n=e.map(r=>t[r]);return Promise.all(n).then(r=>{let o={};for(let i=0;i<e.length;i++)o[e[i]]=r[i];return o})}function xA(t=10){let e="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<t;r++)n+=e[Math.floor(Math.random()*e.length)];return n}function xo(t){return JSON.stringify(t)}var Va=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};function oi(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var Nu=cs(()=>{var t;if(typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)!=null&&t.includes("Cloudflare")))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function ii(t){if(oi(t)===!1)return!1;let e=t.constructor;if(e===void 0)return!0;let n=e.prototype;return!(oi(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function vA(t){let e=0;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}var bA=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${e}`)}},ju=new Set(["string","number","symbol"]),Ly=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ar(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vn(t,e,n){let r=new t._zod.constr(e??t._zod.def);return(!e||n!=null&&n.parent)&&(r._zod.parent=t),r}function ue(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if((e==null?void 0:e.message)!==void 0){if((e==null?void 0:e.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function _A(t){let e;return new Proxy({},{get(n,r,o){return e??(e=t()),Reflect.get(e,r,o)},set(n,r,o,i){return e??(e=t()),Reflect.set(e,r,o,i)},has(n,r){return e??(e=t()),Reflect.has(e,r)},deleteProperty(n,r){return e??(e=t()),Reflect.deleteProperty(e,r)},ownKeys(n){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(n,r){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,r)},defineProperty(n,r,o){return e??(e=t()),Reflect.defineProperty(e,r,o)}})}function Ga(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Lu(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var Du={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]},Dy={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function wA(t,e){let n={},r=t._zod.def;for(let o in e){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&(n[o]=r.shape[o])}return vn(t,{...t._zod.def,shape:n,checks:[]})}function SA(t,e){let n={...t._zod.def.shape},r=t._zod.def;for(let o in e){if(!(o in r.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&delete n[o]}return vn(t,{...t._zod.def,shape:n,checks:[]})}function kA(t,e){if(!ii(e))throw new Error("Invalid input to extend: expected a plain object");let n={...t._zod.def,get shape(){let r={...t._zod.def.shape,...e};return zu(this,"shape",r),r},checks:[]};return vn(t,n)}function TA(t,e){return vn(t,{...t._zod.def,get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return zu(this,"shape",n),n},catchall:e._zod.def.catchall,checks:[]})}function EA(t,e,n){let r=e._zod.def.shape,o={...r};if(n)for(let i in n){if(!(i in r))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(o[i]=t?new t({type:"optional",innerType:r[i]}):r[i])}else for(let i in r)o[i]=t?new t({type:"optional",innerType:r[i]}):r[i];return vn(e,{...e._zod.def,shape:o,checks:[]})}function $A(t,e,n){let r=e._zod.def.shape,o={...r};if(n)for(let i in n){if(!(i in o))throw new Error(`Unrecognized key: "${i}"`);n[i]&&(o[i]=new t({type:"nonoptional",innerType:r[i]}))}else for(let i in r)o[i]=new t({type:"nonoptional",innerType:r[i]});return vn(e,{...e._zod.def,shape:o,checks:[]})}function vo(t,e=0){var n;for(let r=e;r<t.issues.length;r++)if(((n=t.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function Yn(t,e){return e.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(t),n})}function ss(t){return typeof t=="string"?t:t==null?void 0:t.message}function jn(t,e,n){var o,i,s,a,c,l;let r={...t,path:t.path??[]};if(!t.message){let p=ss((s=(i=(o=t.inst)==null?void 0:o._zod.def)==null?void 0:i.error)==null?void 0:s.call(i,t))??ss((a=e==null?void 0:e.error)==null?void 0:a.call(e,t))??ss((c=n.customError)==null?void 0:c.call(n,t))??ss((l=n.localeError)==null?void 0:l.call(n,t))??"Invalid input";r.message=p}return delete r.inst,delete r.continue,e!=null&&e.reportInput||delete r.input,r}function My(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function ps(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Mu(...t){let[e,n,r]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:r}:{...e}}function RA(t){return Object.entries(t).filter(([e,n])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}var Cu=class{constructor(...e){}};var Fy=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),Object.defineProperty(t,"message",{get(){return JSON.stringify(e,Iu,2)},enumerable:!0}),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Wa=P("$ZodError",Fy),ds=P("$ZodError",Fy,{Parent:Error});function Fu(t,e=n=>n.message){let n={},r=[];for(let o of t.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(e(o))):r.push(e(o));return{formErrors:r,fieldErrors:n}}function Uu(t,e){let n=e||function(i){return i.message},r={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>o({issues:a}));else if(s.code==="invalid_key")o({issues:s.issues});else if(s.code==="invalid_element")o({issues:s.issues});else if(s.path.length===0)r._errors.push(n(s));else{let a=r,c=0;for(;c<s.path.length;){let l=s.path[c];c===s.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(n(s))):a[l]=a[l]||{_errors:[]},a=a[l],c++}}};return o(t),r}var qu=t=>(e,n,r,o)=>{let i=r?Object.assign(r,{async:!1}):{async:!1},s=e._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new hr;if(s.issues.length){let a=new((o==null?void 0:o.Err)??t)(s.issues.map(c=>jn(c,i,xn())));throw Va(a,o==null?void 0:o.callee),a}return s.value},Zu=qu(ds),Bu=t=>async(e,n,r,o)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},s=e._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new((o==null?void 0:o.Err)??t)(s.issues.map(c=>jn(c,i,xn())));throw Va(a,o==null?void 0:o.callee),a}return s.value},Hu=Bu(ds),Vu=t=>(e,n,r)=>{let o=r?{...r,async:!1}:{async:!1},i=e._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new hr;return i.issues.length?{success:!1,error:new(t??Wa)(i.issues.map(s=>jn(s,o,xn())))}:{success:!0,data:i.value}},bo=Vu(ds),Gu=t=>async(e,n,r)=>{let o=r?Object.assign(r,{async:!0}):{async:!0},i=e._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new t(i.issues.map(s=>jn(s,o,xn())))}:{success:!0,data:i.value}},_o=Gu(ds);var Uy=/^[cC][^\s-]{8,}$/,qy=/^[0-9a-z]+$/,Zy=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,By=/^[0-9a-vA-V]{20}$/,Hy=/^[A-Za-z0-9]{27}$/,Vy=/^[a-zA-Z0-9_-]{21}$/,Gy=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Wy=/^([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})$/,Wu=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[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)$/;var Ky=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var PA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Jy(){return new RegExp(PA,"u")}var Yy=/^(?:(?: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])$/,Xy=/^(([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})$/,Qy=/^((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])$/,ex=/^(([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])$/,tx=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ku=/^[A-Za-z0-9_-]*$/,nx=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;var rx=/^\+(?:[0-9]){6,14}[0-9]$/,ox="(?:(?:\\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])))",ix=new RegExp(`^${ox}$`);function sx(t){let e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ax(t){return new RegExp(`^${sx(t)}$`)}function cx(t){let e=sx({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-]\\d{2}:\\d{2})");let r=`${e}(?:${n.join("|")})`;return new RegExp(`^${ox}T(?:${r})$`)}var lx=t=>{let e=t?`[\\s\\S]{${(t==null?void 0:t.minimum)??0},${(t==null?void 0:t.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)};var ux=/^\d+$/,px=/^-?\d+(?:\.\d+)?/i,dx=/true|false/i,fx=/null/i;var mx=/^[^A-Z]*$/,hx=/^[^a-z]*$/;var Lt=P("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),gx={number:"number",bigint:"bigint",object:"date"},Ju=P("$ZodCheckLessThan",(t,e)=>{Lt.init(t,e);let n=gx[typeof e.value];t._zod.onattach.push(r=>{let o=r._zod.bag,i=(e.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<i&&(e.inclusive?o.maximum=e.value:o.exclusiveMaximum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value<=e.value:r.value<e.value)||r.issues.push({origin:n,code:"too_big",maximum:e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Yu=P("$ZodCheckGreaterThan",(t,e)=>{Lt.init(t,e);let n=gx[typeof e.value];t._zod.onattach.push(r=>{let o=r._zod.bag,i=(e.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>i&&(e.inclusive?o.minimum=e.value:o.exclusiveMinimum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value>=e.value:r.value>e.value)||r.issues.push({origin:n,code:"too_small",minimum:e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),yx=P("$ZodCheckMultipleOf",(t,e)=>{Lt.init(t,e),t._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):Ou(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),xx=P("$ZodCheckNumberFormat",(t,e)=>{var s;Lt.init(t,e),e.format=e.format||"float64";let n=(s=e.format)==null?void 0:s.includes("int"),r=n?"int":"number",[o,i]=Du[e.format];t._zod.onattach.push(a=>{let c=a._zod.bag;c.format=e.format,c.minimum=o,c.maximum=i,n&&(c.pattern=ux)}),t._zod.check=a=>{let c=a.value;if(n){if(!Number.isInteger(c)){a.issues.push({expected:r,format:e.format,code:"invalid_type",input:c,inst:t});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,continue:!e.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,continue:!e.abort});return}}c<o&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:t,continue:!e.abort}),c>i&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inst:t})}});var vx=P("$ZodCheckMaxLength",(t,e)=>{var n;Lt.init(t,e),(n=t._zod.def).when??(n.when=r=>{let o=r.value;return!ls(o)&&o.length!==void 0}),t._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<o&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{let o=r.value;if(o.length<=e.maximum)return;let s=ps(o);r.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),bx=P("$ZodCheckMinLength",(t,e)=>{var n;Lt.init(t,e),(n=t._zod.def).when??(n.when=r=>{let o=r.value;return!ls(o)&&o.length!==void 0}),t._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>o&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{let o=r.value;if(o.length>=e.minimum)return;let s=ps(o);r.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),_x=P("$ZodCheckLengthEquals",(t,e)=>{var n;Lt.init(t,e),(n=t._zod.def).when??(n.when=r=>{let o=r.value;return!ls(o)&&o.length!==void 0}),t._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=e.length,o.maximum=e.length,o.length=e.length}),t._zod.check=r=>{let o=r.value,i=o.length;if(i===e.length)return;let s=ps(o),a=i>e.length;r.issues.push({origin:s,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),fs=P("$ZodCheckStringFormat",(t,e)=>{var n,r;Lt.init(t,e),t._zod.onattach.push(o=>{let i=o._zod.bag;i.format=e.format,e.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=o=>{e.pattern.lastIndex=0,!e.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:e.format,input:o.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(r=t._zod).check??(r.check=()=>{})}),wx=P("$ZodCheckRegex",(t,e)=>{fs.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Sx=P("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=mx),fs.init(t,e)}),kx=P("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=hx),fs.init(t,e)}),Tx=P("$ZodCheckIncludes",(t,e)=>{Lt.init(t,e);let n=Ar(e.includes),r=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=r,t._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=o=>{o.value.includes(e.includes,e.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:o.value,inst:t,continue:!e.abort})}}),Ex=P("$ZodCheckStartsWith",(t,e)=>{Lt.init(t,e);let n=new RegExp(`^${Ar(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),t._zod.check=r=>{r.value.startsWith(e.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:r.value,inst:t,continue:!e.abort})}}),$x=P("$ZodCheckEndsWith",(t,e)=>{Lt.init(t,e);let n=new RegExp(`.*${Ar(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),t._zod.check=r=>{r.value.endsWith(e.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:r.value,inst:t,continue:!e.abort})}});var Rx=P("$ZodCheckOverwrite",(t,e)=>{Lt.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});var Ja=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let r=e.split(`
|
|
22
22
|
`).filter(s=>s),o=Math.min(...r.map(s=>s.length-s.trimStart().length)),i=r.map(s=>s.slice(o)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s)}compile(){let e=Function,n=this==null?void 0:this.args,o=[...((this==null?void 0:this.content)??[""]).map(i=>` ${i}`)];return new e(...n,o.join(`
|
|
23
|
-
`))}};var
|
|
23
|
+
`))}};var Px={major:4,minor:0,patch:0};var Ke=P("$ZodType",(t,e)=>{var o;var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Px;let r=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&r.unshift(t);for(let i of r)for(let s of i._zod.onattach)s(t);if(r.length===0)(n=t._zod).deferred??(n.deferred=[]),(o=t._zod.deferred)==null||o.push(()=>{t._zod.run=t._zod.parse});else{let i=(s,a,c)=>{let l=vo(s),p;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(l)continue;let f=s.issues.length,h=d._zod.check(s);if(h instanceof Promise&&(c==null?void 0:c.async)===!1)throw new hr;if(p||h instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await h,s.issues.length!==f&&(l||(l=vo(s,f)))});else{if(s.issues.length===f)continue;l||(l=vo(s,f))}}return p?p.then(()=>s):s};t._zod.run=(s,a)=>{let c=t._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new hr;return c.then(l=>i(l,r,a))}return i(c,r,a)}}t["~standard"]={validate:i=>{var s;try{let a=bo(t,i);return a.success?{value:a.data}:{issues:(s=a.error)==null?void 0:s.issues}}catch{return _o(t,i).then(c=>{var l;return c.success?{value:c.data}:{issues:(l=c.error)==null?void 0:l.issues}})}},vendor:"zod",version:1}}),ms=P("$ZodString",(t,e)=>{var n;Ke.init(t,e),t._zod.pattern=[...((n=t==null?void 0:t._zod.bag)==null?void 0:n.patterns)??[]].pop()??lx(t._zod.bag),t._zod.parse=(r,o)=>{if(e.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:t}),r}}),tt=P("$ZodStringFormat",(t,e)=>{fs.init(t,e),ms.init(t,e)}),Qu=P("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Wy),tt.init(t,e)}),ep=P("$ZodUUID",(t,e)=>{if(e.version){let r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(r===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Wu(r))}else e.pattern??(e.pattern=Wu());tt.init(t,e)}),tp=P("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Ky),tt.init(t,e)}),np=P("$ZodURL",(t,e)=>{tt.init(t,e),t._zod.check=n=>{try{let r=n.value,o=new URL(r),i=o.href;e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:nx.source,input:n.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:t,continue:!e.abort})),!r.endsWith("/")&&i.endsWith("/")?n.value=i.slice(0,-1):n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort})}}}),rp=P("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Jy()),tt.init(t,e)}),op=P("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Vy),tt.init(t,e)}),ip=P("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Uy),tt.init(t,e)}),sp=P("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=qy),tt.init(t,e)}),ap=P("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Zy),tt.init(t,e)}),cp=P("$ZodXID",(t,e)=>{e.pattern??(e.pattern=By),tt.init(t,e)}),lp=P("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Hy),tt.init(t,e)}),Fx=P("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=cx(e)),tt.init(t,e)}),Ux=P("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=ix),tt.init(t,e)}),qx=P("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=ax(e)),tt.init(t,e)}),Zx=P("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Gy),tt.init(t,e)}),up=P("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Yy),tt.init(t,e),t._zod.onattach.push(n=>{let r=n._zod.bag;r.format="ipv4"})}),pp=P("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Xy),tt.init(t,e),t._zod.onattach.push(n=>{let r=n._zod.bag;r.format="ipv6"}),t._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!e.abort})}}}),dp=P("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Qy),tt.init(t,e)}),fp=P("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=ex),tt.init(t,e),t._zod.check=n=>{let[r,o]=n.value.split("/");try{if(!o)throw new Error;let i=Number(o);if(`${i}`!==o)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!e.abort})}}});function Bx(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var mp=P("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=tx),tt.init(t,e),t._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),t._zod.check=n=>{Bx(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}});function CA(t){if(!Ku.test(t))return!1;let e=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return Bx(n)}var hp=P("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Ku),tt.init(t,e),t._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),t._zod.check=n=>{CA(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),gp=P("$ZodE164",(t,e)=>{e.pattern??(e.pattern=rx),tt.init(t,e)});function IA(t,e=null){try{let n=t.split(".");if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let o=JSON.parse(atob(r));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||e&&(!("alg"in o)||o.alg!==e))}catch{return!1}}var yp=P("$ZodJWT",(t,e)=>{tt.init(t,e),t._zod.check=n=>{IA(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}});var Xa=P("$ZodNumber",(t,e)=>{Ke.init(t,e),t._zod.pattern=t._zod.bag.pattern??px,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}let o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;let i=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...i?{received:i}:{}}),n}}),xp=P("$ZodNumber",(t,e)=>{xx.init(t,e),Xa.init(t,e)}),vp=P("$ZodBoolean",(t,e)=>{Ke.init(t,e),t._zod.pattern=dx,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=!!n.value}catch{}let o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),n}});var bp=P("$ZodNull",(t,e)=>{Ke.init(t,e),t._zod.pattern=fx,t._zod.values=new Set([null]),t._zod.parse=(n,r)=>{let o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:t}),n}});var _p=P("$ZodUnknown",(t,e)=>{Ke.init(t,e),t._zod.parse=n=>n}),wp=P("$ZodNever",(t,e)=>{Ke.init(t,e),t._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)});function Cx(t,e,n){t.issues.length&&e.issues.push(...Yn(n,t.issues)),e.value[n]=t.value}var Sp=P("$ZodArray",(t,e)=>{Ke.init(t,e),t._zod.parse=(n,r)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:t}),n;n.value=Array(o.length);let i=[];for(let s=0;s<o.length;s++){let a=o[s],c=e.element._zod.run({value:a,issues:[]},r);c instanceof Promise?i.push(c.then(l=>Cx(l,n,s))):Cx(c,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function Ya(t,e,n){t.issues.length&&e.issues.push(...Yn(n,t.issues)),e.value[n]=t.value}function Ix(t,e,n,r){t.issues.length?r[n]===void 0?n in r?e.value[n]=void 0:e.value[n]=t.value:e.issues.push(...Yn(n,t.issues)):t.value===void 0?n in r&&(e.value[n]=void 0):e.value[n]=t.value}var Qa=P("$ZodObject",(t,e)=>{Ke.init(t,e);let n=cs(()=>{let d=Object.keys(e.shape);for(let h of d)if(!(e.shape[h]instanceof Ke))throw new Error(`Invalid element at key "${h}": expected a Zod schema`);let f=Lu(e.shape);return{shape:e.shape,keys:d,keySet:new Set(d),numKeys:d.length,optionalKeys:new Set(f)}});et(t._zod,"propValues",()=>{let d=e.shape,f={};for(let h in d){let y=d[h]._zod;if(y.values){f[h]??(f[h]=new Set);for(let b of y.values)f[h].add(b)}}return f});let r=d=>{let f=new Ja(["shape","payload","ctx"]),h=n.value,y=v=>{let w=xo(v);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};f.write("const input = payload.value;");let b=Object.create(null),x=0;for(let v of h.keys)b[v]=`key_${x++}`;f.write("const newResult = {}");for(let v of h.keys)if(h.optionalKeys.has(v)){let w=b[v];f.write(`const ${w} = ${y(v)};`);let k=xo(v);f.write(`
|
|
24
24
|
if (${w}.issues.length) {
|
|
25
25
|
if (input[${k}] === undefined) {
|
|
26
26
|
if (${k} in input) {
|
|
@@ -39,57 +39,58 @@
|
|
|
39
39
|
} else {
|
|
40
40
|
newResult[${k}] = ${w}.value;
|
|
41
41
|
}
|
|
42
|
-
`)}else{let w=v
|
|
42
|
+
`)}else{let w=b[v];f.write(`const ${w} = ${y(v)};`),f.write(`
|
|
43
43
|
if (${w}.issues.length) payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
|
|
44
44
|
...iss,
|
|
45
|
-
path: iss.path ? [${
|
|
46
|
-
})));`),f.write(`newResult[${go(b)}] = ${w}.value`)}f.write("payload.value = newResult;"),f.write("return payload;");let m=f.compile();return(b,w)=>m(d,b,w)},o,i=ni,s=!Fa.jitless,c=s&&Iu.value,l=e.catchall,p;t._zod.parse=(d,f)=>{p??(p=n.value);let h=d.value;if(!i(h))return d.issues.push({expected:"object",code:"invalid_type",input:h,inst:t}),d;let y=[];if(s&&c&&(f==null?void 0:f.async)===!1&&f.jitless!==!0)o||(o=r(e.shape)),d=o(d,f);else{d.value={};let w=p.shape;for(let k of p.keys){let E=w[k],F=E._zod.run({value:h[k],issues:[]},f),j=E._zod.optin==="optional"&&E._zod.optout==="optional";F instanceof Promise?y.push(F.then(me=>j?wx(me,d,k,h):Ga(me,d,k))):j?wx(F,d,k,h):Ga(F,d,k)}}if(!l)return y.length?Promise.all(y).then(()=>d):d;let v=[],x=p.keySet,m=l._zod,b=m.def.type;for(let w of Object.keys(h)){if(x.has(w))continue;if(b==="never"){v.push(w);continue}let k=m.run({value:h[w],issues:[]},f);k instanceof Promise?y.push(k.then(E=>Ga(E,d,w))):Ga(k,d,w)}return v.length&&d.issues.push({code:"unrecognized_keys",keys:v,input:h,inst:t}),y.length?Promise.all(y).then(()=>d):d}});function Sx(t,e,n,r){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;return e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(o=>o.issues.map(i=>Nn(i,r,gn())))}),e}var Ja=I("$ZodUnion",(t,e)=>{Ke.init(t,e),et(t._zod,"optin",()=>e.options.some(n=>n._zod.optin==="optional")?"optional":void 0),et(t._zod,"optout",()=>e.options.some(n=>n._zod.optout==="optional")?"optional":void 0),et(t._zod,"values",()=>{if(e.options.every(n=>n._zod.values))return new Set(e.options.flatMap(n=>Array.from(n._zod.values)))}),et(t._zod,"pattern",()=>{if(e.options.every(n=>n._zod.pattern)){let n=e.options.map(r=>r._zod.pattern);return new RegExp(`^(${n.map(r=>as(r.source)).join("|")})$`)}}),t._zod.parse=(n,r)=>{let o=!1,i=[];for(let s of e.options){let a=s._zod.run({value:n.value,issues:[]},r);if(a instanceof Promise)i.push(a),o=!0;else{if(a.issues.length===0)return a;i.push(a)}}return o?Promise.all(i).then(s=>Sx(s,n,t,r)):Sx(i,n,t,r)}}),vp=I("$ZodDiscriminatedUnion",(t,e)=>{Ja.init(t,e);let n=t._zod.parse;et(t._zod,"propValues",()=>{let o={};for(let i of e.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){o[a]||(o[a]=new Set);for(let l of c)o[a].add(l)}}return o});let r=is(()=>{let o=e.options,i=new Map;for(let s of o){let a=s._zod.propValues[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s)}}return i});t._zod.parse=(o,i)=>{let s=o.value;if(!ni(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),o;let a=r.value.get(s==null?void 0:s[e.discriminator]);return a?a._zod.run(o,i):e.unionFallback?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[e.discriminator],inst:t}),o)}}),bp=I("$ZodIntersection",(t,e)=>{Ke.init(t,e),t._zod.parse=(n,r)=>{let o=n.value,i=e.left._zod.run({value:o,issues:[]},r),s=e.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,l])=>kx(n,c,l)):kx(n,i,s)}});function Gu(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(ri(t)&&ri(e)){let n=Object.keys(e),r=Object.keys(t).filter(i=>n.indexOf(i)!==-1),o={...t,...e};for(let i of r){let s=Gu(t[i],e[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e[r],s=Gu(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function kx(t,e,n){if(e.issues.length&&t.issues.push(...e.issues),n.issues.length&&t.issues.push(...n.issues),yo(t))return t;let r=Gu(e.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return t.value=r.data,t}var _p=I("$ZodRecord",(t,e)=>{Ke.init(t,e),t._zod.parse=(n,r)=>{let o=n.value;if(!ri(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:t}),n;let i=[];if(e.keyType._zod.values){let s=e.keyType._zod.values;n.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let l=e.valueType._zod.run({value:o[c],issues:[]},r);l instanceof Promise?i.push(l.then(p=>{p.issues.length&&n.issues.push(...Jn(c,p.issues)),n.value[c]=p.value})):(l.issues.length&&n.issues.push(...Jn(c,l.issues)),n.value[c]=l.value)}let a;for(let c in o)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:t,keys:a})}else{n.value={};for(let s of Reflect.ownKeys(o)){if(s==="__proto__")continue;let a=e.keyType._zod.run({value:s,issues:[]},r);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){n.issues.push({origin:"record",code:"invalid_key",issues:a.issues.map(l=>Nn(l,r,gn())),input:s,path:[s],inst:t}),n.value[a.value]=a.value;continue}let c=e.valueType._zod.run({value:o[s],issues:[]},r);c instanceof Promise?i.push(c.then(l=>{l.issues.length&&n.issues.push(...Jn(s,l.issues)),n.value[a.value]=l.value})):(c.issues.length&&n.issues.push(...Jn(s,c.issues)),n.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}});var wp=I("$ZodEnum",(t,e)=>{Ke.init(t,e);let n=os(e.entries);t._zod.values=new Set(n),t._zod.pattern=new RegExp(`^(${n.filter(r=>Cu.has(typeof r)).map(r=>typeof r=="string"?Er(r):r.toString()).join("|")})$`),t._zod.parse=(r,o)=>{let i=r.value;return t._zod.values.has(i)||r.issues.push({code:"invalid_value",values:n,input:i,inst:t}),r}}),Sp=I("$ZodLiteral",(t,e)=>{Ke.init(t,e),t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?Er(n):n?n.toString():String(n)).join("|")})$`),t._zod.parse=(n,r)=>{let o=n.value;return t._zod.values.has(o)||n.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),n}});var kp=I("$ZodTransform",(t,e)=>{Ke.init(t,e),t._zod.parse=(n,r)=>{let o=e.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n));if(o instanceof Promise)throw new fr;return n.value=o,n}}),Tp=I("$ZodOptional",(t,e)=>{Ke.init(t,e),t._zod.optin="optional",t._zod.optout="optional",et(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),et(t._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${as(n.source)})?$`):void 0}),t._zod.parse=(n,r)=>e.innerType._zod.optin==="optional"?e.innerType._zod.run(n,r):n.value===void 0?n:e.innerType._zod.run(n,r)}),Ep=I("$ZodNullable",(t,e)=>{Ke.init(t,e),et(t._zod,"optin",()=>e.innerType._zod.optin),et(t._zod,"optout",()=>e.innerType._zod.optout),et(t._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${as(n.source)}|null)$`):void 0}),et(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(n,r)=>n.value===null?n:e.innerType._zod.run(n,r)}),$p=I("$ZodDefault",(t,e)=>{Ke.init(t,e),t._zod.optin="optional",et(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>{if(n.value===void 0)return n.value=e.defaultValue,n;let o=e.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Tx(i,e)):Tx(o,e)}});function Tx(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var Rp=I("$ZodPrefault",(t,e)=>{Ke.init(t,e),t._zod.optin="optional",et(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>(n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,r))}),Ap=I("$ZodNonOptional",(t,e)=>{Ke.init(t,e),et(t._zod,"values",()=>{let n=e.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),t._zod.parse=(n,r)=>{let o=e.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Ex(i,t)):Ex(o,t)}});function Ex(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}var Ip=I("$ZodCatch",(t,e)=>{Ke.init(t,e),t._zod.optin="optional",et(t._zod,"optout",()=>e.innerType._zod.optout),et(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>{let o=e.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=e.catchValue({...n,error:{issues:i.issues.map(s=>Nn(s,r,gn()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=e.catchValue({...n,error:{issues:o.issues.map(i=>Nn(i,r,gn()))},input:n.value}),n.issues=[]),n)}});var Cp=I("$ZodPipe",(t,e)=>{Ke.init(t,e),et(t._zod,"values",()=>e.in._zod.values),et(t._zod,"optin",()=>e.in._zod.optin),et(t._zod,"optout",()=>e.out._zod.optout),t._zod.parse=(n,r)=>{let o=e.in._zod.run(n,r);return o instanceof Promise?o.then(i=>$x(i,e,r)):$x(o,e,r)}});function $x(t,e,n){return yo(t)?t:e.out._zod.run({value:t.value,issues:t.issues},n)}var Pp=I("$ZodReadonly",(t,e)=>{Ke.init(t,e),et(t._zod,"propValues",()=>e.innerType._zod.propValues),et(t._zod,"values",()=>e.innerType._zod.values),et(t._zod,"optin",()=>e.innerType._zod.optin),et(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(n,r)=>{let o=e.innerType._zod.run(n,r);return o instanceof Promise?o.then(Rx):Rx(o)}});function Rx(t){return t.value=Object.freeze(t.value),t}var Op=I("$ZodCustom",(t,e)=>{jt.init(t,e),Ke.init(t,e),t._zod.parse=(n,r)=>n,t._zod.check=n=>{let r=n.value,o=e.fn(r);if(o instanceof Promise)return o.then(i=>Ax(i,n,r,t));Ax(o,n,r,t)}});function Ax(t,e,n,r){if(!t){let o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),e.issues.push(zu(o))}}var _A=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},wA=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function e(r){return t[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Invalid input: expected ${r.expected}, received ${_A(r.input)}`;case"invalid_value":return r.values.length===1?`Invalid input: expected ${Za(r.values[0])}`:`Invalid option: expected one of ${Ua(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${i.unit}`:`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${Ua(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function Nx(){return{localeError:wA()}}var SA=Symbol("ZodOutput"),kA=Symbol("ZodInput"),ds=class{constructor(){this._map=new Map,this._idmap=new Map}add(e,...n){let r=n[0];if(this._map.set(e,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){let n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){let n=e._zod.parent;if(n){let r={...this.get(n)??{}};return delete r.id,{...r,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}};function jx(){return new ds}var $r=jx();function zp(t,e){return new t({type:"string",...ue(e)})}function Np(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ue(e)})}function Ya(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ue(e)})}function jp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ue(e)})}function Lp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ue(e)})}function Dp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ue(e)})}function Mp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ue(e)})}function Fp(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ue(e)})}function Up(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ue(e)})}function qp(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ue(e)})}function Zp(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ue(e)})}function Bp(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ue(e)})}function Hp(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ue(e)})}function Vp(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ue(e)})}function Gp(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ue(e)})}function Wp(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ue(e)})}function Kp(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ue(e)})}function Jp(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ue(e)})}function Yp(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ue(e)})}function Xp(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ue(e)})}function Qp(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ue(e)})}function ed(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ue(e)})}function td(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ue(e)})}function Lx(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ue(e)})}function Dx(t,e){return new t({type:"string",format:"date",check:"string_format",...ue(e)})}function Mx(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...ue(e)})}function Fx(t,e){return new t({type:"string",format:"duration",check:"string_format",...ue(e)})}function nd(t,e){return new t({type:"number",checks:[],...ue(e)})}function rd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ue(e)})}function od(t,e){return new t({type:"boolean",...ue(e)})}function id(t,e){return new t({type:"null",...ue(e)})}function sd(t){return new t({type:"unknown"})}function ad(t,e){return new t({type:"never",...ue(e)})}function Xa(t,e){return new Hu({check:"less_than",...ue(e),value:t,inclusive:!1})}function fs(t,e){return new Hu({check:"less_than",...ue(e),value:t,inclusive:!0})}function Qa(t,e){return new Vu({check:"greater_than",...ue(e),value:t,inclusive:!1})}function ms(t,e){return new Vu({check:"greater_than",...ue(e),value:t,inclusive:!0})}function ec(t,e){return new ax({check:"multiple_of",...ue(e),value:t})}function tc(t,e){return new lx({check:"max_length",...ue(e),maximum:t})}function oi(t,e){return new ux({check:"min_length",...ue(e),minimum:t})}function nc(t,e){return new px({check:"length_equals",...ue(e),length:t})}function cd(t,e){return new dx({check:"string_format",format:"regex",...ue(e),pattern:t})}function ld(t){return new fx({check:"string_format",format:"lowercase",...ue(t)})}function ud(t){return new mx({check:"string_format",format:"uppercase",...ue(t)})}function pd(t,e){return new hx({check:"string_format",format:"includes",...ue(e),includes:t})}function dd(t,e){return new gx({check:"string_format",format:"starts_with",...ue(e),prefix:t})}function fd(t,e){return new yx({check:"string_format",format:"ends_with",...ue(e),suffix:t})}function bo(t){return new xx({check:"overwrite",tx:t})}function md(t){return bo(e=>e.normalize(t))}function hd(){return bo(t=>t.trim())}function gd(){return bo(t=>t.toLowerCase())}function yd(){return bo(t=>t.toUpperCase())}function Ux(t,e,n){return new t({type:"array",element:e,...ue(n)})}function xd(t,e,n){let r=ue(n);return r.abort??(r.abort=!0),new t({type:"custom",check:"custom",fn:e,...r})}function vd(t,e,n){return new t({type:"custom",check:"custom",fn:e,...ue(n)})}var rc=class{constructor(e){this.counter=0,this.metadataRegistry=(e==null?void 0:e.metadata)??$r,this.target=(e==null?void 0:e.target)??"draft-2020-12",this.unrepresentable=(e==null?void 0:e.unrepresentable)??"throw",this.override=(e==null?void 0:e.override)??(()=>{}),this.io=(e==null?void 0:e.io)??"output",this.seen=new Map}process(e,n={path:[],schemaPath:[]}){var d,f,h;var r;let o=e._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(e,a);let c=(f=(d=e._zod).toJSONSchema)==null?void 0:f.call(d);if(c)a.schema=c;else{let y={...n,schemaPath:[...n.schemaPath,e],path:n.path},v=e._zod.parent;if(v)a.ref=v,this.process(v,y),this.seen.get(v).isParent=!0;else{let x=a.schema;switch(o.type){case"string":{let m=x;m.type="string";let{minimum:b,maximum:w,format:k,patterns:E,contentEncoding:F}=e._zod.bag;if(typeof b=="number"&&(m.minLength=b),typeof w=="number"&&(m.maxLength=w),k&&(m.format=i[k]??k,m.format===""&&delete m.format),F&&(m.contentEncoding=F),E&&E.size>0){let j=[...E];j.length===1?m.pattern=j[0].source:j.length>1&&(a.schema.allOf=[...j.map(me=>({...this.target==="draft-7"?{type:"string"}:{},pattern:me.source}))])}break}case"number":{let m=x,{minimum:b,maximum:w,format:k,multipleOf:E,exclusiveMaximum:F,exclusiveMinimum:j}=e._zod.bag;typeof k=="string"&&k.includes("int")?m.type="integer":m.type="number",typeof j=="number"&&(m.exclusiveMinimum=j),typeof b=="number"&&(m.minimum=b,typeof j=="number"&&(j>=b?delete m.minimum:delete m.exclusiveMinimum)),typeof F=="number"&&(m.exclusiveMaximum=F),typeof w=="number"&&(m.maximum=w,typeof F=="number"&&(F<=w?delete m.maximum:delete m.exclusiveMaximum)),typeof E=="number"&&(m.multipleOf=E);break}case"boolean":{let m=x;m.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{x.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{x.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let m=x,{minimum:b,maximum:w}=e._zod.bag;typeof b=="number"&&(m.minItems=b),typeof w=="number"&&(m.maxItems=w),m.type="array",m.items=this.process(o.element,{...y,path:[...y.path,"items"]});break}case"object":{let m=x;m.type="object",m.properties={};let b=o.shape;for(let E in b)m.properties[E]=this.process(b[E],{...y,path:[...y.path,"properties",E]});let w=new Set(Object.keys(b)),k=new Set([...w].filter(E=>{let F=o.shape[E]._zod;return this.io==="input"?F.optin===void 0:F.optout===void 0}));k.size>0&&(m.required=Array.from(k)),((h=o.catchall)==null?void 0:h._zod.def.type)==="never"?m.additionalProperties=!1:o.catchall?o.catchall&&(m.additionalProperties=this.process(o.catchall,{...y,path:[...y.path,"additionalProperties"]})):this.io==="output"&&(m.additionalProperties=!1);break}case"union":{let m=x;m.anyOf=o.options.map((b,w)=>this.process(b,{...y,path:[...y.path,"anyOf",w]}));break}case"intersection":{let m=x,b=this.process(o.left,{...y,path:[...y.path,"allOf",0]}),w=this.process(o.right,{...y,path:[...y.path,"allOf",1]}),k=F=>"allOf"in F&&Object.keys(F).length===1,E=[...k(b)?b.allOf:[b],...k(w)?w.allOf:[w]];m.allOf=E;break}case"tuple":{let m=x;m.type="array";let b=o.items.map((E,F)=>this.process(E,{...y,path:[...y.path,"prefixItems",F]}));if(this.target==="draft-2020-12"?m.prefixItems=b:m.items=b,o.rest){let E=this.process(o.rest,{...y,path:[...y.path,"items"]});this.target==="draft-2020-12"?m.items=E:m.additionalItems=E}o.rest&&(m.items=this.process(o.rest,{...y,path:[...y.path,"items"]}));let{minimum:w,maximum:k}=e._zod.bag;typeof w=="number"&&(m.minItems=w),typeof k=="number"&&(m.maxItems=k);break}case"record":{let m=x;m.type="object",m.propertyNames=this.process(o.keyType,{...y,path:[...y.path,"propertyNames"]}),m.additionalProperties=this.process(o.valueType,{...y,path:[...y.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let m=x,b=os(o.entries);b.every(w=>typeof w=="number")&&(m.type="number"),b.every(w=>typeof w=="string")&&(m.type="string"),m.enum=b;break}case"literal":{let m=x,b=[];for(let w of o.values)if(w===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof w=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");b.push(Number(w))}else b.push(w);if(b.length!==0)if(b.length===1){let w=b[0];m.type=w===null?"null":typeof w,m.const=w}else b.every(w=>typeof w=="number")&&(m.type="number"),b.every(w=>typeof w=="string")&&(m.type="string"),b.every(w=>typeof w=="boolean")&&(m.type="string"),b.every(w=>w===null)&&(m.type="null"),m.enum=b;break}case"file":{let m=x,b={type:"string",format:"binary",contentEncoding:"binary"},{minimum:w,maximum:k,mime:E}=e._zod.bag;w!==void 0&&(b.minLength=w),k!==void 0&&(b.maxLength=k),E?E.length===1?(b.contentMediaType=E[0],Object.assign(m,b)):m.anyOf=E.map(F=>({...b,contentMediaType:F})):Object.assign(m,b);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let m=this.process(o.innerType,y);x.anyOf=[m,{type:"null"}];break}case"nonoptional":{this.process(o.innerType,y),a.ref=o.innerType;break}case"success":{let m=x;m.type="boolean";break}case"default":{this.process(o.innerType,y),a.ref=o.innerType,x.default=JSON.parse(JSON.stringify(o.defaultValue));break}case"prefault":{this.process(o.innerType,y),a.ref=o.innerType,this.io==="input"&&(x._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break}case"catch":{this.process(o.innerType,y),a.ref=o.innerType;let m;try{m=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}x.default=m;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let m=x,b=e._zod.pattern;if(!b)throw new Error("Pattern not found in template literal");m.type="string",m.pattern=b.source;break}case"pipe":{let m=this.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;this.process(m,y),a.ref=m;break}case"readonly":{this.process(o.innerType,y),a.ref=o.innerType,x.readOnly=!0;break}case"promise":{this.process(o.innerType,y),a.ref=o.innerType;break}case"optional":{this.process(o.innerType,y),a.ref=o.innerType;break}case"lazy":{let m=e._zod.innerType;this.process(m,y),a.ref=m;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let l=this.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),this.io==="input"&&$t(e)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(e).schema}emit(e,n){var p,d,f,h,y,v;let r={cycles:(n==null?void 0:n.cycles)??"ref",reused:(n==null?void 0:n.reused)??"inline",external:(n==null?void 0:n.external)??void 0},o=this.seen.get(e);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=x=>{var E;let m=this.target==="draft-2020-12"?"$defs":"definitions";if(r.external){let F=(E=r.external.registry.get(x[0]))==null?void 0:E.id,j=r.external.uri??(de=>de);if(F)return{ref:j(F)};let me=x[1].defId??x[1].schema.id??`schema${this.counter++}`;return x[1].defId=me,{defId:me,ref:`${j("__shared")}#/${m}/${me}`}}if(x[1]===o)return{ref:"#"};let w=`#/${m}/`,k=x[1].schema.id??`__schema${this.counter++}`;return{defId:k,ref:w+k}},s=x=>{if(x[1].schema.$ref)return;let m=x[1],{ref:b,defId:w}=i(x);m.def={...m.schema},w&&(m.defId=w);let k=m.schema;for(let E in k)delete k[E];k.$ref=b};if(r.cycles==="throw")for(let x of this.seen.entries()){let m=x[1];if(m.cycle)throw new Error(`Cycle detected: #/${(p=m.cycle)==null?void 0:p.join("/")}/<root>
|
|
45
|
+
path: iss.path ? [${xo(v)}, ...iss.path] : [${xo(v)}]
|
|
46
|
+
})));`),f.write(`newResult[${xo(v)}] = ${w}.value`)}f.write("payload.value = newResult;"),f.write("return payload;");let m=f.compile();return(v,w)=>m(d,v,w)},o,i=oi,s=!Ba.jitless,c=s&&Nu.value,l=e.catchall,p;t._zod.parse=(d,f)=>{p??(p=n.value);let h=d.value;if(!i(h))return d.issues.push({expected:"object",code:"invalid_type",input:h,inst:t}),d;let y=[];if(s&&c&&(f==null?void 0:f.async)===!1&&f.jitless!==!0)o||(o=r(e.shape)),d=o(d,f);else{d.value={};let w=p.shape;for(let k of p.keys){let E=w[k],F=E._zod.run({value:h[k],issues:[]},f),j=E._zod.optin==="optional"&&E._zod.optout==="optional";F instanceof Promise?y.push(F.then(me=>j?Ix(me,d,k,h):Ya(me,d,k))):j?Ix(F,d,k,h):Ya(F,d,k)}}if(!l)return y.length?Promise.all(y).then(()=>d):d;let b=[],x=p.keySet,m=l._zod,v=m.def.type;for(let w of Object.keys(h)){if(x.has(w))continue;if(v==="never"){b.push(w);continue}let k=m.run({value:h[w],issues:[]},f);k instanceof Promise?y.push(k.then(E=>Ya(E,d,w))):Ya(k,d,w)}return b.length&&d.issues.push({code:"unrecognized_keys",keys:b,input:h,inst:t}),y.length?Promise.all(y).then(()=>d):d}});function Ox(t,e,n,r){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;return e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(o=>o.issues.map(i=>jn(i,r,xn())))}),e}var ec=P("$ZodUnion",(t,e)=>{Ke.init(t,e),et(t._zod,"optin",()=>e.options.some(n=>n._zod.optin==="optional")?"optional":void 0),et(t._zod,"optout",()=>e.options.some(n=>n._zod.optout==="optional")?"optional":void 0),et(t._zod,"values",()=>{if(e.options.every(n=>n._zod.values))return new Set(e.options.flatMap(n=>Array.from(n._zod.values)))}),et(t._zod,"pattern",()=>{if(e.options.every(n=>n._zod.pattern)){let n=e.options.map(r=>r._zod.pattern);return new RegExp(`^(${n.map(r=>us(r.source)).join("|")})$`)}}),t._zod.parse=(n,r)=>{let o=!1,i=[];for(let s of e.options){let a=s._zod.run({value:n.value,issues:[]},r);if(a instanceof Promise)i.push(a),o=!0;else{if(a.issues.length===0)return a;i.push(a)}}return o?Promise.all(i).then(s=>Ox(s,n,t,r)):Ox(i,n,t,r)}}),kp=P("$ZodDiscriminatedUnion",(t,e)=>{ec.init(t,e);let n=t._zod.parse;et(t._zod,"propValues",()=>{let o={};for(let i of e.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){o[a]||(o[a]=new Set);for(let l of c)o[a].add(l)}}return o});let r=cs(()=>{let o=e.options,i=new Map;for(let s of o){let a=s._zod.propValues[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s)}}return i});t._zod.parse=(o,i)=>{let s=o.value;if(!oi(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),o;let a=r.value.get(s==null?void 0:s[e.discriminator]);return a?a._zod.run(o,i):e.unionFallback?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:s,path:[e.discriminator],inst:t}),o)}}),Tp=P("$ZodIntersection",(t,e)=>{Ke.init(t,e),t._zod.parse=(n,r)=>{let o=n.value,i=e.left._zod.run({value:o,issues:[]},r),s=e.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,l])=>zx(n,c,l)):zx(n,i,s)}});function Xu(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(ii(t)&&ii(e)){let n=Object.keys(e),r=Object.keys(t).filter(i=>n.indexOf(i)!==-1),o={...t,...e};for(let i of r){let s=Xu(t[i],e[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e[r],s=Xu(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n.push(s.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function zx(t,e,n){if(e.issues.length&&t.issues.push(...e.issues),n.issues.length&&t.issues.push(...n.issues),vo(t))return t;let r=Xu(e.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return t.value=r.data,t}var Ep=P("$ZodRecord",(t,e)=>{Ke.init(t,e),t._zod.parse=(n,r)=>{let o=n.value;if(!ii(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:t}),n;let i=[];if(e.keyType._zod.values){let s=e.keyType._zod.values;n.value={};for(let c of s)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){let l=e.valueType._zod.run({value:o[c],issues:[]},r);l instanceof Promise?i.push(l.then(p=>{p.issues.length&&n.issues.push(...Yn(c,p.issues)),n.value[c]=p.value})):(l.issues.length&&n.issues.push(...Yn(c,l.issues)),n.value[c]=l.value)}let a;for(let c in o)s.has(c)||(a=a??[],a.push(c));a&&a.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:t,keys:a})}else{n.value={};for(let s of Reflect.ownKeys(o)){if(s==="__proto__")continue;let a=e.keyType._zod.run({value:s,issues:[]},r);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(a.issues.length){n.issues.push({origin:"record",code:"invalid_key",issues:a.issues.map(l=>jn(l,r,xn())),input:s,path:[s],inst:t}),n.value[a.value]=a.value;continue}let c=e.valueType._zod.run({value:o[s],issues:[]},r);c instanceof Promise?i.push(c.then(l=>{l.issues.length&&n.issues.push(...Yn(s,l.issues)),n.value[a.value]=l.value})):(c.issues.length&&n.issues.push(...Yn(s,c.issues)),n.value[a.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}});var $p=P("$ZodEnum",(t,e)=>{Ke.init(t,e);let n=as(e.entries);t._zod.values=new Set(n),t._zod.pattern=new RegExp(`^(${n.filter(r=>ju.has(typeof r)).map(r=>typeof r=="string"?Ar(r):r.toString()).join("|")})$`),t._zod.parse=(r,o)=>{let i=r.value;return t._zod.values.has(i)||r.issues.push({code:"invalid_value",values:n,input:i,inst:t}),r}}),Rp=P("$ZodLiteral",(t,e)=>{Ke.init(t,e),t._zod.values=new Set(e.values),t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?Ar(n):n?n.toString():String(n)).join("|")})$`),t._zod.parse=(n,r)=>{let o=n.value;return t._zod.values.has(o)||n.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),n}});var Ap=P("$ZodTransform",(t,e)=>{Ke.init(t,e),t._zod.parse=(n,r)=>{let o=e.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n));if(o instanceof Promise)throw new hr;return n.value=o,n}}),Pp=P("$ZodOptional",(t,e)=>{Ke.init(t,e),t._zod.optin="optional",t._zod.optout="optional",et(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),et(t._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${us(n.source)})?$`):void 0}),t._zod.parse=(n,r)=>e.innerType._zod.optin==="optional"?e.innerType._zod.run(n,r):n.value===void 0?n:e.innerType._zod.run(n,r)}),Cp=P("$ZodNullable",(t,e)=>{Ke.init(t,e),et(t._zod,"optin",()=>e.innerType._zod.optin),et(t._zod,"optout",()=>e.innerType._zod.optout),et(t._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${us(n.source)}|null)$`):void 0}),et(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(n,r)=>n.value===null?n:e.innerType._zod.run(n,r)}),Ip=P("$ZodDefault",(t,e)=>{Ke.init(t,e),t._zod.optin="optional",et(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>{if(n.value===void 0)return n.value=e.defaultValue,n;let o=e.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Nx(i,e)):Nx(o,e)}});function Nx(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var Op=P("$ZodPrefault",(t,e)=>{Ke.init(t,e),t._zod.optin="optional",et(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>(n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,r))}),zp=P("$ZodNonOptional",(t,e)=>{Ke.init(t,e),et(t._zod,"values",()=>{let n=e.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),t._zod.parse=(n,r)=>{let o=e.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>jx(i,t)):jx(o,t)}});function jx(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}var Np=P("$ZodCatch",(t,e)=>{Ke.init(t,e),t._zod.optin="optional",et(t._zod,"optout",()=>e.innerType._zod.optout),et(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>{let o=e.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=e.catchValue({...n,error:{issues:i.issues.map(s=>jn(s,r,xn()))},input:n.value}),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=e.catchValue({...n,error:{issues:o.issues.map(i=>jn(i,r,xn()))},input:n.value}),n.issues=[]),n)}});var jp=P("$ZodPipe",(t,e)=>{Ke.init(t,e),et(t._zod,"values",()=>e.in._zod.values),et(t._zod,"optin",()=>e.in._zod.optin),et(t._zod,"optout",()=>e.out._zod.optout),t._zod.parse=(n,r)=>{let o=e.in._zod.run(n,r);return o instanceof Promise?o.then(i=>Lx(i,e,r)):Lx(o,e,r)}});function Lx(t,e,n){return vo(t)?t:e.out._zod.run({value:t.value,issues:t.issues},n)}var Lp=P("$ZodReadonly",(t,e)=>{Ke.init(t,e),et(t._zod,"propValues",()=>e.innerType._zod.propValues),et(t._zod,"values",()=>e.innerType._zod.values),et(t._zod,"optin",()=>e.innerType._zod.optin),et(t._zod,"optout",()=>e.innerType._zod.optout),t._zod.parse=(n,r)=>{let o=e.innerType._zod.run(n,r);return o instanceof Promise?o.then(Dx):Dx(o)}});function Dx(t){return t.value=Object.freeze(t.value),t}var Dp=P("$ZodCustom",(t,e)=>{Lt.init(t,e),Ke.init(t,e),t._zod.parse=(n,r)=>n,t._zod.check=n=>{let r=n.value,o=e.fn(r);if(o instanceof Promise)return o.then(i=>Mx(i,n,r,t));Mx(o,n,r,t)}});function Mx(t,e,n,r){if(!t){let o={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),e.issues.push(Mu(o))}}var OA=t=>{let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return e},zA=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function e(r){return t[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Invalid input: expected ${r.expected}, received ${OA(r.input)}`;case"invalid_value":return r.values.length===1?`Invalid input: expected ${Ga(r.values[0])}`:`Invalid option: expected one of ${Ha(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",i=e(r.origin);return i?`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${i.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",i=e(r.origin);return i?`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${i.unit}`:`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${Ha(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function Hx(){return{localeError:zA()}}var NA=Symbol("ZodOutput"),jA=Symbol("ZodInput"),hs=class{constructor(){this._map=new Map,this._idmap=new Map}add(e,...n){let r=n[0];if(this._map.set(e,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){let n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){let n=e._zod.parent;if(n){let r={...this.get(n)??{}};return delete r.id,{...r,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}};function Vx(){return new hs}var Pr=Vx();function Mp(t,e){return new t({type:"string",...ue(e)})}function Fp(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ue(e)})}function tc(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ue(e)})}function Up(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ue(e)})}function qp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ue(e)})}function Zp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ue(e)})}function Bp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ue(e)})}function Hp(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ue(e)})}function Vp(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ue(e)})}function Gp(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ue(e)})}function Wp(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ue(e)})}function Kp(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ue(e)})}function Jp(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ue(e)})}function Yp(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ue(e)})}function Xp(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ue(e)})}function Qp(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ue(e)})}function ed(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ue(e)})}function td(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ue(e)})}function nd(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ue(e)})}function rd(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ue(e)})}function od(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ue(e)})}function id(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ue(e)})}function sd(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ue(e)})}function Gx(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ue(e)})}function Wx(t,e){return new t({type:"string",format:"date",check:"string_format",...ue(e)})}function Kx(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...ue(e)})}function Jx(t,e){return new t({type:"string",format:"duration",check:"string_format",...ue(e)})}function ad(t,e){return new t({type:"number",checks:[],...ue(e)})}function cd(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ue(e)})}function ld(t,e){return new t({type:"boolean",...ue(e)})}function ud(t,e){return new t({type:"null",...ue(e)})}function pd(t){return new t({type:"unknown"})}function dd(t,e){return new t({type:"never",...ue(e)})}function nc(t,e){return new Ju({check:"less_than",...ue(e),value:t,inclusive:!1})}function gs(t,e){return new Ju({check:"less_than",...ue(e),value:t,inclusive:!0})}function rc(t,e){return new Yu({check:"greater_than",...ue(e),value:t,inclusive:!1})}function ys(t,e){return new Yu({check:"greater_than",...ue(e),value:t,inclusive:!0})}function oc(t,e){return new yx({check:"multiple_of",...ue(e),value:t})}function ic(t,e){return new vx({check:"max_length",...ue(e),maximum:t})}function si(t,e){return new bx({check:"min_length",...ue(e),minimum:t})}function sc(t,e){return new _x({check:"length_equals",...ue(e),length:t})}function fd(t,e){return new wx({check:"string_format",format:"regex",...ue(e),pattern:t})}function md(t){return new Sx({check:"string_format",format:"lowercase",...ue(t)})}function hd(t){return new kx({check:"string_format",format:"uppercase",...ue(t)})}function gd(t,e){return new Tx({check:"string_format",format:"includes",...ue(e),includes:t})}function yd(t,e){return new Ex({check:"string_format",format:"starts_with",...ue(e),prefix:t})}function xd(t,e){return new $x({check:"string_format",format:"ends_with",...ue(e),suffix:t})}function wo(t){return new Rx({check:"overwrite",tx:t})}function vd(t){return wo(e=>e.normalize(t))}function bd(){return wo(t=>t.trim())}function _d(){return wo(t=>t.toLowerCase())}function wd(){return wo(t=>t.toUpperCase())}function Yx(t,e,n){return new t({type:"array",element:e,...ue(n)})}function Sd(t,e,n){let r=ue(n);return r.abort??(r.abort=!0),new t({type:"custom",check:"custom",fn:e,...r})}function kd(t,e,n){return new t({type:"custom",check:"custom",fn:e,...ue(n)})}var ac=class{constructor(e){this.counter=0,this.metadataRegistry=(e==null?void 0:e.metadata)??Pr,this.target=(e==null?void 0:e.target)??"draft-2020-12",this.unrepresentable=(e==null?void 0:e.unrepresentable)??"throw",this.override=(e==null?void 0:e.override)??(()=>{}),this.io=(e==null?void 0:e.io)??"output",this.seen=new Map}process(e,n={path:[],schemaPath:[]}){var d,f,h;var r;let o=e._zod.def,i={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},s=this.seen.get(e);if(s)return s.count++,n.schemaPath.includes(e)&&(s.cycle=n.path),s.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(e,a);let c=(f=(d=e._zod).toJSONSchema)==null?void 0:f.call(d);if(c)a.schema=c;else{let y={...n,schemaPath:[...n.schemaPath,e],path:n.path},b=e._zod.parent;if(b)a.ref=b,this.process(b,y),this.seen.get(b).isParent=!0;else{let x=a.schema;switch(o.type){case"string":{let m=x;m.type="string";let{minimum:v,maximum:w,format:k,patterns:E,contentEncoding:F}=e._zod.bag;if(typeof v=="number"&&(m.minLength=v),typeof w=="number"&&(m.maxLength=w),k&&(m.format=i[k]??k,m.format===""&&delete m.format),F&&(m.contentEncoding=F),E&&E.size>0){let j=[...E];j.length===1?m.pattern=j[0].source:j.length>1&&(a.schema.allOf=[...j.map(me=>({...this.target==="draft-7"?{type:"string"}:{},pattern:me.source}))])}break}case"number":{let m=x,{minimum:v,maximum:w,format:k,multipleOf:E,exclusiveMaximum:F,exclusiveMinimum:j}=e._zod.bag;typeof k=="string"&&k.includes("int")?m.type="integer":m.type="number",typeof j=="number"&&(m.exclusiveMinimum=j),typeof v=="number"&&(m.minimum=v,typeof j=="number"&&(j>=v?delete m.minimum:delete m.exclusiveMinimum)),typeof F=="number"&&(m.exclusiveMaximum=F),typeof w=="number"&&(m.maximum=w,typeof F=="number"&&(F<=w?delete m.maximum:delete m.exclusiveMaximum)),typeof E=="number"&&(m.multipleOf=E);break}case"boolean":{let m=x;m.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{x.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{x.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{let m=x,{minimum:v,maximum:w}=e._zod.bag;typeof v=="number"&&(m.minItems=v),typeof w=="number"&&(m.maxItems=w),m.type="array",m.items=this.process(o.element,{...y,path:[...y.path,"items"]});break}case"object":{let m=x;m.type="object",m.properties={};let v=o.shape;for(let E in v)m.properties[E]=this.process(v[E],{...y,path:[...y.path,"properties",E]});let w=new Set(Object.keys(v)),k=new Set([...w].filter(E=>{let F=o.shape[E]._zod;return this.io==="input"?F.optin===void 0:F.optout===void 0}));k.size>0&&(m.required=Array.from(k)),((h=o.catchall)==null?void 0:h._zod.def.type)==="never"?m.additionalProperties=!1:o.catchall?o.catchall&&(m.additionalProperties=this.process(o.catchall,{...y,path:[...y.path,"additionalProperties"]})):this.io==="output"&&(m.additionalProperties=!1);break}case"union":{let m=x;m.anyOf=o.options.map((v,w)=>this.process(v,{...y,path:[...y.path,"anyOf",w]}));break}case"intersection":{let m=x,v=this.process(o.left,{...y,path:[...y.path,"allOf",0]}),w=this.process(o.right,{...y,path:[...y.path,"allOf",1]}),k=F=>"allOf"in F&&Object.keys(F).length===1,E=[...k(v)?v.allOf:[v],...k(w)?w.allOf:[w]];m.allOf=E;break}case"tuple":{let m=x;m.type="array";let v=o.items.map((E,F)=>this.process(E,{...y,path:[...y.path,"prefixItems",F]}));if(this.target==="draft-2020-12"?m.prefixItems=v:m.items=v,o.rest){let E=this.process(o.rest,{...y,path:[...y.path,"items"]});this.target==="draft-2020-12"?m.items=E:m.additionalItems=E}o.rest&&(m.items=this.process(o.rest,{...y,path:[...y.path,"items"]}));let{minimum:w,maximum:k}=e._zod.bag;typeof w=="number"&&(m.minItems=w),typeof k=="number"&&(m.maxItems=k);break}case"record":{let m=x;m.type="object",m.propertyNames=this.process(o.keyType,{...y,path:[...y.path,"propertyNames"]}),m.additionalProperties=this.process(o.valueType,{...y,path:[...y.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{let m=x,v=as(o.entries);v.every(w=>typeof w=="number")&&(m.type="number"),v.every(w=>typeof w=="string")&&(m.type="string"),m.enum=v;break}case"literal":{let m=x,v=[];for(let w of o.values)if(w===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof w=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");v.push(Number(w))}else v.push(w);if(v.length!==0)if(v.length===1){let w=v[0];m.type=w===null?"null":typeof w,m.const=w}else v.every(w=>typeof w=="number")&&(m.type="number"),v.every(w=>typeof w=="string")&&(m.type="string"),v.every(w=>typeof w=="boolean")&&(m.type="string"),v.every(w=>w===null)&&(m.type="null"),m.enum=v;break}case"file":{let m=x,v={type:"string",format:"binary",contentEncoding:"binary"},{minimum:w,maximum:k,mime:E}=e._zod.bag;w!==void 0&&(v.minLength=w),k!==void 0&&(v.maxLength=k),E?E.length===1?(v.contentMediaType=E[0],Object.assign(m,v)):m.anyOf=E.map(F=>({...v,contentMediaType:F})):Object.assign(m,v);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{let m=this.process(o.innerType,y);x.anyOf=[m,{type:"null"}];break}case"nonoptional":{this.process(o.innerType,y),a.ref=o.innerType;break}case"success":{let m=x;m.type="boolean";break}case"default":{this.process(o.innerType,y),a.ref=o.innerType,x.default=JSON.parse(JSON.stringify(o.defaultValue));break}case"prefault":{this.process(o.innerType,y),a.ref=o.innerType,this.io==="input"&&(x._prefault=JSON.parse(JSON.stringify(o.defaultValue)));break}case"catch":{this.process(o.innerType,y),a.ref=o.innerType;let m;try{m=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}x.default=m;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{let m=x,v=e._zod.pattern;if(!v)throw new Error("Pattern not found in template literal");m.type="string",m.pattern=v.source;break}case"pipe":{let m=this.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;this.process(m,y),a.ref=m;break}case"readonly":{this.process(o.innerType,y),a.ref=o.innerType,x.readOnly=!0;break}case"promise":{this.process(o.innerType,y),a.ref=o.innerType;break}case"optional":{this.process(o.innerType,y),a.ref=o.innerType;break}case"lazy":{let m=e._zod.innerType;this.process(m,y),a.ref=m;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}default:}}}let l=this.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),this.io==="input"&&Rt(e)&&(delete a.schema.examples,delete a.schema.default),this.io==="input"&&a.schema._prefault&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,this.seen.get(e).schema}emit(e,n){var p,d,f,h,y,b;let r={cycles:(n==null?void 0:n.cycles)??"ref",reused:(n==null?void 0:n.reused)??"inline",external:(n==null?void 0:n.external)??void 0},o=this.seen.get(e);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=x=>{var E;let m=this.target==="draft-2020-12"?"$defs":"definitions";if(r.external){let F=(E=r.external.registry.get(x[0]))==null?void 0:E.id,j=r.external.uri??(de=>de);if(F)return{ref:j(F)};let me=x[1].defId??x[1].schema.id??`schema${this.counter++}`;return x[1].defId=me,{defId:me,ref:`${j("__shared")}#/${m}/${me}`}}if(x[1]===o)return{ref:"#"};let w=`#/${m}/`,k=x[1].schema.id??`__schema${this.counter++}`;return{defId:k,ref:w+k}},s=x=>{if(x[1].schema.$ref)return;let m=x[1],{ref:v,defId:w}=i(x);m.def={...m.schema},w&&(m.defId=w);let k=m.schema;for(let E in k)delete k[E];k.$ref=v};if(r.cycles==="throw")for(let x of this.seen.entries()){let m=x[1];if(m.cycle)throw new Error(`Cycle detected: #/${(p=m.cycle)==null?void 0:p.join("/")}/<root>
|
|
47
47
|
|
|
48
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let x of this.seen.entries()){let m=x[1];if(e===x[0]){s(x);continue}if(r.external){let w=(d=r.external.registry.get(x[0]))==null?void 0:d.id;if(e!==x[0]&&w){s(x);continue}}if((f=this.metadataRegistry.get(x[0]))==null?void 0:f.id){s(x);continue}if(m.cycle){s(x);continue}if(m.count>1&&r.reused==="ref"){s(x);continue}}let a=(x,m)=>{let b=this.seen.get(x),w=b.def??b.schema,k={...w};if(b.ref===null)return;let E=b.ref;if(b.ref=null,E){a(E,m);let F=this.seen.get(E).schema;F.$ref&&m.target==="draft-7"?(w.allOf=w.allOf??[],w.allOf.push(F)):(Object.assign(w,F),Object.assign(w,k))}b.isParent||this.override({zodSchema:x,jsonSchema:w,path:b.path??[]})};for(let x of[...this.seen.entries()].reverse())a(x[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),(h=r.external)!=null&&h.uri){let x=(y=r.external.registry.get(e))==null?void 0:y.id;if(!x)throw new Error("Schema is missing an `id` property");c.$id=r.external.uri(x)}Object.assign(c,o.def);let l=((v=r.external)==null?void 0:v.defs)??{};for(let x of this.seen.entries()){let m=x[1];m.def&&m.defId&&(l[m.defId]=m.def)}r.external||Object.keys(l).length>0&&(this.target==="draft-2020-12"?c.$defs=l:c.definitions=l);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}};function bd(t,e){if(t instanceof ds){let r=new rc(e),o={};for(let a of t._idmap.entries()){let[c,l]=a;r.process(l)}let i={},s={registry:t,uri:e==null?void 0:e.uri,defs:o};for(let a of t._idmap.entries()){let[c,l]=a;i[c]=r.emit(l,{...e,external:s})}if(Object.keys(o).length>0){let a=r.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:o}}return{schemas:i}}let n=new rc(e);return n.process(t),n.emit(t,e)}function $t(t,e){let n=e??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let o=t._zod.def;switch(o.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return $t(o.element,n);case"object":{for(let i in o.shape)if($t(o.shape[i],n))return!0;return!1}case"union":{for(let i of o.options)if($t(i,n))return!0;return!1}case"intersection":return $t(o.left,n)||$t(o.right,n);case"tuple":{for(let i of o.items)if($t(i,n))return!0;return!!(o.rest&&$t(o.rest,n))}case"record":return $t(o.keyType,n)||$t(o.valueType,n);case"map":return $t(o.keyType,n)||$t(o.valueType,n);case"set":return $t(o.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return $t(o.innerType,n);case"lazy":return $t(o.getter(),n);case"default":return $t(o.innerType,n);case"prefault":return $t(o.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return $t(o.in,n)||$t(o.out,n);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${o.type}`)}var iI=I("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");Ke.init(t,e),t.def=e,t.parse=(n,r)=>Du(t,n,r,{callee:t.parse}),t.safeParse=(n,r)=>xo(t,n,r),t.parseAsync=async(n,r)=>Fu(t,n,r,{callee:t.parseAsync}),t.safeParseAsync=async(n,r)=>vo(t,n,r),t.check=(...n)=>t.clone({...e,checks:[...e.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),t.clone=(n,r)=>yn(t,n,r),t.brand=()=>t,t.register=((n,r)=>(n.add(t,r),t))});var sI=I("ZodMiniObject",(t,e)=>{Ka.init(t,e),iI.init(t,e),Ce.defineLazy(t,"shape",()=>e.shape)});function _d(t,e){let n={type:"object",get shape(){return Ce.assignProp(this,"shape",{...t}),this.shape},...Ce.normalizeParams(e)};return new sI(n)}function kn(t){return!!t._zod}function wo(t){let e=Object.values(t);if(e.length===0)return _d({});let n=e.every(kn),r=e.every(o=>!kn(o));if(n)return _d(t);if(r)return ku(t);throw new Error("Mixed Zod versions detected in object shape.")}function Rr(t,e){return kn(t)?xo(t,e):t.safeParse(e)}async function oc(t,e){return kn(t)?await vo(t,e):await t.safeParseAsync(e)}function Ar(t){var n,r;if(!t)return;let e;if(kn(t)?e=(r=(n=t._zod)==null?void 0:n.def)==null?void 0:r.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function ii(t){var e;if(t){if(typeof t=="object"){let n=t,r=t;if(!n._def&&!r._zod){let o=Object.values(t);if(o.length>0&&o.every(i=>typeof i=="object"&&i!==null&&(i._def!==void 0||i._zod!==void 0||typeof i.parse=="function")))return wo(t)}}if(kn(t)){let r=(e=t._zod)==null?void 0:e.def;if(r&&(r.type==="object"||r.shape!==void 0))return t}else if(t.shape!==void 0)return t}}function ic(t){if(t&&typeof t=="object"){if("message"in t&&typeof t.message=="string")return t.message;if("issues"in t&&Array.isArray(t.issues)&&t.issues.length>0){let e=t.issues[0];if(e&&typeof e=="object"&&"message"in e)return String(e.message)}try{return JSON.stringify(t)}catch{return String(t)}}return String(t)}function Zx(t){return t.description}function Bx(t){var n,r,o;if(kn(t))return((r=(n=t._zod)==null?void 0:n.def)==null?void 0:r.type)==="optional";let e=t;return typeof t.isOptional=="function"?t.isOptional():((o=e._def)==null?void 0:o.typeName)==="ZodOptional"}function sc(t){var o;if(kn(t)){let s=(o=t._zod)==null?void 0:o.def;if(s){if(s.value!==void 0)return s.value;if(Array.isArray(s.values)&&s.values.length>0)return s.values[0]}}let n=t._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}let r=t.value;if(r!==void 0)return r}var hs={};za(hs,{ZodISODate:()=>Vx,ZodISODateTime:()=>Hx,ZodISODuration:()=>Wx,ZodISOTime:()=>Gx,date:()=>Sd,datetime:()=>wd,duration:()=>Td,time:()=>kd});var Hx=I("ZodISODateTime",(t,e)=>{Ix.init(t,e),pt.init(t,e)});function wd(t){return Lx(Hx,t)}var Vx=I("ZodISODate",(t,e)=>{Cx.init(t,e),pt.init(t,e)});function Sd(t){return Dx(Vx,t)}var Gx=I("ZodISOTime",(t,e)=>{Px.init(t,e),pt.init(t,e)});function kd(t){return Mx(Gx,t)}var Wx=I("ZodISODuration",(t,e)=>{Ox.init(t,e),pt.init(t,e)});function Td(t){return Fx(Wx,t)}var Kx=(t,e)=>{Ba.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:n=>ju(t,n)},flatten:{value:n=>Nu(t,n)},addIssue:{value:n=>t.issues.push(n)},addIssues:{value:n=>t.issues.push(...n)},isEmpty:{get(){return t.issues.length===0}}})},t3=I("ZodError",Kx),gs=I("ZodError",Kx,{Parent:Error});var Jx=Lu(gs),Yx=Mu(gs),Xx=Uu(gs),Qx=qu(gs);var xt=I("ZodType",(t,e)=>(Ke.init(t,e),t.def=e,Object.defineProperty(t,"_def",{value:e}),t.check=(...n)=>t.clone({...e,checks:[...e.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),t.clone=(n,r)=>yn(t,n,r),t.brand=()=>t,t.register=((n,r)=>(n.add(t,r),t)),t.parse=(n,r)=>Jx(t,n,r,{callee:t.parse}),t.safeParse=(n,r)=>Xx(t,n,r),t.parseAsync=async(n,r)=>Yx(t,n,r,{callee:t.parseAsync}),t.safeParseAsync=async(n,r)=>Qx(t,n,r),t.spa=t.safeParseAsync,t.refine=(n,r)=>t.check(rC(n,r)),t.superRefine=n=>t.check(oC(n)),t.overwrite=n=>t.check(bo(n)),t.optional=()=>ft(t),t.nullable=()=>nv(t),t.nullish=()=>ft(nv(t)),t.nonoptional=n=>JI(t,n),t.array=()=>Ne(t),t.or=n=>at([t,n]),t.and=n=>cc(t,n),t.transform=n=>$d(t,cv(n)),t.default=n=>GI(t,n),t.prefault=n=>KI(t,n),t.catch=n=>XI(t,n),t.pipe=n=>$d(t,n),t.readonly=()=>tC(t),t.describe=n=>{let r=t.clone();return $r.add(r,{description:n}),r},Object.defineProperty(t,"description",{get(){var n;return(n=$r.get(t))==null?void 0:n.description},configurable:!0}),t.meta=(...n)=>{if(n.length===0)return $r.get(t);let r=t.clone();return $r.add(r,n[0]),r},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),rv=I("_ZodString",(t,e)=>{ps.init(t,e),xt.init(t,e);let n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null,t.regex=(...r)=>t.check(cd(...r)),t.includes=(...r)=>t.check(pd(...r)),t.startsWith=(...r)=>t.check(dd(...r)),t.endsWith=(...r)=>t.check(fd(...r)),t.min=(...r)=>t.check(oi(...r)),t.max=(...r)=>t.check(tc(...r)),t.length=(...r)=>t.check(nc(...r)),t.nonempty=(...r)=>t.check(oi(1,...r)),t.lowercase=r=>t.check(ld(r)),t.uppercase=r=>t.check(ud(r)),t.trim=()=>t.check(hd()),t.normalize=(...r)=>t.check(md(...r)),t.toLowerCase=()=>t.check(gd()),t.toUpperCase=()=>t.check(yd())}),hI=I("ZodString",(t,e)=>{ps.init(t,e),rv.init(t,e),t.email=n=>t.check(Np(gI,n)),t.url=n=>t.check(Fp(yI,n)),t.jwt=n=>t.check(td(PI,n)),t.emoji=n=>t.check(Up(xI,n)),t.guid=n=>t.check(Ya(ev,n)),t.uuid=n=>t.check(jp(ac,n)),t.uuidv4=n=>t.check(Lp(ac,n)),t.uuidv6=n=>t.check(Dp(ac,n)),t.uuidv7=n=>t.check(Mp(ac,n)),t.nanoid=n=>t.check(qp(vI,n)),t.guid=n=>t.check(Ya(ev,n)),t.cuid=n=>t.check(Zp(bI,n)),t.cuid2=n=>t.check(Bp(_I,n)),t.ulid=n=>t.check(Hp(wI,n)),t.base64=n=>t.check(Xp(AI,n)),t.base64url=n=>t.check(Qp(II,n)),t.xid=n=>t.check(Vp(SI,n)),t.ksuid=n=>t.check(Gp(kI,n)),t.ipv4=n=>t.check(Wp(TI,n)),t.ipv6=n=>t.check(Kp(EI,n)),t.cidrv4=n=>t.check(Jp($I,n)),t.cidrv6=n=>t.check(Yp(RI,n)),t.e164=n=>t.check(ed(CI,n)),t.datetime=n=>t.check(wd(n)),t.date=n=>t.check(Sd(n)),t.time=n=>t.check(kd(n)),t.duration=n=>t.check(Td(n))});function R(t){return zp(hI,t)}var pt=I("ZodStringFormat",(t,e)=>{tt.init(t,e),rv.init(t,e)}),gI=I("ZodEmail",(t,e)=>{Ju.init(t,e),pt.init(t,e)});var ev=I("ZodGUID",(t,e)=>{Wu.init(t,e),pt.init(t,e)});var ac=I("ZodUUID",(t,e)=>{Ku.init(t,e),pt.init(t,e)});var yI=I("ZodURL",(t,e)=>{Yu.init(t,e),pt.init(t,e)});var xI=I("ZodEmoji",(t,e)=>{Xu.init(t,e),pt.init(t,e)});var vI=I("ZodNanoID",(t,e)=>{Qu.init(t,e),pt.init(t,e)});var bI=I("ZodCUID",(t,e)=>{ep.init(t,e),pt.init(t,e)});var _I=I("ZodCUID2",(t,e)=>{tp.init(t,e),pt.init(t,e)});var wI=I("ZodULID",(t,e)=>{np.init(t,e),pt.init(t,e)});var SI=I("ZodXID",(t,e)=>{rp.init(t,e),pt.init(t,e)});var kI=I("ZodKSUID",(t,e)=>{op.init(t,e),pt.init(t,e)});var TI=I("ZodIPv4",(t,e)=>{ip.init(t,e),pt.init(t,e)});var EI=I("ZodIPv6",(t,e)=>{sp.init(t,e),pt.init(t,e)});var $I=I("ZodCIDRv4",(t,e)=>{ap.init(t,e),pt.init(t,e)});var RI=I("ZodCIDRv6",(t,e)=>{cp.init(t,e),pt.init(t,e)});var AI=I("ZodBase64",(t,e)=>{lp.init(t,e),pt.init(t,e)});var II=I("ZodBase64URL",(t,e)=>{up.init(t,e),pt.init(t,e)});var CI=I("ZodE164",(t,e)=>{pp.init(t,e),pt.init(t,e)});var PI=I("ZodJWT",(t,e)=>{dp.init(t,e),pt.init(t,e)});var ov=I("ZodNumber",(t,e)=>{Wa.init(t,e),xt.init(t,e),t.gt=(r,o)=>t.check(Qa(r,o)),t.gte=(r,o)=>t.check(ms(r,o)),t.min=(r,o)=>t.check(ms(r,o)),t.lt=(r,o)=>t.check(Xa(r,o)),t.lte=(r,o)=>t.check(fs(r,o)),t.max=(r,o)=>t.check(fs(r,o)),t.int=r=>t.check(tv(r)),t.safe=r=>t.check(tv(r)),t.positive=r=>t.check(Qa(0,r)),t.nonnegative=r=>t.check(ms(0,r)),t.negative=r=>t.check(Xa(0,r)),t.nonpositive=r=>t.check(fs(0,r)),t.multipleOf=(r,o)=>t.check(ec(r,o)),t.step=(r,o)=>t.check(ec(r,o)),t.finite=()=>t;let n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),t.isFinite=!0,t.format=n.format??null});function He(t){return nd(ov,t)}var OI=I("ZodNumberFormat",(t,e)=>{fp.init(t,e),ov.init(t,e)});function tv(t){return rd(OI,t)}var zI=I("ZodBoolean",(t,e)=>{mp.init(t,e),xt.init(t,e)});function It(t){return od(zI,t)}var NI=I("ZodNull",(t,e)=>{hp.init(t,e),xt.init(t,e)});function iv(t){return id(NI,t)}var jI=I("ZodUnknown",(t,e)=>{gp.init(t,e),xt.init(t,e)});function dt(){return sd(jI)}var LI=I("ZodNever",(t,e)=>{yp.init(t,e),xt.init(t,e)});function DI(t){return ad(LI,t)}var MI=I("ZodArray",(t,e)=>{xp.init(t,e),xt.init(t,e),t.element=e.element,t.min=(n,r)=>t.check(oi(n,r)),t.nonempty=n=>t.check(oi(1,n)),t.max=(n,r)=>t.check(tc(n,r)),t.length=(n,r)=>t.check(nc(n,r)),t.unwrap=()=>t.element});function Ne(t,e){return Ux(MI,t,e)}var sv=I("ZodObject",(t,e)=>{Ka.init(t,e),xt.init(t,e),Ce.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>an(Object.keys(t._zod.def.shape)),t.catchall=n=>t.clone({...t._zod.def,catchall:n}),t.passthrough=()=>t.clone({...t._zod.def,catchall:dt()}),t.loose=()=>t.clone({...t._zod.def,catchall:dt()}),t.strict=()=>t.clone({...t._zod.def,catchall:DI()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=n=>Ce.extend(t,n),t.merge=n=>Ce.merge(t,n),t.pick=n=>Ce.pick(t,n),t.omit=n=>Ce.omit(t,n),t.partial=(...n)=>Ce.partial(lv,t,n[0]),t.required=(...n)=>Ce.required(uv,t,n[0])});function X(t,e){let n={type:"object",get shape(){return Ce.assignProp(this,"shape",{...t}),this.shape},...Ce.normalizeParams(e)};return new sv(n)}function Xt(t,e){return new sv({type:"object",get shape(){return Ce.assignProp(this,"shape",{...t}),this.shape},catchall:dt(),...Ce.normalizeParams(e)})}var av=I("ZodUnion",(t,e)=>{Ja.init(t,e),xt.init(t,e),t.options=e.options});function at(t,e){return new av({type:"union",options:t,...Ce.normalizeParams(e)})}var FI=I("ZodDiscriminatedUnion",(t,e)=>{av.init(t,e),vp.init(t,e)});function Rd(t,e,n){return new FI({type:"union",options:e,discriminator:t,...Ce.normalizeParams(n)})}var UI=I("ZodIntersection",(t,e)=>{bp.init(t,e),xt.init(t,e)});function cc(t,e){return new UI({type:"intersection",left:t,right:e})}var qI=I("ZodRecord",(t,e)=>{_p.init(t,e),xt.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function nt(t,e,n){return new qI({type:"record",keyType:t,valueType:e,...Ce.normalizeParams(n)})}var Ed=I("ZodEnum",(t,e)=>{wp.init(t,e),xt.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);let n=new Set(Object.keys(e.entries));t.extract=(r,o)=>{let i={};for(let s of r)if(n.has(s))i[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Ed({...e,checks:[],...Ce.normalizeParams(o),entries:i})},t.exclude=(r,o)=>{let i={...e.entries};for(let s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Ed({...e,checks:[],...Ce.normalizeParams(o),entries:i})}});function an(t,e){let n=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new Ed({type:"enum",entries:n,...Ce.normalizeParams(e)})}var ZI=I("ZodLiteral",(t,e)=>{Sp.init(t,e),xt.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function ne(t,e){return new ZI({type:"literal",values:Array.isArray(t)?t:[t],...Ce.normalizeParams(e)})}var BI=I("ZodTransform",(t,e)=>{kp.init(t,e),xt.init(t,e),t._zod.parse=(n,r)=>{n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ce.issue(i,n.value,e));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!0),n.issues.push(Ce.issue(s))}};let o=e.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function cv(t){return new BI({type:"transform",transform:t})}var lv=I("ZodOptional",(t,e)=>{Tp.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function ft(t){return new lv({type:"optional",innerType:t})}var HI=I("ZodNullable",(t,e)=>{Ep.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function nv(t){return new HI({type:"nullable",innerType:t})}var VI=I("ZodDefault",(t,e)=>{$p.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function GI(t,e){return new VI({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}var WI=I("ZodPrefault",(t,e)=>{Rp.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function KI(t,e){return new WI({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}var uv=I("ZodNonOptional",(t,e)=>{Ap.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function JI(t,e){return new uv({type:"nonoptional",innerType:t,...Ce.normalizeParams(e)})}var YI=I("ZodCatch",(t,e)=>{Ip.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function XI(t,e){return new YI({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var QI=I("ZodPipe",(t,e)=>{Cp.init(t,e),xt.init(t,e),t.in=e.in,t.out=e.out});function $d(t,e){return new QI({type:"pipe",in:t,out:e})}var eC=I("ZodReadonly",(t,e)=>{Pp.init(t,e),xt.init(t,e)});function tC(t){return new eC({type:"readonly",innerType:t})}var pv=I("ZodCustom",(t,e)=>{Op.init(t,e),xt.init(t,e)});function nC(t){let e=new jt({check:"custom"});return e._zod.check=t,e}function dv(t,e){return xd(pv,t??(()=>!0),e)}function rC(t,e={}){return vd(pv,t,e)}function oC(t){let e=nC(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Ce.issue(r,n.value,e._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),o.continue??(o.continue=!e._zod.def.abort),n.issues.push(Ce.issue(o))}},t(n.value,n)));return e}function Ad(t,e){return $d(cv(t),e)}gn(Nx());var Cd="2025-11-25";var fv=[Cd,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Ir="io.modelcontextprotocol/related-task",uc="2.0",Rt=dv(t=>t!==null&&(typeof t=="object"||typeof t=="function")),mv=at([R(),He().int()]),hv=R(),h3=Xt({ttl:He().optional(),pollInterval:He().optional()}),iC=X({ttl:He().optional()}),sC=X({taskId:R()}),Pd=Xt({progressToken:mv.optional(),[Ir]:sC.optional()}),xn=X({_meta:Pd.optional()}),ys=xn.extend({task:iC.optional()}),gv=t=>ys.safeParse(t).success,Lt=X({method:R(),params:xn.loose().optional()}),Tn=X({_meta:Pd.optional()}),En=X({method:R(),params:Tn.loose().optional()}),Dt=Xt({_meta:Pd.optional()}),pc=at([R(),He().int()]),yv=X({jsonrpc:ne(uc),id:pc,...Lt.shape}).strict(),Od=t=>yv.safeParse(t).success,xv=X({jsonrpc:ne(uc),...En.shape}).strict(),vv=t=>xv.safeParse(t).success,zd=X({jsonrpc:ne(uc),id:pc,result:Dt}).strict(),xs=t=>zd.safeParse(t).success;var se;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(se||(se={}));var Nd=X({jsonrpc:ne(uc),id:pc.optional(),error:X({code:He().int(),message:R(),data:dt().optional()})}).strict();var bv=t=>Nd.safeParse(t).success;var _v=at([yv,xv,zd,Nd]),g3=at([zd,Nd]),dc=Dt.strict(),aC=Tn.extend({requestId:pc.optional(),reason:R().optional()}),fc=En.extend({method:ne("notifications/cancelled"),params:aC}),cC=X({src:R(),mimeType:R().optional(),sizes:Ne(R()).optional(),theme:an(["light","dark"]).optional()}),vs=X({icons:Ne(cC).optional()}),si=X({name:R(),title:R().optional()}),wv=si.extend({...si.shape,...vs.shape,version:R(),websiteUrl:R().optional(),description:R().optional()}),lC=cc(X({applyDefaults:It().optional()}),nt(R(),dt())),uC=Ad(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,cc(X({form:lC.optional(),url:Rt.optional()}),nt(R(),dt()).optional())),pC=Xt({list:Rt.optional(),cancel:Rt.optional(),requests:Xt({sampling:Xt({createMessage:Rt.optional()}).optional(),elicitation:Xt({create:Rt.optional()}).optional()}).optional()}),dC=Xt({list:Rt.optional(),cancel:Rt.optional(),requests:Xt({tools:Xt({call:Rt.optional()}).optional()}).optional()}),fC=X({experimental:nt(R(),Rt).optional(),sampling:X({context:Rt.optional(),tools:Rt.optional()}).optional(),elicitation:uC.optional(),roots:X({listChanged:It().optional()}).optional(),tasks:pC.optional(),extensions:nt(R(),Rt).optional()}),mC=xn.extend({protocolVersion:R(),capabilities:fC,clientInfo:wv}),jd=Lt.extend({method:ne("initialize"),params:mC});var hC=X({experimental:nt(R(),Rt).optional(),logging:Rt.optional(),completions:Rt.optional(),prompts:X({listChanged:It().optional()}).optional(),resources:X({subscribe:It().optional(),listChanged:It().optional()}).optional(),tools:X({listChanged:It().optional()}).optional(),tasks:dC.optional(),extensions:nt(R(),Rt).optional()}),gC=Dt.extend({protocolVersion:R(),capabilities:hC,serverInfo:wv,instructions:R().optional()}),Ld=En.extend({method:ne("notifications/initialized"),params:Tn.optional()});var mc=Lt.extend({method:ne("ping"),params:xn.optional()}),yC=X({progress:He(),total:ft(He()),message:ft(R())}),xC=X({...Tn.shape,...yC.shape,progressToken:mv}),hc=En.extend({method:ne("notifications/progress"),params:xC}),vC=xn.extend({cursor:hv.optional()}),bs=Lt.extend({params:vC.optional()}),_s=Dt.extend({nextCursor:hv.optional()}),bC=an(["working","input_required","completed","failed","cancelled"]),ws=X({taskId:R(),status:bC,ttl:at([He(),iv()]),createdAt:R(),lastUpdatedAt:R(),pollInterval:ft(He()),statusMessage:ft(R())}),ai=Dt.extend({task:ws}),_C=Tn.merge(ws),Ss=En.extend({method:ne("notifications/tasks/status"),params:_C}),gc=Lt.extend({method:ne("tasks/get"),params:xn.extend({taskId:R()})}),yc=Dt.merge(ws),xc=Lt.extend({method:ne("tasks/result"),params:xn.extend({taskId:R()})}),y3=Dt.loose(),vc=bs.extend({method:ne("tasks/list")}),bc=_s.extend({tasks:Ne(ws)}),_c=Lt.extend({method:ne("tasks/cancel"),params:xn.extend({taskId:R()})}),Sv=Dt.merge(ws),kv=X({uri:R(),mimeType:ft(R()),_meta:nt(R(),dt()).optional()}),Tv=kv.extend({text:R()}),Dd=R().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),Ev=kv.extend({blob:Dd}),ks=an(["user","assistant"]),ci=X({audience:Ne(ks).optional(),priority:He().min(0).max(1).optional(),lastModified:hs.datetime({offset:!0}).optional()}),$v=X({...si.shape,...vs.shape,uri:R(),description:ft(R()),mimeType:ft(R()),size:ft(He()),annotations:ci.optional(),_meta:ft(Xt({}))}),wC=X({...si.shape,...vs.shape,uriTemplate:R(),description:ft(R()),mimeType:ft(R()),annotations:ci.optional(),_meta:ft(Xt({}))}),wc=bs.extend({method:ne("resources/list")}),SC=_s.extend({resources:Ne($v)}),Sc=bs.extend({method:ne("resources/templates/list")}),kC=_s.extend({resourceTemplates:Ne(wC)}),Md=xn.extend({uri:R()}),TC=Md,kc=Lt.extend({method:ne("resources/read"),params:TC}),EC=Dt.extend({contents:Ne(at([Tv,Ev]))}),$C=En.extend({method:ne("notifications/resources/list_changed"),params:Tn.optional()}),RC=Md,AC=Lt.extend({method:ne("resources/subscribe"),params:RC}),IC=Md,CC=Lt.extend({method:ne("resources/unsubscribe"),params:IC}),PC=Tn.extend({uri:R()}),OC=En.extend({method:ne("notifications/resources/updated"),params:PC}),zC=X({name:R(),description:ft(R()),required:ft(It())}),NC=X({...si.shape,...vs.shape,description:ft(R()),arguments:ft(Ne(zC)),_meta:ft(Xt({}))}),Tc=bs.extend({method:ne("prompts/list")}),jC=_s.extend({prompts:Ne(NC)}),LC=xn.extend({name:R(),arguments:nt(R(),R()).optional()}),Ec=Lt.extend({method:ne("prompts/get"),params:LC}),Fd=X({type:ne("text"),text:R(),annotations:ci.optional(),_meta:nt(R(),dt()).optional()}),Ud=X({type:ne("image"),data:Dd,mimeType:R(),annotations:ci.optional(),_meta:nt(R(),dt()).optional()}),qd=X({type:ne("audio"),data:Dd,mimeType:R(),annotations:ci.optional(),_meta:nt(R(),dt()).optional()}),DC=X({type:ne("tool_use"),name:R(),id:R(),input:nt(R(),dt()),_meta:nt(R(),dt()).optional()}),MC=X({type:ne("resource"),resource:at([Tv,Ev]),annotations:ci.optional(),_meta:nt(R(),dt()).optional()}),FC=$v.extend({type:ne("resource_link")}),Zd=at([Fd,Ud,qd,FC,MC]),UC=X({role:ks,content:Zd}),qC=Dt.extend({description:R().optional(),messages:Ne(UC)}),ZC=En.extend({method:ne("notifications/prompts/list_changed"),params:Tn.optional()}),BC=X({title:R().optional(),readOnlyHint:It().optional(),destructiveHint:It().optional(),idempotentHint:It().optional(),openWorldHint:It().optional()}),HC=X({taskSupport:an(["required","optional","forbidden"]).optional()}),Rv=X({...si.shape,...vs.shape,description:R().optional(),inputSchema:X({type:ne("object"),properties:nt(R(),Rt).optional(),required:Ne(R()).optional()}).catchall(dt()),outputSchema:X({type:ne("object"),properties:nt(R(),Rt).optional(),required:Ne(R()).optional()}).catchall(dt()).optional(),annotations:BC.optional(),execution:HC.optional(),_meta:nt(R(),dt()).optional()}),$c=bs.extend({method:ne("tools/list")}),VC=_s.extend({tools:Ne(Rv)}),Rc=Dt.extend({content:Ne(Zd).default([]),structuredContent:nt(R(),dt()).optional(),isError:It().optional()}),x3=Rc.or(Dt.extend({toolResult:dt()})),GC=ys.extend({name:R(),arguments:nt(R(),dt()).optional()}),li=Lt.extend({method:ne("tools/call"),params:GC}),WC=En.extend({method:ne("notifications/tools/list_changed"),params:Tn.optional()}),v3=X({autoRefresh:It().default(!0),debounceMs:He().int().nonnegative().default(300)}),Ts=an(["debug","info","notice","warning","error","critical","alert","emergency"]),KC=xn.extend({level:Ts}),Bd=Lt.extend({method:ne("logging/setLevel"),params:KC}),JC=Tn.extend({level:Ts,logger:R().optional(),data:dt()}),YC=En.extend({method:ne("notifications/message"),params:JC}),XC=X({name:R().optional()}),QC=X({hints:Ne(XC).optional(),costPriority:He().min(0).max(1).optional(),speedPriority:He().min(0).max(1).optional(),intelligencePriority:He().min(0).max(1).optional()}),eP=X({mode:an(["auto","required","none"]).optional()}),tP=X({type:ne("tool_result"),toolUseId:R().describe("The unique identifier for the corresponding tool call."),content:Ne(Zd).default([]),structuredContent:X({}).loose().optional(),isError:It().optional(),_meta:nt(R(),dt()).optional()}),nP=Rd("type",[Fd,Ud,qd]),lc=Rd("type",[Fd,Ud,qd,DC,tP]),rP=X({role:ks,content:at([lc,Ne(lc)]),_meta:nt(R(),dt()).optional()}),oP=ys.extend({messages:Ne(rP),modelPreferences:QC.optional(),systemPrompt:R().optional(),includeContext:an(["none","thisServer","allServers"]).optional(),temperature:He().optional(),maxTokens:He().int(),stopSequences:Ne(R()).optional(),metadata:Rt.optional(),tools:Ne(Rv).optional(),toolChoice:eP.optional()}),iP=Lt.extend({method:ne("sampling/createMessage"),params:oP}),Es=Dt.extend({model:R(),stopReason:ft(an(["endTurn","stopSequence","maxTokens"]).or(R())),role:ks,content:nP}),Hd=Dt.extend({model:R(),stopReason:ft(an(["endTurn","stopSequence","maxTokens","toolUse"]).or(R())),role:ks,content:at([lc,Ne(lc)])}),sP=X({type:ne("boolean"),title:R().optional(),description:R().optional(),default:It().optional()}),aP=X({type:ne("string"),title:R().optional(),description:R().optional(),minLength:He().optional(),maxLength:He().optional(),format:an(["email","uri","date","date-time"]).optional(),default:R().optional()}),cP=X({type:an(["number","integer"]),title:R().optional(),description:R().optional(),minimum:He().optional(),maximum:He().optional(),default:He().optional()}),lP=X({type:ne("string"),title:R().optional(),description:R().optional(),enum:Ne(R()),default:R().optional()}),uP=X({type:ne("string"),title:R().optional(),description:R().optional(),oneOf:Ne(X({const:R(),title:R()})),default:R().optional()}),pP=X({type:ne("string"),title:R().optional(),description:R().optional(),enum:Ne(R()),enumNames:Ne(R()).optional(),default:R().optional()}),dP=at([lP,uP]),fP=X({type:ne("array"),title:R().optional(),description:R().optional(),minItems:He().optional(),maxItems:He().optional(),items:X({type:ne("string"),enum:Ne(R())}),default:Ne(R()).optional()}),mP=X({type:ne("array"),title:R().optional(),description:R().optional(),minItems:He().optional(),maxItems:He().optional(),items:X({anyOf:Ne(X({const:R(),title:R()}))}),default:Ne(R()).optional()}),hP=at([fP,mP]),gP=at([pP,dP,hP]),yP=at([gP,sP,aP,cP]),xP=ys.extend({mode:ne("form").optional(),message:R(),requestedSchema:X({type:ne("object"),properties:nt(R(),yP),required:Ne(R()).optional()})}),vP=ys.extend({mode:ne("url"),message:R(),elicitationId:R(),url:R().url()}),bP=at([xP,vP]),_P=Lt.extend({method:ne("elicitation/create"),params:bP}),wP=Tn.extend({elicitationId:R()}),SP=En.extend({method:ne("notifications/elicitation/complete"),params:wP}),ui=Dt.extend({action:an(["accept","decline","cancel"]),content:Ad(t=>t===null?void 0:t,nt(R(),at([R(),He(),It(),Ne(R())])).optional())}),kP=X({type:ne("ref/resource"),uri:R()});var TP=X({type:ne("ref/prompt"),name:R()}),EP=xn.extend({ref:at([TP,kP]),argument:X({name:R(),value:R()}),context:X({arguments:nt(R(),R()).optional()}).optional()}),Ac=Lt.extend({method:ne("completion/complete"),params:EP});function Av(t){if(t.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${t.params.ref.type}`)}function Iv(t){if(t.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${t.params.ref.type}`)}var $P=Dt.extend({completion:Xt({values:Ne(R()).max(100),total:ft(He().int()),hasMore:ft(It())})}),RP=X({uri:R().startsWith("file://"),name:R().optional(),_meta:nt(R(),dt()).optional()}),AP=Lt.extend({method:ne("roots/list"),params:xn.optional()}),Vd=Dt.extend({roots:Ne(RP)}),IP=En.extend({method:ne("notifications/roots/list_changed"),params:Tn.optional()}),b3=at([mc,jd,Ac,Bd,Ec,Tc,wc,Sc,kc,AC,CC,li,$c,gc,xc,vc,_c]),_3=at([fc,hc,Ld,IP,Ss]),w3=at([dc,Es,Hd,ui,Vd,yc,bc,ai]),S3=at([mc,iP,_P,AP,gc,xc,vc,_c]),k3=at([fc,hc,YC,OC,$C,WC,ZC,Ss,SP]),T3=at([dc,gC,$P,qC,jC,SC,kC,EC,Rc,VC,yc,bc,ai]),te=class t extends Error{constructor(e,n,r){super(`MCP error ${e}: ${n}`),this.code=e,this.data=r,this.name="McpError"}static fromError(e,n,r){if(e===se.UrlElicitationRequired&&r){let o=r;if(o.elicitations)return new Id(o.elicitations,n)}return new t(e,n,r)}},Id=class extends te{constructor(e,n=`URL elicitation${e.length>1?"s":""} required`){super(se.UrlElicitationRequired,n,{elicitations:e})}get elicitations(){var e;return((e=this.data)==null?void 0:e.elicitations)??[]}};function Cr(t){return t==="completed"||t==="failed"||t==="cancelled"}var Pv=Symbol("Let zodToJsonSchema decide on which parser to use");var Cv={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"},Ov=t=>typeof t=="string"?{...Cv,name:t}:{...Cv,...t};var zv=t=>{let e=Ov(t),n=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,flags:{hasReferencedOpenAiAnyType:!1},currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([r,o])=>[o._def,{def:o._def,path:[...e.basePath,e.definitionPath,r],jsonSchema:void 0}]))}};function Gd(t,e,n,r){r!=null&&r.errorMessages&&n&&(t.errorMessage={...t.errorMessage,[e]:n})}function je(t,e,n,r,o){t[e]=n,Gd(t,e,r,o)}var Ic=(t,e)=>{let n=0;for(;n<t.length&&n<e.length&&t[n]===e[n];n++);return[(t.length-n).toString(),...e.slice(n)].join("/")};function mt(t){if(t.target!=="openAi")return{};let e=[...t.basePath,t.definitionPath,t.openAiAnyTypeName];return t.flags.hasReferencedOpenAiAnyType=!0,{$ref:t.$refStrategy==="relative"?Ic(e,t.currentPath):e.join("/")}}function Nv(t,e){var r,o,i;let n={type:"array"};return(r=t.type)!=null&&r._def&&((i=(o=t.type)==null?void 0:o._def)==null?void 0:i.typeName)!==q.ZodAny&&(n.items=fe(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&je(n,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&&je(n,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&(je(n,"minItems",t.exactLength.value,t.exactLength.message,e),je(n,"maxItems",t.exactLength.value,t.exactLength.message,e)),n}function jv(t,e){let n={type:"integer",format:"int64"};if(!t.checks)return n;for(let r of t.checks)switch(r.kind){case"min":e.target==="jsonSchema7"?r.inclusive?je(n,"minimum",r.value,r.message,e):je(n,"exclusiveMinimum",r.value,r.message,e):(r.inclusive||(n.exclusiveMinimum=!0),je(n,"minimum",r.value,r.message,e));break;case"max":e.target==="jsonSchema7"?r.inclusive?je(n,"maximum",r.value,r.message,e):je(n,"exclusiveMaximum",r.value,r.message,e):(r.inclusive||(n.exclusiveMaximum=!0),je(n,"maximum",r.value,r.message,e));break;case"multipleOf":je(n,"multipleOf",r.value,r.message,e);break}return n}function Lv(){return{type:"boolean"}}function Cc(t,e){return fe(t.type._def,e)}var Dv=(t,e)=>fe(t.innerType._def,e);function Wd(t,e,n){let r=n??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((o,i)=>Wd(t,e,o))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return CP(t,e)}}var CP=(t,e)=>{let n={type:"integer",format:"unix-time"};if(e.target==="openApi3")return n;for(let r of t.checks)switch(r.kind){case"min":je(n,"minimum",r.value,r.message,e);break;case"max":je(n,"maximum",r.value,r.message,e);break}return n};function Mv(t,e){return{...fe(t.innerType._def,e),default:t.defaultValue()}}function Fv(t,e){return e.effectStrategy==="input"?fe(t.schema._def,e):mt(e)}function Uv(t){return{type:"string",enum:Array.from(t.values)}}var PP=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function qv(t,e){let n=[fe(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),fe(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(i=>!!i),r=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,o=[];return n.forEach(i=>{if(PP(i))o.push(...i.allOf),i.unevaluatedProperties===void 0&&(r=void 0);else{let s=i;if("additionalProperties"in i&&i.additionalProperties===!1){let{additionalProperties:a,...c}=i;s=c}else r=void 0;o.push(s)}}),o.length?{allOf:o,...r}:void 0}function Zv(t,e){let n=typeof t.value;return n!=="bigint"&&n!=="number"&&n!=="boolean"&&n!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:n==="bigint"?"integer":n,enum:[t.value]}:{type:n==="bigint"?"integer":n,const:t.value}}var Kd,jn={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:()=>(Kd===void 0&&(Kd=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Kd),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 Pc(t,e){let n={type:"string"};if(t.checks)for(let r of t.checks)switch(r.kind){case"min":je(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value,r.message,e);break;case"max":je(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value,r.message,e);break;case"email":switch(e.emailStrategy){case"format:email":Ln(n,"email",r.message,e);break;case"format:idn-email":Ln(n,"idn-email",r.message,e);break;case"pattern:zod":Qt(n,jn.email,r.message,e);break}break;case"url":Ln(n,"uri",r.message,e);break;case"uuid":Ln(n,"uuid",r.message,e);break;case"regex":Qt(n,r.regex,r.message,e);break;case"cuid":Qt(n,jn.cuid,r.message,e);break;case"cuid2":Qt(n,jn.cuid2,r.message,e);break;case"startsWith":Qt(n,RegExp(`^${Jd(r.value,e)}`),r.message,e);break;case"endsWith":Qt(n,RegExp(`${Jd(r.value,e)}$`),r.message,e);break;case"datetime":Ln(n,"date-time",r.message,e);break;case"date":Ln(n,"date",r.message,e);break;case"time":Ln(n,"time",r.message,e);break;case"duration":Ln(n,"duration",r.message,e);break;case"length":je(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value,r.message,e),je(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value,r.message,e);break;case"includes":{Qt(n,RegExp(Jd(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&Ln(n,"ipv4",r.message,e),r.version!=="v4"&&Ln(n,"ipv6",r.message,e);break}case"base64url":Qt(n,jn.base64url,r.message,e);break;case"jwt":Qt(n,jn.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&Qt(n,jn.ipv4Cidr,r.message,e),r.version!=="v4"&&Qt(n,jn.ipv6Cidr,r.message,e);break}case"emoji":Qt(n,jn.emoji(),r.message,e);break;case"ulid":{Qt(n,jn.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{Ln(n,"binary",r.message,e);break}case"contentEncoding:base64":{je(n,"contentEncoding","base64",r.message,e);break}case"pattern:zod":{Qt(n,jn.base64,r.message,e);break}}break}case"nanoid":Qt(n,jn.nanoid,r.message,e);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return n}function Jd(t,e){return e.patternStrategy==="escape"?zP(t):t}var OP=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function zP(t){let e="";for(let n=0;n<t.length;n++)OP.has(t[n])||(e+="\\"),e+=t[n];return e}function Ln(t,e,n,r){var o;t.format||(o=t.anyOf)!=null&&o.some(i=>i.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&r.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...n&&r.errorMessages&&{errorMessage:{format:n}}})):je(t,"format",e,n,r)}function Qt(t,e,n,r){var o;t.pattern||(o=t.allOf)!=null&&o.some(i=>i.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&r.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:Bv(e,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):je(t,"pattern",Bv(e,r),n,r)}function Bv(t,e){var c;if(!e.applyRegexFlags||!t.flags)return t.source;let n={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},r=n.i?t.source.toLowerCase():t.source,o="",i=!1,s=!1,a=!1;for(let l=0;l<r.length;l++){if(i){o+=r[l],i=!1;continue}if(n.i){if(s){if(r[l].match(/[a-z]/)){a?(o+=r[l],o+=`${r[l-2]}-${r[l]}`.toUpperCase(),a=!1):r[l+1]==="-"&&((c=r[l+2])!=null&&c.match(/[a-z]/))?(o+=r[l],a=!0):o+=`${r[l]}${r[l].toUpperCase()}`;continue}}else if(r[l].match(/[a-z]/)){o+=`[${r[l]}${r[l].toUpperCase()}]`;continue}}if(n.m){if(r[l]==="^"){o+=`(^|(?<=[\r
|
|
48
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let x of this.seen.entries()){let m=x[1];if(e===x[0]){s(x);continue}if(r.external){let w=(d=r.external.registry.get(x[0]))==null?void 0:d.id;if(e!==x[0]&&w){s(x);continue}}if((f=this.metadataRegistry.get(x[0]))==null?void 0:f.id){s(x);continue}if(m.cycle){s(x);continue}if(m.count>1&&r.reused==="ref"){s(x);continue}}let a=(x,m)=>{let v=this.seen.get(x),w=v.def??v.schema,k={...w};if(v.ref===null)return;let E=v.ref;if(v.ref=null,E){a(E,m);let F=this.seen.get(E).schema;F.$ref&&m.target==="draft-7"?(w.allOf=w.allOf??[],w.allOf.push(F)):(Object.assign(w,F),Object.assign(w,k))}v.isParent||this.override({zodSchema:x,jsonSchema:w,path:v.path??[]})};for(let x of[...this.seen.entries()].reverse())a(x[0],{target:this.target});let c={};if(this.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?c.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),(h=r.external)!=null&&h.uri){let x=(y=r.external.registry.get(e))==null?void 0:y.id;if(!x)throw new Error("Schema is missing an `id` property");c.$id=r.external.uri(x)}Object.assign(c,o.def);let l=((b=r.external)==null?void 0:b.defs)??{};for(let x of this.seen.entries()){let m=x[1];m.def&&m.defId&&(l[m.defId]=m.def)}r.external||Object.keys(l).length>0&&(this.target==="draft-2020-12"?c.$defs=l:c.definitions=l);try{return JSON.parse(JSON.stringify(c))}catch{throw new Error("Error converting schema to JSON.")}}};function Td(t,e){if(t instanceof hs){let r=new ac(e),o={};for(let a of t._idmap.entries()){let[c,l]=a;r.process(l)}let i={},s={registry:t,uri:e==null?void 0:e.uri,defs:o};for(let a of t._idmap.entries()){let[c,l]=a;i[c]=r.emit(l,{...e,external:s})}if(Object.keys(o).length>0){let a=r.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:o}}return{schemas:i}}let n=new ac(e);return n.process(t),n.emit(t,e)}function Rt(t,e){let n=e??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let o=t._zod.def;switch(o.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Rt(o.element,n);case"object":{for(let i in o.shape)if(Rt(o.shape[i],n))return!0;return!1}case"union":{for(let i of o.options)if(Rt(i,n))return!0;return!1}case"intersection":return Rt(o.left,n)||Rt(o.right,n);case"tuple":{for(let i of o.items)if(Rt(i,n))return!0;return!!(o.rest&&Rt(o.rest,n))}case"record":return Rt(o.keyType,n)||Rt(o.valueType,n);case"map":return Rt(o.keyType,n)||Rt(o.valueType,n);case"set":return Rt(o.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Rt(o.innerType,n);case"lazy":return Rt(o.getter(),n);case"default":return Rt(o.innerType,n);case"prefault":return Rt(o.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return Rt(o.in,n)||Rt(o.out,n);case"success":return!1;case"catch":return!1;default:}throw new Error(`Unknown schema type: ${o.type}`)}var yP=P("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");Ke.init(t,e),t.def=e,t.parse=(n,r)=>Zu(t,n,r,{callee:t.parse}),t.safeParse=(n,r)=>bo(t,n,r),t.parseAsync=async(n,r)=>Hu(t,n,r,{callee:t.parseAsync}),t.safeParseAsync=async(n,r)=>_o(t,n,r),t.check=(...n)=>t.clone({...e,checks:[...e.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),t.clone=(n,r)=>vn(t,n,r),t.brand=()=>t,t.register=((n,r)=>(n.add(t,r),t))});var xP=P("ZodMiniObject",(t,e)=>{Qa.init(t,e),yP.init(t,e),Ce.defineLazy(t,"shape",()=>e.shape)});function Ed(t,e){let n={type:"object",get shape(){return Ce.assignProp(this,"shape",{...t}),this.shape},...Ce.normalizeParams(e)};return new xP(n)}function Xn(t){return!!t._zod}function ko(t){let e=Object.values(t);if(e.length===0)return Ed({});let n=e.every(Xn),r=e.every(o=>!Xn(o));if(n)return Ed(t);if(r)return Au(t);throw new Error("Mixed Zod versions detected in object shape.")}function Cr(t,e){return Xn(t)?bo(t,e):t.safeParse(e)}async function cc(t,e){return Xn(t)?await _o(t,e):await t.safeParseAsync(e)}function Ir(t){var n,r;if(!t)return;let e;if(Xn(t)?e=(r=(n=t._zod)==null?void 0:n.def)==null?void 0:r.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function ai(t){var e;if(t){if(typeof t=="object"){let n=t,r=t;if(!n._def&&!r._zod){let o=Object.values(t);if(o.length>0&&o.every(i=>typeof i=="object"&&i!==null&&(i._def!==void 0||i._zod!==void 0||typeof i.parse=="function")))return ko(t)}}if(Xn(t)){let r=(e=t._zod)==null?void 0:e.def;if(r&&(r.type==="object"||r.shape!==void 0))return t}else if(t.shape!==void 0)return t}}function bP(t){return t.length===0?"object root":t.reduce((e,n,r)=>r===0?String(n):typeof n=="number"?`${e}[${n}]`:`${e}.${n}`,"")}function lc(t){if(t&&typeof t=="object"){if("issues"in t&&Array.isArray(t.issues)&&t.issues.length>0)return t.issues.map(e=>{var n;return(n=e.path)!=null&&n.length?`${e.message} at ${bP(e.path)}`:e.message}).join(`
|
|
49
|
+
`);if("message"in t&&typeof t.message=="string")return t.message;try{return JSON.stringify(t)}catch{return String(t)}}return String(t)}function Qx(t){return t.description}function ev(t){var n,r,o;if(Xn(t))return((r=(n=t._zod)==null?void 0:n.def)==null?void 0:r.type)==="optional";let e=t;return typeof t.isOptional=="function"?t.isOptional():((o=e._def)==null?void 0:o.typeName)==="ZodOptional"}function ci(t){var o;if(Xn(t)){let s=(o=t._zod)==null?void 0:o.def;if(s){if(s.value!==void 0)return s.value;if(Array.isArray(s.values)&&s.values.length>0)return s.values[0]}}let n=t._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}let r=t.value;if(r!==void 0)return r}var xs={};Da(xs,{ZodISODate:()=>nv,ZodISODateTime:()=>tv,ZodISODuration:()=>ov,ZodISOTime:()=>rv,date:()=>Rd,datetime:()=>$d,duration:()=>Pd,time:()=>Ad});var tv=P("ZodISODateTime",(t,e)=>{Fx.init(t,e),pt.init(t,e)});function $d(t){return Gx(tv,t)}var nv=P("ZodISODate",(t,e)=>{Ux.init(t,e),pt.init(t,e)});function Rd(t){return Wx(nv,t)}var rv=P("ZodISOTime",(t,e)=>{qx.init(t,e),pt.init(t,e)});function Ad(t){return Kx(rv,t)}var ov=P("ZodISODuration",(t,e)=>{Zx.init(t,e),pt.init(t,e)});function Pd(t){return Jx(ov,t)}var iv=(t,e)=>{Wa.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:n=>Uu(t,n)},flatten:{value:n=>Fu(t,n)},addIssue:{value:n=>t.issues.push(n)},addIssues:{value:n=>t.issues.push(...n)},isEmpty:{get(){return t.issues.length===0}}})},g3=P("ZodError",iv),vs=P("ZodError",iv,{Parent:Error});var sv=qu(vs),av=Bu(vs),cv=Vu(vs),lv=Gu(vs);var xt=P("ZodType",(t,e)=>(Ke.init(t,e),t.def=e,Object.defineProperty(t,"_def",{value:e}),t.check=(...n)=>t.clone({...e,checks:[...e.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),t.clone=(n,r)=>vn(t,n,r),t.brand=()=>t,t.register=((n,r)=>(n.add(t,r),t)),t.parse=(n,r)=>sv(t,n,r,{callee:t.parse}),t.safeParse=(n,r)=>cv(t,n,r),t.parseAsync=async(n,r)=>av(t,n,r,{callee:t.parseAsync}),t.safeParseAsync=async(n,r)=>lv(t,n,r),t.spa=t.safeParseAsync,t.refine=(n,r)=>t.check(gC(n,r)),t.superRefine=n=>t.check(yC(n)),t.overwrite=n=>t.check(wo(n)),t.optional=()=>ft(t),t.nullable=()=>dv(t),t.nullish=()=>ft(dv(t)),t.nonoptional=n=>lC(t,n),t.array=()=>Ne(t),t.or=n=>at([t,n]),t.and=n=>pc(t,n),t.transform=n=>Id(t,xv(n)),t.default=n=>sC(t,n),t.prefault=n=>cC(t,n),t.catch=n=>pC(t,n),t.pipe=n=>Id(t,n),t.readonly=()=>mC(t),t.describe=n=>{let r=t.clone();return Pr.add(r,{description:n}),r},Object.defineProperty(t,"description",{get(){var n;return(n=Pr.get(t))==null?void 0:n.description},configurable:!0}),t.meta=(...n)=>{if(n.length===0)return Pr.get(t);let r=t.clone();return Pr.add(r,n[0]),r},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t)),fv=P("_ZodString",(t,e)=>{ms.init(t,e),xt.init(t,e);let n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null,t.regex=(...r)=>t.check(fd(...r)),t.includes=(...r)=>t.check(gd(...r)),t.startsWith=(...r)=>t.check(yd(...r)),t.endsWith=(...r)=>t.check(xd(...r)),t.min=(...r)=>t.check(si(...r)),t.max=(...r)=>t.check(ic(...r)),t.length=(...r)=>t.check(sc(...r)),t.nonempty=(...r)=>t.check(si(1,...r)),t.lowercase=r=>t.check(md(r)),t.uppercase=r=>t.check(hd(r)),t.trim=()=>t.check(bd()),t.normalize=(...r)=>t.check(vd(...r)),t.toLowerCase=()=>t.check(_d()),t.toUpperCase=()=>t.check(wd())}),RP=P("ZodString",(t,e)=>{ms.init(t,e),fv.init(t,e),t.email=n=>t.check(Fp(AP,n)),t.url=n=>t.check(Hp(PP,n)),t.jwt=n=>t.check(sd(HP,n)),t.emoji=n=>t.check(Vp(CP,n)),t.guid=n=>t.check(tc(uv,n)),t.uuid=n=>t.check(Up(uc,n)),t.uuidv4=n=>t.check(qp(uc,n)),t.uuidv6=n=>t.check(Zp(uc,n)),t.uuidv7=n=>t.check(Bp(uc,n)),t.nanoid=n=>t.check(Gp(IP,n)),t.guid=n=>t.check(tc(uv,n)),t.cuid=n=>t.check(Wp(OP,n)),t.cuid2=n=>t.check(Kp(zP,n)),t.ulid=n=>t.check(Jp(NP,n)),t.base64=n=>t.check(rd(qP,n)),t.base64url=n=>t.check(od(ZP,n)),t.xid=n=>t.check(Yp(jP,n)),t.ksuid=n=>t.check(Xp(LP,n)),t.ipv4=n=>t.check(Qp(DP,n)),t.ipv6=n=>t.check(ed(MP,n)),t.cidrv4=n=>t.check(td(FP,n)),t.cidrv6=n=>t.check(nd(UP,n)),t.e164=n=>t.check(id(BP,n)),t.datetime=n=>t.check($d(n)),t.date=n=>t.check(Rd(n)),t.time=n=>t.check(Ad(n)),t.duration=n=>t.check(Pd(n))});function R(t){return Mp(RP,t)}var pt=P("ZodStringFormat",(t,e)=>{tt.init(t,e),fv.init(t,e)}),AP=P("ZodEmail",(t,e)=>{tp.init(t,e),pt.init(t,e)});var uv=P("ZodGUID",(t,e)=>{Qu.init(t,e),pt.init(t,e)});var uc=P("ZodUUID",(t,e)=>{ep.init(t,e),pt.init(t,e)});var PP=P("ZodURL",(t,e)=>{np.init(t,e),pt.init(t,e)});var CP=P("ZodEmoji",(t,e)=>{rp.init(t,e),pt.init(t,e)});var IP=P("ZodNanoID",(t,e)=>{op.init(t,e),pt.init(t,e)});var OP=P("ZodCUID",(t,e)=>{ip.init(t,e),pt.init(t,e)});var zP=P("ZodCUID2",(t,e)=>{sp.init(t,e),pt.init(t,e)});var NP=P("ZodULID",(t,e)=>{ap.init(t,e),pt.init(t,e)});var jP=P("ZodXID",(t,e)=>{cp.init(t,e),pt.init(t,e)});var LP=P("ZodKSUID",(t,e)=>{lp.init(t,e),pt.init(t,e)});var DP=P("ZodIPv4",(t,e)=>{up.init(t,e),pt.init(t,e)});var MP=P("ZodIPv6",(t,e)=>{pp.init(t,e),pt.init(t,e)});var FP=P("ZodCIDRv4",(t,e)=>{dp.init(t,e),pt.init(t,e)});var UP=P("ZodCIDRv6",(t,e)=>{fp.init(t,e),pt.init(t,e)});var qP=P("ZodBase64",(t,e)=>{mp.init(t,e),pt.init(t,e)});var ZP=P("ZodBase64URL",(t,e)=>{hp.init(t,e),pt.init(t,e)});var BP=P("ZodE164",(t,e)=>{gp.init(t,e),pt.init(t,e)});var HP=P("ZodJWT",(t,e)=>{yp.init(t,e),pt.init(t,e)});var mv=P("ZodNumber",(t,e)=>{Xa.init(t,e),xt.init(t,e),t.gt=(r,o)=>t.check(rc(r,o)),t.gte=(r,o)=>t.check(ys(r,o)),t.min=(r,o)=>t.check(ys(r,o)),t.lt=(r,o)=>t.check(nc(r,o)),t.lte=(r,o)=>t.check(gs(r,o)),t.max=(r,o)=>t.check(gs(r,o)),t.int=r=>t.check(pv(r)),t.safe=r=>t.check(pv(r)),t.positive=r=>t.check(rc(0,r)),t.nonnegative=r=>t.check(ys(0,r)),t.negative=r=>t.check(nc(0,r)),t.nonpositive=r=>t.check(gs(0,r)),t.multipleOf=(r,o)=>t.check(oc(r,o)),t.step=(r,o)=>t.check(oc(r,o)),t.finite=()=>t;let n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),t.isFinite=!0,t.format=n.format??null});function He(t){return ad(mv,t)}var VP=P("ZodNumberFormat",(t,e)=>{xp.init(t,e),mv.init(t,e)});function pv(t){return cd(VP,t)}var GP=P("ZodBoolean",(t,e)=>{vp.init(t,e),xt.init(t,e)});function Ct(t){return ld(GP,t)}var WP=P("ZodNull",(t,e)=>{bp.init(t,e),xt.init(t,e)});function hv(t){return ud(WP,t)}var KP=P("ZodUnknown",(t,e)=>{_p.init(t,e),xt.init(t,e)});function dt(){return pd(KP)}var JP=P("ZodNever",(t,e)=>{wp.init(t,e),xt.init(t,e)});function YP(t){return dd(JP,t)}var XP=P("ZodArray",(t,e)=>{Sp.init(t,e),xt.init(t,e),t.element=e.element,t.min=(n,r)=>t.check(si(n,r)),t.nonempty=n=>t.check(si(1,n)),t.max=(n,r)=>t.check(ic(n,r)),t.length=(n,r)=>t.check(sc(n,r)),t.unwrap=()=>t.element});function Ne(t,e){return Yx(XP,t,e)}var gv=P("ZodObject",(t,e)=>{Qa.init(t,e),xt.init(t,e),Ce.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>ln(Object.keys(t._zod.def.shape)),t.catchall=n=>t.clone({...t._zod.def,catchall:n}),t.passthrough=()=>t.clone({...t._zod.def,catchall:dt()}),t.loose=()=>t.clone({...t._zod.def,catchall:dt()}),t.strict=()=>t.clone({...t._zod.def,catchall:YP()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=n=>Ce.extend(t,n),t.merge=n=>Ce.merge(t,n),t.pick=n=>Ce.pick(t,n),t.omit=n=>Ce.omit(t,n),t.partial=(...n)=>Ce.partial(vv,t,n[0]),t.required=(...n)=>Ce.required(bv,t,n[0])});function X(t,e){let n={type:"object",get shape(){return Ce.assignProp(this,"shape",{...t}),this.shape},...Ce.normalizeParams(e)};return new gv(n)}function Qt(t,e){return new gv({type:"object",get shape(){return Ce.assignProp(this,"shape",{...t}),this.shape},catchall:dt(),...Ce.normalizeParams(e)})}var yv=P("ZodUnion",(t,e)=>{ec.init(t,e),xt.init(t,e),t.options=e.options});function at(t,e){return new yv({type:"union",options:t,...Ce.normalizeParams(e)})}var QP=P("ZodDiscriminatedUnion",(t,e)=>{yv.init(t,e),kp.init(t,e)});function Od(t,e,n){return new QP({type:"union",options:e,discriminator:t,...Ce.normalizeParams(n)})}var eC=P("ZodIntersection",(t,e)=>{Tp.init(t,e),xt.init(t,e)});function pc(t,e){return new eC({type:"intersection",left:t,right:e})}var tC=P("ZodRecord",(t,e)=>{Ep.init(t,e),xt.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function nt(t,e,n){return new tC({type:"record",keyType:t,valueType:e,...Ce.normalizeParams(n)})}var Cd=P("ZodEnum",(t,e)=>{$p.init(t,e),xt.init(t,e),t.enum=e.entries,t.options=Object.values(e.entries);let n=new Set(Object.keys(e.entries));t.extract=(r,o)=>{let i={};for(let s of r)if(n.has(s))i[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Cd({...e,checks:[],...Ce.normalizeParams(o),entries:i})},t.exclude=(r,o)=>{let i={...e.entries};for(let s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new Cd({...e,checks:[],...Ce.normalizeParams(o),entries:i})}});function ln(t,e){let n=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new Cd({type:"enum",entries:n,...Ce.normalizeParams(e)})}var nC=P("ZodLiteral",(t,e)=>{Rp.init(t,e),xt.init(t,e),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function ne(t,e){return new nC({type:"literal",values:Array.isArray(t)?t:[t],...Ce.normalizeParams(e)})}var rC=P("ZodTransform",(t,e)=>{Ap.init(t,e),xt.init(t,e),t._zod.parse=(n,r)=>{n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ce.issue(i,n.value,e));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=t),s.continue??(s.continue=!0),n.issues.push(Ce.issue(s))}};let o=e.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function xv(t){return new rC({type:"transform",transform:t})}var vv=P("ZodOptional",(t,e)=>{Pp.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function ft(t){return new vv({type:"optional",innerType:t})}var oC=P("ZodNullable",(t,e)=>{Cp.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function dv(t){return new oC({type:"nullable",innerType:t})}var iC=P("ZodDefault",(t,e)=>{Ip.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function sC(t,e){return new iC({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}var aC=P("ZodPrefault",(t,e)=>{Op.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function cC(t,e){return new aC({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}var bv=P("ZodNonOptional",(t,e)=>{zp.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function lC(t,e){return new bv({type:"nonoptional",innerType:t,...Ce.normalizeParams(e)})}var uC=P("ZodCatch",(t,e)=>{Np.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function pC(t,e){return new uC({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var dC=P("ZodPipe",(t,e)=>{jp.init(t,e),xt.init(t,e),t.in=e.in,t.out=e.out});function Id(t,e){return new dC({type:"pipe",in:t,out:e})}var fC=P("ZodReadonly",(t,e)=>{Lp.init(t,e),xt.init(t,e)});function mC(t){return new fC({type:"readonly",innerType:t})}var _v=P("ZodCustom",(t,e)=>{Dp.init(t,e),xt.init(t,e)});function hC(t){let e=new Lt({check:"custom"});return e._zod.check=t,e}function wv(t,e){return Sd(_v,t??(()=>!0),e)}function gC(t,e={}){return kd(_v,t,e)}function yC(t){let e=hC(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Ce.issue(r,n.value,e._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),o.continue??(o.continue=!e._zod.def.abort),n.issues.push(Ce.issue(o))}},t(n.value,n)));return e}function zd(t,e){return Id(xv(t),e)}xn(Hx());var jd="2025-11-25";var Sv=[jd,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Or="io.modelcontextprotocol/related-task",fc="2.0",At=wv(t=>t!==null&&(typeof t=="object"||typeof t=="function")),kv=at([R(),He().int()]),Tv=R(),P3=Qt({ttl:He().optional(),pollInterval:He().optional()}),xC=X({ttl:He().optional()}),vC=X({taskId:R()}),Ld=Qt({progressToken:kv.optional(),[Or]:vC.optional()}),bn=X({_meta:Ld.optional()}),bs=bn.extend({task:xC.optional()}),Ev=t=>bs.safeParse(t).success,Dt=X({method:R(),params:bn.loose().optional()}),En=X({_meta:Ld.optional()}),$n=X({method:R(),params:En.loose().optional()}),Mt=Qt({_meta:Ld.optional()}),mc=at([R(),He().int()]),$v=X({jsonrpc:ne(fc),id:mc,...Dt.shape}).strict(),Dd=t=>$v.safeParse(t).success,Rv=X({jsonrpc:ne(fc),...$n.shape}).strict(),Av=t=>Rv.safeParse(t).success,Md=X({jsonrpc:ne(fc),id:mc,result:Mt}).strict(),_s=t=>Md.safeParse(t).success;var se;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(se||(se={}));var Fd=X({jsonrpc:ne(fc),id:mc.optional(),error:X({code:He().int(),message:R(),data:dt().optional()})}).strict();var Pv=t=>Fd.safeParse(t).success;var Cv=at([$v,Rv,Md,Fd]),C3=at([Md,Fd]),hc=Mt.strict(),bC=En.extend({requestId:mc.optional(),reason:R().optional()}),gc=$n.extend({method:ne("notifications/cancelled"),params:bC}),_C=X({src:R(),mimeType:R().optional(),sizes:Ne(R()).optional(),theme:ln(["light","dark"]).optional()}),ws=X({icons:Ne(_C).optional()}),li=X({name:R(),title:R().optional()}),Iv=li.extend({...li.shape,...ws.shape,version:R(),websiteUrl:R().optional(),description:R().optional()}),wC=pc(X({applyDefaults:Ct().optional()}),nt(R(),dt())),SC=zd(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,pc(X({form:wC.optional(),url:At.optional()}),nt(R(),dt()).optional())),kC=Qt({list:At.optional(),cancel:At.optional(),requests:Qt({sampling:Qt({createMessage:At.optional()}).optional(),elicitation:Qt({create:At.optional()}).optional()}).optional()}),TC=Qt({list:At.optional(),cancel:At.optional(),requests:Qt({tools:Qt({call:At.optional()}).optional()}).optional()}),EC=X({experimental:nt(R(),At).optional(),sampling:X({context:At.optional(),tools:At.optional()}).optional(),elicitation:SC.optional(),roots:X({listChanged:Ct().optional()}).optional(),tasks:kC.optional(),extensions:nt(R(),At).optional()}),$C=bn.extend({protocolVersion:R(),capabilities:EC,clientInfo:Iv}),Ud=Dt.extend({method:ne("initialize"),params:$C});var RC=X({experimental:nt(R(),At).optional(),logging:At.optional(),completions:At.optional(),prompts:X({listChanged:Ct().optional()}).optional(),resources:X({subscribe:Ct().optional(),listChanged:Ct().optional()}).optional(),tools:X({listChanged:Ct().optional()}).optional(),tasks:TC.optional(),extensions:nt(R(),At).optional()}),AC=Mt.extend({protocolVersion:R(),capabilities:RC,serverInfo:Iv,instructions:R().optional()}),qd=$n.extend({method:ne("notifications/initialized"),params:En.optional()});var yc=Dt.extend({method:ne("ping"),params:bn.optional()}),PC=X({progress:He(),total:ft(He()),message:ft(R())}),CC=X({...En.shape,...PC.shape,progressToken:kv}),xc=$n.extend({method:ne("notifications/progress"),params:CC}),IC=bn.extend({cursor:Tv.optional()}),Ss=Dt.extend({params:IC.optional()}),ks=Mt.extend({nextCursor:Tv.optional()}),OC=ln(["working","input_required","completed","failed","cancelled"]),Ts=X({taskId:R(),status:OC,ttl:at([He(),hv()]),createdAt:R(),lastUpdatedAt:R(),pollInterval:ft(He()),statusMessage:ft(R())}),ui=Mt.extend({task:Ts}),zC=En.merge(Ts),Es=$n.extend({method:ne("notifications/tasks/status"),params:zC}),vc=Dt.extend({method:ne("tasks/get"),params:bn.extend({taskId:R()})}),bc=Mt.merge(Ts),_c=Dt.extend({method:ne("tasks/result"),params:bn.extend({taskId:R()})}),I3=Mt.loose(),wc=Ss.extend({method:ne("tasks/list")}),Sc=ks.extend({tasks:Ne(Ts)}),kc=Dt.extend({method:ne("tasks/cancel"),params:bn.extend({taskId:R()})}),Ov=Mt.merge(Ts),zv=X({uri:R(),mimeType:ft(R()),_meta:nt(R(),dt()).optional()}),Nv=zv.extend({text:R()}),Zd=R().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),jv=zv.extend({blob:Zd}),$s=ln(["user","assistant"]),pi=X({audience:Ne($s).optional(),priority:He().min(0).max(1).optional(),lastModified:xs.datetime({offset:!0}).optional()}),Lv=X({...li.shape,...ws.shape,uri:R(),description:ft(R()),mimeType:ft(R()),size:ft(He()),annotations:pi.optional(),_meta:ft(Qt({}))}),NC=X({...li.shape,...ws.shape,uriTemplate:R(),description:ft(R()),mimeType:ft(R()),annotations:pi.optional(),_meta:ft(Qt({}))}),Tc=Ss.extend({method:ne("resources/list")}),jC=ks.extend({resources:Ne(Lv)}),Ec=Ss.extend({method:ne("resources/templates/list")}),LC=ks.extend({resourceTemplates:Ne(NC)}),Bd=bn.extend({uri:R()}),DC=Bd,$c=Dt.extend({method:ne("resources/read"),params:DC}),MC=Mt.extend({contents:Ne(at([Nv,jv]))}),FC=$n.extend({method:ne("notifications/resources/list_changed"),params:En.optional()}),UC=Bd,qC=Dt.extend({method:ne("resources/subscribe"),params:UC}),ZC=Bd,BC=Dt.extend({method:ne("resources/unsubscribe"),params:ZC}),HC=En.extend({uri:R()}),VC=$n.extend({method:ne("notifications/resources/updated"),params:HC}),GC=X({name:R(),description:ft(R()),required:ft(Ct())}),WC=X({...li.shape,...ws.shape,description:ft(R()),arguments:ft(Ne(GC)),_meta:ft(Qt({}))}),Rc=Ss.extend({method:ne("prompts/list")}),KC=ks.extend({prompts:Ne(WC)}),JC=bn.extend({name:R(),arguments:nt(R(),R()).optional()}),Ac=Dt.extend({method:ne("prompts/get"),params:JC}),Hd=X({type:ne("text"),text:R(),annotations:pi.optional(),_meta:nt(R(),dt()).optional()}),Vd=X({type:ne("image"),data:Zd,mimeType:R(),annotations:pi.optional(),_meta:nt(R(),dt()).optional()}),Gd=X({type:ne("audio"),data:Zd,mimeType:R(),annotations:pi.optional(),_meta:nt(R(),dt()).optional()}),YC=X({type:ne("tool_use"),name:R(),id:R(),input:nt(R(),dt()),_meta:nt(R(),dt()).optional()}),XC=X({type:ne("resource"),resource:at([Nv,jv]),annotations:pi.optional(),_meta:nt(R(),dt()).optional()}),QC=Lv.extend({type:ne("resource_link")}),Wd=at([Hd,Vd,Gd,QC,XC]),eI=X({role:$s,content:Wd}),tI=Mt.extend({description:R().optional(),messages:Ne(eI)}),nI=$n.extend({method:ne("notifications/prompts/list_changed"),params:En.optional()}),rI=X({title:R().optional(),readOnlyHint:Ct().optional(),destructiveHint:Ct().optional(),idempotentHint:Ct().optional(),openWorldHint:Ct().optional()}),oI=X({taskSupport:ln(["required","optional","forbidden"]).optional()}),Dv=X({...li.shape,...ws.shape,description:R().optional(),inputSchema:X({type:ne("object"),properties:nt(R(),At).optional(),required:Ne(R()).optional()}).catchall(dt()),outputSchema:X({type:ne("object"),properties:nt(R(),At).optional(),required:Ne(R()).optional()}).catchall(dt()).optional(),annotations:rI.optional(),execution:oI.optional(),_meta:nt(R(),dt()).optional()}),Pc=Ss.extend({method:ne("tools/list")}),iI=ks.extend({tools:Ne(Dv)}),Cc=Mt.extend({content:Ne(Wd).default([]),structuredContent:nt(R(),dt()).optional(),isError:Ct().optional()}),O3=Cc.or(Mt.extend({toolResult:dt()})),sI=bs.extend({name:R(),arguments:nt(R(),dt()).optional()}),di=Dt.extend({method:ne("tools/call"),params:sI}),aI=$n.extend({method:ne("notifications/tools/list_changed"),params:En.optional()}),z3=X({autoRefresh:Ct().default(!0),debounceMs:He().int().nonnegative().default(300)}),Rs=ln(["debug","info","notice","warning","error","critical","alert","emergency"]),cI=bn.extend({level:Rs}),Kd=Dt.extend({method:ne("logging/setLevel"),params:cI}),lI=En.extend({level:Rs,logger:R().optional(),data:dt()}),uI=$n.extend({method:ne("notifications/message"),params:lI}),pI=X({name:R().optional()}),dI=X({hints:Ne(pI).optional(),costPriority:He().min(0).max(1).optional(),speedPriority:He().min(0).max(1).optional(),intelligencePriority:He().min(0).max(1).optional()}),fI=X({mode:ln(["auto","required","none"]).optional()}),mI=X({type:ne("tool_result"),toolUseId:R().describe("The unique identifier for the corresponding tool call."),content:Ne(Wd).default([]),structuredContent:X({}).loose().optional(),isError:Ct().optional(),_meta:nt(R(),dt()).optional()}),hI=Od("type",[Hd,Vd,Gd]),dc=Od("type",[Hd,Vd,Gd,YC,mI]),gI=X({role:$s,content:at([dc,Ne(dc)]),_meta:nt(R(),dt()).optional()}),yI=bs.extend({messages:Ne(gI),modelPreferences:dI.optional(),systemPrompt:R().optional(),includeContext:ln(["none","thisServer","allServers"]).optional(),temperature:He().optional(),maxTokens:He().int(),stopSequences:Ne(R()).optional(),metadata:At.optional(),tools:Ne(Dv).optional(),toolChoice:fI.optional()}),xI=Dt.extend({method:ne("sampling/createMessage"),params:yI}),As=Mt.extend({model:R(),stopReason:ft(ln(["endTurn","stopSequence","maxTokens"]).or(R())),role:$s,content:hI}),Jd=Mt.extend({model:R(),stopReason:ft(ln(["endTurn","stopSequence","maxTokens","toolUse"]).or(R())),role:$s,content:at([dc,Ne(dc)])}),vI=X({type:ne("boolean"),title:R().optional(),description:R().optional(),default:Ct().optional()}),bI=X({type:ne("string"),title:R().optional(),description:R().optional(),minLength:He().optional(),maxLength:He().optional(),format:ln(["email","uri","date","date-time"]).optional(),default:R().optional()}),_I=X({type:ln(["number","integer"]),title:R().optional(),description:R().optional(),minimum:He().optional(),maximum:He().optional(),default:He().optional()}),wI=X({type:ne("string"),title:R().optional(),description:R().optional(),enum:Ne(R()),default:R().optional()}),SI=X({type:ne("string"),title:R().optional(),description:R().optional(),oneOf:Ne(X({const:R(),title:R()})),default:R().optional()}),kI=X({type:ne("string"),title:R().optional(),description:R().optional(),enum:Ne(R()),enumNames:Ne(R()).optional(),default:R().optional()}),TI=at([wI,SI]),EI=X({type:ne("array"),title:R().optional(),description:R().optional(),minItems:He().optional(),maxItems:He().optional(),items:X({type:ne("string"),enum:Ne(R())}),default:Ne(R()).optional()}),$I=X({type:ne("array"),title:R().optional(),description:R().optional(),minItems:He().optional(),maxItems:He().optional(),items:X({anyOf:Ne(X({const:R(),title:R()}))}),default:Ne(R()).optional()}),RI=at([EI,$I]),AI=at([kI,TI,RI]),PI=at([AI,vI,bI,_I]),CI=bs.extend({mode:ne("form").optional(),message:R(),requestedSchema:X({type:ne("object"),properties:nt(R(),PI),required:Ne(R()).optional()})}),II=bs.extend({mode:ne("url"),message:R(),elicitationId:R(),url:R().url()}),OI=at([CI,II]),zI=Dt.extend({method:ne("elicitation/create"),params:OI}),NI=En.extend({elicitationId:R()}),jI=$n.extend({method:ne("notifications/elicitation/complete"),params:NI}),fi=Mt.extend({action:ln(["accept","decline","cancel"]),content:zd(t=>t===null?void 0:t,nt(R(),at([R(),He(),Ct(),Ne(R())])).optional())}),LI=X({type:ne("ref/resource"),uri:R()});var DI=X({type:ne("ref/prompt"),name:R()}),MI=bn.extend({ref:at([DI,LI]),argument:X({name:R(),value:R()}),context:X({arguments:nt(R(),R()).optional()}).optional()}),Ic=Dt.extend({method:ne("completion/complete"),params:MI});function Mv(t){if(t.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${t.params.ref.type}`)}function Fv(t){if(t.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${t.params.ref.type}`)}var FI=Mt.extend({completion:Qt({values:Ne(R()).max(100),total:ft(He().int()),hasMore:ft(Ct())})}),UI=X({uri:R().startsWith("file://"),name:R().optional(),_meta:nt(R(),dt()).optional()}),qI=Dt.extend({method:ne("roots/list"),params:bn.optional()}),Yd=Mt.extend({roots:Ne(UI)}),ZI=$n.extend({method:ne("notifications/roots/list_changed"),params:En.optional()}),N3=at([yc,Ud,Ic,Kd,Ac,Rc,Tc,Ec,$c,qC,BC,di,Pc,vc,_c,wc,kc]),j3=at([gc,xc,qd,ZI,Es]),L3=at([hc,As,Jd,fi,Yd,bc,Sc,ui]),D3=at([yc,xI,zI,qI,vc,_c,wc,kc]),M3=at([gc,xc,uI,VC,FC,aI,nI,Es,jI]),F3=at([hc,AC,FI,tI,KC,jC,LC,MC,Cc,iI,bc,Sc,ui]),te=class t extends Error{constructor(e,n,r){super(`MCP error ${e}: ${n}`),this.code=e,this.data=r,this.name="McpError"}static fromError(e,n,r){if(e===se.UrlElicitationRequired&&r){let o=r;if(o.elicitations)return new Nd(o.elicitations,n)}return new t(e,n,r)}},Nd=class extends te{constructor(e,n=`URL elicitation${e.length>1?"s":""} required`){super(se.UrlElicitationRequired,n,{elicitations:e})}get elicitations(){var e;return((e=this.data)==null?void 0:e.elicitations)??[]}};function zr(t){return t==="completed"||t==="failed"||t==="cancelled"}var qv=Symbol("Let zodToJsonSchema decide on which parser to use");var Uv={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"},Zv=t=>typeof t=="string"?{...Uv,name:t}:{...Uv,...t};var Bv=t=>{let e=Zv(t),n=e.name!==void 0?[...e.basePath,e.definitionPath,e.name]:e.basePath;return{...e,flags:{hasReferencedOpenAiAnyType:!1},currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(e.definitions).map(([r,o])=>[o._def,{def:o._def,path:[...e.basePath,e.definitionPath,r],jsonSchema:void 0}]))}};function Xd(t,e,n,r){r!=null&&r.errorMessages&&n&&(t.errorMessage={...t.errorMessage,[e]:n})}function je(t,e,n,r,o){t[e]=n,Xd(t,e,r,o)}var Oc=(t,e)=>{let n=0;for(;n<t.length&&n<e.length&&t[n]===e[n];n++);return[(t.length-n).toString(),...e.slice(n)].join("/")};function mt(t){if(t.target!=="openAi")return{};let e=[...t.basePath,t.definitionPath,t.openAiAnyTypeName];return t.flags.hasReferencedOpenAiAnyType=!0,{$ref:t.$refStrategy==="relative"?Oc(e,t.currentPath):e.join("/")}}function Hv(t,e){var r,o,i;let n={type:"array"};return(r=t.type)!=null&&r._def&&((i=(o=t.type)==null?void 0:o._def)==null?void 0:i.typeName)!==q.ZodAny&&(n.items=fe(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&je(n,"minItems",t.minLength.value,t.minLength.message,e),t.maxLength&&je(n,"maxItems",t.maxLength.value,t.maxLength.message,e),t.exactLength&&(je(n,"minItems",t.exactLength.value,t.exactLength.message,e),je(n,"maxItems",t.exactLength.value,t.exactLength.message,e)),n}function Vv(t,e){let n={type:"integer",format:"int64"};if(!t.checks)return n;for(let r of t.checks)switch(r.kind){case"min":e.target==="jsonSchema7"?r.inclusive?je(n,"minimum",r.value,r.message,e):je(n,"exclusiveMinimum",r.value,r.message,e):(r.inclusive||(n.exclusiveMinimum=!0),je(n,"minimum",r.value,r.message,e));break;case"max":e.target==="jsonSchema7"?r.inclusive?je(n,"maximum",r.value,r.message,e):je(n,"exclusiveMaximum",r.value,r.message,e):(r.inclusive||(n.exclusiveMaximum=!0),je(n,"maximum",r.value,r.message,e));break;case"multipleOf":je(n,"multipleOf",r.value,r.message,e);break}return n}function Gv(){return{type:"boolean"}}function zc(t,e){return fe(t.type._def,e)}var Wv=(t,e)=>fe(t.innerType._def,e);function Qd(t,e,n){let r=n??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((o,i)=>Qd(t,e,o))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return BI(t,e)}}var BI=(t,e)=>{let n={type:"integer",format:"unix-time"};if(e.target==="openApi3")return n;for(let r of t.checks)switch(r.kind){case"min":je(n,"minimum",r.value,r.message,e);break;case"max":je(n,"maximum",r.value,r.message,e);break}return n};function Kv(t,e){return{...fe(t.innerType._def,e),default:t.defaultValue()}}function Jv(t,e){return e.effectStrategy==="input"?fe(t.schema._def,e):mt(e)}function Yv(t){return{type:"string",enum:Array.from(t.values)}}var HI=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function Xv(t,e){let n=[fe(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),fe(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(i=>!!i),r=e.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0,o=[];return n.forEach(i=>{if(HI(i))o.push(...i.allOf),i.unevaluatedProperties===void 0&&(r=void 0);else{let s=i;if("additionalProperties"in i&&i.additionalProperties===!1){let{additionalProperties:a,...c}=i;s=c}else r=void 0;o.push(s)}}),o.length?{allOf:o,...r}:void 0}function Qv(t,e){let n=typeof t.value;return n!=="bigint"&&n!=="number"&&n!=="boolean"&&n!=="string"?{type:Array.isArray(t.value)?"array":"object"}:e.target==="openApi3"?{type:n==="bigint"?"integer":n,enum:[t.value]}:{type:n==="bigint"?"integer":n,const:t.value}}var ef,Ln={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:()=>(ef===void 0&&(ef=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),ef),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 Nc(t,e){let n={type:"string"};if(t.checks)for(let r of t.checks)switch(r.kind){case"min":je(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value,r.message,e);break;case"max":je(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value,r.message,e);break;case"email":switch(e.emailStrategy){case"format:email":Dn(n,"email",r.message,e);break;case"format:idn-email":Dn(n,"idn-email",r.message,e);break;case"pattern:zod":en(n,Ln.email,r.message,e);break}break;case"url":Dn(n,"uri",r.message,e);break;case"uuid":Dn(n,"uuid",r.message,e);break;case"regex":en(n,r.regex,r.message,e);break;case"cuid":en(n,Ln.cuid,r.message,e);break;case"cuid2":en(n,Ln.cuid2,r.message,e);break;case"startsWith":en(n,RegExp(`^${tf(r.value,e)}`),r.message,e);break;case"endsWith":en(n,RegExp(`${tf(r.value,e)}$`),r.message,e);break;case"datetime":Dn(n,"date-time",r.message,e);break;case"date":Dn(n,"date",r.message,e);break;case"time":Dn(n,"time",r.message,e);break;case"duration":Dn(n,"duration",r.message,e);break;case"length":je(n,"minLength",typeof n.minLength=="number"?Math.max(n.minLength,r.value):r.value,r.message,e),je(n,"maxLength",typeof n.maxLength=="number"?Math.min(n.maxLength,r.value):r.value,r.message,e);break;case"includes":{en(n,RegExp(tf(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&Dn(n,"ipv4",r.message,e),r.version!=="v4"&&Dn(n,"ipv6",r.message,e);break}case"base64url":en(n,Ln.base64url,r.message,e);break;case"jwt":en(n,Ln.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&en(n,Ln.ipv4Cidr,r.message,e),r.version!=="v4"&&en(n,Ln.ipv6Cidr,r.message,e);break}case"emoji":en(n,Ln.emoji(),r.message,e);break;case"ulid":{en(n,Ln.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{Dn(n,"binary",r.message,e);break}case"contentEncoding:base64":{je(n,"contentEncoding","base64",r.message,e);break}case"pattern:zod":{en(n,Ln.base64,r.message,e);break}}break}case"nanoid":en(n,Ln.nanoid,r.message,e);case"toLowerCase":case"toUpperCase":case"trim":break;default:}return n}function tf(t,e){return e.patternStrategy==="escape"?GI(t):t}var VI=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function GI(t){let e="";for(let n=0;n<t.length;n++)VI.has(t[n])||(e+="\\"),e+=t[n];return e}function Dn(t,e,n,r){var o;t.format||(o=t.anyOf)!=null&&o.some(i=>i.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format,...t.errorMessage&&r.errorMessages&&{errorMessage:{format:t.errorMessage.format}}}),delete t.format,t.errorMessage&&(delete t.errorMessage.format,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.anyOf.push({format:e,...n&&r.errorMessages&&{errorMessage:{format:n}}})):je(t,"format",e,n,r)}function en(t,e,n,r){var o;t.pattern||(o=t.allOf)!=null&&o.some(i=>i.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern,...t.errorMessage&&r.errorMessages&&{errorMessage:{pattern:t.errorMessage.pattern}}}),delete t.pattern,t.errorMessage&&(delete t.errorMessage.pattern,Object.keys(t.errorMessage).length===0&&delete t.errorMessage)),t.allOf.push({pattern:eb(e,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):je(t,"pattern",eb(e,r),n,r)}function eb(t,e){var c;if(!e.applyRegexFlags||!t.flags)return t.source;let n={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},r=n.i?t.source.toLowerCase():t.source,o="",i=!1,s=!1,a=!1;for(let l=0;l<r.length;l++){if(i){o+=r[l],i=!1;continue}if(n.i){if(s){if(r[l].match(/[a-z]/)){a?(o+=r[l],o+=`${r[l-2]}-${r[l]}`.toUpperCase(),a=!1):r[l+1]==="-"&&((c=r[l+2])!=null&&c.match(/[a-z]/))?(o+=r[l],a=!0):o+=`${r[l]}${r[l].toUpperCase()}`;continue}}else if(r[l].match(/[a-z]/)){o+=`[${r[l]}${r[l].toUpperCase()}]`;continue}}if(n.m){if(r[l]==="^"){o+=`(^|(?<=[\r
|
|
49
50
|
]))`;continue}else if(r[l]==="$"){o+=`($|(?=[\r
|
|
50
51
|
]))`;continue}}if(n.s&&r[l]==="."){o+=s?`${r[l]}\r
|
|
51
52
|
`:`[${r[l]}\r
|
|
52
|
-
]`;continue}o+=r[l],r[l]==="\\"?i=!0:s&&r[l]==="]"?s=!1:!s&&r[l]==="["&&(s=!0)}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${e.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),t.source}return o}function Oc(t,e){var r,o,i,s,a,c;if(e.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),e.target==="openApi3"&&((r=t.keyType)==null?void 0:r._def.typeName)===q.ZodEnum)return{type:"object",required:t.keyType._def.values,properties:t.keyType._def.values.reduce((l,p)=>({...l,[p]:fe(t.valueType._def,{...e,currentPath:[...e.currentPath,"properties",p]})??mt(e)}),{}),additionalProperties:e.rejectedAdditionalProperties};let n={type:"object",additionalProperties:fe(t.valueType._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]})??e.allowedAdditionalProperties};if(e.target==="openApi3")return n;if(((o=t.keyType)==null?void 0:o._def.typeName)===q.ZodString&&((i=t.keyType._def.checks)!=null&&i.length)){let{type:l,...p}=Pc(t.keyType._def,e);return{...n,propertyNames:p}}else{if(((s=t.keyType)==null?void 0:s._def.typeName)===q.ZodEnum)return{...n,propertyNames:{enum:t.keyType._def.values}};if(((a=t.keyType)==null?void 0:a._def.typeName)===q.ZodBranded&&t.keyType._def.type._def.typeName===q.ZodString&&((c=t.keyType._def.type._def.checks)!=null&&c.length)){let{type:l,...p}=Cc(t.keyType._def,e);return{...n,propertyNames:p}}}return n}function Hv(t,e){if(e.mapStrategy==="record")return Oc(t,e);let n=fe(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||mt(e),r=fe(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||mt(e);return{type:"array",maxItems:125,items:{type:"array",items:[n,r],minItems:2,maxItems:2}}}function Vv(t){let e=t.values,r=Object.keys(t.values).filter(i=>typeof e[e[i]]!="number").map(i=>e[i]),o=Array.from(new Set(r.map(i=>typeof i)));return{type:o.length===1?o[0]==="string"?"string":"number":["string","number"],enum:r}}function Gv(t){return t.target==="openAi"?void 0:{not:mt({...t,currentPath:[...t.currentPath,"not"]})}}function Wv(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var $s={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function Jv(t,e){if(e.target==="openApi3")return Kv(t,e);let n=t.options instanceof Map?Array.from(t.options.values()):t.options;if(n.every(r=>r._def.typeName in $s&&(!r._def.checks||!r._def.checks.length))){let r=n.reduce((o,i)=>{let s=$s[i._def.typeName];return s&&!o.includes(s)?[...o,s]:o},[]);return{type:r.length>1?r:r[0]}}else if(n.every(r=>r._def.typeName==="ZodLiteral"&&!r.description)){let r=n.reduce((o,i)=>{let s=typeof i._def.value;switch(s){case"string":case"number":case"boolean":return[...o,s];case"bigint":return[...o,"integer"];case"object":if(i._def.value===null)return[...o,"null"];case"symbol":case"undefined":case"function":default:return o}},[]);if(r.length===n.length){let o=r.filter((i,s,a)=>a.indexOf(i)===s);return{type:o.length>1?o:o[0],enum:n.reduce((i,s)=>i.includes(s._def.value)?i:[...i,s._def.value],[])}}}else if(n.every(r=>r._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((r,o)=>[...r,...o._def.values.filter(i=>!r.includes(i))],[])};return Kv(t,e)}var Kv=(t,e)=>{let n=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((r,o)=>fe(r._def,{...e,currentPath:[...e.currentPath,"anyOf",`${o}`]})).filter(r=>!!r&&(!e.strictUnions||typeof r=="object"&&Object.keys(r).length>0));return n.length?{anyOf:n}:void 0};function Yv(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return e.target==="openApi3"?{type:$s[t.innerType._def.typeName],nullable:!0}:{type:[$s[t.innerType._def.typeName],"null"]};if(e.target==="openApi3"){let r=fe(t.innerType._def,{...e,currentPath:[...e.currentPath]});return r&&"$ref"in r?{allOf:[r],nullable:!0}:r&&{...r,nullable:!0}}let n=fe(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}function Xv(t,e){let n={type:"number"};if(!t.checks)return n;for(let r of t.checks)switch(r.kind){case"int":n.type="integer",Gd(n,"type",r.message,e);break;case"min":e.target==="jsonSchema7"?r.inclusive?je(n,"minimum",r.value,r.message,e):je(n,"exclusiveMinimum",r.value,r.message,e):(r.inclusive||(n.exclusiveMinimum=!0),je(n,"minimum",r.value,r.message,e));break;case"max":e.target==="jsonSchema7"?r.inclusive?je(n,"maximum",r.value,r.message,e):je(n,"exclusiveMaximum",r.value,r.message,e):(r.inclusive||(n.exclusiveMaximum=!0),je(n,"maximum",r.value,r.message,e));break;case"multipleOf":je(n,"multipleOf",r.value,r.message,e);break}return n}function Qv(t,e){let n=e.target==="openAi",r={type:"object",properties:{}},o=[],i=t.shape();for(let a in i){let c=i[a];if(c===void 0||c._def===void 0)continue;let l=jP(c);l&&n&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),l=!1);let p=fe(c._def,{...e,currentPath:[...e.currentPath,"properties",a],propertyPath:[...e.currentPath,"properties",a]});p!==void 0&&(r.properties[a]=p,l||o.push(a))}o.length&&(r.required=o);let s=NP(t,e);return s!==void 0&&(r.additionalProperties=s),r}function NP(t,e){if(t.catchall._def.typeName!=="ZodNever")return fe(t.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return e.allowedAdditionalProperties;case"strict":return e.rejectedAdditionalProperties;case"strip":return e.removeAdditionalStrategy==="strict"?e.allowedAdditionalProperties:e.rejectedAdditionalProperties}}function jP(t){try{return t.isOptional()}catch{return!0}}var eb=(t,e)=>{var r;if(e.currentPath.toString()===((r=e.propertyPath)==null?void 0:r.toString()))return fe(t.innerType._def,e);let n=fe(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return n?{anyOf:[{not:mt(e)},n]}:mt(e)};var tb=(t,e)=>{if(e.pipeStrategy==="input")return fe(t.in._def,e);if(e.pipeStrategy==="output")return fe(t.out._def,e);let n=fe(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),r=fe(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",n?"1":"0"]});return{allOf:[n,r].filter(o=>o!==void 0)}};function nb(t,e){return fe(t.type._def,e)}function rb(t,e){let r={type:"array",uniqueItems:!0,items:fe(t.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return t.minSize&&je(r,"minItems",t.minSize.value,t.minSize.message,e),t.maxSize&&je(r,"maxItems",t.maxSize.value,t.maxSize.message,e),r}function ob(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((n,r)=>fe(n._def,{...e,currentPath:[...e.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[]),additionalItems:fe(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((n,r)=>fe(n._def,{...e,currentPath:[...e.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[])}}function ib(t){return{not:mt(t)}}function sb(t){return mt(t)}var ab=(t,e)=>fe(t.innerType._def,e);var cb=(t,e,n)=>{switch(e){case q.ZodString:return Pc(t,n);case q.ZodNumber:return Xv(t,n);case q.ZodObject:return Qv(t,n);case q.ZodBigInt:return jv(t,n);case q.ZodBoolean:return Lv();case q.ZodDate:return Wd(t,n);case q.ZodUndefined:return ib(n);case q.ZodNull:return Wv(n);case q.ZodArray:return Nv(t,n);case q.ZodUnion:case q.ZodDiscriminatedUnion:return Jv(t,n);case q.ZodIntersection:return qv(t,n);case q.ZodTuple:return ob(t,n);case q.ZodRecord:return Oc(t,n);case q.ZodLiteral:return Zv(t,n);case q.ZodEnum:return Uv(t);case q.ZodNativeEnum:return Vv(t);case q.ZodNullable:return Yv(t,n);case q.ZodOptional:return eb(t,n);case q.ZodMap:return Hv(t,n);case q.ZodSet:return rb(t,n);case q.ZodLazy:return()=>t.getter()._def;case q.ZodPromise:return nb(t,n);case q.ZodNaN:case q.ZodNever:return Gv(n);case q.ZodEffects:return Fv(t,n);case q.ZodAny:return mt(n);case q.ZodUnknown:return sb(n);case q.ZodDefault:return Mv(t,n);case q.ZodBranded:return Cc(t,n);case q.ZodReadonly:return ab(t,n);case q.ZodCatch:return Dv(t,n);case q.ZodPipeline:return tb(t,n);case q.ZodFunction:case q.ZodVoid:case q.ZodSymbol:return;default:return(r=>{})(e)}};function fe(t,e,n=!1){var a;let r=e.seen.get(t);if(e.override){let c=(a=e.override)==null?void 0:a.call(e,t,e,r,n);if(c!==Pv)return c}if(r&&!n){let c=LP(r,e);if(c!==void 0)return c}let o={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,o);let i=cb(t,t.typeName,e),s=typeof i=="function"?fe(i(),e):i;if(s&&DP(t,e,s),e.postProcess){let c=e.postProcess(s,t,e);return o.jsonSchema=s,c}return o.jsonSchema=s,s}var LP=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:Ic(e.currentPath,t.path)};case"none":case"seen":return t.path.length<e.currentPath.length&&t.path.every((n,r)=>e.currentPath[r]===n)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),mt(e)):e.$refStrategy==="seen"?mt(e):void 0}},DP=(t,e,n)=>(t.description&&(n.description=t.description,e.markdownDescription&&(n.markdownDescription=t.description)),n);var Yd=(t,e)=>{let n=zv(e),r=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((c,[l,p])=>({...c,[l]:fe(p._def,{...n,currentPath:[...n.basePath,n.definitionPath,l]},!0)??mt(n)}),{}):void 0,o=typeof e=="string"?e:(e==null?void 0:e.nameStrategy)==="title"||e==null?void 0:e.name,i=fe(t._def,o===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,o]},!1)??mt(n),s=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;s!==void 0&&(i.title=s),n.flags.hasReferencedOpenAiAnyType&&(r||(r={}),r[n.openAiAnyTypeName]||(r[n.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:n.$refStrategy==="relative"?"1":[...n.basePath,n.definitionPath,n.openAiAnyTypeName].join("/")}}));let a=o===void 0?r?{...i,[n.definitionPath]:r}:i:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,o].join("/"),[n.definitionPath]:{...r,[o]:i}};return n.target==="jsonSchema7"?a.$schema="http://json-schema.org/draft-07/schema#":(n.target==="jsonSchema2019-09"||n.target==="openAi")&&(a.$schema="https://json-schema.org/draft/2019-09/schema#"),n.target==="openAi"&&("anyOf"in a||"oneOf"in a||"allOf"in a||"type"in a&&Array.isArray(a.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),a};function MP(t){return!t||t==="jsonSchema7"||t==="draft-7"?"draft-7":t==="jsonSchema2019-09"||t==="draft-2020-12"?"draft-2020-12":"draft-7"}function Xd(t,e){return kn(t)?bd(t,{target:MP(e==null?void 0:e.target),io:(e==null?void 0:e.pipeStrategy)??"input"}):Yd(t,{strictUnions:(e==null?void 0:e.strictUnions)??!0,pipeStrategy:(e==null?void 0:e.pipeStrategy)??"input"})}function Qd(t){let e=Ar(t),n=e==null?void 0:e.method;if(!n)throw new Error("Schema is missing a method literal");let r=sc(n);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function ef(t,e){let n=Rr(t,e);if(!n.success)throw n.error;return n.data}var FP=6e4,zc=class{constructor(e){this._options=e,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(fc,n=>{this._oncancel(n)}),this.setNotificationHandler(hc,n=>{this._onprogress(n)}),this.setRequestHandler(mc,n=>({})),this._taskStore=e==null?void 0:e.taskStore,this._taskMessageQueue=e==null?void 0:e.taskMessageQueue,this._taskStore&&(this.setRequestHandler(gc,async(n,r)=>{let o=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!o)throw new te(se.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(xc,async(n,r)=>{let o=async()=>{var a;let i=n.params.taskId;if(this._taskMessageQueue){let c;for(;c=await this._taskMessageQueue.dequeue(i,r.sessionId);){if(c.type==="response"||c.type==="error"){let l=c.message,p=l.id,d=this._requestResolvers.get(p);if(d)if(this._requestResolvers.delete(p),c.type==="response")d(l);else{let f=l,h=new te(f.error.code,f.error.message,f.error.data);d(h)}else{let f=c.type==="response"?"Response":"Error";this._onerror(new Error(`${f} handler missing for request ${p}`))}continue}await((a=this._transport)==null?void 0:a.send(c.message,{relatedRequestId:r.requestId}))}}let s=await this._taskStore.getTask(i,r.sessionId);if(!s)throw new te(se.InvalidParams,`Task not found: ${i}`);if(!Cr(s.status))return await this._waitForTaskUpdate(i,r.signal),await o();if(Cr(s.status)){let c=await this._taskStore.getTaskResult(i,r.sessionId);return this._clearTaskQueue(i),{...c,_meta:{...c._meta,[Ir]:{taskId:i}}}}return await o()};return await o()}),this.setRequestHandler(vc,async(n,r)=>{var o;try{let{tasks:i,nextCursor:s}=await this._taskStore.listTasks((o=n.params)==null?void 0:o.cursor,r.sessionId);return{tasks:i,nextCursor:s,_meta:{}}}catch(i){throw new te(se.InvalidParams,`Failed to list tasks: ${i instanceof Error?i.message:String(i)}`)}}),this.setRequestHandler(_c,async(n,r)=>{try{let o=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!o)throw new te(se.InvalidParams,`Task not found: ${n.params.taskId}`);if(Cr(o.status))throw new te(se.InvalidParams,`Cannot cancel task in terminal status: ${o.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",r.sessionId),this._clearTaskQueue(n.params.taskId);let i=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!i)throw new te(se.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...i}}catch(o){throw o instanceof te?o:new te(se.InvalidRequest,`Failed to cancel task: ${o instanceof Error?o.message:String(o)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;let n=this._requestHandlerAbortControllers.get(e.params.requestId);n==null||n.abort(e.params.reason)}_setupTimeout(e,n,r,o,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,n),startTime:Date.now(),timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:i,onTimeout:o})}_resetTimeout(e){let n=this._timeoutInfo.get(e);if(!n)return!1;let r=Date.now()-n.startTime;if(n.maxTotalTimeout&&r>=n.maxTotalTimeout)throw this._timeoutInfo.delete(e),te.fromError(se.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:r});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(e){let n=this._timeoutInfo.get(e);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var i,s,a;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=e;let n=(i=this.transport)==null?void 0:i.onclose;this._transport.onclose=()=>{n==null||n(),this._onclose()};let r=(s=this.transport)==null?void 0:s.onerror;this._transport.onerror=c=>{r==null||r(c),this._onerror(c)};let o=(a=this._transport)==null?void 0:a.onmessage;this._transport.onmessage=(c,l)=>{o==null||o(c,l),xs(c)||bv(c)?this._onresponse(c):Od(c)?this._onrequest(c,l):vv(c)?this._onnotification(c):this._onerror(new Error(`Unknown message type: ${JSON.stringify(c)}`))},await this._transport.start()}_onclose(){var r;let e=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 n=te.fromError(se.ConnectionClosed,"Connection closed");this._transport=void 0,(r=this.onclose)==null||r.call(this);for(let o of e.values())o(n)}_onerror(e){var n;(n=this.onerror)==null||n.call(this,e)}_onnotification(e){let n=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(e)).catch(r=>this._onerror(new Error(`Uncaught error in notification handler: ${r}`)))}_onrequest(e,n){var p,d,f,h;let r=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,o=this._transport,i=(f=(d=(p=e.params)==null?void 0:p._meta)==null?void 0:d[Ir])==null?void 0:f.taskId;if(r===void 0){let y={jsonrpc:"2.0",id:e.id,error:{code:se.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:y,timestamp:Date.now()},o==null?void 0:o.sessionId).catch(v=>this._onerror(new Error(`Failed to enqueue error response: ${v}`))):o==null||o.send(y).catch(v=>this._onerror(new Error(`Failed to send an error response: ${v}`)));return}let s=new AbortController;this._requestHandlerAbortControllers.set(e.id,s);let a=gv(e.params)?e.params.task:void 0,c=this._taskStore?this.requestTaskStore(e,o==null?void 0:o.sessionId):void 0,l={signal:s.signal,sessionId:o==null?void 0:o.sessionId,_meta:(h=e.params)==null?void 0:h._meta,sendNotification:async y=>{if(s.signal.aborted)return;let v={relatedRequestId:e.id};i&&(v.relatedTask={taskId:i}),await this.notification(y,v)},sendRequest:async(y,v,x)=>{var w;if(s.signal.aborted)throw new te(se.ConnectionClosed,"Request was cancelled");let m={...x,relatedRequestId:e.id};i&&!m.relatedTask&&(m.relatedTask={taskId:i});let b=((w=m.relatedTask)==null?void 0:w.taskId)??i;return b&&c&&await c.updateTaskStatus(b,"input_required"),await this.request(y,v,m)},authInfo:n==null?void 0:n.authInfo,requestId:e.id,requestInfo:n==null?void 0:n.requestInfo,taskId:i,taskStore:c,taskRequestedTtl:a==null?void 0:a.ttl,closeSSEStream:n==null?void 0:n.closeSSEStream,closeStandaloneSSEStream:n==null?void 0:n.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(e.method)}).then(()=>r(e,l)).then(async y=>{if(s.signal.aborted)return;let v={result:y,jsonrpc:"2.0",id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:v,timestamp:Date.now()},o==null?void 0:o.sessionId):await(o==null?void 0:o.send(v))},async y=>{if(s.signal.aborted)return;let v={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(y.code)?y.code:se.InternalError,message:y.message??"Internal error",...y.data!==void 0&&{data:y.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:v,timestamp:Date.now()},o==null?void 0:o.sessionId):await(o==null?void 0:o.send(v))}).catch(y=>this._onerror(new Error(`Failed to send response: ${y}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===s&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:n,...r}=e.params,o=Number(n),i=this._progressHandlers.get(o);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let s=this._responseHandlers.get(o),a=this._timeoutInfo.get(o);if(a&&s&&a.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(c){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),s(c);return}i(r)}_onresponse(e){let n=Number(e.id),r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),xs(e))r(e);else{let s=new te(e.error.code,e.error.message,e.error.data);r(s)}return}let o=this._responseHandlers.get(n);if(o===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let i=!1;if(xs(e)&&e.result&&typeof e.result=="object"){let s=e.result;if(s.task&&typeof s.task=="object"){let a=s.task;typeof a.taskId=="string"&&(i=!0,this._taskProgressTokens.set(a.taskId,n))}}if(i||this._progressHandlers.delete(n),xs(e))o(e);else{let s=te.fromError(e.error.code,e.error.message,e.error.data);o(s)}}get transport(){return this._transport}async close(){var e;await((e=this._transport)==null?void 0:e.close())}async*requestStream(e,n,r){var s,a;let{task:o}=r??{};if(!o){try{yield{type:"result",result:await this.request(e,n,r)}}catch(c){yield{type:"error",error:c instanceof te?c:new te(se.InternalError,String(c))}}return}let i;try{let c=await this.request(e,ai,r);if(c.task)i=c.task.taskId,yield{type:"taskCreated",task:c.task};else throw new te(se.InternalError,"Task creation did not return a task");for(;;){let l=await this.getTask({taskId:i},r);if(yield{type:"taskStatus",task:l},Cr(l.status)){l.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)}:l.status==="failed"?yield{type:"error",error:new te(se.InternalError,`Task ${i} failed`)}:l.status==="cancelled"&&(yield{type:"error",error:new te(se.InternalError,`Task ${i} was cancelled`)});return}if(l.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)};return}let p=l.pollInterval??((s=this._options)==null?void 0:s.defaultTaskPollInterval)??1e3;await new Promise(d=>setTimeout(d,p)),(a=r==null?void 0:r.signal)==null||a.throwIfAborted()}}catch(c){yield{type:"error",error:c instanceof te?c:new te(se.InternalError,String(c))}}}request(e,n,r){let{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s,task:a,relatedTask:c}=r??{};return new Promise((l,p)=>{var b,w,k,E,F;let d=j=>{p(j)};if(!this._transport){d(new Error("Not connected"));return}if(((b=this._options)==null?void 0:b.enforceStrictCapabilities)===!0)try{this.assertCapabilityForMethod(e.method),a&&this.assertTaskCapability(e.method)}catch(j){d(j);return}(w=r==null?void 0:r.signal)==null||w.throwIfAborted();let f=this._requestMessageId++,h={...e,jsonrpc:"2.0",id:f};r!=null&&r.onprogress&&(this._progressHandlers.set(f,r.onprogress),h.params={...e.params,_meta:{...((k=e.params)==null?void 0:k._meta)||{},progressToken:f}}),a&&(h.params={...h.params,task:a}),c&&(h.params={...h.params,_meta:{...((E=h.params)==null?void 0:E._meta)||{},[Ir]:c}});let y=j=>{var de;this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),(de=this._transport)==null||de.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(j)}},{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(oe=>this._onerror(new Error(`Failed to send cancellation: ${oe}`)));let me=j instanceof te?j:new te(se.RequestTimeout,String(j));p(me)};this._responseHandlers.set(f,j=>{var me;if(!((me=r==null?void 0:r.signal)!=null&&me.aborted)){if(j instanceof Error)return p(j);try{let de=Rr(n,j.result);de.success?l(de.data):p(de.error)}catch(de){p(de)}}}),(F=r==null?void 0:r.signal)==null||F.addEventListener("abort",()=>{var j;y((j=r==null?void 0:r.signal)==null?void 0:j.reason)});let v=(r==null?void 0:r.timeout)??FP,x=()=>y(te.fromError(se.RequestTimeout,"Request timed out",{timeout:v}));this._setupTimeout(f,v,r==null?void 0:r.maxTotalTimeout,x,(r==null?void 0:r.resetTimeoutOnProgress)??!1);let m=c==null?void 0:c.taskId;if(m){let j=me=>{let de=this._responseHandlers.get(f);de?de(me):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,j),this._enqueueTaskMessage(m,{type:"request",message:h,timestamp:Date.now()}).catch(me=>{this._cleanupTimeout(f),p(me)})}else this._transport.send(h,{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(j=>{this._cleanupTimeout(f),p(j)})})}async getTask(e,n){return this.request({method:"tasks/get",params:e},yc,n)}async getTaskResult(e,n,r){return this.request({method:"tasks/result",params:e},n,r)}async listTasks(e,n){return this.request({method:"tasks/list",params:e},bc,n)}async cancelTask(e,n){return this.request({method:"tasks/cancel",params:e},Sv,n)}async notification(e,n){var a,c,l,p;if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let r=(a=n==null?void 0:n.relatedTask)==null?void 0:a.taskId;if(r){let d={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...((c=e.params)==null?void 0:c._meta)||{},[Ir]:n.relatedTask}}};await this._enqueueTaskMessage(r,{type:"notification",message:d,timestamp:Date.now()});return}if((((l=this._options)==null?void 0:l.debouncedNotificationMethods)??[]).includes(e.method)&&!e.params&&!(n!=null&&n.relatedRequestId)&&!(n!=null&&n.relatedTask)){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{var f,h;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let d={...e,jsonrpc:"2.0"};n!=null&&n.relatedTask&&(d={...d,params:{...d.params,_meta:{...((f=d.params)==null?void 0:f._meta)||{},[Ir]:n.relatedTask}}}),(h=this._transport)==null||h.send(d,n).catch(y=>this._onerror(y))});return}let s={...e,jsonrpc:"2.0"};n!=null&&n.relatedTask&&(s={...s,params:{...s.params,_meta:{...((p=s.params)==null?void 0:p._meta)||{},[Ir]:n.relatedTask}}}),await this._transport.send(s,n)}setRequestHandler(e,n){let r=Qd(e);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(o,i)=>{let s=ef(e,o);return Promise.resolve(n(s,i))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,n){let r=Qd(e);this._notificationHandlers.set(r,o=>{let i=ef(e,o);return Promise.resolve(n(i))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let n=this._taskProgressTokens.get(e);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,n,r){var i;if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let o=(i=this._options)==null?void 0:i.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,n,r,o)}async _clearTaskQueue(e,n){if(this._taskMessageQueue){let r=await this._taskMessageQueue.dequeueAll(e,n);for(let o of r)if(o.type==="request"&&Od(o.message)){let i=o.message.id,s=this._requestResolvers.get(i);s?(s(new te(se.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,n){var o,i;let r=((o=this._options)==null?void 0:o.defaultTaskPollInterval)??1e3;try{let s=await((i=this._taskStore)==null?void 0:i.getTask(e));s!=null&&s.pollInterval&&(r=s.pollInterval)}catch{}return new Promise((s,a)=>{if(n.aborted){a(new te(se.InvalidRequest,"Request cancelled"));return}let c=setTimeout(s,r);n.addEventListener("abort",()=>{clearTimeout(c),a(new te(se.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,n){let r=this._taskStore;if(!r)throw new Error("No task store configured");return{createTask:async o=>{if(!e)throw new Error("No request provided");return await r.createTask(o,e.id,{method:e.method,params:e.params},n)},getTask:async o=>{let i=await r.getTask(o,n);if(!i)throw new te(se.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(o,i,s)=>{await r.storeTaskResult(o,i,s,n);let a=await r.getTask(o,n);if(a){let c=Ss.parse({method:"notifications/tasks/status",params:a});await this.notification(c),Cr(a.status)&&this._cleanupTaskProgressHandler(o)}},getTaskResult:o=>r.getTaskResult(o,n),updateTaskStatus:async(o,i,s)=>{let a=await r.getTask(o,n);if(!a)throw new te(se.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(Cr(a.status))throw new te(se.InvalidParams,`Cannot update task "${o}" from terminal status "${a.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await r.updateTaskStatus(o,i,s,n);let c=await r.getTask(o,n);if(c){let l=Ss.parse({method:"notifications/tasks/status",params:c});await this.notification(l),Cr(c.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>r.listTasks(o,n)}}};function lb(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function ub(t,e){let n={...t};for(let r in e){let o=r,i=e[o];if(i===void 0)continue;let s=n[o];lb(s)&&lb(i)?n[o]={...s,...i}:n[o]=i}return n}var t0=Ee(Um(),1),n0=Ee(e0(),1);function ZL(){let t=new t0.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,n0.default)(t),t}var hl=class{constructor(e){this._ajv=e??ZL()}getValidator(e){let n="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return r=>n(r)?{valid:!0,data:r,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(n.errors)}}};var gl=class{constructor(e){this._server=e}requestStream(e,n,r){return this._server.requestStream(e,n,r)}createMessageStream(e,n){var o;let r=this._server.getClientCapabilities();if((e.tools||e.toolChoice)&&!((o=r==null?void 0:r.sampling)!=null&&o.tools))throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages[e.messages.length-1],s=Array.isArray(i.content)?i.content:[i.content],a=s.some(d=>d.type==="tool_result"),c=e.messages.length>1?e.messages[e.messages.length-2]:void 0,l=c?Array.isArray(c.content)?c.content:[c.content]:[],p=l.some(d=>d.type==="tool_use");if(a){if(s.some(d=>d.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!p)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(p){let d=new Set(l.filter(h=>h.type==="tool_use").map(h=>h.id)),f=new Set(s.filter(h=>h.type==="tool_result").map(h=>h.toolUseId));if(d.size!==f.size||![...d].every(h=>f.has(h)))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:e},Es,n)}elicitInputStream(e,n){var s,a;let r=this._server.getClientCapabilities(),o=e.mode??"form";switch(o){case"url":{if(!((s=r==null?void 0:r.elicitation)!=null&&s.url))throw new Error("Client does not support url elicitation.");break}case"form":{if(!((a=r==null?void 0:r.elicitation)!=null&&a.form))throw new Error("Client does not support form elicitation.");break}}let i=o==="form"&&e.mode===void 0?{...e,mode:"form"}:e;return this.requestStream({method:"elicitation/create",params:i},ui,n)}async getTask(e,n){return this._server.getTask({taskId:e},n)}async getTaskResult(e,n,r){return this._server.getTaskResult({taskId:e},n,r)}async listTasks(e,n){return this._server.listTasks(e?{cursor:e}:void 0,n)}async cancelTask(e,n){return this._server.cancelTask({taskId:e},n)}};function r0(t,e,n){var r;if(!t)throw new Error(`${n} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!((r=t.tools)!=null&&r.call))throw new Error(`${n} does not support task creation for tools/call (required for ${e})`);break;default:break}}function o0(t,e,n){var r,o;if(!t)throw new Error(`${n} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!((r=t.sampling)!=null&&r.createMessage))throw new Error(`${n} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!((o=t.elicitation)!=null&&o.create))throw new Error(`${n} does not support task creation for elicitation/create (required for ${e})`);break;default:break}}var yl=class extends zc{constructor(e,n){super(n),this._serverInfo=e,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Ts.options.map((r,o)=>[r,o])),this.isMessageIgnored=(r,o)=>{let i=this._loggingLevels.get(o);return i?this.LOG_LEVEL_SEVERITY.get(r)<this.LOG_LEVEL_SEVERITY.get(i):!1},this._capabilities=(n==null?void 0:n.capabilities)??{},this._instructions=n==null?void 0:n.instructions,this._jsonSchemaValidator=(n==null?void 0:n.jsonSchemaValidator)??new hl,this.setRequestHandler(jd,r=>this._oninitialize(r)),this.setNotificationHandler(Ld,()=>{var r;return(r=this.oninitialized)==null?void 0:r.call(this)}),this._capabilities.logging&&this.setRequestHandler(Bd,async(r,o)=>{var c;let i=o.sessionId||((c=o.requestInfo)==null?void 0:c.headers["mcp-session-id"])||void 0,{level:s}=r.params,a=Ts.safeParse(s);return a.success&&this._loggingLevels.set(i,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new gl(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=ub(this._capabilities,e)}setRequestHandler(e,n){var a;let r=Ar(e),o=r==null?void 0:r.method;if(!o)throw new Error("Schema is missing a method literal");let i;if(kn(o)){let c=o,l=(a=c._zod)==null?void 0:a.def;i=(l==null?void 0:l.value)??c.value}else{let c=o,l=c._def;i=(l==null?void 0:l.value)??c.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");if(i==="tools/call"){let c=async(l,p)=>{let d=Rr(li,l);if(!d.success){let v=d.error instanceof Error?d.error.message:String(d.error);throw new te(se.InvalidParams,`Invalid tools/call request: ${v}`)}let{params:f}=d.data,h=await Promise.resolve(n(l,p));if(f.task){let v=Rr(ai,h);if(!v.success){let x=v.error instanceof Error?v.error.message:String(v.error);throw new te(se.InvalidParams,`Invalid task creation result: ${x}`)}return v.data}let y=Rr(Rc,h);if(!y.success){let v=y.error instanceof Error?y.error.message:String(y.error);throw new te(se.InvalidParams,`Invalid tools/call result: ${v}`)}return y.data};return super.setRequestHandler(e,c)}return super.setRequestHandler(e,n)}assertCapabilityForMethod(e){var n,r,o;switch(e){case"sampling/createMessage":if(!((n=this._clientCapabilities)!=null&&n.sampling))throw new Error(`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!((r=this._clientCapabilities)!=null&&r.elicitation))throw new Error(`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!((o=this._clientCapabilities)!=null&&o.roots))throw new Error(`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){var n,r;switch(e){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${e})`);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 ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!((r=(n=this._clientCapabilities)==null?void 0:n.elicitation)!=null&&r.url))throw new Error(`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${e})`);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 ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${e})`);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 ${e})`);break;case"ping":case"initialize":break}}assertTaskCapability(e){var n,r;o0((r=(n=this._clientCapabilities)==null?void 0:n.tasks)==null?void 0:r.requests,e,"Client")}assertTaskHandlerCapability(e){var n;this._capabilities&&r0((n=this._capabilities.tasks)==null?void 0:n.requests,e,"Server")}async _oninitialize(e){let n=e.params.protocolVersion;return this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo,{protocolVersion:fv.includes(n)?n:Cd,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"},dc)}async createMessage(e,n){var r,o;if((e.tools||e.toolChoice)&&!((o=(r=this._clientCapabilities)==null?void 0:r.sampling)!=null&&o.tools))throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages[e.messages.length-1],s=Array.isArray(i.content)?i.content:[i.content],a=s.some(d=>d.type==="tool_result"),c=e.messages.length>1?e.messages[e.messages.length-2]:void 0,l=c?Array.isArray(c.content)?c.content:[c.content]:[],p=l.some(d=>d.type==="tool_use");if(a){if(s.some(d=>d.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!p)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(p){let d=new Set(l.filter(h=>h.type==="tool_use").map(h=>h.id)),f=new Set(s.filter(h=>h.type==="tool_result").map(h=>h.toolUseId));if(d.size!==f.size||![...d].every(h=>f.has(h)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return e.tools?this.request({method:"sampling/createMessage",params:e},Hd,n):this.request({method:"sampling/createMessage",params:e},Es,n)}async elicitInput(e,n){var o,i,s,a;switch(e.mode??"form"){case"url":{if(!((i=(o=this._clientCapabilities)==null?void 0:o.elicitation)!=null&&i.url))throw new Error("Client does not support url elicitation.");let c=e;return this.request({method:"elicitation/create",params:c},ui,n)}case"form":{if(!((a=(s=this._clientCapabilities)==null?void 0:s.elicitation)!=null&&a.form))throw new Error("Client does not support form elicitation.");let c=e.mode==="form"?e:{...e,mode:"form"},l=await this.request({method:"elicitation/create",params:c},ui,n);if(l.action==="accept"&&l.content&&c.requestedSchema)try{let d=this._jsonSchemaValidator.getValidator(c.requestedSchema)(l.content);if(!d.valid)throw new te(se.InvalidParams,`Elicitation response content does not match requested schema: ${d.errorMessage}`)}catch(p){throw p instanceof te?p:new te(se.InternalError,`Error validating elicitation response: ${p instanceof Error?p.message:String(p)}`)}return l}}}createElicitationCompletionNotifier(e,n){var r,o;if(!((o=(r=this._clientCapabilities)==null?void 0:r.elicitation)!=null&&o.url))throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},n)}async listRoots(e,n){return this.request({method:"roots/list",params:e},Vd,n)}async sendLoggingMessage(e,n){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,n))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}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 s0=Symbol.for("mcp.completable");function Km(t){return!!t&&typeof t=="object"&&s0 in t}function a0(t){let e=t[s0];return e==null?void 0:e.complete}var i0;(function(t){t.Completable="McpCompletable"})(i0||(i0={}));var BL=/^[A-Za-z0-9._-]{1,128}$/;function HL(t){let e=[];if(t.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(t.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${t.length})`]};if(t.includes(" ")&&e.push("Tool name contains spaces, which may cause parsing issues"),t.includes(",")&&e.push("Tool name contains commas, which may cause parsing issues"),(t.startsWith("-")||t.endsWith("-"))&&e.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(t.startsWith(".")||t.endsWith("."))&&e.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!BL.test(t)){let n=t.split("").filter(r=>!/[A-Za-z0-9._-]/.test(r)).filter((r,o,i)=>i.indexOf(r)===o);return e.push(`Tool name contains invalid characters: ${n.map(r=>`"${r}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:e}}return{isValid:!0,warnings:e}}function VL(t,e){if(e.length>0){console.warn(`Tool name validation warning for "${t}":`);for(let n of e)console.warn(` - ${n}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function Jm(t){let e=HL(t);return VL(t,e.warnings),e.isValid}var xl=class{constructor(e){this._mcpServer=e}registerToolTask(e,n,r){let o={taskSupport:"required",...n.execution};if(o.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${e}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(e,n.title,n.description,n.inputSchema,n.outputSchema,n.annotations,o,n._meta,r)}};var vl=class{constructor(e,n){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new yl(e,n)}get experimental(){return this._experimental||(this._experimental={tasks:new xl(this)}),this._experimental}async connect(e){return await this.server.connect(e)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(Fr($c)),this.server.assertCanSetRequestHandler(Fr(li)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler($c,()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,n])=>{let r={name:e,title:n.title,description:n.description,inputSchema:(()=>{let o=ii(n.inputSchema);return o?Xd(o,{strictUnions:!0,pipeStrategy:"input"}):GL})(),annotations:n.annotations,execution:n.execution,_meta:n._meta};if(n.outputSchema){let o=ii(n.outputSchema);o&&(r.outputSchema=Xd(o,{strictUnions:!0,pipeStrategy:"output"}))}return r})})),this.server.setRequestHandler(li,async(e,n)=>{var r;try{let o=this._registeredTools[e.params.name];if(!o)throw new te(se.InvalidParams,`Tool ${e.params.name} not found`);if(!o.enabled)throw new te(se.InvalidParams,`Tool ${e.params.name} disabled`);let i=!!e.params.task,s=(r=o.execution)==null?void 0:r.taskSupport,a="createTask"in o.handler;if((s==="required"||s==="optional")&&!a)throw new te(se.InternalError,`Tool ${e.params.name} has taskSupport '${s}' but was not registered with registerToolTask`);if(s==="required"&&!i)throw new te(se.MethodNotFound,`Tool ${e.params.name} requires task augmentation (taskSupport: 'required')`);if(s==="optional"&&!i&&a)return await this.handleAutomaticTaskPolling(o,e,n);let c=await this.validateToolInput(o,e.params.arguments,e.params.name),l=await this.executeToolHandler(o,c,n);return i||await this.validateToolOutput(o,l,e.params.name),l}catch(o){if(o instanceof te&&o.code===se.UrlElicitationRequired)throw o;return this.createToolError(o instanceof Error?o.message:String(o))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,n,r){if(!e.inputSchema)return;let i=ii(e.inputSchema)??e.inputSchema,s=await oc(i,n);if(!s.success){let a="error"in s?s.error:"Unknown error",c=ic(a);throw new te(se.InvalidParams,`Input validation error: Invalid arguments for tool ${r}: ${c}`)}return s.data}async validateToolOutput(e,n,r){if(!e.outputSchema||!("content"in n)||n.isError)return;if(!n.structuredContent)throw new te(se.InvalidParams,`Output validation error: Tool ${r} has an output schema but no structured content was provided`);let o=ii(e.outputSchema),i=await oc(o,n.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",a=ic(s);throw new te(se.InvalidParams,`Output validation error: Invalid structured content for tool ${r}: ${a}`)}}async executeToolHandler(e,n,r){let o=e.handler;if("createTask"in o){if(!r.taskStore)throw new Error("No task store provided.");let s={...r,taskStore:r.taskStore};if(e.inputSchema){let a=o;return await Promise.resolve(a.createTask(n,s))}else{let a=o;return await Promise.resolve(a.createTask(s))}}if(e.inputSchema){let s=o;return await Promise.resolve(s(n,r))}else{let s=o;return await Promise.resolve(s(r))}}async handleAutomaticTaskPolling(e,n,r){if(!r.taskStore)throw new Error("No task store provided for task-capable tool.");let o=await this.validateToolInput(e,n.params.arguments,n.params.name),i=e.handler,s={...r,taskStore:r.taskStore},a=o?await Promise.resolve(i.createTask(o,s)):await Promise.resolve(i.createTask(s)),c=a.task.taskId,l=a.task,p=l.pollInterval??5e3;for(;l.status!=="completed"&&l.status!=="failed"&&l.status!=="cancelled";){await new Promise(f=>setTimeout(f,p));let d=await r.taskStore.getTask(c);if(!d)throw new te(se.InternalError,`Task ${c} not found during polling`);l=d}return await r.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(Fr(Ac)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(Ac,async e=>{switch(e.params.ref.type){case"ref/prompt":return Av(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return Iv(e),this.handleResourceCompletion(e,e.params.ref);default:throw new te(se.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,n){let r=this._registeredPrompts[n.name];if(!r)throw new te(se.InvalidParams,`Prompt ${n.name} not found`);if(!r.enabled)throw new te(se.InvalidParams,`Prompt ${n.name} disabled`);if(!r.argsSchema)return ra;let o=Ar(r.argsSchema),i=o==null?void 0:o[e.params.argument.name];if(!Km(i))return ra;let s=a0(i);if(!s)return ra;let a=await s(e.params.argument.value,e.params.context);return l0(a)}async handleResourceCompletion(e,n){let r=Object.values(this._registeredResourceTemplates).find(s=>s.resourceTemplate.uriTemplate.toString()===n.uri);if(!r){if(this._registeredResources[n.uri])return ra;throw new te(se.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let o=r.resourceTemplate.completeCallback(e.params.argument.name);if(!o)return ra;let i=await o(e.params.argument.value,e.params.context);return l0(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(Fr(wc)),this.server.assertCanSetRequestHandler(Fr(Sc)),this.server.assertCanSetRequestHandler(Fr(kc)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(wc,async(e,n)=>{let r=Object.entries(this._registeredResources).filter(([i,s])=>s.enabled).map(([i,s])=>({uri:i,name:s.name,...s.metadata})),o=[];for(let i of Object.values(this._registeredResourceTemplates)){if(!i.resourceTemplate.listCallback)continue;let s=await i.resourceTemplate.listCallback(n);for(let a of s.resources)o.push({...i.metadata,...a})}return{resources:[...r,...o]}}),this.server.setRequestHandler(Sc,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([n,r])=>({name:n,uriTemplate:r.resourceTemplate.uriTemplate.toString(),...r.metadata}))})),this.server.setRequestHandler(kc,async(e,n)=>{let r=new URL(e.params.uri),o=this._registeredResources[r.toString()];if(o){if(!o.enabled)throw new te(se.InvalidParams,`Resource ${r} disabled`);return o.readCallback(r,n)}for(let i of Object.values(this._registeredResourceTemplates)){let s=i.resourceTemplate.uriTemplate.match(r.toString());if(s)return i.readCallback(r,s,n)}throw new te(se.InvalidParams,`Resource ${r} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(Fr(Tc)),this.server.assertCanSetRequestHandler(Fr(Ec)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(Tc,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,n])=>({name:e,title:n.title,description:n.description,arguments:n.argsSchema?WL(n.argsSchema):void 0}))})),this.server.setRequestHandler(Ec,async(e,n)=>{let r=this._registeredPrompts[e.params.name];if(!r)throw new te(se.InvalidParams,`Prompt ${e.params.name} not found`);if(!r.enabled)throw new te(se.InvalidParams,`Prompt ${e.params.name} disabled`);if(r.argsSchema){let o=ii(r.argsSchema),i=await oc(o,e.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",l=ic(c);throw new te(se.InvalidParams,`Invalid arguments for prompt ${e.params.name}: ${l}`)}let s=i.data,a=r.callback;return await Promise.resolve(a(s,n))}else{let o=r.callback;return await Promise.resolve(o(n))}}),this._promptHandlersInitialized=!0)}resource(e,n,...r){let o;typeof r[0]=="object"&&(o=r.shift());let i=r[0];if(typeof n=="string"){if(this._registeredResources[n])throw new Error(`Resource ${n} is already registered`);let s=this._createRegisteredResource(e,void 0,n,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let s=this._createRegisteredResourceTemplate(e,void 0,n,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}registerResource(e,n,r,o){if(typeof n=="string"){if(this._registeredResources[n])throw new Error(`Resource ${n} is already registered`);let i=this._createRegisteredResource(e,r.title,n,r,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let i=this._createRegisteredResourceTemplate(e,r.title,n,r,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}}_createRegisteredResource(e,n,r,o,i){let s={name:e,title:n,metadata:o,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({uri:null}),update:a=>{typeof a.uri<"u"&&a.uri!==r&&(delete this._registeredResources[r],a.uri&&(this._registeredResources[a.uri]=s)),typeof a.name<"u"&&(s.name=a.name),typeof a.title<"u"&&(s.title=a.title),typeof a.metadata<"u"&&(s.metadata=a.metadata),typeof a.callback<"u"&&(s.readCallback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendResourceListChanged()}};return this._registeredResources[r]=s,s}_createRegisteredResourceTemplate(e,n,r,o,i){let s={resourceTemplate:r,title:n,metadata:o,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:l=>{typeof l.name<"u"&&l.name!==e&&(delete this._registeredResourceTemplates[e],l.name&&(this._registeredResourceTemplates[l.name]=s)),typeof l.title<"u"&&(s.title=l.title),typeof l.template<"u"&&(s.resourceTemplate=l.template),typeof l.metadata<"u"&&(s.metadata=l.metadata),typeof l.callback<"u"&&(s.readCallback=l.callback),typeof l.enabled<"u"&&(s.enabled=l.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=s;let a=r.uriTemplate.variableNames;return Array.isArray(a)&&a.some(l=>!!r.completeCallback(l))&&this.setCompletionRequestHandler(),s}_createRegisteredPrompt(e,n,r,o,i){let s={title:n,description:r,argsSchema:o===void 0?void 0:wo(o),callback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:a=>{typeof a.name<"u"&&a.name!==e&&(delete this._registeredPrompts[e],a.name&&(this._registeredPrompts[a.name]=s)),typeof a.title<"u"&&(s.title=a.title),typeof a.description<"u"&&(s.description=a.description),typeof a.argsSchema<"u"&&(s.argsSchema=wo(a.argsSchema)),typeof a.callback<"u"&&(s.callback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[e]=s,o&&Object.values(o).some(c=>{var p;let l=c instanceof on?(p=c._def)==null?void 0:p.innerType:c;return Km(l)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(e,n,r,o,i,s,a,c,l){Jm(e);let p={title:n,description:r,inputSchema:c0(o),outputSchema:c0(i),annotations:s,execution:a,_meta:c,handler:l,enabled:!0,disable:()=>p.update({enabled:!1}),enable:()=>p.update({enabled:!0}),remove:()=>p.update({name:null}),update:d=>{typeof d.name<"u"&&d.name!==e&&(typeof d.name=="string"&&Jm(d.name),delete this._registeredTools[e],d.name&&(this._registeredTools[d.name]=p)),typeof d.title<"u"&&(p.title=d.title),typeof d.description<"u"&&(p.description=d.description),typeof d.paramsSchema<"u"&&(p.inputSchema=wo(d.paramsSchema)),typeof d.outputSchema<"u"&&(p.outputSchema=wo(d.outputSchema)),typeof d.callback<"u"&&(p.handler=d.callback),typeof d.annotations<"u"&&(p.annotations=d.annotations),typeof d._meta<"u"&&(p._meta=d._meta),typeof d.enabled<"u"&&(p.enabled=d.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=p,this.setToolRequestHandlers(),this.sendToolListChanged(),p}tool(e,...n){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let r,o,i,s;if(typeof n[0]=="string"&&(r=n.shift()),n.length>1){let c=n[0];if(Ym(c))o=n.shift(),n.length>1&&typeof n[0]=="object"&&n[0]!==null&&!Ym(n[0])&&(s=n.shift());else if(typeof c=="object"&&c!==null){if(Object.values(c).some(l=>typeof l=="object"&&l!==null))throw new Error(`Tool ${e} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);s=n.shift()}}let a=n[0];return this._createRegisteredTool(e,void 0,r,o,i,s,{taskSupport:"forbidden"},void 0,a)}registerTool(e,n,r){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:o,description:i,inputSchema:s,outputSchema:a,annotations:c,_meta:l}=n;return this._createRegisteredTool(e,o,i,s,a,c,{taskSupport:"forbidden"},l,r)}prompt(e,...n){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let r;typeof n[0]=="string"&&(r=n.shift());let o;n.length>1&&(o=n.shift());let i=n[0],s=this._createRegisteredPrompt(e,void 0,r,o,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}registerPrompt(e,n,r){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:o,description:i,argsSchema:s}=n,a=this._createRegisteredPrompt(e,o,i,s,r);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(e,n){return this.server.sendLoggingMessage(e,n)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};var GL={type:"object",properties:{}};function u0(t){return t!==null&&typeof t=="object"&&"parse"in t&&typeof t.parse=="function"&&"safeParse"in t&&typeof t.safeParse=="function"}function p0(t){return"_def"in t||"_zod"in t||u0(t)}function Ym(t){return typeof t!="object"||t===null||p0(t)?!1:Object.keys(t).length===0?!0:Object.values(t).some(u0)}function c0(t){if(t){if(Ym(t))return wo(t);if(!p0(t))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return t}}function WL(t){let e=Ar(t);return e?Object.entries(e).map(([n,r])=>{let o=Zx(r),i=Bx(r);return{name:n,description:o,required:!i}}):[]}function Fr(t){let e=Ar(t),n=e==null?void 0:e.method;if(!n)throw new Error("Schema is missing a method literal");let r=sc(n);if(typeof r=="string")return r;throw new Error("Schema method literal must be a string")}function l0(t){return{completion:{values:t.slice(0,100),total:t.length,hasMore:t.length>100}}}var ra={completion:{values:[],hasMore:!1}};var Xm=Ee(require("node:process"),1);var bl=class{append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
|
|
53
|
-
`);if(e===-1)return null;let n=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),
|
|
54
|
-
`}var
|
|
55
|
-
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||e[n]&&
|
|
56
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){let r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){let r=(this[T0]=this[T0]={accessors:{}}).accessors,o=this.prototype;function i(s){let a=ca(s);r[a]||(WD(o,s),r[a]=!0)}return _.isArray(e)?e.forEach(i):i(e),this}};zi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_.reduceDescriptors(zi.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});_.freezeMethods(zi);var rt=zi;var KD="[REDACTED ****]";function JD(t){if(_.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(_.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function YD(t,e){let n=new Set(e.map(i=>String(i).toLowerCase())),r=[],o=i=>{if(i===null||typeof i!="object"||_.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof rt&&(i=i.toJSON()),r.push(i);let s;if(_.isArray(i))s=[],i.forEach((a,c)=>{let l=o(a);_.isUndefined(l)||(s[c]=l)});else{if(!_.isPlainObject(i)&&JD(i))return r.pop(),i;s=Object.create(null);for(let[a,c]of Object.entries(i)){let l=n.has(a.toLowerCase())?KD:o(c);_.isUndefined(l)||(s[a]=l)}}return r.pop(),s};return o(t)}var Ut=class t extends Error{static from(e,n,r,o,i,s){let a=new t(e.message,n||e.code,r,o,i);return Object.defineProperty(a,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),a.name=e.name,e.status!=null&&a.status==null&&(a.status=e.status),s&&Object.assign(a,s),a}constructor(e,n,r,o,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,n=e&&_.hasOwnProp(e,"redact")?e.redact:void 0,r=_.isArray(n)&&n.length>0?YD(e,n):_.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Ut.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Ut.ERR_BAD_OPTION="ERR_BAD_OPTION";Ut.ECONNABORTED="ECONNABORTED";Ut.ETIMEDOUT="ETIMEDOUT";Ut.ECONNREFUSED="ECONNREFUSED";Ut.ERR_NETWORK="ERR_NETWORK";Ut.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Ut.ERR_DEPRECATED="ERR_DEPRECATED";Ut.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Ut.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Ut.ERR_CANCELED="ERR_CANCELED";Ut.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Ut.ERR_INVALID_URL="ERR_INVALID_URL";Ut.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var P=Ut;var Ik=Ee(Ak(),1),jl=Ik.default;var kh=100;function Sh(t){return _.isPlainObject(t)||_.isArray(t)}function Ck(t){return _.endsWith(t,"[]")?t.slice(0,-2):t}function wh(t,e,n){return t?t.concat(e).map(function(o,i){return o=Ck(o),!n&&i?"["+o+"]":o}).join(n?".":""):e}function j2(t){return _.isArray(t)&&!t.some(Sh)}var L2=_.toFlatObject(_,{},null,function(e){return/^is[A-Z]/.test(e)});function D2(t,e,n){if(!_.isObject(t))throw new TypeError("target must be an object");e=e||new(jl||FormData),n=_.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,w){return!_.isUndefined(w[b])});let r=n.metaTokens,o=n.visitor||y,i=n.dots,s=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?kh:n.maxDepth,l=a&&_.isSpecCompliantForm(e),p=[];if(!_.isFunction(o))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(_.isDate(m))return m.toISOString();if(_.isBoolean(m))return m.toString();if(!l&&_.isBlob(m))throw new P("Blob is not supported. Use a Buffer instead.");if(_.isArrayBuffer(m)||_.isTypedArray(m)){if(l&&typeof a=="function")return new a([m]);if(typeof Buffer<"u")return Buffer.from(m);throw new P("Blob is not supported. Use a Buffer instead.",P.ERR_NOT_SUPPORT)}return m}function f(m){if(m>c)throw new P("Object is too deeply nested ("+m+" levels). Max depth: "+c,P.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(m,b){if(c===1/0)return JSON.stringify(m);let w=[];return JSON.stringify(m,function(E,F){if(!_.isObject(F))return F;for(;w.length&&w[w.length-1]!==this;)w.pop();return w.push(F),f(b+w.length-1),F})}function y(m,b,w){let k=m;if(_.isReactNative(e)&&_.isReactNativeBlob(m))return e.append(wh(w,b,i),d(m)),!1;if(m&&!w&&typeof m=="object"){if(_.endsWith(b,"{}"))b=r?b:b.slice(0,-2),m=h(m,1);else if(_.isArray(m)&&j2(m)||(_.isFileList(m)||_.endsWith(b,"[]"))&&(k=_.toArray(m)))return b=Ck(b),k.forEach(function(F,j){!(_.isUndefined(F)||F===null)&&e.append(s===!0?wh([b],j,i):s===null?b:b+"[]",d(F))}),!1}return Sh(m)?!0:(e.append(wh(w,b,i),d(m)),!1)}let v=Object.assign(L2,{defaultVisitor:y,convertValue:d,isVisitable:Sh});function x(m,b,w=0){if(!_.isUndefined(m)){if(f(w),p.indexOf(m)!==-1)throw new Error("Circular reference detected in "+b.join("."));p.push(m),_.forEach(m,function(E,F){(!(_.isUndefined(E)||E===null)&&o.call(e,E,_.isString(F)?F.trim():F,b,v))===!0&&x(E,b?b.concat(F):[F],w+1)}),p.pop()}}if(!_.isObject(t))throw new TypeError("data must be an object");return x(t),e}var qr=D2;function Pk(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(r){return e[r]})}function Ok(t,e){this._pairs=[],t&&qr(t,this,e)}var zk=Ok.prototype;zk.append=function(e,n){this._pairs.push([e,n])};zk.toString=function(e){let n=e?r=>e.call(this,r,Pk):Pk;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};var Nk=Ok;function M2(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Lo(t,e,n){if(!e)return t;t=t||"";let r=_.isFunction(n)?{serialize:n}:n,o=_.getSafeProp(r,"encode")||M2,i=_.getSafeProp(r,"serialize"),s;if(i?s=i(e,r):s=_.isURLSearchParams(e)?e.toString():new Nk(e,r).toString(o),s){let a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}var Th=class{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){_.forEach(this.handlers,function(r){r!==null&&e(r)})}},Eh=Th;var Zr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};var Mk=Ee(require("crypto"),1);var jk=Ee(require("url"),1),Lk=jk.default.URLSearchParams;var $h="abcdefghijklmnopqrstuvwxyz",Dk="0123456789",Fk={DIGIT:Dk,ALPHA:$h,ALPHA_DIGIT:$h+$h.toUpperCase()+Dk},F2=(t=16,e=Fk.ALPHA_DIGIT)=>{let n="",{length:r}=e,o=new Uint32Array(t);Mk.default.randomFillSync(o);for(let i=0;i<t;i++)n+=e[o[i]%r];return n},Uk={isNode:!0,classes:{URLSearchParams:Lk,FormData:jl,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Fk,generateString:F2,protocols:["http","https","file","data"]};var Ih={};za(Ih,{hasBrowserEnv:()=>Ah,hasStandardBrowserEnv:()=>U2,hasStandardBrowserWebWorkerEnv:()=>q2,navigator:()=>Rh,origin:()=>Z2});var Ah=typeof window<"u"&&typeof document<"u",Rh=typeof navigator=="object"&&navigator||void 0,U2=Ah&&(!Rh||["ReactNative","NativeScript","NS"].indexOf(Rh.product)<0),q2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Z2=Ah&&window.location.href||"http://localhost";var Be={...Ih,...Uk};function Ch(t,e){return qr(t,new Be.classes.URLSearchParams,{visitor:function(n,r,o,i){return Be.isNode&&_.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}var qk=kh;function Zk(t){if(t>qk)throw new P("FormData field is too deeply nested ("+t+" levels). Max depth: "+qk,P.ERR_FORM_DATA_DEPTH_EXCEEDED)}function B2(t){let e=[],n=/\w+|\[(\w*)]/g,r;for(;(r=n.exec(t))!==null;)Zk(e.length),e.push(r[0]==="[]"?"":r[1]||r[0]);return e}function H2(t){let e={},n=Object.keys(t),r,o=n.length,i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}function V2(t){function e(n,r,o,i){Zk(i);let s=n[i++];if(s==="__proto__")return!0;let a=Number.isFinite(+s),c=i>=n.length;return s=!s&&_.isArray(o)?o.length:s,c?(_.hasOwnProp(o,s)?o[s]=_.isArray(o[s])?o[s].concat(r):[o[s],r]:o[s]=r,!a):((!_.hasOwnProp(o,s)||!_.isObject(o[s]))&&(o[s]=[]),e(n,r,o[s],i)&&_.isArray(o[s])&&(o[s]=H2(o[s])),!a)}if(_.isFormData(t)&&_.isFunction(t.entries)){let n={};return _.forEachEntry(t,(r,o)=>{e(B2(r),o,n,0)}),n}return null}var Ll=V2;var Mi=(t,e)=>t!=null&&_.hasOwnProp(t,e)?t[e]:void 0;function G2(t,e,n){if(_.isString(t))try{return(e||JSON.parse)(t),_.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}var Ph={transitional:Zr,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){let r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=_.isObject(e);if(i&&_.isHTMLForm(e)&&(e=new FormData(e)),_.isFormData(e))return o?JSON.stringify(Ll(e)):e;if(_.isArrayBuffer(e)||_.isBuffer(e)||_.isStream(e)||_.isFile(e)||_.isBlob(e)||_.isReadableStream(e))return e;if(_.isArrayBufferView(e))return e.buffer;if(_.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){let c=Mi(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ch(e,c).toString();if((a=_.isFileList(e))||r.indexOf("multipart/form-data")>-1){let l=Mi(this,"env"),p=l&&l.FormData;return qr(a?{"files[]":e}:e,p&&new p,c)}}return i||o?(n.setContentType("application/json",!1),G2(e)):e}],transformResponse:[function(e){let n=Mi(this,"transitional")||Ph.transitional,r=n&&n.forcedJSONParsing,o=Mi(this,"responseType"),i=o==="json";if(_.isResponse(e)||_.isReadableStream(e))return e;if(e&&_.isString(e)&&(r&&!o||i)){let a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e,Mi(this,"parseReviver"))}catch(c){if(a)throw c.name==="SyntaxError"?P.from(c,P.ERR_BAD_RESPONSE,this,null,Mi(this,"response")):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Be.classes.FormData,Blob:Be.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_.forEach(["delete","get","head","post","put","patch","query"],t=>{Ph.headers[t]={}});var Fi=Ph;function fa(t,e){let n=this||Fi,r=e||n,o=rt.from(r.headers),i=r.data;return _.forEach(t,function(a){i=a.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function ma(t){return!!(t&&t.__CANCEL__)}var Oh=class extends P{constructor(e,n,r){super(e??"canceled",P.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}},vn=Oh;function nr(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new P("Request failed with status code "+n.status,n.status>=400&&n.status<500?P.ERR_BAD_REQUEST:P.ERR_BAD_RESPONSE,n.config,n.request,n))}function zh(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Nh(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}var W2=/^https?:(?!\/\/)/i,K2=/[\t\n\r]/g;function J2(t){let e=0;for(;e<t.length&&t.charCodeAt(e)<=32;)e++;return t.slice(e)}function Y2(t){return J2(t).replace(K2,"")}function Bk(t,e){if(typeof t=="string"&&W2.test(Y2(t)))throw new P('Invalid URL: missing "//" after protocol',P.ERR_INVALID_URL,e)}function Do(t,e,n,r){Bk(e,r);let o=!zh(e);return t&&(o||n===!1)?(Bk(t,r),Nh(t,e)):e}var X2={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function Q2(t){try{return new URL(t)}catch{return null}}function Hk(t){var e=(typeof t=="string"?Q2(t):t)||{},n=e.protocol,r=e.host,o=e.port;if(typeof r!="string"||!r||typeof n!="string"||(n=n.split(":",1)[0],r=r.replace(/:\d*$/,""),o=parseInt(o)||X2[n]||0,!eF(r,o)))return"";var i=jh(n+"_proxy")||jh("all_proxy");return i&&i.indexOf("://")===-1&&(i=n+"://"+i),i}function eF(t,e){var n=jh("no_proxy").toLowerCase();return n?n==="*"?!1:n.split(/[,\s]/).every(function(r){if(!r)return!0;var o=r.match(/^(.+):(\d+)$/),i=o?o[1]:r,s=o?parseInt(o[2]):0;return s&&s!==e?!0:/^[.*]/.test(i)?(i.charAt(0)==="*"&&(i=i.slice(1)),!t.endsWith(i)):t!==i}):!0}function jh(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}var gg=Ee(dT(),1),yg=Ee(require("http"),1),xg=Ee(require("https"),1),BT=Ee(require("http2"),1),HT=Ee(require("util"),1),hg=require("path"),VT=Ee(vT(),1),bn=Ee(require("zlib"),1);var xr="1.18.1";function Sa(t){let e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}var nU=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function sg(t,e,n){let r=n&&n.Blob||Be.classes.Blob,o=Sa(t);if(e===void 0&&r&&(e=!0),o==="data"){t=o.length?t.slice(o.length+1):t;let i=nU.exec(t);if(!i)throw new P("Invalid URL",P.ERR_INVALID_URL);let s=i[1],a=i[2],c=i[3]?"base64":"utf8",l=i[4],p="";s?p=a?s+a:s:a&&(p="text/plain"+a);let d=c==="base64"?Buffer.from(l,"base64"):Buffer.from(decodeURIComponent(l),c);if(e){if(!r)throw new P("Blob is not supported",P.ERR_NOT_SUPPORT);return new r([d],{type:p})}return d}throw new P("Unsupported protocol "+o,P.ERR_NOT_SUPPORT)}var Pn=Ee(require("stream"),1);var bT=Ee(require("stream"),1);var ag=Symbol("internals"),cg=class extends bT.default.Transform{constructor(e){e=_.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(r,o)=>!_.isUndefined(o[r])),super({readableHighWaterMark:e.chunkSize});let n=this[ag]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",r=>{r==="progress"&&(n.isCaptured||(n.isCaptured=!0))})}_read(e){let n=this[ag];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let o=this[ag],i=o.maxRate,s=this.readableHighWaterMark,a=o.timeWindow,c=1e3/a,l=i/c,p=o.minChunkSize!==!1?Math.max(o.minChunkSize,l*.01):0,d=(h,y)=>{let v=Buffer.byteLength(h);o.bytesSeen+=v,o.bytes+=v,o.isCaptured&&this.emit("progress",o.bytesSeen),this.push(h)?process.nextTick(y):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(y)}},f=(h,y)=>{let v=Buffer.byteLength(h),x=null,m=s,b,w=0;if(i){let k=Date.now();(!o.ts||(w=k-o.ts)>=a)&&(o.ts=k,b=l-o.bytes,o.bytes=b<0?-b:0,w=0),b=l-o.bytes}if(i){if(b<=0)return setTimeout(()=>{y(null,h)},a-w);b<m&&(m=b)}m&&v>m&&v-m>p&&(x=h.subarray(m),h=h.subarray(0,m)),d(h,x?()=>{process.nextTick(y,null,x)}:y)};f(e,function h(y,v){if(y)return r(y);v?f(v,h):r(null)})}},lg=cg;var GT=require("events");var wT=Ee(require("util"),1),ST=require("stream");var{asyncIterator:_T}=Symbol,rU=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[_T]?yield*t[_T]():yield t},Zl=rU;var oU=Be.ALPHABET.ALPHA_DIGIT+"-_",ka=typeof TextEncoder=="function"?new TextEncoder:new wT.default.TextEncoder,Bo=`\r
|
|
57
|
-
`,iU=ka.encode(Bo),sU=2,ug=class{constructor(e,n){let{escapeName:r}=this.constructor,o=_.isString(n),i=`Content-Disposition: form-data; name="${r(e)}"${!o&&n.name?`; filename="${r(n.name)}"`:""}${Bo}`;if(o)n=ka.encode(String(n).replace(/\r?\n|\r\n?/g,Bo));else{let s=String(n.type||"application/octet-stream").replace(/[\r\n]/g,"");i+=`Content-Type: ${s}${Bo}`}this.headers=ka.encode(i+Bo),this.contentLength=o?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+sU,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;_.isTypedArray(e)?yield e:yield*Zl(e),yield iU}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},aU=(t,e,n)=>{let{tag:r="form-data-boundary",size:o=25,boundary:i=r+"-"+Be.generateString(o,oU)}=n||{};if(!_.isFormData(t))throw new TypeError("FormData instance required");if(i.length<1||i.length>70)throw new Error("boundary must be 1-70 characters long");let s=ka.encode("--"+i+Bo),a=ka.encode("--"+i+"--"+Bo),c=a.byteLength,l=Array.from(t.entries()).map(([d,f])=>{let h=new ug(d,f);return c+=h.size,h});c+=s.byteLength*l.length,c=_.toFiniteNumber(c);let p={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(c)&&(p["Content-Length"]=c),e&&e(p),ST.Readable.from((async function*(){for(let d of l)yield s,yield*d.encode();yield a})())},kT=aU;var TT=Ee(require("stream"),1),pg=class extends TT.default.Transform{__transform(e,n,r){this.push(e),r()}_transform(e,n,r){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let o=Buffer.alloc(2);o[0]=120,o[1]=156,this.push(o,n)}this.__transform(e,n,r)}},ET=pg;var $T=Ee(require("http2"),1),RT=Ee(require("util"),1),dg=class{constructor(){this.sessions=Object.create(null)}getSession(e,n){n=Object.assign({sessionTimeout:1e3},n);let r=this.sessions[e];if(r){let d=r.length;for(let f=0;f<d;f++){let[h,y]=r[f];if(!h.destroyed&&!h.closed&&RT.default.isDeepStrictEqual(y,n))return h}}let o=$T.default.connect(e,n),i,s,a=()=>{if(i)return;i=!0,s&&(clearTimeout(s),s=null);let d=r,f=d.length,h=f;for(;h--;)if(d[h][0]===o){f===1?delete this.sessions[e]:d.splice(h,1),o.closed||o.close();return}},c=o.request,{sessionTimeout:l}=n;if(l!=null){let d=0;o.request=function(){let f=c.apply(this,arguments);return d++,s&&(clearTimeout(s),s=null),f.once("close",()=>{--d||(s=setTimeout(()=>{s=null,a()},l))}),f}}o.once("close",a);let p=[o,n];return r?r.push(p):r=this.sessions[e]=[p],o}},AT=dg;var cU=(t,e)=>_.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(o=>{try{e?r(null,...e(o)):r(null,o)}catch(i){r(i)}},r)}:t,IT=cU;var lU=new Set(["localhost","0.0.0.0"]),OT=t=>{let e=t.split(".");return e.length!==4||e[0]!=="127"?!1:e.every(n=>/^\d+$/.test(n)&&Number(n)>=0&&Number(n)<=255)},fg=t=>/^0{1,4}$/.test(t),uU=t=>{if(t==="::")return!0;let e=t.indexOf("::");if(e!==-1){if(e!==t.lastIndexOf("::"))return!1;let r=t.slice(0,e),o=t.slice(e+2),i=r?r.split(":"):[],s=o?o.split(":"):[];return i.length+s.length<8&&i.every(fg)&&s.every(fg)}let n=t.split(":");return n.length===8&&n.every(fg)},pU=t=>{if(t==="::1")return!0;let e=t.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(e)return OT(e[1]);let n=t.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(n){let o=parseInt(n[1],16);return o>=32512&&o<=32767}let r=t.split(":");if(r.length===8){for(let o=0;o<7;o++)if(!/^0+$/.test(r[o]))return!1;return/^0*1$/.test(r[7])}return!1},CT=t=>t?lU.has(t)||OT(t)||uU(t)?!0:pU(t):!1,dU={http:80,https:443,ws:80,wss:443,ftp:21},fU=t=>{let e=t,n=0;if(e.charAt(0)==="["){let i=e.indexOf("]");if(i!==-1){let s=e.slice(1,i),a=e.slice(i+1);return a.charAt(0)===":"&&/^\d+$/.test(a.slice(1))&&(n=Number.parseInt(a.slice(1),10)),[s,n]}}let r=e.indexOf(":"),o=e.lastIndexOf(":");return r!==-1&&r===o&&/^\d+$/.test(e.slice(o+1))&&(n=Number.parseInt(e.slice(o+1),10),e=e.slice(0,o)),[e,n]},mU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,hU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,gU=t=>{if(typeof t!="string"||t.indexOf(":")===-1)return t;let e=t.match(mU);if(e)return e[1];let n=t.match(hU);if(n){let r=parseInt(n[1],16),o=parseInt(n[2],16);return`${r>>8}.${r&255}.${o>>8}.${o&255}`}return t},PT=t=>t&&(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),gU(t.replace(/\.+$/,"")));function mg(t){let e;try{e=new URL(t)}catch{return!1}let n=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!n)return!1;if(n==="*")return!0;let r=Number.parseInt(e.port,10)||dU[e.protocol.split(":",1)[0]]||0,o=PT(e.hostname.toLowerCase());return n.split(/[\s,]+/).some(i=>{if(!i)return!1;let[s,a]=fU(i);return s=PT(s),!s||a&&a!==r?!1:(s.charAt(0)==="*"&&(s=s.slice(1)),s.charAt(0)==="."?o.endsWith(s):o===s||CT(o)&&CT(s))})}function yU(t,e){t=t||10;let n=new Array(t),r=new Array(t),o=0,i=0,s;return e=e!==void 0?e:1e3,function(c){let l=Date.now(),p=r[i];s||(s=l),n[o]=c,r[o]=l;let d=i,f=0;for(;d!==o;)f+=n[d++],d=d%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),l-s<e)return;let h=p&&l-p;return h?Math.round(f*1e3/h):void 0}}var zT=yU;function xU(t,e){let n=0,r=1e3/e,o,i,s=(l,p=Date.now())=>{n=p,o=null,i&&(clearTimeout(i),i=null),t(...l)};return[(...l)=>{let p=Date.now(),d=p-n;d>=r?s(l,p):(o=l,i||(i=setTimeout(()=>{i=null,s(o)},r-d)))},()=>o&&s(o)]}var NT=xU;var vr=(t,e,n=3)=>{let r=0,o=zT(50,250);return NT(i=>{if(!i||typeof i.loaded!="number")return;let s=i.loaded,a=i.lengthComputable?i.total:void 0,c=a!=null?Math.min(s,a):s,l=Math.max(0,c-r),p=o(l);r=Math.max(r,c);let d={loaded:c,total:a,progress:a?c/a:void 0,bytes:l,rate:p||void 0,estimated:p&&a?(a-c)/p:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(d)},n)},Hi=(t,e)=>{let n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Vi=t=>(...e)=>_.asap(()=>t(...e));var Bl=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,vU=(t,e,n)=>e+2<n&&Bl(t.charCodeAt(e+1))&&Bl(t.charCodeAt(e+2));function Ta(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;let e=t.indexOf(",");if(e<0)return 0;let n=t.slice(5,e),r=t.slice(e+1);if(/;base64/i.test(n)){let s=r.length,a=r.length;for(let h=0;h<a;h++)if(r.charCodeAt(h)===37&&h+2<a){let y=r.charCodeAt(h+1),v=r.charCodeAt(h+2);Bl(y)&&Bl(v)&&(s-=2,h+=2)}let c=0,l=a-1,p=h=>h>=2&&r.charCodeAt(h-2)===37&&r.charCodeAt(h-1)===51&&(r.charCodeAt(h)===68||r.charCodeAt(h)===100);l>=0&&(r.charCodeAt(l)===61?(c++,l--):p(l)&&(c++,l-=3)),c===1&&l>=0&&(r.charCodeAt(l)===61||p(l))&&c++;let f=Math.floor(s/4)*3-(c||0);return f>0?f:0}let i=0;for(let s=0,a=r.length;s<a;s++){let c=r.charCodeAt(s);if(c===37&&vU(r,s,a))i+=1,s+=2;else if(c<128)i+=1;else if(c<2048)i+=2;else if(c>=55296&&c<=56319&&s+1<a){let l=r.charCodeAt(s+1);l>=56320&&l<=57343?(i+=4,s++):i+=3}else i+=3}return i}var jT={flush:bn.default.constants.Z_SYNC_FLUSH,finishFlush:bn.default.constants.Z_SYNC_FLUSH},bU={flush:bn.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:bn.default.constants.BROTLI_OPERATION_FLUSH},_U={flush:bn.default.constants.ZSTD_e_flush,finishFlush:bn.default.constants.ZSTD_e_flush},WT=_.isFunction(bn.default.createBrotliDecompress),KT=_.isFunction(bn.default.createZstdDecompress),JT="gzip, compress, deflate"+(WT?", br":""),wU=JT+(KT?", zstd":""),{http:SU,https:kU}=VT.default,vg=/https:?/,TU=["content-type","content-length"];function EU(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e).forEach(([r,o])=>{TU.includes(r.toLowerCase())&&t.set(r,o)})}var LT=Symbol("axios.http.socketListener"),Hl=Symbol("axios.http.currentReq"),YT=Symbol("axios.http.installedTunnel"),$U=new Map,DT=new WeakMap,MT={22:21,24:5};function RU(t=process.versions&&process.versions.node){if(!t)return!1;let[e,n]=t.split(".").map(r=>Number(r));return!Number.isInteger(e)||!Number.isInteger(n)?!1:e>24?!0:MT[e]!=null&&n>=MT[e]}function AU(t,e=process.versions&&process.versions.node){if(!RU(e))return!1;let n=t&&t.options;return!!(n&&_.hasOwnProp(n,"proxyEnv")&&n.proxyEnv!=null)}function IU(t,e,n){return vg.test(t.protocol)?n||xg.default.globalAgent:e||yg.default.globalAgent}function CU(t,e){let n=t.protocol+"//"+t.hostname+":"+(t.port||"")+"#"+(t.auth||""),r=e?DT.get(e)||DT.set(e,new Map).get(e):$U,o=r.get(n);if(o)return o;let i=e&&e.options?{...e.options,...t}:t;if(o=new gg.default(i),e&&e.options){let s={...e.options},a=o.callback;o.callback=function(l,p){return a.call(this,l,{...s,...p})}}return o[YT]=!0,r.set(n,o),o}var FT=Be.protocols.map(t=>t+":"),UT=t=>{if(!_.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},qT=(t,[e,n])=>(t.on("end",n).on("error",n),e),PU=new AT;function OU(t,e,n){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.auth&&t.beforeRedirects.auth(t),t.beforeRedirects.sensitiveHeaders&&t.beforeRedirects.sensitiveHeaders(t,n),t.beforeRedirects.config&&t.beforeRedirects.config(t,e,n)}function zU(t,e){t&&Object.keys(t).forEach(n=>{e.has(n.toLowerCase())&&delete t[n]})}function NU(t,e){if(!e)return!1;try{return new URL(e.url).origin===new URL(t.href).origin}catch{return!1}}function XT(t,e,n,r,o,i){let s=e,a=IU(t,i,o);if(!s&&s!==!1&&!AU(a)){let c=Hk(n);c&&(mg(n)||(s=new URL(c)))}if(r&&t.headers)for(let c of Object.keys(t.headers))c.toLowerCase()==="proxy-authorization"&&delete t.headers[c];if(r&&t.agent&&t.agent[YT]&&(t.agent=void 0),s){let c=s instanceof URL,l=y=>c||_.hasOwnProp(s,y)?s[y]:void 0,p=l("username"),d=l("password"),f=_.hasOwnProp(s,"auth")?s.auth:void 0;if(p&&(f=(p||"")+":"+(d||"")),f){let y=typeof f=="object",v=y&&_.hasOwnProp(f,"username")?f.username:void 0,x=y&&_.hasOwnProp(f,"password")?f.password:void 0;if(!!(v||x))f=(v||"")+":"+(x||"");else if(y)throw new P("Invalid proxy authorization",P.ERR_BAD_OPTION,{proxy:s})}if(vg.test(t.protocol)){if(!(o instanceof gg.default)){let y=l("hostname")||l("host"),v=l("port"),x=l("protocol"),m=x?x.includes(":")?x:`${x}:`:"http:",b=y&&y.includes(":")&&!y.startsWith("[")?`[${y}]`:y,w=new URL(`${m}//${b}${v?":"+v:""}`),k={protocol:w.protocol,hostname:w.hostname.replace(/^\[|\]$/g,""),port:w.port,auth:f&&typeof f=="string"?f:void 0};w.protocol==="https:"&&(k.ALPNProtocols=["http/1.1"]);let E=CU(k,o);t.agent=E,t.agents&&(t.agents.https=E)}}else{if(f){let m=Buffer.from(f,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+m}let y=!1;for(let m of Object.keys(t.headers))if(m.toLowerCase()==="host"){y=!0;break}y||(t.headers.host=t.hostname+(t.port?":"+t.port:""));let v=l("hostname")||l("host");t.hostname=v,t.host=v,t.port=l("port"),t.path=n;let x=l("protocol");x&&(t.protocol=x.includes(":")?x:`${x}:`)}}t.beforeRedirects.proxy=function(l){XT(l,e,l.href,!0,o,i)}}var jU=typeof process<"u"&&_.kindOf(process)==="process",LU=t=>new Promise((e,n)=>{let r,o,i=(c,l)=>{o||(o=!0,r&&r(c,l))},s=c=>{i(c),e(c)},a=c=>{i(c,!0),n(c)};t(s,a,c=>r=c).catch(a)}),DU=({address:t,family:e})=>{if(!_.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},ZT=(t,e)=>DU(_.isObject(t)?t:{address:t,family:e}),MU={request(t,e){let n=t.protocol+"//"+t.hostname+":"+(t.port||(t.protocol==="https:"?443:80)),{http2Options:r,headers:o}=t,i=PU.getSession(n,r),{HTTP2_HEADER_SCHEME:s,HTTP2_HEADER_METHOD:a,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:l}=BT.default.constants,p={[s]:t.protocol.replace(":",""),[a]:t.method,[c]:t.path};_.forEach(o,(f,h)=>{h.charAt(0)!==":"&&(p[h]=f)});let d=i.request(p);return d.once("response",f=>{let h=d;f=Object.assign({},f);let y=f[l];delete f[l],h.headers=f,h.statusCode=+y,e(h)}),d}},QT=jU&&function(e){return LU(async function(r,o,i){let s=W=>_.getSafeProp(e,W),a=s("transitional")||Zr,c=s("data"),l=s("lookup"),p=s("family"),d=s("httpVersion");d===void 0&&(d=1);let f=s("http2Options"),h=s("httpAgent"),y=s("httpsAgent"),v=s("proxy"),x=s("responseType"),m=s("responseEncoding"),b=s("socketPath"),w=s("method").toUpperCase(),k=s("maxRedirects"),E=s("maxBodyLength"),F=s("maxContentLength"),j=s("decompress"),me,de=!1,oe,Re;if(d=+d,Number.isNaN(d))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(d!==1&&d!==2)throw TypeError(`Unsupported protocol version '${d}'`);let bt=d===2;if(l){let W=IT(l,G=>_.isArray(G)?G:[G]);l=(G,be,Ge)=>{W(G,be,(ye,We,St)=>{if(ye)return Ge(ye);let Qe=_.isArray(We)?We.map(On=>ZT(On)):[ZT(We,St)];be.all?Ge(ye,Qe):Ge(ye,Qe[0].address,Qe[0].family)})}}let Ve=new GT.EventEmitter;function ae(W){try{Ve.emit("abort",!W||W.type?new vn(null,e,oe):W)}catch{}}function yt(){Re&&(clearTimeout(Re),Re=null)}function V(){let W=s("timeout"),G=W?"timeout of "+W+"ms exceeded":"timeout exceeded",be=s("timeoutErrorMessage");return be&&(G=be),new P(G,a.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,e,oe)}Ve.once("abort",o);let At=()=>{yt(),e.cancelToken&&e.cancelToken.unsubscribe(ae),e.signal&&e.signal.removeEventListener("abort",ae),Ve.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(ae),e.signal&&(e.signal.aborted?ae():e.signal.addEventListener("abort",ae))),i((W,G)=>{if(me=!0,yt(),G){de=!0,At();return}let{data:be}=W;if(be instanceof Pn.default.Readable||be instanceof Pn.default.Duplex){let Ge=Pn.default.finished(be,()=>{Ge(),At()})}else At()});let Zt=Do(s("baseURL"),s("url"),s("allowAbsoluteUrls"),e),Vn=b?"http://localhost":Be.hasBrowserEnv?Be.origin:void 0,Pe=new URL(Zt,Vn),B=Pe.protocol||FT[0];if(B==="data:"){if(F>-1){let G=String(s("url")||Zt||"");if(Ta(G)>F)return o(new P("maxContentLength size of "+F+" exceeded",P.ERR_BAD_RESPONSE,e))}let W;if(w!=="GET")return nr(r,o,{status:405,statusText:"method not allowed",headers:{},config:e});try{W=sg(s("url"),x==="blob",{Blob:e.env&&e.env.Blob})}catch(G){throw P.from(G,P.ERR_BAD_REQUEST,e)}return x==="text"?(W=W.toString(m),(!m||m==="utf8")&&(W=_.stripBOM(W))):x==="stream"&&(W=Pn.default.Readable.from(W)),nr(r,o,{data:W,status:200,statusText:"OK",headers:new rt,config:e})}if(FT.indexOf(B)===-1)return o(new P("Unsupported protocol "+B,P.ERR_BAD_REQUEST,e));let qe=rt.from(e.headers).normalize();qe.set("User-Agent","axios/"+xr,!1);let{onUploadProgress:De,onDownloadProgress:Yt}=e,it=e.maxRate,ge,ke;if(_.isSpecCompliantForm(c)){let W=qe.getContentType(/boundary=([-_\w\d]{10,70})/i);c=kT(c,G=>{qe.set(G)},{tag:`axios-${xr}-boundary`,boundary:W&&W[1]||void 0})}else if(_.isFormData(c)&&_.isFunction(c.getHeaders)&&c.getHeaders!==Object.prototype.getHeaders){if(EU(qe,c.getHeaders(),s("formDataHeaderPolicy")),!qe.hasContentLength())try{let W=await HT.default.promisify(c.getLength).call(c);Number.isFinite(W)&&W>=0&&qe.setContentLength(W)}catch{}}else if(_.isBlob(c)||_.isFile(c))c.size&&qe.setContentType(c.type||"application/octet-stream"),qe.setContentLength(c.size||0),c=Pn.default.Readable.from(Zl(c));else if(c&&!_.isStream(c)){if(!Buffer.isBuffer(c))if(_.isArrayBuffer(c))c=Buffer.from(new Uint8Array(c));else if(_.isString(c))c=Buffer.from(c,"utf-8");else return o(new P("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",P.ERR_BAD_REQUEST,e));if(qe.setContentLength(c.length,!1),E>-1&&c.length>E)return o(new P("Request body larger than maxBodyLength limit",P.ERR_BAD_REQUEST,e))}let ut=_.toFiniteNumber(qe.getContentLength());_.isArray(it)?(ge=it[0],ke=it[1]):ge=ke=it,c&&(De||ge)&&(_.isStream(c)||(c=Pn.default.Readable.from(c,{objectMode:!1})),c=Pn.default.pipeline([c,new lg({maxRate:_.toFiniteNumber(ge)})],_.noop),De&&c.on("progress",qT(c,Hi(ut,vr(Vi(De),!1,3)))));let Oe,Tt=s("auth");if(Tt){let W=_.getSafeProp(Tt,"username")||"",G=_.getSafeProp(Tt,"password")||"";Oe=W+":"+G}if(!Oe&&(Pe.username||Pe.password)){let W=UT(Pe.username),G=UT(Pe.password);Oe=W+":"+G}Oe&&qe.delete("authorization");let Et;try{Et=Lo(Pe.pathname+Pe.search,s("params"),s("paramsSerializer")).replace(/^\?/,"")}catch(W){return o(P.from(W,P.ERR_BAD_REQUEST,e,null,null,{url:s("url"),exists:!0}))}qe.set("Accept-Encoding",_.hasOwnProp(a,"advertiseZstdAcceptEncoding")&&a.advertiseZstdAcceptEncoding===!0?wU:JT,!1);let Te=Object.assign(Object.create(null),{path:Et,method:w,headers:Oi(qe),agents:{http:h,https:y},auth:Oe,protocol:B,family:p,beforeRedirect:OU,beforeRedirects:Object.create(null),http2Options:f});if(!_.isUndefined(l)&&(Te.lookup=l),b){if(typeof b!="string")return o(new P("socketPath must be a string",P.ERR_BAD_OPTION_VALUE,e));let W=s("allowedSocketPaths");if(W!=null){let G=Array.isArray(W)?W:[W],be=(0,hg.resolve)(b);if(!G.some(ye=>typeof ye=="string"&&(0,hg.resolve)(ye)===be))return o(new P(`socketPath "${b}" is not permitted by allowedSocketPaths`,P.ERR_BAD_OPTION_VALUE,e))}Te.socketPath=b}else Te.hostname=Pe.hostname.startsWith("[")?Pe.hostname.slice(1,-1):Pe.hostname,Te.port=Pe.port,XT(Te,v,B+"//"+Pe.hostname+(Pe.port?":"+Pe.port:"")+Te.path,!1,y,h);let Bt,_n=!1,zt=!1,pe=vg.test(Te.protocol);if(Te.agent==null&&(Te.agent=pe?y:h),bt)Bt=MU;else{let W=s("transport");if(W)Bt=W;else if(k===0)Bt=pe?xg.default:yg.default,_n=!0;else{zt=!0,Te.sensitiveHeaders=[],k&&(Te.maxRedirects=k);let G=s("beforeRedirect");if(G&&(Te.beforeRedirects.config=G),Oe){let Ge=Pe.origin,ye=Oe;Te.beforeRedirects.auth=function(St){try{new URL(St.href).origin===Ge&&(St.auth=ye)}catch{}}}let be=s("sensitiveHeaders");if(be!=null){if(!_.isArray(be))return o(new P("sensitiveHeaders must be an array of strings",P.ERR_BAD_OPTION_VALUE,e));let Ge=new Set;for(let ye of be){if(!_.isString(ye))return o(new P("sensitiveHeaders must be an array of strings",P.ERR_BAD_OPTION_VALUE,e));Ge.add(ye.toLowerCase())}Ge.size&&(Te.sensitiveHeaders=Array.from(Ge),Te.beforeRedirects.sensitiveHeaders=function(We,St){NU(We,St)||zU(We.headers,Ge)})}Bt=pe?kU:SU}}E>-1?Te.maxBodyLength=E:Te.maxBodyLength=1/0,Te.insecureHTTPParser=!!s("insecureHTTPParser"),oe=Bt.request(Te,function(G){if(yt(),oe.destroyed)return;let be=[G],Ge=_.toFiniteNumber(G.headers["content-length"]);if(Yt||ke){let Qe=new lg({maxRate:_.toFiniteNumber(ke)});Yt&&Qe.on("progress",qT(Qe,Hi(Ge,vr(Vi(Yt),!0,3)))),be.push(Qe)}let ye=G,We=G.req||oe;if(j!==!1&&G.headers["content-encoding"])switch((w==="HEAD"||G.statusCode===204)&&delete G.headers["content-encoding"],(G.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":be.push(bn.default.createUnzip(jT)),delete G.headers["content-encoding"];break;case"deflate":be.push(new ET),be.push(bn.default.createUnzip(jT)),delete G.headers["content-encoding"];break;case"br":WT&&(be.push(bn.default.createBrotliDecompress(bU)),delete G.headers["content-encoding"]);break;case"zstd":KT&&(be.push(bn.default.createZstdDecompress(_U)),delete G.headers["content-encoding"]);break}ye=be.length>1?Pn.default.pipeline(be,_.noop):be[0];let St={status:G.statusCode,statusText:G.statusMessage,headers:new rt(G.headers),config:e,request:We};if(x==="stream"){if(F>-1){let Qe=F,On=ye;async function*cr(){let u=0;for await(let S of On){if(u+=S.length,u>Qe)throw new P("maxContentLength size of "+Qe+" exceeded",P.ERR_BAD_RESPONSE,e,We);yield S}}ye=Pn.default.Readable.from(cr(),{objectMode:!1})}St.data=ye,nr(r,o,St)}else{let Qe=[],On=0;ye.on("data",function(u){Qe.push(u),On+=u.length,F>-1&&On>F&&(de=!0,ye.destroy(),ae(new P("maxContentLength size of "+F+" exceeded",P.ERR_BAD_RESPONSE,e,We)))}),ye.on("aborted",function(){if(de)return;let u=new P("stream has been aborted",P.ERR_BAD_RESPONSE,e,We,St);ye.destroy(u),o(u)}),ye.on("error",function(u){de||o(P.from(u,null,e,We,St))}),ye.on("end",function(){try{let u=Qe.length===1?Qe[0]:Buffer.concat(Qe);x!=="arraybuffer"&&(u=u.toString(m),(!m||m==="utf8")&&(u=_.stripBOM(u))),St.data=u}catch(u){return o(P.from(u,null,e,St.request,St))}nr(r,o,St)})}Ve.once("abort",Qe=>{ye.destroyed||(ye.emit("error",Qe),ye.destroy())})}),Ve.once("abort",W=>{oe.close?oe.close():oe.destroy(W)}),oe.on("error",function(G){o(P.from(G,null,e,oe))});let Ye=new Set;if(oe.on("socket",function(G){typeof G.setKeepAlive=="function"&&G.setKeepAlive(!0,1e3*60),G[LT]||(G.on("error",function(Ge){let ye=G[Hl];ye&&!ye.destroyed&&ye.destroy(Ge)}),G[LT]=!0),G[Hl]=oe,Ye.add(G)}),oe.once("close",function(){yt();for(let G of Ye)G[Hl]===oe&&(G[Hl]=null);Ye.clear()}),s("timeout")){let W=parseInt(s("timeout"),10);if(Number.isNaN(W)){ae(new P("error trying to parse `config.timeout` to int",P.ERR_BAD_OPTION_VALUE,e,oe));return}let G=function(){me||ae(V())};_n&&W>0&&(Re=setTimeout(G,W)),oe.setTimeout(W,G)}else oe.setTimeout(0);if(_.isStream(c)){let W=!1,G=!1;c.on("end",()=>{W=!0}),c.once("error",Ge=>{G=!0,oe.destroy(Ge)}),c.on("close",()=>{!W&&!G&&ae(new vn("Request stream has been aborted",e,oe))});let be=c;if(E>-1&&!zt){let Ge=E,ye=0;be=Pn.default.pipeline([c,new Pn.default.Transform({transform(We,St,Qe){if(ye+=We.length,ye>Ge)return Qe(new P("Request body larger than maxBodyLength limit",P.ERR_BAD_REQUEST,e,oe));Qe(null,We)}})],_.noop),be.on("error",We=>{oe.destroyed||oe.destroy(We)})}be.pipe(oe)}else c&&oe.write(c),oe.end()})};var eE=Be.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Be.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Be.origin),Be.navigator&&/(msie|trident)/i.test(Be.navigator.userAgent)):()=>!0;var tE=Be.hasStandardBrowserEnv?{write(t,e,n,r,o,i,s){if(typeof document>"u")return;let a=[`${t}=${encodeURIComponent(e)}`];_.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),_.isString(r)&&a.push(`path=${r}`),_.isString(o)&&a.push(`domain=${o}`),i===!0&&a.push("secure"),_.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;let e=document.cookie.split(";");for(let n=0;n<e.length;n++){let r=e[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===t)try{return decodeURIComponent(r.slice(o+1))}catch{return r.slice(o+1)}}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};var nE=t=>t instanceof rt?{...t}:t;function Hn(t,e){t=t||{},e=e||{};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,d,f,h){return _.isPlainObject(p)&&_.isPlainObject(d)?_.merge.call({caseless:h},p,d):_.isPlainObject(d)?_.merge({},d):_.isArray(d)?d.slice():d}function o(p,d,f,h){if(_.isUndefined(d)){if(!_.isUndefined(p))return r(void 0,p,f,h)}else return r(p,d,f,h)}function i(p,d){if(!_.isUndefined(d))return r(void 0,d)}function s(p,d){if(_.isUndefined(d)){if(!_.isUndefined(p))return r(void 0,p)}else return r(void 0,d)}function a(p){let d=_.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!_.isUndefined(d))if(_.isPlainObject(d)){if(_.hasOwnProp(d,p))return d[p]}else return;let f=_.hasOwnProp(t,"transitional")?t.transitional:void 0;if(_.isPlainObject(f)&&_.hasOwnProp(f,p))return f[p]}function c(p,d,f){if(_.hasOwnProp(e,f))return r(p,d);if(_.hasOwnProp(t,f))return r(void 0,p)}let l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:c,headers:(p,d,f)=>o(nE(p),nE(d),f,!0)};return _.forEach(Object.keys({...t,...e}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;let f=_.hasOwnProp(l,d)?l[d]:o,h=_.hasOwnProp(t,d)?t[d]:void 0,y=_.hasOwnProp(e,d)?e[d]:void 0,v=f(h,y,d);_.isUndefined(v)&&f!==c||(n[d]=v)}),_.hasOwnProp(e,"validateStatus")&&_.isUndefined(e.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(_.hasOwnProp(t,"validateStatus")?n.validateStatus=r(void 0,t.validateStatus):delete n.validateStatus),n}var FU=["content-type","content-length"];function UU(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([r,o])=>{FU.includes(r.toLowerCase())&&t.set(r,o)})}var qU=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16)));function ZU(t){let e=Hn({},t),n=f=>_.hasOwnProp(e,f)?e[f]:void 0,r=n("data"),o=n("withXSRFToken"),i=n("xsrfHeaderName"),s=n("xsrfCookieName"),a=n("headers"),c=n("auth"),l=n("baseURL"),p=n("allowAbsoluteUrls"),d=n("url");if(e.headers=a=rt.from(a),e.url=Lo(Do(l,d,p,e),n("params"),n("paramsSerializer")),c){let f=_.getSafeProp(c,"username")||"",h=_.getSafeProp(c,"password")||"";try{a.set("Authorization","Basic "+btoa(f+":"+(h?qU(h):"")))}catch(y){throw P.from(y,P.ERR_BAD_OPTION_VALUE,t)}}if(_.isFormData(r)&&(Be.hasStandardBrowserEnv||Be.hasStandardBrowserWebWorkerEnv||_.isReactNative(r)?a.setContentType(void 0):_.isFunction(r.getHeaders)&&UU(a,r.getHeaders(),n("formDataHeaderPolicy"))),Be.hasStandardBrowserEnv&&(_.isFunction(o)&&(o=o(e)),o===!0||o==null&&eE(e.url))){let h=i&&s&&tE.read(s);h&&a.set(i,h)}return e}var Vl=ZU;var BU=typeof XMLHttpRequest<"u",rE=BU&&function(t){return new Promise(function(n,r){let o=Vl(t),i=o.data,s=rt.from(o.headers).normalize(),{responseType:a,onUploadProgress:c,onDownloadProgress:l}=o,p,d,f,h,y;function v(){h&&h(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function m(){if(!x)return;let w=rt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:w,config:t,request:x};nr(function(j){n(j),v()},function(j){r(j),v()},E),x=null}"onloadend"in x?x.onloadend=m:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(m)},x.onabort=function(){x&&(r(new P("Request aborted",P.ECONNABORTED,t,x)),v(),x=null)},x.onerror=function(k){let E=k&&k.message?k.message:"Network Error",F=new P(E,P.ERR_NETWORK,t,x);F.event=k||null,r(F),v(),x=null},x.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",E=o.transitional||Zr;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),r(new P(k,E.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,t,x)),v(),x=null},i===void 0&&s.setContentType(null),"setRequestHeader"in x&&_.forEach(Oi(s),function(k,E){x.setRequestHeader(E,k)}),_.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),a&&a!=="json"&&(x.responseType=o.responseType),l&&([f,y]=vr(l,!0),x.addEventListener("progress",f)),c&&x.upload&&([d,h]=vr(c),x.upload.addEventListener("progress",d),x.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(p=w=>{x&&(r(!w||w.type?new vn(null,t,x):w),x.abort(),v(),x=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));let b=Sa(o.url);if(b&&!Be.protocols.includes(b)){r(new P("Unsupported protocol "+b+":",P.ERR_BAD_REQUEST,t)),v();return}x.send(i||null)})};var HU=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;let n=new AbortController,r=!1,o=function(c){if(!r){r=!0,s();let l=c instanceof Error?c:this.reason;n.abort(l instanceof P?l:new vn(l instanceof Error?l.message:l))}},i=e&&setTimeout(()=>{i=null,o(new P(`timeout of ${e}ms exceeded`,P.ETIMEDOUT))},e),s=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),t=null)};t.forEach(c=>c.addEventListener("abort",o,{once:!0}));let{signal:a}=n;return a.unsubscribe=()=>_.asap(s),a},oE=HU;var VU=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let r=0,o;for(;r<n;)o=r+e,yield t.slice(r,o),r=o},GU=async function*(t,e){for await(let n of WU(t))yield*VU(n,e)},WU=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},bg=(t,e,n,r)=>{let o=GU(t,e),i=0,s,a=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{let{done:l,value:p}=await o.next();if(l){a(),c.close();return}let d=p.byteLength;if(n){let f=i+=d;n(f)}c.enqueue(new Uint8Array(p))}catch(l){throw a(l),l}},cancel(c){return a(c),o.return()}},{highWaterMark:2})};var iE=64*1024,{isFunction:Gl}=_,KU=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16))),sE=t=>{if(!_.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},aE=(t,...e)=>{try{return!!t(...e)}catch{return!1}},JU=t=>{let e=t.indexOf("://"),n=t;return e!==-1&&(n=n.slice(e+3)),n.includes("@")||n.includes(":")},YU=t=>{let e=_.global!==void 0&&_.global!==null?_.global:globalThis,{ReadableStream:n,TextEncoder:r}=e;t=_.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);let{fetch:o,Request:i,Response:s}=t,a=o?Gl(o):typeof fetch=="function",c=Gl(i),l=Gl(s);if(!a)return!1;let p=a&&Gl(n),d=a&&(typeof r=="function"?(m=>b=>m.encode(b))(new r):async m=>new Uint8Array(await new i(m).arrayBuffer())),f=c&&p&&aE(()=>{let m=!1,b=new i(Be.origin,{body:new n,method:"POST",get duplex(){return m=!0,"half"}}),w=b.headers.has("Content-Type");return b.body!=null&&b.body.cancel(),m&&!w}),h=l&&p&&aE(()=>_.isReadableStream(new s("").body)),y={stream:h&&(m=>m.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!y[m]&&(y[m]=(b,w)=>{let k=b&&b[m];if(k)return k.call(b);throw new P(`Response type '${m}' is not supported`,P.ERR_NOT_SUPPORT,w)})});let v=async m=>{if(m==null)return 0;if(_.isBlob(m))return m.size;if(_.isSpecCompliantForm(m))return(await new i(Be.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(_.isArrayBufferView(m)||_.isArrayBuffer(m))return m.byteLength;if(_.isURLSearchParams(m)&&(m=m+""),_.isString(m))return(await d(m)).byteLength},x=async(m,b)=>{let w=_.toFiniteNumber(m.getContentLength());return w??v(b)};return async m=>{let{url:b,method:w,data:k,signal:E,cancelToken:F,timeout:j,onDownloadProgress:me,onUploadProgress:de,responseType:oe,headers:Re,withCredentials:bt="same-origin",fetchOptions:Ve,maxContentLength:ae,maxBodyLength:yt}=Vl(m),V=_.isNumber(ae)&&ae>-1,At=_.isNumber(yt)&&yt>-1,Zt=ge=>_.hasOwnProp(m,ge)?m[ge]:void 0,Vn=o||fetch;oe=oe?(oe+"").toLowerCase():"text";let Pe=oE([E,F&&F.toAbortSignal()],j),B=null,qe=Pe&&Pe.unsubscribe&&(()=>{Pe.unsubscribe()}),De,Yt=null,it=()=>new P("Request body larger than maxBodyLength limit",P.ERR_BAD_REQUEST,m,B);try{let ge,ke=Zt("auth");if(ke){let pe=_.getSafeProp(ke,"username")||"",Ye=_.getSafeProp(ke,"password")||"";ge={username:pe,password:Ye}}if(JU(b)){let pe=new URL(b,Be.origin);if(!ge&&(pe.username||pe.password)){let Ye=sE(pe.username),W=sE(pe.password);ge={username:Ye,password:W}}(pe.username||pe.password)&&(pe.username="",pe.password="",b=pe.href)}if(ge&&(Re.delete("authorization"),Re.set("Authorization","Basic "+btoa(KU((ge.username||"")+":"+(ge.password||""))))),V&&typeof b=="string"&&b.startsWith("data:")&&Ta(b)>ae)throw new P("maxContentLength size of "+ae+" exceeded",P.ERR_BAD_RESPONSE,m,B);if(At&&w!=="get"&&w!=="head"){let pe=await v(k);if(typeof pe=="number"&&isFinite(pe)&&(De=pe,pe>yt))throw it()}let ut=At&&(_.isReadableStream(k)||_.isStream(k)),Oe=(pe,Ye,W)=>bg(pe,iE,G=>{if(At&&G>yt)throw Yt=it();Ye&&Ye(G)},W);if(f&&w!=="get"&&w!=="head"&&(de||ut)){if(De=De??await x(Re,k),De!==0||ut){let pe=new i(b,{method:"POST",body:k,duplex:"half"}),Ye;if(_.isFormData(k)&&(Ye=pe.headers.get("content-type"))&&Re.setContentType(Ye),pe.body){let[W,G]=de&&Hi(De,vr(Vi(de)))||[];k=Oe(pe.body,W,G)}}}else if(ut&&!c&&p&&w!=="get"&&w!=="head")k=Oe(k);else if(ut&&c&&!f&&w!=="get"&&w!=="head")throw new P("Stream request bodies are not supported by the current fetch implementation",P.ERR_NOT_SUPPORT,m,B);_.isString(bt)||(bt=bt?"include":"omit");let Tt=c&&"credentials"in i.prototype;if(_.isFormData(k)){let pe=Re.getContentType();pe&&/^multipart\/form-data/i.test(pe)&&!/boundary=/i.test(pe)&&Re.delete("content-type")}Re.set("User-Agent","axios/"+xr,!1);let Et={...Ve,signal:Pe,method:w.toUpperCase(),headers:Oi(Re.normalize()),body:k,duplex:"half",credentials:Tt?bt:void 0};B=c&&new i(b,Et);let Te=await(c?Vn(B,Ve):Vn(b,Et)),Bt=rt.from(Te.headers);if(V){let pe=_.toFiniteNumber(Bt.getContentLength());if(pe!=null&&pe>ae)throw new P("maxContentLength size of "+ae+" exceeded",P.ERR_BAD_RESPONSE,m,B)}let _n=h&&(oe==="stream"||oe==="response");if(h&&Te.body&&(me||V||_n&&qe)){let pe={};["status","statusText","headers"].forEach(ye=>{pe[ye]=Te[ye]});let Ye=_.toFiniteNumber(Bt.getContentLength()),[W,G]=me&&Hi(Ye,vr(Vi(me),!0))||[],be=0,Ge=ye=>{if(V&&(be=ye,be>ae))throw new P("maxContentLength size of "+ae+" exceeded",P.ERR_BAD_RESPONSE,m,B);W&&W(ye)};Te=new s(bg(Te.body,iE,Ge,()=>{G&&G(),qe&&qe()}),pe)}oe=oe||"text";let zt=await y[_.findKey(y,oe)||"text"](Te,m);if(V&&!h&&!_n){let pe;if(zt!=null&&(typeof zt.byteLength=="number"?pe=zt.byteLength:typeof zt.size=="number"?pe=zt.size:typeof zt=="string"&&(pe=typeof r=="function"?new r().encode(zt).byteLength:zt.length)),typeof pe=="number"&&pe>ae)throw new P("maxContentLength size of "+ae+" exceeded",P.ERR_BAD_RESPONSE,m,B)}return!_n&&qe&&qe(),await new Promise((pe,Ye)=>{nr(pe,Ye,{data:zt,headers:rt.from(Te.headers),status:Te.status,statusText:Te.statusText,config:m,request:B})})}catch(ge){if(qe&&qe(),Pe&&Pe.aborted&&Pe.reason instanceof P){let ke=Pe.reason;throw ke.config=m,B&&(ke.request=B),ge!==ke&&Object.defineProperty(ke,"cause",{__proto__:null,value:ge,writable:!0,enumerable:!1,configurable:!0}),ke}if(Yt)throw B&&!Yt.request&&(Yt.request=B),Yt;if(ge instanceof P)throw B&&!ge.request&&(ge.request=B),ge;if(ge&&ge.name==="TypeError"&&/Load failed|fetch/i.test(ge.message)){let ke=new P("Network Error",P.ERR_NETWORK,m,B,ge&&ge.response);throw Object.defineProperty(ke,"cause",{__proto__:null,value:ge.cause||ge,writable:!0,enumerable:!1,configurable:!0}),ke}throw P.from(ge,ge&&ge.code,m,B,ge&&ge.response)}}},XU=new Map,_g=t=>{let e=t&&t.env||{},{fetch:n,Request:r,Response:o}=e,i=[r,o,n],s=i.length,a=s,c,l,p=XU;for(;a--;)c=i[a],l=p.get(c),l===void 0&&p.set(c,l=a?new Map:YU(e)),p=l;return l},R8=_g();var wg={http:QT,xhr:rE,fetch:{get:_g}};_.forEach(wg,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});var cE=t=>`- ${t}`,eq=t=>_.isFunction(t)||t===null||t===!1;function tq(t,e){t=_.isArray(t)?t:[t];let{length:n}=t,r,o,i={};for(let s=0;s<n;s++){r=t[s];let a;if(o=r,!eq(r)&&(o=wg[(a=String(r)).toLowerCase()],o===void 0))throw new P(`Unknown adapter '${a}'`);if(o&&(_.isFunction(o)||(o=o.get(e))))break;i[a||"#"+s]=o}if(!o){let s=Object.entries(i).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build")),a=n?s.length>1?`since :
|
|
58
|
-
`+s.map(
|
|
59
|
-
`):" "+
|
|
53
|
+
]`;continue}o+=r[l],r[l]==="\\"?i=!0:s&&r[l]==="]"?s=!1:!s&&r[l]==="["&&(s=!0)}try{new RegExp(o)}catch{return console.warn(`Could not convert regex pattern at ${e.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),t.source}return o}function jc(t,e){var r,o,i,s,a,c;if(e.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),e.target==="openApi3"&&((r=t.keyType)==null?void 0:r._def.typeName)===q.ZodEnum)return{type:"object",required:t.keyType._def.values,properties:t.keyType._def.values.reduce((l,p)=>({...l,[p]:fe(t.valueType._def,{...e,currentPath:[...e.currentPath,"properties",p]})??mt(e)}),{}),additionalProperties:e.rejectedAdditionalProperties};let n={type:"object",additionalProperties:fe(t.valueType._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]})??e.allowedAdditionalProperties};if(e.target==="openApi3")return n;if(((o=t.keyType)==null?void 0:o._def.typeName)===q.ZodString&&((i=t.keyType._def.checks)!=null&&i.length)){let{type:l,...p}=Nc(t.keyType._def,e);return{...n,propertyNames:p}}else{if(((s=t.keyType)==null?void 0:s._def.typeName)===q.ZodEnum)return{...n,propertyNames:{enum:t.keyType._def.values}};if(((a=t.keyType)==null?void 0:a._def.typeName)===q.ZodBranded&&t.keyType._def.type._def.typeName===q.ZodString&&((c=t.keyType._def.type._def.checks)!=null&&c.length)){let{type:l,...p}=zc(t.keyType._def,e);return{...n,propertyNames:p}}}return n}function tb(t,e){if(e.mapStrategy==="record")return jc(t,e);let n=fe(t.keyType._def,{...e,currentPath:[...e.currentPath,"items","items","0"]})||mt(e),r=fe(t.valueType._def,{...e,currentPath:[...e.currentPath,"items","items","1"]})||mt(e);return{type:"array",maxItems:125,items:{type:"array",items:[n,r],minItems:2,maxItems:2}}}function nb(t){let e=t.values,r=Object.keys(t.values).filter(i=>typeof e[e[i]]!="number").map(i=>e[i]),o=Array.from(new Set(r.map(i=>typeof i)));return{type:o.length===1?o[0]==="string"?"string":"number":["string","number"],enum:r}}function rb(t){return t.target==="openAi"?void 0:{not:mt({...t,currentPath:[...t.currentPath,"not"]})}}function ob(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Ps={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function sb(t,e){if(e.target==="openApi3")return ib(t,e);let n=t.options instanceof Map?Array.from(t.options.values()):t.options;if(n.every(r=>r._def.typeName in Ps&&(!r._def.checks||!r._def.checks.length))){let r=n.reduce((o,i)=>{let s=Ps[i._def.typeName];return s&&!o.includes(s)?[...o,s]:o},[]);return{type:r.length>1?r:r[0]}}else if(n.every(r=>r._def.typeName==="ZodLiteral"&&!r.description)){let r=n.reduce((o,i)=>{let s=typeof i._def.value;switch(s){case"string":case"number":case"boolean":return[...o,s];case"bigint":return[...o,"integer"];case"object":if(i._def.value===null)return[...o,"null"];case"symbol":case"undefined":case"function":default:return o}},[]);if(r.length===n.length){let o=r.filter((i,s,a)=>a.indexOf(i)===s);return{type:o.length>1?o:o[0],enum:n.reduce((i,s)=>i.includes(s._def.value)?i:[...i,s._def.value],[])}}}else if(n.every(r=>r._def.typeName==="ZodEnum"))return{type:"string",enum:n.reduce((r,o)=>[...r,...o._def.values.filter(i=>!r.includes(i))],[])};return ib(t,e)}var ib=(t,e)=>{let n=(t.options instanceof Map?Array.from(t.options.values()):t.options).map((r,o)=>fe(r._def,{...e,currentPath:[...e.currentPath,"anyOf",`${o}`]})).filter(r=>!!r&&(!e.strictUnions||typeof r=="object"&&Object.keys(r).length>0));return n.length?{anyOf:n}:void 0};function ab(t,e){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(t.innerType._def.typeName)&&(!t.innerType._def.checks||!t.innerType._def.checks.length))return e.target==="openApi3"?{type:Ps[t.innerType._def.typeName],nullable:!0}:{type:[Ps[t.innerType._def.typeName],"null"]};if(e.target==="openApi3"){let r=fe(t.innerType._def,{...e,currentPath:[...e.currentPath]});return r&&"$ref"in r?{allOf:[r],nullable:!0}:r&&{...r,nullable:!0}}let n=fe(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","0"]});return n&&{anyOf:[n,{type:"null"}]}}function cb(t,e){let n={type:"number"};if(!t.checks)return n;for(let r of t.checks)switch(r.kind){case"int":n.type="integer",Xd(n,"type",r.message,e);break;case"min":e.target==="jsonSchema7"?r.inclusive?je(n,"minimum",r.value,r.message,e):je(n,"exclusiveMinimum",r.value,r.message,e):(r.inclusive||(n.exclusiveMinimum=!0),je(n,"minimum",r.value,r.message,e));break;case"max":e.target==="jsonSchema7"?r.inclusive?je(n,"maximum",r.value,r.message,e):je(n,"exclusiveMaximum",r.value,r.message,e):(r.inclusive||(n.exclusiveMaximum=!0),je(n,"maximum",r.value,r.message,e));break;case"multipleOf":je(n,"multipleOf",r.value,r.message,e);break}return n}function lb(t,e){let n=e.target==="openAi",r={type:"object",properties:{}},o=[],i=t.shape();for(let a in i){let c=i[a];if(c===void 0||c._def===void 0)continue;let l=KI(c);l&&n&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),l=!1);let p=fe(c._def,{...e,currentPath:[...e.currentPath,"properties",a],propertyPath:[...e.currentPath,"properties",a]});p!==void 0&&(r.properties[a]=p,l||o.push(a))}o.length&&(r.required=o);let s=WI(t,e);return s!==void 0&&(r.additionalProperties=s),r}function WI(t,e){if(t.catchall._def.typeName!=="ZodNever")return fe(t.catchall._def,{...e,currentPath:[...e.currentPath,"additionalProperties"]});switch(t.unknownKeys){case"passthrough":return e.allowedAdditionalProperties;case"strict":return e.rejectedAdditionalProperties;case"strip":return e.removeAdditionalStrategy==="strict"?e.allowedAdditionalProperties:e.rejectedAdditionalProperties}}function KI(t){try{return t.isOptional()}catch{return!0}}var ub=(t,e)=>{var r;if(e.currentPath.toString()===((r=e.propertyPath)==null?void 0:r.toString()))return fe(t.innerType._def,e);let n=fe(t.innerType._def,{...e,currentPath:[...e.currentPath,"anyOf","1"]});return n?{anyOf:[{not:mt(e)},n]}:mt(e)};var pb=(t,e)=>{if(e.pipeStrategy==="input")return fe(t.in._def,e);if(e.pipeStrategy==="output")return fe(t.out._def,e);let n=fe(t.in._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),r=fe(t.out._def,{...e,currentPath:[...e.currentPath,"allOf",n?"1":"0"]});return{allOf:[n,r].filter(o=>o!==void 0)}};function db(t,e){return fe(t.type._def,e)}function fb(t,e){let r={type:"array",uniqueItems:!0,items:fe(t.valueType._def,{...e,currentPath:[...e.currentPath,"items"]})};return t.minSize&&je(r,"minItems",t.minSize.value,t.minSize.message,e),t.maxSize&&je(r,"maxItems",t.maxSize.value,t.maxSize.message,e),r}function mb(t,e){return t.rest?{type:"array",minItems:t.items.length,items:t.items.map((n,r)=>fe(n._def,{...e,currentPath:[...e.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[]),additionalItems:fe(t.rest._def,{...e,currentPath:[...e.currentPath,"additionalItems"]})}:{type:"array",minItems:t.items.length,maxItems:t.items.length,items:t.items.map((n,r)=>fe(n._def,{...e,currentPath:[...e.currentPath,"items",`${r}`]})).reduce((n,r)=>r===void 0?n:[...n,r],[])}}function hb(t){return{not:mt(t)}}function gb(t){return mt(t)}var yb=(t,e)=>fe(t.innerType._def,e);var xb=(t,e,n)=>{switch(e){case q.ZodString:return Nc(t,n);case q.ZodNumber:return cb(t,n);case q.ZodObject:return lb(t,n);case q.ZodBigInt:return Vv(t,n);case q.ZodBoolean:return Gv();case q.ZodDate:return Qd(t,n);case q.ZodUndefined:return hb(n);case q.ZodNull:return ob(n);case q.ZodArray:return Hv(t,n);case q.ZodUnion:case q.ZodDiscriminatedUnion:return sb(t,n);case q.ZodIntersection:return Xv(t,n);case q.ZodTuple:return mb(t,n);case q.ZodRecord:return jc(t,n);case q.ZodLiteral:return Qv(t,n);case q.ZodEnum:return Yv(t);case q.ZodNativeEnum:return nb(t);case q.ZodNullable:return ab(t,n);case q.ZodOptional:return ub(t,n);case q.ZodMap:return tb(t,n);case q.ZodSet:return fb(t,n);case q.ZodLazy:return()=>t.getter()._def;case q.ZodPromise:return db(t,n);case q.ZodNaN:case q.ZodNever:return rb(n);case q.ZodEffects:return Jv(t,n);case q.ZodAny:return mt(n);case q.ZodUnknown:return gb(n);case q.ZodDefault:return Kv(t,n);case q.ZodBranded:return zc(t,n);case q.ZodReadonly:return yb(t,n);case q.ZodCatch:return Wv(t,n);case q.ZodPipeline:return pb(t,n);case q.ZodFunction:case q.ZodVoid:case q.ZodSymbol:return;default:return(r=>{})(e)}};function fe(t,e,n=!1){var a;let r=e.seen.get(t);if(e.override){let c=(a=e.override)==null?void 0:a.call(e,t,e,r,n);if(c!==qv)return c}if(r&&!n){let c=JI(r,e);if(c!==void 0)return c}let o={def:t,path:e.currentPath,jsonSchema:void 0};e.seen.set(t,o);let i=xb(t,t.typeName,e),s=typeof i=="function"?fe(i(),e):i;if(s&&YI(t,e,s),e.postProcess){let c=e.postProcess(s,t,e);return o.jsonSchema=s,c}return o.jsonSchema=s,s}var JI=(t,e)=>{switch(e.$refStrategy){case"root":return{$ref:t.path.join("/")};case"relative":return{$ref:Oc(e.currentPath,t.path)};case"none":case"seen":return t.path.length<e.currentPath.length&&t.path.every((n,r)=>e.currentPath[r]===n)?(console.warn(`Recursive reference detected at ${e.currentPath.join("/")}! Defaulting to any`),mt(e)):e.$refStrategy==="seen"?mt(e):void 0}},YI=(t,e,n)=>(t.description&&(n.description=t.description,e.markdownDescription&&(n.markdownDescription=t.description)),n);var nf=(t,e)=>{let n=Bv(e),r=typeof e=="object"&&e.definitions?Object.entries(e.definitions).reduce((c,[l,p])=>({...c,[l]:fe(p._def,{...n,currentPath:[...n.basePath,n.definitionPath,l]},!0)??mt(n)}),{}):void 0,o=typeof e=="string"?e:(e==null?void 0:e.nameStrategy)==="title"||e==null?void 0:e.name,i=fe(t._def,o===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,o]},!1)??mt(n),s=typeof e=="object"&&e.name!==void 0&&e.nameStrategy==="title"?e.name:void 0;s!==void 0&&(i.title=s),n.flags.hasReferencedOpenAiAnyType&&(r||(r={}),r[n.openAiAnyTypeName]||(r[n.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:n.$refStrategy==="relative"?"1":[...n.basePath,n.definitionPath,n.openAiAnyTypeName].join("/")}}));let a=o===void 0?r?{...i,[n.definitionPath]:r}:i:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,o].join("/"),[n.definitionPath]:{...r,[o]:i}};return n.target==="jsonSchema7"?a.$schema="http://json-schema.org/draft-07/schema#":(n.target==="jsonSchema2019-09"||n.target==="openAi")&&(a.$schema="https://json-schema.org/draft/2019-09/schema#"),n.target==="openAi"&&("anyOf"in a||"oneOf"in a||"allOf"in a||"type"in a&&Array.isArray(a.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),a};function XI(t){return!t||t==="jsonSchema7"||t==="draft-7"?"draft-7":t==="jsonSchema2019-09"||t==="draft-2020-12"?"draft-2020-12":"draft-7"}function rf(t,e){return Xn(t)?Td(t,{target:XI(e==null?void 0:e.target),io:(e==null?void 0:e.pipeStrategy)??"input"}):nf(t,{strictUnions:(e==null?void 0:e.strictUnions)??!0,pipeStrategy:(e==null?void 0:e.pipeStrategy)??"input"})}function of(t){let e=Ir(t),n=e==null?void 0:e.method;if(!n)throw new Error("Schema is missing a method literal");let r=ci(n);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function sf(t,e){let n=Cr(t,e);if(!n.success)throw n.error;return n.data}var QI=6e4,Lc=class{constructor(e){this._options=e,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(gc,n=>{this._oncancel(n)}),this.setNotificationHandler(xc,n=>{this._onprogress(n)}),this.setRequestHandler(yc,n=>({})),this._taskStore=e==null?void 0:e.taskStore,this._taskMessageQueue=e==null?void 0:e.taskMessageQueue,this._taskStore&&(this.setRequestHandler(vc,async(n,r)=>{let o=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!o)throw new te(se.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(_c,async(n,r)=>{let o=async()=>{var a;let i=n.params.taskId;if(this._taskMessageQueue){let c;for(;c=await this._taskMessageQueue.dequeue(i,r.sessionId);){if(c.type==="response"||c.type==="error"){let l=c.message,p=l.id,d=this._requestResolvers.get(p);if(d)if(this._requestResolvers.delete(p),c.type==="response")d(l);else{let f=l,h=new te(f.error.code,f.error.message,f.error.data);d(h)}else{let f=c.type==="response"?"Response":"Error";this._onerror(new Error(`${f} handler missing for request ${p}`))}continue}await((a=this._transport)==null?void 0:a.send(c.message,{relatedRequestId:r.requestId}))}}let s=await this._taskStore.getTask(i,r.sessionId);if(!s)throw new te(se.InvalidParams,`Task not found: ${i}`);if(!zr(s.status))return await this._waitForTaskUpdate(i,r.signal),await o();if(zr(s.status)){let c=await this._taskStore.getTaskResult(i,r.sessionId);return this._clearTaskQueue(i),{...c,_meta:{...c._meta,[Or]:{taskId:i}}}}return await o()};return await o()}),this.setRequestHandler(wc,async(n,r)=>{var o;try{let{tasks:i,nextCursor:s}=await this._taskStore.listTasks((o=n.params)==null?void 0:o.cursor,r.sessionId);return{tasks:i,nextCursor:s,_meta:{}}}catch(i){throw new te(se.InvalidParams,`Failed to list tasks: ${i instanceof Error?i.message:String(i)}`)}}),this.setRequestHandler(kc,async(n,r)=>{try{let o=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!o)throw new te(se.InvalidParams,`Task not found: ${n.params.taskId}`);if(zr(o.status))throw new te(se.InvalidParams,`Cannot cancel task in terminal status: ${o.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",r.sessionId),this._clearTaskQueue(n.params.taskId);let i=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!i)throw new te(se.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...i}}catch(o){throw o instanceof te?o:new te(se.InvalidRequest,`Failed to cancel task: ${o instanceof Error?o.message:String(o)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;let n=this._requestHandlerAbortControllers.get(e.params.requestId);n==null||n.abort(e.params.reason)}_setupTimeout(e,n,r,o,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,n),startTime:Date.now(),timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:i,onTimeout:o})}_resetTimeout(e){let n=this._timeoutInfo.get(e);if(!n)return!1;let r=Date.now()-n.startTime;if(n.maxTotalTimeout&&r>=n.maxTotalTimeout)throw this._timeoutInfo.delete(e),te.fromError(se.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:r});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(e){let n=this._timeoutInfo.get(e);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var i,s,a;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=e;let n=(i=this.transport)==null?void 0:i.onclose;this._transport.onclose=()=>{n==null||n(),this._onclose()};let r=(s=this.transport)==null?void 0:s.onerror;this._transport.onerror=c=>{r==null||r(c),this._onerror(c)};let o=(a=this._transport)==null?void 0:a.onmessage;this._transport.onmessage=(c,l)=>{o==null||o(c,l),_s(c)||Pv(c)?this._onresponse(c):Dd(c)?this._onrequest(c,l):Av(c)?this._onnotification(c):this._onerror(new Error(`Unknown message type: ${JSON.stringify(c)}`))},await this._transport.start()}_onclose(){var r;let e=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 n=te.fromError(se.ConnectionClosed,"Connection closed");this._transport=void 0,(r=this.onclose)==null||r.call(this);for(let o of e.values())o(n)}_onerror(e){var n;(n=this.onerror)==null||n.call(this,e)}_onnotification(e){let n=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(e)).catch(r=>this._onerror(new Error(`Uncaught error in notification handler: ${r}`)))}_onrequest(e,n){var p,d,f,h;let r=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,o=this._transport,i=(f=(d=(p=e.params)==null?void 0:p._meta)==null?void 0:d[Or])==null?void 0:f.taskId;if(r===void 0){let y={jsonrpc:"2.0",id:e.id,error:{code:se.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:y,timestamp:Date.now()},o==null?void 0:o.sessionId).catch(b=>this._onerror(new Error(`Failed to enqueue error response: ${b}`))):o==null||o.send(y).catch(b=>this._onerror(new Error(`Failed to send an error response: ${b}`)));return}let s=new AbortController;this._requestHandlerAbortControllers.set(e.id,s);let a=Ev(e.params)?e.params.task:void 0,c=this._taskStore?this.requestTaskStore(e,o==null?void 0:o.sessionId):void 0,l={signal:s.signal,sessionId:o==null?void 0:o.sessionId,_meta:(h=e.params)==null?void 0:h._meta,sendNotification:async y=>{if(s.signal.aborted)return;let b={relatedRequestId:e.id};i&&(b.relatedTask={taskId:i}),await this.notification(y,b)},sendRequest:async(y,b,x)=>{var w;if(s.signal.aborted)throw new te(se.ConnectionClosed,"Request was cancelled");let m={...x,relatedRequestId:e.id};i&&!m.relatedTask&&(m.relatedTask={taskId:i});let v=((w=m.relatedTask)==null?void 0:w.taskId)??i;return v&&c&&await c.updateTaskStatus(v,"input_required"),await this.request(y,b,m)},authInfo:n==null?void 0:n.authInfo,requestId:e.id,requestInfo:n==null?void 0:n.requestInfo,taskId:i,taskStore:c,taskRequestedTtl:a==null?void 0:a.ttl,closeSSEStream:n==null?void 0:n.closeSSEStream,closeStandaloneSSEStream:n==null?void 0:n.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(e.method)}).then(()=>r(e,l)).then(async y=>{if(s.signal.aborted)return;let b={result:y,jsonrpc:"2.0",id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:b,timestamp:Date.now()},o==null?void 0:o.sessionId):await(o==null?void 0:o.send(b))},async y=>{if(s.signal.aborted)return;let b={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(y.code)?y.code:se.InternalError,message:y.message??"Internal error",...y.data!==void 0&&{data:y.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:b,timestamp:Date.now()},o==null?void 0:o.sessionId):await(o==null?void 0:o.send(b))}).catch(y=>this._onerror(new Error(`Failed to send response: ${y}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===s&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:n,...r}=e.params,o=Number(n),i=this._progressHandlers.get(o);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let s=this._responseHandlers.get(o),a=this._timeoutInfo.get(o);if(a&&s&&a.resetTimeoutOnProgress)try{this._resetTimeout(o)}catch(c){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),s(c);return}i(r)}_onresponse(e){let n=Number(e.id),r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),_s(e))r(e);else{let s=new te(e.error.code,e.error.message,e.error.data);r(s)}return}let o=this._responseHandlers.get(n);if(o===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let i=!1;if(_s(e)&&e.result&&typeof e.result=="object"){let s=e.result;if(s.task&&typeof s.task=="object"){let a=s.task;typeof a.taskId=="string"&&(i=!0,this._taskProgressTokens.set(a.taskId,n))}}if(i||this._progressHandlers.delete(n),_s(e))o(e);else{let s=te.fromError(e.error.code,e.error.message,e.error.data);o(s)}}get transport(){return this._transport}async close(){var e;await((e=this._transport)==null?void 0:e.close())}async*requestStream(e,n,r){var s,a;let{task:o}=r??{};if(!o){try{yield{type:"result",result:await this.request(e,n,r)}}catch(c){yield{type:"error",error:c instanceof te?c:new te(se.InternalError,String(c))}}return}let i;try{let c=await this.request(e,ui,r);if(c.task)i=c.task.taskId,yield{type:"taskCreated",task:c.task};else throw new te(se.InternalError,"Task creation did not return a task");for(;;){let l=await this.getTask({taskId:i},r);if(yield{type:"taskStatus",task:l},zr(l.status)){l.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)}:l.status==="failed"?yield{type:"error",error:new te(se.InternalError,`Task ${i} failed`)}:l.status==="cancelled"&&(yield{type:"error",error:new te(se.InternalError,`Task ${i} was cancelled`)});return}if(l.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)};return}let p=l.pollInterval??((s=this._options)==null?void 0:s.defaultTaskPollInterval)??1e3;await new Promise(d=>setTimeout(d,p)),(a=r==null?void 0:r.signal)==null||a.throwIfAborted()}}catch(c){yield{type:"error",error:c instanceof te?c:new te(se.InternalError,String(c))}}}request(e,n,r){let{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s,task:a,relatedTask:c}=r??{};return new Promise((l,p)=>{var v,w,k,E,F;let d=j=>{p(j)};if(!this._transport){d(new Error("Not connected"));return}if(((v=this._options)==null?void 0:v.enforceStrictCapabilities)===!0)try{this.assertCapabilityForMethod(e.method),a&&this.assertTaskCapability(e.method)}catch(j){d(j);return}(w=r==null?void 0:r.signal)==null||w.throwIfAborted();let f=this._requestMessageId++,h={...e,jsonrpc:"2.0",id:f};r!=null&&r.onprogress&&(this._progressHandlers.set(f,r.onprogress),h.params={...e.params,_meta:{...((k=e.params)==null?void 0:k._meta)||{},progressToken:f}}),a&&(h.params={...h.params,task:a}),c&&(h.params={...h.params,_meta:{...((E=h.params)==null?void 0:E._meta)||{},[Or]:c}});let y=j=>{var de;this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),(de=this._transport)==null||de.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(j)}},{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(oe=>this._onerror(new Error(`Failed to send cancellation: ${oe}`)));let me=j instanceof te?j:new te(se.RequestTimeout,String(j));p(me)};this._responseHandlers.set(f,j=>{var me;if(!((me=r==null?void 0:r.signal)!=null&&me.aborted)){if(j instanceof Error)return p(j);try{let de=Cr(n,j.result);de.success?l(de.data):p(de.error)}catch(de){p(de)}}}),(F=r==null?void 0:r.signal)==null||F.addEventListener("abort",()=>{var j;y((j=r==null?void 0:r.signal)==null?void 0:j.reason)});let b=(r==null?void 0:r.timeout)??QI,x=()=>y(te.fromError(se.RequestTimeout,"Request timed out",{timeout:b}));this._setupTimeout(f,b,r==null?void 0:r.maxTotalTimeout,x,(r==null?void 0:r.resetTimeoutOnProgress)??!1);let m=c==null?void 0:c.taskId;if(m){let j=me=>{let de=this._responseHandlers.get(f);de?de(me):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,j),this._enqueueTaskMessage(m,{type:"request",message:h,timestamp:Date.now()}).catch(me=>{this._cleanupTimeout(f),p(me)})}else this._transport.send(h,{relatedRequestId:o,resumptionToken:i,onresumptiontoken:s}).catch(j=>{this._cleanupTimeout(f),p(j)})})}async getTask(e,n){return this.request({method:"tasks/get",params:e},bc,n)}async getTaskResult(e,n,r){return this.request({method:"tasks/result",params:e},n,r)}async listTasks(e,n){return this.request({method:"tasks/list",params:e},Sc,n)}async cancelTask(e,n){return this.request({method:"tasks/cancel",params:e},Ov,n)}async notification(e,n){var a,c,l,p;if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let r=(a=n==null?void 0:n.relatedTask)==null?void 0:a.taskId;if(r){let d={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...((c=e.params)==null?void 0:c._meta)||{},[Or]:n.relatedTask}}};await this._enqueueTaskMessage(r,{type:"notification",message:d,timestamp:Date.now()});return}if((((l=this._options)==null?void 0:l.debouncedNotificationMethods)??[]).includes(e.method)&&!e.params&&!(n!=null&&n.relatedRequestId)&&!(n!=null&&n.relatedTask)){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{var f,h;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let d={...e,jsonrpc:"2.0"};n!=null&&n.relatedTask&&(d={...d,params:{...d.params,_meta:{...((f=d.params)==null?void 0:f._meta)||{},[Or]:n.relatedTask}}}),(h=this._transport)==null||h.send(d,n).catch(y=>this._onerror(y))});return}let s={...e,jsonrpc:"2.0"};n!=null&&n.relatedTask&&(s={...s,params:{...s.params,_meta:{...((p=s.params)==null?void 0:p._meta)||{},[Or]:n.relatedTask}}}),await this._transport.send(s,n)}setRequestHandler(e,n){let r=of(e);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(o,i)=>{let s=sf(e,o);return Promise.resolve(n(s,i))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,n){let r=of(e);this._notificationHandlers.set(r,o=>{let i=sf(e,o);return Promise.resolve(n(i))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let n=this._taskProgressTokens.get(e);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,n,r){var i;if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let o=(i=this._options)==null?void 0:i.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,n,r,o)}async _clearTaskQueue(e,n){if(this._taskMessageQueue){let r=await this._taskMessageQueue.dequeueAll(e,n);for(let o of r)if(o.type==="request"&&Dd(o.message)){let i=o.message.id,s=this._requestResolvers.get(i);s?(s(new te(se.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,n){var o,i;let r=((o=this._options)==null?void 0:o.defaultTaskPollInterval)??1e3;try{let s=await((i=this._taskStore)==null?void 0:i.getTask(e));s!=null&&s.pollInterval&&(r=s.pollInterval)}catch{}return new Promise((s,a)=>{if(n.aborted){a(new te(se.InvalidRequest,"Request cancelled"));return}let c=setTimeout(s,r);n.addEventListener("abort",()=>{clearTimeout(c),a(new te(se.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,n){let r=this._taskStore;if(!r)throw new Error("No task store configured");return{createTask:async o=>{if(!e)throw new Error("No request provided");return await r.createTask(o,e.id,{method:e.method,params:e.params},n)},getTask:async o=>{let i=await r.getTask(o,n);if(!i)throw new te(se.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(o,i,s)=>{await r.storeTaskResult(o,i,s,n);let a=await r.getTask(o,n);if(a){let c=Es.parse({method:"notifications/tasks/status",params:a});await this.notification(c),zr(a.status)&&this._cleanupTaskProgressHandler(o)}},getTaskResult:o=>r.getTaskResult(o,n),updateTaskStatus:async(o,i,s)=>{let a=await r.getTask(o,n);if(!a)throw new te(se.InvalidParams,`Task "${o}" not found - it may have been cleaned up`);if(zr(a.status))throw new te(se.InvalidParams,`Cannot update task "${o}" from terminal status "${a.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await r.updateTaskStatus(o,i,s,n);let c=await r.getTask(o,n);if(c){let l=Es.parse({method:"notifications/tasks/status",params:c});await this.notification(l),zr(c.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>r.listTasks(o,n)}}};function vb(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function bb(t,e){let n={...t};for(let r in e){let o=r,i=e[o];if(i===void 0)continue;let s=n[o];vb(s)&&vb(i)?n[o]={...s,...i}:n[o]=i}return n}var u0=Ee(Vm(),1),p0=Ee(l0(),1);function oD(){let t=new u0.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,p0.default)(t),t}var bl=class{constructor(e){this._ajv=e??oD()}getValidator(e){let n="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return r=>n(r)?{valid:!0,data:r,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(n.errors)}}};var _l=class{constructor(e){this._server=e}requestStream(e,n,r){return this._server.requestStream(e,n,r)}createMessageStream(e,n){var o;let r=this._server.getClientCapabilities();if((e.tools||e.toolChoice)&&!((o=r==null?void 0:r.sampling)!=null&&o.tools))throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages[e.messages.length-1],s=Array.isArray(i.content)?i.content:[i.content],a=s.some(d=>d.type==="tool_result"),c=e.messages.length>1?e.messages[e.messages.length-2]:void 0,l=c?Array.isArray(c.content)?c.content:[c.content]:[],p=l.some(d=>d.type==="tool_use");if(a){if(s.some(d=>d.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!p)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(p){let d=new Set(l.filter(h=>h.type==="tool_use").map(h=>h.id)),f=new Set(s.filter(h=>h.type==="tool_result").map(h=>h.toolUseId));if(d.size!==f.size||![...d].every(h=>f.has(h)))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:e},As,n)}elicitInputStream(e,n){var s,a;let r=this._server.getClientCapabilities(),o=e.mode??"form";switch(o){case"url":{if(!((s=r==null?void 0:r.elicitation)!=null&&s.url))throw new Error("Client does not support url elicitation.");break}case"form":{if(!((a=r==null?void 0:r.elicitation)!=null&&a.form))throw new Error("Client does not support form elicitation.");break}}let i=o==="form"&&e.mode===void 0?{...e,mode:"form"}:e;return this.requestStream({method:"elicitation/create",params:i},fi,n)}async getTask(e,n){return this._server.getTask({taskId:e},n)}async getTaskResult(e,n,r){return this._server.getTaskResult({taskId:e},n,r)}async listTasks(e,n){return this._server.listTasks(e?{cursor:e}:void 0,n)}async cancelTask(e,n){return this._server.cancelTask({taskId:e},n)}};function d0(t,e,n){var r;if(!t)throw new Error(`${n} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!((r=t.tools)!=null&&r.call))throw new Error(`${n} does not support task creation for tools/call (required for ${e})`);break;default:break}}function f0(t,e,n){var r,o;if(!t)throw new Error(`${n} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!((r=t.sampling)!=null&&r.createMessage))throw new Error(`${n} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!((o=t.elicitation)!=null&&o.create))throw new Error(`${n} does not support task creation for elicitation/create (required for ${e})`);break;default:break}}var wl=class extends Lc{constructor(e,n){super(n),this._serverInfo=e,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Rs.options.map((r,o)=>[r,o])),this.isMessageIgnored=(r,o)=>{let i=this._loggingLevels.get(o);return i?this.LOG_LEVEL_SEVERITY.get(r)<this.LOG_LEVEL_SEVERITY.get(i):!1},this._capabilities=(n==null?void 0:n.capabilities)??{},this._instructions=n==null?void 0:n.instructions,this._jsonSchemaValidator=(n==null?void 0:n.jsonSchemaValidator)??new bl,this.setRequestHandler(Ud,r=>this._oninitialize(r)),this.setNotificationHandler(qd,()=>{var r;return(r=this.oninitialized)==null?void 0:r.call(this)}),this._capabilities.logging&&this.setRequestHandler(Kd,async(r,o)=>{var c;let i=o.sessionId||((c=o.requestInfo)==null?void 0:c.headers["mcp-session-id"])||void 0,{level:s}=r.params,a=Rs.safeParse(s);return a.success&&this._loggingLevels.set(i,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new _l(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=bb(this._capabilities,e)}setRequestHandler(e,n){let r=Ir(e),o=r==null?void 0:r.method;if(!o)throw new Error("Schema is missing a method literal");let i=ci(o);if(typeof i!="string")throw new Error("Schema method literal must be a string");if(i==="tools/call"){let a=async(c,l)=>{let p=Cr(di,c);if(!p.success){let y=p.error instanceof Error?p.error.message:String(p.error);throw new te(se.InvalidParams,`Invalid tools/call request: ${y}`)}let{params:d}=p.data,f=await Promise.resolve(n(c,l));if(d.task){let y=Cr(ui,f);if(!y.success){let b=y.error instanceof Error?y.error.message:String(y.error);throw new te(se.InvalidParams,`Invalid task creation result: ${b}`)}return y.data}let h=Cr(Cc,f);if(!h.success){let y=h.error instanceof Error?h.error.message:String(h.error);throw new te(se.InvalidParams,`Invalid tools/call result: ${y}`)}return h.data};return super.setRequestHandler(e,a)}return super.setRequestHandler(e,n)}assertCapabilityForMethod(e){var n,r,o;switch(e){case"sampling/createMessage":if(!((n=this._clientCapabilities)!=null&&n.sampling))throw new Error(`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!((r=this._clientCapabilities)!=null&&r.elicitation))throw new Error(`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!((o=this._clientCapabilities)!=null&&o.roots))throw new Error(`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){var n,r;switch(e){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${e})`);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 ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!((r=(n=this._clientCapabilities)==null?void 0:n.elicitation)!=null&&r.url))throw new Error(`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${e})`);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 ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${e})`);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 ${e})`);break;case"ping":case"initialize":break}}assertTaskCapability(e){var n,r;f0((r=(n=this._clientCapabilities)==null?void 0:n.tasks)==null?void 0:r.requests,e,"Client")}assertTaskHandlerCapability(e){var n;this._capabilities&&d0((n=this._capabilities.tasks)==null?void 0:n.requests,e,"Server")}async _oninitialize(e){let n=e.params.protocolVersion;return this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo,{protocolVersion:Sv.includes(n)?n:jd,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"},hc)}async createMessage(e,n){var r,o;if((e.tools||e.toolChoice)&&!((o=(r=this._clientCapabilities)==null?void 0:r.sampling)!=null&&o.tools))throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages[e.messages.length-1],s=Array.isArray(i.content)?i.content:[i.content],a=s.some(d=>d.type==="tool_result"),c=e.messages.length>1?e.messages[e.messages.length-2]:void 0,l=c?Array.isArray(c.content)?c.content:[c.content]:[],p=l.some(d=>d.type==="tool_use");if(a){if(s.some(d=>d.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!p)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(p){let d=new Set(l.filter(h=>h.type==="tool_use").map(h=>h.id)),f=new Set(s.filter(h=>h.type==="tool_result").map(h=>h.toolUseId));if(d.size!==f.size||![...d].every(h=>f.has(h)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return e.tools?this.request({method:"sampling/createMessage",params:e},Jd,n):this.request({method:"sampling/createMessage",params:e},As,n)}async elicitInput(e,n){var o,i,s,a;switch(e.mode??"form"){case"url":{if(!((i=(o=this._clientCapabilities)==null?void 0:o.elicitation)!=null&&i.url))throw new Error("Client does not support url elicitation.");let c=e;return this.request({method:"elicitation/create",params:c},fi,n)}case"form":{if(!((a=(s=this._clientCapabilities)==null?void 0:s.elicitation)!=null&&a.form))throw new Error("Client does not support form elicitation.");let c=e.mode==="form"?e:{...e,mode:"form"},l=await this.request({method:"elicitation/create",params:c},fi,n);if(l.action==="accept"&&l.content&&c.requestedSchema)try{let d=this._jsonSchemaValidator.getValidator(c.requestedSchema)(l.content);if(!d.valid)throw new te(se.InvalidParams,`Elicitation response content does not match requested schema: ${d.errorMessage}`)}catch(p){throw p instanceof te?p:new te(se.InternalError,`Error validating elicitation response: ${p instanceof Error?p.message:String(p)}`)}return l}}}createElicitationCompletionNotifier(e,n){var r,o;if(!((o=(r=this._clientCapabilities)==null?void 0:r.elicitation)!=null&&o.url))throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},n)}async listRoots(e,n){return this.request({method:"roots/list",params:e},Yd,n)}async sendLoggingMessage(e,n){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,n))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}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 h0=Symbol.for("mcp.completable");function eh(t){return!!t&&typeof t=="object"&&h0 in t}function g0(t){let e=t[h0];return e==null?void 0:e.complete}var m0;(function(t){t.Completable="McpCompletable"})(m0||(m0={}));var iD=/^[A-Za-z0-9._-]{1,128}$/;function sD(t){let e=[];if(t.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(t.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${t.length})`]};if(t.includes(" ")&&e.push("Tool name contains spaces, which may cause parsing issues"),t.includes(",")&&e.push("Tool name contains commas, which may cause parsing issues"),(t.startsWith("-")||t.endsWith("-"))&&e.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(t.startsWith(".")||t.endsWith("."))&&e.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!iD.test(t)){let n=t.split("").filter(r=>!/[A-Za-z0-9._-]/.test(r)).filter((r,o,i)=>i.indexOf(r)===o);return e.push(`Tool name contains invalid characters: ${n.map(r=>`"${r}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:e}}return{isValid:!0,warnings:e}}function aD(t,e){if(e.length>0){console.warn(`Tool name validation warning for "${t}":`);for(let n of e)console.warn(` - ${n}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function th(t){let e=sD(t);return aD(t,e.warnings),e.isValid}var Sl=class{constructor(e){this._mcpServer=e}registerToolTask(e,n,r){let o={taskSupport:"required",...n.execution};if(o.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${e}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(e,n.title,n.description,n.inputSchema,n.outputSchema,n.annotations,o,n._meta,r)}};var kl=class{constructor(e,n){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new wl(e,n)}get experimental(){return this._experimental||(this._experimental={tasks:new Sl(this)}),this._experimental}async connect(e){return await this.server.connect(e)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(Zr(Pc)),this.server.assertCanSetRequestHandler(Zr(di)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(Pc,()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,n])=>{let r={name:e,title:n.title,description:n.description,inputSchema:(()=>{let o=ai(n.inputSchema);return o?rf(o,{strictUnions:!0,pipeStrategy:"input"}):cD})(),annotations:n.annotations,execution:n.execution,_meta:n._meta};if(n.outputSchema){let o=ai(n.outputSchema);o&&(r.outputSchema=rf(o,{strictUnions:!0,pipeStrategy:"output"}))}return r})})),this.server.setRequestHandler(di,async(e,n)=>{var r;try{let o=this._registeredTools[e.params.name];if(!o)throw new te(se.InvalidParams,`Tool ${e.params.name} not found`);if(!o.enabled)throw new te(se.InvalidParams,`Tool ${e.params.name} disabled`);let i=!!e.params.task,s=(r=o.execution)==null?void 0:r.taskSupport,a="createTask"in o.handler;if((s==="required"||s==="optional")&&!a)throw new te(se.InternalError,`Tool ${e.params.name} has taskSupport '${s}' but was not registered with registerToolTask`);if(s==="required"&&!i)throw new te(se.MethodNotFound,`Tool ${e.params.name} requires task augmentation (taskSupport: 'required')`);if(s==="optional"&&!i&&a)return await this.handleAutomaticTaskPolling(o,e,n);let c=await this.validateToolInput(o,e.params.arguments,e.params.name),l=await this.executeToolHandler(o,c,n);return i||await this.validateToolOutput(o,l,e.params.name),l}catch(o){if(o instanceof te&&o.code===se.UrlElicitationRequired)throw o;return this.createToolError(o instanceof Error?o.message:String(o))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,n,r){if(!e.inputSchema)return;let i=ai(e.inputSchema)??e.inputSchema,s=await cc(i,n);if(!s.success){let a="error"in s?s.error:"Unknown error",c=lc(a);throw new te(se.InvalidParams,`Input validation error: Invalid arguments for tool ${r}: ${c}`)}return s.data}async validateToolOutput(e,n,r){if(!e.outputSchema||!("content"in n)||n.isError)return;if(!n.structuredContent)throw new te(se.InvalidParams,`Output validation error: Tool ${r} has an output schema but no structured content was provided`);let o=ai(e.outputSchema),i=await cc(o,n.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",a=lc(s);throw new te(se.InvalidParams,`Output validation error: Invalid structured content for tool ${r}: ${a}`)}}async executeToolHandler(e,n,r){let o=e.handler;if("createTask"in o){if(!r.taskStore)throw new Error("No task store provided.");let s={...r,taskStore:r.taskStore};if(e.inputSchema){let a=o;return await Promise.resolve(a.createTask(n,s))}else{let a=o;return await Promise.resolve(a.createTask(s))}}if(e.inputSchema){let s=o;return await Promise.resolve(s(n,r))}else{let s=o;return await Promise.resolve(s(r))}}async handleAutomaticTaskPolling(e,n,r){if(!r.taskStore)throw new Error("No task store provided for task-capable tool.");let o=await this.validateToolInput(e,n.params.arguments,n.params.name),i=e.handler,s={...r,taskStore:r.taskStore},a=o?await Promise.resolve(i.createTask(o,s)):await Promise.resolve(i.createTask(s)),c=a.task.taskId,l=a.task,p=l.pollInterval??5e3;for(;l.status!=="completed"&&l.status!=="failed"&&l.status!=="cancelled";){await new Promise(f=>setTimeout(f,p));let d=await r.taskStore.getTask(c);if(!d)throw new te(se.InternalError,`Task ${c} not found during polling`);l=d}return await r.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(Zr(Ic)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(Ic,async e=>{switch(e.params.ref.type){case"ref/prompt":return Mv(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return Fv(e),this.handleResourceCompletion(e,e.params.ref);default:throw new te(se.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,n){let r=this._registeredPrompts[n.name];if(!r)throw new te(se.InvalidParams,`Prompt ${n.name} not found`);if(!r.enabled)throw new te(se.InvalidParams,`Prompt ${n.name} disabled`);if(!r.argsSchema)return sa;let o=Ir(r.argsSchema),i=o==null?void 0:o[e.params.argument.name];if(!eh(i))return sa;let s=g0(i);if(!s)return sa;let a=await s(e.params.argument.value,e.params.context);return x0(a)}async handleResourceCompletion(e,n){let r=Object.values(this._registeredResourceTemplates).find(s=>s.resourceTemplate.uriTemplate.toString()===n.uri);if(!r){if(this._registeredResources[n.uri])return sa;throw new te(se.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let o=r.resourceTemplate.completeCallback(e.params.argument.name);if(!o)return sa;let i=await o(e.params.argument.value,e.params.context);return x0(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(Zr(Tc)),this.server.assertCanSetRequestHandler(Zr(Ec)),this.server.assertCanSetRequestHandler(Zr($c)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(Tc,async(e,n)=>{let r=Object.entries(this._registeredResources).filter(([i,s])=>s.enabled).map(([i,s])=>({uri:i,name:s.name,...s.metadata})),o=[];for(let i of Object.values(this._registeredResourceTemplates)){if(!i.resourceTemplate.listCallback)continue;let s=await i.resourceTemplate.listCallback(n);for(let a of s.resources)o.push({...i.metadata,...a})}return{resources:[...r,...o]}}),this.server.setRequestHandler(Ec,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([n,r])=>({name:n,uriTemplate:r.resourceTemplate.uriTemplate.toString(),...r.metadata}))})),this.server.setRequestHandler($c,async(e,n)=>{let r=new URL(e.params.uri),o=this._registeredResources[r.toString()];if(o){if(!o.enabled)throw new te(se.InvalidParams,`Resource ${r} disabled`);return o.readCallback(r,n)}for(let i of Object.values(this._registeredResourceTemplates)){let s=i.resourceTemplate.uriTemplate.match(r.toString());if(s)return i.readCallback(r,s,n)}throw new te(se.InvalidParams,`Resource ${r} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(Zr(Rc)),this.server.assertCanSetRequestHandler(Zr(Ac)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(Rc,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,n])=>({name:e,title:n.title,description:n.description,arguments:n.argsSchema?lD(n.argsSchema):void 0}))})),this.server.setRequestHandler(Ac,async(e,n)=>{let r=this._registeredPrompts[e.params.name];if(!r)throw new te(se.InvalidParams,`Prompt ${e.params.name} not found`);if(!r.enabled)throw new te(se.InvalidParams,`Prompt ${e.params.name} disabled`);if(r.argsSchema){let o=ai(r.argsSchema),i=await cc(o,e.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",l=lc(c);throw new te(se.InvalidParams,`Invalid arguments for prompt ${e.params.name}: ${l}`)}let s=i.data,a=r.callback;return await Promise.resolve(a(s,n))}else{let o=r.callback;return await Promise.resolve(o(n))}}),this._promptHandlersInitialized=!0)}resource(e,n,...r){let o;typeof r[0]=="object"&&(o=r.shift());let i=r[0];if(typeof n=="string"){if(this._registeredResources[n])throw new Error(`Resource ${n} is already registered`);let s=this._createRegisteredResource(e,void 0,n,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let s=this._createRegisteredResourceTemplate(e,void 0,n,o,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}registerResource(e,n,r,o){if(typeof n=="string"){if(this._registeredResources[n])throw new Error(`Resource ${n} is already registered`);let i=this._createRegisteredResource(e,r.title,n,r,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let i=this._createRegisteredResourceTemplate(e,r.title,n,r,o);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}}_createRegisteredResource(e,n,r,o,i){let s={name:e,title:n,metadata:o,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({uri:null}),update:a=>{typeof a.uri<"u"&&a.uri!==r&&(delete this._registeredResources[r],a.uri&&(this._registeredResources[a.uri]=s)),typeof a.name<"u"&&(s.name=a.name),typeof a.title<"u"&&(s.title=a.title),typeof a.metadata<"u"&&(s.metadata=a.metadata),typeof a.callback<"u"&&(s.readCallback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendResourceListChanged()}};return this._registeredResources[r]=s,s}_createRegisteredResourceTemplate(e,n,r,o,i){let s={resourceTemplate:r,title:n,metadata:o,readCallback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:l=>{typeof l.name<"u"&&l.name!==e&&(delete this._registeredResourceTemplates[e],l.name&&(this._registeredResourceTemplates[l.name]=s)),typeof l.title<"u"&&(s.title=l.title),typeof l.template<"u"&&(s.resourceTemplate=l.template),typeof l.metadata<"u"&&(s.metadata=l.metadata),typeof l.callback<"u"&&(s.readCallback=l.callback),typeof l.enabled<"u"&&(s.enabled=l.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=s;let a=r.uriTemplate.variableNames;return Array.isArray(a)&&a.some(l=>!!r.completeCallback(l))&&this.setCompletionRequestHandler(),s}_createRegisteredPrompt(e,n,r,o,i){let s={title:n,description:r,argsSchema:o===void 0?void 0:ko(o),callback:i,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:a=>{typeof a.name<"u"&&a.name!==e&&(delete this._registeredPrompts[e],a.name&&(this._registeredPrompts[a.name]=s)),typeof a.title<"u"&&(s.title=a.title),typeof a.description<"u"&&(s.description=a.description),typeof a.argsSchema<"u"&&(s.argsSchema=ko(a.argsSchema)),typeof a.callback<"u"&&(s.callback=a.callback),typeof a.enabled<"u"&&(s.enabled=a.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[e]=s,o&&Object.values(o).some(c=>{var p;let l=c instanceof an?(p=c._def)==null?void 0:p.innerType:c;return eh(l)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(e,n,r,o,i,s,a,c,l){th(e);let p={title:n,description:r,inputSchema:y0(o),outputSchema:y0(i),annotations:s,execution:a,_meta:c,handler:l,enabled:!0,disable:()=>p.update({enabled:!1}),enable:()=>p.update({enabled:!0}),remove:()=>p.update({name:null}),update:d=>{typeof d.name<"u"&&d.name!==e&&(typeof d.name=="string"&&th(d.name),delete this._registeredTools[e],d.name&&(this._registeredTools[d.name]=p)),typeof d.title<"u"&&(p.title=d.title),typeof d.description<"u"&&(p.description=d.description),typeof d.paramsSchema<"u"&&(p.inputSchema=ko(d.paramsSchema)),typeof d.outputSchema<"u"&&(p.outputSchema=ko(d.outputSchema)),typeof d.callback<"u"&&(p.handler=d.callback),typeof d.annotations<"u"&&(p.annotations=d.annotations),typeof d._meta<"u"&&(p._meta=d._meta),typeof d.enabled<"u"&&(p.enabled=d.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=p,this.setToolRequestHandlers(),this.sendToolListChanged(),p}tool(e,...n){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let r,o,i,s;if(typeof n[0]=="string"&&(r=n.shift()),n.length>1){let c=n[0];if(nh(c))o=n.shift(),n.length>1&&typeof n[0]=="object"&&n[0]!==null&&!nh(n[0])&&(s=n.shift());else if(typeof c=="object"&&c!==null){if(Object.values(c).some(l=>typeof l=="object"&&l!==null))throw new Error(`Tool ${e} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);s=n.shift()}}let a=n[0];return this._createRegisteredTool(e,void 0,r,o,i,s,{taskSupport:"forbidden"},void 0,a)}registerTool(e,n,r){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:o,description:i,inputSchema:s,outputSchema:a,annotations:c,_meta:l}=n;return this._createRegisteredTool(e,o,i,s,a,c,{taskSupport:"forbidden"},l,r)}prompt(e,...n){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let r;typeof n[0]=="string"&&(r=n.shift());let o;n.length>1&&(o=n.shift());let i=n[0],s=this._createRegisteredPrompt(e,void 0,r,o,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}registerPrompt(e,n,r){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:o,description:i,argsSchema:s}=n,a=this._createRegisteredPrompt(e,o,i,s,r);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(e,n){return this.server.sendLoggingMessage(e,n)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}};var cD={type:"object",properties:{}};function v0(t){return t!==null&&typeof t=="object"&&"parse"in t&&typeof t.parse=="function"&&"safeParse"in t&&typeof t.safeParse=="function"}function b0(t){return"_def"in t||"_zod"in t||v0(t)}function nh(t){return typeof t!="object"||t===null||b0(t)?!1:Object.keys(t).length===0?!0:Object.values(t).some(v0)}function y0(t){if(t){if(nh(t))return ko(t);if(!b0(t))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return t}}function lD(t){let e=Ir(t);return e?Object.entries(e).map(([n,r])=>{let o=Qx(r),i=ev(r);return{name:n,description:o,required:!i}}):[]}function Zr(t){let e=Ir(t),n=e==null?void 0:e.method;if(!n)throw new Error("Schema is missing a method literal");let r=ci(n);if(typeof r=="string")return r;throw new Error("Schema method literal must be a string")}function x0(t){return{completion:{values:t.slice(0,100),total:t.length,hasMore:t.length>100}}}var sa={completion:{values:[],hasMore:!1}};var rh=Ee(require("node:process"),1);var uD=10*1024*1024,Tl=class{constructor(e){this._maxBufferSize=(e==null?void 0:e.maxBufferSize)??uD}append(e){var r;if((((r=this._buffer)==null?void 0:r.length)??0)+e.length>this._maxBufferSize)throw this.clear(),new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
|
|
54
|
+
`);if(e===-1)return null;let n=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),pD(n)}clear(){this._buffer=void 0}};function pD(t){return Cv.parse(JSON.parse(t))}function _0(t){return JSON.stringify(t)+`
|
|
55
|
+
`}var El=class{constructor(e=rh.default.stdin,n=rh.default.stdout,r){this._stdin=e,this._stdout=n,this._started=!1,this._ondata=o=>{var i;try{this._readBuffer.append(o),this.processReadBuffer()}catch(s){(i=this.onerror)==null||i.call(this,s),this.close().catch(()=>{})}},this._onerror=o=>{var i;(i=this.onerror)==null||i.call(this,o)},this._readBuffer=new Tl({maxBufferSize:r==null?void 0:r.maxBufferSize})}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(){var e,n;for(;;)try{let r=this._readBuffer.readMessage();if(r===null)break;(e=this.onmessage)==null||e.call(this,r)}catch(r){(n=this.onerror)==null||n.call(this,r)}}async close(){var n;this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),(n=this.onclose)==null||n.call(this)}send(e){return new Promise(n=>{let r=_0(e);this._stdout.write(r)?n():this._stdout.once("drain",n)})}};var aa=null;function dD(){let t=(process.env.MG_NO_PREFIX??"").toLowerCase();return t==="1"||t==="true"||t==="yes"}function fD(){return aa!==null||(aa=dD()),aa}function w0(t){t!==void 0&&(aa=t)}function oh(){return fD()}function S0(){return oh()?"":"mcp__"}function kt(t){return`${S0()}${t}`}function rn(t){let e=S0();return e==="mcp__"?t:t.replace(/mcp__/g,e)}var ht=class{register(e){e.tool(this.name,rn(this.description),this.schema.shape,this.execute.bind(this))}normalizeFileId(e){return e&&e.replace(/^file\//,"")}};function ca(t,e){return function(){return t.apply(e,arguments)}}var{toString:mD}=Object.prototype,{getPrototypeOf:Ci}=Object,{iterator:ua,toStringTag:E0}=Symbol,Rl=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),la=(t,e)=>{let n=t,r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Rl(n,e))return!0;n=Ci(n)}return!1},hD=(t,e)=>t!=null&&la(t,e)?t[e]:void 0,sh=(t=>e=>{let n=mD.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Bn=t=>(t=t.toLowerCase(),e=>sh(e)===t),Al=t=>e=>typeof e===t,{isArray:Lo}=Array,Ii=Al("undefined");function Oi(t){return t!==null&&!Ii(t)&&t.constructor!==null&&!Ii(t.constructor)&&mn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var $0=Bn("ArrayBuffer");function gD(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&$0(t.buffer),e}var yD=Al("string"),mn=Al("function"),R0=Al("number"),zi=t=>t!==null&&typeof t=="object",xD=t=>t===!0||t===!1,$l=t=>{if(!zi(t))return!1;let e=Ci(t);return(e===null||e===Object.prototype||Ci(e)===null)&&!la(t,E0)&&!la(t,ua)},vD=t=>{if(!zi(t)||Oi(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},bD=Bn("Date"),_D=Bn("File"),wD=t=>!!(t&&typeof t.uri<"u"),SD=t=>t&&typeof t.getParts<"u",kD=Bn("Blob"),TD=Bn("FileList"),ED=t=>zi(t)&&mn(t.pipe);function $D(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var k0=$D(),T0=typeof k0.FormData<"u"?k0.FormData:void 0,RD=t=>{if(!t)return!1;if(T0&&t instanceof T0)return!0;let e=Ci(t);if(!e||e===Object.prototype||!mn(t.append))return!1;let n=sh(t);return n==="formdata"||n==="object"&&mn(t.toString)&&t.toString()==="[object FormData]"},AD=Bn("URLSearchParams"),[PD,CD,ID,OD]=["ReadableStream","Request","Response","Headers"].map(Bn),zD=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function pa(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),Lo(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{if(Oi(t))return;let i=n?Object.getOwnPropertyNames(t):Object.keys(t),s=i.length,a;for(r=0;r<s;r++)a=i[r],e.call(null,t[a],a,t)}}function A0(t,e){if(Oi(t))return null;e=e.toLowerCase();let n=Object.keys(t),r=n.length,o;for(;r-- >0;)if(o=n[r],e===o.toLowerCase())return o;return null}var jo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,P0=t=>!Ii(t)&&t!==jo;function ih(...t){let{caseless:e,skipUndefined:n}=P0(this)&&this||{},r={},o=(i,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;let a=e&&typeof s=="string"&&A0(r,s)||s,c=Rl(r,a)?r[a]:void 0;$l(c)&&$l(i)?r[a]=ih(c,i):$l(i)?r[a]=ih({},i):Lo(i)?r[a]=i.slice():(!n||!Ii(i))&&(r[a]=i)};for(let i=0,s=t.length;i<s;i++){let a=t[i];if(!a||Oi(a)||(pa(a,o),typeof a!="object"||Lo(a)))continue;let c=Object.getOwnPropertySymbols(a);for(let l=0;l<c.length;l++){let p=c[l];VD.call(a,p)&&o(a[p],p)}}return r}var ND=(t,e,n,{allOwnKeys:r}={})=>(pa(e,(o,i)=>{n&&mn(o)?Object.defineProperty(t,i,{__proto__:null,value:ca(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,i,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),jD=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),LD=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{__proto__:null,value:e.prototype}),n&&Object.assign(t.prototype,n)},DD=(t,e,n,r)=>{let o,i,s,a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&Ci(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},MD=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;let r=t.indexOf(e,n);return r!==-1&&r===n},FD=t=>{if(!t)return null;if(Lo(t))return t;let e=t.length;if(!R0(e))return null;let n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},UD=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ci(Uint8Array)),qD=(t,e)=>{let r=(t&&t[ua]).call(t),o;for(;(o=r.next())&&!o.done;){let i=o.value;e.call(t,i[0],i[1])}},ZD=(t,e)=>{let n,r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},BD=Bn("HTMLFormElement"),HD=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),{propertyIsEnumerable:VD}=Object.prototype,GD=Bn("RegExp"),C0=(t,e)=>{let n=Object.getOwnPropertyDescriptors(t),r={};pa(n,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(r[i]=s||o)}),Object.defineProperties(t,r)},WD=t=>{C0(t,(e,n)=>{if(mn(t)&&["arguments","caller","callee"].includes(n))return!1;let r=t[n];if(mn(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},KD=(t,e)=>{let n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Lo(t)?r(t):r(String(t).split(e)),n},JD=()=>{},YD=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function XD(t){return!!(t&&mn(t.append)&&t[E0]==="FormData"&&t[ua])}var QD=t=>{let e=new WeakSet,n=r=>{if(zi(r)){if(e.has(r))return;if(Oi(r))return r;if(!("toJSON"in r)){e.add(r);let o=Lo(r)?[]:{};return pa(r,(i,s)=>{let a=n(i);!Ii(a)&&(o[s]=a)}),e.delete(r),o}}return r};return n(t)},eM=Bn("AsyncFunction"),tM=t=>t&&(zi(t)||mn(t))&&mn(t.then)&&mn(t.catch),I0=((t,e)=>t?setImmediate:e?((n,r)=>(jo.addEventListener("message",({source:o,data:i})=>{o===jo&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),jo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",mn(jo.postMessage)),nM=typeof queueMicrotask<"u"?queueMicrotask.bind(jo):typeof process<"u"&&process.nextTick||I0,O0=t=>t!=null&&mn(t[ua]),rM=t=>t!=null&&la(t,ua)&&O0(t),_={isArray:Lo,isArrayBuffer:$0,isBuffer:Oi,isFormData:RD,isArrayBufferView:gD,isString:yD,isNumber:R0,isBoolean:xD,isObject:zi,isPlainObject:$l,isEmptyObject:vD,isReadableStream:PD,isRequest:CD,isResponse:ID,isHeaders:OD,isUndefined:Ii,isDate:bD,isFile:_D,isReactNativeBlob:wD,isReactNative:SD,isBlob:kD,isRegExp:GD,isFunction:mn,isStream:ED,isURLSearchParams:AD,isTypedArray:UD,isFileList:TD,forEach:pa,merge:ih,extend:ND,trim:zD,stripBOM:jD,inherits:LD,toFlatObject:DD,kindOf:sh,kindOfTest:Bn,endsWith:MD,toArray:FD,forEachEntry:qD,matchAll:ZD,isHTMLForm:BD,hasOwnProperty:Rl,hasOwnProp:Rl,hasOwnInPrototypeChain:la,getSafeProp:hD,reduceDescriptors:C0,freezeMethods:WD,toObjectSet:KD,toCamelCase:HD,noop:JD,toFiniteNumber:YD,findKey:A0,global:jo,isContextDefined:P0,isSpecCompliantForm:XD,toJSONObject:QD,isAsyncFn:eM,isThenable:tM,setImmediate:I0,asap:nM,isIterable:O0,isSafeIterable:rM};var oM=_.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),z0=t=>{let e={},n,r,o;return t&&t.split(`
|
|
56
|
+
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||e[n]&&oM[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};function iM(t){let e=0,n=t.length;for(;e<n;){let r=t.charCodeAt(e);if(r!==9&&r!==32)break;e+=1}for(;n>e;){let r=t.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return e===0&&n===t.length?t:t.slice(e,n)}var sM=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),aM=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ah(t,e){return _.isArray(t)?t.map(n=>ah(n,e)):iM(String(t).replace(e,""))}var N0=t=>ah(t,sM),cM=t=>ah(t,aM);function Ni(t){let e=Object.create(null);return _.forEach(t.toJSON(),(n,r)=>{e[r]=cM(n)}),e}var j0=Symbol("internals");function da(t){return t&&String(t).trim().toLowerCase()}function Pl(t){return t===!1||t==null?t:_.isArray(t)?t.map(Pl):N0(String(t))}function lM(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}var uM=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ch(t,e,n,r,o){if(_.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!_.isString(e)){if(_.isString(r))return e.indexOf(r)!==-1;if(_.isRegExp(r))return r.test(e)}}function pM(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function dM(t,e){let n=_.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{__proto__:null,value:function(o,i,s){return this[r].call(this,e,o,i,s)},configurable:!0})})}var ji=class{constructor(e){e&&this.set(e)}set(e,n,r){let o=this;function i(a,c,l){let p=da(c);if(!p)return;let d=_.findKey(o,p);(!d||o[d]===void 0||l===!0||l===void 0&&o[d]!==!1)&&(o[d||c]=Pl(a))}let s=(a,c)=>_.forEach(a,(l,p)=>i(l,p,c));if(_.isPlainObject(e)||e instanceof this.constructor)s(e,n);else if(_.isString(e)&&(e=e.trim())&&!uM(e))s(z0(e),n);else if(_.isObject(e)&&_.isSafeIterable(e)){let a=Object.create(null),c,l;for(let p of e){if(!_.isArray(p))throw new TypeError("Object iterator must return a key-value pair");l=p[0],_.hasOwnProp(a,l)?(c=a[l],a[l]=_.isArray(c)?[...c,p[1]]:[c,p[1]]):a[l]=p[1]}s(a,n)}else e!=null&&i(n,e,r);return this}get(e,n){if(e=da(e),e){let r=_.findKey(this,e);if(r){let o=this[r];if(!n)return o;if(n===!0)return lM(o);if(_.isFunction(n))return n.call(this,o,r);if(_.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=da(e),e){let r=_.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||ch(this,this[r],r,n)))}return!1}delete(e,n){let r=this,o=!1;function i(s){if(s=da(s),s){let a=_.findKey(r,s);a&&(!n||ch(r,r[a],a,n))&&(delete r[a],o=!0)}}return _.isArray(e)?e.forEach(i):i(e),o}clear(e){let n=Object.keys(this),r=n.length,o=!1;for(;r--;){let i=n[r];(!e||ch(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){let n=this,r={};return _.forEach(this,(o,i)=>{let s=_.findKey(r,i);if(s){n[s]=Pl(o),delete n[i];return}let a=e?pM(i):String(i).trim();a!==i&&delete n[i],n[a]=Pl(o),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return _.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&_.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
57
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){let r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){let r=(this[j0]=this[j0]={accessors:{}}).accessors,o=this.prototype;function i(s){let a=da(s);r[a]||(dM(o,s),r[a]=!0)}return _.isArray(e)?e.forEach(i):i(e),this}};ji.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_.reduceDescriptors(ji.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});_.freezeMethods(ji);var rt=ji;var fM="[REDACTED ****]";function mM(t){if(_.hasOwnProp(t,"toJSON"))return!0;let e=Object.getPrototypeOf(t);for(;e&&e!==Object.prototype;){if(_.hasOwnProp(e,"toJSON"))return!0;e=Object.getPrototypeOf(e)}return!1}function hM(t,e){let n=new Set(e.map(i=>String(i).toLowerCase())),r=[],o=i=>{if(i===null||typeof i!="object"||_.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof rt&&(i=i.toJSON()),r.push(i);let s;if(_.isArray(i))s=[],i.forEach((a,c)=>{let l=o(a);_.isUndefined(l)||(s[c]=l)});else{if(!_.isPlainObject(i)&&mM(i))return r.pop(),i;s=Object.create(null);for(let[a,c]of Object.entries(i)){let l=n.has(a.toLowerCase())?fM:o(c);_.isUndefined(l)||(s[a]=l)}}return r.pop(),s};return o(t)}var qt=class t extends Error{static from(e,n,r,o,i,s){let a=new t(e.message,n||e.code,r,o,i);return Object.defineProperty(a,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),a.name=e.name,e.status!=null&&a.status==null&&(a.status=e.status),s&&Object.assign(a,s),a}constructor(e,n,r,o,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,n=e&&_.hasOwnProp(e,"redact")?e.redact:void 0,r=_.isArray(n)&&n.length>0?hM(e,n):_.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};qt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";qt.ERR_BAD_OPTION="ERR_BAD_OPTION";qt.ECONNABORTED="ECONNABORTED";qt.ETIMEDOUT="ETIMEDOUT";qt.ECONNREFUSED="ECONNREFUSED";qt.ERR_NETWORK="ERR_NETWORK";qt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";qt.ERR_DEPRECATED="ERR_DEPRECATED";qt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";qt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";qt.ERR_CANCELED="ERR_CANCELED";qt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";qt.ERR_INVALID_URL="ERR_INVALID_URL";qt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var I=qt;var Uk=Ee(Fk(),1),Ul=Uk.default;var Ph=100;function Ah(t){return _.isPlainObject(t)||_.isArray(t)}function qk(t){return _.endsWith(t,"[]")?t.slice(0,-2):t}function Rh(t,e,n){return t?t.concat(e).map(function(o,i){return o=qk(o),!n&&i?"["+o+"]":o}).join(n?".":""):e}function eF(t){return _.isArray(t)&&!t.some(Ah)}var tF=_.toFlatObject(_,{},null,function(e){return/^is[A-Z]/.test(e)});function nF(t,e,n){if(!_.isObject(t))throw new TypeError("target must be an object");e=e||new(Ul||FormData),n=_.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,w){return!_.isUndefined(w[v])});let r=n.metaTokens,o=n.visitor||y,i=n.dots,s=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?Ph:n.maxDepth,l=a&&_.isSpecCompliantForm(e),p=[];if(!_.isFunction(o))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(_.isDate(m))return m.toISOString();if(_.isBoolean(m))return m.toString();if(!l&&_.isBlob(m))throw new I("Blob is not supported. Use a Buffer instead.");if(_.isArrayBuffer(m)||_.isTypedArray(m)){if(l&&typeof a=="function")return new a([m]);if(typeof Buffer<"u")return Buffer.from(m);throw new I("Blob is not supported. Use a Buffer instead.",I.ERR_NOT_SUPPORT)}return m}function f(m){if(m>c)throw new I("Object is too deeply nested ("+m+" levels). Max depth: "+c,I.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(m,v){if(c===1/0)return JSON.stringify(m);let w=[];return JSON.stringify(m,function(E,F){if(!_.isObject(F))return F;for(;w.length&&w[w.length-1]!==this;)w.pop();return w.push(F),f(v+w.length-1),F})}function y(m,v,w){let k=m;if(_.isReactNative(e)&&_.isReactNativeBlob(m))return e.append(Rh(w,v,i),d(m)),!1;if(m&&!w&&typeof m=="object"){if(_.endsWith(v,"{}"))v=r?v:v.slice(0,-2),m=h(m,1);else if(_.isArray(m)&&eF(m)||(_.isFileList(m)||_.endsWith(v,"[]"))&&(k=_.toArray(m)))return v=qk(v),k.forEach(function(F,j){!(_.isUndefined(F)||F===null)&&e.append(s===!0?Rh([v],j,i):s===null?v:v+"[]",d(F))}),!1}return Ah(m)?!0:(e.append(Rh(w,v,i),d(m)),!1)}let b=Object.assign(tF,{defaultVisitor:y,convertValue:d,isVisitable:Ah});function x(m,v,w=0){if(!_.isUndefined(m)){if(f(w),p.indexOf(m)!==-1)throw new Error("Circular reference detected in "+v.join("."));p.push(m),_.forEach(m,function(E,F){(!(_.isUndefined(E)||E===null)&&o.call(e,E,_.isString(F)?F.trim():F,v,b))===!0&&x(E,v?v.concat(F):[F],w+1)}),p.pop()}}if(!_.isObject(t))throw new TypeError("data must be an object");return x(t),e}var Hr=nF;function Zk(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(r){return e[r]})}function Bk(t,e){this._pairs=[],t&&Hr(t,this,e)}var Hk=Bk.prototype;Hk.append=function(e,n){this._pairs.push([e,n])};Hk.toString=function(e){let n=e?r=>e.call(this,r,Zk):Zk;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};var Vk=Bk;function rF(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Mo(t,e,n){if(!e)return t;t=t||"";let r=_.isFunction(n)?{serialize:n}:n,o=_.getSafeProp(r,"encode")||rF,i=_.getSafeProp(r,"serialize"),s;if(i?s=i(e,r):s=_.isURLSearchParams(e)?e.toString():new Vk(e,r).toString(o),s){let a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}var Ch=class{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){_.forEach(this.handlers,function(r){r!==null&&e(r)})}},Ih=Ch;var Vr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};var Jk=Ee(require("crypto"),1);var Gk=Ee(require("url"),1),Wk=Gk.default.URLSearchParams;var Oh="abcdefghijklmnopqrstuvwxyz",Kk="0123456789",Yk={DIGIT:Kk,ALPHA:Oh,ALPHA_DIGIT:Oh+Oh.toUpperCase()+Kk},oF=(t=16,e=Yk.ALPHA_DIGIT)=>{let n="",{length:r}=e,o=new Uint32Array(t);Jk.default.randomFillSync(o);for(let i=0;i<t;i++)n+=e[o[i]%r];return n},Xk={isNode:!0,classes:{URLSearchParams:Wk,FormData:Ul,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Yk,generateString:oF,protocols:["http","https","file","data"]};var jh={};Da(jh,{hasBrowserEnv:()=>Nh,hasStandardBrowserEnv:()=>iF,hasStandardBrowserWebWorkerEnv:()=>sF,navigator:()=>zh,origin:()=>aF});var Nh=typeof window<"u"&&typeof document<"u",zh=typeof navigator=="object"&&navigator||void 0,iF=Nh&&(!zh||["ReactNative","NativeScript","NS"].indexOf(zh.product)<0),sF=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",aF=Nh&&window.location.href||"http://localhost";var Be={...jh,...Xk};function Lh(t,e){return Hr(t,new Be.classes.URLSearchParams,{visitor:function(n,r,o,i){return Be.isNode&&_.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}var Qk=Ph;function eT(t){if(t>Qk)throw new I("FormData field is too deeply nested ("+t+" levels). Max depth: "+Qk,I.ERR_FORM_DATA_DEPTH_EXCEEDED)}function cF(t){let e=[],n=/\w+|\[(\w*)]/g,r;for(;(r=n.exec(t))!==null;)eT(e.length),e.push(r[0]==="[]"?"":r[1]||r[0]);return e}function lF(t){let e={},n=Object.keys(t),r,o=n.length,i;for(r=0;r<o;r++)i=n[r],e[i]=t[i];return e}function uF(t){function e(n,r,o,i){eT(i);let s=n[i++];if(s==="__proto__")return!0;let a=Number.isFinite(+s),c=i>=n.length;return s=!s&&_.isArray(o)?o.length:s,c?(_.hasOwnProp(o,s)?o[s]=_.isArray(o[s])?o[s].concat(r):[o[s],r]:o[s]=r,!a):((!_.hasOwnProp(o,s)||!_.isObject(o[s]))&&(o[s]=[]),e(n,r,o[s],i)&&_.isArray(o[s])&&(o[s]=lF(o[s])),!a)}if(_.isFormData(t)&&_.isFunction(t.entries)){let n={};return _.forEachEntry(t,(r,o)=>{e(cF(r),o,n,0)}),n}return null}var ql=uF;var Ui=(t,e)=>t!=null&&_.hasOwnProp(t,e)?t[e]:void 0;function pF(t,e,n){if(_.isString(t))try{return(e||JSON.parse)(t),_.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}var Dh={transitional:Vr,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){let r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=_.isObject(e);if(i&&_.isHTMLForm(e)&&(e=new FormData(e)),_.isFormData(e))return o?JSON.stringify(ql(e)):e;if(_.isArrayBuffer(e)||_.isBuffer(e)||_.isStream(e)||_.isFile(e)||_.isBlob(e)||_.isReadableStream(e))return e;if(_.isArrayBufferView(e))return e.buffer;if(_.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){let c=Ui(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Lh(e,c).toString();if((a=_.isFileList(e))||r.indexOf("multipart/form-data")>-1){let l=Ui(this,"env"),p=l&&l.FormData;return Hr(a?{"files[]":e}:e,p&&new p,c)}}return i||o?(n.setContentType("application/json",!1),pF(e)):e}],transformResponse:[function(e){let n=Ui(this,"transitional")||Dh.transitional,r=n&&n.forcedJSONParsing,o=Ui(this,"responseType"),i=o==="json";if(_.isResponse(e)||_.isReadableStream(e))return e;if(e&&_.isString(e)&&(r&&!o||i)){let a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e,Ui(this,"parseReviver"))}catch(c){if(a)throw c.name==="SyntaxError"?I.from(c,I.ERR_BAD_RESPONSE,this,null,Ui(this,"response")):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Be.classes.FormData,Blob:Be.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_.forEach(["delete","get","head","post","put","patch","query"],t=>{Dh.headers[t]={}});var qi=Dh;function ya(t,e){let n=this||qi,r=e||n,o=rt.from(r.headers),i=r.data;return _.forEach(t,function(a){i=a.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function xa(t){return!!(t&&t.__CANCEL__)}var Mh=class extends I{constructor(e,n,r){super(e??"canceled",I.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}},_n=Mh;function or(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new I("Request failed with status code "+n.status,n.status>=400&&n.status<500?I.ERR_BAD_REQUEST:I.ERR_BAD_RESPONSE,n.config,n.request,n))}function Fh(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Uh(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}var dF=/^https?:(?!\/\/)/i,fF=/[\t\n\r]/g;function mF(t){let e=0;for(;e<t.length&&t.charCodeAt(e)<=32;)e++;return t.slice(e)}function hF(t){return mF(t).replace(fF,"")}function tT(t,e){if(typeof t=="string"&&dF.test(hF(t)))throw new I('Invalid URL: missing "//" after protocol',I.ERR_INVALID_URL,e)}function Fo(t,e,n,r){tT(e,r);let o=!Fh(e);return t&&(o||n===!1)?(tT(t,r),Uh(t,e)):e}var gF={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function yF(t){try{return new URL(t)}catch{return null}}function nT(t){var e=(typeof t=="string"?yF(t):t)||{},n=e.protocol,r=e.host,o=e.port;if(typeof r!="string"||!r||typeof n!="string"||(n=n.split(":",1)[0],r=r.replace(/:\d*$/,""),o=parseInt(o)||gF[n]||0,!xF(r,o)))return"";var i=qh(n+"_proxy")||qh("all_proxy");return i&&i.indexOf("://")===-1&&(i=n+"://"+i),i}function xF(t,e){var n=qh("no_proxy").toLowerCase();return n?n==="*"?!1:n.split(/[,\s]/).every(function(r){if(!r)return!0;var o=r.match(/^(.+):(\d+)$/),i=o?o[1]:r,s=o?parseInt(o[2]):0;return s&&s!==e?!0:/^[.*]/.test(i)?(i.charAt(0)==="*"&&(i=i.slice(1)),!t.endsWith(i)):t!==i}):!0}function qh(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}var wg=Ee(ST(),1),Sg=Ee(require("http"),1),kg=Ee(require("https"),1),tE=Ee(require("http2"),1),nE=Ee(require("util"),1),_g=require("path"),rE=Ee(PT(),1),wn=Ee(require("zlib"),1);var br="1.18.1";function $a(t){let e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}var bU=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function dg(t,e,n){let r=n&&n.Blob||Be.classes.Blob,o=$a(t);if(e===void 0&&r&&(e=!0),o==="data"){t=o.length?t.slice(o.length+1):t;let i=bU.exec(t);if(!i)throw new I("Invalid URL",I.ERR_INVALID_URL);let s=i[1],a=i[2],c=i[3]?"base64":"utf8",l=i[4],p="";s?p=a?s+a:s:a&&(p="text/plain"+a);let d=c==="base64"?Buffer.from(l,"base64"):Buffer.from(decodeURIComponent(l),c);if(e){if(!r)throw new I("Blob is not supported",I.ERR_NOT_SUPPORT);return new r([d],{type:p})}return d}throw new I("Unsupported protocol "+o,I.ERR_NOT_SUPPORT)}var On=Ee(require("stream"),1);var CT=Ee(require("stream"),1);var fg=Symbol("internals"),mg=class extends CT.default.Transform{constructor(e){e=_.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(r,o)=>!_.isUndefined(o[r])),super({readableHighWaterMark:e.chunkSize});let n=this[fg]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",r=>{r==="progress"&&(n.isCaptured||(n.isCaptured=!0))})}_read(e){let n=this[fg];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let o=this[fg],i=o.maxRate,s=this.readableHighWaterMark,a=o.timeWindow,c=1e3/a,l=i/c,p=o.minChunkSize!==!1?Math.max(o.minChunkSize,l*.01):0,d=(h,y)=>{let b=Buffer.byteLength(h);o.bytesSeen+=b,o.bytes+=b,o.isCaptured&&this.emit("progress",o.bytesSeen),this.push(h)?process.nextTick(y):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(y)}},f=(h,y)=>{let b=Buffer.byteLength(h),x=null,m=s,v,w=0;if(i){let k=Date.now();(!o.ts||(w=k-o.ts)>=a)&&(o.ts=k,v=l-o.bytes,o.bytes=v<0?-v:0,w=0),v=l-o.bytes}if(i){if(v<=0)return setTimeout(()=>{y(null,h)},a-w);v<m&&(m=v)}m&&b>m&&b-m>p&&(x=h.subarray(m),h=h.subarray(0,m)),d(h,x?()=>{process.nextTick(y,null,x)}:y)};f(e,function h(y,b){if(y)return r(y);b?f(b,h):r(null)})}},hg=mg;var oE=require("events");var OT=Ee(require("util"),1),zT=require("stream");var{asyncIterator:IT}=Symbol,_U=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[IT]?yield*t[IT]():yield t},Wl=_U;var wU=Be.ALPHABET.ALPHA_DIGIT+"-_",Ra=typeof TextEncoder=="function"?new TextEncoder:new OT.default.TextEncoder,Vo=`\r
|
|
58
|
+
`,SU=Ra.encode(Vo),kU=2,gg=class{constructor(e,n){let{escapeName:r}=this.constructor,o=_.isString(n),i=`Content-Disposition: form-data; name="${r(e)}"${!o&&n.name?`; filename="${r(n.name)}"`:""}${Vo}`;if(o)n=Ra.encode(String(n).replace(/\r?\n|\r\n?/g,Vo));else{let s=String(n.type||"application/octet-stream").replace(/[\r\n]/g,"");i+=`Content-Type: ${s}${Vo}`}this.headers=Ra.encode(i+Vo),this.contentLength=o?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+kU,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;_.isTypedArray(e)?yield e:yield*Wl(e),yield SU}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},TU=(t,e,n)=>{let{tag:r="form-data-boundary",size:o=25,boundary:i=r+"-"+Be.generateString(o,wU)}=n||{};if(!_.isFormData(t))throw new TypeError("FormData instance required");if(i.length<1||i.length>70)throw new Error("boundary must be 1-70 characters long");let s=Ra.encode("--"+i+Vo),a=Ra.encode("--"+i+"--"+Vo),c=a.byteLength,l=Array.from(t.entries()).map(([d,f])=>{let h=new gg(d,f);return c+=h.size,h});c+=s.byteLength*l.length,c=_.toFiniteNumber(c);let p={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(c)&&(p["Content-Length"]=c),e&&e(p),zT.Readable.from((async function*(){for(let d of l)yield s,yield*d.encode();yield a})())},NT=TU;var jT=Ee(require("stream"),1),yg=class extends jT.default.Transform{__transform(e,n,r){this.push(e),r()}_transform(e,n,r){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let o=Buffer.alloc(2);o[0]=120,o[1]=156,this.push(o,n)}this.__transform(e,n,r)}},LT=yg;var DT=Ee(require("http2"),1),MT=Ee(require("util"),1),xg=class{constructor(){this.sessions=Object.create(null)}getSession(e,n){n=Object.assign({sessionTimeout:1e3},n);let r=this.sessions[e];if(r){let d=r.length;for(let f=0;f<d;f++){let[h,y]=r[f];if(!h.destroyed&&!h.closed&&MT.default.isDeepStrictEqual(y,n))return h}}let o=DT.default.connect(e,n),i,s,a=()=>{if(i)return;i=!0,s&&(clearTimeout(s),s=null);let d=r,f=d.length,h=f;for(;h--;)if(d[h][0]===o){f===1?delete this.sessions[e]:d.splice(h,1),o.closed||o.close();return}},c=o.request,{sessionTimeout:l}=n;if(l!=null){let d=0;o.request=function(){let f=c.apply(this,arguments);return d++,s&&(clearTimeout(s),s=null),f.once("close",()=>{--d||(s=setTimeout(()=>{s=null,a()},l))}),f}}o.once("close",a);let p=[o,n];return r?r.push(p):r=this.sessions[e]=[p],o}},FT=xg;var EU=(t,e)=>_.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(o=>{try{e?r(null,...e(o)):r(null,o)}catch(i){r(i)}},r)}:t,UT=EU;var $U=new Set(["localhost","0.0.0.0"]),BT=t=>{let e=t.split(".");return e.length!==4||e[0]!=="127"?!1:e.every(n=>/^\d+$/.test(n)&&Number(n)>=0&&Number(n)<=255)},vg=t=>/^0{1,4}$/.test(t),RU=t=>{if(t==="::")return!0;let e=t.indexOf("::");if(e!==-1){if(e!==t.lastIndexOf("::"))return!1;let r=t.slice(0,e),o=t.slice(e+2),i=r?r.split(":"):[],s=o?o.split(":"):[];return i.length+s.length<8&&i.every(vg)&&s.every(vg)}let n=t.split(":");return n.length===8&&n.every(vg)},AU=t=>{if(t==="::1")return!0;let e=t.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(e)return BT(e[1]);let n=t.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(n){let o=parseInt(n[1],16);return o>=32512&&o<=32767}let r=t.split(":");if(r.length===8){for(let o=0;o<7;o++)if(!/^0+$/.test(r[o]))return!1;return/^0*1$/.test(r[7])}return!1},qT=t=>t?$U.has(t)||BT(t)||RU(t)?!0:AU(t):!1,PU={http:80,https:443,ws:80,wss:443,ftp:21},CU=t=>{let e=t,n=0;if(e.charAt(0)==="["){let i=e.indexOf("]");if(i!==-1){let s=e.slice(1,i),a=e.slice(i+1);return a.charAt(0)===":"&&/^\d+$/.test(a.slice(1))&&(n=Number.parseInt(a.slice(1),10)),[s,n]}}let r=e.indexOf(":"),o=e.lastIndexOf(":");return r!==-1&&r===o&&/^\d+$/.test(e.slice(o+1))&&(n=Number.parseInt(e.slice(o+1),10),e=e.slice(0,o)),[e,n]},IU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,OU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,zU=t=>{if(typeof t!="string"||t.indexOf(":")===-1)return t;let e=t.match(IU);if(e)return e[1];let n=t.match(OU);if(n){let r=parseInt(n[1],16),o=parseInt(n[2],16);return`${r>>8}.${r&255}.${o>>8}.${o&255}`}return t},ZT=t=>t&&(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),zU(t.replace(/\.+$/,"")));function bg(t){let e;try{e=new URL(t)}catch{return!1}let n=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!n)return!1;if(n==="*")return!0;let r=Number.parseInt(e.port,10)||PU[e.protocol.split(":",1)[0]]||0,o=ZT(e.hostname.toLowerCase());return n.split(/[\s,]+/).some(i=>{if(!i)return!1;let[s,a]=CU(i);return s=ZT(s),!s||a&&a!==r?!1:(s.charAt(0)==="*"&&(s=s.slice(1)),s.charAt(0)==="."?o.endsWith(s):o===s||qT(o)&&qT(s))})}function NU(t,e){t=t||10;let n=new Array(t),r=new Array(t),o=0,i=0,s;return e=e!==void 0?e:1e3,function(c){let l=Date.now(),p=r[i];s||(s=l),n[o]=c,r[o]=l;let d=i,f=0;for(;d!==o;)f+=n[d++],d=d%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),l-s<e)return;let h=p&&l-p;return h?Math.round(f*1e3/h):void 0}}var HT=NU;function jU(t,e){let n=0,r=1e3/e,o,i,s=(l,p=Date.now())=>{n=p,o=null,i&&(clearTimeout(i),i=null),t(...l)};return[(...l)=>{let p=Date.now(),d=p-n;d>=r?s(l,p):(o=l,i||(i=setTimeout(()=>{i=null,s(o)},r-d)))},()=>o&&s(o)]}var VT=jU;var _r=(t,e,n=3)=>{let r=0,o=HT(50,250);return VT(i=>{if(!i||typeof i.loaded!="number")return;let s=i.loaded,a=i.lengthComputable?i.total:void 0,c=a!=null?Math.min(s,a):s,l=Math.max(0,c-r),p=o(l);r=Math.max(r,c);let d={loaded:c,total:a,progress:a?c/a:void 0,bytes:l,rate:p||void 0,estimated:p&&a?(a-c)/p:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(d)},n)},Gi=(t,e)=>{let n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},Wi=t=>(...e)=>_.asap(()=>t(...e));var Kl=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,LU=(t,e,n)=>e+2<n&&Kl(t.charCodeAt(e+1))&&Kl(t.charCodeAt(e+2));function Aa(t){if(!t||typeof t!="string"||!t.startsWith("data:"))return 0;let e=t.indexOf(",");if(e<0)return 0;let n=t.slice(5,e),r=t.slice(e+1);if(/;base64/i.test(n)){let s=r.length,a=r.length;for(let h=0;h<a;h++)if(r.charCodeAt(h)===37&&h+2<a){let y=r.charCodeAt(h+1),b=r.charCodeAt(h+2);Kl(y)&&Kl(b)&&(s-=2,h+=2)}let c=0,l=a-1,p=h=>h>=2&&r.charCodeAt(h-2)===37&&r.charCodeAt(h-1)===51&&(r.charCodeAt(h)===68||r.charCodeAt(h)===100);l>=0&&(r.charCodeAt(l)===61?(c++,l--):p(l)&&(c++,l-=3)),c===1&&l>=0&&(r.charCodeAt(l)===61||p(l))&&c++;let f=Math.floor(s/4)*3-(c||0);return f>0?f:0}let i=0;for(let s=0,a=r.length;s<a;s++){let c=r.charCodeAt(s);if(c===37&&LU(r,s,a))i+=1,s+=2;else if(c<128)i+=1;else if(c<2048)i+=2;else if(c>=55296&&c<=56319&&s+1<a){let l=r.charCodeAt(s+1);l>=56320&&l<=57343?(i+=4,s++):i+=3}else i+=3}return i}var GT={flush:wn.default.constants.Z_SYNC_FLUSH,finishFlush:wn.default.constants.Z_SYNC_FLUSH},DU={flush:wn.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:wn.default.constants.BROTLI_OPERATION_FLUSH},MU={flush:wn.default.constants.ZSTD_e_flush,finishFlush:wn.default.constants.ZSTD_e_flush},iE=_.isFunction(wn.default.createBrotliDecompress),sE=_.isFunction(wn.default.createZstdDecompress),aE="gzip, compress, deflate"+(iE?", br":""),FU=aE+(sE?", zstd":""),{http:UU,https:qU}=rE.default,Tg=/https:?/,ZU=["content-type","content-length"];function BU(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e).forEach(([r,o])=>{ZU.includes(r.toLowerCase())&&t.set(r,o)})}var WT=Symbol("axios.http.socketListener"),Jl=Symbol("axios.http.currentReq"),cE=Symbol("axios.http.installedTunnel"),HU=new Map,KT=new WeakMap,JT={22:21,24:5};function VU(t=process.versions&&process.versions.node){if(!t)return!1;let[e,n]=t.split(".").map(r=>Number(r));return!Number.isInteger(e)||!Number.isInteger(n)?!1:e>24?!0:JT[e]!=null&&n>=JT[e]}function GU(t,e=process.versions&&process.versions.node){if(!VU(e))return!1;let n=t&&t.options;return!!(n&&_.hasOwnProp(n,"proxyEnv")&&n.proxyEnv!=null)}function WU(t,e,n){return Tg.test(t.protocol)?n||kg.default.globalAgent:e||Sg.default.globalAgent}function KU(t,e){let n=t.protocol+"//"+t.hostname+":"+(t.port||"")+"#"+(t.auth||""),r=e?KT.get(e)||KT.set(e,new Map).get(e):HU,o=r.get(n);if(o)return o;let i=e&&e.options?{...e.options,...t}:t;if(o=new wg.default(i),e&&e.options){let s={...e.options},a=o.callback;o.callback=function(l,p){return a.call(this,l,{...s,...p})}}return o[cE]=!0,r.set(n,o),o}var YT=Be.protocols.map(t=>t+":"),XT=t=>{if(!_.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},QT=(t,[e,n])=>(t.on("end",n).on("error",n),e),JU=new FT;function YU(t,e,n){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.auth&&t.beforeRedirects.auth(t),t.beforeRedirects.sensitiveHeaders&&t.beforeRedirects.sensitiveHeaders(t,n),t.beforeRedirects.config&&t.beforeRedirects.config(t,e,n)}function XU(t,e){t&&Object.keys(t).forEach(n=>{e.has(n.toLowerCase())&&delete t[n]})}function QU(t,e){if(!e)return!1;try{return new URL(e.url).origin===new URL(t.href).origin}catch{return!1}}function lE(t,e,n,r,o,i){let s=e,a=WU(t,i,o);if(!s&&s!==!1&&!GU(a)){let c=nT(n);c&&(bg(n)||(s=new URL(c)))}if(r&&t.headers)for(let c of Object.keys(t.headers))c.toLowerCase()==="proxy-authorization"&&delete t.headers[c];if(r&&t.agent&&t.agent[cE]&&(t.agent=void 0),s){let c=s instanceof URL,l=y=>c||_.hasOwnProp(s,y)?s[y]:void 0,p=l("username"),d=l("password"),f=_.hasOwnProp(s,"auth")?s.auth:void 0;if(p&&(f=(p||"")+":"+(d||"")),f){let y=typeof f=="object",b=y&&_.hasOwnProp(f,"username")?f.username:void 0,x=y&&_.hasOwnProp(f,"password")?f.password:void 0;if(!!(b||x))f=(b||"")+":"+(x||"");else if(y)throw new I("Invalid proxy authorization",I.ERR_BAD_OPTION,{proxy:s})}if(Tg.test(t.protocol)){if(!(o instanceof wg.default)){let y=l("hostname")||l("host"),b=l("port"),x=l("protocol"),m=x?x.includes(":")?x:`${x}:`:"http:",v=y&&y.includes(":")&&!y.startsWith("[")?`[${y}]`:y,w=new URL(`${m}//${v}${b?":"+b:""}`),k={protocol:w.protocol,hostname:w.hostname.replace(/^\[|\]$/g,""),port:w.port,auth:f&&typeof f=="string"?f:void 0};w.protocol==="https:"&&(k.ALPNProtocols=["http/1.1"]);let E=KU(k,o);t.agent=E,t.agents&&(t.agents.https=E)}}else{if(f){let m=Buffer.from(f,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+m}let y=!1;for(let m of Object.keys(t.headers))if(m.toLowerCase()==="host"){y=!0;break}y||(t.headers.host=t.hostname+(t.port?":"+t.port:""));let b=l("hostname")||l("host");t.hostname=b,t.host=b,t.port=l("port"),t.path=n;let x=l("protocol");x&&(t.protocol=x.includes(":")?x:`${x}:`)}}t.beforeRedirects.proxy=function(l){lE(l,e,l.href,!0,o,i)}}var eq=typeof process<"u"&&_.kindOf(process)==="process",tq=t=>new Promise((e,n)=>{let r,o,i=(c,l)=>{o||(o=!0,r&&r(c,l))},s=c=>{i(c),e(c)},a=c=>{i(c,!0),n(c)};t(s,a,c=>r=c).catch(a)}),nq=({address:t,family:e})=>{if(!_.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},eE=(t,e)=>nq(_.isObject(t)?t:{address:t,family:e}),rq={request(t,e){let n=t.protocol+"//"+t.hostname+":"+(t.port||(t.protocol==="https:"?443:80)),{http2Options:r,headers:o}=t,i=JU.getSession(n,r),{HTTP2_HEADER_SCHEME:s,HTTP2_HEADER_METHOD:a,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:l}=tE.default.constants,p={[s]:t.protocol.replace(":",""),[a]:t.method,[c]:t.path};_.forEach(o,(f,h)=>{h.charAt(0)!==":"&&(p[h]=f)});let d=i.request(p);return d.once("response",f=>{let h=d;f=Object.assign({},f);let y=f[l];delete f[l],h.headers=f,h.statusCode=+y,e(h)}),d}},uE=eq&&function(e){return tq(async function(r,o,i){let s=W=>_.getSafeProp(e,W),a=s("transitional")||Vr,c=s("data"),l=s("lookup"),p=s("family"),d=s("httpVersion");d===void 0&&(d=1);let f=s("http2Options"),h=s("httpAgent"),y=s("httpsAgent"),b=s("proxy"),x=s("responseType"),m=s("responseEncoding"),v=s("socketPath"),w=s("method").toUpperCase(),k=s("maxRedirects"),E=s("maxBodyLength"),F=s("maxContentLength"),j=s("decompress"),me,de=!1,oe,Re;if(d=+d,Number.isNaN(d))throw TypeError(`Invalid protocol version: '${e.httpVersion}' is not a number`);if(d!==1&&d!==2)throw TypeError(`Unsupported protocol version '${d}'`);let bt=d===2;if(l){let W=UT(l,G=>_.isArray(G)?G:[G]);l=(G,be,Ge)=>{W(G,be,(ye,We,St)=>{if(ye)return Ge(ye);let Qe=_.isArray(We)?We.map(zn=>eE(zn)):[eE(We,St)];be.all?Ge(ye,Qe):Ge(ye,Qe[0].address,Qe[0].family)})}}let Ve=new oE.EventEmitter;function ae(W){try{Ve.emit("abort",!W||W.type?new _n(null,e,oe):W)}catch{}}function yt(){Re&&(clearTimeout(Re),Re=null)}function V(){let W=s("timeout"),G=W?"timeout of "+W+"ms exceeded":"timeout exceeded",be=s("timeoutErrorMessage");return be&&(G=be),new I(G,a.clarifyTimeoutError?I.ETIMEDOUT:I.ECONNABORTED,e,oe)}Ve.once("abort",o);let Pt=()=>{yt(),e.cancelToken&&e.cancelToken.unsubscribe(ae),e.signal&&e.signal.removeEventListener("abort",ae),Ve.removeAllListeners()};(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(ae),e.signal&&(e.signal.aborted?ae():e.signal.addEventListener("abort",ae))),i((W,G)=>{if(me=!0,yt(),G){de=!0,Pt();return}let{data:be}=W;if(be instanceof On.default.Readable||be instanceof On.default.Duplex){let Ge=On.default.finished(be,()=>{Ge(),Pt()})}else Pt()});let Bt=Fo(s("baseURL"),s("url"),s("allowAbsoluteUrls"),e),Gn=v?"http://localhost":Be.hasBrowserEnv?Be.origin:void 0,Ie=new URL(Bt,Gn),B=Ie.protocol||YT[0];if(B==="data:"){if(F>-1){let G=String(s("url")||Bt||"");if(Aa(G)>F)return o(new I("maxContentLength size of "+F+" exceeded",I.ERR_BAD_RESPONSE,e))}let W;if(w!=="GET")return or(r,o,{status:405,statusText:"method not allowed",headers:{},config:e});try{W=dg(s("url"),x==="blob",{Blob:e.env&&e.env.Blob})}catch(G){throw I.from(G,I.ERR_BAD_REQUEST,e)}return x==="text"?(W=W.toString(m),(!m||m==="utf8")&&(W=_.stripBOM(W))):x==="stream"&&(W=On.default.Readable.from(W)),or(r,o,{data:W,status:200,statusText:"OK",headers:new rt,config:e})}if(YT.indexOf(B)===-1)return o(new I("Unsupported protocol "+B,I.ERR_BAD_REQUEST,e));let qe=rt.from(e.headers).normalize();qe.set("User-Agent","axios/"+br,!1);let{onUploadProgress:De,onDownloadProgress:Xt}=e,it=e.maxRate,ge,ke;if(_.isSpecCompliantForm(c)){let W=qe.getContentType(/boundary=([-_\w\d]{10,70})/i);c=NT(c,G=>{qe.set(G)},{tag:`axios-${br}-boundary`,boundary:W&&W[1]||void 0})}else if(_.isFormData(c)&&_.isFunction(c.getHeaders)&&c.getHeaders!==Object.prototype.getHeaders){if(BU(qe,c.getHeaders(),s("formDataHeaderPolicy")),!qe.hasContentLength())try{let W=await nE.default.promisify(c.getLength).call(c);Number.isFinite(W)&&W>=0&&qe.setContentLength(W)}catch{}}else if(_.isBlob(c)||_.isFile(c))c.size&&qe.setContentType(c.type||"application/octet-stream"),qe.setContentLength(c.size||0),c=On.default.Readable.from(Wl(c));else if(c&&!_.isStream(c)){if(!Buffer.isBuffer(c))if(_.isArrayBuffer(c))c=Buffer.from(new Uint8Array(c));else if(_.isString(c))c=Buffer.from(c,"utf-8");else return o(new I("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",I.ERR_BAD_REQUEST,e));if(qe.setContentLength(c.length,!1),E>-1&&c.length>E)return o(new I("Request body larger than maxBodyLength limit",I.ERR_BAD_REQUEST,e))}let ut=_.toFiniteNumber(qe.getContentLength());_.isArray(it)?(ge=it[0],ke=it[1]):ge=ke=it,c&&(De||ge)&&(_.isStream(c)||(c=On.default.Readable.from(c,{objectMode:!1})),c=On.default.pipeline([c,new hg({maxRate:_.toFiniteNumber(ge)})],_.noop),De&&c.on("progress",QT(c,Gi(ut,_r(Wi(De),!1,3)))));let Oe,Et=s("auth");if(Et){let W=_.getSafeProp(Et,"username")||"",G=_.getSafeProp(Et,"password")||"";Oe=W+":"+G}if(!Oe&&(Ie.username||Ie.password)){let W=XT(Ie.username),G=XT(Ie.password);Oe=W+":"+G}Oe&&qe.delete("authorization");let $t;try{$t=Mo(Ie.pathname+Ie.search,s("params"),s("paramsSerializer")).replace(/^\?/,"")}catch(W){return o(I.from(W,I.ERR_BAD_REQUEST,e,null,null,{url:s("url"),exists:!0}))}qe.set("Accept-Encoding",_.hasOwnProp(a,"advertiseZstdAcceptEncoding")&&a.advertiseZstdAcceptEncoding===!0?FU:aE,!1);let Te=Object.assign(Object.create(null),{path:$t,method:w,headers:Ni(qe),agents:{http:h,https:y},auth:Oe,protocol:B,family:p,beforeRedirect:YU,beforeRedirects:Object.create(null),http2Options:f});if(!_.isUndefined(l)&&(Te.lookup=l),v){if(typeof v!="string")return o(new I("socketPath must be a string",I.ERR_BAD_OPTION_VALUE,e));let W=s("allowedSocketPaths");if(W!=null){let G=Array.isArray(W)?W:[W],be=(0,_g.resolve)(v);if(!G.some(ye=>typeof ye=="string"&&(0,_g.resolve)(ye)===be))return o(new I(`socketPath "${v}" is not permitted by allowedSocketPaths`,I.ERR_BAD_OPTION_VALUE,e))}Te.socketPath=v}else Te.hostname=Ie.hostname.startsWith("[")?Ie.hostname.slice(1,-1):Ie.hostname,Te.port=Ie.port,lE(Te,b,B+"//"+Ie.hostname+(Ie.port?":"+Ie.port:"")+Te.path,!1,y,h);let Ht,Sn=!1,Nt=!1,pe=Tg.test(Te.protocol);if(Te.agent==null&&(Te.agent=pe?y:h),bt)Ht=rq;else{let W=s("transport");if(W)Ht=W;else if(k===0)Ht=pe?kg.default:Sg.default,Sn=!0;else{Nt=!0,Te.sensitiveHeaders=[],k&&(Te.maxRedirects=k);let G=s("beforeRedirect");if(G&&(Te.beforeRedirects.config=G),Oe){let Ge=Ie.origin,ye=Oe;Te.beforeRedirects.auth=function(St){try{new URL(St.href).origin===Ge&&(St.auth=ye)}catch{}}}let be=s("sensitiveHeaders");if(be!=null){if(!_.isArray(be))return o(new I("sensitiveHeaders must be an array of strings",I.ERR_BAD_OPTION_VALUE,e));let Ge=new Set;for(let ye of be){if(!_.isString(ye))return o(new I("sensitiveHeaders must be an array of strings",I.ERR_BAD_OPTION_VALUE,e));Ge.add(ye.toLowerCase())}Ge.size&&(Te.sensitiveHeaders=Array.from(Ge),Te.beforeRedirects.sensitiveHeaders=function(We,St){QU(We,St)||XU(We.headers,Ge)})}Ht=pe?qU:UU}}E>-1?Te.maxBodyLength=E:Te.maxBodyLength=1/0,Te.insecureHTTPParser=!!s("insecureHTTPParser"),oe=Ht.request(Te,function(G){if(yt(),oe.destroyed)return;let be=[G],Ge=_.toFiniteNumber(G.headers["content-length"]);if(Xt||ke){let Qe=new hg({maxRate:_.toFiniteNumber(ke)});Xt&&Qe.on("progress",QT(Qe,Gi(Ge,_r(Wi(Xt),!0,3)))),be.push(Qe)}let ye=G,We=G.req||oe;if(j!==!1&&G.headers["content-encoding"])switch((w==="HEAD"||G.statusCode===204)&&delete G.headers["content-encoding"],(G.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":be.push(wn.default.createUnzip(GT)),delete G.headers["content-encoding"];break;case"deflate":be.push(new LT),be.push(wn.default.createUnzip(GT)),delete G.headers["content-encoding"];break;case"br":iE&&(be.push(wn.default.createBrotliDecompress(DU)),delete G.headers["content-encoding"]);break;case"zstd":sE&&(be.push(wn.default.createZstdDecompress(MU)),delete G.headers["content-encoding"]);break}ye=be.length>1?On.default.pipeline(be,_.noop):be[0];let St={status:G.statusCode,statusText:G.statusMessage,headers:new rt(G.headers),config:e,request:We};if(x==="stream"){if(F>-1){let Qe=F,zn=ye;async function*ur(){let u=0;for await(let S of zn){if(u+=S.length,u>Qe)throw new I("maxContentLength size of "+Qe+" exceeded",I.ERR_BAD_RESPONSE,e,We);yield S}}ye=On.default.Readable.from(ur(),{objectMode:!1})}St.data=ye,or(r,o,St)}else{let Qe=[],zn=0;ye.on("data",function(u){Qe.push(u),zn+=u.length,F>-1&&zn>F&&(de=!0,ye.destroy(),ae(new I("maxContentLength size of "+F+" exceeded",I.ERR_BAD_RESPONSE,e,We)))}),ye.on("aborted",function(){if(de)return;let u=new I("stream has been aborted",I.ERR_BAD_RESPONSE,e,We,St);ye.destroy(u),o(u)}),ye.on("error",function(u){de||o(I.from(u,null,e,We,St))}),ye.on("end",function(){try{let u=Qe.length===1?Qe[0]:Buffer.concat(Qe);x!=="arraybuffer"&&(u=u.toString(m),(!m||m==="utf8")&&(u=_.stripBOM(u))),St.data=u}catch(u){return o(I.from(u,null,e,St.request,St))}or(r,o,St)})}Ve.once("abort",Qe=>{ye.destroyed||(ye.emit("error",Qe),ye.destroy())})}),Ve.once("abort",W=>{oe.close?oe.close():oe.destroy(W)}),oe.on("error",function(G){o(I.from(G,null,e,oe))});let Ye=new Set;if(oe.on("socket",function(G){typeof G.setKeepAlive=="function"&&G.setKeepAlive(!0,1e3*60),G[WT]||(G.on("error",function(Ge){let ye=G[Jl];ye&&!ye.destroyed&&ye.destroy(Ge)}),G[WT]=!0),G[Jl]=oe,Ye.add(G)}),oe.once("close",function(){yt();for(let G of Ye)G[Jl]===oe&&(G[Jl]=null);Ye.clear()}),s("timeout")){let W=parseInt(s("timeout"),10);if(Number.isNaN(W)){ae(new I("error trying to parse `config.timeout` to int",I.ERR_BAD_OPTION_VALUE,e,oe));return}let G=function(){me||ae(V())};Sn&&W>0&&(Re=setTimeout(G,W)),oe.setTimeout(W,G)}else oe.setTimeout(0);if(_.isStream(c)){let W=!1,G=!1;c.on("end",()=>{W=!0}),c.once("error",Ge=>{G=!0,oe.destroy(Ge)}),c.on("close",()=>{!W&&!G&&ae(new _n("Request stream has been aborted",e,oe))});let be=c;if(E>-1&&!Nt){let Ge=E,ye=0;be=On.default.pipeline([c,new On.default.Transform({transform(We,St,Qe){if(ye+=We.length,ye>Ge)return Qe(new I("Request body larger than maxBodyLength limit",I.ERR_BAD_REQUEST,e,oe));Qe(null,We)}})],_.noop),be.on("error",We=>{oe.destroyed||oe.destroy(We)})}be.pipe(oe)}else c&&oe.write(c),oe.end()})};var pE=Be.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Be.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Be.origin),Be.navigator&&/(msie|trident)/i.test(Be.navigator.userAgent)):()=>!0;var dE=Be.hasStandardBrowserEnv?{write(t,e,n,r,o,i,s){if(typeof document>"u")return;let a=[`${t}=${encodeURIComponent(e)}`];_.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),_.isString(r)&&a.push(`path=${r}`),_.isString(o)&&a.push(`domain=${o}`),i===!0&&a.push("secure"),_.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;let e=document.cookie.split(";");for(let n=0;n<e.length;n++){let r=e[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===t)try{return decodeURIComponent(r.slice(o+1))}catch{return r.slice(o+1)}}return null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};var fE=t=>t instanceof rt?{...t}:t;function Vn(t,e){t=t||{},e=e||{};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,d,f,h){return _.isPlainObject(p)&&_.isPlainObject(d)?_.merge.call({caseless:h},p,d):_.isPlainObject(d)?_.merge({},d):_.isArray(d)?d.slice():d}function o(p,d,f,h){if(_.isUndefined(d)){if(!_.isUndefined(p))return r(void 0,p,f,h)}else return r(p,d,f,h)}function i(p,d){if(!_.isUndefined(d))return r(void 0,d)}function s(p,d){if(_.isUndefined(d)){if(!_.isUndefined(p))return r(void 0,p)}else return r(void 0,d)}function a(p){let d=_.hasOwnProp(e,"transitional")?e.transitional:void 0;if(!_.isUndefined(d))if(_.isPlainObject(d)){if(_.hasOwnProp(d,p))return d[p]}else return;let f=_.hasOwnProp(t,"transitional")?t.transitional:void 0;if(_.isPlainObject(f)&&_.hasOwnProp(f,p))return f[p]}function c(p,d,f){if(_.hasOwnProp(e,f))return r(p,d);if(_.hasOwnProp(t,f))return r(void 0,p)}let l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:c,headers:(p,d,f)=>o(fE(p),fE(d),f,!0)};return _.forEach(Object.keys({...t,...e}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;let f=_.hasOwnProp(l,d)?l[d]:o,h=_.hasOwnProp(t,d)?t[d]:void 0,y=_.hasOwnProp(e,d)?e[d]:void 0,b=f(h,y,d);_.isUndefined(b)&&f!==c||(n[d]=b)}),_.hasOwnProp(e,"validateStatus")&&_.isUndefined(e.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(_.hasOwnProp(t,"validateStatus")?n.validateStatus=r(void 0,t.validateStatus):delete n.validateStatus),n}var oq=["content-type","content-length"];function iq(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([r,o])=>{oq.includes(r.toLowerCase())&&t.set(r,o)})}var sq=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16)));function aq(t){let e=Vn({},t),n=f=>_.hasOwnProp(e,f)?e[f]:void 0,r=n("data"),o=n("withXSRFToken"),i=n("xsrfHeaderName"),s=n("xsrfCookieName"),a=n("headers"),c=n("auth"),l=n("baseURL"),p=n("allowAbsoluteUrls"),d=n("url");if(e.headers=a=rt.from(a),e.url=Mo(Fo(l,d,p,e),n("params"),n("paramsSerializer")),c){let f=_.getSafeProp(c,"username")||"",h=_.getSafeProp(c,"password")||"";try{a.set("Authorization","Basic "+btoa(f+":"+(h?sq(h):"")))}catch(y){throw I.from(y,I.ERR_BAD_OPTION_VALUE,t)}}if(_.isFormData(r)&&(Be.hasStandardBrowserEnv||Be.hasStandardBrowserWebWorkerEnv||_.isReactNative(r)?a.setContentType(void 0):_.isFunction(r.getHeaders)&&iq(a,r.getHeaders(),n("formDataHeaderPolicy"))),Be.hasStandardBrowserEnv&&(_.isFunction(o)&&(o=o(e)),o===!0||o==null&&pE(e.url))){let h=i&&s&&dE.read(s);h&&a.set(i,h)}return e}var Yl=aq;var cq=typeof XMLHttpRequest<"u",mE=cq&&function(t){return new Promise(function(n,r){let o=Yl(t),i=o.data,s=rt.from(o.headers).normalize(),{responseType:a,onUploadProgress:c,onDownloadProgress:l}=o,p,d,f,h,y;function b(){h&&h(),y&&y(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function m(){if(!x)return;let w=rt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:w,config:t,request:x};or(function(j){n(j),b()},function(j){r(j),b()},E),x=null}"onloadend"in x?x.onloadend=m:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(m)},x.onabort=function(){x&&(r(new I("Request aborted",I.ECONNABORTED,t,x)),b(),x=null)},x.onerror=function(k){let E=k&&k.message?k.message:"Network Error",F=new I(E,I.ERR_NETWORK,t,x);F.event=k||null,r(F),b(),x=null},x.ontimeout=function(){let k=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",E=o.transitional||Vr;o.timeoutErrorMessage&&(k=o.timeoutErrorMessage),r(new I(k,E.clarifyTimeoutError?I.ETIMEDOUT:I.ECONNABORTED,t,x)),b(),x=null},i===void 0&&s.setContentType(null),"setRequestHeader"in x&&_.forEach(Ni(s),function(k,E){x.setRequestHeader(E,k)}),_.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),a&&a!=="json"&&(x.responseType=o.responseType),l&&([f,y]=_r(l,!0),x.addEventListener("progress",f)),c&&x.upload&&([d,h]=_r(c),x.upload.addEventListener("progress",d),x.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(p=w=>{x&&(r(!w||w.type?new _n(null,t,x):w),x.abort(),b(),x=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));let v=$a(o.url);if(v&&!Be.protocols.includes(v)){r(new I("Unsupported protocol "+v+":",I.ERR_BAD_REQUEST,t)),b();return}x.send(i||null)})};var lq=(t,e)=>{if(t=t?t.filter(Boolean):[],!e&&!t.length)return;let n=new AbortController,r=!1,o=function(c){if(!r){r=!0,s();let l=c instanceof Error?c:this.reason;n.abort(l instanceof I?l:new _n(l instanceof Error?l.message:l))}},i=e&&setTimeout(()=>{i=null,o(new I(`timeout of ${e}ms exceeded`,I.ETIMEDOUT))},e),s=()=>{t&&(i&&clearTimeout(i),i=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),t=null)};t.forEach(c=>c.addEventListener("abort",o,{once:!0}));let{signal:a}=n;return a.unsubscribe=()=>_.asap(s),a},hE=lq;var uq=function*(t,e){let n=t.byteLength;if(!e||n<e){yield t;return}let r=0,o;for(;r<n;)o=r+e,yield t.slice(r,o),r=o},pq=async function*(t,e){for await(let n of dq(t))yield*uq(n,e)},dq=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}let e=t.getReader();try{for(;;){let{done:n,value:r}=await e.read();if(n)break;yield r}}finally{await e.cancel()}},Eg=(t,e,n,r)=>{let o=pq(t,e),i=0,s,a=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{let{done:l,value:p}=await o.next();if(l){a(),c.close();return}let d=p.byteLength;if(n){let f=i+=d;n(f)}c.enqueue(new Uint8Array(p))}catch(l){throw a(l),l}},cancel(c){return a(c),o.return()}},{highWaterMark:2})};var gE=64*1024,{isFunction:Xl}=_,fq=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16))),yE=t=>{if(!_.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},xE=(t,...e)=>{try{return!!t(...e)}catch{return!1}},mq=t=>{let e=t.indexOf("://"),n=t;return e!==-1&&(n=n.slice(e+3)),n.includes("@")||n.includes(":")},hq=t=>{let e=_.global!==void 0&&_.global!==null?_.global:globalThis,{ReadableStream:n,TextEncoder:r}=e;t=_.merge.call({skipUndefined:!0},{Request:e.Request,Response:e.Response},t);let{fetch:o,Request:i,Response:s}=t,a=o?Xl(o):typeof fetch=="function",c=Xl(i),l=Xl(s);if(!a)return!1;let p=a&&Xl(n),d=a&&(typeof r=="function"?(m=>v=>m.encode(v))(new r):async m=>new Uint8Array(await new i(m).arrayBuffer())),f=c&&p&&xE(()=>{let m=!1,v=new i(Be.origin,{body:new n,method:"POST",get duplex(){return m=!0,"half"}}),w=v.headers.has("Content-Type");return v.body!=null&&v.body.cancel(),m&&!w}),h=l&&p&&xE(()=>_.isReadableStream(new s("").body)),y={stream:h&&(m=>m.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!y[m]&&(y[m]=(v,w)=>{let k=v&&v[m];if(k)return k.call(v);throw new I(`Response type '${m}' is not supported`,I.ERR_NOT_SUPPORT,w)})});let b=async m=>{if(m==null)return 0;if(_.isBlob(m))return m.size;if(_.isSpecCompliantForm(m))return(await new i(Be.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(_.isArrayBufferView(m)||_.isArrayBuffer(m))return m.byteLength;if(_.isURLSearchParams(m)&&(m=m+""),_.isString(m))return(await d(m)).byteLength},x=async(m,v)=>{let w=_.toFiniteNumber(m.getContentLength());return w??b(v)};return async m=>{let{url:v,method:w,data:k,signal:E,cancelToken:F,timeout:j,onDownloadProgress:me,onUploadProgress:de,responseType:oe,headers:Re,withCredentials:bt="same-origin",fetchOptions:Ve,maxContentLength:ae,maxBodyLength:yt}=Yl(m),V=_.isNumber(ae)&&ae>-1,Pt=_.isNumber(yt)&&yt>-1,Bt=ge=>_.hasOwnProp(m,ge)?m[ge]:void 0,Gn=o||fetch;oe=oe?(oe+"").toLowerCase():"text";let Ie=hE([E,F&&F.toAbortSignal()],j),B=null,qe=Ie&&Ie.unsubscribe&&(()=>{Ie.unsubscribe()}),De,Xt=null,it=()=>new I("Request body larger than maxBodyLength limit",I.ERR_BAD_REQUEST,m,B);try{let ge,ke=Bt("auth");if(ke){let pe=_.getSafeProp(ke,"username")||"",Ye=_.getSafeProp(ke,"password")||"";ge={username:pe,password:Ye}}if(mq(v)){let pe=new URL(v,Be.origin);if(!ge&&(pe.username||pe.password)){let Ye=yE(pe.username),W=yE(pe.password);ge={username:Ye,password:W}}(pe.username||pe.password)&&(pe.username="",pe.password="",v=pe.href)}if(ge&&(Re.delete("authorization"),Re.set("Authorization","Basic "+btoa(fq((ge.username||"")+":"+(ge.password||""))))),V&&typeof v=="string"&&v.startsWith("data:")&&Aa(v)>ae)throw new I("maxContentLength size of "+ae+" exceeded",I.ERR_BAD_RESPONSE,m,B);if(Pt&&w!=="get"&&w!=="head"){let pe=await b(k);if(typeof pe=="number"&&isFinite(pe)&&(De=pe,pe>yt))throw it()}let ut=Pt&&(_.isReadableStream(k)||_.isStream(k)),Oe=(pe,Ye,W)=>Eg(pe,gE,G=>{if(Pt&&G>yt)throw Xt=it();Ye&&Ye(G)},W);if(f&&w!=="get"&&w!=="head"&&(de||ut)){if(De=De??await x(Re,k),De!==0||ut){let pe=new i(v,{method:"POST",body:k,duplex:"half"}),Ye;if(_.isFormData(k)&&(Ye=pe.headers.get("content-type"))&&Re.setContentType(Ye),pe.body){let[W,G]=de&&Gi(De,_r(Wi(de)))||[];k=Oe(pe.body,W,G)}}}else if(ut&&!c&&p&&w!=="get"&&w!=="head")k=Oe(k);else if(ut&&c&&!f&&w!=="get"&&w!=="head")throw new I("Stream request bodies are not supported by the current fetch implementation",I.ERR_NOT_SUPPORT,m,B);_.isString(bt)||(bt=bt?"include":"omit");let Et=c&&"credentials"in i.prototype;if(_.isFormData(k)){let pe=Re.getContentType();pe&&/^multipart\/form-data/i.test(pe)&&!/boundary=/i.test(pe)&&Re.delete("content-type")}Re.set("User-Agent","axios/"+br,!1);let $t={...Ve,signal:Ie,method:w.toUpperCase(),headers:Ni(Re.normalize()),body:k,duplex:"half",credentials:Et?bt:void 0};B=c&&new i(v,$t);let Te=await(c?Gn(B,Ve):Gn(v,$t)),Ht=rt.from(Te.headers);if(V){let pe=_.toFiniteNumber(Ht.getContentLength());if(pe!=null&&pe>ae)throw new I("maxContentLength size of "+ae+" exceeded",I.ERR_BAD_RESPONSE,m,B)}let Sn=h&&(oe==="stream"||oe==="response");if(h&&Te.body&&(me||V||Sn&&qe)){let pe={};["status","statusText","headers"].forEach(ye=>{pe[ye]=Te[ye]});let Ye=_.toFiniteNumber(Ht.getContentLength()),[W,G]=me&&Gi(Ye,_r(Wi(me),!0))||[],be=0,Ge=ye=>{if(V&&(be=ye,be>ae))throw new I("maxContentLength size of "+ae+" exceeded",I.ERR_BAD_RESPONSE,m,B);W&&W(ye)};Te=new s(Eg(Te.body,gE,Ge,()=>{G&&G(),qe&&qe()}),pe)}oe=oe||"text";let Nt=await y[_.findKey(y,oe)||"text"](Te,m);if(V&&!h&&!Sn){let pe;if(Nt!=null&&(typeof Nt.byteLength=="number"?pe=Nt.byteLength:typeof Nt.size=="number"?pe=Nt.size:typeof Nt=="string"&&(pe=typeof r=="function"?new r().encode(Nt).byteLength:Nt.length)),typeof pe=="number"&&pe>ae)throw new I("maxContentLength size of "+ae+" exceeded",I.ERR_BAD_RESPONSE,m,B)}return!Sn&&qe&&qe(),await new Promise((pe,Ye)=>{or(pe,Ye,{data:Nt,headers:rt.from(Te.headers),status:Te.status,statusText:Te.statusText,config:m,request:B})})}catch(ge){if(qe&&qe(),Ie&&Ie.aborted&&Ie.reason instanceof I){let ke=Ie.reason;throw ke.config=m,B&&(ke.request=B),ge!==ke&&Object.defineProperty(ke,"cause",{__proto__:null,value:ge,writable:!0,enumerable:!1,configurable:!0}),ke}if(Xt)throw B&&!Xt.request&&(Xt.request=B),Xt;if(ge instanceof I)throw B&&!ge.request&&(ge.request=B),ge;if(ge&&ge.name==="TypeError"&&/Load failed|fetch/i.test(ge.message)){let ke=new I("Network Error",I.ERR_NETWORK,m,B,ge&&ge.response);throw Object.defineProperty(ke,"cause",{__proto__:null,value:ge.cause||ge,writable:!0,enumerable:!1,configurable:!0}),ke}throw I.from(ge,ge&&ge.code,m,B,ge&&ge.response)}}},gq=new Map,$g=t=>{let e=t&&t.env||{},{fetch:n,Request:r,Response:o}=e,i=[r,o,n],s=i.length,a=s,c,l,p=gq;for(;a--;)c=i[a],l=p.get(c),l===void 0&&p.set(c,l=a?new Map:hq(e)),p=l;return l},H8=$g();var Rg={http:uE,xhr:mE,fetch:{get:$g}};_.forEach(Rg,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});var vE=t=>`- ${t}`,xq=t=>_.isFunction(t)||t===null||t===!1;function vq(t,e){t=_.isArray(t)?t:[t];let{length:n}=t,r,o,i={};for(let s=0;s<n;s++){r=t[s];let a;if(o=r,!xq(r)&&(o=Rg[(a=String(r)).toLowerCase()],o===void 0))throw new I(`Unknown adapter '${a}'`);if(o&&(_.isFunction(o)||(o=o.get(e))))break;i[a||"#"+s]=o}if(!o){let s=Object.entries(i).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build")),a=n?s.length>1?`since :
|
|
59
|
+
`+s.map(vE).join(`
|
|
60
|
+
`):" "+vE(s[0]):"as no adapter specified";throw new I("There is no suitable adapter to dispatch the request "+a,I.ERR_NOT_SUPPORT)}return o}var Ql={getAdapter:vq,adapters:Rg};function Ag(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new _n(null,t)}function eu(t){return Ag(t),t.headers=rt.from(t.headers),t.data=ya.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ql.getAdapter(t.adapter||qi.adapter,t)(t).then(function(r){Ag(t),t.response=r;try{r.data=ya.call(t,t.transformResponse,r)}finally{delete t.response}return r.headers=rt.from(r.headers),r},function(r){if(!xa(r)&&(Ag(t),r&&r.response)){t.response=r.response;try{r.response.data=ya.call(t,t.transformResponse,r.response)}finally{delete t.response}r.response.headers=rt.from(r.response.headers)}return Promise.reject(r)})}var tu={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{tu[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var bE={};tu.transitional=function(e,n,r){function o(i,s){return"[Axios v"+br+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(e===!1)throw new I(o(s," has been removed"+(n?" in "+n:"")),I.ERR_DEPRECATED);return n&&!bE[s]&&(bE[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,a):!0}};tu.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function bq(t,e,n){if(typeof t!="object"||t===null)throw new I("options must be an object",I.ERR_BAD_OPTION_VALUE);let r=Object.keys(t),o=r.length;for(;o-- >0;){let i=r[o],s=Object.prototype.hasOwnProperty.call(e,i)?e[i]:void 0;if(s){let a=t[i],c=a===void 0||s(a,i,t);if(c!==!0)throw new I("option "+i+" must be "+c,I.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new I("Unknown option "+i,I.ERR_BAD_OPTION)}}var Pa={assertOptions:bq,validators:tu};var Jt=Pa.validators,Ki=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ih,response:new Ih}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;let i=(()=>{if(!o.stack)return"";let s=o.stack.indexOf(`
|
|
60
61
|
`);return s===-1?"":o.stack.slice(s+1)})();try{if(!r.stack)r.stack=i;else if(i){let s=i.indexOf(`
|
|
61
62
|
`),a=s===-1?-1:i.indexOf(`
|
|
62
63
|
`,s+1),c=a===-1?"":i.slice(a+1);String(r.stack).endsWith(c)||(r.stack+=`
|
|
63
|
-
`+i)}}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=
|
|
64
|
-
`).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let n=new
|
|
64
|
+
`+i)}}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Vn(this.defaults,n);let{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Pa.assertOptions(r,{silentJSONParsing:Jt.transitional(Jt.boolean),forcedJSONParsing:Jt.transitional(Jt.boolean),clarifyTimeoutError:Jt.transitional(Jt.boolean),legacyInterceptorReqResOrdering:Jt.transitional(Jt.boolean),advertiseZstdAcceptEncoding:Jt.transitional(Jt.boolean),validateStatusUndefinedResolves:Jt.transitional(Jt.boolean)},!1),o!=null&&(_.isFunction(o)?n.paramsSerializer={serialize:o}:Pa.assertOptions(o,{encode:Jt.function,serialize:Jt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Pa.assertOptions(n,{baseUrl:Jt.spelling("baseURL"),withXsrfToken:Jt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&_.merge(i.common,i[n.method]);i&&_.forEach(["delete","get","head","post","put","patch","query","common"],y=>{delete i[y]}),n.headers=rt.concat(s,i);let a=[],c=!0;this.interceptors.request.forEach(function(b){if(typeof b.runWhen=="function"&&b.runWhen(n)===!1)return;c=c&&b.synchronous;let x=n.transitional||Vr;x&&x.legacyInterceptorReqResOrdering?a.unshift(b.fulfilled,b.rejected):a.push(b.fulfilled,b.rejected)});let l=[];this.interceptors.response.forEach(function(b){l.push(b.fulfilled,b.rejected)});let p,d=0,f;if(!c){let y=[eu.bind(this),void 0];for(y.unshift(...a),y.push(...l),f=y.length,p=Promise.resolve(n);d<f;)p=p.then(y[d++],y[d++]);return p}f=a.length;let h=n;for(;d<f;){let y=a[d++],b=a[d++];try{h=y(h)}catch(x){b.call(this,x);break}}try{p=eu.call(this,h)}catch(y){return Promise.reject(y)}for(d=0,f=l.length;d<f;)p=p.then(l[d++],l[d++]);return p}getUri(e){e=Vn(this.defaults,e);let n=Fo(e.baseURL,e.url,e.allowAbsoluteUrls,e);return Mo(n,e.params,e.paramsSerializer)}};_.forEach(["delete","get","head","options"],function(e){Ki.prototype[e]=function(n,r){return this.request(Vn(r||{},{method:e,url:n,data:r&&_.hasOwnProp(r,"data")?r.data:void 0}))}});_.forEach(["post","put","patch","query"],function(e){function n(r){return function(i,s,a){return this.request(Vn(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Ki.prototype[e]=n(),e!=="query"&&(Ki.prototype[e+"Form"]=n(!0))});var Ca=Ki;var Pg=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});let r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i,s=new Promise(a=>{r.subscribe(a),i=a}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},e(function(i,s,a){r.reason||(r.reason=new _n(i,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){let e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new t(function(o){e=o}),cancel:e}}},_E=Pg;function Cg(t){return function(n){return t.apply(null,n)}}function Ig(t){return _.isObject(t)&&t.isAxiosError===!0}var Og={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Og).forEach(([t,e])=>{Og[e]=t});var wE=Og;function SE(t){let e=new Ca(t),n=ca(Ca.prototype.request,e);return _.extend(n,Ca.prototype,e,{allOwnKeys:!0}),_.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return SE(Vn(t,o))},n}var Tt=SE(qi);Tt.Axios=Ca;Tt.CanceledError=_n;Tt.CancelToken=_E;Tt.isCancel=xa;Tt.VERSION=br;Tt.toFormData=Hr;Tt.AxiosError=I;Tt.Cancel=Tt.CanceledError;Tt.all=function(e){return Promise.all(e)};Tt.spread=Cg;Tt.isAxiosError=Ig;Tt.mergeConfig=Vn;Tt.AxiosHeaders=rt;Tt.formToJSON=t=>ql(_.isHTMLForm(t)?new FormData(t):t);Tt.getAdapter=Ql.getAdapter;Tt.HttpStatusCode=wE;Tt.default=Tt;var vt=Tt;var{Axios:qK,AxiosError:ZK,CanceledError:BK,isCancel:HK,CancelToken:VK,VERSION:GK,all:WK,Cancel:KK,isAxiosError:JK,spread:YK,toFormData:XK,AxiosHeaders:QK,HttpStatusCode:e7,formToJSON:t7,getAdapter:n7,mergeConfig:r7,create:o7}=vt;function wr(){return process.argv.slice(2)}function Ng(){let t=wr(),e="";for(let n=0;n<t.length;n++)if(t[n]==="--token"&&n+1<t.length){e=t[n+1];break}else if(t[n].startsWith("--token=")){e=t[n].split("=")[1];break}return e}function jg(){let t=wr(),e="";for(let n=0;n<t.length;n++)if(t[n]==="--url"&&n+1<t.length){e=t[n+1];break}else if(t[n].startsWith("--url=")){e=t[n].split("=")[1];break}return e}function Lg(){let t=wr(),e=[];for(let n=0;n<t.length;n++)t[n]==="--rule"&&n+1<t.length?e.push(t[n+1]):t[n].startsWith("--rule=")&&e.push(t[n].split("=")[1]);return e}function _q(){let t=wr();for(let e of t)if(e==="--debug")return!0;return!1}function Dg(){let t=wr();for(let e of t)if(e==="--no-rule")return!0;return!1}function wq(){let t=wr();for(let e of t)if(e==="--no-prefix")return!0}function Mg(){let t=wr(),e="";for(let n=0;n<t.length;n++)if(t[n]==="--proxy"&&n+1<t.length){e=t[n+1];break}else if(t[n].startsWith("--proxy=")){e=t[n].split("=")[1];break}return e}var Sq=(t,e=32)=>t.length>e?`${t.slice(0,e)}\u2026`:t,kE=["authorization","token","secret","password","cookie","api-key","apikey"],kq=t=>{let e=t.toLowerCase();return kE.some(n=>e.includes(n))},zg=t=>{let e=t.toLowerCase();return kE.some(n=>e.includes(n))?`<redacted, length=${t.length}>`:`"${Sq(t)}"`};function Tq(){let t=wr(),e={};for(let n=0;n<t.length;n++){let r;if(t[n]==="--header"){let i=n+1<t.length?t[n+1]:void 0;if(i===void 0){console.warn('[--header] missing value (expected --header "Key: Value" or --header=Key:Value).');continue}if(i.startsWith("--")){console.warn(`[--header] missing value: next argument ${zg(i)} looks like a flag, not a header value.`);continue}r=i,n++}else if(t[n].startsWith("--header="))r=t[n].slice(9);else continue;if(!r){console.warn('[--header] received an empty value (expected --header "Key: Value" or --header=Key:Value).');continue}let o=r.indexOf(":");if(o===-1)console.warn(`Skipping invalid --header (missing ":" separator): ${zg(r)}`);else if(o===0)console.warn(`Skipping invalid --header (empty header name before ":"): ${zg(r)}`);else{let i=r.slice(0,o).trim(),s=r.slice(o+1).trim();s===""&&console.warn(`--header "${i}" has an empty value \u2014 if unintended, quote the value (e.g. --header "${i}: value"); shells split unquoted values that contain spaces.`),e[i]=s}}return e}function Eq(){let t=process.env.MG_EXTRA_HEADERS;if(!t)return{};let e;try{e=JSON.parse(t)}catch{return console.warn(`MG_EXTRA_HEADERS is not valid JSON \u2014 ignoring. Expected a JSON object like '{"X-Custom":"val"}'.`),{}}if(typeof e!="object"||e===null||Array.isArray(e))return console.warn(`MG_EXTRA_HEADERS must be a JSON object \u2014 ignoring (got ${Array.isArray(e)?"array":typeof e}).`),{};let n={};for(let[r,o]of Object.entries(e)){if(typeof o!="string"){console.warn(`MG_EXTRA_HEADERS header "${r}" ignored \u2014 value must be a string (got ${typeof o}).`);continue}n[r]=o}return n}var nu=null;function ru(){return nu||(nu={...Eq(),...Tq()},nu)}function TE(t){let e={};for(let[n,r]of Object.entries(t))e[n]=kq(n)?"<masked>":r;return e}function $q(){let t=wr();for(let e=0;e<t.length;e++){if(t[e]==="--format"&&e+1<t.length)return t[e+1];if(t[e].startsWith("--format="))return t[e].split("=")[1]}}function EE(){let t=Ng(),e=jg(),n=Lg(),r=_q(),o=Dg(),i=wq(),s=Mg(),a=$q();return{token:t,baseUrl:e,rules:n,debug:r,noRule:o,noPrefix:i,proxy:s,format:a}}var jE=Ee(require("https"));var sr=Ee(require("net"),1),Ia=Ee(require("tls"),1),OE=Ee(require("assert"),1),zE=Ee(qo(),1);var $E=Ee(require("net"),1),RE=Ee(require("http"),1),AE=require("https");var a7=Ee(require("http"),1),c7=Ee(require("https"),1);var ir=Symbol("AgentBaseInternalState"),ou=class extends RE.Agent{constructor(e){super(e),this[ir]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:n}=new Error;return typeof n!="string"?!1:n.split(`
|
|
65
|
+
`).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let n=new $E.Socket({writable:!1});return this.sockets[e].push(n),this.totalSocketCount++,n}decrementSockets(e,n){if(!this.sockets[e]||n===null)return;let r=this.sockets[e],o=r.indexOf(n);o!==-1&&(r.splice(o,1),this.totalSocketCount--,r.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?AE.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,n,r){let o={...n,secureEndpoint:this.isSecureEndpoint(n)},i=this.getName(o),s=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,o)).then(a=>{if(this.decrementSockets(i,s),typeof a.addRequest=="function")try{return a.addRequest(e,o)}catch(c){return r(c)}this[ir].currentSocket=a,super.createSocket(e,n,r)},a=>{this.decrementSockets(i,s),r(a)})}createConnection(){let e=this[ir].currentSocket;if(this[ir].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[ir].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[ir]&&(this[ir].defaultPort=e)}get protocol(){return this[ir].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[ir]&&(this[ir].protocol=e)}};var NE=require("url");var PE=Ee(qo(),1),iu=(0,PE.default)("https-proxy-agent:parse-proxy-response");function Fg(t){return new Promise((e,n)=>{let r=0,o=[];function i(){let p=t.read();p?l(p):t.once("readable",i)}function s(){t.removeListener("end",a),t.removeListener("error",c),t.removeListener("readable",i)}function a(){s(),iu("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function c(p){s(),iu("onerror %o",p),n(p)}function l(p){o.push(p),r+=p.length;let d=Buffer.concat(o,r),f=d.indexOf(`\r
|
|
65
66
|
\r
|
|
66
|
-
`);if(f===-1){
|
|
67
|
-
`),y=h.shift();if(!y)return t.destroy(),n(new Error("No header received from proxy CONNECT response"));let
|
|
67
|
+
`);if(f===-1){iu("have not received end of HTTP headers yet..."),i();return}let h=d.slice(0,f).toString("ascii").split(`\r
|
|
68
|
+
`),y=h.shift();if(!y)return t.destroy(),n(new Error("No header received from proxy CONNECT response"));let b=y.split(" "),x=+b[1],m=b.slice(2).join(" "),v={};for(let w of h){if(!w)continue;let k=w.indexOf(":");if(k===-1)return t.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${w}"`));let E=w.slice(0,k).toLowerCase(),F=w.slice(k+1).trimStart(),j=v[E];typeof j=="string"?v[E]=[j,F]:Array.isArray(j)?j.push(F):v[E]=F}iu("got proxy server response: %o %o",y,v),s(),e({connect:{statusCode:x,statusText:m,headers:v},buffered:d})}t.on("error",c),t.on("end",a),i()})}function CE(){return async({response:t,scheme:e})=>{if(e.toLowerCase()!=="negotiate")throw new Error(`Expected Negotiate scheme but got "${e}"`);let n;try{n=await import("kerberos")}catch{throw new Error('The "kerberos" package is required for Negotiate proxy authentication. Install it with: npm install kerberos')}let r=t.headers["proxy-authenticate"]||"",o=Array.isArray(r)?r[0]:r,i=typeof o=="string"&&o.includes(" ")?o.split(" ").slice(1).join(" "):void 0,a=await(await n.initializeClient("HTTP@proxy",{mechOID:n.GSS_MECH_OID_SPNEGO})).step(i||"");if(!a)throw new Error("Kerberos client.step() returned no token");return{headers:{"Proxy-Authorization":`Negotiate ${a}`}}}}var Go=(0,zE.default)("https-proxy-agent"),su=t=>t.servername===void 0&&t.host&&!sr.isIP(t.host)?{...t,servername:t.host}:t,Oa=class extends ou{constructor(e,n){super(n),this.options={path:void 0},this.proxy=typeof e=="string"?new NE.URL(e):e,this.proxyHeaders=(n==null?void 0:n.headers)??{},Go("Creating new HttpsProxyAgent instance: %o",this.proxy.href),n!=null&&n.negotiate?this.onProxyAuth=CE():n!=null&&n.onProxyAuth&&(this.onProxyAuth=n.onProxyAuth);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?Ug(n,"headers","onProxyAuth","negotiate"):null,host:r,port:o}}async connect(e,n){let{proxy:r}=this;if(!n.host)throw new TypeError('No "host" provided');let o;r.protocol==="https:"?(Go("Creating `tls.Socket`: %o",this.connectOpts),o=Ia.connect(su(this.connectOpts))):(Go("Creating `net.Socket`: %o",this.connectOpts),o=sr.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},s=sr.isIPv6(n.host)?`[${n.host}]`:n.host,a=`CONNECT ${s}:${n.port} HTTP/1.1\r
|
|
68
69
|
`;if(r.username||r.password){let f=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(f).toString("base64")}`}i.Host=`${s}:${n.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let f of Object.keys(i))a+=`${f}: ${i[f]}\r
|
|
69
|
-
`;let c=
|
|
70
|
-
`);let{connect:l,buffered:p}=await c;if(e.emit("proxyConnect",l),this.emit("proxyConnect",l,e),e.emit("proxy",{proxy:this.proxy.href,socket:o}),l.statusCode===200)return e.once("socket",
|
|
70
|
+
`;let c=Fg(o);o.write(`${a}\r
|
|
71
|
+
`);let{connect:l,buffered:p}=await c;if(e.emit("proxyConnect",l),this.emit("proxyConnect",l,e),e.emit("proxy",{proxy:this.proxy.href,socket:o}),l.statusCode===200)return e.once("socket",IE),n.secureEndpoint?(Go("Upgrading socket connection to TLS"),Ia.connect({...Ug(su(n),"host","path","port"),socket:o})):o;if(l.statusCode===407&&this.onProxyAuth){Go("Got 407 response, invoking onProxyAuth callback"),o.destroy();let f=l.headers["proxy-authenticate"]||"",h=Array.isArray(f)?f[0].split(/\s/)[0]:f.split(/\s/)[0],y=await this.onProxyAuth({response:l,scheme:h});return this._connectWithAuth(e,n,y.headers)}o.destroy();let d=new sr.Socket({writable:!1});return d.readable=!0,e.once("socket",f=>{Go("Replaying proxy buffer for failed request"),(0,OE.default)(f.listenerCount("data")>0),f.push(p),f.push(null)}),d}async _connectWithAuth(e,n,r){let{proxy:o}=this,i;o.protocol==="https:"?i=Ia.connect(su(this.connectOpts)):i=sr.connect(this.connectOpts);let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=sr.isIPv6(n.host)?`[${n.host}]`:n.host,c=`CONNECT ${a}:${n.port} HTTP/1.1\r
|
|
71
72
|
`;if(o.username||o.password){let d=`${decodeURIComponent(o.username)}:${decodeURIComponent(o.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}Object.assign(s,r),s.Host=`${a}:${n.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(s))c+=`${d}: ${s[d]}\r
|
|
72
|
-
`;let l=
|
|
73
|
-
`);let{connect:p}=await l;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),p.statusCode===200)return e.once("socket",
|
|
73
|
+
`;let l=Fg(i);i.write(`${c}\r
|
|
74
|
+
`);let{connect:p}=await l;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),p.statusCode===200)return e.once("socket",IE),n.secureEndpoint?(Go("Upgrading socket connection to TLS"),Ia.connect({...Ug(su(n),"host","path","port"),socket:i})):i;throw i.destroy(),new Error(`Proxy authentication failed with status ${p.statusCode} after retry`)}};Oa.protocols=["http","https"];function IE(t){setImmediate(()=>{t.resume()})}function Ug(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}var qg=Mg()||process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy;if(qg)try{let t=new Oa(qg,{rejectUnauthorized:!1,keepAlive:!0,keepAliveMsecs:3e4,maxSockets:50,maxFreeSockets:8});vt.defaults.httpAgent=t,vt.defaults.httpsAgent=t,vt.defaults.proxy=!1}catch{throw new Error(`Invalid proxy URL: ${qg}`)}else vt.defaults.httpsAgent=new jE.default.Agent({rejectUnauthorized:!1,keepAlive:!0,keepAliveMsecs:3e4,maxSockets:50,maxFreeSockets:8});var au=null,ar=()=>au||(au={"Content-Type":"application/json",Accept:"application/json","X-MG-UserAccessToken":process.env.MG_MCP_TOKEN||process.env.MASTERGO_API_TOKEN||Ng(),...ru()},au),cu=null,Sr=()=>{if(cu!==null)return cu;let t=process.env.API_BASE_URL||jg();try{let e=new URL(t),n=e.protocol,r=e.hostname,o=e.port,i=`${n}//${r}`;return o&&(i+=`:${o}`),cu=i,cu}catch{throw new Error(`\u65E0\u6548\u7684URL\u683C\u5F0F: ${t}\u3002\u8BF7\u63D0\u4F9B\u6B63\u786E\u7684URL\u683C\u5F0F\uFF0C\u4F8B\u5982: https://mastergo.com`)}},Rq=(t,e)=>{try{return new URL(t).host===new URL(e).host}catch{return!1}},Aq=32,Wr=new Map;function Pq(t,e){if(Wr.has(t))Wr.delete(t);else if(Wr.size>=Aq){let n=Wr.keys().next().value;n!==void 0&&Wr.delete(n)}Wr.set(t,e)}var Cq=64,Iq=300*1e3,cr=new Map,Zg=new Map;function Bg(t,e,n,r){return`${t}:${e}:${n}${r?`:${r}`:""}`}function Oq(t){let e=cr.get(t);if(e){if(Date.now()>e.expiresAt){cr.delete(t);return}return cr.delete(t),cr.set(t,e),e.value}}function zq(t,e){if(cr.has(t))cr.delete(t);else if(cr.size>=Cq){let n=cr.keys().next().value;n!==void 0&&cr.delete(n)}cr.set(t,{value:e,expiresAt:Date.now()+Iq})}async function Hg(t,e){let n=Oq(t);if(n!==void 0)return n;let r=Zg.get(t);if(r)return r;let o=e().then(i=>(zq(t,i),i)).finally(()=>{Zg.delete(t)});return Zg.set(t,o),o}var Nq=t=>{var r;let e=new Set,n=o=>{var i,s,a,c;(s=(i=o==null?void 0:o.componentInfo)==null?void 0:i.componentSetDocumentLink)!=null&&s[0]&&e.add(o.componentInfo.componentSetDocumentLink[0]),(c=(a=o.children)==null?void 0:a.forEach)==null||c.call(a,n)};return(r=t.nodes)==null||r.forEach(n),Array.from(e)},jq=()=>["CRITICAL \u2014 Page positioning: the section LIST response contains splitContainers with page-absolute coordinates for each page region. Use splitContainers to construct the page skeleton (position:absolute with exact coordinates). Do NOT guess or stack with flex.","CRITICAL \u2014 Sidebar columns: render ALL sidebar levels as persistent columns at splitContainers positions. Do NOT hide or toggle them.","token filed must be generated as a variable (colors, shadows, fonts, etc.) and the token field must be displayed in the comment","componentDocumentLinks is a list of frontend component documentation links. When it exists and is not empty, use mcp__getComponentLink to get the documentation.","",'CRITICAL \u2014 SVG FROM PATH NODES: Every PATH node has a `svgShortKey` field. The SVG markup is NOT in the DSL. Place `@@SVG:{svgShortKey}@@` where each icon goes, then call `mcp__applyDesign` to inject real SVG. NEVER hand-write `<path d="...">`.',"CRITICAL \u2014 RENDER EVERY PATH NODE ICON: do NOT skip any PATH node. Each PATH node must have a `@@SVG:{svgShortKey}@@` placeholder in your code. Table headers have sort/filter/search icons, sidebar menu items have PATH icons, pagination has prev/next/refresh/dropdown icons. A header cell with only plain text is a fidelity defect. After all placeholders are placed, call `mcp__applyDesign`.","",'CRITICAL \u2014 OMIT _placeholder TEXT: any TEXT node with `_placeholder: true` is component-library boilerplate \u2014 the node name equals its text content (e.g. name="Hillstone Design" and text="Hillstone Design"). These appear in rowTexts[] with `_placeholder: true` \u2014 skip them. allTexts does NOT include placeholder strings. EXCEPTION: if _placeholder TEXT is the ONLY text in its section, it may be real content with an auto-generated name \u2014 evaluate carefully.',"CRITICAL \u2014 CLOSED-SET TEXT: the section LIST response carries `rootMetadata.allTexts` \u2014 the complete whitelist of real text strings in this design. Any visible string NOT in allTexts is either placeholder (omit) or hallucination (delete). allTexts EXCLUDES _placeholder boilerplate.","","CRITICAL \u2014 INSTANCE fill color: when an INSTANCE has both `fill` and `_color`, use `_color` directly as the CSS value. Do NOT guess colors from _variantProps semantics.","CRITICAL \u2014 INSTANCE _variantProps: compare across siblings for selected/hovered/disabled. Active class MUST match DSL variant state, NOT a default index.","CRITICAL \u2014 Render count = structureSiblingCount: if ssc=1, that single instance IS complete \u2014 do NOT fabricate extra rows/items.","CRITICAL \u2014 BACKGROUND FROM splitContainers: splitContainers[].background IS the exact CSS background-color. Copy verbatim, no changes.","CRITICAL \u2014 FRAME/GROUP opacity: translate to rgba() on background only, NOT CSS opacity (would make children translucent).","CRITICAL \u2014 rowTexts: each entry has parentType/parentName for context and `_placeholder: true` if boilerplate. Use parentName to place text correctly; skip _placeholder entries.","Render ALL nodes recursively. Section root layoutStyle.width = section width. Do not call mcp__getDsl after completing section workflow.",...JSON.parse(process.env.RULES??"[]"),...Lg()].map(e=>rn(e)),Lq=()=>({async getMeta(t,e,n){let r=Bg("meta",t,e,n);return Hg(r,async()=>(await vt.get(`${Sr()}/mcp/meta`,{timeout:3e4,params:{fileId:t,layerId:e,...n?{sourceLayerId:n}:{}},headers:ar()})).data)},async getDsl(t,e,n){let r=Bg("dsl",t,e,n==null?void 0:n.sourceLayerId);return Hg(r,async()=>{let o={fileId:t,layerId:e};(n==null?void 0:n.sourceLayerId)!==void 0&&(o.sourceLayerId=n.sourceLayerId);let i=await vt.get(`${Sr()}/mcp/dsl`,{timeout:3e4,params:o,headers:ar()});return{dsl:i.data,componentDocumentLinks:Nq(i.data),rules:Dg()?[]:jq()}})},async extractSvg(t,e,n,r,o){let i={fileId:t,layerId:e};return n&&(i.backgroundColor=n),r!==void 0&&(i.page=r),o!==void 0&&(i.pageSize=o),(await vt.get(`${Sr()}/mcp/extract-svg`,{timeout:3e4,params:i,headers:ar()})).data},async getDesignSections(t,e,n){let r=Bg("sections",t,e,n!==void 0?String(n):"list");return Hg(r,async()=>{var i;let o={fileId:t,layerId:e};n!==void 0&&(o.sectionIndex=n);try{return(await vt.get(`${Sr()}/mcp/design-sections`,{timeout:12e4,params:o,headers:ar()})).data}catch(s){throw((i=s.response)==null?void 0:i.status)===404?new Error("design-sections API not available on this server. Please update frontend-mcp-server to the latest version."):s}})},async getD2c(t,e){let n={contentId:t,documentId:e};return(await vt.get(`${Sr()}/mcp/d2c/events`,{timeout:3e4,params:n,headers:ar()})).data},async postC2d(t,e,n){return(await vt.post(`${Sr()}/mcp/c2d`,{data:t,fileId:e,layerId:n},{timeout:3e4,headers:ar()})).data},async applyDesign(t,e,n,r,o){var i;try{return(await vt.post(`${Sr()}/mcp/apply-design`,{code:t,fileId:e,layerId:n,...r?{sourceLayerId:r}:{},...o?{targetLang:o}:{}},{timeout:6e4,headers:ar()})).data}catch(s){throw((i=s.response)==null?void 0:i.status)===404?new Error("apply-design API not available on this server. Please update frontend-mcp-server to the latest version to enable placeholder post-processing."):s}},async getComponentStyleJson(t,e,n){return(await vt.get(`${Sr()}/mcp/style`,{timeout:3e4,params:{fileId:t,layerId:e,...n?{sourceLayerId:n}:{}},headers:ar()})).data},async request(t){return(await vt.request({...t,headers:{...ar(),...t.headers}})).data},async extractIdsFromUrl(t){if(t.includes("/goto/")&&Wr.has(t))return{...Wr.get(t)};let e=t;if(t.includes("/goto/")){let l=Rq(t,Sr()),d=(await vt.get(t,{maxRedirects:0,validateStatus:f=>f>=300&&f<400,...l?{headers:ar()}:{}})).headers.location;if(!d)throw new Error("No redirect URL found for short link");e=new URL(d,t).href}let n=new URL(e),r=n.pathname.split("/"),o=new URLSearchParams(n.search),i=r.find(l=>/^\d+$/.test(l)),s=o.get("layer_id");if(!i)throw new Error("Could not extract fileId from URL");if(!s)throw new Error("Could not extract layerId from URL");let a=o.get("source_layer_id")||void 0,c={fileId:i,layerId:s,sourceLayerId:a};return t.includes("/goto/")&&Pq(t,c),c}}),ot=Lq();function Dq(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Yt={},lu={},Kr={},LE;function za(){if(LE)return Kr;LE=1;function t(s){return typeof s>"u"||s===null}function e(s){return typeof s=="object"&&s!==null}function n(s){return Array.isArray(s)?s:t(s)?[]:[s]}function r(s,a){if(a){let c=Object.keys(a);for(let l=0,p=c.length;l<p;l+=1){let d=c[l];s[d]=a[d]}}return s}function o(s,a){let c="";for(let l=0;l<a;l+=1)c+=s;return c}function i(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return Kr.isNothing=t,Kr.isObject=e,Kr.toArray=n,Kr.repeat=o,Kr.isNegativeZero=i,Kr.extend=r,Kr}var Vg,DE;function Na(){if(DE)return Vg;DE=1;function t(n,r){let o="",i=n.reason||"(unknown reason)";return n.mark?(n.mark.name&&(o+='in "'+n.mark.name+'" '),o+="("+(n.mark.line+1)+":"+(n.mark.column+1)+")",!r&&n.mark.snippet&&(o+=`
|
|
74
75
|
|
|
75
|
-
`+n.mark.snippet),i+" "+o):i}function e(n,r){Error.call(this),this.name="YAMLException",this.reason=n,this.mark=r,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(r){return this.name+": "+t(this,r)},
|
|
76
|
+
`+n.mark.snippet),i+" "+o):i}function e(n,r){Error.call(this),this.name="YAMLException",this.reason=n,this.mark=r,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=function(r){return this.name+": "+t(this,r)},Vg=e,Vg}var Gg,ME;function Mq(){if(ME)return Gg;ME=1;let t=za();function e(o,i,s,a,c){let l="",p="",d=Math.floor(c/2)-1;return a-i>d&&(l=" ... ",i=a-d+l.length),s-a>d&&(p=" ...",s=a+d-p.length),{str:l+o.slice(i,s).replace(/\t/g,"\u2192")+p,pos:a-i+l.length}}function n(o,i){return t.repeat(" ",i-o.length)+o}function r(o,i){if(i=Object.create(i||null),!o.buffer)return null;i.maxLength||(i.maxLength=79),typeof i.indent!="number"&&(i.indent=1),typeof i.linesBefore!="number"&&(i.linesBefore=3),typeof i.linesAfter!="number"&&(i.linesAfter=2);let s=/\r?\n|\r|\0/g,a=[0],c=[],l,p=-1;for(;l=s.exec(o.buffer);)c.push(l.index),a.push(l.index+l[0].length),o.position<=l.index&&p<0&&(p=a.length-2);p<0&&(p=a.length-1);let d="",f=Math.min(o.line+i.linesAfter,c.length).toString().length,h=i.maxLength-(i.indent+f+3);for(let b=1;b<=i.linesBefore&&!(p-b<0);b++){let x=e(o.buffer,a[p-b],c[p-b],o.position-(a[p]-a[p-b]),h);d=t.repeat(" ",i.indent)+n((o.line-b+1).toString(),f)+" | "+x.str+`
|
|
76
77
|
`+d}let y=e(o.buffer,a[p],c[p],o.position,h);d+=t.repeat(" ",i.indent)+n((o.line+1).toString(),f)+" | "+y.str+`
|
|
77
78
|
`,d+=t.repeat("-",i.indent+f+3+y.pos)+`^
|
|
78
|
-
`;for(let
|
|
79
|
-
`}return d.replace(/\n$/,"")}return
|
|
80
|
-
\r`;function n(s){if(s===null)return!1;let a=0,c=s.length,l=e;for(let p=0;p<c;p++){let d=l.indexOf(s.charAt(p));if(!(d>64)){if(d<0)return!1;a+=6}}return a%8===0}function r(s){let a=s.replace(/[\r\n=]/g,""),c=a.length,l=e,p=0,d=[];for(let h=0;h<c;h++)h%4===0&&h&&(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)),p=p<<6|l.indexOf(a.charAt(h));let f=c%4*6;return f===0?(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)):f===18?(d.push(p>>10&255),d.push(p>>2&255)):f===12&&d.push(p>>4&255),new Uint8Array(d)}function o(s){let a="",c=0,l=s.length,p=e;for(let f=0;f<l;f++)f%3===0&&f&&(a+=p[c>>18&63],a+=p[c>>12&63],a+=p[c>>6&63],a+=p[c&63]),c=(c<<8)+s[f];let d=l%3;return d===0?(a+=p[c>>18&63],a+=p[c>>12&63],a+=p[c>>6&63],a+=p[c&63]):d===2?(a+=p[c>>10&63],a+=p[c>>4&63],a+=p[c<<2&63],a+=p[64]):d===1&&(a+=p[c>>2&63],a+=p[c<<4&63],a+=p[64],a+=p[64]),a}function i(s){return Object.prototype.toString.call(s)==="[object Uint8Array]"}return
|
|
81
|
-
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function oe(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function Re(u,S,C){S==="__proto__"?Object.defineProperty(u,S,{configurable:!0,enumerable:!0,writable:!0,value:C}):u[S]=C}let bt=new Array(256),Ve=new Array(256);for(let u=0;u<256;u++)bt[u]=de(u)?1:0,Ve[u]=de(u);function ae(u,S){this.input=u,this.filename=S.filename||null,this.schema=S.schema||r,this.onWarning=S.onWarning||null,this.legacy=S.legacy||!1,this.json=S.json||!1,this.listener=S.listener||null,this.maxDepth=typeof S.maxDepth=="number"?S.maxDepth:100,this.maxTotalMergeKeys=typeof S.maxTotalMergeKeys=="number"?S.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=u.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function yt(u,S){let C={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return C.snippet=n(C),new e(S,C)}function V(u,S){throw yt(u,S)}function
|
|
82
|
-
`,S-1))}function Te(u,S,C){let N,A,Z,g,T,D,O=u.kind,z=u.result,M=u.input.charCodeAt(u.position);if(k(M)||E(M)||M===35||M===38||M===42||M===33||M===124||M===62||M===39||M===34||M===37||M===64||M===96)return!1;if(M===63||M===45){let L=u.input.charCodeAt(u.position+1);if(k(L)||C&&E(L))return!1}for(u.kind="scalar",u.result="",N=A=u.position,Z=!1;M!==0;){if(M===58){let L=u.input.charCodeAt(u.position+1);if(k(L)||C&&E(L))break}else if(M===35){let L=u.input.charCodeAt(u.position-1);if(k(L))break}else{if(u.position===u.lineStart&&
|
|
79
|
+
`;for(let b=1;b<=i.linesAfter&&!(p+b>=c.length);b++){let x=e(o.buffer,a[p+b],c[p+b],o.position-(a[p]-a[p+b]),h);d+=t.repeat(" ",i.indent)+n((o.line+b+1).toString(),f)+" | "+x.str+`
|
|
80
|
+
`}return d.replace(/\n$/,"")}return Gg=r,Gg}var Wg,FE;function on(){if(FE)return Wg;FE=1;let t=Na(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],n=["scalar","sequence","mapping"];function r(i){let s={};return i!==null&&Object.keys(i).forEach(function(a){i[a].forEach(function(c){s[String(c)]=a})}),s}function o(i,s){if(s=s||{},Object.keys(s).forEach(function(a){if(e.indexOf(a)===-1)throw new t('Unknown option "'+a+'" is met in definition of "'+i+'" YAML type.')}),this.options=s,this.tag=i,this.kind=s.kind||null,this.resolve=s.resolve||function(){return!0},this.construct=s.construct||function(a){return a},this.instanceOf=s.instanceOf||null,this.predicate=s.predicate||null,this.represent=s.represent||null,this.representName=s.representName||null,this.defaultStyle=s.defaultStyle||null,this.multi=s.multi||!1,this.styleAliases=r(s.styleAliases||null),n.indexOf(this.kind)===-1)throw new t('Unknown kind "'+this.kind+'" is specified for "'+i+'" YAML type.')}return Wg=o,Wg}var Kg,UE;function c$(){if(UE)return Kg;UE=1;let t=Na(),e=on();function n(i,s){let a=[];return i[s].forEach(function(c){let l=a.length;a.forEach(function(p,d){p.tag===c.tag&&p.kind===c.kind&&p.multi===c.multi&&(l=d)}),a[l]=c}),a}function r(){let i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function s(a){a.multi?(i.multi[a.kind].push(a),i.multi.fallback.push(a)):i[a.kind][a.tag]=i.fallback[a.tag]=a}for(let a=0,c=arguments.length;a<c;a+=1)arguments[a].forEach(s);return i}function o(i){return this.extend(i)}return o.prototype.extend=function(s){let a=[],c=[];if(s instanceof e)c.push(s);else if(Array.isArray(s))c=c.concat(s);else if(s&&(Array.isArray(s.implicit)||Array.isArray(s.explicit)))s.implicit&&(a=a.concat(s.implicit)),s.explicit&&(c=c.concat(s.explicit));else throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(p){if(!(p instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(p.loadKind&&p.loadKind!=="scalar")throw new t("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(p.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),c.forEach(function(p){if(!(p instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});let l=Object.create(o.prototype);return l.implicit=(this.implicit||[]).concat(a),l.explicit=(this.explicit||[]).concat(c),l.compiledImplicit=n(l,"implicit"),l.compiledExplicit=n(l,"explicit"),l.compiledTypeMap=r(l.compiledImplicit,l.compiledExplicit),l},Kg=o,Kg}var Jg,qE;function l$(){if(qE)return Jg;qE=1;let t=on();return Jg=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Jg}var Yg,ZE;function u$(){if(ZE)return Yg;ZE=1;let t=on();return Yg=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Yg}var Xg,BE;function p$(){if(BE)return Xg;BE=1;let t=on();return Xg=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Xg}var Qg,HE;function d$(){if(HE)return Qg;HE=1;let t=c$();return Qg=new t({explicit:[l$(),u$(),p$()]}),Qg}var ey,VE;function f$(){if(VE)return ey;VE=1;let t=on();function e(o){if(o===null)return!0;let i=o.length;return i===1&&o==="~"||i===4&&(o==="null"||o==="Null"||o==="NULL")}function n(){return null}function r(o){return o===null}return ey=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:n,predicate:r,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"}),ey}var ty,GE;function m$(){if(GE)return ty;GE=1;let t=on();function e(o){if(o===null)return!1;let i=o.length;return i===4&&(o==="true"||o==="True"||o==="TRUE")||i===5&&(o==="false"||o==="False"||o==="FALSE")}function n(o){return o==="true"||o==="True"||o==="TRUE"}function r(o){return Object.prototype.toString.call(o)==="[object Boolean]"}return ty=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:n,predicate:r,represent:{lowercase:function(o){return o?"true":"false"},uppercase:function(o){return o?"TRUE":"FALSE"},camelcase:function(o){return o?"True":"False"}},defaultStyle:"lowercase"}),ty}var ny,WE;function h$(){if(WE)return ny;WE=1;let t=za(),e=on();function n(l){return l>=48&&l<=57||l>=65&&l<=70||l>=97&&l<=102}function r(l){return l>=48&&l<=55}function o(l){return l>=48&&l<=57}function i(l){if(l===null)return!1;let p=l.length,d=0,f=!1;if(!p)return!1;let h=l[d];if((h==="-"||h==="+")&&(h=l[++d]),h==="0"){if(d+1===p)return!0;if(h=l[++d],h==="b"){for(d++;d<p;d++){if(h=l[d],h!=="0"&&h!=="1")return!1;f=!0}return f&&isFinite(s(l))}if(h==="x"){for(d++;d<p;d++){if(!n(l.charCodeAt(d)))return!1;f=!0}return f&&isFinite(s(l))}if(h==="o"){for(d++;d<p;d++){if(!r(l.charCodeAt(d)))return!1;f=!0}return f&&isFinite(s(l))}}for(;d<p;d++){if(!o(l.charCodeAt(d)))return!1;f=!0}return f?isFinite(s(l)):!1}function s(l){let p=l,d=1,f=p[0];if((f==="-"||f==="+")&&(f==="-"&&(d=-1),p=p.slice(1),f=p[0]),p==="0")return 0;if(f==="0"){if(p[1]==="b")return d*parseInt(p.slice(2),2);if(p[1]==="x")return d*parseInt(p.slice(2),16);if(p[1]==="o")return d*parseInt(p.slice(2),8)}return d*parseInt(p,10)}function a(l){return s(l)}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&l%1===0&&!t.isNegativeZero(l)}return ny=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:i,construct:a,predicate:c,represent:{binary:function(l){return l>=0?"0b"+l.toString(2):"-0b"+l.toString(2).slice(1)},octal:function(l){return l>=0?"0o"+l.toString(8):"-0o"+l.toString(8).slice(1)},decimal:function(l){return l.toString(10)},hexadecimal:function(l){return l>=0?"0x"+l.toString(16).toUpperCase():"-0x"+l.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ny}var ry,KE;function g$(){if(KE)return ry;KE=1;let t=za(),e=on(),n=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),r=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(l){return l===null||!n.test(l)?!1:isFinite(parseFloat(l,10))?!0:r.test(l)}function i(l){let p=l.toLowerCase(),d=p[0]==="-"?-1:1;return"+-".indexOf(p[0])>=0&&(p=p.slice(1)),p===".inf"?d===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:p===".nan"?NaN:d*parseFloat(p,10)}let s=/^[-+]?[0-9]+e/;function a(l,p){if(isNaN(l))switch(p){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===l)switch(p){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===l)switch(p){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(l))return"-0.0";let d=l.toString(10);return s.test(d)?d.replace("e",".e"):d}function c(l){return Object.prototype.toString.call(l)==="[object Number]"&&(l%1!==0||t.isNegativeZero(l))}return ry=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:i,predicate:c,represent:a,defaultStyle:"lowercase"}),ry}var oy,JE;function y$(){return JE||(JE=1,oy=d$().extend({implicit:[f$(),m$(),h$(),g$()]})),oy}var iy,YE;function x$(){return YE||(YE=1,iy=y$()),iy}var sy,XE;function v$(){if(XE)return sy;XE=1;let t=on(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),n=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function r(s){return s===null?!1:e.exec(s)!==null||n.exec(s)!==null}function o(s){let a=0,c=null,l=e.exec(s);if(l===null&&(l=n.exec(s)),l===null)throw new Error("Date resolve error");let p=+l[1],d=+l[2]-1,f=+l[3];if(!l[4])return new Date(Date.UTC(p,d,f));let h=+l[4],y=+l[5],b=+l[6];if(l[7]){for(a=l[7].slice(0,3);a.length<3;)a+="0";a=+a}if(l[9]){let m=+l[10],v=+(l[11]||0);c=(m*60+v)*6e4,l[9]==="-"&&(c=-c)}let x=new Date(Date.UTC(p,d,f,h,y,b,a));return c&&x.setTime(x.getTime()-c),x}function i(s){return s.toISOString()}return sy=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:o,instanceOf:Date,represent:i}),sy}var ay,QE;function b$(){if(QE)return ay;QE=1;let t=on();function e(n){return n==="<<"||n===null}return ay=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),ay}var cy,e$;function _$(){if(e$)return cy;e$=1;let t=on(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
81
|
+
\r`;function n(s){if(s===null)return!1;let a=0,c=s.length,l=e;for(let p=0;p<c;p++){let d=l.indexOf(s.charAt(p));if(!(d>64)){if(d<0)return!1;a+=6}}return a%8===0}function r(s){let a=s.replace(/[\r\n=]/g,""),c=a.length,l=e,p=0,d=[];for(let h=0;h<c;h++)h%4===0&&h&&(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)),p=p<<6|l.indexOf(a.charAt(h));let f=c%4*6;return f===0?(d.push(p>>16&255),d.push(p>>8&255),d.push(p&255)):f===18?(d.push(p>>10&255),d.push(p>>2&255)):f===12&&d.push(p>>4&255),new Uint8Array(d)}function o(s){let a="",c=0,l=s.length,p=e;for(let f=0;f<l;f++)f%3===0&&f&&(a+=p[c>>18&63],a+=p[c>>12&63],a+=p[c>>6&63],a+=p[c&63]),c=(c<<8)+s[f];let d=l%3;return d===0?(a+=p[c>>18&63],a+=p[c>>12&63],a+=p[c>>6&63],a+=p[c&63]):d===2?(a+=p[c>>10&63],a+=p[c>>4&63],a+=p[c<<2&63],a+=p[64]):d===1&&(a+=p[c>>2&63],a+=p[c<<4&63],a+=p[64],a+=p[64]),a}function i(s){return Object.prototype.toString.call(s)==="[object Uint8Array]"}return cy=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n,construct:r,predicate:i,represent:o}),cy}var ly,t$;function w$(){if(t$)return ly;t$=1;let t=on(),e=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(i){if(i===null)return!0;let s={},a=i;for(let c=0,l=a.length;c<l;c+=1){let p=a[c],d=!1;if(n.call(p)!=="[object Object]")return!1;let f;for(f in p)if(e.call(p,f))if(!d)d=!0;else return!1;if(!d||e.call(s,f))return!1;Object.defineProperty(s,f,{value:!0})}return!0}function o(i){return i!==null?i:[]}return ly=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:o}),ly}var uy,n$;function S$(){if(n$)return uy;n$=1;let t=on(),e=Object.prototype.toString;function n(o){if(o===null)return!0;let i=o,s=new Array(i.length);for(let a=0,c=i.length;a<c;a+=1){let l=i[a];if(e.call(l)!=="[object Object]")return!1;let p=Object.keys(l);if(p.length!==1)return!1;s[a]=[p[0],l[p[0]]]}return!0}function r(o){if(o===null)return[];let i=o,s=new Array(i.length);for(let a=0,c=i.length;a<c;a+=1){let l=i[a],p=Object.keys(l);s[a]=[p[0],l[p[0]]]}return s}return uy=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:n,construct:r}),uy}var py,r$;function k$(){if(r$)return py;r$=1;let t=on(),e=Object.prototype.hasOwnProperty;function n(o){if(o===null)return!0;let i=o;for(let s in i)if(e.call(i,s)&&i[s]!==null)return!1;return!0}function r(o){return o!==null?o:{}}return py=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:n,construct:r}),py}var dy,o$;function my(){return o$||(o$=1,dy=x$().extend({implicit:[v$(),b$()],explicit:[_$(),w$(),S$(),k$()]})),dy}var i$;function Fq(){if(i$)return lu;i$=1;let t=za(),e=Na(),n=Mq(),r=my(),o=Object.prototype.hasOwnProperty,i=1,s=2,a=3,c=4,l=1,p=2,d=3,f=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,h=/[\x85\u2028\u2029]/,y=/[,\[\]{}]/,b=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function m(u){return Object.prototype.toString.call(u)}function v(u){return u===10||u===13}function w(u){return u===9||u===32}function k(u){return u===9||u===32||u===10||u===13}function E(u){return u===44||u===91||u===93||u===123||u===125}function F(u){if(u>=48&&u<=57)return u-48;let S=u|32;return S>=97&&S<=102?S-97+10:-1}function j(u){return u===120?2:u===117?4:u===85?8:0}function me(u){return u>=48&&u<=57?u-48:-1}function de(u){switch(u){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
82
|
+
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function oe(u){return u<=65535?String.fromCharCode(u):String.fromCharCode((u-65536>>10)+55296,(u-65536&1023)+56320)}function Re(u,S,C){S==="__proto__"?Object.defineProperty(u,S,{configurable:!0,enumerable:!0,writable:!0,value:C}):u[S]=C}let bt=new Array(256),Ve=new Array(256);for(let u=0;u<256;u++)bt[u]=de(u)?1:0,Ve[u]=de(u);function ae(u,S){this.input=u,this.filename=S.filename||null,this.schema=S.schema||r,this.onWarning=S.onWarning||null,this.legacy=S.legacy||!1,this.json=S.json||!1,this.listener=S.listener||null,this.maxDepth=typeof S.maxDepth=="number"?S.maxDepth:100,this.maxTotalMergeKeys=typeof S.maxTotalMergeKeys=="number"?S.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=u.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function yt(u,S){let C={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return C.snippet=n(C),new e(S,C)}function V(u,S){throw yt(u,S)}function Pt(u,S){u.onWarning&&u.onWarning.call(null,yt(u,S))}function Bt(u,S,C){let N=u.anchorMapTransactions;if(N.length!==0){let A=N[N.length-1];o.call(A,S)||(A[S]={existed:o.call(u.anchorMap,S),value:u.anchorMap[S]})}u.anchorMap[S]=C}function Gn(u){u.anchorMapTransactions.push(Object.create(null))}function Ie(u){let S=u.anchorMapTransactions.pop(),C=u.anchorMapTransactions;if(C.length===0)return;let N=C[C.length-1],A=Object.keys(S);for(let Z=0,g=A.length;Z<g;Z+=1){let T=A[Z];o.call(N,T)||(N[T]=S[T])}}function B(u){let S=u.anchorMapTransactions.pop(),C=Object.keys(S);for(let N=C.length-1;N>=0;N-=1){let A=S[C[N]];A.existed?u.anchorMap[C[N]]=A.value:delete u.anchorMap[C[N]]}}function qe(u){return{position:u.position,line:u.line,lineStart:u.lineStart,lineIndent:u.lineIndent,firstTabInLine:u.firstTabInLine,tag:u.tag,anchor:u.anchor,kind:u.kind,result:u.result}}function De(u,S){u.position=S.position,u.line=S.line,u.lineStart=S.lineStart,u.lineIndent=S.lineIndent,u.firstTabInLine=S.firstTabInLine,u.tag=S.tag,u.anchor=S.anchor,u.kind=S.kind,u.result=S.result}let Xt={YAML:function(S,C,N){S.version!==null&&V(S,"duplication of %YAML directive"),N.length!==1&&V(S,"YAML directive accepts exactly one argument");let A=/^([0-9]+)\.([0-9]+)$/.exec(N[0]);A===null&&V(S,"ill-formed argument of the YAML directive");let Z=parseInt(A[1],10),g=parseInt(A[2],10);Z!==1&&V(S,"unacceptable YAML version of the document"),S.version=N[0],S.checkLineBreaks=g<2,g!==1&&g!==2&&Pt(S,"unsupported YAML version of the document")},TAG:function(S,C,N){let A;N.length!==2&&V(S,"TAG directive accepts exactly two arguments");let Z=N[0];A=N[1],b.test(Z)||V(S,"ill-formed tag handle (first argument) of the TAG directive"),o.call(S.tagMap,Z)&&V(S,'there is a previously declared suffix for "'+Z+'" tag handle'),x.test(A)||V(S,"ill-formed tag prefix (second argument) of the TAG directive");try{A=decodeURIComponent(A)}catch{V(S,"tag prefix is malformed: "+A)}S.tagMap[Z]=A}};function it(u,S,C,N){if(S<C){let A=u.input.slice(S,C);if(N)for(let Z=0,g=A.length;Z<g;Z+=1){let T=A.charCodeAt(Z);T===9||T>=32&&T<=1114111||V(u,"expected valid JSON character")}else f.test(A)&&V(u,"the stream contains non-printable characters");u.result+=A}}function ge(u,S,C,N){t.isObject(C)||V(u,"cannot merge mappings; the provided source object is unacceptable");let A=Object.keys(C);for(let Z=0,g=A.length;Z<g;Z+=1){let T=A[Z];u.maxTotalMergeKeys!==-1&&++u.totalMergeKeys>u.maxTotalMergeKeys&&V(u,"merge keys exceeded maxTotalMergeKeys ("+u.maxTotalMergeKeys+")"),o.call(S,T)||(Re(S,T,C[T]),N[T]=!0)}}function ke(u,S,C,N,A,Z,g,T,D){if(Array.isArray(A)){A=Array.prototype.slice.call(A);for(let O=0,z=A.length;O<z;O+=1)Array.isArray(A[O])&&V(u,"nested arrays are not supported inside keys"),typeof A=="object"&&m(A[O])==="[object Object]"&&(A[O]="[object Object]")}if(typeof A=="object"&&m(A)==="[object Object]"&&(A="[object Object]"),A=String(A),S===null&&(S={}),N==="tag:yaml.org,2002:merge")if(Array.isArray(Z))for(let O=0,z=Z.length;O<z;O+=1)ge(u,S,Z[O],C);else ge(u,S,Z,C);else!u.json&&!o.call(C,A)&&o.call(S,A)&&(u.line=g||u.line,u.lineStart=T||u.lineStart,u.position=D||u.position,V(u,"duplicated mapping key")),Re(S,A,Z),delete C[A];return S}function ut(u){let S=u.input.charCodeAt(u.position);S===10?u.position++:S===13?(u.position++,u.input.charCodeAt(u.position)===10&&u.position++):V(u,"a line break is expected"),u.line+=1,u.lineStart=u.position,u.firstTabInLine=-1}function Oe(u,S,C){let N=0,A=u.input.charCodeAt(u.position);for(;A!==0;){for(;w(A);)A===9&&u.firstTabInLine===-1&&(u.firstTabInLine=u.position),A=u.input.charCodeAt(++u.position);if(S&&A===35)do A=u.input.charCodeAt(++u.position);while(A!==10&&A!==13&&A!==0);if(v(A))for(ut(u),A=u.input.charCodeAt(u.position),N++,u.lineIndent=0;A===32;)u.lineIndent++,A=u.input.charCodeAt(++u.position);else break}return C!==-1&&N!==0&&u.lineIndent<C&&Pt(u,"deficient indentation"),N}function Et(u){let S=u.position,C=u.input.charCodeAt(S);return!!((C===45||C===46)&&C===u.input.charCodeAt(S+1)&&C===u.input.charCodeAt(S+2)&&(S+=3,C=u.input.charCodeAt(S),C===0||k(C)))}function $t(u,S){S===1?u.result+=" ":S>1&&(u.result+=t.repeat(`
|
|
83
|
+
`,S-1))}function Te(u,S,C){let N,A,Z,g,T,D,O=u.kind,z=u.result,M=u.input.charCodeAt(u.position);if(k(M)||E(M)||M===35||M===38||M===42||M===33||M===124||M===62||M===39||M===34||M===37||M===64||M===96)return!1;if(M===63||M===45){let L=u.input.charCodeAt(u.position+1);if(k(L)||C&&E(L))return!1}for(u.kind="scalar",u.result="",N=A=u.position,Z=!1;M!==0;){if(M===58){let L=u.input.charCodeAt(u.position+1);if(k(L)||C&&E(L))break}else if(M===35){let L=u.input.charCodeAt(u.position-1);if(k(L))break}else{if(u.position===u.lineStart&&Et(u)||C&&E(M))break;if(v(M))if(g=u.line,T=u.lineStart,D=u.lineIndent,Oe(u,!1,-1),u.lineIndent>=S){Z=!0,M=u.input.charCodeAt(u.position);continue}else{u.position=A,u.line=g,u.lineStart=T,u.lineIndent=D;break}}Z&&(it(u,N,A,!1),$t(u,u.line-g),N=A=u.position,Z=!1),w(M)||(A=u.position+1),M=u.input.charCodeAt(++u.position)}return it(u,N,A,!1),u.result?!0:(u.kind=O,u.result=z,!1)}function Ht(u,S){let C,N,A=u.input.charCodeAt(u.position);if(A!==39)return!1;for(u.kind="scalar",u.result="",u.position++,C=N=u.position;(A=u.input.charCodeAt(u.position))!==0;)if(A===39)if(it(u,C,u.position,!0),A=u.input.charCodeAt(++u.position),A===39)C=u.position,u.position++,N=u.position;else return!0;else v(A)?(it(u,C,N,!0),$t(u,Oe(u,!1,S)),C=N=u.position):u.position===u.lineStart&&Et(u)?V(u,"unexpected end of the document within a single quoted scalar"):(u.position++,w(A)||(N=u.position));V(u,"unexpected end of the stream within a single quoted scalar")}function Sn(u,S){let C,N,A,Z=u.input.charCodeAt(u.position);if(Z!==34)return!1;for(u.kind="scalar",u.result="",u.position++,C=N=u.position;(Z=u.input.charCodeAt(u.position))!==0;){if(Z===34)return it(u,C,u.position,!0),u.position++,!0;if(Z===92){if(it(u,C,u.position,!0),Z=u.input.charCodeAt(++u.position),v(Z))Oe(u,!1,S);else if(Z<256&&bt[Z])u.result+=Ve[Z],u.position++;else if((A=j(Z))>0){let g=A,T=0;for(;g>0;g--)Z=u.input.charCodeAt(++u.position),(A=F(Z))>=0?T=(T<<4)+A:V(u,"expected hexadecimal character");u.result+=oe(T),u.position++}else V(u,"unknown escape sequence");C=N=u.position}else v(Z)?(it(u,C,N,!0),$t(u,Oe(u,!1,S)),C=N=u.position):u.position===u.lineStart&&Et(u)?V(u,"unexpected end of the document within a double quoted scalar"):(u.position++,w(Z)||(N=u.position))}V(u,"unexpected end of the stream within a double quoted scalar")}function Nt(u,S){let C=!0,N,A,Z,g=u.tag,T,D=u.anchor,O,z,M,L,Q=Object.create(null),J,ie,ce,ze=u.input.charCodeAt(u.position);if(ze===91)O=93,L=!1,T=[];else if(ze===123)O=125,L=!0,T={};else return!1;for(u.anchor!==null&&Bt(u,u.anchor,T),ze=u.input.charCodeAt(++u.position);ze!==0;){if(Oe(u,!0,S),ze=u.input.charCodeAt(u.position),ze===O)return u.position++,u.tag=g,u.anchor=D,u.kind=L?"mapping":"sequence",u.result=T,!0;if(C?ze===44&&V(u,"expected the node content, but found ','"):V(u,"missed comma between flow collection entries"),ie=J=ce=null,z=M=!1,ze===63){let st=u.input.charCodeAt(u.position+1);k(st)&&(z=M=!0,u.position++,Oe(u,!0,S))}N=u.line,A=u.lineStart,Z=u.position,We(u,S,i,!1,!0),ie=u.tag,J=u.result,Oe(u,!0,S),ze=u.input.charCodeAt(u.position),(M||u.line===N)&&ze===58&&(z=!0,ze=u.input.charCodeAt(++u.position),Oe(u,!0,S),We(u,S,i,!1,!0),ce=u.result),L?ke(u,T,Q,ie,J,ce,N,A,Z):z?T.push(ke(u,null,Q,ie,J,ce,N,A,Z)):T.push(J),Oe(u,!0,S),ze=u.input.charCodeAt(u.position),ze===44?(C=!0,ze=u.input.charCodeAt(++u.position)):C=!1}V(u,"unexpected end of the stream within a flow collection")}function pe(u,S){let C,N=l,A=!1,Z=!1,g=S,T=0,D=!1,O,z=u.input.charCodeAt(u.position);if(z===124)C=!1;else if(z===62)C=!0;else return!1;for(u.kind="scalar",u.result="";z!==0;)if(z=u.input.charCodeAt(++u.position),z===43||z===45)l===N?N=z===43?d:p:V(u,"repeat of a chomping mode identifier");else if((O=me(z))>=0)O===0?V(u,"bad explicit indentation width of a block scalar; it cannot be less than one"):Z?V(u,"repeat of an indentation width identifier"):(g=S+O-1,Z=!0);else break;if(w(z)){do z=u.input.charCodeAt(++u.position);while(w(z));if(z===35)do z=u.input.charCodeAt(++u.position);while(!v(z)&&z!==0)}for(;z!==0;){for(ut(u),u.lineIndent=0,z=u.input.charCodeAt(u.position);(!Z||u.lineIndent<g)&&z===32;)u.lineIndent++,z=u.input.charCodeAt(++u.position);if(!Z&&u.lineIndent>g&&(g=u.lineIndent),v(z)){T++;continue}if(!Z&&g===0&&V(u,"missing indentation for block scalar"),u.lineIndent<g){N===d?u.result+=t.repeat(`
|
|
83
84
|
`,A?1+T:T):N===l&&A&&(u.result+=`
|
|
84
85
|
`);break}C?w(z)?(D=!0,u.result+=t.repeat(`
|
|
85
86
|
`,A?1+T:T)):D?(D=!1,u.result+=t.repeat(`
|
|
86
87
|
`,T+1)):T===0?A&&(u.result+=" "):u.result+=t.repeat(`
|
|
87
88
|
`,T):u.result+=t.repeat(`
|
|
88
|
-
`,A?1+T:T),A=!0,Z=!0,T=0;let M=u.position;for(;!
|
|
89
|
-
`),u.charCodeAt(0)===65279&&(u=u.slice(1)));let C=new ae(u,S),N=u.indexOf("\0");for(N!==-1&&(C.position=N,V(C,"null byte is not allowed in input")),C.input+="\0";C.input.charCodeAt(C.position)===32;)C.lineIndent+=1,C.position+=1;for(;C.position<C.length-1;)St(C);return C.documents}function
|
|
89
|
+
`,A?1+T:T),A=!0,Z=!0,T=0;let M=u.position;for(;!v(z)&&z!==0;)z=u.input.charCodeAt(++u.position);it(u,M,u.position,!1)}return!0}function Ye(u,S){let C=u.tag,N=u.anchor,A=[],Z=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Bt(u,u.anchor,A);let g=u.input.charCodeAt(u.position);for(;g!==0&&(u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,V(u,"tab characters must not be used in indentation")),g===45);){let T=u.input.charCodeAt(u.position+1);if(!k(T))break;if(Z=!0,u.position++,Oe(u,!0,-1)&&u.lineIndent<=S){A.push(null),g=u.input.charCodeAt(u.position);continue}let D=u.line;if(We(u,S,a,!1,!0),A.push(u.result),Oe(u,!0,-1),g=u.input.charCodeAt(u.position),(u.line===D||u.lineIndent>S)&&g!==0)V(u,"bad indentation of a sequence entry");else if(u.lineIndent<S)break}return Z?(u.tag=C,u.anchor=N,u.kind="sequence",u.result=A,!0):!1}function W(u,S,C){let N,A,Z,g,T=u.tag,D=u.anchor,O={},z=Object.create(null),M=null,L=null,Q=null,J=!1,ie=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Bt(u,u.anchor,O);let ce=u.input.charCodeAt(u.position);for(;ce!==0;){!J&&u.firstTabInLine!==-1&&(u.position=u.firstTabInLine,V(u,"tab characters must not be used in indentation"));let ze=u.input.charCodeAt(u.position+1),st=u.line;if((ce===63||ce===58)&&k(ze))ce===63?(J&&(ke(u,O,z,M,L,null,A,Z,g),M=L=Q=null),ie=!0,J=!0,N=!0):J?(J=!1,N=!0):V(u,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),u.position+=1,ce=ze;else{if(A=u.line,Z=u.lineStart,g=u.position,!We(u,C,s,!1,!0))break;if(u.line===st){for(ce=u.input.charCodeAt(u.position);w(ce);)ce=u.input.charCodeAt(++u.position);if(ce===58)ce=u.input.charCodeAt(++u.position),k(ce)||V(u,"a whitespace character is expected after the key-value separator within a block mapping"),J&&(ke(u,O,z,M,L,null,A,Z,g),M=L=Q=null),ie=!0,J=!1,N=!1,M=u.tag,L=u.result;else if(ie)V(u,"can not read an implicit mapping pair; a colon is missed");else return u.tag=T,u.anchor=D,!0}else if(ie)V(u,"can not read a block mapping entry; a multiline key may not be an implicit key");else return u.tag=T,u.anchor=D,!0}if((u.line===st||u.lineIndent>S)&&(J&&(A=u.line,Z=u.lineStart,g=u.position),We(u,S,c,!0,N)&&(J?L=u.result:Q=u.result),J||(ke(u,O,z,M,L,Q,A,Z,g),M=L=Q=null),Oe(u,!0,-1),ce=u.input.charCodeAt(u.position)),(u.line===st||u.lineIndent>S)&&ce!==0)V(u,"bad indentation of a mapping entry");else if(u.lineIndent<S)break}return J&&ke(u,O,z,M,L,null,A,Z,g),ie&&(u.tag=T,u.anchor=D,u.kind="mapping",u.result=O),ie}function G(u){let S=!1,C=!1,N,A,Z=u.input.charCodeAt(u.position);if(Z!==33)return!1;u.tag!==null&&V(u,"duplication of a tag property"),Z=u.input.charCodeAt(++u.position),Z===60?(S=!0,Z=u.input.charCodeAt(++u.position)):Z===33?(C=!0,N="!!",Z=u.input.charCodeAt(++u.position)):N="!";let g=u.position;if(S){do Z=u.input.charCodeAt(++u.position);while(Z!==0&&Z!==62);u.position<u.length?(A=u.input.slice(g,u.position),Z=u.input.charCodeAt(++u.position)):V(u,"unexpected end of the stream within a verbatim tag")}else{for(;Z!==0&&!k(Z);)Z===33&&(C?V(u,"tag suffix cannot contain exclamation marks"):(N=u.input.slice(g-1,u.position+1),b.test(N)||V(u,"named tag handle cannot contain such characters"),C=!0,g=u.position+1)),Z=u.input.charCodeAt(++u.position);A=u.input.slice(g,u.position),y.test(A)&&V(u,"tag suffix cannot contain flow indicator characters")}A&&!x.test(A)&&V(u,"tag name cannot contain such characters: "+A);try{A=decodeURIComponent(A)}catch{V(u,"tag name is malformed: "+A)}return S?u.tag=A:o.call(u.tagMap,N)?u.tag=u.tagMap[N]+A:N==="!"?u.tag="!"+A:N==="!!"?u.tag="tag:yaml.org,2002:"+A:V(u,'undeclared tag handle "'+N+'"'),!0}function be(u){let S=u.input.charCodeAt(u.position);if(S!==38)return!1;u.anchor!==null&&V(u,"duplication of an anchor property"),S=u.input.charCodeAt(++u.position);let C=u.position;for(;S!==0&&!k(S)&&!E(S);)S=u.input.charCodeAt(++u.position);return u.position===C&&V(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(C,u.position),!0}function Ge(u){let S=u.input.charCodeAt(u.position);if(S!==42)return!1;S=u.input.charCodeAt(++u.position);let C=u.position;for(;S!==0&&!k(S)&&!E(S);)S=u.input.charCodeAt(++u.position);u.position===C&&V(u,"name of an alias node must contain at least one character");let N=u.input.slice(C,u.position);return o.call(u.anchorMap,N)||V(u,'unidentified alias "'+N+'"'),u.result=u.anchorMap[N],Oe(u,!0,-1),!0}function ye(u,S,C,N){let A=qe(u);return Gn(u),De(u,S),u.tag=null,u.anchor=null,u.kind=null,u.result=null,W(u,C,N)&&u.kind==="mapping"?(Ie(u),!0):(B(u),De(u,A),!1)}function We(u,S,C,N,A){let Z,g,T=1,D=!1,O=!1,z=null,M,L,Q;u.depth>=u.maxDepth&&V(u,"nesting exceeded maxDepth ("+u.maxDepth+")"),u.depth+=1,u.listener!==null&&u.listener("open",u),u.tag=null,u.anchor=null,u.kind=null,u.result=null;let J=Z=g=c===C||a===C;if(N&&Oe(u,!0,-1)&&(D=!0,u.lineIndent>S?T=1:u.lineIndent===S?T=0:u.lineIndent<S&&(T=-1)),T===1)for(;;){let ie=u.input.charCodeAt(u.position),ce=qe(u);if(D&&(ie===33&&u.tag!==null||ie===38&&u.anchor!==null)||!G(u)&&!be(u))break;z===null&&(z=ce),Oe(u,!0,-1)?(D=!0,g=J,u.lineIndent>S?T=1:u.lineIndent===S?T=0:u.lineIndent<S&&(T=-1)):g=!1}if(g&&(g=D||A),T===1||c===C)if(i===C||s===C?L=S:L=S+1,Q=u.position-u.lineStart,T===1)if(g&&(Ye(u,Q)||W(u,Q,L))||Nt(u,L))O=!0;else{let ie=u.input.charCodeAt(u.position);z!==null&&J&&!g&&ie!==124&&ie!==62&&ye(u,z,z.position-z.lineStart,L)||Z&&pe(u,L)||Ht(u,L)||Sn(u,L)?O=!0:Ge(u)?(O=!0,(u.tag!==null||u.anchor!==null)&&V(u,"alias node should not have any properties")):Te(u,L,i===C)&&(O=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&Bt(u,u.anchor,u.result)}else T===0&&(O=g&&Ye(u,Q));if(u.tag===null)u.anchor!==null&&Bt(u,u.anchor,u.result);else if(u.tag==="?"){u.result!==null&&u.kind!=="scalar"&&V(u,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+u.kind+'"');for(let ie=0,ce=u.implicitTypes.length;ie<ce;ie+=1)if(M=u.implicitTypes[ie],M.resolve(u.result)){u.result=M.construct(u.result),u.tag=M.tag,u.anchor!==null&&Bt(u,u.anchor,u.result);break}}else if(u.tag!=="!"){if(o.call(u.typeMap[u.kind||"fallback"],u.tag))M=u.typeMap[u.kind||"fallback"][u.tag];else{M=null;let ie=u.typeMap.multi[u.kind||"fallback"];for(let ce=0,ze=ie.length;ce<ze;ce+=1)if(u.tag.slice(0,ie[ce].tag.length)===ie[ce].tag){M=ie[ce];break}}M||V(u,"unknown tag !<"+u.tag+">"),u.result!==null&&M.kind!==u.kind&&V(u,"unacceptable node kind for !<"+u.tag+'> tag; it should be "'+M.kind+'", not "'+u.kind+'"'),M.resolve(u.result,u.tag)?(u.result=M.construct(u.result,u.tag),u.anchor!==null&&Bt(u,u.anchor,u.result)):V(u,"cannot resolve a node with !<"+u.tag+"> explicit tag")}return u.listener!==null&&u.listener("close",u),u.depth-=1,u.tag!==null||u.anchor!==null||O}function St(u){let S=u.position,C=!1,N;for(u.version=null,u.checkLineBreaks=u.legacy,u.tagMap=Object.create(null),u.anchorMap=Object.create(null);(N=u.input.charCodeAt(u.position))!==0&&(Oe(u,!0,-1),N=u.input.charCodeAt(u.position),!(u.lineIndent>0||N!==37));){C=!0,N=u.input.charCodeAt(++u.position);let A=u.position;for(;N!==0&&!k(N);)N=u.input.charCodeAt(++u.position);let Z=u.input.slice(A,u.position),g=[];for(Z.length<1&&V(u,"directive name must not be less than one character in length");N!==0;){for(;w(N);)N=u.input.charCodeAt(++u.position);if(N===35){do N=u.input.charCodeAt(++u.position);while(N!==0&&!v(N));break}if(v(N))break;for(A=u.position;N!==0&&!k(N);)N=u.input.charCodeAt(++u.position);g.push(u.input.slice(A,u.position))}N!==0&&ut(u),o.call(Xt,Z)?Xt[Z](u,Z,g):Pt(u,'unknown document directive "'+Z+'"')}if(Oe(u,!0,-1),u.lineIndent===0&&u.input.charCodeAt(u.position)===45&&u.input.charCodeAt(u.position+1)===45&&u.input.charCodeAt(u.position+2)===45?(u.position+=3,Oe(u,!0,-1)):C&&V(u,"directives end mark is expected"),We(u,u.lineIndent-1,c,!1,!0),Oe(u,!0,-1),u.checkLineBreaks&&h.test(u.input.slice(S,u.position))&&Pt(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&Et(u)){u.input.charCodeAt(u.position)===46&&(u.position+=3,Oe(u,!0,-1));return}u.position<u.length-1&&V(u,"end of the stream or a document separator is expected")}function Qe(u,S){u=String(u),S=S||{},u.length!==0&&(u.charCodeAt(u.length-1)!==10&&u.charCodeAt(u.length-1)!==13&&(u+=`
|
|
90
|
+
`),u.charCodeAt(0)===65279&&(u=u.slice(1)));let C=new ae(u,S),N=u.indexOf("\0");for(N!==-1&&(C.position=N,V(C,"null byte is not allowed in input")),C.input+="\0";C.input.charCodeAt(C.position)===32;)C.lineIndent+=1,C.position+=1;for(;C.position<C.length-1;)St(C);return C.documents}function zn(u,S,C){S!==null&&typeof S=="object"&&typeof C>"u"&&(C=S,S=null);let N=Qe(u,C);if(typeof S!="function")return N;for(let A=0,Z=N.length;A<Z;A+=1)S(N[A])}function ur(u,S){let C=Qe(u,S);if(C.length!==0){if(C.length===1)return C[0];throw new e("expected a single document in the stream, but found more")}}return lu.loadAll=zn,lu.load=ur,lu}var fy={},s$;function Uq(){if(s$)return fy;s$=1;let t=za(),e=Na(),n=my(),r=Object.prototype.toString,o=Object.prototype.hasOwnProperty,i=65279,s=9,a=10,c=13,l=32,p=33,d=34,f=35,h=37,y=38,b=39,x=42,m=44,v=45,w=58,k=61,E=62,F=63,j=64,me=91,de=93,oe=96,Re=123,bt=124,Ve=125,ae={};ae[0]="\\0",ae[7]="\\a",ae[8]="\\b",ae[9]="\\t",ae[10]="\\n",ae[11]="\\v",ae[12]="\\f",ae[13]="\\r",ae[27]="\\e",ae[34]='\\"',ae[92]="\\\\",ae[133]="\\N",ae[160]="\\_",ae[8232]="\\L",ae[8233]="\\P";let yt=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],V=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Pt(g,T){if(T===null)return{};let D={},O=Object.keys(T);for(let z=0,M=O.length;z<M;z+=1){let L=O[z],Q=String(T[L]);L.slice(0,2)==="!!"&&(L="tag:yaml.org,2002:"+L.slice(2));let J=g.compiledTypeMap.fallback[L];J&&o.call(J.styleAliases,Q)&&(Q=J.styleAliases[Q]),D[L]=Q}return D}function Bt(g){let T,D,O=g.toString(16).toUpperCase();if(g<=255)T="x",D=2;else if(g<=65535)T="u",D=4;else if(g<=4294967295)T="U",D=8;else throw new e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+T+t.repeat("0",D-O.length)+O}let Gn=1,Ie=2;function B(g){this.schema=g.schema||n,this.indent=Math.max(1,g.indent||2),this.noArrayIndent=g.noArrayIndent||!1,this.skipInvalid=g.skipInvalid||!1,this.flowLevel=t.isNothing(g.flowLevel)?-1:g.flowLevel,this.styleMap=Pt(this.schema,g.styles||null),this.sortKeys=g.sortKeys||!1,this.lineWidth=g.lineWidth||80,this.noRefs=g.noRefs||!1,this.noCompatMode=g.noCompatMode||!1,this.condenseFlow=g.condenseFlow||!1,this.quotingType=g.quotingType==='"'?Ie:Gn,this.forceQuotes=g.forceQuotes||!1,this.replacer=typeof g.replacer=="function"?g.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function qe(g,T){let D=t.repeat(" ",T),O=0,z="",M=g.length;for(;O<M;){let L,Q=g.indexOf(`
|
|
90
91
|
`,O);Q===-1?(L=g.slice(O),O=M):(L=g.slice(O,Q+1),O=Q+1),L.length&&L!==`
|
|
91
92
|
`&&(z+=D),z+=L}return z}function De(g,T){return`
|
|
92
|
-
`+t.repeat(" ",g.indent*T)}function
|
|
93
|
+
`+t.repeat(" ",g.indent*T)}function Xt(g,T){for(let D=0,O=g.implicitTypes.length;D<O;D+=1)if(g.implicitTypes[D].resolve(T))return!0;return!1}function it(g){return g===l||g===s}function ge(g){return g>=32&&g<=126||g>=161&&g<=55295&&g!==8232&&g!==8233||g>=57344&&g<=65533&&g!==i||g>=65536&&g<=1114111}function ke(g){return ge(g)&&g!==i&&g!==c&&g!==a}function ut(g,T,D){let O=ke(g),z=O&&!it(g);return(D?O:O&&g!==m&&g!==me&&g!==de&&g!==Re&&g!==Ve)&&g!==f&&!(T===w&&!z)||ke(T)&&!it(T)&&g===f||T===w&&z}function Oe(g){return ge(g)&&g!==i&&!it(g)&&g!==v&&g!==F&&g!==w&&g!==m&&g!==me&&g!==de&&g!==Re&&g!==Ve&&g!==f&&g!==y&&g!==x&&g!==p&&g!==bt&&g!==k&&g!==E&&g!==b&&g!==d&&g!==h&&g!==j&&g!==oe}function Et(g){return!it(g)&&g!==w}function $t(g,T){let D=g.charCodeAt(T),O;return D>=55296&&D<=56319&&T+1<g.length&&(O=g.charCodeAt(T+1),O>=56320&&O<=57343)?(D-55296)*1024+O-56320+65536:D}function Te(g){return/^\n* /.test(g)}let Ht=1,Sn=2,Nt=3,pe=4,Ye=5;function W(g,T,D,O,z,M,L,Q){let J,ie=0,ce=null,ze=!1,st=!1,Ty=O!==-1,ts=-1,ns=Oe($t(g,0))&&Et($t(g,g.length-1));if(T||L)for(J=0;J<g.length;ie>=65536?J+=2:J++){if(ie=$t(g,J),!ge(ie))return Ye;ns=ns&&ut(ie,ce,Q),ce=ie}else{for(J=0;J<g.length;ie>=65536?J+=2:J++){if(ie=$t(g,J),ie===a)ze=!0,Ty&&(st=st||J-ts-1>O&&g[ts+1]!==" ",ts=J);else if(!ge(ie))return Ye;ns=ns&&ut(ie,ce,Q),ce=ie}st=st||Ty&&J-ts-1>O&&g[ts+1]!==" "}return!ze&&!st?ns&&!L&&!z(g)?Ht:M===Ie?Ye:Sn:D>9&&Te(g)?Ye:L?M===Ie?Ye:Sn:st?pe:Nt}function G(g,T,D,O,z){g.dump=(function(){if(T.length===0)return g.quotingType===Ie?'""':"''";if(!g.noCompatMode&&(yt.indexOf(T)!==-1||V.test(T)))return g.quotingType===Ie?'"'+T+'"':"'"+T+"'";let M=g.indent*Math.max(1,D),L=g.lineWidth===-1?-1:Math.max(Math.min(g.lineWidth,40),g.lineWidth-M),Q=O||g.flowLevel>-1&&D>=g.flowLevel;function J(ie){return Xt(g,ie)}switch(W(T,Q,g.indent,L,J,g.quotingType,g.forceQuotes&&!O,z)){case Ht:return T;case Sn:return"'"+T.replace(/'/g,"''")+"'";case Nt:return"|"+be(T,g.indent)+Ge(qe(T,M));case pe:return">"+be(T,g.indent)+Ge(qe(ye(T,L),M));case Ye:return'"'+St(T)+'"';default:throw new e("impossible error: invalid scalar style")}})()}function be(g,T){let D=Te(g)?String(T):"",O=g[g.length-1]===`
|
|
93
94
|
`,M=O&&(g[g.length-2]===`
|
|
94
95
|
`||g===`
|
|
95
96
|
`)?"+":O?"":"-";return D+M+`
|
|
@@ -100,21 +101,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
100
101
|
`:"")+We(J,T),z=M}return O}function We(g,T){if(g===""||g[0]===" ")return g;let D=/ [^ ]/g,O,z=0,M,L=0,Q=0,J="";for(;O=D.exec(g);)Q=O.index,Q-z>T&&(M=L>z?L:Q,J+=`
|
|
101
102
|
`+g.slice(z,M),z=M+1),L=Q;return J+=`
|
|
102
103
|
`,g.length-z>T&&L>z?J+=g.slice(z,L)+`
|
|
103
|
-
`+g.slice(L+1):J+=g.slice(z),J.slice(1)}function St(g){let T="",D=0;for(let O=0;O<g.length;D>=65536?O+=2:O++){D
|
|
104
|
-
`:""}return
|
|
104
|
+
`+g.slice(L+1):J+=g.slice(z),J.slice(1)}function St(g){let T="",D=0;for(let O=0;O<g.length;D>=65536?O+=2:O++){D=$t(g,O);let z=ae[D];!z&&ge(D)?(T+=g[O],D>=65536&&(T+=g[O+1])):T+=z||Bt(D)}return T}function Qe(g,T,D){let O="",z=g.tag;for(let M=0,L=D.length;M<L;M+=1){let Q=D[M];g.replacer&&(Q=g.replacer.call(D,String(M),Q)),(C(g,T,Q,!1,!1)||typeof Q>"u"&&C(g,T,null,!1,!1))&&(O!==""&&(O+=","+(g.condenseFlow?"":" ")),O+=g.dump)}g.tag=z,g.dump="["+O+"]"}function zn(g,T,D,O){let z="",M=g.tag;for(let L=0,Q=D.length;L<Q;L+=1){let J=D[L];g.replacer&&(J=g.replacer.call(D,String(L),J)),(C(g,T+1,J,!0,!0,!1,!0)||typeof J>"u"&&C(g,T+1,null,!0,!0,!1,!0))&&((!O||z!=="")&&(z+=De(g,T)),g.dump&&a===g.dump.charCodeAt(0)?z+="-":z+="- ",z+=g.dump)}g.tag=M,g.dump=z||"[]"}function ur(g,T,D){let O="",z=g.tag,M=Object.keys(D);for(let L=0,Q=M.length;L<Q;L+=1){let J="";O!==""&&(J+=", "),g.condenseFlow&&(J+='"');let ie=M[L],ce=D[ie];g.replacer&&(ce=g.replacer.call(D,ie,ce)),C(g,T,ie,!1,!1)&&(g.dump.length>1024&&(J+="? "),J+=g.dump+(g.condenseFlow?'"':"")+":"+(g.condenseFlow?"":" "),C(g,T,ce,!1,!1)&&(J+=g.dump,O+=J))}g.tag=z,g.dump="{"+O+"}"}function u(g,T,D,O){let z="",M=g.tag,L=Object.keys(D);if(g.sortKeys===!0)L.sort();else if(typeof g.sortKeys=="function")L.sort(g.sortKeys);else if(g.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let Q=0,J=L.length;Q<J;Q+=1){let ie="";(!O||z!=="")&&(ie+=De(g,T));let ce=L[Q],ze=D[ce];if(g.replacer&&(ze=g.replacer.call(D,ce,ze)),!C(g,T+1,ce,!0,!0,!0))continue;let st=g.tag!==null&&g.tag!=="?"||g.dump&&g.dump.length>1024;st&&(g.dump&&a===g.dump.charCodeAt(0)?ie+="?":ie+="? "),ie+=g.dump,st&&(ie+=De(g,T)),C(g,T+1,ze,!0,st)&&(g.dump&&a===g.dump.charCodeAt(0)?ie+=":":ie+=": ",ie+=g.dump,z+=ie)}g.tag=M,g.dump=z||"{}"}function S(g,T,D){let O=D?g.explicitTypes:g.implicitTypes;for(let z=0,M=O.length;z<M;z+=1){let L=O[z];if((L.instanceOf||L.predicate)&&(!L.instanceOf||typeof T=="object"&&T instanceof L.instanceOf)&&(!L.predicate||L.predicate(T))){if(D?L.multi&&L.representName?g.tag=L.representName(T):g.tag=L.tag:g.tag="?",L.represent){let Q=g.styleMap[L.tag]||L.defaultStyle,J;if(r.call(L.represent)==="[object Function]")J=L.represent(T,Q);else if(o.call(L.represent,Q))J=L.represent[Q](T,Q);else throw new e("!<"+L.tag+'> tag resolver accepts not "'+Q+'" style');g.dump=J}return!0}}return!1}function C(g,T,D,O,z,M,L){g.tag=null,g.dump=D,S(g,D,!1)||S(g,D,!0);let Q=r.call(g.dump),J=O;O&&(O=g.flowLevel<0||g.flowLevel>T);let ie=Q==="[object Object]"||Q==="[object Array]",ce,ze;if(ie&&(ce=g.duplicates.indexOf(D),ze=ce!==-1),(g.tag!==null&&g.tag!=="?"||ze||g.indent!==2&&T>0)&&(z=!1),ze&&g.usedDuplicates[ce])g.dump="*ref_"+ce;else{if(ie&&ze&&!g.usedDuplicates[ce]&&(g.usedDuplicates[ce]=!0),Q==="[object Object]")O&&Object.keys(g.dump).length!==0?(u(g,T,g.dump,z),ze&&(g.dump="&ref_"+ce+g.dump)):(ur(g,T,g.dump),ze&&(g.dump="&ref_"+ce+" "+g.dump));else if(Q==="[object Array]")O&&g.dump.length!==0?(g.noArrayIndent&&!L&&T>0?zn(g,T-1,g.dump,z):zn(g,T,g.dump,z),ze&&(g.dump="&ref_"+ce+g.dump)):(Qe(g,T,g.dump),ze&&(g.dump="&ref_"+ce+" "+g.dump));else if(Q==="[object String]")g.tag!=="?"&&G(g,g.dump,T,M,J);else{if(Q==="[object Undefined]")return!1;if(g.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+Q)}if(g.tag!==null&&g.tag!=="?"){let st=encodeURI(g.tag[0]==="!"?g.tag.slice(1):g.tag).replace(/!/g,"%21");g.tag[0]==="!"?st="!"+st:st.slice(0,18)==="tag:yaml.org,2002:"?st="!!"+st.slice(18):st="!<"+st+">",g.dump=st+" "+g.dump}}return!0}function N(g,T){let D=[],O=[];A(g,D,O);let z=O.length;for(let M=0;M<z;M+=1)T.duplicates.push(D[O[M]]);T.usedDuplicates=new Array(z)}function A(g,T,D){if(g!==null&&typeof g=="object"){let O=T.indexOf(g);if(O!==-1)D.indexOf(O)===-1&&D.push(O);else if(T.push(g),Array.isArray(g))for(let z=0,M=g.length;z<M;z+=1)A(g[z],T,D);else{let z=Object.keys(g);for(let M=0,L=z.length;M<L;M+=1)A(g[z[M]],T,D)}}}function Z(g,T){T=T||{};let D=new B(T);D.noRefs||N(g,D);let O=g;return D.replacer&&(O=D.replacer.call({"":O},"",O)),C(D,0,O,!0,!0)?D.dump+`
|
|
105
|
+
`:""}return fy.dump=Z,fy}var a$;function qq(){if(a$)return Yt;a$=1;let t=Fq(),e=Uq();function n(r,o){return function(){throw new Error("Function yaml."+r+" is removed in js-yaml 4. Use yaml."+o+" instead, which is now safe by default.")}}return Yt.Type=on(),Yt.Schema=c$(),Yt.FAILSAFE_SCHEMA=d$(),Yt.JSON_SCHEMA=y$(),Yt.CORE_SCHEMA=x$(),Yt.DEFAULT_SCHEMA=my(),Yt.load=t.load,Yt.loadAll=t.loadAll,Yt.dump=e.dump,Yt.YAMLException=Na(),Yt.types={binary:_$(),float:g$(),map:p$(),null:f$(),pairs:S$(),set:k$(),timestamp:v$(),bool:m$(),int:h$(),merge:b$(),omap:w$(),seq:u$(),str:l$()},Yt.safeLoad=n("safeLoad","load"),Yt.safeLoadAll=n("safeLoadAll","loadAll"),Yt.safeDump=n("safeDump","dump"),Yt}var Zq=qq(),hy=Dq(Zq),{Type:k7,Schema:T7,FAILSAFE_SCHEMA:E7,JSON_SCHEMA:$7,CORE_SCHEMA:R7,DEFAULT_SCHEMA:A7,load:P7,loadAll:C7,dump:I7,YAMLException:O7,types:z7,safeLoad:N7,safeLoadAll:j7,safeDump:L7}=hy;var T$=["json","yaml","tree"],Bq=`Output format for design data. Defaults to json.
|
|
105
106
|
- json \u2014 default; useful when piping output into tools that expect JSON.
|
|
106
107
|
- yaml \u2014 fewer tokens than JSON for typical designs.
|
|
107
|
-
- tree \u2014 experimental compact format. Structural keys (id, name, type) are encoded positionally on each node line, and style values stay deduplicated in a globalVars block. Designs with heavy style reuse see the largest token savings.`;function
|
|
108
|
-
`):Array.isArray(e.sections)?
|
|
109
|
-
`)}var
|
|
110
|
-
`)}function
|
|
111
|
-
`)):(e.push("svgs:"),n.forEach((r,o)=>{e.push(` [${o}] ${
|
|
108
|
+
- tree \u2014 experimental compact format. Structural keys (id, name, type) are encoded positionally on each node line, and style values stay deduplicated in a globalVars block. Designs with heavy style reuse see the largest token savings.`;function Yr(){return Y.enum(T$).optional().describe(Bq)}function Xr(t,e){let n=Hq(e);return n==="yaml"?Gq(t):n==="tree"?Jq(t):JSON.stringify(t)}function uu(t){return Vq(t)?t:null}function Hq(t){return uu(t)??uu(process.env.DEFAULT_FORMAT)??"json"}function Vq(t){return typeof t=="string"&&T$.includes(t)}function Gq(t){try{return hy.dump(t,{lineWidth:-1,noRefs:!0,quotingType:'"',sortKeys:!1})}catch(e){return console.warn(`[format] yaml serialization failed, returning json: ${e instanceof Error?e.message:String(e)}`),JSON.stringify(t)}}var Wq=new Set(["type","id","name","layoutStyle","fill","strokeColor","strokeType","strokeAlign","strokeWidth","componentId","componentInfo","flexContainerInfo","text","textColor","children"]),Kq=new Set(["width","height","relativeX","relativeY"]);function Wo(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Jq(t){if(!Wo(t))return JSON.stringify(t);let e=t;return Wo(e.dsl)&&Array.isArray(e.dsl.nodes)?Yq(e):Array.isArray(e.nodes)?E$(e,[]).join(`
|
|
109
|
+
`):Array.isArray(e.sections)?Qq(e):Array.isArray(e.svgs)?e4(e):Wo(e.svgs)||Wo(e.texts)?t4(e):JSON.stringify(t)}function E$(t,e){if(e.push("globalVars:"),Wo(t.styles))for(let[n,r]of Object.entries(t.styles))e.push(` ${n}: ${JSON.stringify(r)}`);t.components!==void 0&&e.push(`components: ${JSON.stringify(t.components)}`);for(let[n,r]of Object.entries(t))n==="styles"||n==="nodes"||n==="components"||e.push(`${n}: ${JSON.stringify(r)}`);e.push("tree:");for(let n of t.nodes??[])$$(n,1,e);return e}function Yq(t){let e=[];for(let[n,r]of Object.entries(t))n!=="dsl"&&e.push(`${n}: ${JSON.stringify(r)}`);return E$(t.dsl,e),e.join(`
|
|
110
|
+
`)}var Xq=new Set(["type","id","name","nodeCount","x","y","width","height","layoutStyle"]);function Qq(t){let e=[],n=Array.isArray(t.sections)?t.sections:[];for(let[r,o]of Object.entries(t))r!=="sections"&&e.push(`${r}: ${JSON.stringify(o)}`);return e.push("sections:"),n.forEach((r,o)=>{let i=r.layoutStyle??{},s=r.width??i.width,a=r.height??i.height,c=r.x??i.relativeX,l=r.y??i.relativeY,p=[];Ji(p,"nodeCount",r.nodeCount),e.push(` [${o}] ${r.type??"?"} ${r.id??"?"} ${pu(r.name)} ${Jr(s)}x${Jr(a)} @${Jr(c)},${Jr(l)}`+(p.length?" "+p.join(" "):""));for(let[d,f]of Object.entries(r))Xq.has(d)||f===void 0||e.push(` ${d}=${JSON.stringify(f)}`)}),e.join(`
|
|
111
|
+
`)}function e4(t){let e=[];for(let[r,o]of Object.entries(t))r!=="svgs"&&e.push(`${r}: ${JSON.stringify(o)}`);let n=Array.isArray(t.svgs)?t.svgs:[];return n.length===0?(e.push("svgs: []"),e.join(`
|
|
112
|
+
`)):(e.push("svgs:"),n.forEach((r,o)=>{e.push(` [${o}] ${pu(r.name)} (${r.id??"?"})`);let i=r.svg;if(typeof i=="string"&&!i.includes(`
|
|
112
113
|
`))e.push(` ${i}`);else if(typeof i=="string")if(i==="")e.push(' ""');else for(let s of i.split(`
|
|
113
114
|
`))e.push(" "+s);else e.push(` ${JSON.stringify(i)}`)}),e.join(`
|
|
114
|
-
`))}function
|
|
115
|
-
`)}function
|
|
115
|
+
`))}function t4(t){let e=[],n=Wo(t.svgs)?"svgs":Wo(t.texts)?"texts":null;for(let[r,o]of Object.entries(t))r!==n&&e.push(`${r}: ${JSON.stringify(o)}`);if(n){let r=t[n],o=Object.entries(r);if(o.length===0)e.push(`${n}: {}`);else{e.push(`${n}:`);for(let[i,s]of o)n4(i,s," ",e)}}return e.join(`
|
|
116
|
+
`)}function n4(t,e,n,r){if(typeof e=="string"&&!e.includes(`
|
|
116
117
|
`)){r.push(`${n}${t}: ${e}`);return}r.push(`${n}${t}:`);let o=n+" ";if(typeof e=="string")if(e==="")r.push(`${o}""`);else for(let i of e.split(`
|
|
117
|
-
`))r.push(o+i);else r.push(`${o}${JSON.stringify(e)}`)}function
|
|
118
|
+
`))r.push(o+i);else r.push(`${o}${JSON.stringify(e)}`)}function $$(t,e,n){let r=" ".repeat(e),o=t.layoutStyle??{},i=`${Jr(o.width)}x${Jr(o.height)}`,s=`@${Jr(o.relativeX)},${Jr(o.relativeY)}`,a=[];for(let[l,p]of Object.entries(o))Kq.has(l)||p===void 0||p===null||a.push(`${l}=${p}`);Ji(a,"fill",t.fill),t.strokeColor?a.push(`stroke=${t.strokeColor}${t.strokeWidth?"/"+t.strokeWidth:""}`):t.strokeWidth&&Ji(a,"strokeWidth",t.strokeWidth),Ji(a,"strokeType",t.strokeType),Ji(a,"strokeAlign",t.strokeAlign),Ji(a,"component",t.componentId),n.push(`${r}${t.type??"?"} ${t.id??"?"} ${pu(t.name)} ${i} ${s}`+(a.length?" "+a.join(" "):""));let c=t.componentInfo;if(c&&typeof c=="object"){let l=c.properties;if(l&&typeof l=="object")for(let[p,d]of Object.entries(l))n.push(`${r} prop ${p}=${JSON.stringify(d)}`);for(let[p,d]of Object.entries(c))p==="properties"||d===void 0||n.push(`${r} ${p}=${JSON.stringify(d)}`)}if(t.flexContainerInfo!==void 0&&n.push(`${r} flex ${JSON.stringify(t.flexContainerInfo)}`),Array.isArray(t.text))for(let l of t.text){let p=l==null?void 0:l.text,d=typeof p=="string"?p:JSON.stringify(p);n.push(`${r} text ${pu(d)}${l!=null&&l.font?` font=${l.font}`:""}`)}t.textColor!==void 0&&n.push(`${r} textColor ${JSON.stringify(t.textColor)}`);for(let[l,p]of Object.entries(t))Wq.has(l)||p===void 0||n.push(`${r} ${l}=${JSON.stringify(p)}`);if(Array.isArray(t.children))for(let l of t.children)$$(l,e+1,n)}function Ji(t,e,n){n!=null&&n!==""&&t.push(`${e}=${n}`)}function Jr(t){return t==null?"?":String(t)}function pu(t){return'"'+(t==null?"":String(t)).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}var ja=new Set,Ko=new Map,La=new Map,r4=parseInt(process.env.SECTION_TRACKER_MAX_ENTRIES||"1000",10),R$=parseInt(process.env.SECTION_TRACKER_TTL_MS||"1800000",10),kr=new Map;function gy(t){if(kr.has(t))kr.delete(t);else if(kr.size>=r4){let e=kr.keys().next().value;e!==void 0&&(ja.delete(e),Ko.delete(e),La.delete(e),kr.delete(e))}kr.set(t,Date.now())}setInterval(()=>{let t=Date.now();for(let[e,n]of kr)t-n>R$&&(ja.delete(e),Ko.delete(e),La.delete(e),kr.delete(e))},R$).unref();function A$(t,e){let n=`${t}:${e}`;ja.add(n),gy(n)}function P$(t,e,n){let r=`${t}:${e}`;La.set(r,n),Ko.has(r)||Ko.set(r,new Set),gy(r)}function C$(t,e,n){let r=`${t}:${e}`,o=La.get(r);if(o===void 0)return null;let i=Ko.get(r)??new Set;i.add(n),Ko.set(r,i),gy(r);let s=[];for(let a=0;a<o;a++)i.has(a)||s.push(a);return{fetched:i.size,total:o,remaining:s.length,missingIndices:s}}function I$(t,e){let n=`${t}:${e}`;ja.delete(n),Ko.delete(n),La.delete(n),kr.delete(n)}var o4=`
|
|
118
119
|
[FALLBACK] Use only when mcp__getDesignSections is unavailable or returns an error.
|
|
119
120
|
This returns the FULL DSL in one response \u2014 may be large and exceed context limits for complex designs.
|
|
120
121
|
Prefer mcp__getDesignSections as the primary tool for all designs.
|
|
@@ -124,12 +125,12 @@ You can provide either:
|
|
|
124
125
|
This tool returns the raw DSL data that you can then parse and analyze. Use the optional 'format' parameter (json/yaml/tree, defaults to json) to control the serialization.
|
|
125
126
|
This tool also returns the rules you must follow when generating code.
|
|
126
127
|
The DSL data can also be used to transform and generate code for different frameworks.
|
|
127
|
-
`,
|
|
128
|
+
`,du=class extends ht{constructor(){super();this.description=o4;this.schema=Y.object({fileId:Y.string().optional().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL). Required if shortLink is not provided."),layerId:Y.string().optional().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId> / file=<fileId> in MasterGo URL). Required if shortLink is not provided."),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),shortLink:Y.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),format:Yr()})}get name(){return kt("getDsl")}async execute({fileId:n,layerId:r,sourceLayerId:o,shortLink:i,format:s}){var a;try{if(!i&&(!n||!r&&!o))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a MasterGo URL");let c=this.normalizeFileId(n),l=r,p=o;if(i){let y=await ot.extractIdsFromUrl(i);c=this.normalizeFileId(y.fileId),l=y.layerId,p=y.sourceLayerId??o}let d=p||l;if(!c||!d)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");let f=`${c}:${d}`;if(ja.has(f))return{isError:!0,content:[{type:"text",text:JSON.stringify({error:rn("getDsl BLOCKED: You have already started the section workflow (mcp__getDesignSections) for this design. Do NOT call getDsl during or after the section workflow \u2014 it returns 195KB+ of full DSL data that will exhaust your context window and prevent you from fetching remaining sections. Continue fetching section DSL via mcp__getDesignSections with sectionIndex=N. If you need data you think only getDsl provides, it is already available in the section DSL responses (rowTexts, dsl.nodes).")})}]};let h=await ot.getDsl(c,d,{sourceLayerId:p});return{content:[{type:"text",text:Xr(h,s)}]}}catch(c){let l=((a=c.response)==null?void 0:a.data)??(c==null?void 0:c.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(l)}]}}}};var Qr=Ee(require("path")),eo=require("fs"),Yi=require("fs/promises");var i4=`
|
|
128
129
|
\u4F7F\u7528\u6B64\u5DE5\u5177\u4ECE MasterGo \u83B7\u53D6 D2C \u6570\u636E\uFF0C\u5E76\u5728\u672C\u5730\u843D\u76D8\uFF1A
|
|
129
130
|
1\uFF09\u5C06\u8FD4\u56DE\u7684 code \u5199\u5165 html\uFF1B
|
|
130
131
|
2\uFF09\u5C06\u8FD4\u56DE\u7684 svg / image \u8D44\u6E90\u6309 resourcePath \u843D\u76D8\u5230\u5BF9\u5E94\u76EE\u5F55\uFF1B
|
|
131
132
|
3\uFF09\u8FD4\u56DE\u843D\u76D8\u6458\u8981\uFF0C\u907F\u514D\u628A\u5927\u4F53\u79EF\u8D44\u6E90\u585E\u8FDB\u4E0A\u4E0B\u6587\u3002
|
|
132
|
-
`;function
|
|
133
|
+
`;function yy(t){return t==null?!0:typeof t=="string"?t.trim().length===0:Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}function s4(t){return t==null?!1:typeof t=="string"?t.trim().length>0:Array.isArray(t)?t.length>0:typeof t=="object"?Object.keys(t).length>0:!1}function fu(t){for(let e of t)if(s4(e))return e}function a4(t){let e={image:"asset/images",svg:"asset/icons"};if(!yy(t))try{let n=typeof t=="string"?JSON.parse(t):t;n.image&&(e.image=String(n.image).replace(/^(\.\/|\/)/,"").replace(/\/+$/,"")),n.svg&&(e.svg=String(n.svg).replace(/^(\.\/|\/)/,"").replace(/\/+$/,""))}catch{return e}return e}async function O$(t,e,n,r){if(yy(t))return{savedCount:0,attemptedCount:0,errorCount:0};let o;try{o=typeof t=="string"?JSON.parse(t):t}catch{return{savedCount:0,attemptedCount:0,errorCount:1}}if(!o||typeof o!="object")return{savedCount:0,attemptedCount:0,errorCount:1};let i=Object.keys(o);if(i.length===0)return{savedCount:0,attemptedCount:0,errorCount:0};let s=Qr.default.join(e,n);(0,eo.existsSync)(s)||(0,eo.mkdirSync)(s,{recursive:!0});let a=0,c=0;return await Promise.all(Object.entries(o).map(async([l,p])=>{let d=String(l).match(/(.+)\.([a-zA-Z0-9]+)$/),f=(d?d[1]:l).replace(/[^a-zA-Z0-9_-]/g,"_"),h=d?d[2]:r,y=Qr.default.join(s,`${f}.${h}`),b=p;try{if(typeof b=="string"&&b.startsWith("http"))try{let v=await vt.get(b,{responseType:"arraybuffer",timeout:3e4});await(0,Yi.writeFile)(y,v.data),a+=1;return}catch(v){if(((v==null?void 0:v.code)==="EPROTO"||String((v==null?void 0:v.message)??"").includes("wrong version number"))&&b.startsWith("https://")){let k=b.replace(/^https:\/\//,"http://"),E=await vt.get(k,{responseType:"arraybuffer",timeout:3e4});await(0,Yi.writeFile)(y,E.data),a+=1;return}c+=1;return}if(typeof b=="string"&&b.startsWith("data:image/")){let v=b.split(";base64,");v.length===2&&(await(0,Yi.writeFile)(y,v[1],"base64"),a+=1);return}let x=typeof b=="object"?JSON.stringify(b,null,2):String(b??"");await(0,Yi.writeFile)(y,x,h==="png"||h==="jpg"||h==="jpeg"?"base64":"utf8"),a+=1}catch{c+=1;return}})),{savedCount:a,attemptedCount:i.length,errorCount:c}}async function c4(t){let{outDir:e,contentId:n,code:r,resourcePath:o,svg:i,image:s}=t,a=e?Qr.default.isAbsolute(e)?Qr.default.join(e):Qr.default.join(process.cwd(),e):process.cwd();(0,eo.existsSync)(a)||(0,eo.mkdirSync)(a,{recursive:!0});let c=`${n||"index"}.html`,l=Qr.default.join(a,c);yy(r)||await(0,Yi.writeFile)(l,r,"utf8");let p=a4(o),d=y=>{let b=Qr.default.join(a,y);(0,eo.existsSync)(b)||(0,eo.mkdirSync)(b,{recursive:!0})};d(p.image),d(p.svg);let[f,h]=await Promise.all([O$(i,a,p.svg,"svg"),O$(s,a,p.image,"png")]);return{targetDir:a,htmlFileName:c,htmlPath:l,svgCount:f.savedCount,imageCount:h.savedCount,resourcePathMap:p}}function l4(t){var l,p;let e=t==null?void 0:t.data,n=Array.isArray(e)?e[0]:void 0,r=(n==null?void 0:n.payload)??(t==null?void 0:t.payload)??((l=t==null?void 0:t.data)==null?void 0:l.payload)??((p=n==null?void 0:n.payload)==null?void 0:p.payload)??(e==null?void 0:e.payload)??{},o=(r==null?void 0:r.code)??(r==null?void 0:r.html)??(r==null?void 0:r.content)??(t==null?void 0:t.code)??"",i=fu([r==null?void 0:r.resourcePath,t==null?void 0:t.resourcePath,n==null?void 0:n.resourcePath]),s=fu([r==null?void 0:r.image,n==null?void 0:n.image]),a=fu([r==null?void 0:r.svg,n==null?void 0:n.svg]),c=fu([r==null?void 0:r.shape,n==null?void 0:n.shape]);return{contentId:String((n==null?void 0:n.contentId)??(r==null?void 0:r.contentId)??(t==null?void 0:t.contentId)??""),frameType:(r==null?void 0:r.frameType)??(n==null?void 0:n.frameType)??(t==null?void 0:t.frameType),code:String(o??""),resourcePath:i,shape:c,svg:a,image:s}}var mu=class extends ht{constructor(){super();this.description=i4;this.schema=Y.object({contentId:Y.string().describe("MasterGo D2C contentId\uFF0C\u4F8B\u5982 mastergo://getd2c/176452330285910-2-2845 \u4E2D\u7684 176452330285910-2-2845\u3002"),documentId:Y.string().describe("MasterGo \u6587\u6863 ID\uFF0C\u901A\u5E38\u4E3A contentId \u7684\u7B2C\u4E00\u6BB5\uFF0C\u4F8B\u5982 contentId \u4E3A 176452330285910-2-9032 \u65F6 documentId \u4E3A 176452330285910\u3002"),outDir:Y.string().optional().describe("\u53EF\u9009\uFF0C\u8F93\u51FA\u76EE\u5F55\uFF08\u7EDD\u5BF9\u8DEF\u5F84\u6216\u76F8\u5BF9\u5F53\u524D\u5DE5\u4F5C\u76EE\u5F55\uFF09\u3002")})}get name(){return kt("getD2c")}async execute({contentId:n,documentId:r,outDir:o}){var i;try{if(!n)throw new Error("contentId \u4E0D\u80FD\u4E3A\u7A7A");if(!r)throw new Error("documentId \u4E0D\u80FD\u4E3A\u7A7A");let s=await ot.getD2c(n,r),a=l4(s),c=a.contentId||n,l=await c4({outDir:o,contentId:c,code:a.code,resourcePath:a.resourcePath,svg:a.svg,image:a.image}),p={contentId:c,documentId:r,frameType:a.frameType,targetDir:l.targetDir,htmlFileName:l.htmlFileName,htmlPath:l.htmlPath,resourcePathMap:l.resourcePathMap,savedFiles:{svg:l.svgCount,image:l.imageCount},message:`D2C \u8D44\u6E90\u5DF2\u843D\u76D8\u5230 ${l.htmlPath}\u3002HTML \u6587\u4EF6\u540D\uFF1A${l.htmlFileName}\u3002SVG \u8D44\u6E90 ${l.svgCount} \u4E2A\uFF0C\u56FE\u7247\u8D44\u6E90 ${l.imageCount} \u4E2A\u3002\u53EF\u76F4\u63A5\u6253\u5F00 html \u6587\u4EF6\u67E5\u770B\u6548\u679C\u3002`};return{content:[{type:"text",text:JSON.stringify(p)}]}}catch(s){let a=((i=s==null?void 0:s.response)==null?void 0:i.data)??(s==null?void 0:s.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(a)}]}}}};var xy=Ee(require("fs"));var z$=10*1024*1024,u4=`
|
|
133
134
|
\u4F7F\u7528\u6B64\u5DE5\u5177\u5C06\u4EE3\u7801\u6587\u4EF6\u53D1\u9001\u5230 MasterGo MCP \u670D\u52A1\u8FDB\u884C C2D\uFF08\u4EE3\u7801\u8F6C\u8BBE\u8BA1\uFF09\u5904\u7406\uFF0C\u5C06\u7528\u6237\u4EE3\u7801\u540C\u6B65\u5230\u8BBE\u8BA1\u7A3F\u3002
|
|
134
135
|
|
|
135
136
|
\u53C2\u6570\u8BF4\u660E\uFF1A
|
|
@@ -141,7 +142,7 @@ The DSL data can also be used to transform and generate code for different frame
|
|
|
141
142
|
\u5982\u679C\u77ED\u94FE\u63A5\u6216 URL \u4E2D\u6CA1\u6709\u89E3\u6790\u51FA layer_id\uFF0C\u5219\u4E0D\u4F20 layerId\u3002
|
|
142
143
|
|
|
143
144
|
\u5DE5\u5177\u4F1A\u8BFB\u53D6 filePath \u6307\u5B9A\u6587\u4EF6\u7684\u5185\u5BB9\uFF0C\u5E76\u4F20\u7ED9\u540E\u7AEF\uFF0C\u9644\u5E26 fileId \u4E0E\u53EF\u9009\u7684 layerId\u3002
|
|
144
|
-
`,
|
|
145
|
+
`,hu=class extends ht{constructor(){super();this.description=u4;this.schema=Y.object({filePath:Y.string().min(1,"filePath \u4E0D\u80FD\u4E3A\u7A7A").describe("HTML \u6587\u4EF6\u7684\u5B8C\u6574\u8DEF\u5F84\uFF0C\u5DE5\u5177\u4F1A\u8BFB\u53D6\u6587\u4EF6\u5185\u5BB9\u5E76\u53D1\u9001\u7ED9\u540E\u7AEF"),fileId:Y.string().optional().describe("\u6587\u4EF6 ID\uFF08URL \u4E2D file= \u6216\u8DEF\u5F84\u4E2D\u7684\u6570\u5B57\u6BB5\uFF09\u3002\u672A\u4F20 shortLink \u65F6\u5FC5\u586B\u3002"),layerId:Y.string().optional().describe("\u53EF\u9009\u3002\u56FE\u5C42 ID\uFF08\u53EA\u8BFB\u53D6 URL \u53C2\u6570 layer_id\uFF09\u3002\u4E0D\u4F20\u6216\u89E3\u6790\u4E0D\u5230\u5219\u4EC5\u6309 file \u7EF4\u5EA6\u540C\u6B65\uFF1Bpageid/page_id \u4E0D\u4F1A\u88AB\u5F53\u4F5C layerId\u3002"),shortLink:Y.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK).")})}get name(){return kt("C2d")}async execute({filePath:n,fileId:r,layerId:o,shortLink:i}){var s;try{let a=i==null?void 0:i.trim(),c=r==null?void 0:r.trim(),l=o==null?void 0:o.trim(),p,d;if(a){let y=await ot.extractIdsFromUrl(a);p=this.normalizeFileId(y.fileId),d=y.layerId}else if(c)p=this.normalizeFileId(c),d=l||void 0;else throw new Error("\u8BF7\u4F20 shortLink\uFF0C\u6216\u81F3\u5C11\u4F20 fileId\uFF08layerId \u53EF\u9009\uFF09");if(!p)throw new Error("Could not determine fileId");let f;try{let y=await xy.default.promises.stat(n);if(!y.isFile())throw new Error(`\u8DEF\u5F84\u4E0D\u662F\u6587\u4EF6: ${n}`);if(y.size>z$)throw new Error(`\u6587\u4EF6\u8FC7\u5927\uFF08${(y.size/1024/1024).toFixed(1)}MB > ${z$/1024/1024}MB \u4E0A\u9650\uFF09: ${n}`);f=await xy.default.promises.readFile(n,"utf-8")}catch(y){let b=y instanceof Error?y.message:String(y);throw new Error(`\u65E0\u6CD5\u8BFB\u53D6\u6587\u4EF6 ${n}: ${b}`)}let h=await ot.postC2d(f,p,d);return{content:[{type:"text",text:JSON.stringify(h)}]}}catch(a){let c=((s=a==null?void 0:a.response)==null?void 0:s.data)??(a==null?void 0:a.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(c)}]}}}};var p4="When the data returned by mcp__getDsl contains a non-empty componentDocumentLinks array, this tool is used to sequentially retrieve URLs from the componentDocumentLinks array and then obtain component documentation data. The returned document data is used for you to generate frontend code based on components.",gu=class extends ht{constructor(){super();this.description=p4;this.schema=Y.object({url:Y.string().describe("Component documentation link URL, from the componentDocumentLinks property, please ensure the URL is valid")})}get name(){return kt("getComponentLink")}async execute({url:n}){try{return{content:[{type:"text",text:`${await ot.request({method:"GET",url:n})}`}]}}catch(r){return{content:[{type:"text",text:JSON.stringify({error:"Failed to get component documentation",message:r instanceof Error?r.message:String(r)})}]}}}};var N$=`The \`results\` returns an XML file, which contains two types of information:
|
|
145
146
|
|
|
146
147
|
- **meta**: Describes the site, environment, requirements, and other context.
|
|
147
148
|
- **action**: Corresponds to the entry page name and \`targetLayerId\`, which is the ID of the target page.
|
|
@@ -227,12 +228,12 @@ Repeat this process until the page data no longer contains the \`interactive\` f
|
|
|
227
228
|
Then, process the 0:2 page and repeat the steps for the 0:1 page.
|
|
228
229
|
|
|
229
230
|
After completion, generate the project code sequentially according to the page list in task.md.
|
|
230
|
-
`;var
|
|
231
|
+
`;var f4=`
|
|
231
232
|
Use this tool when the user intends to build a complete website or needs to obtain high-level site
|
|
232
233
|
configuration information. You must provide a fileld and layerld to identify the specific design element.
|
|
233
234
|
This tool returns the rules and results of the site and page. The rules is a markdown file, you must
|
|
234
235
|
follow the rules and use the results to analyze the site and page.
|
|
235
|
-
`,
|
|
236
|
+
`,yu=class extends ht{constructor(){super();this.description=f4;this.schema=Y.object({fileId:Y.string().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL)"),layerId:Y.string().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId> / file=<fileId> in MasterGo URL)"),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),format:Yr()})}get name(){return kt("getMeta")}async execute({fileId:n,layerId:r,sourceLayerId:o,format:i}){var s;try{let a=await ot.getMeta(n,r,o);return{content:[{type:"text",text:Xr({result:a,rules:rn(N$)},i)}]}}catch(a){let c=((s=a.response)==null?void 0:s.data)??(a==null?void 0:a.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(c)}]}}}};var Xi=Ee(require("fs"));var j$=`---
|
|
236
237
|
description:
|
|
237
238
|
globs:
|
|
238
239
|
alwaysApply: true
|
|
@@ -543,13 +544,13 @@ AI must analyze component design and infer:
|
|
|
543
544
|
- **Tests**: Coverage for all features, edge cases, slots and states
|
|
544
545
|
- **Implementation**: Renders correctly, properties work, state management complies with specifications, styles applied correctly, slot functionality works
|
|
545
546
|
- **Documentation**: Feature documentation complete, examples available, API reference complete, slot usage documentation complete
|
|
546
|
-
`;var
|
|
547
|
+
`;function L$(t){let e=0,n=[],r=()=>{e--;let o=n.shift();o&&(e++,o())};return async function(o){e>=t?await new Promise(i=>n.push(i)):e++;try{return await o()}finally{r()}}}var h4=32,g4=8,y4=`
|
|
547
548
|
Users need to actively call this tool to get the component development workflow. When Generator is mentioned, please actively call this tool.
|
|
548
549
|
This tool provides a structured workflow for component development following best practices.
|
|
549
550
|
You must provide an absolute rootPath of workspace to save workflow files.
|
|
550
|
-
`,
|
|
551
|
-
<path d="${
|
|
552
|
-
</svg
|
|
551
|
+
`,xu=class extends ht{constructor(){super();this.description=y4;this.schema=Y.object({rootPath:Y.string().describe("The root path of the project, if the user does not provide, you can use the current directory as the root path"),fileId:Y.string().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL)"),layerId:Y.string().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId> / file=<fileId> in MasterGo URL)"),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries.")})}get name(){return kt("getComponentGenerator")}async execute({rootPath:n,fileId:r,layerId:o,sourceLayerId:i}){var h;let s=`${n}/.mastergo/`;await Xi.default.promises.mkdir(s,{recursive:!0});let a=`${s}/component-workflow.md`,c=await ot.getComponentStyleJson(r,o,i),l=`${s}/${c[0].name}.json`,p=L$(h4),d=L$(g4),f=async y=>{if(y.path&&y.path.length>0){y.imageUrls=[];let b=y.id.replaceAll("/","&").replaceAll(":","_"),x=`${s}/images`;await Xi.default.promises.mkdir(x,{recursive:!0});let m=[];for(let v=0;v<y.path.length;v++){let w=y.path[v],k=`${x}/${b}-${v}.svg`,E=`<svg width="100%" height="100%" viewBox="0 0 16 16"xmlns="http://www.w3.org/2000/svg">
|
|
552
|
+
<path d="${w}" fill="currentColor"/>
|
|
553
|
+
</svg>`;m.push(p(()=>Xi.default.promises.writeFile(k,E,{flag:"wx"}).catch(()=>{}))),y.imageUrls.push(k)}await Promise.all(m),delete y.path}y.children&&await Promise.all(y.children.map(b=>d(()=>f(b))))};await f(c[0]);try{await Xi.default.promises.writeFile(a,j$,{flag:"wx"})}catch{}await Xi.default.promises.writeFile(l,JSON.stringify(c[0]));try{return{content:[{type:"text",text:JSON.stringify({files:{workflow:a,componentSpec:l},message:"Component development files successfully created",rules:[`Follow the component workflow process defined in file://${a} for structured development. This workflow contains a lot of content, you'll need to read it in multiple sessions.`,`Implement the component according to the specifications in file://${l}, ensuring all properties and states are properly handled.`]})}]}}catch(y){let b=((h=y.response)==null?void 0:h.data)??(y==null?void 0:y.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(b)}]}}}};var gt=Ee(require("fs")),Zt=Ee(require("path")),U$=Ee(require("crypto"));var q$=Ee(require("https"));var D$=`---
|
|
553
554
|
description:
|
|
554
555
|
globs:
|
|
555
556
|
alwaysApply: true
|
|
@@ -1232,13 +1233,13 @@ lib/utils/ui/
|
|
|
1232
1233
|
- **Analysis**: DSL fully parsed, widget tree planned, resources inventoried
|
|
1233
1234
|
- **Implementation**: Renders correctly, dimensions adapted, colors accurate, assets loaded
|
|
1234
1235
|
- **Quality**: No hardcoded values, proper decomposition, RTL-ready, safe area handled
|
|
1235
|
-
`;var
|
|
1236
|
+
`;var v4=`
|
|
1236
1237
|
Users need to actively call this tool to get the Flutter component development workflow. When Flutter Generator or Flutter Component is mentioned, please actively call this tool.
|
|
1237
1238
|
This tool provides a structured workflow for Flutter component development following best practices.
|
|
1238
1239
|
It includes MasterGo DSL to Flutter Widget mapping rules, screen adaptation with flutter_screenutil, and feature-based architecture guidance.
|
|
1239
1240
|
It also downloads all image resources from the design file to local disk, rewrites CSS and DSL references to point at Flutter asset paths, and generates an asset manifest.
|
|
1240
1241
|
You must provide an absolute rootPath of workspace to save workflow files.
|
|
1241
|
-
`,
|
|
1242
|
+
`,b4=15e3,M$=2,_4=6,by=50*1024*1024,Z$=["png","jpg","jpeg","webp","svg","gif","bmp"],B$=new q$.default.Agent({rejectUnauthorized:!1,keepAlive:!0,keepAliveMsecs:3e4,maxSockets:50,maxFreeSockets:8});function Qi(t){return String(t??"").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/\.{2,}/g,"_").replace(/_+/g,"_").replace(/^_+|_+$/g,"")||"unnamed"}function w4(t){return U$.default.createHash("md5").update(t).digest("hex").slice(0,10)}function S4(t){try{let n=new URL(t,"https://placeholder.local").pathname.match(/\.([a-zA-Z0-9]+)$/);if(n&&Z$.includes(n[1].toLowerCase()))return n[1].toLowerCase()}catch{}}function _y(t){if(!t)return"png";let e=t.toLowerCase();return e.includes("svg")?"svg":e.includes("webp")?"webp":e.includes("jpeg")||e.includes("jpg")?"jpg":e.includes("gif")?"gif":e.includes("bmp")?"bmp":"png"}function vy(t){gt.default.existsSync(t)||gt.default.mkdirSync(t,{recursive:!0})}function H$(t){return/^https?:\/\//i.test(t)}function wy(t){if(!t)return!1;if(t.startsWith("data:image/"))return!0;let e=t.startsWith("//")?`https:${t}`:t;if(!/^https?:\/\//i.test(e)||e.includes("/api/")||e.includes("graphql")||e.endsWith(".json")||e.endsWith(".js")||e.endsWith(".css"))return!1;try{let n=new URL(e).pathname.toLowerCase();if(Z$.some(r=>n.endsWith(`.${r}`))||n.includes("/image/")||n.includes("/img/")||n.includes("/picture/")||e.includes("x-oss-process=image")||e.includes("imageView")||e.includes("format,")||n.includes("/thumbnail/")||e.includes("mastergo")&&(n.includes("/resource/")||n.includes("/file/"))||e.match(/[?&](w|width|h|height|resize|format)=/i))return!0}catch{}return!1}async function k4(t,e){var r;if(!H$(t))throw new Error(`Blocked unsafe URL: ${t}`);let n;for(let o=0;o<=M$;o++)try{let i=await vt.get(t,{responseType:"arraybuffer",timeout:b4,httpsAgent:B$,maxRedirects:5,maxContentLength:by}),s=`${e}.tmp`;await gt.default.promises.writeFile(s,Buffer.from(i.data)),await gt.default.promises.rename(s,e);return}catch(i){n=i;let s=(r=i==null?void 0:i.response)==null?void 0:r.status;if(s&&s>=400&&s<500)throw n;o<M$&&await new Promise(a=>setTimeout(a,500*(o+1)))}throw n}async function T4(t,e){let n=t.match(/^data:([^;]+);base64,(.+)$/);if(!n)throw new Error("Unsupported data URL format");let r=n[1],o=n[2];if(o.length>by*1.37)throw new Error(`Data URL too large: ${(o.length/1024/1024).toFixed(1)}MB (max ${by/1024/1024}MB)`);let i=_y(r),s=e.endsWith(`.${i}`)?e:`${e}.${i}`;return await gt.default.promises.writeFile(s,Buffer.from(o,"base64")),s}async function E4(t,e,n){let r=new Array(t.length),o=0,i=Array.from({length:Math.min(e,t.length)},async()=>{for(;;){let s=o++;if(s>=t.length)break;r[s]=await n(t[s],s)}});return await Promise.all(i),r}function $4(t,e){let n=Zt.default.join(t,"pubspec.yaml");if(!gt.default.existsSync(n))return"no-pubspec";let r=gt.default.readFileSync(n,"utf-8"),o=` - ${e}/`;if(r.split(/\r?\n/).some(c=>c.trimEnd()===o.trimEnd()))return"exists";let s=r,a=/^(flutter:[\s\S]*?)(?=^\S|$)/m.exec(r);if(a){let c=a[0],l=/^(\s{2,})assets:\s*\n/m.exec(c);if(l){let p=a.index+l.index+l[0].length;s=r.slice(0,p)+`${o}
|
|
1242
1243
|
`+r.slice(p)}else{let p=a.index+c.length,d=(c.endsWith(`
|
|
1243
1244
|
`)?"":`
|
|
1244
1245
|
`)+` assets:
|
|
@@ -1249,10 +1250,10 @@ ${o}
|
|
|
1249
1250
|
flutter:
|
|
1250
1251
|
assets:
|
|
1251
1252
|
${o}
|
|
1252
|
-
`;s=r+c}return gt.default.writeFileSync(n,s),"added"}function
|
|
1253
|
+
`;s=r+c}return gt.default.writeFileSync(n,s),"added"}function R4(t){let e=[],n=[];if(!t||typeof t!="string")return{urls:e,lostFragments:n};let r=/url\(\s*(?:"([^"]*)"|'([^']*)'|([^)]*))\s*\)/gi,o;for(;(o=r.exec(t))!==null;){let i=(o[1]??o[2]??o[3]??"").trim();if(i){if(i==="[object Object]"||i.includes("[object Object]")){n.push(o[0]);continue}e.push(i)}}return{urls:e,lostFragments:n}}function Sy(t,e,n,r){if(!t||typeof t!="object")return;if(Array.isArray(t)){t.forEach((i,s)=>Sy(i,`${e}[${s}]`,n,r));return}let o=typeof t.id=="string"?t.id:"";for(let[i,s]of Object.entries(t)){let a=e?`${e}.${i}`:i;if(typeof s=="string"){if(i==="cssCode"){let{urls:c,lostFragments:l}=R4(s);for(let p of c){let d=p.startsWith("data:image/")?"data":"remote",f=p.startsWith("//")?`https:${p}`:p;(d==="data"||wy(f))&&(n.has(f)||n.set(f,{token:a,url:f,kind:d}))}for(let p of l)r.push({nodeId:o,token:a,rawCssFragment:p})}else if(s.startsWith("data:image/"))n.has(s)||n.set(s,{token:a,url:s,kind:"data"});else if(s.startsWith("http")||s.startsWith("//")){let c=s.startsWith("//")?`https:${s}`:s;wy(c)&&!n.has(c)&&n.set(c,{token:a,url:c,kind:"remote"})}}else s&&typeof s=="object"&&Sy(s,a,n,r)}}function F$(t){let e=t.match(/paint_(\d+):(\d+)/);return e?Number(e[2]):Number.MAX_SAFE_INTEGER}async function A4(t,e,n,r){var o;try{let i=await ot.getDsl(t,e,n?{sourceLayerId:n}:void 0),s=(i==null?void 0:i.dsl)??{},a=(s==null?void 0:s.styles)??{},c=Object.keys(a).filter(p=>p.startsWith("paint_")).sort((p,d)=>F$(p)-F$(d)||p.localeCompare(d)),l=[];for(let p of c){let d=(o=a[p])==null?void 0:o.value;Array.isArray(d)&&d.forEach((f,h)=>{let y=typeof(f==null?void 0:f.url)=="string"?f.url:"";!y||!wy(y)||l.push({token:`dsl.styles.${p}.value[${h}].url`,url:y,kind:"remote"})})}return l}catch(i){return r.push(`DSL fallback fetch failed: ${(i==null?void 0:i.message)??String(i)}`),[]}}function P4(t,e){if(!e.length)return 0;let n=0,r=0,o=i=>{if(!(!i||typeof i!="object")){if(Array.isArray(i)){i.forEach(o);return}for(let[s,a]of Object.entries(i))typeof a=="string"&&s==="cssCode"&&a.includes("[object Object]")?i[s]=a.replace(/url\(\s*\[object Object\]\s*\)/gi,c=>{if(n>=e.length)return c;let l=e[n++];return r++,`url(${l})`}):a&&typeof a=="object"&&o(a)}};return o(t),r}function C4(t,e,n,r){if(!Array.isArray(t==null?void 0:t.path)||t.path.length===0)return null;let o=Qi(String(t.id??"icon")),i=t.width??16,s=t.height??16,c=t.path.length===1,l=`${o}.svg`,p=Zt.default.join(e,l),d=!1;if(!gt.default.existsSync(p)){let h=t.path.map((y,b)=>{var m,v,w,k;let x="currentColor";if(!c){let E=((v=(m=t.fills)==null?void 0:m[b])==null?void 0:v.color)??((k=(w=t.strokes)==null?void 0:w[b])==null?void 0:k.color);E&&(x=`rgb(${Math.round((E.r??0)*255)},${Math.round((E.g??0)*255)},${Math.round((E.b??0)*255)})`)}return` <path d="${y}" fill="${x}"/>`}).join(`
|
|
1253
1254
|
`);gt.default.writeFileSync(p,`<svg width="${i}" height="${s}" viewBox="0 0 ${i} ${s}" xmlns="http://www.w3.org/2000/svg">
|
|
1254
1255
|
${h}
|
|
1255
|
-
</svg>`),d=!0}let f=qt.default.join(n,l);return gt.default.existsSync(f)||gt.default.copyFileSync(p,f),{flutterPath:`${r}/${l}`,localPath:p,needsColorFilter:c,created:d}}function z$(t,e,n,r,o){let i=f4(t,e,n,r);i&&(t.imageUrls=t.imageUrls??[],t.imageUrls.push({flutterPath:i.flutterPath,needsColorFilter:i.needsColorFilter}),o.push({token:`vector.${Ji(String(t.id??"icon"))}`,sourceUrl:"",localPath:i.localPath,flutterPath:i.flutterPath,format:"svg",status:i.created?"downloaded":"skipped",needsColorFilter:i.needsColorFilter}),delete t.path),Array.isArray(t==null?void 0:t.children)&&t.children.forEach(s=>z$(s,e,n,r,o))}function my(t,e){if(!(!t||typeof t!="object")){if(Array.isArray(t)){t.forEach(n=>my(n,e));return}for(let[n,r]of Object.entries(t))if(typeof r=="string")if(n==="cssCode")t[n]=r.replace(/url\(\s*(?:"([^"]*)"|'([^']*)'|([^)]*))\s*\)/gi,(o,i,s,a)=>{let c=(i??s??a??"").trim(),l=c.startsWith("//")?`https:${c}`:c,p=e.get(l)??e.get(c);return p?`url(${p})`:o});else{let o=r.startsWith("//")?`https:${r}`:r,i=e.get(o)??e.get(r);i&&(t[n]=i)}else r&&typeof r=="object"&&my(r,e)}}var mu=class extends ht{constructor(){super();this.name=e4;this.description=t4;this.schema=Y.object({rootPath:Y.string().describe("The root path of the Flutter project, if the user does not provide, you can use the current directory as the root path"),fileId:Y.string().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL)"),layerId:Y.string().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId> / file=<fileId> in MasterGo URL)"),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),featureName:Y.string().optional().describe("Optional feature directory name under assets/image/ and the Flutter feature module. Defaults to the root component name.")})}async execute({rootPath:n,fileId:r,layerId:o,sourceLayerId:i,featureName:s}){let a=[],c=[],l=[];if(!qt.default.isAbsolute(n))return{isError:!0,content:[{type:"text",text:JSON.stringify({error:`rootPath must be an absolute path, got: "${n}". Please provide an absolute path to the Flutter project root.`})}]};let p=qt.default.resolve(n,".mastergo"),d=qt.default.join(p,"images");ly(p),ly(d);let f=await ot.getComponentStyleJson(r,o,i),h=(f==null?void 0:f[0])??{},y=h.name??"component";if(!f||f.length===0||!h.name)return{isError:!0,content:[{type:"text",text:JSON.stringify({error:`No component data returned from MasterGo API for fileId=${r} layerId=${o}. Please verify the fileId and layerId are correct.`})}]};let x=(s?Ji(s):"")||Ji(y)||Ji(o)||"component",m=qt.default.join(p,`${x}.json`),b=`assets/image/${x}`,w=qt.default.join(n,b);ly(w);let k=[];z$(h,d,w,b,k);let E=new Map;if(fy(h,"",E,l),l.length>0){let B=await p4(r,o,i,a);for(let qe of B)E.has(qe.url)||E.set(qe.url,qe)}let F=Array.from(E.values()),j={discovered:F.length,downloaded:0,skipped:0,failed:0,recovered:0,lost:l.length,byFormat:{}},de=await c4(F,r4,async B=>{var ge;let qe=o4(B.url),De=i4(B.url),it=`${Ji(B.token.replace(/:/g,"_"))||"asset"}_${qe}`;try{if(B.kind==="data"){let Tt=(ge=B.url.match(/^data:([^;]+);base64,/))==null?void 0:ge[1];De=py(Tt);let Et=`${it}.${De}`,Te=qt.default.join(d,Et);gt.default.existsSync(Te)||await a4(B.url,qt.default.join(d,it));let Bt=qt.default.join(w,Et);return gt.default.existsSync(Bt)||await gt.default.promises.copyFile(Te,Bt),j.downloaded++,j.byFormat[De]=(j.byFormat[De]??0)+1,{token:B.token,sourceUrl:B.url,localPath:Te,flutterPath:`${b}/${Et}`,format:De,status:"downloaded"}}if(!O$(B.url))throw new Error(`Blocked unsafe URL: ${B.url}`);if(!De)try{let Tt=await vt.head(B.url,{timeout:5e3,httpsAgent:P$,maxRedirects:5});De=py(String(Tt.headers["content-type"]??""))}catch{De="png"}let ke=`${it}.${De}`,ut=qt.default.join(d,ke);if(gt.default.existsSync(ut)){let Tt=qt.default.join(w,ke);return gt.default.existsSync(Tt)||await gt.default.promises.copyFile(ut,Tt),j.skipped++,j.byFormat[De]=(j.byFormat[De]??0)+1,{token:B.token,sourceUrl:B.url,localPath:ut,flutterPath:`${b}/${ke}`,format:De,status:"skipped"}}await s4(B.url,ut);let Oe=qt.default.join(w,ke);return await gt.default.promises.copyFile(ut,Oe),j.downloaded++,j.byFormat[De]=(j.byFormat[De]??0)+1,{token:B.token,sourceUrl:B.url,localPath:ut,flutterPath:`${b}/${ke}`,format:De,status:"downloaded"}}catch(ke){let ut=(ke==null?void 0:ke.message)??String(ke);return j.failed++,c.push({token:B.token,url:B.url,error:ut}),a.push(`Failed to download ${B.token}: ${ut}`),{token:B.token,sourceUrl:B.url,localPath:"",flutterPath:"",format:De??"unknown",status:"failed",error:ut}}});for(let B of k)j.discovered++,B.status==="downloaded"?j.downloaded++:j.skipped++,j.byFormat.svg=(j.byFormat.svg??0)+1;let oe=[...de,...k],Re=l4(n,b);Re==="no-pubspec"&&a.push("pubspec.yaml not found \u2014 asset directory was NOT registered. Add it manually.");let bt=new Map;for(let B of oe)B.status!=="failed"&&B.flutterPath&&B.sourceUrl&&bt.set(B.sourceUrl,B.flutterPath);my(h,bt);let Ve=oe.filter(B=>B.token.startsWith("dsl.styles.paint_")&&B.status!=="failed"&&!!B.flutterPath).map(B=>B.flutterPath),ae=d4(h,Ve);j.recovered=ae,j.lost=Math.max(0,j.lost-ae),ae>0&&a.push(`Recovered ${ae} lost image placeholder(s) via DSL styles paint fallback.`);let yt=l.slice(ae);gt.default.writeFileSync(m,JSON.stringify(h,null,2));let V=qt.default.join(p,"flutter-component-workflow.md");gt.default.existsSync(V)||gt.default.writeFileSync(V,E$);let At=qt.default.join(p,"assets-manifest.json"),Zt={fileId:r,layerId:o,featureName:x,generatedAt:new Date().toISOString(),summary:j,assets:oe.map(B=>({token:B.token,sourceUrl:B.sourceUrl,localPath:B.localPath,flutterPath:B.flutterPath,format:B.format,status:B.status,...B.needsColorFilter!==void 0?{needsColorFilter:B.needsColorFilter}:{},...B.error?{error:B.error}:{}})),lostImageRefs:yt};gt.default.writeFileSync(At,JSON.stringify(Zt,null,2));let Vn=b,Pe=yt.length>0?`WARNING: ${yt.length} image references were LOST by the MasterGo upstream (cssCode contains url([object Object])). These cannot be recovered from the style API. Affected node IDs: ${Array.from(new Set(yt.map(B=>B.nodeId))).slice(0,20).join(", ")}${yt.length>20?" \u2026":""}. Use placeholder widgets (Container with grey background + Icon) or ask the user to re-export via mcp__getD2c for those nodes.`:null;return{content:[{type:"text",text:JSON.stringify({files:{workflow:V,componentSpec:m,assetDir:d,flutterAssetDir:w,assetManifest:At},assetSummary:j,failedAssets:c,lostImageRefs:yt.slice(0,50),warnings:a,message:`Flutter component files created. ${j.downloaded} downloaded, ${j.skipped} skipped, ${j.failed} failed, ${j.recovered} recovered, ${j.lost} still lost. Assets copied to ${b}/${Re==="added"?" and registered in pubspec.yaml.":Re==="exists"?"; pubspec entry already present.":"; pubspec.yaml NOT updated (file missing)."}`,rules:[`Follow the Flutter component workflow process defined in file://${V} for structured Flutter development. This workflow contains DSL-to-Flutter mapping rules, you'll need to read it carefully.`,`Implement the Flutter widget according to the specifications in file://${m}, ensuring all properties and states are properly handled.`,`All image URLs in the component spec have been replaced with Flutter asset paths under ${Vn}/. Use Image.asset()/SvgPicture.asset() with these paths directly.`,"SVG icons with needsColorFilter=true should use SvgPicture.asset with ColorFilter.mode(..., BlendMode.srcIn); those with needsColorFilter=false should render without color override.",`An asset manifest is available at file://${At} listing every resource and its status (downloaded/skipped/failed/lost).`,"Use flutter_screenutil for screen adaptation: width/height/padding/margin/radius use .w; font sizes use .sp.","Use standard Flutter Color(0xFFxxxxxx) for colors. Do NOT create custom color utility classes.",...c.length>0?[`WARNING: ${c.length} assets failed to download. See failedAssets for details; substitute placeholders.`]:[],...Pe?[Pe]:[]]})}]}}};var Yi={name:"@mastergo/magic-mcp",version:"0.2.5",description:"MasterGo MCP standalone service",homepage:"https://github.com/mastergo-design/mastergo-magic-mcp#readme",repository:{type:"git",url:"git+https://github.com/mastergo-design/mastergo-magic-mcp.git"},bugs:{url:"https://github.com/mastergo-design/mastergo-magic-mcp/issues"},main:"dist/index.js",bin:{"mastergo-magic-mcp":"dist/index.js"},files:["dist/**/*","!**/*.map","!**/.DS_Store","!**/.idea","!**/.vscode"],engines:{node:">=18"},scripts:{build:"node build.js","build:watch":"node build.js --watch",lint:"eslint src --ext .ts","lint:fix":"eslint src --ext .ts --fix",test:"esbuild test/format.test.ts test/headers.test.ts test/url-safety.test.ts --bundle --platform=node --format=cjs --outdir=.test --out-extension:.js=.cjs && node --test .test/format.test.cjs .test/headers.test.cjs .test/url-safety.test.cjs",start:"node dist/index.js --token=test --url=http://localhost:3000 --debug",prepare:"npm run build",prepublishOnly:"npm run build"},keywords:["mastergo","mcp","ai"],author:"",license:"ISC",private:!1,dependencies:{"@modelcontextprotocol/sdk":"^1.6.1",axios:"1.18.1","https-proxy-agent":"^9.0.0","js-yaml":"^4.2.0",zod:"^3.22.4"},devDependencies:{"@types/js-yaml":"^4.0.9","@types/node":"^20.8.10","@typescript-eslint/eslint-plugin":"^8.62.0","@typescript-eslint/parser":"^8.62.0",esbuild:"^0.25.1","esbuild-plugin-tsc":"^0.5.0",eslint:"^8.57.1",prettier:"^3.0.3","ts-node":"^10.9.1",typescript:"^5.2.2"},overrides:{hono:"^4.12.27","form-data":"^4.0.6","fast-uri":"^3.1.2","ip-address":"^10.2.0",qs:"^6.15.3"},packageManager:"yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"};var h4=`version_${Yi.version.replace(/\./g,"_")}`,g4=`the current version is ${Yi.version}`,hu=class extends ht{constructor(){super();this.name=h4;this.description=g4;this.schema=Y.object({})}async execute(){return{content:[{type:"text",text:JSON.stringify(Yi.version)}]}}};var y4="mcp__getDesignSections",x4=`
|
|
1256
|
+
</svg>`),d=!0}let f=Zt.default.join(n,l);return gt.default.existsSync(f)||gt.default.copyFileSync(p,f),{flutterPath:`${r}/${l}`,localPath:p,needsColorFilter:c,created:d}}function V$(t,e,n,r,o){let i=C4(t,e,n,r);i&&(t.imageUrls=t.imageUrls??[],t.imageUrls.push({flutterPath:i.flutterPath,needsColorFilter:i.needsColorFilter}),o.push({token:`vector.${Qi(String(t.id??"icon"))}`,sourceUrl:"",localPath:i.localPath,flutterPath:i.flutterPath,format:"svg",status:i.created?"downloaded":"skipped",needsColorFilter:i.needsColorFilter}),delete t.path),Array.isArray(t==null?void 0:t.children)&&t.children.forEach(s=>V$(s,e,n,r,o))}function ky(t,e){if(!(!t||typeof t!="object")){if(Array.isArray(t)){t.forEach(n=>ky(n,e));return}for(let[n,r]of Object.entries(t))if(typeof r=="string")if(n==="cssCode")t[n]=r.replace(/url\(\s*(?:"([^"]*)"|'([^']*)'|([^)]*))\s*\)/gi,(o,i,s,a)=>{let c=(i??s??a??"").trim(),l=c.startsWith("//")?`https:${c}`:c,p=e.get(l)??e.get(c);return p?`url(${p})`:o});else{let o=r.startsWith("//")?`https:${r}`:r,i=e.get(o)??e.get(r);i&&(t[n]=i)}else r&&typeof r=="object"&&ky(r,e)}}var vu=class extends ht{constructor(){super();this.description=v4;this.schema=Y.object({rootPath:Y.string().describe("The root path of the Flutter project, if the user does not provide, you can use the current directory as the root path"),fileId:Y.string().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL)"),layerId:Y.string().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId> / file=<fileId> in MasterGo URL)"),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),featureName:Y.string().optional().describe("Optional feature directory name under assets/image/ and the Flutter feature module. Defaults to the root component name.")})}get name(){return kt("getFlutterGenerator")}async execute({rootPath:n,fileId:r,layerId:o,sourceLayerId:i,featureName:s}){let a=[],c=[],l=[];if(!Zt.default.isAbsolute(n))return{isError:!0,content:[{type:"text",text:JSON.stringify({error:`rootPath must be an absolute path, got: "${n}". Please provide an absolute path to the Flutter project root.`})}]};let p=Zt.default.resolve(n,".mastergo"),d=Zt.default.join(p,"images");vy(p),vy(d);let f=await ot.getComponentStyleJson(r,o,i),h=(f==null?void 0:f[0])??{},y=h.name??"component";if(!f||f.length===0||!h.name)return{isError:!0,content:[{type:"text",text:JSON.stringify({error:`No component data returned from MasterGo API for fileId=${r} layerId=${o}. Please verify the fileId and layerId are correct.`})}]};let x=(s?Qi(s):"")||Qi(y)||Qi(o)||"component",m=Zt.default.join(p,`${x}.json`),v=`assets/image/${x}`,w=Zt.default.join(n,v);vy(w);let k=[];V$(h,d,w,v,k);let E=new Map;if(Sy(h,"",E,l),l.length>0){let B=await A4(r,o,i,a);for(let qe of B)E.has(qe.url)||E.set(qe.url,qe)}let F=Array.from(E.values()),j={discovered:F.length,downloaded:0,skipped:0,failed:0,recovered:0,lost:l.length,byFormat:{}},de=await E4(F,_4,async B=>{var ge;let qe=w4(B.url),De=S4(B.url),it=`${Qi(B.token.replace(/:/g,"_"))||"asset"}_${qe}`;try{if(B.kind==="data"){let Et=(ge=B.url.match(/^data:([^;]+);base64,/))==null?void 0:ge[1];De=_y(Et);let $t=`${it}.${De}`,Te=Zt.default.join(d,$t);gt.default.existsSync(Te)||await T4(B.url,Zt.default.join(d,it));let Ht=Zt.default.join(w,$t);return gt.default.existsSync(Ht)||await gt.default.promises.copyFile(Te,Ht),j.downloaded++,j.byFormat[De]=(j.byFormat[De]??0)+1,{token:B.token,sourceUrl:B.url,localPath:Te,flutterPath:`${v}/${$t}`,format:De,status:"downloaded"}}if(!H$(B.url))throw new Error(`Blocked unsafe URL: ${B.url}`);if(!De)try{let Et=await vt.head(B.url,{timeout:5e3,httpsAgent:B$,maxRedirects:5});De=_y(String(Et.headers["content-type"]??""))}catch{De="png"}let ke=`${it}.${De}`,ut=Zt.default.join(d,ke);if(gt.default.existsSync(ut)){let Et=Zt.default.join(w,ke);return gt.default.existsSync(Et)||await gt.default.promises.copyFile(ut,Et),j.skipped++,j.byFormat[De]=(j.byFormat[De]??0)+1,{token:B.token,sourceUrl:B.url,localPath:ut,flutterPath:`${v}/${ke}`,format:De,status:"skipped"}}await k4(B.url,ut);let Oe=Zt.default.join(w,ke);return await gt.default.promises.copyFile(ut,Oe),j.downloaded++,j.byFormat[De]=(j.byFormat[De]??0)+1,{token:B.token,sourceUrl:B.url,localPath:ut,flutterPath:`${v}/${ke}`,format:De,status:"downloaded"}}catch(ke){let ut=(ke==null?void 0:ke.message)??String(ke);return j.failed++,c.push({token:B.token,url:B.url,error:ut}),a.push(`Failed to download ${B.token}: ${ut}`),{token:B.token,sourceUrl:B.url,localPath:"",flutterPath:"",format:De??"unknown",status:"failed",error:ut}}});for(let B of k)j.discovered++,B.status==="downloaded"?j.downloaded++:j.skipped++,j.byFormat.svg=(j.byFormat.svg??0)+1;let oe=[...de,...k],Re=$4(n,v);Re==="no-pubspec"&&a.push("pubspec.yaml not found \u2014 asset directory was NOT registered. Add it manually.");let bt=new Map;for(let B of oe)B.status!=="failed"&&B.flutterPath&&B.sourceUrl&&bt.set(B.sourceUrl,B.flutterPath);ky(h,bt);let Ve=oe.filter(B=>B.token.startsWith("dsl.styles.paint_")&&B.status!=="failed"&&!!B.flutterPath).map(B=>B.flutterPath),ae=P4(h,Ve);j.recovered=ae,j.lost=Math.max(0,j.lost-ae),ae>0&&a.push(`Recovered ${ae} lost image placeholder(s) via DSL styles paint fallback.`);let yt=l.slice(ae);gt.default.writeFileSync(m,JSON.stringify(h,null,2));let V=Zt.default.join(p,"flutter-component-workflow.md");gt.default.existsSync(V)||gt.default.writeFileSync(V,D$);let Pt=Zt.default.join(p,"assets-manifest.json"),Bt={fileId:r,layerId:o,featureName:x,generatedAt:new Date().toISOString(),summary:j,assets:oe.map(B=>({token:B.token,sourceUrl:B.sourceUrl,localPath:B.localPath,flutterPath:B.flutterPath,format:B.format,status:B.status,...B.needsColorFilter!==void 0?{needsColorFilter:B.needsColorFilter}:{},...B.error?{error:B.error}:{}})),lostImageRefs:yt};gt.default.writeFileSync(Pt,JSON.stringify(Bt,null,2));let Gn=v,Ie=yt.length>0?rn(`WARNING: ${yt.length} image references were LOST by the MasterGo upstream (cssCode contains url([object Object])). These cannot be recovered from the style API. Affected node IDs: ${Array.from(new Set(yt.map(B=>B.nodeId))).slice(0,20).join(", ")}${yt.length>20?" \u2026":""}. Use placeholder widgets (Container with grey background + Icon) or ask the user to re-export via mcp__getD2c for those nodes.`):null;return{content:[{type:"text",text:JSON.stringify({files:{workflow:V,componentSpec:m,assetDir:d,flutterAssetDir:w,assetManifest:Pt},assetSummary:j,failedAssets:c,lostImageRefs:yt.slice(0,50),warnings:a,message:`Flutter component files created. ${j.downloaded} downloaded, ${j.skipped} skipped, ${j.failed} failed, ${j.recovered} recovered, ${j.lost} still lost. Assets copied to ${v}/${Re==="added"?" and registered in pubspec.yaml.":Re==="exists"?"; pubspec entry already present.":"; pubspec.yaml NOT updated (file missing)."}`,rules:[`Follow the Flutter component workflow process defined in file://${V} for structured Flutter development. This workflow contains DSL-to-Flutter mapping rules, you'll need to read it carefully.`,`Implement the Flutter widget according to the specifications in file://${m}, ensuring all properties and states are properly handled.`,`All image URLs in the component spec have been replaced with Flutter asset paths under ${Gn}/. Use Image.asset()/SvgPicture.asset() with these paths directly.`,"SVG icons with needsColorFilter=true should use SvgPicture.asset with ColorFilter.mode(..., BlendMode.srcIn); those with needsColorFilter=false should render without color override.",`An asset manifest is available at file://${Pt} listing every resource and its status (downloaded/skipped/failed/lost).`,"Use flutter_screenutil for screen adaptation: width/height/padding/margin/radius use .w; font sizes use .sp.","Use standard Flutter Color(0xFFxxxxxx) for colors. Do NOT create custom color utility classes.",...c.length>0?[`WARNING: ${c.length} assets failed to download. See failedAssets for details; substitute placeholders.`]:[],...Ie?[Ie]:[]]})}]}}};var es={name:"@mastergo/magic-mcp",version:"0.2.7",description:"MasterGo MCP standalone service",homepage:"https://github.com/mastergo-design/mastergo-magic-mcp#readme",repository:{type:"git",url:"git+https://github.com/mastergo-design/mastergo-magic-mcp.git"},bugs:{url:"https://github.com/mastergo-design/mastergo-magic-mcp/issues"},main:"dist/index.js",bin:{"mastergo-magic-mcp":"dist/index.js"},files:["dist/**/*","!**/*.map","!**/.DS_Store","!**/.idea","!**/.vscode"],engines:{node:">=18"},scripts:{build:"node build.js","build:watch":"node build.js --watch",lint:"eslint src --ext .ts","lint:fix":"eslint src --ext .ts --fix",test:"esbuild test/format.test.ts test/headers.test.ts test/url-safety.test.ts test/cache-invalidate.test.ts test/tool-prefix.test.ts --bundle --platform=node --format=cjs --outdir=.test --out-extension:.js=.cjs && node --test .test/format.test.cjs .test/headers.test.cjs .test/url-safety.test.cjs .test/cache-invalidate.test.cjs .test/tool-prefix.test.cjs",start:"node dist/index.js --token=test --url=http://localhost:3000 --debug",prepare:"npm run build",prepublishOnly:"npm run build"},keywords:["mastergo","mcp","ai"],author:"",license:"ISC",private:!1,dependencies:{"@modelcontextprotocol/sdk":"^1.6.1",axios:"1.18.1","https-proxy-agent":"^9.0.0","js-yaml":"^4.2.0",zod:"^3.22.4"},devDependencies:{"@types/js-yaml":"^4.0.9","@types/node":"^20.8.10","@typescript-eslint/eslint-plugin":"^8.62.0","@typescript-eslint/parser":"^8.62.0",esbuild:"^0.25.1","esbuild-plugin-tsc":"^0.5.0",eslint:"^8.57.1",prettier:"^3.0.3","ts-node":"^10.9.1",typescript:"^5.2.2"},overrides:{hono:"^4.12.27","form-data":"^4.0.6","fast-uri":"^3.1.2","ip-address":"^10.2.0",qs:"^6.15.3"},packageManager:"yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"};var O4=`version_${es.version.replace(/\./g,"_")}`,z4=`the current version is ${es.version}`,bu=class extends ht{constructor(){super();this.name=O4;this.description=z4;this.schema=Y.object({})}async execute(){return{content:[{type:"text",text:JSON.stringify(es.version)}]}}};var N4=`
|
|
1256
1257
|
[PRIMARY] This is the main tool for all designs. Operates in TWO modes:
|
|
1257
1258
|
|
|
1258
1259
|
Mode 1 \u2014 Get layout overview (sectionIndex NOT provided):
|
|
@@ -1285,14 +1286,14 @@ If this tool returns an error (e.g. old server), fall back to mcp__getDsl.
|
|
|
1285
1286
|
You can provide either:
|
|
1286
1287
|
1. fileId and layerId directly, or
|
|
1287
1288
|
2. a short link (like https://{domain}/goto/LhGgBAK)
|
|
1288
|
-
`,v4=["CRITICAL \u2014 Page positioning: the section LIST response contains splitContainers with page-absolute coordinates for each page region. Use splitContainers to construct the page skeleton (position:absolute with exact coordinates). Do NOT guess or stack with flex. IMPORTANT: splitContainers x/y are the container's absolute position on the canvas \u2014 they are NOT CSS margins/padding for child elements. Do NOT apply a container's y coordinate as top/margin-top on the main content wrapper. The main content area should start at top:0 within its own positioning context; sub-sections inside it use their own bbox y coordinates relative to the container, not to the page root.","CRITICAL \u2014 Multi-column sidebar layout: render ALL sidebar levels as persistent visible columns positioned via splitContainers coordinates. Do NOT use position:absolute/fixed for submenu panels (they become floating overlays and break the main content width). Instead, lay out ALL columns (primary sidebar + submenu + main content) side-by-side using flex or absolute positioning that ACCOUNTS for every column's width. The main content area width = rootContainer.width minus ALL sidebar column widths. Do NOT use flex:1 for main content when there are multiple sidebar columns \u2014 it will expand into the submenu's space. Each sidebar column's width comes from its splitContainer entry.","token filed must be generated as a variable (colors, shadows, fonts, etc.) and the token field must be displayed in the comment","componentDocumentLinks is a list of frontend component documentation links. When it exists and is not empty, use mcp__getComponentLink to get the documentation.","",'CRITICAL \u2014 SVG FROM PATH NODES (MUST FOLLOW): Every PATH node has a `svgShortKey` field (a short sequential ID like `S0#0`, `S0#1`). The SVG markup is NOT in the DSL. You MUST place a placeholder `@@SVG:{svgShortKey}@@` where each icon goes, then call `mcp__applyDesign` at the end to inject the real high-precision SVG. NEVER hand-write `<path d="...">` \u2014 the DSL does NOT contain path data. NEVER leave a PATH node unrendered \u2014 every icon MUST have a `@@SVG:{svgShortKey}@@` placeholder.',"CRITICAL \u2014 RENDER EVERY ICON IN PATH NODES: Every PATH node has a `svgShortKey`. Place `@@SVG:{svgShortKey}@@` for each \u2014 sidebar menu icons, table header sort/filter/search icons, pagination prev/next/refresh icons, and action buttons. A header cell or menu item showing only plain text is a fidelity defect. After ALL placeholders are placed, call `mcp__applyDesign` to replace them with real SVG.","","CRITICAL \u2014 _placeholder TEXT handling: TEXT nodes with `_placeholder: true` (name==text) are listed in `dsl.placeholderTexts`. These are component-library boilerplate \u2014 NOT real column headers, labels, or data. Do NOT render them as table headers, column names, or visible UI labels. They appear alongside real text in the same section (e.g. a header cell has both realTitle='\u7528\u6237\u540D\u79F0' and placeholder='Hillstone Design') \u2014 render ONLY the real title, omit the placeholder. EXCEPTION: if a placeholder text is the SOLE text in its section AND it reads as a legitimate brand name or page title (e.g. '\u667A\u6E90\u667A\u80FD\u5B89\u5168\u8FD0\u8425\u5E73\u53F0'), it may be real content \u2014 render it in its proper context (logo area, page title), never as a table header.","CRITICAL \u2014 CLOSED-SET TEXT: the section LIST response carries `rootMetadata.allTexts` \u2014 the complete whitelist of text strings in this design (including placeholder strings). Any visible string NOT in allTexts is a hallucination and MUST be removed. Use `dsl.placeholderTexts` in each section to identify which strings are component-library boilerplate.","","CRITICAL \u2014 INSTANCE fill color: when an INSTANCE has both `fill` and `_color`, use `_color` directly as the CSS value. Do NOT guess colors from _variantProps semantics.","CRITICAL \u2014 INSTANCE _variantProps: compare across siblings for selected/hovered/disabled. Active class MUST match DSL variant state, NOT a default index.","CRITICAL \u2014 Render count = structureSiblingCount: if ssc=1, that single instance IS complete \u2014 do NOT fabricate extra rows/items.","CRITICAL \u2014 BACKGROUND FROM splitContainers: splitContainers[].background IS the exact CSS background-color. Copy verbatim, no changes.","CRITICAL \u2014 FRAME/GROUP opacity: translate to rgba() on background only, NOT CSS opacity (would make children translucent).","CRITICAL \u2014 rowTexts: each entry has parentType/parentName for context and `_placeholder: true` if boilerplate. Use parentName to place text correctly; skip _placeholder entries. IMPORTANT: if a short numeric text (like '8') has parentName matching a button INSTANCE (e.g. '\u5206\u7C7B[a3]=\u6587\u672C\u6309\u94AE,\u7C7B\u578B[aI]=\u5371\u9669'), it is likely a badge/count indicator overlaid on that button \u2014 NOT part of the button label. Do NOT render it inside the button text; render it as a separate badge element positioned on the button corner, OR omit it if the design does not show a visible badge on that specific button instance.","Render ALL nodes recursively. Section root layoutStyle.width = section width. Do not call mcp__getDsl after completing section workflow.","CRITICAL \u2014 ICON-TO-NODE BINDING: match PATH nodes to their UI position by the node's ancestor name. A PATH node under a menu item belongs in that menu's icon slot; one under a button/refresh belongs in that button. NEVER substitute a memorized icon \u2014 use the exact `@@SVG:{svgShortKey}@@` from the PATH node in its section. NEVER reuse a svgShortKey from a different section.","CRITICAL \u2014 TEXT PROVENANCE SELF-CHECK: before finalizing output, verify every visible text string exists in allTexts. If you emit MORE distinct strings than allTexts.length, you are hallucinating. Typical hallucinations: fabricated table headers, invented data, brand tokens, generic labels not in the design.","CRITICAL \u2014 DO NOT SKIP SECTION DSL FETCH: the section LIST response is ONLY a directory (id/name/nodeCount/textPreview). It does NOT contain DSL nodes, rowTexts, or any rendering data. You CANNOT generate correct HTML from the list alone. You MUST call mcp__getDesignSections with sectionIndex=0, then 1, ... up to totalSections-1 to get each section's DSL. Generating HTML without fetching ALL section DSLs will produce missing content (menus, table data, icons) and incorrect SVGs \u2014 this is the #1 cause of broken output."],gu=class extends ht{constructor(){super();this.name=y4;this.description=x4;this.schema=Y.object({fileId:Y.string().optional().describe("MasterGo design file ID. Required if shortLink is not provided."),layerId:Y.string().optional().describe("Root layer ID of the design. Required if shortLink is not provided."),shortLink:Y.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),sectionIndex:Y.number().int().min(0).optional().describe("0-based section index (SINGULAR \u2014 a single integer per call). If omitted, returns the section list only. If provided, returns full DSL for that ONE specific section. To fetch multiple sections, make MULTIPLE separate calls each with a single sectionIndex. Do NOT pass an array."),format:Kr()}).passthrough()}async execute({fileId:n,layerId:r,shortLink:o,sourceLayerId:i,sectionIndex:s,format:a,...c}){var l,p,d;try{let f=Object.keys(c).filter(b=>!b.startsWith("_"));if(f.length>0){let b=f.includes("sectionIndices")?"Parameter 'sectionIndices' (plural) is NOT supported. Use 'sectionIndex' (SINGULAR \u2014 a single integer) instead. Make MULTIPLE separate calls, each with one sectionIndex (e.g. sectionIndex=15, then sectionIndex=16, ...). Passing an array will always return this error.":`Unknown parameter(s): ${f.join(", ")}. This tool only accepts: fileId, layerId, sourceLayerId, shortLink, sectionIndex, format. Remove the unknown parameter(s) and retry.`;return{isError:!0,content:[{type:"text",text:JSON.stringify({error:b})}]}}if(!o&&(!n||!r&&!i))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a shortLink");let h=this.normalizeFileId(n),y=r,v=i;if(o){let b=await ot.extractIdsFromUrl(o);h=this.normalizeFileId(b.fileId),y=b.layerId,v=b.sourceLayerId??i}let x=v||y;if(!h||!x)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");let m=await ot.getDesignSections(h,x,s);if(s===void 0&&m&&typeof m=="object"&&(!m.rules||!Array.isArray(m.rules)||m.rules.length===0)&&(m.rules=v4),s===void 0&&m&&typeof m=="object"&&typeof m.totalSections=="number"&&m.totalSections>0){let b=m.totalSections,w="",E=(Array.isArray(m.sections)?m.sections:[]).filter(j=>j&&typeof j.structureSiblingCount=="number"&&j.structureSiblingCount>1);if(E.length>0){let j=Math.max(...E.map(me=>me.structureSiblingCount));w=` WARNING: ${E.length} sections have structureSiblingCount up to ${j} \u2014 they look identical in the list (same nodeCount, empty name) but each has DIFFERENT text content and variant state. You MUST fetch ALL of them individually (do NOT skip any after fetching a few). Skipping sibling sections causes missing active-state styling and wrong menu item rendering.`}m.nextAction=`STOP. This section LIST is only a directory \u2014 it has NO DSL nodes, NO rowTexts. You CANNOT generate HTML from this list alone. Your NEXT ACTION: call mcp__getDesignSections with sectionIndex=0, then sectionIndex=1, ... up to sectionIndex=${b-1} (total ${b} calls). Fetch ALL ${b} sections in batches of 3-5 before writing ANY HTML. Sections with nodeCount=3 and empty name are NOT empty \u2014 they contain real menu items and content (resolved from INSTANCE overrides during DSL transfer).${w} Skipping section DSL fetch is the #1 cause of missing menus, broken icons, and wrong data.`;let F=m.splitContainers;if(Array.isArray(F)&&F.length>0){let j=parseInt(((l=m.rootContainer)==null?void 0:l.minHeight)??"",10)||900,me=F.filter(de=>de&&de.height&&de.height>=j*.8&&de.width&&de.width<=300);if(me.length>=2){let de=me.reduce((ae,yt)=>ae+(yt.width||0),0),oe=parseInt(((p=m.rootContainer)==null?void 0:p.width)??"",10)||1440,Re=de,bt=oe-de,Ve=me.map(ae=>ae.name||ae.id).join(", ");m.nextAction+=` LAYOUT: ${me.length} sidebar columns detected (${Ve}), total width=${de}px. Main content must start at x=${Re} with width=${bt}px. Do NOT let main content expand into sidebar space (no flex:1 without explicit max-width).`}}}if(s===void 0&&(x$(h,x),m&&typeof m=="object"&&typeof m.totalSections=="number"&&v$(h,x,m.totalSections)),s!==void 0&&m&&typeof m=="object"){let b=b$(h,x,s);if(b&&b.remaining>0){let w=b.missingIndices.length<=15?`[${b.missingIndices.join(",")}]`:`[${b.missingIndices.slice(0,10).join(",")}... +${b.missingIndices.length-10} more]`;m.fetchProgress=`Fetched ${b.fetched}/${b.total}. MISSING ${b.remaining} sections: ${w}. You MUST fetch ALL remaining sections before generating HTML. Do NOT stop early.`}else b&&b.remaining===0&&(m.fetchProgress=`ALL ${b.total} sections fetched. You can now generate the complete HTML.`)}return{content:[{type:"text",text:Jr(m,a)}]}}catch(f){let h=((d=f.response)==null?void 0:d.data)??(f==null?void 0:f.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(h)}]}}}};var b4="mcp__extractSvg",_4=`
|
|
1289
|
+
`,j4=["CRITICAL \u2014 Page positioning: the section LIST response contains splitContainers with page-absolute coordinates for each page region. Use splitContainers to construct the page skeleton (position:absolute with exact coordinates). Do NOT guess or stack with flex. IMPORTANT: splitContainers x/y are the container's absolute position on the canvas \u2014 they are NOT CSS margins/padding for child elements. Do NOT apply a container's y coordinate as top/margin-top on the main content wrapper. The main content area should start at top:0 within its own positioning context; sub-sections inside it use their own bbox y coordinates relative to the container, not to the page root.","CRITICAL \u2014 Multi-column sidebar layout: render ALL sidebar levels as persistent visible columns positioned via splitContainers coordinates. Do NOT use position:absolute/fixed for submenu panels (they become floating overlays and break the main content width). Instead, lay out ALL columns (primary sidebar + submenu + main content) side-by-side using flex or absolute positioning that ACCOUNTS for every column's width. The main content area width = rootContainer.width minus ALL sidebar column widths. Do NOT use flex:1 for main content when there are multiple sidebar columns \u2014 it will expand into the submenu's space. Each sidebar column's width comes from its splitContainer entry.","token filed must be generated as a variable (colors, shadows, fonts, etc.) and the token field must be displayed in the comment","componentDocumentLinks is a list of frontend component documentation links. When it exists and is not empty, use mcp__getComponentLink to get the documentation.","",'CRITICAL \u2014 SVG FROM PATH NODES (MUST FOLLOW): Every PATH node has a `svgShortKey` field (a short sequential ID like `S0#0`, `S0#1`). The SVG markup is NOT in the DSL. You MUST place a placeholder `@@SVG:{svgShortKey}@@` where each icon goes, then call `mcp__applyDesign` at the end to inject the real high-precision SVG. NEVER hand-write `<path d="...">` \u2014 the DSL does NOT contain path data. NEVER leave a PATH node unrendered \u2014 every icon MUST have a `@@SVG:{svgShortKey}@@` placeholder.',"CRITICAL \u2014 RENDER EVERY ICON IN PATH NODES: Every PATH node has a `svgShortKey`. Place `@@SVG:{svgShortKey}@@` for each \u2014 sidebar menu icons, table header sort/filter/search icons, pagination prev/next/refresh icons, and action buttons. A header cell or menu item showing only plain text is a fidelity defect. After ALL placeholders are placed, call `mcp__applyDesign` to replace them with real SVG.","","CRITICAL \u2014 _placeholder TEXT handling: TEXT nodes with `_placeholder: true` (name==text) are listed in `dsl.placeholderTexts`. These are component-library boilerplate \u2014 NOT real column headers, labels, or data. Do NOT render them as table headers, column names, or visible UI labels. They appear alongside real text in the same section (e.g. a header cell has both realTitle='\u7528\u6237\u540D\u79F0' and placeholder='Hillstone Design') \u2014 render ONLY the real title, omit the placeholder. EXCEPTION: if a placeholder text is the SOLE text in its section AND it reads as a legitimate brand name or page title (e.g. '\u667A\u6E90\u667A\u80FD\u5B89\u5168\u8FD0\u8425\u5E73\u53F0'), it may be real content \u2014 render it in its proper context (logo area, page title), never as a table header.","CRITICAL \u2014 CLOSED-SET TEXT: the section LIST response carries `rootMetadata.allTexts` \u2014 the complete whitelist of text strings in this design (including placeholder strings). Any visible string NOT in allTexts is a hallucination and MUST be removed. Use `dsl.placeholderTexts` in each section to identify which strings are component-library boilerplate.","","CRITICAL \u2014 INSTANCE fill color: when an INSTANCE has both `fill` and `_color`, use `_color` directly as the CSS value. Do NOT guess colors from _variantProps semantics.","CRITICAL \u2014 INSTANCE _variantProps: compare across siblings for selected/hovered/disabled. Active class MUST match DSL variant state, NOT a default index.","CRITICAL \u2014 Render count = structureSiblingCount: if ssc=1, that single instance IS complete \u2014 do NOT fabricate extra rows/items.","CRITICAL \u2014 BACKGROUND FROM splitContainers: splitContainers[].background IS the exact CSS background-color. Copy verbatim, no changes.","CRITICAL \u2014 FRAME/GROUP opacity: translate to rgba() on background only, NOT CSS opacity (would make children translucent).","CRITICAL \u2014 rowTexts: each entry has parentType/parentName for context and `_placeholder: true` if boilerplate. Use parentName to place text correctly; skip _placeholder entries. IMPORTANT: if a short numeric text (like '8') has parentName matching a button INSTANCE (e.g. '\u5206\u7C7B[a3]=\u6587\u672C\u6309\u94AE,\u7C7B\u578B[aI]=\u5371\u9669'), it is likely a badge/count indicator overlaid on that button \u2014 NOT part of the button label. Do NOT render it inside the button text; render it as a separate badge element positioned on the button corner, OR omit it if the design does not show a visible badge on that specific button instance.","Render ALL nodes recursively. Section root layoutStyle.width = section width. Do not call mcp__getDsl after completing section workflow.","CRITICAL \u2014 ICON-TO-NODE BINDING: match PATH nodes to their UI position by the node's ancestor name. A PATH node under a menu item belongs in that menu's icon slot; one under a button/refresh belongs in that button. NEVER substitute a memorized icon \u2014 use the exact `@@SVG:{svgShortKey}@@` from the PATH node in its section. NEVER reuse a svgShortKey from a different section.","CRITICAL \u2014 TEXT PROVENANCE SELF-CHECK: before finalizing output, verify every visible text string exists in allTexts. If you emit MORE distinct strings than allTexts.length, you are hallucinating. Typical hallucinations: fabricated table headers, invented data, brand tokens, generic labels not in the design.","CRITICAL \u2014 DO NOT SKIP SECTION DSL FETCH: the section LIST response is ONLY a directory (id/name/nodeCount/textPreview). It does NOT contain DSL nodes, rowTexts, or any rendering data. You CANNOT generate correct HTML from the list alone. You MUST call mcp__getDesignSections with sectionIndex=0, then 1, ... up to totalSections-1 to get each section's DSL. Generating HTML without fetching ALL section DSLs will produce missing content (menus, table data, icons) and incorrect SVGs \u2014 this is the #1 cause of broken output."],_u=class extends ht{constructor(){super();this.description=N4;this.schema=Y.object({fileId:Y.string().optional().describe("MasterGo design file ID. Required if shortLink is not provided."),layerId:Y.string().optional().describe("Root layer ID of the design. Required if shortLink is not provided."),shortLink:Y.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),sectionIndex:Y.number().int().min(0).optional().describe("0-based section index (SINGULAR \u2014 a single integer per call). If omitted, returns the section list only. If provided, returns full DSL for that ONE specific section. To fetch multiple sections, make MULTIPLE separate calls each with a single sectionIndex. Do NOT pass an array."),format:Yr()}).passthrough()}get name(){return kt("getDesignSections")}async execute({fileId:n,layerId:r,shortLink:o,sourceLayerId:i,sectionIndex:s,format:a,...c}){var l,p,d;try{let f=Object.keys(c).filter(v=>!v.startsWith("_"));if(f.length>0){let v=f.includes("sectionIndices")?"Parameter 'sectionIndices' (plural) is NOT supported. Use 'sectionIndex' (SINGULAR \u2014 a single integer) instead. Make MULTIPLE separate calls, each with one sectionIndex (e.g. sectionIndex=15, then sectionIndex=16, ...). Passing an array will always return this error.":`Unknown parameter(s): ${f.join(", ")}. This tool only accepts: fileId, layerId, sourceLayerId, shortLink, sectionIndex, format. Remove the unknown parameter(s) and retry.`;return{isError:!0,content:[{type:"text",text:JSON.stringify({error:v})}]}}if(!o&&(!n||!r&&!i))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a shortLink");let h=this.normalizeFileId(n),y=r,b=i;if(o){let v=await ot.extractIdsFromUrl(o);h=this.normalizeFileId(v.fileId),y=v.layerId,b=v.sourceLayerId??i}let x=b||y;if(!h||!x)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");let m=await ot.getDesignSections(h,x,s);if(s===void 0&&m&&typeof m=="object"&&(!m.rules||!Array.isArray(m.rules)||m.rules.length===0)&&(m.rules=j4.map(v=>rn(v))),s===void 0&&m&&typeof m=="object"&&typeof m.totalSections=="number"&&m.totalSections>0){let v=m.totalSections,w="",E=(Array.isArray(m.sections)?m.sections:[]).filter(j=>j&&typeof j.structureSiblingCount=="number"&&j.structureSiblingCount>1);if(E.length>0){let j=Math.max(...E.map(me=>me.structureSiblingCount));w=` WARNING: ${E.length} sections have structureSiblingCount up to ${j} \u2014 they look identical in the list (same nodeCount, empty name) but each has DIFFERENT text content and variant state. You MUST fetch ALL of them individually (do NOT skip any after fetching a few). Skipping sibling sections causes missing active-state styling and wrong menu item rendering.`}m.nextAction=rn(`STOP. This section LIST is only a directory \u2014 it has NO DSL nodes, NO rowTexts. You CANNOT generate HTML from this list alone. Your NEXT ACTION: call mcp__getDesignSections with sectionIndex=0, then sectionIndex=1, ... up to sectionIndex=${v-1} (total ${v} calls). Fetch ALL ${v} sections in batches of 3-5 before writing ANY HTML. Sections with nodeCount=3 and empty name are NOT empty \u2014 they contain real menu items and content (resolved from INSTANCE overrides during DSL transfer).${w} Skipping section DSL fetch is the #1 cause of missing menus, broken icons, and wrong data.`);let F=m.splitContainers;if(Array.isArray(F)&&F.length>0){let j=parseInt(((l=m.rootContainer)==null?void 0:l.minHeight)??"",10)||900,me=F.filter(de=>de&&de.height&&de.height>=j*.8&&de.width&&de.width<=300);if(me.length>=2){let de=me.reduce((ae,yt)=>ae+(yt.width||0),0),oe=parseInt(((p=m.rootContainer)==null?void 0:p.width)??"",10)||1440,Re=de,bt=oe-de,Ve=me.map(ae=>ae.name||ae.id).join(", ");m.nextAction+=` LAYOUT: ${me.length} sidebar columns detected (${Ve}), total width=${de}px. Main content must start at x=${Re} with width=${bt}px. Do NOT let main content expand into sidebar space (no flex:1 without explicit max-width).`}}}if(s===void 0&&(A$(h,x),m&&typeof m=="object"&&typeof m.totalSections=="number"&&P$(h,x,m.totalSections)),s!==void 0&&m&&typeof m=="object"){let v=C$(h,x,s);if(v&&v.remaining>0){let w=v.missingIndices.length<=15?`[${v.missingIndices.join(",")}]`:`[${v.missingIndices.slice(0,10).join(",")}... +${v.missingIndices.length-10} more]`;m.fetchProgress=`Fetched ${v.fetched}/${v.total}. MISSING ${v.remaining} sections: ${w}. You MUST fetch ALL remaining sections before generating HTML. Do NOT stop early.`}else v&&v.remaining===0&&(m.fetchProgress=`ALL ${v.total} sections fetched. You can now generate the complete HTML.`)}return{content:[{type:"text",text:Xr(m,a)}]}}catch(f){let h=((d=f.response)==null?void 0:d.data)??(f==null?void 0:f.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(h)}]}}}};var L4=`
|
|
1289
1290
|
Extract SVG data from MasterGo design files. This tool retrieves the DSL from a design layer, finds all PATH nodes (typically inside INSTANCE/icon components), resolves their color references, and generates SVG markup strings.
|
|
1290
1291
|
You can provide either:
|
|
1291
1292
|
1. fileId and layerId directly, or
|
|
1292
1293
|
2. a short link (like https://{domain}/goto/LhGgBAK)
|
|
1293
1294
|
|
|
1294
1295
|
Pagination: When there are many icons, use the first call without "page" to get totalCount. Then call again with page=0, page=1, etc. (page starts at 0, pageSize defaults to 20, max 100). If hasMore is false, you've fetched all pages.
|
|
1295
|
-
`,
|
|
1296
|
+
`,wu=class extends ht{constructor(){super();this.description=L4;this.schema=Y.object({fileId:Y.string().optional().describe("MasterGo design file ID (format: file/<fileId> in MasterGo URL). Required if shortLink is not provided."),layerId:Y.string().optional().describe("Layer ID of the specific component or element to retrieve (format: ?layer_id=<layerId>). Required if shortLink is not provided."),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),shortLink:Y.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),backgroundColor:Y.string().optional().describe("Solid background color for the SVG (e.g. '#000000', 'black'). Useful for previewing white/light icons."),page:Y.number().int().min(0).optional().describe("Page number for pagination (starts at 0). Omit to get all SVGs at once. When provided, the response includes totalCount/hasMore/page/pageSize for you to iterate through all pages."),pageSize:Y.number().int().min(1).max(100).optional().describe("Number of SVGs per page (default 20, max 100). Only used when page is provided."),format:Yr()})}get name(){return kt("extractSvg")}async execute(n){var r;try{let{fileId:o,layerId:i,sourceLayerId:s,shortLink:a,backgroundColor:c,page:l,pageSize:p,format:d}=n;if(!a&&(!o||!i&&!s))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a shortLink");let f=this.normalizeFileId(o),h=i,y=s;if(a){let m=await ot.extractIdsFromUrl(a);f=this.normalizeFileId(m.fileId),h=m.layerId,y=m.sourceLayerId??s}let b=y||h;if(!f||!b)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");let x=await ot.extractSvg(f,b,c,l,p);return{content:[{type:"text",text:Xr(x,d)}]}}catch(o){let i=((r=o.response)==null?void 0:r.data)??(o==null?void 0:o.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(i)}]}}}};var ku=require("fs/promises"),G$=require("fs"),lr=Ee(require("path"));var D4=`
|
|
1296
1297
|
Finalize generated design code: replace ALL placeholders (SVG icons + long text) with real high-precision data from the design cache, then write the final file directly to disk.
|
|
1297
1298
|
|
|
1298
1299
|
WHAT it does:
|
|
@@ -1319,7 +1320,7 @@ You can provide either:
|
|
|
1319
1320
|
2. a short link (like https://{domain}/goto/LhGgBAK)
|
|
1320
1321
|
|
|
1321
1322
|
IMPORTANT: Call this tool with the COMPLETE code string. After the tool writes the file, you are DONE \u2014 do NOT output or edit the code further.
|
|
1322
|
-
`,xu=class extends ht{constructor(){super();this.name=w4;this.description=S4;this.schema=Y.object({fileId:Y.string().optional().describe("MasterGo design file ID. Required if shortLink is not provided. Must match the fileId used in getDesignSections."),layerId:Y.string().optional().describe("Root layer ID of the design. Required if shortLink is not provided. Must match the layerId used in getDesignSections."),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),shortLink:Y.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),code:Y.string().describe("The COMPLETE generated code containing @@SVG:{svgShortKey}@@ and/or T{sectionIndex}|{nodeId} placeholders."),outDir:Y.string().describe("Output directory where the final file will be written. The finalized code (with all placeholders replaced by real data) is written directly to this directory \u2014 do NOT re-output or edit the code after this tool runs. Example: '/Users/you/project/output' or './output'."),outputFileName:Y.string().optional().describe("Output file name (default: 'index.html'). Include extension. Example: 'snmp-agent.html'."),targetLang:Y.enum(["html","dart"]).optional().describe("Target language of the generated code, decides placeholder escaping. 'html' (default, also for Vue): SVG inserted as-is into element content, long text HTML-escaped. 'dart' (Flutter): SVG/text escaped for single-quoted string literals (SvgPicture.string('...'), Text('...')).")})}async execute(n){var r,o,i;try{let{fileId:s,layerId:a,sourceLayerId:c,shortLink:l,code:p,outDir:d,outputFileName:f,targetLang:h}=n;if(!l&&(!s||!a&&!c))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a shortLink");let y=this.normalizeFileId(s),v=a,x=c;if(l){let Ve=await ot.extractIdsFromUrl(l);y=this.normalizeFileId(Ve.fileId),v=Ve.layerId,x=Ve.sourceLayerId??c}let m=x||v;if(!y||!m)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");if(typeof p!="string"||!p.trim())throw new Error("code must be a non-empty string of the generated code");if(!d||!d.trim())throw new Error("outDir is required \u2014 the finalized code must be written directly to disk to prevent LLM re-processing");let b=await ot.applyDesign(p,y,m,x,h),w=b.patchedCode;if(typeof w!="string"||!w)throw new Error("Server did not return patchedCode. Check that frontend-mcp-server is up to date.");let k=ar.default.basename((f==null?void 0:f.trim())||"index.html"),E=ar.default.resolve(process.env.MG_OUTPUT_ROOT||process.cwd()),F=ar.default.isAbsolute(d)?ar.default.resolve(d):ar.default.resolve(E,d),j=ar.default.relative(E,F);if(j===".."||j.startsWith(".."+ar.default.sep)||ar.default.isAbsolute(j))throw new Error(`outDir "${d}" resolves outside the allowed output root (${E}). Use a path inside it, or set the MG_OUTPUT_ROOT environment variable to permit a different base.`);let me=F;(0,N$.existsSync)(me)||await(0,vu.mkdir)(me,{recursive:!0});let de=ar.default.join(me,k);await(0,vu.writeFile)(de,w,"utf8"),_$(y,m);let oe=b.report||{},Re={success:!0,filePath:de,fileName:k,report:oe};if(b.warning&&(Re.warning=b.warning),b.error&&(Re.error=b.error),!Re.warning){let Ve=(((r=oe.svgUnresolved)==null?void 0:r.length)||0)+(((o=oe.textUnresolved)==null?void 0:o.length)||0);Ve>0&&(Re.warning=`${Ve} placeholder(s) unresolved \u2014 check svgShortKey/text keys.`)}let bt=oe.fabricatedPaths??[];return!Re.error&&bt.length>0&&(Re.error=`${bt.length} fabricated path(s) detected \u2014 replace them with @@SVG:{svgShortKey}@@ placeholders and re-run.`),{content:[{type:"text",text:JSON.stringify(Re)}]}}catch(s){let a=((i=s.response)==null?void 0:i.data)??(s==null?void 0:s.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(a)}]}}}};var k4='\n## MasterGo Design DSL - Section-by-Section Workflow\n\n### Step 0: Get Layout Overview (MANDATORY)\nCall `mcp__getDesignSections` WITHOUT sectionIndex first.\nThe response contains `sections` array with `nodeCount` per section, `totalSections`, and `totalNodes`.\nEach `sections[]` entry ALSO carries a **page-absolute bounding box**: `x`, `y` (top-left corner relative to the root container\'s origin), `width`, `height`. This tells you exactly where each section sits on the canvas.\nUse this to understand the design scope before fetching details.\n\n`rootMetadata` (if present) provides the root layer\'s dimensions (width, height), name, type, and optional fill/styles. Use these as the page frame size and background.\n`splitContainers` (if present) lists containers that were too large and split into child sections. Each entry provides the container\'s name, type, id, x, y, width, height, layout properties (layoutMode, itemSpacing, padding), **and now a `background` color** (resolved hex/css value, e.g. `"#055DDC"`) plus `fill` reference (e.g. `"paint_1:4829"`). Use these to understand how the split sections should be arranged \u2014 they share the container\'s width, layout direction and spacing. IMPORTANT: sections from the same split container MUST share the container\'s width. Apply the container\'s `background` to the parent wrapper that encloses its child sections \u2014 this gives the container its correct visual background without each section needing to carry it.\n\n**Structure grouping** \u2014 Each section entry carries two fields to help you avoid redundant work:\n\n1. **`structureHash`** \u2014 structural fingerprint. Sections with identical hashes have the **exact same node-tree skeleton** (same type tree + layout attributes). Only **leaf values differ** (text, fill colors, icon paths). Fetch the DSL for the **first section in each hash group** and reuse its rendered structure for the rest \u2014 just swap in different text/color/icon values. Sections without a structureHash have unique structures and must be rendered individually.\n\n2. **`containerId`** \u2014 links to a `splitContainers` entry. All sections sharing a containerId inherit that container\'s width, flexDirection, gap, and padding. When wrapping these sections in a parent element, match the container\'s width and layout properties \u2014 don\'t repeat them on each child.\n\n### Step 1: Fetch Each Section DSL (MANDATORY - ALL N sections)\nFor i = 0 to N-1, call `mcp__getDesignSections` with `sectionIndex=i`.\nYou MUST call this tool N times. Do NOT skip any section.\nCRITICAL: Fetch sections in BATCHES of 3-5 at a time. Do NOT request all sections simultaneously \u2014 too many concurrent requests will cause timeouts. Send 3-5 sectionIndex calls, wait for all results, then send the next batch.\n\n### Step 2: Understand SVG Data Model (MANDATORY)\nAfter ALL N sections have been fetched, understand how icons work:\n\n**PATH Nodes \u2014 ALL carry a `svgShortKey` field:**\nEvery PATH node (icon) in the DSL has a `svgShortKey` field (e.g. `S0#0`) AND a `svgName` field (a semantic name like `\u901A\u7528/\u5237\u65B0`, `\u901A\u7528/\u5411\u5DE6`, `\u641C\u7D22`, `\u9F7F\u8F6E`). The actual SVG markup is NOT in the DSL \u2014 it lives in a server-side cache, retrieved at the end via `mcp__applyDesign`.\n\n**You do NOT copy SVG markup during code generation.** Instead:\n1. When you encounter a PATH node, note its `svgShortKey` (for the placeholder) AND its `svgName` (to understand WHAT icon it is and WHERE it should go).\n2. In your generated code, place a placeholder `@@SVG:{svgShortKey}@@` where the icon goes. Use `svgName` to match each icon to its correct UI position \u2014 e.g. an icon with `svgName: "\u901A\u7528/\u5411\u5DE6"` belongs in a collapse/fold button, not a "add" button.\n3. After the complete code is generated, call `mcp__applyDesign` \u2014 it replaces all placeholders with real high-precision SVG.\n\n**Why this design**: copying SVG path data through LLM generation causes precision loss (17.522848 \u2192 17.52), dropped subpaths, and shape corruption. The placeholder approach ensures path data never passes through generation \u2014 the server does deterministic string substitution.\n\n**CRITICAL \u2014 SVG UNIQUENESS:** Each PATH node has its OWN unique `svgShortKey` (e.g. `S0#1`, `S0#0`). NEVER reuse a svgShortKey from one PATH node for another \u2014 even if two icons look similar (e.g. two arrow icons), they are DIFFERENT vectors with DIFFERENT svgShortKeys. Always use the exact `svgShortKey` from the PATH node where the icon appears.\n\n**Text Data** \u2014 Long text (>50 chars) in the DSL appears as `T{sectionIndex}|{nodeId}` placeholders. These are automatically replaced by `mcp__applyDesign` server-side. Just leave the `T{si}|{nodeId}` placeholder in your code where the text should appear, and applyDesign will inject the real text.\n- Short text already inlined in the DSL (`node.text` / `dsl.rowTexts`) must be inserted VERBATIM \u2014 do NOT paraphrase, translate, summarize, or invent text.\n\n**`dsl.rowTexts`** \u2014 An array of `{text, parentType?, parentName?}` objects for all leaf TEXT values in this section, in tree order. Each item carries `parentType` and `parentName` to indicate which container the text belongs to (e.g. `{text: "8", parentType: "INSTANCE", parentName: "\u5220\u9664"}` means "8" is inside a delete button \u2014 it\'s a badge count, NOT an independent notification dot). Use parentType/parentName for context; do NOT reassign text to unrelated UI elements.\n\n### Step 3: Generate Complete Code\nAfter ALL N sections have been fetched:\n- MANDATORY: Use `rootContainer` from the section list response to create the root container div. Apply ALL its CSS properties (width, minHeight, background, overflow, position:relative) to a wrapping div. ALL sections MUST be placed inside this root container.\n- CRITICAL \u2014 Position each section ABSOLUTELY: every section entry has a page-absolute bbox (x, y, width, height) from Step 0. Wrap each section in a container with `position:absolute; left:{x}px; top:{y}px; width:{width}px` inside the root container. Do NOT reconstruct the page by stacking sections in a flex column with guessed `margin-top` / `gap` values. Many designs are spatially OVERLAID (status bar, title bar, form card, decorative curves, floating text, background layers) and only reconstruct correctly with absolute positioning.\n- CRITICAL \u2014 Overflow clipping: some design elements (brand logos, decorative shapes) are LARGER than their visible area \u2014 the design deliberately clips them via `overflow: hidden` on the parent. When a node\'s `layoutStyle.width/height` is smaller than its SVG content, you MUST preserve this clipping: set the parent container to the node\'s `layoutStyle` dimensions AND add `overflow: hidden`, then let the SVG render at its natural size inside. Do NOT shrink the SVG to fit the container (that distorts the logo) and do NOT enlarge the container (that breaks the layout).\n\n### Step 4: SVG Placeholder Workflow (FINAL step \u2014 MANDATORY)\nEvery icon in the design is a PATH node with a `svgShortKey`. The SVG markup is NOT in the DSL \u2014 you cannot copy it even if you wanted to. You MUST use placeholders.\n\n**During code generation** \u2014 wherever an icon/SVG should appear, place a placeholder `@@SVG:{svgShortKey}@@`:\n- Read the `svgShortKey` from the PATH node in the section DSL.\n- Place `@@SVG:` + that exact svgShortKey + `@@` where the icon goes.\n- **CRITICAL \u2014 Icon container sizing**: the placeholder MUST be placed inside a container whose width and height match the PATH node\'s `layoutStyle.width` and `layoutStyle.height`. The injected SVG uses `width="100%" height="100%"`, so it fills its direct parent. If you place it directly inside a large button container (e.g. 32\xD732px) instead of the icon\'s own size (e.g. 16\xD716px), the icon will render too large. Always wrap the placeholder in an element sized to the PATH node\'s dimensions:\n - **HTML/Vue**: `<span style="width:{layoutStyle.width}px;height:{layoutStyle.height}px;display:flex;align-items:center;justify-content:center">@@SVG:{svgShortKey}@@</span>`\n - **JSX/React**: `<span style={{width:\'{w}px\',height:\'{h}px\'}}>{/*@@SVG:{svgShortKey}@@*/}</span>`\n - **Flutter**: `SizedBox(width:{w},height:{h},child: SvgPicture.string(\'@@SVG:{svgShortKey}@@\'))`\n- Use `svgName` to match each icon to its correct UI position \u2014 e.g. an icon with `svgName: "\u901A\u7528/\u5411\u5DE6"` belongs in a collapse/fold button, not a "add" button.\n\n**After generating the COMPLETE code** \u2014 call `mcp__applyDesign` with the full code string AND an `outDir` parameter. The tool substitutes every `@@SVG:...@@` with the real high-precision `<svg>` markup from the cache (character-for-character exact, no rounding) AND writes the final file directly to disk. **You MUST provide `outDir`** \u2014 this writes the patched code to a file WITHOUT it passing back through your generation, preventing any re-processing or precision loss. After the tool writes the file, you are DONE \u2014 do NOT output, copy, or edit the code further.\n\n### Intra-Section Layout Rules (node-level positioning):\nEvery node in a section\'s DSL has TWO pieces of layout data:\n\n1. **`flexContainerInfo`** \u2014 If a node HAS this field, it is a flex container. Its direct children are laid out by flex rules, NOT by absolute positioning. Generate CSS: `display: flex; flex-direction: {flexDirection}; justify-content: {justifyContent}; align-items: {alignItems}; gap: {gap}; padding: {padding};`. Do NOT add `position: absolute` or `left/top` to flex container nodes or their direct children.\n\n2. **`layoutStyle.relativeX/relativeY`** \u2014 Use these ONLY for leaf/free nodes that are NOT inside a flex container. For those nodes, apply `position: absolute; left: {relativeX}px; top: {relativeY}px;`.\n\n3. **Nested flex containers** \u2014 A flex container can contain a child that is ALSO a flex container (e.g. a horizontal toolbar with a vertical menu inside). Each level independently uses its own `flexContainerInfo`. **You MUST preserve ALL nesting levels** \u2014 do NOT flatten a two-level flex structure into one. For example, a table header cell where "label + sort-icon" form an inner group and "action-icon" sits at the outer level MUST be rendered as TWO nested flex containers, not one flat flex with all three items side by side. Flattening loses the visual grouping (label+sort tightly paired, action-icon separated) and causes layout breakage.\n\n4. **When a child has `flexGrow` / `flexShrink`** \u2014 These are flex item properties. Apply `flex: {flexGrow} 1 0` on the child element. Do NOT position it absolutely.\n\n5. **CRITICAL \u2014 Flex column with fixed-height children**: When a container uses `flex-direction: column` with a FIXED height and `overflow: hidden`, ALL children with fixed heights (tabs, headers, pagination bars, footers, scrollbars) MUST have `flex-shrink: 0`. Only ONE child \u2014 the flexible content area (table body, scrollable region) \u2014 should use `flex: 1`. If you forget `flex-shrink: 0` on fixed-height children, flex layout will squeeze them out of the visible area and they get clipped by `overflow: hidden` (e.g. pagination bar becomes invisible).\n\n6. **CRITICAL \u2014 Nested FRAME dimensions and spacing**: When a FRAME contains child FRAMEs (e.g. a card panel with an inner content container), the outer element\'s width/height MUST come from the OUTER node\'s `layoutStyle.width/height` \u2014 NOT from the inner content container. A common error is using the inner container\'s width (e.g. 285px) for the card itself (which should be 317px). Always trace to the correct node: if the DSL shows `\u5BB9\u5668A (317\xD7107) > \u5BB9\u5668B (285\xD775, relativeX:16, relativeY:16)`, the rendered card is 317\xD7107 with 16px padding, and the content inside is 285\xD775.\n\n7. **CRITICAL \u2014 Precise vertical positioning inside cards**: Inside small fixed-height containers (stat cards, info panels, badge boxes), do NOT invent `gap` values. Use each child\'s `layoutStyle.relativeY` to position elements precisely. For example, if a card\'s DSL shows child A at `relativeY:0` and child B at `relativeY:32`, the vertical gap is 32px (minus child A\'s height) \u2014 NOT a guessed `gap:16px` or `gap:20px`. Inventing large gaps in small cards pushes content apart and breaks the compact layout. When `flexContainerInfo.gap` is present, use that exact value; when it is absent, use `relativeY` differences to calculate spacing.\n\n8. **CRITICAL \u2014 Overlapping elements in the same container (Switch toggle, icon badges, layered decorations)**: When a container holds multiple sibling elements that visually OVERLAP (one on top of another), the container MUST use `position: relative` and each child MUST use `position: absolute` with its own `layoutStyle.relativeX/relativeY`. Do NOT use `display: flex` on the container \u2014 flex will place the children SIDE BY SIDE instead of overlapping, shrinking them and destroying the composition. The canonical example is a Switch toggle: the DSL shows a track PATH (`relativeX:0, relativeY:0, w:40, h:24`) and a knob circle (`relativeX:17.5, relativeY:1.5, w:21, h:21`) as siblings. Generate EXACTLY this structure:\n```\n<div style="position:relative; width:40px; height:24px;">\n <div style="position:absolute; left:0px; top:0px;">@@SVG:{trackSvgKey}@@</div>\n <div style="position:absolute; left:17.5px; top:1.5px;">@@SVG:{knobSvgKey}@@</div>\n</div>\n```\nEach child\'s `left` and `top` come from that child\'s own `layoutStyle.relativeX` and `layoutStyle.relativeY`. Never use a shared `left:0; top:0` for all children. Never use flex.\n\n9. **Fallback** \u2014 Nodes with NEITHER `flexContainerInfo` NOR being inside a flex container: use `position: absolute; left: {relativeX}px; top: {relativeY}px;`.\n- Generate a single complete HTML file containing ALL sections in order, nested inside the root container.\n- token fields must be generated as CSS variables with comments indicating the token name.\n- If componentDocumentLinks exists, call mcp__getComponentLink to fetch documentation.\n- When splitContainers is present, sections that were split from the same container must share that container\'s width and be wrapped together. **Apply the container\'s `background` to the parent wrapper**: splitContainer entries now include `background` (resolved CSS color) and `fill` (paint reference).\n- CRITICAL \u2014 Table container boundary: when a design has a table (header + data rows), wrap the ENTIRE table area (header row + all data rows + any empty space below the last row down to the pagination) in a single container with the design\'s background color (usually white) and the table\'s border. The table may have only 1 data row but the container must extend to fill the design\'s allocated height \u2014 do NOT leave the area below the last row as page background showing through. The pagination bar sits BELOW this container as a sibling, not inside it.\n\n### Text Provenance Self-Check (MANDATORY before finalizing output):\n- Before writing the final HTML, enumerate every visible text string you plan to emit.\n- For EACH string, verify it exists in `rootMetadata.allTexts` (the section LIST response carries this closed-set whitelist of all text in the design) OR in some section\'s `dsl.rowTexts` / `node.text`.\n- Any string with NO provenance (typical offenders: fabricated column headers like "\u7528\u6237\u540D\u79F0/\u6240\u5C5E\u7EC4/\u8FDC\u7A0BIP", invented cell data like "1.1.3.543.4" or "AES-128", brand-watermark tokens like "Hillstone Design", generic menu labels not in the design) MUST be deleted or replaced with an empty placeholder.\n- If you find yourself generating MORE distinct text strings than `allTexts.length`, STOP and re-check \u2014 you are hallucinating.\n\n### Row Count Self-Check (MANDATORY for tables/lists):\n- For every table, list, or repeated-row section in your output, look up its `structureSiblingCount`. This field appears in BOTH the section list entry AND each section DSL response (top-level `structureSiblingCount`).\n- The number of data rows you render MUST equal `structureSiblingCount`. This is a hard constraint, not a suggestion.\n- `structureSiblingCount: 1` means render EXACTLY 1 data row. Do NOT add rows "for visual density", "to look complete", or "because a pagination label says \u517110\u9879". Pagination labels reflect a UI control state, NOT a data-row count \u2014 they must never inflate the row count.\n- Before outputting any table, verify: count your `<tr>` (data rows, excluding header) \u2192 it MUST equal `structureSiblingCount`. If you rendered more, delete the extras now.\n\n### Tool Selection Rules:\n- `mcp__getDesignSections` is the PRIMARY tool for full-page design-to-code generation. Always start here when you need to generate a complete HTML page from a design.\n- `mcp__extractSvg` is a STANDALONE tool. Use it DIRECTLY when you only need to extract SVG icons from a design \u2014 do NOT call `getDesignSections` before it.\n- `mcp__getDsl` is a FALLBACK \u2014 call it ONLY if `getDesignSections` returns an error (e.g. tool not available on older servers).\n- NEVER call both `getDesignSections` AND `getDsl` for the same design.\n- NEVER combine the section workflow with `extractSvg`. If you only need SVG icons, use `extractSvg` alone. If you need a full page, use the section workflow (which uses `@@SVG:{svgShortKey}@@` placeholders + `mcp__applyDesign` for SVG data).\n- The section workflow provides COMPLETE data. Do NOT call `getDsl` to "verify".\n\n### Output Format:\n- The design-data tools (`getDesignSections`, `getDsl`, `extractSvg`, `getMeta`) accept an optional `format` parameter: `json` (default), `yaml`, or `tree`. `yaml`/`tree` use fewer tokens for large designs; all three round-trip without data loss. Set a session-wide default with the `--format` CLI flag or `DEFAULT_FORMAT` env var.\n\n### Text Fidelity Rules:\n- TEXT nodes contain actual text in node.text array. Read EACH node\'s text and use it EXACTLY.\n- Do NOT duplicate text from one node to another \u2014 each TEXT node has unique content.\n- Do NOT skip any child nodes. Render ALL nodes: every tab, every button, every text element.\n\n### Background & Color Rules:\n- **PREFER the `_color` field**: every node with a resolved fill carries a `_color` field containing the computed CSS hex/rgb value. Use this value DIRECTLY in CSS \u2014 no styles-table lookup needed. Example: `color: #4E5969` from `"_color": "#4E5969"`.\n- The `fill` field (e.g. `paint_1:7200`) remains for reference. Use `_token` (e.g. `"Text/Text-4"`) for CSS variable naming like `var(--text-text-4, #4E5969)`.\n- If a node has both `_color` and `fill`, `_color` is authoritative for the visual color value.\n- The DSL `styles` map contains fill/stroke style definitions. Use the node\'s `fillStyleId`/`strokeStyleId` to look up the actual color from `styles`.\n- The root/frame node\'s background comes from its fill style. Do NOT invent gradient or solid backgrounds \u2014 use ONLY the colors from the DSL data.\n- If a node has no fill or the fill style is empty/transparent, do NOT add a background color. Leave it transparent or inherit from parent.\n- Status bar, title bar, and other container backgrounds MUST match the DSL fill data exactly.\n- **NEVER hardcode LLM-default colors** (e.g. `#1D2129`, `#000`, `#333`) when `_color` is present. The `_color` value is the design truth \u2014 copying it requires zero cognitive effort and zero styles-table lookup.\n- **CRITICAL \u2014 splitContainers[].background IS the exact CSS background-color.** Copy it verbatim: `background-color: <value>;`. MUST NOT add gradients, MUST NOT change the color. The designer chose this color deliberately.\n- **CRITICAL \u2014 OPACITY ON FRAME**: a FRAME\'s `opacity` field applies ONLY to its own background, NOT children. Use `background-color: rgba(R, G, B, <opacity>)` \u2014 NEVER use CSS `opacity: X` on the parent, which makes child text/icons translucent.\n- **CRITICAL \u2014 NEVER promote a child node\'s gradient/fill onto its parent container.** A gradient `linear-gradient(...)` in the DSL is computed against THAT node\'s own bounding box \u2014 its stop offsets (e.g. `#0063BA 83%`) are percentages of that specific node\'s height, NOT the parent\'s height. If you copy such a gradient onto a differently-sized parent (e.g. a 88px navbar that contains a 195px-tall decorative oval), the stops map to the WRONG size and the visible color shifts or disappears entirely (blue appears only in the bottom 15px, leaving the top transparent). Rules:\n - The background/fill of a node applies to THAT node\'s element only, at THAT node\'s size. Render each node at its own `layoutStyle.width/height`.\n - A FRAME/GROUP/INSTANCE with NO `_color`/`fill` (empty) has NO background \u2014 leave it transparent. Do NOT borrow a child\'s fill to fill the parent.\n - Decorative layers with `filter: blur(...)` (e.g. `filter: blur(81.6px)`) or very low alpha (`rgba(..., 0.0x)`) are visual overlay accents (glow, bloom), NOT the container\'s base background. Keep them as positioned overlays inside the container \u2014 never extract their gradient as the container background.\n - If a container (navbar, card, header) needs a solid base background that the DSL doesn\'t directly provide on the FRAME node, derive it from the dominant opaque color among its children (e.g. the most common solid `_color`), not from a decorative gradient overlay.\n\n### Anti-Hallucination Rules:\n- You MUST use EXACT text content from the DSL data. NEVER invent, translate, or paraphrase text.\n- If a section has empty or missing text data, render it as an empty placeholder \u2014 do NOT fabricate text.\n- NEVER generate placeholder values, generic tags, fabricated amounts, or invented statistics.\n- Every piece of text, every number, every label in your output MUST come directly from the DSL data.\n- NEVER fabricate SVG path data for icons or vector shapes \u2014 use `@@SVG:{svgShortKey}@@` placeholders for ALL icons, then call `mcp__applyDesign`.\n- NEVER fabricate background colors, gradients, or decorations that are not present in the DSL data.\n\n### Empty Design Tolerance Rules (CLOSED-SET TEXT):\n- Many designs are UNFINISHED wireframes or component-library showcases with sparse text. This is NORMAL, not missing data.\n- The ONLY allowed text strings in your output are those present in `dsl.rowTexts` or `node.text` of some fetched section. The section list response carries `rootMetadata.allTexts` \u2014 the complete closed set of text strings in this design. Treat it as a whitelist: any string NOT in allTexts is a hallucination and MUST be removed.\n- Sparse text is especially common when the design reuses a component library: the design itself may have only ~10 distinct text strings total, even though the rendered page looks dense. Do NOT infer more content from visual density or the page\'s apparent purpose.\n- If a section has `textTotal=0` or empty `rowTexts`, render its STRUCTURE with EMPTY placeholders (`<td></td>`, blank labels, empty menu items) \u2014 do NOT invent column headers, menu item labels, IP addresses, algorithm names, or any data values to fill it.\n- A table with 1 data row in the DSL renders as 1 data row in HTML. Do NOT pad with fabricated rows. Pagination labels like "\u5171 10 \u9879" reflect a UI control state, NOT a data-row count \u2014 never synthesize rows to match them.\n- Brand-name leakage is forbidden: do NOT generate library/watermark tokens (e.g. "Hillstone Design", "Ant Design", "Material UI") even if they appear in component node names or you recognize the brand from training data. Only render text that appears in the design\'s own TEXT nodes.\n- When in doubt about whether a text string is real: it is NOT real unless you can cite the sectionIndex it came from.\n\n### SVG Icon Anti-Simplification Rules:\n- PATH nodes carry a `svgKey` \u2014 the SVG markup is injected by `mcp__applyDesign` at the end. You MUST use `@@SVG:{svgShortKey}@@` placeholders \u2014 never hand-write `<path d="...">`.\n- **SVG UNIQUENESS:** Each icon in the DSL is a distinct design artifact \u2014 different sections may have DIFFERENT icons even if they look similar (e.g. "\u641C\u7D22" in section 2 vs "\u641C\u7D22" in section 40 are DIFFERENT SVGs). NEVER reuse a `svgShortKey` from one section in another. Always use the exact `svgKey` from the PATH node in its own section.\n- **NEVER substitute vector paths with simplified shapes** \u2014 a `<path>` containing a house icon is NOT replaceable by a `<rect>` + `<polygon>`. The designer chose every anchor point; your simplified version WILL look different.\n- **VERIFY after copying each SVG**: count the number of `M` characters in the source path `d` attribute. Your copy MUST have exactly the same count. Fewer `M` \u2192 you corrupted the icon \u2192 redo.\n- **SHAPE CHECK**: if the source uses `<path>`, your output MUST use `<path>`. NOT `<rect>`, NOT `<circle>`, NOT `<ellipse>`. Shape type changes ARE visual changes.\n- The only acceptable SVG operation is: copy the complete `<svg>...</svg>` block from the DSL data and paste it into your HTML. Nothing else.\n- **Common failure pattern**: you saw a complex path and thought "this looks roughly like 4 rectangles" \u2192 you drew 4 `<rect>`s \u2192 the result is visually WRONG. The designer chose a vector path for a reason. Trust the data.\n- **COMPOSITE ICONS (logos, multi-subpath marks):** when a logo/brand mark is split into multiple sub-paths and stripped to svgCache, the SVG that `mcp__applyDesign` injects for the `@@SVG:{svgShortKey}@@` placeholder is the complete `<svg>...</svg>`. Keep it whole. The node\'s `relativeX`/`relativeY` are canvas placement coordinates \u2014 they are NOT to be reused as `transform="translate(x,y) scale(...)"` inside a hand-assembled `<svg>`. Doing so warps the glyph out of its viewBox.\n\n### INSTANCE Variant State Rules:\n- INSTANCE nodes may carry a **`_variantProps`** object with semantic state labels extracted from component variant properties (e.g. `{"\u72B6\u6001": "\u9009\u4E2D", "\u5206\u7C7B": "\u5E7D\u7075\u6309\u94AE", "\u5C3A\u5BF8": "24"}`).\n- **Active/selected state**: compare `_variantProps` across sibling INSTANCE nodes to find which one has `"\u72B6\u6001": "\u9009\u4E2D"` or similar active-state values. Apply the `.active` CSS class ONLY to that node \u2014 NEVER default to the first item in a list.\n- **Sidebar menu items**: each menu item (e.g. 22 submenu entries) is a separate section containing an INSTANCE with `_variantProps`. The item with `"\u72B6\u6001": "\u9009\u4E2D"` in its `_variantProps` is the currently active page \u2014 the corresponding section\'s `rowTexts[0]` (or TEXT child) is its label. Render this item with `class="submenu-item active"`.\n- **Button states**: `"\u5206\u7C7B": "\u5E7D\u7075\u6309\u94AE"` vs `"\u5206\u7C7B": "\u4E3B\u8981\u6309\u94AE"` determines the button\'s visual style (outline vs filled). Multiple buttons in the same toolbar may have different variant props \u2014 respect each one individually.\n- If `_variantProps` is absent from all siblings, assume all are in `default` state \u2014 do NOT invent active states.\n\n### Repeat / Row-Count Rules:\n- Each section entry carries `structureSiblingCount` = the exact number of times this structure appears in the design.\n- For data/table sections: the number of rendered rows MUST equal `structureSiblingCount`. A count of 1 means ONE row total \u2014 do not pad with fabricated rows "for visual density" or "to fill the table". The single row in the DSL IS the complete dataset.\n- For `structureSiblingCount >= 2`: reuse the `structureHash` template, render exactly that many instances, swap per-instance text/colors from each section\'s own data.\n- Pagination controls, "load more" buttons, and empty-state rows are CONTROLS, not data rows \u2014 never counted toward the dataset.\n\n### Placeholder Text Rules:\n- TEXT nodes may carry `_placeholder: true`. This flag marks text whose node name equals its content \u2014 the universal signature of component-library placeholder text (the slot name WAS the placeholder string, e.g. `{name: "Hillstone Design", text: "Hillstone Design"}`). This works across ALL component libraries without brand-specific tokens.\n- `_placeholder: true` is a HINT, not a deletion. Read the surrounding context: if the flagged text does not map to a real column header, label, or content slot in this specific design, treat it as boilerplate and omit it. If it does map to real content, render it normally.\n- Never blanket-render every `_placeholder` text as visible headers/columns.\n\n### Data Completeness Rules:\n- You MUST fetch ALL sections (0..totalSections-1). If totalSections=48, you must call sectionIndex=0 through 47 \u2014 no exceptions.\n- Some sections may have nodeCount=3 and no visible TEXT nodes (text is in component property overrides). Do NOT skip them \u2014 the TEXT is resolved during DSL transfer. These sections contribute real content.\n- **textPreview**: each section list entry carries a `textPreview` field (first TEXT node found, truncated to 20 chars). If two sections both have nodeCount=3 and empty name, use `textPreview` to tell them apart \u2014 they are different menu items (e.g. "\u7CFB\u7EDF\u4FE1\u606F" / "\u6743\u9650\u8BBE\u7F6E"), NOT duplicates.\n- Keep a checklist: track which section indices have been requested. Do not stop until every index 0..N-1 has been fetched.\n- If you accidentally skipped a section, go back and request the missing indices. An incomplete section set WILL cause missing content in the final HTML.\n\n\n\n### Critical Rendering Checklist (MANDATORY \u2014 verify each item before finalizing):\nBefore declaring the HTML complete, enumerate every structural element below and confirm it is rendered. Missing ANY item is a fidelity defect.\n\n1. **Sidebar menu item icons**: each sidebar menu section carries a PATH icon with a `svgKey`. Did you place `@@SVG:{svgShortKey}@@` for each? If you used a `<rect>` or `<circle>` or hand-wrote `<path d="...">`, DELETE it \u2014 the DSL does NOT contain path data. Use the placeholder.\n\n2. **Table header column icons** (sort/filter/search): each table header cell may carry sort-arrow, filter-funnel, and search-lens PATH icons. Did you place `@@SVG:{svgShortKey}@@` for each? If a header cell has no icons, you may have skipped them.\n\n3. **Pagination icons** (refresh, prev/next arrows, dropdown): the pagination section has MULTIPLE PATH icons. Did you place `@@SVG:{svgShortKey}@@` for EACH one?\n\n4. **Brand/logo area text**: the brand section has a TEXT node with the actual brand name (present in `allTexts`). Did you render it as visible text?\n\n5. **Every PATH node has a placeholder**: walk through every section\'s DSL \u2014 every PATH node must have a corresponding `@@SVG:{svgShortKey}@@` in your code. Count: the number of `@@SVG:` placeholders in your code MUST equal the total number of PATH nodes across all sections.\n\n6. **Text provenance**: every text string in your output MUST be traceable to `rootMetadata.allTexts` or a section\'s `dsl.rowTexts`/`node.text`. If you cannot cite the exact source, the text is a hallucination \u2014 delete it.\n\n7. **SVG placeholder replacement (HARD GATE)**: your HTML is INVALID and must NOT be output until you have called `mcp__applyDesign` with the complete code and used the returned `patchedCode`. This is not optional \u2014 it is the FINAL mandatory step. If you wrote ANY `<path d="...">` by hand instead of using `@@SVG:{svgShortKey}@@` placeholders, the `mcp__applyDesign` tool will detect it as a FABRICATED path and return an error. You MUST then replace those hand-written paths with placeholders and call `mcp__applyDesign` again. The ONLY acceptable output is the `patchedCode` returned by `mcp__applyDesign` \u2014 never your pre-replacement code.\n\nIf any item above is unchecked, your HTML is INCOMPLETE. Fix it before outputting.\n\n### Data Interpretation Rules:\n- Pagination/table-footer labels (e.g. "\u5171 10 \u9879", "X rows/page", "items per page") reflect UI control state \u2014 NOT data to replicate.\n- "\u5171 X \u9879" is the pagination widget showing "total X items". The actual data rows come from the table body sections (preceding the pagination section).\n- Do NOT fabricate data rows based on pagination "total" values. Render ONLY the actual data rows present in the DSL.\n- If the DSL contains 1 data row, output exactly 1 table row. Do NOT multiply rows to match a pagination label.\n- **CRITICAL \u2014 SVG icons for table actions**: table action columns (\u64CD\u4F5C\u5217) use PATH icon nodes with `svgShortKey` fields. Place `@@SVG:{svgShortKey}@@` for each action button. NEVER render action buttons as `<p>\u7F16\u8F91</p>` or `<p>\u5220\u9664</p>` plain text or hand-drawn shapes.\n- **CRITICAL \u2014 Persistent sidebars**: render all sidebar levels as static visible columns positioned via splitContainers coordinates. Do NOT hide or toggle sidebar levels.\n- **CRITICAL \u2014 NEVER reuse an SVG from one section in another**: each icon position has its OWN `svgShortKey` (e.g. `S0#5`) in the DSL. A collapse/fold button icon is a DIFFERENT vector from a menu navigation arrow even if both look like arrows. You MUST use the exact `svgShortKey` from the PATH node where the icon appears \u2014 never use a svgShortKey from a different PATH node.\n';function T4(){let{token:t,baseUrl:e,rules:n,debug:r,noRule:o,proxy:i,format:s}=hE();if(s!==void 0){let c=iu(s);c?process.env.DEFAULT_FORMAT=c:console.warn(`Invalid --format value: "${s}". Must be one of: json, yaml, tree. Falling back to json.`)}if(r){process.env.DEBUG="true",console.log("Debug information:"),console.log(`Token: ${t?"set":"not set"}`),console.log(`API URL: ${e||"default"}`),console.log(`Rules: ${n.length>0?n.join(", "):"none"}`),console.log(`No Rule: ${o?"enabled":"disabled"}`),console.log(`Proxy: ${i||"none"}`);let c=Xl();console.log(`Custom Headers: ${Object.keys(c).length>0?JSON.stringify(mE(c)):"none"}`),console.log(`Format: ${process.env.DEFAULT_FORMAT||"json (default)"}`),console.log("Debug mode: enabled")}let a=new vl({name:"MasterGoMcpServer",version:Yi.version},{instructions:k4});new hu().register(a),new gu().register(a),new au().register(a),new lu().register(a),new uu().register(a),new pu().register(a),new du().register(a),new fu().register(a),new mu().register(a),new yu().register(a),new xu().register(a),a.connect(new _l)}T4();
|
|
1323
|
+
`,Su=class extends ht{constructor(){super();this.description=D4;this.schema=Y.object({fileId:Y.string().optional().describe("MasterGo design file ID. Required if shortLink is not provided. Must match the fileId used in getDesignSections."),layerId:Y.string().optional().describe("Root layer ID of the design. Required if shortLink is not provided. Must match the layerId used in getDesignSections."),sourceLayerId:Y.string().optional().describe("Source layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries."),shortLink:Y.string().optional().describe("Short link (like https://{domain}/goto/LhGgBAK)."),code:Y.string().describe("The COMPLETE generated code containing @@SVG:{svgShortKey}@@ and/or T{sectionIndex}|{nodeId} placeholders."),outDir:Y.string().describe("Output directory where the final file will be written. The finalized code (with all placeholders replaced by real data) is written directly to this directory \u2014 do NOT re-output or edit the code after this tool runs. Example: '/Users/you/project/output' or './output'."),outputFileName:Y.string().optional().describe("Output file name (default: 'index.html'). Include extension. Example: 'snmp-agent.html'."),targetLang:Y.enum(["html","dart"]).optional().describe("Target language of the generated code, decides placeholder escaping. 'html' (default, also for Vue): SVG inserted as-is into element content, long text HTML-escaped. 'dart' (Flutter): SVG/text escaped for single-quoted string literals (SvgPicture.string('...'), Text('...')).")})}get name(){return kt("applyDesign")}async execute(n){var r,o,i;try{let{fileId:s,layerId:a,sourceLayerId:c,shortLink:l,code:p,outDir:d,outputFileName:f,targetLang:h}=n;if(!l&&(!s||!a&&!c))throw new Error("Either provide fileId with layerId (or sourceLayerId), or provide a shortLink");let y=this.normalizeFileId(s),b=a,x=c;if(l){let Ve=await ot.extractIdsFromUrl(l);y=this.normalizeFileId(Ve.fileId),b=Ve.layerId,x=Ve.sourceLayerId??c}let m=x||b;if(!y||!m)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");if(typeof p!="string"||!p.trim())throw new Error("code must be a non-empty string of the generated code");if(!d||!d.trim())throw new Error("outDir is required \u2014 the finalized code must be written directly to disk to prevent LLM re-processing");let v=await ot.applyDesign(p,y,m,x,h),w=v.patchedCode;if(typeof w!="string"||!w)throw new Error("Server did not return patchedCode. Check that frontend-mcp-server is up to date.");let k=lr.default.basename((f==null?void 0:f.trim())||"index.html"),E=lr.default.resolve(process.env.MG_OUTPUT_ROOT||process.cwd()),F=lr.default.isAbsolute(d)?lr.default.resolve(d):lr.default.resolve(E,d),j=lr.default.relative(E,F);if(j===".."||j.startsWith(".."+lr.default.sep)||lr.default.isAbsolute(j))throw new Error(`outDir "${d}" resolves outside the allowed output root (${E}). Use a path inside it, or set the MG_OUTPUT_ROOT environment variable to permit a different base.`);let me=F;(0,G$.existsSync)(me)||await(0,ku.mkdir)(me,{recursive:!0});let de=lr.default.join(me,k);await(0,ku.writeFile)(de,w,"utf8"),I$(y,m);let oe=v.report||{},Re={success:!0,filePath:de,fileName:k,report:oe};if(v.warning&&(Re.warning=v.warning),v.error&&(Re.error=v.error),!Re.warning){let Ve=(((r=oe.svgUnresolved)==null?void 0:r.length)||0)+(((o=oe.textUnresolved)==null?void 0:o.length)||0);Ve>0&&(Re.warning=`${Ve} placeholder(s) unresolved \u2014 check svgShortKey/text keys.`)}let bt=oe.fabricatedPaths??[];return!Re.error&&bt.length>0&&(Re.error=`${bt.length} fabricated path(s) detected \u2014 replace them with @@SVG:{svgShortKey}@@ placeholders and re-run.`),{content:[{type:"text",text:JSON.stringify(Re)}]}}catch(s){let a=((i=s.response)==null?void 0:i.data)??(s==null?void 0:s.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(a)}]}}}};var M4='\n## MasterGo Design DSL - Section-by-Section Workflow\n\n### Step 0: Get Layout Overview (MANDATORY)\nCall `mcp__getDesignSections` WITHOUT sectionIndex first.\nThe response contains `sections` array with `nodeCount` per section, `totalSections`, and `totalNodes`.\nEach `sections[]` entry ALSO carries a **page-absolute bounding box**: `x`, `y` (top-left corner relative to the root container\'s origin), `width`, `height`. This tells you exactly where each section sits on the canvas.\nUse this to understand the design scope before fetching details.\n\n`rootMetadata` (if present) provides the root layer\'s dimensions (width, height), name, type, and optional fill/styles. Use these as the page frame size and background.\n`splitContainers` (if present) lists containers that were too large and split into child sections. Each entry provides the container\'s name, type, id, x, y, width, height, layout properties (layoutMode, itemSpacing, padding), **and now a `background` color** (resolved hex/css value, e.g. `"#055DDC"`) plus `fill` reference (e.g. `"paint_1:4829"`). Use these to understand how the split sections should be arranged \u2014 they share the container\'s width, layout direction and spacing. IMPORTANT: sections from the same split container MUST share the container\'s width. Apply the container\'s `background` to the parent wrapper that encloses its child sections \u2014 this gives the container its correct visual background without each section needing to carry it.\n\n**Structure grouping** \u2014 Each section entry carries two fields to help you avoid redundant work:\n\n1. **`structureHash`** \u2014 structural fingerprint. Sections with identical hashes have the **exact same node-tree skeleton** (same type tree + layout attributes). Only **leaf values differ** (text, fill colors, icon paths). Fetch the DSL for the **first section in each hash group** and reuse its rendered structure for the rest \u2014 just swap in different text/color/icon values. Sections without a structureHash have unique structures and must be rendered individually.\n\n2. **`containerId`** \u2014 links to a `splitContainers` entry. All sections sharing a containerId inherit that container\'s width, flexDirection, gap, and padding. When wrapping these sections in a parent element, match the container\'s width and layout properties \u2014 don\'t repeat them on each child.\n\n### Step 1: Fetch Each Section DSL (MANDATORY - ALL N sections)\nFor i = 0 to N-1, call `mcp__getDesignSections` with `sectionIndex=i`.\nYou MUST call this tool N times. Do NOT skip any section.\nCRITICAL: Fetch sections in BATCHES of 3-5 at a time. Do NOT request all sections simultaneously \u2014 too many concurrent requests will cause timeouts. Send 3-5 sectionIndex calls, wait for all results, then send the next batch.\n\n### Step 2: Understand SVG Data Model (MANDATORY)\nAfter ALL N sections have been fetched, understand how icons work:\n\n**PATH Nodes \u2014 ALL carry a `svgShortKey` field:**\nEvery PATH node (icon) in the DSL has a `svgShortKey` field (e.g. `S0#0`) AND a `svgName` field (a semantic name like `\u901A\u7528/\u5237\u65B0`, `\u901A\u7528/\u5411\u5DE6`, `\u641C\u7D22`, `\u9F7F\u8F6E`). The actual SVG markup is NOT in the DSL \u2014 it lives in a server-side cache, retrieved at the end via `mcp__applyDesign`.\n\n**You do NOT copy SVG markup during code generation.** Instead:\n1. When you encounter a PATH node, note its `svgShortKey` (for the placeholder) AND its `svgName` (to understand WHAT icon it is and WHERE it should go).\n2. In your generated code, place a placeholder `@@SVG:{svgShortKey}@@` where the icon goes. Use `svgName` to match each icon to its correct UI position \u2014 e.g. an icon with `svgName: "\u901A\u7528/\u5411\u5DE6"` belongs in a collapse/fold button, not a "add" button.\n3. After the complete code is generated, call `mcp__applyDesign` \u2014 it replaces all placeholders with real high-precision SVG.\n\n**Why this design**: copying SVG path data through LLM generation causes precision loss (17.522848 \u2192 17.52), dropped subpaths, and shape corruption. The placeholder approach ensures path data never passes through generation \u2014 the server does deterministic string substitution.\n\n**CRITICAL \u2014 SVG UNIQUENESS:** Each PATH node has its OWN unique `svgShortKey` (e.g. `S0#1`, `S0#0`). NEVER reuse a svgShortKey from one PATH node for another \u2014 even if two icons look similar (e.g. two arrow icons), they are DIFFERENT vectors with DIFFERENT svgShortKeys. Always use the exact `svgShortKey` from the PATH node where the icon appears.\n\n**Text Data** \u2014 Long text (>50 chars) in the DSL appears as `T{sectionIndex}|{nodeId}` placeholders. These are automatically replaced by `mcp__applyDesign` server-side. Just leave the `T{si}|{nodeId}` placeholder in your code where the text should appear, and applyDesign will inject the real text.\n- Short text already inlined in the DSL (`node.text` / `dsl.rowTexts`) must be inserted VERBATIM \u2014 do NOT paraphrase, translate, summarize, or invent text.\n\n**`dsl.rowTexts`** \u2014 An array of `{text, parentType?, parentName?}` objects for all leaf TEXT values in this section, in tree order. Each item carries `parentType` and `parentName` to indicate which container the text belongs to (e.g. `{text: "8", parentType: "INSTANCE", parentName: "\u5220\u9664"}` means "8" is inside a delete button \u2014 it\'s a badge count, NOT an independent notification dot). Use parentType/parentName for context; do NOT reassign text to unrelated UI elements.\n\n### Step 3: Generate Complete Code\nAfter ALL N sections have been fetched:\n- MANDATORY: Use `rootContainer` from the section list response to create the root container div. Apply ALL its CSS properties (width, minHeight, background, overflow, position:relative) to a wrapping div. ALL sections MUST be placed inside this root container.\n- CRITICAL \u2014 Position each section ABSOLUTELY: every section entry has a page-absolute bbox (x, y, width, height) from Step 0. Wrap each section in a container with `position:absolute; left:{x}px; top:{y}px; width:{width}px` inside the root container. Do NOT reconstruct the page by stacking sections in a flex column with guessed `margin-top` / `gap` values. Many designs are spatially OVERLAID (status bar, title bar, form card, decorative curves, floating text, background layers) and only reconstruct correctly with absolute positioning.\n- CRITICAL \u2014 Overflow clipping: some design elements (brand logos, decorative shapes) are LARGER than their visible area \u2014 the design deliberately clips them via `overflow: hidden` on the parent. When a node\'s `layoutStyle.width/height` is smaller than its SVG content, you MUST preserve this clipping: set the parent container to the node\'s `layoutStyle` dimensions AND add `overflow: hidden`, then let the SVG render at its natural size inside. Do NOT shrink the SVG to fit the container (that distorts the logo) and do NOT enlarge the container (that breaks the layout).\n\n### Step 4: SVG Placeholder Workflow (FINAL step \u2014 MANDATORY)\nEvery icon in the design is a PATH node with a `svgShortKey`. The SVG markup is NOT in the DSL \u2014 you cannot copy it even if you wanted to. You MUST use placeholders.\n\n**During code generation** \u2014 wherever an icon/SVG should appear, place a placeholder `@@SVG:{svgShortKey}@@`:\n- Read the `svgShortKey` from the PATH node in the section DSL.\n- Place `@@SVG:` + that exact svgShortKey + `@@` where the icon goes.\n- **CRITICAL \u2014 Icon container sizing**: the placeholder MUST be placed inside a container whose width and height match the PATH node\'s `layoutStyle.width` and `layoutStyle.height`. The injected SVG uses `width="100%" height="100%"`, so it fills its direct parent. If you place it directly inside a large button container (e.g. 32\xD732px) instead of the icon\'s own size (e.g. 16\xD716px), the icon will render too large. Always wrap the placeholder in an element sized to the PATH node\'s dimensions:\n - **HTML/Vue**: `<span style="width:{layoutStyle.width}px;height:{layoutStyle.height}px;display:flex;align-items:center;justify-content:center">@@SVG:{svgShortKey}@@</span>`\n - **JSX/React**: `<span style={{width:\'{w}px\',height:\'{h}px\'}}>{/*@@SVG:{svgShortKey}@@*/}</span>`\n - **Flutter**: `SizedBox(width:{w},height:{h},child: SvgPicture.string(\'@@SVG:{svgShortKey}@@\'))`\n- Use `svgName` to match each icon to its correct UI position \u2014 e.g. an icon with `svgName: "\u901A\u7528/\u5411\u5DE6"` belongs in a collapse/fold button, not a "add" button.\n\n**After generating the COMPLETE code** \u2014 call `mcp__applyDesign` with the full code string AND an `outDir` parameter. The tool substitutes every `@@SVG:...@@` with the real high-precision `<svg>` markup from the cache (character-for-character exact, no rounding) AND writes the final file directly to disk. **You MUST provide `outDir`** \u2014 this writes the patched code to a file WITHOUT it passing back through your generation, preventing any re-processing or precision loss. After the tool writes the file, you are DONE \u2014 do NOT output, copy, or edit the code further.\n\n### Intra-Section Layout Rules (node-level positioning):\nEvery node in a section\'s DSL has TWO pieces of layout data:\n\n1. **`flexContainerInfo`** \u2014 If a node HAS this field, it is a flex container. Its direct children are laid out by flex rules, NOT by absolute positioning. Generate CSS: `display: flex; flex-direction: {flexDirection}; justify-content: {justifyContent}; align-items: {alignItems}; gap: {gap}; padding: {padding};`. Do NOT add `position: absolute` or `left/top` to flex container nodes or their direct children.\n\n2. **`layoutStyle.relativeX/relativeY`** \u2014 Use these ONLY for leaf/free nodes that are NOT inside a flex container. For those nodes, apply `position: absolute; left: {relativeX}px; top: {relativeY}px;`.\n\n3. **Nested flex containers** \u2014 A flex container can contain a child that is ALSO a flex container (e.g. a horizontal toolbar with a vertical menu inside). Each level independently uses its own `flexContainerInfo`. **You MUST preserve ALL nesting levels** \u2014 do NOT flatten a two-level flex structure into one. For example, a table header cell where "label + sort-icon" form an inner group and "action-icon" sits at the outer level MUST be rendered as TWO nested flex containers, not one flat flex with all three items side by side. Flattening loses the visual grouping (label+sort tightly paired, action-icon separated) and causes layout breakage.\n\n4. **When a child has `flexGrow` / `flexShrink`** \u2014 These are flex item properties. Apply `flex: {flexGrow} 1 0` on the child element. Do NOT position it absolutely.\n\n5. **CRITICAL \u2014 Flex column with fixed-height children**: When a container uses `flex-direction: column` with a FIXED height and `overflow: hidden`, ALL children with fixed heights (tabs, headers, pagination bars, footers, scrollbars) MUST have `flex-shrink: 0`. Only ONE child \u2014 the flexible content area (table body, scrollable region) \u2014 should use `flex: 1`. If you forget `flex-shrink: 0` on fixed-height children, flex layout will squeeze them out of the visible area and they get clipped by `overflow: hidden` (e.g. pagination bar becomes invisible).\n\n6. **CRITICAL \u2014 Nested FRAME dimensions and spacing**: When a FRAME contains child FRAMEs (e.g. a card panel with an inner content container), the outer element\'s width/height MUST come from the OUTER node\'s `layoutStyle.width/height` \u2014 NOT from the inner content container. A common error is using the inner container\'s width (e.g. 285px) for the card itself (which should be 317px). Always trace to the correct node: if the DSL shows `\u5BB9\u5668A (317\xD7107) > \u5BB9\u5668B (285\xD775, relativeX:16, relativeY:16)`, the rendered card is 317\xD7107 with 16px padding, and the content inside is 285\xD775.\n\n7. **CRITICAL \u2014 Precise vertical positioning inside cards**: Inside small fixed-height containers (stat cards, info panels, badge boxes), do NOT invent `gap` values. Use each child\'s `layoutStyle.relativeY` to position elements precisely. For example, if a card\'s DSL shows child A at `relativeY:0` and child B at `relativeY:32`, the vertical gap is 32px (minus child A\'s height) \u2014 NOT a guessed `gap:16px` or `gap:20px`. Inventing large gaps in small cards pushes content apart and breaks the compact layout. When `flexContainerInfo.gap` is present, use that exact value; when it is absent, use `relativeY` differences to calculate spacing.\n\n8. **CRITICAL \u2014 Overlapping elements in the same container (Switch toggle, icon badges, layered decorations)**: When a container holds multiple sibling elements that visually OVERLAP (one on top of another), the container MUST use `position: relative` and each child MUST use `position: absolute` with its own `layoutStyle.relativeX/relativeY`. Do NOT use `display: flex` on the container \u2014 flex will place the children SIDE BY SIDE instead of overlapping, shrinking them and destroying the composition. The canonical example is a Switch toggle: the DSL shows a track PATH (`relativeX:0, relativeY:0, w:40, h:24`) and a knob circle (`relativeX:17.5, relativeY:1.5, w:21, h:21`) as siblings. Generate EXACTLY this structure:\n```\n<div style="position:relative; width:40px; height:24px;">\n <div style="position:absolute; left:0px; top:0px;">@@SVG:{trackSvgKey}@@</div>\n <div style="position:absolute; left:17.5px; top:1.5px;">@@SVG:{knobSvgKey}@@</div>\n</div>\n```\nEach child\'s `left` and `top` come from that child\'s own `layoutStyle.relativeX` and `layoutStyle.relativeY`. Never use a shared `left:0; top:0` for all children. Never use flex.\n\n9. **Fallback** \u2014 Nodes with NEITHER `flexContainerInfo` NOR being inside a flex container: use `position: absolute; left: {relativeX}px; top: {relativeY}px;`.\n- Generate a single complete HTML file containing ALL sections in order, nested inside the root container.\n- token fields must be generated as CSS variables with comments indicating the token name.\n- If componentDocumentLinks exists, call mcp__getComponentLink to fetch documentation.\n- When splitContainers is present, sections that were split from the same container must share that container\'s width and be wrapped together. **Apply the container\'s `background` to the parent wrapper**: splitContainer entries now include `background` (resolved CSS color) and `fill` (paint reference).\n- CRITICAL \u2014 Table container boundary: when a design has a table (header + data rows), wrap the ENTIRE table area (header row + all data rows + any empty space below the last row down to the pagination) in a single container with the design\'s background color (usually white) and the table\'s border. The table may have only 1 data row but the container must extend to fill the design\'s allocated height \u2014 do NOT leave the area below the last row as page background showing through. The pagination bar sits BELOW this container as a sibling, not inside it.\n\n### Text Provenance Self-Check (MANDATORY before finalizing output):\n- Before writing the final HTML, enumerate every visible text string you plan to emit.\n- For EACH string, verify it exists in `rootMetadata.allTexts` (the section LIST response carries this closed-set whitelist of all text in the design) OR in some section\'s `dsl.rowTexts` / `node.text`.\n- Any string with NO provenance (typical offenders: fabricated column headers like "\u7528\u6237\u540D\u79F0/\u6240\u5C5E\u7EC4/\u8FDC\u7A0BIP", invented cell data like "1.1.3.543.4" or "AES-128", brand-watermark tokens like "Hillstone Design", generic menu labels not in the design) MUST be deleted or replaced with an empty placeholder.\n- If you find yourself generating MORE distinct text strings than `allTexts.length`, STOP and re-check \u2014 you are hallucinating.\n\n### Row Count Self-Check (MANDATORY for tables/lists):\n- For every table, list, or repeated-row section in your output, look up its `structureSiblingCount`. This field appears in BOTH the section list entry AND each section DSL response (top-level `structureSiblingCount`).\n- The number of data rows you render MUST equal `structureSiblingCount`. This is a hard constraint, not a suggestion.\n- `structureSiblingCount: 1` means render EXACTLY 1 data row. Do NOT add rows "for visual density", "to look complete", or "because a pagination label says \u517110\u9879". Pagination labels reflect a UI control state, NOT a data-row count \u2014 they must never inflate the row count.\n- Before outputting any table, verify: count your `<tr>` (data rows, excluding header) \u2192 it MUST equal `structureSiblingCount`. If you rendered more, delete the extras now.\n\n### Tool Selection Rules:\n- `mcp__getDesignSections` is the PRIMARY tool for full-page design-to-code generation. Always start here when you need to generate a complete HTML page from a design.\n- `mcp__extractSvg` is a STANDALONE tool. Use it DIRECTLY when you only need to extract SVG icons from a design \u2014 do NOT call `getDesignSections` before it.\n- `mcp__getDsl` is a FALLBACK \u2014 call it ONLY if `getDesignSections` returns an error (e.g. tool not available on older servers).\n- NEVER call both `getDesignSections` AND `getDsl` for the same design.\n- NEVER combine the section workflow with `extractSvg`. If you only need SVG icons, use `extractSvg` alone. If you need a full page, use the section workflow (which uses `@@SVG:{svgShortKey}@@` placeholders + `mcp__applyDesign` for SVG data).\n- The section workflow provides COMPLETE data. Do NOT call `getDsl` to "verify".\n\n### Output Format:\n- The design-data tools (`getDesignSections`, `getDsl`, `extractSvg`, `getMeta`) accept an optional `format` parameter: `json` (default), `yaml`, or `tree`. `yaml`/`tree` use fewer tokens for large designs; all three round-trip without data loss. Set a session-wide default with the `--format` CLI flag or `DEFAULT_FORMAT` env var.\n\n### Text Fidelity Rules:\n- TEXT nodes contain actual text in node.text array. Read EACH node\'s text and use it EXACTLY.\n- Do NOT duplicate text from one node to another \u2014 each TEXT node has unique content.\n- Do NOT skip any child nodes. Render ALL nodes: every tab, every button, every text element.\n\n### Background & Color Rules:\n- **PREFER the `_color` field**: every node with a resolved fill carries a `_color` field containing the computed CSS hex/rgb value. Use this value DIRECTLY in CSS \u2014 no styles-table lookup needed. Example: `color: #4E5969` from `"_color": "#4E5969"`.\n- The `fill` field (e.g. `paint_1:7200`) remains for reference. Use `_token` (e.g. `"Text/Text-4"`) for CSS variable naming like `var(--text-text-4, #4E5969)`.\n- If a node has both `_color` and `fill`, `_color` is authoritative for the visual color value.\n- The DSL `styles` map contains fill/stroke style definitions. Use the node\'s `fillStyleId`/`strokeStyleId` to look up the actual color from `styles`.\n- The root/frame node\'s background comes from its fill style. Do NOT invent gradient or solid backgrounds \u2014 use ONLY the colors from the DSL data.\n- If a node has no fill or the fill style is empty/transparent, do NOT add a background color. Leave it transparent or inherit from parent.\n- Status bar, title bar, and other container backgrounds MUST match the DSL fill data exactly.\n- **NEVER hardcode LLM-default colors** (e.g. `#1D2129`, `#000`, `#333`) when `_color` is present. The `_color` value is the design truth \u2014 copying it requires zero cognitive effort and zero styles-table lookup.\n- **CRITICAL \u2014 splitContainers[].background IS the exact CSS background-color.** Copy it verbatim: `background-color: <value>;`. MUST NOT add gradients, MUST NOT change the color. The designer chose this color deliberately.\n- **CRITICAL \u2014 OPACITY ON FRAME**: a FRAME\'s `opacity` field applies ONLY to its own background, NOT children. Use `background-color: rgba(R, G, B, <opacity>)` \u2014 NEVER use CSS `opacity: X` on the parent, which makes child text/icons translucent.\n- **CRITICAL \u2014 NEVER promote a child node\'s gradient/fill onto its parent container.** A gradient `linear-gradient(...)` in the DSL is computed against THAT node\'s own bounding box \u2014 its stop offsets (e.g. `#0063BA 83%`) are percentages of that specific node\'s height, NOT the parent\'s height. If you copy such a gradient onto a differently-sized parent (e.g. a 88px navbar that contains a 195px-tall decorative oval), the stops map to the WRONG size and the visible color shifts or disappears entirely (blue appears only in the bottom 15px, leaving the top transparent). Rules:\n - The background/fill of a node applies to THAT node\'s element only, at THAT node\'s size. Render each node at its own `layoutStyle.width/height`.\n - A FRAME/GROUP/INSTANCE with NO `_color`/`fill` (empty) has NO background \u2014 leave it transparent. Do NOT borrow a child\'s fill to fill the parent.\n - Decorative layers with `filter: blur(...)` (e.g. `filter: blur(81.6px)`) or very low alpha (`rgba(..., 0.0x)`) are visual overlay accents (glow, bloom), NOT the container\'s base background. Keep them as positioned overlays inside the container \u2014 never extract their gradient as the container background.\n - If a container (navbar, card, header) needs a solid base background that the DSL doesn\'t directly provide on the FRAME node, derive it from the dominant opaque color among its children (e.g. the most common solid `_color`), not from a decorative gradient overlay.\n\n### Anti-Hallucination Rules:\n- You MUST use EXACT text content from the DSL data. NEVER invent, translate, or paraphrase text.\n- If a section has empty or missing text data, render it as an empty placeholder \u2014 do NOT fabricate text.\n- NEVER generate placeholder values, generic tags, fabricated amounts, or invented statistics.\n- Every piece of text, every number, every label in your output MUST come directly from the DSL data.\n- NEVER fabricate SVG path data for icons or vector shapes \u2014 use `@@SVG:{svgShortKey}@@` placeholders for ALL icons, then call `mcp__applyDesign`.\n- NEVER fabricate background colors, gradients, or decorations that are not present in the DSL data.\n\n### Empty Design Tolerance Rules (CLOSED-SET TEXT):\n- Many designs are UNFINISHED wireframes or component-library showcases with sparse text. This is NORMAL, not missing data.\n- The ONLY allowed text strings in your output are those present in `dsl.rowTexts` or `node.text` of some fetched section. The section list response carries `rootMetadata.allTexts` \u2014 the complete closed set of text strings in this design. Treat it as a whitelist: any string NOT in allTexts is a hallucination and MUST be removed.\n- Sparse text is especially common when the design reuses a component library: the design itself may have only ~10 distinct text strings total, even though the rendered page looks dense. Do NOT infer more content from visual density or the page\'s apparent purpose.\n- If a section has `textTotal=0` or empty `rowTexts`, render its STRUCTURE with EMPTY placeholders (`<td></td>`, blank labels, empty menu items) \u2014 do NOT invent column headers, menu item labels, IP addresses, algorithm names, or any data values to fill it.\n- A table with 1 data row in the DSL renders as 1 data row in HTML. Do NOT pad with fabricated rows. Pagination labels like "\u5171 10 \u9879" reflect a UI control state, NOT a data-row count \u2014 never synthesize rows to match them.\n- Brand-name leakage is forbidden: do NOT generate library/watermark tokens (e.g. "Hillstone Design", "Ant Design", "Material UI") even if they appear in component node names or you recognize the brand from training data. Only render text that appears in the design\'s own TEXT nodes.\n- When in doubt about whether a text string is real: it is NOT real unless you can cite the sectionIndex it came from.\n\n### SVG Icon Anti-Simplification Rules:\n- PATH nodes carry a `svgKey` \u2014 the SVG markup is injected by `mcp__applyDesign` at the end. You MUST use `@@SVG:{svgShortKey}@@` placeholders \u2014 never hand-write `<path d="...">`.\n- **SVG UNIQUENESS:** Each icon in the DSL is a distinct design artifact \u2014 different sections may have DIFFERENT icons even if they look similar (e.g. "\u641C\u7D22" in section 2 vs "\u641C\u7D22" in section 40 are DIFFERENT SVGs). NEVER reuse a `svgShortKey` from one section in another. Always use the exact `svgKey` from the PATH node in its own section.\n- **NEVER substitute vector paths with simplified shapes** \u2014 a `<path>` containing a house icon is NOT replaceable by a `<rect>` + `<polygon>`. The designer chose every anchor point; your simplified version WILL look different.\n- **VERIFY after copying each SVG**: count the number of `M` characters in the source path `d` attribute. Your copy MUST have exactly the same count. Fewer `M` \u2192 you corrupted the icon \u2192 redo.\n- **SHAPE CHECK**: if the source uses `<path>`, your output MUST use `<path>`. NOT `<rect>`, NOT `<circle>`, NOT `<ellipse>`. Shape type changes ARE visual changes.\n- The only acceptable SVG operation is: copy the complete `<svg>...</svg>` block from the DSL data and paste it into your HTML. Nothing else.\n- **Common failure pattern**: you saw a complex path and thought "this looks roughly like 4 rectangles" \u2192 you drew 4 `<rect>`s \u2192 the result is visually WRONG. The designer chose a vector path for a reason. Trust the data.\n- **COMPOSITE ICONS (logos, multi-subpath marks):** when a logo/brand mark is split into multiple sub-paths and stripped to svgCache, the SVG that `mcp__applyDesign` injects for the `@@SVG:{svgShortKey}@@` placeholder is the complete `<svg>...</svg>`. Keep it whole. The node\'s `relativeX`/`relativeY` are canvas placement coordinates \u2014 they are NOT to be reused as `transform="translate(x,y) scale(...)"` inside a hand-assembled `<svg>`. Doing so warps the glyph out of its viewBox.\n\n### INSTANCE Variant State Rules:\n- INSTANCE nodes may carry a **`_variantProps`** object with semantic state labels extracted from component variant properties (e.g. `{"\u72B6\u6001": "\u9009\u4E2D", "\u5206\u7C7B": "\u5E7D\u7075\u6309\u94AE", "\u5C3A\u5BF8": "24"}`).\n- **Active/selected state**: compare `_variantProps` across sibling INSTANCE nodes to find which one has `"\u72B6\u6001": "\u9009\u4E2D"` or similar active-state values. Apply the `.active` CSS class ONLY to that node \u2014 NEVER default to the first item in a list.\n- **Sidebar menu items**: each menu item (e.g. 22 submenu entries) is a separate section containing an INSTANCE with `_variantProps`. The item with `"\u72B6\u6001": "\u9009\u4E2D"` in its `_variantProps` is the currently active page \u2014 the corresponding section\'s `rowTexts[0]` (or TEXT child) is its label. Render this item with `class="submenu-item active"`.\n- **Button states**: `"\u5206\u7C7B": "\u5E7D\u7075\u6309\u94AE"` vs `"\u5206\u7C7B": "\u4E3B\u8981\u6309\u94AE"` determines the button\'s visual style (outline vs filled). Multiple buttons in the same toolbar may have different variant props \u2014 respect each one individually.\n- If `_variantProps` is absent from all siblings, assume all are in `default` state \u2014 do NOT invent active states.\n\n### Repeat / Row-Count Rules:\n- Each section entry carries `structureSiblingCount` = the exact number of times this structure appears in the design.\n- For data/table sections: the number of rendered rows MUST equal `structureSiblingCount`. A count of 1 means ONE row total \u2014 do not pad with fabricated rows "for visual density" or "to fill the table". The single row in the DSL IS the complete dataset.\n- For `structureSiblingCount >= 2`: reuse the `structureHash` template, render exactly that many instances, swap per-instance text/colors from each section\'s own data.\n- Pagination controls, "load more" buttons, and empty-state rows are CONTROLS, not data rows \u2014 never counted toward the dataset.\n\n### Placeholder Text Rules:\n- TEXT nodes may carry `_placeholder: true`. This flag marks text whose node name equals its content \u2014 the universal signature of component-library placeholder text (the slot name WAS the placeholder string, e.g. `{name: "Hillstone Design", text: "Hillstone Design"}`). This works across ALL component libraries without brand-specific tokens.\n- `_placeholder: true` is a HINT, not a deletion. Read the surrounding context: if the flagged text does not map to a real column header, label, or content slot in this specific design, treat it as boilerplate and omit it. If it does map to real content, render it normally.\n- Never blanket-render every `_placeholder` text as visible headers/columns.\n\n### Data Completeness Rules:\n- You MUST fetch ALL sections (0..totalSections-1). If totalSections=48, you must call sectionIndex=0 through 47 \u2014 no exceptions.\n- Some sections may have nodeCount=3 and no visible TEXT nodes (text is in component property overrides). Do NOT skip them \u2014 the TEXT is resolved during DSL transfer. These sections contribute real content.\n- **textPreview**: each section list entry carries a `textPreview` field (first TEXT node found, truncated to 20 chars). If two sections both have nodeCount=3 and empty name, use `textPreview` to tell them apart \u2014 they are different menu items (e.g. "\u7CFB\u7EDF\u4FE1\u606F" / "\u6743\u9650\u8BBE\u7F6E"), NOT duplicates.\n- Keep a checklist: track which section indices have been requested. Do not stop until every index 0..N-1 has been fetched.\n- If you accidentally skipped a section, go back and request the missing indices. An incomplete section set WILL cause missing content in the final HTML.\n\n\n\n### Critical Rendering Checklist (MANDATORY \u2014 verify each item before finalizing):\nBefore declaring the HTML complete, enumerate every structural element below and confirm it is rendered. Missing ANY item is a fidelity defect.\n\n1. **Sidebar menu item icons**: each sidebar menu section carries a PATH icon with a `svgKey`. Did you place `@@SVG:{svgShortKey}@@` for each? If you used a `<rect>` or `<circle>` or hand-wrote `<path d="...">`, DELETE it \u2014 the DSL does NOT contain path data. Use the placeholder.\n\n2. **Table header column icons** (sort/filter/search): each table header cell may carry sort-arrow, filter-funnel, and search-lens PATH icons. Did you place `@@SVG:{svgShortKey}@@` for each? If a header cell has no icons, you may have skipped them.\n\n3. **Pagination icons** (refresh, prev/next arrows, dropdown): the pagination section has MULTIPLE PATH icons. Did you place `@@SVG:{svgShortKey}@@` for EACH one?\n\n4. **Brand/logo area text**: the brand section has a TEXT node with the actual brand name (present in `allTexts`). Did you render it as visible text?\n\n5. **Every PATH node has a placeholder**: walk through every section\'s DSL \u2014 every PATH node must have a corresponding `@@SVG:{svgShortKey}@@` in your code. Count: the number of `@@SVG:` placeholders in your code MUST equal the total number of PATH nodes across all sections.\n\n6. **Text provenance**: every text string in your output MUST be traceable to `rootMetadata.allTexts` or a section\'s `dsl.rowTexts`/`node.text`. If you cannot cite the exact source, the text is a hallucination \u2014 delete it.\n\n7. **SVG placeholder replacement (HARD GATE)**: your HTML is INVALID and must NOT be output until you have called `mcp__applyDesign` with the complete code and used the returned `patchedCode`. This is not optional \u2014 it is the FINAL mandatory step. If you wrote ANY `<path d="...">` by hand instead of using `@@SVG:{svgShortKey}@@` placeholders, the `mcp__applyDesign` tool will detect it as a FABRICATED path and return an error. You MUST then replace those hand-written paths with placeholders and call `mcp__applyDesign` again. The ONLY acceptable output is the `patchedCode` returned by `mcp__applyDesign` \u2014 never your pre-replacement code.\n\nIf any item above is unchecked, your HTML is INCOMPLETE. Fix it before outputting.\n\n### Data Interpretation Rules:\n- Pagination/table-footer labels (e.g. "\u5171 10 \u9879", "X rows/page", "items per page") reflect UI control state \u2014 NOT data to replicate.\n- "\u5171 X \u9879" is the pagination widget showing "total X items". The actual data rows come from the table body sections (preceding the pagination section).\n- Do NOT fabricate data rows based on pagination "total" values. Render ONLY the actual data rows present in the DSL.\n- If the DSL contains 1 data row, output exactly 1 table row. Do NOT multiply rows to match a pagination label.\n- **CRITICAL \u2014 SVG icons for table actions**: table action columns (\u64CD\u4F5C\u5217) use PATH icon nodes with `svgShortKey` fields. Place `@@SVG:{svgShortKey}@@` for each action button. NEVER render action buttons as `<p>\u7F16\u8F91</p>` or `<p>\u5220\u9664</p>` plain text or hand-drawn shapes.\n- **CRITICAL \u2014 Persistent sidebars**: render all sidebar levels as static visible columns positioned via splitContainers coordinates. Do NOT hide or toggle sidebar levels.\n- **CRITICAL \u2014 NEVER reuse an SVG from one section in another**: each icon position has its OWN `svgShortKey` (e.g. `S0#5`) in the DSL. A collapse/fold button icon is a DIFFERENT vector from a menu navigation arrow even if both look like arrows. You MUST use the exact `svgShortKey` from the PATH node where the icon appears \u2014 never use a svgShortKey from a different PATH node.\n';function F4(){let{token:t,baseUrl:e,rules:n,debug:r,noRule:o,noPrefix:i,proxy:s,format:a}=EE();if(w0(i),a!==void 0){let l=uu(a);l?process.env.DEFAULT_FORMAT=l:console.warn(`Invalid --format value: "${a}". Must be one of: json, yaml, tree. Falling back to json.`)}if(r){process.env.DEBUG="true",console.log("Debug information:"),console.log(`Token: ${t?"set":"not set"}`),console.log(`API URL: ${e||"default"}`),console.log(`Rules: ${n.length>0?n.join(", "):"none"}`),console.log(`No Rule: ${o?"enabled":"disabled"}`),console.log(`No Prefix: ${oh()?"enabled (tools registered without 'mcp__' prefix)":"disabled (default: 'mcp__' prefix)"}`),console.log(`Proxy: ${s||"none"}`);let l=ru();console.log(`Custom Headers: ${Object.keys(l).length>0?JSON.stringify(TE(l)):"none"}`),console.log(`Format: ${process.env.DEFAULT_FORMAT||"json (default)"}`),console.log("Debug mode: enabled")}let c=new kl({name:"MasterGoMcpServer",version:es.version},{instructions:rn(M4)});new bu().register(c),new _u().register(c),new du().register(c),new mu().register(c),new hu().register(c),new gu().register(c),new yu().register(c),new xu().register(c),new vu().register(c),new wu().register(c),new Su().register(c),c.connect(new El)}F4();
|
|
1323
1324
|
/*! Bundled license information:
|
|
1324
1325
|
|
|
1325
1326
|
mime-db/index.js:
|