@mastergo/magic-mcp 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +68 -68
  2. 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 q$=Object.create;var _u=Object.defineProperty;var Z$=Object.getOwnPropertyDescriptor;var B$=Object.getOwnPropertyNames;var H$=Object.getPrototypeOf,V$=Object.prototype.hasOwnProperty;var $=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Na=(t,e)=>{for(var n in e)_u(t,n,{get:e[n],enumerable:!0})},G$=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of B$(e))!V$.call(t,o)&&o!==n&&_u(t,o,{get:()=>e[o],enumerable:!(r=Z$(e,o))||r.enumerable});return t};var Ee=(t,e,n)=>(n=t!=null?q$(H$(t)):{},G$(e||!t||!t.__esModule?_u(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 As=class{};Ze._CodeOrName=As;Ze.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var So=class extends As{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 As{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 gb(t,...e){let n=[t[0]],r=0;for(;r<e.length;)rf(n,e[r]),n.push(t[++r]);return new $n(n)}Ze._=gb;var nf=new $n("+");function yb(t,...e){let n=[Cs(t[0])],r=0;for(;r<e.length;)n.push(nf),rf(n,e[r]),n.push(nf,Cs(t[++r]));return GP(n),new $n(n)}Ze.str=yb;function rf(t,e){e instanceof $n?t.push(...e._items):e instanceof So?t.push(e):t.push(JP(e))}Ze.addCodeArg=rf;function GP(t){let e=1;for(;e<t.length-1;){if(t[e]===nf){let n=WP(t[e-1],t[e+1]);if(n!==void 0){t.splice(e-1,3,n);continue}t[e++]="+"}e++}}function WP(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 KP(t,e){return e.emptyStr()?t:t.emptyStr()?e:yb`${t}${e}`}Ze.strConcat=KP;function JP(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Cs(Array.isArray(t)?t.join(","):t)}function YP(t){return new $n(Cs(t))}Ze.stringify=YP;function Cs(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Ze.safeStringify=Cs;function XP(t){return typeof t=="string"&&Ze.IDENTIFIER.test(t)?new $n(`.${t}`):gb`[${t}]`}Ze.getProperty=XP;function QP(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=QP;function eO(t){return new $n(t.toString())}Ze.regexpCode=eO});var af=$(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.ValueScope=ln.ValueScopeName=ln.Scope=ln.varKinds=ln.UsedValueState=void 0;var cn=Is(),of=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},jc;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(jc||(ln.UsedValueState=jc={}));ln.varKinds={const:new cn.Name("const"),let:new cn.Name("let"),var:new cn.Name("var")};var Lc=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=Lc;var Dc=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=Dc;var tO=(0,cn._)`\n`,sf=class extends Lc{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?tO:cn.nil}}get(){return this._scope}name(e){return new Dc(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,jc.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 of(l);c.set(l,jc.Completed)})}return i}};ln.ValueScope=sf});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=af(),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 qc=af();Object.defineProperty(Se,"Scope",{enumerable:!0,get:function(){return qc.Scope}});Object.defineProperty(Se,"ValueScope",{enumerable:!0,get:function(){return qc.ValueScope}});Object.defineProperty(Se,"ValueScopeName",{enumerable:!0,get:function(){return qc.ValueScopeName}});Object.defineProperty(Se,"varKinds",{enumerable:!0,get:function(){return qc.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}},cf=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:{}}},Mc=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 Uc(e,this.rhs)}},lf=class extends Mc{constructor(e,n,r,o){super(e,r,o),this.op=n}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},uf=class extends mr{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},pf=class extends mr{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},df=class extends mr{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},ff=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:{}}},Ps=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)||(nO(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 Ps{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},mf=class extends Ps{},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(xb(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 Uc(e,this.condition),this.else&&Eo(e,this.else.names),e}};ko.kind="if";var To=class extends hr{};To.kind="for";var hf=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)}},gf=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=Uc(super.names,this.from);return Uc(e,this.to)}},Fc=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)}},Os=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)}};Os.kind="func";var zs=class extends Ps{render(e){return"return "+super.render(e)}};zs.kind="return";var yf=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}},Ns=class extends hr{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Ns.kind="catch";var js=class extends hr{render(e){return"finally"+super.render(e)}};js.kind="finally";var xf=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 mf]}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 cf(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 Mc(e,n,r))}add(e,n){return this._leafNode(new lf(e,Se.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Le.nil&&this._leafNode(new ff(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 hf(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 gf(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 Fc("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 Fc("in",o,i,n),()=>r(i))}endFor(){return this._endBlockNode(To)}label(e){return this._leafNode(new uf(e))}break(e){return this._leafNode(new pf(e))}return(e){let n=new zs;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(zs)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new yf;if(this._blockNode(o),this.code(e),n){let i=this.name("e");this._currNode=o.catch=new Ns(i),n(i)}return r&&(this._currNode=o.finally=new js,this.code(r)),this._endBlockNode(Ns,js)}throw(e){return this._leafNode(new df(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 Os(e,n,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Os)}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=xf;function Eo(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function Uc(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 nO(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function xb(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Le._)`!${vf(t)}`}Se.not=xb;var rO=vb(Se.operators.AND);function oO(...t){return t.reduce(rO)}Se.and=oO;var iO=vb(Se.operators.OR);function sO(...t){return t.reduce(iO)}Se.or=sO;function vb(t){return(e,n)=>e===Le.nil?n:n===Le.nil?e:(0,Le._)`${vf(e)} ${t} ${vf(n)}`}function vf(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(),aO=Is();function cO(t){let e={};for(let n of t)e[n]=!0;return e}$e.toHash=cO;function lO(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(wb(t,e),!Sb(e,t.self.RULES.all))}$e.alwaysValidSchema=lO;function wb(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]||Eb(t,`unknown keyword: "${i}"`)}$e.checkUnknownRules=wb;function Sb(t,e){if(typeof t=="boolean")return!t;for(let n in t)if(e[n])return!0;return!1}$e.schemaHasRules=Sb;function uO(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=uO;function pO({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=pO;function dO(t){return kb(decodeURIComponent(t))}$e.unescapeFragment=dO;function fO(t){return encodeURIComponent(_f(t))}$e.escapeFragment=fO;function _f(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}$e.escapeJsonPointer=_f;function kb(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}$e.unescapeJsonPointer=kb;function mO(t,e){if(Array.isArray(t))for(let n of t)e(n);else e(t)}$e.eachItem=mO;function bb({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:bb({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} || {}`),wf(t,n,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Tb}),items:bb({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 Tb(t,e){if(e===!0)return t.var("props",!0);let n=t.var("props",(0,Xe._)`{}`);return e!==void 0&&wf(t,n,e),n}$e.evaluatedPropsToName=Tb;function wf(t,e,n){Object.keys(n).forEach(r=>t.assign((0,Xe._)`${e}${(0,Xe.getProperty)(r)}`,!0))}$e.setEvaluated=wf;var _b={};function hO(t,e){return t.scopeValue("func",{ref:e,code:_b[e.code]||(_b[e.code]=new aO._Code(e.code))})}$e.useFunc=hO;var bf;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(bf||($e.Type=bf={}));function gO(t,e,n){if(t instanceof Xe.Name){let r=e===bf.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():"/"+_f(t)}$e.getErrorPath=gO;function Eb(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=Eb});var gr=$(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});var Vt=we(),yO={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")};Sf.default=yO});var Ls=$(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(),Zc=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 xO(t,e=Gt.keywordError,n,r){let{it:o}=t,{gen:i,compositeRule:s,allErrors:a}=o,c=Ab(t,e,n);r??(s||a)?$b(i,c):Rb(o,(0,Fe._)`[${c}]`)}Gt.reportError=xO;function vO(t,e=Gt.keywordError,n){let{it:r}=t,{gen:o,compositeRule:i,allErrors:s}=r,a=Ab(t,e,n);$b(o,a),i||s||Rb(r,en.default.vErrors)}Gt.reportExtraError=vO;function bO(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=bO;function _O({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=_O;function $b(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 Rb(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 Ab(t,e,n){let{createErrors:r}=t.it;return r===!1?(0,Fe._)`{}`:wO(t,e,n)}function wO(t,e,n={}){let{gen:r,it:o}=t,i=[SO(o,n),kO(t,n)];return TO(t,e,i),r.object(...i)}function SO({errorPath:t},{instancePath:e}){let n=e?(0,Fe.str)`${t}${(0,Zc.getErrorPath)(e,Zc.Type.Str)}`:t;return[en.default.instancePath,(0,Fe.strConcat)(en.default.instancePath,n)]}function kO({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,Zc.getErrorPath)(n,Zc.Type.Str)}`),[$o.schemaPath,o]}function TO(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 Ib=$(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.boolOrEmptySchema=fi.topBoolOrEmptySchema=void 0;var EO=Ls(),$O=we(),RO=gr(),AO={message:"boolean schema is false"};function CO(t){let{gen:e,schema:n,validateName:r}=t;n===!1?Cb(t,!1):typeof n=="object"&&n.$async===!0?e.return(RO.default.data):(e.assign((0,$O._)`${r}.errors`,null),e.return(!0))}fi.topBoolOrEmptySchema=CO;function IO(t,e){let{gen:n,schema:r}=t;r===!1?(n.var(e,!1),Cb(t)):n.var(e,!0)}fi.boolOrEmptySchema=IO;function Cb(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,EO.reportError)(o,AO,void 0,e)}});var kf=$(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.getRules=mi.isJSONType=void 0;var PO=["string","number","integer","boolean","null","object","array"],OO=new Set(PO);function zO(t){return typeof t=="string"&&OO.has(t)}mi.isJSONType=zO;function NO(){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=NO});var Tf=$(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.shouldUseRule=Or.shouldUseGroup=Or.schemaHasRulesForType=void 0;function jO({schema:t,self:e},n){let r=e.RULES.types[n];return r&&r!==!0&&Pb(t,r)}Or.schemaHasRulesForType=jO;function Pb(t,e){return e.rules.some(n=>Ob(t,n))}Or.shouldUseGroup=Pb;function Ob(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=Ob});var Ds=$(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 LO=kf(),DO=Tf(),MO=Ls(),ve=we(),zb=Me(),hi;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(hi||(Wt.DataType=hi={}));function FO(t){let e=Nb(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=FO;function Nb(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(LO.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Wt.getJSONTypes=Nb;function UO(t,e){let{gen:n,data:r,opts:o}=t,i=qO(e,o.coerceTypes),s=e.length>0&&!(i.length===0&&e.length===1&&(0,DO.schemaHasRulesForType)(t,e[0]));if(s){let a=$f(e,r,o.strictNumbers,hi.Wrong);n.if(a,()=>{i.length?ZO(t,e,i):Rf(t)})}return s}Wt.coerceAndCheckDataType=UO;var jb=new Set(["string","number","integer","boolean","null"]);function qO(t,e){return e?t.filter(n=>jb.has(n)||e==="array"&&n==="array"):[]}function ZO(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($f(e,o,i.strictNumbers),()=>r.assign(a,o))),r.if((0,ve._)`${a} !== undefined`);for(let l of n)(jb.has(l)||l==="array"&&i.coerceTypes==="array")&&c(l);r.else(),Rf(t),r.endIf(),r.if((0,ve._)`${a} !== undefined`,()=>{r.assign(o,a),BO(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 BO({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,ve._)`${e} !== undefined`,()=>t.assign((0,ve._)`${e}[${n}]`,r))}function Ef(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=Ef;function $f(t,e,n,r){if(t.length===1)return Ef(t[0],e,n,r);let o,i=(0,zb.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,Ef(s,e,n,r));return o}Wt.checkDataTypes=$f;var HO={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,ve._)`{type: ${t}}`:(0,ve._)`{type: ${e}}`};function Rf(t){let e=VO(t);(0,MO.reportError)(e,HO)}Wt.reportTypeError=Rf;function VO(t){let{gen:e,data:n,schema:r}=t,o=(0,zb.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:o,schemaValue:o,parentSchema:r,params:{},it:t}}});var Db=$(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});Bc.assignDefaults=void 0;var gi=we(),GO=Me();function WO(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let o in n)Lb(t,o,n[o].default);else e==="array"&&Array.isArray(r)&&r.forEach((o,i)=>Lb(t,i,o.default))}Bc.assignDefaults=WO;function Lb(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,GO.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(),Af=Me(),zr=gr(),KO=Me();function JO(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=JO;function YO({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=YO;function XO(t,e){t.setParams({missingProperty:e},!0),t.error()}Je.reportMissingProp=XO;function Mb(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ct._)`Object.prototype.hasOwnProperty`})}Je.hasPropFunc=Mb;function Cf(t,e,n){return(0,ct._)`${Mb(t)}.call(${e}, ${n})`}Je.isOwnProperty=Cf;function QO(t,e,n,r){let o=(0,ct._)`${e}${(0,ct.getProperty)(n)} !== undefined`;return r?(0,ct._)`${o} && ${Cf(t,e,n)}`:o}Je.propertyInData=QO;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)(Cf(t,e,n))):o}Je.noPropertyInData=If;function Fb(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Je.allSchemaProperties=Fb;function e1(t,e){return Fb(e).filter(n=>!(0,Af.alwaysValidSchema)(t,e[n]))}Je.schemaProperties=e1;function t1({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=t1;var n1=(0,ct._)`new RegExp`;function r1({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"?n1:(0,KO.useFunc)(t,o)}(${n}, ${r})`})}Je.usePattern=r1;function o1(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:Af.Type.Num},i),e.if((0,ct.not)(i),a)})}}Je.validateArray=o1;function i1(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,Af.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=i1});var Zb=$(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.validateKeywordUsage=Yn.validSchemaType=Yn.funcKeywordCode=Yn.macroKeywordCode=void 0;var tn=we(),Ro=gr(),s1=Rn(),a1=Ls();function c1(t,e){let{gen:n,keyword:r,schema:o,parentSchema:i,it:s}=t,a=e.macro.call(s.self,o,i,s),c=qb(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=c1;function l1(t,e){var n;let{gen:r,keyword:o,schema:i,parentSchema:s,$data:a,it:c}=t;p1(c,e);let l=!a&&e.compile?e.compile.call(c.self,i,s,c):e.validate,p=qb(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&&Ub(t),x(()=>t.error());else{let m=e.async?h():y();e.modifying&&Ub(t),x(()=>u1(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,s1.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=l1;function Ub(t){let{gen:e,data:n,it:r}=t;e.if(r.parentData,()=>e.assign(n,(0,tn._)`${r.parentData}[${r.parentDataProperty}]`))}function u1(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,a1.extendErrors)(t)},()=>t.error())}function p1({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function qb(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 d1(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=d1;function f1({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=f1});var Hb=$(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.extendSubschemaMode=Nr.extendSubschemaData=Nr.getSubschema=void 0;var Xn=we(),Bb=Me();function m1(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,Bb.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=m1;function h1(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,Bb.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=h1;function g1(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=g1});var Pf=$((eH,Vb)=>{"use strict";Vb.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 Wb=$((tH,Gb)=>{"use strict";var jr=Gb.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(){};Hc(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 Hc(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++)Hc(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)Hc(t,e,n,d[h],o+"/"+p+"/"+y1(h),i,o,p,r,h)}else(p in jr.keywords||t.allKeys&&!(p in jr.skipKeywords))&&Hc(t,e,n,d,o+"/"+p,i,o,p,r)}n(r,o,i,s,a,c,l)}}function y1(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ms=$(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.getSchemaRefs=un.resolveUrl=un.normalizeId=un._getFullPath=un.getFullPath=un.inlineRef=void 0;var x1=Me(),v1=Pf(),b1=Wb(),_1=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function w1(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Of(t):e?Kb(t)<=e:!1}un.inlineRef=w1;var S1=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Of(t){for(let e in t){if(S1.has(e))return!0;let n=t[e];if(Array.isArray(n)&&n.some(Of)||typeof n=="object"&&Of(n))return!0}return!1}function Kb(t){let e=0;for(let n in t){if(n==="$ref")return 1/0;if(e++,!_1.has(n)&&(typeof t[n]=="object"&&(0,x1.eachItem)(t[n],r=>e+=Kb(r)),e===1/0))return 1/0}return e}function Jb(t,e="",n){n!==!1&&(e=yi(e));let r=t.parse(e);return Yb(t,r)}un.getFullPath=Jb;function Yb(t,e){return t.serialize(e).split("#")[0]+"#"}un._getFullPath=Yb;var k1=/#\/?$/;function yi(t){return t?t.replace(k1,""):""}un.normalizeId=yi;function T1(t,e,n){return n=yi(n),t.resolve(e,n)}un.resolveUrl=T1;var E1=/^[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=Jb(r,o,!1),a={},c=new Set;return b1(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(!E1.test(w))throw new Error(`invalid anchor "${w}"`);m.call(this,`#${w}`)}}}),a;function l(d,f,h){if(f!==void 0&&!v1(d,f))throw p(h)}function p(d){return new Error(`reference "${d}" resolves to more than one schema`)}}un.getSchemaRefs=$1});var qs=$(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.getData=Lr.KeywordCxt=Lr.validateFunctionCode=void 0;var n_=Ib(),Xb=Ds(),Nf=Tf(),Vc=Ds(),R1=Db(),Us=Zb(),zf=Hb(),re=we(),he=gr(),A1=Ms(),yr=Me(),Fs=Ls();function C1(t){if(i_(t)&&(s_(t),o_(t))){O1(t);return}r_(t,()=>(0,n_.topBoolOrEmptySchema)(t))}Lr.validateFunctionCode=C1;function r_({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"; ${Qb(n,o)}`),P1(t,o),t.code(i)}):t.func(e,(0,re._)`${he.default.data}, ${I1(o)}`,r.$async,()=>t.code(Qb(n,o)).code(i))}function I1(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 P1(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 O1(t){let{schema:e,opts:n,gen:r}=t;r_(t,()=>{n.$comment&&e.$comment&&c_(t),D1(t),r.let(he.default.vErrors,null),r.let(he.default.errors,0),n.unevaluated&&z1(t),a_(t),U1(t)})}function z1(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 Qb(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 N1(t,e){if(i_(t)&&(s_(t),o_(t))){j1(t,e);return}(0,n_.boolOrEmptySchema)(t,e)}function o_({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 i_(t){return typeof t.schema!="boolean"}function j1(t,e){let{schema:n,gen:r,opts:o}=t;o.$comment&&n.$comment&&c_(t),M1(t),F1(t);let i=r.const("_errs",he.default.errors);a_(t,i),r.var(e,(0,re._)`${i} === ${he.default.errors}`)}function s_(t){(0,yr.checkUnknownRules)(t),L1(t)}function a_(t,e){if(t.opts.jtd)return e_(t,[],!1,e);let n=(0,Xb.getSchemaTypes)(t.schema),r=(0,Xb.coerceAndCheckDataType)(t,n);e_(t,n,!r,e)}function L1(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 D1(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 M1(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,A1.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function F1(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function c_({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 U1(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&&q1(t),e.return((0,re._)`${he.default.errors} === 0`))}function q1({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 e_(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(()=>u_(t,"$ref",p.all.$ref.definition));return}c.jtd||Z1(t,e),o.block(()=>{for(let f of p.rules)d(f);d(p.post)});function d(f){(0,Nf.shouldUseGroup)(i,f)&&(f.type?(o.if((0,Vc.checkDataType)(f.type,s,c.strictNumbers)),t_(t,f),e.length===1&&e[0]===f.type&&n&&(o.else(),(0,Vc.reportTypeError)(t)),o.endIf()):t_(t,f),a||o.if((0,re._)`${he.default.errors} === ${r||0}`))}}function t_(t,e){let{gen:n,schema:r,opts:{useDefaults:o}}=t;o&&(0,R1.assignDefaults)(t,e.type),n.block(()=>{for(let i of e.rules)(0,Nf.shouldUseRule)(r,i)&&u_(t,i.keyword,i.definition,e.type)})}function Z1(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(B1(t,e),t.opts.allowUnionTypes||H1(t,e),V1(t,t.dataTypes))}function B1(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(n=>{l_(t.dataTypes,n)||jf(t,`type "${n}" not allowed by context "${t.dataTypes.join(",")}"`)}),W1(t,e)}}function H1(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&jf(t,"use allowUnionTypes to allow union type keyword")}function V1(t,e){let n=t.self.RULES.all;for(let r in n){let o=n[r];if(typeof o=="object"&&(0,Nf.shouldUseRule)(t.schema,o)){let{type:i}=o.definition;i.length&&!i.some(s=>G1(e,s))&&jf(t,`missing type "${i.join(",")}" for keyword "${r}"`)}}}function G1(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function l_(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function W1(t,e){let n=[];for(let r of t.dataTypes)l_(e,r)?n.push(r):e.includes("integer")&&r==="number"&&n.push("integer");t.dataTypes=n}function jf(t,e){let n=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${n}" (strictTypes)`,(0,yr.checkStrictMode)(t,e,t.opts.strictTypes)}var Gc=class{constructor(e,n,r){if((0,Us.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",p_(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Us.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?Fs.reportExtraError:Fs.reportError)(this,this.def.error,n)}$dataError(){(0,Fs.reportError)(this,this.def.$dataError||Fs.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Fs.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,Vc.checkDataTypes)(c,n,i.opts.strictNumbers,Vc.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,zf.getSubschema)(this.it,e);(0,zf.extendSubschemaData)(r,this.it,e),(0,zf.extendSubschemaMode)(r,e);let o={...this.it,...r,items:void 0,props:void 0};return N1(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=Gc;function u_(t,e,n,r){let o=new Gc(t,n,e);"code"in n?n.code(o,r):o.$data&&n.validate?(0,Us.funcKeywordCode)(o,n):"macro"in n?(0,Us.macroKeywordCode)(o,n):(n.compile||n.validate)&&(0,Us.funcKeywordCode)(o,n)}var K1=/^\/(?:[^~]|~0|~1)*$/,J1=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function p_(t,{dataLevel:e,dataNames:n,dataPathArr:r}){let o,i;if(t==="")return he.default.rootData;if(t[0]==="/"){if(!K1.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);o=t,i=he.default.rootData}else{let l=J1.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=p_});var Wc=$(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});var Lf=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Df.default=Lf});var Zs=$(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});var Mf=Ms(),Ff=class extends Error{constructor(e,n,r,o){super(o||`can't resolve reference ${r} from id ${n}`),this.missingRef=(0,Mf.resolveUrl)(e,n,r),this.missingSchema=(0,Mf.normalizeId)((0,Mf.getFullPath)(e,this.missingRef))}};Uf.default=Ff});var Jc=$(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.resolveSchema=An.getCompilingSchema=An.resolveRef=An.compileSchema=An.SchemaEnv=void 0;var Mn=we(),Y1=Wc(),Ao=gr(),Fn=Ms(),d_=Me(),X1=qs(),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 Zf(t){let e=f_.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:Y1.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,X1.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=Zf;function Q1(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=nz.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]=ez.call(this,i)}An.resolveRef=Q1;function ez(t){return(0,Fn.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Zf.call(this,t)}function f_(t){for(let e of this._compilations)if(tz(e,t))return e}An.getCompilingSchema=f_;function tz(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function nz(t,e){let n;for(;typeof(n=this.refs[e])=="string";)e=n;return n||this.schemas[e]||Kc.call(this,t,e)}function Kc(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 qf.call(this,n,t);let i=(0,Fn.normalizeId)(r),s=this.refs[i]||this.schemas[i];if(typeof s=="string"){let a=Kc.call(this,t,s);return typeof(a==null?void 0:a.schema)!="object"?void 0:qf.call(this,n,a)}if(typeof(s==null?void 0:s.schema)=="object"){if(s.validate||Zf.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 qf.call(this,n,s)}}An.resolveSchema=Kc;var rz=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function qf(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,d_.unescapeFragment)(a)];if(c===void 0)return;n=c;let l=typeof n=="object"&&n[this.opts.schemaId];!rz.has(a)&&l&&(e=(0,Fn.resolveUrl)(this.opts.uriResolver,e,l))}let i;if(typeof n!="boolean"&&n.$ref&&!(0,d_.schemaHasRulesButRef)(n,this.RULES)){let a=(0,Fn.resolveUrl)(this.opts.uriResolver,e,n.$ref);i=Kc.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 m_=$((aH,oz)=>{oz.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 Vf=$((cH,b_)=>{"use strict";var iz=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),g_=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),Bf=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),y_=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),sz=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function Hf(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 az=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function h_(t){return t.length=0,!0}function cz(t,e,n){if(t.length){let r=Hf(t);if(r!=="")e.push(r);else return n.error=!0,!1;t.length=0}return!0}function lz(t){let e=0,n={error:!1,address:"",zone:""},r=[],o=[],i=!1,s=!1,a=cz;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=h_}else{o.push(l);continue}}return o.length&&(a===h_?n.zone=o.join(""):s?r.push(o.join("")):r.push(Hf(o))),n.address=r.join(""),n}function x_(t){if(uz(t,":")<2)return{host:t,isIPV6:!1};let e=lz(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 uz(t,e){let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n}function pz(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 dz={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},fz=/[@/?#:]/g,mz=/[@/?#]/g;function v_(t,e){let n=e?mz:fz;return n.lastIndex=0,t.replace(n,r=>dz[r])}function hz(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(Bf(o)){let i=o.toUpperCase(),s=String.fromCharCode(parseInt(i,16));e&&y_(s)?n+=s:n+="%"+i,r+=2;continue}}n+=t[r]}return n}function gz(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(Bf(r)){let o=r.toUpperCase(),i=String.fromCharCode(parseInt(o,16));i!=="."&&y_(i)?e+=i:e+="%"+o,n+=2;continue}}sz(t[n])?e+=t[n]:e+=escape(t[n])}return e}function yz(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(Bf(r)){e+="%"+r.toUpperCase(),n+=2;continue}}e+=escape(t[n])}return e}function xz(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let n=unescape(t.host);if(!g_(n)){let r=x_(n);r.isIPV6===!0?n=`[${r.escapedHost}]`:n=v_(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}b_.exports={nonSimpleDomain:az,recomposeAuthority:xz,reescapeHostDelimiters:v_,normalizePercentEncoding:hz,normalizePathEncoding:gz,escapePreservingEscapes:yz,removeDotSegments:pz,isIPv4:g_,isUUID:iz,normalizeIPv6:x_,stringArrayToHexStripped:Hf}});var T_=$((lH,k_)=>{"use strict";var{isUUID:vz}=Vf(),bz=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,_z=["http","https","ws","wss","urn","urn:uuid"];function wz(t){return _z.indexOf(t)!==-1}function Gf(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 __(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function w_(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 Sz(t){return t.secure=Gf(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function kz(t){if((t.port===(Gf(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 Tz(t,e){if(!t.path)return t.error="URN can not be parsed",t;let n=t.path.match(bz);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=Wf(o);t.path=void 0,i&&(t=i.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function Ez(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=Wf(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||!vz(n.uuid))&&(n.error=n.error||"UUID is not valid."),n}function Rz(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var S_={scheme:"http",domainHost:!0,parse:__,serialize:w_},Az={scheme:"https",domainHost:S_.domainHost,parse:__,serialize:w_},Yc={scheme:"ws",domainHost:!0,parse:Sz,serialize:kz},Cz={scheme:"wss",domainHost:Yc.domainHost,parse:Yc.parse,serialize:Yc.serialize},Iz={scheme:"urn",parse:Tz,serialize:Ez,skipNormalize:!0},Pz={scheme:"urn:uuid",parse:$z,serialize:Rz,skipNormalize:!0},Xc={http:S_,https:Az,ws:Yc,wss:Cz,urn:Iz,"urn:uuid":Pz};Object.setPrototypeOf(Xc,null);function Wf(t){return t&&(Xc[t]||Xc[t.toLowerCase()])||void 0}k_.exports={wsIsSecure:Gf,SCHEMES:Xc,isValidSchemeName:wz,getSchemeHandler:Wf}});var I_=$((uH,Qc)=>{"use strict";var{normalizeIPv6:Oz,removeDotSegments:Bs,recomposeAuthority:zz,normalizePercentEncoding:Nz,normalizePathEncoding:jz,escapePreservingEscapes:Lz,reescapeHostDelimiters:Dz,isIPv4:Mz,nonSimpleDomain:Fz}=Vf(),{SCHEMES:Uz,getSchemeHandler:$_}=T_();function qz(t,e){return typeof t=="string"?t=Wz(t,e):typeof t=="object"&&(t=vi(Co(t,e),e)),t}function Zz(t,e,n){let r=n?Object.assign({scheme:"null"},n):{scheme:"null"},o=R_(vi(t,r),vi(e,r),r,!0);return r.skipEscape=!0,Co(o,r)}function R_(t,e,n,r){let o={};return r||(t=vi(Co(t,n),n),e=vi(Co(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=Bs(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=Bs(e.path||""),o.query=e.query):(e.path?(e.path[0]==="/"?o.path=Bs(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=Bs(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 Bz(t,e,n){let r=E_(t,n),o=E_(e,n);return r!==void 0&&o!==void 0&&r.toLowerCase()===o.toLowerCase()}function Co(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=$_(r.scheme||n.scheme);i&&i.serialize&&i.serialize(n,r),n.path!==void 0&&(r.skipEscape?n.path=Nz(n.path):(n.path=Lz(n.path),n.scheme!==void 0&&(n.path=n.path.split("%3A").join(":")))),r.reference!=="suffix"&&n.scheme&&o.push(n.scheme,":");let s=zz(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=Bs(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 Hz=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,Vz=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/;function Gz(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 A_(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(Vz);s!==null&&s[1].indexOf("\\")!==-1&&(r.error="URI authority must not contain a literal backslash.",o=!0);let a=t.match(Hz);if(a){r.scheme=a[1],r.userinfo=a[3],r.host=a[4],r.port=parseInt(a[5],10),r.path=a[6]||"",r.query=a[7],r.fragment=a[8],isNaN(r.port)&&(r.port=a[5]);let c=Gz(r,a);if(c!==void 0&&(r.error=r.error||c,o=!0),r.host)if(Mz(r.host)===!1){let d=Oz(r.host);r.host=d.host.toLowerCase(),i=d.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 l=$_(n.scheme||r.scheme);if(!n.unicodeSupport&&(!l||!l.unicodeSupport)&&r.host&&(n.domainHost||l&&l.domainHost)&&i===!1&&Fz(r.host))try{r.host=new URL("http://"+r.host).hostname}catch(p){r.error=r.error||"Host's domain name can not be converted to ASCII: "+p}if((!l||l&&!l.skipNormalize)&&(t.indexOf("%")!==-1&&(r.scheme!==void 0&&(r.scheme=unescape(r.scheme)),r.host!==void 0&&(r.host=Dz(unescape(r.host),i))),r.path&&(r.path=jz(r.path)),r.fragment))try{r.fragment=encodeURI(decodeURIComponent(r.fragment))}catch{r.error=r.error||"URI malformed"}l&&l.parse&&l.parse(r,n)}else r.error=r.error||"URI can not be parsed.";return{parsed:r,malformedAuthorityOrPort:o}}function vi(t,e){return A_(t,e).parsed}function Wz(t,e){return C_(t,e).normalized}function C_(t,e){let{parsed:n,malformedAuthorityOrPort:r}=A_(t,e);return{normalized:r?t:Co(n,e),malformedAuthorityOrPort:r}}function E_(t,e){if(typeof t=="string"){let{normalized:n,malformedAuthorityOrPort:r}=C_(t,e);return r?void 0:n}if(typeof t=="object")return Co(t,e)}var Kf={SCHEMES:Uz,normalize:qz,resolve:Zz,resolveComponent:R_,equal:Bz,serialize:Co,parse:vi};Qc.exports=Kf;Qc.exports.default=Kf;Qc.exports.fastUri=Kf});var O_=$(Jf=>{"use strict";Object.defineProperty(Jf,"__esModule",{value:!0});var P_=I_();P_.code='require("ajv/dist/runtime/uri").default';Jf.default=P_});var U_=$(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 Kz=qs();Object.defineProperty(Mt,"KeywordCxt",{enumerable:!0,get:function(){return Kz.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 Jz=Wc(),D_=Zs(),Yz=kf(),Hs=Jc(),Xz=we(),Vs=Ms(),el=Ds(),Xf=Me(),z_=m_(),Qz=O_(),M_=(t,e)=>new RegExp(t,e);M_.code="new RegExp";var eN=["removeAdditional","useDefaults","coerceTypes"],tN=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),nN={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."},rN={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},N_=200;function oN(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:M_,ae=(o=t.uriResolver)!==null&&o!==void 0?o:Qz.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:N_,loopEnum:(x=t.loopEnum)!==null&&x!==void 0?x:N_,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 Gs=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,...oN(e)};let{es5:n,lines:r}=this.opts.code;this.scope=new Xz.ValueScope({scope:{},prefixes:tN,es5:n,lines:r}),this.logger=uN(e.logger);let o=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Yz.getRules)(),j_.call(this,nN,e,"NOT SUPPORTED"),j_.call(this,rN,e,"DEPRECATED","warn"),this._metaOpts=cN.call(this),e.formats&&sN.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&aN.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),iN.call(this),e.validateFormats=o}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:n,schemaId:r}=this.opts,o=z_;r==="id"&&(o={...z_},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 D_.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,Vs.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=L_.call(this,e))=="string";)e=n;if(n===void 0){let{schemaId:r}=this.opts,o=new Hs.SchemaEnv({schema:{},schemaId:r});if(n=Hs.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=L_.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,Vs.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(dN.call(this,r,n),!n)return(0,Xf.eachItem)(r,i=>Yf.call(this,i)),this;mN.call(this,n);let o={...n,type:(0,el.getJSONTypes)(n.type),schemaType:(0,el.getJSONTypes)(n.schemaType)};return(0,Xf.eachItem)(r,o.type.length===0?i=>Yf.call(this,i,o):i=>o.type.forEach(s=>Yf.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]=F_(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,Vs.normalizeId)(s||r);let l=Vs.getSchemaRefs.call(this,e,r);return c=new Hs.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):Hs.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{Hs.compileSchema.call(this,e)}finally{this.opts=n}}};Gs.ValidationError=Jz.default;Gs.MissingRefError=D_.default;Mt.default=Gs;function j_(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 L_(t){return t=(0,Vs.normalizeId)(t),this.schemas[t]||this.refs[t]}function iN(){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 sN(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function aN(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 cN(){let t={...this.opts};for(let e of eN)delete t[e];return t}var lN={log(){},warn(){},error(){}};function uN(t){if(t===!1)return lN;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 pN=/^[a-z_$][a-z0-9_$:-]*$/i;function dN(t,e){let{RULES:n}=this;if((0,Xf.eachItem)(t,r=>{if(n.keywords[r])throw new Error(`Keyword ${r} is already defined`);if(!pN.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 Yf(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,el.getJSONTypes)(e.type),schemaType:(0,el.getJSONTypes)(e.schemaType)}};e.before?fN.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 fN(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 mN(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=F_(e)),t.validateSchema=this.compile(e,!0))}var hN={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function F_(t){return{anyOf:[t,hN]}}});var q_=$(Qf=>{"use strict";Object.defineProperty(Qf,"__esModule",{value:!0});var gN={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Qf.default=gN});var V_=$(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});Io.callRef=Io.getValidate=void 0;var yN=Zs(),Z_=Rn(),pn=we(),_i=gr(),B_=Jc(),tl=Me(),xN={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=B_.resolveRef.call(c,l,o,n);if(p===void 0)throw new yN.default(r.opts.uriResolver,o,n);if(p instanceof B_.SchemaEnv)return f(p);return h(p);function d(){if(i===l)return nl(t,s,i,i.$async);let y=e.scopeValue("root",{ref:l});return nl(t,(0,pn._)`${y}.validate`,l,l.$async)}function f(y){let v=H_(t,y);nl(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 H_(t,e){let{gen:n}=t;return e.validate?n.scopeValue("validate",{ref:e.validate}):(0,pn._)`${n.scopeValue("wrapper",{ref:e})}.validate`}Io.getValidate=H_;function nl(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,Z_.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,Z_.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=tl.mergeEvaluated.props(o,x.props,i.props));else{let m=o.var("props",(0,pn._)`${y}.evaluated.props`);i.props=tl.mergeEvaluated.props(o,m,i.props,pn.Name)}if(i.items!==!0)if(x&&!x.dynamicItems)x.items!==void 0&&(i.items=tl.mergeEvaluated.items(o,x.items,i.items));else{let m=o.var("items",(0,pn._)`${y}.evaluated.items`);i.items=tl.mergeEvaluated.items(o,m,i.items,pn.Name)}}}Io.callRef=nl;Io.default=xN});var G_=$(em=>{"use strict";Object.defineProperty(em,"__esModule",{value:!0});var vN=q_(),bN=V_(),_N=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",vN.default,bN.default];em.default=_N});var W_=$(tm=>{"use strict";Object.defineProperty(tm,"__esModule",{value:!0});var rl=we(),Dr=rl.operators,ol={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}},wN={message:({keyword:t,schemaCode:e})=>(0,rl.str)`must be ${ol[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,rl._)`{comparison: ${ol[t].okStr}, limit: ${e}}`},SN={keyword:Object.keys(ol),type:"number",schemaType:"number",$data:!0,error:wN,code(t){let{keyword:e,data:n,schemaCode:r}=t;t.fail$data((0,rl._)`${n} ${ol[e].fail} ${r} || isNaN(${n})`)}};tm.default=SN});var K_=$(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});var Ws=we(),kN={message:({schemaCode:t})=>(0,Ws.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Ws._)`{multipleOf: ${t}}`},TN={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:kN,code(t){let{gen:e,data:n,schemaCode:r,it:o}=t,i=o.opts.multipleOfPrecision,s=e.let("res"),a=i?(0,Ws._)`Math.abs(Math.round(${s}) - ${s}) > 1e-${i}`:(0,Ws._)`${s} !== parseInt(${s})`;t.fail$data((0,Ws._)`(${r} === 0 || (${s} = ${n}/${r}, ${a}))`)}};nm.default=TN});var Y_=$(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});function J_(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}rm.default=J_;J_.code='require("ajv/dist/runtime/ucs2length").default'});var X_=$(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var Po=we(),EN=Me(),$N=Y_(),RN={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}}`},AN={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:RN,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,EN.useFunc)(t.gen,$N.default)}(${n})`;t.fail$data((0,Po._)`${s} ${i} ${r}`)}};om.default=AN});var Q_=$(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});var CN=Rn(),IN=Me(),wi=we(),PN={message:({schemaCode:t})=>(0,wi.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,wi._)`{pattern: ${t}}`},ON={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:PN,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,IN.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,CN.usePattern)(t,o);t.fail$data((0,wi._)`!${c}.test(${n})`)}}};im.default=ON});var ew=$(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});var Ks=we(),zN={message({keyword:t,schemaCode:e}){let n=t==="maxProperties"?"more":"fewer";return(0,Ks.str)`must NOT have ${n} than ${e} properties`},params:({schemaCode:t})=>(0,Ks._)`{limit: ${t}}`},NN={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:zN,code(t){let{keyword:e,data:n,schemaCode:r}=t,o=e==="maxProperties"?Ks.operators.GT:Ks.operators.LT;t.fail$data((0,Ks._)`Object.keys(${n}).length ${o} ${r}`)}};sm.default=NN});var tw=$(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});var Js=Rn(),Ys=we(),jN=Me(),LN={message:({params:{missingProperty:t}})=>(0,Ys.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Ys._)`{missingProperty: ${t}}`},DN={keyword:"required",type:"object",schemaType:"array",$data:!0,error:LN,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,jN.checkStrictMode)(s,m,s.opts.strictRequired)}}function l(){if(c||i)t.block$data(Ys.nil,d);else for(let h of n)(0,Js.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,Js.checkMissingProp)(t,n,h)),(0,Js.reportMissingProp)(t,h),e.else()}function d(){e.forOf("prop",r,h=>{t.setParams({missingProperty:h}),e.if((0,Js.noPropertyInData)(e,o,h,a.ownProperties),()=>t.error())})}function f(h,y){t.setParams({missingProperty:h}),e.forOf(h,r,()=>{e.assign(y,(0,Js.propertyInData)(e,o,h,a.ownProperties)),e.if((0,Ys.not)(y),()=>{t.error(),e.break()})},Ys.nil)}}};am.default=DN});var nw=$(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});var Xs=we(),MN={message({keyword:t,schemaCode:e}){let n=t==="maxItems"?"more":"fewer";return(0,Xs.str)`must NOT have ${n} than ${e} items`},params:({schemaCode:t})=>(0,Xs._)`{limit: ${t}}`},FN={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:MN,code(t){let{keyword:e,data:n,schemaCode:r}=t,o=e==="maxItems"?Xs.operators.GT:Xs.operators.LT;t.fail$data((0,Xs._)`${n}.length ${o} ${r}`)}};cm.default=FN});var il=$(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});var rw=Pf();rw.code='require("ajv/dist/runtime/equal").default';lm.default=rw});var ow=$(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});var um=Ds(),Ft=we(),UN=Me(),qN=il(),ZN={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}}`},BN={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:ZN,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,um.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,um.checkDataTypes)(l,x,a.opts.strictNumbers,um.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,UN.useFunc)(e,qN.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)})))}}};pm.default=BN});var iw=$(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});var dm=we(),HN=Me(),VN=il(),GN={message:"must be equal to constant",params:({schemaCode:t})=>(0,dm._)`{allowedValue: ${t}}`},WN={keyword:"const",$data:!0,error:GN,code(t){let{gen:e,data:n,$data:r,schemaCode:o,schema:i}=t;r||i&&typeof i=="object"?t.fail$data((0,dm._)`!${(0,HN.useFunc)(e,VN.default)}(${n}, ${o})`):t.fail((0,dm._)`${i} !== ${n}`)}};fm.default=WN});var sw=$(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});var Qs=we(),KN=Me(),JN=il(),YN={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,Qs._)`{allowedValues: ${t}}`},XN={keyword:"enum",schemaType:"array",$data:!0,error:YN,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,KN.useFunc)(e,JN.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,Qs.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,Qs._)`${l()}(${n}, ${h})`,()=>e.assign(p,!0).break()))}function f(h,y){let v=o[y];return typeof v=="object"&&v!==null?(0,Qs._)`${l()}(${n}, ${h}[${y}])`:(0,Qs._)`${n} === ${v}`}}};mm.default=XN});var aw=$(hm=>{"use strict";Object.defineProperty(hm,"__esModule",{value:!0});var QN=W_(),ej=K_(),tj=X_(),nj=Q_(),rj=ew(),oj=tw(),ij=nw(),sj=ow(),aj=iw(),cj=sw(),lj=[QN.default,ej.default,tj.default,nj.default,rj.default,oj.default,ij.default,sj.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},aj.default,cj.default];hm.default=lj});var ym=$(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});ea.validateAdditionalItems=void 0;var Oo=we(),gm=Me(),uj={message:({params:{len:t}})=>(0,Oo.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Oo._)`{limit: ${t}}`},pj={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:uj,code(t){let{parentSchema:e,it:n}=t,{items:r}=e;if(!Array.isArray(r)){(0,gm.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas');return}cw(t,r)}};function cw(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,gm.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:gm.Type.Num},l),s.allErrors||n.if((0,Oo.not)(l),()=>n.break())})}}ea.validateAdditionalItems=cw;ea.default=pj});var xm=$(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});ta.validateTuple=void 0;var lw=we(),sl=Me(),dj=Rn(),fj={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:n}=t;if(Array.isArray(e))return uw(t,"additionalItems",e);n.items=!0,!(0,sl.alwaysValidSchema)(n,e)&&t.ok((0,dj.validateArray)(t))}};function uw(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=sl.mergeEvaluated.items(r,n.length,a.items));let c=r.name("valid"),l=r.const("len",(0,lw._)`${i}.length`);n.forEach((d,f)=>{(0,sl.alwaysValidSchema)(a,d)||(r.if((0,lw._)`${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,sl.checkStrictMode)(a,x,f.strictTuples)}}}ta.validateTuple=uw;ta.default=fj});var pw=$(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});var mj=xm(),hj={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,mj.validateTuple)(t,"items")};vm.default=hj});var fw=$(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});var dw=we(),gj=Me(),yj=Rn(),xj=ym(),vj={message:({params:{len:t}})=>(0,dw.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,dw._)`{limit: ${t}}`},bj={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:vj,code(t){let{schema:e,parentSchema:n,it:r}=t,{prefixItems:o}=n;r.items=!0,!(0,gj.alwaysValidSchema)(r,e)&&(o?(0,xj.validateAdditionalItems)(t,o):t.ok((0,yj.validateArray)(t)))}};bm.default=bj});var mw=$(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});var Cn=we(),al=Me(),_j={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}}`},wj={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:_j,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,al.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&s>a){(0,al.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,al.alwaysValidSchema)(i,n)){let v=(0,Cn._)`${p} >= ${s}`;a!==void 0&&(v=(0,Cn._)`${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,Cn._)`${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:al.Type.Num,compositeRule:!0},v),x()})}function y(v){e.code((0,Cn._)`${v}++`),a===void 0?e.if((0,Cn._)`${v} >= ${s}`,()=>e.assign(d,!0).break()):(e.if((0,Cn._)`${v} > ${a}`,()=>e.assign(d,!1).break()),s===1?e.assign(d,!0):e.if((0,Cn._)`${v} >= ${s}`,()=>e.assign(d,!0)))}}};_m.default=wj});var yw=$(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.validateSchemaDeps=Qn.validatePropertyDeps=Qn.error=void 0;var wm=we(),Sj=Me(),na=Rn();Qn.error={message:({params:{property:t,depsCount:e,deps:n}})=>{let r=e===1?"property":"properties";return(0,wm.str)`must have ${r} ${n} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:n,missingProperty:r}})=>(0,wm._)`{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 kj={keyword:"dependencies",type:"object",schemaType:"object",error:Qn.error,code(t){let[e,n]=Tj(t);hw(t,e),gw(t,n)}};function Tj({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 hw(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,na.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,na.checkReportMissingProp)(t,l)}):(n.if((0,wm._)`${c} && (${(0,na.checkMissingProp)(t,a,i)})`),(0,na.reportMissingProp)(t,i),n.else())}}Qn.validatePropertyDeps=hw;function gw(t,e=t.schema){let{gen:n,data:r,keyword:o,it:i}=t,s=n.name("valid");for(let a in e)(0,Sj.alwaysValidSchema)(i,e[a])||(n.if((0,na.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=gw;Qn.default=kj});var vw=$(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});var xw=we(),Ej=Me(),$j={message:"property name must be valid",params:({params:t})=>(0,xw._)`{propertyName: ${t.propertyName}}`},Rj={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:$j,code(t){let{gen:e,schema:n,data:r,it:o}=t;if((0,Ej.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,xw.not)(i),()=>{t.error(!0),o.allErrors||e.break()})}),t.ok(i)}};Sm.default=Rj});var Tm=$(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});var cl=Rn(),Un=we(),Aj=gr(),ll=Me(),Cj={message:"must NOT have additional properties",params:({params:t})=>(0,Un._)`{additionalProperty: ${t.additionalProperty}}`},Ij={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Cj,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,ll.alwaysValidSchema)(s,n))return;let l=(0,cl.allSchemaProperties)(r.properties),p=(0,cl.allSchemaProperties)(r.patternProperties);d(),t.ok((0,Un._)`${i} === ${Aj.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,ll.schemaRefOrVal)(s,r.properties,"properties");m=(0,cl.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,cl.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,ll.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:ll.Type.Str};b===!1&&Object.assign(w,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(w,m)}}};km.default=Ij});var ww=$($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});var Pj=qs(),bw=Rn(),Em=Me(),_w=Tm(),Oj={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&&_w.default.code(new Pj.KeywordCxt(i,_w.default,"additionalProperties"));let s=(0,bw.allSchemaProperties)(n);for(let d of s)i.definedProperties.add(d);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Em.mergeEvaluated.props(e,(0,Em.toHash)(s),i.props));let a=s.filter(d=>!(0,Em.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,bw.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)}}};$m.default=Oj});var Ew=$(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});var Sw=Rn(),ul=we(),kw=Me(),Tw=Me(),zj={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,Sw.allSchemaProperties)(n),c=a.filter(v=>(0,kw.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 ul.Name)&&(i.props=(0,Tw.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,kw.checkStrictMode)(i,`property ${x} matches pattern ${v} (use allowMatchingProperties)`)}function y(v){e.forIn("key",r,x=>{e.if((0,ul._)`${(0,Sw.usePattern)(t,v)}.test(${x})`,()=>{let m=c.includes(v);m||t.subschema({keyword:"patternProperties",schemaProp:v,dataProp:x,dataPropType:Tw.Type.Str},p),i.opts.unevaluated&&d!==!0?e.assign((0,ul._)`${d}[${x}]`,!0):!m&&!i.allErrors&&e.if((0,ul.not)(p),()=>e.break())})})}}};Rm.default=zj});var $w=$(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});var Nj=Me(),jj={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:n,it:r}=t;if((0,Nj.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"}};Am.default=jj});var Rw=$(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});var Lj=Rn(),Dj={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Lj.validateUnion,error:{message:"must match a schema in anyOf"}};Cm.default=Dj});var Aw=$(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});var pl=we(),Mj=Me(),Fj={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,pl._)`{passingSchemas: ${t.passing}}`},Uj={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Fj,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,Mj.alwaysValidSchema)(o,p)?e.var(c,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&e.if((0,pl._)`${c} && ${s}`).assign(s,!1).assign(a,(0,pl._)`[${a}, ${d}]`).else(),e.if(c,()=>{e.assign(s,!0),e.assign(a,d),f&&t.mergeEvaluated(f,pl.Name)})})}}};Im.default=Uj});var Cw=$(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});var qj=Me(),Zj={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,qj.alwaysValidSchema)(r,i))return;let a=t.subschema({keyword:"allOf",schemaProp:s},o);t.ok(o),t.mergeEvaluated(a)})}};Pm.default=Zj});var Ow=$(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});var dl=we(),Pw=Me(),Bj={message:({params:t})=>(0,dl.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,dl._)`{failingKeyword: ${t.ifClause}}`},Hj={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Bj,code(t){let{gen:e,parentSchema:n,it:r}=t;n.then===void 0&&n.else===void 0&&(0,Pw.checkStrictMode)(r,'"if" without "then" and "else" is ignored');let o=Iw(r,"then"),i=Iw(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,dl.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,dl._)`${p}`):t.setParams({ifClause:p})}}}};function Iw(t,e){let n=t.schema[e];return n!==void 0&&!(0,Pw.alwaysValidSchema)(t,n)}Om.default=Hj});var zw=$(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});var Vj=Me(),Gj={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:n}){e.if===void 0&&(0,Vj.checkStrictMode)(n,`"${t}" without "if" is ignored`)}};zm.default=Gj});var Nw=$(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});var Wj=ym(),Kj=pw(),Jj=xm(),Yj=fw(),Xj=mw(),Qj=yw(),eL=vw(),tL=Tm(),nL=ww(),rL=Ew(),oL=$w(),iL=Rw(),sL=Aw(),aL=Cw(),cL=Ow(),lL=zw();function uL(t=!1){let e=[oL.default,iL.default,sL.default,aL.default,cL.default,lL.default,eL.default,tL.default,Qj.default,nL.default,rL.default];return t?e.push(Kj.default,Yj.default):e.push(Wj.default,Jj.default),e.push(Xj.default),e}Nm.default=uL});var jw=$(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});var wt=we(),pL={message:({schemaCode:t})=>(0,wt.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,wt._)`{format: ${t}}`},dL={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:pL,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})`}}}};jm.default=dL});var Lw=$(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});var fL=jw(),mL=[fL.default];Lm.default=mL});var Dw=$(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 Fw=$(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});var hL=G_(),gL=aw(),yL=Nw(),xL=Lw(),Mw=Dw(),vL=[hL.default,gL.default,(0,yL.default)(),xL.default,Mw.metadataVocabulary,Mw.contentVocabulary];Dm.default=vL});var qw=$(fl=>{"use strict";Object.defineProperty(fl,"__esModule",{value:!0});fl.DiscrError=void 0;var Uw;(function(t){t.Tag="tag",t.Mapping="mapping"})(Uw||(fl.DiscrError=Uw={}))});var Bw=$(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});var ki=we(),Mm=qw(),Zw=Jc(),bL=Zs(),_L=Me(),wL={message:({params:{discrError:t,tagName:e}})=>t===Mm.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}}`},SL={keyword:"discriminator",type:"object",schemaType:"object",error:wL,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:Mm.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:Mm.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,_L.schemaHasRulesButRef)(E,i.self.RULES)){let j=E.$ref;if(E=Zw.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,j),E instanceof Zw.SchemaEnv&&(E=E.schema),E===void 0)throw new bL.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}}}};Fm.default=SL});var Hw=$((XH,kL)=>{kL.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 qm=$((lt,Um)=>{"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 TL=U_(),EL=Fw(),$L=Bw(),Vw=Hw(),RL=["/properties"],ml="http://json-schema.org/draft-07/schema",Ti=class extends TL.default{_addVocabularies(){super._addVocabularies(),EL.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword($L.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Vw,RL):Vw;this.addMetaSchema(e,ml,!1),this.refs["http://json-schema.org/schema"]=ml}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(ml)?ml:void 0)}};lt.Ajv=Ti;Um.exports=lt=Ti;Um.exports.Ajv=Ti;Object.defineProperty(lt,"__esModule",{value:!0});lt.default=Ti;var AL=qs();Object.defineProperty(lt,"KeywordCxt",{enumerable:!0,get:function(){return AL.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 CL=Wc();Object.defineProperty(lt,"ValidationError",{enumerable:!0,get:function(){return CL.default}});var IL=Zs();Object.defineProperty(lt,"MissingRefError",{enumerable:!0,get:function(){return IL.default}})});var e0=$(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(Jw,Vm),time:er(Bm(!0),Gm),"date-time":er(Gw(!0),Xw),"iso-time":er(Bm(),Yw),"iso-date-time":er(Gw(),Qw),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:LL,"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:BL,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:DL,int32:{type:"number",validate:UL},int64:{type:"number",validate:qL},float:{type:"number",validate:Kw},double:{type:"number",validate:Kw},password:!0,binary:!0};tr.fastFormats={...tr.fullFormats,date:er(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Vm),time:er(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Gm),"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,Xw),"iso-time":er(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Yw),"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,Qw),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 PL(t){return t%4===0&&(t%100!==0||t%400===0)}var OL=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,zL=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Jw(t){let e=OL.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&&PL(n)?29:zL[r])}function Vm(t,e){if(t&&e)return t>e?1:t<e?-1:0}var Zm=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Bm(t){return function(n){let r=Zm.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 Gm(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 Yw(t,e){if(!(t&&e))return;let n=Zm.exec(t),r=Zm.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 Hm=/t|\s/i;function Gw(t){let e=Bm(t);return function(r){let o=r.split(Hm);return o.length===2&&Jw(o[0])&&e(o[1])}}function Xw(t,e){if(!(t&&e))return;let n=new Date(t).valueOf(),r=new Date(e).valueOf();if(n&&r)return n-r}function Qw(t,e){if(!(t&&e))return;let[n,r]=t.split(Hm),[o,i]=e.split(Hm),s=Vm(n,o);if(s!==void 0)return s||Gm(r,i)}var NL=/\/|:/,jL=/^(?:[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 LL(t){return NL.test(t)&&jL.test(t)}var Ww=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function DL(t){return Ww.lastIndex=0,Ww.test(t)}var ML=-(2**31),FL=2**31-1;function UL(t){return Number.isInteger(t)&&t<=FL&&t>=ML}function qL(t){return Number.isInteger(t)}function Kw(){return!0}var ZL=/[^\\]\\Z/;function BL(t){if(ZL.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var t0=$($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0});$i.formatLimitDefinition=void 0;var HL=qm(),qn=we(),Mr=qn.operators,hl={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}},VL={message:({keyword:t,schemaCode:e})=>(0,qn.str)`should be ${hl[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,qn._)`{comparison: ${hl[t].okStr}, limit: ${e}}`};$i.formatLimitDefinition={keyword:Object.keys(hl),type:"string",schemaType:"string",$data:!0,error:VL,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 HL.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}) ${hl[o].fail} 0`}},dependencies:["format"]};var GL=t=>(t.addKeyword($i.formatLimitDefinition),t);$i.default=GL});var i0=$((ra,o0)=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});var Ri=e0(),WL=t0(),Wm=we(),n0=new Wm.Name("fullFormats"),KL=new Wm.Name("fastFormats"),Km=(t,e={keywords:!0})=>{if(Array.isArray(e))return r0(t,e,Ri.fullFormats,n0),t;let[n,r]=e.mode==="fast"?[Ri.fastFormats,KL]:[Ri.fullFormats,n0],o=e.formats||Ri.formatNames;return r0(t,o,n,r),e.keywords&&(0,WL.default)(t),t};Km.get=(t,e="full")=>{let r=(e==="fast"?Ri.fastFormats:Ri.fullFormats)[t];if(!r)throw new Error(`Unknown format "${t}"`);return r};function r0(t,e,n,r){var o,i;(o=(i=t.opts.code).formats)!==null&&o!==void 0||(i.formats=(0,Wm._)`require("ajv-formats/dist/formats").${r}`);for(let s of e)t.addFormat(s,n[s])}o0.exports=ra=Km;Object.defineProperty(ra,"__esModule",{value:!0});ra.default=Km});var O0=$((WV,P0)=>{var I0=require("stream").Stream,iM=require("util");P0.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=[]}iM.inherits(Bn,I0);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=I0.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 L0=$((KV,j0)=>{var sM=require("util"),N0=require("stream").Stream,z0=O0();j0.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}sM.inherits(_t,N0);_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 z0)){var n=z0.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 N0.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 D0=$((JV,aM)=>{aM.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 F0=$((YV,M0)=>{M0.exports=D0()});var Z0=$(fn=>{"use strict";var $l=F0(),cM=require("path").extname,U0=/^\s*([^;\s]*)(?:;|\s|$)/,lM=/^text\//i;fn.charset=q0;fn.charsets={lookup:q0};fn.contentType=uM;fn.extension=pM;fn.extensions=Object.create(null);fn.lookup=dM;fn.types=Object.create(null);fM(fn.extensions,fn.types);function q0(t){if(!t||typeof t!="string")return!1;var e=U0.exec(t),n=e&&$l[e[1].toLowerCase()];return n&&n.charset?n.charset:e&&lM.test(e[1])?"UTF-8":!1}function uM(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 pM(t){if(!t||typeof t!="string")return!1;var e=U0.exec(t),n=e&&fn.extensions[e[1].toLowerCase()];return!n||!n.length?!1:n[0]}function dM(t){if(!t||typeof t!="string")return!1;var e=cM("x."+t).toLowerCase().substr(1);return e&&fn.types[e]||!1}function fM(t,e){var n=["nginx","apache",void 0,"iana"];Object.keys($l).forEach(function(o){var i=$l[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($l[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 H0=$((QV,B0)=>{B0.exports=mM;function mM(t){var e=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;e?e(t):setTimeout(t,0)}});var oh=$((e5,G0)=>{var V0=H0();G0.exports=hM;function hM(t){var e=!1;return V0(function(){e=!0}),function(r,o){e?t(r,o):V0(function(){t(r,o)})}}});var ih=$((t5,W0)=>{W0.exports=gM;function gM(t){Object.keys(t.jobs).forEach(yM.bind(t)),t.jobs={}}function yM(t){typeof this.jobs[t]=="function"&&this.jobs[t]()}});var sh=$((n5,J0)=>{var K0=oh(),xM=ih();J0.exports=vM;function vM(t,e,n,r){var o=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[o]=bM(e,o,t[o],function(i,s){o in n.jobs&&(delete n.jobs[o],i?xM(n):n.results[o]=s,r(i,n.results))})}function bM(t,e,n,r){var o;return t.length==2?o=t(n,K0(r)):o=t(n,e,K0(r)),o}});var ah=$((r5,Y0)=>{Y0.exports=_M;function _M(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 ch=$((o5,X0)=>{var wM=ih(),SM=oh();X0.exports=kM;function kM(t){Object.keys(this.jobs).length&&(this.index=this.size,wM(this),SM(t)(null,this.results))}});var eS=$((i5,Q0)=>{var TM=sh(),EM=ah(),$M=ch();Q0.exports=RM;function RM(t,e,n){for(var r=EM(t);r.index<(r.keyedList||t).length;)TM(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 $M.bind(r,n)}});var lh=$((s5,Rl)=>{var tS=sh(),AM=ah(),CM=ch();Rl.exports=IM;Rl.exports.ascending=nS;Rl.exports.descending=PM;function IM(t,e,n,r){var o=AM(t,n);return tS(t,e,o,function i(s,a){if(s){r(s,a);return}if(o.index++,o.index<(o.keyedList||t).length){tS(t,e,o,i);return}r(null,o.results)}),CM.bind(o,r)}function nS(t,e){return t<e?-1:t>e?1:0}function PM(t,e){return-1*nS(t,e)}});var oS=$((a5,rS)=>{var OM=lh();rS.exports=zM;function zM(t,e,n){return OM(t,e,null,n)}});var sS=$((c5,iS)=>{iS.exports={parallel:eS(),serial:oS(),serialOrdered:lh()}});var uh=$((l5,aS)=>{"use strict";aS.exports=Object});var lS=$((u5,cS)=>{"use strict";cS.exports=Error});var pS=$((p5,uS)=>{"use strict";uS.exports=EvalError});var fS=$((d5,dS)=>{"use strict";dS.exports=RangeError});var hS=$((f5,mS)=>{"use strict";mS.exports=ReferenceError});var yS=$((m5,gS)=>{"use strict";gS.exports=SyntaxError});var Al=$((h5,xS)=>{"use strict";xS.exports=TypeError});var bS=$((g5,vS)=>{"use strict";vS.exports=URIError});var wS=$((y5,_S)=>{"use strict";_S.exports=Math.abs});var kS=$((x5,SS)=>{"use strict";SS.exports=Math.floor});var ES=$((v5,TS)=>{"use strict";TS.exports=Math.max});var RS=$((b5,$S)=>{"use strict";$S.exports=Math.min});var CS=$((_5,AS)=>{"use strict";AS.exports=Math.pow});var PS=$((w5,IS)=>{"use strict";IS.exports=Math.round});var zS=$((S5,OS)=>{"use strict";OS.exports=Number.isNaN||function(e){return e!==e}});var jS=$((k5,NS)=>{"use strict";var NM=zS();NS.exports=function(e){return NM(e)||e===0?e:e<0?-1:1}});var DS=$((T5,LS)=>{"use strict";LS.exports=Object.getOwnPropertyDescriptor});var ph=$((E5,MS)=>{"use strict";var Cl=DS();if(Cl)try{Cl([],"length")}catch{Cl=null}MS.exports=Cl});var US=$(($5,FS)=>{"use strict";var Il=Object.defineProperty||!1;if(Il)try{Il({},"a",{value:1})}catch{Il=!1}FS.exports=Il});var dh=$((R5,qS)=>{"use strict";qS.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 HS=$((A5,BS)=>{"use strict";var ZS=typeof Symbol<"u"&&Symbol,jM=dh();BS.exports=function(){return typeof ZS!="function"||typeof Symbol!="function"||typeof ZS("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:jM()}});var fh=$((C5,VS)=>{"use strict";VS.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var mh=$((I5,GS)=>{"use strict";var LM=uh();GS.exports=LM.getPrototypeOf||null});var JS=$((P5,KS)=>{"use strict";var DM="Function.prototype.bind called on incompatible ",MM=Object.prototype.toString,FM=Math.max,UM="[object Function]",WS=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},ZM=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};KS.exports=function(e){var n=this;if(typeof n!="function"||MM.apply(n)!==UM)throw new TypeError(DM+n);for(var r=qM(arguments,1),o,i=function(){if(this instanceof o){var p=n.apply(this,WS(r,arguments));return Object(p)===p?p:this}return n.apply(e,WS(r,arguments))},s=FM(0,n.length-r.length),a=[],c=0;c<s;c++)a[c]="$"+c;if(o=Function("binder","return function ("+ZM(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 ua=$((O5,YS)=>{"use strict";var BM=JS();YS.exports=Function.prototype.bind||BM});var Pl=$((z5,XS)=>{"use strict";XS.exports=Function.prototype.call});var hh=$((N5,QS)=>{"use strict";QS.exports=Function.prototype.apply});var tk=$((j5,ek)=>{"use strict";ek.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var rk=$((L5,nk)=>{"use strict";var HM=ua(),VM=hh(),GM=Pl(),WM=tk();nk.exports=WM||HM.call(GM,VM)});var ik=$((D5,ok)=>{"use strict";var KM=ua(),JM=Al(),YM=Pl(),XM=rk();ok.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new JM("a function is required");return XM(KM,YM,e)}});var pk=$((M5,uk)=>{"use strict";var QM=ik(),sk=ph(),ck;try{ck=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var gh=!!ck&&sk&&sk(Object.prototype,"__proto__"),lk=Object,ak=lk.getPrototypeOf;uk.exports=gh&&typeof gh.get=="function"?QM([gh.get]):typeof ak=="function"?function(e){return ak(e==null?e:lk(e))}:!1});var gk=$((F5,hk)=>{"use strict";var dk=fh(),fk=mh(),mk=pk();hk.exports=dk?function(e){return dk(e)}:fk?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return fk(e)}:mk?function(e){return mk(e)}:null});var Ol=$((U5,yk)=>{"use strict";var e2=Function.prototype.call,t2=Object.prototype.hasOwnProperty,n2=ua();yk.exports=n2.call(e2,t2)});var kk=$((q5,Sk)=>{"use strict";var Ce,r2=uh(),o2=lS(),i2=pS(),s2=fS(),a2=hS(),Di=yS(),Li=Al(),c2=bS(),l2=wS(),u2=kS(),p2=ES(),d2=RS(),f2=CS(),m2=PS(),h2=jS(),_k=Function,yh=function(t){try{return _k('"use strict"; return ('+t+").constructor;")()}catch{}},pa=ph(),g2=US(),xh=function(){throw new Li},y2=pa?(function(){try{return arguments.callee,xh}catch{try{return pa(arguments,"callee").get}catch{return xh}}})():xh,Ni=HS()(),It=gk(),x2=mh(),v2=fh(),wk=hh(),da=Pl(),ji={},b2=typeof Uint8Array>"u"||!It?Ce:It(Uint8Array),jo={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ce:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ce:ArrayBuffer,"%ArrayIteratorPrototype%":Ni&&It?It([][Symbol.iterator]()):Ce,"%AsyncFromSyncIteratorPrototype%":Ce,"%AsyncFunction%":ji,"%AsyncGenerator%":ji,"%AsyncGeneratorFunction%":ji,"%AsyncIteratorPrototype%":ji,"%Atomics%":typeof Atomics>"u"?Ce:Atomics,"%BigInt%":typeof BigInt>"u"?Ce:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ce:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ce:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ce:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o2,"%eval%":eval,"%EvalError%":i2,"%Float16Array%":typeof Float16Array>"u"?Ce:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Ce:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ce:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ce:FinalizationRegistry,"%Function%":_k,"%GeneratorFunction%":ji,"%Int8Array%":typeof Int8Array>"u"?Ce:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ce:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ce:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ni&&It?It(It([][Symbol.iterator]())):Ce,"%JSON%":typeof JSON=="object"?JSON:Ce,"%Map%":typeof Map>"u"?Ce:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ni||!It?Ce:It(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r2,"%Object.getOwnPropertyDescriptor%":pa,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ce:Promise,"%Proxy%":typeof Proxy>"u"?Ce:Proxy,"%RangeError%":s2,"%ReferenceError%":a2,"%Reflect%":typeof Reflect>"u"?Ce:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ce:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ni||!It?Ce:It(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ce:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ni&&It?It(""[Symbol.iterator]()):Ce,"%Symbol%":Ni?Symbol:Ce,"%SyntaxError%":Di,"%ThrowTypeError%":y2,"%TypedArray%":b2,"%TypeError%":Li,"%Uint8Array%":typeof Uint8Array>"u"?Ce:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ce:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ce:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ce:Uint32Array,"%URIError%":c2,"%WeakMap%":typeof WeakMap>"u"?Ce:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ce:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ce:WeakSet,"%Function.prototype.call%":da,"%Function.prototype.apply%":wk,"%Object.defineProperty%":g2,"%Object.getPrototypeOf%":x2,"%Math.abs%":l2,"%Math.floor%":u2,"%Math.max%":p2,"%Math.min%":d2,"%Math.pow%":f2,"%Math.round%":m2,"%Math.sign%":h2,"%Reflect.getPrototypeOf%":v2};if(It)try{null.error}catch(t){xk=It(It(t)),jo["%Error.prototype%"]=xk}var xk,_2=function t(e){var n;if(e==="%AsyncFunction%")n=yh("async function () {}");else if(e==="%GeneratorFunction%")n=yh("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=yh("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 jo[e]=n,n},vk={__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"]},fa=ua(),zl=Ol(),w2=fa.call(da,Array.prototype.concat),S2=fa.call(wk,Array.prototype.splice),bk=fa.call(da,String.prototype.replace),Nl=fa.call(da,String.prototype.slice),k2=fa.call(da,RegExp.prototype.exec),T2=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,E2=/\\(\\)?/g,$2=function(e){var n=Nl(e,0,1),r=Nl(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 bk(e,T2,function(i,s,a,c){o[o.length]=a?bk(c,E2,"$1"):s||i}),o},R2=function(e,n){var r=e,o;if(zl(vk,r)&&(o=vk[r],r="%"+o[0]+"%"),zl(jo,r)){var i=jo[r];if(i===ji&&(i=_2(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!")};Sk.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(k2(/^%?[^%]*%?$/,e)===null)throw new Di("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=$2(e),o=r.length>0?r[0]:"",i=R2("%"+o+"%",n),s=i.name,a=i.value,c=!1,l=i.alias;l&&(o=l[0],S2(r,w2([0,1],l)));for(var p=1,d=!0;p<r.length;p+=1){var f=r[p],h=Nl(f,0,1),y=Nl(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+"%",zl(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(pa&&p+1>=r.length){var v=pa(a,f);d=!!v,d&&"get"in v&&!("originalValue"in v.get)?a=v.get:a=a[f]}else d=zl(a,f),a=a[f];d&&!c&&(jo[s]=a)}}return a}});var Ek=$((Z5,Tk)=>{"use strict";var A2=dh();Tk.exports=function(){return A2()&&!!Symbol.toStringTag}});var Ak=$((B5,Rk)=>{"use strict";var C2=kk(),$k=C2("%Object.defineProperty%",!0),I2=Ek()(),P2=Ol(),O2=Al(),jl=I2?Symbol.toStringTag:null;Rk.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 O2("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");jl&&(r||!P2(e,jl))&&($k?$k(e,jl,{configurable:!o,enumerable:!1,value:n,writable:!1}):e[jl]=n)}});var Ik=$((H5,Ck)=>{"use strict";Ck.exports=function(t,e){return Object.keys(e).forEach(function(n){t[n]=t[n]||e[n]}),t}});var zk=$((V5,Ok)=>{"use strict";var wh=L0(),z2=require("util"),vh=require("path"),N2=require("http"),j2=require("https"),L2=require("url").parse,D2=require("fs"),M2=require("stream").Stream,F2=require("crypto"),bh=Z0(),U2=sS(),q2=Ak(),Ur=Ol(),_h=Ik();function Pk(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=[],wh.call(this),t=t||{};for(var e in t)this[e]=t[e]}z2.inherits(Ue,wh);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=wh.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 M2))&&(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)):D2.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="'+Pk(t)+'"'].concat(r||[]),"Content-Type":[].concat(o||[])};typeof n.header=="object"&&_h(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=vh.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?n=vh.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&Ur(t,"httpVersion")&&(n=vh.basename(t.client._httpMessage.path||"")),n)return'filename="'+Pk(n)+'"'};Ue.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t&&t.name&&(n=bh.lookup(t.name)),!n&&t&&t.path&&(n=bh.lookup(t.path)),!n&&t&&t.readable&&Ur(t,"httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=bh.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="--------------------------"+F2.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}U2.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=L2(t),r=_h({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},o)):(r=_h(t,o),r.port||(r.port=r.protocol==="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol==="https:"?n=j2.request(r):n=N2.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");Ok.exports=Ue});var Xk=$((BG,Yk)=>{var Ui=1e3,qi=Ui*60,Zi=qi*60,Mo=Zi*24,cF=Mo*7,lF=Mo*365.25;Yk.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return uF(t);if(n==="number"&&isFinite(t))return e.long?dF(t):pF(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function uF(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*lF;case"weeks":case"week":case"w":return n*cF;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 pF(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 dF(t){var e=Math.abs(t);return e>=Mo?Ml(t,e,Mo,"day"):e>=Zi?Ml(t,e,Zi,"hour"):e>=qi?Ml(t,e,qi,"minute"):e>=Ui?Ml(t,e,Ui,"second"):t+" ms"}function Ml(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}});var Dh=$((HG,Qk)=>{function fF(t){n.debug=n,n.default=n,n.coerce=c,n.disable=s,n.enable=o,n.enabled=a,n.humanize=Xk(),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}Qk.exports=fF});var eT=$((mn,Fl)=>{mn.formatArgs=hF;mn.save=gF;mn.load=yF;mn.useColors=mF;mn.storage=xF();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 mF(){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 hF(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Fl.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 gF(t){try{t?mn.storage.setItem("debug",t):mn.storage.removeItem("debug")}catch{}}function yF(){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 xF(){try{return localStorage}catch{}}Fl.exports=Dh()(mn);var{formatters:vF}=Fl.exports;vF.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var nT=$((VG,tT)=>{"use strict";tT.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 iT=$((GG,oT)=>{"use strict";var bF=require("os"),rT=require("tty"),In=nT(),{env:Pt}=process,Br;In("no-color")||In("no-colors")||In("color=false")||In("color=never")?Br=0:(In("color")||In("colors")||In("color=true")||In("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 Mh(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Fh(t,e){if(Br===0)return 0;if(In("color=16m")||In("color=full")||In("color=truecolor"))return 3;if(In("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=bF.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 _F(t){let e=Fh(t,t&&t.isTTY);return Mh(e)}oT.exports={supportsColor:_F,stdout:Mh(Fh(!0,rT.isatty(1))),stderr:Mh(Fh(!0,rT.isatty(2)))}});var aT=$((Ot,ql)=>{var wF=require("tty"),Ul=require("util");Ot.init=AF;Ot.log=EF;Ot.formatArgs=kF;Ot.save=$F;Ot.load=RF;Ot.useColors=SF;Ot.destroy=Ul.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=iT();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 SF(){return"colors"in Ot.inspectOpts?!!Ot.inspectOpts.colors:wF.isatty(process.stderr.fd)}function kF(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+"+Ul.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=xF()+e+" "+t[0]}function xF(){return Ot.inspectOpts.hideDate?"":new Date().toISOString()+" "}function vF(...t){return process.stderr.write(Fl.formatWithOptions(Ot.inspectOpts,...t)+`
13
- `)}function bF(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function _F(){return process.env.DEBUG}function wF(t){t.inspectOpts={};let e=Object.keys(Ot.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=Ot.inspectOpts[e[n]]}Ul.exports=Lh()(Ot);var{formatters:tT}=Ul.exports;tT.o=function(t){return this.inspectOpts.colors=this.useColors,Fl.inspect(t,this.inspectOpts).split(`
14
- `).map(e=>e.trim()).join(" ")};tT.O=function(t){return this.inspectOpts.colors=this.useColors,Fl.inspect(t,this.inspectOpts)}});var Fo=$((NG,Fh)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Fh.exports=Kk():Fh.exports=nT()});var rT=$(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});function SF(t){return function(e,n){return new Promise((r,o)=>{t.call(this,e,n,(i,s)=>{i?o(i):r(s)})})}}Uh.default=SF});var sT=$((Zh,iT)=>{"use strict";var oT=Zh&&Zh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},kF=require("events"),TF=oT(Fo()),EF=oT(rT()),ha=TF.default("agent-base");function $F(t){return!!t&&typeof t.addRequest=="function"}function qh(){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 ql(t,e){return new ql.Agent(t,e)}(function(t){class e extends kF.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:qh()?443:80}set defaultPort(r){this.explicitDefaultPort=r}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:qh()?"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=qh()),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),$F(h)){ha("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?(ha("Converting legacy callback function to promise"),this.promisifiedCallback=EF.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{ha("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){ha("Freeing socket %o %o",r.constructor.name,o),r.destroy()}destroy(){ha("Destroying agent %o",this.constructor.name)}}t.Agent=e,t.prototype=t.Agent.prototype})(ql||(ql={}));iT.exports=ql});var aT=$(ya=>{"use strict";var RF=ya&&ya.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ya,"__esModule",{value:!0});var AF=RF(Fo()),ga=AF.default("https-proxy-agent:parse-proxy-response");function IF(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){ga("onclose had error %o",d)}function c(){ga("onend")}function l(d){s(),ga("onerror %o",d),n(d)}function p(d){o.push(d),r+=d.length;let f=Buffer.concat(o,r);if(f.indexOf(`\r
12
+ `+i),t.push(o+"m+"+ql.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=TF()+e+" "+t[0]}function TF(){return Ot.inspectOpts.hideDate?"":new Date().toISOString()+" "}function EF(...t){return process.stderr.write(Ul.formatWithOptions(Ot.inspectOpts,...t)+`
13
+ `)}function $F(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function RF(){return process.env.DEBUG}function AF(t){t.inspectOpts={};let e=Object.keys(Ot.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=Ot.inspectOpts[e[n]]}ql.exports=Dh()(Ot);var{formatters:sT}=ql.exports;sT.o=function(t){return this.inspectOpts.colors=this.useColors,Ul.inspect(t,this.inspectOpts).split(`
14
+ `).map(e=>e.trim()).join(" ")};sT.O=function(t){return this.inspectOpts.colors=this.useColors,Ul.inspect(t,this.inspectOpts)}});var Fo=$((WG,Uh)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Uh.exports=eT():Uh.exports=aT()});var cT=$(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});function CF(t){return function(e,n){return new Promise((r,o)=>{t.call(this,e,n,(i,s)=>{i?o(i):r(s)})})}}qh.default=CF});var pT=$((Bh,uT)=>{"use strict";var lT=Bh&&Bh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},IF=require("events"),PF=lT(Fo()),OF=lT(cT()),ga=PF.default("agent-base");function zF(t){return!!t&&typeof t.addRequest=="function"}function Zh(){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 Zl(t,e){return new Zl.Agent(t,e)}(function(t){class e extends IF.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:Zh()?443:80}set defaultPort(r){this.explicitDefaultPort=r}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:Zh()?"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=Zh()),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),zF(h)){ga("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?(ga("Converting legacy callback function to promise"),this.promisifiedCallback=OF.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{ga("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){ga("Freeing socket %o %o",r.constructor.name,o),r.destroy()}destroy(){ga("Destroying agent %o",this.constructor.name)}}t.Agent=e,t.prototype=t.Agent.prototype})(Zl||(Zl={}));uT.exports=Zl});var dT=$(xa=>{"use strict";var NF=xa&&xa.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xa,"__esModule",{value:!0});var jF=NF(Fo()),ya=jF.default("https-proxy-agent:parse-proxy-response");function LF(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){ya("onclose had error %o",d)}function c(){ya("onend")}function l(d){s(),ya("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){ga("have not received end of HTTP headers yet..."),i();return}let y=f.toString("ascii",0,f.indexOf(`\r
18
- `)),v=+y.split(" ")[1];ga("got proxy server response: %o",y),e({statusCode:v,buffered:f})}t.on("error",l),t.on("close",a),t.on("end",c),i()})}ya.default=IF});var uT=$(Uo=>{"use strict";var CF=Uo&&Uo.__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())})},Bi=Uo&&Uo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Uo,"__esModule",{value:!0});var cT=Bi(require("net")),lT=Bi(require("tls")),PF=Bi(require("url")),OF=Bi(require("assert")),zF=Bi(Fo()),NF=sT(),jF=Bi(aT()),xa=zF.default("https-proxy-agent:agent"),Bh=class extends NF.Agent{constructor(e){let n;if(typeof e=="string"?n=PF.default.parse(e):n=e,!n)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");xa("creating new HttpsProxyAgent instance: %o",n),super(n);let r=Object.assign({},n);this.secureProxy=n.secureProxy||MF(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 CF(this,void 0,void 0,function*(){let{proxy:r,secureProxy:o}=this,i;o?(xa("Creating `tls.Socket`: %o",r),i=lT.default.connect(r)):(xa("Creating `net.Socket`: %o",r),i=cT.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;DF(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=jF.default(i);i.write(`${c}\r
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){ya("have not received end of HTTP headers yet..."),i();return}let y=f.toString("ascii",0,f.indexOf(`\r
18
+ `)),v=+y.split(" ")[1];ya("got proxy server response: %o",y),e({statusCode:v,buffered:f})}t.on("error",l),t.on("close",a),t.on("end",c),i()})}xa.default=LF});var hT=$(Uo=>{"use strict";var DF=Uo&&Uo.__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())})},Bi=Uo&&Uo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Uo,"__esModule",{value:!0});var fT=Bi(require("net")),mT=Bi(require("tls")),MF=Bi(require("url")),FF=Bi(require("assert")),UF=Bi(Fo()),qF=pT(),ZF=Bi(dT()),va=UF.default("https-proxy-agent:agent"),Hh=class extends qF.Agent{constructor(e){let n;if(typeof e=="string"?n=MF.default.parse(e):n=e,!n)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");va("creating new HttpsProxyAgent instance: %o",n),super(n);let r=Object.assign({},n);this.secureProxy=n.secureProxy||VF(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 DF(this,void 0,void 0,function*(){let{proxy:r,secureProxy:o}=this,i;o?(va("Creating `tls.Socket`: %o",r),i=mT.default.connect(r)):(va("Creating `net.Socket`: %o",r),i=fT.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;HF(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=ZF.default(i);i.write(`${c}\r
21
+ `);let{statusCode:h,buffered:y}=yield f;if(h===200){if(e.once("socket",BF),n.secureEndpoint){va("Upgrading socket connection to TLS");let x=n.servername||n.host;return mT.default.connect(Object.assign(Object.assign({},GF(n,"host","hostname","path","port")),{socket:i,servername:x}))}return i}i.destroy();let v=new fT.default.Socket({writable:!1});return v.readable=!0,e.once("socket",x=>{va("replaying proxy buffer for failed request"),FF.default(x.listenerCount("data")>0),x.push(y),x.push(null)}),v})}};Uo.default=Hh;function BF(t){t.resume()}function HF(t,e){return!!(!e&&t===80||e&&t===443)}function VF(t){return typeof t=="string"?/^https:?$/i.test(t):!1}function GF(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}});var yT=$((Wh,gT)=>{"use strict";var WF=Wh&&Wh.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},Vh=WF(hT());function Gh(t){return new Vh.default(t)}(function(t){t.HttpsProxyAgent=Vh.default,t.prototype=Vh.default.prototype})(Gh||(Gh={}));gT.exports=Gh});var vT=$((XG,xT)=>{var ba;xT.exports=function(){if(!ba){try{ba=Fo()("follow-redirects")}catch{}typeof ba!="function"&&(ba=function(){})}ba.apply(null,arguments)}});var kT=$((QG,sg)=>{var wa=require("url"),_a=wa.URL,KF=require("http"),JF=require("https"),Qh=require("stream").Writable,eg=require("assert"),bT=vT();(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 tg=!1;try{eg(new _a(""))}catch(t){tg=t.code==="ERR_INVALID_URL"}var YF=["Authorization","Proxy-Authorization","Cookie"],XF=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],ng=["abort","aborted","connect","error","socket","timeout"],rg=Object.create(null);ng.forEach(function(t){rg[t]=function(e,n,r){this._redirectable.emit(t,e,n,r)}});var Jh=Sa("ERR_INVALID_URL","Invalid URL",TypeError),Yh=Sa("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),QF=Sa("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Yh),eU=Sa("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),tU=Sa("ERR_STREAM_WRITE_AFTER_END","write after end"),nU=Qh.prototype.destroy||wT;function hn(t,e){Qh.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 Yh?o:new Yh({cause:o}))}},this._headerFilter=new RegExp("^(?:"+YF.concat(t.sensitiveHeaders).map(cU).join("|")+")$","i"),this._performRequest()}hn.prototype=Object.create(Qh.prototype);hn.prototype.abort=function(){ig(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};hn.prototype.destroy=function(t){return ig(this._currentRequest,t),nU.call(this,t),this};hn.prototype.write=function(t,e,n){if(this._ending)throw new tU;if(!qo(t)&&!sU(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 eU),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={}),iU(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 ng)r.on(o,rg[o]);if(this._currentUrl=/^\//.test(this._options.path)?wa.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(ig(this._currentRequest),t.destroy(),++this._redirectCount>this._options.maxRedirects)throw new QF;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=[],Kh(/^content-/i,this._options.headers));var s=Kh(/^host$/i,this._options.headers),a=og(this._currentUrl),c=s||a.host,l=/^\w+:/.test(n)?this._currentUrl:wa.format(Object.assign(a,{host:c})),p=rU(n,l);if(bT("redirecting to",p.href),this._isRedirect=!0,Xh(p,this._options),(p.protocol!==a.protocol&&p.protocol!=="https:"||p.host!==c&&!oU(p.host,c))&&Kh(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 _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 aU(l)?l=Xh(l):qo(l)?l=Xh(og(l)):(d=p,p=ST(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"),eg.equal(p.protocol,o,"protocol mismatch"),bT("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 wT(){}function og(t){var e;if(tg)e=new _a(t);else if(e=ST(wa.parse(t)),!qo(e.protocol))throw new Jh({input:t});return e}function rU(t,e){return tg?new _a(t,e):og(wa.resolve(e,t))}function ST(t){if(/^\[/.test(t.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(t.hostname))throw new Jh({input:t.href||t});if(/^\[/.test(t.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(t.host))throw new Jh({input:t.href||t});return t}function Xh(t,e){var n=e||{};for(var r of XF)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 Kh(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 Sa(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 ig(t,e){for(var n of ng)t.removeListener(n,rg[n]);t.on("error",wT),t.destroy(e)}function oU(t,e){eg(qo(t)&&qo(e));var n=t.length-e.length-1;return n>0&&t[n]==="."&&t.endsWith(e)}function iU(t){return t instanceof Array}function qo(t){return typeof t=="string"||t instanceof String}function Zo(t){return typeof t=="function"}function sU(t){return typeof t=="object"&&"length"in t}function aU(t){return _a&&t instanceof _a}function cU(t){return t.replace(/[\]\\/()*+?.$]/g,"\\$&")}sg.exports=_T({http:KF,https:JF});sg.exports.wrap=_T});var Y={};Na(Y,{BRAND:()=>vR,DIRTY:()=>Qr,EMPTY_PATH:()=>Y$,INVALID:()=>le,NEVER:()=>nA,OK:()=>Ht,ParseStatus:()=>Nt,Schema:()=>_e,ZodAny:()=>kr,ZodArray:()=>dr,ZodBigInt:()=>to,ZodBoolean:()=>no,ZodBranded:()=>ns,ZodCatch:()=>mo,ZodDate:()=>ro,ZodDefault:()=>fo,ZodDiscriminatedUnion:()=>Da,ZodEffects:()=>Sn,ZodEnum:()=>uo,ZodError:()=>rn,ZodFirstPartyTypeKind:()=>q,ZodFunction:()=>Fa,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:()=>rs,ZodPromise:()=>Tr,ZodReadonly:()=>ho,ZodRecord:()=>Ma,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:()=>RR,array:()=>PR,bigint:()=>SR,boolean:()=>Iy,coerce:()=>tA,custom:()=>Ry,date:()=>kR,datetimeRegex:()=>Ey,defaultErrorMap:()=>lr,discriminatedUnion:()=>NR,effect:()=>GR,enum:()=>BR,function:()=>UR,getErrorMap:()=>Wo,getParsedType:()=>Gn,instanceof:()=>_R,intersection:()=>jR,isAborted:()=>ja,isAsync:()=>Ko,isDirty:()=>La,isValid:()=>wr,late:()=>bR,lazy:()=>qR,literal:()=>ZR,makeIssue:()=>ts,map:()=>MR,nan:()=>wR,nativeEnum:()=>HR,never:()=>CR,null:()=>$R,nullable:()=>KR,number:()=>Cy,object:()=>Tu,objectUtil:()=>wu,oboolean:()=>eA,onumber:()=>QR,optional:()=>WR,ostring:()=>XR,pipeline:()=>YR,preprocess:()=>JR,promise:()=>VR,quotelessJson:()=>W$,record:()=>DR,set:()=>FR,setErrorMap:()=>J$,strictObject:()=>OR,string:()=>Ay,symbol:()=>TR,transformer:()=>GR,tuple:()=>LR,undefined:()=>ER,union:()=>zR,unknown:()=>AR,util:()=>Ae,void:()=>IR});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 wu;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(wu||(wu={}));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"]),W$=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 K$=(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=K$;var _y=lr;function J$(t){_y=t}function Wo(){return _y}var ts=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}},Y$=[];function H(t,e){let n=Wo(),r=ts({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}),ja=t=>t.status==="aborted",La=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}},wy=(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 wy(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 wy(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 ns({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 rs.create(this,e)}readonly(){return ho.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},X$=/^c[^\s-]{8,}$/i,Q$=/^[0-9a-z]+$/,eR=/^[0-9A-HJKMNP-TV-Z]{26}$/i,tR=/^[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,nR=/^[a-z0-9_-]{21}$/i,rR=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,oR=/^[-+]?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)?)??$/,iR=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,sR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Su,aR=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,cR=/^(?:(?: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])$/,lR=/^(([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]))$/,uR=/^(([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])$/,pR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ky="((\\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])))",fR=new RegExp(`^${ky}$`);function Ty(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 mR(t){return new RegExp(`^${Ty(t)}$`)}function Ey(t){let e=`${ky}T${Ty(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 hR(t,e){return!!((e==="v4"||!e)&&aR.test(t)||(e==="v6"||!e)&&lR.test(t))}function gR(t,e){if(!rR.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 yR(t,e){return!!((e==="v4"||!e)&&cR.test(t)||(e==="v6"||!e)&&uR.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")iR.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")Su||(Su=new RegExp(sR,"u")),Su.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")tR.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")nR.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")X$.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")Q$.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")eR.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"?Ey(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"?fR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{code:U.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?mR(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"?oR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"duration",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?hR(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"?gR(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"?yR(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"?pR.test(e.data)||(o=this._getOrReturnCtx(e,o),H(o,{validation:"base64",code:U.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?dR.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 xR(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"?xR(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 $y(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 ns||t instanceof ho?ur(t.unwrap()):t instanceof mo?ur(t._def.innerType):[],Da=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 ku(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=ku(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=ku(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(ja(i)||ja(s))return le;let a=ku(i.value,s.value);return a.valid?((La(i)||La(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 Ma=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 Fa=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 ts({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 ts({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 $y(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=$y;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 vR=Symbol("zod_brand"),ns=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}},rs=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 Sy(t,e){let n=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof n=="string"?{message:n}:n}function Ry(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=Sy(e,r),c=a.fatal??n??!0;o.addIssue({code:"custom",...a,fatal:c})}});if(!i){let s=Sy(e,r),a=s.fatal??n??!0;o.addIssue({code:"custom",...s,fatal:a})}}):kr.create()}var bR={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 _R=(t,e={message:`Input not instance of ${t.name}`})=>Ry(n=>n instanceof t,e),Ay=Sr.create,Cy=eo.create,wR=ti.create,SR=to.create,Iy=no.create,kR=ro.create,TR=Yo.create,ER=oo.create,$R=io.create,RR=kr.create,AR=pr.create,CR=zn.create,IR=Xo.create,PR=dr.create,Tu=sn.create,OR=sn.strictCreate,zR=so.create,NR=Da.create,jR=ao.create,LR=Wn.create,DR=Ma.create,MR=Qo.create,FR=ei.create,UR=Fa.create,qR=co.create,ZR=lo.create,BR=uo.create,HR=po.create,VR=Tr.create,GR=Sn.create,WR=on.create,KR=Kn.create,JR=Sn.createWithPreprocess,YR=rs.create,XR=()=>Ay().optional(),QR=()=>Cy().optional(),eA=()=>Iy().optional(),tA={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 nA=le;var rA=Object.freeze({status:"aborted"});function C(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 oA=Symbol("zod_brand"),fr=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ua={};function gn(t){return t&&Object.assign(Ua,t),Ua}var Ie={};Na(Ie,{BIGINT_FORMAT_RANGES:()=>Oy,Class:()=>$u,NUMBER_FORMAT_RANGES:()=>zu,aborted:()=>yo,allowsEval:()=>Iu,assert:()=>lA,assertEqual:()=>iA,assertIs:()=>aA,assertNever:()=>cA,assertNotEqual:()=>sA,assignProp:()=>Cu,cached:()=>ss,captureStackTrace:()=>Za,cleanEnum:()=>wA,cleanRegex:()=>cs,clone:()=>yn,createTransparentProxy:()=>hA,defineLazy:()=>et,esc:()=>go,escapeRegex:()=>Er,extend:()=>xA,finalizeIssue:()=>Nn,floatSafeRemainder:()=>Au,getElementAtPath:()=>uA,getEnumValues:()=>is,getLengthableOrigin:()=>ls,getParsedType:()=>mA,getSizableOrigin:()=>zy,isObject:()=>ni,isPlainObject:()=>ri,issue:()=>Nu,joinValues:()=>qa,jsonStringifyReplacer:()=>Ru,merge:()=>vA,normalizeParams:()=>ue,nullish:()=>as,numKeys:()=>fA,omit:()=>yA,optionalKeys:()=>Ou,partial:()=>bA,pick:()=>gA,prefixIssues:()=>Jn,primitiveTypes:()=>Py,promiseAllObject:()=>pA,propertyKeyTypes:()=>Pu,randomString:()=>dA,required:()=>_A,stringifyPrimitive:()=>Ba,unwrapMessage:()=>os});function iA(t){return t}function sA(t){return t}function aA(t){}function cA(t){throw new Error}function lA(t){}function is(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 qa(t,e="|"){return t.map(n=>Ba(n)).join(e)}function Ru(t,e){return typeof e=="bigint"?e.toString():e}function ss(t){return{get value(){{let n=t();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function as(t){return t==null}function cs(t){let e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function Au(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 Cu(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function uA(t,e){return e?e.reduce((n,r)=>n==null?void 0:n[r],t):t}function pA(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 dA(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 Za=Error.captureStackTrace?Error.captureStackTrace:(...t)=>{};function ni(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var Iu=ss(()=>{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 fA(t){let e=0;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}var mA=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}`)}},Pu=new Set(["string","number","symbol"]),Py=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 hA(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 Ba(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Ou(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var zu={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]},Oy={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function gA(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 yA(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 xA(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 Cu(this,"shape",r),r},checks:[]};return yn(t,n)}function vA(t,e){return yn(t,{...t._zod.def,get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return Cu(this,"shape",n),n},catchall:e._zod.def.catchall,checks:[]})}function bA(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 _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 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 os(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=os((s=(i=(o=t.inst)==null?void 0:o._zod.def)==null?void 0:i.error)==null?void 0:s.call(i,t))??os((a=e==null?void 0:e.error)==null?void 0:a.call(e,t))??os((c=n.customError)==null?void 0:c.call(n,t))??os((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 zy(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function ls(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Nu(...t){let[e,n,r]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:r}:{...e}}function wA(t){return Object.entries(t).filter(([e,n])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}var $u=class{constructor(...e){}};var Ny=(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,Ru,2)},enumerable:!0}),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Ha=C("$ZodError",Ny),us=C("$ZodError",Ny,{Parent:Error});function ju(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 Lu(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 Du=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 Za(a,o==null?void 0:o.callee),a}return s.value},Mu=Du(us),Fu=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 Za(a,o==null?void 0:o.callee),a}return s.value},Uu=Fu(us),qu=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??Ha)(i.issues.map(s=>Nn(s,o,gn())))}:{success:!0,data:i.value}},xo=qu(us),Zu=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=Zu(us);var jy=/^[cC][^\s-]{8,}$/,Ly=/^[0-9a-z]+$/,Dy=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,My=/^[0-9a-vA-V]{20}$/,Fy=/^[A-Za-z0-9]{27}$/,Uy=/^[a-zA-Z0-9_-]{21}$/,qy=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var Zy=/^([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})$/,Bu=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 By=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var kA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Hy(){return new RegExp(kA,"u")}var Vy=/^(?:(?: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])$/,Gy=/^(([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})$/,Wy=/^((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])$/,Ky=/^(([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])$/,Jy=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Hu=/^[A-Za-z0-9_-]*$/,Yy=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;var Xy=/^\+(?:[0-9]){6,14}[0-9]$/,Qy="(?:(?:\\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])))",ex=new RegExp(`^${Qy}$`);function tx(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 nx(t){return new RegExp(`^${tx(t)}$`)}function rx(t){let e=tx({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(`^${Qy}T(?:${r})$`)}var ox=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 ix=/^\d+$/,sx=/^-?\d+(?:\.\d+)?/i,ax=/true|false/i,cx=/null/i;var lx=/^[^A-Z]*$/,ux=/^[^a-z]*$/;var jt=C("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),px={number:"number",bigint:"bigint",object:"date"},Vu=C("$ZodCheckLessThan",(t,e)=>{jt.init(t,e);let n=px[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})}}),Gu=C("$ZodCheckGreaterThan",(t,e)=>{jt.init(t,e);let n=px[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})}}),dx=C("$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):Au(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})}}),fx=C("$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]=zu[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=ix)}),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 mx=C("$ZodCheckMaxLength",(t,e)=>{var n;jt.init(t,e),(n=t._zod.def).when??(n.when=r=>{let o=r.value;return!as(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=ls(o);r.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),hx=C("$ZodCheckMinLength",(t,e)=>{var n;jt.init(t,e),(n=t._zod.def).when??(n.when=r=>{let o=r.value;return!as(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=ls(o);r.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:o,inst:t,continue:!e.abort})}}),gx=C("$ZodCheckLengthEquals",(t,e)=>{var n;jt.init(t,e),(n=t._zod.def).when??(n.when=r=>{let o=r.value;return!as(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=ls(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})}}),ps=C("$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=()=>{})}),yx=C("$ZodCheckRegex",(t,e)=>{ps.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})}}),xx=C("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=lx),ps.init(t,e)}),vx=C("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=ux),ps.init(t,e)}),bx=C("$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})}}),_x=C("$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})}}),wx=C("$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 Sx=C("$ZodCheckOverwrite",(t,e)=>{jt.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});var Ga=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 bx={major:4,minor:0,patch:0};var Ke=I("$ZodType",(t,e)=>{var o;var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=bx;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=yo(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 fr;if(p||h instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await h,s.issues.length!==f&&(l||(l=yo(s,f)))});else{if(s.issues.length===f)continue;l||(l=yo(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 fr;return c.then(l=>i(l,r,a))}return i(c,r,a)}}t["~standard"]={validate:i=>{var s;try{let a=xo(t,i);return a.success?{value:a.data}:{issues:(s=a.error)==null?void 0:s.issues}}catch{return vo(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}}),ps=I("$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()??Qy(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=I("$ZodStringFormat",(t,e)=>{us.init(t,e),ps.init(t,e)}),Wu=I("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Dy),tt.init(t,e)}),Ku=I("$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=Zu(r))}else e.pattern??(e.pattern=Zu());tt.init(t,e)}),Ju=I("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=My),tt.init(t,e)}),Yu=I("$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:Vy.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})}}}),Xu=I("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Fy()),tt.init(t,e)}),Qu=I("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=jy),tt.init(t,e)}),ep=I("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Cy),tt.init(t,e)}),tp=I("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Py),tt.init(t,e)}),np=I("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Oy),tt.init(t,e)}),rp=I("$ZodXID",(t,e)=>{e.pattern??(e.pattern=zy),tt.init(t,e)}),op=I("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Ny),tt.init(t,e)}),Ix=I("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Xy(e)),tt.init(t,e)}),Cx=I("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Ky),tt.init(t,e)}),Px=I("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Yy(e)),tt.init(t,e)}),Ox=I("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Ly),tt.init(t,e)}),ip=I("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Uy),tt.init(t,e),t._zod.onattach.push(n=>{let r=n._zod.bag;r.format="ipv4"})}),sp=I("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=qy),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})}}}),ap=I("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Zy),tt.init(t,e)}),cp=I("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=By),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 zx(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var lp=I("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Hy),tt.init(t,e),t._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),t._zod.check=n=>{zx(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}});function vA(t){if(!Bu.test(t))return!1;let e=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return zx(n)}var up=I("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Bu),tt.init(t,e),t._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),t._zod.check=n=>{vA(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),pp=I("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Gy),tt.init(t,e)});function bA(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 dp=I("$ZodJWT",(t,e)=>{tt.init(t,e),t._zod.check=n=>{bA(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}});var Wa=I("$ZodNumber",(t,e)=>{Ke.init(t,e),t._zod.pattern=t._zod.bag.pattern??tx,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}}),fp=I("$ZodNumber",(t,e)=>{cx.init(t,e),Wa.init(t,e)}),mp=I("$ZodBoolean",(t,e)=>{Ke.init(t,e),t._zod.pattern=nx,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 hp=I("$ZodNull",(t,e)=>{Ke.init(t,e),t._zod.pattern=rx,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 gp=I("$ZodUnknown",(t,e)=>{Ke.init(t,e),t._zod.parse=n=>n}),yp=I("$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 _x(t,e,n){t.issues.length&&e.issues.push(...Jn(n,t.issues)),e.value[n]=t.value}var xp=I("$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=>_x(l,n,s))):_x(c,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function Ga(t,e,n){t.issues.length&&e.issues.push(...Jn(n,t.issues)),e.value[n]=t.value}function wx(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(...Jn(n,t.issues)):t.value===void 0?n in r&&(e.value[n]=void 0):e.value[n]=t.value}var Ka=I("$ZodObject",(t,e)=>{Ke.init(t,e);let n=is(()=>{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=Pu(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 v of y.values)f[h].add(v)}}return f});let r=d=>{let f=new Va(["shape","payload","ctx"]),h=n.value,y=b=>{let w=go(b);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};f.write("const input = payload.value;");let v=Object.create(null),x=0;for(let b of h.keys)v[b]=`key_${x++}`;f.write("const newResult = {}");for(let b of h.keys)if(h.optionalKeys.has(b)){let w=v[b];f.write(`const ${w} = ${y(b)};`);let k=go(b);f.write(`
23
+ `))}};var Tx={major:4,minor:0,patch:0};var Ke=C("$ZodType",(t,e)=>{var o;var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Tx;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=yo(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 fr;if(p||h instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await h,s.issues.length!==f&&(l||(l=yo(s,f)))});else{if(s.issues.length===f)continue;l||(l=yo(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 fr;return c.then(l=>i(l,r,a))}return i(c,r,a)}}t["~standard"]={validate:i=>{var s;try{let a=xo(t,i);return a.success?{value:a.data}:{issues:(s=a.error)==null?void 0:s.issues}}catch{return vo(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}}),ds=C("$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()??ox(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=C("$ZodStringFormat",(t,e)=>{ps.init(t,e),ds.init(t,e)}),Ku=C("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Zy),tt.init(t,e)}),Ju=C("$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=Bu(r))}else e.pattern??(e.pattern=Bu());tt.init(t,e)}),Yu=C("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=By),tt.init(t,e)}),Xu=C("$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:Yy.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})}}}),Qu=C("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Hy()),tt.init(t,e)}),ep=C("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Uy),tt.init(t,e)}),tp=C("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=jy),tt.init(t,e)}),np=C("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Ly),tt.init(t,e)}),rp=C("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Dy),tt.init(t,e)}),op=C("$ZodXID",(t,e)=>{e.pattern??(e.pattern=My),tt.init(t,e)}),ip=C("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Fy),tt.init(t,e)}),Nx=C("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=rx(e)),tt.init(t,e)}),jx=C("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=ex),tt.init(t,e)}),Lx=C("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=nx(e)),tt.init(t,e)}),Dx=C("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=qy),tt.init(t,e)}),sp=C("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Vy),tt.init(t,e),t._zod.onattach.push(n=>{let r=n._zod.bag;r.format="ipv4"})}),ap=C("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Gy),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})}}}),cp=C("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Wy),tt.init(t,e)}),lp=C("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Ky),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 Mx(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var up=C("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=Jy),tt.init(t,e),t._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),t._zod.check=n=>{Mx(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}});function TA(t){if(!Hu.test(t))return!1;let e=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return Mx(n)}var pp=C("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Hu),tt.init(t,e),t._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),t._zod.check=n=>{TA(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),dp=C("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Xy),tt.init(t,e)});function EA(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 fp=C("$ZodJWT",(t,e)=>{tt.init(t,e),t._zod.check=n=>{EA(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}});var Ka=C("$ZodNumber",(t,e)=>{Ke.init(t,e),t._zod.pattern=t._zod.bag.pattern??sx,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}}),mp=C("$ZodNumber",(t,e)=>{fx.init(t,e),Ka.init(t,e)}),hp=C("$ZodBoolean",(t,e)=>{Ke.init(t,e),t._zod.pattern=ax,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 gp=C("$ZodNull",(t,e)=>{Ke.init(t,e),t._zod.pattern=cx,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 yp=C("$ZodUnknown",(t,e)=>{Ke.init(t,e),t._zod.parse=n=>n}),xp=C("$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 Ex(t,e,n){t.issues.length&&e.issues.push(...Jn(n,t.issues)),e.value[n]=t.value}var vp=C("$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=>Ex(l,n,s))):Ex(c,n,s)}return i.length?Promise.all(i).then(()=>n):n}});function Wa(t,e,n){t.issues.length&&e.issues.push(...Jn(n,t.issues)),e.value[n]=t.value}function $x(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(...Jn(n,t.issues)):t.value===void 0?n in r&&(e.value[n]=void 0):e.value[n]=t.value}var Ja=C("$ZodObject",(t,e)=>{Ke.init(t,e);let n=ss(()=>{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=Ou(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 v of y.values)f[h].add(v)}}return f});let r=d=>{let f=new Ga(["shape","payload","ctx"]),h=n.value,y=b=>{let w=go(b);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};f.write("const input = payload.value;");let v=Object.create(null),x=0;for(let b of h.keys)v[b]=`key_${x++}`;f.write("const newResult = {}");for(let b of h.keys)if(h.optionalKeys.has(b)){let w=v[b];f.write(`const ${w} = ${y(b)};`);let k=go(b);f.write(`
24
24
  if (${w}.issues.length) {
25
25
  if (input[${k}] === undefined) {
26
26
  if (${k} in input) {
@@ -43,53 +43,53 @@
43
43
  if (${w}.issues.length) payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
44
44
  ...iss,
45
45
  path: iss.path ? [${go(b)}, ...iss.path] : [${go(b)}]
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>
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=!Ua.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?$x(me,d,k,h):Wa(me,d,k))):j?$x(F,d,k,h):Wa(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=>Wa(E,d,w))):Wa(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 Rx(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 Ya=C("$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=>cs(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=>Rx(s,n,t,r)):Rx(i,n,t,r)}}),bp=C("$ZodDiscriminatedUnion",(t,e)=>{Ya.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=ss(()=>{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)}}),_p=C("$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])=>Ax(n,c,l)):Ax(n,i,s)}});function Wu(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=Wu(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=Wu(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 Ax(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=Wu(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 wp=C("$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 Sp=C("$ZodEnum",(t,e)=>{Ke.init(t,e);let n=is(e.entries);t._zod.values=new Set(n),t._zod.pattern=new RegExp(`^(${n.filter(r=>Pu.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}}),kp=C("$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 Tp=C("$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}}),Ep=C("$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(`^(${cs(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)}),$p=C("$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(`^(${cs(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)}),Rp=C("$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=>Cx(i,e)):Cx(o,e)}});function Cx(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var Ap=C("$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))}),Cp=C("$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=>Ix(i,t)):Ix(o,t)}});function Ix(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=C("$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 Pp=C("$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=>Px(i,e,r)):Px(o,e,r)}});function Px(t,e,n){return yo(t)?t:e.out._zod.run({value:t.value,issues:t.issues},n)}var Op=C("$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(Ox):Ox(o)}});function Ox(t){return t.value=Object.freeze(t.value),t}var zp=C("$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=>zx(i,n,r,t));zx(o,n,r,t)}});function zx(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(Nu(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},RA=()=>{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 ${Ba(r.values[0])}`:`Invalid option: expected one of ${qa(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":""}: ${qa(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 Fx(){return{localeError:RA()}}var AA=Symbol("ZodOutput"),CA=Symbol("ZodInput"),fs=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 Ux(){return new fs}var $r=Ux();function Np(t,e){return new t({type:"string",...ue(e)})}function jp(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ue(e)})}function Xa(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ue(e)})}function Lp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ue(e)})}function Dp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ue(e)})}function Mp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ue(e)})}function Fp(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ue(e)})}function Up(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ue(e)})}function qp(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ue(e)})}function Zp(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ue(e)})}function Bp(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ue(e)})}function Hp(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ue(e)})}function Vp(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ue(e)})}function Gp(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ue(e)})}function Wp(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ue(e)})}function Kp(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ue(e)})}function Jp(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ue(e)})}function Yp(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ue(e)})}function Xp(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ue(e)})}function Qp(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ue(e)})}function ed(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ue(e)})}function td(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ue(e)})}function nd(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ue(e)})}function qx(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ue(e)})}function Zx(t,e){return new t({type:"string",format:"date",check:"string_format",...ue(e)})}function Bx(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...ue(e)})}function Hx(t,e){return new t({type:"string",format:"duration",check:"string_format",...ue(e)})}function rd(t,e){return new t({type:"number",checks:[],...ue(e)})}function od(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ue(e)})}function id(t,e){return new t({type:"boolean",...ue(e)})}function sd(t,e){return new t({type:"null",...ue(e)})}function ad(t){return new t({type:"unknown"})}function cd(t,e){return new t({type:"never",...ue(e)})}function Qa(t,e){return new Vu({check:"less_than",...ue(e),value:t,inclusive:!1})}function ms(t,e){return new Vu({check:"less_than",...ue(e),value:t,inclusive:!0})}function ec(t,e){return new Gu({check:"greater_than",...ue(e),value:t,inclusive:!1})}function hs(t,e){return new Gu({check:"greater_than",...ue(e),value:t,inclusive:!0})}function tc(t,e){return new dx({check:"multiple_of",...ue(e),value:t})}function nc(t,e){return new mx({check:"max_length",...ue(e),maximum:t})}function oi(t,e){return new hx({check:"min_length",...ue(e),minimum:t})}function rc(t,e){return new gx({check:"length_equals",...ue(e),length:t})}function ld(t,e){return new yx({check:"string_format",format:"regex",...ue(e),pattern:t})}function ud(t){return new xx({check:"string_format",format:"lowercase",...ue(t)})}function pd(t){return new vx({check:"string_format",format:"uppercase",...ue(t)})}function dd(t,e){return new bx({check:"string_format",format:"includes",...ue(e),includes:t})}function fd(t,e){return new _x({check:"string_format",format:"starts_with",...ue(e),prefix:t})}function md(t,e){return new wx({check:"string_format",format:"ends_with",...ue(e),suffix:t})}function bo(t){return new Sx({check:"overwrite",tx:t})}function hd(t){return bo(e=>e.normalize(t))}function gd(){return bo(t=>t.trim())}function yd(){return bo(t=>t.toLowerCase())}function xd(){return bo(t=>t.toUpperCase())}function Vx(t,e,n){return new t({type:"array",element:e,...ue(n)})}function vd(t,e,n){let r=ue(n);return r.abort??(r.abort=!0),new t({type:"custom",check:"custom",fn:e,...r})}function bd(t,e,n){return new t({type:"custom",check:"custom",fn:e,...ue(n)})}var oc=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=is(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>
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 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 _d(t,e){if(t instanceof fs){let r=new oc(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 oc(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 pC=C("ZodMiniType",(t,e)=>{if(!t._zod)throw new Error("Uninitialized schema in ZodMiniType.");Ke.init(t,e),t.def=e,t.parse=(n,r)=>Mu(t,n,r,{callee:t.parse}),t.safeParse=(n,r)=>xo(t,n,r),t.parseAsync=async(n,r)=>Uu(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 dC=C("ZodMiniObject",(t,e)=>{Ja.init(t,e),pC.init(t,e),Ie.defineLazy(t,"shape",()=>e.shape)});function wd(t,e){let n={type:"object",get shape(){return Ie.assignProp(this,"shape",{...t}),this.shape},...Ie.normalizeParams(e)};return new dC(n)}function kn(t){return!!t._zod}function wo(t){let e=Object.values(t);if(e.length===0)return wd({});let n=e.every(kn),r=e.every(o=>!kn(o));if(n)return wd(t);if(r)return Tu(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 ic(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 sc(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 Wx(t){return t.description}function Kx(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 ac(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 gs={};Na(gs,{ZodISODate:()=>Yx,ZodISODateTime:()=>Jx,ZodISODuration:()=>Qx,ZodISOTime:()=>Xx,date:()=>kd,datetime:()=>Sd,duration:()=>Ed,time:()=>Td});var Jx=C("ZodISODateTime",(t,e)=>{Nx.init(t,e),pt.init(t,e)});function Sd(t){return qx(Jx,t)}var Yx=C("ZodISODate",(t,e)=>{jx.init(t,e),pt.init(t,e)});function kd(t){return Zx(Yx,t)}var Xx=C("ZodISOTime",(t,e)=>{Lx.init(t,e),pt.init(t,e)});function Td(t){return Bx(Xx,t)}var Qx=C("ZodISODuration",(t,e)=>{Dx.init(t,e),pt.init(t,e)});function Ed(t){return Hx(Qx,t)}var ev=(t,e)=>{Ha.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:n=>Lu(t,n)},flatten:{value:n=>ju(t,n)},addIssue:{value:n=>t.issues.push(n)},addIssues:{value:n=>t.issues.push(...n)},isEmpty:{get(){return t.issues.length===0}}})},m3=C("ZodError",ev),ys=C("ZodError",ev,{Parent:Error});var tv=Du(ys),nv=Fu(ys),rv=qu(ys),ov=Zu(ys);var xt=C("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)=>tv(t,n,r,{callee:t.parse}),t.safeParse=(n,r)=>rv(t,n,r),t.parseAsync=async(n,r)=>nv(t,n,r,{callee:t.parseAsync}),t.safeParseAsync=async(n,r)=>ov(t,n,r),t.spa=t.safeParseAsync,t.refine=(n,r)=>t.check(lI(n,r)),t.superRefine=n=>t.check(uI(n)),t.overwrite=n=>t.check(bo(n)),t.optional=()=>ft(t),t.nullable=()=>av(t),t.nullish=()=>ft(av(t)),t.nonoptional=n=>nI(t,n),t.array=()=>Ne(t),t.or=n=>at([t,n]),t.and=n=>lc(t,n),t.transform=n=>Rd(t,fv(n)),t.default=n=>QC(t,n),t.prefault=n=>tI(t,n),t.catch=n=>oI(t,n),t.pipe=n=>Rd(t,n),t.readonly=()=>aI(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)),cv=C("_ZodString",(t,e)=>{ds.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(ld(...r)),t.includes=(...r)=>t.check(dd(...r)),t.startsWith=(...r)=>t.check(fd(...r)),t.endsWith=(...r)=>t.check(md(...r)),t.min=(...r)=>t.check(oi(...r)),t.max=(...r)=>t.check(nc(...r)),t.length=(...r)=>t.check(rc(...r)),t.nonempty=(...r)=>t.check(oi(1,...r)),t.lowercase=r=>t.check(ud(r)),t.uppercase=r=>t.check(pd(r)),t.trim=()=>t.check(gd()),t.normalize=(...r)=>t.check(hd(...r)),t.toLowerCase=()=>t.check(yd()),t.toUpperCase=()=>t.check(xd())}),_C=C("ZodString",(t,e)=>{ds.init(t,e),cv.init(t,e),t.email=n=>t.check(jp(wC,n)),t.url=n=>t.check(Up(SC,n)),t.jwt=n=>t.check(nd(DC,n)),t.emoji=n=>t.check(qp(kC,n)),t.guid=n=>t.check(Xa(iv,n)),t.uuid=n=>t.check(Lp(cc,n)),t.uuidv4=n=>t.check(Dp(cc,n)),t.uuidv6=n=>t.check(Mp(cc,n)),t.uuidv7=n=>t.check(Fp(cc,n)),t.nanoid=n=>t.check(Zp(TC,n)),t.guid=n=>t.check(Xa(iv,n)),t.cuid=n=>t.check(Bp(EC,n)),t.cuid2=n=>t.check(Hp($C,n)),t.ulid=n=>t.check(Vp(RC,n)),t.base64=n=>t.check(Qp(NC,n)),t.base64url=n=>t.check(ed(jC,n)),t.xid=n=>t.check(Gp(AC,n)),t.ksuid=n=>t.check(Wp(CC,n)),t.ipv4=n=>t.check(Kp(IC,n)),t.ipv6=n=>t.check(Jp(PC,n)),t.cidrv4=n=>t.check(Yp(OC,n)),t.cidrv6=n=>t.check(Xp(zC,n)),t.e164=n=>t.check(td(LC,n)),t.datetime=n=>t.check(Sd(n)),t.date=n=>t.check(kd(n)),t.time=n=>t.check(Td(n)),t.duration=n=>t.check(Ed(n))});function R(t){return Np(_C,t)}var pt=C("ZodStringFormat",(t,e)=>{tt.init(t,e),cv.init(t,e)}),wC=C("ZodEmail",(t,e)=>{Yu.init(t,e),pt.init(t,e)});var iv=C("ZodGUID",(t,e)=>{Ku.init(t,e),pt.init(t,e)});var cc=C("ZodUUID",(t,e)=>{Ju.init(t,e),pt.init(t,e)});var SC=C("ZodURL",(t,e)=>{Xu.init(t,e),pt.init(t,e)});var kC=C("ZodEmoji",(t,e)=>{Qu.init(t,e),pt.init(t,e)});var TC=C("ZodNanoID",(t,e)=>{ep.init(t,e),pt.init(t,e)});var EC=C("ZodCUID",(t,e)=>{tp.init(t,e),pt.init(t,e)});var $C=C("ZodCUID2",(t,e)=>{np.init(t,e),pt.init(t,e)});var RC=C("ZodULID",(t,e)=>{rp.init(t,e),pt.init(t,e)});var AC=C("ZodXID",(t,e)=>{op.init(t,e),pt.init(t,e)});var CC=C("ZodKSUID",(t,e)=>{ip.init(t,e),pt.init(t,e)});var IC=C("ZodIPv4",(t,e)=>{sp.init(t,e),pt.init(t,e)});var PC=C("ZodIPv6",(t,e)=>{ap.init(t,e),pt.init(t,e)});var OC=C("ZodCIDRv4",(t,e)=>{cp.init(t,e),pt.init(t,e)});var zC=C("ZodCIDRv6",(t,e)=>{lp.init(t,e),pt.init(t,e)});var NC=C("ZodBase64",(t,e)=>{up.init(t,e),pt.init(t,e)});var jC=C("ZodBase64URL",(t,e)=>{pp.init(t,e),pt.init(t,e)});var LC=C("ZodE164",(t,e)=>{dp.init(t,e),pt.init(t,e)});var DC=C("ZodJWT",(t,e)=>{fp.init(t,e),pt.init(t,e)});var lv=C("ZodNumber",(t,e)=>{Ka.init(t,e),xt.init(t,e),t.gt=(r,o)=>t.check(ec(r,o)),t.gte=(r,o)=>t.check(hs(r,o)),t.min=(r,o)=>t.check(hs(r,o)),t.lt=(r,o)=>t.check(Qa(r,o)),t.lte=(r,o)=>t.check(ms(r,o)),t.max=(r,o)=>t.check(ms(r,o)),t.int=r=>t.check(sv(r)),t.safe=r=>t.check(sv(r)),t.positive=r=>t.check(ec(0,r)),t.nonnegative=r=>t.check(hs(0,r)),t.negative=r=>t.check(Qa(0,r)),t.nonpositive=r=>t.check(ms(0,r)),t.multipleOf=(r,o)=>t.check(tc(r,o)),t.step=(r,o)=>t.check(tc(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 rd(lv,t)}var MC=C("ZodNumberFormat",(t,e)=>{mp.init(t,e),lv.init(t,e)});function sv(t){return od(MC,t)}var FC=C("ZodBoolean",(t,e)=>{hp.init(t,e),xt.init(t,e)});function Ct(t){return id(FC,t)}var UC=C("ZodNull",(t,e)=>{gp.init(t,e),xt.init(t,e)});function uv(t){return sd(UC,t)}var qC=C("ZodUnknown",(t,e)=>{yp.init(t,e),xt.init(t,e)});function dt(){return ad(qC)}var ZC=C("ZodNever",(t,e)=>{xp.init(t,e),xt.init(t,e)});function BC(t){return cd(ZC,t)}var HC=C("ZodArray",(t,e)=>{vp.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(nc(n,r)),t.length=(n,r)=>t.check(rc(n,r)),t.unwrap=()=>t.element});function Ne(t,e){return Vx(HC,t,e)}var pv=C("ZodObject",(t,e)=>{Ja.init(t,e),xt.init(t,e),Ie.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:BC()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=n=>Ie.extend(t,n),t.merge=n=>Ie.merge(t,n),t.pick=n=>Ie.pick(t,n),t.omit=n=>Ie.omit(t,n),t.partial=(...n)=>Ie.partial(mv,t,n[0]),t.required=(...n)=>Ie.required(hv,t,n[0])});function X(t,e){let n={type:"object",get shape(){return Ie.assignProp(this,"shape",{...t}),this.shape},...Ie.normalizeParams(e)};return new pv(n)}function Xt(t,e){return new pv({type:"object",get shape(){return Ie.assignProp(this,"shape",{...t}),this.shape},catchall:dt(),...Ie.normalizeParams(e)})}var dv=C("ZodUnion",(t,e)=>{Ya.init(t,e),xt.init(t,e),t.options=e.options});function at(t,e){return new dv({type:"union",options:t,...Ie.normalizeParams(e)})}var VC=C("ZodDiscriminatedUnion",(t,e)=>{dv.init(t,e),bp.init(t,e)});function Ad(t,e,n){return new VC({type:"union",options:e,discriminator:t,...Ie.normalizeParams(n)})}var GC=C("ZodIntersection",(t,e)=>{_p.init(t,e),xt.init(t,e)});function lc(t,e){return new GC({type:"intersection",left:t,right:e})}var WC=C("ZodRecord",(t,e)=>{wp.init(t,e),xt.init(t,e),t.keyType=e.keyType,t.valueType=e.valueType});function nt(t,e,n){return new WC({type:"record",keyType:t,valueType:e,...Ie.normalizeParams(n)})}var $d=C("ZodEnum",(t,e)=>{Sp.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 $d({...e,checks:[],...Ie.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 $d({...e,checks:[],...Ie.normalizeParams(o),entries:i})}});function an(t,e){let n=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new $d({type:"enum",entries:n,...Ie.normalizeParams(e)})}var KC=C("ZodLiteral",(t,e)=>{kp.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 KC({type:"literal",values:Array.isArray(t)?t:[t],...Ie.normalizeParams(e)})}var JC=C("ZodTransform",(t,e)=>{Tp.init(t,e),xt.init(t,e),t._zod.parse=(n,r)=>{n.addIssue=i=>{if(typeof i=="string")n.issues.push(Ie.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(Ie.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 fv(t){return new JC({type:"transform",transform:t})}var mv=C("ZodOptional",(t,e)=>{Ep.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function ft(t){return new mv({type:"optional",innerType:t})}var YC=C("ZodNullable",(t,e)=>{$p.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function av(t){return new YC({type:"nullable",innerType:t})}var XC=C("ZodDefault",(t,e)=>{Rp.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function QC(t,e){return new XC({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}var eI=C("ZodPrefault",(t,e)=>{Ap.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function tI(t,e){return new eI({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():e}})}var hv=C("ZodNonOptional",(t,e)=>{Cp.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType});function nI(t,e){return new hv({type:"nonoptional",innerType:t,...Ie.normalizeParams(e)})}var rI=C("ZodCatch",(t,e)=>{Ip.init(t,e),xt.init(t,e),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function oI(t,e){return new rI({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var iI=C("ZodPipe",(t,e)=>{Pp.init(t,e),xt.init(t,e),t.in=e.in,t.out=e.out});function Rd(t,e){return new iI({type:"pipe",in:t,out:e})}var sI=C("ZodReadonly",(t,e)=>{Op.init(t,e),xt.init(t,e)});function aI(t){return new sI({type:"readonly",innerType:t})}var gv=C("ZodCustom",(t,e)=>{zp.init(t,e),xt.init(t,e)});function cI(t){let e=new jt({check:"custom"});return e._zod.check=t,e}function yv(t,e){return vd(gv,t??(()=>!0),e)}function lI(t,e={}){return bd(gv,t,e)}function uI(t){let e=cI(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(Ie.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(Ie.issue(o))}},t(n.value,n)));return e}function Cd(t,e){return Rd(fv(t),e)}gn(Fx());var Pd="2025-11-25";var xv=[Pd,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Cr="io.modelcontextprotocol/related-task",pc="2.0",Rt=yv(t=>t!==null&&(typeof t=="object"||typeof t=="function")),vv=at([R(),He().int()]),bv=R(),R3=Xt({ttl:He().optional(),pollInterval:He().optional()}),pI=X({ttl:He().optional()}),dI=X({taskId:R()}),Od=Xt({progressToken:vv.optional(),[Cr]:dI.optional()}),xn=X({_meta:Od.optional()}),xs=xn.extend({task:pI.optional()}),_v=t=>xs.safeParse(t).success,Lt=X({method:R(),params:xn.loose().optional()}),Tn=X({_meta:Od.optional()}),En=X({method:R(),params:Tn.loose().optional()}),Dt=Xt({_meta:Od.optional()}),dc=at([R(),He().int()]),wv=X({jsonrpc:ne(pc),id:dc,...Lt.shape}).strict(),zd=t=>wv.safeParse(t).success,Sv=X({jsonrpc:ne(pc),...En.shape}).strict(),kv=t=>Sv.safeParse(t).success,Nd=X({jsonrpc:ne(pc),id:dc,result:Dt}).strict(),vs=t=>Nd.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 jd=X({jsonrpc:ne(pc),id:dc.optional(),error:X({code:He().int(),message:R(),data:dt().optional()})}).strict();var Tv=t=>jd.safeParse(t).success;var Ev=at([wv,Sv,Nd,jd]),A3=at([Nd,jd]),fc=Dt.strict(),fI=Tn.extend({requestId:dc.optional(),reason:R().optional()}),mc=En.extend({method:ne("notifications/cancelled"),params:fI}),mI=X({src:R(),mimeType:R().optional(),sizes:Ne(R()).optional(),theme:an(["light","dark"]).optional()}),bs=X({icons:Ne(mI).optional()}),si=X({name:R(),title:R().optional()}),$v=si.extend({...si.shape,...bs.shape,version:R(),websiteUrl:R().optional(),description:R().optional()}),hI=lc(X({applyDefaults:Ct().optional()}),nt(R(),dt())),gI=Cd(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,lc(X({form:hI.optional(),url:Rt.optional()}),nt(R(),dt()).optional())),yI=Xt({list:Rt.optional(),cancel:Rt.optional(),requests:Xt({sampling:Xt({createMessage:Rt.optional()}).optional(),elicitation:Xt({create:Rt.optional()}).optional()}).optional()}),xI=Xt({list:Rt.optional(),cancel:Rt.optional(),requests:Xt({tools:Xt({call:Rt.optional()}).optional()}).optional()}),vI=X({experimental:nt(R(),Rt).optional(),sampling:X({context:Rt.optional(),tools:Rt.optional()}).optional(),elicitation:gI.optional(),roots:X({listChanged:Ct().optional()}).optional(),tasks:yI.optional(),extensions:nt(R(),Rt).optional()}),bI=xn.extend({protocolVersion:R(),capabilities:vI,clientInfo:$v}),Ld=Lt.extend({method:ne("initialize"),params:bI});var _I=X({experimental:nt(R(),Rt).optional(),logging:Rt.optional(),completions:Rt.optional(),prompts:X({listChanged:Ct().optional()}).optional(),resources:X({subscribe:Ct().optional(),listChanged:Ct().optional()}).optional(),tools:X({listChanged:Ct().optional()}).optional(),tasks:xI.optional(),extensions:nt(R(),Rt).optional()}),wI=Dt.extend({protocolVersion:R(),capabilities:_I,serverInfo:$v,instructions:R().optional()}),Dd=En.extend({method:ne("notifications/initialized"),params:Tn.optional()});var hc=Lt.extend({method:ne("ping"),params:xn.optional()}),SI=X({progress:He(),total:ft(He()),message:ft(R())}),kI=X({...Tn.shape,...SI.shape,progressToken:vv}),gc=En.extend({method:ne("notifications/progress"),params:kI}),TI=xn.extend({cursor:bv.optional()}),_s=Lt.extend({params:TI.optional()}),ws=Dt.extend({nextCursor:bv.optional()}),EI=an(["working","input_required","completed","failed","cancelled"]),Ss=X({taskId:R(),status:EI,ttl:at([He(),uv()]),createdAt:R(),lastUpdatedAt:R(),pollInterval:ft(He()),statusMessage:ft(R())}),ai=Dt.extend({task:Ss}),$I=Tn.merge(Ss),ks=En.extend({method:ne("notifications/tasks/status"),params:$I}),yc=Lt.extend({method:ne("tasks/get"),params:xn.extend({taskId:R()})}),xc=Dt.merge(Ss),vc=Lt.extend({method:ne("tasks/result"),params:xn.extend({taskId:R()})}),C3=Dt.loose(),bc=_s.extend({method:ne("tasks/list")}),_c=ws.extend({tasks:Ne(Ss)}),wc=Lt.extend({method:ne("tasks/cancel"),params:xn.extend({taskId:R()})}),Rv=Dt.merge(Ss),Av=X({uri:R(),mimeType:ft(R()),_meta:nt(R(),dt()).optional()}),Cv=Av.extend({text:R()}),Md=R().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),Iv=Av.extend({blob:Md}),Ts=an(["user","assistant"]),ci=X({audience:Ne(Ts).optional(),priority:He().min(0).max(1).optional(),lastModified:gs.datetime({offset:!0}).optional()}),Pv=X({...si.shape,...bs.shape,uri:R(),description:ft(R()),mimeType:ft(R()),size:ft(He()),annotations:ci.optional(),_meta:ft(Xt({}))}),RI=X({...si.shape,...bs.shape,uriTemplate:R(),description:ft(R()),mimeType:ft(R()),annotations:ci.optional(),_meta:ft(Xt({}))}),Sc=_s.extend({method:ne("resources/list")}),AI=ws.extend({resources:Ne(Pv)}),kc=_s.extend({method:ne("resources/templates/list")}),CI=ws.extend({resourceTemplates:Ne(RI)}),Fd=xn.extend({uri:R()}),II=Fd,Tc=Lt.extend({method:ne("resources/read"),params:II}),PI=Dt.extend({contents:Ne(at([Cv,Iv]))}),OI=En.extend({method:ne("notifications/resources/list_changed"),params:Tn.optional()}),zI=Fd,NI=Lt.extend({method:ne("resources/subscribe"),params:zI}),jI=Fd,LI=Lt.extend({method:ne("resources/unsubscribe"),params:jI}),DI=Tn.extend({uri:R()}),MI=En.extend({method:ne("notifications/resources/updated"),params:DI}),FI=X({name:R(),description:ft(R()),required:ft(Ct())}),UI=X({...si.shape,...bs.shape,description:ft(R()),arguments:ft(Ne(FI)),_meta:ft(Xt({}))}),Ec=_s.extend({method:ne("prompts/list")}),qI=ws.extend({prompts:Ne(UI)}),ZI=xn.extend({name:R(),arguments:nt(R(),R()).optional()}),$c=Lt.extend({method:ne("prompts/get"),params:ZI}),Ud=X({type:ne("text"),text:R(),annotations:ci.optional(),_meta:nt(R(),dt()).optional()}),qd=X({type:ne("image"),data:Md,mimeType:R(),annotations:ci.optional(),_meta:nt(R(),dt()).optional()}),Zd=X({type:ne("audio"),data:Md,mimeType:R(),annotations:ci.optional(),_meta:nt(R(),dt()).optional()}),BI=X({type:ne("tool_use"),name:R(),id:R(),input:nt(R(),dt()),_meta:nt(R(),dt()).optional()}),HI=X({type:ne("resource"),resource:at([Cv,Iv]),annotations:ci.optional(),_meta:nt(R(),dt()).optional()}),VI=Pv.extend({type:ne("resource_link")}),Bd=at([Ud,qd,Zd,VI,HI]),GI=X({role:Ts,content:Bd}),WI=Dt.extend({description:R().optional(),messages:Ne(GI)}),KI=En.extend({method:ne("notifications/prompts/list_changed"),params:Tn.optional()}),JI=X({title:R().optional(),readOnlyHint:Ct().optional(),destructiveHint:Ct().optional(),idempotentHint:Ct().optional(),openWorldHint:Ct().optional()}),YI=X({taskSupport:an(["required","optional","forbidden"]).optional()}),Ov=X({...si.shape,...bs.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:JI.optional(),execution:YI.optional(),_meta:nt(R(),dt()).optional()}),Rc=_s.extend({method:ne("tools/list")}),XI=ws.extend({tools:Ne(Ov)}),Ac=Dt.extend({content:Ne(Bd).default([]),structuredContent:nt(R(),dt()).optional(),isError:Ct().optional()}),I3=Ac.or(Dt.extend({toolResult:dt()})),QI=xs.extend({name:R(),arguments:nt(R(),dt()).optional()}),li=Lt.extend({method:ne("tools/call"),params:QI}),eP=En.extend({method:ne("notifications/tools/list_changed"),params:Tn.optional()}),P3=X({autoRefresh:Ct().default(!0),debounceMs:He().int().nonnegative().default(300)}),Es=an(["debug","info","notice","warning","error","critical","alert","emergency"]),tP=xn.extend({level:Es}),Hd=Lt.extend({method:ne("logging/setLevel"),params:tP}),nP=Tn.extend({level:Es,logger:R().optional(),data:dt()}),rP=En.extend({method:ne("notifications/message"),params:nP}),oP=X({name:R().optional()}),iP=X({hints:Ne(oP).optional(),costPriority:He().min(0).max(1).optional(),speedPriority:He().min(0).max(1).optional(),intelligencePriority:He().min(0).max(1).optional()}),sP=X({mode:an(["auto","required","none"]).optional()}),aP=X({type:ne("tool_result"),toolUseId:R().describe("The unique identifier for the corresponding tool call."),content:Ne(Bd).default([]),structuredContent:X({}).loose().optional(),isError:Ct().optional(),_meta:nt(R(),dt()).optional()}),cP=Ad("type",[Ud,qd,Zd]),uc=Ad("type",[Ud,qd,Zd,BI,aP]),lP=X({role:Ts,content:at([uc,Ne(uc)]),_meta:nt(R(),dt()).optional()}),uP=xs.extend({messages:Ne(lP),modelPreferences:iP.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(Ov).optional(),toolChoice:sP.optional()}),pP=Lt.extend({method:ne("sampling/createMessage"),params:uP}),$s=Dt.extend({model:R(),stopReason:ft(an(["endTurn","stopSequence","maxTokens"]).or(R())),role:Ts,content:cP}),Vd=Dt.extend({model:R(),stopReason:ft(an(["endTurn","stopSequence","maxTokens","toolUse"]).or(R())),role:Ts,content:at([uc,Ne(uc)])}),dP=X({type:ne("boolean"),title:R().optional(),description:R().optional(),default:Ct().optional()}),fP=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()}),mP=X({type:an(["number","integer"]),title:R().optional(),description:R().optional(),minimum:He().optional(),maximum:He().optional(),default:He().optional()}),hP=X({type:ne("string"),title:R().optional(),description:R().optional(),enum:Ne(R()),default:R().optional()}),gP=X({type:ne("string"),title:R().optional(),description:R().optional(),oneOf:Ne(X({const:R(),title:R()})),default:R().optional()}),yP=X({type:ne("string"),title:R().optional(),description:R().optional(),enum:Ne(R()),enumNames:Ne(R()).optional(),default:R().optional()}),xP=at([hP,gP]),vP=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()}),bP=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()}),_P=at([vP,bP]),wP=at([yP,xP,_P]),SP=at([wP,dP,fP,mP]),kP=xs.extend({mode:ne("form").optional(),message:R(),requestedSchema:X({type:ne("object"),properties:nt(R(),SP),required:Ne(R()).optional()})}),TP=xs.extend({mode:ne("url"),message:R(),elicitationId:R(),url:R().url()}),EP=at([kP,TP]),$P=Lt.extend({method:ne("elicitation/create"),params:EP}),RP=Tn.extend({elicitationId:R()}),AP=En.extend({method:ne("notifications/elicitation/complete"),params:RP}),ui=Dt.extend({action:an(["accept","decline","cancel"]),content:Cd(t=>t===null?void 0:t,nt(R(),at([R(),He(),Ct(),Ne(R())])).optional())}),CP=X({type:ne("ref/resource"),uri:R()});var IP=X({type:ne("ref/prompt"),name:R()}),PP=xn.extend({ref:at([IP,CP]),argument:X({name:R(),value:R()}),context:X({arguments:nt(R(),R()).optional()}).optional()}),Cc=Lt.extend({method:ne("completion/complete"),params:PP});function zv(t){if(t.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${t.params.ref.type}`)}function Nv(t){if(t.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${t.params.ref.type}`)}var OP=Dt.extend({completion:Xt({values:Ne(R()).max(100),total:ft(He().int()),hasMore:ft(Ct())})}),zP=X({uri:R().startsWith("file://"),name:R().optional(),_meta:nt(R(),dt()).optional()}),NP=Lt.extend({method:ne("roots/list"),params:xn.optional()}),Gd=Dt.extend({roots:Ne(zP)}),jP=En.extend({method:ne("notifications/roots/list_changed"),params:Tn.optional()}),O3=at([hc,Ld,Cc,Hd,$c,Ec,Sc,kc,Tc,NI,LI,li,Rc,yc,vc,bc,wc]),z3=at([mc,gc,Dd,jP,ks]),N3=at([fc,$s,Vd,ui,Gd,xc,_c,ai]),j3=at([hc,pP,$P,NP,yc,vc,bc,wc]),L3=at([mc,gc,rP,MI,OI,eP,KI,ks,AP]),D3=at([fc,wI,OP,WI,qI,AI,CI,PI,Ac,XI,xc,_c,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 Ir(t){return t==="completed"||t==="failed"||t==="cancelled"}var Lv=Symbol("Let zodToJsonSchema decide on which parser to use");var jv={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"},Dv=t=>typeof t=="string"?{...jv,name:t}:{...jv,...t};var Mv=t=>{let e=Dv(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 Wd(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,Wd(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 Fv(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 Uv(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 qv(){return{type:"boolean"}}function Pc(t,e){return fe(t.type._def,e)}var Zv=(t,e)=>fe(t.innerType._def,e);function Kd(t,e,n){let r=n??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((o,i)=>Kd(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 LP(t,e)}}var LP=(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 Bv(t,e){return{...fe(t.innerType._def,e),default:t.defaultValue()}}function Hv(t,e){return e.effectStrategy==="input"?fe(t.schema._def,e):mt(e)}function Vv(t){return{type:"string",enum:Array.from(t.values)}}var DP=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function Gv(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(DP(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 Wv(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 Jd,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:()=>(Jd===void 0&&(Jd=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Jd),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 Oc(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(`^${Yd(r.value,e)}`),r.message,e);break;case"endsWith":Qt(n,RegExp(`${Yd(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(Yd(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 Yd(t,e){return e.patternStrategy==="escape"?FP(t):t}var MP=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function FP(t){let e="";for(let n=0;n<t.length;n++)MP.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:Kv(e,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):je(t,"pattern",Kv(e,r),n,r)}function Kv(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
49
  ]))`;continue}else if(r[l]==="$"){o+=`($|(?=[\r
50
50
  ]))`;continue}}if(n.s&&r[l]==="."){o+=s?`${r[l]}\r
51
51
  `:`[${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),KL(n)}clear(){this._buffer=void 0}};function KL(t){return _v.parse(JSON.parse(t))}function d0(t){return JSON.stringify(t)+`
54
- `}var _l=class{constructor(e=Xm.default.stdin,n=Xm.default.stdout){this._stdin=e,this._stdout=n,this._readBuffer=new bl,this._started=!1,this._ondata=r=>{this._readBuffer.append(r),this.processReadBuffer()},this._onerror=r=>{var o;(o=this.onerror)==null||o.call(this,r)}}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=d0(e);this._stdout.write(r)?n():this._stdout.once("drain",n)})}};var ht=class{register(e){e.tool(this.name,this.description,this.schema.shape,this.execute.bind(this))}normalizeFileId(e){return e&&e.replace(/^file\//,"")}};function oa(t,e){return function(){return t.apply(e,arguments)}}var{toString:JL}=Object.prototype,{getPrototypeOf:Ai}=Object,{iterator:sa,toStringTag:h0}=Symbol,Sl=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),ia=(t,e)=>{let n=t,r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Sl(n,e))return!0;n=Ai(n)}return!1},YL=(t,e)=>t!=null&&ia(t,e)?t[e]:void 0,eh=(t=>e=>{let n=JL.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Zn=t=>(t=t.toLowerCase(),e=>eh(e)===t),kl=t=>e=>typeof e===t,{isArray:No}=Array,Ii=kl("undefined");function Ci(t){return t!==null&&!Ii(t)&&t.constructor!==null&&!Ii(t.constructor)&&dn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var g0=Zn("ArrayBuffer");function XL(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&g0(t.buffer),e}var QL=kl("string"),dn=kl("function"),y0=kl("number"),Pi=t=>t!==null&&typeof t=="object",eD=t=>t===!0||t===!1,wl=t=>{if(!Pi(t))return!1;let e=Ai(t);return(e===null||e===Object.prototype||Ai(e)===null)&&!ia(t,h0)&&!ia(t,sa)},tD=t=>{if(!Pi(t)||Ci(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},nD=Zn("Date"),rD=Zn("File"),oD=t=>!!(t&&typeof t.uri<"u"),iD=t=>t&&typeof t.getParts<"u",sD=Zn("Blob"),aD=Zn("FileList"),cD=t=>Pi(t)&&dn(t.pipe);function lD(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var f0=lD(),m0=typeof f0.FormData<"u"?f0.FormData:void 0,uD=t=>{if(!t)return!1;if(m0&&t instanceof m0)return!0;let e=Ai(t);if(!e||e===Object.prototype||!dn(t.append))return!1;let n=eh(t);return n==="formdata"||n==="object"&&dn(t.toString)&&t.toString()==="[object FormData]"},pD=Zn("URLSearchParams"),[dD,fD,mD,hD]=["ReadableStream","Request","Response","Headers"].map(Zn),gD=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function aa(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),No(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{if(Ci(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 x0(t,e){if(Ci(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 zo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,v0=t=>!Ii(t)&&t!==zo;function Qm(...t){let{caseless:e,skipUndefined:n}=v0(this)&&this||{},r={},o=(i,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;let a=e&&typeof s=="string"&&x0(r,s)||s,c=Sl(r,a)?r[a]:void 0;wl(c)&&wl(i)?r[a]=Qm(c,i):wl(i)?r[a]=Qm({},i):No(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||Ci(a)||(aa(a,o),typeof a!="object"||No(a)))continue;let c=Object.getOwnPropertySymbols(a);for(let l=0;l<c.length;l++){let p=c[l];RD.call(a,p)&&o(a[p],p)}}return r}var yD=(t,e,n,{allOwnKeys:r}={})=>(aa(e,(o,i)=>{n&&dn(o)?Object.defineProperty(t,i,{__proto__:null,value:oa(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),xD=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),vD=(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)},bD=(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&&Ai(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},_D=(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},wD=t=>{if(!t)return null;if(No(t))return t;let e=t.length;if(!y0(e))return null;let n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},SD=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ai(Uint8Array)),kD=(t,e)=>{let r=(t&&t[sa]).call(t),o;for(;(o=r.next())&&!o.done;){let i=o.value;e.call(t,i[0],i[1])}},TD=(t,e)=>{let n,r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},ED=Zn("HTMLFormElement"),$D=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),{propertyIsEnumerable:RD}=Object.prototype,AD=Zn("RegExp"),b0=(t,e)=>{let n=Object.getOwnPropertyDescriptors(t),r={};aa(n,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(r[i]=s||o)}),Object.defineProperties(t,r)},ID=t=>{b0(t,(e,n)=>{if(dn(t)&&["arguments","caller","callee"].includes(n))return!1;let r=t[n];if(dn(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+"'")})}})},CD=(t,e)=>{let n={},r=o=>{o.forEach(i=>{n[i]=!0})};return No(t)?r(t):r(String(t).split(e)),n},PD=()=>{},OD=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function zD(t){return!!(t&&dn(t.append)&&t[h0]==="FormData"&&t[sa])}var ND=t=>{let e=new WeakSet,n=r=>{if(Pi(r)){if(e.has(r))return;if(Ci(r))return r;if(!("toJSON"in r)){e.add(r);let o=No(r)?[]:{};return aa(r,(i,s)=>{let a=n(i);!Ii(a)&&(o[s]=a)}),e.delete(r),o}}return r};return n(t)},jD=Zn("AsyncFunction"),LD=t=>t&&(Pi(t)||dn(t))&&dn(t.then)&&dn(t.catch),_0=((t,e)=>t?setImmediate:e?((n,r)=>(zo.addEventListener("message",({source:o,data:i})=>{o===zo&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),zo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",dn(zo.postMessage)),DD=typeof queueMicrotask<"u"?queueMicrotask.bind(zo):typeof process<"u"&&process.nextTick||_0,w0=t=>t!=null&&dn(t[sa]),MD=t=>t!=null&&ia(t,sa)&&w0(t),_={isArray:No,isArrayBuffer:g0,isBuffer:Ci,isFormData:uD,isArrayBufferView:XL,isString:QL,isNumber:y0,isBoolean:eD,isObject:Pi,isPlainObject:wl,isEmptyObject:tD,isReadableStream:dD,isRequest:fD,isResponse:mD,isHeaders:hD,isUndefined:Ii,isDate:nD,isFile:rD,isReactNativeBlob:oD,isReactNative:iD,isBlob:sD,isRegExp:AD,isFunction:dn,isStream:cD,isURLSearchParams:pD,isTypedArray:SD,isFileList:aD,forEach:aa,merge:Qm,extend:yD,trim:gD,stripBOM:xD,inherits:vD,toFlatObject:bD,kindOf:eh,kindOfTest:Zn,endsWith:_D,toArray:wD,forEachEntry:kD,matchAll:TD,isHTMLForm:ED,hasOwnProperty:Sl,hasOwnProp:Sl,hasOwnInPrototypeChain:ia,getSafeProp:YL,reduceDescriptors:b0,freezeMethods:ID,toObjectSet:CD,toCamelCase:$D,noop:PD,toFiniteNumber:OD,findKey:x0,global:zo,isContextDefined:v0,isSpecCompliantForm:zD,toJSONObject:ND,isAsyncFn:jD,isThenable:LD,setImmediate:_0,asap:DD,isIterable:w0,isSafeIterable:MD};var FD=_.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"]),S0=t=>{let e={},n,r,o;return t&&t.split(`
55
- `).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||e[n]&&FD[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};function UD(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 qD=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ZD=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function th(t,e){return _.isArray(t)?t.map(n=>th(n,e)):UD(String(t).replace(e,""))}var k0=t=>th(t,qD),BD=t=>th(t,ZD);function Oi(t){let e=Object.create(null);return _.forEach(t.toJSON(),(n,r)=>{e[r]=BD(n)}),e}var T0=Symbol("internals");function ca(t){return t&&String(t).trim().toLowerCase()}function Tl(t){return t===!1||t==null?t:_.isArray(t)?t.map(Tl):k0(String(t))}function HD(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 VD=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function nh(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 GD(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function WD(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 zi=class{constructor(e){e&&this.set(e)}set(e,n,r){let o=this;function i(a,c,l){let p=ca(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]=Tl(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())&&!VD(e))s(S0(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=ca(e),e){let r=_.findKey(this,e);if(r){let o=this[r];if(!n)return o;if(n===!0)return HD(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=ca(e),e){let r=_.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||nh(this,this[r],r,n)))}return!1}delete(e,n){let r=this,o=!1;function i(s){if(s=ca(s),s){let a=_.findKey(r,s);a&&(!n||nh(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||nh(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]=Tl(o),delete n[i];return}let a=e?GD(i):String(i).trim();a!==i&&delete n[i],n[a]=Tl(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(`
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(cE).join(`
59
- `):" "+cE(s[0]):"as no adapter specified";throw new P("There is no suitable adapter to dispatch the request "+a,P.ERR_NOT_SUPPORT)}return o}var Wl={getAdapter:tq,adapters:wg};function Sg(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new vn(null,t)}function Kl(t){return Sg(t),t.headers=rt.from(t.headers),t.data=fa.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Wl.getAdapter(t.adapter||Fi.adapter,t)(t).then(function(r){Sg(t),t.response=r;try{r.data=fa.call(t,t.transformResponse,r)}finally{delete t.response}return r.headers=rt.from(r.headers),r},function(r){if(!ma(r)&&(Sg(t),r&&r.response)){t.response=r.response;try{r.response.data=fa.call(t,t.transformResponse,r.response)}finally{delete t.response}r.response.headers=rt.from(r.response.headers)}return Promise.reject(r)})}var Jl={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Jl[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var lE={};Jl.transitional=function(e,n,r){function o(i,s){return"[Axios v"+xr+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(e===!1)throw new P(o(s," has been removed"+(n?" in "+n:"")),P.ERR_DEPRECATED);return n&&!lE[s]&&(lE[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}};Jl.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function nq(t,e,n){if(typeof t!="object"||t===null)throw new P("options must be an object",P.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 P("option "+i+" must be "+c,P.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new P("Unknown option "+i,P.ERR_BAD_OPTION)}}var Ea={assertOptions:nq,validators:Jl};var Kt=Ea.validators,Gi=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Eh,response:new Eh}}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(`
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 zc(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}=Oc(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}=Pc(t.keyType._def,e);return{...n,propertyNames:p}}}return n}function Jv(t,e){if(e.mapStrategy==="record")return zc(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 Yv(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 Xv(t){return t.target==="openAi"?void 0:{not:mt({...t,currentPath:[...t.currentPath,"not"]})}}function Qv(t){return t.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}var Rs={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function tb(t,e){if(e.target==="openApi3")return eb(t,e);let n=t.options instanceof Map?Array.from(t.options.values()):t.options;if(n.every(r=>r._def.typeName in Rs&&(!r._def.checks||!r._def.checks.length))){let r=n.reduce((o,i)=>{let s=Rs[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 eb(t,e)}var eb=(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 nb(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:Rs[t.innerType._def.typeName],nullable:!0}:{type:[Rs[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 rb(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",Wd(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 ob(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=qP(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=UP(t,e);return s!==void 0&&(r.additionalProperties=s),r}function UP(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 qP(t){try{return t.isOptional()}catch{return!0}}var ib=(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 sb=(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 ab(t,e){return fe(t.type._def,e)}function cb(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 lb(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 ub(t){return{not:mt(t)}}function pb(t){return mt(t)}var db=(t,e)=>fe(t.innerType._def,e);var fb=(t,e,n)=>{switch(e){case q.ZodString:return Oc(t,n);case q.ZodNumber:return rb(t,n);case q.ZodObject:return ob(t,n);case q.ZodBigInt:return Uv(t,n);case q.ZodBoolean:return qv();case q.ZodDate:return Kd(t,n);case q.ZodUndefined:return ub(n);case q.ZodNull:return Qv(n);case q.ZodArray:return Fv(t,n);case q.ZodUnion:case q.ZodDiscriminatedUnion:return tb(t,n);case q.ZodIntersection:return Gv(t,n);case q.ZodTuple:return lb(t,n);case q.ZodRecord:return zc(t,n);case q.ZodLiteral:return Wv(t,n);case q.ZodEnum:return Vv(t);case q.ZodNativeEnum:return Yv(t);case q.ZodNullable:return nb(t,n);case q.ZodOptional:return ib(t,n);case q.ZodMap:return Jv(t,n);case q.ZodSet:return cb(t,n);case q.ZodLazy:return()=>t.getter()._def;case q.ZodPromise:return ab(t,n);case q.ZodNaN:case q.ZodNever:return Xv(n);case q.ZodEffects:return Hv(t,n);case q.ZodAny:return mt(n);case q.ZodUnknown:return pb(n);case q.ZodDefault:return Bv(t,n);case q.ZodBranded:return Pc(t,n);case q.ZodReadonly:return db(t,n);case q.ZodCatch:return Zv(t,n);case q.ZodPipeline:return sb(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!==Lv)return c}if(r&&!n){let c=ZP(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=fb(t,t.typeName,e),s=typeof i=="function"?fe(i(),e):i;if(s&&BP(t,e,s),e.postProcess){let c=e.postProcess(s,t,e);return o.jsonSchema=s,c}return o.jsonSchema=s,s}var ZP=(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}},BP=(t,e,n)=>(t.description&&(n.description=t.description,e.markdownDescription&&(n.markdownDescription=t.description)),n);var Xd=(t,e)=>{let n=Mv(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 HP(t){return!t||t==="jsonSchema7"||t==="draft-7"?"draft-7":t==="jsonSchema2019-09"||t==="draft-2020-12"?"draft-2020-12":"draft-7"}function Qd(t,e){return kn(t)?_d(t,{target:HP(e==null?void 0:e.target),io:(e==null?void 0:e.pipeStrategy)??"input"}):Xd(t,{strictUnions:(e==null?void 0:e.strictUnions)??!0,pipeStrategy:(e==null?void 0:e.pipeStrategy)??"input"})}function ef(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=ac(n);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function tf(t,e){let n=Rr(t,e);if(!n.success)throw n.error;return n.data}var VP=6e4,Nc=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(mc,n=>{this._oncancel(n)}),this.setNotificationHandler(gc,n=>{this._onprogress(n)}),this.setRequestHandler(hc,n=>({})),this._taskStore=e==null?void 0:e.taskStore,this._taskMessageQueue=e==null?void 0:e.taskMessageQueue,this._taskStore&&(this.setRequestHandler(yc,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(vc,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(!Ir(s.status))return await this._waitForTaskUpdate(i,r.signal),await o();if(Ir(s.status)){let c=await this._taskStore.getTaskResult(i,r.sessionId);return this._clearTaskQueue(i),{...c,_meta:{...c._meta,[Cr]:{taskId:i}}}}return await o()};return await o()}),this.setRequestHandler(bc,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(wc,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(Ir(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),vs(c)||Tv(c)?this._onresponse(c):zd(c)?this._onrequest(c,l):kv(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[Cr])==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=_v(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),vs(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(vs(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),vs(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},Ir(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)||{},[Cr]: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)??VP,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},xc,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},_c,n)}async cancelTask(e,n){return this.request({method:"tasks/cancel",params:e},Rv,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)||{},[Cr]: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)||{},[Cr]: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)||{},[Cr]:n.relatedTask}}}),await this._transport.send(s,n)}setRequestHandler(e,n){let r=ef(e);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(o,i)=>{let s=tf(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=ef(e);this._notificationHandlers.set(r,o=>{let i=tf(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"&&zd(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=ks.parse({method:"notifications/tasks/status",params:a});await this.notification(c),Ir(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(Ir(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=ks.parse({method:"notifications/tasks/status",params:c});await this.notification(l),Ir(c.status)&&this._cleanupTaskProgressHandler(o)}},listTasks:o=>r.listTasks(o,n)}}};function mb(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function hb(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];mb(s)&&mb(i)?n[o]={...s,...i}:n[o]=i}return n}var s0=Ee(qm(),1),a0=Ee(i0(),1);function JL(){let t=new s0.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,a0.default)(t),t}var gl=class{constructor(e){this._ajv=e??JL()}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 yl=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},$s,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 c0(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 l0(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 xl=class extends Nc{constructor(e,n){super(n),this._serverInfo=e,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Es.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 gl,this.setRequestHandler(Ld,r=>this._oninitialize(r)),this.setNotificationHandler(Dd,()=>{var r;return(r=this.oninitialized)==null?void 0:r.call(this)}),this._capabilities.logging&&this.setRequestHandler(Hd,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=Es.safeParse(s);return a.success&&this._loggingLevels.set(i,a.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new yl(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=hb(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(Ac,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;l0((r=(n=this._clientCapabilities)==null?void 0:n.tasks)==null?void 0:r.requests,e,"Client")}assertTaskHandlerCapability(e){var n;this._capabilities&&c0((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:xv.includes(n)?n:Pd,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"},fc)}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},Vd,n):this.request({method:"sampling/createMessage",params:e},$s,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},Gd,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 p0=Symbol.for("mcp.completable");function Jm(t){return!!t&&typeof t=="object"&&p0 in t}function d0(t){let e=t[p0];return e==null?void 0:e.complete}var u0;(function(t){t.Completable="McpCompletable"})(u0||(u0={}));var YL=/^[A-Za-z0-9._-]{1,128}$/;function XL(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"),!YL.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 QL(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 Ym(t){let e=XL(t);return QL(t,e.warnings),e.isValid}var vl=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 bl=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 xl(e,n)}get experimental(){return this._experimental||(this._experimental={tasks:new vl(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(Rc)),this.server.assertCanSetRequestHandler(Fr(li)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(Rc,()=>({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?Qd(o,{strictUnions:!0,pipeStrategy:"input"}):eD})(),annotations:n.annotations,execution:n.execution,_meta:n._meta};if(n.outputSchema){let o=ii(n.outputSchema);o&&(r.outputSchema=Qd(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 ic(i,n);if(!s.success){let a="error"in s?s.error:"Unknown error",c=sc(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 ic(o,n.structuredContent);if(!i.success){let s="error"in i?i.error:"Unknown error",a=sc(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(Cc)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(Cc,async e=>{switch(e.params.ref.type){case"ref/prompt":return zv(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return Nv(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 oa;let o=Ar(r.argsSchema),i=o==null?void 0:o[e.params.argument.name];if(!Jm(i))return oa;let s=d0(i);if(!s)return oa;let a=await s(e.params.argument.value,e.params.context);return m0(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 oa;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 oa;let i=await o(e.params.argument.value,e.params.context);return m0(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(Fr(Sc)),this.server.assertCanSetRequestHandler(Fr(kc)),this.server.assertCanSetRequestHandler(Fr(Tc)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(Sc,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(kc,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([n,r])=>({name:n,uriTemplate:r.resourceTemplate.uriTemplate.toString(),...r.metadata}))})),this.server.setRequestHandler(Tc,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(Ec)),this.server.assertCanSetRequestHandler(Fr($c)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(Ec,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,n])=>({name:e,title:n.title,description:n.description,arguments:n.argsSchema?tD(n.argsSchema):void 0}))})),this.server.setRequestHandler($c,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 ic(o,e.params.arguments);if(!i.success){let c="error"in i?i.error:"Unknown error",l=sc(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 Jm(l)})&&this.setCompletionRequestHandler(),s}_createRegisteredTool(e,n,r,o,i,s,a,c,l){Ym(e);let p={title:n,description:r,inputSchema:f0(o),outputSchema:f0(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"&&Ym(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(Xm(c))o=n.shift(),n.length>1&&typeof n[0]=="object"&&n[0]!==null&&!Xm(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 eD={type:"object",properties:{}};function h0(t){return t!==null&&typeof t=="object"&&"parse"in t&&typeof t.parse=="function"&&"safeParse"in t&&typeof t.safeParse=="function"}function g0(t){return"_def"in t||"_zod"in t||h0(t)}function Xm(t){return typeof t!="object"||t===null||g0(t)?!1:Object.keys(t).length===0?!0:Object.values(t).some(h0)}function f0(t){if(t){if(Xm(t))return wo(t);if(!g0(t))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return t}}function tD(t){let e=Ar(t);return e?Object.entries(e).map(([n,r])=>{let o=Wx(r),i=Kx(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=ac(n);if(typeof r=="string")return r;throw new Error("Schema method literal must be a string")}function m0(t){return{completion:{values:t.slice(0,100),total:t.length,hasMore:t.length>100}}}var oa={completion:{values:[],hasMore:!1}};var Qm=Ee(require("node:process"),1);var _l=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),nD(n)}clear(){this._buffer=void 0}};function nD(t){return Ev.parse(JSON.parse(t))}function y0(t){return JSON.stringify(t)+`
54
+ `}var wl=class{constructor(e=Qm.default.stdin,n=Qm.default.stdout){this._stdin=e,this._stdout=n,this._readBuffer=new _l,this._started=!1,this._ondata=r=>{this._readBuffer.append(r),this.processReadBuffer()},this._onerror=r=>{var o;(o=this.onerror)==null||o.call(this,r)}}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=y0(e);this._stdout.write(r)?n():this._stdout.once("drain",n)})}};var ht=class{register(e){e.tool(this.name,this.description,this.schema.shape,this.execute.bind(this))}normalizeFileId(e){return e&&e.replace(/^file\//,"")}};function ia(t,e){return function(){return t.apply(e,arguments)}}var{toString:rD}=Object.prototype,{getPrototypeOf:Ai}=Object,{iterator:aa,toStringTag:b0}=Symbol,kl=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),sa=(t,e)=>{let n=t,r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),kl(n,e))return!0;n=Ai(n)}return!1},oD=(t,e)=>t!=null&&sa(t,e)?t[e]:void 0,th=(t=>e=>{let n=rD.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Zn=t=>(t=t.toLowerCase(),e=>th(e)===t),Tl=t=>e=>typeof e===t,{isArray:No}=Array,Ci=Tl("undefined");function Ii(t){return t!==null&&!Ci(t)&&t.constructor!==null&&!Ci(t.constructor)&&dn(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}var _0=Zn("ArrayBuffer");function iD(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&_0(t.buffer),e}var sD=Tl("string"),dn=Tl("function"),w0=Tl("number"),Pi=t=>t!==null&&typeof t=="object",aD=t=>t===!0||t===!1,Sl=t=>{if(!Pi(t))return!1;let e=Ai(t);return(e===null||e===Object.prototype||Ai(e)===null)&&!sa(t,b0)&&!sa(t,aa)},cD=t=>{if(!Pi(t)||Ii(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},lD=Zn("Date"),uD=Zn("File"),pD=t=>!!(t&&typeof t.uri<"u"),dD=t=>t&&typeof t.getParts<"u",fD=Zn("Blob"),mD=Zn("FileList"),hD=t=>Pi(t)&&dn(t.pipe);function gD(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}var x0=gD(),v0=typeof x0.FormData<"u"?x0.FormData:void 0,yD=t=>{if(!t)return!1;if(v0&&t instanceof v0)return!0;let e=Ai(t);if(!e||e===Object.prototype||!dn(t.append))return!1;let n=th(t);return n==="formdata"||n==="object"&&dn(t.toString)&&t.toString()==="[object FormData]"},xD=Zn("URLSearchParams"),[vD,bD,_D,wD]=["ReadableStream","Request","Response","Headers"].map(Zn),SD=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ca(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),No(t))for(r=0,o=t.length;r<o;r++)e.call(null,t[r],r,t);else{if(Ii(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 S0(t,e){if(Ii(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 zo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,k0=t=>!Ci(t)&&t!==zo;function eh(...t){let{caseless:e,skipUndefined:n}=k0(this)&&this||{},r={},o=(i,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;let a=e&&typeof s=="string"&&S0(r,s)||s,c=kl(r,a)?r[a]:void 0;Sl(c)&&Sl(i)?r[a]=eh(c,i):Sl(i)?r[a]=eh({},i):No(i)?r[a]=i.slice():(!n||!Ci(i))&&(r[a]=i)};for(let i=0,s=t.length;i<s;i++){let a=t[i];if(!a||Ii(a)||(ca(a,o),typeof a!="object"||No(a)))continue;let c=Object.getOwnPropertySymbols(a);for(let l=0;l<c.length;l++){let p=c[l];ND.call(a,p)&&o(a[p],p)}}return r}var kD=(t,e,n,{allOwnKeys:r}={})=>(ca(e,(o,i)=>{n&&dn(o)?Object.defineProperty(t,i,{__proto__:null,value:ia(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),TD=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ED=(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)},$D=(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&&Ai(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},RD=(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},AD=t=>{if(!t)return null;if(No(t))return t;let e=t.length;if(!w0(e))return null;let n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},CD=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Ai(Uint8Array)),ID=(t,e)=>{let r=(t&&t[aa]).call(t),o;for(;(o=r.next())&&!o.done;){let i=o.value;e.call(t,i[0],i[1])}},PD=(t,e)=>{let n,r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},OD=Zn("HTMLFormElement"),zD=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),{propertyIsEnumerable:ND}=Object.prototype,jD=Zn("RegExp"),T0=(t,e)=>{let n=Object.getOwnPropertyDescriptors(t),r={};ca(n,(o,i)=>{let s;(s=e(o,i,t))!==!1&&(r[i]=s||o)}),Object.defineProperties(t,r)},LD=t=>{T0(t,(e,n)=>{if(dn(t)&&["arguments","caller","callee"].includes(n))return!1;let r=t[n];if(dn(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+"'")})}})},DD=(t,e)=>{let n={},r=o=>{o.forEach(i=>{n[i]=!0})};return No(t)?r(t):r(String(t).split(e)),n},MD=()=>{},FD=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function UD(t){return!!(t&&dn(t.append)&&t[b0]==="FormData"&&t[aa])}var qD=t=>{let e=new WeakSet,n=r=>{if(Pi(r)){if(e.has(r))return;if(Ii(r))return r;if(!("toJSON"in r)){e.add(r);let o=No(r)?[]:{};return ca(r,(i,s)=>{let a=n(i);!Ci(a)&&(o[s]=a)}),e.delete(r),o}}return r};return n(t)},ZD=Zn("AsyncFunction"),BD=t=>t&&(Pi(t)||dn(t))&&dn(t.then)&&dn(t.catch),E0=((t,e)=>t?setImmediate:e?((n,r)=>(zo.addEventListener("message",({source:o,data:i})=>{o===zo&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),zo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",dn(zo.postMessage)),HD=typeof queueMicrotask<"u"?queueMicrotask.bind(zo):typeof process<"u"&&process.nextTick||E0,$0=t=>t!=null&&dn(t[aa]),VD=t=>t!=null&&sa(t,aa)&&$0(t),_={isArray:No,isArrayBuffer:_0,isBuffer:Ii,isFormData:yD,isArrayBufferView:iD,isString:sD,isNumber:w0,isBoolean:aD,isObject:Pi,isPlainObject:Sl,isEmptyObject:cD,isReadableStream:vD,isRequest:bD,isResponse:_D,isHeaders:wD,isUndefined:Ci,isDate:lD,isFile:uD,isReactNativeBlob:pD,isReactNative:dD,isBlob:fD,isRegExp:jD,isFunction:dn,isStream:hD,isURLSearchParams:xD,isTypedArray:CD,isFileList:mD,forEach:ca,merge:eh,extend:kD,trim:SD,stripBOM:TD,inherits:ED,toFlatObject:$D,kindOf:th,kindOfTest:Zn,endsWith:RD,toArray:AD,forEachEntry:ID,matchAll:PD,isHTMLForm:OD,hasOwnProperty:kl,hasOwnProp:kl,hasOwnInPrototypeChain:sa,getSafeProp:oD,reduceDescriptors:T0,freezeMethods:LD,toObjectSet:DD,toCamelCase:zD,noop:MD,toFiniteNumber:FD,findKey:S0,global:zo,isContextDefined:k0,isSpecCompliantForm:UD,toJSONObject:qD,isAsyncFn:ZD,isThenable:BD,setImmediate:E0,asap:HD,isIterable:$0,isSafeIterable:VD};var GD=_.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"]),R0=t=>{let e={},n,r,o;return t&&t.split(`
55
+ `).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||e[n]&&GD[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};function WD(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 KD=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),JD=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function nh(t,e){return _.isArray(t)?t.map(n=>nh(n,e)):WD(String(t).replace(e,""))}var A0=t=>nh(t,KD),YD=t=>nh(t,JD);function Oi(t){let e=Object.create(null);return _.forEach(t.toJSON(),(n,r)=>{e[r]=YD(n)}),e}var C0=Symbol("internals");function la(t){return t&&String(t).trim().toLowerCase()}function El(t){return t===!1||t==null?t:_.isArray(t)?t.map(El):A0(String(t))}function XD(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 QD=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function rh(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 eM(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function tM(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 zi=class{constructor(e){e&&this.set(e)}set(e,n,r){let o=this;function i(a,c,l){let p=la(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]=El(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())&&!QD(e))s(R0(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=la(e),e){let r=_.findKey(this,e);if(r){let o=this[r];if(!n)return o;if(n===!0)return XD(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=la(e),e){let r=_.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||rh(this,this[r],r,n)))}return!1}delete(e,n){let r=this,o=!1;function i(s){if(s=la(s),s){let a=_.findKey(r,s);a&&(!n||rh(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||rh(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]=El(o),delete n[i];return}let a=e?eM(i):String(i).trim();a!==i&&delete n[i],n[a]=El(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(`
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[C0]=this[C0]={accessors:{}}).accessors,o=this.prototype;function i(s){let a=la(s);r[a]||(tM(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 nM="[REDACTED ****]";function rM(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 oM(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)&&rM(i))return r.pop(),i;s=Object.create(null);for(let[a,c]of Object.entries(i)){let l=n.has(a.toLowerCase())?nM: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?oM(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 Nk=Ee(zk(),1),Ll=Nk.default;var Th=100;function kh(t){return _.isPlainObject(t)||_.isArray(t)}function jk(t){return _.endsWith(t,"[]")?t.slice(0,-2):t}function Sh(t,e,n){return t?t.concat(e).map(function(o,i){return o=jk(o),!n&&i?"["+o+"]":o}).join(n?".":""):e}function Z2(t){return _.isArray(t)&&!t.some(kh)}var B2=_.toFlatObject(_,{},null,function(e){return/^is[A-Z]/.test(e)});function H2(t,e,n){if(!_.isObject(t))throw new TypeError("target must be an object");e=e||new(Ll||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?Th: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(Sh(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)&&Z2(m)||(_.isFileList(m)||_.endsWith(b,"[]"))&&(k=_.toArray(m)))return b=jk(b),k.forEach(function(F,j){!(_.isUndefined(F)||F===null)&&e.append(s===!0?Sh([b],j,i):s===null?b:b+"[]",d(F))}),!1}return kh(m)?!0:(e.append(Sh(w,b,i),d(m)),!1)}let v=Object.assign(B2,{defaultVisitor:y,convertValue:d,isVisitable:kh});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=H2;function Lk(t){let e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(t).replace(/[!'()~]|%20/g,function(r){return e[r]})}function Dk(t,e){this._pairs=[],t&&qr(t,this,e)}var Mk=Dk.prototype;Mk.append=function(e,n){this._pairs.push([e,n])};Mk.toString=function(e){let n=e?r=>e.call(this,r,Lk):Lk;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};var Fk=Dk;function V2(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")||V2,i=_.getSafeProp(r,"serialize"),s;if(i?s=i(e,r):s=_.isURLSearchParams(e)?e.toString():new Fk(e,r).toString(o),s){let a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}var Eh=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)})}},$h=Eh;var Zr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};var Bk=Ee(require("crypto"),1);var Uk=Ee(require("url"),1),qk=Uk.default.URLSearchParams;var Rh="abcdefghijklmnopqrstuvwxyz",Zk="0123456789",Hk={DIGIT:Zk,ALPHA:Rh,ALPHA_DIGIT:Rh+Rh.toUpperCase()+Zk},G2=(t=16,e=Hk.ALPHA_DIGIT)=>{let n="",{length:r}=e,o=new Uint32Array(t);Bk.default.randomFillSync(o);for(let i=0;i<t;i++)n+=e[o[i]%r];return n},Vk={isNode:!0,classes:{URLSearchParams:qk,FormData:Ll,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Hk,generateString:G2,protocols:["http","https","file","data"]};var Ih={};Na(Ih,{hasBrowserEnv:()=>Ch,hasStandardBrowserEnv:()=>W2,hasStandardBrowserWebWorkerEnv:()=>K2,navigator:()=>Ah,origin:()=>J2});var Ch=typeof window<"u"&&typeof document<"u",Ah=typeof navigator=="object"&&navigator||void 0,W2=Ch&&(!Ah||["ReactNative","NativeScript","NS"].indexOf(Ah.product)<0),K2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",J2=Ch&&window.location.href||"http://localhost";var Be={...Ih,...Vk};function Ph(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 Gk=Th;function Wk(t){if(t>Gk)throw new P("FormData field is too deeply nested ("+t+" levels). Max depth: "+Gk,P.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Y2(t){let e=[],n=/\w+|\[(\w*)]/g,r;for(;(r=n.exec(t))!==null;)Wk(e.length),e.push(r[0]==="[]"?"":r[1]||r[0]);return e}function X2(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 Q2(t){function e(n,r,o,i){Wk(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]=X2(o[s])),!a)}if(_.isFormData(t)&&_.isFunction(t.entries)){let n={};return _.forEachEntry(t,(r,o)=>{e(Y2(r),o,n,0)}),n}return null}var Dl=Q2;var Mi=(t,e)=>t!=null&&_.hasOwnProp(t,e)?t[e]:void 0;function eF(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 Oh={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(Dl(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 Ph(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),eF(e)):e}],transformResponse:[function(e){let n=Mi(this,"transitional")||Oh.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=>{Oh.headers[t]={}});var Fi=Oh;function ma(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 ha(t){return!!(t&&t.__CANCEL__)}var zh=class extends P{constructor(e,n,r){super(e??"canceled",P.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}},vn=zh;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 Nh(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function jh(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}var tF=/^https?:(?!\/\/)/i,nF=/[\t\n\r]/g;function rF(t){let e=0;for(;e<t.length&&t.charCodeAt(e)<=32;)e++;return t.slice(e)}function oF(t){return rF(t).replace(nF,"")}function Kk(t,e){if(typeof t=="string"&&tF.test(oF(t)))throw new P('Invalid URL: missing "//" after protocol',P.ERR_INVALID_URL,e)}function Do(t,e,n,r){Kk(e,r);let o=!Nh(e);return t&&(o||n===!1)?(Kk(t,r),jh(t,e)):e}var iF={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function sF(t){try{return new URL(t)}catch{return null}}function Jk(t){var e=(typeof t=="string"?sF(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)||iF[n]||0,!aF(r,o)))return"";var i=Lh(n+"_proxy")||Lh("all_proxy");return i&&i.indexOf("://")===-1&&(i=n+"://"+i),i}function aF(t,e){var n=Lh("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 Lh(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}var yg=Ee(yT(),1),xg=Ee(require("http"),1),vg=Ee(require("https"),1),KT=Ee(require("http2"),1),JT=Ee(require("util"),1),gg=require("path"),YT=Ee(kT(),1),bn=Ee(require("zlib"),1);var xr="1.18.1";function ka(t){let e=/^([-+\w]{1,25}):(?:\/\/)?/.exec(t);return e&&e[1]||""}var lU=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function ag(t,e,n){let r=n&&n.Blob||Be.classes.Blob,o=ka(t);if(e===void 0&&r&&(e=!0),o==="data"){t=o.length?t.slice(o.length+1):t;let i=lU.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 TT=Ee(require("stream"),1);var cg=Symbol("internals"),lg=class extends TT.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[cg]={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[cg];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let o=this[cg],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)})}},ug=lg;var XT=require("events");var $T=Ee(require("util"),1),RT=require("stream");var{asyncIterator:ET}=Symbol,uU=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[ET]?yield*t[ET]():yield t},Bl=uU;var pU=Be.ALPHABET.ALPHA_DIGIT+"-_",Ta=typeof TextEncoder=="function"?new TextEncoder:new $T.default.TextEncoder,Bo=`\r
57
+ `,dU=Ta.encode(Bo),fU=2,pg=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=Ta.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=Ta.encode(i+Bo),this.contentLength=o?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+fU,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;_.isTypedArray(e)?yield e:yield*Bl(e),yield dU}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},mU=(t,e,n)=>{let{tag:r="form-data-boundary",size:o=25,boundary:i=r+"-"+Be.generateString(o,pU)}=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=Ta.encode("--"+i+Bo),a=Ta.encode("--"+i+"--"+Bo),c=a.byteLength,l=Array.from(t.entries()).map(([d,f])=>{let h=new pg(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),RT.Readable.from((async function*(){for(let d of l)yield s,yield*d.encode();yield a})())},AT=mU;var CT=Ee(require("stream"),1),dg=class extends CT.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)}},IT=dg;var PT=Ee(require("http2"),1),OT=Ee(require("util"),1),fg=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&&OT.default.isDeepStrictEqual(y,n))return h}}let o=PT.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}},zT=fg;var hU=(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,NT=hU;var gU=new Set(["localhost","0.0.0.0"]),DT=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)},mg=t=>/^0{1,4}$/.test(t),yU=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(mg)&&s.every(mg)}let n=t.split(":");return n.length===8&&n.every(mg)},xU=t=>{if(t==="::1")return!0;let e=t.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if(e)return DT(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},jT=t=>t?gU.has(t)||DT(t)||yU(t)?!0:xU(t):!1,vU={http:80,https:443,ws:80,wss:443,ftp:21},bU=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]},_U=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,wU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,SU=t=>{if(typeof t!="string"||t.indexOf(":")===-1)return t;let e=t.match(_U);if(e)return e[1];let n=t.match(wU);if(n){let r=parseInt(n[1],16),o=parseInt(n[2],16);return`${r>>8}.${r&255}.${o>>8}.${o&255}`}return t},LT=t=>t&&(t.charAt(0)==="["&&t.charAt(t.length-1)==="]"&&(t=t.slice(1,-1)),SU(t.replace(/\.+$/,"")));function hg(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)||vU[e.protocol.split(":",1)[0]]||0,o=LT(e.hostname.toLowerCase());return n.split(/[\s,]+/).some(i=>{if(!i)return!1;let[s,a]=bU(i);return s=LT(s),!s||a&&a!==r?!1:(s.charAt(0)==="*"&&(s=s.slice(1)),s.charAt(0)==="."?o.endsWith(s):o===s||jT(o)&&jT(s))})}function kU(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 MT=kU;function TU(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 FT=TU;var vr=(t,e,n=3)=>{let r=0,o=MT(50,250);return FT(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 Hl=t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102,EU=(t,e,n)=>e+2<n&&Hl(t.charCodeAt(e+1))&&Hl(t.charCodeAt(e+2));function Ea(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);Hl(y)&&Hl(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&&EU(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 UT={flush:bn.default.constants.Z_SYNC_FLUSH,finishFlush:bn.default.constants.Z_SYNC_FLUSH},$U={flush:bn.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:bn.default.constants.BROTLI_OPERATION_FLUSH},RU={flush:bn.default.constants.ZSTD_e_flush,finishFlush:bn.default.constants.ZSTD_e_flush},QT=_.isFunction(bn.default.createBrotliDecompress),eE=_.isFunction(bn.default.createZstdDecompress),tE="gzip, compress, deflate"+(QT?", br":""),AU=tE+(eE?", zstd":""),{http:CU,https:IU}=YT.default,bg=/https:?/,PU=["content-type","content-length"];function OU(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e).forEach(([r,o])=>{PU.includes(r.toLowerCase())&&t.set(r,o)})}var qT=Symbol("axios.http.socketListener"),Vl=Symbol("axios.http.currentReq"),nE=Symbol("axios.http.installedTunnel"),zU=new Map,ZT=new WeakMap,BT={22:21,24:5};function NU(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:BT[e]!=null&&n>=BT[e]}function jU(t,e=process.versions&&process.versions.node){if(!NU(e))return!1;let n=t&&t.options;return!!(n&&_.hasOwnProp(n,"proxyEnv")&&n.proxyEnv!=null)}function LU(t,e,n){return bg.test(t.protocol)?n||vg.default.globalAgent:e||xg.default.globalAgent}function DU(t,e){let n=t.protocol+"//"+t.hostname+":"+(t.port||"")+"#"+(t.auth||""),r=e?ZT.get(e)||ZT.set(e,new Map).get(e):zU,o=r.get(n);if(o)return o;let i=e&&e.options?{...e.options,...t}:t;if(o=new yg.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[nE]=!0,r.set(n,o),o}var HT=Be.protocols.map(t=>t+":"),VT=t=>{if(!_.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},GT=(t,[e,n])=>(t.on("end",n).on("error",n),e),MU=new zT;function FU(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 UU(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 rE(t,e,n,r,o,i){let s=e,a=LU(t,i,o);if(!s&&s!==!1&&!jU(a)){let c=Jk(n);c&&(hg(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[nE]&&(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(bg.test(t.protocol)){if(!(o instanceof yg.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=DU(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){rE(l,e,l.href,!0,o,i)}}var ZU=typeof process<"u"&&_.kindOf(process)==="process",BU=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)}),HU=({address:t,family:e})=>{if(!_.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},WT=(t,e)=>HU(_.isObject(t)?t:{address:t,family:e}),VU={request(t,e){let n=t.protocol+"//"+t.hostname+":"+(t.port||(t.protocol==="https:"?443:80)),{http2Options:r,headers:o}=t,i=MU.getSession(n,r),{HTTP2_HEADER_SCHEME:s,HTTP2_HEADER_METHOD:a,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:l}=KT.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}},oE=ZU&&function(e){return BU(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=NT(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=>WT(On)):[WT(We,St)];be.all?Ge(ye,Qe):Ge(ye,Qe[0].address,Qe[0].family)})}}let Ve=new XT.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||HT[0];if(B==="data:"){if(F>-1){let G=String(s("url")||Zt||"");if(Ea(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=ag(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(HT.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=AT(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(OU(qe,c.getHeaders(),s("formDataHeaderPolicy")),!qe.hasContentLength())try{let W=await JT.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(Bl(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 ug({maxRate:_.toFiniteNumber(ge)})],_.noop),De&&c.on("progress",GT(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=VT(Pe.username),G=VT(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?AU:tE,!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:FU,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,gg.resolve)(b);if(!G.some(ye=>typeof ye=="string"&&(0,gg.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,rE(Te,v,B+"//"+Pe.hostname+(Pe.port?":"+Pe.port:"")+Te.path,!1,y,h);let Bt,_n=!1,zt=!1,pe=bg.test(Te.protocol);if(Te.agent==null&&(Te.agent=pe?y:h),bt)Bt=VU;else{let W=s("transport");if(W)Bt=W;else if(k===0)Bt=pe?vg.default:xg.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){qU(We,St)||UU(We.headers,Ge)})}Bt=pe?IU:CU}}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 ug({maxRate:_.toFiniteNumber(ke)});Yt&&Qe.on("progress",GT(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(UT)),delete G.headers["content-encoding"];break;case"deflate":be.push(new IT),be.push(bn.default.createUnzip(UT)),delete G.headers["content-encoding"];break;case"br":QT&&(be.push(bn.default.createBrotliDecompress($U)),delete G.headers["content-encoding"]);break;case"zstd":eE&&(be.push(bn.default.createZstdDecompress(RU)),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[qT]||(G.on("error",function(Ge){let ye=G[Vl];ye&&!ye.destroyed&&ye.destroy(Ge)}),G[qT]=!0),G[Vl]=oe,Ye.add(G)}),oe.once("close",function(){yt();for(let G of Ye)G[Vl]===oe&&(G[Vl]=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 iE=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 sE=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 aE=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(aE(p),aE(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 GU=["content-type","content-length"];function WU(t,e,n){if(n!=="content-only"){t.set(e);return}Object.entries(e||{}).forEach(([r,o])=>{GU.includes(r.toLowerCase())&&t.set(r,o)})}var KU=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16)));function JU(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?KU(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)&&WU(a,r.getHeaders(),n("formDataHeaderPolicy"))),Be.hasStandardBrowserEnv&&(_.isFunction(o)&&(o=o(e)),o===!0||o==null&&iE(e.url))){let h=i&&s&&sE.read(s);h&&a.set(i,h)}return e}var Gl=JU;var YU=typeof XMLHttpRequest<"u",cE=YU&&function(t){return new Promise(function(n,r){let o=Gl(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=ka(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 XU=(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},lE=XU;var QU=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},eq=async function*(t,e){for await(let n of tq(t))yield*QU(n,e)},tq=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()}},_g=(t,e,n,r)=>{let o=eq(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 uE=64*1024,{isFunction:Wl}=_,nq=t=>encodeURIComponent(t).replace(/%([0-9A-F]{2})/gi,(e,n)=>String.fromCharCode(parseInt(n,16))),pE=t=>{if(!_.isString(t))return t;try{return decodeURIComponent(t)}catch{return t}},dE=(t,...e)=>{try{return!!t(...e)}catch{return!1}},rq=t=>{let e=t.indexOf("://"),n=t;return e!==-1&&(n=n.slice(e+3)),n.includes("@")||n.includes(":")},oq=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?Wl(o):typeof fetch=="function",c=Wl(i),l=Wl(s);if(!a)return!1;let p=a&&Wl(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&&dE(()=>{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&&dE(()=>_.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}=Gl(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=lE([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(rq(b)){let pe=new URL(b,Be.origin);if(!ge&&(pe.username||pe.password)){let Ye=pE(pe.username),W=pE(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(nq((ge.username||"")+":"+(ge.password||""))))),V&&typeof b=="string"&&b.startsWith("data:")&&Ea(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)=>_g(pe,uE,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(_g(Te.body,uE,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)}}},iq=new Map,wg=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=iq;for(;a--;)c=i[a],l=p.get(c),l===void 0&&p.set(c,l=a?new Map:oq(e)),p=l;return l},U8=wg();var Sg={http:oE,xhr:cE,fetch:{get:wg}};_.forEach(Sg,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{__proto__:null,value:e})}catch{}Object.defineProperty(t,"adapterName",{__proto__:null,value:e})}});var fE=t=>`- ${t}`,aq=t=>_.isFunction(t)||t===null||t===!1;function cq(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,!aq(r)&&(o=Sg[(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(fE).join(`
59
+ `):" "+fE(s[0]):"as no adapter specified";throw new P("There is no suitable adapter to dispatch the request "+a,P.ERR_NOT_SUPPORT)}return o}var Kl={getAdapter:cq,adapters:Sg};function kg(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new vn(null,t)}function Jl(t){return kg(t),t.headers=rt.from(t.headers),t.data=ma.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Kl.getAdapter(t.adapter||Fi.adapter,t)(t).then(function(r){kg(t),t.response=r;try{r.data=ma.call(t,t.transformResponse,r)}finally{delete t.response}return r.headers=rt.from(r.headers),r},function(r){if(!ha(r)&&(kg(t),r&&r.response)){t.response=r.response;try{r.response.data=ma.call(t,t.transformResponse,r.response)}finally{delete t.response}r.response.headers=rt.from(r.response.headers)}return Promise.reject(r)})}var Yl={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Yl[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var mE={};Yl.transitional=function(e,n,r){function o(i,s){return"[Axios v"+xr+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(e===!1)throw new P(o(s," has been removed"+(n?" in "+n:"")),P.ERR_DEPRECATED);return n&&!mE[s]&&(mE[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}};Yl.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function lq(t,e,n){if(typeof t!="object"||t===null)throw new P("options must be an object",P.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 P("option "+i+" must be "+c,P.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new P("Unknown option "+i,P.ERR_BAD_OPTION)}}var $a={assertOptions:lq,validators:Yl};var Kt=$a.validators,Gi=class{constructor(e){this.defaults=e||{},this.interceptors={request:new $h,response:new $h}}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
60
  `);return s===-1?"":o.stack.slice(s+1)})();try{if(!r.stack)r.stack=i;else if(i){let s=i.indexOf(`
61
61
  `),a=s===-1?-1:i.indexOf(`
62
62
  `,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=Hn(this.defaults,n);let{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&Ea.assertOptions(r,{silentJSONParsing:Kt.transitional(Kt.boolean),forcedJSONParsing:Kt.transitional(Kt.boolean),clarifyTimeoutError:Kt.transitional(Kt.boolean),legacyInterceptorReqResOrdering:Kt.transitional(Kt.boolean),advertiseZstdAcceptEncoding:Kt.transitional(Kt.boolean),validateStatusUndefinedResolves:Kt.transitional(Kt.boolean)},!1),o!=null&&(_.isFunction(o)?n.paramsSerializer={serialize:o}:Ea.assertOptions(o,{encode:Kt.function,serialize:Kt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ea.assertOptions(n,{baseUrl:Kt.spelling("baseURL"),withXsrfToken:Kt.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(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;c=c&&v.synchronous;let x=n.transitional||Zr;x&&x.legacyInterceptorReqResOrdering?a.unshift(v.fulfilled,v.rejected):a.push(v.fulfilled,v.rejected)});let l=[];this.interceptors.response.forEach(function(v){l.push(v.fulfilled,v.rejected)});let p,d=0,f;if(!c){let y=[Kl.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++],v=a[d++];try{h=y(h)}catch(x){v.call(this,x);break}}try{p=Kl.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=Hn(this.defaults,e);let n=Do(e.baseURL,e.url,e.allowAbsoluteUrls,e);return Lo(n,e.params,e.paramsSerializer)}};_.forEach(["delete","get","head","options"],function(e){Gi.prototype[e]=function(n,r){return this.request(Hn(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(Hn(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Gi.prototype[e]=n(),e!=="query"&&(Gi.prototype[e+"Form"]=n(!0))});var $a=Gi;var kg=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 vn(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}}},uE=kg;function Tg(t){return function(n){return t.apply(null,n)}}function Eg(t){return _.isObject(t)&&t.isAxiosError===!0}var $g={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($g).forEach(([t,e])=>{$g[e]=t});var pE=$g;function dE(t){let e=new $a(t),n=oa($a.prototype.request,e);return _.extend(n,$a.prototype,e,{allOwnKeys:!0}),_.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return dE(Hn(t,o))},n}var kt=dE(Fi);kt.Axios=$a;kt.CanceledError=vn;kt.CancelToken=uE;kt.isCancel=ma;kt.VERSION=xr;kt.toFormData=qr;kt.AxiosError=P;kt.Cancel=kt.CanceledError;kt.all=function(e){return Promise.all(e)};kt.spread=Tg;kt.isAxiosError=Eg;kt.mergeConfig=Hn;kt.AxiosHeaders=rt;kt.formToJSON=t=>Ll(_.isHTMLForm(t)?new FormData(t):t);kt.getAdapter=Wl.getAdapter;kt.HttpStatusCode=pE;kt.default=kt;var vt=kt;var{Axios:TK,AxiosError:EK,CanceledError:$K,isCancel:RK,CancelToken:AK,VERSION:IK,all:CK,Cancel:PK,isAxiosError:OK,spread:zK,toFormData:NK,AxiosHeaders:jK,HttpStatusCode:LK,formToJSON:DK,getAdapter:MK,mergeConfig:FK,create:UK}=vt;function Hr(){return process.argv.slice(2)}function Ag(){let t=Hr(),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 Ig(){let t=Hr(),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 Cg(){let t=Hr(),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 rq(){let t=Hr();for(let e of t)if(e==="--debug")return!0;return!1}function Pg(){let t=Hr();for(let e of t)if(e==="--no-rule")return!0;return!1}function Og(){let t=Hr(),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 oq=(t,e=32)=>t.length>e?`${t.slice(0,e)}\u2026`:t,fE=["authorization","token","secret","password","cookie","api-key","apikey"],iq=t=>{let e=t.toLowerCase();return fE.some(n=>e.includes(n))},Rg=t=>{let e=t.toLowerCase();return fE.some(n=>e.includes(n))?`<redacted, length=${t.length}>`:`"${oq(t)}"`};function sq(){let t=Hr(),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 ${Rg(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): ${Rg(r)}`);else if(o===0)console.warn(`Skipping invalid --header (empty header name before ":"): ${Rg(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 aq(){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 Yl=null;function Xl(){return Yl||(Yl={...aq(),...sq()},Yl)}function mE(t){let e={};for(let[n,r]of Object.entries(t))e[n]=iq(n)?"<masked>":r;return e}function cq(){let t=Hr();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 hE(){let t=Ag(),e=Ig(),n=Cg(),r=rq(),o=Pg(),i=Og(),s=cq();return{token:t,baseUrl:e,rules:n,debug:r,noRule:o,proxy:i,format:s}}var TE=Ee(require("https"));var or=Ee(require("net"),1),Ra=Ee(require("tls"),1),wE=Ee(require("assert"),1),SE=Ee(Fo(),1);var gE=Ee(require("net"),1),yE=Ee(require("http"),1),xE=require("https");var BK=Ee(require("http"),1),HK=Ee(require("https"),1);var rr=Symbol("AgentBaseInternalState"),Ql=class extends yE.Agent{constructor(e){super(e),this[rr]={}}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(`
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 gE.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)?xE.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[rr].currentSocket=a,super.createSocket(e,n,r)},a=>{this.decrementSockets(i,s),r(a)})}createConnection(){let e=this[rr].currentSocket;if(this[rr].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[rr].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[rr]&&(this[rr].defaultPort=e)}get protocol(){return this[rr].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[rr]&&(this[rr].protocol=e)}};var kE=require("url");var vE=Ee(Fo(),1),eu=(0,vE.default)("https-proxy-agent:parse-proxy-response");function zg(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(),eu("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function c(p){s(),eu("onerror %o",p),n(p)}function l(p){o.push(p),r+=p.length;let d=Buffer.concat(o,r),f=d.indexOf(`\r
63
+ `+i)}}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Hn(this.defaults,n);let{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&$a.assertOptions(r,{silentJSONParsing:Kt.transitional(Kt.boolean),forcedJSONParsing:Kt.transitional(Kt.boolean),clarifyTimeoutError:Kt.transitional(Kt.boolean),legacyInterceptorReqResOrdering:Kt.transitional(Kt.boolean),advertiseZstdAcceptEncoding:Kt.transitional(Kt.boolean),validateStatusUndefinedResolves:Kt.transitional(Kt.boolean)},!1),o!=null&&(_.isFunction(o)?n.paramsSerializer={serialize:o}:$a.assertOptions(o,{encode:Kt.function,serialize:Kt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),$a.assertOptions(n,{baseUrl:Kt.spelling("baseURL"),withXsrfToken:Kt.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(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;c=c&&v.synchronous;let x=n.transitional||Zr;x&&x.legacyInterceptorReqResOrdering?a.unshift(v.fulfilled,v.rejected):a.push(v.fulfilled,v.rejected)});let l=[];this.interceptors.response.forEach(function(v){l.push(v.fulfilled,v.rejected)});let p,d=0,f;if(!c){let y=[Jl.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++],v=a[d++];try{h=y(h)}catch(x){v.call(this,x);break}}try{p=Jl.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=Hn(this.defaults,e);let n=Do(e.baseURL,e.url,e.allowAbsoluteUrls,e);return Lo(n,e.params,e.paramsSerializer)}};_.forEach(["delete","get","head","options"],function(e){Gi.prototype[e]=function(n,r){return this.request(Hn(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(Hn(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Gi.prototype[e]=n(),e!=="query"&&(Gi.prototype[e+"Form"]=n(!0))});var Ra=Gi;var Tg=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 vn(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}}},hE=Tg;function Eg(t){return function(n){return t.apply(null,n)}}function $g(t){return _.isObject(t)&&t.isAxiosError===!0}var Rg={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(Rg).forEach(([t,e])=>{Rg[e]=t});var gE=Rg;function yE(t){let e=new Ra(t),n=ia(Ra.prototype.request,e);return _.extend(n,Ra.prototype,e,{allOwnKeys:!0}),_.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return yE(Hn(t,o))},n}var kt=yE(Fi);kt.Axios=Ra;kt.CanceledError=vn;kt.CancelToken=hE;kt.isCancel=ha;kt.VERSION=xr;kt.toFormData=qr;kt.AxiosError=P;kt.Cancel=kt.CanceledError;kt.all=function(e){return Promise.all(e)};kt.spread=Eg;kt.isAxiosError=$g;kt.mergeConfig=Hn;kt.AxiosHeaders=rt;kt.formToJSON=t=>Dl(_.isHTMLForm(t)?new FormData(t):t);kt.getAdapter=Kl.getAdapter;kt.HttpStatusCode=gE;kt.default=kt;var vt=kt;var{Axios:DK,AxiosError:MK,CanceledError:FK,isCancel:UK,CancelToken:qK,VERSION:ZK,all:BK,Cancel:HK,isAxiosError:VK,spread:GK,toFormData:WK,AxiosHeaders:KK,HttpStatusCode:JK,formToJSON:YK,getAdapter:XK,mergeConfig:QK,create:e7}=vt;function Hr(){return process.argv.slice(2)}function Cg(){let t=Hr(),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 Ig(){let t=Hr(),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 Pg(){let t=Hr(),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 uq(){let t=Hr();for(let e of t)if(e==="--debug")return!0;return!1}function Og(){let t=Hr();for(let e of t)if(e==="--no-rule")return!0;return!1}function zg(){let t=Hr(),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 pq=(t,e=32)=>t.length>e?`${t.slice(0,e)}\u2026`:t,xE=["authorization","token","secret","password","cookie","api-key","apikey"],dq=t=>{let e=t.toLowerCase();return xE.some(n=>e.includes(n))},Ag=t=>{let e=t.toLowerCase();return xE.some(n=>e.includes(n))?`<redacted, length=${t.length}>`:`"${pq(t)}"`};function fq(){let t=Hr(),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 ${Ag(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): ${Ag(r)}`);else if(o===0)console.warn(`Skipping invalid --header (empty header name before ":"): ${Ag(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 mq(){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 Xl=null;function Ql(){return Xl||(Xl={...mq(),...fq()},Xl)}function vE(t){let e={};for(let[n,r]of Object.entries(t))e[n]=dq(n)?"<masked>":r;return e}function hq(){let t=Hr();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 bE(){let t=Cg(),e=Ig(),n=Pg(),r=uq(),o=Og(),i=zg(),s=hq();return{token:t,baseUrl:e,rules:n,debug:r,noRule:o,proxy:i,format:s}}var CE=Ee(require("https"));var or=Ee(require("net"),1),Aa=Ee(require("tls"),1),$E=Ee(require("assert"),1),RE=Ee(Fo(),1);var _E=Ee(require("net"),1),wE=Ee(require("http"),1),SE=require("https");var r7=Ee(require("http"),1),o7=Ee(require("https"),1);var rr=Symbol("AgentBaseInternalState"),eu=class extends wE.Agent{constructor(e){super(e),this[rr]={}}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(`
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 _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)?SE.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[rr].currentSocket=a,super.createSocket(e,n,r)},a=>{this.decrementSockets(i,s),r(a)})}createConnection(){let e=this[rr].currentSocket;if(this[rr].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[rr].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[rr]&&(this[rr].defaultPort=e)}get protocol(){return this[rr].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[rr]&&(this[rr].protocol=e)}};var AE=require("url");var kE=Ee(Fo(),1),tu=(0,kE.default)("https-proxy-agent:parse-proxy-response");function Ng(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(),tu("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function c(p){s(),tu("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
65
  \r
66
- `);if(f===-1){eu("have not received end of HTTP headers yet..."),i();return}let h=d.slice(0,f).toString("ascii").split(`\r
67
- `),y=h.shift();if(!y)return t.destroy(),n(new Error("No header received from proxy CONNECT response"));let v=y.split(" "),x=+v[1],m=v.slice(2).join(" "),b={};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=b[E];typeof j=="string"?b[E]=[j,F]:Array.isArray(j)?j.push(F):b[E]=F}eu("got proxy server response: %o %o",y,b),s(),e({connect:{statusCode:x,statusText:m,headers:b},buffered:d})}t.on("error",c),t.on("end",a),i()})}function bE(){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 Ho=(0,SE.default)("https-proxy-agent"),tu=t=>t.servername===void 0&&t.host&&!or.isIP(t.host)?{...t,servername:t.host}:t,Aa=class extends Ql{constructor(e,n){super(n),this.options={path:void 0},this.proxy=typeof e=="string"?new kE.URL(e):e,this.proxyHeaders=(n==null?void 0:n.headers)??{},Ho("Creating new HttpsProxyAgent instance: %o",this.proxy.href),n!=null&&n.negotiate?this.onProxyAuth=bE():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?Ng(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:"?(Ho("Creating `tls.Socket`: %o",this.connectOpts),o=Ra.connect(tu(this.connectOpts))):(Ho("Creating `net.Socket`: %o",this.connectOpts),o=or.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},s=or.isIPv6(n.host)?`[${n.host}]`:n.host,a=`CONNECT ${s}:${n.port} HTTP/1.1\r
66
+ `);if(f===-1){tu("have not received end of HTTP headers yet..."),i();return}let h=d.slice(0,f).toString("ascii").split(`\r
67
+ `),y=h.shift();if(!y)return t.destroy(),n(new Error("No header received from proxy CONNECT response"));let v=y.split(" "),x=+v[1],m=v.slice(2).join(" "),b={};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=b[E];typeof j=="string"?b[E]=[j,F]:Array.isArray(j)?j.push(F):b[E]=F}tu("got proxy server response: %o %o",y,b),s(),e({connect:{statusCode:x,statusText:m,headers:b},buffered:d})}t.on("error",c),t.on("end",a),i()})}function TE(){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 Ho=(0,RE.default)("https-proxy-agent"),nu=t=>t.servername===void 0&&t.host&&!or.isIP(t.host)?{...t,servername:t.host}:t,Ca=class extends eu{constructor(e,n){super(n),this.options={path:void 0},this.proxy=typeof e=="string"?new AE.URL(e):e,this.proxyHeaders=(n==null?void 0:n.headers)??{},Ho("Creating new HttpsProxyAgent instance: %o",this.proxy.href),n!=null&&n.negotiate?this.onProxyAuth=TE():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?jg(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:"?(Ho("Creating `tls.Socket`: %o",this.connectOpts),o=Aa.connect(nu(this.connectOpts))):(Ho("Creating `net.Socket`: %o",this.connectOpts),o=or.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},s=or.isIPv6(n.host)?`[${n.host}]`:n.host,a=`CONNECT ${s}:${n.port} HTTP/1.1\r
68
68
  `;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=zg(o);o.write(`${a}\r
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",_E),n.secureEndpoint?(Ho("Upgrading socket connection to TLS"),Ra.connect({...Ng(tu(n),"host","path","port"),socket:o})):o;if(l.statusCode===407&&this.onProxyAuth){Ho("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 or.Socket({writable:!1});return d.readable=!0,e.once("socket",f=>{Ho("Replaying proxy buffer for failed request"),(0,wE.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=Ra.connect(tu(this.connectOpts)):i=or.connect(this.connectOpts);let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=or.isIPv6(n.host)?`[${n.host}]`:n.host,c=`CONNECT ${a}:${n.port} HTTP/1.1\r
69
+ `;let c=Ng(o);o.write(`${a}\r
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",EE),n.secureEndpoint?(Ho("Upgrading socket connection to TLS"),Aa.connect({...jg(nu(n),"host","path","port"),socket:o})):o;if(l.statusCode===407&&this.onProxyAuth){Ho("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 or.Socket({writable:!1});return d.readable=!0,e.once("socket",f=>{Ho("Replaying proxy buffer for failed request"),(0,$E.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=Aa.connect(nu(this.connectOpts)):i=or.connect(this.connectOpts);let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=or.isIPv6(n.host)?`[${n.host}]`:n.host,c=`CONNECT ${a}:${n.port} HTTP/1.1\r
71
71
  `;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=zg(i);i.write(`${c}\r
73
- `);let{connect:p}=await l;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),p.statusCode===200)return e.once("socket",_E),n.secureEndpoint?(Ho("Upgrading socket connection to TLS"),Ra.connect({...Ng(tu(n),"host","path","port"),socket:i})):i;throw i.destroy(),new Error(`Proxy authentication failed with status ${p.statusCode} after retry`)}};Aa.protocols=["http","https"];function _E(t){setImmediate(()=>{t.resume()})}function Ng(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}var jg=Og()||process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy;if(jg)try{let t=new Aa(jg,{rejectUnauthorized:!1});vt.defaults.httpAgent=t,vt.defaults.httpsAgent=t,vt.defaults.proxy=!1}catch{throw new Error(`Invalid proxy URL: ${jg}`)}else vt.defaults.httpsAgent=new TE.default.Agent({rejectUnauthorized:!1});var nu=null,ir=()=>nu||(nu={"Content-Type":"application/json",Accept:"application/json","X-MG-UserAccessToken":process.env.MG_MCP_TOKEN||process.env.MASTERGO_API_TOKEN||Ag(),...Xl()},nu),ru=null,br=()=>{if(ru!==null)return ru;let t=process.env.API_BASE_URL||Ig();try{let e=new URL(t),n=e.protocol,r=e.hostname,o=e.port,i=`${n}//${r}`;return o&&(i+=`:${o}`),ru=i,ru}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`)}},lq=(t,e)=>{try{return new URL(t).host===new URL(e).host}catch{return!1}},uq=32,Vr=new Map;function pq(t,e){if(Vr.has(t))Vr.delete(t);else if(Vr.size>=uq){let n=Vr.keys().next().value;n!==void 0&&Vr.delete(n)}Vr.set(t,e)}var dq=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)},fq=()=>["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??"[]"),...Cg()],mq=()=>({async getMeta(t,e,n){return(await vt.get(`${br()}/mcp/meta`,{timeout:3e4,params:{fileId:t,layerId:e,...n?{sourceLayerId:n}:{}},headers:ir()})).data},async getDsl(t,e,n){let r={fileId:t,layerId:e};(n==null?void 0:n.sourceLayerId)!==void 0&&(r.sourceLayerId=n.sourceLayerId);let o=await vt.get(`${br()}/mcp/dsl`,{timeout:3e4,params:r,headers:ir()});return{dsl:o.data,componentDocumentLinks:dq(o.data),rules:Pg()?[]:fq()}},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(`${br()}/mcp/extract-svg`,{timeout:3e4,params:i,headers:ir()})).data},async getDesignSections(t,e,n){var o;let r={fileId:t,layerId:e};n!==void 0&&(r.sectionIndex=n);try{return(await vt.get(`${br()}/mcp/design-sections`,{timeout:12e4,params:r,headers:ir()})).data}catch(i){throw((o=i.response)==null?void 0:o.status)===404?new Error("design-sections API not available on this server. Please update frontend-mcp-server to the latest version."):i}},async getD2c(t,e){let n={contentId:t,documentId:e};return(await vt.get(`${br()}/mcp/d2c/events`,{timeout:3e4,params:n,headers:ir()})).data},async postC2d(t,e,n){return(await vt.post(`${br()}/mcp/c2d`,{data:t,fileId:e,layerId:n},{timeout:3e4,headers:ir()})).data},async applyDesign(t,e,n,r,o){var i;try{return(await vt.post(`${br()}/mcp/apply-design`,{code:t,fileId:e,layerId:n,...r?{sourceLayerId:r}:{},...o?{targetLang:o}:{}},{timeout:6e4,headers:ir()})).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(`${br()}/mcp/style`,{timeout:3e4,params:{fileId:t,layerId:e,...n?{sourceLayerId:n}:{}},headers:ir()})).data},async request(t){return(await vt.request({...t,headers:{...ir(),...t.headers}})).data},async extractIdsFromUrl(t){if(t.includes("/goto/")&&Vr.has(t))return{...Vr.get(t)};let e=t;if(t.includes("/goto/")){let l=lq(t,br()),d=(await vt.get(t,{maxRedirects:0,validateStatus:f=>f>=300&&f<400,...l?{headers:ir()}:{}})).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=mq();function hq(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jt={},ou={},Gr={},EE;function Ia(){if(EE)return Gr;EE=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 Gr.isNothing=t,Gr.isObject=e,Gr.toArray=n,Gr.repeat=o,Gr.isNegativeZero=i,Gr.extend=r,Gr}var Lg,$E;function Ca(){if($E)return Lg;$E=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+=`
72
+ `;let l=Ng(i);i.write(`${c}\r
73
+ `);let{connect:p}=await l;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),p.statusCode===200)return e.once("socket",EE),n.secureEndpoint?(Ho("Upgrading socket connection to TLS"),Aa.connect({...jg(nu(n),"host","path","port"),socket:i})):i;throw i.destroy(),new Error(`Proxy authentication failed with status ${p.statusCode} after retry`)}};Ca.protocols=["http","https"];function EE(t){setImmediate(()=>{t.resume()})}function jg(t,...e){let n={},r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}var Lg=zg()||process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy;if(Lg)try{let t=new Ca(Lg,{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: ${Lg}`)}else vt.defaults.httpsAgent=new CE.default.Agent({rejectUnauthorized:!1,keepAlive:!0,keepAliveMsecs:3e4,maxSockets:50,maxFreeSockets:8});var ru=null,ir=()=>ru||(ru={"Content-Type":"application/json",Accept:"application/json","X-MG-UserAccessToken":process.env.MG_MCP_TOKEN||process.env.MASTERGO_API_TOKEN||Cg(),...Ql()},ru),ou=null,br=()=>{if(ou!==null)return ou;let t=process.env.API_BASE_URL||Ig();try{let e=new URL(t),n=e.protocol,r=e.hostname,o=e.port,i=`${n}//${r}`;return o&&(i+=`:${o}`),ou=i,ou}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`)}},gq=(t,e)=>{try{return new URL(t).host===new URL(e).host}catch{return!1}},yq=32,Vr=new Map;function xq(t,e){if(Vr.has(t))Vr.delete(t);else if(Vr.size>=yq){let n=Vr.keys().next().value;n!==void 0&&Vr.delete(n)}Vr.set(t,e)}var vq=64,bq=300*1e3,sr=new Map,Dg=new Map;function Mg(t,e,n,r){return`${t}:${e}:${n}${r?`:${r}`:""}`}function _q(t){let e=sr.get(t);if(e){if(Date.now()>e.expiresAt){sr.delete(t);return}return sr.delete(t),sr.set(t,e),e.value}}function wq(t,e){if(sr.has(t))sr.delete(t);else if(sr.size>=vq){let n=sr.keys().next().value;n!==void 0&&sr.delete(n)}sr.set(t,{value:e,expiresAt:Date.now()+bq})}async function Fg(t,e){let n=_q(t);if(n!==void 0)return n;let r=Dg.get(t);if(r)return r;let o=e().then(i=>(wq(t,i),i)).finally(()=>{Dg.delete(t)});return Dg.set(t,o),o}var Sq=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)},kq=()=>["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??"[]"),...Pg()],Tq=()=>({async getMeta(t,e,n){let r=Mg("meta",t,e,n);return Fg(r,async()=>(await vt.get(`${br()}/mcp/meta`,{timeout:3e4,params:{fileId:t,layerId:e,...n?{sourceLayerId:n}:{}},headers:ir()})).data)},async getDsl(t,e,n){let r=Mg("dsl",t,e,n==null?void 0:n.sourceLayerId);return Fg(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(`${br()}/mcp/dsl`,{timeout:3e4,params:o,headers:ir()});return{dsl:i.data,componentDocumentLinks:Sq(i.data),rules:Og()?[]:kq()}})},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(`${br()}/mcp/extract-svg`,{timeout:3e4,params:i,headers:ir()})).data},async getDesignSections(t,e,n){let r=Mg("sections",t,e,n!==void 0?String(n):"list");return Fg(r,async()=>{var i;let o={fileId:t,layerId:e};n!==void 0&&(o.sectionIndex=n);try{return(await vt.get(`${br()}/mcp/design-sections`,{timeout:12e4,params:o,headers:ir()})).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(`${br()}/mcp/d2c/events`,{timeout:3e4,params:n,headers:ir()})).data},async postC2d(t,e,n){return(await vt.post(`${br()}/mcp/c2d`,{data:t,fileId:e,layerId:n},{timeout:3e4,headers:ir()})).data},async applyDesign(t,e,n,r,o){var i;try{return(await vt.post(`${br()}/mcp/apply-design`,{code:t,fileId:e,layerId:n,...r?{sourceLayerId:r}:{},...o?{targetLang:o}:{}},{timeout:6e4,headers:ir()})).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(`${br()}/mcp/style`,{timeout:3e4,params:{fileId:t,layerId:e,...n?{sourceLayerId:n}:{}},headers:ir()})).data},async request(t){return(await vt.request({...t,headers:{...ir(),...t.headers}})).data},async extractIdsFromUrl(t){if(t.includes("/goto/")&&Vr.has(t))return{...Vr.get(t)};let e=t;if(t.includes("/goto/")){let l=gq(t,br()),d=(await vt.get(t,{maxRedirects:0,validateStatus:f=>f>=300&&f<400,...l?{headers:ir()}:{}})).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/")&&xq(t,c),c}}),ot=Tq();function Eq(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Jt={},iu={},Gr={},IE;function Ia(){if(IE)return Gr;IE=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 Gr.isNothing=t,Gr.isObject=e,Gr.toArray=n,Gr.repeat=o,Gr.isNegativeZero=i,Gr.extend=r,Gr}var Ug,PE;function Pa(){if(PE)return Ug;PE=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
74
 
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)},Lg=e,Lg}var Dg,RE;function gq(){if(RE)return Dg;RE=1;let t=Ia();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 v=1;v<=i.linesBefore&&!(p-v<0);v++){let x=e(o.buffer,a[p-v],c[p-v],o.position-(a[p]-a[p-v]),h);d=t.repeat(" ",i.indent)+n((o.line-v+1).toString(),f)+" | "+x.str+`
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)},Ug=e,Ug}var qg,OE;function $q(){if(OE)return qg;OE=1;let t=Ia();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 v=1;v<=i.linesBefore&&!(p-v<0);v++){let x=e(o.buffer,a[p-v],c[p-v],o.position-(a[p]-a[p-v]),h);d=t.repeat(" ",i.indent)+n((o.line-v+1).toString(),f)+" | "+x.str+`
76
76
  `+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
77
  `,d+=t.repeat("-",i.indent+f+3+y.pos)+`^
78
78
  `;for(let v=1;v<=i.linesAfter&&!(p+v>=c.length);v++){let x=e(o.buffer,a[p+v],c[p+v],o.position-(a[p]-a[p+v]),h);d+=t.repeat(" ",i.indent)+n((o.line+v+1).toString(),f)+" | "+x.str+`
79
- `}return d.replace(/\n$/,"")}return Dg=r,Dg}var Mg,AE;function nn(){if(AE)return Mg;AE=1;let t=Ca(),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 Mg=o,Mg}var Fg,IE;function YE(){if(IE)return Fg;IE=1;let t=Ca(),e=nn();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},Fg=o,Fg}var Ug,CE;function XE(){if(CE)return Ug;CE=1;let t=nn();return Ug=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Ug}var qg,PE;function QE(){if(PE)return qg;PE=1;let t=nn();return qg=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),qg}var Zg,OE;function e$(){if(OE)return Zg;OE=1;let t=nn();return Zg=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Zg}var Bg,zE;function t$(){if(zE)return Bg;zE=1;let t=YE();return Bg=new t({explicit:[XE(),QE(),e$()]}),Bg}var Hg,NE;function n$(){if(NE)return Hg;NE=1;let t=nn();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 Hg=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"}),Hg}var Vg,jE;function r$(){if(jE)return Vg;jE=1;let t=nn();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 Vg=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"}),Vg}var Gg,LE;function o$(){if(LE)return Gg;LE=1;let t=Ia(),e=nn();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 Gg=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"]}}),Gg}var Wg,DE;function i$(){if(DE)return Wg;DE=1;let t=Ia(),e=nn(),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 Wg=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:i,predicate:c,represent:a,defaultStyle:"lowercase"}),Wg}var Kg,ME;function s$(){return ME||(ME=1,Kg=t$().extend({implicit:[n$(),r$(),o$(),i$()]})),Kg}var Jg,FE;function a$(){return FE||(FE=1,Jg=s$()),Jg}var Yg,UE;function c$(){if(UE)return Yg;UE=1;let t=nn(),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],v=+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],b=+(l[11]||0);c=(m*60+b)*6e4,l[9]==="-"&&(c=-c)}let x=new Date(Date.UTC(p,d,f,h,y,v,a));return c&&x.setTime(x.getTime()-c),x}function i(s){return s.toISOString()}return Yg=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:o,instanceOf:Date,represent:i}),Yg}var Xg,qE;function l$(){if(qE)return Xg;qE=1;let t=nn();function e(n){return n==="<<"||n===null}return Xg=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),Xg}var Qg,ZE;function u$(){if(ZE)return Qg;ZE=1;let t=nn(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
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 Qg=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n,construct:r,predicate:i,represent:o}),Qg}var ey,BE;function p$(){if(BE)return ey;BE=1;let t=nn(),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)return!1;if(s.indexOf(f)===-1)s.push(f);else return!1}return!0}function o(i){return i!==null?i:[]}return ey=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:o}),ey}var ty,HE;function d$(){if(HE)return ty;HE=1;let t=nn(),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 ty=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:n,construct:r}),ty}var ny,VE;function f$(){if(VE)return ny;VE=1;let t=nn(),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 ny=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:n,construct:r}),ny}var ry,GE;function iy(){return GE||(GE=1,ry=a$().extend({implicit:[c$(),l$()],explicit:[u$(),p$(),d$(),f$()]})),ry}var WE;function yq(){if(WE)return ou;WE=1;let t=Ia(),e=Ca(),n=gq(),r=iy(),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=/[,\[\]{}]/,v=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function m(u){return Object.prototype.toString.call(u)}function b(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`
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 At(u,S){u.onWarning&&u.onWarning.call(null,yt(u,S))}function Zt(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 Vn(u){u.anchorMapTransactions.push(Object.create(null))}function Pe(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 Yt={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&&At(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],v.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(b(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&&At(u,"deficient indentation"),N}function Tt(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 Et(u,S){S===1?u.result+=" ":S>1&&(u.result+=t.repeat(`
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&&Tt(u)||C&&E(M))break;if(b(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),Et(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 Bt(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 b(A)?(it(u,C,N,!0),Et(u,Oe(u,!1,S)),C=N=u.position):u.position===u.lineStart&&Tt(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 _n(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),b(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 b(Z)?(it(u,C,N,!0),Et(u,Oe(u,!1,S)),C=N=u.position):u.position===u.lineStart&&Tt(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 zt(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&&Zt(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(!b(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),b(z)){T++;continue}if(!Z&&g===0&&V(u,"missing indentation for block scalar"),u.lineIndent<g){N===d?u.result+=t.repeat(`
79
+ `}return d.replace(/\n$/,"")}return qg=r,qg}var Zg,zE;function nn(){if(zE)return Zg;zE=1;let t=Pa(),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 Zg=o,Zg}var Bg,NE;function n$(){if(NE)return Bg;NE=1;let t=Pa(),e=nn();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},Bg=o,Bg}var Hg,jE;function r$(){if(jE)return Hg;jE=1;let t=nn();return Hg=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Hg}var Vg,LE;function o$(){if(LE)return Vg;LE=1;let t=nn();return Vg=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Vg}var Gg,DE;function i$(){if(DE)return Gg;DE=1;let t=nn();return Gg=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Gg}var Wg,ME;function s$(){if(ME)return Wg;ME=1;let t=n$();return Wg=new t({explicit:[r$(),o$(),i$()]}),Wg}var Kg,FE;function a$(){if(FE)return Kg;FE=1;let t=nn();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 Kg=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"}),Kg}var Jg,UE;function c$(){if(UE)return Jg;UE=1;let t=nn();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 Jg=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"}),Jg}var Yg,qE;function l$(){if(qE)return Yg;qE=1;let t=Ia(),e=nn();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 Yg=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"]}}),Yg}var Xg,ZE;function u$(){if(ZE)return Xg;ZE=1;let t=Ia(),e=nn(),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 Xg=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:i,predicate:c,represent:a,defaultStyle:"lowercase"}),Xg}var Qg,BE;function p$(){return BE||(BE=1,Qg=s$().extend({implicit:[a$(),c$(),l$(),u$()]})),Qg}var ey,HE;function d$(){return HE||(HE=1,ey=p$()),ey}var ty,VE;function f$(){if(VE)return ty;VE=1;let t=nn(),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],v=+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],b=+(l[11]||0);c=(m*60+b)*6e4,l[9]==="-"&&(c=-c)}let x=new Date(Date.UTC(p,d,f,h,y,v,a));return c&&x.setTime(x.getTime()-c),x}function i(s){return s.toISOString()}return ty=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:o,instanceOf:Date,represent:i}),ty}var ny,GE;function m$(){if(GE)return ny;GE=1;let t=nn();function e(n){return n==="<<"||n===null}return ny=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e}),ny}var ry,WE;function h$(){if(WE)return ry;WE=1;let t=nn(),e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
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 ry=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:n,construct:r,predicate:i,represent:o}),ry}var oy,KE;function g$(){if(KE)return oy;KE=1;let t=nn(),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)return!1;if(s.indexOf(f)===-1)s.push(f);else return!1}return!0}function o(i){return i!==null?i:[]}return oy=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:o}),oy}var iy,JE;function y$(){if(JE)return iy;JE=1;let t=nn(),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 iy=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:n,construct:r}),iy}var sy,YE;function x$(){if(YE)return sy;YE=1;let t=nn(),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 sy=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:n,construct:r}),sy}var ay,XE;function ly(){return XE||(XE=1,ay=d$().extend({implicit:[f$(),m$()],explicit:[h$(),g$(),y$(),x$()]})),ay}var QE;function Rq(){if(QE)return iu;QE=1;let t=Ia(),e=Pa(),n=$q(),r=ly(),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=/[,\[\]{}]/,v=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function m(u){return Object.prototype.toString.call(u)}function b(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`
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,I){S==="__proto__"?Object.defineProperty(u,S,{configurable:!0,enumerable:!0,writable:!0,value:I}):u[S]=I}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 I={name:u.filename,buffer:u.input.slice(0,-1),position:u.position,line:u.line,column:u.position-u.lineStart};return I.snippet=n(I),new e(S,I)}function V(u,S){throw yt(u,S)}function At(u,S){u.onWarning&&u.onWarning.call(null,yt(u,S))}function Zt(u,S,I){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]=I}function Vn(u){u.anchorMapTransactions.push(Object.create(null))}function Pe(u){let S=u.anchorMapTransactions.pop(),I=u.anchorMapTransactions;if(I.length===0)return;let N=I[I.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(),I=Object.keys(S);for(let N=I.length-1;N>=0;N-=1){let A=S[I[N]];A.existed?u.anchorMap[I[N]]=A.value:delete u.anchorMap[I[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 Yt={YAML:function(S,I,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&&At(S,"unsupported YAML version of the document")},TAG:function(S,I,N){let A;N.length!==2&&V(S,"TAG directive accepts exactly two arguments");let Z=N[0];A=N[1],v.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,I,N){if(S<I){let A=u.input.slice(S,I);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,I,N){t.isObject(I)||V(u,"cannot merge mappings; the provided source object is unacceptable");let A=Object.keys(I);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,I[T]),N[T]=!0)}}function ke(u,S,I,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],I);else ge(u,S,Z,I);else!u.json&&!o.call(I,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 I[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,I){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(b(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 I!==-1&&N!==0&&u.lineIndent<I&&At(u,"deficient indentation"),N}function Tt(u){let S=u.position,I=u.input.charCodeAt(S);return!!((I===45||I===46)&&I===u.input.charCodeAt(S+1)&&I===u.input.charCodeAt(S+2)&&(S+=3,I=u.input.charCodeAt(S),I===0||k(I)))}function Et(u,S){S===1?u.result+=" ":S>1&&(u.result+=t.repeat(`
82
+ `,S-1))}function Te(u,S,I){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)||I&&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)||I&&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&&Tt(u)||I&&E(M))break;if(b(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),Et(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 Bt(u,S){let I,N,A=u.input.charCodeAt(u.position);if(A!==39)return!1;for(u.kind="scalar",u.result="",u.position++,I=N=u.position;(A=u.input.charCodeAt(u.position))!==0;)if(A===39)if(it(u,I,u.position,!0),A=u.input.charCodeAt(++u.position),A===39)I=u.position,u.position++,N=u.position;else return!0;else b(A)?(it(u,I,N,!0),Et(u,Oe(u,!1,S)),I=N=u.position):u.position===u.lineStart&&Tt(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 _n(u,S){let I,N,A,Z=u.input.charCodeAt(u.position);if(Z!==34)return!1;for(u.kind="scalar",u.result="",u.position++,I=N=u.position;(Z=u.input.charCodeAt(u.position))!==0;){if(Z===34)return it(u,I,u.position,!0),u.position++,!0;if(Z===92){if(it(u,I,u.position,!0),Z=u.input.charCodeAt(++u.position),b(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");I=N=u.position}else b(Z)?(it(u,I,N,!0),Et(u,Oe(u,!1,S)),I=N=u.position):u.position===u.lineStart&&Tt(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 zt(u,S){let I=!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&&Zt(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(I?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?(I=!0,ze=u.input.charCodeAt(++u.position)):I=!1}V(u,"unexpected end of the stream within a flow collection")}function pe(u,S){let I,N=l,A=!1,Z=!1,g=S,T=0,D=!1,O,z=u.input.charCodeAt(u.position);if(z===124)I=!1;else if(z===62)I=!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(!b(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),b(z)){T++;continue}if(!Z&&g===0&&V(u,"missing indentation for block scalar"),u.lineIndent<g){N===d?u.result+=t.repeat(`
83
83
  `,A?1+T:T):N===l&&A&&(u.result+=`
84
- `);break}C?w(z)?(D=!0,u.result+=t.repeat(`
84
+ `);break}I?w(z)?(D=!0,u.result+=t.repeat(`
85
85
  `,A?1+T:T)):D?(D=!1,u.result+=t.repeat(`
86
86
  `,T+1)):T===0?A&&(u.result+=" "):u.result+=t.repeat(`
87
87
  `,T):u.result+=t.repeat(`
88
- `,A?1+T:T),A=!0,Z=!0,T=0;let M=u.position;for(;!b(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&&Zt(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&&Zt(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),v.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 Vn(u),De(u,S),u.tag=null,u.anchor=null,u.kind=null,u.result=null,W(u,C,N)&&u.kind==="mapping"?(Pe(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))||zt(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)||Bt(u,L)||_n(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&&Zt(u,u.anchor,u.result)}else T===0&&(O=g&&Ye(u,Q));if(u.tag===null)u.anchor!==null&&Zt(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&&Zt(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&&Zt(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&&!b(N));break}if(b(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(Yt,Z)?Yt[Z](u,Z,g):At(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))&&At(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&Tt(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+=`
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 On(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 cr(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 ou.loadAll=On,ou.load=cr,ou}var oy={},KE;function xq(){if(KE)return oy;KE=1;let t=Ia(),e=Ca(),n=iy(),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,v=39,x=42,m=44,b=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 At(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 Zt(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 Vn=1,Pe=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=At(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==='"'?Pe:Vn,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(`
88
+ `,A?1+T:T),A=!0,Z=!0,T=0;let M=u.position;for(;!b(z)&&z!==0;)z=u.input.charCodeAt(++u.position);it(u,M,u.position,!1)}return!0}function Ye(u,S){let I=u.tag,N=u.anchor,A=[],Z=!1;if(u.firstTabInLine!==-1)return!1;u.anchor!==null&&Zt(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=I,u.anchor=N,u.kind="sequence",u.result=A,!0):!1}function W(u,S,I){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&&Zt(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,I,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,I=!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?(I=!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&&(I?V(u,"tag suffix cannot contain exclamation marks"):(N=u.input.slice(g-1,u.position+1),v.test(N)||V(u,"named tag handle cannot contain such characters"),I=!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 I=u.position;for(;S!==0&&!k(S)&&!E(S);)S=u.input.charCodeAt(++u.position);return u.position===I&&V(u,"name of an anchor node must contain at least one character"),u.anchor=u.input.slice(I,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 I=u.position;for(;S!==0&&!k(S)&&!E(S);)S=u.input.charCodeAt(++u.position);u.position===I&&V(u,"name of an alias node must contain at least one character");let N=u.input.slice(I,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,I,N){let A=qe(u);return Vn(u),De(u,S),u.tag=null,u.anchor=null,u.kind=null,u.result=null,W(u,I,N)&&u.kind==="mapping"?(Pe(u),!0):(B(u),De(u,A),!1)}function We(u,S,I,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===I||a===I;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===I)if(i===I||s===I?L=S:L=S+1,Q=u.position-u.lineStart,T===1)if(g&&(Ye(u,Q)||W(u,Q,L))||zt(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)||Bt(u,L)||_n(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===I)&&(O=!0,u.tag===null&&(u.tag="?")),u.anchor!==null&&Zt(u,u.anchor,u.result)}else T===0&&(O=g&&Ye(u,Q));if(u.tag===null)u.anchor!==null&&Zt(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&&Zt(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&&Zt(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,I=!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));){I=!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&&!b(N));break}if(b(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(Yt,Z)?Yt[Z](u,Z,g):At(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)):I&&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))&&At(u,"non-ASCII line breaks are interpreted as content"),u.documents.push(u.result),u.position===u.lineStart&&Tt(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+=`
89
+ `),u.charCodeAt(0)===65279&&(u=u.slice(1)));let I=new ae(u,S),N=u.indexOf("\0");for(N!==-1&&(I.position=N,V(I,"null byte is not allowed in input")),I.input+="\0";I.input.charCodeAt(I.position)===32;)I.lineIndent+=1,I.position+=1;for(;I.position<I.length-1;)St(I);return I.documents}function On(u,S,I){S!==null&&typeof S=="object"&&typeof I>"u"&&(I=S,S=null);let N=Qe(u,I);if(typeof S!="function")return N;for(let A=0,Z=N.length;A<Z;A+=1)S(N[A])}function cr(u,S){let I=Qe(u,S);if(I.length!==0){if(I.length===1)return I[0];throw new e("expected a single document in the stream, but found more")}}return iu.loadAll=On,iu.load=cr,iu}var cy={},e$;function Aq(){if(e$)return cy;e$=1;let t=Ia(),e=Pa(),n=ly(),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,v=39,x=42,m=44,b=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 At(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 Zt(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 Vn=1,Pe=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=At(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==='"'?Pe:Vn,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
90
  `,O);Q===-1?(L=g.slice(O),O=M):(L=g.slice(O,Q+1),O=Q+1),L.length&&L!==`
91
91
  `&&(z+=D),z+=L}return z}function De(g,T){return`
92
- `+t.repeat(" ",g.indent*T)}function Yt(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!==b&&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!==v&&g!==d&&g!==h&&g!==j&&g!==oe}function Tt(g){return!it(g)&&g!==w}function Et(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 Bt=1,_n=2,zt=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,hy=O!==-1,Xi=-1,Qi=Oe(Et(g,0))&&Tt(Et(g,g.length-1));if(T||L)for(J=0;J<g.length;ie>=65536?J+=2:J++){if(ie=Et(g,J),!ge(ie))return Ye;Qi=Qi&&ut(ie,ce,Q),ce=ie}else{for(J=0;J<g.length;ie>=65536?J+=2:J++){if(ie=Et(g,J),ie===a)ze=!0,hy&&(st=st||J-Xi-1>O&&g[Xi+1]!==" ",Xi=J);else if(!ge(ie))return Ye;Qi=Qi&&ut(ie,ce,Q),ce=ie}st=st||hy&&J-Xi-1>O&&g[Xi+1]!==" "}return!ze&&!st?Qi&&!L&&!z(g)?Bt:M===Pe?Ye:_n:D>9&&Te(g)?Ye:L?M===Pe?Ye:_n:st?pe:zt}function G(g,T,D,O,z){g.dump=(function(){if(T.length===0)return g.quotingType===Pe?'""':"''";if(!g.noCompatMode&&(yt.indexOf(T)!==-1||V.test(T)))return g.quotingType===Pe?'"'+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 Yt(g,ie)}switch(W(T,Q,g.indent,L,J,g.quotingType,g.forceQuotes&&!O,z)){case Bt:return T;case _n:return"'"+T.replace(/'/g,"''")+"'";case zt: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]===`
92
+ `+t.repeat(" ",g.indent*T)}function Yt(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!==b&&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!==v&&g!==d&&g!==h&&g!==j&&g!==oe}function Tt(g){return!it(g)&&g!==w}function Et(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 Bt=1,_n=2,zt=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,by=O!==-1,Qi=-1,es=Oe(Et(g,0))&&Tt(Et(g,g.length-1));if(T||L)for(J=0;J<g.length;ie>=65536?J+=2:J++){if(ie=Et(g,J),!ge(ie))return Ye;es=es&&ut(ie,ce,Q),ce=ie}else{for(J=0;J<g.length;ie>=65536?J+=2:J++){if(ie=Et(g,J),ie===a)ze=!0,by&&(st=st||J-Qi-1>O&&g[Qi+1]!==" ",Qi=J);else if(!ge(ie))return Ye;es=es&&ut(ie,ce,Q),ce=ie}st=st||by&&J-Qi-1>O&&g[Qi+1]!==" "}return!ze&&!st?es&&!L&&!z(g)?Bt:M===Pe?Ye:_n:D>9&&Te(g)?Ye:L?M===Pe?Ye:_n:st?pe:zt}function G(g,T,D,O,z){g.dump=(function(){if(T.length===0)return g.quotingType===Pe?'""':"''";if(!g.noCompatMode&&(yt.indexOf(T)!==-1||V.test(T)))return g.quotingType===Pe?'"'+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 Yt(g,ie)}switch(W(T,Q,g.indent,L,J,g.quotingType,g.forceQuotes&&!O,z)){case Bt:return T;case _n:return"'"+T.replace(/'/g,"''")+"'";case zt: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
93
  `,M=O&&(g[g.length-2]===`
94
94
  `||g===`
95
95
  `)?"+":O?"":"-";return D+M+`
@@ -100,21 +100,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
100
100
  `:"")+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
101
  `+g.slice(z,M),z=M+1),L=Q;return J+=`
102
102
  `,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=Et(g,O);let z=ae[D];!z&&ge(D)?(T+=g[O],D>=65536&&(T+=g[O+1])):T+=z||Zt(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 On(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 cr(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)):(cr(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?On(g,T-1,g.dump,z):On(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+`
104
- `:""}return oy.dump=Z,oy}var JE;function vq(){if(JE)return Jt;JE=1;let t=yq(),e=xq();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 Jt.Type=nn(),Jt.Schema=YE(),Jt.FAILSAFE_SCHEMA=t$(),Jt.JSON_SCHEMA=s$(),Jt.CORE_SCHEMA=a$(),Jt.DEFAULT_SCHEMA=iy(),Jt.load=t.load,Jt.loadAll=t.loadAll,Jt.dump=e.dump,Jt.YAMLException=Ca(),Jt.types={binary:u$(),float:i$(),map:e$(),null:n$(),pairs:d$(),set:f$(),timestamp:c$(),bool:r$(),int:o$(),merge:l$(),omap:p$(),seq:QE(),str:XE()},Jt.safeLoad=n("safeLoad","load"),Jt.safeLoadAll=n("safeLoadAll","loadAll"),Jt.safeDump=n("safeDump","dump"),Jt}var bq=vq(),sy=hq(bq),{Type:s7,Schema:a7,FAILSAFE_SCHEMA:c7,JSON_SCHEMA:l7,CORE_SCHEMA:u7,DEFAULT_SCHEMA:p7,load:d7,loadAll:f7,dump:m7,YAMLException:h7,types:g7,safeLoad:y7,safeLoadAll:x7,safeDump:v7}=sy;var m$=["json","yaml","tree"],_q=`Output format for design data. Defaults to json.
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=Et(g,O);let z=ae[D];!z&&ge(D)?(T+=g[O],D>=65536&&(T+=g[O+1])):T+=z||Zt(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)),(I(g,T,Q,!1,!1)||typeof Q>"u"&&I(g,T,null,!1,!1))&&(O!==""&&(O+=","+(g.condenseFlow?"":" ")),O+=g.dump)}g.tag=z,g.dump="["+O+"]"}function On(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)),(I(g,T+1,J,!0,!0,!1,!0)||typeof J>"u"&&I(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 cr(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)),I(g,T,ie,!1,!1)&&(g.dump.length>1024&&(J+="? "),J+=g.dump+(g.condenseFlow?'"':"")+":"+(g.condenseFlow?"":" "),I(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)),!I(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)),I(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 I(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)):(cr(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?On(g,T-1,g.dump,z):On(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)),I(D,0,O,!0,!0)?D.dump+`
104
+ `:""}return cy.dump=Z,cy}var t$;function Cq(){if(t$)return Jt;t$=1;let t=Rq(),e=Aq();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 Jt.Type=nn(),Jt.Schema=n$(),Jt.FAILSAFE_SCHEMA=s$(),Jt.JSON_SCHEMA=p$(),Jt.CORE_SCHEMA=d$(),Jt.DEFAULT_SCHEMA=ly(),Jt.load=t.load,Jt.loadAll=t.loadAll,Jt.dump=e.dump,Jt.YAMLException=Pa(),Jt.types={binary:h$(),float:u$(),map:i$(),null:a$(),pairs:y$(),set:x$(),timestamp:f$(),bool:c$(),int:l$(),merge:m$(),omap:g$(),seq:o$(),str:r$()},Jt.safeLoad=n("safeLoad","load"),Jt.safeLoadAll=n("safeLoadAll","loadAll"),Jt.safeDump=n("safeDump","dump"),Jt}var Iq=Cq(),uy=Eq(Iq),{Type:v7,Schema:b7,FAILSAFE_SCHEMA:_7,JSON_SCHEMA:w7,CORE_SCHEMA:S7,DEFAULT_SCHEMA:k7,load:T7,loadAll:E7,dump:$7,YAMLException:R7,types:A7,safeLoad:C7,safeLoadAll:I7,safeDump:P7}=uy;var v$=["json","yaml","tree"],Pq=`Output format for design data. Defaults to json.
105
105
  - json \u2014 default; useful when piping output into tools that expect JSON.
106
106
  - 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 Kr(){return Y.enum(m$).optional().describe(_q)}function Jr(t,e){let n=wq(e);return n==="yaml"?kq(t):n==="tree"?$q(t):JSON.stringify(t)}function iu(t){return Sq(t)?t:null}function wq(t){return iu(t)??iu(process.env.DEFAULT_FORMAT)??"json"}function Sq(t){return typeof t=="string"&&m$.includes(t)}function kq(t){try{return sy.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 Tq=new Set(["type","id","name","layoutStyle","fill","strokeColor","strokeType","strokeAlign","strokeWidth","componentId","componentInfo","flexContainerInfo","text","textColor","children"]),Eq=new Set(["width","height","relativeX","relativeY"]);function Vo(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function $q(t){if(!Vo(t))return JSON.stringify(t);let e=t;return Vo(e.dsl)&&Array.isArray(e.dsl.nodes)?Rq(e):Array.isArray(e.nodes)?h$(e,[]).join(`
108
- `):Array.isArray(e.sections)?Iq(e):Array.isArray(e.svgs)?Cq(e):Vo(e.svgs)||Vo(e.texts)?Pq(e):JSON.stringify(t)}function h$(t,e){if(e.push("globalVars:"),Vo(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??[])g$(n,1,e);return e}function Rq(t){let e=[];for(let[n,r]of Object.entries(t))n!=="dsl"&&e.push(`${n}: ${JSON.stringify(r)}`);return h$(t.dsl,e),e.join(`
109
- `)}var Aq=new Set(["type","id","name","nodeCount","x","y","width","height","layoutStyle"]);function Iq(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=[];Wi(p,"nodeCount",r.nodeCount),e.push(` [${o}] ${r.type??"?"} ${r.id??"?"} ${su(r.name)} ${Wr(s)}x${Wr(a)} @${Wr(c)},${Wr(l)}`+(p.length?" "+p.join(" "):""));for(let[d,f]of Object.entries(r))Aq.has(d)||f===void 0||e.push(` ${d}=${JSON.stringify(f)}`)}),e.join(`
110
- `)}function Cq(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(`
111
- `)):(e.push("svgs:"),n.forEach((r,o)=>{e.push(` [${o}] ${su(r.name)} (${r.id??"?"})`);let i=r.svg;if(typeof i=="string"&&!i.includes(`
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 Kr(){return Y.enum(v$).optional().describe(Pq)}function Jr(t,e){let n=Oq(e);return n==="yaml"?Nq(t):n==="tree"?Dq(t):JSON.stringify(t)}function su(t){return zq(t)?t:null}function Oq(t){return su(t)??su(process.env.DEFAULT_FORMAT)??"json"}function zq(t){return typeof t=="string"&&v$.includes(t)}function Nq(t){try{return uy.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 jq=new Set(["type","id","name","layoutStyle","fill","strokeColor","strokeType","strokeAlign","strokeWidth","componentId","componentInfo","flexContainerInfo","text","textColor","children"]),Lq=new Set(["width","height","relativeX","relativeY"]);function Vo(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Dq(t){if(!Vo(t))return JSON.stringify(t);let e=t;return Vo(e.dsl)&&Array.isArray(e.dsl.nodes)?Mq(e):Array.isArray(e.nodes)?b$(e,[]).join(`
108
+ `):Array.isArray(e.sections)?Uq(e):Array.isArray(e.svgs)?qq(e):Vo(e.svgs)||Vo(e.texts)?Zq(e):JSON.stringify(t)}function b$(t,e){if(e.push("globalVars:"),Vo(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 Mq(t){let e=[];for(let[n,r]of Object.entries(t))n!=="dsl"&&e.push(`${n}: ${JSON.stringify(r)}`);return b$(t.dsl,e),e.join(`
109
+ `)}var Fq=new Set(["type","id","name","nodeCount","x","y","width","height","layoutStyle"]);function Uq(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=[];Wi(p,"nodeCount",r.nodeCount),e.push(` [${o}] ${r.type??"?"} ${r.id??"?"} ${au(r.name)} ${Wr(s)}x${Wr(a)} @${Wr(c)},${Wr(l)}`+(p.length?" "+p.join(" "):""));for(let[d,f]of Object.entries(r))Fq.has(d)||f===void 0||e.push(` ${d}=${JSON.stringify(f)}`)}),e.join(`
110
+ `)}function qq(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(`
111
+ `)):(e.push("svgs:"),n.forEach((r,o)=>{e.push(` [${o}] ${au(r.name)} (${r.id??"?"})`);let i=r.svg;if(typeof i=="string"&&!i.includes(`
112
112
  `))e.push(` ${i}`);else if(typeof i=="string")if(i==="")e.push(' ""');else for(let s of i.split(`
113
113
  `))e.push(" "+s);else e.push(` ${JSON.stringify(i)}`)}),e.join(`
114
- `))}function Pq(t){let e=[],n=Vo(t.svgs)?"svgs":Vo(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)Oq(i,s," ",e)}}return e.join(`
115
- `)}function Oq(t,e,n,r){if(typeof e=="string"&&!e.includes(`
114
+ `))}function Zq(t){let e=[],n=Vo(t.svgs)?"svgs":Vo(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)Bq(i,s," ",e)}}return e.join(`
115
+ `)}function Bq(t,e,n,r){if(typeof e=="string"&&!e.includes(`
116
116
  `)){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 g$(t,e,n){let r=" ".repeat(e),o=t.layoutStyle??{},i=`${Wr(o.width)}x${Wr(o.height)}`,s=`@${Wr(o.relativeX)},${Wr(o.relativeY)}`,a=[];for(let[l,p]of Object.entries(o))Eq.has(l)||p===void 0||p===null||a.push(`${l}=${p}`);Wi(a,"fill",t.fill),t.strokeColor?a.push(`stroke=${t.strokeColor}${t.strokeWidth?"/"+t.strokeWidth:""}`):t.strokeWidth&&Wi(a,"strokeWidth",t.strokeWidth),Wi(a,"strokeType",t.strokeType),Wi(a,"strokeAlign",t.strokeAlign),Wi(a,"component",t.componentId),n.push(`${r}${t.type??"?"} ${t.id??"?"} ${su(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 ${su(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))Tq.has(l)||p===void 0||n.push(`${r} ${l}=${JSON.stringify(p)}`);if(Array.isArray(t.children))for(let l of t.children)g$(l,e+1,n)}function Wi(t,e,n){n!=null&&n!==""&&t.push(`${e}=${n}`)}function Wr(t){return t==null?"?":String(t)}function su(t){return'"'+(t==null?"":String(t)).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}var Pa=new Set,Go=new Map,Oa=new Map,zq=parseInt(process.env.SECTION_TRACKER_MAX_ENTRIES||"1000",10),y$=parseInt(process.env.SECTION_TRACKER_TTL_MS||"1800000",10),_r=new Map;function ay(t){if(_r.has(t))_r.delete(t);else if(_r.size>=zq){let e=_r.keys().next().value;e!==void 0&&(Pa.delete(e),Go.delete(e),Oa.delete(e),_r.delete(e))}_r.set(t,Date.now())}setInterval(()=>{let t=Date.now();for(let[e,n]of _r)t-n>y$&&(Pa.delete(e),Go.delete(e),Oa.delete(e),_r.delete(e))},y$).unref();function x$(t,e){let n=`${t}:${e}`;Pa.add(n),ay(n)}function v$(t,e,n){let r=`${t}:${e}`;Oa.set(r,n),Go.has(r)||Go.set(r,new Set),ay(r)}function b$(t,e,n){let r=`${t}:${e}`,o=Oa.get(r);if(o===void 0)return null;let i=Go.get(r)??new Set;i.add(n),Go.set(r,i),ay(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 _$(t,e){let n=`${t}:${e}`;Pa.delete(n),Go.delete(n),Oa.delete(n),_r.delete(n)}var Nq="mcp__getDsl",jq=`
117
+ `))r.push(o+i);else r.push(`${o}${JSON.stringify(e)}`)}function _$(t,e,n){let r=" ".repeat(e),o=t.layoutStyle??{},i=`${Wr(o.width)}x${Wr(o.height)}`,s=`@${Wr(o.relativeX)},${Wr(o.relativeY)}`,a=[];for(let[l,p]of Object.entries(o))Lq.has(l)||p===void 0||p===null||a.push(`${l}=${p}`);Wi(a,"fill",t.fill),t.strokeColor?a.push(`stroke=${t.strokeColor}${t.strokeWidth?"/"+t.strokeWidth:""}`):t.strokeWidth&&Wi(a,"strokeWidth",t.strokeWidth),Wi(a,"strokeType",t.strokeType),Wi(a,"strokeAlign",t.strokeAlign),Wi(a,"component",t.componentId),n.push(`${r}${t.type??"?"} ${t.id??"?"} ${au(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 ${au(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))jq.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 Wi(t,e,n){n!=null&&n!==""&&t.push(`${e}=${n}`)}function Wr(t){return t==null?"?":String(t)}function au(t){return'"'+(t==null?"":String(t)).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}var Oa=new Set,Go=new Map,za=new Map,Hq=parseInt(process.env.SECTION_TRACKER_MAX_ENTRIES||"1000",10),w$=parseInt(process.env.SECTION_TRACKER_TTL_MS||"1800000",10),_r=new Map;function py(t){if(_r.has(t))_r.delete(t);else if(_r.size>=Hq){let e=_r.keys().next().value;e!==void 0&&(Oa.delete(e),Go.delete(e),za.delete(e),_r.delete(e))}_r.set(t,Date.now())}setInterval(()=>{let t=Date.now();for(let[e,n]of _r)t-n>w$&&(Oa.delete(e),Go.delete(e),za.delete(e),_r.delete(e))},w$).unref();function S$(t,e){let n=`${t}:${e}`;Oa.add(n),py(n)}function k$(t,e,n){let r=`${t}:${e}`;za.set(r,n),Go.has(r)||Go.set(r,new Set),py(r)}function T$(t,e,n){let r=`${t}:${e}`,o=za.get(r);if(o===void 0)return null;let i=Go.get(r)??new Set;i.add(n),Go.set(r,i),py(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 E$(t,e){let n=`${t}:${e}`;Oa.delete(n),Go.delete(n),za.delete(n),_r.delete(n)}var Vq="mcp__getDsl",Gq=`
118
118
  [FALLBACK] Use only when mcp__getDesignSections is unavailable or returns an error.
119
119
  This returns the FULL DSL in one response \u2014 may be large and exceed context limits for complex designs.
120
120
  Prefer mcp__getDesignSections as the primary tool for all designs.
@@ -124,12 +124,12 @@ You can provide either:
124
124
  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
125
  This tool also returns the rules you must follow when generating code.
126
126
  The DSL data can also be used to transform and generate code for different frameworks.
127
- `,au=class extends ht{constructor(){super();this.name=Nq;this.description=jq;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:Kr()})}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(Pa.has(f))return{isError:!0,content:[{type:"text",text:JSON.stringify({error:"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:Jr(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 Yr=Ee(require("path")),Xr=require("fs"),Ki=require("fs/promises"),Lq="mcp__getD2c",Dq=`
127
+ `,cu=class extends ht{constructor(){super();this.name=Vq;this.description=Gq;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:Kr()})}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(Oa.has(f))return{isError:!0,content:[{type:"text",text:JSON.stringify({error:"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:Jr(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 Yr=Ee(require("path")),Xr=require("fs"),Ki=require("fs/promises"),Wq="mcp__getD2c",Kq=`
128
128
  \u4F7F\u7528\u6B64\u5DE5\u5177\u4ECE MasterGo \u83B7\u53D6 D2C \u6570\u636E\uFF0C\u5E76\u5728\u672C\u5730\u843D\u76D8\uFF1A
129
129
  1\uFF09\u5C06\u8FD4\u56DE\u7684 code \u5199\u5165 html\uFF1B
130
130
  2\uFF09\u5C06\u8FD4\u56DE\u7684 svg / image \u8D44\u6E90\u6309 resourcePath \u843D\u76D8\u5230\u5BF9\u5E94\u76EE\u5F55\uFF1B
131
131
  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 cy(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 Mq(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 cu(t){for(let e of t)if(Mq(e))return e}function Fq(t){let e={image:"asset/images",svg:"asset/icons"};if(!cy(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 w$(t,e,n,r){if(cy(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=Yr.default.join(e,n);(0,Xr.existsSync)(s)||(0,Xr.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=Yr.default.join(s,`${f}.${h}`),v=p;try{if(typeof v=="string"&&v.startsWith("http"))try{let b=await vt.get(v,{responseType:"arraybuffer",timeout:3e4});await(0,Ki.writeFile)(y,b.data),a+=1;return}catch(b){if(((b==null?void 0:b.code)==="EPROTO"||String((b==null?void 0:b.message)??"").includes("wrong version number"))&&v.startsWith("https://")){let k=v.replace(/^https:\/\//,"http://"),E=await vt.get(k,{responseType:"arraybuffer",timeout:3e4});await(0,Ki.writeFile)(y,E.data),a+=1;return}c+=1;return}if(typeof v=="string"&&v.startsWith("data:image/")){let b=v.split(";base64,");b.length===2&&(await(0,Ki.writeFile)(y,b[1],"base64"),a+=1);return}let x=typeof v=="object"?JSON.stringify(v,null,2):String(v??"");await(0,Ki.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 Uq(t){let{outDir:e,contentId:n,code:r,resourcePath:o,svg:i,image:s}=t,a=e?Yr.default.isAbsolute(e)?Yr.default.join(e):Yr.default.join(process.cwd(),e):process.cwd();(0,Xr.existsSync)(a)||(0,Xr.mkdirSync)(a,{recursive:!0});let c=`${n||"index"}.html`,l=Yr.default.join(a,c);cy(r)||await(0,Ki.writeFile)(l,r,"utf8");let p=Fq(o),d=y=>{let v=Yr.default.join(a,y);(0,Xr.existsSync)(v)||(0,Xr.mkdirSync)(v,{recursive:!0})};d(p.image),d(p.svg);let[f,h]=await Promise.all([w$(i,a,p.svg,"svg"),w$(s,a,p.image,"png")]);return{targetDir:a,htmlFileName:c,htmlPath:l,svgCount:f.savedCount,imageCount:h.savedCount,resourcePathMap:p}}function qq(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=cu([r==null?void 0:r.resourcePath,t==null?void 0:t.resourcePath,n==null?void 0:n.resourcePath]),s=cu([r==null?void 0:r.image,n==null?void 0:n.image]),a=cu([r==null?void 0:r.svg,n==null?void 0:n.svg]),c=cu([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 lu=class extends ht{constructor(){super();this.name=Lq;this.description=Dq;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")})}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=qq(s),c=a.contentId||n;return await Uq({outDir:o,contentId:c,code:a.code,resourcePath:a.resourcePath,svg:a.svg,image:a.image}),{content:[{type:"text",text:JSON.stringify(s)}]}}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 S$=Ee(require("fs")),Zq="mcp__C2d",Bq=`
132
+ `;function dy(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 Jq(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 lu(t){for(let e of t)if(Jq(e))return e}function Yq(t){let e={image:"asset/images",svg:"asset/icons"};if(!dy(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 $$(t,e,n,r){if(dy(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=Yr.default.join(e,n);(0,Xr.existsSync)(s)||(0,Xr.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=Yr.default.join(s,`${f}.${h}`),v=p;try{if(typeof v=="string"&&v.startsWith("http"))try{let b=await vt.get(v,{responseType:"arraybuffer",timeout:3e4});await(0,Ki.writeFile)(y,b.data),a+=1;return}catch(b){if(((b==null?void 0:b.code)==="EPROTO"||String((b==null?void 0:b.message)??"").includes("wrong version number"))&&v.startsWith("https://")){let k=v.replace(/^https:\/\//,"http://"),E=await vt.get(k,{responseType:"arraybuffer",timeout:3e4});await(0,Ki.writeFile)(y,E.data),a+=1;return}c+=1;return}if(typeof v=="string"&&v.startsWith("data:image/")){let b=v.split(";base64,");b.length===2&&(await(0,Ki.writeFile)(y,b[1],"base64"),a+=1);return}let x=typeof v=="object"?JSON.stringify(v,null,2):String(v??"");await(0,Ki.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 Xq(t){let{outDir:e,contentId:n,code:r,resourcePath:o,svg:i,image:s}=t,a=e?Yr.default.isAbsolute(e)?Yr.default.join(e):Yr.default.join(process.cwd(),e):process.cwd();(0,Xr.existsSync)(a)||(0,Xr.mkdirSync)(a,{recursive:!0});let c=`${n||"index"}.html`,l=Yr.default.join(a,c);dy(r)||await(0,Ki.writeFile)(l,r,"utf8");let p=Yq(o),d=y=>{let v=Yr.default.join(a,y);(0,Xr.existsSync)(v)||(0,Xr.mkdirSync)(v,{recursive:!0})};d(p.image),d(p.svg);let[f,h]=await Promise.all([$$(i,a,p.svg,"svg"),$$(s,a,p.image,"png")]);return{targetDir:a,htmlFileName:c,htmlPath:l,svgCount:f.savedCount,imageCount:h.savedCount,resourcePathMap:p}}function Qq(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=lu([r==null?void 0:r.resourcePath,t==null?void 0:t.resourcePath,n==null?void 0:n.resourcePath]),s=lu([r==null?void 0:r.image,n==null?void 0:n.image]),a=lu([r==null?void 0:r.svg,n==null?void 0:n.svg]),c=lu([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 uu=class extends ht{constructor(){super();this.name=Wq;this.description=Kq;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")})}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=Qq(s),c=a.contentId||n,l=await Xq({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 fy=Ee(require("fs")),R$=10*1024*1024,e4="mcp__C2d",t4=`
133
133
  \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
134
 
135
135
  \u53C2\u6570\u8BF4\u660E\uFF1A
@@ -141,7 +141,7 @@ The DSL data can also be used to transform and generate code for different frame
141
141
  \u5982\u679C\u77ED\u94FE\u63A5\u6216 URL \u4E2D\u6CA1\u6709\u89E3\u6790\u51FA layer_id\uFF0C\u5219\u4E0D\u4F20 layerId\u3002
142
142
 
143
143
  \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
- `,uu=class extends ht{constructor(){super();this.name=Zq;this.description=Bq;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).")})}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{f=S$.default.readFileSync(n,"utf-8")}catch(y){throw new Error(`\u65E0\u6CD5\u8BFB\u53D6\u6587\u4EF6 ${n}: ${y}`)}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 Hq="mcp__getComponentLink",Vq="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.",pu=class extends ht{constructor(){super();this.name=Hq;this.description=Vq;this.schema=Y.object({url:Y.string().describe("Component documentation link URL, from the componentDocumentLinks property, please ensure the URL is valid")})}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 k$=`The \`results\` returns an XML file, which contains two types of information:
144
+ `,pu=class extends ht{constructor(){super();this.name=e4;this.description=t4;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).")})}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 fy.default.promises.stat(n);if(!y.isFile())throw new Error(`\u8DEF\u5F84\u4E0D\u662F\u6587\u4EF6: ${n}`);if(y.size>R$)throw new Error(`\u6587\u4EF6\u8FC7\u5927\uFF08${(y.size/1024/1024).toFixed(1)}MB > ${R$/1024/1024}MB \u4E0A\u9650\uFF09: ${n}`);f=await fy.default.promises.readFile(n,"utf-8")}catch(y){let v=y instanceof Error?y.message:String(y);throw new Error(`\u65E0\u6CD5\u8BFB\u53D6\u6587\u4EF6 ${n}: ${v}`)}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 n4="mcp__getComponentLink",r4="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.",du=class extends ht{constructor(){super();this.name=n4;this.description=r4;this.schema=Y.object({url:Y.string().describe("Component documentation link URL, from the componentDocumentLinks property, please ensure the URL is valid")})}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 A$=`The \`results\` returns an XML file, which contains two types of information:
145
145
 
146
146
  - **meta**: Describes the site, environment, requirements, and other context.
147
147
  - **action**: Corresponds to the entry page name and \`targetLayerId\`, which is the ID of the target page.
@@ -227,12 +227,12 @@ Repeat this process until the page data no longer contains the \`interactive\` f
227
227
  Then, process the 0:2 page and repeat the steps for the 0:1 page.
228
228
 
229
229
  After completion, generate the project code sequentially according to the page list in task.md.
230
- `;var Wq="mcp__getMeta",Kq=`
230
+ `;var i4="mcp__getMeta",s4=`
231
231
  Use this tool when the user intends to build a complete website or needs to obtain high-level site
232
232
  configuration information. You must provide a fileld and layerld to identify the specific design element.
233
233
  This tool returns the rules and results of the site and page. The rules is a markdown file, you must
234
234
  follow the rules and use the results to analyze the site and page.
235
- `,du=class extends ht{constructor(){super();this.name=Wq;this.description=Kq;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:Kr()})}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:Jr({result:a,rules:k$},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 sr=Ee(require("fs"));var T$=`---
235
+ `,fu=class extends ht{constructor(){super();this.name=i4;this.description=s4;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:Kr()})}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:Jr({result:a,rules:A$},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 Ji=Ee(require("fs"));var C$=`---
236
236
  description:
237
237
  globs:
238
238
  alwaysApply: true
@@ -543,13 +543,13 @@ AI must analyze component design and infer:
543
543
  - **Tests**: Coverage for all features, edge cases, slots and states
544
544
  - **Implementation**: Renders correctly, properties work, state management complies with specifications, styles applied correctly, slot functionality works
545
545
  - **Documentation**: Feature documentation complete, examples available, API reference complete, slot usage documentation complete
546
- `;var Yq="mcp__getComponentGenerator",Xq=`
546
+ `;function I$(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 c4=32,l4=8,u4="mcp__getComponentGenerator",p4=`
547
547
  Users need to actively call this tool to get the component development workflow. When Generator is mentioned, please actively call this tool.
548
548
  This tool provides a structured workflow for component development following best practices.
549
549
  You must provide an absolute rootPath of workspace to save workflow files.
550
- `,fu=class extends ht{constructor(){super();this.name=Yq;this.description=Xq;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.")})}async execute({rootPath:n,fileId:r,layerId:o,sourceLayerId:i}){var d;let s=`${n}/.mastergo/`;sr.default.existsSync(s)||sr.default.mkdirSync(s,{recursive:!0});let a=`${s}/component-workflow.md`,c=await ot.getComponentStyleJson(r,o,i),l=`${s}/${c[0].name}.json`,p=f=>{if(f.path&&f.path.length>0){f.imageUrls=[];let h=f.id.replaceAll("/","&").replaceAll(":","_"),y=`${s}/images`;sr.default.existsSync(y)||sr.default.mkdirSync(y,{recursive:!0}),(f.path??[]).forEach((v,x)=>{let m=`${y}/${h}-${x}.svg`;sr.default.existsSync(m)||sr.default.writeFileSync(m,`<svg width="100%" height="100%" viewBox="0 0 16 16"xmlns="http://www.w3.org/2000/svg">
551
- <path d="${v}" fill="currentColor"/>
552
- </svg>`),f.imageUrls.push(m)}),delete f.path}f.children&&f.children.forEach(h=>{p(h)})};p(c[0]),sr.default.existsSync(a)||sr.default.writeFileSync(a,T$),sr.default.writeFileSync(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(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 gt=Ee(require("fs")),qt=Ee(require("path")),A$=Ee(require("crypto"));var I$=Ee(require("https"));var E$=`---
550
+ `,mu=class extends ht{constructor(){super();this.name=u4;this.description=p4;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.")})}async execute({rootPath:n,fileId:r,layerId:o,sourceLayerId:i}){var h;let s=`${n}/.mastergo/`;await Ji.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=I$(c4),d=I$(l4),f=async y=>{if(y.path&&y.path.length>0){y.imageUrls=[];let v=y.id.replaceAll("/","&").replaceAll(":","_"),x=`${s}/images`;await Ji.default.promises.mkdir(x,{recursive:!0});let m=[];for(let b=0;b<y.path.length;b++){let w=y.path[b],k=`${x}/${v}-${b}.svg`,E=`<svg width="100%" height="100%" viewBox="0 0 16 16"xmlns="http://www.w3.org/2000/svg">
551
+ <path d="${w}" fill="currentColor"/>
552
+ </svg>`;m.push(p(()=>Ji.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(v=>d(()=>f(v))))};await f(c[0]);try{await Ji.default.promises.writeFile(a,C$,{flag:"wx"})}catch{}await Ji.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 v=((h=y.response)==null?void 0:h.data)??(y==null?void 0:y.message);return{isError:!0,content:[{type:"text",text:JSON.stringify(v)}]}}}};var gt=Ee(require("fs")),qt=Ee(require("path")),N$=Ee(require("crypto"));var j$=Ee(require("https"));var P$=`---
553
553
  description:
554
554
  globs:
555
555
  alwaysApply: true
@@ -1232,13 +1232,13 @@ lib/utils/ui/
1232
1232
  - **Analysis**: DSL fully parsed, widget tree planned, resources inventoried
1233
1233
  - **Implementation**: Renders correctly, dimensions adapted, colors accurate, assets loaded
1234
1234
  - **Quality**: No hardcoded values, proper decomposition, RTL-ready, safe area handled
1235
- `;var e4="mcp__getFlutterGenerator",t4=`
1235
+ `;var f4="mcp__getFlutterGenerator",m4=`
1236
1236
  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
1237
  This tool provides a structured workflow for Flutter component development following best practices.
1238
1238
  It includes MasterGo DSL to Flutter Widget mapping rules, screen adaptation with flutter_screenutil, and feature-based architecture guidance.
1239
1239
  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
1240
  You must provide an absolute rootPath of workspace to save workflow files.
1241
- `,n4=15e3,$$=2,r4=6,uy=50*1024*1024,C$=["png","jpg","jpeg","webp","svg","gif","bmp"],P$=new I$.default.Agent({rejectUnauthorized:!1});function Ji(t){return String(t??"").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/\.{2,}/g,"_").replace(/_+/g,"_").replace(/^_+|_+$/g,"")||"unnamed"}function o4(t){return A$.default.createHash("md5").update(t).digest("hex").slice(0,10)}function i4(t){try{let n=new URL(t,"https://placeholder.local").pathname.match(/\.([a-zA-Z0-9]+)$/);if(n&&C$.includes(n[1].toLowerCase()))return n[1].toLowerCase()}catch{}}function py(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 ly(t){gt.default.existsSync(t)||gt.default.mkdirSync(t,{recursive:!0})}function O$(t){return/^https?:\/\//i.test(t)}function dy(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(C$.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 s4(t,e){var r;if(!O$(t))throw new Error(`Blocked unsafe URL: ${t}`);let n;for(let o=0;o<=$$;o++)try{let i=await vt.get(t,{responseType:"arraybuffer",timeout:n4,httpsAgent:P$,maxRedirects:5,maxContentLength:uy}),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<$$&&await new Promise(a=>setTimeout(a,500*(o+1)))}throw n}async function a4(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>uy*1.37)throw new Error(`Data URL too large: ${(o.length/1024/1024).toFixed(1)}MB (max ${uy/1024/1024}MB)`);let i=py(r),s=e.endsWith(`.${i}`)?e:`${e}.${i}`;return await gt.default.promises.writeFile(s,Buffer.from(o,"base64")),s}async function c4(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 l4(t,e){let n=qt.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}
1241
+ `,h4=15e3,O$=2,g4=6,hy=50*1024*1024,L$=["png","jpg","jpeg","webp","svg","gif","bmp"],D$=new j$.default.Agent({rejectUnauthorized:!1,keepAlive:!0,keepAliveMsecs:3e4,maxSockets:50,maxFreeSockets:8});function Yi(t){return String(t??"").replace(/[^a-zA-Z0-9._-]/g,"_").replace(/\.{2,}/g,"_").replace(/_+/g,"_").replace(/^_+|_+$/g,"")||"unnamed"}function y4(t){return N$.default.createHash("md5").update(t).digest("hex").slice(0,10)}function x4(t){try{let n=new URL(t,"https://placeholder.local").pathname.match(/\.([a-zA-Z0-9]+)$/);if(n&&L$.includes(n[1].toLowerCase()))return n[1].toLowerCase()}catch{}}function gy(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 my(t){gt.default.existsSync(t)||gt.default.mkdirSync(t,{recursive:!0})}function M$(t){return/^https?:\/\//i.test(t)}function yy(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(L$.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 v4(t,e){var r;if(!M$(t))throw new Error(`Blocked unsafe URL: ${t}`);let n;for(let o=0;o<=O$;o++)try{let i=await vt.get(t,{responseType:"arraybuffer",timeout:h4,httpsAgent:D$,maxRedirects:5,maxContentLength:hy}),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<O$&&await new Promise(a=>setTimeout(a,500*(o+1)))}throw n}async function b4(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>hy*1.37)throw new Error(`Data URL too large: ${(o.length/1024/1024).toFixed(1)}MB (max ${hy/1024/1024}MB)`);let i=gy(r),s=e.endsWith(`.${i}`)?e:`${e}.${i}`;return await gt.default.promises.writeFile(s,Buffer.from(o,"base64")),s}async function _4(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 w4(t,e){let n=qt.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
1242
  `+r.slice(p)}else{let p=a.index+c.length,d=(c.endsWith(`
1243
1243
  `)?"":`
1244
1244
  `)+` assets:
@@ -1249,10 +1249,10 @@ ${o}
1249
1249
  flutter:
1250
1250
  assets:
1251
1251
  ${o}
1252
- `;s=r+c}return gt.default.writeFileSync(n,s),"added"}function u4(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 fy(t,e,n,r){if(!t||typeof t!="object")return;if(Array.isArray(t)){t.forEach((i,s)=>fy(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}=u4(s);for(let p of c){let d=p.startsWith("data:image/")?"data":"remote",f=p.startsWith("//")?`https:${p}`:p;(d==="data"||dy(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;dy(c)&&!n.has(c)&&n.set(c,{token:a,url:c,kind:"remote"})}}else s&&typeof s=="object"&&fy(s,a,n,r)}}function R$(t){let e=t.match(/paint_(\d+):(\d+)/);return e?Number(e[2]):Number.MAX_SAFE_INTEGER}async function p4(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)=>R$(p)-R$(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||!dy(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 d4(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 f4(t,e,n,r){if(!Array.isArray(t==null?void 0:t.path)||t.path.length===0)return null;let o=Ji(String(t.id??"icon")),i=t.width??16,s=t.height??16,c=t.path.length===1,l=`${o}.svg`,p=qt.default.join(e,l),d=!1;if(!gt.default.existsSync(p)){let h=t.path.map((y,v)=>{var m,b,w,k;let x="currentColor";if(!c){let E=((b=(m=t.fills)==null?void 0:m[v])==null?void 0:b.color)??((k=(w=t.strokes)==null?void 0:w[v])==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(`
1252
+ `;s=r+c}return gt.default.writeFileSync(n,s),"added"}function S4(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 xy(t,e,n,r){if(!t||typeof t!="object")return;if(Array.isArray(t)){t.forEach((i,s)=>xy(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}=S4(s);for(let p of c){let d=p.startsWith("data:image/")?"data":"remote",f=p.startsWith("//")?`https:${p}`:p;(d==="data"||yy(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;yy(c)&&!n.has(c)&&n.set(c,{token:a,url:c,kind:"remote"})}}else s&&typeof s=="object"&&xy(s,a,n,r)}}function z$(t){let e=t.match(/paint_(\d+):(\d+)/);return e?Number(e[2]):Number.MAX_SAFE_INTEGER}async function k4(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)=>z$(p)-z$(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||!yy(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 T4(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 E4(t,e,n,r){if(!Array.isArray(t==null?void 0:t.path)||t.path.length===0)return null;let o=Yi(String(t.id??"icon")),i=t.width??16,s=t.height??16,c=t.path.length===1,l=`${o}.svg`,p=qt.default.join(e,l),d=!1;if(!gt.default.existsSync(p)){let h=t.path.map((y,v)=>{var m,b,w,k;let x="currentColor";if(!c){let E=((b=(m=t.fills)==null?void 0:m[v])==null?void 0:b.color)??((k=(w=t.strokes)==null?void 0:w[v])==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
1253
  `);gt.default.writeFileSync(p,`<svg width="${i}" height="${s}" viewBox="0 0 ${i} ${s}" xmlns="http://www.w3.org/2000/svg">
1254
1254
  ${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=`
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 F$(t,e,n,r,o){let i=E4(t,e,n,r);i&&(t.imageUrls=t.imageUrls??[],t.imageUrls.push({flutterPath:i.flutterPath,needsColorFilter:i.needsColorFilter}),o.push({token:`vector.${Yi(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=>F$(s,e,n,r,o))}function vy(t,e){if(!(!t||typeof t!="object")){if(Array.isArray(t)){t.forEach(n=>vy(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"&&vy(r,e)}}var hu=class extends ht{constructor(){super();this.name=f4;this.description=m4;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");my(p),my(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?Yi(s):"")||Yi(y)||Yi(o)||"component",m=qt.default.join(p,`${x}.json`),b=`assets/image/${x}`,w=qt.default.join(n,b);my(w);let k=[];F$(h,d,w,b,k);let E=new Map;if(xy(h,"",E,l),l.length>0){let B=await k4(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 _4(F,g4,async B=>{var ge;let qe=y4(B.url),De=x4(B.url),it=`${Yi(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=gy(Tt);let Et=`${it}.${De}`,Te=qt.default.join(d,Et);gt.default.existsSync(Te)||await b4(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(!M$(B.url))throw new Error(`Blocked unsafe URL: ${B.url}`);if(!De)try{let Tt=await vt.head(B.url,{timeout:5e3,httpsAgent:D$,maxRedirects:5});De=gy(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 v4(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=w4(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);vy(h,bt);let Ve=oe.filter(B=>B.token.startsWith("dsl.styles.paint_")&&B.status!=="failed"&&!!B.flutterPath).map(B=>B.flutterPath),ae=T4(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,P$);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 Xi={name:"@mastergo/magic-mcp",version:"0.2.6",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 --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",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 R4=`version_${Xi.version.replace(/\./g,"_")}`,A4=`the current version is ${Xi.version}`,gu=class extends ht{constructor(){super();this.name=R4;this.description=A4;this.schema=Y.object({})}async execute(){return{content:[{type:"text",text:JSON.stringify(Xi.version)}]}}};var C4="mcp__getDesignSections",I4=`
1256
1256
  [PRIMARY] This is the main tool for all designs. Operates in TWO modes:
1257
1257
 
1258
1258
  Mode 1 \u2014 Get layout overview (sectionIndex NOT provided):
@@ -1285,14 +1285,14 @@ If this tool returns an error (e.g. old server), fall back to mcp__getDsl.
1285
1285
  You can provide either:
1286
1286
  1. fileId and layerId directly, or
1287
1287
  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=`
1288
+ `,P4=["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."],yu=class extends ht{constructor(){super();this.name=C4;this.description=I4;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=P4),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&&(S$(h,x),m&&typeof m=="object"&&typeof m.totalSections=="number"&&k$(h,x,m.totalSections)),s!==void 0&&m&&typeof m=="object"){let b=T$(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 O4="mcp__extractSvg",z4=`
1289
1289
  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
1290
  You can provide either:
1291
1291
  1. fileId and layerId directly, or
1292
1292
  2. a short link (like https://{domain}/goto/LhGgBAK)
1293
1293
 
1294
1294
  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
- `,yu=class extends ht{constructor(){super();this.name=b4;this.description=_4;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:Kr()})}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 v=y||h;if(!f||!v)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");let x=await ot.extractSvg(f,v,c,l,p);return{content:[{type:"text",text:Jr(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 vu=require("fs/promises"),N$=require("fs"),ar=Ee(require("path")),w4="mcp__applyDesign",S4=`
1295
+ `,xu=class extends ht{constructor(){super();this.name=O4;this.description=z4;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:Kr()})}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 v=y||h;if(!f||!v)throw new Error("Could not determine fileId or layerId (need layerId or sourceLayerId)");let x=await ot.extractSvg(f,v,c,l,p);return{content:[{type:"text",text:Jr(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 bu=require("fs/promises"),U$=require("fs"),ar=Ee(require("path")),N4="mcp__applyDesign",j4=`
1296
1296
  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
1297
 
1298
1298
  WHAT it does:
@@ -1319,7 +1319,7 @@ You can provide either:
1319
1319
  2. a short link (like https://{domain}/goto/LhGgBAK)
1320
1320
 
1321
1321
  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();
1322
+ `,vu=class extends ht{constructor(){super();this.name=N4;this.description=j4;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,U$.existsSync)(me)||await(0,bu.mkdir)(me,{recursive:!0});let de=ar.default.join(me,k);await(0,bu.writeFile)(de,w,"utf8"),E$(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 L4='\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 D4(){let{token:t,baseUrl:e,rules:n,debug:r,noRule:o,proxy:i,format:s}=bE();if(s!==void 0){let c=su(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=Ql();console.log(`Custom Headers: ${Object.keys(c).length>0?JSON.stringify(vE(c)):"none"}`),console.log(`Format: ${process.env.DEFAULT_FORMAT||"json (default)"}`),console.log("Debug mode: enabled")}let a=new bl({name:"MasterGoMcpServer",version:Xi.version},{instructions:L4});new gu().register(a),new yu().register(a),new cu().register(a),new uu().register(a),new pu().register(a),new du().register(a),new fu().register(a),new mu().register(a),new hu().register(a),new xu().register(a),new vu().register(a),a.connect(new wl)}D4();
1323
1323
  /*! Bundled license information:
1324
1324
 
1325
1325
  mime-db/index.js: