@taptap/instant-games-open-mcp 1.23.7-beta.2 → 1.23.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/maker.js +1 -1
- package/dist/proxy.js +6 -1
- package/dist/server.js +30 -30
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -7,17 +7,17 @@ var BY=Object.create;var kw=Object.defineProperty;var UY=Object.getOwnPropertyDe
|
|
|
7
7
|
`:""},this._extScope=e,this._scope=new wi.Scope({parent:e}),this._nodes=[new M1]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new A1(e,o,n)),o}const(e,r,n){return this._def(wi.varKinds.const,e,r,n)}let(e,r,n){return this._def(wi.varKinds.let,e,r,n)}var(e,r,n){return this._def(wi.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new A0(e,r,n))}add(e,r){return this._leafNode(new k1(e,Le.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==Xe.nil&&this._leafNode(new O1(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,Xe.addCodeArg)(r,i));return r.push("}"),new Xe._Code(r)}if(e,r,n){if(this._blockNode(new Bs(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Bs(e))}else(){return this._elseNode(new Dc)}endIf(){return this._endBlockNode(Bs,Dc)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new N1(e),r)}forRange(e,r,n,i,o=this.opts.es5?wi.varKinds.var:wi.varKinds.let){let a=this._scope.toName(e);return this._for(new j1(o,a,r,n),()=>i(a))}forOf(e,r,n,i=wi.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let a=r instanceof Xe.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,Xe._)`${a}.length`,s=>{this.var(o,(0,Xe._)`${a}[${s}]`),n(o)})}return this._for(new k0("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?wi.varKinds.var:wi.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Xe._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new k0("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(Us)}label(e){return this._leafNode(new C1(e))}break(e){return this._leafNode(new R1(e))}return(e){let r=new Hf;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Hf)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new z1;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new Vf(o),r(o)}return n&&(this._currNode=i.finally=new Gf,this.code(n)),this._endBlockNode(Vf,Gf)}throw(e){return this._leafNode(new D1(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=Xe.nil,n,i){return this._blockNode(new Zf(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(Zf)}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,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof Bs))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};Le.CodeGen=L1;function qs(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function C0(t,e){return e instanceof Xe._CodeOrName?qs(t,e.names):t}function Oc(t,e,r){if(t instanceof Xe.Name)return n(t);if(!i(t))return t;return new Xe._Code(t._items.reduce((o,a)=>(a instanceof Xe.Name&&(a=n(a)),a instanceof Xe._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=r[o.str];return a===void 0||e[o.str]!==1?o:(delete e[o.str],a)}function i(o){return o instanceof Xe._Code&&o._items.some(a=>a instanceof Xe.Name&&e[a.str]===1&&r[a.str]!==void 0)}}function Lre(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function SM(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Xe._)`!${F1(t)}`}Le.not=SM;var Fre=EM(Le.operators.AND);function Bre(...t){return t.reduce(Fre)}Le.and=Bre;var Ure=EM(Le.operators.OR);function qre(...t){return t.reduce(Ure)}Le.or=qre;function EM(t){return(e,r)=>e===Xe.nil?r:r===Xe.nil?e:(0,Xe._)`${F1(e)} ${t} ${F1(r)}`}function F1(t){return t instanceof Xe.Name?t:(0,Xe._)`(${t})`}});var rt=b(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.checkStrictMode=qe.getErrorPath=qe.Type=qe.useFunc=qe.setEvaluated=qe.evaluatedPropsToName=qe.mergeEvaluated=qe.eachItem=qe.unescapeJsonPointer=qe.escapeJsonPointer=qe.escapeFragment=qe.unescapeFragment=qe.schemaRefOrVal=qe.schemaHasRulesButRef=qe.schemaHasRules=qe.checkUnknownRules=qe.alwaysValidSchema=qe.toHash=void 0;var Tt=Ue(),Zre=Uf();function Hre(t){let e={};for(let r of t)e[r]=!0;return e}qe.toHash=Hre;function Vre(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(PM(t,e),!TM(e,t.self.RULES.all))}qe.alwaysValidSchema=Vre;function PM(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let o in e)i[o]||CM(t,`unknown keyword: "${o}"`)}qe.checkUnknownRules=PM;function TM(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}qe.schemaHasRules=TM;function Gre(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}qe.schemaHasRulesButRef=Gre;function Wre({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Tt._)`${r}`}return(0,Tt._)`${t}${e}${(0,Tt.getProperty)(n)}`}qe.schemaRefOrVal=Wre;function Jre(t){return AM(decodeURIComponent(t))}qe.unescapeFragment=Jre;function Kre(t){return encodeURIComponent(U1(t))}qe.escapeFragment=Kre;function U1(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}qe.escapeJsonPointer=U1;function AM(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}qe.unescapeJsonPointer=AM;function Yre(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}qe.eachItem=Yre;function IM({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,o,a,s)=>{let l=a===void 0?o:a instanceof Tt.Name?(o instanceof Tt.Name?t(i,o,a):e(i,o,a),a):o instanceof Tt.Name?(e(i,a,o),o):r(o,a);return s===Tt.Name&&!(l instanceof Tt.Name)?n(i,l):l}}qe.mergeEvaluated={props:IM({mergeNames:(t,e,r)=>t.if((0,Tt._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,Tt._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,Tt._)`${r} || {}`).code((0,Tt._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,Tt._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,Tt._)`${r} || {}`),q1(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:kM}),items:IM({mergeNames:(t,e,r)=>t.if((0,Tt._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,Tt._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,Tt._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,Tt._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function kM(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Tt._)`{}`);return e!==void 0&&q1(t,r,e),r}qe.evaluatedPropsToName=kM;function q1(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Tt._)`${e}${(0,Tt.getProperty)(n)}`,!0))}qe.setEvaluated=q1;var $M={};function Xre(t,e){return t.scopeValue("func",{ref:e,code:$M[e.code]||($M[e.code]=new Zre._Code(e.code))})}qe.useFunc=Xre;var B1;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(B1||(qe.Type=B1={}));function Qre(t,e,r){if(t instanceof Tt.Name){let n=e===B1.Num;return r?n?(0,Tt._)`"[" + ${t} + "]"`:(0,Tt._)`"['" + ${t} + "']"`:n?(0,Tt._)`"/" + ${t}`:(0,Tt._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Tt.getProperty)(t).toString():"/"+U1(t)}qe.getErrorPath=Qre;function CM(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}qe.checkStrictMode=CM});var Mo=b(Z1=>{"use strict";Object.defineProperty(Z1,"__esModule",{value:!0});var Dr=Ue(),ene={data:new Dr.Name("data"),valCxt:new Dr.Name("valCxt"),instancePath:new Dr.Name("instancePath"),parentData:new Dr.Name("parentData"),parentDataProperty:new Dr.Name("parentDataProperty"),rootData:new Dr.Name("rootData"),dynamicAnchors:new Dr.Name("dynamicAnchors"),vErrors:new Dr.Name("vErrors"),errors:new Dr.Name("errors"),this:new Dr.Name("this"),self:new Dr.Name("self"),scope:new Dr.Name("scope"),json:new Dr.Name("json"),jsonPos:new Dr.Name("jsonPos"),jsonLen:new Dr.Name("jsonLen"),jsonPart:new Dr.Name("jsonPart")};Z1.default=ene});var Wf=b(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.extendErrors=Or.resetErrorsCount=Or.reportExtraError=Or.reportError=Or.keyword$DataError=Or.keywordError=void 0;var nt=Ue(),D0=rt(),tn=Mo();Or.keywordError={message:({keyword:t})=>(0,nt.str)`must pass "${t}" keyword validation`};Or.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,nt.str)`"${t}" keyword must be ${e} ($data)`:(0,nt.str)`"${t}" keyword is invalid ($data)`};function tne(t,e=Or.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:a,allErrors:s}=i,l=OM(t,e,r);n??(a||s)?RM(o,l):DM(i,(0,nt._)`[${l}]`)}Or.reportError=tne;function rne(t,e=Or.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:a}=n,s=OM(t,e,r);RM(i,s),o||a||DM(n,tn.default.vErrors)}Or.reportExtraError=rne;function nne(t,e){t.assign(tn.default.errors,e),t.if((0,nt._)`${tn.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,nt._)`${tn.default.vErrors}.length`,e),()=>t.assign(tn.default.vErrors,null)))}Or.resetErrorsCount=nne;function ine({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let a=t.name("err");t.forRange("i",i,tn.default.errors,s=>{t.const(a,(0,nt._)`${tn.default.vErrors}[${s}]`),t.if((0,nt._)`${a}.instancePath === undefined`,()=>t.assign((0,nt._)`${a}.instancePath`,(0,nt.strConcat)(tn.default.instancePath,o.errorPath))),t.assign((0,nt._)`${a}.schemaPath`,(0,nt.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,nt._)`${a}.schema`,r),t.assign((0,nt._)`${a}.data`,n))})}Or.extendErrors=ine;function RM(t,e){let r=t.const("err",e);t.if((0,nt._)`${tn.default.vErrors} === null`,()=>t.assign(tn.default.vErrors,(0,nt._)`[${r}]`),(0,nt._)`${tn.default.vErrors}.push(${r})`),t.code((0,nt._)`${tn.default.errors}++`)}function DM(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,nt._)`new ${t.ValidationError}(${e})`):(r.assign((0,nt._)`${n}.errors`,e),r.return(!1))}var Zs={keyword:new nt.Name("keyword"),schemaPath:new nt.Name("schemaPath"),params:new nt.Name("params"),propertyName:new nt.Name("propertyName"),message:new nt.Name("message"),schema:new nt.Name("schema"),parentSchema:new nt.Name("parentSchema")};function OM(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,nt._)`{}`:one(t,e,r)}function one(t,e,r={}){let{gen:n,it:i}=t,o=[ane(i,r),sne(t,r)];return lne(t,e,o),n.object(...o)}function ane({errorPath:t},{instancePath:e}){let r=e?(0,nt.str)`${t}${(0,D0.getErrorPath)(e,D0.Type.Str)}`:t;return[tn.default.instancePath,(0,nt.strConcat)(tn.default.instancePath,r)]}function sne({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,nt.str)`${e}/${t}`;return r&&(i=(0,nt.str)`${i}${(0,D0.getErrorPath)(r,D0.Type.Str)}`),[Zs.schemaPath,i]}function lne(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:a,it:s}=t,{opts:l,propertyName:c,topSchemaRef:u,schemaPath:d}=s;n.push([Zs.keyword,i],[Zs.params,typeof e=="function"?e(t):e||(0,nt._)`{}`]),l.messages&&n.push([Zs.message,typeof r=="function"?r(t):r]),l.verbose&&n.push([Zs.schema,a],[Zs.parentSchema,(0,nt._)`${u}${d}`],[tn.default.data,o]),c&&n.push([Zs.propertyName,c])}});var NM=b(Mc=>{"use strict";Object.defineProperty(Mc,"__esModule",{value:!0});Mc.boolOrEmptySchema=Mc.topBoolOrEmptySchema=void 0;var cne=Wf(),une=Ue(),dne=Mo(),fne={message:"boolean schema is false"};function pne(t){let{gen:e,schema:r,validateName:n}=t;r===!1?MM(t,!1):typeof r=="object"&&r.$async===!0?e.return(dne.default.data):(e.assign((0,une._)`${n}.errors`,null),e.return(!0))}Mc.topBoolOrEmptySchema=pne;function hne(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),MM(t)):r.var(e,!0)}Mc.boolOrEmptySchema=hne;function MM(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,cne.reportError)(i,fne,void 0,e)}});var H1=b(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});Nc.getRules=Nc.isJSONType=void 0;var mne=["string","number","integer","boolean","null","object","array"],gne=new Set(mne);function yne(t){return typeof t=="string"&&gne.has(t)}Nc.isJSONType=yne;function _ne(){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:{}}}Nc.getRules=_ne});var V1=b(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.shouldUseRule=xa.shouldUseGroup=xa.schemaHasRulesForType=void 0;function vne({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&jM(t,n)}xa.schemaHasRulesForType=vne;function jM(t,e){return e.rules.some(r=>zM(t,r))}xa.shouldUseGroup=jM;function zM(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}xa.shouldUseRule=zM});var Jf=b(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.reportTypeError=Mr.checkDataTypes=Mr.checkDataType=Mr.coerceAndCheckDataType=Mr.getJSONTypes=Mr.getSchemaTypes=Mr.DataType=void 0;var bne=H1(),wne=V1(),xne=Wf(),Re=Ue(),LM=rt(),jc;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(jc||(Mr.DataType=jc={}));function Sne(t){let e=FM(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}Mr.getSchemaTypes=Sne;function FM(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(bne.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Mr.getJSONTypes=FM;function Ene(t,e){let{gen:r,data:n,opts:i}=t,o=Ine(e,i.coerceTypes),a=e.length>0&&!(o.length===0&&e.length===1&&(0,wne.schemaHasRulesForType)(t,e[0]));if(a){let s=W1(e,n,i.strictNumbers,jc.Wrong);r.if(s,()=>{o.length?$ne(t,e,o):J1(t)})}return a}Mr.coerceAndCheckDataType=Ene;var BM=new Set(["string","number","integer","boolean","null"]);function Ine(t,e){return e?t.filter(r=>BM.has(r)||e==="array"&&r==="array"):[]}function $ne(t,e,r){let{gen:n,data:i,opts:o}=t,a=n.let("dataType",(0,Re._)`typeof ${i}`),s=n.let("coerced",(0,Re._)`undefined`);o.coerceTypes==="array"&&n.if((0,Re._)`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,Re._)`${i}[0]`).assign(a,(0,Re._)`typeof ${i}`).if(W1(e,i,o.strictNumbers),()=>n.assign(s,i))),n.if((0,Re._)`${s} !== undefined`);for(let c of r)(BM.has(c)||c==="array"&&o.coerceTypes==="array")&&l(c);n.else(),J1(t),n.endIf(),n.if((0,Re._)`${s} !== undefined`,()=>{n.assign(i,s),Pne(t,s)});function l(c){switch(c){case"string":n.elseIf((0,Re._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,Re._)`"" + ${i}`).elseIf((0,Re._)`${i} === null`).assign(s,(0,Re._)`""`);return;case"number":n.elseIf((0,Re._)`${a} == "boolean" || ${i} === null
|
|
8
8
|
|| (${a} == "string" && ${i} && ${i} == +${i})`).assign(s,(0,Re._)`+${i}`);return;case"integer":n.elseIf((0,Re._)`${a} === "boolean" || ${i} === null
|
|
9
9
|
|| (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(s,(0,Re._)`+${i}`);return;case"boolean":n.elseIf((0,Re._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(s,!1).elseIf((0,Re._)`${i} === "true" || ${i} === 1`).assign(s,!0);return;case"null":n.elseIf((0,Re._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(s,null);return;case"array":n.elseIf((0,Re._)`${a} === "string" || ${a} === "number"
|
|
10
|
-
|| ${a} === "boolean" || ${i} === null`).assign(s,(0,Re._)`[${i}]`)}}}function Pne({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,Re._)`${e} !== undefined`,()=>t.assign((0,Re._)`${e}[${r}]`,n))}function G1(t,e,r,n=jc.Correct){let i=n===jc.Correct?Re.operators.EQ:Re.operators.NEQ,o;switch(t){case"null":return(0,Re._)`${e} ${i} null`;case"array":o=(0,Re._)`Array.isArray(${e})`;break;case"object":o=(0,Re._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=a((0,Re._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=a();break;default:return(0,Re._)`typeof ${e} ${i} ${t}`}return n===jc.Correct?o:(0,Re.not)(o);function a(s=Re.nil){return(0,Re.and)((0,Re._)`typeof ${e} == "number"`,s,r?(0,Re._)`isFinite(${e})`:Re.nil)}}Mr.checkDataType=G1;function W1(t,e,r,n){if(t.length===1)return G1(t[0],e,r,n);let i,o=(0,LM.toHash)(t);if(o.array&&o.object){let a=(0,Re._)`typeof ${e} != "object"`;i=o.null?a:(0,Re._)`!${e} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Re.nil;o.number&&delete o.integer;for(let a in o)i=(0,Re.and)(i,G1(a,e,r,n));return i}Mr.checkDataTypes=W1;var Tne={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Re._)`{type: ${t}}`:(0,Re._)`{type: ${e}}`};function J1(t){let e=Ane(t);(0,xne.reportError)(e,Tne)}Mr.reportTypeError=J1;function Ane(t){let{gen:e,data:r,schema:n}=t,i=(0,LM.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var qM=b(O0=>{"use strict";Object.defineProperty(O0,"__esModule",{value:!0});O0.assignDefaults=void 0;var zc=Ue(),kne=rt();function Cne(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)UM(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>UM(t,o,i.default))}O0.assignDefaults=Cne;function UM(t,e,r){let{gen:n,compositeRule:i,data:o,opts:a}=t;if(r===void 0)return;let s=(0,zc._)`${o}${(0,zc.getProperty)(e)}`;if(i){(0,kne.checkStrictMode)(t,`default is ignored for: ${s}`);return}let l=(0,zc._)`${s} === undefined`;a.useDefaults==="empty"&&(l=(0,zc._)`${l} || ${s} === null || ${s} === ""`),n.if(l,(0,zc._)`${s} = ${(0,zc.stringify)(r)}`)}});var Yn=b(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.validateUnion=wt.validateArray=wt.usePattern=wt.callValidateCode=wt.schemaProperties=wt.allSchemaProperties=wt.noPropertyInData=wt.propertyInData=wt.isOwnProperty=wt.hasPropFunc=wt.reportMissingProp=wt.checkMissingProp=wt.checkReportMissingProp=void 0;var Mt=Ue(),K1=rt(),Sa=Mo(),Rne=rt();function Dne(t,e){let{gen:r,data:n,it:i}=t;r.if(X1(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Mt._)`${e}`},!0),t.error()})}wt.checkReportMissingProp=Dne;function One({gen:t,data:e,it:{opts:r}},n,i){return(0,Mt.or)(...n.map(o=>(0,Mt.and)(X1(t,e,o,r.ownProperties),(0,Mt._)`${i} = ${o}`)))}wt.checkMissingProp=One;function Mne(t,e){t.setParams({missingProperty:e},!0),t.error()}wt.reportMissingProp=Mne;function ZM(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Mt._)`Object.prototype.hasOwnProperty`})}wt.hasPropFunc=ZM;function Y1(t,e,r){return(0,Mt._)`${ZM(t)}.call(${e}, ${r})`}wt.isOwnProperty=Y1;function Nne(t,e,r,n){let i=(0,Mt._)`${e}${(0,Mt.getProperty)(r)} !== undefined`;return n?(0,Mt._)`${i} && ${Y1(t,e,r)}`:i}wt.propertyInData=Nne;function X1(t,e,r,n){let i=(0,Mt._)`${e}${(0,Mt.getProperty)(r)} === undefined`;return n?(0,Mt.or)(i,(0,Mt.not)(Y1(t,e,r))):i}wt.noPropertyInData=X1;function HM(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}wt.allSchemaProperties=HM;function jne(t,e){return HM(e).filter(r=>!(0,K1.alwaysValidSchema)(t,e[r]))}wt.schemaProperties=jne;function zne({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},s,l,c){let u=c?(0,Mt._)`${t}, ${e}, ${n}${i}`:e,d=[[Sa.default.instancePath,(0,Mt.strConcat)(Sa.default.instancePath,o)],[Sa.default.parentData,a.parentData],[Sa.default.parentDataProperty,a.parentDataProperty],[Sa.default.rootData,Sa.default.rootData]];a.opts.dynamicRef&&d.push([Sa.default.dynamicAnchors,Sa.default.dynamicAnchors]);let f=(0,Mt._)`${u}, ${r.object(...d)}`;return l!==Mt.nil?(0,Mt._)`${s}.call(${l}, ${f})`:(0,Mt._)`${s}(${f})`}wt.callValidateCode=zne;var Lne=(0,Mt._)`new RegExp`;function Fne({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(r,n);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Mt._)`${i.code==="new RegExp"?Lne:(0,Rne.useFunc)(t,i)}(${r}, ${n})`})}wt.usePattern=Fne;function Bne(t){let{gen:e,data:r,keyword:n,it:i}=t,o=e.name("valid");if(i.allErrors){let s=e.let("valid",!0);return a(()=>e.assign(s,!1)),s}return e.var(o,!0),a(()=>e.break()),o;function a(s){let l=e.const("len",(0,Mt._)`${r}.length`);e.forRange("i",0,l,c=>{t.subschema({keyword:n,dataProp:c,dataPropType:K1.Type.Num},o),e.if((0,Mt.not)(o),s)})}}wt.validateArray=Bne;function Une(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(l=>(0,K1.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let a=e.let("valid",!1),s=e.name("_valid");e.block(()=>r.forEach((l,c)=>{let u=t.subschema({keyword:n,schemaProp:c,compositeRule:!0},s);e.assign(a,(0,Mt._)`${a} || ${s}`),t.mergeValidEvaluated(u,s)||e.if((0,Mt.not)(a))})),t.result(a,()=>t.reset(),()=>t.error(!0))}wt.validateUnion=Une});var WM=b(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.validateKeywordUsage=Zi.validSchemaType=Zi.funcKeywordCode=Zi.macroKeywordCode=void 0;var rn=Ue(),Hs=Mo(),qne=Yn(),Zne=Wf();function Hne(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=t,s=e.macro.call(a.self,i,o,a),l=GM(r,n,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let c=r.name("valid");t.subschema({schema:s,schemaPath:rn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:!0},c),t.pass(c,()=>t.error(!0))}Zi.macroKeywordCode=Hne;function Vne(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:s,it:l}=t;Wne(l,e);let c=!s&&e.compile?e.compile.call(l.self,o,a,l):e.validate,u=GM(n,i,c),d=n.let("valid");t.block$data(d,f),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function f(){if(e.errors===!1)m(),e.modifying&&VM(t),y(()=>t.error());else{let g=e.async?p():h();e.modifying&&VM(t),y(()=>Gne(t,g))}}function p(){let g=n.let("ruleErrs",null);return n.try(()=>m((0,rn._)`await `),v=>n.assign(d,!1).if((0,rn._)`${v} instanceof ${l.ValidationError}`,()=>n.assign(g,(0,rn._)`${v}.errors`),()=>n.throw(v))),g}function h(){let g=(0,rn._)`${u}.errors`;return n.assign(g,null),m(rn.nil),g}function m(g=e.async?(0,rn._)`await `:rn.nil){let v=l.opts.passContext?Hs.default.this:Hs.default.self,E=!("compile"in e&&!s||e.schema===!1);n.assign(d,(0,rn._)`${g}${(0,qne.callValidateCode)(t,u,v,E)}`,e.modifying)}function y(g){var v;n.if((0,rn.not)((v=e.valid)!==null&&v!==void 0?v:d),g)}}Zi.funcKeywordCode=Vne;function VM(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,rn._)`${n.parentData}[${n.parentDataProperty}]`))}function Gne(t,e){let{gen:r}=t;r.if((0,rn._)`Array.isArray(${e})`,()=>{r.assign(Hs.default.vErrors,(0,rn._)`${Hs.default.vErrors} === null ? ${e} : ${Hs.default.vErrors}.concat(${e})`).assign(Hs.default.errors,(0,rn._)`${Hs.default.vErrors}.length`),(0,Zne.extendErrors)(t)},()=>t.error())}function Wne({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function GM(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,rn.stringify)(r)})}function Jne(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}Zi.validSchemaType=Jne;function Kne({schema:t,opts:e,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let a=i.dependencies;if(a!=null&&a.some(s=>!Object.prototype.hasOwnProperty.call(t,s)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let l=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(l);else throw new Error(l)}}Zi.validateKeywordUsage=Kne});var KM=b(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.extendSubschemaMode=Ea.extendSubschemaData=Ea.getSubschema=void 0;var Hi=Ue(),JM=rt();function Yne(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let s=t.schema[e];return r===void 0?{schema:s,schemaPath:(0,Hi._)`${t.schemaPath}${(0,Hi.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,Hi._)`${t.schemaPath}${(0,Hi.getProperty)(e)}${(0,Hi.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,JM.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Ea.getSubschema=Yne;function Xne(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=e;if(r!==void 0){let{errorPath:c,dataPathArr:u,opts:d}=e,f=s.let("data",(0,Hi._)`${e.data}${(0,Hi.getProperty)(r)}`,!0);l(f),t.errorPath=(0,Hi.str)`${c}${(0,JM.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,Hi._)`${r}`,t.dataPathArr=[...u,t.parentDataProperty]}if(i!==void 0){let c=i instanceof Hi.Name?i:s.let("data",i,!0);l(c),a!==void 0&&(t.propertyName=a)}o&&(t.dataTypes=o);function l(c){t.data=c,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,c]}}Ea.extendSubschemaData=Xne;function Qne(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}Ea.extendSubschemaMode=Qne});var Kf=b((uFe,YM)=>{"use strict";YM.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}});var QM=b((dFe,XM)=>{"use strict";var Ia=XM.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};M0(e,n,i,t,"",t)};Ia.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Ia.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Ia.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Ia.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 M0(t,e,r,n,i,o,a,s,l,c){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,a,s,l,c);for(var u in n){var d=n[u];if(Array.isArray(d)){if(u in Ia.arrayKeywords)for(var f=0;f<d.length;f++)M0(t,e,r,d[f],i+"/"+u+"/"+f,o,i,u,n,f)}else if(u in Ia.propsKeywords){if(d&&typeof d=="object")for(var p in d)M0(t,e,r,d[p],i+"/"+u+"/"+eie(p),o,i,u,n,p)}else(u in Ia.keywords||t.allKeys&&!(u in Ia.skipKeywords))&&M0(t,e,r,d,i+"/"+u,o,i,u,n)}r(n,i,o,a,s,l,c)}}function eie(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Yf=b(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.getSchemaRefs=mn.resolveUrl=mn.normalizeId=mn._getFullPath=mn.getFullPath=mn.inlineRef=void 0;var tie=rt(),rie=Kf(),nie=QM(),iie=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function oie(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Q1(t):e?eN(t)<=e:!1}mn.inlineRef=oie;var aie=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Q1(t){for(let e in t){if(aie.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Q1)||typeof r=="object"&&Q1(r))return!0}return!1}function eN(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!iie.has(r)&&(typeof t[r]=="object"&&(0,tie.eachItem)(t[r],n=>e+=eN(n)),e===1/0))return 1/0}return e}function tN(t,e="",r){r!==!1&&(e=Lc(e));let n=t.parse(e);return rN(t,n)}mn.getFullPath=tN;function rN(t,e){return t.serialize(e).split("#")[0]+"#"}mn._getFullPath=rN;var sie=/#\/?$/;function Lc(t){return t?t.replace(sie,""):""}mn.normalizeId=Lc;function lie(t,e,r){return r=Lc(r),t.resolve(e,r)}mn.resolveUrl=lie;var cie=/^[a-z_][-a-z0-9._]*$/i;function uie(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Lc(t[r]||e),o={"":i},a=tN(n,i,!1),s={},l=new Set;return nie(t,{allKeys:!0},(d,f,p,h)=>{if(h===void 0)return;let m=a+f,y=o[h];typeof d[r]=="string"&&(y=g.call(this,d[r])),v.call(this,d.$anchor),v.call(this,d.$dynamicAnchor),o[f]=y;function g(E){let x=this.opts.uriResolver.resolve;if(E=Lc(y?x(y,E):E),l.has(E))throw u(E);l.add(E);let w=this.refs[E];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?c(d,w.schema,E):E!==Lc(m)&&(E[0]==="#"?(c(d,s[E],E),s[E]=d):this.refs[E]=m),E}function v(E){if(typeof E=="string"){if(!cie.test(E))throw new Error(`invalid anchor "${E}"`);g.call(this,`#${E}`)}}}),s;function c(d,f,p){if(f!==void 0&&!rie(d,f))throw u(p)}function u(d){return new Error(`reference "${d}" resolves to more than one schema`)}}mn.getSchemaRefs=uie});var ep=b($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});$a.getData=$a.KeywordCxt=$a.validateFunctionCode=void 0;var sN=NM(),nN=Jf(),tI=V1(),N0=Jf(),die=qM(),Qf=WM(),eI=KM(),de=Ue(),Ie=Mo(),fie=Yf(),No=rt(),Xf=Wf();function pie(t){if(uN(t)&&(dN(t),cN(t))){gie(t);return}lN(t,()=>(0,sN.topBoolOrEmptySchema)(t))}$a.validateFunctionCode=pie;function lN({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,de._)`${Ie.default.data}, ${Ie.default.valCxt}`,n.$async,()=>{t.code((0,de._)`"use strict"; ${iN(r,i)}`),mie(t,i),t.code(o)}):t.func(e,(0,de._)`${Ie.default.data}, ${hie(i)}`,n.$async,()=>t.code(iN(r,i)).code(o))}function hie(t){return(0,de._)`{${Ie.default.instancePath}="", ${Ie.default.parentData}, ${Ie.default.parentDataProperty}, ${Ie.default.rootData}=${Ie.default.data}${t.dynamicRef?(0,de._)`, ${Ie.default.dynamicAnchors}={}`:de.nil}}={}`}function mie(t,e){t.if(Ie.default.valCxt,()=>{t.var(Ie.default.instancePath,(0,de._)`${Ie.default.valCxt}.${Ie.default.instancePath}`),t.var(Ie.default.parentData,(0,de._)`${Ie.default.valCxt}.${Ie.default.parentData}`),t.var(Ie.default.parentDataProperty,(0,de._)`${Ie.default.valCxt}.${Ie.default.parentDataProperty}`),t.var(Ie.default.rootData,(0,de._)`${Ie.default.valCxt}.${Ie.default.rootData}`),e.dynamicRef&&t.var(Ie.default.dynamicAnchors,(0,de._)`${Ie.default.valCxt}.${Ie.default.dynamicAnchors}`)},()=>{t.var(Ie.default.instancePath,(0,de._)`""`),t.var(Ie.default.parentData,(0,de._)`undefined`),t.var(Ie.default.parentDataProperty,(0,de._)`undefined`),t.var(Ie.default.rootData,Ie.default.data),e.dynamicRef&&t.var(Ie.default.dynamicAnchors,(0,de._)`{}`)})}function gie(t){let{schema:e,opts:r,gen:n}=t;lN(t,()=>{r.$comment&&e.$comment&&pN(t),wie(t),n.let(Ie.default.vErrors,null),n.let(Ie.default.errors,0),r.unevaluated&&yie(t),fN(t),Eie(t)})}function yie(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,de._)`${r}.evaluated`),e.if((0,de._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,de._)`${t.evaluated}.props`,(0,de._)`undefined`)),e.if((0,de._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,de._)`${t.evaluated}.items`,(0,de._)`undefined`))}function iN(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,de._)`/*# sourceURL=${r} */`:de.nil}function _ie(t,e){if(uN(t)&&(dN(t),cN(t))){vie(t,e);return}(0,sN.boolOrEmptySchema)(t,e)}function cN({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function uN(t){return typeof t.schema!="boolean"}function vie(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&pN(t),xie(t),Sie(t);let o=n.const("_errs",Ie.default.errors);fN(t,o),n.var(e,(0,de._)`${o} === ${Ie.default.errors}`)}function dN(t){(0,No.checkUnknownRules)(t),bie(t)}function fN(t,e){if(t.opts.jtd)return oN(t,[],!1,e);let r=(0,nN.getSchemaTypes)(t.schema),n=(0,nN.coerceAndCheckDataType)(t,r);oN(t,r,!n,e)}function bie(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,No.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function wie(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,No.checkStrictMode)(t,"default is ignored in the schema root")}function xie(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,fie.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Sie(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function pN({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,de._)`${Ie.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,de.str)`${n}/$comment`,s=t.scopeValue("root",{ref:e.root});t.code((0,de._)`${Ie.default.self}.opts.$comment(${o}, ${a}, ${s}.schema)`)}}function Eie(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,de._)`${Ie.default.errors} === 0`,()=>e.return(Ie.default.data),()=>e.throw((0,de._)`new ${i}(${Ie.default.vErrors})`)):(e.assign((0,de._)`${n}.errors`,Ie.default.vErrors),o.unevaluated&&Iie(t),e.return((0,de._)`${Ie.default.errors} === 0`))}function Iie({gen:t,evaluated:e,props:r,items:n}){r instanceof de.Name&&t.assign((0,de._)`${e}.props`,r),n instanceof de.Name&&t.assign((0,de._)`${e}.items`,n)}function oN(t,e,r,n){let{gen:i,schema:o,data:a,allErrors:s,opts:l,self:c}=t,{RULES:u}=c;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,No.schemaHasRulesButRef)(o,u))){i.block(()=>mN(t,"$ref",u.all.$ref.definition));return}l.jtd||$ie(t,e),i.block(()=>{for(let f of u.rules)d(f);d(u.post)});function d(f){(0,tI.shouldUseGroup)(o,f)&&(f.type?(i.if((0,N0.checkDataType)(f.type,a,l.strictNumbers)),aN(t,f),e.length===1&&e[0]===f.type&&r&&(i.else(),(0,N0.reportTypeError)(t)),i.endIf()):aN(t,f),s||i.if((0,de._)`${Ie.default.errors} === ${n||0}`))}}function aN(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,die.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,tI.shouldUseRule)(n,o)&&mN(t,o.keyword,o.definition,e.type)})}function $ie(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Pie(t,e),t.opts.allowUnionTypes||Tie(t,e),Aie(t,t.dataTypes))}function Pie(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{hN(t.dataTypes,r)||rI(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Cie(t,e)}}function Tie(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&rI(t,"use allowUnionTypes to allow union type keyword")}function Aie(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,tI.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>kie(e,a))&&rI(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function kie(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function hN(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Cie(t,e){let r=[];for(let n of t.dataTypes)hN(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function rI(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,No.checkStrictMode)(t,e,t.opts.strictTypes)}var j0=class{constructor(e,r,n){if((0,Qf.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,No.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",gN(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Qf.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",Ie.default.errors))}result(e,r,n){this.failResult((0,de.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,de.not)(e),void 0,r)}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:r}=this;this.fail((0,de._)`${r} !== undefined && (${(0,de.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Xf.reportExtraError:Xf.reportError)(this,this.def.error,r)}$dataError(){(0,Xf.reportError)(this,this.def.$dataError||Xf.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Xf.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=de.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=de.nil,r=de.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,de.or)((0,de._)`${i} === undefined`,r)),e!==de.nil&&n.assign(e,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==de.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,de.or)(a(),s());function a(){if(n.length){if(!(r instanceof de.Name))throw new Error("ajv implementation error");let l=Array.isArray(n)?n:[n];return(0,de._)`${(0,N0.checkDataTypes)(l,r,o.opts.strictNumbers,N0.DataType.Wrong)}`}return de.nil}function s(){if(i.validateSchema){let l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,de._)`!${l}(${r})`}return de.nil}}subschema(e,r){let n=(0,eI.getSubschema)(this.it,e);(0,eI.extendSubschemaData)(n,this.it,e),(0,eI.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return _ie(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=No.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=No.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,de.Name)),!0}};$a.KeywordCxt=j0;function mN(t,e,r,n){let i=new j0(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Qf.funcKeywordCode)(i,r):"macro"in r?(0,Qf.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Qf.funcKeywordCode)(i,r)}var Rie=/^\/(?:[^~]|~0|~1)*$/,Die=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function gN(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return Ie.default.rootData;if(t[0]==="/"){if(!Rie.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=Ie.default.rootData}else{let c=Die.exec(t);if(!c)throw new Error(`Invalid JSON-pointer: ${t}`);let u=+c[1];if(i=c[2],i==="#"){if(u>=e)throw new Error(l("property/index",u));return n[e-u]}if(u>e)throw new Error(l("data",u));if(o=r[e-u],!i)return o}let a=o,s=i.split("/");for(let c of s)c&&(o=(0,de._)`${o}${(0,de.getProperty)((0,No.unescapeJsonPointer)(c))}`,a=(0,de._)`${a} && ${o}`);return a;function l(c,u){return`Cannot access ${c} ${u} levels up, current level is ${e}`}}$a.getData=gN});var z0=b(iI=>{"use strict";Object.defineProperty(iI,"__esModule",{value:!0});var nI=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};iI.default=nI});var tp=b(sI=>{"use strict";Object.defineProperty(sI,"__esModule",{value:!0});var oI=Yf(),aI=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,oI.resolveUrl)(e,r,n),this.missingSchema=(0,oI.normalizeId)((0,oI.getFullPath)(e,this.missingRef))}};sI.default=aI});var F0=b(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.resolveSchema=Xn.getCompilingSchema=Xn.resolveRef=Xn.compileSchema=Xn.SchemaEnv=void 0;var xi=Ue(),Oie=z0(),Vs=Mo(),Si=Yf(),yN=rt(),Mie=ep(),Fc=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,Si.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};Xn.SchemaEnv=Fc;function cI(t){let e=_N.call(this,t);if(e)return e;let r=(0,Si.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new xi.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),s;t.$async&&(s=a.scopeValue("Error",{ref:Oie.default,code:(0,xi._)`require("ajv/dist/runtime/validation_error").default`}));let l=a.scopeName("validate");t.validateName=l;let c={gen:a,allErrors:this.opts.allErrors,data:Vs.default.data,parentData:Vs.default.parentData,parentDataProperty:Vs.default.parentDataProperty,dataNames:[Vs.default.data],dataPathArr:[xi.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,xi.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:xi.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,xi._)`""`,opts:this.opts,self:this},u;try{this._compilations.add(t),(0,Mie.validateFunctionCode)(c),a.optimize(this.opts.code.optimize);let d=a.toString();u=`${a.scopeRefs(Vs.default.scope)}return ${d}`,this.opts.code.process&&(u=this.opts.code.process(u,t));let p=new Function(`${Vs.default.self}`,`${Vs.default.scope}`,u)(this,this.scope.get());if(this.scope.value(l,{ref:p}),p.errors=null,p.schema=t.schema,p.schemaEnv=t,t.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:l,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:h,items:m}=c;p.evaluated={props:h instanceof xi.Name?void 0:h,items:m instanceof xi.Name?void 0:m,dynamicProps:h instanceof xi.Name,dynamicItems:m instanceof xi.Name},p.source&&(p.source.evaluated=(0,xi.stringify)(p.evaluated))}return t.validate=p,t}catch(d){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),d}finally{this._compilations.delete(t)}}Xn.compileSchema=cI;function Nie(t,e,r){var n;r=(0,Si.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=Lie.call(this,t,r);if(o===void 0){let a=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:s}=this.opts;a&&(o=new Fc({schema:a,schemaId:s,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=jie.call(this,o)}Xn.resolveRef=Nie;function jie(t){return(0,Si.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:cI.call(this,t)}function _N(t){for(let e of this._compilations)if(zie(e,t))return e}Xn.getCompilingSchema=_N;function zie(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Lie(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||L0.call(this,t,e)}function L0(t,e){let r=this.opts.uriResolver.parse(e),n=(0,Si._getFullPath)(this.opts.uriResolver,r),i=(0,Si.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return lI.call(this,r,t);let o=(0,Si.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let s=L0.call(this,t,a);return typeof(s==null?void 0:s.schema)!="object"?void 0:lI.call(this,r,s)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||cI.call(this,a),o===(0,Si.normalizeId)(e)){let{schema:s}=a,{schemaId:l}=this.opts,c=s[l];return c&&(i=(0,Si.resolveUrl)(this.opts.uriResolver,i,c)),new Fc({schema:s,schemaId:l,root:t,baseId:i})}return lI.call(this,r,a)}}Xn.resolveSchema=L0;var Fie=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function lI(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let s of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let l=r[(0,yN.unescapeFragment)(s)];if(l===void 0)return;r=l;let c=typeof r=="object"&&r[this.opts.schemaId];!Fie.has(s)&&c&&(e=(0,Si.resolveUrl)(this.opts.uriResolver,e,c))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,yN.schemaHasRulesButRef)(r,this.RULES)){let s=(0,Si.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=L0.call(this,n,s)}let{schemaId:a}=this.opts;if(o=o||new Fc({schema:r,schemaId:a,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var vN=b((yFe,Bie)=>{Bie.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 dI=b((_Fe,SN)=>{"use strict";var Uie=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),wN=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function uI(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}var qie=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function bN(t){return t.length=0,!0}function Zie(t,e,r){if(t.length){let n=uI(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function Hie(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,a=!1,s=Zie;for(let l=0;l<t.length;l++){let c=t[l];if(!(c==="["||c==="]"))if(c===":"){if(o===!0&&(a=!0),!s(i,n,r))break;if(++e>7){r.error=!0;break}l>0&&t[l-1]===":"&&(o=!0),n.push(":");continue}else if(c==="%"){if(!s(i,n,r))break;s=bN}else{i.push(c);continue}}return i.length&&(s===bN?r.zone=i.join(""):a?n.push(i.join("")):n.push(uI(i))),r.address=n.join(""),r}function xN(t){if(Vie(t,":")<2)return{host:t,isIPV6:!1};let e=Hie(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function Vie(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function Gie(t){let e=t,r=[],n=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(i===3&&e==="/.."){r.length!==0&&r.pop(),r.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),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}function Wie(t,e){let r=e!==!0?escape:unescape;return t.scheme!==void 0&&(t.scheme=r(t.scheme)),t.userinfo!==void 0&&(t.userinfo=r(t.userinfo)),t.host!==void 0&&(t.host=r(t.host)),t.path!==void 0&&(t.path=r(t.path)),t.query!==void 0&&(t.query=r(t.query)),t.fragment!==void 0&&(t.fragment=r(t.fragment)),t}function Jie(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!wN(r)){let n=xN(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=t.host}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}SN.exports={nonSimpleDomain:qie,recomposeAuthority:Jie,normalizeComponentEncoding:Wie,removeDotSegments:Gie,isIPv4:wN,isUUID:Uie,normalizeIPv6:xN,stringArrayToHexStripped:uI}});var TN=b((vFe,PN)=>{"use strict";var{isUUID:Kie}=dI(),Yie=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Xie=["http","https","ws","wss","urn","urn:uuid"];function Qie(t){return Xie.indexOf(t)!==-1}function fI(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 EN(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function IN(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 eoe(t){return t.secure=fI(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function toe(t){if((t.port===(fI(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,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function roe(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(Yie);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let i=`${n}:${e.nid||t.nid}`,o=pI(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function noe(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),i=`${r}:${e.nid||n}`,o=pI(i);o&&(t=o.serialize(t,e));let a=t,s=t.nss;return a.path=`${n||e.nid}:${s}`,e.skipEscape=!0,a}function ioe(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!Kie(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function ooe(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var $N={scheme:"http",domainHost:!0,parse:EN,serialize:IN},aoe={scheme:"https",domainHost:$N.domainHost,parse:EN,serialize:IN},B0={scheme:"ws",domainHost:!0,parse:eoe,serialize:toe},soe={scheme:"wss",domainHost:B0.domainHost,parse:B0.parse,serialize:B0.serialize},loe={scheme:"urn",parse:roe,serialize:noe,skipNormalize:!0},coe={scheme:"urn:uuid",parse:ioe,serialize:ooe,skipNormalize:!0},U0={http:$N,https:aoe,ws:B0,wss:soe,urn:loe,"urn:uuid":coe};Object.setPrototypeOf(U0,null);function pI(t){return t&&(U0[t]||U0[t.toLowerCase()])||void 0}PN.exports={wsIsSecure:fI,SCHEMES:U0,isValidSchemeName:Qie,getSchemeHandler:pI}});var mI=b((bFe,Z0)=>{"use strict";var{normalizeIPv6:uoe,removeDotSegments:rp,recomposeAuthority:doe,normalizeComponentEncoding:q0,isIPv4:foe,nonSimpleDomain:poe}=dI(),{SCHEMES:hoe,getSchemeHandler:AN}=TN();function moe(t,e){return typeof t=="string"?t=Vi(jo(t,e),e):typeof t=="object"&&(t=jo(Vi(t,e),e)),t}function goe(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=kN(jo(t,n),jo(e,n),n,!0);return n.skipEscape=!0,Vi(i,n)}function kN(t,e,r,n){let i={};return n||(t=jo(Vi(t,r),r),e=jo(Vi(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=rp(e.path||""),i.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=rp(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=rp(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?i.path="/"+e.path:t.path?i.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:i.path=e.path,i.path=rp(i.path)),i.query=e.query):(i.path=t.path,e.query!==void 0?i.query=e.query:i.query=t.query),i.userinfo=t.userinfo,i.host=t.host,i.port=t.port),i.scheme=t.scheme),i.fragment=e.fragment,i}function yoe(t,e,r){return typeof t=="string"?(t=unescape(t),t=Vi(q0(jo(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=Vi(q0(t,!0),{...r,skipEscape:!0})),typeof e=="string"?(e=unescape(e),e=Vi(q0(jo(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=Vi(q0(e,!0),{...r,skipEscape:!0})),t.toLowerCase()===e.toLowerCase()}function Vi(t,e){let r={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:""},n=Object.assign({},e),i=[],o=AN(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let a=doe(r);if(a!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(a),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let s=r.path;!n.absolutePath&&(!o||!o.absolutePath)&&(s=rp(s)),a===void 0&&s[0]==="/"&&s[1]==="/"&&(s="/%2F"+s.slice(2)),i.push(s)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var _oe=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function jo(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let o=t.match(_oe);if(o){if(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5]),n.host)if(foe(n.host)===!1){let l=uoe(n.host);n.host=l.host.toLowerCase(),i=l.isIPV6}else i=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let a=AN(r.scheme||n.scheme);if(!r.unicodeSupport&&(!a||!a.unicodeSupport)&&n.host&&(r.domainHost||a&&a.domainHost)&&i===!1&&poe(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(s){n.error=n.error||"Host's domain name can not be converted to ASCII: "+s}(!a||a&&!a.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=unescape(n.host))),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var hI={SCHEMES:hoe,normalize:moe,resolve:goe,resolveComponent:kN,equal:yoe,serialize:Vi,parse:jo};Z0.exports=hI;Z0.exports.default=hI;Z0.exports.fastUri=hI});var RN=b(gI=>{"use strict";Object.defineProperty(gI,"__esModule",{value:!0});var CN=mI();CN.code='require("ajv/dist/runtime/uri").default';gI.default=CN});var FN=b(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.CodeGen=br.Name=br.nil=br.stringify=br.str=br._=br.KeywordCxt=void 0;var voe=ep();Object.defineProperty(br,"KeywordCxt",{enumerable:!0,get:function(){return voe.KeywordCxt}});var Bc=Ue();Object.defineProperty(br,"_",{enumerable:!0,get:function(){return Bc._}});Object.defineProperty(br,"str",{enumerable:!0,get:function(){return Bc.str}});Object.defineProperty(br,"stringify",{enumerable:!0,get:function(){return Bc.stringify}});Object.defineProperty(br,"nil",{enumerable:!0,get:function(){return Bc.nil}});Object.defineProperty(br,"Name",{enumerable:!0,get:function(){return Bc.Name}});Object.defineProperty(br,"CodeGen",{enumerable:!0,get:function(){return Bc.CodeGen}});var boe=z0(),jN=tp(),woe=H1(),np=F0(),xoe=Ue(),ip=Yf(),H0=Jf(),_I=rt(),DN=vN(),Soe=RN(),zN=(t,e)=>new RegExp(t,e);zN.code="new RegExp";var Eoe=["removeAdditional","useDefaults","coerceTypes"],Ioe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),$oe={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."},Poe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ON=200;function Toe(t){var e,r,n,i,o,a,s,l,c,u,d,f,p,h,m,y,g,v,E,x,w,A,$,R,T;let D=t.strict,k=(e=t.code)===null||e===void 0?void 0:e.optimize,M=k===!0||k===void 0?1:k||0,U=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:zN,z=(i=t.uriResolver)!==null&&i!==void 0?i:Soe.default;return{strictSchema:(a=(o=t.strictSchema)!==null&&o!==void 0?o:D)!==null&&a!==void 0?a:!0,strictNumbers:(l=(s=t.strictNumbers)!==null&&s!==void 0?s:D)!==null&&l!==void 0?l:!0,strictTypes:(u=(c=t.strictTypes)!==null&&c!==void 0?c:D)!==null&&u!==void 0?u:"log",strictTuples:(f=(d=t.strictTuples)!==null&&d!==void 0?d:D)!==null&&f!==void 0?f:"log",strictRequired:(h=(p=t.strictRequired)!==null&&p!==void 0?p:D)!==null&&h!==void 0?h:!1,code:t.code?{...t.code,optimize:M,regExp:U}:{optimize:M,regExp:U},loopRequired:(m=t.loopRequired)!==null&&m!==void 0?m:ON,loopEnum:(y=t.loopEnum)!==null&&y!==void 0?y:ON,meta:(g=t.meta)!==null&&g!==void 0?g:!0,messages:(v=t.messages)!==null&&v!==void 0?v:!0,inlineRefs:(E=t.inlineRefs)!==null&&E!==void 0?E:!0,schemaId:(x=t.schemaId)!==null&&x!==void 0?x:"$id",addUsedSchema:(w=t.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(A=t.validateSchema)!==null&&A!==void 0?A:!0,validateFormats:($=t.validateFormats)!==null&&$!==void 0?$:!0,unicodeRegExp:(R=t.unicodeRegExp)!==null&&R!==void 0?R:!0,int32range:(T=t.int32range)!==null&&T!==void 0?T:!0,uriResolver:z}}var op=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Toe(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new xoe.ValueScope({scope:{},prefixes:Ioe,es5:r,lines:n}),this.logger=Ooe(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,woe.getRules)(),MN.call(this,$oe,e,"NOT SUPPORTED"),MN.call(this,Poe,e,"DEPRECATED","warn"),this._metaOpts=Roe.call(this),e.formats&&koe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Coe.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Aoe.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=DN;n==="id"&&(i={...DN},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(u,d){await o.call(this,u.$schema);let f=this._addSchema(u,d);return f.validate||a.call(this,f)}async function o(u){u&&!this.getSchema(u)&&await i.call(this,{$ref:u},!0)}async function a(u){try{return this._compileSchemaEnv(u)}catch(d){if(!(d instanceof jN.default))throw d;return s.call(this,d),await l.call(this,d.missingSchema),a.call(this,u)}}function s({missingSchema:u,missingRef:d}){if(this.refs[u])throw new Error(`AnySchema ${u} is loaded but ${d} cannot be resolved`)}async function l(u){let d=await c.call(this,u);this.refs[u]||await o.call(this,d.$schema),this.refs[u]||this.addSchema(d,u,r)}async function c(u){let d=this._loading[u];if(d)return d;try{return await(this._loading[u]=n(u))}finally{delete this._loading[u]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,n,i);return this}let o;if(typeof e=="object"){let{schemaId:a}=this.opts;if(o=e[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,ip.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,e);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let r;for(;typeof(r=NN.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new np.SchemaEnv({schema:{},schemaId:n});if(r=np.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}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 r=NN.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,ip.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Noe.call(this,n,r),!r)return(0,_I.eachItem)(n,o=>yI.call(this,o)),this;zoe.call(this,r);let i={...r,type:(0,H0.getJSONTypes)(r.type),schemaType:(0,H0.getJSONTypes)(r.schemaType)};return(0,_I.eachItem)(n,i.type.length===0?o=>yI.call(this,o,i):o=>i.type.forEach(a=>yI.call(this,o,i,a))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let o=i.split("/").slice(1),a=e;for(let s of o)a=a[s];for(let s in n){let l=n[s];if(typeof l!="object")continue;let{$data:c}=l.definition,u=a[s];c&&u&&(a[s]=LN(u))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e=="object")a=e[s];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 l=this._cache.get(e);if(l!==void 0)return l;n=(0,ip.normalizeId)(a||n);let c=ip.getSchemaRefs.call(this,e,n);return l=new np.SchemaEnv({schema:e,schemaId:s,meta:r,baseId:n,localRefs:c}),this._cache.set(l.schema,l),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),i&&this.validateSchema(e,!0),l}_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):np.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{np.compileSchema.call(this,e)}finally{this.opts=r}}};op.ValidationError=boe.default;op.MissingRefError=jN.default;br.default=op;function MN(t,e,r,n="error"){for(let i in t){let o=i;o in e&&this.logger[n](`${r}: option ${i}. ${t[o]}`)}}function NN(t){return t=(0,ip.normalizeId)(t),this.schemas[t]||this.refs[t]}function Aoe(){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 koe(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Coe(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 r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Roe(){let t={...this.opts};for(let e of Eoe)delete t[e];return t}var Doe={log(){},warn(){},error(){}};function Ooe(t){if(t===!1)return Doe;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 Moe=/^[a-z_$][a-z0-9_$:-]*$/i;function Noe(t,e){let{RULES:r}=this;if((0,_I.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Moe.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function yI(t,e,r){var n;let i=e==null?void 0:e.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:l})=>l===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[t]=!0,!e)return;let s={keyword:t,definition:{...e,type:(0,H0.getJSONTypes)(e.type),schemaType:(0,H0.getJSONTypes)(e.schemaType)}};e.before?joe.call(this,a,s,e.before):a.rules.push(s),o.all[t]=s,(n=e.implements)===null||n===void 0||n.forEach(l=>this.addKeyword(l))}function joe(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function zoe(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=LN(e)),t.validateSchema=this.compile(e,!0))}var Loe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function LN(t){return{anyOf:[t,Loe]}}});var BN=b(vI=>{"use strict";Object.defineProperty(vI,"__esModule",{value:!0});var Foe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};vI.default=Foe});var HN=b(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});Gs.callRef=Gs.getValidate=void 0;var Boe=tp(),UN=Yn(),gn=Ue(),Uc=Mo(),qN=F0(),V0=rt(),Uoe={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:a,opts:s,self:l}=n,{root:c}=o;if((r==="#"||r==="#/")&&i===c.baseId)return d();let u=qN.resolveRef.call(l,c,i,r);if(u===void 0)throw new Boe.default(n.opts.uriResolver,i,r);if(u instanceof qN.SchemaEnv)return f(u);return p(u);function d(){if(o===c)return G0(t,a,o,o.$async);let h=e.scopeValue("root",{ref:c});return G0(t,(0,gn._)`${h}.validate`,c,c.$async)}function f(h){let m=ZN(t,h);G0(t,m,h,h.$async)}function p(h){let m=e.scopeValue("schema",s.code.source===!0?{ref:h,code:(0,gn.stringify)(h)}:{ref:h}),y=e.name("valid"),g=t.subschema({schema:h,dataTypes:[],schemaPath:gn.nil,topSchemaRef:m,errSchemaPath:r},y);t.mergeEvaluated(g),t.ok(y)}}};function ZN(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,gn._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Gs.getValidate=ZN;function G0(t,e,r,n){let{gen:i,it:o}=t,{allErrors:a,schemaEnv:s,opts:l}=o,c=l.passContext?Uc.default.this:gn.nil;n?u():d();function u(){if(!s.$async)throw new Error("async schema referenced by sync schema");let h=i.let("valid");i.try(()=>{i.code((0,gn._)`await ${(0,UN.callValidateCode)(t,e,c)}`),p(e),a||i.assign(h,!0)},m=>{i.if((0,gn._)`!(${m} instanceof ${o.ValidationError})`,()=>i.throw(m)),f(m),a||i.assign(h,!1)}),t.ok(h)}function d(){t.result((0,UN.callValidateCode)(t,e,c),()=>p(e),()=>f(e))}function f(h){let m=(0,gn._)`${h}.errors`;i.assign(Uc.default.vErrors,(0,gn._)`${Uc.default.vErrors} === null ? ${m} : ${Uc.default.vErrors}.concat(${m})`),i.assign(Uc.default.errors,(0,gn._)`${Uc.default.vErrors}.length`)}function p(h){var m;if(!o.opts.unevaluated)return;let y=(m=r==null?void 0:r.validate)===null||m===void 0?void 0:m.evaluated;if(o.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(o.props=V0.mergeEvaluated.props(i,y.props,o.props));else{let g=i.var("props",(0,gn._)`${h}.evaluated.props`);o.props=V0.mergeEvaluated.props(i,g,o.props,gn.Name)}if(o.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(o.items=V0.mergeEvaluated.items(i,y.items,o.items));else{let g=i.var("items",(0,gn._)`${h}.evaluated.items`);o.items=V0.mergeEvaluated.items(i,g,o.items,gn.Name)}}}Gs.callRef=G0;Gs.default=Uoe});var VN=b(bI=>{"use strict";Object.defineProperty(bI,"__esModule",{value:!0});var qoe=BN(),Zoe=HN(),Hoe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",qoe.default,Zoe.default];bI.default=Hoe});var GN=b(wI=>{"use strict";Object.defineProperty(wI,"__esModule",{value:!0});var W0=Ue(),Pa=W0.operators,J0={maximum:{okStr:"<=",ok:Pa.LTE,fail:Pa.GT},minimum:{okStr:">=",ok:Pa.GTE,fail:Pa.LT},exclusiveMaximum:{okStr:"<",ok:Pa.LT,fail:Pa.GTE},exclusiveMinimum:{okStr:">",ok:Pa.GT,fail:Pa.LTE}},Voe={message:({keyword:t,schemaCode:e})=>(0,W0.str)`must be ${J0[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,W0._)`{comparison: ${J0[t].okStr}, limit: ${e}}`},Goe={keyword:Object.keys(J0),type:"number",schemaType:"number",$data:!0,error:Voe,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,W0._)`${r} ${J0[e].fail} ${n} || isNaN(${r})`)}};wI.default=Goe});var WN=b(xI=>{"use strict";Object.defineProperty(xI,"__esModule",{value:!0});var ap=Ue(),Woe={message:({schemaCode:t})=>(0,ap.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,ap._)`{multipleOf: ${t}}`},Joe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Woe,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,a=e.let("res"),s=o?(0,ap._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,ap._)`${a} !== parseInt(${a})`;t.fail$data((0,ap._)`(${n} === 0 || (${a} = ${r}/${n}, ${s}))`)}};xI.default=Joe});var KN=b(SI=>{"use strict";Object.defineProperty(SI,"__esModule",{value:!0});function JN(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}SI.default=JN;JN.code='require("ajv/dist/runtime/ucs2length").default'});var YN=b(EI=>{"use strict";Object.defineProperty(EI,"__esModule",{value:!0});var Ws=Ue(),Koe=rt(),Yoe=KN(),Xoe={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,Ws.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Ws._)`{limit: ${t}}`},Qoe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Xoe,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?Ws.operators.GT:Ws.operators.LT,a=i.opts.unicode===!1?(0,Ws._)`${r}.length`:(0,Ws._)`${(0,Koe.useFunc)(t.gen,Yoe.default)}(${r})`;t.fail$data((0,Ws._)`${a} ${o} ${n}`)}};EI.default=Qoe});var XN=b(II=>{"use strict";Object.defineProperty(II,"__esModule",{value:!0});var eae=Yn(),tae=rt(),qc=Ue(),rae={message:({schemaCode:t})=>(0,qc.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,qc._)`{pattern: ${t}}`},nae={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:rae,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:a}=t,s=a.opts.unicodeRegExp?"u":"";if(n){let{regExp:l}=a.opts.code,c=l.code==="new RegExp"?(0,qc._)`new RegExp`:(0,tae.useFunc)(e,l),u=e.let("valid");e.try(()=>e.assign(u,(0,qc._)`${c}(${o}, ${s}).test(${r})`),()=>e.assign(u,!1)),t.fail$data((0,qc._)`!${u}`)}else{let l=(0,eae.usePattern)(t,i);t.fail$data((0,qc._)`!${l}.test(${r})`)}}};II.default=nae});var QN=b($I=>{"use strict";Object.defineProperty($I,"__esModule",{value:!0});var sp=Ue(),iae={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,sp.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,sp._)`{limit: ${t}}`},oae={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:iae,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?sp.operators.GT:sp.operators.LT;t.fail$data((0,sp._)`Object.keys(${r}).length ${i} ${n}`)}};$I.default=oae});var ej=b(PI=>{"use strict";Object.defineProperty(PI,"__esModule",{value:!0});var lp=Yn(),cp=Ue(),aae=rt(),sae={message:({params:{missingProperty:t}})=>(0,cp.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,cp._)`{missingProperty: ${t}}`},lae={keyword:"required",type:"object",schemaType:"array",$data:!0,error:sae,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:o,it:a}=t,{opts:s}=a;if(!o&&r.length===0)return;let l=r.length>=s.loopRequired;if(a.allErrors?c():u(),s.strictRequired){let p=t.parentSchema.properties,{definedProperties:h}=t.it;for(let m of r)if((p==null?void 0:p[m])===void 0&&!h.has(m)){let y=a.schemaEnv.baseId+a.errSchemaPath,g=`required property "${m}" is not defined at "${y}" (strictRequired)`;(0,aae.checkStrictMode)(a,g,a.opts.strictRequired)}}function c(){if(l||o)t.block$data(cp.nil,d);else for(let p of r)(0,lp.checkReportMissingProp)(t,p)}function u(){let p=e.let("missing");if(l||o){let h=e.let("valid",!0);t.block$data(h,()=>f(p,h)),t.ok(h)}else e.if((0,lp.checkMissingProp)(t,r,p)),(0,lp.reportMissingProp)(t,p),e.else()}function d(){e.forOf("prop",n,p=>{t.setParams({missingProperty:p}),e.if((0,lp.noPropertyInData)(e,i,p,s.ownProperties),()=>t.error())})}function f(p,h){t.setParams({missingProperty:p}),e.forOf(p,n,()=>{e.assign(h,(0,lp.propertyInData)(e,i,p,s.ownProperties)),e.if((0,cp.not)(h),()=>{t.error(),e.break()})},cp.nil)}}};PI.default=lae});var tj=b(TI=>{"use strict";Object.defineProperty(TI,"__esModule",{value:!0});var up=Ue(),cae={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,up.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,up._)`{limit: ${t}}`},uae={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:cae,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?up.operators.GT:up.operators.LT;t.fail$data((0,up._)`${r}.length ${i} ${n}`)}};TI.default=uae});var K0=b(AI=>{"use strict";Object.defineProperty(AI,"__esModule",{value:!0});var rj=Kf();rj.code='require("ajv/dist/runtime/equal").default';AI.default=rj});var nj=b(CI=>{"use strict";Object.defineProperty(CI,"__esModule",{value:!0});var kI=Jf(),wr=Ue(),dae=rt(),fae=K0(),pae={message:({params:{i:t,j:e}})=>(0,wr.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,wr._)`{i: ${t}, j: ${e}}`},hae={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:pae,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:s}=t;if(!n&&!i)return;let l=e.let("valid"),c=o.items?(0,kI.getSchemaTypes)(o.items):[];t.block$data(l,u,(0,wr._)`${a} === false`),t.ok(l);function u(){let h=e.let("i",(0,wr._)`${r}.length`),m=e.let("j");t.setParams({i:h,j:m}),e.assign(l,!0),e.if((0,wr._)`${h} > 1`,()=>(d()?f:p)(h,m))}function d(){return c.length>0&&!c.some(h=>h==="object"||h==="array")}function f(h,m){let y=e.name("item"),g=(0,kI.checkDataTypes)(c,y,s.opts.strictNumbers,kI.DataType.Wrong),v=e.const("indices",(0,wr._)`{}`);e.for((0,wr._)`;${h}--;`,()=>{e.let(y,(0,wr._)`${r}[${h}]`),e.if(g,(0,wr._)`continue`),c.length>1&&e.if((0,wr._)`typeof ${y} == "string"`,(0,wr._)`${y} += "_"`),e.if((0,wr._)`typeof ${v}[${y}] == "number"`,()=>{e.assign(m,(0,wr._)`${v}[${y}]`),t.error(),e.assign(l,!1).break()}).code((0,wr._)`${v}[${y}] = ${h}`)})}function p(h,m){let y=(0,dae.useFunc)(e,fae.default),g=e.name("outer");e.label(g).for((0,wr._)`;${h}--;`,()=>e.for((0,wr._)`${m} = ${h}; ${m}--;`,()=>e.if((0,wr._)`${y}(${r}[${h}], ${r}[${m}])`,()=>{t.error(),e.assign(l,!1).break(g)})))}}};CI.default=hae});var ij=b(DI=>{"use strict";Object.defineProperty(DI,"__esModule",{value:!0});var RI=Ue(),mae=rt(),gae=K0(),yae={message:"must be equal to constant",params:({schemaCode:t})=>(0,RI._)`{allowedValue: ${t}}`},_ae={keyword:"const",$data:!0,error:yae,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,RI._)`!${(0,mae.useFunc)(e,gae.default)}(${r}, ${i})`):t.fail((0,RI._)`${o} !== ${r}`)}};DI.default=_ae});var oj=b(OI=>{"use strict";Object.defineProperty(OI,"__esModule",{value:!0});var dp=Ue(),vae=rt(),bae=K0(),wae={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,dp._)`{allowedValues: ${t}}`},xae={keyword:"enum",schemaType:"array",$data:!0,error:wae,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:a}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let s=i.length>=a.opts.loopEnum,l,c=()=>l??(l=(0,vae.useFunc)(e,bae.default)),u;if(s||n)u=e.let("valid"),t.block$data(u,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let p=e.const("vSchema",o);u=(0,dp.or)(...i.map((h,m)=>f(p,m)))}t.pass(u);function d(){e.assign(u,!1),e.forOf("v",o,p=>e.if((0,dp._)`${c()}(${r}, ${p})`,()=>e.assign(u,!0).break()))}function f(p,h){let m=i[h];return typeof m=="object"&&m!==null?(0,dp._)`${c()}(${r}, ${p}[${h}])`:(0,dp._)`${r} === ${m}`}}};OI.default=xae});var aj=b(MI=>{"use strict";Object.defineProperty(MI,"__esModule",{value:!0});var Sae=GN(),Eae=WN(),Iae=YN(),$ae=XN(),Pae=QN(),Tae=ej(),Aae=tj(),kae=nj(),Cae=ij(),Rae=oj(),Dae=[Sae.default,Eae.default,Iae.default,$ae.default,Pae.default,Tae.default,Aae.default,kae.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Cae.default,Rae.default];MI.default=Dae});var jI=b(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});fp.validateAdditionalItems=void 0;var Js=Ue(),NI=rt(),Oae={message:({params:{len:t}})=>(0,Js.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Js._)`{limit: ${t}}`},Mae={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Oae,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,NI.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}sj(t,n)}};function sj(t,e){let{gen:r,schema:n,data:i,keyword:o,it:a}=t;a.items=!0;let s=r.const("len",(0,Js._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Js._)`${s} <= ${e.length}`);else if(typeof n=="object"&&!(0,NI.alwaysValidSchema)(a,n)){let c=r.var("valid",(0,Js._)`${s} <= ${e.length}`);r.if((0,Js.not)(c),()=>l(c)),t.ok(c)}function l(c){r.forRange("i",e.length,s,u=>{t.subschema({keyword:o,dataProp:u,dataPropType:NI.Type.Num},c),a.allErrors||r.if((0,Js.not)(c),()=>r.break())})}}fp.validateAdditionalItems=sj;fp.default=Mae});var zI=b(pp=>{"use strict";Object.defineProperty(pp,"__esModule",{value:!0});pp.validateTuple=void 0;var lj=Ue(),Y0=rt(),Nae=Yn(),jae={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return cj(t,"additionalItems",e);r.items=!0,!(0,Y0.alwaysValidSchema)(r,e)&&t.ok((0,Nae.validateArray)(t))}};function cj(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:s}=t;u(i),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=Y0.mergeEvaluated.items(n,r.length,s.items));let l=n.name("valid"),c=n.const("len",(0,lj._)`${o}.length`);r.forEach((d,f)=>{(0,Y0.alwaysValidSchema)(s,d)||(n.if((0,lj._)`${c} > ${f}`,()=>t.subschema({keyword:a,schemaProp:f,dataProp:f},l)),t.ok(l))});function u(d){let{opts:f,errSchemaPath:p}=s,h=r.length,m=h===d.minItems&&(h===d.maxItems||d[e]===!1);if(f.strictTuples&&!m){let y=`"${a}" is ${h}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,Y0.checkStrictMode)(s,y,f.strictTuples)}}}pp.validateTuple=cj;pp.default=jae});var uj=b(LI=>{"use strict";Object.defineProperty(LI,"__esModule",{value:!0});var zae=zI(),Lae={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,zae.validateTuple)(t,"items")};LI.default=Lae});var fj=b(FI=>{"use strict";Object.defineProperty(FI,"__esModule",{value:!0});var dj=Ue(),Fae=rt(),Bae=Yn(),Uae=jI(),qae={message:({params:{len:t}})=>(0,dj.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,dj._)`{limit: ${t}}`},Zae={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:qae,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,Fae.alwaysValidSchema)(n,e)&&(i?(0,Uae.validateAdditionalItems)(t,i):t.ok((0,Bae.validateArray)(t)))}};FI.default=Zae});var pj=b(BI=>{"use strict";Object.defineProperty(BI,"__esModule",{value:!0});var Qn=Ue(),X0=rt(),Hae={message:({params:{min:t,max:e}})=>e===void 0?(0,Qn.str)`must contain at least ${t} valid item(s)`:(0,Qn.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Qn._)`{minContains: ${t}}`:(0,Qn._)`{minContains: ${t}, maxContains: ${e}}`},Vae={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Hae,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,a,s,{minContains:l,maxContains:c}=n;o.opts.next?(a=l===void 0?1:l,s=c):a=1;let u=e.const("len",(0,Qn._)`${i}.length`);if(t.setParams({min:a,max:s}),s===void 0&&a===0){(0,X0.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,X0.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,X0.alwaysValidSchema)(o,r)){let m=(0,Qn._)`${u} >= ${a}`;s!==void 0&&(m=(0,Qn._)`${m} && ${u} <= ${s}`),t.pass(m);return}o.items=!0;let d=e.name("valid");s===void 0&&a===1?p(d,()=>e.if(d,()=>e.break())):a===0?(e.let(d,!0),s!==void 0&&e.if((0,Qn._)`${i}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let m=e.name("_valid"),y=e.let("count",0);p(m,()=>e.if(m,()=>h(y)))}function p(m,y){e.forRange("i",0,u,g=>{t.subschema({keyword:"contains",dataProp:g,dataPropType:X0.Type.Num,compositeRule:!0},m),y()})}function h(m){e.code((0,Qn._)`${m}++`),s===void 0?e.if((0,Qn._)`${m} >= ${a}`,()=>e.assign(d,!0).break()):(e.if((0,Qn._)`${m} > ${s}`,()=>e.assign(d,!1).break()),a===1?e.assign(d,!0):e.if((0,Qn._)`${m} >= ${a}`,()=>e.assign(d,!0)))}}};BI.default=Vae});var gj=b(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.validateSchemaDeps=Gi.validatePropertyDeps=Gi.error=void 0;var UI=Ue(),Gae=rt(),hp=Yn();Gi.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,UI.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,UI._)`{property: ${t},
|
|
10
|
+
|| ${a} === "boolean" || ${i} === null`).assign(s,(0,Re._)`[${i}]`)}}}function Pne({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,Re._)`${e} !== undefined`,()=>t.assign((0,Re._)`${e}[${r}]`,n))}function G1(t,e,r,n=jc.Correct){let i=n===jc.Correct?Re.operators.EQ:Re.operators.NEQ,o;switch(t){case"null":return(0,Re._)`${e} ${i} null`;case"array":o=(0,Re._)`Array.isArray(${e})`;break;case"object":o=(0,Re._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=a((0,Re._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=a();break;default:return(0,Re._)`typeof ${e} ${i} ${t}`}return n===jc.Correct?o:(0,Re.not)(o);function a(s=Re.nil){return(0,Re.and)((0,Re._)`typeof ${e} == "number"`,s,r?(0,Re._)`isFinite(${e})`:Re.nil)}}Mr.checkDataType=G1;function W1(t,e,r,n){if(t.length===1)return G1(t[0],e,r,n);let i,o=(0,LM.toHash)(t);if(o.array&&o.object){let a=(0,Re._)`typeof ${e} != "object"`;i=o.null?a:(0,Re._)`!${e} || ${a}`,delete o.null,delete o.array,delete o.object}else i=Re.nil;o.number&&delete o.integer;for(let a in o)i=(0,Re.and)(i,G1(a,e,r,n));return i}Mr.checkDataTypes=W1;var Tne={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Re._)`{type: ${t}}`:(0,Re._)`{type: ${e}}`};function J1(t){let e=Ane(t);(0,xne.reportError)(e,Tne)}Mr.reportTypeError=J1;function Ane(t){let{gen:e,data:r,schema:n}=t,i=(0,LM.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var qM=b(O0=>{"use strict";Object.defineProperty(O0,"__esModule",{value:!0});O0.assignDefaults=void 0;var zc=Ue(),kne=rt();function Cne(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)UM(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>UM(t,o,i.default))}O0.assignDefaults=Cne;function UM(t,e,r){let{gen:n,compositeRule:i,data:o,opts:a}=t;if(r===void 0)return;let s=(0,zc._)`${o}${(0,zc.getProperty)(e)}`;if(i){(0,kne.checkStrictMode)(t,`default is ignored for: ${s}`);return}let l=(0,zc._)`${s} === undefined`;a.useDefaults==="empty"&&(l=(0,zc._)`${l} || ${s} === null || ${s} === ""`),n.if(l,(0,zc._)`${s} = ${(0,zc.stringify)(r)}`)}});var Yn=b(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.validateUnion=wt.validateArray=wt.usePattern=wt.callValidateCode=wt.schemaProperties=wt.allSchemaProperties=wt.noPropertyInData=wt.propertyInData=wt.isOwnProperty=wt.hasPropFunc=wt.reportMissingProp=wt.checkMissingProp=wt.checkReportMissingProp=void 0;var Mt=Ue(),K1=rt(),Sa=Mo(),Rne=rt();function Dne(t,e){let{gen:r,data:n,it:i}=t;r.if(X1(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Mt._)`${e}`},!0),t.error()})}wt.checkReportMissingProp=Dne;function One({gen:t,data:e,it:{opts:r}},n,i){return(0,Mt.or)(...n.map(o=>(0,Mt.and)(X1(t,e,o,r.ownProperties),(0,Mt._)`${i} = ${o}`)))}wt.checkMissingProp=One;function Mne(t,e){t.setParams({missingProperty:e},!0),t.error()}wt.reportMissingProp=Mne;function ZM(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Mt._)`Object.prototype.hasOwnProperty`})}wt.hasPropFunc=ZM;function Y1(t,e,r){return(0,Mt._)`${ZM(t)}.call(${e}, ${r})`}wt.isOwnProperty=Y1;function Nne(t,e,r,n){let i=(0,Mt._)`${e}${(0,Mt.getProperty)(r)} !== undefined`;return n?(0,Mt._)`${i} && ${Y1(t,e,r)}`:i}wt.propertyInData=Nne;function X1(t,e,r,n){let i=(0,Mt._)`${e}${(0,Mt.getProperty)(r)} === undefined`;return n?(0,Mt.or)(i,(0,Mt.not)(Y1(t,e,r))):i}wt.noPropertyInData=X1;function HM(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}wt.allSchemaProperties=HM;function jne(t,e){return HM(e).filter(r=>!(0,K1.alwaysValidSchema)(t,e[r]))}wt.schemaProperties=jne;function zne({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},s,l,c){let u=c?(0,Mt._)`${t}, ${e}, ${n}${i}`:e,d=[[Sa.default.instancePath,(0,Mt.strConcat)(Sa.default.instancePath,o)],[Sa.default.parentData,a.parentData],[Sa.default.parentDataProperty,a.parentDataProperty],[Sa.default.rootData,Sa.default.rootData]];a.opts.dynamicRef&&d.push([Sa.default.dynamicAnchors,Sa.default.dynamicAnchors]);let f=(0,Mt._)`${u}, ${r.object(...d)}`;return l!==Mt.nil?(0,Mt._)`${s}.call(${l}, ${f})`:(0,Mt._)`${s}(${f})`}wt.callValidateCode=zne;var Lne=(0,Mt._)`new RegExp`;function Fne({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(r,n);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,Mt._)`${i.code==="new RegExp"?Lne:(0,Rne.useFunc)(t,i)}(${r}, ${n})`})}wt.usePattern=Fne;function Bne(t){let{gen:e,data:r,keyword:n,it:i}=t,o=e.name("valid");if(i.allErrors){let s=e.let("valid",!0);return a(()=>e.assign(s,!1)),s}return e.var(o,!0),a(()=>e.break()),o;function a(s){let l=e.const("len",(0,Mt._)`${r}.length`);e.forRange("i",0,l,c=>{t.subschema({keyword:n,dataProp:c,dataPropType:K1.Type.Num},o),e.if((0,Mt.not)(o),s)})}}wt.validateArray=Bne;function Une(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(l=>(0,K1.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let a=e.let("valid",!1),s=e.name("_valid");e.block(()=>r.forEach((l,c)=>{let u=t.subschema({keyword:n,schemaProp:c,compositeRule:!0},s);e.assign(a,(0,Mt._)`${a} || ${s}`),t.mergeValidEvaluated(u,s)||e.if((0,Mt.not)(a))})),t.result(a,()=>t.reset(),()=>t.error(!0))}wt.validateUnion=Une});var WM=b(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.validateKeywordUsage=Zi.validSchemaType=Zi.funcKeywordCode=Zi.macroKeywordCode=void 0;var rn=Ue(),Hs=Mo(),qne=Yn(),Zne=Wf();function Hne(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=t,s=e.macro.call(a.self,i,o,a),l=GM(r,n,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let c=r.name("valid");t.subschema({schema:s,schemaPath:rn.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:!0},c),t.pass(c,()=>t.error(!0))}Zi.macroKeywordCode=Hne;function Vne(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:s,it:l}=t;Wne(l,e);let c=!s&&e.compile?e.compile.call(l.self,o,a,l):e.validate,u=GM(n,i,c),d=n.let("valid");t.block$data(d,f),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function f(){if(e.errors===!1)m(),e.modifying&&VM(t),y(()=>t.error());else{let g=e.async?p():h();e.modifying&&VM(t),y(()=>Gne(t,g))}}function p(){let g=n.let("ruleErrs",null);return n.try(()=>m((0,rn._)`await `),v=>n.assign(d,!1).if((0,rn._)`${v} instanceof ${l.ValidationError}`,()=>n.assign(g,(0,rn._)`${v}.errors`),()=>n.throw(v))),g}function h(){let g=(0,rn._)`${u}.errors`;return n.assign(g,null),m(rn.nil),g}function m(g=e.async?(0,rn._)`await `:rn.nil){let v=l.opts.passContext?Hs.default.this:Hs.default.self,E=!("compile"in e&&!s||e.schema===!1);n.assign(d,(0,rn._)`${g}${(0,qne.callValidateCode)(t,u,v,E)}`,e.modifying)}function y(g){var v;n.if((0,rn.not)((v=e.valid)!==null&&v!==void 0?v:d),g)}}Zi.funcKeywordCode=Vne;function VM(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,rn._)`${n.parentData}[${n.parentDataProperty}]`))}function Gne(t,e){let{gen:r}=t;r.if((0,rn._)`Array.isArray(${e})`,()=>{r.assign(Hs.default.vErrors,(0,rn._)`${Hs.default.vErrors} === null ? ${e} : ${Hs.default.vErrors}.concat(${e})`).assign(Hs.default.errors,(0,rn._)`${Hs.default.vErrors}.length`),(0,Zne.extendErrors)(t)},()=>t.error())}function Wne({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function GM(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,rn.stringify)(r)})}function Jne(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}Zi.validSchemaType=Jne;function Kne({schema:t,opts:e,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let a=i.dependencies;if(a!=null&&a.some(s=>!Object.prototype.hasOwnProperty.call(t,s)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let l=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(l);else throw new Error(l)}}Zi.validateKeywordUsage=Kne});var KM=b(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.extendSubschemaMode=Ea.extendSubschemaData=Ea.getSubschema=void 0;var Hi=Ue(),JM=rt();function Yne(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let s=t.schema[e];return r===void 0?{schema:s,schemaPath:(0,Hi._)`${t.schemaPath}${(0,Hi.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,Hi._)`${t.schemaPath}${(0,Hi.getProperty)(e)}${(0,Hi.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,JM.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Ea.getSubschema=Yne;function Xne(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=e;if(r!==void 0){let{errorPath:c,dataPathArr:u,opts:d}=e,f=s.let("data",(0,Hi._)`${e.data}${(0,Hi.getProperty)(r)}`,!0);l(f),t.errorPath=(0,Hi.str)`${c}${(0,JM.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,Hi._)`${r}`,t.dataPathArr=[...u,t.parentDataProperty]}if(i!==void 0){let c=i instanceof Hi.Name?i:s.let("data",i,!0);l(c),a!==void 0&&(t.propertyName=a)}o&&(t.dataTypes=o);function l(c){t.data=c,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,c]}}Ea.extendSubschemaData=Xne;function Qne(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}Ea.extendSubschemaMode=Qne});var Kf=b((uFe,YM)=>{"use strict";YM.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r}});var QM=b((dFe,XM)=>{"use strict";var Ia=XM.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};M0(e,n,i,t,"",t)};Ia.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Ia.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Ia.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Ia.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 M0(t,e,r,n,i,o,a,s,l,c){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,a,s,l,c);for(var u in n){var d=n[u];if(Array.isArray(d)){if(u in Ia.arrayKeywords)for(var f=0;f<d.length;f++)M0(t,e,r,d[f],i+"/"+u+"/"+f,o,i,u,n,f)}else if(u in Ia.propsKeywords){if(d&&typeof d=="object")for(var p in d)M0(t,e,r,d[p],i+"/"+u+"/"+eie(p),o,i,u,n,p)}else(u in Ia.keywords||t.allKeys&&!(u in Ia.skipKeywords))&&M0(t,e,r,d,i+"/"+u,o,i,u,n)}r(n,i,o,a,s,l,c)}}function eie(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Yf=b(mn=>{"use strict";Object.defineProperty(mn,"__esModule",{value:!0});mn.getSchemaRefs=mn.resolveUrl=mn.normalizeId=mn._getFullPath=mn.getFullPath=mn.inlineRef=void 0;var tie=rt(),rie=Kf(),nie=QM(),iie=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function oie(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Q1(t):e?eN(t)<=e:!1}mn.inlineRef=oie;var aie=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Q1(t){for(let e in t){if(aie.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Q1)||typeof r=="object"&&Q1(r))return!0}return!1}function eN(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!iie.has(r)&&(typeof t[r]=="object"&&(0,tie.eachItem)(t[r],n=>e+=eN(n)),e===1/0))return 1/0}return e}function tN(t,e="",r){r!==!1&&(e=Lc(e));let n=t.parse(e);return rN(t,n)}mn.getFullPath=tN;function rN(t,e){return t.serialize(e).split("#")[0]+"#"}mn._getFullPath=rN;var sie=/#\/?$/;function Lc(t){return t?t.replace(sie,""):""}mn.normalizeId=Lc;function lie(t,e,r){return r=Lc(r),t.resolve(e,r)}mn.resolveUrl=lie;var cie=/^[a-z_][-a-z0-9._]*$/i;function uie(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=Lc(t[r]||e),o={"":i},a=tN(n,i,!1),s={},l=new Set;return nie(t,{allKeys:!0},(d,f,p,h)=>{if(h===void 0)return;let m=a+f,y=o[h];typeof d[r]=="string"&&(y=g.call(this,d[r])),v.call(this,d.$anchor),v.call(this,d.$dynamicAnchor),o[f]=y;function g(E){let x=this.opts.uriResolver.resolve;if(E=Lc(y?x(y,E):E),l.has(E))throw u(E);l.add(E);let w=this.refs[E];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?c(d,w.schema,E):E!==Lc(m)&&(E[0]==="#"?(c(d,s[E],E),s[E]=d):this.refs[E]=m),E}function v(E){if(typeof E=="string"){if(!cie.test(E))throw new Error(`invalid anchor "${E}"`);g.call(this,`#${E}`)}}}),s;function c(d,f,p){if(f!==void 0&&!rie(d,f))throw u(p)}function u(d){return new Error(`reference "${d}" resolves to more than one schema`)}}mn.getSchemaRefs=uie});var ep=b($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});$a.getData=$a.KeywordCxt=$a.validateFunctionCode=void 0;var sN=NM(),nN=Jf(),tI=V1(),N0=Jf(),die=qM(),Qf=WM(),eI=KM(),de=Ue(),Ie=Mo(),fie=Yf(),No=rt(),Xf=Wf();function pie(t){if(uN(t)&&(dN(t),cN(t))){gie(t);return}lN(t,()=>(0,sN.topBoolOrEmptySchema)(t))}$a.validateFunctionCode=pie;function lN({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,de._)`${Ie.default.data}, ${Ie.default.valCxt}`,n.$async,()=>{t.code((0,de._)`"use strict"; ${iN(r,i)}`),mie(t,i),t.code(o)}):t.func(e,(0,de._)`${Ie.default.data}, ${hie(i)}`,n.$async,()=>t.code(iN(r,i)).code(o))}function hie(t){return(0,de._)`{${Ie.default.instancePath}="", ${Ie.default.parentData}, ${Ie.default.parentDataProperty}, ${Ie.default.rootData}=${Ie.default.data}${t.dynamicRef?(0,de._)`, ${Ie.default.dynamicAnchors}={}`:de.nil}}={}`}function mie(t,e){t.if(Ie.default.valCxt,()=>{t.var(Ie.default.instancePath,(0,de._)`${Ie.default.valCxt}.${Ie.default.instancePath}`),t.var(Ie.default.parentData,(0,de._)`${Ie.default.valCxt}.${Ie.default.parentData}`),t.var(Ie.default.parentDataProperty,(0,de._)`${Ie.default.valCxt}.${Ie.default.parentDataProperty}`),t.var(Ie.default.rootData,(0,de._)`${Ie.default.valCxt}.${Ie.default.rootData}`),e.dynamicRef&&t.var(Ie.default.dynamicAnchors,(0,de._)`${Ie.default.valCxt}.${Ie.default.dynamicAnchors}`)},()=>{t.var(Ie.default.instancePath,(0,de._)`""`),t.var(Ie.default.parentData,(0,de._)`undefined`),t.var(Ie.default.parentDataProperty,(0,de._)`undefined`),t.var(Ie.default.rootData,Ie.default.data),e.dynamicRef&&t.var(Ie.default.dynamicAnchors,(0,de._)`{}`)})}function gie(t){let{schema:e,opts:r,gen:n}=t;lN(t,()=>{r.$comment&&e.$comment&&pN(t),wie(t),n.let(Ie.default.vErrors,null),n.let(Ie.default.errors,0),r.unevaluated&&yie(t),fN(t),Eie(t)})}function yie(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,de._)`${r}.evaluated`),e.if((0,de._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,de._)`${t.evaluated}.props`,(0,de._)`undefined`)),e.if((0,de._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,de._)`${t.evaluated}.items`,(0,de._)`undefined`))}function iN(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,de._)`/*# sourceURL=${r} */`:de.nil}function _ie(t,e){if(uN(t)&&(dN(t),cN(t))){vie(t,e);return}(0,sN.boolOrEmptySchema)(t,e)}function cN({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function uN(t){return typeof t.schema!="boolean"}function vie(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&pN(t),xie(t),Sie(t);let o=n.const("_errs",Ie.default.errors);fN(t,o),n.var(e,(0,de._)`${o} === ${Ie.default.errors}`)}function dN(t){(0,No.checkUnknownRules)(t),bie(t)}function fN(t,e){if(t.opts.jtd)return oN(t,[],!1,e);let r=(0,nN.getSchemaTypes)(t.schema),n=(0,nN.coerceAndCheckDataType)(t,r);oN(t,r,!n,e)}function bie(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,No.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function wie(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,No.checkStrictMode)(t,"default is ignored in the schema root")}function xie(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,fie.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Sie(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function pN({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,de._)`${Ie.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,de.str)`${n}/$comment`,s=t.scopeValue("root",{ref:e.root});t.code((0,de._)`${Ie.default.self}.opts.$comment(${o}, ${a}, ${s}.schema)`)}}function Eie(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,de._)`${Ie.default.errors} === 0`,()=>e.return(Ie.default.data),()=>e.throw((0,de._)`new ${i}(${Ie.default.vErrors})`)):(e.assign((0,de._)`${n}.errors`,Ie.default.vErrors),o.unevaluated&&Iie(t),e.return((0,de._)`${Ie.default.errors} === 0`))}function Iie({gen:t,evaluated:e,props:r,items:n}){r instanceof de.Name&&t.assign((0,de._)`${e}.props`,r),n instanceof de.Name&&t.assign((0,de._)`${e}.items`,n)}function oN(t,e,r,n){let{gen:i,schema:o,data:a,allErrors:s,opts:l,self:c}=t,{RULES:u}=c;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,No.schemaHasRulesButRef)(o,u))){i.block(()=>mN(t,"$ref",u.all.$ref.definition));return}l.jtd||$ie(t,e),i.block(()=>{for(let f of u.rules)d(f);d(u.post)});function d(f){(0,tI.shouldUseGroup)(o,f)&&(f.type?(i.if((0,N0.checkDataType)(f.type,a,l.strictNumbers)),aN(t,f),e.length===1&&e[0]===f.type&&r&&(i.else(),(0,N0.reportTypeError)(t)),i.endIf()):aN(t,f),s||i.if((0,de._)`${Ie.default.errors} === ${n||0}`))}}function aN(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,die.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,tI.shouldUseRule)(n,o)&&mN(t,o.keyword,o.definition,e.type)})}function $ie(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(Pie(t,e),t.opts.allowUnionTypes||Tie(t,e),Aie(t,t.dataTypes))}function Pie(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{hN(t.dataTypes,r)||rI(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),Cie(t,e)}}function Tie(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&rI(t,"use allowUnionTypes to allow union type keyword")}function Aie(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,tI.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>kie(e,a))&&rI(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function kie(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function hN(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function Cie(t,e){let r=[];for(let n of t.dataTypes)hN(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function rI(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,No.checkStrictMode)(t,e,t.opts.strictTypes)}var j0=class{constructor(e,r,n){if((0,Qf.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,No.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",gN(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Qf.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",Ie.default.errors))}result(e,r,n){this.failResult((0,de.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,de.not)(e),void 0,r)}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:r}=this;this.fail((0,de._)`${r} !== undefined && (${(0,de.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Xf.reportExtraError:Xf.reportError)(this,this.def.error,r)}$dataError(){(0,Xf.reportError)(this,this.def.$dataError||Xf.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Xf.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=de.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=de.nil,r=de.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,de.or)((0,de._)`${i} === undefined`,r)),e!==de.nil&&n.assign(e,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==de.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,de.or)(a(),s());function a(){if(n.length){if(!(r instanceof de.Name))throw new Error("ajv implementation error");let l=Array.isArray(n)?n:[n];return(0,de._)`${(0,N0.checkDataTypes)(l,r,o.opts.strictNumbers,N0.DataType.Wrong)}`}return de.nil}function s(){if(i.validateSchema){let l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,de._)`!${l}(${r})`}return de.nil}}subschema(e,r){let n=(0,eI.getSubschema)(this.it,e);(0,eI.extendSubschemaData)(n,this.it,e),(0,eI.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return _ie(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=No.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=No.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,de.Name)),!0}};$a.KeywordCxt=j0;function mN(t,e,r,n){let i=new j0(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Qf.funcKeywordCode)(i,r):"macro"in r?(0,Qf.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Qf.funcKeywordCode)(i,r)}var Rie=/^\/(?:[^~]|~0|~1)*$/,Die=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function gN(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return Ie.default.rootData;if(t[0]==="/"){if(!Rie.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=Ie.default.rootData}else{let c=Die.exec(t);if(!c)throw new Error(`Invalid JSON-pointer: ${t}`);let u=+c[1];if(i=c[2],i==="#"){if(u>=e)throw new Error(l("property/index",u));return n[e-u]}if(u>e)throw new Error(l("data",u));if(o=r[e-u],!i)return o}let a=o,s=i.split("/");for(let c of s)c&&(o=(0,de._)`${o}${(0,de.getProperty)((0,No.unescapeJsonPointer)(c))}`,a=(0,de._)`${a} && ${o}`);return a;function l(c,u){return`Cannot access ${c} ${u} levels up, current level is ${e}`}}$a.getData=gN});var z0=b(iI=>{"use strict";Object.defineProperty(iI,"__esModule",{value:!0});var nI=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};iI.default=nI});var tp=b(sI=>{"use strict";Object.defineProperty(sI,"__esModule",{value:!0});var oI=Yf(),aI=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,oI.resolveUrl)(e,r,n),this.missingSchema=(0,oI.normalizeId)((0,oI.getFullPath)(e,this.missingRef))}};sI.default=aI});var F0=b(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.resolveSchema=Xn.getCompilingSchema=Xn.resolveRef=Xn.compileSchema=Xn.SchemaEnv=void 0;var xi=Ue(),Oie=z0(),Vs=Mo(),Si=Yf(),yN=rt(),Mie=ep(),Fc=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,Si.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};Xn.SchemaEnv=Fc;function cI(t){let e=_N.call(this,t);if(e)return e;let r=(0,Si.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new xi.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),s;t.$async&&(s=a.scopeValue("Error",{ref:Oie.default,code:(0,xi._)`require("ajv/dist/runtime/validation_error").default`}));let l=a.scopeName("validate");t.validateName=l;let c={gen:a,allErrors:this.opts.allErrors,data:Vs.default.data,parentData:Vs.default.parentData,parentDataProperty:Vs.default.parentDataProperty,dataNames:[Vs.default.data],dataPathArr:[xi.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,xi.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:xi.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,xi._)`""`,opts:this.opts,self:this},u;try{this._compilations.add(t),(0,Mie.validateFunctionCode)(c),a.optimize(this.opts.code.optimize);let d=a.toString();u=`${a.scopeRefs(Vs.default.scope)}return ${d}`,this.opts.code.process&&(u=this.opts.code.process(u,t));let p=new Function(`${Vs.default.self}`,`${Vs.default.scope}`,u)(this,this.scope.get());if(this.scope.value(l,{ref:p}),p.errors=null,p.schema=t.schema,p.schemaEnv=t,t.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:l,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:h,items:m}=c;p.evaluated={props:h instanceof xi.Name?void 0:h,items:m instanceof xi.Name?void 0:m,dynamicProps:h instanceof xi.Name,dynamicItems:m instanceof xi.Name},p.source&&(p.source.evaluated=(0,xi.stringify)(p.evaluated))}return t.validate=p,t}catch(d){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),d}finally{this._compilations.delete(t)}}Xn.compileSchema=cI;function Nie(t,e,r){var n;r=(0,Si.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=Lie.call(this,t,r);if(o===void 0){let a=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:s}=this.opts;a&&(o=new Fc({schema:a,schemaId:s,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=jie.call(this,o)}Xn.resolveRef=Nie;function jie(t){return(0,Si.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:cI.call(this,t)}function _N(t){for(let e of this._compilations)if(zie(e,t))return e}Xn.getCompilingSchema=_N;function zie(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Lie(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||L0.call(this,t,e)}function L0(t,e){let r=this.opts.uriResolver.parse(e),n=(0,Si._getFullPath)(this.opts.uriResolver,r),i=(0,Si.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return lI.call(this,r,t);let o=(0,Si.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let s=L0.call(this,t,a);return typeof(s==null?void 0:s.schema)!="object"?void 0:lI.call(this,r,s)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||cI.call(this,a),o===(0,Si.normalizeId)(e)){let{schema:s}=a,{schemaId:l}=this.opts,c=s[l];return c&&(i=(0,Si.resolveUrl)(this.opts.uriResolver,i,c)),new Fc({schema:s,schemaId:l,root:t,baseId:i})}return lI.call(this,r,a)}}Xn.resolveSchema=L0;var Fie=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function lI(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let s of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let l=r[(0,yN.unescapeFragment)(s)];if(l===void 0)return;r=l;let c=typeof r=="object"&&r[this.opts.schemaId];!Fie.has(s)&&c&&(e=(0,Si.resolveUrl)(this.opts.uriResolver,e,c))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,yN.schemaHasRulesButRef)(r,this.RULES)){let s=(0,Si.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=L0.call(this,n,s)}let{schemaId:a}=this.opts;if(o=o||new Fc({schema:r,schemaId:a,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var vN=b((yFe,Bie)=>{Bie.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 dI=b((_Fe,SN)=>{"use strict";var Uie=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),wN=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function uI(t){let e="",r=0,n=0;for(n=0;n<t.length;n++)if(r=t[n].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n];break}for(n+=1;n<t.length;n++){if(r=t[n].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";e+=t[n]}return e}var qie=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function bN(t){return t.length=0,!0}function Zie(t,e,r){if(t.length){let n=uI(t);if(n!=="")e.push(n);else return r.error=!0,!1;t.length=0}return!0}function Hie(t){let e=0,r={error:!1,address:"",zone:""},n=[],i=[],o=!1,a=!1,s=Zie;for(let l=0;l<t.length;l++){let c=t[l];if(!(c==="["||c==="]"))if(c===":"){if(o===!0&&(a=!0),!s(i,n,r))break;if(++e>7){r.error=!0;break}l>0&&t[l-1]===":"&&(o=!0),n.push(":");continue}else if(c==="%"){if(!s(i,n,r))break;s=bN}else{i.push(c);continue}}return i.length&&(s===bN?r.zone=i.join(""):a?n.push(i.join("")):n.push(uI(i))),r.address=n.join(""),r}function xN(t){if(Vie(t,":")<2)return{host:t,isIPV6:!1};let e=Hie(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,isIPV6:!0,escapedHost:n}}}function Vie(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}function Gie(t){let e=t,r=[],n=-1,i=0;for(;i=e.length;){if(i===1){if(e===".")break;if(e==="/"){r.push("/");break}else{r.push(e);break}}else if(i===2){if(e[0]==="."){if(e[1]===".")break;if(e[1]==="/"){e=e.slice(2);continue}}else if(e[0]==="/"&&(e[1]==="."||e[1]==="/")){r.push("/");break}}else if(i===3&&e==="/.."){r.length!==0&&r.pop(),r.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),r.length!==0&&r.pop();continue}}if((n=e.indexOf("/",1))===-1){r.push(e);break}else r.push(e.slice(0,n)),e=e.slice(n)}return r.join("")}function Wie(t,e){let r=e!==!0?escape:unescape;return t.scheme!==void 0&&(t.scheme=r(t.scheme)),t.userinfo!==void 0&&(t.userinfo=r(t.userinfo)),t.host!==void 0&&(t.host=r(t.host)),t.path!==void 0&&(t.path=r(t.path)),t.query!==void 0&&(t.query=r(t.query)),t.fragment!==void 0&&(t.fragment=r(t.fragment)),t}function Jie(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host);if(!wN(r)){let n=xN(r);n.isIPV6===!0?r=`[${n.escapedHost}]`:r=t.host}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}SN.exports={nonSimpleDomain:qie,recomposeAuthority:Jie,normalizeComponentEncoding:Wie,removeDotSegments:Gie,isIPv4:wN,isUUID:Uie,normalizeIPv6:xN,stringArrayToHexStripped:uI}});var TN=b((vFe,PN)=>{"use strict";var{isUUID:Kie}=dI(),Yie=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Xie=["http","https","ws","wss","urn","urn:uuid"];function Qie(t){return Xie.indexOf(t)!==-1}function fI(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 EN(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function IN(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 eoe(t){return t.secure=fI(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function toe(t){if((t.port===(fI(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,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function roe(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(Yie);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let i=`${n}:${e.nid||t.nid}`,o=pI(i);t.path=void 0,o&&(t=o.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function noe(t,e){if(t.nid===void 0)throw new Error("URN without nid cannot be serialized");let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),i=`${r}:${e.nid||n}`,o=pI(i);o&&(t=o.serialize(t,e));let a=t,s=t.nss;return a.path=`${n||e.nid}:${s}`,e.skipEscape=!0,a}function ioe(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!Kie(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function ooe(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var $N={scheme:"http",domainHost:!0,parse:EN,serialize:IN},aoe={scheme:"https",domainHost:$N.domainHost,parse:EN,serialize:IN},B0={scheme:"ws",domainHost:!0,parse:eoe,serialize:toe},soe={scheme:"wss",domainHost:B0.domainHost,parse:B0.parse,serialize:B0.serialize},loe={scheme:"urn",parse:roe,serialize:noe,skipNormalize:!0},coe={scheme:"urn:uuid",parse:ioe,serialize:ooe,skipNormalize:!0},U0={http:$N,https:aoe,ws:B0,wss:soe,urn:loe,"urn:uuid":coe};Object.setPrototypeOf(U0,null);function pI(t){return t&&(U0[t]||U0[t.toLowerCase()])||void 0}PN.exports={wsIsSecure:fI,SCHEMES:U0,isValidSchemeName:Qie,getSchemeHandler:pI}});var mI=b((bFe,Z0)=>{"use strict";var{normalizeIPv6:uoe,removeDotSegments:rp,recomposeAuthority:doe,normalizeComponentEncoding:q0,isIPv4:foe,nonSimpleDomain:poe}=dI(),{SCHEMES:hoe,getSchemeHandler:AN}=TN();function moe(t,e){return typeof t=="string"?t=Vi(jo(t,e),e):typeof t=="object"&&(t=jo(Vi(t,e),e)),t}function goe(t,e,r){let n=r?Object.assign({scheme:"null"},r):{scheme:"null"},i=kN(jo(t,n),jo(e,n),n,!0);return n.skipEscape=!0,Vi(i,n)}function kN(t,e,r,n){let i={};return n||(t=jo(Vi(t,r),r),e=jo(Vi(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(i.scheme=e.scheme,i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=rp(e.path||""),i.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(i.userinfo=e.userinfo,i.host=e.host,i.port=e.port,i.path=rp(e.path||""),i.query=e.query):(e.path?(e.path[0]==="/"?i.path=rp(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?i.path="/"+e.path:t.path?i.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:i.path=e.path,i.path=rp(i.path)),i.query=e.query):(i.path=t.path,e.query!==void 0?i.query=e.query:i.query=t.query),i.userinfo=t.userinfo,i.host=t.host,i.port=t.port),i.scheme=t.scheme),i.fragment=e.fragment,i}function yoe(t,e,r){return typeof t=="string"?(t=unescape(t),t=Vi(q0(jo(t,r),!0),{...r,skipEscape:!0})):typeof t=="object"&&(t=Vi(q0(t,!0),{...r,skipEscape:!0})),typeof e=="string"?(e=unescape(e),e=Vi(q0(jo(e,r),!0),{...r,skipEscape:!0})):typeof e=="object"&&(e=Vi(q0(e,!0),{...r,skipEscape:!0})),t.toLowerCase()===e.toLowerCase()}function Vi(t,e){let r={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:""},n=Object.assign({},e),i=[],o=AN(n.scheme||r.scheme);o&&o.serialize&&o.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&i.push(r.scheme,":");let a=doe(r);if(a!==void 0&&(n.reference!=="suffix"&&i.push("//"),i.push(a),r.path&&r.path[0]!=="/"&&i.push("/")),r.path!==void 0){let s=r.path;!n.absolutePath&&(!o||!o.absolutePath)&&(s=rp(s)),a===void 0&&s[0]==="/"&&s[1]==="/"&&(s="/%2F"+s.slice(2)),i.push(s)}return r.query!==void 0&&i.push("?",r.query),r.fragment!==void 0&&i.push("#",r.fragment),i.join("")}var _oe=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function jo(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},i=!1;r.reference==="suffix"&&(r.scheme?t=r.scheme+":"+t:t="//"+t);let o=t.match(_oe);if(o){if(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5]),n.host)if(foe(n.host)===!1){let l=uoe(n.host);n.host=l.host.toLowerCase(),i=l.isIPV6}else i=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let a=AN(r.scheme||n.scheme);if(!r.unicodeSupport&&(!a||!a.unicodeSupport)&&n.host&&(r.domainHost||a&&a.domainHost)&&i===!1&&poe(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(s){n.error=n.error||"Host's domain name can not be converted to ASCII: "+s}(!a||a&&!a.skipNormalize)&&(t.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=unescape(n.host))),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var hI={SCHEMES:hoe,normalize:moe,resolve:goe,resolveComponent:kN,equal:yoe,serialize:Vi,parse:jo};Z0.exports=hI;Z0.exports.default=hI;Z0.exports.fastUri=hI});var RN=b(gI=>{"use strict";Object.defineProperty(gI,"__esModule",{value:!0});var CN=mI();CN.code='require("ajv/dist/runtime/uri").default';gI.default=CN});var FN=b(br=>{"use strict";Object.defineProperty(br,"__esModule",{value:!0});br.CodeGen=br.Name=br.nil=br.stringify=br.str=br._=br.KeywordCxt=void 0;var voe=ep();Object.defineProperty(br,"KeywordCxt",{enumerable:!0,get:function(){return voe.KeywordCxt}});var Bc=Ue();Object.defineProperty(br,"_",{enumerable:!0,get:function(){return Bc._}});Object.defineProperty(br,"str",{enumerable:!0,get:function(){return Bc.str}});Object.defineProperty(br,"stringify",{enumerable:!0,get:function(){return Bc.stringify}});Object.defineProperty(br,"nil",{enumerable:!0,get:function(){return Bc.nil}});Object.defineProperty(br,"Name",{enumerable:!0,get:function(){return Bc.Name}});Object.defineProperty(br,"CodeGen",{enumerable:!0,get:function(){return Bc.CodeGen}});var boe=z0(),jN=tp(),woe=H1(),np=F0(),xoe=Ue(),ip=Yf(),H0=Jf(),_I=rt(),DN=vN(),Soe=RN(),zN=(t,e)=>new RegExp(t,e);zN.code="new RegExp";var Eoe=["removeAdditional","useDefaults","coerceTypes"],Ioe=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),$oe={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."},Poe={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},ON=200;function Toe(t){var e,r,n,i,o,a,s,l,c,u,d,f,p,h,m,y,g,v,E,x,w,k,P,R,T;let D=t.strict,A=(e=t.code)===null||e===void 0?void 0:e.optimize,M=A===!0||A===void 0?1:A||0,U=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:zN,z=(i=t.uriResolver)!==null&&i!==void 0?i:Soe.default;return{strictSchema:(a=(o=t.strictSchema)!==null&&o!==void 0?o:D)!==null&&a!==void 0?a:!0,strictNumbers:(l=(s=t.strictNumbers)!==null&&s!==void 0?s:D)!==null&&l!==void 0?l:!0,strictTypes:(u=(c=t.strictTypes)!==null&&c!==void 0?c:D)!==null&&u!==void 0?u:"log",strictTuples:(f=(d=t.strictTuples)!==null&&d!==void 0?d:D)!==null&&f!==void 0?f:"log",strictRequired:(h=(p=t.strictRequired)!==null&&p!==void 0?p:D)!==null&&h!==void 0?h:!1,code:t.code?{...t.code,optimize:M,regExp:U}:{optimize:M,regExp:U},loopRequired:(m=t.loopRequired)!==null&&m!==void 0?m:ON,loopEnum:(y=t.loopEnum)!==null&&y!==void 0?y:ON,meta:(g=t.meta)!==null&&g!==void 0?g:!0,messages:(v=t.messages)!==null&&v!==void 0?v:!0,inlineRefs:(E=t.inlineRefs)!==null&&E!==void 0?E:!0,schemaId:(x=t.schemaId)!==null&&x!==void 0?x:"$id",addUsedSchema:(w=t.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(k=t.validateSchema)!==null&&k!==void 0?k:!0,validateFormats:(P=t.validateFormats)!==null&&P!==void 0?P:!0,unicodeRegExp:(R=t.unicodeRegExp)!==null&&R!==void 0?R:!0,int32range:(T=t.int32range)!==null&&T!==void 0?T:!0,uriResolver:z}}var op=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Toe(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new xoe.ValueScope({scope:{},prefixes:Ioe,es5:r,lines:n}),this.logger=Ooe(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,woe.getRules)(),MN.call(this,$oe,e,"NOT SUPPORTED"),MN.call(this,Poe,e,"DEPRECATED","warn"),this._metaOpts=Roe.call(this),e.formats&&koe.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Coe.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Aoe.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=DN;n==="id"&&(i={...DN},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(u,d){await o.call(this,u.$schema);let f=this._addSchema(u,d);return f.validate||a.call(this,f)}async function o(u){u&&!this.getSchema(u)&&await i.call(this,{$ref:u},!0)}async function a(u){try{return this._compileSchemaEnv(u)}catch(d){if(!(d instanceof jN.default))throw d;return s.call(this,d),await l.call(this,d.missingSchema),a.call(this,u)}}function s({missingSchema:u,missingRef:d}){if(this.refs[u])throw new Error(`AnySchema ${u} is loaded but ${d} cannot be resolved`)}async function l(u){let d=await c.call(this,u);this.refs[u]||await o.call(this,d.$schema),this.refs[u]||this.addSchema(d,u,r)}async function c(u){let d=this._loading[u];if(d)return d;try{return await(this._loading[u]=n(u))}finally{delete this._loading[u]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,n,i);return this}let o;if(typeof e=="object"){let{schemaId:a}=this.opts;if(o=e[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,ip.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,e);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let r;for(;typeof(r=NN.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new np.SchemaEnv({schema:{},schemaId:n});if(r=np.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}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 r=NN.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,ip.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Noe.call(this,n,r),!r)return(0,_I.eachItem)(n,o=>yI.call(this,o)),this;zoe.call(this,r);let i={...r,type:(0,H0.getJSONTypes)(r.type),schemaType:(0,H0.getJSONTypes)(r.schemaType)};return(0,_I.eachItem)(n,i.type.length===0?o=>yI.call(this,o,i):o=>i.type.forEach(a=>yI.call(this,o,i,a))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let o=i.split("/").slice(1),a=e;for(let s of o)a=a[s];for(let s in n){let l=n[s];if(typeof l!="object")continue;let{$data:c}=l.definition,u=a[s];c&&u&&(a[s]=LN(u))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e=="object")a=e[s];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 l=this._cache.get(e);if(l!==void 0)return l;n=(0,ip.normalizeId)(a||n);let c=ip.getSchemaRefs.call(this,e,n);return l=new np.SchemaEnv({schema:e,schemaId:s,meta:r,baseId:n,localRefs:c}),this._cache.set(l.schema,l),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),i&&this.validateSchema(e,!0),l}_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):np.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{np.compileSchema.call(this,e)}finally{this.opts=r}}};op.ValidationError=boe.default;op.MissingRefError=jN.default;br.default=op;function MN(t,e,r,n="error"){for(let i in t){let o=i;o in e&&this.logger[n](`${r}: option ${i}. ${t[o]}`)}}function NN(t){return t=(0,ip.normalizeId)(t),this.schemas[t]||this.refs[t]}function Aoe(){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 koe(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Coe(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 r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Roe(){let t={...this.opts};for(let e of Eoe)delete t[e];return t}var Doe={log(){},warn(){},error(){}};function Ooe(t){if(t===!1)return Doe;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 Moe=/^[a-z_$][a-z0-9_$:-]*$/i;function Noe(t,e){let{RULES:r}=this;if((0,_I.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Moe.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function yI(t,e,r){var n;let i=e==null?void 0:e.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:l})=>l===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[t]=!0,!e)return;let s={keyword:t,definition:{...e,type:(0,H0.getJSONTypes)(e.type),schemaType:(0,H0.getJSONTypes)(e.schemaType)}};e.before?joe.call(this,a,s,e.before):a.rules.push(s),o.all[t]=s,(n=e.implements)===null||n===void 0||n.forEach(l=>this.addKeyword(l))}function joe(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function zoe(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=LN(e)),t.validateSchema=this.compile(e,!0))}var Loe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function LN(t){return{anyOf:[t,Loe]}}});var BN=b(vI=>{"use strict";Object.defineProperty(vI,"__esModule",{value:!0});var Foe={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};vI.default=Foe});var HN=b(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});Gs.callRef=Gs.getValidate=void 0;var Boe=tp(),UN=Yn(),gn=Ue(),Uc=Mo(),qN=F0(),V0=rt(),Uoe={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:a,opts:s,self:l}=n,{root:c}=o;if((r==="#"||r==="#/")&&i===c.baseId)return d();let u=qN.resolveRef.call(l,c,i,r);if(u===void 0)throw new Boe.default(n.opts.uriResolver,i,r);if(u instanceof qN.SchemaEnv)return f(u);return p(u);function d(){if(o===c)return G0(t,a,o,o.$async);let h=e.scopeValue("root",{ref:c});return G0(t,(0,gn._)`${h}.validate`,c,c.$async)}function f(h){let m=ZN(t,h);G0(t,m,h,h.$async)}function p(h){let m=e.scopeValue("schema",s.code.source===!0?{ref:h,code:(0,gn.stringify)(h)}:{ref:h}),y=e.name("valid"),g=t.subschema({schema:h,dataTypes:[],schemaPath:gn.nil,topSchemaRef:m,errSchemaPath:r},y);t.mergeEvaluated(g),t.ok(y)}}};function ZN(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,gn._)`${r.scopeValue("wrapper",{ref:e})}.validate`}Gs.getValidate=ZN;function G0(t,e,r,n){let{gen:i,it:o}=t,{allErrors:a,schemaEnv:s,opts:l}=o,c=l.passContext?Uc.default.this:gn.nil;n?u():d();function u(){if(!s.$async)throw new Error("async schema referenced by sync schema");let h=i.let("valid");i.try(()=>{i.code((0,gn._)`await ${(0,UN.callValidateCode)(t,e,c)}`),p(e),a||i.assign(h,!0)},m=>{i.if((0,gn._)`!(${m} instanceof ${o.ValidationError})`,()=>i.throw(m)),f(m),a||i.assign(h,!1)}),t.ok(h)}function d(){t.result((0,UN.callValidateCode)(t,e,c),()=>p(e),()=>f(e))}function f(h){let m=(0,gn._)`${h}.errors`;i.assign(Uc.default.vErrors,(0,gn._)`${Uc.default.vErrors} === null ? ${m} : ${Uc.default.vErrors}.concat(${m})`),i.assign(Uc.default.errors,(0,gn._)`${Uc.default.vErrors}.length`)}function p(h){var m;if(!o.opts.unevaluated)return;let y=(m=r==null?void 0:r.validate)===null||m===void 0?void 0:m.evaluated;if(o.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(o.props=V0.mergeEvaluated.props(i,y.props,o.props));else{let g=i.var("props",(0,gn._)`${h}.evaluated.props`);o.props=V0.mergeEvaluated.props(i,g,o.props,gn.Name)}if(o.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(o.items=V0.mergeEvaluated.items(i,y.items,o.items));else{let g=i.var("items",(0,gn._)`${h}.evaluated.items`);o.items=V0.mergeEvaluated.items(i,g,o.items,gn.Name)}}}Gs.callRef=G0;Gs.default=Uoe});var VN=b(bI=>{"use strict";Object.defineProperty(bI,"__esModule",{value:!0});var qoe=BN(),Zoe=HN(),Hoe=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",qoe.default,Zoe.default];bI.default=Hoe});var GN=b(wI=>{"use strict";Object.defineProperty(wI,"__esModule",{value:!0});var W0=Ue(),Pa=W0.operators,J0={maximum:{okStr:"<=",ok:Pa.LTE,fail:Pa.GT},minimum:{okStr:">=",ok:Pa.GTE,fail:Pa.LT},exclusiveMaximum:{okStr:"<",ok:Pa.LT,fail:Pa.GTE},exclusiveMinimum:{okStr:">",ok:Pa.GT,fail:Pa.LTE}},Voe={message:({keyword:t,schemaCode:e})=>(0,W0.str)`must be ${J0[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,W0._)`{comparison: ${J0[t].okStr}, limit: ${e}}`},Goe={keyword:Object.keys(J0),type:"number",schemaType:"number",$data:!0,error:Voe,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,W0._)`${r} ${J0[e].fail} ${n} || isNaN(${r})`)}};wI.default=Goe});var WN=b(xI=>{"use strict";Object.defineProperty(xI,"__esModule",{value:!0});var ap=Ue(),Woe={message:({schemaCode:t})=>(0,ap.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,ap._)`{multipleOf: ${t}}`},Joe={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Woe,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,a=e.let("res"),s=o?(0,ap._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,ap._)`${a} !== parseInt(${a})`;t.fail$data((0,ap._)`(${n} === 0 || (${a} = ${r}/${n}, ${s}))`)}};xI.default=Joe});var KN=b(SI=>{"use strict";Object.defineProperty(SI,"__esModule",{value:!0});function JN(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}SI.default=JN;JN.code='require("ajv/dist/runtime/ucs2length").default'});var YN=b(EI=>{"use strict";Object.defineProperty(EI,"__esModule",{value:!0});var Ws=Ue(),Koe=rt(),Yoe=KN(),Xoe={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,Ws.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,Ws._)`{limit: ${t}}`},Qoe={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Xoe,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?Ws.operators.GT:Ws.operators.LT,a=i.opts.unicode===!1?(0,Ws._)`${r}.length`:(0,Ws._)`${(0,Koe.useFunc)(t.gen,Yoe.default)}(${r})`;t.fail$data((0,Ws._)`${a} ${o} ${n}`)}};EI.default=Qoe});var XN=b(II=>{"use strict";Object.defineProperty(II,"__esModule",{value:!0});var eae=Yn(),tae=rt(),qc=Ue(),rae={message:({schemaCode:t})=>(0,qc.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,qc._)`{pattern: ${t}}`},nae={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:rae,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:a}=t,s=a.opts.unicodeRegExp?"u":"";if(n){let{regExp:l}=a.opts.code,c=l.code==="new RegExp"?(0,qc._)`new RegExp`:(0,tae.useFunc)(e,l),u=e.let("valid");e.try(()=>e.assign(u,(0,qc._)`${c}(${o}, ${s}).test(${r})`),()=>e.assign(u,!1)),t.fail$data((0,qc._)`!${u}`)}else{let l=(0,eae.usePattern)(t,i);t.fail$data((0,qc._)`!${l}.test(${r})`)}}};II.default=nae});var QN=b($I=>{"use strict";Object.defineProperty($I,"__esModule",{value:!0});var sp=Ue(),iae={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,sp.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,sp._)`{limit: ${t}}`},oae={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:iae,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?sp.operators.GT:sp.operators.LT;t.fail$data((0,sp._)`Object.keys(${r}).length ${i} ${n}`)}};$I.default=oae});var ej=b(PI=>{"use strict";Object.defineProperty(PI,"__esModule",{value:!0});var lp=Yn(),cp=Ue(),aae=rt(),sae={message:({params:{missingProperty:t}})=>(0,cp.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,cp._)`{missingProperty: ${t}}`},lae={keyword:"required",type:"object",schemaType:"array",$data:!0,error:sae,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:o,it:a}=t,{opts:s}=a;if(!o&&r.length===0)return;let l=r.length>=s.loopRequired;if(a.allErrors?c():u(),s.strictRequired){let p=t.parentSchema.properties,{definedProperties:h}=t.it;for(let m of r)if((p==null?void 0:p[m])===void 0&&!h.has(m)){let y=a.schemaEnv.baseId+a.errSchemaPath,g=`required property "${m}" is not defined at "${y}" (strictRequired)`;(0,aae.checkStrictMode)(a,g,a.opts.strictRequired)}}function c(){if(l||o)t.block$data(cp.nil,d);else for(let p of r)(0,lp.checkReportMissingProp)(t,p)}function u(){let p=e.let("missing");if(l||o){let h=e.let("valid",!0);t.block$data(h,()=>f(p,h)),t.ok(h)}else e.if((0,lp.checkMissingProp)(t,r,p)),(0,lp.reportMissingProp)(t,p),e.else()}function d(){e.forOf("prop",n,p=>{t.setParams({missingProperty:p}),e.if((0,lp.noPropertyInData)(e,i,p,s.ownProperties),()=>t.error())})}function f(p,h){t.setParams({missingProperty:p}),e.forOf(p,n,()=>{e.assign(h,(0,lp.propertyInData)(e,i,p,s.ownProperties)),e.if((0,cp.not)(h),()=>{t.error(),e.break()})},cp.nil)}}};PI.default=lae});var tj=b(TI=>{"use strict";Object.defineProperty(TI,"__esModule",{value:!0});var up=Ue(),cae={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,up.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,up._)`{limit: ${t}}`},uae={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:cae,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?up.operators.GT:up.operators.LT;t.fail$data((0,up._)`${r}.length ${i} ${n}`)}};TI.default=uae});var K0=b(AI=>{"use strict";Object.defineProperty(AI,"__esModule",{value:!0});var rj=Kf();rj.code='require("ajv/dist/runtime/equal").default';AI.default=rj});var nj=b(CI=>{"use strict";Object.defineProperty(CI,"__esModule",{value:!0});var kI=Jf(),wr=Ue(),dae=rt(),fae=K0(),pae={message:({params:{i:t,j:e}})=>(0,wr.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,wr._)`{i: ${t}, j: ${e}}`},hae={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:pae,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:s}=t;if(!n&&!i)return;let l=e.let("valid"),c=o.items?(0,kI.getSchemaTypes)(o.items):[];t.block$data(l,u,(0,wr._)`${a} === false`),t.ok(l);function u(){let h=e.let("i",(0,wr._)`${r}.length`),m=e.let("j");t.setParams({i:h,j:m}),e.assign(l,!0),e.if((0,wr._)`${h} > 1`,()=>(d()?f:p)(h,m))}function d(){return c.length>0&&!c.some(h=>h==="object"||h==="array")}function f(h,m){let y=e.name("item"),g=(0,kI.checkDataTypes)(c,y,s.opts.strictNumbers,kI.DataType.Wrong),v=e.const("indices",(0,wr._)`{}`);e.for((0,wr._)`;${h}--;`,()=>{e.let(y,(0,wr._)`${r}[${h}]`),e.if(g,(0,wr._)`continue`),c.length>1&&e.if((0,wr._)`typeof ${y} == "string"`,(0,wr._)`${y} += "_"`),e.if((0,wr._)`typeof ${v}[${y}] == "number"`,()=>{e.assign(m,(0,wr._)`${v}[${y}]`),t.error(),e.assign(l,!1).break()}).code((0,wr._)`${v}[${y}] = ${h}`)})}function p(h,m){let y=(0,dae.useFunc)(e,fae.default),g=e.name("outer");e.label(g).for((0,wr._)`;${h}--;`,()=>e.for((0,wr._)`${m} = ${h}; ${m}--;`,()=>e.if((0,wr._)`${y}(${r}[${h}], ${r}[${m}])`,()=>{t.error(),e.assign(l,!1).break(g)})))}}};CI.default=hae});var ij=b(DI=>{"use strict";Object.defineProperty(DI,"__esModule",{value:!0});var RI=Ue(),mae=rt(),gae=K0(),yae={message:"must be equal to constant",params:({schemaCode:t})=>(0,RI._)`{allowedValue: ${t}}`},_ae={keyword:"const",$data:!0,error:yae,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,RI._)`!${(0,mae.useFunc)(e,gae.default)}(${r}, ${i})`):t.fail((0,RI._)`${o} !== ${r}`)}};DI.default=_ae});var oj=b(OI=>{"use strict";Object.defineProperty(OI,"__esModule",{value:!0});var dp=Ue(),vae=rt(),bae=K0(),wae={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,dp._)`{allowedValues: ${t}}`},xae={keyword:"enum",schemaType:"array",$data:!0,error:wae,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:a}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let s=i.length>=a.opts.loopEnum,l,c=()=>l??(l=(0,vae.useFunc)(e,bae.default)),u;if(s||n)u=e.let("valid"),t.block$data(u,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let p=e.const("vSchema",o);u=(0,dp.or)(...i.map((h,m)=>f(p,m)))}t.pass(u);function d(){e.assign(u,!1),e.forOf("v",o,p=>e.if((0,dp._)`${c()}(${r}, ${p})`,()=>e.assign(u,!0).break()))}function f(p,h){let m=i[h];return typeof m=="object"&&m!==null?(0,dp._)`${c()}(${r}, ${p}[${h}])`:(0,dp._)`${r} === ${m}`}}};OI.default=xae});var aj=b(MI=>{"use strict";Object.defineProperty(MI,"__esModule",{value:!0});var Sae=GN(),Eae=WN(),Iae=YN(),$ae=XN(),Pae=QN(),Tae=ej(),Aae=tj(),kae=nj(),Cae=ij(),Rae=oj(),Dae=[Sae.default,Eae.default,Iae.default,$ae.default,Pae.default,Tae.default,Aae.default,kae.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Cae.default,Rae.default];MI.default=Dae});var jI=b(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});fp.validateAdditionalItems=void 0;var Js=Ue(),NI=rt(),Oae={message:({params:{len:t}})=>(0,Js.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Js._)`{limit: ${t}}`},Mae={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Oae,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,NI.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}sj(t,n)}};function sj(t,e){let{gen:r,schema:n,data:i,keyword:o,it:a}=t;a.items=!0;let s=r.const("len",(0,Js._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,Js._)`${s} <= ${e.length}`);else if(typeof n=="object"&&!(0,NI.alwaysValidSchema)(a,n)){let c=r.var("valid",(0,Js._)`${s} <= ${e.length}`);r.if((0,Js.not)(c),()=>l(c)),t.ok(c)}function l(c){r.forRange("i",e.length,s,u=>{t.subschema({keyword:o,dataProp:u,dataPropType:NI.Type.Num},c),a.allErrors||r.if((0,Js.not)(c),()=>r.break())})}}fp.validateAdditionalItems=sj;fp.default=Mae});var zI=b(pp=>{"use strict";Object.defineProperty(pp,"__esModule",{value:!0});pp.validateTuple=void 0;var lj=Ue(),Y0=rt(),Nae=Yn(),jae={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return cj(t,"additionalItems",e);r.items=!0,!(0,Y0.alwaysValidSchema)(r,e)&&t.ok((0,Nae.validateArray)(t))}};function cj(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:s}=t;u(i),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=Y0.mergeEvaluated.items(n,r.length,s.items));let l=n.name("valid"),c=n.const("len",(0,lj._)`${o}.length`);r.forEach((d,f)=>{(0,Y0.alwaysValidSchema)(s,d)||(n.if((0,lj._)`${c} > ${f}`,()=>t.subschema({keyword:a,schemaProp:f,dataProp:f},l)),t.ok(l))});function u(d){let{opts:f,errSchemaPath:p}=s,h=r.length,m=h===d.minItems&&(h===d.maxItems||d[e]===!1);if(f.strictTuples&&!m){let y=`"${a}" is ${h}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,Y0.checkStrictMode)(s,y,f.strictTuples)}}}pp.validateTuple=cj;pp.default=jae});var uj=b(LI=>{"use strict";Object.defineProperty(LI,"__esModule",{value:!0});var zae=zI(),Lae={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,zae.validateTuple)(t,"items")};LI.default=Lae});var fj=b(FI=>{"use strict";Object.defineProperty(FI,"__esModule",{value:!0});var dj=Ue(),Fae=rt(),Bae=Yn(),Uae=jI(),qae={message:({params:{len:t}})=>(0,dj.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,dj._)`{limit: ${t}}`},Zae={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:qae,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,Fae.alwaysValidSchema)(n,e)&&(i?(0,Uae.validateAdditionalItems)(t,i):t.ok((0,Bae.validateArray)(t)))}};FI.default=Zae});var pj=b(BI=>{"use strict";Object.defineProperty(BI,"__esModule",{value:!0});var Qn=Ue(),X0=rt(),Hae={message:({params:{min:t,max:e}})=>e===void 0?(0,Qn.str)`must contain at least ${t} valid item(s)`:(0,Qn.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,Qn._)`{minContains: ${t}}`:(0,Qn._)`{minContains: ${t}, maxContains: ${e}}`},Vae={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Hae,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,a,s,{minContains:l,maxContains:c}=n;o.opts.next?(a=l===void 0?1:l,s=c):a=1;let u=e.const("len",(0,Qn._)`${i}.length`);if(t.setParams({min:a,max:s}),s===void 0&&a===0){(0,X0.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,X0.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,X0.alwaysValidSchema)(o,r)){let m=(0,Qn._)`${u} >= ${a}`;s!==void 0&&(m=(0,Qn._)`${m} && ${u} <= ${s}`),t.pass(m);return}o.items=!0;let d=e.name("valid");s===void 0&&a===1?p(d,()=>e.if(d,()=>e.break())):a===0?(e.let(d,!0),s!==void 0&&e.if((0,Qn._)`${i}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let m=e.name("_valid"),y=e.let("count",0);p(m,()=>e.if(m,()=>h(y)))}function p(m,y){e.forRange("i",0,u,g=>{t.subschema({keyword:"contains",dataProp:g,dataPropType:X0.Type.Num,compositeRule:!0},m),y()})}function h(m){e.code((0,Qn._)`${m}++`),s===void 0?e.if((0,Qn._)`${m} >= ${a}`,()=>e.assign(d,!0).break()):(e.if((0,Qn._)`${m} > ${s}`,()=>e.assign(d,!1).break()),a===1?e.assign(d,!0):e.if((0,Qn._)`${m} >= ${a}`,()=>e.assign(d,!0)))}}};BI.default=Vae});var gj=b(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.validateSchemaDeps=Gi.validatePropertyDeps=Gi.error=void 0;var UI=Ue(),Gae=rt(),hp=Yn();Gi.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,UI.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,UI._)`{property: ${t},
|
|
11
11
|
missingProperty: ${n},
|
|
12
12
|
depsCount: ${e},
|
|
13
|
-
deps: ${r}}`};var Wae={keyword:"dependencies",type:"object",schemaType:"object",error:Gi.error,code(t){let[e,r]=Jae(t);hj(t,e),mj(t,r)}};function Jae({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function hj(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let a in e){let s=e[a];if(s.length===0)continue;let l=(0,hp.propertyInData)(r,n,a,i.opts.ownProperties);t.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),i.allErrors?r.if(l,()=>{for(let c of s)(0,hp.checkReportMissingProp)(t,c)}):(r.if((0,UI._)`${l} && (${(0,hp.checkMissingProp)(t,s,o)})`),(0,hp.reportMissingProp)(t,o),r.else())}}Gi.validatePropertyDeps=hj;function mj(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,a=r.name("valid");for(let s in e)(0,Gae.alwaysValidSchema)(o,e[s])||(r.if((0,hp.propertyInData)(r,n,s,o.opts.ownProperties),()=>{let l=t.subschema({keyword:i,schemaProp:s},a);t.mergeValidEvaluated(l,a)},()=>r.var(a,!0)),t.ok(a))}Gi.validateSchemaDeps=mj;Gi.default=Wae});var _j=b(qI=>{"use strict";Object.defineProperty(qI,"__esModule",{value:!0});var yj=Ue(),Kae=rt(),Yae={message:"property name must be valid",params:({params:t})=>(0,yj._)`{propertyName: ${t.propertyName}}`},Xae={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Yae,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,Kae.alwaysValidSchema)(i,r))return;let o=e.name("valid");e.forIn("key",n,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),e.if((0,yj.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};qI.default=Xae});var HI=b(ZI=>{"use strict";Object.defineProperty(ZI,"__esModule",{value:!0});var Q0=Yn(),Ei=Ue(),Qae=Mo(),ey=rt(),ese={message:"must NOT have additional properties",params:({params:t})=>(0,Ei._)`{additionalProperty: ${t.additionalProperty}}`},tse={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:ese,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:s,opts:l}=a;if(a.props=!0,l.removeAdditional!=="all"&&(0,ey.alwaysValidSchema)(a,r))return;let c=(0,Q0.allSchemaProperties)(n.properties),u=(0,Q0.allSchemaProperties)(n.patternProperties);d(),t.ok((0,Ei._)`${o} === ${Qae.default.errors}`);function d(){e.forIn("key",i,y=>{!c.length&&!u.length?h(y):e.if(f(y),()=>h(y))})}function f(y){let g;if(c.length>8){let v=(0,ey.schemaRefOrVal)(a,n.properties,"properties");g=(0,Q0.isOwnProperty)(e,v,y)}else c.length?g=(0,Ei.or)(...c.map(v=>(0,Ei._)`${y} === ${v}`)):g=Ei.nil;return u.length&&(g=(0,Ei.or)(g,...u.map(v=>(0,Ei._)`${(0,Q0.usePattern)(t,v)}.test(${y})`))),(0,Ei.not)(g)}function p(y){e.code((0,Ei._)`delete ${i}[${y}]`)}function h(y){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){p(y);return}if(r===!1){t.setParams({additionalProperty:y}),t.error(),s||e.break();return}if(typeof r=="object"&&!(0,ey.alwaysValidSchema)(a,r)){let g=e.name("valid");l.removeAdditional==="failing"?(m(y,g,!1),e.if((0,Ei.not)(g),()=>{t.reset(),p(y)})):(m(y,g),s||e.if((0,Ei.not)(g),()=>e.break()))}}function m(y,g,v){let E={keyword:"additionalProperties",dataProp:y,dataPropType:ey.Type.Str};v===!1&&Object.assign(E,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(E,g)}}};ZI.default=tse});var wj=b(GI=>{"use strict";Object.defineProperty(GI,"__esModule",{value:!0});var rse=ep(),vj=Yn(),VI=rt(),bj=HI(),nse={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&bj.default.code(new rse.KeywordCxt(o,bj.default,"additionalProperties"));let a=(0,vj.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=VI.mergeEvaluated.props(e,(0,VI.toHash)(a),o.props));let s=a.filter(d=>!(0,VI.alwaysValidSchema)(o,r[d]));if(s.length===0)return;let l=e.name("valid");for(let d of s)c(d)?u(d):(e.if((0,vj.propertyInData)(e,i,d,o.opts.ownProperties)),u(d),o.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(l);function c(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}function u(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},l)}}};GI.default=nse});var Ij=b(WI=>{"use strict";Object.defineProperty(WI,"__esModule",{value:!0});var xj=Yn(),ty=Ue(),Sj=rt(),Ej=rt(),ise={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:o}=t,{opts:a}=o,s=(0,xj.allSchemaProperties)(r),l=s.filter(m=>(0,Sj.alwaysValidSchema)(o,r[m]));if(s.length===0||l.length===s.length&&(!o.opts.unevaluated||o.props===!0))return;let c=a.strictSchema&&!a.allowMatchingProperties&&i.properties,u=e.name("valid");o.props!==!0&&!(o.props instanceof ty.Name)&&(o.props=(0,Ej.evaluatedPropsToName)(e,o.props));let{props:d}=o;f();function f(){for(let m of s)c&&p(m),o.allErrors?h(m):(e.var(u,!0),h(m),e.if(u))}function p(m){for(let y in c)new RegExp(m).test(y)&&(0,Sj.checkStrictMode)(o,`property ${y} matches pattern ${m} (use allowMatchingProperties)`)}function h(m){e.forIn("key",n,y=>{e.if((0,ty._)`${(0,xj.usePattern)(t,m)}.test(${y})`,()=>{let g=l.includes(m);g||t.subschema({keyword:"patternProperties",schemaProp:m,dataProp:y,dataPropType:Ej.Type.Str},u),o.opts.unevaluated&&d!==!0?e.assign((0,ty._)`${d}[${y}]`,!0):!g&&!o.allErrors&&e.if((0,ty.not)(u),()=>e.break())})})}}};WI.default=ise});var $j=b(JI=>{"use strict";Object.defineProperty(JI,"__esModule",{value:!0});var ose=rt(),ase={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,ose.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};JI.default=ase});var Pj=b(KI=>{"use strict";Object.defineProperty(KI,"__esModule",{value:!0});var sse=Yn(),lse={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:sse.validateUnion,error:{message:"must match a schema in anyOf"}};KI.default=lse});var Tj=b(YI=>{"use strict";Object.defineProperty(YI,"__esModule",{value:!0});var ry=Ue(),cse=rt(),use={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,ry._)`{passingSchemas: ${t.passing}}`},dse={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:use,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=e.let("valid",!1),s=e.let("passing",null),l=e.name("_valid");t.setParams({passing:s}),e.block(c),t.result(a,()=>t.reset(),()=>t.error(!0));function c(){o.forEach((u,d)=>{let f;(0,cse.alwaysValidSchema)(i,u)?e.var(l,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},l),d>0&&e.if((0,ry._)`${l} && ${a}`).assign(a,!1).assign(s,(0,ry._)`[${s}, ${d}]`).else(),e.if(l,()=>{e.assign(a,!0),e.assign(s,d),f&&t.mergeEvaluated(f,ry.Name)})})}}};YI.default=dse});var Aj=b(XI=>{"use strict";Object.defineProperty(XI,"__esModule",{value:!0});var fse=rt(),pse={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((o,a)=>{if((0,fse.alwaysValidSchema)(n,o))return;let s=t.subschema({keyword:"allOf",schemaProp:a},i);t.ok(i),t.mergeEvaluated(s)})}};XI.default=pse});var Rj=b(QI=>{"use strict";Object.defineProperty(QI,"__esModule",{value:!0});var ny=Ue(),Cj=rt(),hse={message:({params:t})=>(0,ny.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,ny._)`{failingKeyword: ${t.ifClause}}`},mse={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:hse,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Cj.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=kj(n,"then"),o=kj(n,"else");if(!i&&!o)return;let a=e.let("valid",!0),s=e.name("_valid");if(l(),t.reset(),i&&o){let u=e.let("ifClause");t.setParams({ifClause:u}),e.if(s,c("then",u),c("else",u))}else i?e.if(s,c("then")):e.if((0,ny.not)(s),c("else"));t.pass(a,()=>t.error(!0));function l(){let u=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);t.mergeEvaluated(u)}function c(u,d){return()=>{let f=t.subschema({keyword:u},s);e.assign(a,s),t.mergeValidEvaluated(f,a),d?e.assign(d,(0,ny._)`${u}`):t.setParams({ifClause:u})}}}};function kj(t,e){let r=t.schema[e];return r!==void 0&&!(0,Cj.alwaysValidSchema)(t,r)}QI.default=mse});var Dj=b(e$=>{"use strict";Object.defineProperty(e$,"__esModule",{value:!0});var gse=rt(),yse={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,gse.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};e$.default=yse});var Oj=b(t$=>{"use strict";Object.defineProperty(t$,"__esModule",{value:!0});var _se=jI(),vse=uj(),bse=zI(),wse=fj(),xse=pj(),Sse=gj(),Ese=_j(),Ise=HI(),$se=wj(),Pse=Ij(),Tse=$j(),Ase=Pj(),kse=Tj(),Cse=Aj(),Rse=Rj(),Dse=Dj();function Ose(t=!1){let e=[Tse.default,Ase.default,kse.default,Cse.default,Rse.default,Dse.default,Ese.default,Ise.default,Sse.default,$se.default,Pse.default];return t?e.push(vse.default,wse.default):e.push(_se.default,bse.default),e.push(xse.default),e}t$.default=Ose});var Mj=b(r$=>{"use strict";Object.defineProperty(r$,"__esModule",{value:!0});var Yt=Ue(),Mse={message:({schemaCode:t})=>(0,Yt.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Yt._)`{format: ${t}}`},Nse={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Mse,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:s}=t,{opts:l,errSchemaPath:c,schemaEnv:u,self:d}=s;if(!l.validateFormats)return;i?f():p();function f(){let h=r.scopeValue("formats",{ref:d.formats,code:l.code.formats}),m=r.const("fDef",(0,Yt._)`${h}[${a}]`),y=r.let("fType"),g=r.let("format");r.if((0,Yt._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(y,(0,Yt._)`${m}.type || "string"`).assign(g,(0,Yt._)`${m}.validate`),()=>r.assign(y,(0,Yt._)`"string"`).assign(g,m)),t.fail$data((0,Yt.or)(v(),E()));function v(){return l.strictSchema===!1?Yt.nil:(0,Yt._)`${a} && !${g}`}function E(){let x=u.$async?(0,Yt._)`(${m}.async ? await ${g}(${n}) : ${g}(${n}))`:(0,Yt._)`${g}(${n})`,w=(0,Yt._)`(typeof ${g} == "function" ? ${x} : ${g}.test(${n}))`;return(0,Yt._)`${g} && ${g} !== true && ${y} === ${e} && !${w}`}}function p(){let h=d.formats[o];if(!h){v();return}if(h===!0)return;let[m,y,g]=E(h);m===e&&t.pass(x());function v(){if(l.strictSchema===!1){d.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${o}" ignored in schema at path "${c}"`}}function E(w){let A=w instanceof RegExp?(0,Yt.regexpCode)(w):l.code.formats?(0,Yt._)`${l.code.formats}${(0,Yt.getProperty)(o)}`:void 0,$=r.scopeValue("formats",{key:o,ref:w,code:A});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,Yt._)`${$}.validate`]:["string",w,$]}function x(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw new Error("async format in sync schema");return(0,Yt._)`await ${g}(${n})`}return typeof y=="function"?(0,Yt._)`${g}(${n})`:(0,Yt._)`${g}.test(${n})`}}}};r$.default=Nse});var Nj=b(n$=>{"use strict";Object.defineProperty(n$,"__esModule",{value:!0});var jse=Mj(),zse=[jse.default];n$.default=zse});var jj=b(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.contentVocabulary=Zc.metadataVocabulary=void 0;Zc.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Zc.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Lj=b(i$=>{"use strict";Object.defineProperty(i$,"__esModule",{value:!0});var Lse=VN(),Fse=aj(),Bse=Oj(),Use=Nj(),zj=jj(),qse=[Lse.default,Fse.default,(0,Bse.default)(),Use.default,zj.metadataVocabulary,zj.contentVocabulary];i$.default=qse});var Bj=b(iy=>{"use strict";Object.defineProperty(iy,"__esModule",{value:!0});iy.DiscrError=void 0;var Fj;(function(t){t.Tag="tag",t.Mapping="mapping"})(Fj||(iy.DiscrError=Fj={}))});var qj=b(a$=>{"use strict";Object.defineProperty(a$,"__esModule",{value:!0});var Hc=Ue(),o$=Bj(),Uj=F0(),Zse=tp(),Hse=rt(),Vse={message:({params:{discrError:t,tagName:e}})=>t===o$.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Hc._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},Gse={keyword:"discriminator",type:"object",schemaType:"object",error:Vse,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:o}=t,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=n.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let l=e.let("valid",!1),c=e.const("tag",(0,Hc._)`${r}${(0,Hc.getProperty)(s)}`);e.if((0,Hc._)`typeof ${c} == "string"`,()=>u(),()=>t.error(!1,{discrError:o$.DiscrError.Tag,tag:c,tagName:s})),t.ok(l);function u(){let p=f();e.if(!1);for(let h in p)e.elseIf((0,Hc._)`${c} === ${h}`),e.assign(l,d(p[h]));e.else(),t.error(!1,{discrError:o$.DiscrError.Mapping,tag:c,tagName:s}),e.endIf()}function d(p){let h=e.name("valid"),m=t.subschema({keyword:"oneOf",schemaProp:p},h);return t.mergeEvaluated(m,Hc.Name),h}function f(){var p;let h={},m=g(i),y=!0;for(let x=0;x<a.length;x++){let w=a[x];if(w!=null&&w.$ref&&!(0,Hse.schemaHasRulesButRef)(w,o.self.RULES)){let $=w.$ref;if(w=Uj.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,$),w instanceof Uj.SchemaEnv&&(w=w.schema),w===void 0)throw new Zse.default(o.opts.uriResolver,o.baseId,$)}let A=(p=w==null?void 0:w.properties)===null||p===void 0?void 0:p[s];if(typeof A!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);y=y&&(m||g(w)),v(A,x)}if(!y)throw new Error(`discriminator: "${s}" must be required`);return h;function g({required:x}){return Array.isArray(x)&&x.includes(s)}function v(x,w){if(x.const)E(x.const,w);else if(x.enum)for(let A of x.enum)E(A,w);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function E(x,w){if(typeof x!="string"||x in h)throw new Error(`discriminator: "${s}" values must be unique strings`);h[x]=w}}}};a$.default=Gse});var Zj=b((lBe,Wse)=>{Wse.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 Vj=b((Nt,s$)=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.MissingRefError=Nt.ValidationError=Nt.CodeGen=Nt.Name=Nt.nil=Nt.stringify=Nt.str=Nt._=Nt.KeywordCxt=Nt.Ajv=void 0;var Jse=FN(),Kse=Lj(),Yse=qj(),Hj=Zj(),Xse=["/properties"],oy="http://json-schema.org/draft-07/schema",Vc=class extends Jse.default{_addVocabularies(){super._addVocabularies(),Kse.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Yse.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Hj,Xse):Hj;this.addMetaSchema(e,oy,!1),this.refs["http://json-schema.org/schema"]=oy}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(oy)?oy:void 0)}};Nt.Ajv=Vc;s$.exports=Nt=Vc;s$.exports.Ajv=Vc;Object.defineProperty(Nt,"__esModule",{value:!0});Nt.default=Vc;var Qse=ep();Object.defineProperty(Nt,"KeywordCxt",{enumerable:!0,get:function(){return Qse.KeywordCxt}});var Gc=Ue();Object.defineProperty(Nt,"_",{enumerable:!0,get:function(){return Gc._}});Object.defineProperty(Nt,"str",{enumerable:!0,get:function(){return Gc.str}});Object.defineProperty(Nt,"stringify",{enumerable:!0,get:function(){return Gc.stringify}});Object.defineProperty(Nt,"nil",{enumerable:!0,get:function(){return Gc.nil}});Object.defineProperty(Nt,"Name",{enumerable:!0,get:function(){return Gc.Name}});Object.defineProperty(Nt,"CodeGen",{enumerable:!0,get:function(){return Gc.CodeGen}});var ele=z0();Object.defineProperty(Nt,"ValidationError",{enumerable:!0,get:function(){return ele.default}});var tle=tp();Object.defineProperty(Nt,"MissingRefError",{enumerable:!0,get:function(){return tle.default}})});var e6=b(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.formatNames=Ji.fastFormats=Ji.fullFormats=void 0;function Wi(t,e){return{validate:t,compare:e}}Ji.fullFormats={date:Wi(Kj,d$),time:Wi(c$(!0),f$),"date-time":Wi(Gj(!0),Xj),"iso-time":Wi(c$(),Yj),"iso-date-time":Wi(Gj(),Qj),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:sle,"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:hle,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:lle,int32:{type:"number",validate:dle},int64:{type:"number",validate:fle},float:{type:"number",validate:Jj},double:{type:"number",validate:Jj},password:!0,binary:!0};Ji.fastFormats={...Ji.fullFormats,date:Wi(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,d$),time:Wi(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f$),"date-time":Wi(/^\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,Xj),"iso-time":Wi(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Yj),"iso-date-time":Wi(/^\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,Qj),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};Ji.formatNames=Object.keys(Ji.fullFormats);function rle(t){return t%4===0&&(t%100!==0||t%400===0)}var nle=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,ile=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Kj(t){let e=nle.exec(t);if(!e)return!1;let r=+e[1],n=+e[2],i=+e[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&rle(r)?29:ile[n])}function d$(t,e){if(t&&e)return t>e?1:t<e?-1:0}var l$=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c$(t){return function(r){let n=l$.exec(r);if(!n)return!1;let i=+n[1],o=+n[2],a=+n[3],s=n[4],l=n[5]==="-"?-1:1,c=+(n[6]||0),u=+(n[7]||0);if(c>23||u>59||t&&!s)return!1;if(i<=23&&o<=59&&a<60)return!0;let d=o-u*l,f=i-c*l-(d<0?1:0);return(f===23||f===-1)&&(d===59||d===-1)&&a<61}}function f$(t,e){if(!(t&&e))return;let r=new Date("2020-01-01T"+t).valueOf(),n=new Date("2020-01-01T"+e).valueOf();if(r&&n)return r-n}function Yj(t,e){if(!(t&&e))return;let r=l$.exec(t),n=l$.exec(e);if(r&&n)return t=r[1]+r[2]+r[3],e=n[1]+n[2]+n[3],t>e?1:t<e?-1:0}var u$=/t|\s/i;function Gj(t){let e=c$(t);return function(n){let i=n.split(u$);return i.length===2&&Kj(i[0])&&e(i[1])}}function Xj(t,e){if(!(t&&e))return;let r=new Date(t).valueOf(),n=new Date(e).valueOf();if(r&&n)return r-n}function Qj(t,e){if(!(t&&e))return;let[r,n]=t.split(u$),[i,o]=e.split(u$),a=d$(r,i);if(a!==void 0)return a||f$(n,o)}var ole=/\/|:/,ale=/^(?:[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 sle(t){return ole.test(t)&&ale.test(t)}var Wj=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function lle(t){return Wj.lastIndex=0,Wj.test(t)}var cle=-(2**31),ule=2**31-1;function dle(t){return Number.isInteger(t)&&t<=ule&&t>=cle}function fle(t){return Number.isInteger(t)}function Jj(){return!0}var ple=/[^\\]\\Z/;function hle(t){if(ple.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var yp=b(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.regexpCode=lt.getEsmExportName=lt.getProperty=lt.safeStringify=lt.stringify=lt.strConcat=lt.addCodeArg=lt.str=lt._=lt.nil=lt._Code=lt.Name=lt.IDENTIFIER=lt._CodeOrName=void 0;var mp=class{};lt._CodeOrName=mp;lt.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ks=class extends mp{constructor(e){if(super(),!lt.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}}};lt.Name=Ks;var ei=class extends mp{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((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof Ks&&(r[n.str]=(r[n.str]||0)+1),r),{})}};lt._Code=ei;lt.nil=new ei("");function t6(t,...e){let r=[t[0]],n=0;for(;n<e.length;)h$(r,e[n]),r.push(t[++n]);return new ei(r)}lt._=t6;var p$=new ei("+");function r6(t,...e){let r=[gp(t[0])],n=0;for(;n<e.length;)r.push(p$),h$(r,e[n]),r.push(p$,gp(t[++n]));return mle(r),new ei(r)}lt.str=r6;function h$(t,e){e instanceof ei?t.push(...e._items):e instanceof Ks?t.push(e):t.push(_le(e))}lt.addCodeArg=h$;function mle(t){let e=1;for(;e<t.length-1;){if(t[e]===p$){let r=gle(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function gle(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Ks||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 Ks))return`"${t}${e.slice(1)}`}function yle(t,e){return e.emptyStr()?t:t.emptyStr()?e:r6`${t}${e}`}lt.strConcat=yle;function _le(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:gp(Array.isArray(t)?t.join(","):t)}function vle(t){return new ei(gp(t))}lt.stringify=vle;function gp(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}lt.safeStringify=gp;function ble(t){return typeof t=="string"&<.IDENTIFIER.test(t)?new ei(`.${t}`):t6`[${t}]`}lt.getProperty=ble;function wle(t){if(typeof t=="string"&<.IDENTIFIER.test(t))return new ei(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}lt.getEsmExportName=wle;function xle(t){return new ei(t.toString())}lt.regexpCode=xle});var y$=b(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.ValueScope=_n.ValueScopeName=_n.Scope=_n.varKinds=_n.UsedValueState=void 0;var yn=yp(),m$=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},ay;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(ay||(_n.UsedValueState=ay={}));_n.varKinds={const:new yn.Name("const"),let:new yn.Name("let"),var:new yn.Name("var")};var sy=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof yn.Name?e:this.name(e)}name(e){return new yn.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.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}}};_n.Scope=sy;var ly=class extends yn.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,yn._)`.${new yn.Name(r)}[${n}]`}};_n.ValueScopeName=ly;var Sle=(0,yn._)`\n`,g$=class extends sy{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Sle:yn.nil}}get(){return this._scope}name(e){return new ly(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,a=(n=r.key)!==null&&n!==void 0?n:r.ref,s=this._values[o];if(s){let u=s.get(a);if(u)return u}else s=this._values[o]=new Map;s.set(a,i);let l=this._scope[o]||(this._scope[o]=[]),c=l.length;return l[c]=r.ref,i.setValue(r,{property:o,itemIndex:c}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,yn._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let o=yn.nil;for(let a in e){let s=e[a];if(!s)continue;let l=n[a]=n[a]||new Map;s.forEach(c=>{if(l.has(c))return;l.set(c,ay.Started);let u=r(c);if(u){let d=this.opts.es5?_n.varKinds.var:_n.varKinds.const;o=(0,yn._)`${o}${d} ${c} = ${u};${this.opts._n}`}else if(u=i==null?void 0:i(c))o=(0,yn._)`${o}${u}${this.opts._n}`;else throw new m$(c);l.set(c,ay.Completed)})}return o}};_n.ValueScope=g$});var Ne=b(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.or=Fe.and=Fe.not=Fe.CodeGen=Fe.operators=Fe.varKinds=Fe.ValueScopeName=Fe.ValueScope=Fe.Scope=Fe.Name=Fe.regexpCode=Fe.stringify=Fe.getProperty=Fe.nil=Fe.strConcat=Fe.str=Fe._=void 0;var Qe=yp(),Ii=y$(),Ta=yp();Object.defineProperty(Fe,"_",{enumerable:!0,get:function(){return Ta._}});Object.defineProperty(Fe,"str",{enumerable:!0,get:function(){return Ta.str}});Object.defineProperty(Fe,"strConcat",{enumerable:!0,get:function(){return Ta.strConcat}});Object.defineProperty(Fe,"nil",{enumerable:!0,get:function(){return Ta.nil}});Object.defineProperty(Fe,"getProperty",{enumerable:!0,get:function(){return Ta.getProperty}});Object.defineProperty(Fe,"stringify",{enumerable:!0,get:function(){return Ta.stringify}});Object.defineProperty(Fe,"regexpCode",{enumerable:!0,get:function(){return Ta.regexpCode}});Object.defineProperty(Fe,"Name",{enumerable:!0,get:function(){return Ta.Name}});var fy=y$();Object.defineProperty(Fe,"Scope",{enumerable:!0,get:function(){return fy.Scope}});Object.defineProperty(Fe,"ValueScope",{enumerable:!0,get:function(){return fy.ValueScope}});Object.defineProperty(Fe,"ValueScopeName",{enumerable:!0,get:function(){return fy.ValueScopeName}});Object.defineProperty(Fe,"varKinds",{enumerable:!0,get:function(){return fy.varKinds}});Fe.operators={GT:new Qe._Code(">"),GTE:new Qe._Code(">="),LT:new Qe._Code("<"),LTE:new Qe._Code("<="),EQ:new Qe._Code("==="),NEQ:new Qe._Code("!=="),NOT:new Qe._Code("!"),OR:new Qe._Code("||"),AND:new Qe._Code("&&"),ADD:new Qe._Code("+")};var zo=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},_$=class extends zo{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Ii.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Jc(this.rhs,e,r)),this}get names(){return this.rhs instanceof Qe._CodeOrName?this.rhs.names:{}}},cy=class extends zo{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof Qe.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Jc(this.rhs,e,r),this}get names(){let e=this.lhs instanceof Qe.Name?{}:{...this.lhs.names};return dy(e,this.rhs)}},v$=class extends cy{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},b$=class extends zo{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},w$=class extends zo{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},x$=class extends zo{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},S$=class extends zo{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Jc(this.code,e,r),this}get names(){return this.code instanceof Qe._CodeOrName?this.code.names:{}}},_p=class extends zo{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(e,r)||(Ele(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Qs(e,r.names),{})}},Lo=class extends _p{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},E$=class extends _p{},Wc=class extends Lo{};Wc.kind="else";var Ys=class t extends Lo{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Wc(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(n6(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Jc(this.condition,e,r),this}get names(){let e=super.names;return dy(e,this.condition),this.else&&Qs(e,this.else.names),e}};Ys.kind="if";var Xs=class extends Lo{};Xs.kind="for";var I$=class extends Xs{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Jc(this.iteration,e,r),this}get names(){return Qs(super.names,this.iteration.names)}},$$=class extends Xs{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?Ii.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=dy(super.names,this.from);return dy(e,this.to)}},uy=class extends Xs{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Jc(this.iterable,e,r),this}get names(){return Qs(super.names,this.iterable.names)}},vp=class extends Lo{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};vp.kind="func";var bp=class extends _p{render(e){return"return "+super.render(e)}};bp.kind="return";var P$=class extends Lo{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Qs(e,this.catch.names),this.finally&&Qs(e,this.finally.names),e}},wp=class extends Lo{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};wp.kind="catch";var xp=class extends Lo{render(e){return"finally"+super.render(e)}};xp.kind="finally";var T$=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
13
|
+
deps: ${r}}`};var Wae={keyword:"dependencies",type:"object",schemaType:"object",error:Gi.error,code(t){let[e,r]=Jae(t);hj(t,e),mj(t,r)}};function Jae({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function hj(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let a in e){let s=e[a];if(s.length===0)continue;let l=(0,hp.propertyInData)(r,n,a,i.opts.ownProperties);t.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),i.allErrors?r.if(l,()=>{for(let c of s)(0,hp.checkReportMissingProp)(t,c)}):(r.if((0,UI._)`${l} && (${(0,hp.checkMissingProp)(t,s,o)})`),(0,hp.reportMissingProp)(t,o),r.else())}}Gi.validatePropertyDeps=hj;function mj(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,a=r.name("valid");for(let s in e)(0,Gae.alwaysValidSchema)(o,e[s])||(r.if((0,hp.propertyInData)(r,n,s,o.opts.ownProperties),()=>{let l=t.subschema({keyword:i,schemaProp:s},a);t.mergeValidEvaluated(l,a)},()=>r.var(a,!0)),t.ok(a))}Gi.validateSchemaDeps=mj;Gi.default=Wae});var _j=b(qI=>{"use strict";Object.defineProperty(qI,"__esModule",{value:!0});var yj=Ue(),Kae=rt(),Yae={message:"property name must be valid",params:({params:t})=>(0,yj._)`{propertyName: ${t.propertyName}}`},Xae={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Yae,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,Kae.alwaysValidSchema)(i,r))return;let o=e.name("valid");e.forIn("key",n,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),e.if((0,yj.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};qI.default=Xae});var HI=b(ZI=>{"use strict";Object.defineProperty(ZI,"__esModule",{value:!0});var Q0=Yn(),Ei=Ue(),Qae=Mo(),ey=rt(),ese={message:"must NOT have additional properties",params:({params:t})=>(0,Ei._)`{additionalProperty: ${t.additionalProperty}}`},tse={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:ese,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:s,opts:l}=a;if(a.props=!0,l.removeAdditional!=="all"&&(0,ey.alwaysValidSchema)(a,r))return;let c=(0,Q0.allSchemaProperties)(n.properties),u=(0,Q0.allSchemaProperties)(n.patternProperties);d(),t.ok((0,Ei._)`${o} === ${Qae.default.errors}`);function d(){e.forIn("key",i,y=>{!c.length&&!u.length?h(y):e.if(f(y),()=>h(y))})}function f(y){let g;if(c.length>8){let v=(0,ey.schemaRefOrVal)(a,n.properties,"properties");g=(0,Q0.isOwnProperty)(e,v,y)}else c.length?g=(0,Ei.or)(...c.map(v=>(0,Ei._)`${y} === ${v}`)):g=Ei.nil;return u.length&&(g=(0,Ei.or)(g,...u.map(v=>(0,Ei._)`${(0,Q0.usePattern)(t,v)}.test(${y})`))),(0,Ei.not)(g)}function p(y){e.code((0,Ei._)`delete ${i}[${y}]`)}function h(y){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){p(y);return}if(r===!1){t.setParams({additionalProperty:y}),t.error(),s||e.break();return}if(typeof r=="object"&&!(0,ey.alwaysValidSchema)(a,r)){let g=e.name("valid");l.removeAdditional==="failing"?(m(y,g,!1),e.if((0,Ei.not)(g),()=>{t.reset(),p(y)})):(m(y,g),s||e.if((0,Ei.not)(g),()=>e.break()))}}function m(y,g,v){let E={keyword:"additionalProperties",dataProp:y,dataPropType:ey.Type.Str};v===!1&&Object.assign(E,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(E,g)}}};ZI.default=tse});var wj=b(GI=>{"use strict";Object.defineProperty(GI,"__esModule",{value:!0});var rse=ep(),vj=Yn(),VI=rt(),bj=HI(),nse={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&bj.default.code(new rse.KeywordCxt(o,bj.default,"additionalProperties"));let a=(0,vj.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=VI.mergeEvaluated.props(e,(0,VI.toHash)(a),o.props));let s=a.filter(d=>!(0,VI.alwaysValidSchema)(o,r[d]));if(s.length===0)return;let l=e.name("valid");for(let d of s)c(d)?u(d):(e.if((0,vj.propertyInData)(e,i,d,o.opts.ownProperties)),u(d),o.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(l);function c(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}function u(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},l)}}};GI.default=nse});var Ij=b(WI=>{"use strict";Object.defineProperty(WI,"__esModule",{value:!0});var xj=Yn(),ty=Ue(),Sj=rt(),Ej=rt(),ise={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:o}=t,{opts:a}=o,s=(0,xj.allSchemaProperties)(r),l=s.filter(m=>(0,Sj.alwaysValidSchema)(o,r[m]));if(s.length===0||l.length===s.length&&(!o.opts.unevaluated||o.props===!0))return;let c=a.strictSchema&&!a.allowMatchingProperties&&i.properties,u=e.name("valid");o.props!==!0&&!(o.props instanceof ty.Name)&&(o.props=(0,Ej.evaluatedPropsToName)(e,o.props));let{props:d}=o;f();function f(){for(let m of s)c&&p(m),o.allErrors?h(m):(e.var(u,!0),h(m),e.if(u))}function p(m){for(let y in c)new RegExp(m).test(y)&&(0,Sj.checkStrictMode)(o,`property ${y} matches pattern ${m} (use allowMatchingProperties)`)}function h(m){e.forIn("key",n,y=>{e.if((0,ty._)`${(0,xj.usePattern)(t,m)}.test(${y})`,()=>{let g=l.includes(m);g||t.subschema({keyword:"patternProperties",schemaProp:m,dataProp:y,dataPropType:Ej.Type.Str},u),o.opts.unevaluated&&d!==!0?e.assign((0,ty._)`${d}[${y}]`,!0):!g&&!o.allErrors&&e.if((0,ty.not)(u),()=>e.break())})})}}};WI.default=ise});var $j=b(JI=>{"use strict";Object.defineProperty(JI,"__esModule",{value:!0});var ose=rt(),ase={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,ose.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};JI.default=ase});var Pj=b(KI=>{"use strict";Object.defineProperty(KI,"__esModule",{value:!0});var sse=Yn(),lse={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:sse.validateUnion,error:{message:"must match a schema in anyOf"}};KI.default=lse});var Tj=b(YI=>{"use strict";Object.defineProperty(YI,"__esModule",{value:!0});var ry=Ue(),cse=rt(),use={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,ry._)`{passingSchemas: ${t.passing}}`},dse={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:use,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=e.let("valid",!1),s=e.let("passing",null),l=e.name("_valid");t.setParams({passing:s}),e.block(c),t.result(a,()=>t.reset(),()=>t.error(!0));function c(){o.forEach((u,d)=>{let f;(0,cse.alwaysValidSchema)(i,u)?e.var(l,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},l),d>0&&e.if((0,ry._)`${l} && ${a}`).assign(a,!1).assign(s,(0,ry._)`[${s}, ${d}]`).else(),e.if(l,()=>{e.assign(a,!0),e.assign(s,d),f&&t.mergeEvaluated(f,ry.Name)})})}}};YI.default=dse});var Aj=b(XI=>{"use strict";Object.defineProperty(XI,"__esModule",{value:!0});var fse=rt(),pse={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((o,a)=>{if((0,fse.alwaysValidSchema)(n,o))return;let s=t.subschema({keyword:"allOf",schemaProp:a},i);t.ok(i),t.mergeEvaluated(s)})}};XI.default=pse});var Rj=b(QI=>{"use strict";Object.defineProperty(QI,"__esModule",{value:!0});var ny=Ue(),Cj=rt(),hse={message:({params:t})=>(0,ny.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,ny._)`{failingKeyword: ${t.ifClause}}`},mse={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:hse,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Cj.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=kj(n,"then"),o=kj(n,"else");if(!i&&!o)return;let a=e.let("valid",!0),s=e.name("_valid");if(l(),t.reset(),i&&o){let u=e.let("ifClause");t.setParams({ifClause:u}),e.if(s,c("then",u),c("else",u))}else i?e.if(s,c("then")):e.if((0,ny.not)(s),c("else"));t.pass(a,()=>t.error(!0));function l(){let u=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);t.mergeEvaluated(u)}function c(u,d){return()=>{let f=t.subschema({keyword:u},s);e.assign(a,s),t.mergeValidEvaluated(f,a),d?e.assign(d,(0,ny._)`${u}`):t.setParams({ifClause:u})}}}};function kj(t,e){let r=t.schema[e];return r!==void 0&&!(0,Cj.alwaysValidSchema)(t,r)}QI.default=mse});var Dj=b(e$=>{"use strict";Object.defineProperty(e$,"__esModule",{value:!0});var gse=rt(),yse={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,gse.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};e$.default=yse});var Oj=b(t$=>{"use strict";Object.defineProperty(t$,"__esModule",{value:!0});var _se=jI(),vse=uj(),bse=zI(),wse=fj(),xse=pj(),Sse=gj(),Ese=_j(),Ise=HI(),$se=wj(),Pse=Ij(),Tse=$j(),Ase=Pj(),kse=Tj(),Cse=Aj(),Rse=Rj(),Dse=Dj();function Ose(t=!1){let e=[Tse.default,Ase.default,kse.default,Cse.default,Rse.default,Dse.default,Ese.default,Ise.default,Sse.default,$se.default,Pse.default];return t?e.push(vse.default,wse.default):e.push(_se.default,bse.default),e.push(xse.default),e}t$.default=Ose});var Mj=b(r$=>{"use strict";Object.defineProperty(r$,"__esModule",{value:!0});var Yt=Ue(),Mse={message:({schemaCode:t})=>(0,Yt.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Yt._)`{format: ${t}}`},Nse={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Mse,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:s}=t,{opts:l,errSchemaPath:c,schemaEnv:u,self:d}=s;if(!l.validateFormats)return;i?f():p();function f(){let h=r.scopeValue("formats",{ref:d.formats,code:l.code.formats}),m=r.const("fDef",(0,Yt._)`${h}[${a}]`),y=r.let("fType"),g=r.let("format");r.if((0,Yt._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(y,(0,Yt._)`${m}.type || "string"`).assign(g,(0,Yt._)`${m}.validate`),()=>r.assign(y,(0,Yt._)`"string"`).assign(g,m)),t.fail$data((0,Yt.or)(v(),E()));function v(){return l.strictSchema===!1?Yt.nil:(0,Yt._)`${a} && !${g}`}function E(){let x=u.$async?(0,Yt._)`(${m}.async ? await ${g}(${n}) : ${g}(${n}))`:(0,Yt._)`${g}(${n})`,w=(0,Yt._)`(typeof ${g} == "function" ? ${x} : ${g}.test(${n}))`;return(0,Yt._)`${g} && ${g} !== true && ${y} === ${e} && !${w}`}}function p(){let h=d.formats[o];if(!h){v();return}if(h===!0)return;let[m,y,g]=E(h);m===e&&t.pass(x());function v(){if(l.strictSchema===!1){d.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${o}" ignored in schema at path "${c}"`}}function E(w){let k=w instanceof RegExp?(0,Yt.regexpCode)(w):l.code.formats?(0,Yt._)`${l.code.formats}${(0,Yt.getProperty)(o)}`:void 0,P=r.scopeValue("formats",{key:o,ref:w,code:k});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,Yt._)`${P}.validate`]:["string",w,P]}function x(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw new Error("async format in sync schema");return(0,Yt._)`await ${g}(${n})`}return typeof y=="function"?(0,Yt._)`${g}(${n})`:(0,Yt._)`${g}.test(${n})`}}}};r$.default=Nse});var Nj=b(n$=>{"use strict";Object.defineProperty(n$,"__esModule",{value:!0});var jse=Mj(),zse=[jse.default];n$.default=zse});var jj=b(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.contentVocabulary=Zc.metadataVocabulary=void 0;Zc.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Zc.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Lj=b(i$=>{"use strict";Object.defineProperty(i$,"__esModule",{value:!0});var Lse=VN(),Fse=aj(),Bse=Oj(),Use=Nj(),zj=jj(),qse=[Lse.default,Fse.default,(0,Bse.default)(),Use.default,zj.metadataVocabulary,zj.contentVocabulary];i$.default=qse});var Bj=b(iy=>{"use strict";Object.defineProperty(iy,"__esModule",{value:!0});iy.DiscrError=void 0;var Fj;(function(t){t.Tag="tag",t.Mapping="mapping"})(Fj||(iy.DiscrError=Fj={}))});var qj=b(a$=>{"use strict";Object.defineProperty(a$,"__esModule",{value:!0});var Hc=Ue(),o$=Bj(),Uj=F0(),Zse=tp(),Hse=rt(),Vse={message:({params:{discrError:t,tagName:e}})=>t===o$.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,Hc._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},Gse={keyword:"discriminator",type:"object",schemaType:"object",error:Vse,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:o}=t,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=n.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let l=e.let("valid",!1),c=e.const("tag",(0,Hc._)`${r}${(0,Hc.getProperty)(s)}`);e.if((0,Hc._)`typeof ${c} == "string"`,()=>u(),()=>t.error(!1,{discrError:o$.DiscrError.Tag,tag:c,tagName:s})),t.ok(l);function u(){let p=f();e.if(!1);for(let h in p)e.elseIf((0,Hc._)`${c} === ${h}`),e.assign(l,d(p[h]));e.else(),t.error(!1,{discrError:o$.DiscrError.Mapping,tag:c,tagName:s}),e.endIf()}function d(p){let h=e.name("valid"),m=t.subschema({keyword:"oneOf",schemaProp:p},h);return t.mergeEvaluated(m,Hc.Name),h}function f(){var p;let h={},m=g(i),y=!0;for(let x=0;x<a.length;x++){let w=a[x];if(w!=null&&w.$ref&&!(0,Hse.schemaHasRulesButRef)(w,o.self.RULES)){let P=w.$ref;if(w=Uj.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,P),w instanceof Uj.SchemaEnv&&(w=w.schema),w===void 0)throw new Zse.default(o.opts.uriResolver,o.baseId,P)}let k=(p=w==null?void 0:w.properties)===null||p===void 0?void 0:p[s];if(typeof k!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);y=y&&(m||g(w)),v(k,x)}if(!y)throw new Error(`discriminator: "${s}" must be required`);return h;function g({required:x}){return Array.isArray(x)&&x.includes(s)}function v(x,w){if(x.const)E(x.const,w);else if(x.enum)for(let k of x.enum)E(k,w);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function E(x,w){if(typeof x!="string"||x in h)throw new Error(`discriminator: "${s}" values must be unique strings`);h[x]=w}}}};a$.default=Gse});var Zj=b((lBe,Wse)=>{Wse.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 Vj=b((Nt,s$)=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.MissingRefError=Nt.ValidationError=Nt.CodeGen=Nt.Name=Nt.nil=Nt.stringify=Nt.str=Nt._=Nt.KeywordCxt=Nt.Ajv=void 0;var Jse=FN(),Kse=Lj(),Yse=qj(),Hj=Zj(),Xse=["/properties"],oy="http://json-schema.org/draft-07/schema",Vc=class extends Jse.default{_addVocabularies(){super._addVocabularies(),Kse.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Yse.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Hj,Xse):Hj;this.addMetaSchema(e,oy,!1),this.refs["http://json-schema.org/schema"]=oy}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(oy)?oy:void 0)}};Nt.Ajv=Vc;s$.exports=Nt=Vc;s$.exports.Ajv=Vc;Object.defineProperty(Nt,"__esModule",{value:!0});Nt.default=Vc;var Qse=ep();Object.defineProperty(Nt,"KeywordCxt",{enumerable:!0,get:function(){return Qse.KeywordCxt}});var Gc=Ue();Object.defineProperty(Nt,"_",{enumerable:!0,get:function(){return Gc._}});Object.defineProperty(Nt,"str",{enumerable:!0,get:function(){return Gc.str}});Object.defineProperty(Nt,"stringify",{enumerable:!0,get:function(){return Gc.stringify}});Object.defineProperty(Nt,"nil",{enumerable:!0,get:function(){return Gc.nil}});Object.defineProperty(Nt,"Name",{enumerable:!0,get:function(){return Gc.Name}});Object.defineProperty(Nt,"CodeGen",{enumerable:!0,get:function(){return Gc.CodeGen}});var ele=z0();Object.defineProperty(Nt,"ValidationError",{enumerable:!0,get:function(){return ele.default}});var tle=tp();Object.defineProperty(Nt,"MissingRefError",{enumerable:!0,get:function(){return tle.default}})});var e6=b(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.formatNames=Ji.fastFormats=Ji.fullFormats=void 0;function Wi(t,e){return{validate:t,compare:e}}Ji.fullFormats={date:Wi(Kj,d$),time:Wi(c$(!0),f$),"date-time":Wi(Gj(!0),Xj),"iso-time":Wi(c$(),Yj),"iso-date-time":Wi(Gj(),Qj),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:sle,"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:hle,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:lle,int32:{type:"number",validate:dle},int64:{type:"number",validate:fle},float:{type:"number",validate:Jj},double:{type:"number",validate:Jj},password:!0,binary:!0};Ji.fastFormats={...Ji.fullFormats,date:Wi(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,d$),time:Wi(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f$),"date-time":Wi(/^\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,Xj),"iso-time":Wi(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Yj),"iso-date-time":Wi(/^\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,Qj),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};Ji.formatNames=Object.keys(Ji.fullFormats);function rle(t){return t%4===0&&(t%100!==0||t%400===0)}var nle=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,ile=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Kj(t){let e=nle.exec(t);if(!e)return!1;let r=+e[1],n=+e[2],i=+e[3];return n>=1&&n<=12&&i>=1&&i<=(n===2&&rle(r)?29:ile[n])}function d$(t,e){if(t&&e)return t>e?1:t<e?-1:0}var l$=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c$(t){return function(r){let n=l$.exec(r);if(!n)return!1;let i=+n[1],o=+n[2],a=+n[3],s=n[4],l=n[5]==="-"?-1:1,c=+(n[6]||0),u=+(n[7]||0);if(c>23||u>59||t&&!s)return!1;if(i<=23&&o<=59&&a<60)return!0;let d=o-u*l,f=i-c*l-(d<0?1:0);return(f===23||f===-1)&&(d===59||d===-1)&&a<61}}function f$(t,e){if(!(t&&e))return;let r=new Date("2020-01-01T"+t).valueOf(),n=new Date("2020-01-01T"+e).valueOf();if(r&&n)return r-n}function Yj(t,e){if(!(t&&e))return;let r=l$.exec(t),n=l$.exec(e);if(r&&n)return t=r[1]+r[2]+r[3],e=n[1]+n[2]+n[3],t>e?1:t<e?-1:0}var u$=/t|\s/i;function Gj(t){let e=c$(t);return function(n){let i=n.split(u$);return i.length===2&&Kj(i[0])&&e(i[1])}}function Xj(t,e){if(!(t&&e))return;let r=new Date(t).valueOf(),n=new Date(e).valueOf();if(r&&n)return r-n}function Qj(t,e){if(!(t&&e))return;let[r,n]=t.split(u$),[i,o]=e.split(u$),a=d$(r,i);if(a!==void 0)return a||f$(n,o)}var ole=/\/|:/,ale=/^(?:[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 sle(t){return ole.test(t)&&ale.test(t)}var Wj=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function lle(t){return Wj.lastIndex=0,Wj.test(t)}var cle=-(2**31),ule=2**31-1;function dle(t){return Number.isInteger(t)&&t<=ule&&t>=cle}function fle(t){return Number.isInteger(t)}function Jj(){return!0}var ple=/[^\\]\\Z/;function hle(t){if(ple.test(t))return!1;try{return new RegExp(t),!0}catch{return!1}}});var yp=b(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});lt.regexpCode=lt.getEsmExportName=lt.getProperty=lt.safeStringify=lt.stringify=lt.strConcat=lt.addCodeArg=lt.str=lt._=lt.nil=lt._Code=lt.Name=lt.IDENTIFIER=lt._CodeOrName=void 0;var mp=class{};lt._CodeOrName=mp;lt.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ks=class extends mp{constructor(e){if(super(),!lt.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}}};lt.Name=Ks;var ei=class extends mp{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((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof Ks&&(r[n.str]=(r[n.str]||0)+1),r),{})}};lt._Code=ei;lt.nil=new ei("");function t6(t,...e){let r=[t[0]],n=0;for(;n<e.length;)h$(r,e[n]),r.push(t[++n]);return new ei(r)}lt._=t6;var p$=new ei("+");function r6(t,...e){let r=[gp(t[0])],n=0;for(;n<e.length;)r.push(p$),h$(r,e[n]),r.push(p$,gp(t[++n]));return mle(r),new ei(r)}lt.str=r6;function h$(t,e){e instanceof ei?t.push(...e._items):e instanceof Ks?t.push(e):t.push(_le(e))}lt.addCodeArg=h$;function mle(t){let e=1;for(;e<t.length-1;){if(t[e]===p$){let r=gle(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function gle(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof Ks||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 Ks))return`"${t}${e.slice(1)}`}function yle(t,e){return e.emptyStr()?t:t.emptyStr()?e:r6`${t}${e}`}lt.strConcat=yle;function _le(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:gp(Array.isArray(t)?t.join(","):t)}function vle(t){return new ei(gp(t))}lt.stringify=vle;function gp(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}lt.safeStringify=gp;function ble(t){return typeof t=="string"&<.IDENTIFIER.test(t)?new ei(`.${t}`):t6`[${t}]`}lt.getProperty=ble;function wle(t){if(typeof t=="string"&<.IDENTIFIER.test(t))return new ei(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}lt.getEsmExportName=wle;function xle(t){return new ei(t.toString())}lt.regexpCode=xle});var y$=b(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.ValueScope=_n.ValueScopeName=_n.Scope=_n.varKinds=_n.UsedValueState=void 0;var yn=yp(),m$=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},ay;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(ay||(_n.UsedValueState=ay={}));_n.varKinds={const:new yn.Name("const"),let:new yn.Name("let"),var:new yn.Name("var")};var sy=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof yn.Name?e:this.name(e)}name(e){return new yn.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.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}}};_n.Scope=sy;var ly=class extends yn.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,yn._)`.${new yn.Name(r)}[${n}]`}};_n.ValueScopeName=ly;var Sle=(0,yn._)`\n`,g$=class extends sy{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Sle:yn.nil}}get(){return this._scope}name(e){return new ly(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(e),{prefix:o}=i,a=(n=r.key)!==null&&n!==void 0?n:r.ref,s=this._values[o];if(s){let u=s.get(a);if(u)return u}else s=this._values[o]=new Map;s.set(a,i);let l=this._scope[o]||(this._scope[o]=[]),c=l.length;return l[c]=r.ref,i.setValue(r,{property:o,itemIndex:c}),i}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,yn._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},r,n)}_reduceValues(e,r,n={},i){let o=yn.nil;for(let a in e){let s=e[a];if(!s)continue;let l=n[a]=n[a]||new Map;s.forEach(c=>{if(l.has(c))return;l.set(c,ay.Started);let u=r(c);if(u){let d=this.opts.es5?_n.varKinds.var:_n.varKinds.const;o=(0,yn._)`${o}${d} ${c} = ${u};${this.opts._n}`}else if(u=i==null?void 0:i(c))o=(0,yn._)`${o}${u}${this.opts._n}`;else throw new m$(c);l.set(c,ay.Completed)})}return o}};_n.ValueScope=g$});var Ne=b(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.or=Fe.and=Fe.not=Fe.CodeGen=Fe.operators=Fe.varKinds=Fe.ValueScopeName=Fe.ValueScope=Fe.Scope=Fe.Name=Fe.regexpCode=Fe.stringify=Fe.getProperty=Fe.nil=Fe.strConcat=Fe.str=Fe._=void 0;var Qe=yp(),Ii=y$(),Ta=yp();Object.defineProperty(Fe,"_",{enumerable:!0,get:function(){return Ta._}});Object.defineProperty(Fe,"str",{enumerable:!0,get:function(){return Ta.str}});Object.defineProperty(Fe,"strConcat",{enumerable:!0,get:function(){return Ta.strConcat}});Object.defineProperty(Fe,"nil",{enumerable:!0,get:function(){return Ta.nil}});Object.defineProperty(Fe,"getProperty",{enumerable:!0,get:function(){return Ta.getProperty}});Object.defineProperty(Fe,"stringify",{enumerable:!0,get:function(){return Ta.stringify}});Object.defineProperty(Fe,"regexpCode",{enumerable:!0,get:function(){return Ta.regexpCode}});Object.defineProperty(Fe,"Name",{enumerable:!0,get:function(){return Ta.Name}});var fy=y$();Object.defineProperty(Fe,"Scope",{enumerable:!0,get:function(){return fy.Scope}});Object.defineProperty(Fe,"ValueScope",{enumerable:!0,get:function(){return fy.ValueScope}});Object.defineProperty(Fe,"ValueScopeName",{enumerable:!0,get:function(){return fy.ValueScopeName}});Object.defineProperty(Fe,"varKinds",{enumerable:!0,get:function(){return fy.varKinds}});Fe.operators={GT:new Qe._Code(">"),GTE:new Qe._Code(">="),LT:new Qe._Code("<"),LTE:new Qe._Code("<="),EQ:new Qe._Code("==="),NEQ:new Qe._Code("!=="),NOT:new Qe._Code("!"),OR:new Qe._Code("||"),AND:new Qe._Code("&&"),ADD:new Qe._Code("+")};var zo=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},_$=class extends zo{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Ii.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${i};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=Jc(this.rhs,e,r)),this}get names(){return this.rhs instanceof Qe._CodeOrName?this.rhs.names:{}}},cy=class extends zo{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof Qe.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=Jc(this.rhs,e,r),this}get names(){let e=this.lhs instanceof Qe.Name?{}:{...this.lhs.names};return dy(e,this.rhs)}},v$=class extends cy{constructor(e,r,n,i){super(e,n,i),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},b$=class extends zo{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},w$=class extends zo{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},x$=class extends zo{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},S$=class extends zo{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=Jc(this.code,e,r),this}get names(){return this.code instanceof Qe._CodeOrName?this.code.names:{}}},_p=class extends zo{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,i=n.length;for(;i--;){let o=n[i];o.optimizeNames(e,r)||(Ele(e,o.names),n.splice(i,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>Qs(e,r.names),{})}},Lo=class extends _p{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},E$=class extends _p{},Wc=class extends Lo{};Wc.kind="else";var Ys=class t extends Lo{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new Wc(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(n6(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=Jc(this.condition,e,r),this}get names(){let e=super.names;return dy(e,this.condition),this.else&&Qs(e,this.else.names),e}};Ys.kind="if";var Xs=class extends Lo{};Xs.kind="for";var I$=class extends Xs{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=Jc(this.iteration,e,r),this}get names(){return Qs(super.names,this.iteration.names)}},$$=class extends Xs{constructor(e,r,n,i){super(),this.varKind=e,this.name=r,this.from=n,this.to=i}render(e){let r=e.es5?Ii.varKinds.var:this.varKind,{name:n,from:i,to:o}=this;return`for(${r} ${n}=${i}; ${n}<${o}; ${n}++)`+super.render(e)}get names(){let e=dy(super.names,this.from);return dy(e,this.to)}},uy=class extends Xs{constructor(e,r,n,i){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=i}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=Jc(this.iterable,e,r),this}get names(){return Qs(super.names,this.iterable.names)}},vp=class extends Lo{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};vp.kind="func";var bp=class extends _p{render(e){return"return "+super.render(e)}};bp.kind="return";var P$=class extends Lo{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,i;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(i=this.finally)===null||i===void 0||i.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&Qs(e,this.catch.names),this.finally&&Qs(e,this.finally.names),e}},wp=class extends Lo{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};wp.kind="catch";var xp=class extends Lo{render(e){return"finally"+super.render(e)}};xp.kind="finally";var T$=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
|
|
14
14
|
`:""},this._extScope=e,this._scope=new Ii.Scope({parent:e}),this._nodes=[new E$]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,i){let o=this._scope.toName(r);return n!==void 0&&i&&(this._constants[o.str]=n),this._leafNode(new _$(e,o,n)),o}const(e,r,n){return this._def(Ii.varKinds.const,e,r,n)}let(e,r,n){return this._def(Ii.varKinds.let,e,r,n)}var(e,r,n){return this._def(Ii.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new cy(e,r,n))}add(e,r){return this._leafNode(new v$(e,Fe.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==Qe.nil&&this._leafNode(new S$(e)),this}object(...e){let r=["{"];for(let[n,i]of e)r.length>1&&r.push(","),r.push(n),(n!==i||this.opts.es5)&&(r.push(":"),(0,Qe.addCodeArg)(r,i));return r.push("}"),new Qe._Code(r)}if(e,r,n){if(this._blockNode(new Ys(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Ys(e))}else(){return this._elseNode(new Wc)}endIf(){return this._endBlockNode(Ys,Wc)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new I$(e),r)}forRange(e,r,n,i,o=this.opts.es5?Ii.varKinds.var:Ii.varKinds.let){let a=this._scope.toName(e);return this._for(new $$(o,a,r,n),()=>i(a))}forOf(e,r,n,i=Ii.varKinds.const){let o=this._scope.toName(e);if(this.opts.es5){let a=r instanceof Qe.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,Qe._)`${a}.length`,s=>{this.var(o,(0,Qe._)`${a}[${s}]`),n(o)})}return this._for(new uy("of",i,o,r),()=>n(o))}forIn(e,r,n,i=this.opts.es5?Ii.varKinds.var:Ii.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Qe._)`Object.keys(${r})`,n);let o=this._scope.toName(e);return this._for(new uy("in",i,o,r),()=>n(o))}endFor(){return this._endBlockNode(Xs)}label(e){return this._leafNode(new b$(e))}break(e){return this._leafNode(new w$(e))}return(e){let r=new bp;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(bp)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new P$;if(this._blockNode(i),this.code(e),r){let o=this.name("e");this._currNode=i.catch=new wp(o),r(o)}return n&&(this._currNode=i.finally=new xp,this.code(n)),this._endBlockNode(wp,xp)}throw(e){return this._leafNode(new x$(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=Qe.nil,n,i){return this._blockNode(new vp(e,r,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(vp)}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,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof Ys))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};Fe.CodeGen=T$;function Qs(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function dy(t,e){return e instanceof Qe._CodeOrName?Qs(t,e.names):t}function Jc(t,e,r){if(t instanceof Qe.Name)return n(t);if(!i(t))return t;return new Qe._Code(t._items.reduce((o,a)=>(a instanceof Qe.Name&&(a=n(a)),a instanceof Qe._Code?o.push(...a._items):o.push(a),o),[]));function n(o){let a=r[o.str];return a===void 0||e[o.str]!==1?o:(delete e[o.str],a)}function i(o){return o instanceof Qe._Code&&o._items.some(a=>a instanceof Qe.Name&&e[a.str]===1&&r[a.str]!==void 0)}}function Ele(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function n6(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Qe._)`!${A$(t)}`}Fe.not=n6;var Ile=i6(Fe.operators.AND);function $le(...t){return t.reduce(Ile)}Fe.and=$le;var Ple=i6(Fe.operators.OR);function Tle(...t){return t.reduce(Ple)}Fe.or=Tle;function i6(t){return(e,r)=>e===Qe.nil?r:r===Qe.nil?e:(0,Qe._)`${A$(e)} ${t} ${A$(r)}`}function A$(t){return t instanceof Qe.Name?t:(0,Qe._)`(${t})`}});var it=b(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.checkStrictMode=Ze.getErrorPath=Ze.Type=Ze.useFunc=Ze.setEvaluated=Ze.evaluatedPropsToName=Ze.mergeEvaluated=Ze.eachItem=Ze.unescapeJsonPointer=Ze.escapeJsonPointer=Ze.escapeFragment=Ze.unescapeFragment=Ze.schemaRefOrVal=Ze.schemaHasRulesButRef=Ze.schemaHasRules=Ze.checkUnknownRules=Ze.alwaysValidSchema=Ze.toHash=void 0;var At=Ne(),Ale=yp();function kle(t){let e={};for(let r of t)e[r]=!0;return e}Ze.toHash=kle;function Cle(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(s6(t,e),!l6(e,t.self.RULES.all))}Ze.alwaysValidSchema=Cle;function s6(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let i=n.RULES.keywords;for(let o in e)i[o]||d6(t,`unknown keyword: "${o}"`)}Ze.checkUnknownRules=s6;function l6(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}Ze.schemaHasRules=l6;function Rle(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}Ze.schemaHasRulesButRef=Rle;function Dle({topSchemaRef:t,schemaPath:e},r,n,i){if(!i){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,At._)`${r}`}return(0,At._)`${t}${e}${(0,At.getProperty)(n)}`}Ze.schemaRefOrVal=Dle;function Ole(t){return c6(decodeURIComponent(t))}Ze.unescapeFragment=Ole;function Mle(t){return encodeURIComponent(C$(t))}Ze.escapeFragment=Mle;function C$(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}Ze.escapeJsonPointer=C$;function c6(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}Ze.unescapeJsonPointer=c6;function Nle(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}Ze.eachItem=Nle;function o6({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(i,o,a,s)=>{let l=a===void 0?o:a instanceof At.Name?(o instanceof At.Name?t(i,o,a):e(i,o,a),a):o instanceof At.Name?(e(i,a,o),o):r(o,a);return s===At.Name&&!(l instanceof At.Name)?n(i,l):l}}Ze.mergeEvaluated={props:o6({mergeNames:(t,e,r)=>t.if((0,At._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,At._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,At._)`${r} || {}`).code((0,At._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,At._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,At._)`${r} || {}`),R$(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:u6}),items:o6({mergeNames:(t,e,r)=>t.if((0,At._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,At._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,At._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,At._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function u6(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,At._)`{}`);return e!==void 0&&R$(t,r,e),r}Ze.evaluatedPropsToName=u6;function R$(t,e,r){Object.keys(r).forEach(n=>t.assign((0,At._)`${e}${(0,At.getProperty)(n)}`,!0))}Ze.setEvaluated=R$;var a6={};function jle(t,e){return t.scopeValue("func",{ref:e,code:a6[e.code]||(a6[e.code]=new Ale._Code(e.code))})}Ze.useFunc=jle;var k$;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(k$||(Ze.Type=k$={}));function zle(t,e,r){if(t instanceof At.Name){let n=e===k$.Num;return r?n?(0,At._)`"[" + ${t} + "]"`:(0,At._)`"['" + ${t} + "']"`:n?(0,At._)`"/" + ${t}`:(0,At._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,At.getProperty)(t).toString():"/"+C$(t)}Ze.getErrorPath=zle;function d6(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}Ze.checkStrictMode=d6});var Fo=b(D$=>{"use strict";Object.defineProperty(D$,"__esModule",{value:!0});var Nr=Ne(),Lle={data:new Nr.Name("data"),valCxt:new Nr.Name("valCxt"),instancePath:new Nr.Name("instancePath"),parentData:new Nr.Name("parentData"),parentDataProperty:new Nr.Name("parentDataProperty"),rootData:new Nr.Name("rootData"),dynamicAnchors:new Nr.Name("dynamicAnchors"),vErrors:new Nr.Name("vErrors"),errors:new Nr.Name("errors"),this:new Nr.Name("this"),self:new Nr.Name("self"),scope:new Nr.Name("scope"),json:new Nr.Name("json"),jsonPos:new Nr.Name("jsonPos"),jsonLen:new Nr.Name("jsonLen"),jsonPart:new Nr.Name("jsonPart")};D$.default=Lle});var Sp=b(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.extendErrors=jr.resetErrorsCount=jr.reportExtraError=jr.reportError=jr.keyword$DataError=jr.keywordError=void 0;var ot=Ne(),py=it(),nn=Fo();jr.keywordError={message:({keyword:t})=>(0,ot.str)`must pass "${t}" keyword validation`};jr.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,ot.str)`"${t}" keyword must be ${e} ($data)`:(0,ot.str)`"${t}" keyword is invalid ($data)`};function Fle(t,e=jr.keywordError,r,n){let{it:i}=t,{gen:o,compositeRule:a,allErrors:s}=i,l=h6(t,e,r);n??(a||s)?f6(o,l):p6(i,(0,ot._)`[${l}]`)}jr.reportError=Fle;function Ble(t,e=jr.keywordError,r){let{it:n}=t,{gen:i,compositeRule:o,allErrors:a}=n,s=h6(t,e,r);f6(i,s),o||a||p6(n,nn.default.vErrors)}jr.reportExtraError=Ble;function Ule(t,e){t.assign(nn.default.errors,e),t.if((0,ot._)`${nn.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,ot._)`${nn.default.vErrors}.length`,e),()=>t.assign(nn.default.vErrors,null)))}jr.resetErrorsCount=Ule;function qle({gen:t,keyword:e,schemaValue:r,data:n,errsCount:i,it:o}){if(i===void 0)throw new Error("ajv implementation error");let a=t.name("err");t.forRange("i",i,nn.default.errors,s=>{t.const(a,(0,ot._)`${nn.default.vErrors}[${s}]`),t.if((0,ot._)`${a}.instancePath === undefined`,()=>t.assign((0,ot._)`${a}.instancePath`,(0,ot.strConcat)(nn.default.instancePath,o.errorPath))),t.assign((0,ot._)`${a}.schemaPath`,(0,ot.str)`${o.errSchemaPath}/${e}`),o.opts.verbose&&(t.assign((0,ot._)`${a}.schema`,r),t.assign((0,ot._)`${a}.data`,n))})}jr.extendErrors=qle;function f6(t,e){let r=t.const("err",e);t.if((0,ot._)`${nn.default.vErrors} === null`,()=>t.assign(nn.default.vErrors,(0,ot._)`[${r}]`),(0,ot._)`${nn.default.vErrors}.push(${r})`),t.code((0,ot._)`${nn.default.errors}++`)}function p6(t,e){let{gen:r,validateName:n,schemaEnv:i}=t;i.$async?r.throw((0,ot._)`new ${t.ValidationError}(${e})`):(r.assign((0,ot._)`${n}.errors`,e),r.return(!1))}var el={keyword:new ot.Name("keyword"),schemaPath:new ot.Name("schemaPath"),params:new ot.Name("params"),propertyName:new ot.Name("propertyName"),message:new ot.Name("message"),schema:new ot.Name("schema"),parentSchema:new ot.Name("parentSchema")};function h6(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,ot._)`{}`:Zle(t,e,r)}function Zle(t,e,r={}){let{gen:n,it:i}=t,o=[Hle(i,r),Vle(t,r)];return Gle(t,e,o),n.object(...o)}function Hle({errorPath:t},{instancePath:e}){let r=e?(0,ot.str)`${t}${(0,py.getErrorPath)(e,py.Type.Str)}`:t;return[nn.default.instancePath,(0,ot.strConcat)(nn.default.instancePath,r)]}function Vle({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let i=n?e:(0,ot.str)`${e}/${t}`;return r&&(i=(0,ot.str)`${i}${(0,py.getErrorPath)(r,py.Type.Str)}`),[el.schemaPath,i]}function Gle(t,{params:e,message:r},n){let{keyword:i,data:o,schemaValue:a,it:s}=t,{opts:l,propertyName:c,topSchemaRef:u,schemaPath:d}=s;n.push([el.keyword,i],[el.params,typeof e=="function"?e(t):e||(0,ot._)`{}`]),l.messages&&n.push([el.message,typeof r=="function"?r(t):r]),l.verbose&&n.push([el.schema,a],[el.parentSchema,(0,ot._)`${u}${d}`],[nn.default.data,o]),c&&n.push([el.propertyName,c])}});var g6=b(Kc=>{"use strict";Object.defineProperty(Kc,"__esModule",{value:!0});Kc.boolOrEmptySchema=Kc.topBoolOrEmptySchema=void 0;var Wle=Sp(),Jle=Ne(),Kle=Fo(),Yle={message:"boolean schema is false"};function Xle(t){let{gen:e,schema:r,validateName:n}=t;r===!1?m6(t,!1):typeof r=="object"&&r.$async===!0?e.return(Kle.default.data):(e.assign((0,Jle._)`${n}.errors`,null),e.return(!0))}Kc.topBoolOrEmptySchema=Xle;function Qle(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),m6(t)):r.var(e,!0)}Kc.boolOrEmptySchema=Qle;function m6(t,e){let{gen:r,data:n}=t,i={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,Wle.reportError)(i,Yle,void 0,e)}});var O$=b(Yc=>{"use strict";Object.defineProperty(Yc,"__esModule",{value:!0});Yc.getRules=Yc.isJSONType=void 0;var ece=["string","number","integer","boolean","null","object","array"],tce=new Set(ece);function rce(t){return typeof t=="string"&&tce.has(t)}Yc.isJSONType=rce;function nce(){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:{}}}Yc.getRules=nce});var M$=b(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.shouldUseRule=Aa.shouldUseGroup=Aa.schemaHasRulesForType=void 0;function ice({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&y6(t,n)}Aa.schemaHasRulesForType=ice;function y6(t,e){return e.rules.some(r=>_6(t,r))}Aa.shouldUseGroup=y6;function _6(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}Aa.shouldUseRule=_6});var Ep=b(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.reportTypeError=zr.checkDataTypes=zr.checkDataType=zr.coerceAndCheckDataType=zr.getJSONTypes=zr.getSchemaTypes=zr.DataType=void 0;var oce=O$(),ace=M$(),sce=Sp(),De=Ne(),v6=it(),Xc;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(Xc||(zr.DataType=Xc={}));function lce(t){let e=b6(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}zr.getSchemaTypes=lce;function b6(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(oce.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}zr.getJSONTypes=b6;function cce(t,e){let{gen:r,data:n,opts:i}=t,o=uce(e,i.coerceTypes),a=e.length>0&&!(o.length===0&&e.length===1&&(0,ace.schemaHasRulesForType)(t,e[0]));if(a){let s=j$(e,n,i.strictNumbers,Xc.Wrong);r.if(s,()=>{o.length?dce(t,e,o):z$(t)})}return a}zr.coerceAndCheckDataType=cce;var w6=new Set(["string","number","integer","boolean","null"]);function uce(t,e){return e?t.filter(r=>w6.has(r)||e==="array"&&r==="array"):[]}function dce(t,e,r){let{gen:n,data:i,opts:o}=t,a=n.let("dataType",(0,De._)`typeof ${i}`),s=n.let("coerced",(0,De._)`undefined`);o.coerceTypes==="array"&&n.if((0,De._)`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>n.assign(i,(0,De._)`${i}[0]`).assign(a,(0,De._)`typeof ${i}`).if(j$(e,i,o.strictNumbers),()=>n.assign(s,i))),n.if((0,De._)`${s} !== undefined`);for(let c of r)(w6.has(c)||c==="array"&&o.coerceTypes==="array")&&l(c);n.else(),z$(t),n.endIf(),n.if((0,De._)`${s} !== undefined`,()=>{n.assign(i,s),fce(t,s)});function l(c){switch(c){case"string":n.elseIf((0,De._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,De._)`"" + ${i}`).elseIf((0,De._)`${i} === null`).assign(s,(0,De._)`""`);return;case"number":n.elseIf((0,De._)`${a} == "boolean" || ${i} === null
|
|
15
15
|
|| (${a} == "string" && ${i} && ${i} == +${i})`).assign(s,(0,De._)`+${i}`);return;case"integer":n.elseIf((0,De._)`${a} === "boolean" || ${i} === null
|
|
16
16
|
|| (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(s,(0,De._)`+${i}`);return;case"boolean":n.elseIf((0,De._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(s,!1).elseIf((0,De._)`${i} === "true" || ${i} === 1`).assign(s,!0);return;case"null":n.elseIf((0,De._)`${i} === "" || ${i} === 0 || ${i} === false`),n.assign(s,null);return;case"array":n.elseIf((0,De._)`${a} === "string" || ${a} === "number"
|
|
17
|
-
|| ${a} === "boolean" || ${i} === null`).assign(s,(0,De._)`[${i}]`)}}}function fce({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,De._)`${e} !== undefined`,()=>t.assign((0,De._)`${e}[${r}]`,n))}function N$(t,e,r,n=Xc.Correct){let i=n===Xc.Correct?De.operators.EQ:De.operators.NEQ,o;switch(t){case"null":return(0,De._)`${e} ${i} null`;case"array":o=(0,De._)`Array.isArray(${e})`;break;case"object":o=(0,De._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=a((0,De._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=a();break;default:return(0,De._)`typeof ${e} ${i} ${t}`}return n===Xc.Correct?o:(0,De.not)(o);function a(s=De.nil){return(0,De.and)((0,De._)`typeof ${e} == "number"`,s,r?(0,De._)`isFinite(${e})`:De.nil)}}zr.checkDataType=N$;function j$(t,e,r,n){if(t.length===1)return N$(t[0],e,r,n);let i,o=(0,v6.toHash)(t);if(o.array&&o.object){let a=(0,De._)`typeof ${e} != "object"`;i=o.null?a:(0,De._)`!${e} || ${a}`,delete o.null,delete o.array,delete o.object}else i=De.nil;o.number&&delete o.integer;for(let a in o)i=(0,De.and)(i,N$(a,e,r,n));return i}zr.checkDataTypes=j$;var pce={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,De._)`{type: ${t}}`:(0,De._)`{type: ${e}}`};function z$(t){let e=hce(t);(0,sce.reportError)(e,pce)}zr.reportTypeError=z$;function hce(t){let{gen:e,data:r,schema:n}=t,i=(0,v6.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var S6=b(hy=>{"use strict";Object.defineProperty(hy,"__esModule",{value:!0});hy.assignDefaults=void 0;var Qc=Ne(),mce=it();function gce(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)x6(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>x6(t,o,i.default))}hy.assignDefaults=gce;function x6(t,e,r){let{gen:n,compositeRule:i,data:o,opts:a}=t;if(r===void 0)return;let s=(0,Qc._)`${o}${(0,Qc.getProperty)(e)}`;if(i){(0,mce.checkStrictMode)(t,`default is ignored for: ${s}`);return}let l=(0,Qc._)`${s} === undefined`;a.useDefaults==="empty"&&(l=(0,Qc._)`${l} || ${s} === null || ${s} === ""`),n.if(l,(0,Qc._)`${s} = ${(0,Qc.stringify)(r)}`)}});var ti=b(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.validateUnion=xt.validateArray=xt.usePattern=xt.callValidateCode=xt.schemaProperties=xt.allSchemaProperties=xt.noPropertyInData=xt.propertyInData=xt.isOwnProperty=xt.hasPropFunc=xt.reportMissingProp=xt.checkMissingProp=xt.checkReportMissingProp=void 0;var jt=Ne(),L$=it(),ka=Fo(),yce=it();function _ce(t,e){let{gen:r,data:n,it:i}=t;r.if(B$(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,jt._)`${e}`},!0),t.error()})}xt.checkReportMissingProp=_ce;function vce({gen:t,data:e,it:{opts:r}},n,i){return(0,jt.or)(...n.map(o=>(0,jt.and)(B$(t,e,o,r.ownProperties),(0,jt._)`${i} = ${o}`)))}xt.checkMissingProp=vce;function bce(t,e){t.setParams({missingProperty:e},!0),t.error()}xt.reportMissingProp=bce;function E6(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,jt._)`Object.prototype.hasOwnProperty`})}xt.hasPropFunc=E6;function F$(t,e,r){return(0,jt._)`${E6(t)}.call(${e}, ${r})`}xt.isOwnProperty=F$;function wce(t,e,r,n){let i=(0,jt._)`${e}${(0,jt.getProperty)(r)} !== undefined`;return n?(0,jt._)`${i} && ${F$(t,e,r)}`:i}xt.propertyInData=wce;function B$(t,e,r,n){let i=(0,jt._)`${e}${(0,jt.getProperty)(r)} === undefined`;return n?(0,jt.or)(i,(0,jt.not)(F$(t,e,r))):i}xt.noPropertyInData=B$;function I6(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}xt.allSchemaProperties=I6;function xce(t,e){return I6(e).filter(r=>!(0,L$.alwaysValidSchema)(t,e[r]))}xt.schemaProperties=xce;function Sce({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},s,l,c){let u=c?(0,jt._)`${t}, ${e}, ${n}${i}`:e,d=[[ka.default.instancePath,(0,jt.strConcat)(ka.default.instancePath,o)],[ka.default.parentData,a.parentData],[ka.default.parentDataProperty,a.parentDataProperty],[ka.default.rootData,ka.default.rootData]];a.opts.dynamicRef&&d.push([ka.default.dynamicAnchors,ka.default.dynamicAnchors]);let f=(0,jt._)`${u}, ${r.object(...d)}`;return l!==jt.nil?(0,jt._)`${s}.call(${l}, ${f})`:(0,jt._)`${s}(${f})`}xt.callValidateCode=Sce;var Ece=(0,jt._)`new RegExp`;function Ice({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(r,n);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,jt._)`${i.code==="new RegExp"?Ece:(0,yce.useFunc)(t,i)}(${r}, ${n})`})}xt.usePattern=Ice;function $ce(t){let{gen:e,data:r,keyword:n,it:i}=t,o=e.name("valid");if(i.allErrors){let s=e.let("valid",!0);return a(()=>e.assign(s,!1)),s}return e.var(o,!0),a(()=>e.break()),o;function a(s){let l=e.const("len",(0,jt._)`${r}.length`);e.forRange("i",0,l,c=>{t.subschema({keyword:n,dataProp:c,dataPropType:L$.Type.Num},o),e.if((0,jt.not)(o),s)})}}xt.validateArray=$ce;function Pce(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(l=>(0,L$.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let a=e.let("valid",!1),s=e.name("_valid");e.block(()=>r.forEach((l,c)=>{let u=t.subschema({keyword:n,schemaProp:c,compositeRule:!0},s);e.assign(a,(0,jt._)`${a} || ${s}`),t.mergeValidEvaluated(u,s)||e.if((0,jt.not)(a))})),t.result(a,()=>t.reset(),()=>t.error(!0))}xt.validateUnion=Pce});var T6=b(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.validateKeywordUsage=Ki.validSchemaType=Ki.funcKeywordCode=Ki.macroKeywordCode=void 0;var on=Ne(),tl=Fo(),Tce=ti(),Ace=Sp();function kce(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=t,s=e.macro.call(a.self,i,o,a),l=P6(r,n,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let c=r.name("valid");t.subschema({schema:s,schemaPath:on.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:!0},c),t.pass(c,()=>t.error(!0))}Ki.macroKeywordCode=kce;function Cce(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:s,it:l}=t;Dce(l,e);let c=!s&&e.compile?e.compile.call(l.self,o,a,l):e.validate,u=P6(n,i,c),d=n.let("valid");t.block$data(d,f),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function f(){if(e.errors===!1)m(),e.modifying&&$6(t),y(()=>t.error());else{let g=e.async?p():h();e.modifying&&$6(t),y(()=>Rce(t,g))}}function p(){let g=n.let("ruleErrs",null);return n.try(()=>m((0,on._)`await `),v=>n.assign(d,!1).if((0,on._)`${v} instanceof ${l.ValidationError}`,()=>n.assign(g,(0,on._)`${v}.errors`),()=>n.throw(v))),g}function h(){let g=(0,on._)`${u}.errors`;return n.assign(g,null),m(on.nil),g}function m(g=e.async?(0,on._)`await `:on.nil){let v=l.opts.passContext?tl.default.this:tl.default.self,E=!("compile"in e&&!s||e.schema===!1);n.assign(d,(0,on._)`${g}${(0,Tce.callValidateCode)(t,u,v,E)}`,e.modifying)}function y(g){var v;n.if((0,on.not)((v=e.valid)!==null&&v!==void 0?v:d),g)}}Ki.funcKeywordCode=Cce;function $6(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,on._)`${n.parentData}[${n.parentDataProperty}]`))}function Rce(t,e){let{gen:r}=t;r.if((0,on._)`Array.isArray(${e})`,()=>{r.assign(tl.default.vErrors,(0,on._)`${tl.default.vErrors} === null ? ${e} : ${tl.default.vErrors}.concat(${e})`).assign(tl.default.errors,(0,on._)`${tl.default.vErrors}.length`),(0,Ace.extendErrors)(t)},()=>t.error())}function Dce({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function P6(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,on.stringify)(r)})}function Oce(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}Ki.validSchemaType=Oce;function Mce({schema:t,opts:e,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let a=i.dependencies;if(a!=null&&a.some(s=>!Object.prototype.hasOwnProperty.call(t,s)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let l=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(l);else throw new Error(l)}}Ki.validateKeywordUsage=Mce});var k6=b(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.extendSubschemaMode=Ca.extendSubschemaData=Ca.getSubschema=void 0;var Yi=Ne(),A6=it();function Nce(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let s=t.schema[e];return r===void 0?{schema:s,schemaPath:(0,Yi._)`${t.schemaPath}${(0,Yi.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,Yi._)`${t.schemaPath}${(0,Yi.getProperty)(e)}${(0,Yi.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,A6.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Ca.getSubschema=Nce;function jce(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=e;if(r!==void 0){let{errorPath:c,dataPathArr:u,opts:d}=e,f=s.let("data",(0,Yi._)`${e.data}${(0,Yi.getProperty)(r)}`,!0);l(f),t.errorPath=(0,Yi.str)`${c}${(0,A6.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,Yi._)`${r}`,t.dataPathArr=[...u,t.parentDataProperty]}if(i!==void 0){let c=i instanceof Yi.Name?i:s.let("data",i,!0);l(c),a!==void 0&&(t.propertyName=a)}o&&(t.dataTypes=o);function l(c){t.data=c,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,c]}}Ca.extendSubschemaData=jce;function zce(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}Ca.extendSubschemaMode=zce});var R6=b((EBe,C6)=>{"use strict";var Ra=C6.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};my(e,n,i,t,"",t)};Ra.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Ra.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Ra.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Ra.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 my(t,e,r,n,i,o,a,s,l,c){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,a,s,l,c);for(var u in n){var d=n[u];if(Array.isArray(d)){if(u in Ra.arrayKeywords)for(var f=0;f<d.length;f++)my(t,e,r,d[f],i+"/"+u+"/"+f,o,i,u,n,f)}else if(u in Ra.propsKeywords){if(d&&typeof d=="object")for(var p in d)my(t,e,r,d[p],i+"/"+u+"/"+Lce(p),o,i,u,n,p)}else(u in Ra.keywords||t.allKeys&&!(u in Ra.skipKeywords))&&my(t,e,r,d,i+"/"+u,o,i,u,n)}r(n,i,o,a,s,l,c)}}function Lce(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ip=b(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.getSchemaRefs=vn.resolveUrl=vn.normalizeId=vn._getFullPath=vn.getFullPath=vn.inlineRef=void 0;var Fce=it(),Bce=Kf(),Uce=R6(),qce=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Zce(t,e=!0){return typeof t=="boolean"?!0:e===!0?!U$(t):e?D6(t)<=e:!1}vn.inlineRef=Zce;var Hce=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function U$(t){for(let e in t){if(Hce.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(U$)||typeof r=="object"&&U$(r))return!0}return!1}function D6(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!qce.has(r)&&(typeof t[r]=="object"&&(0,Fce.eachItem)(t[r],n=>e+=D6(n)),e===1/0))return 1/0}return e}function O6(t,e="",r){r!==!1&&(e=eu(e));let n=t.parse(e);return M6(t,n)}vn.getFullPath=O6;function M6(t,e){return t.serialize(e).split("#")[0]+"#"}vn._getFullPath=M6;var Vce=/#\/?$/;function eu(t){return t?t.replace(Vce,""):""}vn.normalizeId=eu;function Gce(t,e,r){return r=eu(r),t.resolve(e,r)}vn.resolveUrl=Gce;var Wce=/^[a-z_][-a-z0-9._]*$/i;function Jce(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=eu(t[r]||e),o={"":i},a=O6(n,i,!1),s={},l=new Set;return Uce(t,{allKeys:!0},(d,f,p,h)=>{if(h===void 0)return;let m=a+f,y=o[h];typeof d[r]=="string"&&(y=g.call(this,d[r])),v.call(this,d.$anchor),v.call(this,d.$dynamicAnchor),o[f]=y;function g(E){let x=this.opts.uriResolver.resolve;if(E=eu(y?x(y,E):E),l.has(E))throw u(E);l.add(E);let w=this.refs[E];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?c(d,w.schema,E):E!==eu(m)&&(E[0]==="#"?(c(d,s[E],E),s[E]=d):this.refs[E]=m),E}function v(E){if(typeof E=="string"){if(!Wce.test(E))throw new Error(`invalid anchor "${E}"`);g.call(this,`#${E}`)}}}),s;function c(d,f,p){if(f!==void 0&&!Bce(d,f))throw u(p)}function u(d){return new Error(`reference "${d}" resolves to more than one schema`)}}vn.getSchemaRefs=Jce});var Tp=b(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.getData=Da.KeywordCxt=Da.validateFunctionCode=void 0;var F6=g6(),N6=Ep(),Z$=M$(),gy=Ep(),Kce=S6(),Pp=T6(),q$=k6(),fe=Ne(),$e=Fo(),Yce=Ip(),Bo=it(),$p=Sp();function Xce(t){if(q6(t)&&(Z6(t),U6(t))){tue(t);return}B6(t,()=>(0,F6.topBoolOrEmptySchema)(t))}Da.validateFunctionCode=Xce;function B6({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,fe._)`${$e.default.data}, ${$e.default.valCxt}`,n.$async,()=>{t.code((0,fe._)`"use strict"; ${j6(r,i)}`),eue(t,i),t.code(o)}):t.func(e,(0,fe._)`${$e.default.data}, ${Qce(i)}`,n.$async,()=>t.code(j6(r,i)).code(o))}function Qce(t){return(0,fe._)`{${$e.default.instancePath}="", ${$e.default.parentData}, ${$e.default.parentDataProperty}, ${$e.default.rootData}=${$e.default.data}${t.dynamicRef?(0,fe._)`, ${$e.default.dynamicAnchors}={}`:fe.nil}}={}`}function eue(t,e){t.if($e.default.valCxt,()=>{t.var($e.default.instancePath,(0,fe._)`${$e.default.valCxt}.${$e.default.instancePath}`),t.var($e.default.parentData,(0,fe._)`${$e.default.valCxt}.${$e.default.parentData}`),t.var($e.default.parentDataProperty,(0,fe._)`${$e.default.valCxt}.${$e.default.parentDataProperty}`),t.var($e.default.rootData,(0,fe._)`${$e.default.valCxt}.${$e.default.rootData}`),e.dynamicRef&&t.var($e.default.dynamicAnchors,(0,fe._)`${$e.default.valCxt}.${$e.default.dynamicAnchors}`)},()=>{t.var($e.default.instancePath,(0,fe._)`""`),t.var($e.default.parentData,(0,fe._)`undefined`),t.var($e.default.parentDataProperty,(0,fe._)`undefined`),t.var($e.default.rootData,$e.default.data),e.dynamicRef&&t.var($e.default.dynamicAnchors,(0,fe._)`{}`)})}function tue(t){let{schema:e,opts:r,gen:n}=t;B6(t,()=>{r.$comment&&e.$comment&&V6(t),aue(t),n.let($e.default.vErrors,null),n.let($e.default.errors,0),r.unevaluated&&rue(t),H6(t),cue(t)})}function rue(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,fe._)`${r}.evaluated`),e.if((0,fe._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,fe._)`${t.evaluated}.props`,(0,fe._)`undefined`)),e.if((0,fe._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,fe._)`${t.evaluated}.items`,(0,fe._)`undefined`))}function j6(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,fe._)`/*# sourceURL=${r} */`:fe.nil}function nue(t,e){if(q6(t)&&(Z6(t),U6(t))){iue(t,e);return}(0,F6.boolOrEmptySchema)(t,e)}function U6({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function q6(t){return typeof t.schema!="boolean"}function iue(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&V6(t),sue(t),lue(t);let o=n.const("_errs",$e.default.errors);H6(t,o),n.var(e,(0,fe._)`${o} === ${$e.default.errors}`)}function Z6(t){(0,Bo.checkUnknownRules)(t),oue(t)}function H6(t,e){if(t.opts.jtd)return z6(t,[],!1,e);let r=(0,N6.getSchemaTypes)(t.schema),n=(0,N6.coerceAndCheckDataType)(t,r);z6(t,r,!n,e)}function oue(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Bo.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function aue(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Bo.checkStrictMode)(t,"default is ignored in the schema root")}function sue(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Yce.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function lue(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function V6({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,fe._)`${$e.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,fe.str)`${n}/$comment`,s=t.scopeValue("root",{ref:e.root});t.code((0,fe._)`${$e.default.self}.opts.$comment(${o}, ${a}, ${s}.schema)`)}}function cue(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,fe._)`${$e.default.errors} === 0`,()=>e.return($e.default.data),()=>e.throw((0,fe._)`new ${i}(${$e.default.vErrors})`)):(e.assign((0,fe._)`${n}.errors`,$e.default.vErrors),o.unevaluated&&uue(t),e.return((0,fe._)`${$e.default.errors} === 0`))}function uue({gen:t,evaluated:e,props:r,items:n}){r instanceof fe.Name&&t.assign((0,fe._)`${e}.props`,r),n instanceof fe.Name&&t.assign((0,fe._)`${e}.items`,n)}function z6(t,e,r,n){let{gen:i,schema:o,data:a,allErrors:s,opts:l,self:c}=t,{RULES:u}=c;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,Bo.schemaHasRulesButRef)(o,u))){i.block(()=>W6(t,"$ref",u.all.$ref.definition));return}l.jtd||due(t,e),i.block(()=>{for(let f of u.rules)d(f);d(u.post)});function d(f){(0,Z$.shouldUseGroup)(o,f)&&(f.type?(i.if((0,gy.checkDataType)(f.type,a,l.strictNumbers)),L6(t,f),e.length===1&&e[0]===f.type&&r&&(i.else(),(0,gy.reportTypeError)(t)),i.endIf()):L6(t,f),s||i.if((0,fe._)`${$e.default.errors} === ${n||0}`))}}function L6(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,Kce.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,Z$.shouldUseRule)(n,o)&&W6(t,o.keyword,o.definition,e.type)})}function due(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(fue(t,e),t.opts.allowUnionTypes||pue(t,e),hue(t,t.dataTypes))}function fue(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{G6(t.dataTypes,r)||H$(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),gue(t,e)}}function pue(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&H$(t,"use allowUnionTypes to allow union type keyword")}function hue(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Z$.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>mue(e,a))&&H$(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function mue(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function G6(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function gue(t,e){let r=[];for(let n of t.dataTypes)G6(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function H$(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Bo.checkStrictMode)(t,e,t.opts.strictTypes)}var yy=class{constructor(e,r,n){if((0,Pp.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Bo.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",J6(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Pp.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",$e.default.errors))}result(e,r,n){this.failResult((0,fe.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,fe.not)(e),void 0,r)}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:r}=this;this.fail((0,fe._)`${r} !== undefined && (${(0,fe.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?$p.reportExtraError:$p.reportError)(this,this.def.error,r)}$dataError(){(0,$p.reportError)(this,this.def.$dataError||$p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,$p.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=fe.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=fe.nil,r=fe.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,fe.or)((0,fe._)`${i} === undefined`,r)),e!==fe.nil&&n.assign(e,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==fe.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,fe.or)(a(),s());function a(){if(n.length){if(!(r instanceof fe.Name))throw new Error("ajv implementation error");let l=Array.isArray(n)?n:[n];return(0,fe._)`${(0,gy.checkDataTypes)(l,r,o.opts.strictNumbers,gy.DataType.Wrong)}`}return fe.nil}function s(){if(i.validateSchema){let l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,fe._)`!${l}(${r})`}return fe.nil}}subschema(e,r){let n=(0,q$.getSubschema)(this.it,e);(0,q$.extendSubschemaData)(n,this.it,e),(0,q$.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return nue(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Bo.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Bo.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,fe.Name)),!0}};Da.KeywordCxt=yy;function W6(t,e,r,n){let i=new yy(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Pp.funcKeywordCode)(i,r):"macro"in r?(0,Pp.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Pp.funcKeywordCode)(i,r)}var yue=/^\/(?:[^~]|~0|~1)*$/,_ue=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function J6(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return $e.default.rootData;if(t[0]==="/"){if(!yue.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=$e.default.rootData}else{let c=_ue.exec(t);if(!c)throw new Error(`Invalid JSON-pointer: ${t}`);let u=+c[1];if(i=c[2],i==="#"){if(u>=e)throw new Error(l("property/index",u));return n[e-u]}if(u>e)throw new Error(l("data",u));if(o=r[e-u],!i)return o}let a=o,s=i.split("/");for(let c of s)c&&(o=(0,fe._)`${o}${(0,fe.getProperty)((0,Bo.unescapeJsonPointer)(c))}`,a=(0,fe._)`${a} && ${o}`);return a;function l(c,u){return`Cannot access ${c} ${u} levels up, current level is ${e}`}}Da.getData=J6});var _y=b(G$=>{"use strict";Object.defineProperty(G$,"__esModule",{value:!0});var V$=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};G$.default=V$});var Ap=b(K$=>{"use strict";Object.defineProperty(K$,"__esModule",{value:!0});var W$=Ip(),J$=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,W$.resolveUrl)(e,r,n),this.missingSchema=(0,W$.normalizeId)((0,W$.getFullPath)(e,this.missingRef))}};K$.default=J$});var by=b(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.resolveSchema=ri.getCompilingSchema=ri.resolveRef=ri.compileSchema=ri.SchemaEnv=void 0;var $i=Ne(),vue=_y(),rl=Fo(),Pi=Ip(),K6=it(),bue=Tp(),tu=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,Pi.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};ri.SchemaEnv=tu;function X$(t){let e=Y6.call(this,t);if(e)return e;let r=(0,Pi.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new $i.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),s;t.$async&&(s=a.scopeValue("Error",{ref:vue.default,code:(0,$i._)`require("ajv/dist/runtime/validation_error").default`}));let l=a.scopeName("validate");t.validateName=l;let c={gen:a,allErrors:this.opts.allErrors,data:rl.default.data,parentData:rl.default.parentData,parentDataProperty:rl.default.parentDataProperty,dataNames:[rl.default.data],dataPathArr:[$i.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,$i.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:$i.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,$i._)`""`,opts:this.opts,self:this},u;try{this._compilations.add(t),(0,bue.validateFunctionCode)(c),a.optimize(this.opts.code.optimize);let d=a.toString();u=`${a.scopeRefs(rl.default.scope)}return ${d}`,this.opts.code.process&&(u=this.opts.code.process(u,t));let p=new Function(`${rl.default.self}`,`${rl.default.scope}`,u)(this,this.scope.get());if(this.scope.value(l,{ref:p}),p.errors=null,p.schema=t.schema,p.schemaEnv=t,t.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:l,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:h,items:m}=c;p.evaluated={props:h instanceof $i.Name?void 0:h,items:m instanceof $i.Name?void 0:m,dynamicProps:h instanceof $i.Name,dynamicItems:m instanceof $i.Name},p.source&&(p.source.evaluated=(0,$i.stringify)(p.evaluated))}return t.validate=p,t}catch(d){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),d}finally{this._compilations.delete(t)}}ri.compileSchema=X$;function wue(t,e,r){var n;r=(0,Pi.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=Eue.call(this,t,r);if(o===void 0){let a=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:s}=this.opts;a&&(o=new tu({schema:a,schemaId:s,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=xue.call(this,o)}ri.resolveRef=wue;function xue(t){return(0,Pi.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:X$.call(this,t)}function Y6(t){for(let e of this._compilations)if(Sue(e,t))return e}ri.getCompilingSchema=Y6;function Sue(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Eue(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||vy.call(this,t,e)}function vy(t,e){let r=this.opts.uriResolver.parse(e),n=(0,Pi._getFullPath)(this.opts.uriResolver,r),i=(0,Pi.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return Y$.call(this,r,t);let o=(0,Pi.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let s=vy.call(this,t,a);return typeof(s==null?void 0:s.schema)!="object"?void 0:Y$.call(this,r,s)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||X$.call(this,a),o===(0,Pi.normalizeId)(e)){let{schema:s}=a,{schemaId:l}=this.opts,c=s[l];return c&&(i=(0,Pi.resolveUrl)(this.opts.uriResolver,i,c)),new tu({schema:s,schemaId:l,root:t,baseId:i})}return Y$.call(this,r,a)}}ri.resolveSchema=vy;var Iue=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Y$(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let s of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let l=r[(0,K6.unescapeFragment)(s)];if(l===void 0)return;r=l;let c=typeof r=="object"&&r[this.opts.schemaId];!Iue.has(s)&&c&&(e=(0,Pi.resolveUrl)(this.opts.uriResolver,e,c))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,K6.schemaHasRulesButRef)(r,this.RULES)){let s=(0,Pi.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=vy.call(this,n,s)}let{schemaId:a}=this.opts;if(o=o||new tu({schema:r,schemaId:a,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var X6=b((kBe,$ue)=>{$ue.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 ez=b(Q$=>{"use strict";Object.defineProperty(Q$,"__esModule",{value:!0});var Q6=mI();Q6.code='require("ajv/dist/runtime/uri").default';Q$.default=Q6});var lz=b(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.CodeGen=xr.Name=xr.nil=xr.stringify=xr.str=xr._=xr.KeywordCxt=void 0;var Pue=Tp();Object.defineProperty(xr,"KeywordCxt",{enumerable:!0,get:function(){return Pue.KeywordCxt}});var ru=Ne();Object.defineProperty(xr,"_",{enumerable:!0,get:function(){return ru._}});Object.defineProperty(xr,"str",{enumerable:!0,get:function(){return ru.str}});Object.defineProperty(xr,"stringify",{enumerable:!0,get:function(){return ru.stringify}});Object.defineProperty(xr,"nil",{enumerable:!0,get:function(){return ru.nil}});Object.defineProperty(xr,"Name",{enumerable:!0,get:function(){return ru.Name}});Object.defineProperty(xr,"CodeGen",{enumerable:!0,get:function(){return ru.CodeGen}});var Tue=_y(),oz=Ap(),Aue=O$(),kp=by(),kue=Ne(),Cp=Ip(),wy=Ep(),tP=it(),tz=X6(),Cue=ez(),az=(t,e)=>new RegExp(t,e);az.code="new RegExp";var Rue=["removeAdditional","useDefaults","coerceTypes"],Due=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Oue={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."},Mue={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},rz=200;function Nue(t){var e,r,n,i,o,a,s,l,c,u,d,f,p,h,m,y,g,v,E,x,w,A,$,R,T;let D=t.strict,k=(e=t.code)===null||e===void 0?void 0:e.optimize,M=k===!0||k===void 0?1:k||0,U=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:az,z=(i=t.uriResolver)!==null&&i!==void 0?i:Cue.default;return{strictSchema:(a=(o=t.strictSchema)!==null&&o!==void 0?o:D)!==null&&a!==void 0?a:!0,strictNumbers:(l=(s=t.strictNumbers)!==null&&s!==void 0?s:D)!==null&&l!==void 0?l:!0,strictTypes:(u=(c=t.strictTypes)!==null&&c!==void 0?c:D)!==null&&u!==void 0?u:"log",strictTuples:(f=(d=t.strictTuples)!==null&&d!==void 0?d:D)!==null&&f!==void 0?f:"log",strictRequired:(h=(p=t.strictRequired)!==null&&p!==void 0?p:D)!==null&&h!==void 0?h:!1,code:t.code?{...t.code,optimize:M,regExp:U}:{optimize:M,regExp:U},loopRequired:(m=t.loopRequired)!==null&&m!==void 0?m:rz,loopEnum:(y=t.loopEnum)!==null&&y!==void 0?y:rz,meta:(g=t.meta)!==null&&g!==void 0?g:!0,messages:(v=t.messages)!==null&&v!==void 0?v:!0,inlineRefs:(E=t.inlineRefs)!==null&&E!==void 0?E:!0,schemaId:(x=t.schemaId)!==null&&x!==void 0?x:"$id",addUsedSchema:(w=t.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(A=t.validateSchema)!==null&&A!==void 0?A:!0,validateFormats:($=t.validateFormats)!==null&&$!==void 0?$:!0,unicodeRegExp:(R=t.unicodeRegExp)!==null&&R!==void 0?R:!0,int32range:(T=t.int32range)!==null&&T!==void 0?T:!0,uriResolver:z}}var Rp=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Nue(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new kue.ValueScope({scope:{},prefixes:Due,es5:r,lines:n}),this.logger=Uue(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Aue.getRules)(),nz.call(this,Oue,e,"NOT SUPPORTED"),nz.call(this,Mue,e,"DEPRECATED","warn"),this._metaOpts=Fue.call(this),e.formats&&zue.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Lue.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),jue.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=tz;n==="id"&&(i={...tz},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(u,d){await o.call(this,u.$schema);let f=this._addSchema(u,d);return f.validate||a.call(this,f)}async function o(u){u&&!this.getSchema(u)&&await i.call(this,{$ref:u},!0)}async function a(u){try{return this._compileSchemaEnv(u)}catch(d){if(!(d instanceof oz.default))throw d;return s.call(this,d),await l.call(this,d.missingSchema),a.call(this,u)}}function s({missingSchema:u,missingRef:d}){if(this.refs[u])throw new Error(`AnySchema ${u} is loaded but ${d} cannot be resolved`)}async function l(u){let d=await c.call(this,u);this.refs[u]||await o.call(this,d.$schema),this.refs[u]||this.addSchema(d,u,r)}async function c(u){let d=this._loading[u];if(d)return d;try{return await(this._loading[u]=n(u))}finally{delete this._loading[u]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,n,i);return this}let o;if(typeof e=="object"){let{schemaId:a}=this.opts;if(o=e[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,Cp.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,e);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let r;for(;typeof(r=iz.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new kp.SchemaEnv({schema:{},schemaId:n});if(r=kp.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}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 r=iz.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,Cp.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Zue.call(this,n,r),!r)return(0,tP.eachItem)(n,o=>eP.call(this,o)),this;Vue.call(this,r);let i={...r,type:(0,wy.getJSONTypes)(r.type),schemaType:(0,wy.getJSONTypes)(r.schemaType)};return(0,tP.eachItem)(n,i.type.length===0?o=>eP.call(this,o,i):o=>i.type.forEach(a=>eP.call(this,o,i,a))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let o=i.split("/").slice(1),a=e;for(let s of o)a=a[s];for(let s in n){let l=n[s];if(typeof l!="object")continue;let{$data:c}=l.definition,u=a[s];c&&u&&(a[s]=sz(u))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e=="object")a=e[s];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 l=this._cache.get(e);if(l!==void 0)return l;n=(0,Cp.normalizeId)(a||n);let c=Cp.getSchemaRefs.call(this,e,n);return l=new kp.SchemaEnv({schema:e,schemaId:s,meta:r,baseId:n,localRefs:c}),this._cache.set(l.schema,l),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),i&&this.validateSchema(e,!0),l}_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):kp.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{kp.compileSchema.call(this,e)}finally{this.opts=r}}};Rp.ValidationError=Tue.default;Rp.MissingRefError=oz.default;xr.default=Rp;function nz(t,e,r,n="error"){for(let i in t){let o=i;o in e&&this.logger[n](`${r}: option ${i}. ${t[o]}`)}}function iz(t){return t=(0,Cp.normalizeId)(t),this.schemas[t]||this.refs[t]}function jue(){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 zue(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Lue(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 r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Fue(){let t={...this.opts};for(let e of Rue)delete t[e];return t}var Bue={log(){},warn(){},error(){}};function Uue(t){if(t===!1)return Bue;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 que=/^[a-z_$][a-z0-9_$:-]*$/i;function Zue(t,e){let{RULES:r}=this;if((0,tP.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!que.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function eP(t,e,r){var n;let i=e==null?void 0:e.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:l})=>l===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[t]=!0,!e)return;let s={keyword:t,definition:{...e,type:(0,wy.getJSONTypes)(e.type),schemaType:(0,wy.getJSONTypes)(e.schemaType)}};e.before?Hue.call(this,a,s,e.before):a.rules.push(s),o.all[t]=s,(n=e.implements)===null||n===void 0||n.forEach(l=>this.addKeyword(l))}function Hue(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function Vue(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=sz(e)),t.validateSchema=this.compile(e,!0))}var Gue={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function sz(t){return{anyOf:[t,Gue]}}});var cz=b(rP=>{"use strict";Object.defineProperty(rP,"__esModule",{value:!0});var Wue={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};rP.default=Wue});var pz=b(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.callRef=nl.getValidate=void 0;var Jue=Ap(),uz=ti(),bn=Ne(),nu=Fo(),dz=by(),xy=it(),Kue={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:a,opts:s,self:l}=n,{root:c}=o;if((r==="#"||r==="#/")&&i===c.baseId)return d();let u=dz.resolveRef.call(l,c,i,r);if(u===void 0)throw new Jue.default(n.opts.uriResolver,i,r);if(u instanceof dz.SchemaEnv)return f(u);return p(u);function d(){if(o===c)return Sy(t,a,o,o.$async);let h=e.scopeValue("root",{ref:c});return Sy(t,(0,bn._)`${h}.validate`,c,c.$async)}function f(h){let m=fz(t,h);Sy(t,m,h,h.$async)}function p(h){let m=e.scopeValue("schema",s.code.source===!0?{ref:h,code:(0,bn.stringify)(h)}:{ref:h}),y=e.name("valid"),g=t.subschema({schema:h,dataTypes:[],schemaPath:bn.nil,topSchemaRef:m,errSchemaPath:r},y);t.mergeEvaluated(g),t.ok(y)}}};function fz(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,bn._)`${r.scopeValue("wrapper",{ref:e})}.validate`}nl.getValidate=fz;function Sy(t,e,r,n){let{gen:i,it:o}=t,{allErrors:a,schemaEnv:s,opts:l}=o,c=l.passContext?nu.default.this:bn.nil;n?u():d();function u(){if(!s.$async)throw new Error("async schema referenced by sync schema");let h=i.let("valid");i.try(()=>{i.code((0,bn._)`await ${(0,uz.callValidateCode)(t,e,c)}`),p(e),a||i.assign(h,!0)},m=>{i.if((0,bn._)`!(${m} instanceof ${o.ValidationError})`,()=>i.throw(m)),f(m),a||i.assign(h,!1)}),t.ok(h)}function d(){t.result((0,uz.callValidateCode)(t,e,c),()=>p(e),()=>f(e))}function f(h){let m=(0,bn._)`${h}.errors`;i.assign(nu.default.vErrors,(0,bn._)`${nu.default.vErrors} === null ? ${m} : ${nu.default.vErrors}.concat(${m})`),i.assign(nu.default.errors,(0,bn._)`${nu.default.vErrors}.length`)}function p(h){var m;if(!o.opts.unevaluated)return;let y=(m=r==null?void 0:r.validate)===null||m===void 0?void 0:m.evaluated;if(o.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(o.props=xy.mergeEvaluated.props(i,y.props,o.props));else{let g=i.var("props",(0,bn._)`${h}.evaluated.props`);o.props=xy.mergeEvaluated.props(i,g,o.props,bn.Name)}if(o.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(o.items=xy.mergeEvaluated.items(i,y.items,o.items));else{let g=i.var("items",(0,bn._)`${h}.evaluated.items`);o.items=xy.mergeEvaluated.items(i,g,o.items,bn.Name)}}}nl.callRef=Sy;nl.default=Kue});var hz=b(nP=>{"use strict";Object.defineProperty(nP,"__esModule",{value:!0});var Yue=cz(),Xue=pz(),Que=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Yue.default,Xue.default];nP.default=Que});var mz=b(iP=>{"use strict";Object.defineProperty(iP,"__esModule",{value:!0});var Ey=Ne(),Oa=Ey.operators,Iy={maximum:{okStr:"<=",ok:Oa.LTE,fail:Oa.GT},minimum:{okStr:">=",ok:Oa.GTE,fail:Oa.LT},exclusiveMaximum:{okStr:"<",ok:Oa.LT,fail:Oa.GTE},exclusiveMinimum:{okStr:">",ok:Oa.GT,fail:Oa.LTE}},ede={message:({keyword:t,schemaCode:e})=>(0,Ey.str)`must be ${Iy[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Ey._)`{comparison: ${Iy[t].okStr}, limit: ${e}}`},tde={keyword:Object.keys(Iy),type:"number",schemaType:"number",$data:!0,error:ede,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Ey._)`${r} ${Iy[e].fail} ${n} || isNaN(${r})`)}};iP.default=tde});var gz=b(oP=>{"use strict";Object.defineProperty(oP,"__esModule",{value:!0});var Dp=Ne(),rde={message:({schemaCode:t})=>(0,Dp.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Dp._)`{multipleOf: ${t}}`},nde={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:rde,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,a=e.let("res"),s=o?(0,Dp._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,Dp._)`${a} !== parseInt(${a})`;t.fail$data((0,Dp._)`(${n} === 0 || (${a} = ${r}/${n}, ${s}))`)}};oP.default=nde});var _z=b(aP=>{"use strict";Object.defineProperty(aP,"__esModule",{value:!0});function yz(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}aP.default=yz;yz.code='require("ajv/dist/runtime/ucs2length").default'});var vz=b(sP=>{"use strict";Object.defineProperty(sP,"__esModule",{value:!0});var il=Ne(),ide=it(),ode=_z(),ade={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,il.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,il._)`{limit: ${t}}`},sde={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:ade,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?il.operators.GT:il.operators.LT,a=i.opts.unicode===!1?(0,il._)`${r}.length`:(0,il._)`${(0,ide.useFunc)(t.gen,ode.default)}(${r})`;t.fail$data((0,il._)`${a} ${o} ${n}`)}};sP.default=sde});var bz=b(lP=>{"use strict";Object.defineProperty(lP,"__esModule",{value:!0});var lde=ti(),cde=it(),iu=Ne(),ude={message:({schemaCode:t})=>(0,iu.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,iu._)`{pattern: ${t}}`},dde={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:ude,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:a}=t,s=a.opts.unicodeRegExp?"u":"";if(n){let{regExp:l}=a.opts.code,c=l.code==="new RegExp"?(0,iu._)`new RegExp`:(0,cde.useFunc)(e,l),u=e.let("valid");e.try(()=>e.assign(u,(0,iu._)`${c}(${o}, ${s}).test(${r})`),()=>e.assign(u,!1)),t.fail$data((0,iu._)`!${u}`)}else{let l=(0,lde.usePattern)(t,i);t.fail$data((0,iu._)`!${l}.test(${r})`)}}};lP.default=dde});var wz=b(cP=>{"use strict";Object.defineProperty(cP,"__esModule",{value:!0});var Op=Ne(),fde={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Op.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Op._)`{limit: ${t}}`},pde={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:fde,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?Op.operators.GT:Op.operators.LT;t.fail$data((0,Op._)`Object.keys(${r}).length ${i} ${n}`)}};cP.default=pde});var xz=b(uP=>{"use strict";Object.defineProperty(uP,"__esModule",{value:!0});var Mp=ti(),Np=Ne(),hde=it(),mde={message:({params:{missingProperty:t}})=>(0,Np.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Np._)`{missingProperty: ${t}}`},gde={keyword:"required",type:"object",schemaType:"array",$data:!0,error:mde,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:o,it:a}=t,{opts:s}=a;if(!o&&r.length===0)return;let l=r.length>=s.loopRequired;if(a.allErrors?c():u(),s.strictRequired){let p=t.parentSchema.properties,{definedProperties:h}=t.it;for(let m of r)if((p==null?void 0:p[m])===void 0&&!h.has(m)){let y=a.schemaEnv.baseId+a.errSchemaPath,g=`required property "${m}" is not defined at "${y}" (strictRequired)`;(0,hde.checkStrictMode)(a,g,a.opts.strictRequired)}}function c(){if(l||o)t.block$data(Np.nil,d);else for(let p of r)(0,Mp.checkReportMissingProp)(t,p)}function u(){let p=e.let("missing");if(l||o){let h=e.let("valid",!0);t.block$data(h,()=>f(p,h)),t.ok(h)}else e.if((0,Mp.checkMissingProp)(t,r,p)),(0,Mp.reportMissingProp)(t,p),e.else()}function d(){e.forOf("prop",n,p=>{t.setParams({missingProperty:p}),e.if((0,Mp.noPropertyInData)(e,i,p,s.ownProperties),()=>t.error())})}function f(p,h){t.setParams({missingProperty:p}),e.forOf(p,n,()=>{e.assign(h,(0,Mp.propertyInData)(e,i,p,s.ownProperties)),e.if((0,Np.not)(h),()=>{t.error(),e.break()})},Np.nil)}}};uP.default=gde});var Sz=b(dP=>{"use strict";Object.defineProperty(dP,"__esModule",{value:!0});var jp=Ne(),yde={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,jp.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,jp._)`{limit: ${t}}`},_de={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:yde,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?jp.operators.GT:jp.operators.LT;t.fail$data((0,jp._)`${r}.length ${i} ${n}`)}};dP.default=_de});var $y=b(fP=>{"use strict";Object.defineProperty(fP,"__esModule",{value:!0});var Ez=Kf();Ez.code='require("ajv/dist/runtime/equal").default';fP.default=Ez});var Iz=b(hP=>{"use strict";Object.defineProperty(hP,"__esModule",{value:!0});var pP=Ep(),Sr=Ne(),vde=it(),bde=$y(),wde={message:({params:{i:t,j:e}})=>(0,Sr.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Sr._)`{i: ${t}, j: ${e}}`},xde={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:wde,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:s}=t;if(!n&&!i)return;let l=e.let("valid"),c=o.items?(0,pP.getSchemaTypes)(o.items):[];t.block$data(l,u,(0,Sr._)`${a} === false`),t.ok(l);function u(){let h=e.let("i",(0,Sr._)`${r}.length`),m=e.let("j");t.setParams({i:h,j:m}),e.assign(l,!0),e.if((0,Sr._)`${h} > 1`,()=>(d()?f:p)(h,m))}function d(){return c.length>0&&!c.some(h=>h==="object"||h==="array")}function f(h,m){let y=e.name("item"),g=(0,pP.checkDataTypes)(c,y,s.opts.strictNumbers,pP.DataType.Wrong),v=e.const("indices",(0,Sr._)`{}`);e.for((0,Sr._)`;${h}--;`,()=>{e.let(y,(0,Sr._)`${r}[${h}]`),e.if(g,(0,Sr._)`continue`),c.length>1&&e.if((0,Sr._)`typeof ${y} == "string"`,(0,Sr._)`${y} += "_"`),e.if((0,Sr._)`typeof ${v}[${y}] == "number"`,()=>{e.assign(m,(0,Sr._)`${v}[${y}]`),t.error(),e.assign(l,!1).break()}).code((0,Sr._)`${v}[${y}] = ${h}`)})}function p(h,m){let y=(0,vde.useFunc)(e,bde.default),g=e.name("outer");e.label(g).for((0,Sr._)`;${h}--;`,()=>e.for((0,Sr._)`${m} = ${h}; ${m}--;`,()=>e.if((0,Sr._)`${y}(${r}[${h}], ${r}[${m}])`,()=>{t.error(),e.assign(l,!1).break(g)})))}}};hP.default=xde});var $z=b(gP=>{"use strict";Object.defineProperty(gP,"__esModule",{value:!0});var mP=Ne(),Sde=it(),Ede=$y(),Ide={message:"must be equal to constant",params:({schemaCode:t})=>(0,mP._)`{allowedValue: ${t}}`},$de={keyword:"const",$data:!0,error:Ide,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,mP._)`!${(0,Sde.useFunc)(e,Ede.default)}(${r}, ${i})`):t.fail((0,mP._)`${o} !== ${r}`)}};gP.default=$de});var Pz=b(yP=>{"use strict";Object.defineProperty(yP,"__esModule",{value:!0});var zp=Ne(),Pde=it(),Tde=$y(),Ade={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,zp._)`{allowedValues: ${t}}`},kde={keyword:"enum",schemaType:"array",$data:!0,error:Ade,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:a}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let s=i.length>=a.opts.loopEnum,l,c=()=>l??(l=(0,Pde.useFunc)(e,Tde.default)),u;if(s||n)u=e.let("valid"),t.block$data(u,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let p=e.const("vSchema",o);u=(0,zp.or)(...i.map((h,m)=>f(p,m)))}t.pass(u);function d(){e.assign(u,!1),e.forOf("v",o,p=>e.if((0,zp._)`${c()}(${r}, ${p})`,()=>e.assign(u,!0).break()))}function f(p,h){let m=i[h];return typeof m=="object"&&m!==null?(0,zp._)`${c()}(${r}, ${p}[${h}])`:(0,zp._)`${r} === ${m}`}}};yP.default=kde});var Tz=b(_P=>{"use strict";Object.defineProperty(_P,"__esModule",{value:!0});var Cde=mz(),Rde=gz(),Dde=vz(),Ode=bz(),Mde=wz(),Nde=xz(),jde=Sz(),zde=Iz(),Lde=$z(),Fde=Pz(),Bde=[Cde.default,Rde.default,Dde.default,Ode.default,Mde.default,Nde.default,jde.default,zde.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Lde.default,Fde.default];_P.default=Bde});var bP=b(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});Lp.validateAdditionalItems=void 0;var ol=Ne(),vP=it(),Ude={message:({params:{len:t}})=>(0,ol.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ol._)`{limit: ${t}}`},qde={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Ude,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,vP.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Az(t,n)}};function Az(t,e){let{gen:r,schema:n,data:i,keyword:o,it:a}=t;a.items=!0;let s=r.const("len",(0,ol._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,ol._)`${s} <= ${e.length}`);else if(typeof n=="object"&&!(0,vP.alwaysValidSchema)(a,n)){let c=r.var("valid",(0,ol._)`${s} <= ${e.length}`);r.if((0,ol.not)(c),()=>l(c)),t.ok(c)}function l(c){r.forRange("i",e.length,s,u=>{t.subschema({keyword:o,dataProp:u,dataPropType:vP.Type.Num},c),a.allErrors||r.if((0,ol.not)(c),()=>r.break())})}}Lp.validateAdditionalItems=Az;Lp.default=qde});var wP=b(Fp=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});Fp.validateTuple=void 0;var kz=Ne(),Py=it(),Zde=ti(),Hde={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return Cz(t,"additionalItems",e);r.items=!0,!(0,Py.alwaysValidSchema)(r,e)&&t.ok((0,Zde.validateArray)(t))}};function Cz(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:s}=t;u(i),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=Py.mergeEvaluated.items(n,r.length,s.items));let l=n.name("valid"),c=n.const("len",(0,kz._)`${o}.length`);r.forEach((d,f)=>{(0,Py.alwaysValidSchema)(s,d)||(n.if((0,kz._)`${c} > ${f}`,()=>t.subschema({keyword:a,schemaProp:f,dataProp:f},l)),t.ok(l))});function u(d){let{opts:f,errSchemaPath:p}=s,h=r.length,m=h===d.minItems&&(h===d.maxItems||d[e]===!1);if(f.strictTuples&&!m){let y=`"${a}" is ${h}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,Py.checkStrictMode)(s,y,f.strictTuples)}}}Fp.validateTuple=Cz;Fp.default=Hde});var Rz=b(xP=>{"use strict";Object.defineProperty(xP,"__esModule",{value:!0});var Vde=wP(),Gde={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Vde.validateTuple)(t,"items")};xP.default=Gde});var Oz=b(SP=>{"use strict";Object.defineProperty(SP,"__esModule",{value:!0});var Dz=Ne(),Wde=it(),Jde=ti(),Kde=bP(),Yde={message:({params:{len:t}})=>(0,Dz.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Dz._)`{limit: ${t}}`},Xde={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Yde,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,Wde.alwaysValidSchema)(n,e)&&(i?(0,Kde.validateAdditionalItems)(t,i):t.ok((0,Jde.validateArray)(t)))}};SP.default=Xde});var Mz=b(EP=>{"use strict";Object.defineProperty(EP,"__esModule",{value:!0});var ni=Ne(),Ty=it(),Qde={message:({params:{min:t,max:e}})=>e===void 0?(0,ni.str)`must contain at least ${t} valid item(s)`:(0,ni.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,ni._)`{minContains: ${t}}`:(0,ni._)`{minContains: ${t}, maxContains: ${e}}`},efe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Qde,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,a,s,{minContains:l,maxContains:c}=n;o.opts.next?(a=l===void 0?1:l,s=c):a=1;let u=e.const("len",(0,ni._)`${i}.length`);if(t.setParams({min:a,max:s}),s===void 0&&a===0){(0,Ty.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,Ty.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Ty.alwaysValidSchema)(o,r)){let m=(0,ni._)`${u} >= ${a}`;s!==void 0&&(m=(0,ni._)`${m} && ${u} <= ${s}`),t.pass(m);return}o.items=!0;let d=e.name("valid");s===void 0&&a===1?p(d,()=>e.if(d,()=>e.break())):a===0?(e.let(d,!0),s!==void 0&&e.if((0,ni._)`${i}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let m=e.name("_valid"),y=e.let("count",0);p(m,()=>e.if(m,()=>h(y)))}function p(m,y){e.forRange("i",0,u,g=>{t.subschema({keyword:"contains",dataProp:g,dataPropType:Ty.Type.Num,compositeRule:!0},m),y()})}function h(m){e.code((0,ni._)`${m}++`),s===void 0?e.if((0,ni._)`${m} >= ${a}`,()=>e.assign(d,!0).break()):(e.if((0,ni._)`${m} > ${s}`,()=>e.assign(d,!1).break()),a===1?e.assign(d,!0):e.if((0,ni._)`${m} >= ${a}`,()=>e.assign(d,!0)))}}};EP.default=efe});var zz=b(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.validateSchemaDeps=Xi.validatePropertyDeps=Xi.error=void 0;var IP=Ne(),tfe=it(),Bp=ti();Xi.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,IP.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,IP._)`{property: ${t},
|
|
17
|
+
|| ${a} === "boolean" || ${i} === null`).assign(s,(0,De._)`[${i}]`)}}}function fce({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,De._)`${e} !== undefined`,()=>t.assign((0,De._)`${e}[${r}]`,n))}function N$(t,e,r,n=Xc.Correct){let i=n===Xc.Correct?De.operators.EQ:De.operators.NEQ,o;switch(t){case"null":return(0,De._)`${e} ${i} null`;case"array":o=(0,De._)`Array.isArray(${e})`;break;case"object":o=(0,De._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":o=a((0,De._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":o=a();break;default:return(0,De._)`typeof ${e} ${i} ${t}`}return n===Xc.Correct?o:(0,De.not)(o);function a(s=De.nil){return(0,De.and)((0,De._)`typeof ${e} == "number"`,s,r?(0,De._)`isFinite(${e})`:De.nil)}}zr.checkDataType=N$;function j$(t,e,r,n){if(t.length===1)return N$(t[0],e,r,n);let i,o=(0,v6.toHash)(t);if(o.array&&o.object){let a=(0,De._)`typeof ${e} != "object"`;i=o.null?a:(0,De._)`!${e} || ${a}`,delete o.null,delete o.array,delete o.object}else i=De.nil;o.number&&delete o.integer;for(let a in o)i=(0,De.and)(i,N$(a,e,r,n));return i}zr.checkDataTypes=j$;var pce={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,De._)`{type: ${t}}`:(0,De._)`{type: ${e}}`};function z$(t){let e=hce(t);(0,sce.reportError)(e,pce)}zr.reportTypeError=z$;function hce(t){let{gen:e,data:r,schema:n}=t,i=(0,v6.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:t}}});var S6=b(hy=>{"use strict";Object.defineProperty(hy,"__esModule",{value:!0});hy.assignDefaults=void 0;var Qc=Ne(),mce=it();function gce(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let i in r)x6(t,i,r[i].default);else e==="array"&&Array.isArray(n)&&n.forEach((i,o)=>x6(t,o,i.default))}hy.assignDefaults=gce;function x6(t,e,r){let{gen:n,compositeRule:i,data:o,opts:a}=t;if(r===void 0)return;let s=(0,Qc._)`${o}${(0,Qc.getProperty)(e)}`;if(i){(0,mce.checkStrictMode)(t,`default is ignored for: ${s}`);return}let l=(0,Qc._)`${s} === undefined`;a.useDefaults==="empty"&&(l=(0,Qc._)`${l} || ${s} === null || ${s} === ""`),n.if(l,(0,Qc._)`${s} = ${(0,Qc.stringify)(r)}`)}});var ti=b(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.validateUnion=xt.validateArray=xt.usePattern=xt.callValidateCode=xt.schemaProperties=xt.allSchemaProperties=xt.noPropertyInData=xt.propertyInData=xt.isOwnProperty=xt.hasPropFunc=xt.reportMissingProp=xt.checkMissingProp=xt.checkReportMissingProp=void 0;var jt=Ne(),L$=it(),ka=Fo(),yce=it();function _ce(t,e){let{gen:r,data:n,it:i}=t;r.if(B$(r,n,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,jt._)`${e}`},!0),t.error()})}xt.checkReportMissingProp=_ce;function vce({gen:t,data:e,it:{opts:r}},n,i){return(0,jt.or)(...n.map(o=>(0,jt.and)(B$(t,e,o,r.ownProperties),(0,jt._)`${i} = ${o}`)))}xt.checkMissingProp=vce;function bce(t,e){t.setParams({missingProperty:e},!0),t.error()}xt.reportMissingProp=bce;function E6(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,jt._)`Object.prototype.hasOwnProperty`})}xt.hasPropFunc=E6;function F$(t,e,r){return(0,jt._)`${E6(t)}.call(${e}, ${r})`}xt.isOwnProperty=F$;function wce(t,e,r,n){let i=(0,jt._)`${e}${(0,jt.getProperty)(r)} !== undefined`;return n?(0,jt._)`${i} && ${F$(t,e,r)}`:i}xt.propertyInData=wce;function B$(t,e,r,n){let i=(0,jt._)`${e}${(0,jt.getProperty)(r)} === undefined`;return n?(0,jt.or)(i,(0,jt.not)(F$(t,e,r))):i}xt.noPropertyInData=B$;function I6(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}xt.allSchemaProperties=I6;function xce(t,e){return I6(e).filter(r=>!(0,L$.alwaysValidSchema)(t,e[r]))}xt.schemaProperties=xce;function Sce({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:i,errorPath:o},it:a},s,l,c){let u=c?(0,jt._)`${t}, ${e}, ${n}${i}`:e,d=[[ka.default.instancePath,(0,jt.strConcat)(ka.default.instancePath,o)],[ka.default.parentData,a.parentData],[ka.default.parentDataProperty,a.parentDataProperty],[ka.default.rootData,ka.default.rootData]];a.opts.dynamicRef&&d.push([ka.default.dynamicAnchors,ka.default.dynamicAnchors]);let f=(0,jt._)`${u}, ${r.object(...d)}`;return l!==jt.nil?(0,jt._)`${s}.call(${l}, ${f})`:(0,jt._)`${s}(${f})`}xt.callValidateCode=Sce;var Ece=(0,jt._)`new RegExp`;function Ice({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:i}=e.code,o=i(r,n);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,jt._)`${i.code==="new RegExp"?Ece:(0,yce.useFunc)(t,i)}(${r}, ${n})`})}xt.usePattern=Ice;function $ce(t){let{gen:e,data:r,keyword:n,it:i}=t,o=e.name("valid");if(i.allErrors){let s=e.let("valid",!0);return a(()=>e.assign(s,!1)),s}return e.var(o,!0),a(()=>e.break()),o;function a(s){let l=e.const("len",(0,jt._)`${r}.length`);e.forRange("i",0,l,c=>{t.subschema({keyword:n,dataProp:c,dataPropType:L$.Type.Num},o),e.if((0,jt.not)(o),s)})}}xt.validateArray=$ce;function Pce(t){let{gen:e,schema:r,keyword:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(l=>(0,L$.alwaysValidSchema)(i,l))&&!i.opts.unevaluated)return;let a=e.let("valid",!1),s=e.name("_valid");e.block(()=>r.forEach((l,c)=>{let u=t.subschema({keyword:n,schemaProp:c,compositeRule:!0},s);e.assign(a,(0,jt._)`${a} || ${s}`),t.mergeValidEvaluated(u,s)||e.if((0,jt.not)(a))})),t.result(a,()=>t.reset(),()=>t.error(!0))}xt.validateUnion=Pce});var T6=b(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.validateKeywordUsage=Ki.validSchemaType=Ki.funcKeywordCode=Ki.macroKeywordCode=void 0;var on=Ne(),tl=Fo(),Tce=ti(),Ace=Sp();function kce(t,e){let{gen:r,keyword:n,schema:i,parentSchema:o,it:a}=t,s=e.macro.call(a.self,i,o,a),l=P6(r,n,s);a.opts.validateSchema!==!1&&a.self.validateSchema(s,!0);let c=r.name("valid");t.subschema({schema:s,schemaPath:on.nil,errSchemaPath:`${a.errSchemaPath}/${n}`,topSchemaRef:l,compositeRule:!0},c),t.pass(c,()=>t.error(!0))}Ki.macroKeywordCode=kce;function Cce(t,e){var r;let{gen:n,keyword:i,schema:o,parentSchema:a,$data:s,it:l}=t;Dce(l,e);let c=!s&&e.compile?e.compile.call(l.self,o,a,l):e.validate,u=P6(n,i,c),d=n.let("valid");t.block$data(d,f),t.ok((r=e.valid)!==null&&r!==void 0?r:d);function f(){if(e.errors===!1)m(),e.modifying&&$6(t),y(()=>t.error());else{let g=e.async?p():h();e.modifying&&$6(t),y(()=>Rce(t,g))}}function p(){let g=n.let("ruleErrs",null);return n.try(()=>m((0,on._)`await `),v=>n.assign(d,!1).if((0,on._)`${v} instanceof ${l.ValidationError}`,()=>n.assign(g,(0,on._)`${v}.errors`),()=>n.throw(v))),g}function h(){let g=(0,on._)`${u}.errors`;return n.assign(g,null),m(on.nil),g}function m(g=e.async?(0,on._)`await `:on.nil){let v=l.opts.passContext?tl.default.this:tl.default.self,E=!("compile"in e&&!s||e.schema===!1);n.assign(d,(0,on._)`${g}${(0,Tce.callValidateCode)(t,u,v,E)}`,e.modifying)}function y(g){var v;n.if((0,on.not)((v=e.valid)!==null&&v!==void 0?v:d),g)}}Ki.funcKeywordCode=Cce;function $6(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,on._)`${n.parentData}[${n.parentDataProperty}]`))}function Rce(t,e){let{gen:r}=t;r.if((0,on._)`Array.isArray(${e})`,()=>{r.assign(tl.default.vErrors,(0,on._)`${tl.default.vErrors} === null ? ${e} : ${tl.default.vErrors}.concat(${e})`).assign(tl.default.errors,(0,on._)`${tl.default.vErrors}.length`),(0,Ace.extendErrors)(t)},()=>t.error())}function Dce({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function P6(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,on.stringify)(r)})}function Oce(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t>"u")}Ki.validSchemaType=Oce;function Mce({schema:t,opts:e,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");let a=i.dependencies;if(a!=null&&a.some(s=>!Object.prototype.hasOwnProperty.call(t,s)))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(t[o])){let l=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(l);else throw new Error(l)}}Ki.validateKeywordUsage=Mce});var k6=b(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.extendSubschemaMode=Ca.extendSubschemaData=Ca.getSubschema=void 0;var Yi=Ne(),A6=it();function Nce(t,{keyword:e,schemaProp:r,schema:n,schemaPath:i,errSchemaPath:o,topSchemaRef:a}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let s=t.schema[e];return r===void 0?{schema:s,schemaPath:(0,Yi._)`${t.schemaPath}${(0,Yi.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:s[r],schemaPath:(0,Yi._)`${t.schemaPath}${(0,Yi.getProperty)(e)}${(0,Yi.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,A6.escapeFragment)(r)}`}}if(n!==void 0){if(i===void 0||o===void 0||a===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:i,topSchemaRef:a,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')}Ca.getSubschema=Nce;function jce(t,e,{dataProp:r,dataPropType:n,data:i,dataTypes:o,propertyName:a}){if(i!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:s}=e;if(r!==void 0){let{errorPath:c,dataPathArr:u,opts:d}=e,f=s.let("data",(0,Yi._)`${e.data}${(0,Yi.getProperty)(r)}`,!0);l(f),t.errorPath=(0,Yi.str)`${c}${(0,A6.getErrorPath)(r,n,d.jsPropertySyntax)}`,t.parentDataProperty=(0,Yi._)`${r}`,t.dataPathArr=[...u,t.parentDataProperty]}if(i!==void 0){let c=i instanceof Yi.Name?i:s.let("data",i,!0);l(c),a!==void 0&&(t.propertyName=a)}o&&(t.dataTypes=o);function l(c){t.data=c,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,c]}}Ca.extendSubschemaData=jce;function zce(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){n!==void 0&&(t.compositeRule=n),i!==void 0&&(t.createErrors=i),o!==void 0&&(t.allErrors=o),t.jtdDiscriminator=e,t.jtdMetadata=r}Ca.extendSubschemaMode=zce});var R6=b((EBe,C6)=>{"use strict";var Ra=C6.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},i=r.post||function(){};my(e,n,i,t,"",t)};Ra.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Ra.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Ra.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Ra.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 my(t,e,r,n,i,o,a,s,l,c){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,i,o,a,s,l,c);for(var u in n){var d=n[u];if(Array.isArray(d)){if(u in Ra.arrayKeywords)for(var f=0;f<d.length;f++)my(t,e,r,d[f],i+"/"+u+"/"+f,o,i,u,n,f)}else if(u in Ra.propsKeywords){if(d&&typeof d=="object")for(var p in d)my(t,e,r,d[p],i+"/"+u+"/"+Lce(p),o,i,u,n,p)}else(u in Ra.keywords||t.allKeys&&!(u in Ra.skipKeywords))&&my(t,e,r,d,i+"/"+u,o,i,u,n)}r(n,i,o,a,s,l,c)}}function Lce(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Ip=b(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.getSchemaRefs=vn.resolveUrl=vn.normalizeId=vn._getFullPath=vn.getFullPath=vn.inlineRef=void 0;var Fce=it(),Bce=Kf(),Uce=R6(),qce=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Zce(t,e=!0){return typeof t=="boolean"?!0:e===!0?!U$(t):e?D6(t)<=e:!1}vn.inlineRef=Zce;var Hce=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function U$(t){for(let e in t){if(Hce.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(U$)||typeof r=="object"&&U$(r))return!0}return!1}function D6(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!qce.has(r)&&(typeof t[r]=="object"&&(0,Fce.eachItem)(t[r],n=>e+=D6(n)),e===1/0))return 1/0}return e}function O6(t,e="",r){r!==!1&&(e=eu(e));let n=t.parse(e);return M6(t,n)}vn.getFullPath=O6;function M6(t,e){return t.serialize(e).split("#")[0]+"#"}vn._getFullPath=M6;var Vce=/#\/?$/;function eu(t){return t?t.replace(Vce,""):""}vn.normalizeId=eu;function Gce(t,e,r){return r=eu(r),t.resolve(e,r)}vn.resolveUrl=Gce;var Wce=/^[a-z_][-a-z0-9._]*$/i;function Jce(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,i=eu(t[r]||e),o={"":i},a=O6(n,i,!1),s={},l=new Set;return Uce(t,{allKeys:!0},(d,f,p,h)=>{if(h===void 0)return;let m=a+f,y=o[h];typeof d[r]=="string"&&(y=g.call(this,d[r])),v.call(this,d.$anchor),v.call(this,d.$dynamicAnchor),o[f]=y;function g(E){let x=this.opts.uriResolver.resolve;if(E=eu(y?x(y,E):E),l.has(E))throw u(E);l.add(E);let w=this.refs[E];return typeof w=="string"&&(w=this.refs[w]),typeof w=="object"?c(d,w.schema,E):E!==eu(m)&&(E[0]==="#"?(c(d,s[E],E),s[E]=d):this.refs[E]=m),E}function v(E){if(typeof E=="string"){if(!Wce.test(E))throw new Error(`invalid anchor "${E}"`);g.call(this,`#${E}`)}}}),s;function c(d,f,p){if(f!==void 0&&!Bce(d,f))throw u(p)}function u(d){return new Error(`reference "${d}" resolves to more than one schema`)}}vn.getSchemaRefs=Jce});var Tp=b(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.getData=Da.KeywordCxt=Da.validateFunctionCode=void 0;var F6=g6(),N6=Ep(),Z$=M$(),gy=Ep(),Kce=S6(),Pp=T6(),q$=k6(),fe=Ne(),$e=Fo(),Yce=Ip(),Bo=it(),$p=Sp();function Xce(t){if(q6(t)&&(Z6(t),U6(t))){tue(t);return}B6(t,()=>(0,F6.topBoolOrEmptySchema)(t))}Da.validateFunctionCode=Xce;function B6({gen:t,validateName:e,schema:r,schemaEnv:n,opts:i},o){i.code.es5?t.func(e,(0,fe._)`${$e.default.data}, ${$e.default.valCxt}`,n.$async,()=>{t.code((0,fe._)`"use strict"; ${j6(r,i)}`),eue(t,i),t.code(o)}):t.func(e,(0,fe._)`${$e.default.data}, ${Qce(i)}`,n.$async,()=>t.code(j6(r,i)).code(o))}function Qce(t){return(0,fe._)`{${$e.default.instancePath}="", ${$e.default.parentData}, ${$e.default.parentDataProperty}, ${$e.default.rootData}=${$e.default.data}${t.dynamicRef?(0,fe._)`, ${$e.default.dynamicAnchors}={}`:fe.nil}}={}`}function eue(t,e){t.if($e.default.valCxt,()=>{t.var($e.default.instancePath,(0,fe._)`${$e.default.valCxt}.${$e.default.instancePath}`),t.var($e.default.parentData,(0,fe._)`${$e.default.valCxt}.${$e.default.parentData}`),t.var($e.default.parentDataProperty,(0,fe._)`${$e.default.valCxt}.${$e.default.parentDataProperty}`),t.var($e.default.rootData,(0,fe._)`${$e.default.valCxt}.${$e.default.rootData}`),e.dynamicRef&&t.var($e.default.dynamicAnchors,(0,fe._)`${$e.default.valCxt}.${$e.default.dynamicAnchors}`)},()=>{t.var($e.default.instancePath,(0,fe._)`""`),t.var($e.default.parentData,(0,fe._)`undefined`),t.var($e.default.parentDataProperty,(0,fe._)`undefined`),t.var($e.default.rootData,$e.default.data),e.dynamicRef&&t.var($e.default.dynamicAnchors,(0,fe._)`{}`)})}function tue(t){let{schema:e,opts:r,gen:n}=t;B6(t,()=>{r.$comment&&e.$comment&&V6(t),aue(t),n.let($e.default.vErrors,null),n.let($e.default.errors,0),r.unevaluated&&rue(t),H6(t),cue(t)})}function rue(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,fe._)`${r}.evaluated`),e.if((0,fe._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,fe._)`${t.evaluated}.props`,(0,fe._)`undefined`)),e.if((0,fe._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,fe._)`${t.evaluated}.items`,(0,fe._)`undefined`))}function j6(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,fe._)`/*# sourceURL=${r} */`:fe.nil}function nue(t,e){if(q6(t)&&(Z6(t),U6(t))){iue(t,e);return}(0,F6.boolOrEmptySchema)(t,e)}function U6({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function q6(t){return typeof t.schema!="boolean"}function iue(t,e){let{schema:r,gen:n,opts:i}=t;i.$comment&&r.$comment&&V6(t),sue(t),lue(t);let o=n.const("_errs",$e.default.errors);H6(t,o),n.var(e,(0,fe._)`${o} === ${$e.default.errors}`)}function Z6(t){(0,Bo.checkUnknownRules)(t),oue(t)}function H6(t,e){if(t.opts.jtd)return z6(t,[],!1,e);let r=(0,N6.getSchemaTypes)(t.schema),n=(0,N6.coerceAndCheckDataType)(t,r);z6(t,r,!n,e)}function oue(t){let{schema:e,errSchemaPath:r,opts:n,self:i}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,Bo.schemaHasRulesButRef)(e,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function aue(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Bo.checkStrictMode)(t,"default is ignored in the schema root")}function sue(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Yce.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function lue(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function V6({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:i}){let o=r.$comment;if(i.$comment===!0)t.code((0,fe._)`${$e.default.self}.logger.log(${o})`);else if(typeof i.$comment=="function"){let a=(0,fe.str)`${n}/$comment`,s=t.scopeValue("root",{ref:e.root});t.code((0,fe._)`${$e.default.self}.opts.$comment(${o}, ${a}, ${s}.schema)`)}}function cue(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=t;r.$async?e.if((0,fe._)`${$e.default.errors} === 0`,()=>e.return($e.default.data),()=>e.throw((0,fe._)`new ${i}(${$e.default.vErrors})`)):(e.assign((0,fe._)`${n}.errors`,$e.default.vErrors),o.unevaluated&&uue(t),e.return((0,fe._)`${$e.default.errors} === 0`))}function uue({gen:t,evaluated:e,props:r,items:n}){r instanceof fe.Name&&t.assign((0,fe._)`${e}.props`,r),n instanceof fe.Name&&t.assign((0,fe._)`${e}.items`,n)}function z6(t,e,r,n){let{gen:i,schema:o,data:a,allErrors:s,opts:l,self:c}=t,{RULES:u}=c;if(o.$ref&&(l.ignoreKeywordsWithRef||!(0,Bo.schemaHasRulesButRef)(o,u))){i.block(()=>W6(t,"$ref",u.all.$ref.definition));return}l.jtd||due(t,e),i.block(()=>{for(let f of u.rules)d(f);d(u.post)});function d(f){(0,Z$.shouldUseGroup)(o,f)&&(f.type?(i.if((0,gy.checkDataType)(f.type,a,l.strictNumbers)),L6(t,f),e.length===1&&e[0]===f.type&&r&&(i.else(),(0,gy.reportTypeError)(t)),i.endIf()):L6(t,f),s||i.if((0,fe._)`${$e.default.errors} === ${n||0}`))}}function L6(t,e){let{gen:r,schema:n,opts:{useDefaults:i}}=t;i&&(0,Kce.assignDefaults)(t,e.type),r.block(()=>{for(let o of e.rules)(0,Z$.shouldUseRule)(n,o)&&W6(t,o.keyword,o.definition,e.type)})}function due(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(fue(t,e),t.opts.allowUnionTypes||pue(t,e),hue(t,t.dataTypes))}function fue(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{G6(t.dataTypes,r)||H$(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),gue(t,e)}}function pue(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&H$(t,"use allowUnionTypes to allow union type keyword")}function hue(t,e){let r=t.self.RULES.all;for(let n in r){let i=r[n];if(typeof i=="object"&&(0,Z$.shouldUseRule)(t.schema,i)){let{type:o}=i.definition;o.length&&!o.some(a=>mue(e,a))&&H$(t,`missing type "${o.join(",")}" for keyword "${n}"`)}}}function mue(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function G6(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function gue(t,e){let r=[];for(let n of t.dataTypes)G6(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function H$(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,Bo.checkStrictMode)(t,e,t.opts.strictTypes)}var yy=class{constructor(e,r,n){if((0,Pp.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Bo.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",J6(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Pp.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",$e.default.errors))}result(e,r,n){this.failResult((0,fe.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,fe.not)(e),void 0,r)}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:r}=this;this.fail((0,fe._)`${r} !== undefined && (${(0,fe.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?$p.reportExtraError:$p.reportError)(this,this.def.error,r)}$dataError(){(0,$p.reportError)(this,this.def.$dataError||$p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,$p.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=fe.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=fe.nil,r=fe.nil){if(!this.$data)return;let{gen:n,schemaCode:i,schemaType:o,def:a}=this;n.if((0,fe.or)((0,fe._)`${i} === undefined`,r)),e!==fe.nil&&n.assign(e,!0),(o.length||a.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==fe.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:i,it:o}=this;return(0,fe.or)(a(),s());function a(){if(n.length){if(!(r instanceof fe.Name))throw new Error("ajv implementation error");let l=Array.isArray(n)?n:[n];return(0,fe._)`${(0,gy.checkDataTypes)(l,r,o.opts.strictNumbers,gy.DataType.Wrong)}`}return fe.nil}function s(){if(i.validateSchema){let l=e.scopeValue("validate$data",{ref:i.validateSchema});return(0,fe._)`!${l}(${r})`}return fe.nil}}subschema(e,r){let n=(0,q$.getSubschema)(this.it,e);(0,q$.extendSubschemaData)(n,this.it,e),(0,q$.extendSubschemaMode)(n,e);let i={...this.it,...n,items:void 0,props:void 0};return nue(i,r),i}mergeEvaluated(e,r){let{it:n,gen:i}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Bo.mergeEvaluated.props(i,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=Bo.mergeEvaluated.items(i,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:i}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return i.if(r,()=>this.mergeEvaluated(e,fe.Name)),!0}};Da.KeywordCxt=yy;function W6(t,e,r,n){let i=new yy(t,r,e);"code"in r?r.code(i,n):i.$data&&r.validate?(0,Pp.funcKeywordCode)(i,r):"macro"in r?(0,Pp.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,Pp.funcKeywordCode)(i,r)}var yue=/^\/(?:[^~]|~0|~1)*$/,_ue=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function J6(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let i,o;if(t==="")return $e.default.rootData;if(t[0]==="/"){if(!yue.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);i=t,o=$e.default.rootData}else{let c=_ue.exec(t);if(!c)throw new Error(`Invalid JSON-pointer: ${t}`);let u=+c[1];if(i=c[2],i==="#"){if(u>=e)throw new Error(l("property/index",u));return n[e-u]}if(u>e)throw new Error(l("data",u));if(o=r[e-u],!i)return o}let a=o,s=i.split("/");for(let c of s)c&&(o=(0,fe._)`${o}${(0,fe.getProperty)((0,Bo.unescapeJsonPointer)(c))}`,a=(0,fe._)`${a} && ${o}`);return a;function l(c,u){return`Cannot access ${c} ${u} levels up, current level is ${e}`}}Da.getData=J6});var _y=b(G$=>{"use strict";Object.defineProperty(G$,"__esModule",{value:!0});var V$=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};G$.default=V$});var Ap=b(K$=>{"use strict";Object.defineProperty(K$,"__esModule",{value:!0});var W$=Ip(),J$=class extends Error{constructor(e,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,W$.resolveUrl)(e,r,n),this.missingSchema=(0,W$.normalizeId)((0,W$.getFullPath)(e,this.missingRef))}};K$.default=J$});var by=b(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.resolveSchema=ri.getCompilingSchema=ri.resolveRef=ri.compileSchema=ri.SchemaEnv=void 0;var $i=Ne(),vue=_y(),rl=Fo(),Pi=Ip(),K6=it(),bue=Tp(),tu=class{constructor(e){var r;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(r=e.baseId)!==null&&r!==void 0?r:(0,Pi.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};ri.SchemaEnv=tu;function X$(t){let e=Y6.call(this,t);if(e)return e;let r=(0,Pi.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:o}=this.opts,a=new $i.CodeGen(this.scope,{es5:n,lines:i,ownProperties:o}),s;t.$async&&(s=a.scopeValue("Error",{ref:vue.default,code:(0,$i._)`require("ajv/dist/runtime/validation_error").default`}));let l=a.scopeName("validate");t.validateName=l;let c={gen:a,allErrors:this.opts.allErrors,data:rl.default.data,parentData:rl.default.parentData,parentDataProperty:rl.default.parentDataProperty,dataNames:[rl.default.data],dataPathArr:[$i.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,$i.stringify)(t.schema)}:{ref:t.schema}),validateName:l,ValidationError:s,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:$i.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,$i._)`""`,opts:this.opts,self:this},u;try{this._compilations.add(t),(0,bue.validateFunctionCode)(c),a.optimize(this.opts.code.optimize);let d=a.toString();u=`${a.scopeRefs(rl.default.scope)}return ${d}`,this.opts.code.process&&(u=this.opts.code.process(u,t));let p=new Function(`${rl.default.self}`,`${rl.default.scope}`,u)(this,this.scope.get());if(this.scope.value(l,{ref:p}),p.errors=null,p.schema=t.schema,p.schemaEnv=t,t.$async&&(p.$async=!0),this.opts.code.source===!0&&(p.source={validateName:l,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){let{props:h,items:m}=c;p.evaluated={props:h instanceof $i.Name?void 0:h,items:m instanceof $i.Name?void 0:m,dynamicProps:h instanceof $i.Name,dynamicItems:m instanceof $i.Name},p.source&&(p.source.evaluated=(0,$i.stringify)(p.evaluated))}return t.validate=p,t}catch(d){throw delete t.validate,delete t.validateName,u&&this.logger.error("Error compiling schema, function code:",u),d}finally{this._compilations.delete(t)}}ri.compileSchema=X$;function wue(t,e,r){var n;r=(0,Pi.resolveUrl)(this.opts.uriResolver,e,r);let i=t.refs[r];if(i)return i;let o=Eue.call(this,t,r);if(o===void 0){let a=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:s}=this.opts;a&&(o=new tu({schema:a,schemaId:s,root:t,baseId:e}))}if(o!==void 0)return t.refs[r]=xue.call(this,o)}ri.resolveRef=wue;function xue(t){return(0,Pi.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:X$.call(this,t)}function Y6(t){for(let e of this._compilations)if(Sue(e,t))return e}ri.getCompilingSchema=Y6;function Sue(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function Eue(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||vy.call(this,t,e)}function vy(t,e){let r=this.opts.uriResolver.parse(e),n=(0,Pi._getFullPath)(this.opts.uriResolver,r),i=(0,Pi.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===i)return Y$.call(this,r,t);let o=(0,Pi.normalizeId)(n),a=this.refs[o]||this.schemas[o];if(typeof a=="string"){let s=vy.call(this,t,a);return typeof(s==null?void 0:s.schema)!="object"?void 0:Y$.call(this,r,s)}if(typeof(a==null?void 0:a.schema)=="object"){if(a.validate||X$.call(this,a),o===(0,Pi.normalizeId)(e)){let{schema:s}=a,{schemaId:l}=this.opts,c=s[l];return c&&(i=(0,Pi.resolveUrl)(this.opts.uriResolver,i,c)),new tu({schema:s,schemaId:l,root:t,baseId:i})}return Y$.call(this,r,a)}}ri.resolveSchema=vy;var Iue=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Y$(t,{baseId:e,schema:r,root:n}){var i;if(((i=t.fragment)===null||i===void 0?void 0:i[0])!=="/")return;for(let s of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let l=r[(0,K6.unescapeFragment)(s)];if(l===void 0)return;r=l;let c=typeof r=="object"&&r[this.opts.schemaId];!Iue.has(s)&&c&&(e=(0,Pi.resolveUrl)(this.opts.uriResolver,e,c))}let o;if(typeof r!="boolean"&&r.$ref&&!(0,K6.schemaHasRulesButRef)(r,this.RULES)){let s=(0,Pi.resolveUrl)(this.opts.uriResolver,e,r.$ref);o=vy.call(this,n,s)}let{schemaId:a}=this.opts;if(o=o||new tu({schema:r,schemaId:a,root:n,baseId:e}),o.schema!==o.root.schema)return o}});var X6=b((kBe,$ue)=>{$ue.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 ez=b(Q$=>{"use strict";Object.defineProperty(Q$,"__esModule",{value:!0});var Q6=mI();Q6.code='require("ajv/dist/runtime/uri").default';Q$.default=Q6});var lz=b(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.CodeGen=xr.Name=xr.nil=xr.stringify=xr.str=xr._=xr.KeywordCxt=void 0;var Pue=Tp();Object.defineProperty(xr,"KeywordCxt",{enumerable:!0,get:function(){return Pue.KeywordCxt}});var ru=Ne();Object.defineProperty(xr,"_",{enumerable:!0,get:function(){return ru._}});Object.defineProperty(xr,"str",{enumerable:!0,get:function(){return ru.str}});Object.defineProperty(xr,"stringify",{enumerable:!0,get:function(){return ru.stringify}});Object.defineProperty(xr,"nil",{enumerable:!0,get:function(){return ru.nil}});Object.defineProperty(xr,"Name",{enumerable:!0,get:function(){return ru.Name}});Object.defineProperty(xr,"CodeGen",{enumerable:!0,get:function(){return ru.CodeGen}});var Tue=_y(),oz=Ap(),Aue=O$(),kp=by(),kue=Ne(),Cp=Ip(),wy=Ep(),tP=it(),tz=X6(),Cue=ez(),az=(t,e)=>new RegExp(t,e);az.code="new RegExp";var Rue=["removeAdditional","useDefaults","coerceTypes"],Due=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Oue={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."},Mue={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},rz=200;function Nue(t){var e,r,n,i,o,a,s,l,c,u,d,f,p,h,m,y,g,v,E,x,w,k,P,R,T;let D=t.strict,A=(e=t.code)===null||e===void 0?void 0:e.optimize,M=A===!0||A===void 0?1:A||0,U=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:az,z=(i=t.uriResolver)!==null&&i!==void 0?i:Cue.default;return{strictSchema:(a=(o=t.strictSchema)!==null&&o!==void 0?o:D)!==null&&a!==void 0?a:!0,strictNumbers:(l=(s=t.strictNumbers)!==null&&s!==void 0?s:D)!==null&&l!==void 0?l:!0,strictTypes:(u=(c=t.strictTypes)!==null&&c!==void 0?c:D)!==null&&u!==void 0?u:"log",strictTuples:(f=(d=t.strictTuples)!==null&&d!==void 0?d:D)!==null&&f!==void 0?f:"log",strictRequired:(h=(p=t.strictRequired)!==null&&p!==void 0?p:D)!==null&&h!==void 0?h:!1,code:t.code?{...t.code,optimize:M,regExp:U}:{optimize:M,regExp:U},loopRequired:(m=t.loopRequired)!==null&&m!==void 0?m:rz,loopEnum:(y=t.loopEnum)!==null&&y!==void 0?y:rz,meta:(g=t.meta)!==null&&g!==void 0?g:!0,messages:(v=t.messages)!==null&&v!==void 0?v:!0,inlineRefs:(E=t.inlineRefs)!==null&&E!==void 0?E:!0,schemaId:(x=t.schemaId)!==null&&x!==void 0?x:"$id",addUsedSchema:(w=t.addUsedSchema)!==null&&w!==void 0?w:!0,validateSchema:(k=t.validateSchema)!==null&&k!==void 0?k:!0,validateFormats:(P=t.validateFormats)!==null&&P!==void 0?P:!0,unicodeRegExp:(R=t.unicodeRegExp)!==null&&R!==void 0?R:!0,int32range:(T=t.int32range)!==null&&T!==void 0?T:!0,uriResolver:z}}var Rp=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Nue(e)};let{es5:r,lines:n}=this.opts.code;this.scope=new kue.ValueScope({scope:{},prefixes:Due,es5:r,lines:n}),this.logger=Uue(e.logger);let i=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Aue.getRules)(),nz.call(this,Oue,e,"NOT SUPPORTED"),nz.call(this,Mue,e,"DEPRECATED","warn"),this._metaOpts=Fue.call(this),e.formats&&zue.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Lue.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),jue.call(this),e.validateFormats=i}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,i=tz;n==="id"&&(i={...tz},i.id=i.$id,delete i.$id),r&&e&&this.addMetaSchema(i,i[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let i=n(r);return"$async"in n||(this.errors=n.errors),i}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return i.call(this,e,r);async function i(u,d){await o.call(this,u.$schema);let f=this._addSchema(u,d);return f.validate||a.call(this,f)}async function o(u){u&&!this.getSchema(u)&&await i.call(this,{$ref:u},!0)}async function a(u){try{return this._compileSchemaEnv(u)}catch(d){if(!(d instanceof oz.default))throw d;return s.call(this,d),await l.call(this,d.missingSchema),a.call(this,u)}}function s({missingSchema:u,missingRef:d}){if(this.refs[u])throw new Error(`AnySchema ${u} is loaded but ${d} cannot be resolved`)}async function l(u){let d=await c.call(this,u);this.refs[u]||await o.call(this,d.$schema),this.refs[u]||this.addSchema(d,u,r)}async function c(u){let d=this._loading[u];if(d)return d;try{return await(this._loading[u]=n(u))}finally{delete this._loading[u]}}}addSchema(e,r,n,i=this.opts.validateSchema){if(Array.isArray(e)){for(let a of e)this.addSchema(a,void 0,n,i);return this}let o;if(typeof e=="object"){let{schemaId:a}=this.opts;if(o=e[a],o!==void 0&&typeof o!="string")throw new Error(`schema ${a} must be string`)}return r=(0,Cp.normalizeId)(r||o),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,i,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let i=this.validate(n,e);if(!i&&r){let o="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(o);else throw new Error(o)}return i}getSchema(e){let r;for(;typeof(r=iz.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,i=new kp.SchemaEnv({schema:{},schemaId:n});if(r=kp.resolveSchema.call(this,i,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}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 r=iz.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,Cp.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Zue.call(this,n,r),!r)return(0,tP.eachItem)(n,o=>eP.call(this,o)),this;Vue.call(this,r);let i={...r,type:(0,wy.getJSONTypes)(r.type),schemaType:(0,wy.getJSONTypes)(r.schemaType)};return(0,tP.eachItem)(n,i.type.length===0?o=>eP.call(this,o,i):o=>i.type.forEach(a=>eP.call(this,o,i,a))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let i=n.rules.findIndex(o=>o.keyword===e);i>=0&&n.rules.splice(i,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(i=>`${n}${i.instancePath} ${i.message}`).reduce((i,o)=>i+r+o)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let i of r){let o=i.split("/").slice(1),a=e;for(let s of o)a=a[s];for(let s in n){let l=n[s];if(typeof l!="object")continue;let{$data:c}=l.definition,u=a[s];c&&u&&(a[s]=sz(u))}}return e}_removeAllSchemas(e,r){for(let n in e){let i=e[n];(!r||r.test(n))&&(typeof i=="string"?delete e[n]:i&&!i.meta&&(this._cache.delete(i.schema),delete e[n]))}}_addSchema(e,r,n,i=this.opts.validateSchema,o=this.opts.addUsedSchema){let a,{schemaId:s}=this.opts;if(typeof e=="object")a=e[s];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 l=this._cache.get(e);if(l!==void 0)return l;n=(0,Cp.normalizeId)(a||n);let c=Cp.getSchemaRefs.call(this,e,n);return l=new kp.SchemaEnv({schema:e,schemaId:s,meta:r,baseId:n,localRefs:c}),this._cache.set(l.schema,l),o&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=l),i&&this.validateSchema(e,!0),l}_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):kp.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{kp.compileSchema.call(this,e)}finally{this.opts=r}}};Rp.ValidationError=Tue.default;Rp.MissingRefError=oz.default;xr.default=Rp;function nz(t,e,r,n="error"){for(let i in t){let o=i;o in e&&this.logger[n](`${r}: option ${i}. ${t[o]}`)}}function iz(t){return t=(0,Cp.normalizeId)(t),this.schemas[t]||this.refs[t]}function jue(){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 zue(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function Lue(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 r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function Fue(){let t={...this.opts};for(let e of Rue)delete t[e];return t}var Bue={log(){},warn(){},error(){}};function Uue(t){if(t===!1)return Bue;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 que=/^[a-z_$][a-z0-9_$:-]*$/i;function Zue(t,e){let{RULES:r}=this;if((0,tP.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!que.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function eP(t,e,r){var n;let i=e==null?void 0:e.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:o}=this,a=i?o.post:o.rules.find(({type:l})=>l===r);if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[t]=!0,!e)return;let s={keyword:t,definition:{...e,type:(0,wy.getJSONTypes)(e.type),schemaType:(0,wy.getJSONTypes)(e.schemaType)}};e.before?Hue.call(this,a,s,e.before):a.rules.push(s),o.all[t]=s,(n=e.implements)===null||n===void 0||n.forEach(l=>this.addKeyword(l))}function Hue(t,e,r){let n=t.rules.findIndex(i=>i.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function Vue(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=sz(e)),t.validateSchema=this.compile(e,!0))}var Gue={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function sz(t){return{anyOf:[t,Gue]}}});var cz=b(rP=>{"use strict";Object.defineProperty(rP,"__esModule",{value:!0});var Wue={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};rP.default=Wue});var pz=b(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.callRef=nl.getValidate=void 0;var Jue=Ap(),uz=ti(),bn=Ne(),nu=Fo(),dz=by(),xy=it(),Kue={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:i,schemaEnv:o,validateName:a,opts:s,self:l}=n,{root:c}=o;if((r==="#"||r==="#/")&&i===c.baseId)return d();let u=dz.resolveRef.call(l,c,i,r);if(u===void 0)throw new Jue.default(n.opts.uriResolver,i,r);if(u instanceof dz.SchemaEnv)return f(u);return p(u);function d(){if(o===c)return Sy(t,a,o,o.$async);let h=e.scopeValue("root",{ref:c});return Sy(t,(0,bn._)`${h}.validate`,c,c.$async)}function f(h){let m=fz(t,h);Sy(t,m,h,h.$async)}function p(h){let m=e.scopeValue("schema",s.code.source===!0?{ref:h,code:(0,bn.stringify)(h)}:{ref:h}),y=e.name("valid"),g=t.subschema({schema:h,dataTypes:[],schemaPath:bn.nil,topSchemaRef:m,errSchemaPath:r},y);t.mergeEvaluated(g),t.ok(y)}}};function fz(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,bn._)`${r.scopeValue("wrapper",{ref:e})}.validate`}nl.getValidate=fz;function Sy(t,e,r,n){let{gen:i,it:o}=t,{allErrors:a,schemaEnv:s,opts:l}=o,c=l.passContext?nu.default.this:bn.nil;n?u():d();function u(){if(!s.$async)throw new Error("async schema referenced by sync schema");let h=i.let("valid");i.try(()=>{i.code((0,bn._)`await ${(0,uz.callValidateCode)(t,e,c)}`),p(e),a||i.assign(h,!0)},m=>{i.if((0,bn._)`!(${m} instanceof ${o.ValidationError})`,()=>i.throw(m)),f(m),a||i.assign(h,!1)}),t.ok(h)}function d(){t.result((0,uz.callValidateCode)(t,e,c),()=>p(e),()=>f(e))}function f(h){let m=(0,bn._)`${h}.errors`;i.assign(nu.default.vErrors,(0,bn._)`${nu.default.vErrors} === null ? ${m} : ${nu.default.vErrors}.concat(${m})`),i.assign(nu.default.errors,(0,bn._)`${nu.default.vErrors}.length`)}function p(h){var m;if(!o.opts.unevaluated)return;let y=(m=r==null?void 0:r.validate)===null||m===void 0?void 0:m.evaluated;if(o.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(o.props=xy.mergeEvaluated.props(i,y.props,o.props));else{let g=i.var("props",(0,bn._)`${h}.evaluated.props`);o.props=xy.mergeEvaluated.props(i,g,o.props,bn.Name)}if(o.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(o.items=xy.mergeEvaluated.items(i,y.items,o.items));else{let g=i.var("items",(0,bn._)`${h}.evaluated.items`);o.items=xy.mergeEvaluated.items(i,g,o.items,bn.Name)}}}nl.callRef=Sy;nl.default=Kue});var hz=b(nP=>{"use strict";Object.defineProperty(nP,"__esModule",{value:!0});var Yue=cz(),Xue=pz(),Que=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Yue.default,Xue.default];nP.default=Que});var mz=b(iP=>{"use strict";Object.defineProperty(iP,"__esModule",{value:!0});var Ey=Ne(),Oa=Ey.operators,Iy={maximum:{okStr:"<=",ok:Oa.LTE,fail:Oa.GT},minimum:{okStr:">=",ok:Oa.GTE,fail:Oa.LT},exclusiveMaximum:{okStr:"<",ok:Oa.LT,fail:Oa.GTE},exclusiveMinimum:{okStr:">",ok:Oa.GT,fail:Oa.LTE}},ede={message:({keyword:t,schemaCode:e})=>(0,Ey.str)`must be ${Iy[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Ey._)`{comparison: ${Iy[t].okStr}, limit: ${e}}`},tde={keyword:Object.keys(Iy),type:"number",schemaType:"number",$data:!0,error:ede,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Ey._)`${r} ${Iy[e].fail} ${n} || isNaN(${r})`)}};iP.default=tde});var gz=b(oP=>{"use strict";Object.defineProperty(oP,"__esModule",{value:!0});var Dp=Ne(),rde={message:({schemaCode:t})=>(0,Dp.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,Dp._)`{multipleOf: ${t}}`},nde={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:rde,code(t){let{gen:e,data:r,schemaCode:n,it:i}=t,o=i.opts.multipleOfPrecision,a=e.let("res"),s=o?(0,Dp._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${o}`:(0,Dp._)`${a} !== parseInt(${a})`;t.fail$data((0,Dp._)`(${n} === 0 || (${a} = ${r}/${n}, ${s}))`)}};oP.default=nde});var _z=b(aP=>{"use strict";Object.defineProperty(aP,"__esModule",{value:!0});function yz(t){let e=t.length,r=0,n=0,i;for(;n<e;)r++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<e&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return r}aP.default=yz;yz.code='require("ajv/dist/runtime/ucs2length").default'});var vz=b(sP=>{"use strict";Object.defineProperty(sP,"__esModule",{value:!0});var il=Ne(),ide=it(),ode=_z(),ade={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,il.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,il._)`{limit: ${t}}`},sde={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:ade,code(t){let{keyword:e,data:r,schemaCode:n,it:i}=t,o=e==="maxLength"?il.operators.GT:il.operators.LT,a=i.opts.unicode===!1?(0,il._)`${r}.length`:(0,il._)`${(0,ide.useFunc)(t.gen,ode.default)}(${r})`;t.fail$data((0,il._)`${a} ${o} ${n}`)}};sP.default=sde});var bz=b(lP=>{"use strict";Object.defineProperty(lP,"__esModule",{value:!0});var lde=ti(),cde=it(),iu=Ne(),ude={message:({schemaCode:t})=>(0,iu.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,iu._)`{pattern: ${t}}`},dde={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:ude,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:a}=t,s=a.opts.unicodeRegExp?"u":"";if(n){let{regExp:l}=a.opts.code,c=l.code==="new RegExp"?(0,iu._)`new RegExp`:(0,cde.useFunc)(e,l),u=e.let("valid");e.try(()=>e.assign(u,(0,iu._)`${c}(${o}, ${s}).test(${r})`),()=>e.assign(u,!1)),t.fail$data((0,iu._)`!${u}`)}else{let l=(0,lde.usePattern)(t,i);t.fail$data((0,iu._)`!${l}.test(${r})`)}}};lP.default=dde});var wz=b(cP=>{"use strict";Object.defineProperty(cP,"__esModule",{value:!0});var Op=Ne(),fde={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,Op.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,Op._)`{limit: ${t}}`},pde={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:fde,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxProperties"?Op.operators.GT:Op.operators.LT;t.fail$data((0,Op._)`Object.keys(${r}).length ${i} ${n}`)}};cP.default=pde});var xz=b(uP=>{"use strict";Object.defineProperty(uP,"__esModule",{value:!0});var Mp=ti(),Np=Ne(),hde=it(),mde={message:({params:{missingProperty:t}})=>(0,Np.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,Np._)`{missingProperty: ${t}}`},gde={keyword:"required",type:"object",schemaType:"array",$data:!0,error:mde,code(t){let{gen:e,schema:r,schemaCode:n,data:i,$data:o,it:a}=t,{opts:s}=a;if(!o&&r.length===0)return;let l=r.length>=s.loopRequired;if(a.allErrors?c():u(),s.strictRequired){let p=t.parentSchema.properties,{definedProperties:h}=t.it;for(let m of r)if((p==null?void 0:p[m])===void 0&&!h.has(m)){let y=a.schemaEnv.baseId+a.errSchemaPath,g=`required property "${m}" is not defined at "${y}" (strictRequired)`;(0,hde.checkStrictMode)(a,g,a.opts.strictRequired)}}function c(){if(l||o)t.block$data(Np.nil,d);else for(let p of r)(0,Mp.checkReportMissingProp)(t,p)}function u(){let p=e.let("missing");if(l||o){let h=e.let("valid",!0);t.block$data(h,()=>f(p,h)),t.ok(h)}else e.if((0,Mp.checkMissingProp)(t,r,p)),(0,Mp.reportMissingProp)(t,p),e.else()}function d(){e.forOf("prop",n,p=>{t.setParams({missingProperty:p}),e.if((0,Mp.noPropertyInData)(e,i,p,s.ownProperties),()=>t.error())})}function f(p,h){t.setParams({missingProperty:p}),e.forOf(p,n,()=>{e.assign(h,(0,Mp.propertyInData)(e,i,p,s.ownProperties)),e.if((0,Np.not)(h),()=>{t.error(),e.break()})},Np.nil)}}};uP.default=gde});var Sz=b(dP=>{"use strict";Object.defineProperty(dP,"__esModule",{value:!0});var jp=Ne(),yde={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,jp.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,jp._)`{limit: ${t}}`},_de={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:yde,code(t){let{keyword:e,data:r,schemaCode:n}=t,i=e==="maxItems"?jp.operators.GT:jp.operators.LT;t.fail$data((0,jp._)`${r}.length ${i} ${n}`)}};dP.default=_de});var $y=b(fP=>{"use strict";Object.defineProperty(fP,"__esModule",{value:!0});var Ez=Kf();Ez.code='require("ajv/dist/runtime/equal").default';fP.default=Ez});var Iz=b(hP=>{"use strict";Object.defineProperty(hP,"__esModule",{value:!0});var pP=Ep(),Sr=Ne(),vde=it(),bde=$y(),wde={message:({params:{i:t,j:e}})=>(0,Sr.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,Sr._)`{i: ${t}, j: ${e}}`},xde={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:wde,code(t){let{gen:e,data:r,$data:n,schema:i,parentSchema:o,schemaCode:a,it:s}=t;if(!n&&!i)return;let l=e.let("valid"),c=o.items?(0,pP.getSchemaTypes)(o.items):[];t.block$data(l,u,(0,Sr._)`${a} === false`),t.ok(l);function u(){let h=e.let("i",(0,Sr._)`${r}.length`),m=e.let("j");t.setParams({i:h,j:m}),e.assign(l,!0),e.if((0,Sr._)`${h} > 1`,()=>(d()?f:p)(h,m))}function d(){return c.length>0&&!c.some(h=>h==="object"||h==="array")}function f(h,m){let y=e.name("item"),g=(0,pP.checkDataTypes)(c,y,s.opts.strictNumbers,pP.DataType.Wrong),v=e.const("indices",(0,Sr._)`{}`);e.for((0,Sr._)`;${h}--;`,()=>{e.let(y,(0,Sr._)`${r}[${h}]`),e.if(g,(0,Sr._)`continue`),c.length>1&&e.if((0,Sr._)`typeof ${y} == "string"`,(0,Sr._)`${y} += "_"`),e.if((0,Sr._)`typeof ${v}[${y}] == "number"`,()=>{e.assign(m,(0,Sr._)`${v}[${y}]`),t.error(),e.assign(l,!1).break()}).code((0,Sr._)`${v}[${y}] = ${h}`)})}function p(h,m){let y=(0,vde.useFunc)(e,bde.default),g=e.name("outer");e.label(g).for((0,Sr._)`;${h}--;`,()=>e.for((0,Sr._)`${m} = ${h}; ${m}--;`,()=>e.if((0,Sr._)`${y}(${r}[${h}], ${r}[${m}])`,()=>{t.error(),e.assign(l,!1).break(g)})))}}};hP.default=xde});var $z=b(gP=>{"use strict";Object.defineProperty(gP,"__esModule",{value:!0});var mP=Ne(),Sde=it(),Ede=$y(),Ide={message:"must be equal to constant",params:({schemaCode:t})=>(0,mP._)`{allowedValue: ${t}}`},$de={keyword:"const",$data:!0,error:Ide,code(t){let{gen:e,data:r,$data:n,schemaCode:i,schema:o}=t;n||o&&typeof o=="object"?t.fail$data((0,mP._)`!${(0,Sde.useFunc)(e,Ede.default)}(${r}, ${i})`):t.fail((0,mP._)`${o} !== ${r}`)}};gP.default=$de});var Pz=b(yP=>{"use strict";Object.defineProperty(yP,"__esModule",{value:!0});var zp=Ne(),Pde=it(),Tde=$y(),Ade={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,zp._)`{allowedValues: ${t}}`},kde={keyword:"enum",schemaType:"array",$data:!0,error:Ade,code(t){let{gen:e,data:r,$data:n,schema:i,schemaCode:o,it:a}=t;if(!n&&i.length===0)throw new Error("enum must have non-empty array");let s=i.length>=a.opts.loopEnum,l,c=()=>l??(l=(0,Pde.useFunc)(e,Tde.default)),u;if(s||n)u=e.let("valid"),t.block$data(u,d);else{if(!Array.isArray(i))throw new Error("ajv implementation error");let p=e.const("vSchema",o);u=(0,zp.or)(...i.map((h,m)=>f(p,m)))}t.pass(u);function d(){e.assign(u,!1),e.forOf("v",o,p=>e.if((0,zp._)`${c()}(${r}, ${p})`,()=>e.assign(u,!0).break()))}function f(p,h){let m=i[h];return typeof m=="object"&&m!==null?(0,zp._)`${c()}(${r}, ${p}[${h}])`:(0,zp._)`${r} === ${m}`}}};yP.default=kde});var Tz=b(_P=>{"use strict";Object.defineProperty(_P,"__esModule",{value:!0});var Cde=mz(),Rde=gz(),Dde=vz(),Ode=bz(),Mde=wz(),Nde=xz(),jde=Sz(),zde=Iz(),Lde=$z(),Fde=Pz(),Bde=[Cde.default,Rde.default,Dde.default,Ode.default,Mde.default,Nde.default,jde.default,zde.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Lde.default,Fde.default];_P.default=Bde});var bP=b(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});Lp.validateAdditionalItems=void 0;var ol=Ne(),vP=it(),Ude={message:({params:{len:t}})=>(0,ol.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ol._)`{limit: ${t}}`},qde={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Ude,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,vP.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Az(t,n)}};function Az(t,e){let{gen:r,schema:n,data:i,keyword:o,it:a}=t;a.items=!0;let s=r.const("len",(0,ol._)`${i}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,ol._)`${s} <= ${e.length}`);else if(typeof n=="object"&&!(0,vP.alwaysValidSchema)(a,n)){let c=r.var("valid",(0,ol._)`${s} <= ${e.length}`);r.if((0,ol.not)(c),()=>l(c)),t.ok(c)}function l(c){r.forRange("i",e.length,s,u=>{t.subschema({keyword:o,dataProp:u,dataPropType:vP.Type.Num},c),a.allErrors||r.if((0,ol.not)(c),()=>r.break())})}}Lp.validateAdditionalItems=Az;Lp.default=qde});var wP=b(Fp=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});Fp.validateTuple=void 0;var kz=Ne(),Py=it(),Zde=ti(),Hde={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return Cz(t,"additionalItems",e);r.items=!0,!(0,Py.alwaysValidSchema)(r,e)&&t.ok((0,Zde.validateArray)(t))}};function Cz(t,e,r=t.schema){let{gen:n,parentSchema:i,data:o,keyword:a,it:s}=t;u(i),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=Py.mergeEvaluated.items(n,r.length,s.items));let l=n.name("valid"),c=n.const("len",(0,kz._)`${o}.length`);r.forEach((d,f)=>{(0,Py.alwaysValidSchema)(s,d)||(n.if((0,kz._)`${c} > ${f}`,()=>t.subschema({keyword:a,schemaProp:f,dataProp:f},l)),t.ok(l))});function u(d){let{opts:f,errSchemaPath:p}=s,h=r.length,m=h===d.minItems&&(h===d.maxItems||d[e]===!1);if(f.strictTuples&&!m){let y=`"${a}" is ${h}-tuple, but minItems or maxItems/${e} are not specified or different at path "${p}"`;(0,Py.checkStrictMode)(s,y,f.strictTuples)}}}Fp.validateTuple=Cz;Fp.default=Hde});var Rz=b(xP=>{"use strict";Object.defineProperty(xP,"__esModule",{value:!0});var Vde=wP(),Gde={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,Vde.validateTuple)(t,"items")};xP.default=Gde});var Oz=b(SP=>{"use strict";Object.defineProperty(SP,"__esModule",{value:!0});var Dz=Ne(),Wde=it(),Jde=ti(),Kde=bP(),Yde={message:({params:{len:t}})=>(0,Dz.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Dz._)`{limit: ${t}}`},Xde={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Yde,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:i}=r;n.items=!0,!(0,Wde.alwaysValidSchema)(n,e)&&(i?(0,Kde.validateAdditionalItems)(t,i):t.ok((0,Jde.validateArray)(t)))}};SP.default=Xde});var Mz=b(EP=>{"use strict";Object.defineProperty(EP,"__esModule",{value:!0});var ni=Ne(),Ty=it(),Qde={message:({params:{min:t,max:e}})=>e===void 0?(0,ni.str)`must contain at least ${t} valid item(s)`:(0,ni.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,ni._)`{minContains: ${t}}`:(0,ni._)`{minContains: ${t}, maxContains: ${e}}`},efe={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Qde,code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t,a,s,{minContains:l,maxContains:c}=n;o.opts.next?(a=l===void 0?1:l,s=c):a=1;let u=e.const("len",(0,ni._)`${i}.length`);if(t.setParams({min:a,max:s}),s===void 0&&a===0){(0,Ty.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,Ty.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Ty.alwaysValidSchema)(o,r)){let m=(0,ni._)`${u} >= ${a}`;s!==void 0&&(m=(0,ni._)`${m} && ${u} <= ${s}`),t.pass(m);return}o.items=!0;let d=e.name("valid");s===void 0&&a===1?p(d,()=>e.if(d,()=>e.break())):a===0?(e.let(d,!0),s!==void 0&&e.if((0,ni._)`${i}.length > 0`,f)):(e.let(d,!1),f()),t.result(d,()=>t.reset());function f(){let m=e.name("_valid"),y=e.let("count",0);p(m,()=>e.if(m,()=>h(y)))}function p(m,y){e.forRange("i",0,u,g=>{t.subschema({keyword:"contains",dataProp:g,dataPropType:Ty.Type.Num,compositeRule:!0},m),y()})}function h(m){e.code((0,ni._)`${m}++`),s===void 0?e.if((0,ni._)`${m} >= ${a}`,()=>e.assign(d,!0).break()):(e.if((0,ni._)`${m} > ${s}`,()=>e.assign(d,!1).break()),a===1?e.assign(d,!0):e.if((0,ni._)`${m} >= ${a}`,()=>e.assign(d,!0)))}}};EP.default=efe});var zz=b(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Xi.validateSchemaDeps=Xi.validatePropertyDeps=Xi.error=void 0;var IP=Ne(),tfe=it(),Bp=ti();Xi.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,IP.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,IP._)`{property: ${t},
|
|
18
18
|
missingProperty: ${n},
|
|
19
19
|
depsCount: ${e},
|
|
20
|
-
deps: ${r}}`};var rfe={keyword:"dependencies",type:"object",schemaType:"object",error:Xi.error,code(t){let[e,r]=nfe(t);Nz(t,e),jz(t,r)}};function nfe({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function Nz(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let a in e){let s=e[a];if(s.length===0)continue;let l=(0,Bp.propertyInData)(r,n,a,i.opts.ownProperties);t.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),i.allErrors?r.if(l,()=>{for(let c of s)(0,Bp.checkReportMissingProp)(t,c)}):(r.if((0,IP._)`${l} && (${(0,Bp.checkMissingProp)(t,s,o)})`),(0,Bp.reportMissingProp)(t,o),r.else())}}Xi.validatePropertyDeps=Nz;function jz(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,a=r.name("valid");for(let s in e)(0,tfe.alwaysValidSchema)(o,e[s])||(r.if((0,Bp.propertyInData)(r,n,s,o.opts.ownProperties),()=>{let l=t.subschema({keyword:i,schemaProp:s},a);t.mergeValidEvaluated(l,a)},()=>r.var(a,!0)),t.ok(a))}Xi.validateSchemaDeps=jz;Xi.default=rfe});var Fz=b($P=>{"use strict";Object.defineProperty($P,"__esModule",{value:!0});var Lz=Ne(),ife=it(),ofe={message:"property name must be valid",params:({params:t})=>(0,Lz._)`{propertyName: ${t.propertyName}}`},afe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:ofe,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,ife.alwaysValidSchema)(i,r))return;let o=e.name("valid");e.forIn("key",n,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),e.if((0,Lz.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};$P.default=afe});var TP=b(PP=>{"use strict";Object.defineProperty(PP,"__esModule",{value:!0});var Ay=ti(),Ti=Ne(),sfe=Fo(),ky=it(),lfe={message:"must NOT have additional properties",params:({params:t})=>(0,Ti._)`{additionalProperty: ${t.additionalProperty}}`},cfe={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:lfe,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:s,opts:l}=a;if(a.props=!0,l.removeAdditional!=="all"&&(0,ky.alwaysValidSchema)(a,r))return;let c=(0,Ay.allSchemaProperties)(n.properties),u=(0,Ay.allSchemaProperties)(n.patternProperties);d(),t.ok((0,Ti._)`${o} === ${sfe.default.errors}`);function d(){e.forIn("key",i,y=>{!c.length&&!u.length?h(y):e.if(f(y),()=>h(y))})}function f(y){let g;if(c.length>8){let v=(0,ky.schemaRefOrVal)(a,n.properties,"properties");g=(0,Ay.isOwnProperty)(e,v,y)}else c.length?g=(0,Ti.or)(...c.map(v=>(0,Ti._)`${y} === ${v}`)):g=Ti.nil;return u.length&&(g=(0,Ti.or)(g,...u.map(v=>(0,Ti._)`${(0,Ay.usePattern)(t,v)}.test(${y})`))),(0,Ti.not)(g)}function p(y){e.code((0,Ti._)`delete ${i}[${y}]`)}function h(y){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){p(y);return}if(r===!1){t.setParams({additionalProperty:y}),t.error(),s||e.break();return}if(typeof r=="object"&&!(0,ky.alwaysValidSchema)(a,r)){let g=e.name("valid");l.removeAdditional==="failing"?(m(y,g,!1),e.if((0,Ti.not)(g),()=>{t.reset(),p(y)})):(m(y,g),s||e.if((0,Ti.not)(g),()=>e.break()))}}function m(y,g,v){let E={keyword:"additionalProperties",dataProp:y,dataPropType:ky.Type.Str};v===!1&&Object.assign(E,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(E,g)}}};PP.default=cfe});var qz=b(kP=>{"use strict";Object.defineProperty(kP,"__esModule",{value:!0});var ufe=Tp(),Bz=ti(),AP=it(),Uz=TP(),dfe={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Uz.default.code(new ufe.KeywordCxt(o,Uz.default,"additionalProperties"));let a=(0,Bz.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=AP.mergeEvaluated.props(e,(0,AP.toHash)(a),o.props));let s=a.filter(d=>!(0,AP.alwaysValidSchema)(o,r[d]));if(s.length===0)return;let l=e.name("valid");for(let d of s)c(d)?u(d):(e.if((0,Bz.propertyInData)(e,i,d,o.opts.ownProperties)),u(d),o.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(l);function c(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}function u(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},l)}}};kP.default=dfe});var Gz=b(CP=>{"use strict";Object.defineProperty(CP,"__esModule",{value:!0});var Zz=ti(),Cy=Ne(),Hz=it(),Vz=it(),ffe={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:o}=t,{opts:a}=o,s=(0,Zz.allSchemaProperties)(r),l=s.filter(m=>(0,Hz.alwaysValidSchema)(o,r[m]));if(s.length===0||l.length===s.length&&(!o.opts.unevaluated||o.props===!0))return;let c=a.strictSchema&&!a.allowMatchingProperties&&i.properties,u=e.name("valid");o.props!==!0&&!(o.props instanceof Cy.Name)&&(o.props=(0,Vz.evaluatedPropsToName)(e,o.props));let{props:d}=o;f();function f(){for(let m of s)c&&p(m),o.allErrors?h(m):(e.var(u,!0),h(m),e.if(u))}function p(m){for(let y in c)new RegExp(m).test(y)&&(0,Hz.checkStrictMode)(o,`property ${y} matches pattern ${m} (use allowMatchingProperties)`)}function h(m){e.forIn("key",n,y=>{e.if((0,Cy._)`${(0,Zz.usePattern)(t,m)}.test(${y})`,()=>{let g=l.includes(m);g||t.subschema({keyword:"patternProperties",schemaProp:m,dataProp:y,dataPropType:Vz.Type.Str},u),o.opts.unevaluated&&d!==!0?e.assign((0,Cy._)`${d}[${y}]`,!0):!g&&!o.allErrors&&e.if((0,Cy.not)(u),()=>e.break())})})}}};CP.default=ffe});var Wz=b(RP=>{"use strict";Object.defineProperty(RP,"__esModule",{value:!0});var pfe=it(),hfe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,pfe.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};RP.default=hfe});var Jz=b(DP=>{"use strict";Object.defineProperty(DP,"__esModule",{value:!0});var mfe=ti(),gfe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:mfe.validateUnion,error:{message:"must match a schema in anyOf"}};DP.default=gfe});var Kz=b(OP=>{"use strict";Object.defineProperty(OP,"__esModule",{value:!0});var Ry=Ne(),yfe=it(),_fe={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Ry._)`{passingSchemas: ${t.passing}}`},vfe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:_fe,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=e.let("valid",!1),s=e.let("passing",null),l=e.name("_valid");t.setParams({passing:s}),e.block(c),t.result(a,()=>t.reset(),()=>t.error(!0));function c(){o.forEach((u,d)=>{let f;(0,yfe.alwaysValidSchema)(i,u)?e.var(l,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},l),d>0&&e.if((0,Ry._)`${l} && ${a}`).assign(a,!1).assign(s,(0,Ry._)`[${s}, ${d}]`).else(),e.if(l,()=>{e.assign(a,!0),e.assign(s,d),f&&t.mergeEvaluated(f,Ry.Name)})})}}};OP.default=vfe});var Yz=b(MP=>{"use strict";Object.defineProperty(MP,"__esModule",{value:!0});var bfe=it(),wfe={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((o,a)=>{if((0,bfe.alwaysValidSchema)(n,o))return;let s=t.subschema({keyword:"allOf",schemaProp:a},i);t.ok(i),t.mergeEvaluated(s)})}};MP.default=wfe});var eL=b(NP=>{"use strict";Object.defineProperty(NP,"__esModule",{value:!0});var Dy=Ne(),Qz=it(),xfe={message:({params:t})=>(0,Dy.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Dy._)`{failingKeyword: ${t.ifClause}}`},Sfe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:xfe,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Qz.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=Xz(n,"then"),o=Xz(n,"else");if(!i&&!o)return;let a=e.let("valid",!0),s=e.name("_valid");if(l(),t.reset(),i&&o){let u=e.let("ifClause");t.setParams({ifClause:u}),e.if(s,c("then",u),c("else",u))}else i?e.if(s,c("then")):e.if((0,Dy.not)(s),c("else"));t.pass(a,()=>t.error(!0));function l(){let u=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);t.mergeEvaluated(u)}function c(u,d){return()=>{let f=t.subschema({keyword:u},s);e.assign(a,s),t.mergeValidEvaluated(f,a),d?e.assign(d,(0,Dy._)`${u}`):t.setParams({ifClause:u})}}}};function Xz(t,e){let r=t.schema[e];return r!==void 0&&!(0,Qz.alwaysValidSchema)(t,r)}NP.default=Sfe});var tL=b(jP=>{"use strict";Object.defineProperty(jP,"__esModule",{value:!0});var Efe=it(),Ife={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,Efe.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};jP.default=Ife});var rL=b(zP=>{"use strict";Object.defineProperty(zP,"__esModule",{value:!0});var $fe=bP(),Pfe=Rz(),Tfe=wP(),Afe=Oz(),kfe=Mz(),Cfe=zz(),Rfe=Fz(),Dfe=TP(),Ofe=qz(),Mfe=Gz(),Nfe=Wz(),jfe=Jz(),zfe=Kz(),Lfe=Yz(),Ffe=eL(),Bfe=tL();function Ufe(t=!1){let e=[Nfe.default,jfe.default,zfe.default,Lfe.default,Ffe.default,Bfe.default,Rfe.default,Dfe.default,Cfe.default,Ofe.default,Mfe.default];return t?e.push(Pfe.default,Afe.default):e.push($fe.default,Tfe.default),e.push(kfe.default),e}zP.default=Ufe});var nL=b(LP=>{"use strict";Object.defineProperty(LP,"__esModule",{value:!0});var Xt=Ne(),qfe={message:({schemaCode:t})=>(0,Xt.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Xt._)`{format: ${t}}`},Zfe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:qfe,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:s}=t,{opts:l,errSchemaPath:c,schemaEnv:u,self:d}=s;if(!l.validateFormats)return;i?f():p();function f(){let h=r.scopeValue("formats",{ref:d.formats,code:l.code.formats}),m=r.const("fDef",(0,Xt._)`${h}[${a}]`),y=r.let("fType"),g=r.let("format");r.if((0,Xt._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(y,(0,Xt._)`${m}.type || "string"`).assign(g,(0,Xt._)`${m}.validate`),()=>r.assign(y,(0,Xt._)`"string"`).assign(g,m)),t.fail$data((0,Xt.or)(v(),E()));function v(){return l.strictSchema===!1?Xt.nil:(0,Xt._)`${a} && !${g}`}function E(){let x=u.$async?(0,Xt._)`(${m}.async ? await ${g}(${n}) : ${g}(${n}))`:(0,Xt._)`${g}(${n})`,w=(0,Xt._)`(typeof ${g} == "function" ? ${x} : ${g}.test(${n}))`;return(0,Xt._)`${g} && ${g} !== true && ${y} === ${e} && !${w}`}}function p(){let h=d.formats[o];if(!h){v();return}if(h===!0)return;let[m,y,g]=E(h);m===e&&t.pass(x());function v(){if(l.strictSchema===!1){d.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${o}" ignored in schema at path "${c}"`}}function E(w){let A=w instanceof RegExp?(0,Xt.regexpCode)(w):l.code.formats?(0,Xt._)`${l.code.formats}${(0,Xt.getProperty)(o)}`:void 0,$=r.scopeValue("formats",{key:o,ref:w,code:A});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,Xt._)`${$}.validate`]:["string",w,$]}function x(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw new Error("async format in sync schema");return(0,Xt._)`await ${g}(${n})`}return typeof y=="function"?(0,Xt._)`${g}(${n})`:(0,Xt._)`${g}.test(${n})`}}}};LP.default=Zfe});var iL=b(FP=>{"use strict";Object.defineProperty(FP,"__esModule",{value:!0});var Hfe=nL(),Vfe=[Hfe.default];FP.default=Vfe});var oL=b(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.contentVocabulary=ou.metadataVocabulary=void 0;ou.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];ou.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var sL=b(BP=>{"use strict";Object.defineProperty(BP,"__esModule",{value:!0});var Gfe=hz(),Wfe=Tz(),Jfe=rL(),Kfe=iL(),aL=oL(),Yfe=[Gfe.default,Wfe.default,(0,Jfe.default)(),Kfe.default,aL.metadataVocabulary,aL.contentVocabulary];BP.default=Yfe});var cL=b(Oy=>{"use strict";Object.defineProperty(Oy,"__esModule",{value:!0});Oy.DiscrError=void 0;var lL;(function(t){t.Tag="tag",t.Mapping="mapping"})(lL||(Oy.DiscrError=lL={}))});var dL=b(qP=>{"use strict";Object.defineProperty(qP,"__esModule",{value:!0});var au=Ne(),UP=cL(),uL=by(),Xfe=Ap(),Qfe=it(),epe={message:({params:{discrError:t,tagName:e}})=>t===UP.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,au._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},tpe={keyword:"discriminator",type:"object",schemaType:"object",error:epe,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:o}=t,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=n.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let l=e.let("valid",!1),c=e.const("tag",(0,au._)`${r}${(0,au.getProperty)(s)}`);e.if((0,au._)`typeof ${c} == "string"`,()=>u(),()=>t.error(!1,{discrError:UP.DiscrError.Tag,tag:c,tagName:s})),t.ok(l);function u(){let p=f();e.if(!1);for(let h in p)e.elseIf((0,au._)`${c} === ${h}`),e.assign(l,d(p[h]));e.else(),t.error(!1,{discrError:UP.DiscrError.Mapping,tag:c,tagName:s}),e.endIf()}function d(p){let h=e.name("valid"),m=t.subschema({keyword:"oneOf",schemaProp:p},h);return t.mergeEvaluated(m,au.Name),h}function f(){var p;let h={},m=g(i),y=!0;for(let x=0;x<a.length;x++){let w=a[x];if(w!=null&&w.$ref&&!(0,Qfe.schemaHasRulesButRef)(w,o.self.RULES)){let $=w.$ref;if(w=uL.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,$),w instanceof uL.SchemaEnv&&(w=w.schema),w===void 0)throw new Xfe.default(o.opts.uriResolver,o.baseId,$)}let A=(p=w==null?void 0:w.properties)===null||p===void 0?void 0:p[s];if(typeof A!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);y=y&&(m||g(w)),v(A,x)}if(!y)throw new Error(`discriminator: "${s}" must be required`);return h;function g({required:x}){return Array.isArray(x)&&x.includes(s)}function v(x,w){if(x.const)E(x.const,w);else if(x.enum)for(let A of x.enum)E(A,w);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function E(x,w){if(typeof x!="string"||x in h)throw new Error(`discriminator: "${s}" values must be unique strings`);h[x]=w}}}};qP.default=tpe});var fL=b((_3e,rpe)=>{rpe.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 hL=b((zt,ZP)=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.MissingRefError=zt.ValidationError=zt.CodeGen=zt.Name=zt.nil=zt.stringify=zt.str=zt._=zt.KeywordCxt=zt.Ajv=void 0;var npe=lz(),ipe=sL(),ope=dL(),pL=fL(),ape=["/properties"],My="http://json-schema.org/draft-07/schema",su=class extends npe.default{_addVocabularies(){super._addVocabularies(),ipe.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(ope.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(pL,ape):pL;this.addMetaSchema(e,My,!1),this.refs["http://json-schema.org/schema"]=My}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(My)?My:void 0)}};zt.Ajv=su;ZP.exports=zt=su;ZP.exports.Ajv=su;Object.defineProperty(zt,"__esModule",{value:!0});zt.default=su;var spe=Tp();Object.defineProperty(zt,"KeywordCxt",{enumerable:!0,get:function(){return spe.KeywordCxt}});var lu=Ne();Object.defineProperty(zt,"_",{enumerable:!0,get:function(){return lu._}});Object.defineProperty(zt,"str",{enumerable:!0,get:function(){return lu.str}});Object.defineProperty(zt,"stringify",{enumerable:!0,get:function(){return lu.stringify}});Object.defineProperty(zt,"nil",{enumerable:!0,get:function(){return lu.nil}});Object.defineProperty(zt,"Name",{enumerable:!0,get:function(){return lu.Name}});Object.defineProperty(zt,"CodeGen",{enumerable:!0,get:function(){return lu.CodeGen}});var lpe=_y();Object.defineProperty(zt,"ValidationError",{enumerable:!0,get:function(){return lpe.default}});var cpe=Ap();Object.defineProperty(zt,"MissingRefError",{enumerable:!0,get:function(){return cpe.default}})});var mL=b(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.formatLimitDefinition=void 0;var upe=hL(),Ai=Ne(),Ma=Ai.operators,Ny={formatMaximum:{okStr:"<=",ok:Ma.LTE,fail:Ma.GT},formatMinimum:{okStr:">=",ok:Ma.GTE,fail:Ma.LT},formatExclusiveMaximum:{okStr:"<",ok:Ma.LT,fail:Ma.GTE},formatExclusiveMinimum:{okStr:">",ok:Ma.GT,fail:Ma.LTE}},dpe={message:({keyword:t,schemaCode:e})=>(0,Ai.str)`should be ${Ny[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Ai._)`{comparison: ${Ny[t].okStr}, limit: ${e}}`};cu.formatLimitDefinition={keyword:Object.keys(Ny),type:"string",schemaType:"string",$data:!0,error:dpe,code(t){let{gen:e,data:r,schemaCode:n,keyword:i,it:o}=t,{opts:a,self:s}=o;if(!a.validateFormats)return;let l=new upe.KeywordCxt(o,s.RULES.all.format.definition,"format");l.$data?c():u();function c(){let f=e.scopeValue("formats",{ref:s.formats,code:a.code.formats}),p=e.const("fmt",(0,Ai._)`${f}[${l.schemaCode}]`);t.fail$data((0,Ai.or)((0,Ai._)`typeof ${p} != "object"`,(0,Ai._)`${p} instanceof RegExp`,(0,Ai._)`typeof ${p}.compare != "function"`,d(p)))}function u(){let f=l.schema,p=s.formats[f];if(!p||p===!0)return;if(typeof p!="object"||p instanceof RegExp||typeof p.compare!="function")throw new Error(`"${i}": format "${f}" does not define "compare" function`);let h=e.scopeValue("formats",{key:f,ref:p,code:a.code.formats?(0,Ai._)`${a.code.formats}${(0,Ai.getProperty)(f)}`:void 0});t.fail$data(d(h))}function d(f){return(0,Ai._)`${f}.compare(${r}, ${n}) ${Ny[i].fail} 0`}},dependencies:["format"]};var fpe=t=>(t.addKeyword(cu.formatLimitDefinition),t);cu.default=fpe});var vL=b((Up,_L)=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});var uu=e6(),ppe=mL(),HP=Ne(),gL=new HP.Name("fullFormats"),hpe=new HP.Name("fastFormats"),VP=(t,e={keywords:!0})=>{if(Array.isArray(e))return yL(t,e,uu.fullFormats,gL),t;let[r,n]=e.mode==="fast"?[uu.fastFormats,hpe]:[uu.fullFormats,gL],i=e.formats||uu.formatNames;return yL(t,i,r,n),e.keywords&&(0,ppe.default)(t),t};VP.get=(t,e="full")=>{let n=(e==="fast"?uu.fastFormats:uu.fullFormats)[t];if(!n)throw new Error(`Unknown format "${t}"`);return n};function yL(t,e,r,n){var i,o;(i=(o=t.opts.code).formats)!==null&&i!==void 0||(o.formats=(0,HP._)`require("ajv-formats/dist/formats").${n}`);for(let a of e)t.addFormat(a,r[a])}_L.exports=Up=VP;Object.defineProperty(Up,"__esModule",{value:!0});Up.default=VP});var We=b((Vy,OL)=>{(function(t,e){typeof Vy=="object"?OL.exports=Vy=e():typeof define=="function"&&define.amd?define([],e):t.CryptoJS=e()})(Vy,function(){var t=t||(function(e,r){var n;if(typeof window<"u"&&window.crypto&&(n=window.crypto),typeof self<"u"&&self.crypto&&(n=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window<"u"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global<"u"&&global.crypto&&(n=global.crypto),!n&&typeof Q=="function")try{n=Q("crypto")}catch{}var i=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||(function(){function g(){}return function(v){var E;return g.prototype=v,E=new g,g.prototype=null,E}})(),a={},s=a.lib={},l=s.Base=(function(){return{extend:function(g){var v=o(this);return g&&v.mixIn(g),(!v.hasOwnProperty("init")||this.init===v.init)&&(v.init=function(){v.$super.init.apply(this,arguments)}),v.init.prototype=v,v.$super=this,v},create:function(){var g=this.extend();return g.init.apply(g,arguments),g},init:function(){},mixIn:function(g){for(var v in g)g.hasOwnProperty(v)&&(this[v]=g[v]);g.hasOwnProperty("toString")&&(this.toString=g.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),c=s.WordArray=l.extend({init:function(g,v){g=this.words=g||[],v!=r?this.sigBytes=v:this.sigBytes=g.length*4},toString:function(g){return(g||d).stringify(this)},concat:function(g){var v=this.words,E=g.words,x=this.sigBytes,w=g.sigBytes;if(this.clamp(),x%4)for(var A=0;A<w;A++){var $=E[A>>>2]>>>24-A%4*8&255;v[x+A>>>2]|=$<<24-(x+A)%4*8}else for(var R=0;R<w;R+=4)v[x+R>>>2]=E[R>>>2];return this.sigBytes+=w,this},clamp:function(){var g=this.words,v=this.sigBytes;g[v>>>2]&=4294967295<<32-v%4*8,g.length=e.ceil(v/4)},clone:function(){var g=l.clone.call(this);return g.words=this.words.slice(0),g},random:function(g){for(var v=[],E=0;E<g;E+=4)v.push(i());return new c.init(v,g)}}),u=a.enc={},d=u.Hex={stringify:function(g){for(var v=g.words,E=g.sigBytes,x=[],w=0;w<E;w++){var A=v[w>>>2]>>>24-w%4*8&255;x.push((A>>>4).toString(16)),x.push((A&15).toString(16))}return x.join("")},parse:function(g){for(var v=g.length,E=[],x=0;x<v;x+=2)E[x>>>3]|=parseInt(g.substr(x,2),16)<<24-x%8*4;return new c.init(E,v/2)}},f=u.Latin1={stringify:function(g){for(var v=g.words,E=g.sigBytes,x=[],w=0;w<E;w++){var A=v[w>>>2]>>>24-w%4*8&255;x.push(String.fromCharCode(A))}return x.join("")},parse:function(g){for(var v=g.length,E=[],x=0;x<v;x++)E[x>>>2]|=(g.charCodeAt(x)&255)<<24-x%4*8;return new c.init(E,v)}},p=u.Utf8={stringify:function(g){try{return decodeURIComponent(escape(f.stringify(g)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(g){return f.parse(unescape(encodeURIComponent(g)))}},h=s.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(g){typeof g=="string"&&(g=p.parse(g)),this._data.concat(g),this._nDataBytes+=g.sigBytes},_process:function(g){var v,E=this._data,x=E.words,w=E.sigBytes,A=this.blockSize,$=A*4,R=w/$;g?R=e.ceil(R):R=e.max((R|0)-this._minBufferSize,0);var T=R*A,D=e.min(T*4,w);if(T){for(var k=0;k<T;k+=A)this._doProcessBlock(x,k);v=x.splice(0,T),E.sigBytes-=D}return new c.init(v,D)},clone:function(){var g=l.clone.call(this);return g._data=this._data.clone(),g},_minBufferSize:0}),m=s.Hasher=h.extend({cfg:l.extend(),init:function(g){this.cfg=this.cfg.extend(g),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(g){return this._append(g),this._process(),this},finalize:function(g){g&&this._append(g);var v=this._doFinalize();return v},blockSize:512/32,_createHelper:function(g){return function(v,E){return new g.init(E).finalize(v)}},_createHmacHelper:function(g){return function(v,E){return new y.HMAC.init(g,E).finalize(v)}}}),y=a.algo={};return a})(Math);return t})});var Vp=b((Gy,ML)=>{(function(t,e){typeof Gy=="object"?ML.exports=Gy=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Gy,function(t){return(function(e){var r=t,n=r.lib,i=n.Base,o=n.WordArray,a=r.x64={},s=a.Word=i.extend({init:function(c,u){this.high=c,this.low=u}}),l=a.WordArray=i.extend({init:function(c,u){c=this.words=c||[],u!=e?this.sigBytes=u:this.sigBytes=c.length*8},toX32:function(){for(var c=this.words,u=c.length,d=[],f=0;f<u;f++){var p=c[f];d.push(p.high),d.push(p.low)}return o.create(d,this.sigBytes)},clone:function(){for(var c=i.clone.call(this),u=c.words=this.words.slice(0),d=u.length,f=0;f<d;f++)u[f]=u[f].clone();return c}})})(),t})});var jL=b((Wy,NL)=>{(function(t,e){typeof Wy=="object"?NL.exports=Wy=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Wy,function(t){return(function(){if(typeof ArrayBuffer=="function"){var e=t,r=e.lib,n=r.WordArray,i=n.init,o=n.init=function(a){if(a instanceof ArrayBuffer&&(a=new Uint8Array(a)),(a instanceof Int8Array||typeof Uint8ClampedArray<"u"&&a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array)&&(a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength)),a instanceof Uint8Array){for(var s=a.byteLength,l=[],c=0;c<s;c++)l[c>>>2]|=a[c]<<24-c%4*8;i.call(this,l,s)}else i.apply(this,arguments)};o.prototype=n}})(),t.lib.WordArray})});var LL=b((Jy,zL)=>{(function(t,e){typeof Jy=="object"?zL.exports=Jy=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Jy,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,i=e.enc,o=i.Utf16=i.Utf16BE={stringify:function(s){for(var l=s.words,c=s.sigBytes,u=[],d=0;d<c;d+=2){var f=l[d>>>2]>>>16-d%4*8&65535;u.push(String.fromCharCode(f))}return u.join("")},parse:function(s){for(var l=s.length,c=[],u=0;u<l;u++)c[u>>>1]|=s.charCodeAt(u)<<16-u%2*16;return n.create(c,l*2)}};i.Utf16LE={stringify:function(s){for(var l=s.words,c=s.sigBytes,u=[],d=0;d<c;d+=2){var f=a(l[d>>>2]>>>16-d%4*8&65535);u.push(String.fromCharCode(f))}return u.join("")},parse:function(s){for(var l=s.length,c=[],u=0;u<l;u++)c[u>>>1]|=a(s.charCodeAt(u)<<16-u%2*16);return n.create(c,l*2)}};function a(s){return s<<8&4278255360|s>>>8&16711935}})(),t.enc.Utf16})});var Na=b((Ky,FL)=>{(function(t,e){typeof Ky=="object"?FL.exports=Ky=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Ky,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,i=e.enc,o=i.Base64={stringify:function(s){var l=s.words,c=s.sigBytes,u=this._map;s.clamp();for(var d=[],f=0;f<c;f+=3)for(var p=l[f>>>2]>>>24-f%4*8&255,h=l[f+1>>>2]>>>24-(f+1)%4*8&255,m=l[f+2>>>2]>>>24-(f+2)%4*8&255,y=p<<16|h<<8|m,g=0;g<4&&f+g*.75<c;g++)d.push(u.charAt(y>>>6*(3-g)&63));var v=u.charAt(64);if(v)for(;d.length%4;)d.push(v);return d.join("")},parse:function(s){var l=s.length,c=this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var d=0;d<c.length;d++)u[c.charCodeAt(d)]=d}var f=c.charAt(64);if(f){var p=s.indexOf(f);p!==-1&&(l=p)}return a(s,l,u)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function a(s,l,c){for(var u=[],d=0,f=0;f<l;f++)if(f%4){var p=c[s.charCodeAt(f-1)]<<f%4*2,h=c[s.charCodeAt(f)]>>>6-f%4*2,m=p|h;u[d>>>2]|=m<<24-d%4*8,d++}return n.create(u,d)}})(),t.enc.Base64})});var UL=b((Yy,BL)=>{(function(t,e){typeof Yy=="object"?BL.exports=Yy=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Yy,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,i=e.enc,o=i.Base64url={stringify:function(s,l){l===void 0&&(l=!0);var c=s.words,u=s.sigBytes,d=l?this._safe_map:this._map;s.clamp();for(var f=[],p=0;p<u;p+=3)for(var h=c[p>>>2]>>>24-p%4*8&255,m=c[p+1>>>2]>>>24-(p+1)%4*8&255,y=c[p+2>>>2]>>>24-(p+2)%4*8&255,g=h<<16|m<<8|y,v=0;v<4&&p+v*.75<u;v++)f.push(d.charAt(g>>>6*(3-v)&63));var E=d.charAt(64);if(E)for(;f.length%4;)f.push(E);return f.join("")},parse:function(s,l){l===void 0&&(l=!0);var c=s.length,u=l?this._safe_map:this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var f=0;f<u.length;f++)d[u.charCodeAt(f)]=f}var p=u.charAt(64);if(p){var h=s.indexOf(p);h!==-1&&(c=h)}return a(s,c,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function a(s,l,c){for(var u=[],d=0,f=0;f<l;f++)if(f%4){var p=c[s.charCodeAt(f-1)]<<f%4*2,h=c[s.charCodeAt(f)]>>>6-f%4*2,m=p|h;u[d>>>2]|=m<<24-d%4*8,d++}return n.create(u,d)}})(),t.enc.Base64url})});var ja=b((Xy,qL)=>{(function(t,e){typeof Xy=="object"?qL.exports=Xy=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Xy,function(t){return(function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=[];(function(){for(var p=0;p<64;p++)s[p]=e.abs(e.sin(p+1))*4294967296|0})();var l=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(p,h){for(var m=0;m<16;m++){var y=h+m,g=p[y];p[y]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360}var v=this._hash.words,E=p[h+0],x=p[h+1],w=p[h+2],A=p[h+3],$=p[h+4],R=p[h+5],T=p[h+6],D=p[h+7],k=p[h+8],M=p[h+9],U=p[h+10],z=p[h+11],X=p[h+12],K=p[h+13],re=p[h+14],pe=p[h+15],F=v[0],Z=v[1],W=v[2],H=v[3];F=c(F,Z,W,H,E,7,s[0]),H=c(H,F,Z,W,x,12,s[1]),W=c(W,H,F,Z,w,17,s[2]),Z=c(Z,W,H,F,A,22,s[3]),F=c(F,Z,W,H,$,7,s[4]),H=c(H,F,Z,W,R,12,s[5]),W=c(W,H,F,Z,T,17,s[6]),Z=c(Z,W,H,F,D,22,s[7]),F=c(F,Z,W,H,k,7,s[8]),H=c(H,F,Z,W,M,12,s[9]),W=c(W,H,F,Z,U,17,s[10]),Z=c(Z,W,H,F,z,22,s[11]),F=c(F,Z,W,H,X,7,s[12]),H=c(H,F,Z,W,K,12,s[13]),W=c(W,H,F,Z,re,17,s[14]),Z=c(Z,W,H,F,pe,22,s[15]),F=u(F,Z,W,H,x,5,s[16]),H=u(H,F,Z,W,T,9,s[17]),W=u(W,H,F,Z,z,14,s[18]),Z=u(Z,W,H,F,E,20,s[19]),F=u(F,Z,W,H,R,5,s[20]),H=u(H,F,Z,W,U,9,s[21]),W=u(W,H,F,Z,pe,14,s[22]),Z=u(Z,W,H,F,$,20,s[23]),F=u(F,Z,W,H,M,5,s[24]),H=u(H,F,Z,W,re,9,s[25]),W=u(W,H,F,Z,A,14,s[26]),Z=u(Z,W,H,F,k,20,s[27]),F=u(F,Z,W,H,K,5,s[28]),H=u(H,F,Z,W,w,9,s[29]),W=u(W,H,F,Z,D,14,s[30]),Z=u(Z,W,H,F,X,20,s[31]),F=d(F,Z,W,H,R,4,s[32]),H=d(H,F,Z,W,k,11,s[33]),W=d(W,H,F,Z,z,16,s[34]),Z=d(Z,W,H,F,re,23,s[35]),F=d(F,Z,W,H,x,4,s[36]),H=d(H,F,Z,W,$,11,s[37]),W=d(W,H,F,Z,D,16,s[38]),Z=d(Z,W,H,F,U,23,s[39]),F=d(F,Z,W,H,K,4,s[40]),H=d(H,F,Z,W,E,11,s[41]),W=d(W,H,F,Z,A,16,s[42]),Z=d(Z,W,H,F,T,23,s[43]),F=d(F,Z,W,H,M,4,s[44]),H=d(H,F,Z,W,X,11,s[45]),W=d(W,H,F,Z,pe,16,s[46]),Z=d(Z,W,H,F,w,23,s[47]),F=f(F,Z,W,H,E,6,s[48]),H=f(H,F,Z,W,D,10,s[49]),W=f(W,H,F,Z,re,15,s[50]),Z=f(Z,W,H,F,R,21,s[51]),F=f(F,Z,W,H,X,6,s[52]),H=f(H,F,Z,W,A,10,s[53]),W=f(W,H,F,Z,U,15,s[54]),Z=f(Z,W,H,F,x,21,s[55]),F=f(F,Z,W,H,k,6,s[56]),H=f(H,F,Z,W,pe,10,s[57]),W=f(W,H,F,Z,T,15,s[58]),Z=f(Z,W,H,F,K,21,s[59]),F=f(F,Z,W,H,$,6,s[60]),H=f(H,F,Z,W,z,10,s[61]),W=f(W,H,F,Z,w,15,s[62]),Z=f(Z,W,H,F,M,21,s[63]),v[0]=v[0]+F|0,v[1]=v[1]+Z|0,v[2]=v[2]+W|0,v[3]=v[3]+H|0},_doFinalize:function(){var p=this._data,h=p.words,m=this._nDataBytes*8,y=p.sigBytes*8;h[y>>>5]|=128<<24-y%32;var g=e.floor(m/4294967296),v=m;h[(y+64>>>9<<4)+15]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,h[(y+64>>>9<<4)+14]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,p.sigBytes=(h.length+1)*4,this._process();for(var E=this._hash,x=E.words,w=0;w<4;w++){var A=x[w];x[w]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360}return E},clone:function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p}});function c(p,h,m,y,g,v,E){var x=p+(h&m|~h&y)+g+E;return(x<<v|x>>>32-v)+h}function u(p,h,m,y,g,v,E){var x=p+(h&y|m&~y)+g+E;return(x<<v|x>>>32-v)+h}function d(p,h,m,y,g,v,E){var x=p+(h^m^y)+g+E;return(x<<v|x>>>32-v)+h}function f(p,h,m,y,g,v,E){var x=p+(m^(h|~y))+g+E;return(x<<v|x>>>32-v)+h}r.MD5=o._createHelper(l),r.HmacMD5=o._createHmacHelper(l)})(Math),t.MD5})});var QP=b((Qy,ZL)=>{(function(t,e){typeof Qy=="object"?ZL.exports=Qy=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Qy,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,i=r.Hasher,o=e.algo,a=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(l,c){for(var u=this._hash.words,d=u[0],f=u[1],p=u[2],h=u[3],m=u[4],y=0;y<80;y++){if(y<16)a[y]=l[c+y]|0;else{var g=a[y-3]^a[y-8]^a[y-14]^a[y-16];a[y]=g<<1|g>>>31}var v=(d<<5|d>>>27)+m+a[y];y<20?v+=(f&p|~f&h)+1518500249:y<40?v+=(f^p^h)+1859775393:y<60?v+=(f&p|f&h|p&h)-1894007588:v+=(f^p^h)-899497514,m=h,h=p,p=f<<30|f>>>2,f=d,d=v}u[0]=u[0]+d|0,u[1]=u[1]+f|0,u[2]=u[2]+p|0,u[3]=u[3]+h|0,u[4]=u[4]+m|0},_doFinalize:function(){var l=this._data,c=l.words,u=this._nDataBytes*8,d=l.sigBytes*8;return c[d>>>5]|=128<<24-d%32,c[(d+64>>>9<<4)+14]=Math.floor(u/4294967296),c[(d+64>>>9<<4)+15]=u,l.sigBytes=c.length*4,this._process(),this._hash},clone:function(){var l=i.clone.call(this);return l._hash=this._hash.clone(),l}});e.SHA1=i._createHelper(s),e.HmacSHA1=i._createHmacHelper(s)})(),t.SHA1})});var t_=b((e_,HL)=>{(function(t,e){typeof e_=="object"?HL.exports=e_=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(e_,function(t){return(function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=[],l=[];(function(){function d(m){for(var y=e.sqrt(m),g=2;g<=y;g++)if(!(m%g))return!1;return!0}function f(m){return(m-(m|0))*4294967296|0}for(var p=2,h=0;h<64;)d(p)&&(h<8&&(s[h]=f(e.pow(p,1/2))),l[h]=f(e.pow(p,1/3)),h++),p++})();var c=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(d,f){for(var p=this._hash.words,h=p[0],m=p[1],y=p[2],g=p[3],v=p[4],E=p[5],x=p[6],w=p[7],A=0;A<64;A++){if(A<16)c[A]=d[f+A]|0;else{var $=c[A-15],R=($<<25|$>>>7)^($<<14|$>>>18)^$>>>3,T=c[A-2],D=(T<<15|T>>>17)^(T<<13|T>>>19)^T>>>10;c[A]=R+c[A-7]+D+c[A-16]}var k=v&E^~v&x,M=h&m^h&y^m&y,U=(h<<30|h>>>2)^(h<<19|h>>>13)^(h<<10|h>>>22),z=(v<<26|v>>>6)^(v<<21|v>>>11)^(v<<7|v>>>25),X=w+z+k+l[A]+c[A],K=U+M;w=x,x=E,E=v,v=g+X|0,g=y,y=m,m=h,h=X+K|0}p[0]=p[0]+h|0,p[1]=p[1]+m|0,p[2]=p[2]+y|0,p[3]=p[3]+g|0,p[4]=p[4]+v|0,p[5]=p[5]+E|0,p[6]=p[6]+x|0,p[7]=p[7]+w|0},_doFinalize:function(){var d=this._data,f=d.words,p=this._nDataBytes*8,h=d.sigBytes*8;return f[h>>>5]|=128<<24-h%32,f[(h+64>>>9<<4)+14]=e.floor(p/4294967296),f[(h+64>>>9<<4)+15]=p,d.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var d=o.clone.call(this);return d._hash=this._hash.clone(),d}});r.SHA256=o._createHelper(u),r.HmacSHA256=o._createHmacHelper(u)})(Math),t.SHA256})});var GL=b((r_,VL)=>{(function(t,e,r){typeof r_=="object"?VL.exports=r_=e(We(),t_()):typeof define=="function"&&define.amd?define(["./core","./sha256"],e):e(t.CryptoJS)})(r_,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,i=e.algo,o=i.SHA256,a=i.SHA224=o.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var s=o._doFinalize.call(this);return s.sigBytes-=4,s}});e.SHA224=o._createHelper(a),e.HmacSHA224=o._createHmacHelper(a)})(),t.SHA224})});var eT=b((n_,WL)=>{(function(t,e,r){typeof n_=="object"?WL.exports=n_=e(We(),Vp()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],e):e(t.CryptoJS)})(n_,function(t){return(function(){var e=t,r=e.lib,n=r.Hasher,i=e.x64,o=i.Word,a=i.WordArray,s=e.algo;function l(){return o.create.apply(o,arguments)}var c=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],u=[];(function(){for(var f=0;f<80;f++)u[f]=l()})();var d=s.SHA512=n.extend({_doReset:function(){this._hash=new a.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.init(1541459225,327033209)])},_doProcessBlock:function(f,p){for(var h=this._hash.words,m=h[0],y=h[1],g=h[2],v=h[3],E=h[4],x=h[5],w=h[6],A=h[7],$=m.high,R=m.low,T=y.high,D=y.low,k=g.high,M=g.low,U=v.high,z=v.low,X=E.high,K=E.low,re=x.high,pe=x.low,F=w.high,Z=w.low,W=A.high,H=A.low,Et=$,_t=R,kt=T,Me=D,bo=k,wo=M,Fi=U,Fn=z,Vr=X,Gr=K,Wl=re,xs=pe,Jl=F,Ss=Z,_d=W,oa=H,In=0;In<80;In++){var Wr,Bn,Es=u[In];if(In<16)Bn=Es.high=f[p+In*2]|0,Wr=Es.low=f[p+In*2+1]|0;else{var vd=u[In-15],aa=vd.high,dn=vd.low,bd=(aa>>>1|dn<<31)^(aa>>>8|dn<<24)^aa>>>7,wd=(dn>>>1|aa<<31)^(dn>>>8|aa<<24)^(dn>>>7|aa<<25),Dm=u[In-2],Un=Dm.high,Is=Dm.low,sa=(Un>>>19|Is<<13)^(Un<<3|Is>>>29)^Un>>>6,Om=(Is>>>19|Un<<13)^(Is<<3|Un>>>29)^(Is>>>6|Un<<26),$s=u[In-7],ww=$s.high,Kl=$s.low,xd=u[In-16],gi=xd.high,Mm=xd.low;Wr=wd+Kl,Bn=bd+ww+(Wr>>>0<wd>>>0?1:0),Wr=Wr+Om,Bn=Bn+sa+(Wr>>>0<Om>>>0?1:0),Wr=Wr+Mm,Bn=Bn+gi+(Wr>>>0<Mm>>>0?1:0),Es.high=Bn,Es.low=Wr}var Yl=Vr&Wl^~Vr&Jl,Nm=Gr&xs^~Gr&Ss,Xl=Et&kt^Et&bo^kt&bo,xw=_t&Me^_t&wo^Me&wo,Ql=(Et>>>28|_t<<4)^(Et<<30|_t>>>2)^(Et<<25|_t>>>7),Sd=(_t>>>28|Et<<4)^(_t<<30|Et>>>2)^(_t<<25|Et>>>7),jm=(Vr>>>14|Gr<<18)^(Vr>>>18|Gr<<14)^(Vr<<23|Gr>>>9),Sw=(Gr>>>14|Vr<<18)^(Gr>>>18|Vr<<14)^(Gr<<23|Vr>>>9),la=c[In],zm=la.high,Ed=la.low,Jr=oa+Sw,$n=_d+jm+(Jr>>>0<oa>>>0?1:0),Jr=Jr+Nm,$n=$n+Yl+(Jr>>>0<Nm>>>0?1:0),Jr=Jr+Ed,$n=$n+zm+(Jr>>>0<Ed>>>0?1:0),Jr=Jr+Wr,$n=$n+Bn+(Jr>>>0<Wr>>>0?1:0),Lm=Sd+xw,Ps=Ql+Xl+(Lm>>>0<Sd>>>0?1:0);_d=Jl,oa=Ss,Jl=Wl,Ss=xs,Wl=Vr,xs=Gr,Gr=Fn+Jr|0,Vr=Fi+$n+(Gr>>>0<Fn>>>0?1:0)|0,Fi=bo,Fn=wo,bo=kt,wo=Me,kt=Et,Me=_t,_t=Jr+Lm|0,Et=$n+Ps+(_t>>>0<Jr>>>0?1:0)|0}R=m.low=R+_t,m.high=$+Et+(R>>>0<_t>>>0?1:0),D=y.low=D+Me,y.high=T+kt+(D>>>0<Me>>>0?1:0),M=g.low=M+wo,g.high=k+bo+(M>>>0<wo>>>0?1:0),z=v.low=z+Fn,v.high=U+Fi+(z>>>0<Fn>>>0?1:0),K=E.low=K+Gr,E.high=X+Vr+(K>>>0<Gr>>>0?1:0),pe=x.low=pe+xs,x.high=re+Wl+(pe>>>0<xs>>>0?1:0),Z=w.low=Z+Ss,w.high=F+Jl+(Z>>>0<Ss>>>0?1:0),H=A.low=H+oa,A.high=W+_d+(H>>>0<oa>>>0?1:0)},_doFinalize:function(){var f=this._data,p=f.words,h=this._nDataBytes*8,m=f.sigBytes*8;p[m>>>5]|=128<<24-m%32,p[(m+128>>>10<<5)+30]=Math.floor(h/4294967296),p[(m+128>>>10<<5)+31]=h,f.sigBytes=p.length*4,this._process();var y=this._hash.toX32();return y},clone:function(){var f=n.clone.call(this);return f._hash=this._hash.clone(),f},blockSize:1024/32});e.SHA512=n._createHelper(d),e.HmacSHA512=n._createHmacHelper(d)})(),t.SHA512})});var KL=b((i_,JL)=>{(function(t,e,r){typeof i_=="object"?JL.exports=i_=e(We(),Vp(),eT()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./sha512"],e):e(t.CryptoJS)})(i_,function(t){return(function(){var e=t,r=e.x64,n=r.Word,i=r.WordArray,o=e.algo,a=o.SHA512,s=o.SHA384=a.extend({_doReset:function(){this._hash=new i.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var l=a._doFinalize.call(this);return l.sigBytes-=16,l}});e.SHA384=a._createHelper(s),e.HmacSHA384=a._createHmacHelper(s)})(),t.SHA384})});var XL=b((o_,YL)=>{(function(t,e,r){typeof o_=="object"?YL.exports=o_=e(We(),Vp()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],e):e(t.CryptoJS)})(o_,function(t){return(function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.x64,s=a.Word,l=r.algo,c=[],u=[],d=[];(function(){for(var h=1,m=0,y=0;y<24;y++){c[h+5*m]=(y+1)*(y+2)/2%64;var g=m%5,v=(2*h+3*m)%5;h=g,m=v}for(var h=0;h<5;h++)for(var m=0;m<5;m++)u[h+5*m]=m+(2*h+3*m)%5*5;for(var E=1,x=0;x<24;x++){for(var w=0,A=0,$=0;$<7;$++){if(E&1){var R=(1<<$)-1;R<32?A^=1<<R:w^=1<<R-32}E&128?E=E<<1^113:E<<=1}d[x]=s.create(w,A)}})();var f=[];(function(){for(var h=0;h<25;h++)f[h]=s.create()})();var p=l.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var h=this._state=[],m=0;m<25;m++)h[m]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(h,m){for(var y=this._state,g=this.blockSize/2,v=0;v<g;v++){var E=h[m+2*v],x=h[m+2*v+1];E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360;var w=y[v];w.high^=x,w.low^=E}for(var A=0;A<24;A++){for(var $=0;$<5;$++){for(var R=0,T=0,D=0;D<5;D++){var w=y[$+5*D];R^=w.high,T^=w.low}var k=f[$];k.high=R,k.low=T}for(var $=0;$<5;$++)for(var M=f[($+4)%5],U=f[($+1)%5],z=U.high,X=U.low,R=M.high^(z<<1|X>>>31),T=M.low^(X<<1|z>>>31),D=0;D<5;D++){var w=y[$+5*D];w.high^=R,w.low^=T}for(var K=1;K<25;K++){var R,T,w=y[K],re=w.high,pe=w.low,F=c[K];F<32?(R=re<<F|pe>>>32-F,T=pe<<F|re>>>32-F):(R=pe<<F-32|re>>>64-F,T=re<<F-32|pe>>>64-F);var Z=f[u[K]];Z.high=R,Z.low=T}var W=f[0],H=y[0];W.high=H.high,W.low=H.low;for(var $=0;$<5;$++)for(var D=0;D<5;D++){var K=$+5*D,w=y[K],Et=f[K],_t=f[($+1)%5+5*D],kt=f[($+2)%5+5*D];w.high=Et.high^~_t.high&kt.high,w.low=Et.low^~_t.low&kt.low}var w=y[0],Me=d[A];w.high^=Me.high,w.low^=Me.low}},_doFinalize:function(){var h=this._data,m=h.words,y=this._nDataBytes*8,g=h.sigBytes*8,v=this.blockSize*32;m[g>>>5]|=1<<24-g%32,m[(e.ceil((g+1)/v)*v>>>5)-1]|=128,h.sigBytes=m.length*4,this._process();for(var E=this._state,x=this.cfg.outputLength/8,w=x/8,A=[],$=0;$<w;$++){var R=E[$],T=R.high,D=R.low;T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,D=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,A.push(D),A.push(T)}return new i.init(A,x)},clone:function(){for(var h=o.clone.call(this),m=h._state=this._state.slice(0),y=0;y<25;y++)m[y]=m[y].clone();return h}});r.SHA3=o._createHelper(p),r.HmacSHA3=o._createHmacHelper(p)})(Math),t.SHA3})});var eF=b((a_,QL)=>{(function(t,e){typeof a_=="object"?QL.exports=a_=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(a_,function(t){return(function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),d=i.create([0,1518500249,1859775393,2400959708,2840853838]),f=i.create([1352829926,1548603684,1836072691,2053994217,0]),p=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(x,w){for(var A=0;A<16;A++){var $=w+A,R=x[$];x[$]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360}var T=this._hash.words,D=d.words,k=f.words,M=s.words,U=l.words,z=c.words,X=u.words,K,re,pe,F,Z,W,H,Et,_t,kt;W=K=T[0],H=re=T[1],Et=pe=T[2],_t=F=T[3],kt=Z=T[4];for(var Me,A=0;A<80;A+=1)Me=K+x[w+M[A]]|0,A<16?Me+=h(re,pe,F)+D[0]:A<32?Me+=m(re,pe,F)+D[1]:A<48?Me+=y(re,pe,F)+D[2]:A<64?Me+=g(re,pe,F)+D[3]:Me+=v(re,pe,F)+D[4],Me=Me|0,Me=E(Me,z[A]),Me=Me+Z|0,K=Z,Z=F,F=E(pe,10),pe=re,re=Me,Me=W+x[w+U[A]]|0,A<16?Me+=v(H,Et,_t)+k[0]:A<32?Me+=g(H,Et,_t)+k[1]:A<48?Me+=y(H,Et,_t)+k[2]:A<64?Me+=m(H,Et,_t)+k[3]:Me+=h(H,Et,_t)+k[4],Me=Me|0,Me=E(Me,X[A]),Me=Me+kt|0,W=kt,kt=_t,_t=E(Et,10),Et=H,H=Me;Me=T[1]+pe+_t|0,T[1]=T[2]+F+kt|0,T[2]=T[3]+Z+W|0,T[3]=T[4]+K+H|0,T[4]=T[0]+re+Et|0,T[0]=Me},_doFinalize:function(){var x=this._data,w=x.words,A=this._nDataBytes*8,$=x.sigBytes*8;w[$>>>5]|=128<<24-$%32,w[($+64>>>9<<4)+14]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,x.sigBytes=(w.length+1)*4,this._process();for(var R=this._hash,T=R.words,D=0;D<5;D++){var k=T[D];T[D]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}return R},clone:function(){var x=o.clone.call(this);return x._hash=this._hash.clone(),x}});function h(x,w,A){return x^w^A}function m(x,w,A){return x&w|~x&A}function y(x,w,A){return(x|~w)^A}function g(x,w,A){return x&A|w&~A}function v(x,w,A){return x^(w|~A)}function E(x,w){return x<<w|x>>>32-w}r.RIPEMD160=o._createHelper(p),r.HmacRIPEMD160=o._createHmacHelper(p)})(Math),t.RIPEMD160})});var l_=b((s_,tF)=>{(function(t,e){typeof s_=="object"?tF.exports=s_=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(s_,function(t){(function(){var e=t,r=e.lib,n=r.Base,i=e.enc,o=i.Utf8,a=e.algo,s=a.HMAC=n.extend({init:function(l,c){l=this._hasher=new l.init,typeof c=="string"&&(c=o.parse(c));var u=l.blockSize,d=u*4;c.sigBytes>d&&(c=l.finalize(c)),c.clamp();for(var f=this._oKey=c.clone(),p=this._iKey=c.clone(),h=f.words,m=p.words,y=0;y<u;y++)h[y]^=1549556828,m[y]^=909522486;f.sigBytes=p.sigBytes=d,this.reset()},reset:function(){var l=this._hasher;l.reset(),l.update(this._iKey)},update:function(l){return this._hasher.update(l),this},finalize:function(l){var c=this._hasher,u=c.finalize(l);c.reset();var d=c.finalize(this._oKey.clone().concat(u));return d}})})()})});var nF=b((c_,rF)=>{(function(t,e,r){typeof c_=="object"?rF.exports=c_=e(We(),t_(),l_()):typeof define=="function"&&define.amd?define(["./core","./sha256","./hmac"],e):e(t.CryptoJS)})(c_,function(t){return(function(){var e=t,r=e.lib,n=r.Base,i=r.WordArray,o=e.algo,a=o.SHA256,s=o.HMAC,l=o.PBKDF2=n.extend({cfg:n.extend({keySize:128/32,hasher:a,iterations:25e4}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,u){for(var d=this.cfg,f=s.create(d.hasher,c),p=i.create(),h=i.create([1]),m=p.words,y=h.words,g=d.keySize,v=d.iterations;m.length<g;){var E=f.update(u).finalize(h);f.reset();for(var x=E.words,w=x.length,A=E,$=1;$<v;$++){A=f.finalize(A),f.reset();for(var R=A.words,T=0;T<w;T++)x[T]^=R[T]}p.concat(E),y[0]++}return p.sigBytes=g*4,p}});e.PBKDF2=function(c,u,d){return l.create(d).compute(c,u)}})(),t.PBKDF2})});var Uo=b((u_,iF)=>{(function(t,e,r){typeof u_=="object"?iF.exports=u_=e(We(),QP(),l_()):typeof define=="function"&&define.amd?define(["./core","./sha1","./hmac"],e):e(t.CryptoJS)})(u_,function(t){return(function(){var e=t,r=e.lib,n=r.Base,i=r.WordArray,o=e.algo,a=o.MD5,s=o.EvpKDF=n.extend({cfg:n.extend({keySize:128/32,hasher:a,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,c){for(var u,d=this.cfg,f=d.hasher.create(),p=i.create(),h=p.words,m=d.keySize,y=d.iterations;h.length<m;){u&&f.update(u),u=f.update(l).finalize(c),f.reset();for(var g=1;g<y;g++)u=f.finalize(u),f.reset();p.concat(u)}return p.sigBytes=m*4,p}});e.EvpKDF=function(l,c,u){return s.create(u).compute(l,c)}})(),t.EvpKDF})});var or=b((d_,oF)=>{(function(t,e,r){typeof d_=="object"?oF.exports=d_=e(We(),Uo()):typeof define=="function"&&define.amd?define(["./core","./evpkdf"],e):e(t.CryptoJS)})(d_,function(t){t.lib.Cipher||(function(e){var r=t,n=r.lib,i=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,s=r.enc,l=s.Utf8,c=s.Base64,u=r.algo,d=u.EvpKDF,f=n.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(k,M){return this.create(this._ENC_XFORM_MODE,k,M)},createDecryptor:function(k,M){return this.create(this._DEC_XFORM_MODE,k,M)},init:function(k,M,U){this.cfg=this.cfg.extend(U),this._xformMode=k,this._key=M,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(k){return this._append(k),this._process()},finalize:function(k){k&&this._append(k);var M=this._doFinalize();return M},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function k(M){return typeof M=="string"?D:$}return function(M){return{encrypt:function(U,z,X){return k(z).encrypt(M,U,z,X)},decrypt:function(U,z,X){return k(z).decrypt(M,U,z,X)}}}})()}),p=n.StreamCipher=f.extend({_doFinalize:function(){var k=this._process(!0);return k},blockSize:1}),h=r.mode={},m=n.BlockCipherMode=i.extend({createEncryptor:function(k,M){return this.Encryptor.create(k,M)},createDecryptor:function(k,M){return this.Decryptor.create(k,M)},init:function(k,M){this._cipher=k,this._iv=M}}),y=h.CBC=(function(){var k=m.extend();k.Encryptor=k.extend({processBlock:function(U,z){var X=this._cipher,K=X.blockSize;M.call(this,U,z,K),X.encryptBlock(U,z),this._prevBlock=U.slice(z,z+K)}}),k.Decryptor=k.extend({processBlock:function(U,z){var X=this._cipher,K=X.blockSize,re=U.slice(z,z+K);X.decryptBlock(U,z),M.call(this,U,z,K),this._prevBlock=re}});function M(U,z,X){var K,re=this._iv;re?(K=re,this._iv=e):K=this._prevBlock;for(var pe=0;pe<X;pe++)U[z+pe]^=K[pe]}return k})(),g=r.pad={},v=g.Pkcs7={pad:function(k,M){for(var U=M*4,z=U-k.sigBytes%U,X=z<<24|z<<16|z<<8|z,K=[],re=0;re<z;re+=4)K.push(X);var pe=o.create(K,z);k.concat(pe)},unpad:function(k){var M=k.words[k.sigBytes-1>>>2]&255;k.sigBytes-=M}},E=n.BlockCipher=f.extend({cfg:f.cfg.extend({mode:y,padding:v}),reset:function(){var k;f.reset.call(this);var M=this.cfg,U=M.iv,z=M.mode;this._xformMode==this._ENC_XFORM_MODE?k=z.createEncryptor:(k=z.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==k?this._mode.init(this,U&&U.words):(this._mode=k.call(z,this,U&&U.words),this._mode.__creator=k)},_doProcessBlock:function(k,M){this._mode.processBlock(k,M)},_doFinalize:function(){var k,M=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(M.pad(this._data,this.blockSize),k=this._process(!0)):(k=this._process(!0),M.unpad(k)),k},blockSize:128/32}),x=n.CipherParams=i.extend({init:function(k){this.mixIn(k)},toString:function(k){return(k||this.formatter).stringify(this)}}),w=r.format={},A=w.OpenSSL={stringify:function(k){var M,U=k.ciphertext,z=k.salt;return z?M=o.create([1398893684,1701076831]).concat(z).concat(U):M=U,M.toString(c)},parse:function(k){var M,U=c.parse(k),z=U.words;return z[0]==1398893684&&z[1]==1701076831&&(M=o.create(z.slice(2,4)),z.splice(0,4),U.sigBytes-=16),x.create({ciphertext:U,salt:M})}},$=n.SerializableCipher=i.extend({cfg:i.extend({format:A}),encrypt:function(k,M,U,z){z=this.cfg.extend(z);var X=k.createEncryptor(U,z),K=X.finalize(M),re=X.cfg;return x.create({ciphertext:K,key:U,iv:re.iv,algorithm:k,mode:re.mode,padding:re.padding,blockSize:k.blockSize,formatter:z.format})},decrypt:function(k,M,U,z){z=this.cfg.extend(z),M=this._parse(M,z.format);var X=k.createDecryptor(U,z).finalize(M.ciphertext);return X},_parse:function(k,M){return typeof k=="string"?M.parse(k,this):k}}),R=r.kdf={},T=R.OpenSSL={execute:function(k,M,U,z,X){if(z||(z=o.random(64/8)),X)var K=d.create({keySize:M+U,hasher:X}).compute(k,z);else var K=d.create({keySize:M+U}).compute(k,z);var re=o.create(K.words.slice(M),U*4);return K.sigBytes=M*4,x.create({key:K,iv:re,salt:z})}},D=n.PasswordBasedCipher=$.extend({cfg:$.cfg.extend({kdf:T}),encrypt:function(k,M,U,z){z=this.cfg.extend(z);var X=z.kdf.execute(U,k.keySize,k.ivSize,z.salt,z.hasher);z.iv=X.iv;var K=$.encrypt.call(this,k,M,X.key,z);return K.mixIn(X),K},decrypt:function(k,M,U,z){z=this.cfg.extend(z),M=this._parse(M,z.format);var X=z.kdf.execute(U,k.keySize,k.ivSize,M.salt,z.hasher);z.iv=X.iv;var K=$.decrypt.call(this,k,M,X.key,z);return K}})})()})});var sF=b((f_,aF)=>{(function(t,e,r){typeof f_=="object"?aF.exports=f_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(f_,function(t){return t.mode.CFB=(function(){var e=t.lib.BlockCipherMode.extend();e.Encryptor=e.extend({processBlock:function(n,i){var o=this._cipher,a=o.blockSize;r.call(this,n,i,a,o),this._prevBlock=n.slice(i,i+a)}}),e.Decryptor=e.extend({processBlock:function(n,i){var o=this._cipher,a=o.blockSize,s=n.slice(i,i+a);r.call(this,n,i,a,o),this._prevBlock=s}});function r(n,i,o,a){var s,l=this._iv;l?(s=l.slice(0),this._iv=void 0):s=this._prevBlock,a.encryptBlock(s,0);for(var c=0;c<o;c++)n[i+c]^=s[c]}return e})(),t.mode.CFB})});var cF=b((p_,lF)=>{(function(t,e,r){typeof p_=="object"?lF.exports=p_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(p_,function(t){return t.mode.CTR=(function(){var e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:function(n,i){var o=this._cipher,a=o.blockSize,s=this._iv,l=this._counter;s&&(l=this._counter=s.slice(0),this._iv=void 0);var c=l.slice(0);o.encryptBlock(c,0),l[a-1]=l[a-1]+1|0;for(var u=0;u<a;u++)n[i+u]^=c[u]}});return e.Decryptor=r,e})(),t.mode.CTR})});var dF=b((h_,uF)=>{(function(t,e,r){typeof h_=="object"?uF.exports=h_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(h_,function(t){return t.mode.CTRGladman=(function(){var e=t.lib.BlockCipherMode.extend();function r(o){if((o>>24&255)===255){var a=o>>16&255,s=o>>8&255,l=o&255;a===255?(a=0,s===255?(s=0,l===255?l=0:++l):++s):++a,o=0,o+=a<<16,o+=s<<8,o+=l}else o+=1<<24;return o}function n(o){return(o[0]=r(o[0]))===0&&(o[1]=r(o[1])),o}var i=e.Encryptor=e.extend({processBlock:function(o,a){var s=this._cipher,l=s.blockSize,c=this._iv,u=this._counter;c&&(u=this._counter=c.slice(0),this._iv=void 0),n(u);var d=u.slice(0);s.encryptBlock(d,0);for(var f=0;f<l;f++)o[a+f]^=d[f]}});return e.Decryptor=i,e})(),t.mode.CTRGladman})});var pF=b((m_,fF)=>{(function(t,e,r){typeof m_=="object"?fF.exports=m_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(m_,function(t){return t.mode.OFB=(function(){var e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:function(n,i){var o=this._cipher,a=o.blockSize,s=this._iv,l=this._keystream;s&&(l=this._keystream=s.slice(0),this._iv=void 0),o.encryptBlock(l,0);for(var c=0;c<a;c++)n[i+c]^=l[c]}});return e.Decryptor=r,e})(),t.mode.OFB})});var mF=b((g_,hF)=>{(function(t,e,r){typeof g_=="object"?hF.exports=g_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(g_,function(t){return t.mode.ECB=(function(){var e=t.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(r,n){this._cipher.encryptBlock(r,n)}}),e.Decryptor=e.extend({processBlock:function(r,n){this._cipher.decryptBlock(r,n)}}),e})(),t.mode.ECB})});var yF=b((y_,gF)=>{(function(t,e,r){typeof y_=="object"?gF.exports=y_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(y_,function(t){return t.pad.AnsiX923={pad:function(e,r){var n=e.sigBytes,i=r*4,o=i-n%i,a=n+o-1;e.clamp(),e.words[a>>>2]|=o<<24-a%4*8,e.sigBytes+=o},unpad:function(e){var r=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=r}},t.pad.Ansix923})});var vF=b((__,_F)=>{(function(t,e,r){typeof __=="object"?_F.exports=__=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(__,function(t){return t.pad.Iso10126={pad:function(e,r){var n=r*4,i=n-e.sigBytes%n;e.concat(t.lib.WordArray.random(i-1)).concat(t.lib.WordArray.create([i<<24],1))},unpad:function(e){var r=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=r}},t.pad.Iso10126})});var wF=b((v_,bF)=>{(function(t,e,r){typeof v_=="object"?bF.exports=v_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(v_,function(t){return t.pad.Iso97971={pad:function(e,r){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,r)},unpad:function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--}},t.pad.Iso97971})});var SF=b((b_,xF)=>{(function(t,e,r){typeof b_=="object"?xF.exports=b_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(b_,function(t){return t.pad.ZeroPadding={pad:function(e,r){var n=r*4;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){for(var r=e.words,n=e.sigBytes-1,n=e.sigBytes-1;n>=0;n--)if(r[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},t.pad.ZeroPadding})});var IF=b((w_,EF)=>{(function(t,e,r){typeof w_=="object"?EF.exports=w_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(w_,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})});var PF=b((x_,$F)=>{(function(t,e,r){typeof x_=="object"?$F.exports=x_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(x_,function(t){return(function(e){var r=t,n=r.lib,i=n.CipherParams,o=r.enc,a=o.Hex,s=r.format,l=s.Hex={stringify:function(c){return c.ciphertext.toString(a)},parse:function(c){var u=a.parse(c);return i.create({ciphertext:u})}}})(),t.format.Hex})});var AF=b((S_,TF)=>{(function(t,e,r){typeof S_=="object"?TF.exports=S_=e(We(),Na(),ja(),Uo(),or()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(S_,function(t){return(function(){var e=t,r=e.lib,n=r.BlockCipher,i=e.algo,o=[],a=[],s=[],l=[],c=[],u=[],d=[],f=[],p=[],h=[];(function(){for(var g=[],v=0;v<256;v++)v<128?g[v]=v<<1:g[v]=v<<1^283;for(var E=0,x=0,v=0;v<256;v++){var w=x^x<<1^x<<2^x<<3^x<<4;w=w>>>8^w&255^99,o[E]=w,a[w]=E;var A=g[E],$=g[A],R=g[$],T=g[w]*257^w*16843008;s[E]=T<<24|T>>>8,l[E]=T<<16|T>>>16,c[E]=T<<8|T>>>24,u[E]=T;var T=R*16843009^$*65537^A*257^E*16843008;d[w]=T<<24|T>>>8,f[w]=T<<16|T>>>16,p[w]=T<<8|T>>>24,h[w]=T,E?(E=A^g[g[g[R^A]]],x^=g[g[x]]):E=x=1}})();var m=[0,1,2,4,8,16,32,64,128,27,54],y=i.AES=n.extend({_doReset:function(){var g;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var v=this._keyPriorReset=this._key,E=v.words,x=v.sigBytes/4,w=this._nRounds=x+6,A=(w+1)*4,$=this._keySchedule=[],R=0;R<A;R++)R<x?$[R]=E[R]:(g=$[R-1],R%x?x>6&&R%x==4&&(g=o[g>>>24]<<24|o[g>>>16&255]<<16|o[g>>>8&255]<<8|o[g&255]):(g=g<<8|g>>>24,g=o[g>>>24]<<24|o[g>>>16&255]<<16|o[g>>>8&255]<<8|o[g&255],g^=m[R/x|0]<<24),$[R]=$[R-x]^g);for(var T=this._invKeySchedule=[],D=0;D<A;D++){var R=A-D;if(D%4)var g=$[R];else var g=$[R-4];D<4||R<=4?T[D]=g:T[D]=d[o[g>>>24]]^f[o[g>>>16&255]]^p[o[g>>>8&255]]^h[o[g&255]]}}},encryptBlock:function(g,v){this._doCryptBlock(g,v,this._keySchedule,s,l,c,u,o)},decryptBlock:function(g,v){var E=g[v+1];g[v+1]=g[v+3],g[v+3]=E,this._doCryptBlock(g,v,this._invKeySchedule,d,f,p,h,a);var E=g[v+1];g[v+1]=g[v+3],g[v+3]=E},_doCryptBlock:function(g,v,E,x,w,A,$,R){for(var T=this._nRounds,D=g[v]^E[0],k=g[v+1]^E[1],M=g[v+2]^E[2],U=g[v+3]^E[3],z=4,X=1;X<T;X++){var K=x[D>>>24]^w[k>>>16&255]^A[M>>>8&255]^$[U&255]^E[z++],re=x[k>>>24]^w[M>>>16&255]^A[U>>>8&255]^$[D&255]^E[z++],pe=x[M>>>24]^w[U>>>16&255]^A[D>>>8&255]^$[k&255]^E[z++],F=x[U>>>24]^w[D>>>16&255]^A[k>>>8&255]^$[M&255]^E[z++];D=K,k=re,M=pe,U=F}var K=(R[D>>>24]<<24|R[k>>>16&255]<<16|R[M>>>8&255]<<8|R[U&255])^E[z++],re=(R[k>>>24]<<24|R[M>>>16&255]<<16|R[U>>>8&255]<<8|R[D&255])^E[z++],pe=(R[M>>>24]<<24|R[U>>>16&255]<<16|R[D>>>8&255]<<8|R[k&255])^E[z++],F=(R[U>>>24]<<24|R[D>>>16&255]<<16|R[k>>>8&255]<<8|R[M&255])^E[z++];g[v]=K,g[v+1]=re,g[v+2]=pe,g[v+3]=F},keySize:256/32});e.AES=n._createHelper(y)})(),t.AES})});var CF=b((E_,kF)=>{(function(t,e,r){typeof E_=="object"?kF.exports=E_=e(We(),Na(),ja(),Uo(),or()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(E_,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,i=r.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=o.DES=i.extend({_doReset:function(){for(var m=this._key,y=m.words,g=[],v=0;v<56;v++){var E=a[v]-1;g[v]=y[E>>>5]>>>31-E%32&1}for(var x=this._subKeys=[],w=0;w<16;w++){for(var A=x[w]=[],$=l[w],v=0;v<24;v++)A[v/6|0]|=g[(s[v]-1+$)%28]<<31-v%6,A[4+(v/6|0)]|=g[28+(s[v+24]-1+$)%28]<<31-v%6;A[0]=A[0]<<1|A[0]>>>31;for(var v=1;v<7;v++)A[v]=A[v]>>>(v-1)*4+3;A[7]=A[7]<<5|A[7]>>>27}for(var R=this._invSubKeys=[],v=0;v<16;v++)R[v]=x[15-v]},encryptBlock:function(m,y){this._doCryptBlock(m,y,this._subKeys)},decryptBlock:function(m,y){this._doCryptBlock(m,y,this._invSubKeys)},_doCryptBlock:function(m,y,g){this._lBlock=m[y],this._rBlock=m[y+1],f.call(this,4,252645135),f.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),f.call(this,1,1431655765);for(var v=0;v<16;v++){for(var E=g[v],x=this._lBlock,w=this._rBlock,A=0,$=0;$<8;$++)A|=c[$][((w^E[$])&u[$])>>>0];this._lBlock=w,this._rBlock=x^A}var R=this._lBlock;this._lBlock=this._rBlock,this._rBlock=R,f.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),m[y]=this._lBlock,m[y+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function f(m,y){var g=(this._lBlock>>>m^this._rBlock)&y;this._rBlock^=g,this._lBlock^=g<<m}function p(m,y){var g=(this._rBlock>>>m^this._lBlock)&y;this._lBlock^=g,this._rBlock^=g<<m}e.DES=i._createHelper(d);var h=o.TripleDES=i.extend({_doReset:function(){var m=this._key,y=m.words;if(y.length!==2&&y.length!==4&&y.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var g=y.slice(0,2),v=y.length<4?y.slice(0,2):y.slice(2,4),E=y.length<6?y.slice(0,2):y.slice(4,6);this._des1=d.createEncryptor(n.create(g)),this._des2=d.createEncryptor(n.create(v)),this._des3=d.createEncryptor(n.create(E))},encryptBlock:function(m,y){this._des1.encryptBlock(m,y),this._des2.decryptBlock(m,y),this._des3.encryptBlock(m,y)},decryptBlock:function(m,y){this._des3.decryptBlock(m,y),this._des2.encryptBlock(m,y),this._des1.decryptBlock(m,y)},keySize:192/32,ivSize:64/32,blockSize:64/32});e.TripleDES=i._createHelper(h)})(),t.TripleDES})});var DF=b((I_,RF)=>{(function(t,e,r){typeof I_=="object"?RF.exports=I_=e(We(),Na(),ja(),Uo(),or()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(I_,function(t){return(function(){var e=t,r=e.lib,n=r.StreamCipher,i=e.algo,o=i.RC4=n.extend({_doReset:function(){for(var l=this._key,c=l.words,u=l.sigBytes,d=this._S=[],f=0;f<256;f++)d[f]=f;for(var f=0,p=0;f<256;f++){var h=f%u,m=c[h>>>2]>>>24-h%4*8&255;p=(p+d[f]+m)%256;var y=d[f];d[f]=d[p],d[p]=y}this._i=this._j=0},_doProcessBlock:function(l,c){l[c]^=a.call(this)},keySize:256/32,ivSize:0});function a(){for(var l=this._S,c=this._i,u=this._j,d=0,f=0;f<4;f++){c=(c+1)%256,u=(u+l[c])%256;var p=l[c];l[c]=l[u],l[u]=p,d|=l[(l[c]+l[u])%256]<<24-f*8}return this._i=c,this._j=u,d}e.RC4=n._createHelper(o);var s=i.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var l=this.cfg.drop;l>0;l--)a.call(this)}});e.RC4Drop=n._createHelper(s)})(),t.RC4})});var MF=b(($_,OF)=>{(function(t,e,r){typeof $_=="object"?OF.exports=$_=e(We(),Na(),ja(),Uo(),or()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})($_,function(t){return(function(){var e=t,r=e.lib,n=r.StreamCipher,i=e.algo,o=[],a=[],s=[],l=i.Rabbit=n.extend({_doReset:function(){for(var u=this._key.words,d=this.cfg.iv,f=0;f<4;f++)u[f]=(u[f]<<8|u[f]>>>24)&16711935|(u[f]<<24|u[f]>>>8)&4278255360;var p=this._X=[u[0],u[3]<<16|u[2]>>>16,u[1],u[0]<<16|u[3]>>>16,u[2],u[1]<<16|u[0]>>>16,u[3],u[2]<<16|u[1]>>>16],h=this._C=[u[2]<<16|u[2]>>>16,u[0]&4294901760|u[1]&65535,u[3]<<16|u[3]>>>16,u[1]&4294901760|u[2]&65535,u[0]<<16|u[0]>>>16,u[2]&4294901760|u[3]&65535,u[1]<<16|u[1]>>>16,u[3]&4294901760|u[0]&65535];this._b=0;for(var f=0;f<4;f++)c.call(this);for(var f=0;f<8;f++)h[f]^=p[f+4&7];if(d){var m=d.words,y=m[0],g=m[1],v=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,E=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,x=v>>>16|E&4294901760,w=E<<16|v&65535;h[0]^=v,h[1]^=x,h[2]^=E,h[3]^=w,h[4]^=v,h[5]^=x,h[6]^=E,h[7]^=w;for(var f=0;f<4;f++)c.call(this)}},_doProcessBlock:function(u,d){var f=this._X;c.call(this),o[0]=f[0]^f[5]>>>16^f[3]<<16,o[1]=f[2]^f[7]>>>16^f[5]<<16,o[2]=f[4]^f[1]>>>16^f[7]<<16,o[3]=f[6]^f[3]>>>16^f[1]<<16;for(var p=0;p<4;p++)o[p]=(o[p]<<8|o[p]>>>24)&16711935|(o[p]<<24|o[p]>>>8)&4278255360,u[d+p]^=o[p]},blockSize:128/32,ivSize:64/32});function c(){for(var u=this._X,d=this._C,f=0;f<8;f++)a[f]=d[f];d[0]=d[0]+1295307597+this._b|0,d[1]=d[1]+3545052371+(d[0]>>>0<a[0]>>>0?1:0)|0,d[2]=d[2]+886263092+(d[1]>>>0<a[1]>>>0?1:0)|0,d[3]=d[3]+1295307597+(d[2]>>>0<a[2]>>>0?1:0)|0,d[4]=d[4]+3545052371+(d[3]>>>0<a[3]>>>0?1:0)|0,d[5]=d[5]+886263092+(d[4]>>>0<a[4]>>>0?1:0)|0,d[6]=d[6]+1295307597+(d[5]>>>0<a[5]>>>0?1:0)|0,d[7]=d[7]+3545052371+(d[6]>>>0<a[6]>>>0?1:0)|0,this._b=d[7]>>>0<a[7]>>>0?1:0;for(var f=0;f<8;f++){var p=u[f]+d[f],h=p&65535,m=p>>>16,y=((h*h>>>17)+h*m>>>15)+m*m,g=((p&4294901760)*p|0)+((p&65535)*p|0);s[f]=y^g}u[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,u[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,u[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,u[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,u[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,u[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,u[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,u[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.Rabbit=n._createHelper(l)})(),t.Rabbit})});var jF=b((P_,NF)=>{(function(t,e,r){typeof P_=="object"?NF.exports=P_=e(We(),Na(),ja(),Uo(),or()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(P_,function(t){return(function(){var e=t,r=e.lib,n=r.StreamCipher,i=e.algo,o=[],a=[],s=[],l=i.RabbitLegacy=n.extend({_doReset:function(){var u=this._key.words,d=this.cfg.iv,f=this._X=[u[0],u[3]<<16|u[2]>>>16,u[1],u[0]<<16|u[3]>>>16,u[2],u[1]<<16|u[0]>>>16,u[3],u[2]<<16|u[1]>>>16],p=this._C=[u[2]<<16|u[2]>>>16,u[0]&4294901760|u[1]&65535,u[3]<<16|u[3]>>>16,u[1]&4294901760|u[2]&65535,u[0]<<16|u[0]>>>16,u[2]&4294901760|u[3]&65535,u[1]<<16|u[1]>>>16,u[3]&4294901760|u[0]&65535];this._b=0;for(var h=0;h<4;h++)c.call(this);for(var h=0;h<8;h++)p[h]^=f[h+4&7];if(d){var m=d.words,y=m[0],g=m[1],v=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,E=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,x=v>>>16|E&4294901760,w=E<<16|v&65535;p[0]^=v,p[1]^=x,p[2]^=E,p[3]^=w,p[4]^=v,p[5]^=x,p[6]^=E,p[7]^=w;for(var h=0;h<4;h++)c.call(this)}},_doProcessBlock:function(u,d){var f=this._X;c.call(this),o[0]=f[0]^f[5]>>>16^f[3]<<16,o[1]=f[2]^f[7]>>>16^f[5]<<16,o[2]=f[4]^f[1]>>>16^f[7]<<16,o[3]=f[6]^f[3]>>>16^f[1]<<16;for(var p=0;p<4;p++)o[p]=(o[p]<<8|o[p]>>>24)&16711935|(o[p]<<24|o[p]>>>8)&4278255360,u[d+p]^=o[p]},blockSize:128/32,ivSize:64/32});function c(){for(var u=this._X,d=this._C,f=0;f<8;f++)a[f]=d[f];d[0]=d[0]+1295307597+this._b|0,d[1]=d[1]+3545052371+(d[0]>>>0<a[0]>>>0?1:0)|0,d[2]=d[2]+886263092+(d[1]>>>0<a[1]>>>0?1:0)|0,d[3]=d[3]+1295307597+(d[2]>>>0<a[2]>>>0?1:0)|0,d[4]=d[4]+3545052371+(d[3]>>>0<a[3]>>>0?1:0)|0,d[5]=d[5]+886263092+(d[4]>>>0<a[4]>>>0?1:0)|0,d[6]=d[6]+1295307597+(d[5]>>>0<a[5]>>>0?1:0)|0,d[7]=d[7]+3545052371+(d[6]>>>0<a[6]>>>0?1:0)|0,this._b=d[7]>>>0<a[7]>>>0?1:0;for(var f=0;f<8;f++){var p=u[f]+d[f],h=p&65535,m=p>>>16,y=((h*h>>>17)+h*m>>>15)+m*m,g=((p&4294901760)*p|0)+((p&65535)*p|0);s[f]=y^g}u[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,u[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,u[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,u[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,u[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,u[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,u[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,u[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.RabbitLegacy=n._createHelper(l)})(),t.RabbitLegacy})});var LF=b((T_,zF)=>{(function(t,e,r){typeof T_=="object"?zF.exports=T_=e(We(),Na(),ja(),Uo(),or()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(T_,function(t){return(function(){var e=t,r=e.lib,n=r.BlockCipher,i=e.algo;let o=16,a=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var l={pbox:[],sbox:[]};function c(h,m){let y=m>>24&255,g=m>>16&255,v=m>>8&255,E=m&255,x=h.sbox[0][y]+h.sbox[1][g];return x=x^h.sbox[2][v],x=x+h.sbox[3][E],x}function u(h,m,y){let g=m,v=y,E;for(let x=0;x<o;++x)g=g^h.pbox[x],v=c(h,g)^v,E=g,g=v,v=E;return E=g,g=v,v=E,v=v^h.pbox[o],g=g^h.pbox[o+1],{left:g,right:v}}function d(h,m,y){let g=m,v=y,E;for(let x=o+1;x>1;--x)g=g^h.pbox[x],v=c(h,g)^v,E=g,g=v,v=E;return E=g,g=v,v=E,v=v^h.pbox[1],g=g^h.pbox[0],{left:g,right:v}}function f(h,m,y){for(let w=0;w<4;w++){h.sbox[w]=[];for(let A=0;A<256;A++)h.sbox[w][A]=s[w][A]}let g=0;for(let w=0;w<o+2;w++)h.pbox[w]=a[w]^m[g],g++,g>=y&&(g=0);let v=0,E=0,x=0;for(let w=0;w<o+2;w+=2)x=u(h,v,E),v=x.left,E=x.right,h.pbox[w]=v,h.pbox[w+1]=E;for(let w=0;w<4;w++)for(let A=0;A<256;A+=2)x=u(h,v,E),v=x.left,E=x.right,h.sbox[w][A]=v,h.sbox[w][A+1]=E;return!0}var p=i.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var h=this._keyPriorReset=this._key,m=h.words,y=h.sigBytes/4;f(l,m,y)}},encryptBlock:function(h,m){var y=u(l,h[m],h[m+1]);h[m]=y.left,h[m+1]=y.right},decryptBlock:function(h,m){var y=d(l,h[m],h[m+1]);h[m]=y.left,h[m+1]=y.right},blockSize:64/32,keySize:128/32,ivSize:64/32});e.Blowfish=n._createHelper(p)})(),t.Blowfish})});var tT=b((A_,FF)=>{(function(t,e,r){typeof A_=="object"?FF.exports=A_=e(We(),Vp(),jL(),LL(),Na(),UL(),ja(),QP(),t_(),GL(),eT(),KL(),XL(),eF(),l_(),nF(),Uo(),or(),sF(),cF(),dF(),pF(),mF(),yF(),vF(),wF(),SF(),IF(),PF(),AF(),CF(),DF(),MF(),jF(),LF()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./enc-base64url","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy","./blowfish"],e):t.CryptoJS=e(t.CryptoJS)})(A_,function(t){return t})});function k_(t){if(!t||typeof t!="object")return t;let{_mac_token:e,_user_id:r,_session_id:n,_project_id:i,_project_path:o,_custom_fields:a,...s}=t;return s}var rT=yi(()=>{"use strict"});import*as iT from"node:path";import*as oT from"node:os";import hu from"node:process";function Vt(t,e){let r=aT.find(o=>o.new===t);if(!r)return hu.env[t]??e;let n=hu.env[r.new],i=hu.env[r.old];return n!==void 0?n:i!==void 0?(BF.has(r.old)||(console.error(`[DEPRECATED] Environment variable "${r.old}" is deprecated. Please use "${r.new}" instead.`),BF.add(r.old)),i):e}function nT(t,e=!1){let r=Vt(t);return r===void 0?e:r==="true"||r==="1"}function UF(t,e=0){let r=Vt(t);if(r===void 0)return e;let n=parseInt(r,10);return isNaN(n)?e:n}function Dpe(){let t=[];for(let e of aT)hu.env[e.old]&&!hu.env[e.new]&&t.push(e.old);return t}function sT(){let t=Dpe();if(t.length>0){console.error(""),console.error("⚠️ DEPRECATION WARNING ⚠️"),console.error("The following environment variables are deprecated:"),console.error("");for(let e of t){let r=aT.find(n=>n.old===e);r&&console.error(` ${e} → ${r.new}`)}console.error(""),console.error("Please update your configuration to use the new variable names."),console.error("Old variables will be removed in a future major version."),console.error("")}}var C_,Y,aT,BF,Dn=yi(()=>{"use strict";C_={production:{apiHost:"agent.tapapis.cn",apiBaseUrl:"https://agent.tapapis.cn",authHost:"accounts.tapapis.cn",qrcodeBaseUrl:"https://www.taptap.cn/tap-qrcode?scene=mcp_auth&code="},rnd:{apiHost:"agent.api.xdrnd.cn",apiBaseUrl:"https://agent.api.xdrnd.cn",authHost:"oauth.api.xdrnd.cn",qrcodeBaseUrl:"https://www-beta.xdrnd.cn/tap-qrcode?scene=mcp_auth&code="}},Y=class{static get macToken(){return Vt("TAPTAP_MCP_MAC_TOKEN")}static get clientId(){return Vt("TAPTAP_MCP_CLIENT_ID")}static get clientSecret(){return Vt("TAPTAP_MCP_CLIENT_SECRET")}static get environment(){return Vt("TAPTAP_MCP_ENV","production")==="rnd"?"rnd":"production"}static get dcCurrentAppBaseUrl(){return Vt("TAPTAP_MCP_DC_CURRENT_APP_BASE_URL")}static get endpoints(){return C_[this.environment]||C_.production}static getEndpoints(e){let r=e||this.environment;return C_[r]||C_.production}static get transport(){let e=Vt("TAPTAP_MCP_TRANSPORT","stdio").toLowerCase();return["stdio","sse","http"].includes(e)?e:"stdio"}static get port(){return UF("TAPTAP_MCP_PORT",3e3)}static get isVerbose(){return nT("TAPTAP_MCP_VERBOSE")}static get rawToolsEnabled(){return nT("TAPTAP_MCP_ENABLE_RAW_TOOLS",!1)}static get cacheDir(){return Vt("TAPTAP_MCP_CACHE_DIR",iT.join(oT.tmpdir(),"taptap-mcp","cache"))}static get tempDir(){return Vt("TAPTAP_MCP_TEMP_DIR",iT.join(oT.tmpdir(),"taptap-mcp","temp"))}static get workspaceRoot(){return Vt("TAPTAP_MCP_WORKSPACE_ROOT",hu.cwd())}static get logRoot(){return Vt("TAPTAP_MCP_LOG_ROOT","/tmp/taptap-mcp/logs")}static get logFileEnabled(){return nT("TAPTAP_MCP_LOG_FILE",!1)}static get logLevel(){if(this.isVerbose)return"debug";let e=Vt("TAPTAP_MCP_LOG_LEVEL","info").toLowerCase();return["emergency","alert","critical","error","warning","notice","info","debug"].includes(e)?e:"info"}static get logMaxDays(){return UF("TAPTAP_MCP_LOG_MAX_DAYS",7)}static get proxyConfig(){return Vt("TAPTAP_MCP_PROXY_CONFIG")}},aT=[{new:"TAPTAP_MCP_MAC_TOKEN",old:"TDS_MCP_MAC_TOKEN",description:"MAC Token"},{new:"TAPTAP_MCP_CLIENT_ID",old:"TDS_MCP_CLIENT_ID",description:"Client ID"},{new:"TAPTAP_MCP_CLIENT_SECRET",old:"TDS_MCP_CLIENT_TOKEN",description:"Client Secret"},{new:"TAPTAP_MCP_ENV",old:"TDS_MCP_ENV",description:"Environment"},{new:"TAPTAP_MCP_TRANSPORT",old:"TDS_MCP_TRANSPORT",description:"Transport Protocol"},{new:"TAPTAP_MCP_PORT",old:"TDS_MCP_PORT",description:"Server Port"},{new:"TAPTAP_MCP_VERBOSE",old:"TDS_MCP_VERBOSE",description:"Verbose Logging"},{new:"TAPTAP_MCP_CACHE_DIR",old:"TDS_MCP_CACHE_DIR",description:"Cache Directory"},{new:"TAPTAP_MCP_TEMP_DIR",old:"TDS_MCP_TEMP_DIR",description:"Temp Directory"},{new:"TAPTAP_MCP_WORKSPACE_ROOT",old:"WORKSPACE_ROOT",description:"Workspace Root"},{new:"TAPTAP_MCP_PROXY_CONFIG",old:"PROXY_CONFIG",description:"Proxy Config"}],BF=new Set});var mu,lT=yi(()=>{"use strict";mu={emergency:0,alert:1,critical:2,error:3,warning:4,notice:5,info:6,debug:7}});import*as ii from"node:fs";import*as Gp from"node:path";import*as qF from"node:crypto";function ZF(t){return qF.createHash("sha256").update(t).digest("hex").substring(0,8)}var R_,HF=yi(()=>{"use strict";lT();R_=class{constructor(e){this.currentDate="";this.writeStream=null;this.initialized=!1;this.initPromise=null;this.config=e}async initialize(){if(!this.initialized)return this.initPromise?this.initPromise:(this.initPromise=this.doInitialize(),this.initPromise)}async doInitialize(){if(!this.config.enabled){this.initialized=!0;return}try{await ii.promises.mkdir(this.config.logDir,{recursive:!0}),await this.cleanupOldLogs(),this.initialized=!0}catch(e){process.stderr.write(`[LogWriter] Failed to initialize log directory: ${e instanceof Error?e.message:String(e)}
|
|
20
|
+
deps: ${r}}`};var rfe={keyword:"dependencies",type:"object",schemaType:"object",error:Xi.error,code(t){let[e,r]=nfe(t);Nz(t,e),jz(t,r)}};function nfe({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let i=Array.isArray(t[n])?e:r;i[n]=t[n]}return[e,r]}function Nz(t,e=t.schema){let{gen:r,data:n,it:i}=t;if(Object.keys(e).length===0)return;let o=r.let("missing");for(let a in e){let s=e[a];if(s.length===0)continue;let l=(0,Bp.propertyInData)(r,n,a,i.opts.ownProperties);t.setParams({property:a,depsCount:s.length,deps:s.join(", ")}),i.allErrors?r.if(l,()=>{for(let c of s)(0,Bp.checkReportMissingProp)(t,c)}):(r.if((0,IP._)`${l} && (${(0,Bp.checkMissingProp)(t,s,o)})`),(0,Bp.reportMissingProp)(t,o),r.else())}}Xi.validatePropertyDeps=Nz;function jz(t,e=t.schema){let{gen:r,data:n,keyword:i,it:o}=t,a=r.name("valid");for(let s in e)(0,tfe.alwaysValidSchema)(o,e[s])||(r.if((0,Bp.propertyInData)(r,n,s,o.opts.ownProperties),()=>{let l=t.subschema({keyword:i,schemaProp:s},a);t.mergeValidEvaluated(l,a)},()=>r.var(a,!0)),t.ok(a))}Xi.validateSchemaDeps=jz;Xi.default=rfe});var Fz=b($P=>{"use strict";Object.defineProperty($P,"__esModule",{value:!0});var Lz=Ne(),ife=it(),ofe={message:"property name must be valid",params:({params:t})=>(0,Lz._)`{propertyName: ${t.propertyName}}`},afe={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:ofe,code(t){let{gen:e,schema:r,data:n,it:i}=t;if((0,ife.alwaysValidSchema)(i,r))return;let o=e.name("valid");e.forIn("key",n,a=>{t.setParams({propertyName:a}),t.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},o),e.if((0,Lz.not)(o),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(o)}};$P.default=afe});var TP=b(PP=>{"use strict";Object.defineProperty(PP,"__esModule",{value:!0});var Ay=ti(),Ti=Ne(),sfe=Fo(),ky=it(),lfe={message:"must NOT have additional properties",params:({params:t})=>(0,Ti._)`{additionalProperty: ${t.additionalProperty}}`},cfe={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:lfe,code(t){let{gen:e,schema:r,parentSchema:n,data:i,errsCount:o,it:a}=t;if(!o)throw new Error("ajv implementation error");let{allErrors:s,opts:l}=a;if(a.props=!0,l.removeAdditional!=="all"&&(0,ky.alwaysValidSchema)(a,r))return;let c=(0,Ay.allSchemaProperties)(n.properties),u=(0,Ay.allSchemaProperties)(n.patternProperties);d(),t.ok((0,Ti._)`${o} === ${sfe.default.errors}`);function d(){e.forIn("key",i,y=>{!c.length&&!u.length?h(y):e.if(f(y),()=>h(y))})}function f(y){let g;if(c.length>8){let v=(0,ky.schemaRefOrVal)(a,n.properties,"properties");g=(0,Ay.isOwnProperty)(e,v,y)}else c.length?g=(0,Ti.or)(...c.map(v=>(0,Ti._)`${y} === ${v}`)):g=Ti.nil;return u.length&&(g=(0,Ti.or)(g,...u.map(v=>(0,Ti._)`${(0,Ay.usePattern)(t,v)}.test(${y})`))),(0,Ti.not)(g)}function p(y){e.code((0,Ti._)`delete ${i}[${y}]`)}function h(y){if(l.removeAdditional==="all"||l.removeAdditional&&r===!1){p(y);return}if(r===!1){t.setParams({additionalProperty:y}),t.error(),s||e.break();return}if(typeof r=="object"&&!(0,ky.alwaysValidSchema)(a,r)){let g=e.name("valid");l.removeAdditional==="failing"?(m(y,g,!1),e.if((0,Ti.not)(g),()=>{t.reset(),p(y)})):(m(y,g),s||e.if((0,Ti.not)(g),()=>e.break()))}}function m(y,g,v){let E={keyword:"additionalProperties",dataProp:y,dataPropType:ky.Type.Str};v===!1&&Object.assign(E,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(E,g)}}};PP.default=cfe});var qz=b(kP=>{"use strict";Object.defineProperty(kP,"__esModule",{value:!0});var ufe=Tp(),Bz=ti(),AP=it(),Uz=TP(),dfe={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:i,it:o}=t;o.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Uz.default.code(new ufe.KeywordCxt(o,Uz.default,"additionalProperties"));let a=(0,Bz.allSchemaProperties)(r);for(let d of a)o.definedProperties.add(d);o.opts.unevaluated&&a.length&&o.props!==!0&&(o.props=AP.mergeEvaluated.props(e,(0,AP.toHash)(a),o.props));let s=a.filter(d=>!(0,AP.alwaysValidSchema)(o,r[d]));if(s.length===0)return;let l=e.name("valid");for(let d of s)c(d)?u(d):(e.if((0,Bz.propertyInData)(e,i,d,o.opts.ownProperties)),u(d),o.allErrors||e.else().var(l,!0),e.endIf()),t.it.definedProperties.add(d),t.ok(l);function c(d){return o.opts.useDefaults&&!o.compositeRule&&r[d].default!==void 0}function u(d){t.subschema({keyword:"properties",schemaProp:d,dataProp:d},l)}}};kP.default=dfe});var Gz=b(CP=>{"use strict";Object.defineProperty(CP,"__esModule",{value:!0});var Zz=ti(),Cy=Ne(),Hz=it(),Vz=it(),ffe={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:i,it:o}=t,{opts:a}=o,s=(0,Zz.allSchemaProperties)(r),l=s.filter(m=>(0,Hz.alwaysValidSchema)(o,r[m]));if(s.length===0||l.length===s.length&&(!o.opts.unevaluated||o.props===!0))return;let c=a.strictSchema&&!a.allowMatchingProperties&&i.properties,u=e.name("valid");o.props!==!0&&!(o.props instanceof Cy.Name)&&(o.props=(0,Vz.evaluatedPropsToName)(e,o.props));let{props:d}=o;f();function f(){for(let m of s)c&&p(m),o.allErrors?h(m):(e.var(u,!0),h(m),e.if(u))}function p(m){for(let y in c)new RegExp(m).test(y)&&(0,Hz.checkStrictMode)(o,`property ${y} matches pattern ${m} (use allowMatchingProperties)`)}function h(m){e.forIn("key",n,y=>{e.if((0,Cy._)`${(0,Zz.usePattern)(t,m)}.test(${y})`,()=>{let g=l.includes(m);g||t.subschema({keyword:"patternProperties",schemaProp:m,dataProp:y,dataPropType:Vz.Type.Str},u),o.opts.unevaluated&&d!==!0?e.assign((0,Cy._)`${d}[${y}]`,!0):!g&&!o.allErrors&&e.if((0,Cy.not)(u),()=>e.break())})})}}};CP.default=ffe});var Wz=b(RP=>{"use strict";Object.defineProperty(RP,"__esModule",{value:!0});var pfe=it(),hfe={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,pfe.alwaysValidSchema)(n,r)){t.fail();return}let i=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),t.failResult(i,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};RP.default=hfe});var Jz=b(DP=>{"use strict";Object.defineProperty(DP,"__esModule",{value:!0});var mfe=ti(),gfe={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:mfe.validateUnion,error:{message:"must match a schema in anyOf"}};DP.default=gfe});var Kz=b(OP=>{"use strict";Object.defineProperty(OP,"__esModule",{value:!0});var Ry=Ne(),yfe=it(),_fe={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Ry._)`{passingSchemas: ${t.passing}}`},vfe={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:_fe,code(t){let{gen:e,schema:r,parentSchema:n,it:i}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;let o=r,a=e.let("valid",!1),s=e.let("passing",null),l=e.name("_valid");t.setParams({passing:s}),e.block(c),t.result(a,()=>t.reset(),()=>t.error(!0));function c(){o.forEach((u,d)=>{let f;(0,yfe.alwaysValidSchema)(i,u)?e.var(l,!0):f=t.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},l),d>0&&e.if((0,Ry._)`${l} && ${a}`).assign(a,!1).assign(s,(0,Ry._)`[${s}, ${d}]`).else(),e.if(l,()=>{e.assign(a,!0),e.assign(s,d),f&&t.mergeEvaluated(f,Ry.Name)})})}}};OP.default=vfe});var Yz=b(MP=>{"use strict";Object.defineProperty(MP,"__esModule",{value:!0});var bfe=it(),wfe={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let i=e.name("valid");r.forEach((o,a)=>{if((0,bfe.alwaysValidSchema)(n,o))return;let s=t.subschema({keyword:"allOf",schemaProp:a},i);t.ok(i),t.mergeEvaluated(s)})}};MP.default=wfe});var eL=b(NP=>{"use strict";Object.defineProperty(NP,"__esModule",{value:!0});var Dy=Ne(),Qz=it(),xfe={message:({params:t})=>(0,Dy.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,Dy._)`{failingKeyword: ${t.ifClause}}`},Sfe={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:xfe,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Qz.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let i=Xz(n,"then"),o=Xz(n,"else");if(!i&&!o)return;let a=e.let("valid",!0),s=e.name("_valid");if(l(),t.reset(),i&&o){let u=e.let("ifClause");t.setParams({ifClause:u}),e.if(s,c("then",u),c("else",u))}else i?e.if(s,c("then")):e.if((0,Dy.not)(s),c("else"));t.pass(a,()=>t.error(!0));function l(){let u=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);t.mergeEvaluated(u)}function c(u,d){return()=>{let f=t.subschema({keyword:u},s);e.assign(a,s),t.mergeValidEvaluated(f,a),d?e.assign(d,(0,Dy._)`${u}`):t.setParams({ifClause:u})}}}};function Xz(t,e){let r=t.schema[e];return r!==void 0&&!(0,Qz.alwaysValidSchema)(t,r)}NP.default=Sfe});var tL=b(jP=>{"use strict";Object.defineProperty(jP,"__esModule",{value:!0});var Efe=it(),Ife={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,Efe.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};jP.default=Ife});var rL=b(zP=>{"use strict";Object.defineProperty(zP,"__esModule",{value:!0});var $fe=bP(),Pfe=Rz(),Tfe=wP(),Afe=Oz(),kfe=Mz(),Cfe=zz(),Rfe=Fz(),Dfe=TP(),Ofe=qz(),Mfe=Gz(),Nfe=Wz(),jfe=Jz(),zfe=Kz(),Lfe=Yz(),Ffe=eL(),Bfe=tL();function Ufe(t=!1){let e=[Nfe.default,jfe.default,zfe.default,Lfe.default,Ffe.default,Bfe.default,Rfe.default,Dfe.default,Cfe.default,Ofe.default,Mfe.default];return t?e.push(Pfe.default,Afe.default):e.push($fe.default,Tfe.default),e.push(kfe.default),e}zP.default=Ufe});var nL=b(LP=>{"use strict";Object.defineProperty(LP,"__esModule",{value:!0});var Xt=Ne(),qfe={message:({schemaCode:t})=>(0,Xt.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,Xt._)`{format: ${t}}`},Zfe={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:qfe,code(t,e){let{gen:r,data:n,$data:i,schema:o,schemaCode:a,it:s}=t,{opts:l,errSchemaPath:c,schemaEnv:u,self:d}=s;if(!l.validateFormats)return;i?f():p();function f(){let h=r.scopeValue("formats",{ref:d.formats,code:l.code.formats}),m=r.const("fDef",(0,Xt._)`${h}[${a}]`),y=r.let("fType"),g=r.let("format");r.if((0,Xt._)`typeof ${m} == "object" && !(${m} instanceof RegExp)`,()=>r.assign(y,(0,Xt._)`${m}.type || "string"`).assign(g,(0,Xt._)`${m}.validate`),()=>r.assign(y,(0,Xt._)`"string"`).assign(g,m)),t.fail$data((0,Xt.or)(v(),E()));function v(){return l.strictSchema===!1?Xt.nil:(0,Xt._)`${a} && !${g}`}function E(){let x=u.$async?(0,Xt._)`(${m}.async ? await ${g}(${n}) : ${g}(${n}))`:(0,Xt._)`${g}(${n})`,w=(0,Xt._)`(typeof ${g} == "function" ? ${x} : ${g}.test(${n}))`;return(0,Xt._)`${g} && ${g} !== true && ${y} === ${e} && !${w}`}}function p(){let h=d.formats[o];if(!h){v();return}if(h===!0)return;let[m,y,g]=E(h);m===e&&t.pass(x());function v(){if(l.strictSchema===!1){d.logger.warn(w());return}throw new Error(w());function w(){return`unknown format "${o}" ignored in schema at path "${c}"`}}function E(w){let k=w instanceof RegExp?(0,Xt.regexpCode)(w):l.code.formats?(0,Xt._)`${l.code.formats}${(0,Xt.getProperty)(o)}`:void 0,P=r.scopeValue("formats",{key:o,ref:w,code:k});return typeof w=="object"&&!(w instanceof RegExp)?[w.type||"string",w.validate,(0,Xt._)`${P}.validate`]:["string",w,P]}function x(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!u.$async)throw new Error("async format in sync schema");return(0,Xt._)`await ${g}(${n})`}return typeof y=="function"?(0,Xt._)`${g}(${n})`:(0,Xt._)`${g}.test(${n})`}}}};LP.default=Zfe});var iL=b(FP=>{"use strict";Object.defineProperty(FP,"__esModule",{value:!0});var Hfe=nL(),Vfe=[Hfe.default];FP.default=Vfe});var oL=b(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.contentVocabulary=ou.metadataVocabulary=void 0;ou.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];ou.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var sL=b(BP=>{"use strict";Object.defineProperty(BP,"__esModule",{value:!0});var Gfe=hz(),Wfe=Tz(),Jfe=rL(),Kfe=iL(),aL=oL(),Yfe=[Gfe.default,Wfe.default,(0,Jfe.default)(),Kfe.default,aL.metadataVocabulary,aL.contentVocabulary];BP.default=Yfe});var cL=b(Oy=>{"use strict";Object.defineProperty(Oy,"__esModule",{value:!0});Oy.DiscrError=void 0;var lL;(function(t){t.Tag="tag",t.Mapping="mapping"})(lL||(Oy.DiscrError=lL={}))});var dL=b(qP=>{"use strict";Object.defineProperty(qP,"__esModule",{value:!0});var au=Ne(),UP=cL(),uL=by(),Xfe=Ap(),Qfe=it(),epe={message:({params:{discrError:t,tagName:e}})=>t===UP.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,au._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},tpe={keyword:"discriminator",type:"object",schemaType:"object",error:epe,code(t){let{gen:e,data:r,schema:n,parentSchema:i,it:o}=t,{oneOf:a}=i;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");let s=n.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");let l=e.let("valid",!1),c=e.const("tag",(0,au._)`${r}${(0,au.getProperty)(s)}`);e.if((0,au._)`typeof ${c} == "string"`,()=>u(),()=>t.error(!1,{discrError:UP.DiscrError.Tag,tag:c,tagName:s})),t.ok(l);function u(){let p=f();e.if(!1);for(let h in p)e.elseIf((0,au._)`${c} === ${h}`),e.assign(l,d(p[h]));e.else(),t.error(!1,{discrError:UP.DiscrError.Mapping,tag:c,tagName:s}),e.endIf()}function d(p){let h=e.name("valid"),m=t.subschema({keyword:"oneOf",schemaProp:p},h);return t.mergeEvaluated(m,au.Name),h}function f(){var p;let h={},m=g(i),y=!0;for(let x=0;x<a.length;x++){let w=a[x];if(w!=null&&w.$ref&&!(0,Qfe.schemaHasRulesButRef)(w,o.self.RULES)){let P=w.$ref;if(w=uL.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,P),w instanceof uL.SchemaEnv&&(w=w.schema),w===void 0)throw new Xfe.default(o.opts.uriResolver,o.baseId,P)}let k=(p=w==null?void 0:w.properties)===null||p===void 0?void 0:p[s];if(typeof k!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);y=y&&(m||g(w)),v(k,x)}if(!y)throw new Error(`discriminator: "${s}" must be required`);return h;function g({required:x}){return Array.isArray(x)&&x.includes(s)}function v(x,w){if(x.const)E(x.const,w);else if(x.enum)for(let k of x.enum)E(k,w);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function E(x,w){if(typeof x!="string"||x in h)throw new Error(`discriminator: "${s}" values must be unique strings`);h[x]=w}}}};qP.default=tpe});var fL=b((_3e,rpe)=>{rpe.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 hL=b((zt,ZP)=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.MissingRefError=zt.ValidationError=zt.CodeGen=zt.Name=zt.nil=zt.stringify=zt.str=zt._=zt.KeywordCxt=zt.Ajv=void 0;var npe=lz(),ipe=sL(),ope=dL(),pL=fL(),ape=["/properties"],My="http://json-schema.org/draft-07/schema",su=class extends npe.default{_addVocabularies(){super._addVocabularies(),ipe.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(ope.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(pL,ape):pL;this.addMetaSchema(e,My,!1),this.refs["http://json-schema.org/schema"]=My}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(My)?My:void 0)}};zt.Ajv=su;ZP.exports=zt=su;ZP.exports.Ajv=su;Object.defineProperty(zt,"__esModule",{value:!0});zt.default=su;var spe=Tp();Object.defineProperty(zt,"KeywordCxt",{enumerable:!0,get:function(){return spe.KeywordCxt}});var lu=Ne();Object.defineProperty(zt,"_",{enumerable:!0,get:function(){return lu._}});Object.defineProperty(zt,"str",{enumerable:!0,get:function(){return lu.str}});Object.defineProperty(zt,"stringify",{enumerable:!0,get:function(){return lu.stringify}});Object.defineProperty(zt,"nil",{enumerable:!0,get:function(){return lu.nil}});Object.defineProperty(zt,"Name",{enumerable:!0,get:function(){return lu.Name}});Object.defineProperty(zt,"CodeGen",{enumerable:!0,get:function(){return lu.CodeGen}});var lpe=_y();Object.defineProperty(zt,"ValidationError",{enumerable:!0,get:function(){return lpe.default}});var cpe=Ap();Object.defineProperty(zt,"MissingRefError",{enumerable:!0,get:function(){return cpe.default}})});var mL=b(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.formatLimitDefinition=void 0;var upe=hL(),Ai=Ne(),Ma=Ai.operators,Ny={formatMaximum:{okStr:"<=",ok:Ma.LTE,fail:Ma.GT},formatMinimum:{okStr:">=",ok:Ma.GTE,fail:Ma.LT},formatExclusiveMaximum:{okStr:"<",ok:Ma.LT,fail:Ma.GTE},formatExclusiveMinimum:{okStr:">",ok:Ma.GT,fail:Ma.LTE}},dpe={message:({keyword:t,schemaCode:e})=>(0,Ai.str)`should be ${Ny[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Ai._)`{comparison: ${Ny[t].okStr}, limit: ${e}}`};cu.formatLimitDefinition={keyword:Object.keys(Ny),type:"string",schemaType:"string",$data:!0,error:dpe,code(t){let{gen:e,data:r,schemaCode:n,keyword:i,it:o}=t,{opts:a,self:s}=o;if(!a.validateFormats)return;let l=new upe.KeywordCxt(o,s.RULES.all.format.definition,"format");l.$data?c():u();function c(){let f=e.scopeValue("formats",{ref:s.formats,code:a.code.formats}),p=e.const("fmt",(0,Ai._)`${f}[${l.schemaCode}]`);t.fail$data((0,Ai.or)((0,Ai._)`typeof ${p} != "object"`,(0,Ai._)`${p} instanceof RegExp`,(0,Ai._)`typeof ${p}.compare != "function"`,d(p)))}function u(){let f=l.schema,p=s.formats[f];if(!p||p===!0)return;if(typeof p!="object"||p instanceof RegExp||typeof p.compare!="function")throw new Error(`"${i}": format "${f}" does not define "compare" function`);let h=e.scopeValue("formats",{key:f,ref:p,code:a.code.formats?(0,Ai._)`${a.code.formats}${(0,Ai.getProperty)(f)}`:void 0});t.fail$data(d(h))}function d(f){return(0,Ai._)`${f}.compare(${r}, ${n}) ${Ny[i].fail} 0`}},dependencies:["format"]};var fpe=t=>(t.addKeyword(cu.formatLimitDefinition),t);cu.default=fpe});var vL=b((Up,_L)=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});var uu=e6(),ppe=mL(),HP=Ne(),gL=new HP.Name("fullFormats"),hpe=new HP.Name("fastFormats"),VP=(t,e={keywords:!0})=>{if(Array.isArray(e))return yL(t,e,uu.fullFormats,gL),t;let[r,n]=e.mode==="fast"?[uu.fastFormats,hpe]:[uu.fullFormats,gL],i=e.formats||uu.formatNames;return yL(t,i,r,n),e.keywords&&(0,ppe.default)(t),t};VP.get=(t,e="full")=>{let n=(e==="fast"?uu.fastFormats:uu.fullFormats)[t];if(!n)throw new Error(`Unknown format "${t}"`);return n};function yL(t,e,r,n){var i,o;(i=(o=t.opts.code).formats)!==null&&i!==void 0||(o.formats=(0,HP._)`require("ajv-formats/dist/formats").${n}`);for(let a of e)t.addFormat(a,r[a])}_L.exports=Up=VP;Object.defineProperty(Up,"__esModule",{value:!0});Up.default=VP});var We=b((Vy,OL)=>{(function(t,e){typeof Vy=="object"?OL.exports=Vy=e():typeof define=="function"&&define.amd?define([],e):t.CryptoJS=e()})(Vy,function(){var t=t||(function(e,r){var n;if(typeof window<"u"&&window.crypto&&(n=window.crypto),typeof self<"u"&&self.crypto&&(n=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(n=globalThis.crypto),!n&&typeof window<"u"&&window.msCrypto&&(n=window.msCrypto),!n&&typeof global<"u"&&global.crypto&&(n=global.crypto),!n&&typeof Q=="function")try{n=Q("crypto")}catch{}var i=function(){if(n){if(typeof n.getRandomValues=="function")try{return n.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof n.randomBytes=="function")try{return n.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||(function(){function g(){}return function(v){var E;return g.prototype=v,E=new g,g.prototype=null,E}})(),a={},s=a.lib={},l=s.Base=(function(){return{extend:function(g){var v=o(this);return g&&v.mixIn(g),(!v.hasOwnProperty("init")||this.init===v.init)&&(v.init=function(){v.$super.init.apply(this,arguments)}),v.init.prototype=v,v.$super=this,v},create:function(){var g=this.extend();return g.init.apply(g,arguments),g},init:function(){},mixIn:function(g){for(var v in g)g.hasOwnProperty(v)&&(this[v]=g[v]);g.hasOwnProperty("toString")&&(this.toString=g.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),c=s.WordArray=l.extend({init:function(g,v){g=this.words=g||[],v!=r?this.sigBytes=v:this.sigBytes=g.length*4},toString:function(g){return(g||d).stringify(this)},concat:function(g){var v=this.words,E=g.words,x=this.sigBytes,w=g.sigBytes;if(this.clamp(),x%4)for(var k=0;k<w;k++){var P=E[k>>>2]>>>24-k%4*8&255;v[x+k>>>2]|=P<<24-(x+k)%4*8}else for(var R=0;R<w;R+=4)v[x+R>>>2]=E[R>>>2];return this.sigBytes+=w,this},clamp:function(){var g=this.words,v=this.sigBytes;g[v>>>2]&=4294967295<<32-v%4*8,g.length=e.ceil(v/4)},clone:function(){var g=l.clone.call(this);return g.words=this.words.slice(0),g},random:function(g){for(var v=[],E=0;E<g;E+=4)v.push(i());return new c.init(v,g)}}),u=a.enc={},d=u.Hex={stringify:function(g){for(var v=g.words,E=g.sigBytes,x=[],w=0;w<E;w++){var k=v[w>>>2]>>>24-w%4*8&255;x.push((k>>>4).toString(16)),x.push((k&15).toString(16))}return x.join("")},parse:function(g){for(var v=g.length,E=[],x=0;x<v;x+=2)E[x>>>3]|=parseInt(g.substr(x,2),16)<<24-x%8*4;return new c.init(E,v/2)}},f=u.Latin1={stringify:function(g){for(var v=g.words,E=g.sigBytes,x=[],w=0;w<E;w++){var k=v[w>>>2]>>>24-w%4*8&255;x.push(String.fromCharCode(k))}return x.join("")},parse:function(g){for(var v=g.length,E=[],x=0;x<v;x++)E[x>>>2]|=(g.charCodeAt(x)&255)<<24-x%4*8;return new c.init(E,v)}},p=u.Utf8={stringify:function(g){try{return decodeURIComponent(escape(f.stringify(g)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(g){return f.parse(unescape(encodeURIComponent(g)))}},h=s.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(g){typeof g=="string"&&(g=p.parse(g)),this._data.concat(g),this._nDataBytes+=g.sigBytes},_process:function(g){var v,E=this._data,x=E.words,w=E.sigBytes,k=this.blockSize,P=k*4,R=w/P;g?R=e.ceil(R):R=e.max((R|0)-this._minBufferSize,0);var T=R*k,D=e.min(T*4,w);if(T){for(var A=0;A<T;A+=k)this._doProcessBlock(x,A);v=x.splice(0,T),E.sigBytes-=D}return new c.init(v,D)},clone:function(){var g=l.clone.call(this);return g._data=this._data.clone(),g},_minBufferSize:0}),m=s.Hasher=h.extend({cfg:l.extend(),init:function(g){this.cfg=this.cfg.extend(g),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(g){return this._append(g),this._process(),this},finalize:function(g){g&&this._append(g);var v=this._doFinalize();return v},blockSize:512/32,_createHelper:function(g){return function(v,E){return new g.init(E).finalize(v)}},_createHmacHelper:function(g){return function(v,E){return new y.HMAC.init(g,E).finalize(v)}}}),y=a.algo={};return a})(Math);return t})});var Vp=b((Gy,ML)=>{(function(t,e){typeof Gy=="object"?ML.exports=Gy=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Gy,function(t){return(function(e){var r=t,n=r.lib,i=n.Base,o=n.WordArray,a=r.x64={},s=a.Word=i.extend({init:function(c,u){this.high=c,this.low=u}}),l=a.WordArray=i.extend({init:function(c,u){c=this.words=c||[],u!=e?this.sigBytes=u:this.sigBytes=c.length*8},toX32:function(){for(var c=this.words,u=c.length,d=[],f=0;f<u;f++){var p=c[f];d.push(p.high),d.push(p.low)}return o.create(d,this.sigBytes)},clone:function(){for(var c=i.clone.call(this),u=c.words=this.words.slice(0),d=u.length,f=0;f<d;f++)u[f]=u[f].clone();return c}})})(),t})});var jL=b((Wy,NL)=>{(function(t,e){typeof Wy=="object"?NL.exports=Wy=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Wy,function(t){return(function(){if(typeof ArrayBuffer=="function"){var e=t,r=e.lib,n=r.WordArray,i=n.init,o=n.init=function(a){if(a instanceof ArrayBuffer&&(a=new Uint8Array(a)),(a instanceof Int8Array||typeof Uint8ClampedArray<"u"&&a instanceof Uint8ClampedArray||a instanceof Int16Array||a instanceof Uint16Array||a instanceof Int32Array||a instanceof Uint32Array||a instanceof Float32Array||a instanceof Float64Array)&&(a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength)),a instanceof Uint8Array){for(var s=a.byteLength,l=[],c=0;c<s;c++)l[c>>>2]|=a[c]<<24-c%4*8;i.call(this,l,s)}else i.apply(this,arguments)};o.prototype=n}})(),t.lib.WordArray})});var LL=b((Jy,zL)=>{(function(t,e){typeof Jy=="object"?zL.exports=Jy=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Jy,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,i=e.enc,o=i.Utf16=i.Utf16BE={stringify:function(s){for(var l=s.words,c=s.sigBytes,u=[],d=0;d<c;d+=2){var f=l[d>>>2]>>>16-d%4*8&65535;u.push(String.fromCharCode(f))}return u.join("")},parse:function(s){for(var l=s.length,c=[],u=0;u<l;u++)c[u>>>1]|=s.charCodeAt(u)<<16-u%2*16;return n.create(c,l*2)}};i.Utf16LE={stringify:function(s){for(var l=s.words,c=s.sigBytes,u=[],d=0;d<c;d+=2){var f=a(l[d>>>2]>>>16-d%4*8&65535);u.push(String.fromCharCode(f))}return u.join("")},parse:function(s){for(var l=s.length,c=[],u=0;u<l;u++)c[u>>>1]|=a(s.charCodeAt(u)<<16-u%2*16);return n.create(c,l*2)}};function a(s){return s<<8&4278255360|s>>>8&16711935}})(),t.enc.Utf16})});var Na=b((Ky,FL)=>{(function(t,e){typeof Ky=="object"?FL.exports=Ky=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Ky,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,i=e.enc,o=i.Base64={stringify:function(s){var l=s.words,c=s.sigBytes,u=this._map;s.clamp();for(var d=[],f=0;f<c;f+=3)for(var p=l[f>>>2]>>>24-f%4*8&255,h=l[f+1>>>2]>>>24-(f+1)%4*8&255,m=l[f+2>>>2]>>>24-(f+2)%4*8&255,y=p<<16|h<<8|m,g=0;g<4&&f+g*.75<c;g++)d.push(u.charAt(y>>>6*(3-g)&63));var v=u.charAt(64);if(v)for(;d.length%4;)d.push(v);return d.join("")},parse:function(s){var l=s.length,c=this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var d=0;d<c.length;d++)u[c.charCodeAt(d)]=d}var f=c.charAt(64);if(f){var p=s.indexOf(f);p!==-1&&(l=p)}return a(s,l,u)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function a(s,l,c){for(var u=[],d=0,f=0;f<l;f++)if(f%4){var p=c[s.charCodeAt(f-1)]<<f%4*2,h=c[s.charCodeAt(f)]>>>6-f%4*2,m=p|h;u[d>>>2]|=m<<24-d%4*8,d++}return n.create(u,d)}})(),t.enc.Base64})});var UL=b((Yy,BL)=>{(function(t,e){typeof Yy=="object"?BL.exports=Yy=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Yy,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,i=e.enc,o=i.Base64url={stringify:function(s,l){l===void 0&&(l=!0);var c=s.words,u=s.sigBytes,d=l?this._safe_map:this._map;s.clamp();for(var f=[],p=0;p<u;p+=3)for(var h=c[p>>>2]>>>24-p%4*8&255,m=c[p+1>>>2]>>>24-(p+1)%4*8&255,y=c[p+2>>>2]>>>24-(p+2)%4*8&255,g=h<<16|m<<8|y,v=0;v<4&&p+v*.75<u;v++)f.push(d.charAt(g>>>6*(3-v)&63));var E=d.charAt(64);if(E)for(;f.length%4;)f.push(E);return f.join("")},parse:function(s,l){l===void 0&&(l=!0);var c=s.length,u=l?this._safe_map:this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var f=0;f<u.length;f++)d[u.charCodeAt(f)]=f}var p=u.charAt(64);if(p){var h=s.indexOf(p);h!==-1&&(c=h)}return a(s,c,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function a(s,l,c){for(var u=[],d=0,f=0;f<l;f++)if(f%4){var p=c[s.charCodeAt(f-1)]<<f%4*2,h=c[s.charCodeAt(f)]>>>6-f%4*2,m=p|h;u[d>>>2]|=m<<24-d%4*8,d++}return n.create(u,d)}})(),t.enc.Base64url})});var ja=b((Xy,qL)=>{(function(t,e){typeof Xy=="object"?qL.exports=Xy=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Xy,function(t){return(function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=[];(function(){for(var p=0;p<64;p++)s[p]=e.abs(e.sin(p+1))*4294967296|0})();var l=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(p,h){for(var m=0;m<16;m++){var y=h+m,g=p[y];p[y]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360}var v=this._hash.words,E=p[h+0],x=p[h+1],w=p[h+2],k=p[h+3],P=p[h+4],R=p[h+5],T=p[h+6],D=p[h+7],A=p[h+8],M=p[h+9],U=p[h+10],z=p[h+11],X=p[h+12],K=p[h+13],re=p[h+14],pe=p[h+15],F=v[0],Z=v[1],W=v[2],H=v[3];F=c(F,Z,W,H,E,7,s[0]),H=c(H,F,Z,W,x,12,s[1]),W=c(W,H,F,Z,w,17,s[2]),Z=c(Z,W,H,F,k,22,s[3]),F=c(F,Z,W,H,P,7,s[4]),H=c(H,F,Z,W,R,12,s[5]),W=c(W,H,F,Z,T,17,s[6]),Z=c(Z,W,H,F,D,22,s[7]),F=c(F,Z,W,H,A,7,s[8]),H=c(H,F,Z,W,M,12,s[9]),W=c(W,H,F,Z,U,17,s[10]),Z=c(Z,W,H,F,z,22,s[11]),F=c(F,Z,W,H,X,7,s[12]),H=c(H,F,Z,W,K,12,s[13]),W=c(W,H,F,Z,re,17,s[14]),Z=c(Z,W,H,F,pe,22,s[15]),F=u(F,Z,W,H,x,5,s[16]),H=u(H,F,Z,W,T,9,s[17]),W=u(W,H,F,Z,z,14,s[18]),Z=u(Z,W,H,F,E,20,s[19]),F=u(F,Z,W,H,R,5,s[20]),H=u(H,F,Z,W,U,9,s[21]),W=u(W,H,F,Z,pe,14,s[22]),Z=u(Z,W,H,F,P,20,s[23]),F=u(F,Z,W,H,M,5,s[24]),H=u(H,F,Z,W,re,9,s[25]),W=u(W,H,F,Z,k,14,s[26]),Z=u(Z,W,H,F,A,20,s[27]),F=u(F,Z,W,H,K,5,s[28]),H=u(H,F,Z,W,w,9,s[29]),W=u(W,H,F,Z,D,14,s[30]),Z=u(Z,W,H,F,X,20,s[31]),F=d(F,Z,W,H,R,4,s[32]),H=d(H,F,Z,W,A,11,s[33]),W=d(W,H,F,Z,z,16,s[34]),Z=d(Z,W,H,F,re,23,s[35]),F=d(F,Z,W,H,x,4,s[36]),H=d(H,F,Z,W,P,11,s[37]),W=d(W,H,F,Z,D,16,s[38]),Z=d(Z,W,H,F,U,23,s[39]),F=d(F,Z,W,H,K,4,s[40]),H=d(H,F,Z,W,E,11,s[41]),W=d(W,H,F,Z,k,16,s[42]),Z=d(Z,W,H,F,T,23,s[43]),F=d(F,Z,W,H,M,4,s[44]),H=d(H,F,Z,W,X,11,s[45]),W=d(W,H,F,Z,pe,16,s[46]),Z=d(Z,W,H,F,w,23,s[47]),F=f(F,Z,W,H,E,6,s[48]),H=f(H,F,Z,W,D,10,s[49]),W=f(W,H,F,Z,re,15,s[50]),Z=f(Z,W,H,F,R,21,s[51]),F=f(F,Z,W,H,X,6,s[52]),H=f(H,F,Z,W,k,10,s[53]),W=f(W,H,F,Z,U,15,s[54]),Z=f(Z,W,H,F,x,21,s[55]),F=f(F,Z,W,H,A,6,s[56]),H=f(H,F,Z,W,pe,10,s[57]),W=f(W,H,F,Z,T,15,s[58]),Z=f(Z,W,H,F,K,21,s[59]),F=f(F,Z,W,H,P,6,s[60]),H=f(H,F,Z,W,z,10,s[61]),W=f(W,H,F,Z,w,15,s[62]),Z=f(Z,W,H,F,M,21,s[63]),v[0]=v[0]+F|0,v[1]=v[1]+Z|0,v[2]=v[2]+W|0,v[3]=v[3]+H|0},_doFinalize:function(){var p=this._data,h=p.words,m=this._nDataBytes*8,y=p.sigBytes*8;h[y>>>5]|=128<<24-y%32;var g=e.floor(m/4294967296),v=m;h[(y+64>>>9<<4)+15]=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,h[(y+64>>>9<<4)+14]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,p.sigBytes=(h.length+1)*4,this._process();for(var E=this._hash,x=E.words,w=0;w<4;w++){var k=x[w];x[w]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360}return E},clone:function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p}});function c(p,h,m,y,g,v,E){var x=p+(h&m|~h&y)+g+E;return(x<<v|x>>>32-v)+h}function u(p,h,m,y,g,v,E){var x=p+(h&y|m&~y)+g+E;return(x<<v|x>>>32-v)+h}function d(p,h,m,y,g,v,E){var x=p+(h^m^y)+g+E;return(x<<v|x>>>32-v)+h}function f(p,h,m,y,g,v,E){var x=p+(m^(h|~y))+g+E;return(x<<v|x>>>32-v)+h}r.MD5=o._createHelper(l),r.HmacMD5=o._createHmacHelper(l)})(Math),t.MD5})});var QP=b((Qy,ZL)=>{(function(t,e){typeof Qy=="object"?ZL.exports=Qy=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(Qy,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,i=r.Hasher,o=e.algo,a=[],s=o.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(l,c){for(var u=this._hash.words,d=u[0],f=u[1],p=u[2],h=u[3],m=u[4],y=0;y<80;y++){if(y<16)a[y]=l[c+y]|0;else{var g=a[y-3]^a[y-8]^a[y-14]^a[y-16];a[y]=g<<1|g>>>31}var v=(d<<5|d>>>27)+m+a[y];y<20?v+=(f&p|~f&h)+1518500249:y<40?v+=(f^p^h)+1859775393:y<60?v+=(f&p|f&h|p&h)-1894007588:v+=(f^p^h)-899497514,m=h,h=p,p=f<<30|f>>>2,f=d,d=v}u[0]=u[0]+d|0,u[1]=u[1]+f|0,u[2]=u[2]+p|0,u[3]=u[3]+h|0,u[4]=u[4]+m|0},_doFinalize:function(){var l=this._data,c=l.words,u=this._nDataBytes*8,d=l.sigBytes*8;return c[d>>>5]|=128<<24-d%32,c[(d+64>>>9<<4)+14]=Math.floor(u/4294967296),c[(d+64>>>9<<4)+15]=u,l.sigBytes=c.length*4,this._process(),this._hash},clone:function(){var l=i.clone.call(this);return l._hash=this._hash.clone(),l}});e.SHA1=i._createHelper(s),e.HmacSHA1=i._createHmacHelper(s)})(),t.SHA1})});var t_=b((e_,HL)=>{(function(t,e){typeof e_=="object"?HL.exports=e_=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(e_,function(t){return(function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=[],l=[];(function(){function d(m){for(var y=e.sqrt(m),g=2;g<=y;g++)if(!(m%g))return!1;return!0}function f(m){return(m-(m|0))*4294967296|0}for(var p=2,h=0;h<64;)d(p)&&(h<8&&(s[h]=f(e.pow(p,1/2))),l[h]=f(e.pow(p,1/3)),h++),p++})();var c=[],u=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(d,f){for(var p=this._hash.words,h=p[0],m=p[1],y=p[2],g=p[3],v=p[4],E=p[5],x=p[6],w=p[7],k=0;k<64;k++){if(k<16)c[k]=d[f+k]|0;else{var P=c[k-15],R=(P<<25|P>>>7)^(P<<14|P>>>18)^P>>>3,T=c[k-2],D=(T<<15|T>>>17)^(T<<13|T>>>19)^T>>>10;c[k]=R+c[k-7]+D+c[k-16]}var A=v&E^~v&x,M=h&m^h&y^m&y,U=(h<<30|h>>>2)^(h<<19|h>>>13)^(h<<10|h>>>22),z=(v<<26|v>>>6)^(v<<21|v>>>11)^(v<<7|v>>>25),X=w+z+A+l[k]+c[k],K=U+M;w=x,x=E,E=v,v=g+X|0,g=y,y=m,m=h,h=X+K|0}p[0]=p[0]+h|0,p[1]=p[1]+m|0,p[2]=p[2]+y|0,p[3]=p[3]+g|0,p[4]=p[4]+v|0,p[5]=p[5]+E|0,p[6]=p[6]+x|0,p[7]=p[7]+w|0},_doFinalize:function(){var d=this._data,f=d.words,p=this._nDataBytes*8,h=d.sigBytes*8;return f[h>>>5]|=128<<24-h%32,f[(h+64>>>9<<4)+14]=e.floor(p/4294967296),f[(h+64>>>9<<4)+15]=p,d.sigBytes=f.length*4,this._process(),this._hash},clone:function(){var d=o.clone.call(this);return d._hash=this._hash.clone(),d}});r.SHA256=o._createHelper(u),r.HmacSHA256=o._createHmacHelper(u)})(Math),t.SHA256})});var GL=b((r_,VL)=>{(function(t,e,r){typeof r_=="object"?VL.exports=r_=e(We(),t_()):typeof define=="function"&&define.amd?define(["./core","./sha256"],e):e(t.CryptoJS)})(r_,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,i=e.algo,o=i.SHA256,a=i.SHA224=o.extend({_doReset:function(){this._hash=new n.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var s=o._doFinalize.call(this);return s.sigBytes-=4,s}});e.SHA224=o._createHelper(a),e.HmacSHA224=o._createHmacHelper(a)})(),t.SHA224})});var eT=b((n_,WL)=>{(function(t,e,r){typeof n_=="object"?WL.exports=n_=e(We(),Vp()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],e):e(t.CryptoJS)})(n_,function(t){return(function(){var e=t,r=e.lib,n=r.Hasher,i=e.x64,o=i.Word,a=i.WordArray,s=e.algo;function l(){return o.create.apply(o,arguments)}var c=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],u=[];(function(){for(var f=0;f<80;f++)u[f]=l()})();var d=s.SHA512=n.extend({_doReset:function(){this._hash=new a.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.init(1541459225,327033209)])},_doProcessBlock:function(f,p){for(var h=this._hash.words,m=h[0],y=h[1],g=h[2],v=h[3],E=h[4],x=h[5],w=h[6],k=h[7],P=m.high,R=m.low,T=y.high,D=y.low,A=g.high,M=g.low,U=v.high,z=v.low,X=E.high,K=E.low,re=x.high,pe=x.low,F=w.high,Z=w.low,W=k.high,H=k.low,Et=P,_t=R,kt=T,Me=D,bo=A,wo=M,Fi=U,Fn=z,Vr=X,Gr=K,Wl=re,xs=pe,Jl=F,Ss=Z,_d=W,oa=H,In=0;In<80;In++){var Wr,Bn,Es=u[In];if(In<16)Bn=Es.high=f[p+In*2]|0,Wr=Es.low=f[p+In*2+1]|0;else{var vd=u[In-15],aa=vd.high,dn=vd.low,bd=(aa>>>1|dn<<31)^(aa>>>8|dn<<24)^aa>>>7,wd=(dn>>>1|aa<<31)^(dn>>>8|aa<<24)^(dn>>>7|aa<<25),Dm=u[In-2],Un=Dm.high,Is=Dm.low,sa=(Un>>>19|Is<<13)^(Un<<3|Is>>>29)^Un>>>6,Om=(Is>>>19|Un<<13)^(Is<<3|Un>>>29)^(Is>>>6|Un<<26),$s=u[In-7],ww=$s.high,Kl=$s.low,xd=u[In-16],gi=xd.high,Mm=xd.low;Wr=wd+Kl,Bn=bd+ww+(Wr>>>0<wd>>>0?1:0),Wr=Wr+Om,Bn=Bn+sa+(Wr>>>0<Om>>>0?1:0),Wr=Wr+Mm,Bn=Bn+gi+(Wr>>>0<Mm>>>0?1:0),Es.high=Bn,Es.low=Wr}var Yl=Vr&Wl^~Vr&Jl,Nm=Gr&xs^~Gr&Ss,Xl=Et&kt^Et&bo^kt&bo,xw=_t&Me^_t&wo^Me&wo,Ql=(Et>>>28|_t<<4)^(Et<<30|_t>>>2)^(Et<<25|_t>>>7),Sd=(_t>>>28|Et<<4)^(_t<<30|Et>>>2)^(_t<<25|Et>>>7),jm=(Vr>>>14|Gr<<18)^(Vr>>>18|Gr<<14)^(Vr<<23|Gr>>>9),Sw=(Gr>>>14|Vr<<18)^(Gr>>>18|Vr<<14)^(Gr<<23|Vr>>>9),la=c[In],zm=la.high,Ed=la.low,Jr=oa+Sw,$n=_d+jm+(Jr>>>0<oa>>>0?1:0),Jr=Jr+Nm,$n=$n+Yl+(Jr>>>0<Nm>>>0?1:0),Jr=Jr+Ed,$n=$n+zm+(Jr>>>0<Ed>>>0?1:0),Jr=Jr+Wr,$n=$n+Bn+(Jr>>>0<Wr>>>0?1:0),Lm=Sd+xw,Ps=Ql+Xl+(Lm>>>0<Sd>>>0?1:0);_d=Jl,oa=Ss,Jl=Wl,Ss=xs,Wl=Vr,xs=Gr,Gr=Fn+Jr|0,Vr=Fi+$n+(Gr>>>0<Fn>>>0?1:0)|0,Fi=bo,Fn=wo,bo=kt,wo=Me,kt=Et,Me=_t,_t=Jr+Lm|0,Et=$n+Ps+(_t>>>0<Jr>>>0?1:0)|0}R=m.low=R+_t,m.high=P+Et+(R>>>0<_t>>>0?1:0),D=y.low=D+Me,y.high=T+kt+(D>>>0<Me>>>0?1:0),M=g.low=M+wo,g.high=A+bo+(M>>>0<wo>>>0?1:0),z=v.low=z+Fn,v.high=U+Fi+(z>>>0<Fn>>>0?1:0),K=E.low=K+Gr,E.high=X+Vr+(K>>>0<Gr>>>0?1:0),pe=x.low=pe+xs,x.high=re+Wl+(pe>>>0<xs>>>0?1:0),Z=w.low=Z+Ss,w.high=F+Jl+(Z>>>0<Ss>>>0?1:0),H=k.low=H+oa,k.high=W+_d+(H>>>0<oa>>>0?1:0)},_doFinalize:function(){var f=this._data,p=f.words,h=this._nDataBytes*8,m=f.sigBytes*8;p[m>>>5]|=128<<24-m%32,p[(m+128>>>10<<5)+30]=Math.floor(h/4294967296),p[(m+128>>>10<<5)+31]=h,f.sigBytes=p.length*4,this._process();var y=this._hash.toX32();return y},clone:function(){var f=n.clone.call(this);return f._hash=this._hash.clone(),f},blockSize:1024/32});e.SHA512=n._createHelper(d),e.HmacSHA512=n._createHmacHelper(d)})(),t.SHA512})});var KL=b((i_,JL)=>{(function(t,e,r){typeof i_=="object"?JL.exports=i_=e(We(),Vp(),eT()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./sha512"],e):e(t.CryptoJS)})(i_,function(t){return(function(){var e=t,r=e.x64,n=r.Word,i=r.WordArray,o=e.algo,a=o.SHA512,s=o.SHA384=a.extend({_doReset:function(){this._hash=new i.init([new n.init(3418070365,3238371032),new n.init(1654270250,914150663),new n.init(2438529370,812702999),new n.init(355462360,4144912697),new n.init(1731405415,4290775857),new n.init(2394180231,1750603025),new n.init(3675008525,1694076839),new n.init(1203062813,3204075428)])},_doFinalize:function(){var l=a._doFinalize.call(this);return l.sigBytes-=16,l}});e.SHA384=a._createHelper(s),e.HmacSHA384=a._createHmacHelper(s)})(),t.SHA384})});var XL=b((o_,YL)=>{(function(t,e,r){typeof o_=="object"?YL.exports=o_=e(We(),Vp()):typeof define=="function"&&define.amd?define(["./core","./x64-core"],e):e(t.CryptoJS)})(o_,function(t){return(function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.x64,s=a.Word,l=r.algo,c=[],u=[],d=[];(function(){for(var h=1,m=0,y=0;y<24;y++){c[h+5*m]=(y+1)*(y+2)/2%64;var g=m%5,v=(2*h+3*m)%5;h=g,m=v}for(var h=0;h<5;h++)for(var m=0;m<5;m++)u[h+5*m]=m+(2*h+3*m)%5*5;for(var E=1,x=0;x<24;x++){for(var w=0,k=0,P=0;P<7;P++){if(E&1){var R=(1<<P)-1;R<32?k^=1<<R:w^=1<<R-32}E&128?E=E<<1^113:E<<=1}d[x]=s.create(w,k)}})();var f=[];(function(){for(var h=0;h<25;h++)f[h]=s.create()})();var p=l.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var h=this._state=[],m=0;m<25;m++)h[m]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(h,m){for(var y=this._state,g=this.blockSize/2,v=0;v<g;v++){var E=h[m+2*v],x=h[m+2*v+1];E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,x=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360;var w=y[v];w.high^=x,w.low^=E}for(var k=0;k<24;k++){for(var P=0;P<5;P++){for(var R=0,T=0,D=0;D<5;D++){var w=y[P+5*D];R^=w.high,T^=w.low}var A=f[P];A.high=R,A.low=T}for(var P=0;P<5;P++)for(var M=f[(P+4)%5],U=f[(P+1)%5],z=U.high,X=U.low,R=M.high^(z<<1|X>>>31),T=M.low^(X<<1|z>>>31),D=0;D<5;D++){var w=y[P+5*D];w.high^=R,w.low^=T}for(var K=1;K<25;K++){var R,T,w=y[K],re=w.high,pe=w.low,F=c[K];F<32?(R=re<<F|pe>>>32-F,T=pe<<F|re>>>32-F):(R=pe<<F-32|re>>>64-F,T=re<<F-32|pe>>>64-F);var Z=f[u[K]];Z.high=R,Z.low=T}var W=f[0],H=y[0];W.high=H.high,W.low=H.low;for(var P=0;P<5;P++)for(var D=0;D<5;D++){var K=P+5*D,w=y[K],Et=f[K],_t=f[(P+1)%5+5*D],kt=f[(P+2)%5+5*D];w.high=Et.high^~_t.high&kt.high,w.low=Et.low^~_t.low&kt.low}var w=y[0],Me=d[k];w.high^=Me.high,w.low^=Me.low}},_doFinalize:function(){var h=this._data,m=h.words,y=this._nDataBytes*8,g=h.sigBytes*8,v=this.blockSize*32;m[g>>>5]|=1<<24-g%32,m[(e.ceil((g+1)/v)*v>>>5)-1]|=128,h.sigBytes=m.length*4,this._process();for(var E=this._state,x=this.cfg.outputLength/8,w=x/8,k=[],P=0;P<w;P++){var R=E[P],T=R.high,D=R.low;T=(T<<8|T>>>24)&16711935|(T<<24|T>>>8)&4278255360,D=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,k.push(D),k.push(T)}return new i.init(k,x)},clone:function(){for(var h=o.clone.call(this),m=h._state=this._state.slice(0),y=0;y<25;y++)m[y]=m[y].clone();return h}});r.SHA3=o._createHelper(p),r.HmacSHA3=o._createHmacHelper(p)})(Math),t.SHA3})});var eF=b((a_,QL)=>{(function(t,e){typeof a_=="object"?QL.exports=a_=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(a_,function(t){return(function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,a=r.algo,s=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),u=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),d=i.create([0,1518500249,1859775393,2400959708,2840853838]),f=i.create([1352829926,1548603684,1836072691,2053994217,0]),p=a.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(x,w){for(var k=0;k<16;k++){var P=w+k,R=x[P];x[P]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360}var T=this._hash.words,D=d.words,A=f.words,M=s.words,U=l.words,z=c.words,X=u.words,K,re,pe,F,Z,W,H,Et,_t,kt;W=K=T[0],H=re=T[1],Et=pe=T[2],_t=F=T[3],kt=Z=T[4];for(var Me,k=0;k<80;k+=1)Me=K+x[w+M[k]]|0,k<16?Me+=h(re,pe,F)+D[0]:k<32?Me+=m(re,pe,F)+D[1]:k<48?Me+=y(re,pe,F)+D[2]:k<64?Me+=g(re,pe,F)+D[3]:Me+=v(re,pe,F)+D[4],Me=Me|0,Me=E(Me,z[k]),Me=Me+Z|0,K=Z,Z=F,F=E(pe,10),pe=re,re=Me,Me=W+x[w+U[k]]|0,k<16?Me+=v(H,Et,_t)+A[0]:k<32?Me+=g(H,Et,_t)+A[1]:k<48?Me+=y(H,Et,_t)+A[2]:k<64?Me+=m(H,Et,_t)+A[3]:Me+=h(H,Et,_t)+A[4],Me=Me|0,Me=E(Me,X[k]),Me=Me+kt|0,W=kt,kt=_t,_t=E(Et,10),Et=H,H=Me;Me=T[1]+pe+_t|0,T[1]=T[2]+F+kt|0,T[2]=T[3]+Z+W|0,T[3]=T[4]+K+H|0,T[4]=T[0]+re+Et|0,T[0]=Me},_doFinalize:function(){var x=this._data,w=x.words,k=this._nDataBytes*8,P=x.sigBytes*8;w[P>>>5]|=128<<24-P%32,w[(P+64>>>9<<4)+14]=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,x.sigBytes=(w.length+1)*4,this._process();for(var R=this._hash,T=R.words,D=0;D<5;D++){var A=T[D];T[D]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360}return R},clone:function(){var x=o.clone.call(this);return x._hash=this._hash.clone(),x}});function h(x,w,k){return x^w^k}function m(x,w,k){return x&w|~x&k}function y(x,w,k){return(x|~w)^k}function g(x,w,k){return x&k|w&~k}function v(x,w,k){return x^(w|~k)}function E(x,w){return x<<w|x>>>32-w}r.RIPEMD160=o._createHelper(p),r.HmacRIPEMD160=o._createHmacHelper(p)})(Math),t.RIPEMD160})});var l_=b((s_,tF)=>{(function(t,e){typeof s_=="object"?tF.exports=s_=e(We()):typeof define=="function"&&define.amd?define(["./core"],e):e(t.CryptoJS)})(s_,function(t){(function(){var e=t,r=e.lib,n=r.Base,i=e.enc,o=i.Utf8,a=e.algo,s=a.HMAC=n.extend({init:function(l,c){l=this._hasher=new l.init,typeof c=="string"&&(c=o.parse(c));var u=l.blockSize,d=u*4;c.sigBytes>d&&(c=l.finalize(c)),c.clamp();for(var f=this._oKey=c.clone(),p=this._iKey=c.clone(),h=f.words,m=p.words,y=0;y<u;y++)h[y]^=1549556828,m[y]^=909522486;f.sigBytes=p.sigBytes=d,this.reset()},reset:function(){var l=this._hasher;l.reset(),l.update(this._iKey)},update:function(l){return this._hasher.update(l),this},finalize:function(l){var c=this._hasher,u=c.finalize(l);c.reset();var d=c.finalize(this._oKey.clone().concat(u));return d}})})()})});var nF=b((c_,rF)=>{(function(t,e,r){typeof c_=="object"?rF.exports=c_=e(We(),t_(),l_()):typeof define=="function"&&define.amd?define(["./core","./sha256","./hmac"],e):e(t.CryptoJS)})(c_,function(t){return(function(){var e=t,r=e.lib,n=r.Base,i=r.WordArray,o=e.algo,a=o.SHA256,s=o.HMAC,l=o.PBKDF2=n.extend({cfg:n.extend({keySize:128/32,hasher:a,iterations:25e4}),init:function(c){this.cfg=this.cfg.extend(c)},compute:function(c,u){for(var d=this.cfg,f=s.create(d.hasher,c),p=i.create(),h=i.create([1]),m=p.words,y=h.words,g=d.keySize,v=d.iterations;m.length<g;){var E=f.update(u).finalize(h);f.reset();for(var x=E.words,w=x.length,k=E,P=1;P<v;P++){k=f.finalize(k),f.reset();for(var R=k.words,T=0;T<w;T++)x[T]^=R[T]}p.concat(E),y[0]++}return p.sigBytes=g*4,p}});e.PBKDF2=function(c,u,d){return l.create(d).compute(c,u)}})(),t.PBKDF2})});var Uo=b((u_,iF)=>{(function(t,e,r){typeof u_=="object"?iF.exports=u_=e(We(),QP(),l_()):typeof define=="function"&&define.amd?define(["./core","./sha1","./hmac"],e):e(t.CryptoJS)})(u_,function(t){return(function(){var e=t,r=e.lib,n=r.Base,i=r.WordArray,o=e.algo,a=o.MD5,s=o.EvpKDF=n.extend({cfg:n.extend({keySize:128/32,hasher:a,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,c){for(var u,d=this.cfg,f=d.hasher.create(),p=i.create(),h=p.words,m=d.keySize,y=d.iterations;h.length<m;){u&&f.update(u),u=f.update(l).finalize(c),f.reset();for(var g=1;g<y;g++)u=f.finalize(u),f.reset();p.concat(u)}return p.sigBytes=m*4,p}});e.EvpKDF=function(l,c,u){return s.create(u).compute(l,c)}})(),t.EvpKDF})});var or=b((d_,oF)=>{(function(t,e,r){typeof d_=="object"?oF.exports=d_=e(We(),Uo()):typeof define=="function"&&define.amd?define(["./core","./evpkdf"],e):e(t.CryptoJS)})(d_,function(t){t.lib.Cipher||(function(e){var r=t,n=r.lib,i=n.Base,o=n.WordArray,a=n.BufferedBlockAlgorithm,s=r.enc,l=s.Utf8,c=s.Base64,u=r.algo,d=u.EvpKDF,f=n.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(A,M){return this.create(this._ENC_XFORM_MODE,A,M)},createDecryptor:function(A,M){return this.create(this._DEC_XFORM_MODE,A,M)},init:function(A,M,U){this.cfg=this.cfg.extend(U),this._xformMode=A,this._key=M,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(A){return this._append(A),this._process()},finalize:function(A){A&&this._append(A);var M=this._doFinalize();return M},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function A(M){return typeof M=="string"?D:P}return function(M){return{encrypt:function(U,z,X){return A(z).encrypt(M,U,z,X)},decrypt:function(U,z,X){return A(z).decrypt(M,U,z,X)}}}})()}),p=n.StreamCipher=f.extend({_doFinalize:function(){var A=this._process(!0);return A},blockSize:1}),h=r.mode={},m=n.BlockCipherMode=i.extend({createEncryptor:function(A,M){return this.Encryptor.create(A,M)},createDecryptor:function(A,M){return this.Decryptor.create(A,M)},init:function(A,M){this._cipher=A,this._iv=M}}),y=h.CBC=(function(){var A=m.extend();A.Encryptor=A.extend({processBlock:function(U,z){var X=this._cipher,K=X.blockSize;M.call(this,U,z,K),X.encryptBlock(U,z),this._prevBlock=U.slice(z,z+K)}}),A.Decryptor=A.extend({processBlock:function(U,z){var X=this._cipher,K=X.blockSize,re=U.slice(z,z+K);X.decryptBlock(U,z),M.call(this,U,z,K),this._prevBlock=re}});function M(U,z,X){var K,re=this._iv;re?(K=re,this._iv=e):K=this._prevBlock;for(var pe=0;pe<X;pe++)U[z+pe]^=K[pe]}return A})(),g=r.pad={},v=g.Pkcs7={pad:function(A,M){for(var U=M*4,z=U-A.sigBytes%U,X=z<<24|z<<16|z<<8|z,K=[],re=0;re<z;re+=4)K.push(X);var pe=o.create(K,z);A.concat(pe)},unpad:function(A){var M=A.words[A.sigBytes-1>>>2]&255;A.sigBytes-=M}},E=n.BlockCipher=f.extend({cfg:f.cfg.extend({mode:y,padding:v}),reset:function(){var A;f.reset.call(this);var M=this.cfg,U=M.iv,z=M.mode;this._xformMode==this._ENC_XFORM_MODE?A=z.createEncryptor:(A=z.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==A?this._mode.init(this,U&&U.words):(this._mode=A.call(z,this,U&&U.words),this._mode.__creator=A)},_doProcessBlock:function(A,M){this._mode.processBlock(A,M)},_doFinalize:function(){var A,M=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(M.pad(this._data,this.blockSize),A=this._process(!0)):(A=this._process(!0),M.unpad(A)),A},blockSize:128/32}),x=n.CipherParams=i.extend({init:function(A){this.mixIn(A)},toString:function(A){return(A||this.formatter).stringify(this)}}),w=r.format={},k=w.OpenSSL={stringify:function(A){var M,U=A.ciphertext,z=A.salt;return z?M=o.create([1398893684,1701076831]).concat(z).concat(U):M=U,M.toString(c)},parse:function(A){var M,U=c.parse(A),z=U.words;return z[0]==1398893684&&z[1]==1701076831&&(M=o.create(z.slice(2,4)),z.splice(0,4),U.sigBytes-=16),x.create({ciphertext:U,salt:M})}},P=n.SerializableCipher=i.extend({cfg:i.extend({format:k}),encrypt:function(A,M,U,z){z=this.cfg.extend(z);var X=A.createEncryptor(U,z),K=X.finalize(M),re=X.cfg;return x.create({ciphertext:K,key:U,iv:re.iv,algorithm:A,mode:re.mode,padding:re.padding,blockSize:A.blockSize,formatter:z.format})},decrypt:function(A,M,U,z){z=this.cfg.extend(z),M=this._parse(M,z.format);var X=A.createDecryptor(U,z).finalize(M.ciphertext);return X},_parse:function(A,M){return typeof A=="string"?M.parse(A,this):A}}),R=r.kdf={},T=R.OpenSSL={execute:function(A,M,U,z,X){if(z||(z=o.random(64/8)),X)var K=d.create({keySize:M+U,hasher:X}).compute(A,z);else var K=d.create({keySize:M+U}).compute(A,z);var re=o.create(K.words.slice(M),U*4);return K.sigBytes=M*4,x.create({key:K,iv:re,salt:z})}},D=n.PasswordBasedCipher=P.extend({cfg:P.cfg.extend({kdf:T}),encrypt:function(A,M,U,z){z=this.cfg.extend(z);var X=z.kdf.execute(U,A.keySize,A.ivSize,z.salt,z.hasher);z.iv=X.iv;var K=P.encrypt.call(this,A,M,X.key,z);return K.mixIn(X),K},decrypt:function(A,M,U,z){z=this.cfg.extend(z),M=this._parse(M,z.format);var X=z.kdf.execute(U,A.keySize,A.ivSize,M.salt,z.hasher);z.iv=X.iv;var K=P.decrypt.call(this,A,M,X.key,z);return K}})})()})});var sF=b((f_,aF)=>{(function(t,e,r){typeof f_=="object"?aF.exports=f_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(f_,function(t){return t.mode.CFB=(function(){var e=t.lib.BlockCipherMode.extend();e.Encryptor=e.extend({processBlock:function(n,i){var o=this._cipher,a=o.blockSize;r.call(this,n,i,a,o),this._prevBlock=n.slice(i,i+a)}}),e.Decryptor=e.extend({processBlock:function(n,i){var o=this._cipher,a=o.blockSize,s=n.slice(i,i+a);r.call(this,n,i,a,o),this._prevBlock=s}});function r(n,i,o,a){var s,l=this._iv;l?(s=l.slice(0),this._iv=void 0):s=this._prevBlock,a.encryptBlock(s,0);for(var c=0;c<o;c++)n[i+c]^=s[c]}return e})(),t.mode.CFB})});var cF=b((p_,lF)=>{(function(t,e,r){typeof p_=="object"?lF.exports=p_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(p_,function(t){return t.mode.CTR=(function(){var e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:function(n,i){var o=this._cipher,a=o.blockSize,s=this._iv,l=this._counter;s&&(l=this._counter=s.slice(0),this._iv=void 0);var c=l.slice(0);o.encryptBlock(c,0),l[a-1]=l[a-1]+1|0;for(var u=0;u<a;u++)n[i+u]^=c[u]}});return e.Decryptor=r,e})(),t.mode.CTR})});var dF=b((h_,uF)=>{(function(t,e,r){typeof h_=="object"?uF.exports=h_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(h_,function(t){return t.mode.CTRGladman=(function(){var e=t.lib.BlockCipherMode.extend();function r(o){if((o>>24&255)===255){var a=o>>16&255,s=o>>8&255,l=o&255;a===255?(a=0,s===255?(s=0,l===255?l=0:++l):++s):++a,o=0,o+=a<<16,o+=s<<8,o+=l}else o+=1<<24;return o}function n(o){return(o[0]=r(o[0]))===0&&(o[1]=r(o[1])),o}var i=e.Encryptor=e.extend({processBlock:function(o,a){var s=this._cipher,l=s.blockSize,c=this._iv,u=this._counter;c&&(u=this._counter=c.slice(0),this._iv=void 0),n(u);var d=u.slice(0);s.encryptBlock(d,0);for(var f=0;f<l;f++)o[a+f]^=d[f]}});return e.Decryptor=i,e})(),t.mode.CTRGladman})});var pF=b((m_,fF)=>{(function(t,e,r){typeof m_=="object"?fF.exports=m_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(m_,function(t){return t.mode.OFB=(function(){var e=t.lib.BlockCipherMode.extend(),r=e.Encryptor=e.extend({processBlock:function(n,i){var o=this._cipher,a=o.blockSize,s=this._iv,l=this._keystream;s&&(l=this._keystream=s.slice(0),this._iv=void 0),o.encryptBlock(l,0);for(var c=0;c<a;c++)n[i+c]^=l[c]}});return e.Decryptor=r,e})(),t.mode.OFB})});var mF=b((g_,hF)=>{(function(t,e,r){typeof g_=="object"?hF.exports=g_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(g_,function(t){return t.mode.ECB=(function(){var e=t.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(r,n){this._cipher.encryptBlock(r,n)}}),e.Decryptor=e.extend({processBlock:function(r,n){this._cipher.decryptBlock(r,n)}}),e})(),t.mode.ECB})});var yF=b((y_,gF)=>{(function(t,e,r){typeof y_=="object"?gF.exports=y_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(y_,function(t){return t.pad.AnsiX923={pad:function(e,r){var n=e.sigBytes,i=r*4,o=i-n%i,a=n+o-1;e.clamp(),e.words[a>>>2]|=o<<24-a%4*8,e.sigBytes+=o},unpad:function(e){var r=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=r}},t.pad.Ansix923})});var vF=b((__,_F)=>{(function(t,e,r){typeof __=="object"?_F.exports=__=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(__,function(t){return t.pad.Iso10126={pad:function(e,r){var n=r*4,i=n-e.sigBytes%n;e.concat(t.lib.WordArray.random(i-1)).concat(t.lib.WordArray.create([i<<24],1))},unpad:function(e){var r=e.words[e.sigBytes-1>>>2]&255;e.sigBytes-=r}},t.pad.Iso10126})});var wF=b((v_,bF)=>{(function(t,e,r){typeof v_=="object"?bF.exports=v_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(v_,function(t){return t.pad.Iso97971={pad:function(e,r){e.concat(t.lib.WordArray.create([2147483648],1)),t.pad.ZeroPadding.pad(e,r)},unpad:function(e){t.pad.ZeroPadding.unpad(e),e.sigBytes--}},t.pad.Iso97971})});var SF=b((b_,xF)=>{(function(t,e,r){typeof b_=="object"?xF.exports=b_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(b_,function(t){return t.pad.ZeroPadding={pad:function(e,r){var n=r*4;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){for(var r=e.words,n=e.sigBytes-1,n=e.sigBytes-1;n>=0;n--)if(r[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},t.pad.ZeroPadding})});var IF=b((w_,EF)=>{(function(t,e,r){typeof w_=="object"?EF.exports=w_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(w_,function(t){return t.pad.NoPadding={pad:function(){},unpad:function(){}},t.pad.NoPadding})});var PF=b((x_,$F)=>{(function(t,e,r){typeof x_=="object"?$F.exports=x_=e(We(),or()):typeof define=="function"&&define.amd?define(["./core","./cipher-core"],e):e(t.CryptoJS)})(x_,function(t){return(function(e){var r=t,n=r.lib,i=n.CipherParams,o=r.enc,a=o.Hex,s=r.format,l=s.Hex={stringify:function(c){return c.ciphertext.toString(a)},parse:function(c){var u=a.parse(c);return i.create({ciphertext:u})}}})(),t.format.Hex})});var AF=b((S_,TF)=>{(function(t,e,r){typeof S_=="object"?TF.exports=S_=e(We(),Na(),ja(),Uo(),or()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(S_,function(t){return(function(){var e=t,r=e.lib,n=r.BlockCipher,i=e.algo,o=[],a=[],s=[],l=[],c=[],u=[],d=[],f=[],p=[],h=[];(function(){for(var g=[],v=0;v<256;v++)v<128?g[v]=v<<1:g[v]=v<<1^283;for(var E=0,x=0,v=0;v<256;v++){var w=x^x<<1^x<<2^x<<3^x<<4;w=w>>>8^w&255^99,o[E]=w,a[w]=E;var k=g[E],P=g[k],R=g[P],T=g[w]*257^w*16843008;s[E]=T<<24|T>>>8,l[E]=T<<16|T>>>16,c[E]=T<<8|T>>>24,u[E]=T;var T=R*16843009^P*65537^k*257^E*16843008;d[w]=T<<24|T>>>8,f[w]=T<<16|T>>>16,p[w]=T<<8|T>>>24,h[w]=T,E?(E=k^g[g[g[R^k]]],x^=g[g[x]]):E=x=1}})();var m=[0,1,2,4,8,16,32,64,128,27,54],y=i.AES=n.extend({_doReset:function(){var g;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var v=this._keyPriorReset=this._key,E=v.words,x=v.sigBytes/4,w=this._nRounds=x+6,k=(w+1)*4,P=this._keySchedule=[],R=0;R<k;R++)R<x?P[R]=E[R]:(g=P[R-1],R%x?x>6&&R%x==4&&(g=o[g>>>24]<<24|o[g>>>16&255]<<16|o[g>>>8&255]<<8|o[g&255]):(g=g<<8|g>>>24,g=o[g>>>24]<<24|o[g>>>16&255]<<16|o[g>>>8&255]<<8|o[g&255],g^=m[R/x|0]<<24),P[R]=P[R-x]^g);for(var T=this._invKeySchedule=[],D=0;D<k;D++){var R=k-D;if(D%4)var g=P[R];else var g=P[R-4];D<4||R<=4?T[D]=g:T[D]=d[o[g>>>24]]^f[o[g>>>16&255]]^p[o[g>>>8&255]]^h[o[g&255]]}}},encryptBlock:function(g,v){this._doCryptBlock(g,v,this._keySchedule,s,l,c,u,o)},decryptBlock:function(g,v){var E=g[v+1];g[v+1]=g[v+3],g[v+3]=E,this._doCryptBlock(g,v,this._invKeySchedule,d,f,p,h,a);var E=g[v+1];g[v+1]=g[v+3],g[v+3]=E},_doCryptBlock:function(g,v,E,x,w,k,P,R){for(var T=this._nRounds,D=g[v]^E[0],A=g[v+1]^E[1],M=g[v+2]^E[2],U=g[v+3]^E[3],z=4,X=1;X<T;X++){var K=x[D>>>24]^w[A>>>16&255]^k[M>>>8&255]^P[U&255]^E[z++],re=x[A>>>24]^w[M>>>16&255]^k[U>>>8&255]^P[D&255]^E[z++],pe=x[M>>>24]^w[U>>>16&255]^k[D>>>8&255]^P[A&255]^E[z++],F=x[U>>>24]^w[D>>>16&255]^k[A>>>8&255]^P[M&255]^E[z++];D=K,A=re,M=pe,U=F}var K=(R[D>>>24]<<24|R[A>>>16&255]<<16|R[M>>>8&255]<<8|R[U&255])^E[z++],re=(R[A>>>24]<<24|R[M>>>16&255]<<16|R[U>>>8&255]<<8|R[D&255])^E[z++],pe=(R[M>>>24]<<24|R[U>>>16&255]<<16|R[D>>>8&255]<<8|R[A&255])^E[z++],F=(R[U>>>24]<<24|R[D>>>16&255]<<16|R[A>>>8&255]<<8|R[M&255])^E[z++];g[v]=K,g[v+1]=re,g[v+2]=pe,g[v+3]=F},keySize:256/32});e.AES=n._createHelper(y)})(),t.AES})});var CF=b((E_,kF)=>{(function(t,e,r){typeof E_=="object"?kF.exports=E_=e(We(),Na(),ja(),Uo(),or()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(E_,function(t){return(function(){var e=t,r=e.lib,n=r.WordArray,i=r.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],c=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=o.DES=i.extend({_doReset:function(){for(var m=this._key,y=m.words,g=[],v=0;v<56;v++){var E=a[v]-1;g[v]=y[E>>>5]>>>31-E%32&1}for(var x=this._subKeys=[],w=0;w<16;w++){for(var k=x[w]=[],P=l[w],v=0;v<24;v++)k[v/6|0]|=g[(s[v]-1+P)%28]<<31-v%6,k[4+(v/6|0)]|=g[28+(s[v+24]-1+P)%28]<<31-v%6;k[0]=k[0]<<1|k[0]>>>31;for(var v=1;v<7;v++)k[v]=k[v]>>>(v-1)*4+3;k[7]=k[7]<<5|k[7]>>>27}for(var R=this._invSubKeys=[],v=0;v<16;v++)R[v]=x[15-v]},encryptBlock:function(m,y){this._doCryptBlock(m,y,this._subKeys)},decryptBlock:function(m,y){this._doCryptBlock(m,y,this._invSubKeys)},_doCryptBlock:function(m,y,g){this._lBlock=m[y],this._rBlock=m[y+1],f.call(this,4,252645135),f.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),f.call(this,1,1431655765);for(var v=0;v<16;v++){for(var E=g[v],x=this._lBlock,w=this._rBlock,k=0,P=0;P<8;P++)k|=c[P][((w^E[P])&u[P])>>>0];this._lBlock=w,this._rBlock=x^k}var R=this._lBlock;this._lBlock=this._rBlock,this._rBlock=R,f.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),m[y]=this._lBlock,m[y+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function f(m,y){var g=(this._lBlock>>>m^this._rBlock)&y;this._rBlock^=g,this._lBlock^=g<<m}function p(m,y){var g=(this._rBlock>>>m^this._lBlock)&y;this._lBlock^=g,this._rBlock^=g<<m}e.DES=i._createHelper(d);var h=o.TripleDES=i.extend({_doReset:function(){var m=this._key,y=m.words;if(y.length!==2&&y.length!==4&&y.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var g=y.slice(0,2),v=y.length<4?y.slice(0,2):y.slice(2,4),E=y.length<6?y.slice(0,2):y.slice(4,6);this._des1=d.createEncryptor(n.create(g)),this._des2=d.createEncryptor(n.create(v)),this._des3=d.createEncryptor(n.create(E))},encryptBlock:function(m,y){this._des1.encryptBlock(m,y),this._des2.decryptBlock(m,y),this._des3.encryptBlock(m,y)},decryptBlock:function(m,y){this._des3.decryptBlock(m,y),this._des2.encryptBlock(m,y),this._des1.decryptBlock(m,y)},keySize:192/32,ivSize:64/32,blockSize:64/32});e.TripleDES=i._createHelper(h)})(),t.TripleDES})});var DF=b((I_,RF)=>{(function(t,e,r){typeof I_=="object"?RF.exports=I_=e(We(),Na(),ja(),Uo(),or()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(I_,function(t){return(function(){var e=t,r=e.lib,n=r.StreamCipher,i=e.algo,o=i.RC4=n.extend({_doReset:function(){for(var l=this._key,c=l.words,u=l.sigBytes,d=this._S=[],f=0;f<256;f++)d[f]=f;for(var f=0,p=0;f<256;f++){var h=f%u,m=c[h>>>2]>>>24-h%4*8&255;p=(p+d[f]+m)%256;var y=d[f];d[f]=d[p],d[p]=y}this._i=this._j=0},_doProcessBlock:function(l,c){l[c]^=a.call(this)},keySize:256/32,ivSize:0});function a(){for(var l=this._S,c=this._i,u=this._j,d=0,f=0;f<4;f++){c=(c+1)%256,u=(u+l[c])%256;var p=l[c];l[c]=l[u],l[u]=p,d|=l[(l[c]+l[u])%256]<<24-f*8}return this._i=c,this._j=u,d}e.RC4=n._createHelper(o);var s=i.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var l=this.cfg.drop;l>0;l--)a.call(this)}});e.RC4Drop=n._createHelper(s)})(),t.RC4})});var MF=b(($_,OF)=>{(function(t,e,r){typeof $_=="object"?OF.exports=$_=e(We(),Na(),ja(),Uo(),or()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})($_,function(t){return(function(){var e=t,r=e.lib,n=r.StreamCipher,i=e.algo,o=[],a=[],s=[],l=i.Rabbit=n.extend({_doReset:function(){for(var u=this._key.words,d=this.cfg.iv,f=0;f<4;f++)u[f]=(u[f]<<8|u[f]>>>24)&16711935|(u[f]<<24|u[f]>>>8)&4278255360;var p=this._X=[u[0],u[3]<<16|u[2]>>>16,u[1],u[0]<<16|u[3]>>>16,u[2],u[1]<<16|u[0]>>>16,u[3],u[2]<<16|u[1]>>>16],h=this._C=[u[2]<<16|u[2]>>>16,u[0]&4294901760|u[1]&65535,u[3]<<16|u[3]>>>16,u[1]&4294901760|u[2]&65535,u[0]<<16|u[0]>>>16,u[2]&4294901760|u[3]&65535,u[1]<<16|u[1]>>>16,u[3]&4294901760|u[0]&65535];this._b=0;for(var f=0;f<4;f++)c.call(this);for(var f=0;f<8;f++)h[f]^=p[f+4&7];if(d){var m=d.words,y=m[0],g=m[1],v=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,E=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,x=v>>>16|E&4294901760,w=E<<16|v&65535;h[0]^=v,h[1]^=x,h[2]^=E,h[3]^=w,h[4]^=v,h[5]^=x,h[6]^=E,h[7]^=w;for(var f=0;f<4;f++)c.call(this)}},_doProcessBlock:function(u,d){var f=this._X;c.call(this),o[0]=f[0]^f[5]>>>16^f[3]<<16,o[1]=f[2]^f[7]>>>16^f[5]<<16,o[2]=f[4]^f[1]>>>16^f[7]<<16,o[3]=f[6]^f[3]>>>16^f[1]<<16;for(var p=0;p<4;p++)o[p]=(o[p]<<8|o[p]>>>24)&16711935|(o[p]<<24|o[p]>>>8)&4278255360,u[d+p]^=o[p]},blockSize:128/32,ivSize:64/32});function c(){for(var u=this._X,d=this._C,f=0;f<8;f++)a[f]=d[f];d[0]=d[0]+1295307597+this._b|0,d[1]=d[1]+3545052371+(d[0]>>>0<a[0]>>>0?1:0)|0,d[2]=d[2]+886263092+(d[1]>>>0<a[1]>>>0?1:0)|0,d[3]=d[3]+1295307597+(d[2]>>>0<a[2]>>>0?1:0)|0,d[4]=d[4]+3545052371+(d[3]>>>0<a[3]>>>0?1:0)|0,d[5]=d[5]+886263092+(d[4]>>>0<a[4]>>>0?1:0)|0,d[6]=d[6]+1295307597+(d[5]>>>0<a[5]>>>0?1:0)|0,d[7]=d[7]+3545052371+(d[6]>>>0<a[6]>>>0?1:0)|0,this._b=d[7]>>>0<a[7]>>>0?1:0;for(var f=0;f<8;f++){var p=u[f]+d[f],h=p&65535,m=p>>>16,y=((h*h>>>17)+h*m>>>15)+m*m,g=((p&4294901760)*p|0)+((p&65535)*p|0);s[f]=y^g}u[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,u[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,u[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,u[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,u[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,u[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,u[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,u[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.Rabbit=n._createHelper(l)})(),t.Rabbit})});var jF=b((P_,NF)=>{(function(t,e,r){typeof P_=="object"?NF.exports=P_=e(We(),Na(),ja(),Uo(),or()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(P_,function(t){return(function(){var e=t,r=e.lib,n=r.StreamCipher,i=e.algo,o=[],a=[],s=[],l=i.RabbitLegacy=n.extend({_doReset:function(){var u=this._key.words,d=this.cfg.iv,f=this._X=[u[0],u[3]<<16|u[2]>>>16,u[1],u[0]<<16|u[3]>>>16,u[2],u[1]<<16|u[0]>>>16,u[3],u[2]<<16|u[1]>>>16],p=this._C=[u[2]<<16|u[2]>>>16,u[0]&4294901760|u[1]&65535,u[3]<<16|u[3]>>>16,u[1]&4294901760|u[2]&65535,u[0]<<16|u[0]>>>16,u[2]&4294901760|u[3]&65535,u[1]<<16|u[1]>>>16,u[3]&4294901760|u[0]&65535];this._b=0;for(var h=0;h<4;h++)c.call(this);for(var h=0;h<8;h++)p[h]^=f[h+4&7];if(d){var m=d.words,y=m[0],g=m[1],v=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,E=(g<<8|g>>>24)&16711935|(g<<24|g>>>8)&4278255360,x=v>>>16|E&4294901760,w=E<<16|v&65535;p[0]^=v,p[1]^=x,p[2]^=E,p[3]^=w,p[4]^=v,p[5]^=x,p[6]^=E,p[7]^=w;for(var h=0;h<4;h++)c.call(this)}},_doProcessBlock:function(u,d){var f=this._X;c.call(this),o[0]=f[0]^f[5]>>>16^f[3]<<16,o[1]=f[2]^f[7]>>>16^f[5]<<16,o[2]=f[4]^f[1]>>>16^f[7]<<16,o[3]=f[6]^f[3]>>>16^f[1]<<16;for(var p=0;p<4;p++)o[p]=(o[p]<<8|o[p]>>>24)&16711935|(o[p]<<24|o[p]>>>8)&4278255360,u[d+p]^=o[p]},blockSize:128/32,ivSize:64/32});function c(){for(var u=this._X,d=this._C,f=0;f<8;f++)a[f]=d[f];d[0]=d[0]+1295307597+this._b|0,d[1]=d[1]+3545052371+(d[0]>>>0<a[0]>>>0?1:0)|0,d[2]=d[2]+886263092+(d[1]>>>0<a[1]>>>0?1:0)|0,d[3]=d[3]+1295307597+(d[2]>>>0<a[2]>>>0?1:0)|0,d[4]=d[4]+3545052371+(d[3]>>>0<a[3]>>>0?1:0)|0,d[5]=d[5]+886263092+(d[4]>>>0<a[4]>>>0?1:0)|0,d[6]=d[6]+1295307597+(d[5]>>>0<a[5]>>>0?1:0)|0,d[7]=d[7]+3545052371+(d[6]>>>0<a[6]>>>0?1:0)|0,this._b=d[7]>>>0<a[7]>>>0?1:0;for(var f=0;f<8;f++){var p=u[f]+d[f],h=p&65535,m=p>>>16,y=((h*h>>>17)+h*m>>>15)+m*m,g=((p&4294901760)*p|0)+((p&65535)*p|0);s[f]=y^g}u[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,u[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,u[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,u[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,u[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,u[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,u[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,u[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.RabbitLegacy=n._createHelper(l)})(),t.RabbitLegacy})});var LF=b((T_,zF)=>{(function(t,e,r){typeof T_=="object"?zF.exports=T_=e(We(),Na(),ja(),Uo(),or()):typeof define=="function"&&define.amd?define(["./core","./enc-base64","./md5","./evpkdf","./cipher-core"],e):e(t.CryptoJS)})(T_,function(t){return(function(){var e=t,r=e.lib,n=r.BlockCipher,i=e.algo;let o=16,a=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var l={pbox:[],sbox:[]};function c(h,m){let y=m>>24&255,g=m>>16&255,v=m>>8&255,E=m&255,x=h.sbox[0][y]+h.sbox[1][g];return x=x^h.sbox[2][v],x=x+h.sbox[3][E],x}function u(h,m,y){let g=m,v=y,E;for(let x=0;x<o;++x)g=g^h.pbox[x],v=c(h,g)^v,E=g,g=v,v=E;return E=g,g=v,v=E,v=v^h.pbox[o],g=g^h.pbox[o+1],{left:g,right:v}}function d(h,m,y){let g=m,v=y,E;for(let x=o+1;x>1;--x)g=g^h.pbox[x],v=c(h,g)^v,E=g,g=v,v=E;return E=g,g=v,v=E,v=v^h.pbox[1],g=g^h.pbox[0],{left:g,right:v}}function f(h,m,y){for(let w=0;w<4;w++){h.sbox[w]=[];for(let k=0;k<256;k++)h.sbox[w][k]=s[w][k]}let g=0;for(let w=0;w<o+2;w++)h.pbox[w]=a[w]^m[g],g++,g>=y&&(g=0);let v=0,E=0,x=0;for(let w=0;w<o+2;w+=2)x=u(h,v,E),v=x.left,E=x.right,h.pbox[w]=v,h.pbox[w+1]=E;for(let w=0;w<4;w++)for(let k=0;k<256;k+=2)x=u(h,v,E),v=x.left,E=x.right,h.sbox[w][k]=v,h.sbox[w][k+1]=E;return!0}var p=i.Blowfish=n.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var h=this._keyPriorReset=this._key,m=h.words,y=h.sigBytes/4;f(l,m,y)}},encryptBlock:function(h,m){var y=u(l,h[m],h[m+1]);h[m]=y.left,h[m+1]=y.right},decryptBlock:function(h,m){var y=d(l,h[m],h[m+1]);h[m]=y.left,h[m+1]=y.right},blockSize:64/32,keySize:128/32,ivSize:64/32});e.Blowfish=n._createHelper(p)})(),t.Blowfish})});var tT=b((A_,FF)=>{(function(t,e,r){typeof A_=="object"?FF.exports=A_=e(We(),Vp(),jL(),LL(),Na(),UL(),ja(),QP(),t_(),GL(),eT(),KL(),XL(),eF(),l_(),nF(),Uo(),or(),sF(),cF(),dF(),pF(),mF(),yF(),vF(),wF(),SF(),IF(),PF(),AF(),CF(),DF(),MF(),jF(),LF()):typeof define=="function"&&define.amd?define(["./core","./x64-core","./lib-typedarrays","./enc-utf16","./enc-base64","./enc-base64url","./md5","./sha1","./sha256","./sha224","./sha512","./sha384","./sha3","./ripemd160","./hmac","./pbkdf2","./evpkdf","./cipher-core","./mode-cfb","./mode-ctr","./mode-ctr-gladman","./mode-ofb","./mode-ecb","./pad-ansix923","./pad-iso10126","./pad-iso97971","./pad-zeropadding","./pad-nopadding","./format-hex","./aes","./tripledes","./rc4","./rabbit","./rabbit-legacy","./blowfish"],e):t.CryptoJS=e(t.CryptoJS)})(A_,function(t){return t})});function k_(t){if(!t||typeof t!="object")return t;let{_mac_token:e,_user_id:r,_session_id:n,_project_id:i,_project_path:o,_custom_fields:a,_tag:s,...l}=t;return l}var rT=yi(()=>{"use strict"});import*as iT from"node:path";import*as oT from"node:os";import hu from"node:process";function Vt(t,e){let r=aT.find(o=>o.new===t);if(!r)return hu.env[t]??e;let n=hu.env[r.new],i=hu.env[r.old];return n!==void 0?n:i!==void 0?(BF.has(r.old)||(console.error(`[DEPRECATED] Environment variable "${r.old}" is deprecated. Please use "${r.new}" instead.`),BF.add(r.old)),i):e}function nT(t,e=!1){let r=Vt(t);return r===void 0?e:r==="true"||r==="1"}function UF(t,e=0){let r=Vt(t);if(r===void 0)return e;let n=parseInt(r,10);return isNaN(n)?e:n}function Dpe(){let t=[];for(let e of aT)hu.env[e.old]&&!hu.env[e.new]&&t.push(e.old);return t}function sT(){let t=Dpe();if(t.length>0){console.error(""),console.error("⚠️ DEPRECATION WARNING ⚠️"),console.error("The following environment variables are deprecated:"),console.error("");for(let e of t){let r=aT.find(n=>n.old===e);r&&console.error(` ${e} → ${r.new}`)}console.error(""),console.error("Please update your configuration to use the new variable names."),console.error("Old variables will be removed in a future major version."),console.error("")}}var C_,Y,aT,BF,Dn=yi(()=>{"use strict";C_={production:{apiHost:"agent.tapapis.cn",apiBaseUrl:"https://agent.tapapis.cn",authHost:"accounts.tapapis.cn",qrcodeBaseUrl:"https://www.taptap.cn/tap-qrcode?scene=mcp_auth&code="},rnd:{apiHost:"agent.api.xdrnd.cn",apiBaseUrl:"https://agent.api.xdrnd.cn",authHost:"oauth.api.xdrnd.cn",qrcodeBaseUrl:"https://www-beta.xdrnd.cn/tap-qrcode?scene=mcp_auth&code="}},Y=class{static get macToken(){return Vt("TAPTAP_MCP_MAC_TOKEN")}static get clientId(){return Vt("TAPTAP_MCP_CLIENT_ID")}static get clientSecret(){return Vt("TAPTAP_MCP_CLIENT_SECRET")}static get environment(){return Vt("TAPTAP_MCP_ENV","production")==="rnd"?"rnd":"production"}static get dcCurrentAppBaseUrl(){return Vt("TAPTAP_MCP_DC_CURRENT_APP_BASE_URL")}static get endpoints(){return C_[this.environment]||C_.production}static getEndpoints(e){let r=e||this.environment;return C_[r]||C_.production}static get transport(){let e=Vt("TAPTAP_MCP_TRANSPORT","stdio").toLowerCase();return["stdio","sse","http"].includes(e)?e:"stdio"}static get port(){return UF("TAPTAP_MCP_PORT",3e3)}static get isVerbose(){return nT("TAPTAP_MCP_VERBOSE")}static get rawToolsEnabled(){return nT("TAPTAP_MCP_ENABLE_RAW_TOOLS",!1)}static get cacheDir(){return Vt("TAPTAP_MCP_CACHE_DIR",iT.join(oT.tmpdir(),"taptap-mcp","cache"))}static get tempDir(){return Vt("TAPTAP_MCP_TEMP_DIR",iT.join(oT.tmpdir(),"taptap-mcp","temp"))}static get workspaceRoot(){return Vt("TAPTAP_MCP_WORKSPACE_ROOT",hu.cwd())}static get logRoot(){return Vt("TAPTAP_MCP_LOG_ROOT","/tmp/taptap-mcp/logs")}static get logFileEnabled(){return nT("TAPTAP_MCP_LOG_FILE",!1)}static get logLevel(){if(this.isVerbose)return"debug";let e=Vt("TAPTAP_MCP_LOG_LEVEL","info").toLowerCase();return["emergency","alert","critical","error","warning","notice","info","debug"].includes(e)?e:"info"}static get logMaxDays(){return UF("TAPTAP_MCP_LOG_MAX_DAYS",7)}static get proxyConfig(){return Vt("TAPTAP_MCP_PROXY_CONFIG")}},aT=[{new:"TAPTAP_MCP_MAC_TOKEN",old:"TDS_MCP_MAC_TOKEN",description:"MAC Token"},{new:"TAPTAP_MCP_CLIENT_ID",old:"TDS_MCP_CLIENT_ID",description:"Client ID"},{new:"TAPTAP_MCP_CLIENT_SECRET",old:"TDS_MCP_CLIENT_TOKEN",description:"Client Secret"},{new:"TAPTAP_MCP_ENV",old:"TDS_MCP_ENV",description:"Environment"},{new:"TAPTAP_MCP_TRANSPORT",old:"TDS_MCP_TRANSPORT",description:"Transport Protocol"},{new:"TAPTAP_MCP_PORT",old:"TDS_MCP_PORT",description:"Server Port"},{new:"TAPTAP_MCP_VERBOSE",old:"TDS_MCP_VERBOSE",description:"Verbose Logging"},{new:"TAPTAP_MCP_CACHE_DIR",old:"TDS_MCP_CACHE_DIR",description:"Cache Directory"},{new:"TAPTAP_MCP_TEMP_DIR",old:"TDS_MCP_TEMP_DIR",description:"Temp Directory"},{new:"TAPTAP_MCP_WORKSPACE_ROOT",old:"WORKSPACE_ROOT",description:"Workspace Root"},{new:"TAPTAP_MCP_PROXY_CONFIG",old:"PROXY_CONFIG",description:"Proxy Config"}],BF=new Set});var mu,lT=yi(()=>{"use strict";mu={emergency:0,alert:1,critical:2,error:3,warning:4,notice:5,info:6,debug:7}});import*as ii from"node:fs";import*as Gp from"node:path";import*as qF from"node:crypto";function ZF(t){return qF.createHash("sha256").update(t).digest("hex").substring(0,8)}var R_,HF=yi(()=>{"use strict";lT();R_=class{constructor(e){this.currentDate="";this.writeStream=null;this.initialized=!1;this.initPromise=null;this.config=e}async initialize(){if(!this.initialized)return this.initPromise?this.initPromise:(this.initPromise=this.doInitialize(),this.initPromise)}async doInitialize(){if(!this.config.enabled){this.initialized=!0;return}try{await ii.promises.mkdir(this.config.logDir,{recursive:!0}),await this.cleanupOldLogs(),this.initialized=!0}catch(e){process.stderr.write(`[LogWriter] Failed to initialize log directory: ${e instanceof Error?e.message:String(e)}
|
|
21
21
|
`),this.initialized=!0,this.config.enabled=!1}}getCurrentDate(){return new Date().toISOString().split("T")[0]}getLogFilePath(e){let r=e||this.getCurrentDate();return Gp.join(this.config.logDir,`${this.config.prefix}-${r}.log`)}getWriteStream(){if(!this.config.enabled)return null;let e=this.getCurrentDate();if(e!==this.currentDate){this.writeStream&&(this.writeStream.end(),this.writeStream=null),this.currentDate=e;try{this.writeStream=ii.createWriteStream(this.getLogFilePath(e),{flags:"a",encoding:"utf8"}),this.writeStream.on("error",r=>{process.stderr.write(`[LogWriter] Write stream error: ${r.message}
|
|
22
22
|
`),this.writeStream=null})}catch(r){return process.stderr.write(`[LogWriter] Failed to create write stream: ${r instanceof Error?r.message:String(r)}
|
|
23
23
|
`),null}}return this.writeStream}shouldWriteToFile(e){return this.config.enabled?mu[e]<=mu[this.config.level]:!1}async write(e,r){if(this.initialized||await this.initialize(),process.stderr.write(r),this.shouldWriteToFile(e)){let n=this.getWriteStream();n&&!n.destroyed&&n.write(r)}}writeSync(e,r){if(process.stderr.write(r),this.shouldWriteToFile(e)&&this.initialized&&this.config.enabled)try{let n=this.getLogFilePath(),i=Gp.dirname(n);ii.existsSync(i)||ii.mkdirSync(i,{recursive:!0}),ii.appendFileSync(n,r,"utf8")}catch{}}async cleanupOldLogs(){if(!(this.config.maxDays<=0))try{let e=await ii.promises.readdir(this.config.logDir),r=new Date;r.setDate(r.getDate()-this.config.maxDays);let n=this.config.prefix,i=new RegExp(`^${n}-(\\d{4}-\\d{2}-\\d{2})\\.log$`);for(let o of e){let a=o.match(i);if(a){let[s,l,c]=a[1].split("-"),u=Number(s),d=Number(l),f=Number(c);!Number.isNaN(u)&&!Number.isNaN(d)&&!Number.isNaN(f)&&new Date(u,d-1,f)<r&&(await ii.promises.unlink(Gp.join(this.config.logDir,o)),process.stderr.write(`[LogWriter] Deleted old log: ${o}
|
|
@@ -188,7 +188,7 @@ ${r}
|
|
|
188
188
|
`);let r=Y.macToken,n=r?VF(r,"environment variable"):null;r&&r.trim().length>0&&!n&&(ki.stderr.write(`⚠️ Warning: TAPTAP_MCP_MAC_TOKEN provided but failed to parse
|
|
189
189
|
`),ki.stderr.write(` The token will be ignored and OAuth flow will be used instead.
|
|
190
190
|
|
|
191
|
-
`)),Zo.initialized=!0}static getInstance(){return Zo.instance||(Zo.instance=new Zo),Zo.instance}};Zo.initialized=!1;j_=Zo,ft=class{constructor(e){this.ctx=e}async get(e,r={}){return this.request("GET",e,r)}async post(e,r={}){return this.request("POST",e,r)}async request(e,r,n={}){var x;let i=n.baseUrl||Y.endpoints.apiBaseUrl,o=yT(),a=`${i}${r}`,s=new URL(a).pathname,l=new URLSearchParams;l.append("client_id",o),n.params&&Object.entries(n.params).forEach(([w,
|
|
191
|
+
`)),Zo.initialized=!0}static getInstance(){return Zo.instance||(Zo.instance=new Zo),Zo.instance}};Zo.initialized=!1;j_=Zo,ft=class{constructor(e){this.ctx=e}async get(e,r={}){return this.request("GET",e,r)}async post(e,r={}){return this.request("POST",e,r)}async request(e,r,n={}){var x;let i=n.baseUrl||Y.endpoints.apiBaseUrl,o=yT(),a=`${i}${r}`,s=new URL(a).pathname,l=new URLSearchParams;l.append("client_id",o),n.params&&Object.entries(n.params).forEach(([w,k])=>{l.append(w,k)}),a+="?"+l.toString(),s+="?"+l.toString();let c="",u={"Content-Type":"application/json",...n.headers||{}};if(n.body!==void 0)if(u["Content-Type"]==="application/x-www-form-urlencoded"){let w=new URLSearchParams;n.body&&typeof n.body=="object"&&Object.entries(n.body).forEach(([k,P])=>{P!=null&&w.append(k,String(P))}),c=w.toString()}else c=JSON.stringify(n.body);else(e==="POST"||e==="PUT")&&(c="{}");let d=((x=this.ctx)==null?void 0:x.resolveToken())||null,f=this.generateMacAuthorization(a,e,d);u.Authorization=f;let p=Math.floor(Date.now()/1e3).toString(),h=this.generateRandomString(8);u["X-Tap-Ts"]=p,u["X-Tap-Nonce"]=h;let m=this.getHeadersPart(u),y=YF(e,s,m,c);u["X-Tap-Sign"]=y,await oe.logRequest(e,a,u,c);let g=new AbortController,v=n.timeout||3e4,E=setTimeout(()=>g.abort(),v);try{let w=await fetch(a,{method:e,headers:u,body:c||void 0,signal:g.signal});clearTimeout(E);let k={};if(w.headers.forEach((T,D)=>{k[D]=T}),!w.ok){let T=w.headers.get("content-type"),D=`HTTP ${w.status}: ${w.statusText}`,A=null;if(T!=null&&T.includes("application/json")){let M=await w.json();A=M,D+=` - ${M.message||M.error||JSON.stringify(M)}`;let U=M_(w,M);if(U)throw await oe.logResponse(e,a,w.status,w.statusText,A,!1,k),U}else{let M=await w.text();A=M,D+=` - ${M}`;let U=M_(w,null,M);if(U)throw await oe.logResponse(e,a,w.status,w.statusText,A,!1,k),U}throw await oe.logResponse(e,a,w.status,w.statusText,A,!1,k),new Error(D)}let P=w.headers.get("content-type");if(P!=null&&P.includes("application/json")){let T;if(n.parseJson){let D=await w.text();T=n.parseJson(D)}else T=await w.json();if(await oe.logResponse(e,a,w.status,w.statusText,T,!0,k),T.success===!1)throw new Error(T.message||T.error||"API request failed");return T.data!==void 0?T.data:T}let R=await w.text();return await oe.logResponse(e,a,w.status,w.statusText,R,!0,k),R}catch(w){if(clearTimeout(E),w instanceof Error){if(w.name==="AbortError"){let P=new Error(`Request timeout after ${v}ms`);throw await oe.error(`HTTP Request timeout: ${e} ${a}`,P),P}throw await oe.error(`HTTP Request failed: ${e} ${a}`,w),w}let k=new Error(`Request failed: ${String(w)}`);throw await oe.error(`HTTP Request failed: ${e} ${a}`,k),k}}generateMacAuthorization(e,r,n){if(!n||!uT(n))throw On("TOKEN_MISSING","无法生成MAC授权头:缺少有效的MAC Token",{retryAvailable:!0});let i=new URL(e),o=Math.floor(Date.now()/1e3).toString().padStart(10,"0"),a=this.generateRandomString(16),s=i.hostname,l=i.pathname+i.search,c=i.port||(i.protocol==="https:"?"443":"80"),d=this.buildMacSignatureBase(o,a,r,l,s,c,""),f=vT.default.HmacSHA1(d,n.mac_key);if(!f||f.sigBytes===void 0)throw new Error("HMAC-SHA1 returned undefined or invalid result for MAC authorization");let p=vT.default.enc.Base64.stringify(f);return`MAC id="${n.kid}", ts="${o}", nonce="${a}", mac="${p}"`}buildMacSignatureBase(e,r,n,i,o,a,s){let l=`${e}
|
|
192
192
|
${r}
|
|
193
193
|
${n}
|
|
194
194
|
${i}
|
|
@@ -204,10 +204,10 @@ ${a}
|
|
|
204
204
|
`));n.push(Buffer.from(`\r
|
|
205
205
|
`)),Buffer.isBuffer(i.value)?n.push(i.value):n.push(Buffer.from(i.value)),n.push(Buffer.from(`\r
|
|
206
206
|
`))}return n.push(Buffer.from(`--${r}--\r
|
|
207
|
-
`)),{boundary:r,buffer:Buffer.concat(n)}}async postMultipart(e,r,n={}){var A;let i="POST",a=`${Y.endpoints.apiBaseUrl}${e}`,s=e,l=yT(),c=new URLSearchParams;c.append("client_id",l),n.params&&Object.entries(n.params).forEach(([$,R])=>{c.append($,R)}),a+="?"+c.toString(),s+="?"+c.toString();let{boundary:u,buffer:d}=this.buildMultipartBody(r),f={"Content-Type":`multipart/form-data; boundary=${u}`,"Content-Length":d.length.toString()},p=((A=this.ctx)==null?void 0:A.resolveToken())||null,h=this.generateMacAuthorization(a,i,p);f.Authorization=h;let m=Math.floor(Date.now()/1e3).toString(),y=this.generateRandomString(8);f["X-Tap-Ts"]=m,f["X-Tap-Nonce"]=y;let g=this.getHeadersPart(f),v=QF(i,s,g,d);f["X-Tap-Sign"]=v,await oe.logRequest(i,a,f,`[multipart/form-data, ${r.length} field(s), ${d.length} bytes]`);let E=new AbortController,x=n.timeout||6e4,w=setTimeout(()=>E.abort(),x);try{let $=await fetch(a,{method:i,headers:f,body:d,signal:E.signal});clearTimeout(w);let R={};if($.headers.forEach((k,M)=>{R[M]=k}),!$.ok){let k=$.headers.get("content-type"),M=`HTTP ${$.status}: ${$.statusText}`,U=null;if(k!=null&&k.includes("application/json")){let z=await $.json();U=z,M+=` - ${z.message||z.error||JSON.stringify(z)}`;let X=M_($,z);if(X)throw await oe.logResponse(i,a,$.status,$.statusText,U,!1,R),X}else{let z=await $.text();U=z,M+=` - ${z}`}throw await oe.logResponse(i,a,$.status,$.statusText,U,!1,R),new Error(M)}let T=$.headers.get("content-type");if(T!=null&&T.includes("application/json")){let k=await $.json();if(await oe.logResponse(i,a,$.status,$.statusText,k,!0,R),k.success===!1)throw new Error(k.message||k.error||"API request failed");return k.data!==void 0?k.data:k}let D=await $.text();return await oe.logResponse(i,a,$.status,$.statusText,D,!0,R),D}catch($){if(clearTimeout(w),$ instanceof Error){if($.name==="AbortError"){let T=new Error(`Request timeout after ${x}ms`);throw await oe.error(`HTTP Request timeout: ${i} ${a}`,T),T}throw await oe.error(`HTTP Request failed: ${i} ${a}`,$),$}let R=new Error(`Request failed: ${String($)}`);throw await oe.error(`HTTP Request failed: ${i} ${a}`,R),R}}}});var bT=b((S8e,eB)=>{eB.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var Fa=b(dl=>{var wT,Lpe=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];dl.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};dl.getSymbolTotalCodewords=function(e){return Lpe[e]};dl.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};dl.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');wT=e};dl.isKanjiModeEnabled=function(){return typeof wT<"u"};dl.toSJIS=function(e){return wT(e)}});var z_=b(oi=>{oi.L={bit:1};oi.M={bit:0};oi.Q={bit:3};oi.H={bit:2};function Fpe(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return oi.L;case"m":case"medium":return oi.M;case"q":case"quartile":return oi.Q;case"h":case"high":return oi.H;default:throw new Error("Unknown EC Level: "+t)}}oi.isValid=function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4};oi.from=function(e,r){if(oi.isValid(e))return e;try{return Fpe(e)}catch{return r}}});var nB=b(($8e,rB)=>{function tB(){this.buffer=[],this.length=0}tB.prototype={get:function(t){let e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let r=0;r<e;r++)this.putBit((t>>>e-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){let e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};rB.exports=tB});var oB=b((P8e,iB)=>{function Kp(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}Kp.prototype.set=function(t,e,r,n){let i=t*this.size+e;this.data[i]=r,n&&(this.reservedBit[i]=!0)};Kp.prototype.get=function(t,e){return this.data[t*this.size+e]};Kp.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r};Kp.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};iB.exports=Kp});var aB=b(L_=>{var Bpe=Fa().getSymbolSize;L_.getRowColCoords=function(e){if(e===1)return[];let r=Math.floor(e/7)+2,n=Bpe(e),i=n===145?26:Math.ceil((n-13)/(2*r-2))*2,o=[n-7];for(let a=1;a<r-1;a++)o[a]=o[a-1]-i;return o.push(6),o.reverse()};L_.getPositions=function(e){let r=[],n=L_.getRowColCoords(e),i=n.length;for(let o=0;o<i;o++)for(let a=0;a<i;a++)o===0&&a===0||o===0&&a===i-1||o===i-1&&a===0||r.push([n[o],n[a]]);return r}});var cB=b(lB=>{var Upe=Fa().getSymbolSize,sB=7;lB.getPositions=function(e){let r=Upe(e);return[[0,0],[r-sB,0],[0,r-sB]]}});var uB=b(Dt=>{Dt.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var fl={N1:3,N2:3,N3:40,N4:10};Dt.isValid=function(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7};Dt.from=function(e){return Dt.isValid(e)?parseInt(e,10):void 0};Dt.getPenaltyN1=function(e){let r=e.size,n=0,i=0,o=0,a=null,s=null;for(let l=0;l<r;l++){i=o=0,a=s=null;for(let c=0;c<r;c++){let u=e.get(l,c);u===a?i++:(i>=5&&(n+=fl.N1+(i-5)),a=u,i=1),u=e.get(c,l),u===s?o++:(o>=5&&(n+=fl.N1+(o-5)),s=u,o=1)}i>=5&&(n+=fl.N1+(i-5)),o>=5&&(n+=fl.N1+(o-5))}return n};Dt.getPenaltyN2=function(e){let r=e.size,n=0;for(let i=0;i<r-1;i++)for(let o=0;o<r-1;o++){let a=e.get(i,o)+e.get(i,o+1)+e.get(i+1,o)+e.get(i+1,o+1);(a===4||a===0)&&n++}return n*fl.N2};Dt.getPenaltyN3=function(e){let r=e.size,n=0,i=0,o=0;for(let a=0;a<r;a++){i=o=0;for(let s=0;s<r;s++)i=i<<1&2047|e.get(a,s),s>=10&&(i===1488||i===93)&&n++,o=o<<1&2047|e.get(s,a),s>=10&&(o===1488||o===93)&&n++}return n*fl.N3};Dt.getPenaltyN4=function(e){let r=0,n=e.data.length;for(let o=0;o<n;o++)r+=e.data[o];return Math.abs(Math.ceil(r*100/n/5)-10)*fl.N4};function qpe(t,e,r){switch(t){case Dt.Patterns.PATTERN000:return(e+r)%2===0;case Dt.Patterns.PATTERN001:return e%2===0;case Dt.Patterns.PATTERN010:return r%3===0;case Dt.Patterns.PATTERN011:return(e+r)%3===0;case Dt.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2===0;case Dt.Patterns.PATTERN101:return e*r%2+e*r%3===0;case Dt.Patterns.PATTERN110:return(e*r%2+e*r%3)%2===0;case Dt.Patterns.PATTERN111:return(e*r%3+(e+r)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}Dt.applyMask=function(e,r){let n=r.size;for(let i=0;i<n;i++)for(let o=0;o<n;o++)r.isReserved(o,i)||r.xor(o,i,qpe(e,o,i))};Dt.getBestMask=function(e,r){let n=Object.keys(Dt.Patterns).length,i=0,o=1/0;for(let a=0;a<n;a++){r(a),Dt.applyMask(a,e);let s=Dt.getPenaltyN1(e)+Dt.getPenaltyN2(e)+Dt.getPenaltyN3(e)+Dt.getPenaltyN4(e);Dt.applyMask(a,e),s<o&&(o=s,i=a)}return i}});var ST=b(xT=>{var Ba=z_(),F_=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],B_=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];xT.getBlocksCount=function(e,r){switch(r){case Ba.L:return F_[(e-1)*4+0];case Ba.M:return F_[(e-1)*4+1];case Ba.Q:return F_[(e-1)*4+2];case Ba.H:return F_[(e-1)*4+3];default:return}};xT.getTotalCodewordsCount=function(e,r){switch(r){case Ba.L:return B_[(e-1)*4+0];case Ba.M:return B_[(e-1)*4+1];case Ba.Q:return B_[(e-1)*4+2];case Ba.H:return B_[(e-1)*4+3];default:return}}});var dB=b(q_=>{var Yp=new Uint8Array(512),U_=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)Yp[r]=e,U_[e]=r,e<<=1,e&256&&(e^=285);for(let r=255;r<512;r++)Yp[r]=Yp[r-255]})();q_.log=function(e){if(e<1)throw new Error("log("+e+")");return U_[e]};q_.exp=function(e){return Yp[e]};q_.mul=function(e,r){return e===0||r===0?0:Yp[U_[e]+U_[r]]}});var fB=b(Xp=>{var ET=dB();Xp.mul=function(e,r){let n=new Uint8Array(e.length+r.length-1);for(let i=0;i<e.length;i++)for(let o=0;o<r.length;o++)n[i+o]^=ET.mul(e[i],r[o]);return n};Xp.mod=function(e,r){let n=new Uint8Array(e);for(;n.length-r.length>=0;){let i=n[0];for(let a=0;a<r.length;a++)n[a]^=ET.mul(r[a],i);let o=0;for(;o<n.length&&n[o]===0;)o++;n=n.slice(o)}return n};Xp.generateECPolynomial=function(e){let r=new Uint8Array([1]);for(let n=0;n<e;n++)r=Xp.mul(r,new Uint8Array([1,ET.exp(n)]));return r}});var mB=b((O8e,hB)=>{var pB=fB();function IT(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}IT.prototype.initialize=function(e){this.degree=e,this.genPoly=pB.generateECPolynomial(this.degree)};IT.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");let r=new Uint8Array(e.length+this.degree);r.set(e);let n=pB.mod(r,this.genPoly),i=this.degree-n.length;if(i>0){let o=new Uint8Array(this.degree);return o.set(n,i),o}return n};hB.exports=IT});var $T=b(gB=>{gB.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}});var PT=b(Ho=>{var yB="[0-9]+",Zpe="[A-Z $%*+\\-./:]+",Qp="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Qp=Qp.replace(/u/g,"\\u");var Hpe="(?:(?![A-Z0-9 $%*+\\-./:]|"+Qp+`)(?:.|[\r
|
|
207
|
+
`)),{boundary:r,buffer:Buffer.concat(n)}}async postMultipart(e,r,n={}){var k;let i="POST",a=`${Y.endpoints.apiBaseUrl}${e}`,s=e,l=yT(),c=new URLSearchParams;c.append("client_id",l),n.params&&Object.entries(n.params).forEach(([P,R])=>{c.append(P,R)}),a+="?"+c.toString(),s+="?"+c.toString();let{boundary:u,buffer:d}=this.buildMultipartBody(r),f={"Content-Type":`multipart/form-data; boundary=${u}`,"Content-Length":d.length.toString()},p=((k=this.ctx)==null?void 0:k.resolveToken())||null,h=this.generateMacAuthorization(a,i,p);f.Authorization=h;let m=Math.floor(Date.now()/1e3).toString(),y=this.generateRandomString(8);f["X-Tap-Ts"]=m,f["X-Tap-Nonce"]=y;let g=this.getHeadersPart(f),v=QF(i,s,g,d);f["X-Tap-Sign"]=v,await oe.logRequest(i,a,f,`[multipart/form-data, ${r.length} field(s), ${d.length} bytes]`);let E=new AbortController,x=n.timeout||6e4,w=setTimeout(()=>E.abort(),x);try{let P=await fetch(a,{method:i,headers:f,body:d,signal:E.signal});clearTimeout(w);let R={};if(P.headers.forEach((A,M)=>{R[M]=A}),!P.ok){let A=P.headers.get("content-type"),M=`HTTP ${P.status}: ${P.statusText}`,U=null;if(A!=null&&A.includes("application/json")){let z=await P.json();U=z,M+=` - ${z.message||z.error||JSON.stringify(z)}`;let X=M_(P,z);if(X)throw await oe.logResponse(i,a,P.status,P.statusText,U,!1,R),X}else{let z=await P.text();U=z,M+=` - ${z}`}throw await oe.logResponse(i,a,P.status,P.statusText,U,!1,R),new Error(M)}let T=P.headers.get("content-type");if(T!=null&&T.includes("application/json")){let A=await P.json();if(await oe.logResponse(i,a,P.status,P.statusText,A,!0,R),A.success===!1)throw new Error(A.message||A.error||"API request failed");return A.data!==void 0?A.data:A}let D=await P.text();return await oe.logResponse(i,a,P.status,P.statusText,D,!0,R),D}catch(P){if(clearTimeout(w),P instanceof Error){if(P.name==="AbortError"){let T=new Error(`Request timeout after ${x}ms`);throw await oe.error(`HTTP Request timeout: ${i} ${a}`,T),T}throw await oe.error(`HTTP Request failed: ${i} ${a}`,P),P}let R=new Error(`Request failed: ${String(P)}`);throw await oe.error(`HTTP Request failed: ${i} ${a}`,R),R}}}});var bT=b((S8e,eB)=>{eB.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var Fa=b(dl=>{var wT,Lpe=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];dl.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};dl.getSymbolTotalCodewords=function(e){return Lpe[e]};dl.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};dl.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');wT=e};dl.isKanjiModeEnabled=function(){return typeof wT<"u"};dl.toSJIS=function(e){return wT(e)}});var z_=b(oi=>{oi.L={bit:1};oi.M={bit:0};oi.Q={bit:3};oi.H={bit:2};function Fpe(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return oi.L;case"m":case"medium":return oi.M;case"q":case"quartile":return oi.Q;case"h":case"high":return oi.H;default:throw new Error("Unknown EC Level: "+t)}}oi.isValid=function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4};oi.from=function(e,r){if(oi.isValid(e))return e;try{return Fpe(e)}catch{return r}}});var nB=b(($8e,rB)=>{function tB(){this.buffer=[],this.length=0}tB.prototype={get:function(t){let e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let r=0;r<e;r++)this.putBit((t>>>e-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){let e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};rB.exports=tB});var oB=b((P8e,iB)=>{function Kp(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}Kp.prototype.set=function(t,e,r,n){let i=t*this.size+e;this.data[i]=r,n&&(this.reservedBit[i]=!0)};Kp.prototype.get=function(t,e){return this.data[t*this.size+e]};Kp.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r};Kp.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};iB.exports=Kp});var aB=b(L_=>{var Bpe=Fa().getSymbolSize;L_.getRowColCoords=function(e){if(e===1)return[];let r=Math.floor(e/7)+2,n=Bpe(e),i=n===145?26:Math.ceil((n-13)/(2*r-2))*2,o=[n-7];for(let a=1;a<r-1;a++)o[a]=o[a-1]-i;return o.push(6),o.reverse()};L_.getPositions=function(e){let r=[],n=L_.getRowColCoords(e),i=n.length;for(let o=0;o<i;o++)for(let a=0;a<i;a++)o===0&&a===0||o===0&&a===i-1||o===i-1&&a===0||r.push([n[o],n[a]]);return r}});var cB=b(lB=>{var Upe=Fa().getSymbolSize,sB=7;lB.getPositions=function(e){let r=Upe(e);return[[0,0],[r-sB,0],[0,r-sB]]}});var uB=b(Dt=>{Dt.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var fl={N1:3,N2:3,N3:40,N4:10};Dt.isValid=function(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7};Dt.from=function(e){return Dt.isValid(e)?parseInt(e,10):void 0};Dt.getPenaltyN1=function(e){let r=e.size,n=0,i=0,o=0,a=null,s=null;for(let l=0;l<r;l++){i=o=0,a=s=null;for(let c=0;c<r;c++){let u=e.get(l,c);u===a?i++:(i>=5&&(n+=fl.N1+(i-5)),a=u,i=1),u=e.get(c,l),u===s?o++:(o>=5&&(n+=fl.N1+(o-5)),s=u,o=1)}i>=5&&(n+=fl.N1+(i-5)),o>=5&&(n+=fl.N1+(o-5))}return n};Dt.getPenaltyN2=function(e){let r=e.size,n=0;for(let i=0;i<r-1;i++)for(let o=0;o<r-1;o++){let a=e.get(i,o)+e.get(i,o+1)+e.get(i+1,o)+e.get(i+1,o+1);(a===4||a===0)&&n++}return n*fl.N2};Dt.getPenaltyN3=function(e){let r=e.size,n=0,i=0,o=0;for(let a=0;a<r;a++){i=o=0;for(let s=0;s<r;s++)i=i<<1&2047|e.get(a,s),s>=10&&(i===1488||i===93)&&n++,o=o<<1&2047|e.get(s,a),s>=10&&(o===1488||o===93)&&n++}return n*fl.N3};Dt.getPenaltyN4=function(e){let r=0,n=e.data.length;for(let o=0;o<n;o++)r+=e.data[o];return Math.abs(Math.ceil(r*100/n/5)-10)*fl.N4};function qpe(t,e,r){switch(t){case Dt.Patterns.PATTERN000:return(e+r)%2===0;case Dt.Patterns.PATTERN001:return e%2===0;case Dt.Patterns.PATTERN010:return r%3===0;case Dt.Patterns.PATTERN011:return(e+r)%3===0;case Dt.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2===0;case Dt.Patterns.PATTERN101:return e*r%2+e*r%3===0;case Dt.Patterns.PATTERN110:return(e*r%2+e*r%3)%2===0;case Dt.Patterns.PATTERN111:return(e*r%3+(e+r)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}Dt.applyMask=function(e,r){let n=r.size;for(let i=0;i<n;i++)for(let o=0;o<n;o++)r.isReserved(o,i)||r.xor(o,i,qpe(e,o,i))};Dt.getBestMask=function(e,r){let n=Object.keys(Dt.Patterns).length,i=0,o=1/0;for(let a=0;a<n;a++){r(a),Dt.applyMask(a,e);let s=Dt.getPenaltyN1(e)+Dt.getPenaltyN2(e)+Dt.getPenaltyN3(e)+Dt.getPenaltyN4(e);Dt.applyMask(a,e),s<o&&(o=s,i=a)}return i}});var ST=b(xT=>{var Ba=z_(),F_=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],B_=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];xT.getBlocksCount=function(e,r){switch(r){case Ba.L:return F_[(e-1)*4+0];case Ba.M:return F_[(e-1)*4+1];case Ba.Q:return F_[(e-1)*4+2];case Ba.H:return F_[(e-1)*4+3];default:return}};xT.getTotalCodewordsCount=function(e,r){switch(r){case Ba.L:return B_[(e-1)*4+0];case Ba.M:return B_[(e-1)*4+1];case Ba.Q:return B_[(e-1)*4+2];case Ba.H:return B_[(e-1)*4+3];default:return}}});var dB=b(q_=>{var Yp=new Uint8Array(512),U_=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)Yp[r]=e,U_[e]=r,e<<=1,e&256&&(e^=285);for(let r=255;r<512;r++)Yp[r]=Yp[r-255]})();q_.log=function(e){if(e<1)throw new Error("log("+e+")");return U_[e]};q_.exp=function(e){return Yp[e]};q_.mul=function(e,r){return e===0||r===0?0:Yp[U_[e]+U_[r]]}});var fB=b(Xp=>{var ET=dB();Xp.mul=function(e,r){let n=new Uint8Array(e.length+r.length-1);for(let i=0;i<e.length;i++)for(let o=0;o<r.length;o++)n[i+o]^=ET.mul(e[i],r[o]);return n};Xp.mod=function(e,r){let n=new Uint8Array(e);for(;n.length-r.length>=0;){let i=n[0];for(let a=0;a<r.length;a++)n[a]^=ET.mul(r[a],i);let o=0;for(;o<n.length&&n[o]===0;)o++;n=n.slice(o)}return n};Xp.generateECPolynomial=function(e){let r=new Uint8Array([1]);for(let n=0;n<e;n++)r=Xp.mul(r,new Uint8Array([1,ET.exp(n)]));return r}});var mB=b((O8e,hB)=>{var pB=fB();function IT(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}IT.prototype.initialize=function(e){this.degree=e,this.genPoly=pB.generateECPolynomial(this.degree)};IT.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");let r=new Uint8Array(e.length+this.degree);r.set(e);let n=pB.mod(r,this.genPoly),i=this.degree-n.length;if(i>0){let o=new Uint8Array(this.degree);return o.set(n,i),o}return n};hB.exports=IT});var $T=b(gB=>{gB.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}});var PT=b(Ho=>{var yB="[0-9]+",Zpe="[A-Z $%*+\\-./:]+",Qp="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Qp=Qp.replace(/u/g,"\\u");var Hpe="(?:(?![A-Z0-9 $%*+\\-./:]|"+Qp+`)(?:.|[\r
|
|
208
208
|
]))+`;Ho.KANJI=new RegExp(Qp,"g");Ho.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");Ho.BYTE=new RegExp(Hpe,"g");Ho.NUMERIC=new RegExp(yB,"g");Ho.ALPHANUMERIC=new RegExp(Zpe,"g");var Vpe=new RegExp("^"+Qp+"$"),Gpe=new RegExp("^"+yB+"$"),Wpe=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");Ho.testKanji=function(e){return Vpe.test(e)};Ho.testNumeric=function(e){return Gpe.test(e)};Ho.testAlphanumeric=function(e){return Wpe.test(e)}});var Ua=b(tr=>{var Jpe=$T(),TT=PT();tr.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};tr.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};tr.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};tr.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};tr.MIXED={bit:-1};tr.getCharCountIndicator=function(e,r){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!Jpe.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?e.ccBits[0]:r<27?e.ccBits[1]:e.ccBits[2]};tr.getBestModeForData=function(e){return TT.testNumeric(e)?tr.NUMERIC:TT.testAlphanumeric(e)?tr.ALPHANUMERIC:TT.testKanji(e)?tr.KANJI:tr.BYTE};tr.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")};tr.isValid=function(e){return e&&e.bit&&e.ccBits};function Kpe(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return tr.NUMERIC;case"alphanumeric":return tr.ALPHANUMERIC;case"kanji":return tr.KANJI;case"byte":return tr.BYTE;default:throw new Error("Unknown mode: "+t)}}tr.from=function(e,r){if(tr.isValid(e))return e;try{return Kpe(e)}catch{return r}}});var xB=b(pl=>{var Z_=Fa(),Ype=ST(),_B=z_(),qa=Ua(),AT=$T(),bB=7973,vB=Z_.getBCHDigit(bB);function Xpe(t,e,r){for(let n=1;n<=40;n++)if(e<=pl.getCapacity(n,r,t))return n}function wB(t,e){return qa.getCharCountIndicator(t,e)+4}function Qpe(t,e){let r=0;return t.forEach(function(n){let i=wB(n.mode,e);r+=i+n.getBitsLength()}),r}function ehe(t,e){for(let r=1;r<=40;r++)if(Qpe(t,r)<=pl.getCapacity(r,e,qa.MIXED))return r}pl.from=function(e,r){return AT.isValid(e)?parseInt(e,10):r};pl.getCapacity=function(e,r,n){if(!AT.isValid(e))throw new Error("Invalid QR Code version");typeof n>"u"&&(n=qa.BYTE);let i=Z_.getSymbolTotalCodewords(e),o=Ype.getTotalCodewordsCount(e,r),a=(i-o)*8;if(n===qa.MIXED)return a;let s=a-wB(n,e);switch(n){case qa.NUMERIC:return Math.floor(s/10*3);case qa.ALPHANUMERIC:return Math.floor(s/11*2);case qa.KANJI:return Math.floor(s/13);case qa.BYTE:default:return Math.floor(s/8)}};pl.getBestVersionForData=function(e,r){let n,i=_B.from(r,_B.M);if(Array.isArray(e)){if(e.length>1)return ehe(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return Xpe(n.mode,n.getLength(),i)};pl.getEncodedBits=function(e){if(!AT.isValid(e)||e<7)throw new Error("Invalid QR Code version");let r=e<<12;for(;Z_.getBCHDigit(r)-vB>=0;)r^=bB<<Z_.getBCHDigit(r)-vB;return e<<12|r}});var $B=b(IB=>{var kT=Fa(),EB=1335,the=21522,SB=kT.getBCHDigit(EB);IB.getEncodedBits=function(e,r){let n=e.bit<<3|r,i=n<<10;for(;kT.getBCHDigit(i)-SB>=0;)i^=EB<<kT.getBCHDigit(i)-SB;return(n<<10|i)^the}});var TB=b((F8e,PB)=>{var rhe=Ua();function gu(t){this.mode=rhe.NUMERIC,this.data=t.toString()}gu.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};gu.prototype.getLength=function(){return this.data.length};gu.prototype.getBitsLength=function(){return gu.getBitsLength(this.data.length)};gu.prototype.write=function(e){let r,n,i;for(r=0;r+3<=this.data.length;r+=3)n=this.data.substr(r,3),i=parseInt(n,10),e.put(i,10);let o=this.data.length-r;o>0&&(n=this.data.substr(r),i=parseInt(n,10),e.put(i,o*3+1))};PB.exports=gu});var kB=b((B8e,AB)=>{var nhe=Ua(),CT=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function yu(t){this.mode=nhe.ALPHANUMERIC,this.data=t}yu.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};yu.prototype.getLength=function(){return this.data.length};yu.prototype.getBitsLength=function(){return yu.getBitsLength(this.data.length)};yu.prototype.write=function(e){let r;for(r=0;r+2<=this.data.length;r+=2){let n=CT.indexOf(this.data[r])*45;n+=CT.indexOf(this.data[r+1]),e.put(n,11)}this.data.length%2&&e.put(CT.indexOf(this.data[r]),6)};AB.exports=yu});var RB=b((U8e,CB)=>{var ihe=Ua();function _u(t){this.mode=ihe.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}_u.getBitsLength=function(e){return e*8};_u.prototype.getLength=function(){return this.data.length};_u.prototype.getBitsLength=function(){return _u.getBitsLength(this.data.length)};_u.prototype.write=function(t){for(let e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)};CB.exports=_u});var OB=b((q8e,DB)=>{var ohe=Ua(),ahe=Fa();function vu(t){this.mode=ohe.KANJI,this.data=t}vu.getBitsLength=function(e){return e*13};vu.prototype.getLength=function(){return this.data.length};vu.prototype.getBitsLength=function(){return vu.getBitsLength(this.data.length)};vu.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let r=ahe.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
|
|
209
209
|
Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),t.put(r,13)}};DB.exports=vu});var MB=b((Z8e,RT)=>{"use strict";var eh={single_source_shortest_paths:function(t,e,r){var n={},i={};i[e]=0;var o=eh.PriorityQueue.make();o.push(e,0);for(var a,s,l,c,u,d,f,p,h;!o.empty();){a=o.pop(),s=a.value,c=a.cost,u=t[s]||{};for(l in u)u.hasOwnProperty(l)&&(d=u[l],f=c+d,p=i[l],h=typeof i[l]>"u",(h||p>f)&&(i[l]=f,o.push(l,f),n[l]=s))}if(typeof r<"u"&&typeof i[r]>"u"){var m=["Could not find a path from ",e," to ",r,"."].join("");throw new Error(m)}return n},extract_shortest_path_from_predecessor_list:function(t,e){for(var r=[],n=e,i;n;)r.push(n),i=t[n],n=t[n];return r.reverse(),r},find_path:function(t,e,r){var n=eh.single_source_shortest_paths(t,e,r);return eh.extract_shortest_path_from_predecessor_list(n,r)},PriorityQueue:{make:function(t){var e=eh.PriorityQueue,r={},n;t=t||{};for(n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return r.queue=[],r.sorter=t.sorter||e.default_sorter,r},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var r={value:t,cost:e};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof RT<"u"&&(RT.exports=eh)});var qB=b(bu=>{var gt=Ua(),zB=TB(),LB=kB(),FB=RB(),BB=OB(),th=PT(),H_=Fa(),she=MB();function NB(t){return unescape(encodeURIComponent(t)).length}function rh(t,e,r){let n=[],i;for(;(i=t.exec(r))!==null;)n.push({data:i[0],index:i.index,mode:e,length:i[0].length});return n}function UB(t){let e=rh(th.NUMERIC,gt.NUMERIC,t),r=rh(th.ALPHANUMERIC,gt.ALPHANUMERIC,t),n,i;return H_.isKanjiModeEnabled()?(n=rh(th.BYTE,gt.BYTE,t),i=rh(th.KANJI,gt.KANJI,t)):(n=rh(th.BYTE_KANJI,gt.BYTE,t),i=[]),e.concat(r,n,i).sort(function(a,s){return a.index-s.index}).map(function(a){return{data:a.data,mode:a.mode,length:a.length}})}function DT(t,e){switch(e){case gt.NUMERIC:return zB.getBitsLength(t);case gt.ALPHANUMERIC:return LB.getBitsLength(t);case gt.KANJI:return BB.getBitsLength(t);case gt.BYTE:return FB.getBitsLength(t)}}function lhe(t){return t.reduce(function(e,r){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===r.mode?(e[e.length-1].data+=r.data,e):(e.push(r),e)},[])}function che(t){let e=[];for(let r=0;r<t.length;r++){let n=t[r];switch(n.mode){case gt.NUMERIC:e.push([n,{data:n.data,mode:gt.ALPHANUMERIC,length:n.length},{data:n.data,mode:gt.BYTE,length:n.length}]);break;case gt.ALPHANUMERIC:e.push([n,{data:n.data,mode:gt.BYTE,length:n.length}]);break;case gt.KANJI:e.push([n,{data:n.data,mode:gt.BYTE,length:NB(n.data)}]);break;case gt.BYTE:e.push([{data:n.data,mode:gt.BYTE,length:NB(n.data)}])}}return e}function uhe(t,e){let r={},n={start:{}},i=["start"];for(let o=0;o<t.length;o++){let a=t[o],s=[];for(let l=0;l<a.length;l++){let c=a[l],u=""+o+l;s.push(u),r[u]={node:c,lastCount:0},n[u]={};for(let d=0;d<i.length;d++){let f=i[d];r[f]&&r[f].node.mode===c.mode?(n[f][u]=DT(r[f].lastCount+c.length,c.mode)-DT(r[f].lastCount,c.mode),r[f].lastCount+=c.length):(r[f]&&(r[f].lastCount=c.length),n[f][u]=DT(c.length,c.mode)+4+gt.getCharCountIndicator(c.mode,e))}}i=s}for(let o=0;o<i.length;o++)n[i[o]].end=0;return{map:n,table:r}}function jB(t,e){let r,n=gt.getBestModeForData(t);if(r=gt.from(e,n),r!==gt.BYTE&&r.bit<n.bit)throw new Error('"'+t+'" cannot be encoded with mode '+gt.toString(r)+`.
|
|
210
|
-
Suggested mode is: `+gt.toString(n));switch(r===gt.KANJI&&!H_.isKanjiModeEnabled()&&(r=gt.BYTE),r){case gt.NUMERIC:return new zB(t);case gt.ALPHANUMERIC:return new LB(t);case gt.KANJI:return new BB(t);case gt.BYTE:return new FB(t)}}bu.fromArray=function(e){return e.reduce(function(r,n){return typeof n=="string"?r.push(jB(n,null)):n.data&&r.push(jB(n.data,n.mode)),r},[])};bu.fromString=function(e,r){let n=UB(e,H_.isKanjiModeEnabled()),i=che(n),o=uhe(i,r),a=she.find_path(o.map,"start","end"),s=[];for(let l=1;l<a.length-1;l++)s.push(o.table[a[l]].node);return bu.fromArray(lhe(s))};bu.rawSplit=function(e){return bu.fromArray(UB(e,H_.isKanjiModeEnabled()))}});var LT=b(ZB=>{var G_=Fa(),OT=z_(),dhe=nB(),fhe=oB(),phe=aB(),hhe=cB(),jT=uB(),zT=ST(),mhe=mB(),V_=xB(),ghe=$B(),yhe=Ua(),MT=qB();function _he(t,e){let r=t.size,n=hhe.getPositions(e);for(let i=0;i<n.length;i++){let o=n[i][0],a=n[i][1];for(let s=-1;s<=7;s++)if(!(o+s<=-1||r<=o+s))for(let l=-1;l<=7;l++)a+l<=-1||r<=a+l||(s>=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?t.set(o+s,a+l,!0,!0):t.set(o+s,a+l,!1,!0))}}function vhe(t){let e=t.size;for(let r=8;r<e-8;r++){let n=r%2===0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}function bhe(t,e){let r=phe.getPositions(e);for(let n=0;n<r.length;n++){let i=r[n][0],o=r[n][1];for(let a=-2;a<=2;a++)for(let s=-2;s<=2;s++)a===-2||a===2||s===-2||s===2||a===0&&s===0?t.set(i+a,o+s,!0,!0):t.set(i+a,o+s,!1,!0)}}function whe(t,e){let r=t.size,n=V_.getEncodedBits(e),i,o,a;for(let s=0;s<18;s++)i=Math.floor(s/3),o=s%3+r-8-3,a=(n>>s&1)===1,t.set(i,o,a,!0),t.set(o,i,a,!0)}function NT(t,e,r){let n=t.size,i=ghe.getEncodedBits(e,r),o,a;for(o=0;o<15;o++)a=(i>>o&1)===1,o<6?t.set(o,8,a,!0):o<8?t.set(o+1,8,a,!0):t.set(n-15+o,8,a,!0),o<8?t.set(8,n-o-1,a,!0):o<9?t.set(8,15-o-1+1,a,!0):t.set(8,15-o-1,a,!0);t.set(n-8,8,1,!0)}function xhe(t,e){let r=t.size,n=-1,i=r-1,o=7,a=0;for(let s=r-1;s>0;s-=2)for(s===6&&s--;;){for(let l=0;l<2;l++)if(!t.isReserved(i,s-l)){let c=!1;a<e.length&&(c=(e[a]>>>o&1)===1),t.set(i,s-l,c),o--,o===-1&&(a++,o=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}function She(t,e,r){let n=new dhe;r.forEach(function(l){n.put(l.mode.bit,4),n.put(l.getLength(),yhe.getCharCountIndicator(l.mode,t)),l.write(n)});let i=G_.getSymbolTotalCodewords(t),o=zT.getTotalCodewordsCount(t,e),a=(i-o)*8;for(n.getLengthInBits()+4<=a&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);let s=(a-n.getLengthInBits())/8;for(let l=0;l<s;l++)n.put(l%2?17:236,8);return Ehe(n,t,e)}function Ehe(t,e,r){let n=G_.getSymbolTotalCodewords(e),i=zT.getTotalCodewordsCount(e,r),o=n-i,a=zT.getBlocksCount(e,r),s=n%a,l=a-s,c=Math.floor(n/a),u=Math.floor(o/a),d=u+1,f=c-u,p=new mhe(f),h=0,m=new Array(a),y=new Array(a),g=0,v=new Uint8Array(t.buffer);for(let
|
|
210
|
+
Suggested mode is: `+gt.toString(n));switch(r===gt.KANJI&&!H_.isKanjiModeEnabled()&&(r=gt.BYTE),r){case gt.NUMERIC:return new zB(t);case gt.ALPHANUMERIC:return new LB(t);case gt.KANJI:return new BB(t);case gt.BYTE:return new FB(t)}}bu.fromArray=function(e){return e.reduce(function(r,n){return typeof n=="string"?r.push(jB(n,null)):n.data&&r.push(jB(n.data,n.mode)),r},[])};bu.fromString=function(e,r){let n=UB(e,H_.isKanjiModeEnabled()),i=che(n),o=uhe(i,r),a=she.find_path(o.map,"start","end"),s=[];for(let l=1;l<a.length-1;l++)s.push(o.table[a[l]].node);return bu.fromArray(lhe(s))};bu.rawSplit=function(e){return bu.fromArray(UB(e,H_.isKanjiModeEnabled()))}});var LT=b(ZB=>{var G_=Fa(),OT=z_(),dhe=nB(),fhe=oB(),phe=aB(),hhe=cB(),jT=uB(),zT=ST(),mhe=mB(),V_=xB(),ghe=$B(),yhe=Ua(),MT=qB();function _he(t,e){let r=t.size,n=hhe.getPositions(e);for(let i=0;i<n.length;i++){let o=n[i][0],a=n[i][1];for(let s=-1;s<=7;s++)if(!(o+s<=-1||r<=o+s))for(let l=-1;l<=7;l++)a+l<=-1||r<=a+l||(s>=0&&s<=6&&(l===0||l===6)||l>=0&&l<=6&&(s===0||s===6)||s>=2&&s<=4&&l>=2&&l<=4?t.set(o+s,a+l,!0,!0):t.set(o+s,a+l,!1,!0))}}function vhe(t){let e=t.size;for(let r=8;r<e-8;r++){let n=r%2===0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}function bhe(t,e){let r=phe.getPositions(e);for(let n=0;n<r.length;n++){let i=r[n][0],o=r[n][1];for(let a=-2;a<=2;a++)for(let s=-2;s<=2;s++)a===-2||a===2||s===-2||s===2||a===0&&s===0?t.set(i+a,o+s,!0,!0):t.set(i+a,o+s,!1,!0)}}function whe(t,e){let r=t.size,n=V_.getEncodedBits(e),i,o,a;for(let s=0;s<18;s++)i=Math.floor(s/3),o=s%3+r-8-3,a=(n>>s&1)===1,t.set(i,o,a,!0),t.set(o,i,a,!0)}function NT(t,e,r){let n=t.size,i=ghe.getEncodedBits(e,r),o,a;for(o=0;o<15;o++)a=(i>>o&1)===1,o<6?t.set(o,8,a,!0):o<8?t.set(o+1,8,a,!0):t.set(n-15+o,8,a,!0),o<8?t.set(8,n-o-1,a,!0):o<9?t.set(8,15-o-1+1,a,!0):t.set(8,15-o-1,a,!0);t.set(n-8,8,1,!0)}function xhe(t,e){let r=t.size,n=-1,i=r-1,o=7,a=0;for(let s=r-1;s>0;s-=2)for(s===6&&s--;;){for(let l=0;l<2;l++)if(!t.isReserved(i,s-l)){let c=!1;a<e.length&&(c=(e[a]>>>o&1)===1),t.set(i,s-l,c),o--,o===-1&&(a++,o=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}function She(t,e,r){let n=new dhe;r.forEach(function(l){n.put(l.mode.bit,4),n.put(l.getLength(),yhe.getCharCountIndicator(l.mode,t)),l.write(n)});let i=G_.getSymbolTotalCodewords(t),o=zT.getTotalCodewordsCount(t,e),a=(i-o)*8;for(n.getLengthInBits()+4<=a&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);let s=(a-n.getLengthInBits())/8;for(let l=0;l<s;l++)n.put(l%2?17:236,8);return Ehe(n,t,e)}function Ehe(t,e,r){let n=G_.getSymbolTotalCodewords(e),i=zT.getTotalCodewordsCount(e,r),o=n-i,a=zT.getBlocksCount(e,r),s=n%a,l=a-s,c=Math.floor(n/a),u=Math.floor(o/a),d=u+1,f=c-u,p=new mhe(f),h=0,m=new Array(a),y=new Array(a),g=0,v=new Uint8Array(t.buffer);for(let P=0;P<a;P++){let R=P<l?u:d;m[P]=v.slice(h,h+R),y[P]=p.encode(m[P]),h+=R,g=Math.max(g,R)}let E=new Uint8Array(n),x=0,w,k;for(w=0;w<g;w++)for(k=0;k<a;k++)w<m[k].length&&(E[x++]=m[k][w]);for(w=0;w<f;w++)for(k=0;k<a;k++)E[x++]=y[k][w];return E}function Ihe(t,e,r,n){let i;if(Array.isArray(t))i=MT.fromArray(t);else if(typeof t=="string"){let c=e;if(!c){let u=MT.rawSplit(t);c=V_.getBestVersionForData(u,r)}i=MT.fromString(t,c||40)}else throw new Error("Invalid data");let o=V_.getBestVersionForData(i,r);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=o;else if(e<o)throw new Error(`
|
|
211
211
|
The chosen QR Code version cannot contain this amount of data.
|
|
212
212
|
Minimum version required to store current data is: `+o+`.
|
|
213
213
|
`);let a=She(e,r,i),s=G_.getSymbolSize(e),l=new fhe(s);return _he(l,e),vhe(l),bhe(l,e),NT(l,r,0),e>=7&&whe(l,e),xhe(l,a),isNaN(n)&&(n=jT.getBestMask(l,NT.bind(null,l,r))),jT.applyMask(n,l),NT(l,r,n),{modules:l,version:e,errorCorrectionLevel:r,maskPattern:n,segments:i}}ZB.create=function(e,r){if(typeof e>"u"||e==="")throw new Error("No input text");let n=OT.M,i,o;return typeof r<"u"&&(n=OT.from(r.errorCorrectionLevel,OT.M),i=V_.from(r.version),o=jT.from(r.maskPattern),r.toSJISFunc&&G_.setToSJISFunction(r.toSJISFunc)),Ihe(e,i,n,o)}});var FT=b((G8e,VB)=>{"use strict";var $he=Q("util"),HB=Q("stream"),Ci=VB.exports=function(){HB.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};$he.inherits(Ci,HB);Ci.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e}),process.nextTick(function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}.bind(this))};Ci.prototype.write=function(t,e){if(!this.writable)return this.emit("error",new Error("Stream not writable")),!1;let r;return Buffer.isBuffer(t)?r=t:r=Buffer.from(t,e||this._encoding),this._buffers.push(r),this._buffered+=r.length,this._process(),this._reads&&this._reads.length===0&&(this._paused=!0),this.writable&&!this._paused};Ci.prototype.end=function(t,e){t&&this.write(t,e),this.writable=!1,this._buffers&&(this._buffers.length===0?this._end():(this._buffers.push(null),this._process()))};Ci.prototype.destroySoon=Ci.prototype.end;Ci.prototype._end=function(){this._reads.length>0&&this.emit("error",new Error("Unexpected end of input")),this.destroy()};Ci.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))};Ci.prototype._processReadAllowingLess=function(t){this._reads.shift();let e=this._buffers[0];e.length>t.length?(this._buffered-=t.length,this._buffers[0]=e.slice(t.length),t.func.call(this,e.slice(0,t.length))):(this._buffered-=e.length,this._buffers.shift(),t.func.call(this,e))};Ci.prototype._processRead=function(t){this._reads.shift();let e=0,r=0,n=Buffer.alloc(t.length);for(;e<t.length;){let i=this._buffers[r++],o=Math.min(i.length,t.length-e);i.copy(n,e,0,o),e+=o,o!==i.length&&(this._buffers[--r]=i.slice(o))}r>0&&this._buffers.splice(0,r),this._buffered-=t.length,t.func.call(this,n)};Ci.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let t=this._reads[0];if(t.allowLess)this._processReadAllowingLess(t);else if(this._buffered>=t.length)this._processRead(t);else break}this._buffers&&!this.writable&&this._end()}catch(t){this.emit("error",t)}}});var UT=b(BT=>{"use strict";var Za=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];BT.getImagePasses=function(t,e){let r=[],n=t%8,i=e%8,o=(t-n)/8,a=(e-i)/8;for(let s=0;s<Za.length;s++){let l=Za[s],c=o*l.x.length,u=a*l.y.length;for(let d=0;d<l.x.length&&l.x[d]<n;d++)c++;for(let d=0;d<l.y.length&&l.y[d]<i;d++)u++;c>0&&u>0&&r.push({width:c,height:u,index:s})}return r};BT.getInterlaceIterator=function(t){return function(e,r,n){let i=e%Za[n].x.length,o=(e-i)/Za[n].x.length*8+Za[n].x[i],a=r%Za[n].y.length,s=(r-a)/Za[n].y.length*8+Za[n].y[a];return o*4+s*t*4}}});var qT=b((J8e,GB)=>{"use strict";GB.exports=function(e,r,n){let i=e+r-n,o=Math.abs(i-e),a=Math.abs(i-r),s=Math.abs(i-n);return o<=a&&o<=s?e:a<=s?r:n}});var ZT=b((K8e,JB)=>{"use strict";var Phe=UT(),The=qT();function WB(t,e,r){let n=t*e;return r!==8&&(n=Math.ceil(n/(8/r))),n}var wu=JB.exports=function(t,e){let r=t.width,n=t.height,i=t.interlace,o=t.bpp,a=t.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],i){let s=Phe.getImagePasses(r,n);for(let l=0;l<s.length;l++)this._images.push({byteWidth:WB(s[l].width,o,a),height:s[l].height,lineIndex:0})}else this._images.push({byteWidth:WB(r,o,a),height:n,lineIndex:0});a===8?this._xComparison=o:a===16?this._xComparison=o*2:this._xComparison=1};wu.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))};wu.prototype._unFilterType1=function(t,e,r){let n=this._xComparison,i=n-1;for(let o=0;o<r;o++){let a=t[1+o],s=o>i?e[o-n]:0;e[o]=a+s}};wu.prototype._unFilterType2=function(t,e,r){let n=this._lastLine;for(let i=0;i<r;i++){let o=t[1+i],a=n?n[i]:0;e[i]=o+a}};wu.prototype._unFilterType3=function(t,e,r){let n=this._xComparison,i=n-1,o=this._lastLine;for(let a=0;a<r;a++){let s=t[1+a],l=o?o[a]:0,c=a>i?e[a-n]:0,u=Math.floor((c+l)/2);e[a]=s+u}};wu.prototype._unFilterType4=function(t,e,r){let n=this._xComparison,i=n-1,o=this._lastLine;for(let a=0;a<r;a++){let s=t[1+a],l=o?o[a]:0,c=a>i?e[a-n]:0,u=a>i&&o?o[a-n]:0,d=The(c,l,u);e[a]=s+d}};wu.prototype._reverseFilterLine=function(t){let e=t[0],r,n=this._images[this._imageIndex],i=n.byteWidth;if(e===0)r=t.slice(1,i+1);else switch(r=Buffer.alloc(i),e){case 1:this._unFilterType1(t,r,i);break;case 2:this._unFilterType2(t,r,i);break;case 3:this._unFilterType3(t,r,i);break;case 4:this._unFilterType4(t,r,i);break;default:throw new Error("Unrecognised filter type - "+e)}this.write(r),n.lineIndex++,n.lineIndex>=n.height?(this._lastLine=null,this._imageIndex++,n=this._images[this._imageIndex]):this._lastLine=r,n?this.read(n.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}});var XB=b((Y8e,YB)=>{"use strict";var Ahe=Q("util"),KB=FT(),khe=ZT(),Che=YB.exports=function(t){KB.call(this);let e=[],r=this;this._filter=new khe(t,{read:this.read.bind(this),write:function(n){e.push(n)},complete:function(){r.emit("complete",Buffer.concat(e))}}),this._filter.start()};Ahe.inherits(Che,KB)});var xu=b((X8e,QB)=>{"use strict";QB.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}});var GT=b((Q8e,e3)=>{"use strict";var HT=[];(function(){for(let t=0;t<256;t++){let e=t;for(let r=0;r<8;r++)e&1?e=3988292384^e>>>1:e=e>>>1;HT[t]=e}})();var VT=e3.exports=function(){this._crc=-1};VT.prototype.write=function(t){for(let e=0;e<t.length;e++)this._crc=HT[(this._crc^t[e])&255]^this._crc>>>8;return!0};VT.prototype.crc32=function(){return this._crc^-1};VT.crc32=function(t){let e=-1;for(let r=0;r<t.length;r++)e=HT[(e^t[r])&255]^e>>>8;return e^-1}});var WT=b((eUe,t3)=>{"use strict";var ar=xu(),Rhe=GT(),dr=t3.exports=function(t,e){this._options=t,t.checkCRC=t.checkCRC!==!1,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[ar.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[ar.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[ar.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[ar.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[ar.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[ar.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=e.read,this.error=e.error,this.metadata=e.metadata,this.gamma=e.gamma,this.transColor=e.transColor,this.palette=e.palette,this.parsed=e.parsed,this.inflateData=e.inflateData,this.finished=e.finished,this.simpleTransparency=e.simpleTransparency,this.headersFinished=e.headersFinished||function(){}};dr.prototype.start=function(){this.read(ar.PNG_SIGNATURE.length,this._parseSignature.bind(this))};dr.prototype._parseSignature=function(t){let e=ar.PNG_SIGNATURE;for(let r=0;r<e.length;r++)if(t[r]!==e[r]){this.error(new Error("Invalid file signature"));return}this.read(8,this._parseChunkBegin.bind(this))};dr.prototype._parseChunkBegin=function(t){let e=t.readUInt32BE(0),r=t.readUInt32BE(4),n="";for(let o=4;o<8;o++)n+=String.fromCharCode(t[o]);let i=!!(t[4]&32);if(!this._hasIHDR&&r!==ar.TYPE_IHDR){this.error(new Error("Expected IHDR on beggining"));return}if(this._crc=new Rhe,this._crc.write(Buffer.from(n)),this._chunks[r])return this._chunks[r](e);if(!i){this.error(new Error("Unsupported critical chunk type "+n));return}this.read(e+4,this._skipChunk.bind(this))};dr.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))};dr.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))};dr.prototype._parseChunkEnd=function(t){let e=t.readInt32BE(0),r=this._crc.crc32();if(this._options.checkCRC&&r!==e){this.error(new Error("Crc error - "+e+" - "+r));return}this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))};dr.prototype._handleIHDR=function(t){this.read(t,this._parseIHDR.bind(this))};dr.prototype._parseIHDR=function(t){this._crc.write(t);let e=t.readUInt32BE(0),r=t.readUInt32BE(4),n=t[8],i=t[9],o=t[10],a=t[11],s=t[12];if(n!==8&&n!==4&&n!==2&&n!==1&&n!==16){this.error(new Error("Unsupported bit depth "+n));return}if(!(i in ar.COLORTYPE_TO_BPP_MAP)){this.error(new Error("Unsupported color type"));return}if(o!==0){this.error(new Error("Unsupported compression method"));return}if(a!==0){this.error(new Error("Unsupported filter method"));return}if(s!==0&&s!==1){this.error(new Error("Unsupported interlace method"));return}this._colorType=i;let l=ar.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:e,height:r,depth:n,interlace:!!s,palette:!!(i&ar.COLORTYPE_PALETTE),color:!!(i&ar.COLORTYPE_COLOR),alpha:!!(i&ar.COLORTYPE_ALPHA),bpp:l,colorType:i}),this._handleChunkEnd()};dr.prototype._handlePLTE=function(t){this.read(t,this._parsePLTE.bind(this))};dr.prototype._parsePLTE=function(t){this._crc.write(t);let e=Math.floor(t.length/3);for(let r=0;r<e;r++)this._palette.push([t[r*3],t[r*3+1],t[r*3+2],255]);this.palette(this._palette),this._handleChunkEnd()};dr.prototype._handleTRNS=function(t){this.simpleTransparency(),this.read(t,this._parseTRNS.bind(this))};dr.prototype._parseTRNS=function(t){if(this._crc.write(t),this._colorType===ar.COLORTYPE_PALETTE_COLOR){if(this._palette.length===0){this.error(new Error("Transparency chunk must be after palette"));return}if(t.length>this._palette.length){this.error(new Error("More transparent colors than palette size"));return}for(let e=0;e<t.length;e++)this._palette[e][3]=t[e];this.palette(this._palette)}this._colorType===ar.COLORTYPE_GRAYSCALE&&this.transColor([t.readUInt16BE(0)]),this._colorType===ar.COLORTYPE_COLOR&&this.transColor([t.readUInt16BE(0),t.readUInt16BE(2),t.readUInt16BE(4)]),this._handleChunkEnd()};dr.prototype._handleGAMA=function(t){this.read(t,this._parseGAMA.bind(this))};dr.prototype._parseGAMA=function(t){this._crc.write(t),this.gamma(t.readUInt32BE(0)/ar.GAMMA_DIVISION),this._handleChunkEnd()};dr.prototype._handleIDAT=function(t){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-t,this._parseIDAT.bind(this,t))};dr.prototype._parseIDAT=function(t,e){if(this._crc.write(e),this._colorType===ar.COLORTYPE_PALETTE_COLOR&&this._palette.length===0)throw new Error("Expected palette not found");this.inflateData(e);let r=t-e.length;r>0?this._handleIDAT(r):this._handleChunkEnd()};dr.prototype._handleIEND=function(t){this.read(t,this._parseIEND.bind(this))};dr.prototype._parseIEND=function(t){this._crc.write(t),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}});var JT=b(n3=>{"use strict";var r3=UT(),Dhe=[function(){},function(t,e,r,n){if(n===e.length)throw new Error("Ran out of data");let i=e[n];t[r]=i,t[r+1]=i,t[r+2]=i,t[r+3]=255},function(t,e,r,n){if(n+1>=e.length)throw new Error("Ran out of data");let i=e[n];t[r]=i,t[r+1]=i,t[r+2]=i,t[r+3]=e[n+1]},function(t,e,r,n){if(n+2>=e.length)throw new Error("Ran out of data");t[r]=e[n],t[r+1]=e[n+1],t[r+2]=e[n+2],t[r+3]=255},function(t,e,r,n){if(n+3>=e.length)throw new Error("Ran out of data");t[r]=e[n],t[r+1]=e[n+1],t[r+2]=e[n+2],t[r+3]=e[n+3]}],Ohe=[function(){},function(t,e,r,n){let i=e[0];t[r]=i,t[r+1]=i,t[r+2]=i,t[r+3]=n},function(t,e,r){let n=e[0];t[r]=n,t[r+1]=n,t[r+2]=n,t[r+3]=e[1]},function(t,e,r,n){t[r]=e[0],t[r+1]=e[1],t[r+2]=e[2],t[r+3]=n},function(t,e,r){t[r]=e[0],t[r+1]=e[1],t[r+2]=e[2],t[r+3]=e[3]}];function Mhe(t,e){let r=[],n=0;function i(){if(n===t.length)throw new Error("Ran out of data");let o=t[n];n++;let a,s,l,c,u,d,f,p;switch(e){default:throw new Error("unrecognised depth");case 16:f=t[n],n++,r.push((o<<8)+f);break;case 4:f=o&15,p=o>>4,r.push(p,f);break;case 2:u=o&3,d=o>>2&3,f=o>>4&3,p=o>>6&3,r.push(p,f,d,u);break;case 1:a=o&1,s=o>>1&1,l=o>>2&1,c=o>>3&1,u=o>>4&1,d=o>>5&1,f=o>>6&1,p=o>>7&1,r.push(p,f,d,u,c,l,s,a);break}}return{get:function(o){for(;r.length<o;)i();let a=r.slice(0,o);return r=r.slice(o),a},resetAfterLine:function(){r.length=0},end:function(){if(n!==t.length)throw new Error("extra data found")}}}function Nhe(t,e,r,n,i,o){let a=t.width,s=t.height,l=t.index;for(let c=0;c<s;c++)for(let u=0;u<a;u++){let d=r(u,c,l);Dhe[n](e,i,d,o),o+=n}return o}function jhe(t,e,r,n,i,o){let a=t.width,s=t.height,l=t.index;for(let c=0;c<s;c++){for(let u=0;u<a;u++){let d=i.get(n),f=r(u,c,l);Ohe[n](e,d,f,o)}i.resetAfterLine()}}n3.dataToBitMap=function(t,e){let r=e.width,n=e.height,i=e.depth,o=e.bpp,a=e.interlace,s;i!==8&&(s=Mhe(t,i));let l;i<=8?l=Buffer.alloc(r*n*4):l=new Uint16Array(r*n*4);let c=Math.pow(2,i)-1,u=0,d,f;if(a)d=r3.getImagePasses(r,n),f=r3.getInterlaceIterator(r,n);else{let p=0;f=function(){let h=p;return p+=4,h},d=[{width:r,height:n}]}for(let p=0;p<d.length;p++)i===8?u=Nhe(d[p],l,f,o,t,u):jhe(d[p],l,f,o,s,c);if(i===8){if(u!==t.length)throw new Error("extra data found")}else s.end();return l}});var KT=b((rUe,i3)=>{"use strict";function zhe(t,e,r,n,i){let o=0;for(let a=0;a<n;a++)for(let s=0;s<r;s++){let l=i[t[o]];if(!l)throw new Error("index "+t[o]+" not in palette");for(let c=0;c<4;c++)e[o+c]=l[c];o+=4}}function Lhe(t,e,r,n,i){let o=0;for(let a=0;a<n;a++)for(let s=0;s<r;s++){let l=!1;if(i.length===1?i[0]===t[o]&&(l=!0):i[0]===t[o]&&i[1]===t[o+1]&&i[2]===t[o+2]&&(l=!0),l)for(let c=0;c<4;c++)e[o+c]=0;o+=4}}function Fhe(t,e,r,n,i){let o=255,a=Math.pow(2,i)-1,s=0;for(let l=0;l<n;l++)for(let c=0;c<r;c++){for(let u=0;u<4;u++)e[s+u]=Math.floor(t[s+u]*o/a+.5);s+=4}}i3.exports=function(t,e){let r=e.depth,n=e.width,i=e.height,o=e.colorType,a=e.transColor,s=e.palette,l=t;return o===3?zhe(t,l,n,i,s):(a&&Lhe(t,l,n,i,a),r!==8&&(r===16&&(l=Buffer.alloc(n*i*4)),Fhe(t,l,n,i,r))),l}});var s3=b((nUe,a3)=>{"use strict";var Bhe=Q("util"),YT=Q("zlib"),o3=FT(),Uhe=XB(),qhe=WT(),Zhe=JT(),Hhe=KT(),Qi=a3.exports=function(t){o3.call(this),this._parser=new qhe(t,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=t,this.writable=!0,this._parser.start()};Bhe.inherits(Qi,o3);Qi.prototype._handleError=function(t){this.emit("error",t),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0};Qi.prototype._inflateData=function(t){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=YT.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let r=((this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3)+1)*this._bitmapInfo.height,n=Math.max(r,YT.Z_MIN_CHUNK);this._inflate=YT.createInflate({chunkSize:n});let i=r,o=this.emit.bind(this,"error");this._inflate.on("error",function(s){i&&o(s)}),this._filter.on("complete",this._complete.bind(this));let a=this._filter.write.bind(this._filter);this._inflate.on("data",function(s){i&&(s.length>i&&(s=s.slice(0,i)),i-=s.length,a(s))}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(t)};Qi.prototype._handleMetaData=function(t){this._metaData=t,this._bitmapInfo=Object.create(t),this._filter=new Uhe(this._bitmapInfo)};Qi.prototype._handleTransColor=function(t){this._bitmapInfo.transColor=t};Qi.prototype._handlePalette=function(t){this._bitmapInfo.palette=t};Qi.prototype._simpleTransparency=function(){this._metaData.alpha=!0};Qi.prototype._headersFinished=function(){this.emit("metadata",this._metaData)};Qi.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))};Qi.prototype._complete=function(t){if(this.errord)return;let e;try{let r=Zhe.dataToBitMap(t,this._bitmapInfo);e=Hhe(r,this._bitmapInfo),r=null}catch(r){this._handleError(r);return}this.emit("parsed",e)}});var c3=b((iUe,l3)=>{"use strict";var ai=xu();l3.exports=function(t,e,r,n){let i=[ai.COLORTYPE_COLOR_ALPHA,ai.COLORTYPE_ALPHA].indexOf(n.colorType)!==-1;if(n.colorType===n.inputColorType){let h=(function(){let m=new ArrayBuffer(2);return new DataView(m).setInt16(0,256,!0),new Int16Array(m)[0]!==256})();if(n.bitDepth===8||n.bitDepth===16&&h)return t}let o=n.bitDepth!==16?t:new Uint16Array(t.buffer),a=255,s=ai.COLORTYPE_TO_BPP_MAP[n.inputColorType];s===4&&!n.inputHasAlpha&&(s=3);let l=ai.COLORTYPE_TO_BPP_MAP[n.colorType];n.bitDepth===16&&(a=65535,l*=2);let c=Buffer.alloc(e*r*l),u=0,d=0,f=n.bgColor||{};f.red===void 0&&(f.red=a),f.green===void 0&&(f.green=a),f.blue===void 0&&(f.blue=a);function p(){let h,m,y,g=a;switch(n.inputColorType){case ai.COLORTYPE_COLOR_ALPHA:g=o[u+3],h=o[u],m=o[u+1],y=o[u+2];break;case ai.COLORTYPE_COLOR:h=o[u],m=o[u+1],y=o[u+2];break;case ai.COLORTYPE_ALPHA:g=o[u+1],h=o[u],m=h,y=h;break;case ai.COLORTYPE_GRAYSCALE:h=o[u],m=h,y=h;break;default:throw new Error("input color type:"+n.inputColorType+" is not supported at present")}return n.inputHasAlpha&&(i||(g/=a,h=Math.min(Math.max(Math.round((1-g)*f.red+g*h),0),a),m=Math.min(Math.max(Math.round((1-g)*f.green+g*m),0),a),y=Math.min(Math.max(Math.round((1-g)*f.blue+g*y),0),a))),{red:h,green:m,blue:y,alpha:g}}for(let h=0;h<r;h++)for(let m=0;m<e;m++){let y=p(o,u);switch(n.colorType){case ai.COLORTYPE_COLOR_ALPHA:case ai.COLORTYPE_COLOR:n.bitDepth===8?(c[d]=y.red,c[d+1]=y.green,c[d+2]=y.blue,i&&(c[d+3]=y.alpha)):(c.writeUInt16BE(y.red,d),c.writeUInt16BE(y.green,d+2),c.writeUInt16BE(y.blue,d+4),i&&c.writeUInt16BE(y.alpha,d+6));break;case ai.COLORTYPE_ALPHA:case ai.COLORTYPE_GRAYSCALE:{let g=(y.red+y.green+y.blue)/3;n.bitDepth===8?(c[d]=g,i&&(c[d+1]=y.alpha)):(c.writeUInt16BE(g,d),i&&c.writeUInt16BE(y.alpha,d+2));break}default:throw new Error("unrecognised color Type "+n.colorType)}u+=s,d+=l}return c}});var f3=b((oUe,d3)=>{"use strict";var u3=qT();function Vhe(t,e,r,n,i){for(let o=0;o<r;o++)n[i+o]=t[e+o]}function Ghe(t,e,r){let n=0,i=e+r;for(let o=e;o<i;o++)n+=Math.abs(t[o]);return n}function Whe(t,e,r,n,i,o){for(let a=0;a<r;a++){let s=a>=o?t[e+a-o]:0,l=t[e+a]-s;n[i+a]=l}}function Jhe(t,e,r,n){let i=0;for(let o=0;o<r;o++){let a=o>=n?t[e+o-n]:0,s=t[e+o]-a;i+=Math.abs(s)}return i}function Khe(t,e,r,n,i){for(let o=0;o<r;o++){let a=e>0?t[e+o-r]:0,s=t[e+o]-a;n[i+o]=s}}function Yhe(t,e,r){let n=0,i=e+r;for(let o=e;o<i;o++){let a=e>0?t[o-r]:0,s=t[o]-a;n+=Math.abs(s)}return n}function Xhe(t,e,r,n,i,o){for(let a=0;a<r;a++){let s=a>=o?t[e+a-o]:0,l=e>0?t[e+a-r]:0,c=t[e+a]-(s+l>>1);n[i+a]=c}}function Qhe(t,e,r,n){let i=0;for(let o=0;o<r;o++){let a=o>=n?t[e+o-n]:0,s=e>0?t[e+o-r]:0,l=t[e+o]-(a+s>>1);i+=Math.abs(l)}return i}function eme(t,e,r,n,i,o){for(let a=0;a<r;a++){let s=a>=o?t[e+a-o]:0,l=e>0?t[e+a-r]:0,c=e>0&&a>=o?t[e+a-(r+o)]:0,u=t[e+a]-u3(s,l,c);n[i+a]=u}}function tme(t,e,r,n){let i=0;for(let o=0;o<r;o++){let a=o>=n?t[e+o-n]:0,s=e>0?t[e+o-r]:0,l=e>0&&o>=n?t[e+o-(r+n)]:0,c=t[e+o]-u3(a,s,l);i+=Math.abs(c)}return i}var rme={0:Vhe,1:Whe,2:Khe,3:Xhe,4:eme},nme={0:Ghe,1:Jhe,2:Yhe,3:Qhe,4:tme};d3.exports=function(t,e,r,n,i){let o;if(!("filterType"in n)||n.filterType===-1)o=[0,1,2,3,4];else if(typeof n.filterType=="number")o=[n.filterType];else throw new Error("unrecognised filter types");n.bitDepth===16&&(i*=2);let a=e*i,s=0,l=0,c=Buffer.alloc((a+1)*r),u=o[0];for(let d=0;d<r;d++){if(o.length>1){let f=1/0;for(let p=0;p<o.length;p++){let h=nme[o[p]](t,l,a,i);h<f&&(u=o[p],f=h)}}c[s]=u,s++,rme[u](t,l,a,c,s,i),s+=a,l+=a}return c}});var XT=b((aUe,p3)=>{"use strict";var Lr=xu(),ime=GT(),ome=c3(),ame=f3(),sme=Q("zlib"),Ha=p3.exports=function(t){if(this._options=t,t.deflateChunkSize=t.deflateChunkSize||32*1024,t.deflateLevel=t.deflateLevel!=null?t.deflateLevel:9,t.deflateStrategy=t.deflateStrategy!=null?t.deflateStrategy:3,t.inputHasAlpha=t.inputHasAlpha!=null?t.inputHasAlpha:!0,t.deflateFactory=t.deflateFactory||sme.createDeflate,t.bitDepth=t.bitDepth||8,t.colorType=typeof t.colorType=="number"?t.colorType:Lr.COLORTYPE_COLOR_ALPHA,t.inputColorType=typeof t.inputColorType=="number"?t.inputColorType:Lr.COLORTYPE_COLOR_ALPHA,[Lr.COLORTYPE_GRAYSCALE,Lr.COLORTYPE_COLOR,Lr.COLORTYPE_COLOR_ALPHA,Lr.COLORTYPE_ALPHA].indexOf(t.colorType)===-1)throw new Error("option color type:"+t.colorType+" is not supported at present");if([Lr.COLORTYPE_GRAYSCALE,Lr.COLORTYPE_COLOR,Lr.COLORTYPE_COLOR_ALPHA,Lr.COLORTYPE_ALPHA].indexOf(t.inputColorType)===-1)throw new Error("option input color type:"+t.inputColorType+" is not supported at present");if(t.bitDepth!==8&&t.bitDepth!==16)throw new Error("option bit depth:"+t.bitDepth+" is not supported at present")};Ha.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}};Ha.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())};Ha.prototype.filterData=function(t,e,r){let n=ome(t,e,r,this._options),i=Lr.COLORTYPE_TO_BPP_MAP[this._options.colorType];return ame(n,e,r,this._options,i)};Ha.prototype._packChunk=function(t,e){let r=e?e.length:0,n=Buffer.alloc(r+12);return n.writeUInt32BE(r,0),n.writeUInt32BE(t,4),e&&e.copy(n,8),n.writeInt32BE(ime.crc32(n.slice(4,n.length-4)),n.length-4),n};Ha.prototype.packGAMA=function(t){let e=Buffer.alloc(4);return e.writeUInt32BE(Math.floor(t*Lr.GAMMA_DIVISION),0),this._packChunk(Lr.TYPE_gAMA,e)};Ha.prototype.packIHDR=function(t,e){let r=Buffer.alloc(13);return r.writeUInt32BE(t,0),r.writeUInt32BE(e,4),r[8]=this._options.bitDepth,r[9]=this._options.colorType,r[10]=0,r[11]=0,r[12]=0,this._packChunk(Lr.TYPE_IHDR,r)};Ha.prototype.packIDAT=function(t){return this._packChunk(Lr.TYPE_IDAT,t)};Ha.prototype.packIEND=function(){return this._packChunk(Lr.TYPE_IEND,null)}});var y3=b((sUe,g3)=>{"use strict";var lme=Q("util"),h3=Q("stream"),cme=xu(),ume=XT(),m3=g3.exports=function(t){h3.call(this);let e=t||{};this._packer=new ume(e),this._deflate=this._packer.createDeflate(),this.readable=!0};lme.inherits(m3,h3);m3.prototype.pack=function(t,e,r,n){this.emit("data",Buffer.from(cme.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(e,r)),n&&this.emit("data",this._packer.packGAMA(n));let i=this._packer.filterData(t,e,r);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(o){this.emit("data",this._packer.packIDAT(o))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(i)}});var S3=b((nh,x3)=>{"use strict";var _3=Q("assert").ok,Su=Q("zlib"),dme=Q("util"),v3=Q("buffer").kMaxLength;function hl(t){if(!(this instanceof hl))return new hl(t);t&&t.chunkSize<Su.Z_MIN_CHUNK&&(t.chunkSize=Su.Z_MIN_CHUNK),Su.Inflate.call(this,t),this._offset=this._offset===void 0?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,t&&t.maxLength!=null&&(this._maxLength=t.maxLength)}function fme(t){return new hl(t)}function b3(t,e){e&&process.nextTick(e),t._handle&&(t._handle.close(),t._handle=null)}hl.prototype._processChunk=function(t,e,r){if(typeof r=="function")return Su.Inflate._processChunk.call(this,t,e,r);let n=this,i=t&&t.length,o=this._chunkSize-this._offset,a=this._maxLength,s=0,l=[],c=0,u;this.on("error",function(h){u=h});function d(h,m){if(n._hadError)return;let y=o-m;if(_3(y>=0,"have should not go down"),y>0){let g=n._buffer.slice(n._offset,n._offset+y);if(n._offset+=y,g.length>a&&(g=g.slice(0,a)),l.push(g),c+=g.length,a-=g.length,a===0)return!1}return(m===0||n._offset>=n._chunkSize)&&(o=n._chunkSize,n._offset=0,n._buffer=Buffer.allocUnsafe(n._chunkSize)),m===0?(s+=i-h,i=h,!0):!1}_3(this._handle,"zlib binding closed");let f;do f=this._handle.writeSync(e,t,s,i,this._buffer,this._offset,o),f=f||this._writeState;while(!this._hadError&&d(f[0],f[1]));if(this._hadError)throw u;if(c>=v3)throw b3(this),new RangeError("Cannot create final Buffer. It would be larger than 0x"+v3.toString(16)+" bytes");let p=Buffer.concat(l,c);return b3(this),p};dme.inherits(hl,Su.Inflate);function pme(t,e){if(typeof e=="string"&&(e=Buffer.from(e)),!(e instanceof Buffer))throw new TypeError("Not a string or buffer");let r=t._finishFlushFlag;return r==null&&(r=Su.Z_FINISH),t._processChunk(e,r)}function w3(t,e){return pme(new hl(e),t)}x3.exports=nh=w3;nh.Inflate=hl;nh.createInflate=fme;nh.inflateSync=w3});var QT=b((lUe,I3)=>{"use strict";var E3=I3.exports=function(t){this._buffer=t,this._reads=[]};E3.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e})};E3.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let t=this._reads[0];if(this._buffer.length&&(this._buffer.length>=t.length||t.allowLess)){this._reads.shift();let e=this._buffer;this._buffer=e.slice(t.length),t.func.call(this,e.slice(0,t.length))}else break}if(this._reads.length>0)return new Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)return new Error("unrecognised content at end of stream")}});var P3=b($3=>{"use strict";var hme=QT(),mme=ZT();$3.process=function(t,e){let r=[],n=new hme(t);return new mme(e,{read:n.read.bind(n),write:function(o){r.push(o)},complete:function(){}}).start(),n.process(),Buffer.concat(r)}});var C3=b((uUe,k3)=>{"use strict";var T3=!0,A3=Q("zlib"),gme=S3();A3.deflateSync||(T3=!1);var yme=QT(),_me=P3(),vme=WT(),bme=JT(),wme=KT();k3.exports=function(t,e){if(!T3)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let r;function n(x){r=x}let i;function o(x){i=x}function a(x){i.transColor=x}function s(x){i.palette=x}function l(){i.alpha=!0}let c;function u(x){c=x}let d=[];function f(x){d.push(x)}let p=new yme(t);if(new vme(e,{read:p.read.bind(p),error:n,metadata:o,gamma:u,palette:s,transColor:a,inflateData:f,simpleTransparency:l}).start(),p.process(),r)throw r;let m=Buffer.concat(d);d.length=0;let y;if(i.interlace)y=A3.inflateSync(m);else{let w=((i.width*i.bpp*i.depth+7>>3)+1)*i.height;y=gme(m,{chunkSize:w,maxLength:w})}if(m=null,!y||!y.length)throw new Error("bad png - invalid inflate data response");let g=_me.process(y,i);m=null;let v=bme.dataToBitMap(g,i);g=null;let E=wme(v,i);return i.data=E,i.gamma=c||0,i}});var M3=b((dUe,O3)=>{"use strict";var R3=!0,D3=Q("zlib");D3.deflateSync||(R3=!1);var xme=xu(),Sme=XT();O3.exports=function(t,e){if(!R3)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let r=e||{},n=new Sme(r),i=[];i.push(Buffer.from(xme.PNG_SIGNATURE)),i.push(n.packIHDR(t.width,t.height)),t.gamma&&i.push(n.packGAMA(t.gamma));let o=n.filterData(t.data,t.width,t.height),a=D3.deflateSync(o,n.getDeflateOptions());if(o=null,!a||!a.length)throw new Error("bad png - invalid compressed data response");return i.push(n.packIDAT(a)),i.push(n.packIEND()),Buffer.concat(i)}});var N3=b(eA=>{"use strict";var Eme=C3(),Ime=M3();eA.read=function(t,e){return Eme(t,e||{})};eA.write=function(t,e){return Ime(t,e)}});var L3=b(z3=>{"use strict";var $me=Q("util"),j3=Q("stream"),Pme=s3(),Tme=y3(),Ame=N3(),an=z3.PNG=function(t){j3.call(this),t=t||{},this.width=t.width|0,this.height=t.height|0,this.data=this.width>0&&this.height>0?Buffer.alloc(4*this.width*this.height):null,t.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new Pme(t),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(e){this.data=e,this.emit("parsed",e)}.bind(this)),this._packer=new Tme(t),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};$me.inherits(an,j3);an.sync=Ame;an.prototype.pack=function(){return!this.data||!this.data.length?(this.emit("error","No data provided"),this):(process.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this)};an.prototype.parse=function(t,e){if(e){let r,n;r=function(i){this.removeListener("error",n),this.data=i,e(null,this)}.bind(this),n=function(i){this.removeListener("parsed",r),e(i,null)}.bind(this),this.once("parsed",r),this.once("error",n)}return this.end(t),this};an.prototype.write=function(t){return this._parser.write(t),!0};an.prototype.end=function(t){this._parser.end(t)};an.prototype._metadata=function(t){this.width=t.width,this.height=t.height,this.emit("metadata",t)};an.prototype._gamma=function(t){this.gamma=t};an.prototype._handleClose=function(){!this._parser.writable&&!this._packer.readable&&this.emit("close")};an.bitblt=function(t,e,r,n,i,o,a,s){if(r|=0,n|=0,i|=0,o|=0,a|=0,s|=0,r>t.width||n>t.height||r+i>t.width||n+o>t.height)throw new Error("bitblt reading outside image");if(a>e.width||s>e.height||a+i>e.width||s+o>e.height)throw new Error("bitblt writing outside image");for(let l=0;l<o;l++)t.data.copy(e.data,(s+l)*e.width+a<<2,(n+l)*t.width+r<<2,(n+l)*t.width+r+i<<2)};an.prototype.bitblt=function(t,e,r,n,i,o,a){return an.bitblt(this,t,e,r,n,i,o,a),this};an.adjustGamma=function(t){if(t.gamma){for(let e=0;e<t.height;e++)for(let r=0;r<t.width;r++){let n=t.width*e+r<<2;for(let i=0;i<3;i++){let o=t.data[n+i]/255;o=Math.pow(o,1/2.2/t.gamma),t.data[n+i]=Math.round(o*255)}}t.gamma=0}};an.prototype.adjustGamma=function(){an.adjustGamma(this)}});var ih=b(ml=>{function F3(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8)throw new Error("Invalid hex color: "+t);(e.length===3||e.length===4)&&(e=Array.prototype.concat.apply([],e.map(function(n){return[n,n]}))),e.length===6&&e.push("F","F");let r=parseInt(e.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+e.slice(0,6).join("")}}ml.getOptions=function(e){e||(e={}),e.color||(e.color={});let r=typeof e.margin>"u"||e.margin===null||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:n,scale:n?4:i,margin:r,color:{dark:F3(e.color.dark||"#000000ff"),light:F3(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}};ml.getScale=function(e,r){return r.width&&r.width>=e+r.margin*2?r.width/(e+r.margin*2):r.scale};ml.getImageWidth=function(e,r){let n=ml.getScale(e,r);return Math.floor((e+r.margin*2)*n)};ml.qrToImageData=function(e,r,n){let i=r.modules.size,o=r.modules.data,a=ml.getScale(i,n),s=Math.floor((i+n.margin*2)*a),l=n.margin*a,c=[n.color.light,n.color.dark];for(let u=0;u<s;u++)for(let d=0;d<s;d++){let f=(u*s+d)*4,p=n.color.light;if(u>=l&&d>=l&&u<s-l&&d<s-l){let h=Math.floor((u-l)/a),m=Math.floor((d-l)/a);p=c[o[h*i+m]?1:0]}e[f++]=p.r,e[f++]=p.g,e[f++]=p.b,e[f]=p.a}}});var B3=b(eo=>{var kme=Q("fs"),Cme=L3().PNG,tA=ih();eo.render=function(e,r){let n=tA.getOptions(r),i=n.rendererOpts,o=tA.getImageWidth(e.modules.size,n);i.width=o,i.height=o;let a=new Cme(i);return tA.qrToImageData(a.data,e,n),a};eo.renderToDataURL=function(e,r,n){typeof n>"u"&&(n=r,r=void 0),eo.renderToBuffer(e,r,function(i,o){i&&n(i);let a="data:image/png;base64,";a+=o.toString("base64"),n(null,a)})};eo.renderToBuffer=function(e,r,n){typeof n>"u"&&(n=r,r=void 0);let i=eo.render(e,r),o=[];i.on("error",n),i.on("data",function(a){o.push(a)}),i.on("end",function(){n(null,Buffer.concat(o))}),i.pack()};eo.renderToFile=function(e,r,n,i){typeof i>"u"&&(i=n,n=void 0);let o=!1,a=(...l)=>{o||(o=!0,i.apply(null,l))},s=kme.createWriteStream(e);s.on("error",a),s.on("close",a),eo.renderToFileStream(s,r,n)};eo.renderToFileStream=function(e,r,n){eo.render(r,n).pack().pipe(e)}});var U3=b(W_=>{var Rme=ih(),Dme={WW:" ",WB:"▄",BB:"█",BW:"▀"},Ome={BB:" ",BW:"▄",WW:"█",WB:"▀"};function Mme(t,e,r){return t&&e?r.BB:t&&!e?r.BW:!t&&e?r.WB:r.WW}W_.render=function(t,e,r){let n=Rme.getOptions(e),i=Dme;(n.color.dark.hex==="#ffffff"||n.color.light.hex==="#000000")&&(i=Ome);let o=t.modules.size,a=t.modules.data,s="",l=Array(o+n.margin*2+1).join(i.WW);l=Array(n.margin/2+1).join(l+`
|
|
@@ -217,58 +217,58 @@ Minimum version required to store current data is: `+o+`.
|
|
|
217
217
|
`}return s+=l+`
|
|
218
218
|
`,typeof r=="function"&&r(null,s),s}});var W3=b(G3=>{var Nme="\x1B[47m",jme="\x1B[40m",rA="\x1B[37m",nA="\x1B[30m",gl="\x1B[0m",zme=Nme+nA,Lme=jme+rA,Fme=function(t,e,r){return{"00":gl+" "+t,"01":gl+e+"▄"+t,"02":gl+r+"▄"+t,10:gl+e+"▀"+t,11:" ",12:"▄",20:gl+r+"▀"+t,21:"▀",22:"█"}},H3=function(t,e,r,n){let i=e+1;if(r>=i||n>=i||n<-1||r<-1)return"0";if(r>=e||n>=e||n<0||r<0)return"1";let o=n*e+r;return t[o]?"2":"1"},V3=function(t,e,r,n){return H3(t,e,r,n)+H3(t,e,r,n+1)};G3.render=function(t,e,r){let n=t.modules.size,i=t.modules.data,o=!!(e&&e.inverse),a=e&&e.inverse?Lme:zme,c=Fme(a,o?nA:rA,o?rA:nA),u=gl+`
|
|
219
219
|
`+a,d=a;for(let f=-1;f<n+1;f+=2){for(let p=-1;p<n;p++)d+=c[V3(i,n,p,f)];d+=c[V3(i,n,n,f)]+u}return d+=gl,typeof r=="function"&&r(null,d),d}});var K3=b(J3=>{var Bme=Z3(),Ume=W3();J3.render=function(t,e,r){return e&&e.small?Ume.render(t,e,r):Bme.render(t,e,r)}});var oA=b(X3=>{var qme=ih();function Y3(t,e){let r=t.a/255,n=e+'="'+t.hex+'"';return r<1?n+" "+e+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function iA(t,e,r){let n=t+e;return typeof r<"u"&&(n+=" "+r),n}function Zme(t,e,r){let n="",i=0,o=!1,a=0;for(let s=0;s<t.length;s++){let l=Math.floor(s%e),c=Math.floor(s/e);!l&&!o&&(o=!0),t[s]?(a++,s>0&&l>0&&t[s-1]||(n+=o?iA("M",l+r,.5+c+r):iA("m",i,0),i=0,o=!1),l+1<e&&t[s+1]||(n+=iA("h",a),a=0)):i++}return n}X3.render=function(e,r,n){let i=qme.getOptions(r),o=e.modules.size,a=e.modules.data,s=o+i.margin*2,l=i.color.light.a?"<path "+Y3(i.color.light,"fill")+' d="M0 0h'+s+"v"+s+'H0z"/>':"",c="<path "+Y3(i.color.dark,"stroke")+' d="'+Zme(a,o,i.margin)+'"/>',u='viewBox="0 0 '+s+" "+s+'"',f='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+u+' shape-rendering="crispEdges">'+l+c+`</svg>
|
|
220
|
-
`;return typeof n=="function"&&n(null,f),f}});var Q3=b(J_=>{var Hme=oA();J_.render=Hme.render;J_.renderToFile=function(e,r,n,i){typeof i>"u"&&(i=n,n=void 0);let o=Q("fs"),s='<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">'+J_.render(r,n);o.writeFile(e,s,i)}});var e8=b(K_=>{var aA=ih();function Vme(t,e,r){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=r,e.width=r,e.style.height=r+"px",e.style.width=r+"px"}function Gme(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}K_.render=function(e,r,n){let i=n,o=r;typeof i>"u"&&(!r||!r.getContext)&&(i=r,r=void 0),r||(o=Gme()),i=aA.getOptions(i);let a=aA.getImageWidth(e.modules.size,i),s=o.getContext("2d"),l=s.createImageData(a,a);return aA.qrToImageData(l.data,e,i),Vme(s,o,a),s.putImageData(l,0,0),o};K_.renderToDataURL=function(e,r,n){let i=n;typeof i>"u"&&(!r||!r.getContext)&&(i=r,r=void 0),i||(i={});let o=K_.render(e,r,i),a=i.type||"image/png",s=i.rendererOpts||{};return o.toDataURL(a,s.quality)}});var r8=b(oh=>{var Wme=bT(),sA=LT(),t8=e8(),Jme=oA();function lA(t,e,r,n,i){let o=[].slice.call(arguments,1),a=o.length,s=typeof o[a-1]=="function";if(!s&&!Wme())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(i=r,r=e,e=n=void 0):a===3&&(e.getContext&&typeof i>"u"?(i=n,n=void 0):(i=n,n=r,r=e,e=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(r=e,e=n=void 0):a===2&&!e.getContext&&(n=r,r=e,e=void 0),new Promise(function(l,c){try{let u=sA.create(r,n);l(t(u,e,n))}catch(u){c(u)}})}try{let l=sA.create(r,n);i(null,t(l,e,n))}catch(l){i(l)}}oh.create=sA.create;oh.toCanvas=lA.bind(null,t8.render);oh.toDataURL=lA.bind(null,t8.renderToDataURL);oh.toString=lA.bind(null,function(t,e,r){return Jme.render(t,r)})});var a8=b(Va=>{var n8=bT(),cA=LT(),Kme=B3(),i8=U3(),Yme=K3(),o8=Q3();function ah(t,e,r){if(typeof t>"u")throw new Error("String required as first argument");if(typeof r>"u"&&(r=e,e={}),typeof r!="function")if(n8())e=r||{},r=null;else throw new Error("Callback required as last argument");return{opts:e,cb:r}}function Xme(t){return t.slice((t.lastIndexOf(".")-1>>>0)+2).toLowerCase()}function Y_(t){switch(t){case"svg":return o8;case"txt":case"utf8":return i8;case"png":case"image/png":default:return Kme}}function Qme(t){switch(t){case"svg":return o8;case"terminal":return Yme;case"utf8":default:return i8}}function sh(t,e,r){if(!r.cb)return new Promise(function(n,i){try{let o=cA.create(e,r.opts);return t(o,r.opts,function(a,s){return a?i(a):n(s)})}catch(o){i(o)}});try{let n=cA.create(e,r.opts);return t(n,r.opts,r.cb)}catch(n){r.cb(n)}}Va.create=cA.create;Va.toCanvas=r8().toCanvas;Va.toString=function(e,r,n){let i=ah(e,r,n),o=i.opts?i.opts.type:void 0,a=Qme(o);return sh(a.render,e,i)};Va.toDataURL=function(e,r,n){let i=ah(e,r,n),o=Y_(i.opts.type);return sh(o.renderToDataURL,e,i)};Va.toBuffer=function(e,r,n){let i=ah(e,r,n),o=Y_(i.opts.type);return sh(o.renderToBuffer,e,i)};Va.toFile=function(e,r,n,i){if(typeof e!="string"||!(typeof r=="string"||typeof r=="object"))throw new Error("Invalid argument");if(arguments.length<3&&!n8())throw new Error("Too few arguments provided");let o=ah(r,n,i),a=o.opts.type||Xme(e),l=Y_(a).renderToFile.bind(null,e);return sh(l,r,o)};Va.toFileStream=function(e,r,n){if(arguments.length<2)throw new Error("Too few arguments provided");let i=ah(r,n,e.emit.bind(e,"error")),a=Y_("png").renderToFileStream.bind(null,e);sh(a,r,i)}});var l8=b((IUe,s8)=>{s8.exports=a8()});var pA={};ks(pA,{clearAppCache:()=>tv,getCachePath:()=>ev,getIsolationKeyValue:()=>rge,getTenantId:()=>tge,isCacheValid:()=>nge,readAppCache:()=>xn,saveAppCache:()=>uh});import*as X_ from"node:path";import*as wn from"node:fs";import*as d8 from"node:crypto";function fA(t){return d8.createHash("sha256").update(t).digest("hex").substring(0,12)}function Q_(t){return t||Y.workspaceRoot}function ev(t){let e=Q_(t),r=fA(e);return X_.join(ege,r,"app.json")}function tge(t){let e=Q_(t);return fA(e)}function rge(t){return Q_(t)}function xn(t){let e=ev(t);if(!wn.existsSync(e))return null;try{let r=wn.readFileSync(e,"utf8"),n=JSON.parse(r);return n.developer_id&&n.app_id?n:null}catch(r){return console.error("Failed to read cache:",r),null}}function uh(t,e){let r=ev(e),n=X_.dirname(r),i=Q_(e),o=fA(i);try{wn.existsSync(n)||wn.mkdirSync(n,{recursive:!0});let a;if(wn.existsSync(r))try{a=JSON.parse(wn.readFileSync(r,"utf8"))._meta}catch{}let s={_meta:{source_path:i,tenant_id:o,created_at:(a==null?void 0:a.created_at)||Date.now()},...t,cached_at:Date.now()};wn.writeFileSync(r,JSON.stringify(s,null,2),"utf8")}catch(a){console.error("Failed to save cache:",a)}}function tv(t){let e=ev(t);if(wn.existsSync(e))try{wn.unlinkSync(e)}catch(r){console.error("Failed to clear cache:",r)}}function nge(t){let e=xn(t);return!!(e&&e.developer_id&&e.app_id)}var ege,Ga=yi(()=>{"use strict";Dn();ege=Y.cacheDir});var nv={};ks(nv,{AppStatus:()=>mA,ReviewStatus:()=>gA,SelectionRequiredError:()=>dh,createAppForDeveloper:()=>hA,createDeveloper:()=>ph,editAppInfo:()=>hh,ensureAppInfo:()=>cge,fetchAppDetail:()=>p8,getAllDevelopersAndApps:()=>fh,getAppStatus:()=>yA,refreshAppCache:()=>rv,selectApp:()=>yl,uploadImage:()=>_A});function ige(t){return{...t,is_level:!0,app_kind:"level"}}function oge(t){return{...t,is_level:!1,app_kind:"non_level"}}function age(t,e){return{developer_id:t,developer_name:e,apps:[],levels:[],crafts:[]}}function f8(t,e){t.apps.some(r=>r.app_id===e.app_id)||(t.apps.push(e),e.is_level!==!1&&t.levels.push(e),t.crafts=t.levels)}function sge(t,e){let r=new Map,n=[],i=(o,a)=>{let s=r.get(o);if(s)return!s.developer_name&&a&&(s.developer_name=a),s;let l=age(o,a);return r.set(o,l),n.push(o),l};for(let o of t.list||[]){let a=i(o.developer_id,o.developer_name);for(let s of o.levels||o.apps||o.crafts||[])f8(a,ige(s))}for(let o of e.list||[]){let a=i(o.developer_id,o.developer_name);for(let s of o.apps||[])f8(a,oge(s))}return{list:n.map(o=>r.get(o))}}async function fh(t){let e=new ft(t);try{let[r,n]=await Promise.all([e.get("/level/v1/list"),e.get("/level/v1/non-level-list")]);return sge(r,n)}catch(r){throw r instanceof Error?new Error(`Failed to get developers and apps list: ${r.message}`):new Error(`Failed to get developers and apps list: ${String(r)}`)}}async function ph(t){return await new ft(t).post("/v1/developer/create-register")}async function hA(t,e,r,n){return await new ft(n).post("/level/v1/create",{body:{developer_id:t,title:e,category:r}})}async function hh(t,e,r,n,i,o,a,s,l,c,u,d,f,p){return await new ft(p).post("/level/v1/submit",{body:{app_id:t,developer_id:e,package_id:r,title:n,category:i,description:o,chatting_label:a,chatting_number:s,screen_orientation:l,icon:c,banner:u,screenshots:d,trial_note:f}})}async function yA(t,e){return await new ft(e).get("/level/v1/status",{params:{app_id:t.toString()}})}async function p8(t,e){let r=new ft(e);try{let n=await r.get("/level/v1/latest",{params:{app_id:t.toString()}}),i=a=>({id:a.id,app_id:a.app_id,app_title:a.app_title,developer_id:a.developer_id,developer_name:a.developer_name,miniapp_id:a.miniapp_id,version:a.version,status:a.status,data:a.data}),o=a=>({id:a.id,app_id:a.app_id,app_title:a.app_title||a.form_data.info.title,developer_id:a.developer_id,developer_name:a.developer_name,miniapp_id:a.miniapp_id,version:a.version,status:a.status,form_data:a.form_data});return n.level?{appId:n.level.app_id,appTitle:n.level.app_title,displayAppTitle:n.level.data.title,developerId:n.level.developer_id,developerName:n.level.developer_name,miniappId:n.level.miniapp_id,level:i(n.level),uploadLevel:n.upload_level?o(n.upload_level):void 0}:n.upload_level?{appId:n.upload_level.app_id,appTitle:n.upload_level.app_title||n.upload_level.form_data.info.title,displayAppTitle:n.upload_level.form_data.info.title,developerId:n.upload_level.developer_id||0,developerName:n.upload_level.developer_name||"",miniappId:n.upload_level.miniapp_id,level:void 0,uploadLevel:o(n.upload_level)}:void 0}catch{return}}async function rv(t,e){let r=xn(t);if(!(r!=null&&r.app_id)||!(r!=null&&r.developer_id))throw new Error("No app selected to refresh");return await yl(r.developer_id,r.app_id,t,e)}async function cge(t,e,r=!1){let n=xn(t);if(!(n!=null&&n.developer_id)||!(n!=null&&n.app_id))return null;let i=Date.now(),o=!n.updated_at||i-n.updated_at>lge;if(r||o)try{return await rv(t,e)}catch{return{...n,is_stale:!0}}return n}async function yl(t,e,r,n){try{let i=await p8(e,n);if(!i)throw new Error(`App with ID ${e} not found`);if(t!==0&&i.developerId!==0&&i.developerId!==t)throw new Error(`App ${e} belongs to developer ${i.developerId}, not ${t}`);let o=xn(r),a={developer_id:i.developerId||t,developer_name:i.developerName||(o==null?void 0:o.developer_name),app_id:i.appId,app_title:i.appTitle,miniapp_id:i.miniappId,level:i.level,upload_level:i.uploadLevel,updated_at:Date.now(),status_updated_at:Date.now()};return uh(a,r),a}catch(i){throw i instanceof Error?new Error(`Failed to select app: ${i.message}`):new Error(`Failed to select app: ${String(i)}`)}}async function _A(t,e,r){let n=new ft(r),i=e.toLowerCase().split(".").pop(),a={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp"}[i||""]||"application/octet-stream";try{return(await n.postMultipart("/v1/upload-image",[{name:"image",value:t,filename:e,contentType:a}])).url}catch(s){throw s instanceof Error?new Error(`Failed to upload image: ${s.message}`):new Error(`Failed to upload image: ${String(s)}`)}}var dh,mA,gA,lge,_l=yi(()=>{"use strict";La();Ga();dh=class extends Error{constructor(r,n){super(r);this.developers=n;this.name="SelectionRequiredError"}};mA=(r=>(r[r.Offline=0]="Offline",r[r.Online=1]="Online",r))(mA||{}),gA=(i=>(i[i.Unpublished=0]="Unpublished",i[i.UnderReview=1]="UnderReview",i[i.Rejected=2]="Rejected",i[i.Published=4]="Published",i))(gA||{});lge=1440*60*1e3});var mU=b(($qe,hU)=>{var Dge=typeof process=="object"&&process&&process.platform==="win32";hU.exports=Dge?{sep:"\\"}:{sep:"/"}});var bU=b((Pqe,vU)=>{"use strict";vU.exports=yU;function yU(t,e,r){t instanceof RegExp&&(t=gU(t,r)),e instanceof RegExp&&(e=gU(e,r));var n=_U(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function gU(t,e){var r=e.match(t);return r?r[0]:null}yU.range=_U;function _U(t,e,r){var n,i,o,a,s,l=r.indexOf(t),c=r.indexOf(e,l+1),u=l;if(l>=0&&c>0){if(t===e)return[l,c];for(n=[],o=r.length;u>=0&&!s;)u==l?(n.push(u),l=r.indexOf(t,u+1)):n.length==1?s=[n.pop(),c]:(i=n.pop(),i<o&&(o=i,a=c),c=r.indexOf(e,u+1)),u=l<c&&l>=0?l:c;n.length&&(s=[o,a])}return s}});var NA=b((Tqe,PU)=>{var wU=bU();PU.exports=Nge;var xU="\0SLASH"+Math.random()+"\0",SU="\0OPEN"+Math.random()+"\0",MA="\0CLOSE"+Math.random()+"\0",EU="\0COMMA"+Math.random()+"\0",IU="\0PERIOD"+Math.random()+"\0";function OA(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function Oge(t){return t.split("\\\\").join(xU).split("\\{").join(SU).split("\\}").join(MA).split("\\,").join(EU).split("\\.").join(IU)}function Mge(t){return t.split(xU).join("\\").split(SU).join("{").split(MA).join("}").split(EU).join(",").split(IU).join(".")}function $U(t){if(!t)return[""];var e=[],r=wU("{","}",t);if(!r)return t.split(",");var n=r.pre,i=r.body,o=r.post,a=n.split(",");a[a.length-1]+="{"+i+"}";var s=$U(o);return o.length&&(a[a.length-1]+=s.shift(),a.push.apply(a,s)),e.push.apply(e,a),e}function Nge(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),vh(Oge(t),!0).map(Mge)):[]}function jge(t){return"{"+t+"}"}function zge(t){return/^-?0\d/.test(t)}function Lge(t,e){return t<=e}function Fge(t,e){return t>=e}function vh(t,e){var r=[],n=wU("{","}",t);if(!n)return[t];var i=n.pre,o=n.post.length?vh(n.post,!1):[""];if(/\$$/.test(n.pre))for(var a=0;a<o.length;a++){var s=i+"{"+n.body+"}"+o[a];r.push(s)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),u=l||c,d=n.body.indexOf(",")>=0;if(!u&&!d)return n.post.match(/,(?!,).*\}/)?(t=n.pre+"{"+n.body+MA+n.post,vh(t)):[t];var f;if(u)f=n.body.split(/\.\./);else if(f=$U(n.body),f.length===1&&(f=vh(f[0],!1).map(jge),f.length===1))return o.map(function(D){return n.pre+f[0]+D});var p;if(u){var h=OA(f[0]),m=OA(f[1]),y=Math.max(f[0].length,f[1].length),g=f.length==3?Math.abs(OA(f[2])):1,v=Lge,E=m<h;E&&(g*=-1,v=Fge);var x=f.some(zge);p=[];for(var w=h;v(w,m);w+=g){var A;if(c)A=String.fromCharCode(w),A==="\\"&&(A="");else if(A=String(w),x){var $=y-A.length;if($>0){var R=new Array($+1).join("0");w<0?A="-"+R+A.slice(1):A=R+A}}p.push(A)}}else{p=[];for(var T=0;T<f.length;T++)p.push.apply(p,vh(f[T],!1))}for(var T=0;T<p.length;T++)for(var a=0;a<o.length;a++){var s=i+p[T]+o[a];(!e||u||s)&&r.push(s)}}return r}});var DU=b((kqe,BA)=>{var Mn=BA.exports=(t,e,r={})=>(cv(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Iu(e,r).match(t));BA.exports=Mn;var LA=mU();Mn.sep=LA.sep;var Ri=Symbol("globstar **");Mn.GLOBSTAR=Ri;var Bge=NA(),TU={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},FA="[^/]",jA=FA+"*?",Uge="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",qge="(?:(?!(?:\\/|^)\\.).)*?",CU=t=>t.split("").reduce((e,r)=>(e[r]=!0,e),{}),AU=CU("().*{}+?[]^$\\!"),Zge=CU("[.("),kU=/\/+/;Mn.filter=(t,e={})=>(r,n,i)=>Mn(r,t,e);var ts=(t,e={})=>{let r={};return Object.keys(t).forEach(n=>r[n]=t[n]),Object.keys(e).forEach(n=>r[n]=e[n]),r};Mn.defaults=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Mn;let e=Mn,r=(n,i,o)=>e(n,i,ts(t,o));return r.Minimatch=class extends e.Minimatch{constructor(i,o){super(i,ts(t,o))}},r.Minimatch.defaults=n=>e.defaults(ts(t,n)).Minimatch,r.filter=(n,i)=>e.filter(n,ts(t,i)),r.defaults=n=>e.defaults(ts(t,n)),r.makeRe=(n,i)=>e.makeRe(n,ts(t,i)),r.braceExpand=(n,i)=>e.braceExpand(n,ts(t,i)),r.match=(n,i,o)=>e.match(n,i,ts(t,o)),r};Mn.braceExpand=(t,e)=>RU(t,e);var RU=(t,e={})=>(cv(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:Bge(t)),Hge=1024*64,cv=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>Hge)throw new TypeError("pattern is too long")},zA=Symbol("subparse");Mn.makeRe=(t,e)=>new Iu(t,e||{}).makeRe();Mn.match=(t,e,r={})=>{let n=new Iu(e,r);return t=t.filter(i=>n.match(i)),n.options.nonull&&!t.length&&t.push(e),t};var Vge=t=>t.replace(/\\(.)/g,"$1"),Gge=t=>t.replace(/\\([^-\]])/g,"$1"),Wge=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Jge=t=>t.replace(/[[\]\\]/g,"\\$&"),Iu=class{constructor(e,r){cv(e),r||(r={}),this.options=r,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.make()}debug(){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();let n=this.globSet=this.braceExpand();r.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,n),n=this.globParts=n.map(i=>i.split(kU)),this.debug(this.pattern,n),n=n.map((i,o,a)=>i.map(this.parse,this)),this.debug(this.pattern,n),n=n.filter(i=>i.indexOf(!1)===-1),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;let e=this.pattern,r=!1,n=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=e.slice(n)),this.negate=r}matchOne(e,r,n){var i=this.options;this.debug("matchOne",{this:this,file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var o=0,a=0,s=e.length,l=r.length;o<s&&a<l;o++,a++){this.debug("matchOne loop");var c=r[a],u=e[o];if(this.debug(r,c,u),c===!1)return!1;if(c===Ri){this.debug("GLOBSTAR",[r,c,u]);var d=o,f=a+1;if(f===l){for(this.debug("** at the end");o<s;o++)if(e[o]==="."||e[o]===".."||!i.dot&&e[o].charAt(0)===".")return!1;return!0}for(;d<s;){var p=e[d];if(this.debug(`
|
|
220
|
+
`;return typeof n=="function"&&n(null,f),f}});var Q3=b(J_=>{var Hme=oA();J_.render=Hme.render;J_.renderToFile=function(e,r,n,i){typeof i>"u"&&(i=n,n=void 0);let o=Q("fs"),s='<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">'+J_.render(r,n);o.writeFile(e,s,i)}});var e8=b(K_=>{var aA=ih();function Vme(t,e,r){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=r,e.width=r,e.style.height=r+"px",e.style.width=r+"px"}function Gme(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}K_.render=function(e,r,n){let i=n,o=r;typeof i>"u"&&(!r||!r.getContext)&&(i=r,r=void 0),r||(o=Gme()),i=aA.getOptions(i);let a=aA.getImageWidth(e.modules.size,i),s=o.getContext("2d"),l=s.createImageData(a,a);return aA.qrToImageData(l.data,e,i),Vme(s,o,a),s.putImageData(l,0,0),o};K_.renderToDataURL=function(e,r,n){let i=n;typeof i>"u"&&(!r||!r.getContext)&&(i=r,r=void 0),i||(i={});let o=K_.render(e,r,i),a=i.type||"image/png",s=i.rendererOpts||{};return o.toDataURL(a,s.quality)}});var r8=b(oh=>{var Wme=bT(),sA=LT(),t8=e8(),Jme=oA();function lA(t,e,r,n,i){let o=[].slice.call(arguments,1),a=o.length,s=typeof o[a-1]=="function";if(!s&&!Wme())throw new Error("Callback required as last argument");if(s){if(a<2)throw new Error("Too few arguments provided");a===2?(i=r,r=e,e=n=void 0):a===3&&(e.getContext&&typeof i>"u"?(i=n,n=void 0):(i=n,n=r,r=e,e=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(r=e,e=n=void 0):a===2&&!e.getContext&&(n=r,r=e,e=void 0),new Promise(function(l,c){try{let u=sA.create(r,n);l(t(u,e,n))}catch(u){c(u)}})}try{let l=sA.create(r,n);i(null,t(l,e,n))}catch(l){i(l)}}oh.create=sA.create;oh.toCanvas=lA.bind(null,t8.render);oh.toDataURL=lA.bind(null,t8.renderToDataURL);oh.toString=lA.bind(null,function(t,e,r){return Jme.render(t,r)})});var a8=b(Va=>{var n8=bT(),cA=LT(),Kme=B3(),i8=U3(),Yme=K3(),o8=Q3();function ah(t,e,r){if(typeof t>"u")throw new Error("String required as first argument");if(typeof r>"u"&&(r=e,e={}),typeof r!="function")if(n8())e=r||{},r=null;else throw new Error("Callback required as last argument");return{opts:e,cb:r}}function Xme(t){return t.slice((t.lastIndexOf(".")-1>>>0)+2).toLowerCase()}function Y_(t){switch(t){case"svg":return o8;case"txt":case"utf8":return i8;case"png":case"image/png":default:return Kme}}function Qme(t){switch(t){case"svg":return o8;case"terminal":return Yme;case"utf8":default:return i8}}function sh(t,e,r){if(!r.cb)return new Promise(function(n,i){try{let o=cA.create(e,r.opts);return t(o,r.opts,function(a,s){return a?i(a):n(s)})}catch(o){i(o)}});try{let n=cA.create(e,r.opts);return t(n,r.opts,r.cb)}catch(n){r.cb(n)}}Va.create=cA.create;Va.toCanvas=r8().toCanvas;Va.toString=function(e,r,n){let i=ah(e,r,n),o=i.opts?i.opts.type:void 0,a=Qme(o);return sh(a.render,e,i)};Va.toDataURL=function(e,r,n){let i=ah(e,r,n),o=Y_(i.opts.type);return sh(o.renderToDataURL,e,i)};Va.toBuffer=function(e,r,n){let i=ah(e,r,n),o=Y_(i.opts.type);return sh(o.renderToBuffer,e,i)};Va.toFile=function(e,r,n,i){if(typeof e!="string"||!(typeof r=="string"||typeof r=="object"))throw new Error("Invalid argument");if(arguments.length<3&&!n8())throw new Error("Too few arguments provided");let o=ah(r,n,i),a=o.opts.type||Xme(e),l=Y_(a).renderToFile.bind(null,e);return sh(l,r,o)};Va.toFileStream=function(e,r,n){if(arguments.length<2)throw new Error("Too few arguments provided");let i=ah(r,n,e.emit.bind(e,"error")),a=Y_("png").renderToFileStream.bind(null,e);sh(a,r,i)}});var l8=b((IUe,s8)=>{s8.exports=a8()});var pA={};ks(pA,{clearAppCache:()=>tv,getCachePath:()=>ev,getIsolationKeyValue:()=>rge,getTenantId:()=>tge,isCacheValid:()=>nge,readAppCache:()=>xn,saveAppCache:()=>uh});import*as X_ from"node:path";import*as wn from"node:fs";import*as d8 from"node:crypto";function fA(t){return d8.createHash("sha256").update(t).digest("hex").substring(0,12)}function Q_(t){return t||Y.workspaceRoot}function ev(t){let e=Q_(t),r=fA(e);return X_.join(ege,r,"app.json")}function tge(t){let e=Q_(t);return fA(e)}function rge(t){return Q_(t)}function xn(t){let e=ev(t);if(!wn.existsSync(e))return null;try{let r=wn.readFileSync(e,"utf8"),n=JSON.parse(r);return n.developer_id&&n.app_id?n:null}catch(r){return console.error("Failed to read cache:",r),null}}function uh(t,e){let r=ev(e),n=X_.dirname(r),i=Q_(e),o=fA(i);try{wn.existsSync(n)||wn.mkdirSync(n,{recursive:!0});let a;if(wn.existsSync(r))try{a=JSON.parse(wn.readFileSync(r,"utf8"))._meta}catch{}let s={_meta:{source_path:i,tenant_id:o,created_at:(a==null?void 0:a.created_at)||Date.now()},...t,cached_at:Date.now()};wn.writeFileSync(r,JSON.stringify(s,null,2),"utf8")}catch(a){console.error("Failed to save cache:",a)}}function tv(t){let e=ev(t);if(wn.existsSync(e))try{wn.unlinkSync(e)}catch(r){console.error("Failed to clear cache:",r)}}function nge(t){let e=xn(t);return!!(e&&e.developer_id&&e.app_id)}var ege,Ga=yi(()=>{"use strict";Dn();ege=Y.cacheDir});var nv={};ks(nv,{AppStatus:()=>mA,ReviewStatus:()=>gA,SelectionRequiredError:()=>dh,createAppForDeveloper:()=>hA,createDeveloper:()=>ph,editAppInfo:()=>hh,ensureAppInfo:()=>cge,fetchAppDetail:()=>p8,getAllDevelopersAndApps:()=>fh,getAppStatus:()=>yA,refreshAppCache:()=>rv,selectApp:()=>yl,uploadImage:()=>_A});function ige(t){return{...t,is_level:!0,app_kind:"level"}}function oge(t){return{...t,is_level:!1,app_kind:"non_level"}}function age(t,e){return{developer_id:t,developer_name:e,apps:[],levels:[],crafts:[]}}function f8(t,e){t.apps.some(r=>r.app_id===e.app_id)||(t.apps.push(e),e.is_level!==!1&&t.levels.push(e),t.crafts=t.levels)}function sge(t,e){let r=new Map,n=[],i=(o,a)=>{let s=r.get(o);if(s)return!s.developer_name&&a&&(s.developer_name=a),s;let l=age(o,a);return r.set(o,l),n.push(o),l};for(let o of t.list||[]){let a=i(o.developer_id,o.developer_name);for(let s of o.levels||o.apps||o.crafts||[])f8(a,ige(s))}for(let o of e.list||[]){let a=i(o.developer_id,o.developer_name);for(let s of o.apps||[])f8(a,oge(s))}return{list:n.map(o=>r.get(o))}}async function fh(t){let e=new ft(t);try{let[r,n]=await Promise.all([e.get("/level/v1/list"),e.get("/level/v1/non-level-list")]);return sge(r,n)}catch(r){throw r instanceof Error?new Error(`Failed to get developers and apps list: ${r.message}`):new Error(`Failed to get developers and apps list: ${String(r)}`)}}async function ph(t){return await new ft(t).post("/v1/developer/create-register")}async function hA(t,e,r,n){return await new ft(n).post("/level/v1/create",{body:{developer_id:t,title:e,category:r}})}async function hh(t,e,r,n,i,o,a,s,l,c,u,d,f,p){return await new ft(p).post("/level/v1/submit",{body:{app_id:t,developer_id:e,package_id:r,title:n,category:i,description:o,chatting_label:a,chatting_number:s,screen_orientation:l,icon:c,banner:u,screenshots:d,trial_note:f}})}async function yA(t,e){return await new ft(e).get("/level/v1/status",{params:{app_id:t.toString()}})}async function p8(t,e){let r=new ft(e);try{let n=await r.get("/level/v1/latest",{params:{app_id:t.toString()}}),i=a=>({id:a.id,app_id:a.app_id,app_title:a.app_title,developer_id:a.developer_id,developer_name:a.developer_name,miniapp_id:a.miniapp_id,version:a.version,status:a.status,data:a.data}),o=a=>({id:a.id,app_id:a.app_id,app_title:a.app_title||a.form_data.info.title,developer_id:a.developer_id,developer_name:a.developer_name,miniapp_id:a.miniapp_id,version:a.version,status:a.status,form_data:a.form_data});return n.level?{appId:n.level.app_id,appTitle:n.level.app_title,displayAppTitle:n.level.data.title,developerId:n.level.developer_id,developerName:n.level.developer_name,miniappId:n.level.miniapp_id,level:i(n.level),uploadLevel:n.upload_level?o(n.upload_level):void 0}:n.upload_level?{appId:n.upload_level.app_id,appTitle:n.upload_level.app_title||n.upload_level.form_data.info.title,displayAppTitle:n.upload_level.form_data.info.title,developerId:n.upload_level.developer_id||0,developerName:n.upload_level.developer_name||"",miniappId:n.upload_level.miniapp_id,level:void 0,uploadLevel:o(n.upload_level)}:void 0}catch{return}}async function rv(t,e){let r=xn(t);if(!(r!=null&&r.app_id)||!(r!=null&&r.developer_id))throw new Error("No app selected to refresh");return await yl(r.developer_id,r.app_id,t,e)}async function cge(t,e,r=!1){let n=xn(t);if(!(n!=null&&n.developer_id)||!(n!=null&&n.app_id))return null;let i=Date.now(),o=!n.updated_at||i-n.updated_at>lge;if(r||o)try{return await rv(t,e)}catch{return{...n,is_stale:!0}}return n}async function yl(t,e,r,n){try{let i=await p8(e,n);if(!i)throw new Error(`App with ID ${e} not found`);if(t!==0&&i.developerId!==0&&i.developerId!==t)throw new Error(`App ${e} belongs to developer ${i.developerId}, not ${t}`);let o=xn(r),a={developer_id:i.developerId||t,developer_name:i.developerName||(o==null?void 0:o.developer_name),app_id:i.appId,app_title:i.appTitle,miniapp_id:i.miniappId,level:i.level,upload_level:i.uploadLevel,updated_at:Date.now(),status_updated_at:Date.now()};return uh(a,r),a}catch(i){throw i instanceof Error?new Error(`Failed to select app: ${i.message}`):new Error(`Failed to select app: ${String(i)}`)}}async function _A(t,e,r){let n=new ft(r),i=e.toLowerCase().split(".").pop(),a={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp"}[i||""]||"application/octet-stream";try{return(await n.postMultipart("/v1/upload-image",[{name:"image",value:t,filename:e,contentType:a}])).url}catch(s){throw s instanceof Error?new Error(`Failed to upload image: ${s.message}`):new Error(`Failed to upload image: ${String(s)}`)}}var dh,mA,gA,lge,_l=yi(()=>{"use strict";La();Ga();dh=class extends Error{constructor(r,n){super(r);this.developers=n;this.name="SelectionRequiredError"}};mA=(r=>(r[r.Offline=0]="Offline",r[r.Online=1]="Online",r))(mA||{}),gA=(i=>(i[i.Unpublished=0]="Unpublished",i[i.UnderReview=1]="UnderReview",i[i.Rejected=2]="Rejected",i[i.Published=4]="Published",i))(gA||{});lge=1440*60*1e3});var mU=b(($qe,hU)=>{var Dge=typeof process=="object"&&process&&process.platform==="win32";hU.exports=Dge?{sep:"\\"}:{sep:"/"}});var bU=b((Pqe,vU)=>{"use strict";vU.exports=yU;function yU(t,e,r){t instanceof RegExp&&(t=gU(t,r)),e instanceof RegExp&&(e=gU(e,r));var n=_U(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function gU(t,e){var r=e.match(t);return r?r[0]:null}yU.range=_U;function _U(t,e,r){var n,i,o,a,s,l=r.indexOf(t),c=r.indexOf(e,l+1),u=l;if(l>=0&&c>0){if(t===e)return[l,c];for(n=[],o=r.length;u>=0&&!s;)u==l?(n.push(u),l=r.indexOf(t,u+1)):n.length==1?s=[n.pop(),c]:(i=n.pop(),i<o&&(o=i,a=c),c=r.indexOf(e,u+1)),u=l<c&&l>=0?l:c;n.length&&(s=[o,a])}return s}});var NA=b((Tqe,PU)=>{var wU=bU();PU.exports=Nge;var xU="\0SLASH"+Math.random()+"\0",SU="\0OPEN"+Math.random()+"\0",MA="\0CLOSE"+Math.random()+"\0",EU="\0COMMA"+Math.random()+"\0",IU="\0PERIOD"+Math.random()+"\0";function OA(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function Oge(t){return t.split("\\\\").join(xU).split("\\{").join(SU).split("\\}").join(MA).split("\\,").join(EU).split("\\.").join(IU)}function Mge(t){return t.split(xU).join("\\").split(SU).join("{").split(MA).join("}").split(EU).join(",").split(IU).join(".")}function $U(t){if(!t)return[""];var e=[],r=wU("{","}",t);if(!r)return t.split(",");var n=r.pre,i=r.body,o=r.post,a=n.split(",");a[a.length-1]+="{"+i+"}";var s=$U(o);return o.length&&(a[a.length-1]+=s.shift(),a.push.apply(a,s)),e.push.apply(e,a),e}function Nge(t){return t?(t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),vh(Oge(t),!0).map(Mge)):[]}function jge(t){return"{"+t+"}"}function zge(t){return/^-?0\d/.test(t)}function Lge(t,e){return t<=e}function Fge(t,e){return t>=e}function vh(t,e){var r=[],n=wU("{","}",t);if(!n)return[t];var i=n.pre,o=n.post.length?vh(n.post,!1):[""];if(/\$$/.test(n.pre))for(var a=0;a<o.length;a++){var s=i+"{"+n.body+"}"+o[a];r.push(s)}else{var l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),u=l||c,d=n.body.indexOf(",")>=0;if(!u&&!d)return n.post.match(/,(?!,).*\}/)?(t=n.pre+"{"+n.body+MA+n.post,vh(t)):[t];var f;if(u)f=n.body.split(/\.\./);else if(f=$U(n.body),f.length===1&&(f=vh(f[0],!1).map(jge),f.length===1))return o.map(function(D){return n.pre+f[0]+D});var p;if(u){var h=OA(f[0]),m=OA(f[1]),y=Math.max(f[0].length,f[1].length),g=f.length==3?Math.abs(OA(f[2])):1,v=Lge,E=m<h;E&&(g*=-1,v=Fge);var x=f.some(zge);p=[];for(var w=h;v(w,m);w+=g){var k;if(c)k=String.fromCharCode(w),k==="\\"&&(k="");else if(k=String(w),x){var P=y-k.length;if(P>0){var R=new Array(P+1).join("0");w<0?k="-"+R+k.slice(1):k=R+k}}p.push(k)}}else{p=[];for(var T=0;T<f.length;T++)p.push.apply(p,vh(f[T],!1))}for(var T=0;T<p.length;T++)for(var a=0;a<o.length;a++){var s=i+p[T]+o[a];(!e||u||s)&&r.push(s)}}return r}});var DU=b((kqe,BA)=>{var Mn=BA.exports=(t,e,r={})=>(cv(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Iu(e,r).match(t));BA.exports=Mn;var LA=mU();Mn.sep=LA.sep;var Ri=Symbol("globstar **");Mn.GLOBSTAR=Ri;var Bge=NA(),TU={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},FA="[^/]",jA=FA+"*?",Uge="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",qge="(?:(?!(?:\\/|^)\\.).)*?",CU=t=>t.split("").reduce((e,r)=>(e[r]=!0,e),{}),AU=CU("().*{}+?[]^$\\!"),Zge=CU("[.("),kU=/\/+/;Mn.filter=(t,e={})=>(r,n,i)=>Mn(r,t,e);var ts=(t,e={})=>{let r={};return Object.keys(t).forEach(n=>r[n]=t[n]),Object.keys(e).forEach(n=>r[n]=e[n]),r};Mn.defaults=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return Mn;let e=Mn,r=(n,i,o)=>e(n,i,ts(t,o));return r.Minimatch=class extends e.Minimatch{constructor(i,o){super(i,ts(t,o))}},r.Minimatch.defaults=n=>e.defaults(ts(t,n)).Minimatch,r.filter=(n,i)=>e.filter(n,ts(t,i)),r.defaults=n=>e.defaults(ts(t,n)),r.makeRe=(n,i)=>e.makeRe(n,ts(t,i)),r.braceExpand=(n,i)=>e.braceExpand(n,ts(t,i)),r.match=(n,i,o)=>e.match(n,i,ts(t,o)),r};Mn.braceExpand=(t,e)=>RU(t,e);var RU=(t,e={})=>(cv(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:Bge(t)),Hge=1024*64,cv=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>Hge)throw new TypeError("pattern is too long")},zA=Symbol("subparse");Mn.makeRe=(t,e)=>new Iu(t,e||{}).makeRe();Mn.match=(t,e,r={})=>{let n=new Iu(e,r);return t=t.filter(i=>n.match(i)),n.options.nonull&&!t.length&&t.push(e),t};var Vge=t=>t.replace(/\\(.)/g,"$1"),Gge=t=>t.replace(/\\([^-\]])/g,"$1"),Wge=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Jge=t=>t.replace(/[[\]\\]/g,"\\$&"),Iu=class{constructor(e,r){cv(e),r||(r={}),this.options=r,this.set=[],this.pattern=e,this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.make()}debug(){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate();let n=this.globSet=this.braceExpand();r.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,n),n=this.globParts=n.map(i=>i.split(kU)),this.debug(this.pattern,n),n=n.map((i,o,a)=>i.map(this.parse,this)),this.debug(this.pattern,n),n=n.filter(i=>i.indexOf(!1)===-1),this.debug(this.pattern,n),this.set=n}parseNegate(){if(this.options.nonegate)return;let e=this.pattern,r=!1,n=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=e.slice(n)),this.negate=r}matchOne(e,r,n){var i=this.options;this.debug("matchOne",{this:this,file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var o=0,a=0,s=e.length,l=r.length;o<s&&a<l;o++,a++){this.debug("matchOne loop");var c=r[a],u=e[o];if(this.debug(r,c,u),c===!1)return!1;if(c===Ri){this.debug("GLOBSTAR",[r,c,u]);var d=o,f=a+1;if(f===l){for(this.debug("** at the end");o<s;o++)if(e[o]==="."||e[o]===".."||!i.dot&&e[o].charAt(0)===".")return!1;return!0}for(;d<s;){var p=e[d];if(this.debug(`
|
|
221
221
|
globstar while`,e,d,r,f,p),this.matchOne(e.slice(d),r.slice(f),n))return this.debug("globstar found match!",d,s,p),!0;if(p==="."||p===".."||!i.dot&&p.charAt(0)==="."){this.debug("dot detected!",e,d,r,f);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(n&&(this.debug(`
|
|
222
|
-
>>> no match, partial?`,e,d,r,f),d===s))}var h;if(typeof c=="string"?(h=u===c,this.debug("string match",c,u,h)):(h=u.match(c),this.debug("pattern match",c,u,h)),!h)return!1}if(o===s&&a===l)return!0;if(o===s)return n;if(a===l)return o===s-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return RU(this.pattern,this.options)}parse(e,r){cv(e);let n=this.options;if(e==="**")if(n.noglobstar)e="*";else return Ri;if(e==="")return"";let i="",o=!1,a=!1,s=[],l=[],c,u=!1,d=-1,f=-1,p,h,m,y=e.charAt(0)===".",g=n.dot||y,v=()=>y?"":g?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",E
|
|
223
|
-
%s`,$,$,h,i);let R=h.type==="*"?jA:h.type==="?"?FA:"\\"+h.type;o=!0,i=i.slice(0,h.reStart)+R+"\\("+$}x(),a&&(i+="\\\\");let w=Zge[i.charAt(0)];for(let $=l.length-1;$>-1;$--){let R=l[$],T=i.slice(0,R.reStart),D=i.slice(R.reStart,R.reEnd-8),k=i.slice(R.reEnd),M=i.slice(R.reEnd-8,R.reEnd)+k,U=T.split(")").length,z=T.split("(").length-U,X=k;for(let re=0;re<z;re++)X=X.replace(/\)[+*?]?/,"");k=X;let K=k===""&&r!==zA?"(?:$|\\/)":"";i=T+D+k+K+M}if(i!==""&&o&&(i="(?=.)"+i),w&&(i=v()+i),r===zA)return[i,o];if(n.nocase&&!o&&(o=e.toUpperCase()!==e.toLowerCase()),!o)return Vge(e);let A=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+i+"$",A),{_glob:e,_src:i})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?jA:r.dot?Uge:qge,i=r.nocase?"i":"",o=e.map(a=>(a=a.map(s=>typeof s=="string"?Wge(s):s===Ri?Ri:s._src).reduce((s,l)=>(s[s.length-1]===Ri&&l===Ri||s.push(l),s),[]),a.forEach((s,l)=>{s!==Ri||a[l-1]===Ri||(l===0?a.length>1?a[l+1]="(?:\\/|"+n+"\\/)?"+a[l+1]:a[l]=n:l===a.length-1?a[l-1]+="(?:\\/|"+n+")?":(a[l-1]+="(?:\\/|\\/"+n+"\\/)"+a[l+1],a[l+1]=Ri))}),a.filter(s=>s!==Ri).join("/"))).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,i)}catch{this.regexp=!1}return this.regexp}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;LA.sep!=="/"&&(e=e.split(LA.sep).join("/")),e=e.split(kU),this.debug(this.pattern,"split",e);let i=this.set;this.debug(this.pattern,"set",i);let o;for(let a=e.length-1;a>=0&&(o=e[a],!o);a--);for(let a=0;a<i.length;a++){let s=i[a],l=e;if(n.matchBase&&s.length===1&&(l=[o]),this.matchOne(l,s,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return Mn.defaults(e).Minimatch}};Mn.Minimatch=Iu});var zU=b((Cqe,jU)=>{jU.exports=NU;var qA=Q("fs"),{EventEmitter:Kge}=Q("events"),{Minimatch:UA}=DU(),{resolve:Yge}=Q("path");function Xge(t,e){return new Promise((r,n)=>{qA.readdir(t,{withFileTypes:!0},(i,o)=>{if(i)switch(i.code){case"ENOTDIR":e?n(i):r([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":r([]);break;case"ELOOP":default:n(i);break}else r(o)})})}function OU(t,e){return new Promise((r,n)=>{(e?qA.stat:qA.lstat)(t,(o,a)=>{if(o)switch(o.code){case"ENOENT":r(e?OU(t,!1):null);break;default:r(null);break}else r(a)})})}async function*MU(t,e,r,n,i,o){let a=await Xge(e+t,o);for(let s of a){let l=s.name;l===void 0&&(l=s,n=!0);let c=t+"/"+l,u=c.slice(1),d=e+"/"+u,f=null;(n||r)&&(f=await OU(d,r)),!f&&s.name!==void 0&&(f=s),f===null&&(f={isDirectory:()=>!1}),f.isDirectory()?i(u)||(yield{relative:u,absolute:d,stats:f},yield*MU(c,e,r,n,i,!1)):yield{relative:u,absolute:d,stats:f}}}async function*Qge(t,e,r,n){yield*MU("",t,e,r,n,!0)}function e0e(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}var uv=class extends Kge{constructor(e,r,n){if(super(),typeof r=="function"&&(n=r,r=null),this.options=e0e(r||{}),this.matchers=[],this.options.pattern){let i=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=i.map(o=>new UA(o,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let i=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=i.map(o=>new UA(o,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let i=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=i.map(o=>new UA(o,{dot:!0}))}this.iterator=Qge(Yge(e||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,n&&(this._matches=[],this.on("match",i=>this._matches.push(this.options.absolute?i.absolute:i.relative)),this.on("error",i=>n(i)),this.on("end",()=>n(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(e){return this.skipMatchers.some(r=>r.match(e))}_fileMatches(e,r){let n=e+(r?"/":"");return(this.matchers.length===0||this.matchers.some(i=>i.match(n)))&&!this.ignoreMatchers.some(i=>i.match(n))&&(!this.options.nodir||!r)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(e=>{if(e.done)this.emit("end");else{let r=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,r)){let n=e.value.relative,i=e.value.absolute;this.options.mark&&r&&(n+="/",i+="/"),this.options.stat?this.emit("match",{relative:n,absolute:i,stat:e.value.stats}):this.emit("match",{relative:n,absolute:i})}this._next(this.iterator)}}).catch(e=>{this.abort(),this.emit("error",e),!e.code&&!this.options.silent&&console.error(e)}):this.inactive=!0}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}};function NU(t,e,r){return new uv(t,e,r)}NU.ReaddirGlob=uv});var FU=b((dv,LU)=>{(function(t,e){typeof dv=="object"&&typeof LU<"u"?e(dv):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.async={}))})(dv,(function(t){"use strict";function e(I,...S){return(...P)=>I(...S,...P)}function r(I){return function(...S){var P=S.pop();return I.call(this,S,P)}}var n=typeof queueMicrotask=="function"&&queueMicrotask,i=typeof setImmediate=="function"&&setImmediate,o=typeof process=="object"&&typeof process.nextTick=="function";function a(I){setTimeout(I,0)}function s(I){return(S,...P)=>I(()=>S(...P))}var l;n?l=queueMicrotask:i?l=setImmediate:o?l=process.nextTick:l=a;var c=s(l);function u(I){return p(I)?function(...S){let P=S.pop(),C=I.apply(this,S);return d(C,P)}:r(function(S,P){var C;try{C=I.apply(this,S)}catch(N){return P(N)}if(C&&typeof C.then=="function")return d(C,P);P(null,C)})}function d(I,S){return I.then(P=>{f(S,null,P)},P=>{f(S,P&&(P instanceof Error||P.message)?P:new Error(P))})}function f(I,S,P){try{I(S,P)}catch(C){c(N=>{throw N},C)}}function p(I){return I[Symbol.toStringTag]==="AsyncFunction"}function h(I){return I[Symbol.toStringTag]==="AsyncGenerator"}function m(I){return typeof I[Symbol.asyncIterator]=="function"}function y(I){if(typeof I!="function")throw new Error("expected a function");return p(I)?u(I):I}function g(I,S){if(S||(S=I.length),!S)throw new Error("arity is undefined");function P(...C){return typeof C[S-1]=="function"?I.apply(this,C):new Promise((N,j)=>{C[S-1]=(B,...q)=>{if(B)return j(B);N(q.length>1?q:q[0])},I.apply(this,C)})}return P}function v(I){return function(P,...C){return g(function(j){var B=this;return I(P,(q,V)=>{y(q).apply(B,C.concat(V))},j)})}}function E(I,S,P,C){S=S||[];var N=[],j=0,B=y(P);return I(S,(q,V,ce)=>{var Ye=j++;B(q,(ut,et)=>{N[Ye]=et,ce(ut)})},q=>{C(q,N)})}function x(I){return I&&typeof I.length=="number"&&I.length>=0&&I.length%1===0}let w={};function A(I){function S(...P){if(I!==null){var C=I;I=null,C.apply(this,P)}}return Object.assign(S,I),S}function $(I){return I[Symbol.iterator]&&I[Symbol.iterator]()}function R(I){var S=-1,P=I.length;return function(){return++S<P?{value:I[S],key:S}:null}}function T(I){var S=-1;return function(){var C=I.next();return C.done?null:(S++,{value:C.value,key:S})}}function D(I){var S=I?Object.keys(I):[],P=-1,C=S.length;return function N(){var j=S[++P];return j==="__proto__"?N():P<C?{value:I[j],key:j}:null}}function k(I){if(x(I))return R(I);var S=$(I);return S?T(S):D(I)}function M(I){return function(...S){if(I===null)throw new Error("Callback was already called.");var P=I;I=null,P.apply(this,S)}}function U(I,S,P,C){let N=!1,j=!1,B=!1,q=0,V=0;function ce(){q>=S||B||N||(B=!0,I.next().then(({value:et,done:qn})=>{if(!(j||N)){if(B=!1,qn){N=!0,q<=0&&C(null);return}q++,P(et,V,Ye),V++,ce()}}).catch(ut))}function Ye(et,qn){if(q-=1,!j){if(et)return ut(et);if(et===!1){N=!0,j=!0;return}if(qn===w||N&&q<=0)return N=!0,C(null);ce()}}function ut(et){j||(B=!1,N=!0,C(et))}ce()}var z=I=>(S,P,C)=>{if(C=A(C),I<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!S)return C(null);if(h(S))return U(S,I,P,C);if(m(S))return U(S[Symbol.asyncIterator](),I,P,C);var N=k(S),j=!1,B=!1,q=0,V=!1;function ce(ut,et){if(!B)if(q-=1,ut)j=!0,C(ut);else if(ut===!1)j=!0,B=!0;else{if(et===w||j&&q<=0)return j=!0,C(null);V||Ye()}}function Ye(){for(V=!0;q<I&&!j;){var ut=N();if(ut===null){j=!0,q<=0&&C(null);return}q+=1,P(ut.value,ut.key,M(ce))}V=!1}Ye()};function X(I,S,P,C){return z(S)(I,y(P),C)}var K=g(X,4);function re(I,S,P){P=A(P);var C=0,N=0,{length:j}=I,B=!1;j===0&&P(null);function q(V,ce){V===!1&&(B=!0),B!==!0&&(V?P(V):(++N===j||ce===w)&&P(null))}for(;C<j;C++)S(I[C],C,M(q))}function pe(I,S,P){return K(I,1/0,S,P)}function F(I,S,P){var C=x(I)?re:pe;return C(I,y(S),P)}var Z=g(F,3);function W(I,S,P){return E(Z,I,S,P)}var H=g(W,3),Et=v(H);function _t(I,S,P){return K(I,1,S,P)}var kt=g(_t,3);function Me(I,S,P){return E(kt,I,S,P)}var bo=g(Me,3),wo=v(bo);let Fi=Symbol("promiseCallback");function Fn(){let I,S;function P(C,...N){if(C)return S(C);I(N.length>1?N:N[0])}return P[Fi]=new Promise((C,N)=>{I=C,S=N}),P}function Vr(I,S,P){typeof S!="number"&&(P=S,S=null),P=A(P||Fn());var C=Object.keys(I).length;if(!C)return P(null);S||(S=C);var N={},j=0,B=!1,q=!1,V=Object.create(null),ce=[],Ye=[],ut={};Object.keys(I).forEach(se=>{var me=I[se];if(!Array.isArray(me)){et(se,[me]),Ye.push(se);return}var tt=me.slice(0,me.length-1),Zt=tt.length;if(Zt===0){et(se,me),Ye.push(se);return}ut[se]=Zt,tt.forEach(ur=>{if(!I[ur])throw new Error("async.auto task `"+se+"` has a non-existent dependency `"+ur+"` in "+tt.join(", "));ec(ur,()=>{Zt--,Zt===0&&et(se,me)})})}),dt(),qn();function et(se,me){ce.push(()=>Pd(se,me))}function qn(){if(!B){if(ce.length===0&&j===0)return P(null,N);for(;ce.length&&j<S;){var se=ce.shift();se()}}}function ec(se,me){var tt=V[se];tt||(tt=V[se]=[]),tt.push(me)}function Ts(se){var me=V[se]||[];me.forEach(tt=>tt()),qn()}function Pd(se,me){if(!q){var tt=M((ur,...Zn)=>{if(j--,ur===!1){B=!0;return}if(Zn.length<2&&([Zn]=Zn),ur){var tc={};if(Object.keys(N).forEach(As=>{tc[As]=N[As]}),tc[se]=Zn,q=!0,V=Object.create(null),B)return;P(ur,tc)}else N[se]=Zn,Ts(se)});j++;var Zt=y(me[me.length-1]);me.length>1?Zt(N,tt):Zt(tt)}}function dt(){for(var se,me=0;Ye.length;)se=Ye.pop(),me++,he(se).forEach(tt=>{--ut[tt]===0&&Ye.push(tt)});if(me!==C)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function he(se){var me=[];return Object.keys(I).forEach(tt=>{let Zt=I[tt];Array.isArray(Zt)&&Zt.indexOf(se)>=0&&me.push(tt)}),me}return P[Fi]}var Gr=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,Wl=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,xs=/,/,Jl=/(=.+)?(\s*)$/;function Ss(I){let S="",P=0,C=I.indexOf("*/");for(;P<I.length;)if(I[P]==="/"&&I[P+1]==="/"){let N=I.indexOf(`
|
|
224
|
-
|
|
222
|
+
>>> no match, partial?`,e,d,r,f),d===s))}var h;if(typeof c=="string"?(h=u===c,this.debug("string match",c,u,h)):(h=u.match(c),this.debug("pattern match",c,u,h)),!h)return!1}if(o===s&&a===l)return!0;if(o===s)return n;if(a===l)return o===s-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return RU(this.pattern,this.options)}parse(e,r){cv(e);let n=this.options;if(e==="**")if(n.noglobstar)e="*";else return Ri;if(e==="")return"";let i="",o=!1,a=!1,s=[],l=[],c,u=!1,d=-1,f=-1,p,h,m,y=e.charAt(0)===".",g=n.dot||y,v=()=>y?"":g?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",E=P=>P.charAt(0)==="."?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",x=()=>{if(c){switch(c){case"*":i+=jA,o=!0;break;case"?":i+=FA,o=!0;break;default:i+="\\"+c;break}this.debug("clearStateChar %j %j",c,i),c=!1}};for(let P=0,R;P<e.length&&(R=e.charAt(P));P++){if(this.debug("%s %s %s %j",e,P,i,R),a){if(R==="/")return!1;AU[R]&&(i+="\\"),i+=R,a=!1;continue}switch(R){case"/":return!1;case"\\":if(u&&e.charAt(P+1)==="-"){i+=R;continue}x(),a=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",e,P,i,R),u){this.debug(" in class"),R==="!"&&P===f+1&&(R="^"),i+=R;continue}this.debug("call clearStateChar %j",c),x(),c=R,n.noext&&x();continue;case"(":{if(u){i+="(";continue}if(!c){i+="\\(";continue}let T={type:c,start:P-1,reStart:i.length,open:TU[c].open,close:TU[c].close};this.debug(this.pattern," ",T),s.push(T),i+=T.open,T.start===0&&T.type!=="!"&&(y=!0,i+=E(e.slice(P+1))),this.debug("plType %j %j",c,i),c=!1;continue}case")":{let T=s[s.length-1];if(u||!T){i+="\\)";continue}s.pop(),x(),o=!0,h=T,i+=h.close,h.type==="!"&&l.push(Object.assign(h,{reEnd:i.length}));continue}case"|":{let T=s[s.length-1];if(u||!T){i+="\\|";continue}x(),i+="|",T.start===0&&T.type!=="!"&&(y=!0,i+=E(e.slice(P+1)));continue}case"[":if(x(),u){i+="\\"+R;continue}u=!0,f=P,d=i.length,i+=R;continue;case"]":if(P===f+1||!u){i+="\\"+R;continue}p=e.substring(f+1,P);try{RegExp("["+Jge(Gge(p))+"]"),i+=R}catch{i=i.substring(0,d)+"(?:$.)"}o=!0,u=!1;continue;default:x(),AU[R]&&!(R==="^"&&u)&&(i+="\\"),i+=R;break}}for(u&&(p=e.slice(f+1),m=this.parse(p,zA),i=i.substring(0,d)+"\\["+m[0],o=o||m[1]),h=s.pop();h;h=s.pop()){let P;P=i.slice(h.reStart+h.open.length),this.debug("setting tail",i,h),P=P.replace(/((?:\\{2}){0,64})(\\?)\|/g,(T,D,A)=>(A||(A="\\"),D+D+A+"|")),this.debug(`tail=%j
|
|
223
|
+
%s`,P,P,h,i);let R=h.type==="*"?jA:h.type==="?"?FA:"\\"+h.type;o=!0,i=i.slice(0,h.reStart)+R+"\\("+P}x(),a&&(i+="\\\\");let w=Zge[i.charAt(0)];for(let P=l.length-1;P>-1;P--){let R=l[P],T=i.slice(0,R.reStart),D=i.slice(R.reStart,R.reEnd-8),A=i.slice(R.reEnd),M=i.slice(R.reEnd-8,R.reEnd)+A,U=T.split(")").length,z=T.split("(").length-U,X=A;for(let re=0;re<z;re++)X=X.replace(/\)[+*?]?/,"");A=X;let K=A===""&&r!==zA?"(?:$|\\/)":"";i=T+D+A+K+M}if(i!==""&&o&&(i="(?=.)"+i),w&&(i=v()+i),r===zA)return[i,o];if(n.nocase&&!o&&(o=e.toUpperCase()!==e.toLowerCase()),!o)return Vge(e);let k=n.nocase?"i":"";try{return Object.assign(new RegExp("^"+i+"$",k),{_glob:e,_src:i})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?jA:r.dot?Uge:qge,i=r.nocase?"i":"",o=e.map(a=>(a=a.map(s=>typeof s=="string"?Wge(s):s===Ri?Ri:s._src).reduce((s,l)=>(s[s.length-1]===Ri&&l===Ri||s.push(l),s),[]),a.forEach((s,l)=>{s!==Ri||a[l-1]===Ri||(l===0?a.length>1?a[l+1]="(?:\\/|"+n+"\\/)?"+a[l+1]:a[l]=n:l===a.length-1?a[l-1]+="(?:\\/|"+n+")?":(a[l-1]+="(?:\\/|\\/"+n+"\\/)"+a[l+1],a[l+1]=Ri))}),a.filter(s=>s!==Ri).join("/"))).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,i)}catch{this.regexp=!1}return this.regexp}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;LA.sep!=="/"&&(e=e.split(LA.sep).join("/")),e=e.split(kU),this.debug(this.pattern,"split",e);let i=this.set;this.debug(this.pattern,"set",i);let o;for(let a=e.length-1;a>=0&&(o=e[a],!o);a--);for(let a=0;a<i.length;a++){let s=i[a],l=e;if(n.matchBase&&s.length===1&&(l=[o]),this.matchOne(l,s,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return Mn.defaults(e).Minimatch}};Mn.Minimatch=Iu});var zU=b((Cqe,jU)=>{jU.exports=NU;var qA=Q("fs"),{EventEmitter:Kge}=Q("events"),{Minimatch:UA}=DU(),{resolve:Yge}=Q("path");function Xge(t,e){return new Promise((r,n)=>{qA.readdir(t,{withFileTypes:!0},(i,o)=>{if(i)switch(i.code){case"ENOTDIR":e?n(i):r([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":r([]);break;case"ELOOP":default:n(i);break}else r(o)})})}function OU(t,e){return new Promise((r,n)=>{(e?qA.stat:qA.lstat)(t,(o,a)=>{if(o)switch(o.code){case"ENOENT":r(e?OU(t,!1):null);break;default:r(null);break}else r(a)})})}async function*MU(t,e,r,n,i,o){let a=await Xge(e+t,o);for(let s of a){let l=s.name;l===void 0&&(l=s,n=!0);let c=t+"/"+l,u=c.slice(1),d=e+"/"+u,f=null;(n||r)&&(f=await OU(d,r)),!f&&s.name!==void 0&&(f=s),f===null&&(f={isDirectory:()=>!1}),f.isDirectory()?i(u)||(yield{relative:u,absolute:d,stats:f},yield*MU(c,e,r,n,i,!1)):yield{relative:u,absolute:d,stats:f}}}async function*Qge(t,e,r,n){yield*MU("",t,e,r,n,!0)}function e0e(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}var uv=class extends Kge{constructor(e,r,n){if(super(),typeof r=="function"&&(n=r,r=null),this.options=e0e(r||{}),this.matchers=[],this.options.pattern){let i=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=i.map(o=>new UA(o,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){let i=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=i.map(o=>new UA(o,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){let i=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=i.map(o=>new UA(o,{dot:!0}))}this.iterator=Qge(Yge(e||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,n&&(this._matches=[],this.on("match",i=>this._matches.push(this.options.absolute?i.absolute:i.relative)),this.on("error",i=>n(i)),this.on("end",()=>n(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(e){return this.skipMatchers.some(r=>r.match(e))}_fileMatches(e,r){let n=e+(r?"/":"");return(this.matchers.length===0||this.matchers.some(i=>i.match(n)))&&!this.ignoreMatchers.some(i=>i.match(n))&&(!this.options.nodir||!r)}_next(){!this.paused&&!this.aborted?this.iterator.next().then(e=>{if(e.done)this.emit("end");else{let r=e.value.stats.isDirectory();if(this._fileMatches(e.value.relative,r)){let n=e.value.relative,i=e.value.absolute;this.options.mark&&r&&(n+="/",i+="/"),this.options.stat?this.emit("match",{relative:n,absolute:i,stat:e.value.stats}):this.emit("match",{relative:n,absolute:i})}this._next(this.iterator)}}).catch(e=>{this.abort(),this.emit("error",e),!e.code&&!this.options.silent&&console.error(e)}):this.inactive=!0}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}};function NU(t,e,r){return new uv(t,e,r)}NU.ReaddirGlob=uv});var FU=b((dv,LU)=>{(function(t,e){typeof dv=="object"&&typeof LU<"u"?e(dv):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.async={}))})(dv,(function(t){"use strict";function e(I,...S){return(...$)=>I(...S,...$)}function r(I){return function(...S){var $=S.pop();return I.call(this,S,$)}}var n=typeof queueMicrotask=="function"&&queueMicrotask,i=typeof setImmediate=="function"&&setImmediate,o=typeof process=="object"&&typeof process.nextTick=="function";function a(I){setTimeout(I,0)}function s(I){return(S,...$)=>I(()=>S(...$))}var l;n?l=queueMicrotask:i?l=setImmediate:o?l=process.nextTick:l=a;var c=s(l);function u(I){return p(I)?function(...S){let $=S.pop(),C=I.apply(this,S);return d(C,$)}:r(function(S,$){var C;try{C=I.apply(this,S)}catch(N){return $(N)}if(C&&typeof C.then=="function")return d(C,$);$(null,C)})}function d(I,S){return I.then($=>{f(S,null,$)},$=>{f(S,$&&($ instanceof Error||$.message)?$:new Error($))})}function f(I,S,$){try{I(S,$)}catch(C){c(N=>{throw N},C)}}function p(I){return I[Symbol.toStringTag]==="AsyncFunction"}function h(I){return I[Symbol.toStringTag]==="AsyncGenerator"}function m(I){return typeof I[Symbol.asyncIterator]=="function"}function y(I){if(typeof I!="function")throw new Error("expected a function");return p(I)?u(I):I}function g(I,S){if(S||(S=I.length),!S)throw new Error("arity is undefined");function $(...C){return typeof C[S-1]=="function"?I.apply(this,C):new Promise((N,j)=>{C[S-1]=(B,...q)=>{if(B)return j(B);N(q.length>1?q:q[0])},I.apply(this,C)})}return $}function v(I){return function($,...C){return g(function(j){var B=this;return I($,(q,V)=>{y(q).apply(B,C.concat(V))},j)})}}function E(I,S,$,C){S=S||[];var N=[],j=0,B=y($);return I(S,(q,V,ce)=>{var Ye=j++;B(q,(ut,et)=>{N[Ye]=et,ce(ut)})},q=>{C(q,N)})}function x(I){return I&&typeof I.length=="number"&&I.length>=0&&I.length%1===0}let w={};function k(I){function S(...$){if(I!==null){var C=I;I=null,C.apply(this,$)}}return Object.assign(S,I),S}function P(I){return I[Symbol.iterator]&&I[Symbol.iterator]()}function R(I){var S=-1,$=I.length;return function(){return++S<$?{value:I[S],key:S}:null}}function T(I){var S=-1;return function(){var C=I.next();return C.done?null:(S++,{value:C.value,key:S})}}function D(I){var S=I?Object.keys(I):[],$=-1,C=S.length;return function N(){var j=S[++$];return j==="__proto__"?N():$<C?{value:I[j],key:j}:null}}function A(I){if(x(I))return R(I);var S=P(I);return S?T(S):D(I)}function M(I){return function(...S){if(I===null)throw new Error("Callback was already called.");var $=I;I=null,$.apply(this,S)}}function U(I,S,$,C){let N=!1,j=!1,B=!1,q=0,V=0;function ce(){q>=S||B||N||(B=!0,I.next().then(({value:et,done:qn})=>{if(!(j||N)){if(B=!1,qn){N=!0,q<=0&&C(null);return}q++,$(et,V,Ye),V++,ce()}}).catch(ut))}function Ye(et,qn){if(q-=1,!j){if(et)return ut(et);if(et===!1){N=!0,j=!0;return}if(qn===w||N&&q<=0)return N=!0,C(null);ce()}}function ut(et){j||(B=!1,N=!0,C(et))}ce()}var z=I=>(S,$,C)=>{if(C=k(C),I<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!S)return C(null);if(h(S))return U(S,I,$,C);if(m(S))return U(S[Symbol.asyncIterator](),I,$,C);var N=A(S),j=!1,B=!1,q=0,V=!1;function ce(ut,et){if(!B)if(q-=1,ut)j=!0,C(ut);else if(ut===!1)j=!0,B=!0;else{if(et===w||j&&q<=0)return j=!0,C(null);V||Ye()}}function Ye(){for(V=!0;q<I&&!j;){var ut=N();if(ut===null){j=!0,q<=0&&C(null);return}q+=1,$(ut.value,ut.key,M(ce))}V=!1}Ye()};function X(I,S,$,C){return z(S)(I,y($),C)}var K=g(X,4);function re(I,S,$){$=k($);var C=0,N=0,{length:j}=I,B=!1;j===0&&$(null);function q(V,ce){V===!1&&(B=!0),B!==!0&&(V?$(V):(++N===j||ce===w)&&$(null))}for(;C<j;C++)S(I[C],C,M(q))}function pe(I,S,$){return K(I,1/0,S,$)}function F(I,S,$){var C=x(I)?re:pe;return C(I,y(S),$)}var Z=g(F,3);function W(I,S,$){return E(Z,I,S,$)}var H=g(W,3),Et=v(H);function _t(I,S,$){return K(I,1,S,$)}var kt=g(_t,3);function Me(I,S,$){return E(kt,I,S,$)}var bo=g(Me,3),wo=v(bo);let Fi=Symbol("promiseCallback");function Fn(){let I,S;function $(C,...N){if(C)return S(C);I(N.length>1?N:N[0])}return $[Fi]=new Promise((C,N)=>{I=C,S=N}),$}function Vr(I,S,$){typeof S!="number"&&($=S,S=null),$=k($||Fn());var C=Object.keys(I).length;if(!C)return $(null);S||(S=C);var N={},j=0,B=!1,q=!1,V=Object.create(null),ce=[],Ye=[],ut={};Object.keys(I).forEach(se=>{var me=I[se];if(!Array.isArray(me)){et(se,[me]),Ye.push(se);return}var tt=me.slice(0,me.length-1),Zt=tt.length;if(Zt===0){et(se,me),Ye.push(se);return}ut[se]=Zt,tt.forEach(ur=>{if(!I[ur])throw new Error("async.auto task `"+se+"` has a non-existent dependency `"+ur+"` in "+tt.join(", "));ec(ur,()=>{Zt--,Zt===0&&et(se,me)})})}),dt(),qn();function et(se,me){ce.push(()=>Pd(se,me))}function qn(){if(!B){if(ce.length===0&&j===0)return $(null,N);for(;ce.length&&j<S;){var se=ce.shift();se()}}}function ec(se,me){var tt=V[se];tt||(tt=V[se]=[]),tt.push(me)}function Ts(se){var me=V[se]||[];me.forEach(tt=>tt()),qn()}function Pd(se,me){if(!q){var tt=M((ur,...Zn)=>{if(j--,ur===!1){B=!0;return}if(Zn.length<2&&([Zn]=Zn),ur){var tc={};if(Object.keys(N).forEach(As=>{tc[As]=N[As]}),tc[se]=Zn,q=!0,V=Object.create(null),B)return;$(ur,tc)}else N[se]=Zn,Ts(se)});j++;var Zt=y(me[me.length-1]);me.length>1?Zt(N,tt):Zt(tt)}}function dt(){for(var se,me=0;Ye.length;)se=Ye.pop(),me++,he(se).forEach(tt=>{--ut[tt]===0&&Ye.push(tt)});if(me!==C)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function he(se){var me=[];return Object.keys(I).forEach(tt=>{let Zt=I[tt];Array.isArray(Zt)&&Zt.indexOf(se)>=0&&me.push(tt)}),me}return $[Fi]}var Gr=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,Wl=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,xs=/,/,Jl=/(=.+)?(\s*)$/;function Ss(I){let S="",$=0,C=I.indexOf("*/");for(;$<I.length;)if(I[$]==="/"&&I[$+1]==="/"){let N=I.indexOf(`
|
|
224
|
+
`,$);$=N===-1?I.length:N}else if(C!==-1&&I[$]==="/"&&I[$+1]==="*"){let N=I.indexOf("*/",$);N!==-1?($=N+2,C=I.indexOf("*/",$)):(S+=I[$],$++)}else S+=I[$],$++;return S}function _d(I){let S=Ss(I.toString()),$=S.match(Gr);if($||($=S.match(Wl)),!$)throw new Error(`could not parse args in autoInject
|
|
225
225
|
Source:
|
|
226
|
-
`+S);let[,C]=P;return C.replace(/\s/g,"").split(xs).map(N=>N.replace(Jl,"").trim())}function oa(I,S){var P={};return Object.keys(I).forEach(C=>{var N=I[C],j,B=p(N),q=!B&&N.length===1||B&&N.length===0;if(Array.isArray(N))j=[...N],N=j.pop(),P[C]=j.concat(j.length>0?V:N);else if(q)P[C]=N;else{if(j=_d(N),N.length===0&&!B&&j.length===0)throw new Error("autoInject task functions require explicit parameters.");B||j.pop(),P[C]=j.concat(V)}function V(ce,Ye){var ut=j.map(et=>ce[et]);ut.push(Ye),y(N)(...ut)}}),Vr(P,S)}class In{constructor(){this.head=this.tail=null,this.length=0}removeLink(S){return S.prev?S.prev.next=S.next:this.head=S.next,S.next?S.next.prev=S.prev:this.tail=S.prev,S.prev=S.next=null,this.length-=1,S}empty(){for(;this.head;)this.shift();return this}insertAfter(S,P){P.prev=S,P.next=S.next,S.next?S.next.prev=P:this.tail=P,S.next=P,this.length+=1}insertBefore(S,P){P.prev=S.prev,P.next=S,S.prev?S.prev.next=P:this.head=P,S.prev=P,this.length+=1}unshift(S){this.head?this.insertBefore(this.head,S):Wr(this,S)}push(S){this.tail?this.insertAfter(this.tail,S):Wr(this,S)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var S=this.head;S;)yield S.data,S=S.next}remove(S){for(var P=this.head;P;){var{next:C}=P;S(P)&&this.removeLink(P),P=C}return this}}function Wr(I,S){I.length=1,I.head=I.tail=S}function Bn(I,S,P){if(S==null)S=1;else if(S===0)throw new RangeError("Concurrency must not be zero");var C=y(I),N=0,j=[];let B={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function q(he,se){B[he].push(se)}function V(he,se){let me=(...tt)=>{ce(he,me),se(...tt)};B[he].push(me)}function ce(he,se){if(!he)return Object.keys(B).forEach(me=>B[me]=[]);if(!se)return B[he]=[];B[he]=B[he].filter(me=>me!==se)}function Ye(he,...se){B[he].forEach(me=>me(...se))}var ut=!1;function et(he,se,me,tt){if(tt!=null&&typeof tt!="function")throw new Error("task callback must be a function");dt.started=!0;var Zt,ur;function Zn(As,...Td){if(As)return me?ur(As):Zt();if(Td.length<=1)return Zt(Td[0]);Zt(Td)}var tc=dt._createTaskItem(he,me?Zn:tt||Zn);if(se?dt._tasks.unshift(tc):dt._tasks.push(tc),ut||(ut=!0,c(()=>{ut=!1,dt.process()})),me||!tt)return new Promise((As,Td)=>{Zt=As,ur=Td})}function qn(he){return function(se,...me){N-=1;for(var tt=0,Zt=he.length;tt<Zt;tt++){var ur=he[tt],Zn=j.indexOf(ur);Zn===0?j.shift():Zn>0&&j.splice(Zn,1),ur.callback(se,...me),se!=null&&Ye("error",se,ur.data)}N<=dt.concurrency-dt.buffer&&Ye("unsaturated"),dt.idle()&&Ye("drain"),dt.process()}}function ec(he){return he.length===0&&dt.idle()?(c(()=>Ye("drain")),!0):!1}let Ts=he=>se=>{if(!se)return new Promise((me,tt)=>{V(he,(Zt,ur)=>{if(Zt)return tt(Zt);me(ur)})});ce(he),q(he,se)};var Pd=!1,dt={_tasks:new In,_createTaskItem(he,se){return{data:he,callback:se}},*[Symbol.iterator](){yield*dt._tasks[Symbol.iterator]()},concurrency:S,payload:P,buffer:S/4,started:!1,paused:!1,push(he,se){return Array.isArray(he)?ec(he)?void 0:he.map(me=>et(me,!1,!1,se)):et(he,!1,!1,se)},pushAsync(he,se){return Array.isArray(he)?ec(he)?void 0:he.map(me=>et(me,!1,!0,se)):et(he,!1,!0,se)},kill(){ce(),dt._tasks.empty()},unshift(he,se){return Array.isArray(he)?ec(he)?void 0:he.map(me=>et(me,!0,!1,se)):et(he,!0,!1,se)},unshiftAsync(he,se){return Array.isArray(he)?ec(he)?void 0:he.map(me=>et(me,!0,!0,se)):et(he,!0,!0,se)},remove(he){dt._tasks.remove(he)},process(){if(!Pd){for(Pd=!0;!dt.paused&&N<dt.concurrency&&dt._tasks.length;){var he=[],se=[],me=dt._tasks.length;dt.payload&&(me=Math.min(me,dt.payload));for(var tt=0;tt<me;tt++){var Zt=dt._tasks.shift();he.push(Zt),j.push(Zt),se.push(Zt.data)}N+=1,dt._tasks.length===0&&Ye("empty"),N===dt.concurrency&&Ye("saturated");var ur=M(qn(he));C(se,ur)}Pd=!1}},length(){return dt._tasks.length},running(){return N},workersList(){return j},idle(){return dt._tasks.length+N===0},pause(){dt.paused=!0},resume(){dt.paused!==!1&&(dt.paused=!1,c(dt.process))}};return Object.defineProperties(dt,{saturated:{writable:!1,value:Ts("saturated")},unsaturated:{writable:!1,value:Ts("unsaturated")},empty:{writable:!1,value:Ts("empty")},drain:{writable:!1,value:Ts("drain")},error:{writable:!1,value:Ts("error")}}),dt}function Es(I,S){return Bn(I,1,S)}function vd(I,S,P){return Bn(I,S,P)}function aa(I,S,P,C){C=A(C);var N=y(P);return kt(I,(j,B,q)=>{N(S,j,(V,ce)=>{S=ce,q(V)})},j=>C(j,S))}var dn=g(aa,4);function bd(...I){var S=I.map(y);return function(...P){var C=this,N=P[P.length-1];return typeof N=="function"?P.pop():N=Fn(),dn(S,P,(j,B,q)=>{B.apply(C,j.concat((V,...ce)=>{q(V,ce)}))},(j,B)=>N(j,...B)),N[Fi]}}function wd(...I){return bd(...I.reverse())}function Dm(I,S,P,C){return E(z(S),I,P,C)}var Un=g(Dm,4);function Is(I,S,P,C){var N=y(P);return Un(I,S,(j,B)=>{N(j,(q,...V)=>q?B(q):B(q,V))},(j,B)=>{for(var q=[],V=0;V<B.length;V++)B[V]&&(q=q.concat(...B[V]));return C(j,q)})}var sa=g(Is,4);function Om(I,S,P){return sa(I,1/0,S,P)}var $s=g(Om,3);function ww(I,S,P){return sa(I,1,S,P)}var Kl=g(ww,3);function xd(...I){return function(...S){var P=S.pop();return P(null,...I)}}function gi(I,S){return(P,C,N,j)=>{var B=!1,q;let V=y(N);P(C,(ce,Ye,ut)=>{V(ce,(et,qn)=>{if(et||et===!1)return ut(et);if(I(qn)&&!q)return B=!0,q=S(!0,ce),ut(null,w);ut()})},ce=>{if(ce)return j(ce);j(null,B?q:S(!1))})}}function Mm(I,S,P){return gi(C=>C,(C,N)=>N)(Z,I,S,P)}var Yl=g(Mm,3);function Nm(I,S,P,C){return gi(N=>N,(N,j)=>j)(z(S),I,P,C)}var Xl=g(Nm,4);function xw(I,S,P){return gi(C=>C,(C,N)=>N)(z(1),I,S,P)}var Ql=g(xw,3);function Sd(I){return(S,...P)=>y(S)(...P,(C,...N)=>{typeof console=="object"&&(C?console.error&&console.error(C):console[I]&&N.forEach(j=>console[I](j)))})}var jm=Sd("dir");function Sw(I,S,P){P=M(P);var C=y(I),N=y(S),j;function B(V,...ce){if(V)return P(V);V!==!1&&(j=ce,N(...ce,q))}function q(V,ce){if(V)return P(V);if(V!==!1){if(!ce)return P(null,...j);C(B)}}return q(null,!0)}var la=g(Sw,3);function zm(I,S,P){let C=y(S);return la(I,(...N)=>{let j=N.pop();C(...N,(B,q)=>j(B,!q))},P)}function Ed(I){return(S,P,C)=>I(S,C)}function Jr(I,S,P){return Z(I,Ed(y(S)),P)}var $n=g(Jr,3);function Lm(I,S,P,C){return z(S)(I,Ed(y(P)),C)}var Ps=g(Lm,4);function pY(I,S,P){return Ps(I,1,S,P)}var Id=g(pY,3);function Ew(I){return p(I)?I:function(...S){var P=S.pop(),C=!0;S.push((...N)=>{C?c(()=>P(...N)):P(...N)}),I.apply(this,S),C=!1}}function hY(I,S,P){return gi(C=>!C,C=>!C)(Z,I,S,P)}var Fm=g(hY,3);function mY(I,S,P,C){return gi(N=>!N,N=>!N)(z(S),I,P,C)}var Bm=g(mY,4);function gY(I,S,P){return gi(C=>!C,C=>!C)(kt,I,S,P)}var Um=g(gY,3);function yY(I,S,P,C){var N=new Array(S.length);I(S,(j,B,q)=>{P(j,(V,ce)=>{N[B]=!!ce,q(V)})},j=>{if(j)return C(j);for(var B=[],q=0;q<S.length;q++)N[q]&&B.push(S[q]);C(null,B)})}function _Y(I,S,P,C){var N=[];I(S,(j,B,q)=>{P(j,(V,ce)=>{if(V)return q(V);ce&&N.push({index:B,value:j}),q(V)})},j=>{if(j)return C(j);C(null,N.sort((B,q)=>B.index-q.index).map(B=>B.value))})}function qm(I,S,P,C){var N=x(S)?yY:_Y;return N(I,S,y(P),C)}function vY(I,S,P){return qm(Z,I,S,P)}var Zm=g(vY,3);function bY(I,S,P,C){return qm(z(S),I,P,C)}var Hm=g(bY,4);function wY(I,S,P){return qm(kt,I,S,P)}var Vm=g(wY,3);function xY(I,S){var P=M(S),C=y(Ew(I));function N(j){if(j)return P(j);j!==!1&&C(N)}return N()}var PD=g(xY,2);function SY(I,S,P,C){var N=y(P);return Un(I,S,(j,B)=>{N(j,(q,V)=>q?B(q):B(q,{key:V,val:j}))},(j,B)=>{for(var q={},{hasOwnProperty:V}=Object.prototype,ce=0;ce<B.length;ce++)if(B[ce]){var{key:Ye}=B[ce],{val:ut}=B[ce];V.call(q,Ye)?q[Ye].push(ut):q[Ye]=[ut]}return C(j,q)})}var Gm=g(SY,4);function TD(I,S,P){return Gm(I,1/0,S,P)}function AD(I,S,P){return Gm(I,1,S,P)}var kD=Sd("log");function EY(I,S,P,C){C=A(C);var N={},j=y(P);return z(S)(I,(B,q,V)=>{j(B,q,(ce,Ye)=>{if(ce)return V(ce);N[q]=Ye,V(ce)})},B=>C(B,N))}var Wm=g(EY,4);function CD(I,S,P){return Wm(I,1/0,S,P)}function RD(I,S,P){return Wm(I,1,S,P)}function DD(I,S=P=>P){var P=Object.create(null),C=Object.create(null),N=y(I),j=r((B,q)=>{var V=S(...B);V in P?c(()=>q(null,...P[V])):V in C?C[V].push(q):(C[V]=[q],N(...B,(ce,...Ye)=>{ce||(P[V]=Ye);var ut=C[V];delete C[V];for(var et=0,qn=ut.length;et<qn;et++)ut[et](ce,...Ye)}))});return j.memo=P,j.unmemoized=I,j}var Jm;o?Jm=process.nextTick:i?Jm=setImmediate:Jm=a;var OD=s(Jm),Iw=g((I,S,P)=>{var C=x(S)?[]:{};I(S,(N,j,B)=>{y(N)((q,...V)=>{V.length<2&&([V]=V),C[j]=V,B(q)})},N=>P(N,C))},3);function MD(I,S){return Iw(Z,I,S)}function ND(I,S,P){return Iw(z(S),I,P)}function $w(I,S){var P=y(I);return Bn((C,N)=>{P(C[0],N)},S,1)}class IY{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(S){let P;for(;S>0&&Pw(this.heap[S],this.heap[P=jD(S)]);){let C=this.heap[S];this.heap[S]=this.heap[P],this.heap[P]=C,S=P}}percDown(S){let P;for(;(P=$Y(S))<this.heap.length&&(P+1<this.heap.length&&Pw(this.heap[P+1],this.heap[P])&&(P=P+1),!Pw(this.heap[S],this.heap[P]));){let C=this.heap[S];this.heap[S]=this.heap[P],this.heap[P]=C,S=P}}push(S){S.pushCount=++this.pushCount,this.heap.push(S),this.percUp(this.heap.length-1)}unshift(S){return this.heap.push(S)}shift(){let[S]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),S}toArray(){return[...this]}*[Symbol.iterator](){for(let S=0;S<this.heap.length;S++)yield this.heap[S].data}remove(S){let P=0;for(let C=0;C<this.heap.length;C++)S(this.heap[C])||(this.heap[P]=this.heap[C],P++);this.heap.splice(P);for(let C=jD(this.heap.length-1);C>=0;C--)this.percDown(C);return this}}function $Y(I){return(I<<1)+1}function jD(I){return(I+1>>1)-1}function Pw(I,S){return I.priority!==S.priority?I.priority<S.priority:I.pushCount<S.pushCount}function zD(I,S){var P=$w(I,S),{push:C,pushAsync:N}=P;P._tasks=new IY,P._createTaskItem=({data:B,priority:q},V)=>({data:B,priority:q,callback:V});function j(B,q){return Array.isArray(B)?B.map(V=>({data:V,priority:q})):{data:B,priority:q}}return P.push=function(B,q=0,V){return C(j(B,q),V)},P.pushAsync=function(B,q=0,V){return N(j(B,q),V)},delete P.unshift,delete P.unshiftAsync,P}function PY(I,S){if(S=A(S),!Array.isArray(I))return S(new TypeError("First argument to race must be an array of functions"));if(!I.length)return S();for(var P=0,C=I.length;P<C;P++)y(I[P])(S)}var LD=g(PY,2);function Km(I,S,P,C){var N=[...I].reverse();return dn(N,S,P,C)}function Ym(I){var S=y(I);return r(function(C,N){return C.push((j,...B)=>{let q={};if(j&&(q.error=j),B.length>0){var V=B;B.length<=1&&([V]=B),q.value=V}N(null,q)}),S.apply(this,C)})}function FD(I){var S;return Array.isArray(I)?S=I.map(Ym):(S={},Object.keys(I).forEach(P=>{S[P]=Ym.call(this,I[P])})),S}function Tw(I,S,P,C){let N=y(P);return qm(I,S,(j,B)=>{N(j,(q,V)=>{B(q,!V)})},C)}function TY(I,S,P){return Tw(Z,I,S,P)}var BD=g(TY,3);function AY(I,S,P,C){return Tw(z(S),I,P,C)}var UD=g(AY,4);function kY(I,S,P){return Tw(kt,I,S,P)}var qD=g(kY,3);function ZD(I){return function(){return I}}let Aw=5,HD=0;function Xm(I,S,P){var C={times:Aw,intervalFunc:ZD(HD)};if(arguments.length<3&&typeof I=="function"?(P=S||Fn(),S=I):(CY(C,I),P=P||Fn()),typeof S!="function")throw new Error("Invalid arguments for async.retry");var N=y(S),j=1;function B(){N((q,...V)=>{q!==!1&&(q&&j++<C.times&&(typeof C.errorFilter!="function"||C.errorFilter(q))?setTimeout(B,C.intervalFunc(j-1)):P(q,...V))})}return B(),P[Fi]}function CY(I,S){if(typeof S=="object")I.times=+S.times||Aw,I.intervalFunc=typeof S.interval=="function"?S.interval:ZD(+S.interval||HD),I.errorFilter=S.errorFilter;else if(typeof S=="number"||typeof S=="string")I.times=+S||Aw;else throw new Error("Invalid arguments for async.retry")}function VD(I,S){S||(S=I,I=null);let P=I&&I.arity||S.length;p(S)&&(P+=1);var C=y(S);return r((N,j)=>{(N.length<P-1||j==null)&&(N.push(j),j=Fn());function B(q){C(...N,q)}return I?Xm(I,B,j):Xm(B,j),j[Fi]})}function GD(I,S){return Iw(kt,I,S)}function RY(I,S,P){return gi(Boolean,C=>C)(Z,I,S,P)}var Qm=g(RY,3);function DY(I,S,P,C){return gi(Boolean,N=>N)(z(S),I,P,C)}var eg=g(DY,4);function OY(I,S,P){return gi(Boolean,C=>C)(kt,I,S,P)}var tg=g(OY,3);function MY(I,S,P){var C=y(S);return H(I,(j,B)=>{C(j,(q,V)=>{if(q)return B(q);B(q,{value:j,criteria:V})})},(j,B)=>{if(j)return P(j);P(null,B.sort(N).map(q=>q.value))});function N(j,B){var q=j.criteria,V=B.criteria;return q<V?-1:q>V?1:0}}var WD=g(MY,3);function JD(I,S,P){var C=y(I);return r((N,j)=>{var B=!1,q;function V(){var ce=I.name||"anonymous",Ye=new Error('Callback function "'+ce+'" timed out.');Ye.code="ETIMEDOUT",P&&(Ye.info=P),B=!0,j(Ye)}N.push((...ce)=>{B||(j(...ce),clearTimeout(q))}),q=setTimeout(V,S),C(...N)})}function NY(I){for(var S=Array(I);I--;)S[I]=I;return S}function rg(I,S,P,C){var N=y(P);return Un(NY(I),S,N,C)}function KD(I,S,P){return rg(I,1/0,S,P)}function YD(I,S,P){return rg(I,1,S,P)}function XD(I,S,P,C){arguments.length<=3&&typeof S=="function"&&(C=P,P=S,S=Array.isArray(I)?[]:{}),C=A(C||Fn());var N=y(P);return Z(I,(j,B,q)=>{N(S,j,B,q)},j=>C(j,S)),C[Fi]}function jY(I,S){var P=null,C;return Id(I,(N,j)=>{y(N)((B,...q)=>{if(B===!1)return j(B);q.length<2?[C]=q:C=q,P=B,j(B?null:{})})},()=>S(P,C))}var QD=g(jY);function eO(I){return(...S)=>(I.unmemoized||I)(...S)}function zY(I,S,P){P=M(P);var C=y(S),N=y(I),j=[];function B(V,...ce){if(V)return P(V);j=ce,V!==!1&&N(q)}function q(V,ce){if(V)return P(V);if(V!==!1){if(!ce)return P(null,...j);C(B)}}return N(q)}var $d=g(zY,3);function tO(I,S,P){let C=y(I);return $d(N=>C((j,B)=>N(j,!B)),S,P)}function LY(I,S){if(S=A(S),!Array.isArray(I))return S(new Error("First argument to waterfall must be an array of functions"));if(!I.length)return S();var P=0;function C(j){var B=y(I[P++]);B(...j,M(N))}function N(j,...B){if(j!==!1){if(j||P===I.length)return S(j,...B);C(B)}}C([])}var rO=g(LY),FY={apply:e,applyEach:Et,applyEachSeries:wo,asyncify:u,auto:Vr,autoInject:oa,cargo:Es,cargoQueue:vd,compose:wd,concat:$s,concatLimit:sa,concatSeries:Kl,constant:xd,detect:Yl,detectLimit:Xl,detectSeries:Ql,dir:jm,doUntil:zm,doWhilst:la,each:$n,eachLimit:Ps,eachOf:Z,eachOfLimit:K,eachOfSeries:kt,eachSeries:Id,ensureAsync:Ew,every:Fm,everyLimit:Bm,everySeries:Um,filter:Zm,filterLimit:Hm,filterSeries:Vm,forever:PD,groupBy:TD,groupByLimit:Gm,groupBySeries:AD,log:kD,map:H,mapLimit:Un,mapSeries:bo,mapValues:CD,mapValuesLimit:Wm,mapValuesSeries:RD,memoize:DD,nextTick:OD,parallel:MD,parallelLimit:ND,priorityQueue:zD,queue:$w,race:LD,reduce:dn,reduceRight:Km,reflect:Ym,reflectAll:FD,reject:BD,rejectLimit:UD,rejectSeries:qD,retry:Xm,retryable:VD,seq:bd,series:GD,setImmediate:c,some:Qm,someLimit:eg,someSeries:tg,sortBy:WD,timeout:JD,times:KD,timesLimit:rg,timesSeries:YD,transform:XD,tryEach:QD,unmemoize:eO,until:tO,waterfall:rO,whilst:$d,all:Fm,allLimit:Bm,allSeries:Um,any:Qm,anyLimit:eg,anySeries:tg,find:Yl,findLimit:Xl,findSeries:Ql,flatMap:$s,flatMapLimit:sa,flatMapSeries:Kl,forEach:$n,forEachSeries:Id,forEachLimit:Ps,forEachOf:Z,forEachOfSeries:kt,forEachOfLimit:K,inject:dn,foldl:dn,foldr:Km,select:Zm,selectLimit:Hm,selectSeries:Vm,wrapSync:u,during:$d,doDuring:la};t.all=Fm,t.allLimit=Bm,t.allSeries=Um,t.any=Qm,t.anyLimit=eg,t.anySeries=tg,t.apply=e,t.applyEach=Et,t.applyEachSeries=wo,t.asyncify=u,t.auto=Vr,t.autoInject=oa,t.cargo=Es,t.cargoQueue=vd,t.compose=wd,t.concat=$s,t.concatLimit=sa,t.concatSeries=Kl,t.constant=xd,t.default=FY,t.detect=Yl,t.detectLimit=Xl,t.detectSeries=Ql,t.dir=jm,t.doDuring=la,t.doUntil=zm,t.doWhilst=la,t.during=$d,t.each=$n,t.eachLimit=Ps,t.eachOf=Z,t.eachOfLimit=K,t.eachOfSeries=kt,t.eachSeries=Id,t.ensureAsync=Ew,t.every=Fm,t.everyLimit=Bm,t.everySeries=Um,t.filter=Zm,t.filterLimit=Hm,t.filterSeries=Vm,t.find=Yl,t.findLimit=Xl,t.findSeries=Ql,t.flatMap=$s,t.flatMapLimit=sa,t.flatMapSeries=Kl,t.foldl=dn,t.foldr=Km,t.forEach=$n,t.forEachLimit=Ps,t.forEachOf=Z,t.forEachOfLimit=K,t.forEachOfSeries=kt,t.forEachSeries=Id,t.forever=PD,t.groupBy=TD,t.groupByLimit=Gm,t.groupBySeries=AD,t.inject=dn,t.log=kD,t.map=H,t.mapLimit=Un,t.mapSeries=bo,t.mapValues=CD,t.mapValuesLimit=Wm,t.mapValuesSeries=RD,t.memoize=DD,t.nextTick=OD,t.parallel=MD,t.parallelLimit=ND,t.priorityQueue=zD,t.queue=$w,t.race=LD,t.reduce=dn,t.reduceRight=Km,t.reflect=Ym,t.reflectAll=FD,t.reject=BD,t.rejectLimit=UD,t.rejectSeries=qD,t.retry=Xm,t.retryable=VD,t.select=Zm,t.selectLimit=Hm,t.selectSeries=Vm,t.seq=bd,t.series=GD,t.setImmediate=c,t.some=Qm,t.someLimit=eg,t.someSeries=tg,t.sortBy=WD,t.timeout=JD,t.times=KD,t.timesLimit=rg,t.timesSeries=YD,t.transform=XD,t.tryEach=QD,t.unmemoize=eO,t.until=tO,t.waterfall=rO,t.whilst=$d,t.wrapSync=u,Object.defineProperty(t,"__esModule",{value:!0})}))});var UU=b((Rqe,BU)=>{var rs=Q("constants"),t0e=process.cwd,fv=null,r0e=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return fv||(fv=t0e.call(process)),fv};try{process.cwd()}catch{}typeof process.chdir=="function"&&(ZA=process.chdir,process.chdir=function(t){fv=null,ZA.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,ZA));var ZA;BU.exports=n0e;function n0e(t){rs.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=o(t.chown),t.fchown=o(t.fchown),t.lchown=o(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=a(t.chownSync),t.fchownSync=a(t.fchownSync),t.lchownSync=a(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=s(t.stat),t.fstat=s(t.fstat),t.lstat=s(t.lstat),t.statSync=l(t.statSync),t.fstatSync=l(t.fstatSync),t.lstatSync=l(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(u,d,f){f&&process.nextTick(f)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(u,d,f,p){p&&process.nextTick(p)},t.lchownSync=function(){}),r0e==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:(function(u){function d(f,p,h){var m=Date.now(),y=0;u(f,p,function g(v){if(v&&(v.code==="EACCES"||v.code==="EPERM"||v.code==="EBUSY")&&Date.now()-m<6e4){setTimeout(function(){t.stat(p,function(E,x){E&&E.code==="ENOENT"?u(f,p,g):h(v)})},y),y<100&&(y+=10);return}h&&h(v)})}return Object.setPrototypeOf&&Object.setPrototypeOf(d,u),d})(t.rename)),t.read=typeof t.read!="function"?t.read:(function(u){function d(f,p,h,m,y,g){var v;if(g&&typeof g=="function"){var E=0;v=function(x,w,A){if(x&&x.code==="EAGAIN"&&E<10)return E++,u.call(t,f,p,h,m,y,v);g.apply(this,arguments)}}return u.call(t,f,p,h,m,y,v)}return Object.setPrototypeOf&&Object.setPrototypeOf(d,u),d})(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:(function(u){return function(d,f,p,h,m){for(var y=0;;)try{return u.call(t,d,f,p,h,m)}catch(g){if(g.code==="EAGAIN"&&y<10){y++;continue}throw g}}})(t.readSync);function e(u){u.lchmod=function(d,f,p){u.open(d,rs.O_WRONLY|rs.O_SYMLINK,f,function(h,m){if(h){p&&p(h);return}u.fchmod(m,f,function(y){u.close(m,function(g){p&&p(y||g)})})})},u.lchmodSync=function(d,f){var p=u.openSync(d,rs.O_WRONLY|rs.O_SYMLINK,f),h=!0,m;try{m=u.fchmodSync(p,f),h=!1}finally{if(h)try{u.closeSync(p)}catch{}else u.closeSync(p)}return m}}function r(u){rs.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(d,f,p,h){u.open(d,rs.O_SYMLINK,function(m,y){if(m){h&&h(m);return}u.futimes(y,f,p,function(g){u.close(y,function(v){h&&h(g||v)})})})},u.lutimesSync=function(d,f,p){var h=u.openSync(d,rs.O_SYMLINK),m,y=!0;try{m=u.futimesSync(h,f,p),y=!1}finally{if(y)try{u.closeSync(h)}catch{}else u.closeSync(h)}return m}):u.futimes&&(u.lutimes=function(d,f,p,h){h&&process.nextTick(h)},u.lutimesSync=function(){})}function n(u){return u&&function(d,f,p){return u.call(t,d,f,function(h){c(h)&&(h=null),p&&p.apply(this,arguments)})}}function i(u){return u&&function(d,f){try{return u.call(t,d,f)}catch(p){if(!c(p))throw p}}}function o(u){return u&&function(d,f,p,h){return u.call(t,d,f,p,function(m){c(m)&&(m=null),h&&h.apply(this,arguments)})}}function a(u){return u&&function(d,f,p){try{return u.call(t,d,f,p)}catch(h){if(!c(h))throw h}}}function s(u){return u&&function(d,f,p){typeof f=="function"&&(p=f,f=null);function h(m,y){y&&(y.uid<0&&(y.uid+=4294967296),y.gid<0&&(y.gid+=4294967296)),p&&p.apply(this,arguments)}return f?u.call(t,d,f,h):u.call(t,d,h)}}function l(u){return u&&function(d,f){var p=f?u.call(t,d,f):u.call(t,d);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}function c(u){if(!u||u.code==="ENOSYS")return!0;var d=!process.getuid||process.getuid()!==0;return!!(d&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var HU=b((Dqe,ZU)=>{var qU=Q("stream").Stream;ZU.exports=i0e;function i0e(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);qU.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var a=Object.keys(i),s=0,l=a.length;s<l;s++){var c=a[s];this[c]=i[c]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){o._read()});return}t.open(this.path,this.flags,this.mode,function(u,d){if(u){o.emit("error",u),o.readable=!1;return}o.fd=d,o.emit("open",d),o._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);qU.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),a=0,s=o.length;a<s;a++){var l=o[a];this[l]=i[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var GU=b((Oqe,VU)=>{"use strict";VU.exports=a0e;var o0e=Object.getPrototypeOf||function(t){return t.__proto__};function a0e(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:o0e(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var WA=b((Mqe,GA)=>{var Gt=Q("fs"),s0e=UU(),l0e=HU(),c0e=GU(),pv=Q("util"),Er,mv;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Er=Symbol.for("graceful-fs.queue"),mv=Symbol.for("graceful-fs.previous")):(Er="___graceful-fs.queue",mv="___graceful-fs.previous");function u0e(){}function KU(t,e){Object.defineProperty(t,Er,{get:function(){return e}})}var bl=u0e;pv.debuglog?bl=pv.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(bl=function(){var t=pv.format.apply(pv,arguments);t="GFS4: "+t.split(/\n/).join(`
|
|
227
|
-
GFS4: `),console.error(t)});Gt[Er]||(WU=global[Er]||[],KU(Gt,WU),Gt.close=(function(t){function e(r,n){return t.call(Gt,r,function(i){i||JU(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,mv,{value:t}),e})(Gt.close),Gt.closeSync=(function(t){function e(r){t.apply(Gt,arguments),JU()}return Object.defineProperty(e,mv,{value:t}),e})(Gt.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){bl(Gt[Er]),Q("assert").equal(Gt[Er].length,0)}));var WU;global[Er]||KU(global,Gt[Er]);GA.exports=HA(c0e(Gt));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Gt.__patched&&(GA.exports=HA(Gt),Gt.__patched=!0);function HA(t){s0e(t),t.gracefulify=HA,t.createReadStream=w,t.createWriteStream=A;var e=t.readFile;t.readFile=r;function r(T,D,k){return typeof D=="function"&&(k=D,D=null),M(T,D,k);function M(U,z,X,K){return e(U,z,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?$u([M,[U,z,X],re,K||Date.now(),Date.now()]):typeof X=="function"&&X.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(T,D,k,M){return typeof k=="function"&&(M=k,k=null),U(T,D,k,M);function U(z,X,K,re,pe){return n(z,X,K,function(F){F&&(F.code==="EMFILE"||F.code==="ENFILE")?$u([U,[z,X,K,re],F,pe||Date.now(),Date.now()]):typeof re=="function"&&re.apply(this,arguments)})}}var o=t.appendFile;o&&(t.appendFile=a);function a(T,D,k,M){return typeof k=="function"&&(M=k,k=null),U(T,D,k,M);function U(z,X,K,re,pe){return o(z,X,K,function(F){F&&(F.code==="EMFILE"||F.code==="ENFILE")?$u([U,[z,X,K,re],F,pe||Date.now(),Date.now()]):typeof re=="function"&&re.apply(this,arguments)})}}var s=t.copyFile;s&&(t.copyFile=l);function l(T,D,k,M){return typeof k=="function"&&(M=k,k=0),U(T,D,k,M);function U(z,X,K,re,pe){return s(z,X,K,function(F){F&&(F.code==="EMFILE"||F.code==="ENFILE")?$u([U,[z,X,K,re],F,pe||Date.now(),Date.now()]):typeof re=="function"&&re.apply(this,arguments)})}}var c=t.readdir;t.readdir=d;var u=/^v[0-5]\./;function d(T,D,k){typeof D=="function"&&(k=D,D=null);var M=u.test(process.version)?function(X,K,re,pe){return c(X,U(X,K,re,pe))}:function(X,K,re,pe){return c(X,K,U(X,K,re,pe))};return M(T,D,k);function U(z,X,K,re){return function(pe,F){pe&&(pe.code==="EMFILE"||pe.code==="ENFILE")?$u([M,[z,X,K],pe,re||Date.now(),Date.now()]):(F&&F.sort&&F.sort(),typeof K=="function"&&K.call(this,pe,F))}}}if(process.version.substr(0,4)==="v0.8"){var f=l0e(t);g=f.ReadStream,E=f.WriteStream}var p=t.ReadStream;p&&(g.prototype=Object.create(p.prototype),g.prototype.open=v);var h=t.WriteStream;h&&(E.prototype=Object.create(h.prototype),E.prototype.open=x),Object.defineProperty(t,"ReadStream",{get:function(){return g},set:function(T){g=T},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return E},set:function(T){E=T},enumerable:!0,configurable:!0});var m=g;Object.defineProperty(t,"FileReadStream",{get:function(){return m},set:function(T){m=T},enumerable:!0,configurable:!0});var y=E;Object.defineProperty(t,"FileWriteStream",{get:function(){return y},set:function(T){y=T},enumerable:!0,configurable:!0});function g(T,D){return this instanceof g?(p.apply(this,arguments),this):g.apply(Object.create(g.prototype),arguments)}function v(){var T=this;R(T.path,T.flags,T.mode,function(D,k){D?(T.autoClose&&T.destroy(),T.emit("error",D)):(T.fd=k,T.emit("open",k),T.read())})}function E(T,D){return this instanceof E?(h.apply(this,arguments),this):E.apply(Object.create(E.prototype),arguments)}function x(){var T=this;R(T.path,T.flags,T.mode,function(D,k){D?(T.destroy(),T.emit("error",D)):(T.fd=k,T.emit("open",k))})}function w(T,D){return new t.ReadStream(T,D)}function A(T,D){return new t.WriteStream(T,D)}var $=t.open;t.open=R;function R(T,D,k,M){return typeof k=="function"&&(M=k,k=null),U(T,D,k,M);function U(z,X,K,re,pe){return $(z,X,K,function(F,Z){F&&(F.code==="EMFILE"||F.code==="ENFILE")?$u([U,[z,X,K,re],F,pe||Date.now(),Date.now()]):typeof re=="function"&&re.apply(this,arguments)})}}return t}function $u(t){bl("ENQUEUE",t[0].name,t[1]),Gt[Er].push(t),VA()}var hv;function JU(){for(var t=Date.now(),e=0;e<Gt[Er].length;++e)Gt[Er][e].length>2&&(Gt[Er][e][3]=t,Gt[Er][e][4]=t);VA()}function VA(){if(clearTimeout(hv),hv=void 0,Gt[Er].length!==0){var t=Gt[Er].shift(),e=t[0],r=t[1],n=t[2],i=t[3],o=t[4];if(i===void 0)bl("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){bl("TIMEOUT",e.name,r);var a=r.pop();typeof a=="function"&&a.call(null,n)}else{var s=Date.now()-o,l=Math.max(o-i,1),c=Math.min(l*1.2,100);s>=c?(bl("RETRY",e.name,r),e.apply(null,r.concat([i]))):Gt[Er].push(t)}hv===void 0&&(hv=setTimeout(VA,0))}}});var gv=b((Nqe,YU)=>{"use strict";var oo=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";oo.writable=t=>oo(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";oo.readable=t=>oo(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";oo.duplex=t=>oo.writable(t)&&oo.readable(t);oo.transform=t=>oo.duplex(t)&&typeof t._transform=="function";YU.exports=oo});var bh=b((jqe,JA)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?JA.exports={nextTick:d0e}:JA.exports=process;function d0e(t,e,r,n){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var i=arguments.length,o,a;switch(i){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick(function(){t.call(null,e)});case 3:return process.nextTick(function(){t.call(null,e,r)});case 4:return process.nextTick(function(){t.call(null,e,r,n)});default:for(o=new Array(i-1),a=0;a<o.length;)o[a++]=arguments[a];return process.nextTick(function(){t.apply(null,o)})}}});var QU=b((zqe,XU)=>{var f0e={}.toString;XU.exports=Array.isArray||function(t){return f0e.call(t)=="[object Array]"}});var KA=b((Lqe,eq)=>{eq.exports=Q("stream")});var wh=b((YA,rq)=>{var yv=Q("buffer"),Wo=yv.Buffer;function tq(t,e){for(var r in t)e[r]=t[r]}Wo.from&&Wo.alloc&&Wo.allocUnsafe&&Wo.allocUnsafeSlow?rq.exports=yv:(tq(yv,YA),YA.Buffer=Pu);function Pu(t,e,r){return Wo(t,e,r)}tq(Wo,Pu);Pu.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Wo(t,e,r)};Pu.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Wo(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};Pu.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Wo(t)};Pu.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return yv.SlowBuffer(t)}});var Tu=b(Br=>{function p0e(t){return Array.isArray?Array.isArray(t):_v(t)==="[object Array]"}Br.isArray=p0e;function h0e(t){return typeof t=="boolean"}Br.isBoolean=h0e;function m0e(t){return t===null}Br.isNull=m0e;function g0e(t){return t==null}Br.isNullOrUndefined=g0e;function y0e(t){return typeof t=="number"}Br.isNumber=y0e;function _0e(t){return typeof t=="string"}Br.isString=_0e;function v0e(t){return typeof t=="symbol"}Br.isSymbol=v0e;function b0e(t){return t===void 0}Br.isUndefined=b0e;function w0e(t){return _v(t)==="[object RegExp]"}Br.isRegExp=w0e;function x0e(t){return typeof t=="object"&&t!==null}Br.isObject=x0e;function S0e(t){return _v(t)==="[object Date]"}Br.isDate=S0e;function E0e(t){return _v(t)==="[object Error]"||t instanceof Error}Br.isError=E0e;function I0e(t){return typeof t=="function"}Br.isFunction=I0e;function $0e(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}Br.isPrimitive=$0e;Br.isBuffer=Q("buffer").Buffer.isBuffer;function _v(t){return Object.prototype.toString.call(t)}});var nq=b((Bqe,XA)=>{typeof Object.create=="function"?XA.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:XA.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var Au=b((Uqe,ek)=>{try{if(QA=Q("util"),typeof QA.inherits!="function")throw"";ek.exports=QA.inherits}catch{ek.exports=nq()}var QA});var oq=b((qqe,tk)=>{"use strict";function P0e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var iq=wh().Buffer,xh=Q("util");function T0e(t,e,r){t.copy(e,r)}tk.exports=(function(){function t(){P0e(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},t.prototype.unshift=function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i},t.prototype.concat=function(r){if(this.length===0)return iq.alloc(0);for(var n=iq.allocUnsafe(r>>>0),i=this.head,o=0;i;)T0e(i.data,n,o),o+=i.data.length,i=i.next;return n},t})();xh&&xh.inspect&&xh.inspect.custom&&(tk.exports.prototype[xh.inspect.custom]=function(){var t=xh.inspect({length:this.length});return this.constructor.name+" "+t})});var rk=b((Zqe,aq)=>{"use strict";var vv=bh();function A0e(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,vv.nextTick(bv,this,t)):vv.nextTick(bv,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,vv.nextTick(bv,r,o)):vv.nextTick(bv,r,o):e&&e(o)}),this)}function k0e(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function bv(t,e){t.emit("error",e)}aq.exports={destroy:A0e,undestroy:k0e}});var lq=b((Hqe,sq)=>{sq.exports=Q("util").deprecate});var ik=b((Vqe,gq)=>{"use strict";var wl=bh();gq.exports=nr;function uq(t){var e=this;this.next=null,this.entry=null,this.finish=function(){W0e(e,t)}}var C0e=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:wl.nextTick,ku;nr.WritableState=Eh;var dq=Object.create(Tu());dq.inherits=Au();var R0e={deprecate:lq()},fq=KA(),xv=wh().Buffer,D0e=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function O0e(t){return xv.from(t)}function M0e(t){return xv.isBuffer(t)||t instanceof D0e}var pq=rk();dq.inherits(nr,fq);function N0e(){}function Eh(t,e){ku=ku||xl(),t=t||{};var r=e instanceof ku;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,i=t.writableHighWaterMark,o=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=t.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){q0e(e,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new uq(this)}Eh.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Eh.prototype,"buffer",{get:R0e.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var wv;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(wv=Function.prototype[Symbol.hasInstance],Object.defineProperty(nr,Symbol.hasInstance,{value:function(t){return wv.call(this,t)?!0:this!==nr?!1:t&&t._writableState instanceof Eh}})):wv=function(t){return t instanceof this};function nr(t){if(ku=ku||xl(),!wv.call(nr,this)&&!(this instanceof ku))return new nr(t);this._writableState=new Eh(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),fq.call(this)}nr.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function j0e(t,e){var r=new Error("write after end");t.emit("error",r),wl.nextTick(e,r)}function z0e(t,e,r,n){var i=!0,o=!1;return r===null?o=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),wl.nextTick(n,o),i=!1),i}nr.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=!n.objectMode&&M0e(t);return o&&!xv.isBuffer(t)&&(t=O0e(t)),typeof e=="function"&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=N0e),n.ended?j0e(this,r):(o||z0e(this,n,t,r))&&(n.pendingcb++,i=F0e(this,n,o,t,e,r)),i};nr.prototype.cork=function(){var t=this._writableState;t.corked++};nr.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&hq(this,t))};nr.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function L0e(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=xv.from(e,r)),e}Object.defineProperty(nr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function F0e(t,e,r,n,i,o){if(!r){var a=L0e(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=e.objectMode?1:n.length;e.length+=s;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else nk(t,e,!1,s,n,i,o);return l}function nk(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function B0e(t,e,r,n,i){--e.pendingcb,r?(wl.nextTick(i,n),wl.nextTick(Sh,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),Sh(t,e))}function U0e(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function q0e(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(U0e(r),e)B0e(t,r,n,e,i);else{var o=mq(r);!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&hq(t,r),n?C0e(cq,t,r,o,i):cq(t,r,o,i)}}function cq(t,e,r,n){r||Z0e(t,e),e.pendingcb--,n(),Sh(t,e)}function Z0e(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function hq(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)i[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;i.allBuffers=s,nk(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new uq(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,c=r.encoding,u=r.callback,d=e.objectMode?1:l.length;if(nk(t,e,!1,d,l,c,u),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}nr.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};nr.prototype._writev=null;nr.prototype.end=function(t,e,r){var n=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||G0e(this,n,r)};function mq(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function H0e(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),Sh(t,e)})}function V0e(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,wl.nextTick(H0e,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Sh(t,e){var r=mq(e);return r&&(V0e(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function G0e(t,e,r){e.ending=!0,Sh(t,e),r&&(e.finished?wl.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function W0e(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(nr.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});nr.prototype.destroy=pq.destroy;nr.prototype._undestroy=pq.undestroy;nr.prototype._destroy=function(t,e){this.end(),e(t)}});var xl=b((Gqe,bq)=>{"use strict";var yq=bh(),J0e=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};bq.exports=Jo;var _q=Object.create(Tu());_q.inherits=Au();var vq=sk(),ak=ik();_q.inherits(Jo,vq);for(ok=J0e(ak.prototype),Sv=0;Sv<ok.length;Sv++)Ev=ok[Sv],Jo.prototype[Ev]||(Jo.prototype[Ev]=ak.prototype[Ev]);var ok,Ev,Sv;function Jo(t){if(!(this instanceof Jo))return new Jo(t);vq.call(this,t),ak.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",K0e)}Object.defineProperty(Jo.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function K0e(){this.allowHalfOpen||this._writableState.ended||yq.nextTick(Y0e,this)}function Y0e(t){t.end()}Object.defineProperty(Jo.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});Jo.prototype._destroy=function(t,e){this.push(null),this.end(),yq.nextTick(e,t)}});var uk=b(xq=>{"use strict";var ck=wh().Buffer,wq=ck.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function X0e(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function Q0e(t){var e=X0e(t);if(typeof e!="string"&&(ck.isEncoding===wq||!wq(t)))throw new Error("Unknown encoding: "+t);return e||t}xq.StringDecoder=Ih;function Ih(t){this.encoding=Q0e(t);var e;switch(this.encoding){case"utf16le":this.text=oye,this.end=aye,e=4;break;case"utf8":this.fillLast=rye,e=4;break;case"base64":this.text=sye,this.end=lye,e=3;break;default:this.write=cye,this.end=uye;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=ck.allocUnsafe(e)}Ih.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Ih.prototype.end=iye;Ih.prototype.text=nye;Ih.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function lk(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function eye(t,e,r){var n=e.length-1;if(n<r)return 0;var i=lk(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=lk(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=lk(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function tye(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"�"}}function rye(t){var e=this.lastTotal-this.lastNeed,r=tye(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function nye(t,e){var r=eye(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function iye(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function oye(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function aye(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function sye(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function lye(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function cye(t){return t.toString(this.encoding)}function uye(t){return t&&t.length?this.write(t):""}});var sk=b((Kqe,Oq)=>{"use strict";var Ru=bh();Oq.exports=Lt;var dye=QU(),$h;Lt.ReadableState=Aq;var Jqe=Q("events").EventEmitter,$q=function(t,e){return t.listeners(e).length},mk=KA(),Ph=wh().Buffer,fye=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function pye(t){return Ph.from(t)}function hye(t){return Ph.isBuffer(t)||t instanceof fye}var Pq=Object.create(Tu());Pq.inherits=Au();var dk=Q("util"),mt=void 0;dk&&dk.debuglog?mt=dk.debuglog("stream"):mt=function(){};var mye=oq(),Tq=rk(),Cu;Pq.inherits(Lt,mk);var fk=["error","close","destroy","pause","resume"];function gye(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):dye(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Aq(t,e){$h=$h||xl(),t=t||{};var r=e instanceof $h;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,i=t.readableHighWaterMark,o=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new mye,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Cu||(Cu=uk().StringDecoder),this.decoder=new Cu(t.encoding),this.encoding=t.encoding)}function Lt(t){if($h=$h||xl(),!(this instanceof Lt))return new Lt(t);this._readableState=new Aq(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),mk.call(this)}Object.defineProperty(Lt.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});Lt.prototype.destroy=Tq.destroy;Lt.prototype._undestroy=Tq.undestroy;Lt.prototype._destroy=function(t,e){this.push(null),e(t)};Lt.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Ph.from(t,e),e=""),n=!0),kq(this,t,e,!1,n)};Lt.prototype.unshift=function(t){return kq(this,t,null,!0,!1)};function kq(t,e,r,n,i){var o=t._readableState;if(e===null)o.reading=!1,bye(t,o);else{var a;i||(a=yye(o,e)),a?t.emit("error",a):o.objectMode||e&&e.length>0?(typeof e!="string"&&!o.objectMode&&Object.getPrototypeOf(e)!==Ph.prototype&&(e=pye(e)),n?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):pk(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||e.length!==0?pk(t,o,e,!1):Cq(t,o)):pk(t,o,e,!1))):n||(o.reading=!1)}return _ye(o)}function pk(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Iv(t)),Cq(t,e)}function yye(t,e){var r;return!hye(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function _ye(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}Lt.prototype.isPaused=function(){return this._readableState.flowing===!1};Lt.prototype.setEncoding=function(t){return Cu||(Cu=uk().StringDecoder),this._readableState.decoder=new Cu(t),this._readableState.encoding=t,this};var Sq=8388608;function vye(t){return t>=Sq?t=Sq:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Eq(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=vye(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Lt.prototype.read=function(t){mt("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return mt("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?hk(this):Iv(this),null;if(t=Eq(t,e),t===0&&e.ended)return e.length===0&&hk(this),null;var n=e.needReadable;mt("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,mt("length less than watermark",n)),e.ended||e.reading?(n=!1,mt("reading or ended",n)):n&&(mt("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Eq(r,e)));var i;return t>0?i=Rq(t,e):i=null,i===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&hk(this)),i!==null&&this.emit("data",i),i};function bye(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,Iv(t)}}function Iv(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(mt("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Ru.nextTick(Iq,t):Iq(t))}function Iq(t){mt("emit readable"),t.emit("readable"),gk(t)}function Cq(t,e){e.readingMore||(e.readingMore=!0,Ru.nextTick(wye,t,e))}function wye(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(mt("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}Lt.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};Lt.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,mt("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,o=i?s:y;n.endEmitted?Ru.nextTick(o):r.once("end",o),t.on("unpipe",a);function a(g,v){mt("onunpipe"),g===r&&v&&v.hasUnpiped===!1&&(v.hasUnpiped=!0,u())}function s(){mt("onend"),t.end()}var l=xye(r);t.on("drain",l);var c=!1;function u(){mt("cleanup"),t.removeListener("close",h),t.removeListener("finish",m),t.removeListener("drain",l),t.removeListener("error",p),t.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",y),r.removeListener("data",f),c=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}var d=!1;r.on("data",f);function f(g){mt("ondata"),d=!1;var v=t.write(g);v===!1&&!d&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&Dq(n.pipes,t)!==-1)&&!c&&(mt("false write response, pause",n.awaitDrain),n.awaitDrain++,d=!0),r.pause())}function p(g){mt("onerror",g),y(),t.removeListener("error",p),$q(t,"error")===0&&t.emit("error",g)}gye(t,"error",p);function h(){t.removeListener("finish",m),y()}t.once("close",h);function m(){mt("onfinish"),t.removeListener("close",h),y()}t.once("finish",m);function y(){mt("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(mt("pipe resume"),r.resume()),t};function xye(t){return function(){var e=t._readableState;mt("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&$q(t,"data")&&(e.flowing=!0,gk(t))}}Lt.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=Dq(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Lt.prototype.on=function(t,e){var r=mk.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var n=this._readableState;!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&Iv(this):Ru.nextTick(Sye,this))}return r};Lt.prototype.addListener=Lt.prototype.on;function Sye(t){mt("readable nexttick read 0"),t.read(0)}Lt.prototype.resume=function(){var t=this._readableState;return t.flowing||(mt("resume"),t.flowing=!0,Eye(this,t)),this};function Eye(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Ru.nextTick(Iye,t,e))}function Iye(t,e){e.reading||(mt("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),gk(t),e.flowing&&!e.reading&&t.read(0)}Lt.prototype.pause=function(){return mt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(mt("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function gk(t){var e=t._readableState;for(mt("flow",e.flowing);e.flowing&&t.read()!==null;);}Lt.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(mt("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(mt("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var s=e.push(a);s||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=(function(a){return function(){return t[a].apply(t,arguments)}})(i));for(var o=0;o<fk.length;o++)t.on(fk[o],this.emit.bind(this,fk[o]));return this._read=function(a){mt("wrapped _read",a),n&&(n=!1,t.resume())},this};Object.defineProperty(Lt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Lt._fromList=Rq;function Rq(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=$ye(t,e.buffer,e.decoder),r}function $ye(t,e,r){var n;return t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?n=e.shift():n=r?Pye(t,e):Tye(t,e),n}function Pye(t,e){var r=e.head,n=1,i=r.data;for(t-=i.length;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),t-=a,t===0){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++n}return e.length-=n,i}function Tye(t,e){var r=Ph.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),t-=a,t===0){a===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++i}return e.length-=i,r}function hk(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Ru.nextTick(Aye,e,t))}function Aye(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function Dq(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var yk=b((Yqe,jq)=>{"use strict";jq.exports=Ko;var $v=xl(),Nq=Object.create(Tu());Nq.inherits=Au();Nq.inherits(Ko,$v);function kye(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Ko(t){if(!(this instanceof Ko))return new Ko(t);$v.call(this,t),this._transformState={afterTransform:kye.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Cye)}function Cye(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){Mq(t,e,r)}):Mq(this,null,null)}Ko.prototype.push=function(t,e){return this._transformState.needTransform=!1,$v.prototype.push.call(this,t,e)};Ko.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};Ko.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Ko.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Ko.prototype._destroy=function(t,e){var r=this;$v.prototype._destroy.call(this,t,function(n){e(n),r.emit("close")})};function Mq(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var Bq=b((Xqe,Fq)=>{"use strict";Fq.exports=Th;var zq=yk(),Lq=Object.create(Tu());Lq.inherits=Au();Lq.inherits(Th,zq);function Th(t){if(!(this instanceof Th))return new Th(t);zq.call(this,t)}Th.prototype._transform=function(t,e,r){r(null,t)}});var Uq=b((Ir,Pv)=>{var ao=Q("stream");process.env.READABLE_STREAM==="disable"&&ao?(Pv.exports=ao,Ir=Pv.exports=ao.Readable,Ir.Readable=ao.Readable,Ir.Writable=ao.Writable,Ir.Duplex=ao.Duplex,Ir.Transform=ao.Transform,Ir.PassThrough=ao.PassThrough,Ir.Stream=ao):(Ir=Pv.exports=sk(),Ir.Stream=ao||Ir,Ir.Readable=Ir,Ir.Writable=ik(),Ir.Duplex=xl(),Ir.Transform=yk(),Ir.PassThrough=Bq())});var Zq=b((Qqe,qq)=>{qq.exports=Uq().PassThrough});var Wq=b((e5e,Gq)=>{var Hq=Q("util"),kv=Zq();Gq.exports={Readable:Tv,Writable:Av};Hq.inherits(Tv,kv);Hq.inherits(Av,kv);function Vq(t,e,r){t[e]=function(){return delete t[e],r.apply(this,arguments),this[e].apply(this,arguments)}}function Tv(t,e){if(!(this instanceof Tv))return new Tv(t,e);kv.call(this,e),Vq(this,"_read",function(){var r=t.call(this,e),n=this.emit.bind(this,"error");r.on("error",n),r.pipe(this)}),this.emit("readable")}function Av(t,e){if(!(this instanceof Av))return new Av(t,e);kv.call(this,e),Vq(this,"_write",function(){var r=t.call(this,e),n=this.emit.bind(this,"error");r.on("error",n),this.pipe(r)}),this.emit("writable")}});var _k=b((t5e,Jq)=>{Jq.exports=function(t,e){if(typeof t!="string")throw new TypeError("expected path to be a string");if(t==="\\"||t==="/")return"/";var r=t.length;if(r<=1)return t;var n="";if(r>4&&t[3]==="\\"){var i=t[2];(i==="?"||i===".")&&t.slice(0,2)==="\\\\"&&(t=t.slice(2),n="//")}var o=t.split(/[/\\]+/);return e!==!1&&o[o.length-1]===""&&o.pop(),n+o.join("/")}});var vk=b((r5e,Kq)=>{function Rye(t){return t}Kq.exports=Rye});var Xq=b((n5e,Yq)=>{function Dye(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}Yq.exports=Dye});var t5=b((i5e,e5)=>{var Oye=Xq(),Qq=Math.max;function Mye(t,e,r){return e=Qq(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=Qq(n.length-e,0),a=Array(o);++i<o;)a[i]=n[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=n[i];return s[e]=r(a),Oye(t,this,s)}}e5.exports=Mye});var n5=b((o5e,r5)=>{function Nye(t){return function(){return t}}r5.exports=Nye});var bk=b((a5e,i5)=>{var jye=typeof global=="object"&&global&&global.Object===Object&&global;i5.exports=jye});var Du=b((s5e,o5)=>{var zye=bk(),Lye=typeof self=="object"&&self&&self.Object===Object&&self,Fye=zye||Lye||Function("return this")();o5.exports=Fye});var Cv=b((l5e,a5)=>{var Bye=Du(),Uye=Bye.Symbol;a5.exports=Uye});var u5=b((c5e,c5)=>{var s5=Cv(),l5=Object.prototype,qye=l5.hasOwnProperty,Zye=l5.toString,Ah=s5?s5.toStringTag:void 0;function Hye(t){var e=qye.call(t,Ah),r=t[Ah];try{t[Ah]=void 0;var n=!0}catch{}var i=Zye.call(t);return n&&(e?t[Ah]=r:delete t[Ah]),i}c5.exports=Hye});var f5=b((u5e,d5)=>{var Vye=Object.prototype,Gye=Vye.toString;function Wye(t){return Gye.call(t)}d5.exports=Wye});var kh=b((d5e,m5)=>{var p5=Cv(),Jye=u5(),Kye=f5(),Yye="[object Null]",Xye="[object Undefined]",h5=p5?p5.toStringTag:void 0;function Qye(t){return t==null?t===void 0?Xye:Yye:h5&&h5 in Object(t)?Jye(t):Kye(t)}m5.exports=Qye});var Ch=b((f5e,g5)=>{function e_e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}g5.exports=e_e});var wk=b((p5e,y5)=>{var t_e=kh(),r_e=Ch(),n_e="[object AsyncFunction]",i_e="[object Function]",o_e="[object GeneratorFunction]",a_e="[object Proxy]";function s_e(t){if(!r_e(t))return!1;var e=t_e(t);return e==i_e||e==o_e||e==n_e||e==a_e}y5.exports=s_e});var v5=b((h5e,_5)=>{var l_e=Du(),c_e=l_e["__core-js_shared__"];_5.exports=c_e});var x5=b((m5e,w5)=>{var xk=v5(),b5=(function(){var t=/[^.]+$/.exec(xk&&xk.keys&&xk.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function u_e(t){return!!b5&&b5 in t}w5.exports=u_e});var E5=b((g5e,S5)=>{var d_e=Function.prototype,f_e=d_e.toString;function p_e(t){if(t!=null){try{return f_e.call(t)}catch{}try{return t+""}catch{}}return""}S5.exports=p_e});var $5=b((y5e,I5)=>{var h_e=wk(),m_e=x5(),g_e=Ch(),y_e=E5(),__e=/[\\^$.*+?()[\]{}|]/g,v_e=/^\[object .+?Constructor\]$/,b_e=Function.prototype,w_e=Object.prototype,x_e=b_e.toString,S_e=w_e.hasOwnProperty,E_e=RegExp("^"+x_e.call(S_e).replace(__e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function I_e(t){if(!g_e(t)||m_e(t))return!1;var e=h_e(t)?E_e:v_e;return e.test(y_e(t))}I5.exports=I_e});var T5=b((_5e,P5)=>{function $_e(t,e){return t==null?void 0:t[e]}P5.exports=$_e});var Rh=b((v5e,A5)=>{var P_e=$5(),T_e=T5();function A_e(t,e){var r=T_e(t,e);return P_e(r)?r:void 0}A5.exports=A_e});var C5=b((b5e,k5)=>{var k_e=Rh(),C_e=(function(){try{var t=k_e(Object,"defineProperty");return t({},"",{}),t}catch{}})();k5.exports=C_e});var O5=b((w5e,D5)=>{var R_e=n5(),R5=C5(),D_e=vk(),O_e=R5?function(t,e){return R5(t,"toString",{configurable:!0,enumerable:!1,value:R_e(e),writable:!0})}:D_e;D5.exports=O_e});var N5=b((x5e,M5)=>{var M_e=800,N_e=16,j_e=Date.now;function z_e(t){var e=0,r=0;return function(){var n=j_e(),i=N_e-(n-r);if(r=n,i>0){if(++e>=M_e)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}M5.exports=z_e});var z5=b((S5e,j5)=>{var L_e=O5(),F_e=N5(),B_e=F_e(L_e);j5.exports=B_e});var Rv=b((E5e,L5)=>{var U_e=vk(),q_e=t5(),Z_e=z5();function H_e(t,e){return Z_e(q_e(t,e,U_e),t+"")}L5.exports=H_e});var Dv=b((I5e,F5)=>{function V_e(t,e){return t===e||t!==t&&e!==e}F5.exports=V_e});var Sk=b(($5e,B5)=>{var G_e=9007199254740991;function W_e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=G_e}B5.exports=W_e});var Ov=b((P5e,U5)=>{var J_e=wk(),K_e=Sk();function Y_e(t){return t!=null&&K_e(t.length)&&!J_e(t)}U5.exports=Y_e});var Ek=b((T5e,q5)=>{var X_e=9007199254740991,Q_e=/^(?:0|[1-9]\d*)$/;function eve(t,e){var r=typeof t;return e=e??X_e,!!e&&(r=="number"||r!="symbol"&&Q_e.test(t))&&t>-1&&t%1==0&&t<e}q5.exports=eve});var H5=b((A5e,Z5)=>{var tve=Dv(),rve=Ov(),nve=Ek(),ive=Ch();function ove(t,e,r){if(!ive(r))return!1;var n=typeof e;return(n=="number"?rve(r)&&nve(e,r.length):n=="string"&&e in r)?tve(r[e],t):!1}Z5.exports=ove});var G5=b((k5e,V5)=>{function ave(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}V5.exports=ave});var Ou=b((C5e,W5)=>{function sve(t){return t!=null&&typeof t=="object"}W5.exports=sve});var K5=b((R5e,J5)=>{var lve=kh(),cve=Ou(),uve="[object Arguments]";function dve(t){return cve(t)&&lve(t)==uve}J5.exports=dve});var Ik=b((D5e,Q5)=>{var Y5=K5(),fve=Ou(),X5=Object.prototype,pve=X5.hasOwnProperty,hve=X5.propertyIsEnumerable,mve=Y5((function(){return arguments})())?Y5:function(t){return fve(t)&&pve.call(t,"callee")&&!hve.call(t,"callee")};Q5.exports=mve});var $k=b((O5e,e9)=>{var gve=Array.isArray;e9.exports=gve});var r9=b((M5e,t9)=>{function yve(){return!1}t9.exports=yve});var a9=b((Dh,Mu)=>{var _ve=Du(),vve=r9(),o9=typeof Dh=="object"&&Dh&&!Dh.nodeType&&Dh,n9=o9&&typeof Mu=="object"&&Mu&&!Mu.nodeType&&Mu,bve=n9&&n9.exports===o9,i9=bve?_ve.Buffer:void 0,wve=i9?i9.isBuffer:void 0,xve=wve||vve;Mu.exports=xve});var l9=b((N5e,s9)=>{var Sve=kh(),Eve=Sk(),Ive=Ou(),$ve="[object Arguments]",Pve="[object Array]",Tve="[object Boolean]",Ave="[object Date]",kve="[object Error]",Cve="[object Function]",Rve="[object Map]",Dve="[object Number]",Ove="[object Object]",Mve="[object RegExp]",Nve="[object Set]",jve="[object String]",zve="[object WeakMap]",Lve="[object ArrayBuffer]",Fve="[object DataView]",Bve="[object Float32Array]",Uve="[object Float64Array]",qve="[object Int8Array]",Zve="[object Int16Array]",Hve="[object Int32Array]",Vve="[object Uint8Array]",Gve="[object Uint8ClampedArray]",Wve="[object Uint16Array]",Jve="[object Uint32Array]",Ft={};Ft[Bve]=Ft[Uve]=Ft[qve]=Ft[Zve]=Ft[Hve]=Ft[Vve]=Ft[Gve]=Ft[Wve]=Ft[Jve]=!0;Ft[$ve]=Ft[Pve]=Ft[Lve]=Ft[Tve]=Ft[Fve]=Ft[Ave]=Ft[kve]=Ft[Cve]=Ft[Rve]=Ft[Dve]=Ft[Ove]=Ft[Mve]=Ft[Nve]=Ft[jve]=Ft[zve]=!1;function Kve(t){return Ive(t)&&Eve(t.length)&&!!Ft[Sve(t)]}s9.exports=Kve});var Pk=b((j5e,c9)=>{function Yve(t){return function(e){return t(e)}}c9.exports=Yve});var d9=b((Oh,Nu)=>{var Xve=bk(),u9=typeof Oh=="object"&&Oh&&!Oh.nodeType&&Oh,Mh=u9&&typeof Nu=="object"&&Nu&&!Nu.nodeType&&Nu,Qve=Mh&&Mh.exports===u9,Tk=Qve&&Xve.process,ebe=(function(){try{var t=Mh&&Mh.require&&Mh.require("util").types;return t||Tk&&Tk.binding&&Tk.binding("util")}catch{}})();Nu.exports=ebe});var m9=b((z5e,h9)=>{var tbe=l9(),rbe=Pk(),f9=d9(),p9=f9&&f9.isTypedArray,nbe=p9?rbe(p9):tbe;h9.exports=nbe});var y9=b((L5e,g9)=>{var ibe=G5(),obe=Ik(),abe=$k(),sbe=a9(),lbe=Ek(),cbe=m9(),ube=Object.prototype,dbe=ube.hasOwnProperty;function fbe(t,e){var r=abe(t),n=!r&&obe(t),i=!r&&!n&&sbe(t),o=!r&&!n&&!i&&cbe(t),a=r||n||i||o,s=a?ibe(t.length,String):[],l=s.length;for(var c in t)(e||dbe.call(t,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||lbe(c,l)))&&s.push(c);return s}g9.exports=fbe});var v9=b((F5e,_9)=>{var pbe=Object.prototype;function hbe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||pbe;return t===r}_9.exports=hbe});var w9=b((B5e,b9)=>{function mbe(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}b9.exports=mbe});var S9=b((U5e,x9)=>{var gbe=Ch(),ybe=v9(),_be=w9(),vbe=Object.prototype,bbe=vbe.hasOwnProperty;function wbe(t){if(!gbe(t))return _be(t);var e=ybe(t),r=[];for(var n in t)n=="constructor"&&(e||!bbe.call(t,n))||r.push(n);return r}x9.exports=wbe});var I9=b((q5e,E9)=>{var xbe=y9(),Sbe=S9(),Ebe=Ov();function Ibe(t){return Ebe(t)?xbe(t,!0):Sbe(t)}E9.exports=Ibe});var T9=b((Z5e,P9)=>{var $be=Rv(),Pbe=Dv(),Tbe=H5(),Abe=I9(),$9=Object.prototype,kbe=$9.hasOwnProperty,Cbe=$be(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&Tbe(e[0],e[1],i)&&(n=1);++r<n;)for(var o=e[r],a=Abe(o),s=-1,l=a.length;++s<l;){var c=a[s],u=t[c];(u===void 0||Pbe(u,$9[c])&&!kbe.call(t,c))&&(t[c]=o[c])}return t});P9.exports=Cbe});var Ht=b((H5e,A9)=>{"use strict";var Ak=class extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError(`Expected input to be an Array, got ${typeof e}`);let r="";for(let n=0;n<e.length;n++)r+=` ${e[n].stack}
|
|
228
|
-
`;super(r),this.name="AggregateError",this.errors=e}};A9.exports={AggregateError:Ak,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Boolean,Uint8Array}});var kk=b((V5e,k9)=>{"use strict";k9.exports={format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,n]){let i=e.shift();return n==="f"?i.toFixed(6):n==="j"?JSON.stringify(i):n==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}}});var Ur=b((G5e,D9)=>{"use strict";var{format:Rbe,inspect:Mv}=kk(),{AggregateError:Dbe}=Ht(),Obe=globalThis.AggregateError||Dbe,Mbe=Symbol("kIsNodeError"),Nbe=["string","function","number","object","Function","Object","boolean","bigint","symbol"],jbe=/^([A-Z][a-z0-9]*)+$/,zbe="__node_internal_",Nv={};function Sl(t,e){if(!t)throw new Nv.ERR_INTERNAL_ASSERTION(e)}function C9(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function Lbe(t,e,r){if(typeof e=="function")return Sl(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let n=(e.match(/%[dfijoOs]/g)||[]).length;return Sl(n===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),r.length===0?e:Rbe(e,...r)}function $r(t,e,r){r||(r=Error);class n extends r{constructor(...o){super(Lbe(t,e,o))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(n.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),n.prototype.code=t,n.prototype[Mbe]=!0,Nv[t]=n}function R9(t){let e=zbe+t.name;return Object.defineProperty(t,"name",{value:e}),t}function Fbe(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new Obe([e,t],e.message);return r.code=e.code,r}return t||e}var Ck=class extends Error{constructor(e="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new Nv.ERR_INVALID_ARG_TYPE("options","Object",r);super(e,r),this.code="ABORT_ERR",this.name="AbortError"}};$r("ERR_ASSERTION","%s",Error);$r("ERR_INVALID_ARG_TYPE",(t,e,r)=>{Sl(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";let i=[],o=[],a=[];for(let l of e)Sl(typeof l=="string","All expected entries have to be of type string"),Nbe.includes(l)?i.push(l.toLowerCase()):jbe.test(l)?o.push(l):(Sl(l!=="object",'The value "object" should be written as "Object"'),a.push(l));if(o.length>0){let l=i.indexOf("object");l!==-1&&(i.splice(i,l,1),o.push("Object"))}if(i.length>0){switch(i.length){case 1:n+=`of type ${i[0]}`;break;case 2:n+=`one of type ${i[0]} or ${i[1]}`;break;default:{let l=i.pop();n+=`one of type ${i.join(", ")}, or ${l}`}}(o.length>0||a.length>0)&&(n+=" or ")}if(o.length>0){switch(o.length){case 1:n+=`an instance of ${o[0]}`;break;case 2:n+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let l=o.pop();n+=`an instance of ${o.join(", ")}, or ${l}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{let l=a.pop();n+=`one of ${a.join(", ")}, or ${l}`}}if(r==null)n+=`. Received ${r}`;else if(typeof r=="function"&&r.name)n+=`. Received function ${r.name}`;else if(typeof r=="object"){var s;if((s=r.constructor)!==null&&s!==void 0&&s.name)n+=`. Received an instance of ${r.constructor.name}`;else{let l=Mv(r,{depth:-1});n+=`. Received ${l}`}}else{let l=Mv(r,{colors:!1});l.length>25&&(l=`${l.slice(0,25)}...`),n+=`. Received type ${typeof r} (${l})`}return n},TypeError);$r("ERR_INVALID_ARG_VALUE",(t,e,r="is invalid")=>{let n=Mv(e);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${t.includes(".")?"property":"argument"} '${t}' ${r}. Received ${n}`},TypeError);$r("ERR_INVALID_RETURN_VALUE",(t,e,r)=>{var n;let i=r!=null&&(n=r.constructor)!==null&&n!==void 0&&n.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return`Expected ${t} to be returned from the "${e}" function but got ${i}.`},TypeError);$r("ERR_MISSING_ARGS",(...t)=>{Sl(t.length>0,"At least one arg needs to be specified");let e,r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(n=>`"${n}"`).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{let n=t.pop();e+=`The ${t.join(", ")}, and ${n} arguments`}break}return`${e} must be specified`},TypeError);$r("ERR_OUT_OF_RANGE",(t,e,r)=>{Sl(e,'Missing "range" argument');let n;if(Number.isInteger(r)&&Math.abs(r)>2**32)n=C9(String(r));else if(typeof r=="bigint"){n=String(r);let i=BigInt(2)**BigInt(32);(r>i||r<-i)&&(n=C9(n)),n+="n"}else n=Mv(r);return`The value of "${t}" is out of range. It must be ${e}. Received ${n}`},RangeError);$r("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);$r("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);$r("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);$r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);$r("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);$r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);$r("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);$r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);$r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);$r("ERR_STREAM_WRITE_AFTER_END","write after end",Error);$r("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);D9.exports={AbortError:Ck,aggregateTwoErrors:R9(Fbe),hideStackFrames:R9,codes:Nv}});var q9=b((zh,jh)=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});var L9=new WeakMap,Rk=new WeakMap;function Bt(t){let e=L9.get(t);return console.assert(e!=null,"'this' is expected an Event object, but got",t),e}function O9(t){if(t.passiveListener!=null){typeof console<"u"&&typeof console.error=="function"&&console.error("Unable to preventDefault inside passive event listener invocation.",t.passiveListener);return}t.event.cancelable&&(t.canceled=!0,typeof t.event.preventDefault=="function"&&t.event.preventDefault())}function ju(t,e){L9.set(this,{eventTarget:t,event:e,eventPhase:2,currentTarget:t,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:e.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let r=Object.keys(e);for(let n=0;n<r.length;++n){let i=r[n];i in this||Object.defineProperty(this,i,F9(i))}}ju.prototype={get type(){return Bt(this).event.type},get target(){return Bt(this).eventTarget},get currentTarget(){return Bt(this).currentTarget},composedPath(){let t=Bt(this).currentTarget;return t==null?[]:[t]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return Bt(this).eventPhase},stopPropagation(){let t=Bt(this);t.stopped=!0,typeof t.event.stopPropagation=="function"&&t.event.stopPropagation()},stopImmediatePropagation(){let t=Bt(this);t.stopped=!0,t.immediateStopped=!0,typeof t.event.stopImmediatePropagation=="function"&&t.event.stopImmediatePropagation()},get bubbles(){return!!Bt(this).event.bubbles},get cancelable(){return!!Bt(this).event.cancelable},preventDefault(){O9(Bt(this))},get defaultPrevented(){return Bt(this).canceled},get composed(){return!!Bt(this).event.composed},get timeStamp(){return Bt(this).timeStamp},get srcElement(){return Bt(this).eventTarget},get cancelBubble(){return Bt(this).stopped},set cancelBubble(t){if(!t)return;let e=Bt(this);e.stopped=!0,typeof e.event.cancelBubble=="boolean"&&(e.event.cancelBubble=!0)},get returnValue(){return!Bt(this).canceled},set returnValue(t){t||O9(Bt(this))},initEvent(){}};Object.defineProperty(ju.prototype,"constructor",{value:ju,configurable:!0,writable:!0});typeof window<"u"&&typeof window.Event<"u"&&(Object.setPrototypeOf(ju.prototype,window.Event.prototype),Rk.set(window.Event.prototype,ju));function F9(t){return{get(){return Bt(this).event[t]},set(e){Bt(this).event[t]=e},configurable:!0,enumerable:!0}}function Bbe(t){return{value(){let e=Bt(this).event;return e[t].apply(e,arguments)},configurable:!0,enumerable:!0}}function Ube(t,e){let r=Object.keys(e);if(r.length===0)return t;function n(i,o){t.call(this,i,o)}n.prototype=Object.create(t.prototype,{constructor:{value:n,configurable:!0,writable:!0}});for(let i=0;i<r.length;++i){let o=r[i];if(!(o in t.prototype)){let s=typeof Object.getOwnPropertyDescriptor(e,o).value=="function";Object.defineProperty(n.prototype,o,s?Bbe(o):F9(o))}}return n}function B9(t){if(t==null||t===Object.prototype)return ju;let e=Rk.get(t);return e==null&&(e=Ube(B9(Object.getPrototypeOf(t)),t),Rk.set(t,e)),e}function qbe(t,e){let r=B9(Object.getPrototypeOf(e));return new r(t,e)}function Zbe(t){return Bt(t).immediateStopped}function Hbe(t,e){Bt(t).eventPhase=e}function Vbe(t,e){Bt(t).currentTarget=e}function M9(t,e){Bt(t).passiveListener=e}var U9=new WeakMap,N9=1,j9=2,jv=3;function zv(t){return t!==null&&typeof t=="object"}function Nh(t){let e=U9.get(t);if(e==null)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return e}function Gbe(t){return{get(){let r=Nh(this).get(t);for(;r!=null;){if(r.listenerType===jv)return r.listener;r=r.next}return null},set(e){typeof e!="function"&&!zv(e)&&(e=null);let r=Nh(this),n=null,i=r.get(t);for(;i!=null;)i.listenerType===jv?n!==null?n.next=i.next:i.next!==null?r.set(t,i.next):r.delete(t):n=i,i=i.next;if(e!==null){let o={listener:e,listenerType:jv,passive:!1,once:!1,next:null};n===null?r.set(t,o):n.next=o}},configurable:!0,enumerable:!0}}function Dk(t,e){Object.defineProperty(t,`on${e}`,Gbe(e))}function z9(t){function e(){Di.call(this)}e.prototype=Object.create(Di.prototype,{constructor:{value:e,configurable:!0,writable:!0}});for(let r=0;r<t.length;++r)Dk(e.prototype,t[r]);return e}function Di(){if(this instanceof Di){U9.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return z9(arguments[0]);if(arguments.length>0){let t=new Array(arguments.length);for(let e=0;e<arguments.length;++e)t[e]=arguments[e];return z9(t)}throw new TypeError("Cannot call a class as a function")}Di.prototype={addEventListener(t,e,r){if(e==null)return;if(typeof e!="function"&&!zv(e))throw new TypeError("'listener' should be a function or an object.");let n=Nh(this),i=zv(r),a=(i?!!r.capture:!!r)?N9:j9,s={listener:e,listenerType:a,passive:i&&!!r.passive,once:i&&!!r.once,next:null},l=n.get(t);if(l===void 0){n.set(t,s);return}let c=null;for(;l!=null;){if(l.listener===e&&l.listenerType===a)return;c=l,l=l.next}c.next=s},removeEventListener(t,e,r){if(e==null)return;let n=Nh(this),o=(zv(r)?!!r.capture:!!r)?N9:j9,a=null,s=n.get(t);for(;s!=null;){if(s.listener===e&&s.listenerType===o){a!==null?a.next=s.next:s.next!==null?n.set(t,s.next):n.delete(t);return}a=s,s=s.next}},dispatchEvent(t){if(t==null||typeof t.type!="string")throw new TypeError('"event.type" should be a string.');let e=Nh(this),r=t.type,n=e.get(r);if(n==null)return!0;let i=qbe(this,t),o=null;for(;n!=null;){if(n.once?o!==null?o.next=n.next:n.next!==null?e.set(r,n.next):e.delete(r):o=n,M9(i,n.passive?n.listener:null),typeof n.listener=="function")try{n.listener.call(this,i)}catch(a){typeof console<"u"&&typeof console.error=="function"&&console.error(a)}else n.listenerType!==jv&&typeof n.listener.handleEvent=="function"&&n.listener.handleEvent(i);if(Zbe(i))break;n=n.next}return M9(i,null),Hbe(i,0),Vbe(i,null),!i.defaultPrevented}};Object.defineProperty(Di.prototype,"constructor",{value:Di,configurable:!0,writable:!0});typeof window<"u"&&typeof window.EventTarget<"u"&&Object.setPrototypeOf(Di.prototype,window.EventTarget.prototype);zh.defineEventAttribute=Dk;zh.EventTarget=Di;zh.default=Di;jh.exports=Di;jh.exports.EventTarget=jh.exports.default=Di;jh.exports.defineEventAttribute=Dk});var zu=b((Fh,Lh)=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});var Ok=q9(),ns=class extends Ok.EventTarget{constructor(){throw super(),new TypeError("AbortSignal cannot be constructed directly")}get aborted(){let e=Lv.get(this);if(typeof e!="boolean")throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return e}};Ok.defineEventAttribute(ns.prototype,"abort");function Wbe(){let t=Object.create(ns.prototype);return Ok.EventTarget.call(t),Lv.set(t,!1),t}function Jbe(t){Lv.get(t)===!1&&(Lv.set(t,!0),t.dispatchEvent({type:"abort"}))}var Lv=new WeakMap;Object.defineProperties(ns.prototype,{aborted:{enumerable:!0}});typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ns.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});var is=class{constructor(){H9.set(this,Wbe())}get signal(){return Z9(this)}abort(){Jbe(Z9(this))}},H9=new WeakMap;function Z9(t){let e=H9.get(t);if(e==null)throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${t===null?"null":typeof t}`);return e}Object.defineProperties(is.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}});typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(is.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});Fh.AbortController=is;Fh.AbortSignal=ns;Fh.default=is;Lh.exports=is;Lh.exports.AbortController=Lh.exports.default=is;Lh.exports.AbortSignal=ns});var sn=b((W5e,Nk)=>{"use strict";var Kbe=Q("buffer"),{format:Ybe,inspect:Xbe}=kk(),{codes:{ERR_INVALID_ARG_TYPE:Mk}}=Ur(),{kResistStopPropagation:Qbe,AggregateError:ewe,SymbolDispose:twe}=Ht(),rwe=globalThis.AbortSignal||zu().AbortSignal,nwe=globalThis.AbortController||zu().AbortController,iwe=Object.getPrototypeOf(async function(){}).constructor,V9=globalThis.Blob||Kbe.Blob,owe=typeof V9<"u"?function(e){return e instanceof V9}:function(e){return!1},G9=(t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new Mk(e,"AbortSignal",t)},awe=(t,e)=>{if(typeof t!="function")throw new Mk(e,"Function",t)};Nk.exports={AggregateError:ewe,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...r){e||(e=!0,t.apply(this,r))}},createDeferredPromise:function(){let t,e;return{promise:new Promise((n,i)=>{t=n,e=i}),resolve:t,reject:e}},promisify(t){return new Promise((e,r)=>{t((n,...i)=>n?r(n):e(...i))})},debuglog(){return function(){}},format:Ybe,inspect:Xbe,types:{isAsyncFunction(t){return t instanceof iwe},isArrayBufferView(t){return ArrayBuffer.isView(t)}},isBlob:owe,deprecate(t,e){return t},addAbortListener:Q("events").addAbortListener||function(e,r){if(e===void 0)throw new Mk("signal","AbortSignal",e);G9(e,"signal"),awe(r,"listener");let n;return e.aborted?queueMicrotask(()=>r()):(e.addEventListener("abort",r,{__proto__:null,once:!0,[Qbe]:!0}),n=()=>{e.removeEventListener("abort",r)}),{__proto__:null,[twe](){var i;(i=n)===null||i===void 0||i()}}},AbortSignalAny:rwe.any||function(e){if(e.length===1)return e[0];let r=new nwe,n=()=>r.abort();return e.forEach(i=>{G9(i,"signals"),i.addEventListener("abort",n,{once:!0})}),r.signal.addEventListener("abort",()=>{e.forEach(i=>i.removeEventListener("abort",n))},{once:!0}),r.signal}};Nk.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")});var Fu=b((J5e,n7)=>{"use strict";var{ArrayIsArray:zk,ArrayPrototypeIncludes:Y9,ArrayPrototypeJoin:X9,ArrayPrototypeMap:swe,NumberIsInteger:Lk,NumberIsNaN:lwe,NumberMAX_SAFE_INTEGER:cwe,NumberMIN_SAFE_INTEGER:uwe,NumberParseInt:dwe,ObjectPrototypeHasOwnProperty:fwe,RegExpPrototypeExec:Q9,String:pwe,StringPrototypeToUpperCase:hwe,StringPrototypeTrim:mwe}=Ht(),{hideStackFrames:ci,codes:{ERR_SOCKET_BAD_PORT:gwe,ERR_INVALID_ARG_TYPE:qr,ERR_INVALID_ARG_VALUE:Lu,ERR_OUT_OF_RANGE:El,ERR_UNKNOWN_SIGNAL:W9}}=Ur(),{normalizeEncoding:ywe}=sn(),{isAsyncFunction:_we,isArrayBufferView:vwe}=sn().types,J9={};function bwe(t){return t===(t|0)}function wwe(t){return t===t>>>0}var xwe=/^[0-7]+$/,Swe="must be a 32-bit unsigned integer or an octal string";function Ewe(t,e,r){if(typeof t>"u"&&(t=r),typeof t=="string"){if(Q9(xwe,t)===null)throw new Lu(e,t,Swe);t=dwe(t,8)}return e7(t,e),t}var Iwe=ci((t,e,r=uwe,n=cwe)=>{if(typeof t!="number")throw new qr(e,"number",t);if(!Lk(t))throw new El(e,"an integer",t);if(t<r||t>n)throw new El(e,`>= ${r} && <= ${n}`,t)}),$we=ci((t,e,r=-2147483648,n=2147483647)=>{if(typeof t!="number")throw new qr(e,"number",t);if(!Lk(t))throw new El(e,"an integer",t);if(t<r||t>n)throw new El(e,`>= ${r} && <= ${n}`,t)}),e7=ci((t,e,r=!1)=>{if(typeof t!="number")throw new qr(e,"number",t);if(!Lk(t))throw new El(e,"an integer",t);let n=r?1:0,i=4294967295;if(t<n||t>i)throw new El(e,`>= ${n} && <= ${i}`,t)});function Fk(t,e){if(typeof t!="string")throw new qr(e,"string",t)}function Pwe(t,e,r=void 0,n){if(typeof t!="number")throw new qr(e,"number",t);if(r!=null&&t<r||n!=null&&t>n||(r!=null||n!=null)&&lwe(t))throw new El(e,`${r!=null?`>= ${r}`:""}${r!=null&&n!=null?" && ":""}${n!=null?`<= ${n}`:""}`,t)}var Twe=ci((t,e,r)=>{if(!Y9(r,t)){let i="must be one of: "+X9(swe(r,o=>typeof o=="string"?`'${o}'`:pwe(o)),", ");throw new Lu(e,t,i)}});function t7(t,e){if(typeof t!="boolean")throw new qr(e,"boolean",t)}function jk(t,e,r){return t==null||!fwe(t,e)?r:t[e]}var Awe=ci((t,e,r=null)=>{let n=jk(r,"allowArray",!1),i=jk(r,"allowFunction",!1);if(!jk(r,"nullable",!1)&&t===null||!n&&zk(t)||typeof t!="object"&&(!i||typeof t!="function"))throw new qr(e,"Object",t)}),kwe=ci((t,e)=>{if(t!=null&&typeof t!="object"&&typeof t!="function")throw new qr(e,"a dictionary",t)}),Fv=ci((t,e,r=0)=>{if(!zk(t))throw new qr(e,"Array",t);if(t.length<r){let n=`must be longer than ${r}`;throw new Lu(e,t,n)}});function Cwe(t,e){Fv(t,e);for(let r=0;r<t.length;r++)Fk(t[r],`${e}[${r}]`)}function Rwe(t,e){Fv(t,e);for(let r=0;r<t.length;r++)t7(t[r],`${e}[${r}]`)}function Dwe(t,e){Fv(t,e);for(let r=0;r<t.length;r++){let n=t[r],i=`${e}[${r}]`;if(n==null)throw new qr(i,"AbortSignal",n);r7(n,i)}}function Owe(t,e="signal"){if(Fk(t,e),J9[t]===void 0)throw J9[hwe(t)]!==void 0?new W9(t+" (signals must use all capital letters)"):new W9(t)}var Mwe=ci((t,e="buffer")=>{if(!vwe(t))throw new qr(e,["Buffer","TypedArray","DataView"],t)});function Nwe(t,e){let r=ywe(e),n=t.length;if(r==="hex"&&n%2!==0)throw new Lu("encoding",e,`is invalid for data of length ${n}`)}function jwe(t,e="Port",r=!0){if(typeof t!="number"&&typeof t!="string"||typeof t=="string"&&mwe(t).length===0||+t!==+t>>>0||t>65535||t===0&&!r)throw new gwe(e,t,r);return t|0}var r7=ci((t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new qr(e,"AbortSignal",t)}),zwe=ci((t,e)=>{if(typeof t!="function")throw new qr(e,"Function",t)}),Lwe=ci((t,e)=>{if(typeof t!="function"||_we(t))throw new qr(e,"Function",t)}),Fwe=ci((t,e)=>{if(t!==void 0)throw new qr(e,"undefined",t)});function Bwe(t,e,r){if(!Y9(r,t))throw new qr(e,`('${X9(r,"|")}')`,t)}var Uwe=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function K9(t,e){if(typeof t>"u"||!Q9(Uwe,t))throw new Lu(e,t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function qwe(t){if(typeof t=="string")return K9(t,"hints"),t;if(zk(t)){let e=t.length,r="";if(e===0)return r;for(let n=0;n<e;n++){let i=t[n];K9(i,"hints"),r+=i,n!==e-1&&(r+=", ")}return r}throw new Lu("hints",t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}n7.exports={isInt32:bwe,isUint32:wwe,parseFileMode:Ewe,validateArray:Fv,validateStringArray:Cwe,validateBooleanArray:Rwe,validateAbortSignalArray:Dwe,validateBoolean:t7,validateBuffer:Mwe,validateDictionary:kwe,validateEncoding:Nwe,validateFunction:zwe,validateInt32:$we,validateInteger:Iwe,validateNumber:Pwe,validateObject:Awe,validateOneOf:Twe,validatePlainFunction:Lwe,validatePort:jwe,validateSignalName:Owe,validateString:Fk,validateUint32:e7,validateUndefined:Fwe,validateUnion:Bwe,validateAbortSignal:r7,validateLinkHeaderValue:qwe}});var os=b((K5e,i7)=>{i7.exports=global.process});var lo=b((Y5e,v7)=>{"use strict";var{SymbolAsyncIterator:o7,SymbolIterator:a7,SymbolFor:Il}=Ht(),s7=Il("nodejs.stream.destroyed"),l7=Il("nodejs.stream.errored"),Bk=Il("nodejs.stream.readable"),Uk=Il("nodejs.stream.writable"),c7=Il("nodejs.stream.disturbed"),Zwe=Il("nodejs.webstream.isClosedPromise"),Hwe=Il("nodejs.webstream.controllerErrorFunction");function Bv(t,e=!1){var r;return!!(t&&typeof t.pipe=="function"&&typeof t.on=="function"&&(!e||typeof t.pause=="function"&&typeof t.resume=="function")&&(!t._writableState||((r=t._readableState)===null||r===void 0?void 0:r.readable)!==!1)&&(!t._writableState||t._readableState))}function Uv(t){var e;return!!(t&&typeof t.write=="function"&&typeof t.on=="function"&&(!t._readableState||((e=t._writableState)===null||e===void 0?void 0:e.writable)!==!1))}function Vwe(t){return!!(t&&typeof t.pipe=="function"&&t._readableState&&typeof t.on=="function"&&typeof t.write=="function")}function so(t){return t&&(t._readableState||t._writableState||typeof t.write=="function"&&typeof t.on=="function"||typeof t.pipe=="function"&&typeof t.on=="function")}function u7(t){return!!(t&&!so(t)&&typeof t.pipeThrough=="function"&&typeof t.getReader=="function"&&typeof t.cancel=="function")}function d7(t){return!!(t&&!so(t)&&typeof t.getWriter=="function"&&typeof t.abort=="function")}function f7(t){return!!(t&&!so(t)&&typeof t.readable=="object"&&typeof t.writable=="object")}function Gwe(t){return u7(t)||d7(t)||f7(t)}function Wwe(t,e){return t==null?!1:e===!0?typeof t[o7]=="function":e===!1?typeof t[a7]=="function":typeof t[o7]=="function"||typeof t[a7]=="function"}function qv(t){if(!so(t))return null;let e=t._writableState,r=t._readableState,n=e||r;return!!(t.destroyed||t[s7]||n!=null&&n.destroyed)}function p7(t){if(!Uv(t))return null;if(t.writableEnded===!0)return!0;let e=t._writableState;return e!=null&&e.errored?!1:typeof(e==null?void 0:e.ended)!="boolean"?null:e.ended}function Jwe(t,e){if(!Uv(t))return null;if(t.writableFinished===!0)return!0;let r=t._writableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.finished)!="boolean"?null:!!(r.finished||e===!1&&r.ended===!0&&r.length===0)}function Kwe(t){if(!Bv(t))return null;if(t.readableEnded===!0)return!0;let e=t._readableState;return!e||e.errored?!1:typeof(e==null?void 0:e.ended)!="boolean"?null:e.ended}function h7(t,e){if(!Bv(t))return null;let r=t._readableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.endEmitted)!="boolean"?null:!!(r.endEmitted||e===!1&&r.ended===!0&&r.length===0)}function m7(t){return t&&t[Bk]!=null?t[Bk]:typeof(t==null?void 0:t.readable)!="boolean"?null:qv(t)?!1:Bv(t)&&t.readable&&!h7(t)}function g7(t){return t&&t[Uk]!=null?t[Uk]:typeof(t==null?void 0:t.writable)!="boolean"?null:qv(t)?!1:Uv(t)&&t.writable&&!p7(t)}function Ywe(t,e){return so(t)?qv(t)?!0:!((e==null?void 0:e.readable)!==!1&&m7(t)||(e==null?void 0:e.writable)!==!1&&g7(t)):null}function Xwe(t){var e,r;return so(t)?t.writableErrored?t.writableErrored:(e=(r=t._writableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function Qwe(t){var e,r;return so(t)?t.readableErrored?t.readableErrored:(e=(r=t._readableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function exe(t){if(!so(t))return null;if(typeof t.closed=="boolean")return t.closed;let e=t._writableState,r=t._readableState;return typeof(e==null?void 0:e.closed)=="boolean"||typeof(r==null?void 0:r.closed)=="boolean"?(e==null?void 0:e.closed)||(r==null?void 0:r.closed):typeof t._closed=="boolean"&&y7(t)?t._closed:null}function y7(t){return typeof t._closed=="boolean"&&typeof t._defaultKeepAlive=="boolean"&&typeof t._removedConnection=="boolean"&&typeof t._removedContLen=="boolean"}function _7(t){return typeof t._sent100=="boolean"&&y7(t)}function txe(t){var e;return typeof t._consuming=="boolean"&&typeof t._dumped=="boolean"&&((e=t.req)===null||e===void 0?void 0:e.upgradeOrConnect)===void 0}function rxe(t){if(!so(t))return null;let e=t._writableState,r=t._readableState,n=e||r;return!n&&_7(t)||!!(n&&n.autoDestroy&&n.emitClose&&n.closed===!1)}function nxe(t){var e;return!!(t&&((e=t[c7])!==null&&e!==void 0?e:t.readableDidRead||t.readableAborted))}function ixe(t){var e,r,n,i,o,a,s,l,c,u;return!!(t&&((e=(r=(n=(i=(o=(a=t[l7])!==null&&a!==void 0?a:t.readableErrored)!==null&&o!==void 0?o:t.writableErrored)!==null&&i!==void 0?i:(s=t._readableState)===null||s===void 0?void 0:s.errorEmitted)!==null&&n!==void 0?n:(l=t._writableState)===null||l===void 0?void 0:l.errorEmitted)!==null&&r!==void 0?r:(c=t._readableState)===null||c===void 0?void 0:c.errored)!==null&&e!==void 0?e:!((u=t._writableState)===null||u===void 0)&&u.errored))}v7.exports={isDestroyed:qv,kIsDestroyed:s7,isDisturbed:nxe,kIsDisturbed:c7,isErrored:ixe,kIsErrored:l7,isReadable:m7,kIsReadable:Bk,kIsClosedPromise:Zwe,kControllerErrorFunction:Hwe,kIsWritable:Uk,isClosed:exe,isDuplexNodeStream:Vwe,isFinished:Ywe,isIterable:Wwe,isReadableNodeStream:Bv,isReadableStream:u7,isReadableEnded:Kwe,isReadableFinished:h7,isReadableErrored:Qwe,isNodeStream:so,isWebStream:Gwe,isWritable:g7,isWritableNodeStream:Uv,isWritableStream:d7,isWritableEnded:p7,isWritableFinished:Jwe,isWritableErrored:Xwe,isServerRequest:txe,isServerResponse:_7,willEmitClose:rxe,isTransformStream:f7}});var Yo=b((X5e,Gk)=>{"use strict";var as=os(),{AbortError:T7,codes:oxe}=Ur(),{ERR_INVALID_ARG_TYPE:axe,ERR_STREAM_PREMATURE_CLOSE:b7}=oxe,{kEmptyObject:Zk,once:Hk}=sn(),{validateAbortSignal:sxe,validateFunction:lxe,validateObject:cxe,validateBoolean:uxe}=Fu(),{Promise:dxe,PromisePrototypeThen:fxe,SymbolDispose:A7}=Ht(),{isClosed:pxe,isReadable:w7,isReadableNodeStream:qk,isReadableStream:hxe,isReadableFinished:x7,isReadableErrored:S7,isWritable:E7,isWritableNodeStream:I7,isWritableStream:mxe,isWritableFinished:$7,isWritableErrored:P7,isNodeStream:gxe,willEmitClose:yxe,kIsClosedPromise:_xe}=lo(),Bu;function vxe(t){return t.setHeader&&typeof t.abort=="function"}var Vk=()=>{};function k7(t,e,r){var n,i;if(arguments.length===2?(r=e,e=Zk):e==null?e=Zk:cxe(e,"options"),lxe(r,"callback"),sxe(e.signal,"options.signal"),r=Hk(r),hxe(t)||mxe(t))return bxe(t,e,r);if(!gxe(t))throw new axe("stream",["ReadableStream","WritableStream","Stream"],t);let o=(n=e.readable)!==null&&n!==void 0?n:qk(t),a=(i=e.writable)!==null&&i!==void 0?i:I7(t),s=t._writableState,l=t._readableState,c=()=>{t.writable||f()},u=yxe(t)&&qk(t)===o&&I7(t)===a,d=$7(t,!1),f=()=>{d=!0,t.destroyed&&(u=!1),!(u&&(!t.readable||o))&&(!o||p)&&r.call(t)},p=x7(t,!1),h=()=>{p=!0,t.destroyed&&(u=!1),!(u&&(!t.writable||a))&&(!a||d)&&r.call(t)},m=w=>{r.call(t,w)},y=pxe(t),g=()=>{y=!0;let w=P7(t)||S7(t);if(w&&typeof w!="boolean")return r.call(t,w);if(o&&!p&&qk(t,!0)&&!x7(t,!1))return r.call(t,new b7);if(a&&!d&&!$7(t,!1))return r.call(t,new b7);r.call(t)},v=()=>{y=!0;let w=P7(t)||S7(t);if(w&&typeof w!="boolean")return r.call(t,w);r.call(t)},E=()=>{t.req.on("finish",f)};vxe(t)?(t.on("complete",f),u||t.on("abort",g),t.req?E():t.on("request",E)):a&&!s&&(t.on("end",c),t.on("close",c)),!u&&typeof t.aborted=="boolean"&&t.on("aborted",g),t.on("end",h),t.on("finish",f),e.error!==!1&&t.on("error",m),t.on("close",g),y?as.nextTick(g):s!=null&&s.errorEmitted||l!=null&&l.errorEmitted?u||as.nextTick(v):(!o&&(!u||w7(t))&&(d||E7(t)===!1)||!a&&(!u||E7(t))&&(p||w7(t)===!1)||l&&t.req&&t.aborted)&&as.nextTick(v);let x=()=>{r=Vk,t.removeListener("aborted",g),t.removeListener("complete",f),t.removeListener("abort",g),t.removeListener("request",E),t.req&&t.req.removeListener("finish",f),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",f),t.removeListener("end",h),t.removeListener("error",m),t.removeListener("close",g)};if(e.signal&&!y){let w=()=>{let A=r;x(),A.call(t,new T7(void 0,{cause:e.signal.reason}))};if(e.signal.aborted)as.nextTick(w);else{Bu=Bu||sn().addAbortListener;let A=Bu(e.signal,w),$=r;r=Hk((...R)=>{A[A7](),$.apply(t,R)})}}return x}function bxe(t,e,r){let n=!1,i=Vk;if(e.signal)if(i=()=>{n=!0,r.call(t,new T7(void 0,{cause:e.signal.reason}))},e.signal.aborted)as.nextTick(i);else{Bu=Bu||sn().addAbortListener;let a=Bu(e.signal,i),s=r;r=Hk((...l)=>{a[A7](),s.apply(t,l)})}let o=(...a)=>{n||as.nextTick(()=>r.apply(t,a))};return fxe(t[_xe].promise,o,o),Vk}function wxe(t,e){var r;let n=!1;return e===null&&(e=Zk),(r=e)!==null&&r!==void 0&&r.cleanup&&(uxe(e.cleanup,"cleanup"),n=e.cleanup),new dxe((i,o)=>{let a=k7(t,e,s=>{n&&a(),s?o(s):i()})})}Gk.exports=k7;Gk.exports.finished=wxe});var $l=b((Q5e,z7)=>{"use strict";var co=os(),{aggregateTwoErrors:xxe,codes:{ERR_MULTIPLE_CALLBACK:Sxe},AbortError:Exe}=Ur(),{Symbol:D7}=Ht(),{kIsDestroyed:Ixe,isDestroyed:$xe,isFinished:Pxe,isServerRequest:Txe}=lo(),O7=D7("kDestroy"),Wk=D7("kConstruct");function M7(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t))}function Axe(t,e){let r=this._readableState,n=this._writableState,i=n||r;return n!=null&&n.destroyed||r!=null&&r.destroyed?(typeof e=="function"&&e(),this):(M7(t,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),i.constructed?C7(this,t,e):this.once(O7,function(o){C7(this,xxe(o,t),e)}),this)}function C7(t,e,r){let n=!1;function i(o){if(n)return;n=!0;let a=t._readableState,s=t._writableState;M7(o,s,a),s&&(s.closed=!0),a&&(a.closed=!0),typeof r=="function"&&r(o),o?co.nextTick(kxe,t,o):co.nextTick(N7,t)}try{t._destroy(e||null,i)}catch(o){i(o)}}function kxe(t,e){Jk(t,e),N7(t)}function N7(t){let e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(r!=null&&r.emitClose||e!=null&&e.emitClose)&&t.emit("close")}function Jk(t,e){let r=t._readableState,n=t._writableState;n!=null&&n.errorEmitted||r!=null&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit("error",e))}function Cxe(){let t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=t.readable===!1,t.endEmitted=t.readable===!1),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=e.writable===!1,e.ending=e.writable===!1,e.finished=e.writable===!1)}function Kk(t,e,r){let n=t._readableState,i=t._writableState;if(i!=null&&i.destroyed||n!=null&&n.destroyed)return this;n!=null&&n.autoDestroy||i!=null&&i.autoDestroy?t.destroy(e):e&&(e.stack,i&&!i.errored&&(i.errored=e),n&&!n.errored&&(n.errored=e),r?co.nextTick(Jk,t,e):Jk(t,e))}function Rxe(t,e){if(typeof t._construct!="function")return;let r=t._readableState,n=t._writableState;r&&(r.constructed=!1),n&&(n.constructed=!1),t.once(Wk,e),!(t.listenerCount(Wk)>1)&&co.nextTick(Dxe,t)}function Dxe(t){let e=!1;function r(n){if(e){Kk(t,n??new Sxe);return}e=!0;let i=t._readableState,o=t._writableState,a=o||i;i&&(i.constructed=!0),o&&(o.constructed=!0),a.destroyed?t.emit(O7,n):n?Kk(t,n,!0):co.nextTick(Oxe,t)}try{t._construct(n=>{co.nextTick(r,n)})}catch(n){co.nextTick(r,n)}}function Oxe(t){t.emit(Wk)}function R7(t){return(t==null?void 0:t.setHeader)&&typeof t.abort=="function"}function j7(t){t.emit("close")}function Mxe(t,e){t.emit("error",e),co.nextTick(j7,t)}function Nxe(t,e){!t||$xe(t)||(!e&&!Pxe(t)&&(e=new Exe),Txe(t)?(t.socket=null,t.destroy(e)):R7(t)?t.abort():R7(t.req)?t.req.abort():typeof t.destroy=="function"?t.destroy(e):typeof t.close=="function"?t.close():e?co.nextTick(Mxe,t,e):co.nextTick(j7,t),t.destroyed||(t[Ixe]=!0))}z7.exports={construct:Rxe,destroyer:Nxe,destroy:Axe,undestroy:Cxe,errorOrDestroy:Kk}});var Vv=b((e9e,F7)=>{"use strict";var{ArrayIsArray:jxe,ObjectSetPrototypeOf:L7}=Ht(),{EventEmitter:Zv}=Q("events");function Hv(t){Zv.call(this,t)}L7(Hv.prototype,Zv.prototype);L7(Hv,Zv);Hv.prototype.pipe=function(t,e){let r=this;function n(u){t.writable&&t.write(u)===!1&&r.pause&&r.pause()}r.on("data",n);function i(){r.readable&&r.resume&&r.resume()}t.on("drain",i),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",a),r.on("close",s));let o=!1;function a(){o||(o=!0,t.end())}function s(){o||(o=!0,typeof t.destroy=="function"&&t.destroy())}function l(u){c(),Zv.listenerCount(this,"error")===0&&this.emit("error",u)}Yk(r,"error",l),Yk(t,"error",l);function c(){r.removeListener("data",n),t.removeListener("drain",i),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",l),t.removeListener("error",l),r.removeListener("end",c),r.removeListener("close",c),t.removeListener("close",c)}return r.on("end",c),r.on("close",c),t.on("close",c),t.emit("pipe",r),t};function Yk(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):jxe(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}F7.exports={Stream:Hv,prependListener:Yk}});var Bh=b((t9e,Gv)=>{"use strict";var{SymbolDispose:zxe}=Ht(),{AbortError:B7,codes:Lxe}=Ur(),{isNodeStream:U7,isWebStream:Fxe,kControllerErrorFunction:Bxe}=lo(),Uxe=Yo(),{ERR_INVALID_ARG_TYPE:q7}=Lxe,Xk,qxe=(t,e)=>{if(typeof t!="object"||!("aborted"in t))throw new q7(e,"AbortSignal",t)};Gv.exports.addAbortSignal=function(e,r){if(qxe(e,"signal"),!U7(r)&&!Fxe(r))throw new q7("stream",["ReadableStream","WritableStream","Stream"],r);return Gv.exports.addAbortSignalNoValidate(e,r)};Gv.exports.addAbortSignalNoValidate=function(t,e){if(typeof t!="object"||!("aborted"in t))return e;let r=U7(e)?()=>{e.destroy(new B7(void 0,{cause:t.reason}))}:()=>{e[Bxe](new B7(void 0,{cause:t.reason}))};if(t.aborted)r();else{Xk=Xk||sn().addAbortListener;let n=Xk(t,r);Uxe(e,n[zxe])}return e}});var V7=b((n9e,H7)=>{"use strict";var{StringPrototypeSlice:Z7,SymbolIterator:Zxe,TypedArrayPrototypeSet:Wv,Uint8Array:Hxe}=Ht(),{Buffer:Qk}=Q("buffer"),{inspect:Vxe}=sn();H7.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){let r={data:e,next:null};this.length>0?this.tail.next=r:this.head=r,this.tail=r,++this.length}unshift(e){let r={data:e,next:this.head};this.length===0&&(this.tail=r),this.head=r,++this.length}shift(){if(this.length===0)return;let e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(this.length===0)return"";let r=this.head,n=""+r.data;for(;(r=r.next)!==null;)n+=e+r.data;return n}concat(e){if(this.length===0)return Qk.alloc(0);let r=Qk.allocUnsafe(e>>>0),n=this.head,i=0;for(;n;)Wv(r,n.data,i),i+=n.data.length,n=n.next;return r}consume(e,r){let n=this.head.data;if(e<n.length){let i=n.slice(0,e);return this.head.data=n.slice(e),i}return e===n.length?this.shift():r?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[Zxe](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let r="",n=this.head,i=0;do{let o=n.data;if(e>o.length)r+=o,e-=o.length;else{e===o.length?(r+=o,++i,n.next?this.head=n.next:this.head=this.tail=null):(r+=Z7(o,0,e),this.head=n,n.data=Z7(o,e));break}++i}while((n=n.next)!==null);return this.length-=i,r}_getBuffer(e){let r=Qk.allocUnsafe(e),n=e,i=this.head,o=0;do{let a=i.data;if(e>a.length)Wv(r,a,n-e),e-=a.length;else{e===a.length?(Wv(r,a,n-e),++o,i.next?this.head=i.next:this.head=this.tail=null):(Wv(r,new Hxe(a.buffer,a.byteOffset,e),n-e),this.head=i,i.data=a.slice(e));break}++o}while((i=i.next)!==null);return this.length-=o,r}[Symbol.for("nodejs.util.inspect.custom")](e,r){return Vxe(this,{...r,depth:0,customInspect:!1})}}});var Uh=b((i9e,K7)=>{"use strict";var{MathFloor:Gxe,NumberIsInteger:Wxe}=Ht(),{validateInteger:Jxe}=Fu(),{ERR_INVALID_ARG_VALUE:Kxe}=Ur().codes,G7=16*1024,W7=16;function Yxe(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function J7(t){return t?W7:G7}function Xxe(t,e){Jxe(e,"value",0),t?W7=e:G7=e}function Qxe(t,e,r,n){let i=Yxe(e,n,r);if(i!=null){if(!Wxe(i)||i<0){let o=n?`options.${r}`:"options.highWaterMark";throw new Kxe(o,i)}return Gxe(i)}return J7(t.objectMode)}K7.exports={getHighWaterMark:Qxe,getDefaultHighWaterMark:J7,setDefaultHighWaterMark:Xxe}});var Q7=b((eC,X7)=>{var Jv=Q("buffer"),uo=Jv.Buffer;function Y7(t,e){for(var r in t)e[r]=t[r]}uo.from&&uo.alloc&&uo.allocUnsafe&&uo.allocUnsafeSlow?X7.exports=Jv:(Y7(Jv,eC),eC.Buffer=Pl);function Pl(t,e,r){return uo(t,e,r)}Pl.prototype=Object.create(uo.prototype);Y7(uo,Pl);Pl.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return uo(t,e,r)};Pl.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=uo(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};Pl.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return uo(t)};Pl.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Jv.SlowBuffer(t)}});var rZ=b(tZ=>{"use strict";var rC=Q7().Buffer,eZ=rC.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function eSe(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function tSe(t){var e=eSe(t);if(typeof e!="string"&&(rC.isEncoding===eZ||!eZ(t)))throw new Error("Unknown encoding: "+t);return e||t}tZ.StringDecoder=qh;function qh(t){this.encoding=tSe(t);var e;switch(this.encoding){case"utf16le":this.text=sSe,this.end=lSe,e=4;break;case"utf8":this.fillLast=iSe,e=4;break;case"base64":this.text=cSe,this.end=uSe,e=3;break;default:this.write=dSe,this.end=fSe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=rC.allocUnsafe(e)}qh.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};qh.prototype.end=aSe;qh.prototype.text=oSe;qh.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function tC(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function rSe(t,e,r){var n=e.length-1;if(n<r)return 0;var i=tC(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=tC(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=tC(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function nSe(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"�"}}function iSe(t){var e=this.lastTotal-this.lastNeed,r=nSe(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function oSe(t,e){var r=rSe(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function aSe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function sSe(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function lSe(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function cSe(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function uSe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function dSe(t){return t.toString(this.encoding)}function fSe(t){return t&&t.length?this.write(t):""}});var nC=b((a9e,aZ)=>{"use strict";var nZ=os(),{PromisePrototypeThen:pSe,SymbolAsyncIterator:iZ,SymbolIterator:oZ}=Ht(),{Buffer:hSe}=Q("buffer"),{ERR_INVALID_ARG_TYPE:mSe,ERR_STREAM_NULL_VALUES:gSe}=Ur().codes;function ySe(t,e,r){let n;if(typeof e=="string"||e instanceof hSe)return new t({objectMode:!0,...r,read(){this.push(e),this.push(null)}});let i;if(e&&e[iZ])i=!0,n=e[iZ]();else if(e&&e[oZ])i=!1,n=e[oZ]();else throw new mSe("iterable",["Iterable"],e);let o=new t({objectMode:!0,highWaterMark:1,...r}),a=!1;o._read=function(){a||(a=!0,l())},o._destroy=function(c,u){pSe(s(c),()=>nZ.nextTick(u,c),d=>nZ.nextTick(u,d||c))};async function s(c){let u=c!=null,d=typeof n.throw=="function";if(u&&d){let{value:f,done:p}=await n.throw(c);if(await f,p)return}if(typeof n.return=="function"){let{value:f}=await n.return();await f}}async function l(){for(;;){try{let{value:c,done:u}=i?await n.next():n.next();if(u)o.push(null);else{let d=c&&typeof c.then=="function"?await c:c;if(d===null)throw a=!1,new gSe;if(o.push(d))continue;a=!1}}catch(c){o.destroy(c)}break}}return o}aZ.exports=ySe});var Hh=b((s9e,EZ)=>{"use strict";var Oi=os(),{ArrayPrototypeIndexOf:_Se,NumberIsInteger:vSe,NumberIsNaN:bSe,NumberParseInt:wSe,ObjectDefineProperties:dC,ObjectKeys:xSe,ObjectSetPrototypeOf:cZ,Promise:uZ,SafeSet:SSe,SymbolAsyncDispose:ESe,SymbolAsyncIterator:ISe,Symbol:$Se}=Ht();EZ.exports=je;je.ReadableState=Qv;var{EventEmitter:PSe}=Q("events"),{Stream:ss,prependListener:TSe}=Vv(),{Buffer:iC}=Q("buffer"),{addAbortSignal:ASe}=Bh(),dZ=Yo(),Je=sn().debuglog("stream",t=>{Je=t}),kSe=V7(),Zu=$l(),{getHighWaterMark:CSe,getDefaultHighWaterMark:RSe}=Uh(),{aggregateTwoErrors:sZ,codes:{ERR_INVALID_ARG_TYPE:DSe,ERR_METHOD_NOT_IMPLEMENTED:OSe,ERR_OUT_OF_RANGE:MSe,ERR_STREAM_PUSH_AFTER_EOF:NSe,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:jSe},AbortError:zSe}=Ur(),{validateObject:LSe}=Fu(),Tl=$Se("kPaused"),{StringDecoder:fZ}=rZ(),FSe=nC();cZ(je.prototype,ss.prototype);cZ(je,ss);var oC=()=>{},{errorOrDestroy:Uu}=Zu,qu=1,BSe=2,pZ=4,Zh=8,hZ=16,Kv=32,Yv=64,mZ=128,USe=256,qSe=512,ZSe=1024,cC=2048,uC=4096,HSe=8192,VSe=16384,GSe=32768,gZ=65536,WSe=1<<17,JSe=1<<18;function sr(t){return{enumerable:!1,get(){return(this.state&t)!==0},set(e){e?this.state|=t:this.state&=~t}}}dC(Qv.prototype,{objectMode:sr(qu),ended:sr(BSe),endEmitted:sr(pZ),reading:sr(Zh),constructed:sr(hZ),sync:sr(Kv),needReadable:sr(Yv),emittedReadable:sr(mZ),readableListening:sr(USe),resumeScheduled:sr(qSe),errorEmitted:sr(ZSe),emitClose:sr(cC),autoDestroy:sr(uC),destroyed:sr(HSe),closed:sr(VSe),closeEmitted:sr(GSe),multiAwaitDrain:sr(gZ),readingMore:sr(WSe),dataEmitted:sr(JSe)});function Qv(t,e,r){typeof r!="boolean"&&(r=e instanceof fo()),this.state=cC|uC|hZ|Kv,t&&t.objectMode&&(this.state|=qu),r&&t&&t.readableObjectMode&&(this.state|=qu),this.highWaterMark=t?CSe(this,t,"readableHighWaterMark",r):RSe(!1),this.buffer=new kSe,this.length=0,this.pipes=[],this.flowing=null,this[Tl]=null,t&&t.emitClose===!1&&(this.state&=~cC),t&&t.autoDestroy===!1&&(this.state&=~uC),this.errored=null,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new fZ(t.encoding),this.encoding=t.encoding)}function je(t){if(!(this instanceof je))return new je(t);let e=this instanceof fo();this._readableState=new Qv(t,this,e),t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.construct=="function"&&(this._construct=t.construct),t.signal&&!e&&ASe(t.signal,this)),ss.call(this,t),Zu.construct(this,()=>{this._readableState.needReadable&&Xv(this,this._readableState)})}je.prototype.destroy=Zu.destroy;je.prototype._undestroy=Zu.undestroy;je.prototype._destroy=function(t,e){e(t)};je.prototype[PSe.captureRejectionSymbol]=function(t){this.destroy(t)};je.prototype[ESe]=function(){let t;return this.destroyed||(t=this.readableEnded?null:new zSe,this.destroy(t)),new uZ((e,r)=>dZ(this,n=>n&&n!==t?r(n):e(null)))};je.prototype.push=function(t,e){return yZ(this,t,e,!1)};je.prototype.unshift=function(t,e){return yZ(this,t,e,!0)};function yZ(t,e,r,n){Je("readableAddChunk",e);let i=t._readableState,o;if((i.state&qu)===0&&(typeof e=="string"?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?e=iC.from(e,r).toString(i.encoding):(e=iC.from(e,r),r=""))):e instanceof iC?r="":ss._isUint8Array(e)?(e=ss._uint8ArrayToBuffer(e),r=""):e!=null&&(o=new DSe("chunk",["string","Buffer","Uint8Array"],e))),o)Uu(t,o);else if(e===null)i.state&=~Zh,XSe(t,i);else if((i.state&qu)!==0||e&&e.length>0)if(n)if((i.state&pZ)!==0)Uu(t,new jSe);else{if(i.destroyed||i.errored)return!1;aC(t,i,e,!0)}else if(i.ended)Uu(t,new NSe);else{if(i.destroyed||i.errored)return!1;i.state&=~Zh,i.decoder&&!r?(e=i.decoder.write(e),i.objectMode||e.length!==0?aC(t,i,e,!1):Xv(t,i)):aC(t,i,e,!1)}else n||(i.state&=~Zh,Xv(t,i));return!i.ended&&(i.length<i.highWaterMark||i.length===0)}function aC(t,e,r,n){e.flowing&&e.length===0&&!e.sync&&t.listenerCount("data")>0?((e.state&gZ)!==0?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),(e.state&Yv)!==0&&eb(t)),Xv(t,e)}je.prototype.isPaused=function(){let t=this._readableState;return t[Tl]===!0||t.flowing===!1};je.prototype.setEncoding=function(t){let e=new fZ(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;let r=this._readableState.buffer,n="";for(let i of r)n+=e.write(i);return r.clear(),n!==""&&r.push(n),this._readableState.length=n.length,this};var KSe=1073741824;function YSe(t){if(t>KSe)throw new MSe("size","<= 1GiB",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++,t}function lZ(t,e){return t<=0||e.length===0&&e.ended?0:(e.state&qu)!==0?1:bSe(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}je.prototype.read=function(t){Je("read",t),t===void 0?t=NaN:vSe(t)||(t=wSe(t,10));let e=this._readableState,r=t;if(t>e.highWaterMark&&(e.highWaterMark=YSe(t)),t!==0&&(e.state&=~mZ),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Je("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?sC(this):eb(this),null;if(t=lZ(t,e),t===0&&e.ended)return e.length===0&&sC(this),null;let n=(e.state&Yv)!==0;if(Je("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,Je("length less than watermark",n)),e.ended||e.reading||e.destroyed||e.errored||!e.constructed)n=!1,Je("reading, ended or constructing",n);else if(n){Je("do read"),e.state|=Zh|Kv,e.length===0&&(e.state|=Yv);try{this._read(e.highWaterMark)}catch(o){Uu(this,o)}e.state&=~Kv,e.reading||(t=lZ(r,e))}let i;return t>0?i=xZ(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&sC(this)),i!==null&&!e.errorEmitted&&!e.closeEmitted&&(e.dataEmitted=!0,this.emit("data",i)),i};function XSe(t,e){if(Je("onEofChunk"),!e.ended){if(e.decoder){let r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?eb(t):(e.needReadable=!1,e.emittedReadable=!0,_Z(t))}}function eb(t){let e=t._readableState;Je("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Je("emitReadable",e.flowing),e.emittedReadable=!0,Oi.nextTick(_Z,t))}function _Z(t){let e=t._readableState;Je("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&!e.errored&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,bZ(t)}function Xv(t,e){!e.readingMore&&e.constructed&&(e.readingMore=!0,Oi.nextTick(QSe,t,e))}function QSe(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){let r=e.length;if(Je("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}je.prototype._read=function(t){throw new OSe("_read()")};je.prototype.pipe=function(t,e){let r=this,n=this._readableState;n.pipes.length===1&&(n.multiAwaitDrain||(n.multiAwaitDrain=!0,n.awaitDrainWriters=new SSe(n.awaitDrainWriters?[n.awaitDrainWriters]:[]))),n.pipes.push(t),Je("pipe count=%d opts=%j",n.pipes.length,e);let o=(!e||e.end!==!1)&&t!==Oi.stdout&&t!==Oi.stderr?s:y;n.endEmitted?Oi.nextTick(o):r.once("end",o),t.on("unpipe",a);function a(g,v){Je("onunpipe"),g===r&&v&&v.hasUnpiped===!1&&(v.hasUnpiped=!0,u())}function s(){Je("onend"),t.end()}let l,c=!1;function u(){Je("cleanup"),t.removeListener("close",h),t.removeListener("finish",m),l&&t.removeListener("drain",l),t.removeListener("error",p),t.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",y),r.removeListener("data",f),c=!0,l&&n.awaitDrainWriters&&(!t._writableState||t._writableState.needDrain)&&l()}function d(){c||(n.pipes.length===1&&n.pipes[0]===t?(Je("false write response, pause",0),n.awaitDrainWriters=t,n.multiAwaitDrain=!1):n.pipes.length>1&&n.pipes.includes(t)&&(Je("false write response, pause",n.awaitDrainWriters.size),n.awaitDrainWriters.add(t)),r.pause()),l||(l=eEe(r,t),t.on("drain",l))}r.on("data",f);function f(g){Je("ondata");let v=t.write(g);Je("dest.write",v),v===!1&&d()}function p(g){if(Je("onerror",g),y(),t.removeListener("error",p),t.listenerCount("error")===0){let v=t._writableState||t._readableState;v&&!v.errorEmitted?Uu(t,g):t.emit("error",g)}}TSe(t,"error",p);function h(){t.removeListener("finish",m),y()}t.once("close",h);function m(){Je("onfinish"),t.removeListener("close",h),y()}t.once("finish",m);function y(){Je("unpipe"),r.unpipe(t)}return t.emit("pipe",r),t.writableNeedDrain===!0?d():n.flowing||(Je("pipe resume"),r.resume()),t};function eEe(t,e){return function(){let n=t._readableState;n.awaitDrainWriters===e?(Je("pipeOnDrain",1),n.awaitDrainWriters=null):n.multiAwaitDrain&&(Je("pipeOnDrain",n.awaitDrainWriters.size),n.awaitDrainWriters.delete(e)),(!n.awaitDrainWriters||n.awaitDrainWriters.size===0)&&t.listenerCount("data")&&t.resume()}}je.prototype.unpipe=function(t){let e=this._readableState,r={hasUnpiped:!1};if(e.pipes.length===0)return this;if(!t){let i=e.pipes;e.pipes=[],this.pause();for(let o=0;o<i.length;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}let n=_Se(e.pipes,t);return n===-1?this:(e.pipes.splice(n,1),e.pipes.length===0&&this.pause(),t.emit("unpipe",this,r),this)};je.prototype.on=function(t,e){let r=ss.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,Je("on readable",n.length,n.reading),n.length?eb(this):n.reading||Oi.nextTick(tEe,this)),r};je.prototype.addListener=je.prototype.on;je.prototype.removeListener=function(t,e){let r=ss.prototype.removeListener.call(this,t,e);return t==="readable"&&Oi.nextTick(vZ,this),r};je.prototype.off=je.prototype.removeListener;je.prototype.removeAllListeners=function(t){let e=ss.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&Oi.nextTick(vZ,this),e};function vZ(t){let e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&e[Tl]===!1?e.flowing=!0:t.listenerCount("data")>0?t.resume():e.readableListening||(e.flowing=null)}function tEe(t){Je("readable nexttick read 0"),t.read(0)}je.prototype.resume=function(){let t=this._readableState;return t.flowing||(Je("resume"),t.flowing=!t.readableListening,rEe(this,t)),t[Tl]=!1,this};function rEe(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Oi.nextTick(nEe,t,e))}function nEe(t,e){Je("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),bZ(t),e.flowing&&!e.reading&&t.read(0)}je.prototype.pause=function(){return Je("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Je("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[Tl]=!0,this};function bZ(t){let e=t._readableState;for(Je("flow",e.flowing);e.flowing&&t.read()!==null;);}je.prototype.wrap=function(t){let e=!1;t.on("data",n=>{!this.push(n)&&t.pause&&(e=!0,t.pause())}),t.on("end",()=>{this.push(null)}),t.on("error",n=>{Uu(this,n)}),t.on("close",()=>{this.destroy()}),t.on("destroy",()=>{this.destroy()}),this._read=()=>{e&&t.resume&&(e=!1,t.resume())};let r=xSe(t);for(let n=1;n<r.length;n++){let i=r[n];this[i]===void 0&&typeof t[i]=="function"&&(this[i]=t[i].bind(t))}return this};je.prototype[ISe]=function(){return wZ(this)};je.prototype.iterator=function(t){return t!==void 0&&LSe(t,"options"),wZ(this,t)};function wZ(t,e){typeof t.read!="function"&&(t=je.wrap(t,{objectMode:!0}));let r=iEe(t,e);return r.stream=t,r}async function*iEe(t,e){let r=oC;function n(a){this===t?(r(),r=oC):r=a}t.on("readable",n);let i,o=dZ(t,{writable:!1},a=>{i=a?sZ(i,a):null,r(),r=oC});try{for(;;){let a=t.destroyed?null:t.read();if(a!==null)yield a;else{if(i)throw i;if(i===null)return;await new uZ(n)}}}catch(a){throw i=sZ(i,a),i}finally{(i||(e==null?void 0:e.destroyOnReturn)!==!1)&&(i===void 0||t._readableState.autoDestroy)?Zu.destroyer(t,null):(t.off("readable",n),o())}}dC(je.prototype,{readable:{__proto__:null,get(){let t=this._readableState;return!!t&&t.readable!==!1&&!t.destroyed&&!t.errorEmitted&&!t.endEmitted},set(t){this._readableState&&(this._readableState.readable=!!t)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(t){this._readableState&&(this._readableState.destroyed=t)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}});dC(Qv.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[Tl]!==!1},set(t){this[Tl]=!!t}}});je._fromList=xZ;function xZ(t,e){if(e.length===0)return null;let r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function sC(t){let e=t._readableState;Je("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,Oi.nextTick(oEe,e,t))}function oEe(t,e){if(Je("endReadableNT",t.endEmitted,t.length),!t.errored&&!t.closeEmitted&&!t.endEmitted&&t.length===0){if(t.endEmitted=!0,e.emit("end"),e.writable&&e.allowHalfOpen===!1)Oi.nextTick(aEe,e);else if(t.autoDestroy){let r=e._writableState;(!r||r.autoDestroy&&(r.finished||r.writable===!1))&&e.destroy()}}}function aEe(t){t.writable&&!t.writableEnded&&!t.destroyed&&t.end()}je.from=function(t,e){return FSe(je,t,e)};var lC;function SZ(){return lC===void 0&&(lC={}),lC}je.fromWeb=function(t,e){return SZ().newStreamReadableFromReadableStream(t,e)};je.toWeb=function(t,e){return SZ().newReadableStreamFromStreamReadable(t,e)};je.wrap=function(t,e){var r,n;return new je({objectMode:(r=(n=t.readableObjectMode)!==null&&n!==void 0?n:t.objectMode)!==null&&r!==void 0?r:!0,...e,destroy(i,o){Zu.destroyer(t,i),o(i)}}).wrap(t)}});var ob=b((l9e,NZ)=>{"use strict";var Al=os(),{ArrayPrototypeSlice:PZ,Error:sEe,FunctionPrototypeSymbolHasInstance:TZ,ObjectDefineProperty:AZ,ObjectDefineProperties:lEe,ObjectSetPrototypeOf:kZ,StringPrototypeToLowerCase:cEe,Symbol:uEe,SymbolHasInstance:dEe}=Ht();NZ.exports=Wt;Wt.WritableState=Wh;var{EventEmitter:fEe}=Q("events"),Vh=Vv().Stream,{Buffer:tb}=Q("buffer"),ib=$l(),{addAbortSignal:pEe}=Bh(),{getHighWaterMark:hEe,getDefaultHighWaterMark:mEe}=Uh(),{ERR_INVALID_ARG_TYPE:gEe,ERR_METHOD_NOT_IMPLEMENTED:yEe,ERR_MULTIPLE_CALLBACK:CZ,ERR_STREAM_CANNOT_PIPE:_Ee,ERR_STREAM_DESTROYED:Gh,ERR_STREAM_ALREADY_FINISHED:vEe,ERR_STREAM_NULL_VALUES:bEe,ERR_STREAM_WRITE_AFTER_END:wEe,ERR_UNKNOWN_ENCODING:RZ}=Ur().codes,{errorOrDestroy:Hu}=ib;kZ(Wt.prototype,Vh.prototype);kZ(Wt,Vh);function hC(){}var Vu=uEe("kOnFinished");function Wh(t,e,r){typeof r!="boolean"&&(r=e instanceof fo()),this.objectMode=!!(t&&t.objectMode),r&&(this.objectMode=this.objectMode||!!(t&&t.writableObjectMode)),this.highWaterMark=t?hEe(this,t,"writableHighWaterMark",r):mEe(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let n=!!(t&&t.decodeStrings===!1);this.decodeStrings=!n,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=SEe.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,nb(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||t.emitClose!==!1,this.autoDestroy=!t||t.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[Vu]=[]}function nb(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0}Wh.prototype.getBuffer=function(){return PZ(this.buffered,this.bufferedIndex)};AZ(Wh.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function Wt(t){let e=this instanceof fo();if(!e&&!TZ(Wt,this))return new Wt(t);this._writableState=new Wh(t,this,e),t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final),typeof t.construct=="function"&&(this._construct=t.construct),t.signal&&pEe(t.signal,this)),Vh.call(this,t),ib.construct(this,()=>{let r=this._writableState;r.writing||gC(this,r),yC(this,r)})}AZ(Wt,dEe,{__proto__:null,value:function(t){return TZ(this,t)?!0:this!==Wt?!1:t&&t._writableState instanceof Wh}});Wt.prototype.pipe=function(){Hu(this,new _Ee)};function DZ(t,e,r,n){let i=t._writableState;if(typeof r=="function")n=r,r=i.defaultEncoding;else{if(!r)r=i.defaultEncoding;else if(r!=="buffer"&&!tb.isEncoding(r))throw new RZ(r);typeof n!="function"&&(n=hC)}if(e===null)throw new bEe;if(!i.objectMode)if(typeof e=="string")i.decodeStrings!==!1&&(e=tb.from(e,r),r="buffer");else if(e instanceof tb)r="buffer";else if(Vh._isUint8Array(e))e=Vh._uint8ArrayToBuffer(e),r="buffer";else throw new gEe("chunk",["string","Buffer","Uint8Array"],e);let o;return i.ending?o=new wEe:i.destroyed&&(o=new Gh("write")),o?(Al.nextTick(n,o),Hu(t,o,!0),o):(i.pendingcb++,xEe(t,i,e,r,n))}Wt.prototype.write=function(t,e,r){return DZ(this,t,e,r)===!0};Wt.prototype.cork=function(){this._writableState.corked++};Wt.prototype.uncork=function(){let t=this._writableState;t.corked&&(t.corked--,t.writing||gC(this,t))};Wt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=cEe(e)),!tb.isEncoding(e))throw new RZ(e);return this._writableState.defaultEncoding=e,this};function xEe(t,e,r,n,i){let o=e.objectMode?1:r.length;e.length+=o;let a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked||e.errored||!e.constructed?(e.buffered.push({chunk:r,encoding:n,callback:i}),e.allBuffers&&n!=="buffer"&&(e.allBuffers=!1),e.allNoop&&i!==hC&&(e.allNoop=!1)):(e.writelen=o,e.writecb=i,e.writing=!0,e.sync=!0,t._write(r,n,e.onwrite),e.sync=!1),a&&!e.errored&&!e.destroyed}function IZ(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Gh("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function $Z(t,e,r,n){--e.pendingcb,n(r),mC(e),Hu(t,r)}function SEe(t,e){let r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function"){Hu(t,new CZ);return}r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,e?(e.stack,r.errored||(r.errored=e),t._readableState&&!t._readableState.errored&&(t._readableState.errored=e),n?Al.nextTick($Z,t,r,e,i):$Z(t,r,e,i)):(r.buffered.length>r.bufferedIndex&&gC(t,r),n?r.afterWriteTickInfo!==null&&r.afterWriteTickInfo.cb===i?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:i,stream:t,state:r},Al.nextTick(EEe,r.afterWriteTickInfo)):OZ(t,r,1,i))}function EEe({stream:t,state:e,count:r,cb:n}){return e.afterWriteTickInfo=null,OZ(t,e,r,n)}function OZ(t,e,r,n){for(!e.ending&&!t.destroyed&&e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));r-- >0;)e.pendingcb--,n();e.destroyed&&mC(e),yC(t,e)}function mC(t){if(t.writing)return;for(let i=t.bufferedIndex;i<t.buffered.length;++i){var e;let{chunk:o,callback:a}=t.buffered[i],s=t.objectMode?1:o.length;t.length-=s,a((e=t.errored)!==null&&e!==void 0?e:new Gh("write"))}let r=t[Vu].splice(0);for(let i=0;i<r.length;i++){var n;r[i]((n=t.errored)!==null&&n!==void 0?n:new Gh("end"))}nb(t)}function gC(t,e){if(e.corked||e.bufferProcessing||e.destroyed||!e.constructed)return;let{buffered:r,bufferedIndex:n,objectMode:i}=e,o=r.length-n;if(!o)return;let a=n;if(e.bufferProcessing=!0,o>1&&t._writev){e.pendingcb-=o-1;let s=e.allNoop?hC:c=>{for(let u=a;u<r.length;++u)r[u].callback(c)},l=e.allNoop&&a===0?r:PZ(r,a);l.allBuffers=e.allBuffers,IZ(t,e,!0,e.length,l,"",s),nb(e)}else{do{let{chunk:s,encoding:l,callback:c}=r[a];r[a++]=null;let u=i?1:s.length;IZ(t,e,!1,u,s,l,c)}while(a<r.length&&!e.writing);a===r.length?nb(e):a>256?(r.splice(0,a),e.bufferedIndex=0):e.bufferedIndex=a}e.bufferProcessing=!1}Wt.prototype._write=function(t,e,r){if(this._writev)this._writev([{chunk:t,encoding:e}],r);else throw new yEe("_write()")};Wt.prototype._writev=null;Wt.prototype.end=function(t,e,r){let n=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null);let i;if(t!=null){let o=DZ(this,t,e);o instanceof sEe&&(i=o)}return n.corked&&(n.corked=1,this.uncork()),i||(!n.errored&&!n.ending?(n.ending=!0,yC(this,n,!0),n.ended=!0):n.finished?i=new vEe("end"):n.destroyed&&(i=new Gh("end"))),typeof r=="function"&&(i||n.finished?Al.nextTick(r,i):n[Vu].push(r)),this};function rb(t){return t.ending&&!t.destroyed&&t.constructed&&t.length===0&&!t.errored&&t.buffered.length===0&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function IEe(t,e){let r=!1;function n(i){if(r){Hu(t,i??CZ());return}if(r=!0,e.pendingcb--,i){let o=e[Vu].splice(0);for(let a=0;a<o.length;a++)o[a](i);Hu(t,i,e.sync)}else rb(e)&&(e.prefinished=!0,t.emit("prefinish"),e.pendingcb++,Al.nextTick(pC,t,e))}e.sync=!0,e.pendingcb++;try{t._final(n)}catch(i){n(i)}e.sync=!1}function $Ee(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.finalCalled=!0,IEe(t,e)):(e.prefinished=!0,t.emit("prefinish")))}function yC(t,e,r){rb(e)&&($Ee(t,e),e.pendingcb===0&&(r?(e.pendingcb++,Al.nextTick((n,i)=>{rb(i)?pC(n,i):i.pendingcb--},t,e)):rb(e)&&(e.pendingcb++,pC(t,e))))}function pC(t,e){e.pendingcb--,e.finished=!0;let r=e[Vu].splice(0);for(let n=0;n<r.length;n++)r[n]();if(t.emit("finish"),e.autoDestroy){let n=t._readableState;(!n||n.autoDestroy&&(n.endEmitted||n.readable===!1))&&t.destroy()}}lEe(Wt.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(t){this._writableState&&(this._writableState.destroyed=t)}},writable:{__proto__:null,get(){let t=this._writableState;return!!t&&t.writable!==!1&&!t.destroyed&&!t.errored&&!t.ending&&!t.ended},set(t){this._writableState&&(this._writableState.writable=!!t)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let t=this._writableState;return t?!t.destroyed&&!t.ending&&t.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var PEe=ib.destroy;Wt.prototype.destroy=function(t,e){let r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[Vu].length)&&Al.nextTick(mC,r),PEe.call(this,t,e),this};Wt.prototype._undestroy=ib.undestroy;Wt.prototype._destroy=function(t,e){e(t)};Wt.prototype[fEe.captureRejectionSymbol]=function(t){this.destroy(t)};var fC;function MZ(){return fC===void 0&&(fC={}),fC}Wt.fromWeb=function(t,e){return MZ().newStreamWritableFromWritableStream(t,e)};Wt.toWeb=function(t){return MZ().newWritableStreamFromStreamWritable(t)}});var YZ=b((c9e,KZ)=>{var _C=os(),TEe=Q("buffer"),{isReadable:AEe,isWritable:kEe,isIterable:jZ,isNodeStream:CEe,isReadableNodeStream:zZ,isWritableNodeStream:LZ,isDuplexNodeStream:REe,isReadableStream:FZ,isWritableStream:BZ}=lo(),UZ=Yo(),{AbortError:WZ,codes:{ERR_INVALID_ARG_TYPE:DEe,ERR_INVALID_RETURN_VALUE:qZ}}=Ur(),{destroyer:Wu}=$l(),OEe=fo(),JZ=Hh(),MEe=ob(),{createDeferredPromise:ZZ}=sn(),HZ=nC(),VZ=globalThis.Blob||TEe.Blob,NEe=typeof VZ<"u"?function(e){return e instanceof VZ}:function(e){return!1},jEe=globalThis.AbortController||zu().AbortController,{FunctionPrototypeCall:GZ}=Ht(),ls=class extends OEe{constructor(e){super(e),(e==null?void 0:e.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(e==null?void 0:e.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};KZ.exports=function t(e,r){if(REe(e))return e;if(zZ(e))return Gu({readable:e});if(LZ(e))return Gu({writable:e});if(CEe(e))return Gu({writable:!1,readable:!1});if(FZ(e))return Gu({readable:JZ.fromWeb(e)});if(BZ(e))return Gu({writable:MEe.fromWeb(e)});if(typeof e=="function"){let{value:i,write:o,final:a,destroy:s}=zEe(e);if(jZ(i))return HZ(ls,i,{objectMode:!0,write:o,final:a,destroy:s});let l=i==null?void 0:i.then;if(typeof l=="function"){let c,u=GZ(l,i,d=>{if(d!=null)throw new qZ("nully","body",d)},d=>{Wu(c,d)});return c=new ls({objectMode:!0,readable:!1,write:o,final(d){a(async()=>{try{await u,_C.nextTick(d,null)}catch(f){_C.nextTick(d,f)}})},destroy:s})}throw new qZ("Iterable, AsyncIterable or AsyncFunction",r,i)}if(NEe(e))return t(e.arrayBuffer());if(jZ(e))return HZ(ls,e,{objectMode:!0,writable:!1});if(FZ(e==null?void 0:e.readable)&&BZ(e==null?void 0:e.writable))return ls.fromWeb(e);if(typeof(e==null?void 0:e.writable)=="object"||typeof(e==null?void 0:e.readable)=="object"){let i=e!=null&&e.readable?zZ(e==null?void 0:e.readable)?e==null?void 0:e.readable:t(e.readable):void 0,o=e!=null&&e.writable?LZ(e==null?void 0:e.writable)?e==null?void 0:e.writable:t(e.writable):void 0;return Gu({readable:i,writable:o})}let n=e==null?void 0:e.then;if(typeof n=="function"){let i;return GZ(n,e,o=>{o!=null&&i.push(o),i.push(null)},o=>{Wu(i,o)}),i=new ls({objectMode:!0,writable:!1,read(){}})}throw new DEe(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],e)};function zEe(t){let{promise:e,resolve:r}=ZZ(),n=new jEe,i=n.signal;return{value:t((async function*(){for(;;){let a=e;e=null;let{chunk:s,done:l,cb:c}=await a;if(_C.nextTick(c),l)return;if(i.aborted)throw new WZ(void 0,{cause:i.reason});({promise:e,resolve:r}=ZZ()),yield s}})(),{signal:i}),write(a,s,l){let c=r;r=null,c({chunk:a,done:!1,cb:l})},final(a){let s=r;r=null,s({done:!0,cb:a})},destroy(a,s){n.abort(),s(a)}}}function Gu(t){let e=t.readable&&typeof t.readable.read!="function"?JZ.wrap(t.readable):t.readable,r=t.writable,n=!!AEe(e),i=!!kEe(r),o,a,s,l,c;function u(d){let f=l;l=null,f?f(d):d&&c.destroy(d)}return c=new ls({readableObjectMode:!!(e!=null&&e.readableObjectMode),writableObjectMode:!!(r!=null&&r.writableObjectMode),readable:n,writable:i}),i&&(UZ(r,d=>{i=!1,d&&Wu(e,d),u(d)}),c._write=function(d,f,p){r.write(d,f)?p():o=p},c._final=function(d){r.end(),a=d},r.on("drain",function(){if(o){let d=o;o=null,d()}}),r.on("finish",function(){if(a){let d=a;a=null,d()}})),n&&(UZ(e,d=>{n=!1,d&&Wu(e,d),u(d)}),e.on("readable",function(){if(s){let d=s;s=null,d()}}),e.on("end",function(){c.push(null)}),c._read=function(){for(;;){let d=e.read();if(d===null){s=c._read;return}if(!c.push(d))return}}),c._destroy=function(d,f){!d&&l!==null&&(d=new WZ),s=null,o=null,a=null,l===null?f(d):(l=f,Wu(r,d),Wu(e,d))},c}});var fo=b((u9e,eH)=>{"use strict";var{ObjectDefineProperties:LEe,ObjectGetOwnPropertyDescriptor:Xo,ObjectKeys:FEe,ObjectSetPrototypeOf:XZ}=Ht();eH.exports=Mi;var wC=Hh(),ui=ob();XZ(Mi.prototype,wC.prototype);XZ(Mi,wC);{let t=FEe(ui.prototype);for(let e=0;e<t.length;e++){let r=t[e];Mi.prototype[r]||(Mi.prototype[r]=ui.prototype[r])}}function Mi(t){if(!(this instanceof Mi))return new Mi(t);wC.call(this,t),ui.call(this,t),t?(this.allowHalfOpen=t.allowHalfOpen!==!1,t.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),t.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}LEe(Mi.prototype,{writable:{__proto__:null,...Xo(ui.prototype,"writable")},writableHighWaterMark:{__proto__:null,...Xo(ui.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...Xo(ui.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...Xo(ui.prototype,"writableBuffer")},writableLength:{__proto__:null,...Xo(ui.prototype,"writableLength")},writableFinished:{__proto__:null,...Xo(ui.prototype,"writableFinished")},writableCorked:{__proto__:null,...Xo(ui.prototype,"writableCorked")},writableEnded:{__proto__:null,...Xo(ui.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...Xo(ui.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(t){this._readableState&&this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}});var vC;function QZ(){return vC===void 0&&(vC={}),vC}Mi.fromWeb=function(t,e){return QZ().newStreamDuplexFromReadableWritablePair(t,e)};Mi.toWeb=function(t){return QZ().newReadableWritablePairFromDuplex(t)};var bC;Mi.from=function(t){return bC||(bC=YZ()),bC(t,"body")}});var EC=b((d9e,rH)=>{"use strict";var{ObjectSetPrototypeOf:tH,Symbol:BEe}=Ht();rH.exports=Qo;var{ERR_METHOD_NOT_IMPLEMENTED:UEe}=Ur().codes,SC=fo(),{getHighWaterMark:qEe}=Uh();tH(Qo.prototype,SC.prototype);tH(Qo,SC);var Jh=BEe("kCallback");function Qo(t){if(!(this instanceof Qo))return new Qo(t);let e=t?qEe(this,t,"readableHighWaterMark",!0):null;e===0&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),SC.call(this,t),this._readableState.sync=!1,this[Jh]=null,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",ZEe)}function xC(t){typeof this._flush=="function"&&!this.destroyed?this._flush((e,r)=>{if(e){t?t(e):this.destroy(e);return}r!=null&&this.push(r),this.push(null),t&&t()}):(this.push(null),t&&t())}function ZEe(){this._final!==xC&&xC.call(this)}Qo.prototype._final=xC;Qo.prototype._transform=function(t,e,r){throw new UEe("_transform()")};Qo.prototype._write=function(t,e,r){let n=this._readableState,i=this._writableState,o=n.length;this._transform(t,e,(a,s)=>{if(a){r(a);return}s!=null&&this.push(s),i.ended||o===n.length||n.length<n.highWaterMark?r():this[Jh]=r})};Qo.prototype._read=function(){if(this[Jh]){let t=this[Jh];this[Jh]=null,t()}}});var $C=b((f9e,iH)=>{"use strict";var{ObjectSetPrototypeOf:nH}=Ht();iH.exports=Ju;var IC=EC();nH(Ju.prototype,IC.prototype);nH(Ju,IC);function Ju(t){if(!(this instanceof Ju))return new Ju(t);IC.call(this,t)}Ju.prototype._transform=function(t,e,r){r(null,t)}});var cb=b((p9e,cH)=>{var Kh=os(),{ArrayIsArray:HEe,Promise:VEe,SymbolAsyncIterator:GEe,SymbolDispose:WEe}=Ht(),lb=Yo(),{once:JEe}=sn(),KEe=$l(),oH=fo(),{aggregateTwoErrors:YEe,codes:{ERR_INVALID_ARG_TYPE:MC,ERR_INVALID_RETURN_VALUE:PC,ERR_MISSING_ARGS:XEe,ERR_STREAM_DESTROYED:QEe,ERR_STREAM_PREMATURE_CLOSE:e1e},AbortError:t1e}=Ur(),{validateFunction:r1e,validateAbortSignal:n1e}=Fu(),{isIterable:kl,isReadable:TC,isReadableNodeStream:sb,isNodeStream:aH,isTransformStream:Ku,isWebStream:i1e,isReadableStream:AC,isReadableFinished:o1e}=lo(),a1e=globalThis.AbortController||zu().AbortController,kC,CC,RC;function sH(t,e,r){let n=!1;t.on("close",()=>{n=!0});let i=lb(t,{readable:e,writable:r},o=>{n=!o});return{destroy:o=>{n||(n=!0,KEe.destroyer(t,o||new QEe("pipe")))},cleanup:i}}function s1e(t){return r1e(t[t.length-1],"streams[stream.length - 1]"),t.pop()}function DC(t){if(kl(t))return t;if(sb(t))return l1e(t);throw new MC("val",["Readable","Iterable","AsyncIterable"],t)}async function*l1e(t){CC||(CC=Hh()),yield*CC.prototype[GEe].call(t)}async function ab(t,e,r,{end:n}){let i,o=null,a=c=>{if(c&&(i=c),o){let u=o;o=null,u()}},s=()=>new VEe((c,u)=>{i?u(i):o=()=>{i?u(i):c()}});e.on("drain",a);let l=lb(e,{readable:!1},a);try{e.writableNeedDrain&&await s();for await(let c of t)e.write(c)||await s();n&&(e.end(),await s()),r()}catch(c){r(i!==c?YEe(i,c):c)}finally{l(),e.off("drain",a)}}async function OC(t,e,r,{end:n}){Ku(e)&&(e=e.writable);let i=e.getWriter();try{for await(let o of t)await i.ready,i.write(o).catch(()=>{});await i.ready,n&&await i.close(),r()}catch(o){try{await i.abort(o),r(o)}catch(a){r(a)}}}function c1e(...t){return lH(t,JEe(s1e(t)))}function lH(t,e,r){if(t.length===1&&HEe(t[0])&&(t=t[0]),t.length<2)throw new XEe("streams");let n=new a1e,i=n.signal,o=r==null?void 0:r.signal,a=[];n1e(o,"options.signal");function s(){h(new t1e)}RC=RC||sn().addAbortListener;let l;o&&(l=RC(o,s));let c,u,d=[],f=0;function p(E){h(E,--f===0)}function h(E,x){var w;if(E&&(!c||c.code==="ERR_STREAM_PREMATURE_CLOSE")&&(c=E),!(!c&&!x)){for(;d.length;)d.shift()(c);(w=l)===null||w===void 0||w[WEe](),n.abort(),x&&(c||a.forEach(A=>A()),Kh.nextTick(e,c,u))}}let m;for(let E=0;E<t.length;E++){let x=t[E],w=E<t.length-1,A=E>0,$=w||(r==null?void 0:r.end)!==!1,R=E===t.length-1;if(aH(x)){let T=function(D){D&&D.name!=="AbortError"&&D.code!=="ERR_STREAM_PREMATURE_CLOSE"&&p(D)};var v=T;if($){let{destroy:D,cleanup:k}=sH(x,w,A);d.push(D),TC(x)&&R&&a.push(k)}x.on("error",T),TC(x)&&R&&a.push(()=>{x.removeListener("error",T)})}if(E===0)if(typeof x=="function"){if(m=x({signal:i}),!kl(m))throw new PC("Iterable, AsyncIterable or Stream","source",m)}else kl(x)||sb(x)||Ku(x)?m=x:m=oH.from(x);else if(typeof x=="function"){if(Ku(m)){var y;m=DC((y=m)===null||y===void 0?void 0:y.readable)}else m=DC(m);if(m=x(m,{signal:i}),w){if(!kl(m,!0))throw new PC("AsyncIterable",`transform[${E-1}]`,m)}else{var g;kC||(kC=$C());let T=new kC({objectMode:!0}),D=(g=m)===null||g===void 0?void 0:g.then;if(typeof D=="function")f++,D.call(m,U=>{u=U,U!=null&&T.write(U),$&&T.end(),Kh.nextTick(p)},U=>{T.destroy(U),Kh.nextTick(p,U)});else if(kl(m,!0))f++,ab(m,T,p,{end:$});else if(AC(m)||Ku(m)){let U=m.readable||m;f++,ab(U,T,p,{end:$})}else throw new PC("AsyncIterable or Promise","destination",m);m=T;let{destroy:k,cleanup:M}=sH(m,!1,!0);d.push(k),R&&a.push(M)}}else if(aH(x)){if(sb(m)){f+=2;let T=u1e(m,x,p,{end:$});TC(x)&&R&&a.push(T)}else if(Ku(m)||AC(m)){let T=m.readable||m;f++,ab(T,x,p,{end:$})}else if(kl(m))f++,ab(m,x,p,{end:$});else throw new MC("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],m);m=x}else if(i1e(x)){if(sb(m))f++,OC(DC(m),x,p,{end:$});else if(AC(m)||kl(m))f++,OC(m,x,p,{end:$});else if(Ku(m))f++,OC(m.readable,x,p,{end:$});else throw new MC("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],m);m=x}else m=oH.from(x)}return(i!=null&&i.aborted||o!=null&&o.aborted)&&Kh.nextTick(s),m}function u1e(t,e,r,{end:n}){let i=!1;if(e.on("close",()=>{i||r(new e1e)}),t.pipe(e,{end:!1}),n){let a=function(){i=!0,e.end()};var o=a;o1e(t)?Kh.nextTick(a):t.once("end",a)}else r();return lb(t,{readable:!0,writable:!1},a=>{let s=t._readableState;a&&a.code==="ERR_STREAM_PREMATURE_CLOSE"&&s&&s.ended&&!s.errored&&!s.errorEmitted?t.once("end",r).once("error",r):r(a)}),lb(e,{readable:!1,writable:!0},r)}cH.exports={pipelineImpl:lH,pipeline:c1e}});var jC=b((h9e,mH)=>{"use strict";var{pipeline:d1e}=cb(),ub=fo(),{destroyer:f1e}=$l(),{isNodeStream:db,isReadable:uH,isWritable:dH,isWebStream:NC,isTransformStream:Cl,isWritableStream:fH,isReadableStream:pH}=lo(),{AbortError:p1e,codes:{ERR_INVALID_ARG_VALUE:hH,ERR_MISSING_ARGS:h1e}}=Ur(),m1e=Yo();mH.exports=function(...e){if(e.length===0)throw new h1e("streams");if(e.length===1)return ub.from(e[0]);let r=[...e];if(typeof e[0]=="function"&&(e[0]=ub.from(e[0])),typeof e[e.length-1]=="function"){let p=e.length-1;e[p]=ub.from(e[p])}for(let p=0;p<e.length;++p)if(!(!db(e[p])&&!NC(e[p]))){if(p<e.length-1&&!(uH(e[p])||pH(e[p])||Cl(e[p])))throw new hH(`streams[${p}]`,r[p],"must be readable");if(p>0&&!(dH(e[p])||fH(e[p])||Cl(e[p])))throw new hH(`streams[${p}]`,r[p],"must be writable")}let n,i,o,a,s;function l(p){let h=a;a=null,h?h(p):p?s.destroy(p):!f&&!d&&s.destroy()}let c=e[0],u=d1e(e,l),d=!!(dH(c)||fH(c)||Cl(c)),f=!!(uH(u)||pH(u)||Cl(u));if(s=new ub({writableObjectMode:!!(c!=null&&c.writableObjectMode),readableObjectMode:!!(u!=null&&u.readableObjectMode),writable:d,readable:f}),d){if(db(c))s._write=function(h,m,y){c.write(h,m)?y():n=y},s._final=function(h){c.end(),i=h},c.on("drain",function(){if(n){let h=n;n=null,h()}});else if(NC(c)){let m=(Cl(c)?c.writable:c).getWriter();s._write=async function(y,g,v){try{await m.ready,m.write(y).catch(()=>{}),v()}catch(E){v(E)}},s._final=async function(y){try{await m.ready,m.close().catch(()=>{}),i=y}catch(g){y(g)}}}let p=Cl(u)?u.readable:u;m1e(p,()=>{if(i){let h=i;i=null,h()}})}if(f){if(db(u))u.on("readable",function(){if(o){let p=o;o=null,p()}}),u.on("end",function(){s.push(null)}),s._read=function(){for(;;){let p=u.read();if(p===null){o=s._read;return}if(!s.push(p))return}};else if(NC(u)){let h=(Cl(u)?u.readable:u).getReader();s._read=async function(){for(;;)try{let{value:m,done:y}=await h.read();if(!s.push(m))return;if(y){s.push(null);return}}catch{return}}}}return s._destroy=function(p,h){!p&&a!==null&&(p=new p1e),o=null,n=null,i=null,a===null?h(p):(a=h,db(u)&&f1e(u,p))},s}});var IH=b((m9e,FC)=>{"use strict";var g1e=globalThis.AbortController||zu().AbortController,{codes:{ERR_INVALID_ARG_VALUE:y1e,ERR_INVALID_ARG_TYPE:Yh,ERR_MISSING_ARGS:_1e,ERR_OUT_OF_RANGE:v1e},AbortError:po}=Ur(),{validateAbortSignal:Rl,validateInteger:gH,validateObject:Dl}=Fu(),b1e=Ht().Symbol("kWeak"),w1e=Ht().Symbol("kResistStopPropagation"),{finished:x1e}=Yo(),S1e=jC(),{addAbortSignalNoValidate:E1e}=Bh(),{isWritable:I1e,isNodeStream:$1e}=lo(),{deprecate:P1e}=sn(),{ArrayPrototypePush:T1e,Boolean:A1e,MathFloor:yH,Number:k1e,NumberIsNaN:C1e,Promise:_H,PromiseReject:vH,PromiseResolve:R1e,PromisePrototypeThen:bH,Symbol:xH}=Ht(),fb=xH("kEmpty"),wH=xH("kEof");function D1e(t,e){if(e!=null&&Dl(e,"options"),(e==null?void 0:e.signal)!=null&&Rl(e.signal,"options.signal"),$1e(t)&&!I1e(t))throw new y1e("stream",t,"must be writable");let r=S1e(this,t);return e!=null&&e.signal&&E1e(e.signal,r),r}function pb(t,e){if(typeof t!="function")throw new Yh("fn",["Function","AsyncFunction"],t);e!=null&&Dl(e,"options"),(e==null?void 0:e.signal)!=null&&Rl(e.signal,"options.signal");let r=1;(e==null?void 0:e.concurrency)!=null&&(r=yH(e.concurrency));let n=r-1;return(e==null?void 0:e.highWaterMark)!=null&&(n=yH(e.highWaterMark)),gH(r,"options.concurrency",1),gH(n,"options.highWaterMark",0),n+=r,async function*(){let o=sn().AbortSignalAny([e==null?void 0:e.signal].filter(A1e)),a=this,s=[],l={signal:o},c,u,d=!1,f=0;function p(){d=!0,h()}function h(){f-=1,m()}function m(){u&&!d&&f<r&&s.length<n&&(u(),u=null)}async function y(){try{for await(let g of a){if(d)return;if(o.aborted)throw new po;try{if(g=t(g,l),g===fb)continue;g=R1e(g)}catch(v){g=vH(v)}f+=1,bH(g,h,p),s.push(g),c&&(c(),c=null),!d&&(s.length>=n||f>=r)&&await new _H(v=>{u=v})}s.push(wH)}catch(g){let v=vH(g);bH(v,h,p),s.push(v)}finally{d=!0,c&&(c(),c=null)}}y();try{for(;;){for(;s.length>0;){let g=await s[0];if(g===wH)return;if(o.aborted)throw new po;g!==fb&&(yield g),s.shift(),m()}await new _H(g=>{c=g})}}finally{d=!0,u&&(u(),u=null)}}.call(this)}function O1e(t=void 0){return t!=null&&Dl(t,"options"),(t==null?void 0:t.signal)!=null&&Rl(t.signal,"options.signal"),async function*(){let r=0;for await(let i of this){var n;if(t!=null&&(n=t.signal)!==null&&n!==void 0&&n.aborted)throw new po({cause:t.signal.reason});yield[r++,i]}}.call(this)}async function SH(t,e=void 0){for await(let r of LC.call(this,t,e))return!0;return!1}async function M1e(t,e=void 0){if(typeof t!="function")throw new Yh("fn",["Function","AsyncFunction"],t);return!await SH.call(this,async(...r)=>!await t(...r),e)}async function N1e(t,e){for await(let r of LC.call(this,t,e))return r}async function j1e(t,e){if(typeof t!="function")throw new Yh("fn",["Function","AsyncFunction"],t);async function r(n,i){return await t(n,i),fb}for await(let n of pb.call(this,r,e));}function LC(t,e){if(typeof t!="function")throw new Yh("fn",["Function","AsyncFunction"],t);async function r(n,i){return await t(n,i)?n:fb}return pb.call(this,r,e)}var zC=class extends _1e{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function z1e(t,e,r){var n;if(typeof t!="function")throw new Yh("reducer",["Function","AsyncFunction"],t);r!=null&&Dl(r,"options"),(r==null?void 0:r.signal)!=null&&Rl(r.signal,"options.signal");let i=arguments.length>1;if(r!=null&&(n=r.signal)!==null&&n!==void 0&&n.aborted){let c=new po(void 0,{cause:r.signal.reason});throw this.once("error",()=>{}),await x1e(this.destroy(c)),c}let o=new g1e,a=o.signal;if(r!=null&&r.signal){let c={once:!0,[b1e]:this,[w1e]:!0};r.signal.addEventListener("abort",()=>o.abort(),c)}let s=!1;try{for await(let c of this){var l;if(s=!0,r!=null&&(l=r.signal)!==null&&l!==void 0&&l.aborted)throw new po;i?e=await t(e,c,{signal:a}):(e=c,i=!0)}if(!s&&!i)throw new zC}finally{o.abort()}return e}async function L1e(t){t!=null&&Dl(t,"options"),(t==null?void 0:t.signal)!=null&&Rl(t.signal,"options.signal");let e=[];for await(let n of this){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new po(void 0,{cause:t.signal.reason});T1e(e,n)}return e}function F1e(t,e){let r=pb.call(this,t,e);return async function*(){for await(let i of r)yield*i}.call(this)}function EH(t){if(t=k1e(t),C1e(t))return 0;if(t<0)throw new v1e("number",">= 0",t);return t}function B1e(t,e=void 0){return e!=null&&Dl(e,"options"),(e==null?void 0:e.signal)!=null&&Rl(e.signal,"options.signal"),t=EH(t),async function*(){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new po;for await(let o of this){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new po;t--<=0&&(yield o)}}.call(this)}function U1e(t,e=void 0){return e!=null&&Dl(e,"options"),(e==null?void 0:e.signal)!=null&&Rl(e.signal,"options.signal"),t=EH(t),async function*(){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new po;for await(let o of this){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new po;if(t-- >0&&(yield o),t<=0)return}}.call(this)}FC.exports.streamReturningOperators={asIndexedPairs:P1e(O1e,"readable.asIndexedPairs will be removed in a future version."),drop:B1e,filter:LC,flatMap:F1e,map:pb,take:U1e,compose:D1e};FC.exports.promiseReturningOperators={every:M1e,forEach:j1e,reduce:z1e,toArray:L1e,some:SH,find:N1e}});var BC=b((g9e,$H)=>{"use strict";var{ArrayPrototypePop:q1e,Promise:Z1e}=Ht(),{isIterable:H1e,isNodeStream:V1e,isWebStream:G1e}=lo(),{pipelineImpl:W1e}=cb(),{finished:J1e}=Yo();UC();function K1e(...t){return new Z1e((e,r)=>{let n,i,o=t[t.length-1];if(o&&typeof o=="object"&&!V1e(o)&&!H1e(o)&&!G1e(o)){let a=q1e(t);n=a.signal,i=a.end}W1e(t,(a,s)=>{a?r(a):e(s)},{signal:n,end:i})})}$H.exports={finished:J1e,pipeline:K1e}});var UC=b((y9e,MH)=>{"use strict";var{Buffer:Y1e}=Q("buffer"),{ObjectDefineProperty:ea,ObjectKeys:AH,ReflectApply:kH}=Ht(),{promisify:{custom:CH}}=sn(),{streamReturningOperators:PH,promiseReturningOperators:TH}=IH(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:RH}}=Ur(),X1e=jC(),{setDefaultHighWaterMark:Q1e,getDefaultHighWaterMark:eIe}=Uh(),{pipeline:DH}=cb(),{destroyer:tIe}=$l(),OH=Yo(),qC=BC(),Xh=lo(),Ut=MH.exports=Vv().Stream;Ut.isDestroyed=Xh.isDestroyed;Ut.isDisturbed=Xh.isDisturbed;Ut.isErrored=Xh.isErrored;Ut.isReadable=Xh.isReadable;Ut.isWritable=Xh.isWritable;Ut.Readable=Hh();for(let t of AH(PH)){let r=function(...n){if(new.target)throw RH();return Ut.Readable.from(kH(e,this,n))},e=PH[t];ea(r,"name",{__proto__:null,value:e.name}),ea(r,"length",{__proto__:null,value:e.length}),ea(Ut.Readable.prototype,t,{__proto__:null,value:r,enumerable:!1,configurable:!0,writable:!0})}for(let t of AH(TH)){let r=function(...n){if(new.target)throw RH();return kH(e,this,n)},e=TH[t];ea(r,"name",{__proto__:null,value:e.name}),ea(r,"length",{__proto__:null,value:e.length}),ea(Ut.Readable.prototype,t,{__proto__:null,value:r,enumerable:!1,configurable:!0,writable:!0})}Ut.Writable=ob();Ut.Duplex=fo();Ut.Transform=EC();Ut.PassThrough=$C();Ut.pipeline=DH;var{addAbortSignal:rIe}=Bh();Ut.addAbortSignal=rIe;Ut.finished=OH;Ut.destroy=tIe;Ut.compose=X1e;Ut.setDefaultHighWaterMark=Q1e;Ut.getDefaultHighWaterMark=eIe;ea(Ut,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return qC}});ea(DH,CH,{__proto__:null,enumerable:!0,get(){return qC.pipeline}});ea(OH,CH,{__proto__:null,enumerable:!0,get(){return qC.finished}});Ut.Stream=Ut;Ut._isUint8Array=function(e){return e instanceof Uint8Array};Ut._uint8ArrayToBuffer=function(e){return Y1e.from(e.buffer,e.byteOffset,e.byteLength)}});var Ol=b((_9e,Ve)=>{"use strict";var lr=Q("stream");if(lr&&process.env.READABLE_STREAM==="disable"){let t=lr.promises;Ve.exports._uint8ArrayToBuffer=lr._uint8ArrayToBuffer,Ve.exports._isUint8Array=lr._isUint8Array,Ve.exports.isDisturbed=lr.isDisturbed,Ve.exports.isErrored=lr.isErrored,Ve.exports.isReadable=lr.isReadable,Ve.exports.Readable=lr.Readable,Ve.exports.Writable=lr.Writable,Ve.exports.Duplex=lr.Duplex,Ve.exports.Transform=lr.Transform,Ve.exports.PassThrough=lr.PassThrough,Ve.exports.addAbortSignal=lr.addAbortSignal,Ve.exports.finished=lr.finished,Ve.exports.destroy=lr.destroy,Ve.exports.pipeline=lr.pipeline,Ve.exports.compose=lr.compose,Object.defineProperty(lr,"promises",{configurable:!0,enumerable:!0,get(){return t}}),Ve.exports.Stream=lr.Stream}else{let t=UC(),e=BC(),r=t.Readable.destroy;Ve.exports=t.Readable,Ve.exports._uint8ArrayToBuffer=t._uint8ArrayToBuffer,Ve.exports._isUint8Array=t._isUint8Array,Ve.exports.isDisturbed=t.isDisturbed,Ve.exports.isErrored=t.isErrored,Ve.exports.isReadable=t.isReadable,Ve.exports.Readable=t.Readable,Ve.exports.Writable=t.Writable,Ve.exports.Duplex=t.Duplex,Ve.exports.Transform=t.Transform,Ve.exports.PassThrough=t.PassThrough,Ve.exports.addAbortSignal=t.addAbortSignal,Ve.exports.finished=t.finished,Ve.exports.destroy=t.destroy,Ve.exports.destroy=r,Ve.exports.pipeline=t.pipeline,Ve.exports.compose=t.compose,Object.defineProperty(t,"promises",{configurable:!0,enumerable:!0,get(){return e}}),Ve.exports.Stream=t.Stream}Ve.exports.default=Ve.exports});var jH=b((v9e,NH)=>{function nIe(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}NH.exports=nIe});var BH=b((b9e,FH)=>{var zH=Cv(),iIe=Ik(),oIe=$k(),LH=zH?zH.isConcatSpreadable:void 0;function aIe(t){return oIe(t)||iIe(t)||!!(LH&&t&&t[LH])}FH.exports=aIe});var hb=b((w9e,qH)=>{var sIe=jH(),lIe=BH();function UH(t,e,r,n,i){var o=-1,a=t.length;for(r||(r=lIe),i||(i=[]);++o<a;){var s=t[o];e>0&&r(s)?e>1?UH(s,e-1,r,n,i):sIe(i,s):n||(i[i.length]=s)}return i}qH.exports=UH});var HH=b((x9e,ZH)=>{var cIe=hb();function uIe(t){var e=t==null?0:t.length;return e?cIe(t,1):[]}ZH.exports=uIe});var Qh=b((S9e,VH)=>{var dIe=Rh(),fIe=dIe(Object,"create");VH.exports=fIe});var JH=b((E9e,WH)=>{var GH=Qh();function pIe(){this.__data__=GH?GH(null):{},this.size=0}WH.exports=pIe});var YH=b((I9e,KH)=>{function hIe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}KH.exports=hIe});var QH=b(($9e,XH)=>{var mIe=Qh(),gIe="__lodash_hash_undefined__",yIe=Object.prototype,_Ie=yIe.hasOwnProperty;function vIe(t){var e=this.__data__;if(mIe){var r=e[t];return r===gIe?void 0:r}return _Ie.call(e,t)?e[t]:void 0}XH.exports=vIe});var tV=b((P9e,eV)=>{var bIe=Qh(),wIe=Object.prototype,xIe=wIe.hasOwnProperty;function SIe(t){var e=this.__data__;return bIe?e[t]!==void 0:xIe.call(e,t)}eV.exports=SIe});var nV=b((T9e,rV)=>{var EIe=Qh(),IIe="__lodash_hash_undefined__";function $Ie(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=EIe&&e===void 0?IIe:e,this}rV.exports=$Ie});var oV=b((A9e,iV)=>{var PIe=JH(),TIe=YH(),AIe=QH(),kIe=tV(),CIe=nV();function Yu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Yu.prototype.clear=PIe;Yu.prototype.delete=TIe;Yu.prototype.get=AIe;Yu.prototype.has=kIe;Yu.prototype.set=CIe;iV.exports=Yu});var sV=b((k9e,aV)=>{function RIe(){this.__data__=[],this.size=0}aV.exports=RIe});var em=b((C9e,lV)=>{var DIe=Dv();function OIe(t,e){for(var r=t.length;r--;)if(DIe(t[r][0],e))return r;return-1}lV.exports=OIe});var uV=b((R9e,cV)=>{var MIe=em(),NIe=Array.prototype,jIe=NIe.splice;function zIe(t){var e=this.__data__,r=MIe(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():jIe.call(e,r,1),--this.size,!0}cV.exports=zIe});var fV=b((D9e,dV)=>{var LIe=em();function FIe(t){var e=this.__data__,r=LIe(e,t);return r<0?void 0:e[r][1]}dV.exports=FIe});var hV=b((O9e,pV)=>{var BIe=em();function UIe(t){return BIe(this.__data__,t)>-1}pV.exports=UIe});var gV=b((M9e,mV)=>{var qIe=em();function ZIe(t,e){var r=this.__data__,n=qIe(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}mV.exports=ZIe});var _V=b((N9e,yV)=>{var HIe=sV(),VIe=uV(),GIe=fV(),WIe=hV(),JIe=gV();function Xu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Xu.prototype.clear=HIe;Xu.prototype.delete=VIe;Xu.prototype.get=GIe;Xu.prototype.has=WIe;Xu.prototype.set=JIe;yV.exports=Xu});var bV=b((j9e,vV)=>{var KIe=Rh(),YIe=Du(),XIe=KIe(YIe,"Map");vV.exports=XIe});var SV=b((z9e,xV)=>{var wV=oV(),QIe=_V(),e$e=bV();function t$e(){this.size=0,this.__data__={hash:new wV,map:new(e$e||QIe),string:new wV}}xV.exports=t$e});var IV=b((L9e,EV)=>{function r$e(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}EV.exports=r$e});var tm=b((F9e,$V)=>{var n$e=IV();function i$e(t,e){var r=t.__data__;return n$e(e)?r[typeof e=="string"?"string":"hash"]:r.map}$V.exports=i$e});var TV=b((B9e,PV)=>{var o$e=tm();function a$e(t){var e=o$e(this,t).delete(t);return this.size-=e?1:0,e}PV.exports=a$e});var kV=b((U9e,AV)=>{var s$e=tm();function l$e(t){return s$e(this,t).get(t)}AV.exports=l$e});var RV=b((q9e,CV)=>{var c$e=tm();function u$e(t){return c$e(this,t).has(t)}CV.exports=u$e});var OV=b((Z9e,DV)=>{var d$e=tm();function f$e(t,e){var r=d$e(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}DV.exports=f$e});var NV=b((H9e,MV)=>{var p$e=SV(),h$e=TV(),m$e=kV(),g$e=RV(),y$e=OV();function Qu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Qu.prototype.clear=p$e;Qu.prototype.delete=h$e;Qu.prototype.get=m$e;Qu.prototype.has=g$e;Qu.prototype.set=y$e;MV.exports=Qu});var zV=b((V9e,jV)=>{var _$e="__lodash_hash_undefined__";function v$e(t){return this.__data__.set(t,_$e),this}jV.exports=v$e});var FV=b((G9e,LV)=>{function b$e(t){return this.__data__.has(t)}LV.exports=b$e});var ZC=b((W9e,BV)=>{var w$e=NV(),x$e=zV(),S$e=FV();function mb(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new w$e;++e<r;)this.add(t[e])}mb.prototype.add=mb.prototype.push=x$e;mb.prototype.has=S$e;BV.exports=mb});var qV=b((J9e,UV)=>{function E$e(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}UV.exports=E$e});var HV=b((K9e,ZV)=>{function I$e(t){return t!==t}ZV.exports=I$e});var GV=b((Y9e,VV)=>{function $$e(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}VV.exports=$$e});var JV=b((X9e,WV)=>{var P$e=qV(),T$e=HV(),A$e=GV();function k$e(t,e,r){return e===e?A$e(t,e,r):P$e(t,T$e,r)}WV.exports=k$e});var HC=b((Q9e,KV)=>{var C$e=JV();function R$e(t,e){var r=t==null?0:t.length;return!!r&&C$e(t,e,0)>-1}KV.exports=R$e});var VC=b((e7e,YV)=>{function D$e(t,e,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}YV.exports=D$e});var QV=b((t7e,XV)=>{function O$e(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}XV.exports=O$e});var GC=b((r7e,eG)=>{function M$e(t,e){return t.has(e)}eG.exports=M$e});var rG=b((n7e,tG)=>{var N$e=ZC(),j$e=HC(),z$e=VC(),L$e=QV(),F$e=Pk(),B$e=GC(),U$e=200;function q$e(t,e,r,n){var i=-1,o=j$e,a=!0,s=t.length,l=[],c=e.length;if(!s)return l;r&&(e=L$e(e,F$e(r))),n?(o=z$e,a=!1):e.length>=U$e&&(o=B$e,a=!1,e=new N$e(e));e:for(;++i<s;){var u=t[i],d=r==null?u:r(u);if(u=n||u!==0?u:0,a&&d===d){for(var f=c;f--;)if(e[f]===d)continue e;l.push(u)}else o(e,d,n)||l.push(u)}return l}tG.exports=q$e});var WC=b((i7e,nG)=>{var Z$e=Ov(),H$e=Ou();function V$e(t){return H$e(t)&&Z$e(t)}nG.exports=V$e});var aG=b((o7e,oG)=>{var G$e=rG(),W$e=hb(),J$e=Rv(),iG=WC(),K$e=J$e(function(t,e){return iG(t)?G$e(t,W$e(e,1,iG,!0)):[]});oG.exports=K$e});var lG=b((a7e,sG)=>{var Y$e=Rh(),X$e=Du(),Q$e=Y$e(X$e,"Set");sG.exports=Q$e});var uG=b((s7e,cG)=>{function ePe(){}cG.exports=ePe});var JC=b((l7e,dG)=>{function tPe(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}dG.exports=tPe});var pG=b((c7e,fG)=>{var KC=lG(),rPe=uG(),nPe=JC(),iPe=1/0,oPe=KC&&1/nPe(new KC([,-0]))[1]==iPe?function(t){return new KC(t)}:rPe;fG.exports=oPe});var mG=b((u7e,hG)=>{var aPe=ZC(),sPe=HC(),lPe=VC(),cPe=GC(),uPe=pG(),dPe=JC(),fPe=200;function pPe(t,e,r){var n=-1,i=sPe,o=t.length,a=!0,s=[],l=s;if(r)a=!1,i=lPe;else if(o>=fPe){var c=e?null:uPe(t);if(c)return dPe(c);a=!1,i=cPe,l=new aPe}else l=e?[]:s;e:for(;++n<o;){var u=t[n],d=e?e(u):u;if(u=r||u!==0?u:0,a&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue e;e&&l.push(d),s.push(u)}else i(l,d,r)||(l!==s&&l.push(d),s.push(u))}return s}hG.exports=pPe});var yG=b((d7e,gG)=>{var hPe=hb(),mPe=Rv(),gPe=mG(),yPe=WC(),_Pe=mPe(function(t){return gPe(hPe(t,1,yPe,!0))});gG.exports=_Pe});var vG=b((f7e,_G)=>{function vPe(t,e){return function(r){return t(e(r))}}_G.exports=vPe});var wG=b((p7e,bG)=>{var bPe=vG(),wPe=bPe(Object.getPrototypeOf,Object);bG.exports=wPe});var EG=b((h7e,SG)=>{var xPe=kh(),SPe=wG(),EPe=Ou(),IPe="[object Object]",$Pe=Function.prototype,PPe=Object.prototype,xG=$Pe.toString,TPe=PPe.hasOwnProperty,APe=xG.call(Object);function kPe(t){if(!EPe(t)||xPe(t)!=IPe)return!1;var e=SPe(t);if(e===null)return!0;var r=TPe.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&xG.call(r)==APe}SG.exports=kPe});var IG=b(gb=>{"use strict";Object.defineProperty(gb,"__esModule",{value:!0});gb.assertValidPattern=void 0;var CPe=1024*64,RPe=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>CPe)throw new TypeError("pattern is too long")};gb.assertValidPattern=RPe});var PG=b(yb=>{"use strict";Object.defineProperty(yb,"__esModule",{value:!0});yb.parseClass=void 0;var DPe={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},rm=t=>t.replace(/[[\]\\-]/g,"\\$&"),OPe=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),$G=t=>t.join(""),MPe=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],i=[],o=r+1,a=!1,s=!1,l=!1,c=!1,u=r,d="";e:for(;o<t.length;){let m=t.charAt(o);if((m==="!"||m==="^")&&o===r+1){c=!0,o++;continue}if(m==="]"&&a&&!l){u=o+1;break}if(a=!0,m==="\\"&&!l){l=!0,o++;continue}if(m==="["&&!l){for(let[y,[g,v,E]]of Object.entries(DPe))if(t.startsWith(y,o)){if(d)return["$.",!1,t.length-r,!0];o+=y.length,E?i.push(g):n.push(g),s=s||v;continue e}}if(l=!1,d){m>d?n.push(rm(d)+"-"+rm(m)):m===d&&n.push(rm(m)),d="",o++;continue}if(t.startsWith("-]",o+1)){n.push(rm(m+"-")),o+=2;continue}if(t.startsWith("-",o+1)){d=m,o+=2;continue}n.push(rm(m)),o++}if(u<o)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,t.length-r,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!c){let m=n[0].length===2?n[0].slice(-1):n[0];return[OPe(m),!1,u-r,!1]}let f="["+(c?"^":"")+$G(n)+"]",p="["+(c?"":"^")+$G(i)+"]";return[n.length&&i.length?"("+f+"|"+p+")":n.length?f:p,s,u-r,!0]};yb.parseClass=MPe});var vb=b(_b=>{"use strict";Object.defineProperty(_b,"__esModule",{value:!0});_b.unescape=void 0;var NPe=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");_b.unescape=NPe});var QC=b(xb=>{"use strict";Object.defineProperty(xb,"__esModule",{value:!0});xb.AST=void 0;var jPe=PG(),bb=vb(),zPe=new Set(["!","?","+","*","@"]),TG=t=>zPe.has(t),LPe="(?!(?:^|/)\\.\\.?(?:$|/))",wb="(?!\\.)",FPe=new Set(["[","."]),BPe=new Set(["..","."]),UPe=new Set("().*{}+?[]^$\\!"),qPe=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),XC="[^/]",AG=XC+"*?",kG=XC+"+?",YC=class t{type;#e;#t;#o=!1;#n=[];#a;#b;#c;#d=!1;#s;#l;#i=!1;constructor(e,r,n={}){this.type=e,e&&(this.#t=!0),this.#a=r,this.#e=this.#a?this.#a.#e:this,this.#s=this.#e===this?n:this.#e.#s,this.#c=this.#e===this?[]:this.#e.#c,e==="!"&&!this.#e.#d&&this.#c.push(this),this.#b=this.#a?this.#a.#n.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#n)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#n.map(e=>String(e)).join("|")+")":this.#l=this.#n.map(e=>String(e)).join("")}#g(){if(this!==this.#e)throw new Error("should only call on root");if(this.#d)return this;this.toString(),this.#d=!0;let e;for(;e=this.#c.pop();){if(e.type!=="!")continue;let r=e,n=r.#a;for(;n;){for(let i=r.#b+1;!n.type&&i<n.#n.length;i++)for(let o of e.#n){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(n.#n[i])}r=n,n=r.#a}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof t&&r.#a===this))throw new Error("invalid part: "+r);this.#n.push(r)}}toJSON(){var r;let e=this.type===null?this.#n.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#n.map(n=>n.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#d&&((r=this.#a)==null?void 0:r.type)==="!")&&e.push({}),e}isStart(){var r;if(this.#e===this)return!0;if(!((r=this.#a)!=null&&r.isStart()))return!1;if(this.#b===0)return!0;let e=this.#a;for(let n=0;n<this.#b;n++){let i=e.#n[n];if(!(i instanceof t&&i.type==="!"))return!1}return!0}isEnd(){var r,n,i;if(this.#e===this||((r=this.#a)==null?void 0:r.type)==="!")return!0;if(!((n=this.#a)!=null&&n.isEnd()))return!1;if(!this.type)return(i=this.#a)==null?void 0:i.isEnd();let e=this.#a?this.#a.#n.length:0;return this.#b===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new t(this.type,e);for(let n of this.#n)r.copyIn(n);return r}static#y(e,r,n,i){let o=!1,a=!1,s=-1,l=!1;if(r.type===null){let p=n,h="";for(;p<e.length;){let m=e.charAt(p++);if(o||m==="\\"){o=!o,h+=m;continue}if(a){p===s+1?(m==="^"||m==="!")&&(l=!0):m==="]"&&!(p===s+2&&l)&&(a=!1),h+=m;continue}else if(m==="["){a=!0,s=p,l=!1,h+=m;continue}if(!i.noext&&TG(m)&&e.charAt(p)==="("){r.push(h),h="";let y=new t(m,r);p=t.#y(e,y,p,i),r.push(y);continue}h+=m}return r.push(h),p}let c=n+1,u=new t(null,r),d=[],f="";for(;c<e.length;){let p=e.charAt(c++);if(o||p==="\\"){o=!o,f+=p;continue}if(a){c===s+1?(p==="^"||p==="!")&&(l=!0):p==="]"&&!(c===s+2&&l)&&(a=!1),f+=p;continue}else if(p==="["){a=!0,s=c,l=!1,f+=p;continue}if(TG(p)&&e.charAt(c)==="("){u.push(f),f="";let h=new t(p,u);u.push(h),c=t.#y(e,h,c,i);continue}if(p==="|"){u.push(f),f="",d.push(u),u=new t(null,r);continue}if(p===")")return f===""&&r.#n.length===0&&(r.#i=!0),u.push(f),f="",r.push(...d,u),c;f+=p}return r.type=null,r.#t=void 0,r.#n=[e.substring(n-1)],c}static fromGlob(e,r={}){let n=new t(null,void 0,r);return t.#y(e,n,0,r),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[r,n,i,o]=this.toRegExpSource();if(!(i||this.#t||this.#s.nocase&&!this.#s.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let s=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,s),{_src:r,_glob:e})}get options(){return this.#s}toRegExpSource(e){var l;let r=e??!!this.#s.dot;if(this.#e===this&&this.#g(),!this.type){let c=this.isStart()&&this.isEnd(),u=this.#n.map(h=>{let[m,y,g,v]=typeof h=="string"?t.#f(h,this.#t,c):h.toRegExpSource(e);return this.#t=this.#t||g,this.#o=this.#o||v,m}).join(""),d="";if(this.isStart()&&typeof this.#n[0]=="string"&&!(this.#n.length===1&&BPe.has(this.#n[0]))){let m=FPe,y=r&&m.has(u.charAt(0))||u.startsWith("\\.")&&m.has(u.charAt(2))||u.startsWith("\\.\\.")&&m.has(u.charAt(4)),g=!r&&!e&&m.has(u.charAt(0));d=y?LPe:g?wb:""}let f="";return this.isEnd()&&this.#e.#d&&((l=this.#a)==null?void 0:l.type)==="!"&&(f="(?:$|\\/)"),[d+u+f,(0,bb.unescape)(u),this.#t=!!this.#t,this.#o]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#p(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let c=this.toString();return this.#n=[c],this.type=null,this.#t=void 0,[c,(0,bb.unescape)(this.toString()),!1,!1]}let a=!n||e||r||!wb?"":this.#p(!0);a===o&&(a=""),a&&(o=`(?:${o})(?:${a})*?`);let s="";if(this.type==="!"&&this.#i)s=(this.isStart()&&!r?wb:"")+kG;else{let c=this.type==="!"?"))"+(this.isStart()&&!r&&!e?wb:"")+AG+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;s=i+o+c}return[s,(0,bb.unescape)(o),this.#t=!!this.#t,this.#o]}#p(e){return this.#n.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,i,o,a]=r.toRegExpSource(e);return this.#o=this.#o||a,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#f(e,r,n=!1){let i=!1,o="",a=!1;for(let s=0;s<e.length;s++){let l=e.charAt(s);if(i){i=!1,o+=(UPe.has(l)?"\\":"")+l;continue}if(l==="\\"){s===e.length-1?o+="\\\\":i=!0;continue}if(l==="["){let[c,u,d,f]=(0,jPe.parseClass)(e,s);if(d){o+=c,a=a||u,s+=d-1,r=r||f;continue}}if(l==="*"){n&&e==="*"?o+=kG:o+=AG,r=!0;continue}if(l==="?"){o+=XC,r=!0;continue}o+=qPe(l)}return[o,(0,bb.unescape)(e),!!r,a]}};xb.AST=YC});var eR=b(Sb=>{"use strict";Object.defineProperty(Sb,"__esModule",{value:!0});Sb.escape=void 0;var ZPe=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");Sb.escape=ZPe});var cs=b(ae=>{"use strict";var HPe=ae&&ae.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ae,"__esModule",{value:!0});ae.unescape=ae.escape=ae.AST=ae.Minimatch=ae.match=ae.makeRe=ae.braceExpand=ae.defaults=ae.filter=ae.GLOBSTAR=ae.sep=ae.minimatch=void 0;var VPe=HPe(NA()),Eb=IG(),DG=QC(),GPe=eR(),WPe=vb(),JPe=(t,e,r={})=>((0,Eb.assertValidPattern)(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Ml(e,r).match(t));ae.minimatch=JPe;var KPe=/^\*+([^+@!?\*\[\(]*)$/,YPe=t=>e=>!e.startsWith(".")&&e.endsWith(t),XPe=t=>e=>e.endsWith(t),QPe=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),eTe=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),tTe=/^\*+\.\*+$/,rTe=t=>!t.startsWith(".")&&t.includes("."),nTe=t=>t!=="."&&t!==".."&&t.includes("."),iTe=/^\.\*+$/,oTe=t=>t!=="."&&t!==".."&&t.startsWith("."),aTe=/^\*+$/,sTe=t=>t.length!==0&&!t.startsWith("."),lTe=t=>t.length!==0&&t!=="."&&t!=="..",cTe=/^\?+([^+@!?\*\[\(]*)?$/,uTe=([t,e=""])=>{let r=OG([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},dTe=([t,e=""])=>{let r=MG([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},fTe=([t,e=""])=>{let r=MG([t]);return e?n=>r(n)&&n.endsWith(e):r},pTe=([t,e=""])=>{let r=OG([t]);return e?n=>r(n)&&n.endsWith(e):r},OG=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},MG=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},NG=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",CG={win32:{sep:"\\"},posix:{sep:"/"}};ae.sep=NG==="win32"?CG.win32.sep:CG.posix.sep;ae.minimatch.sep=ae.sep;ae.GLOBSTAR=Symbol("globstar **");ae.minimatch.GLOBSTAR=ae.GLOBSTAR;var hTe="[^/]",mTe=hTe+"*?",gTe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",yTe="(?:(?!(?:\\/|^)\\.).)*?",_Te=(t,e={})=>r=>(0,ae.minimatch)(r,t,e);ae.filter=_Te;ae.minimatch.filter=ae.filter;var di=(t,e={})=>Object.assign({},t,e),vTe=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return ae.minimatch;let e=ae.minimatch;return Object.assign((n,i,o={})=>e(n,i,di(t,o)),{Minimatch:class extends e.Minimatch{constructor(i,o={}){super(i,di(t,o))}static defaults(i){return e.defaults(di(t,i)).Minimatch}},AST:class extends e.AST{constructor(i,o,a={}){super(i,o,di(t,a))}static fromGlob(i,o={}){return e.AST.fromGlob(i,di(t,o))}},unescape:(n,i={})=>e.unescape(n,di(t,i)),escape:(n,i={})=>e.escape(n,di(t,i)),filter:(n,i={})=>e.filter(n,di(t,i)),defaults:n=>e.defaults(di(t,n)),makeRe:(n,i={})=>e.makeRe(n,di(t,i)),braceExpand:(n,i={})=>e.braceExpand(n,di(t,i)),match:(n,i,o={})=>e.match(n,i,di(t,o)),sep:e.sep,GLOBSTAR:ae.GLOBSTAR})};ae.defaults=vTe;ae.minimatch.defaults=ae.defaults;var bTe=(t,e={})=>((0,Eb.assertValidPattern)(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,VPe.default)(t));ae.braceExpand=bTe;ae.minimatch.braceExpand=ae.braceExpand;var wTe=(t,e={})=>new Ml(t,e).makeRe();ae.makeRe=wTe;ae.minimatch.makeRe=ae.makeRe;var xTe=(t,e,r={})=>{let n=new Ml(e,r);return t=t.filter(i=>n.match(i)),n.options.nonull&&!t.length&&t.push(e),t};ae.match=xTe;ae.minimatch.match=ae.match;var RG=/[?*]|[+@!]\(.*?\)|\[|\]/,STe=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ml=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){(0,Eb.assertValidPattern)(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||NG,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((o,a,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=o[0]===""&&o[1]===""&&(o[2]==="?"||!RG.test(o[2]))&&!RG.test(o[3]),c=/^[a-z]:/i.test(o[0]);if(l)return[...o.slice(0,4),...o.slice(4).map(u=>this.parse(u))];if(c)return[o[0],...o.slice(1).map(u=>this.parse(u))]}return o.map(l=>this.parse(l))});if(this.debug(this.pattern,i),this.set=i.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let a=this.set[o];a[0]===""&&a[1]===""&&this.globParts[o][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n=0;n<e.length;n++)for(let i=0;i<e[n].length;i++)e[n][i]==="**"&&(e[n][i]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let i=n;for(;r[i+1]==="**";)i++;i!==n&&r.splice(n,i-n)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((n,i)=>{let o=n[n.length-1];return i==="**"&&o==="**"?n:i===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(n.pop(),n):(n.push(i),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let o=e[i];i===1&&o===""&&e[0]===""||(o==="."||o==="")&&(r=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let i=e[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&(r=!0,e.splice(n-1,2),n-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let n of e){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let a=i;for(;n[a+1]==="**";)a++;a>i&&n.splice(i+1,a-i);let s=n[i+1],l=n[i+2],c=n[i+3];if(s!==".."||!l||l==="."||l===".."||!c||c==="."||c==="..")continue;r=!0,n.splice(i,1);let u=n.slice(0);u[i]="**",e.push(u),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<n.length-1;a++){let s=n[a];a===1&&s===""&&n[0]===""||(s==="."||s==="")&&(r=!0,n.splice(a,1),a--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let o=0;for(;(o=n.indexOf("..",o+1))!==-1;){let a=n[o-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let l=o===1&&n[o+1]==="**"?["."]:[];n.splice(o-1,2,...l),n.length===0&&n.push(""),o-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let n=r+1;n<e.length;n++){let i=this.partsMatch(e[r],e[n],!this.preserveMultipleSlashes);if(i){e[r]=[],e[n]=i;break}}return e.filter(r=>r.length)}partsMatch(e,r,n=!1){let i=0,o=0,a=[],s="";for(;i<e.length&&o<r.length;)if(e[i]===r[o])a.push(s==="b"?r[o]:e[i]),i++,o++;else if(n&&e[i]==="**"&&r[o]===e[i+1])a.push(e[i]),i++;else if(n&&r[o]==="**"&&e[i]===r[o+1])a.push(r[o]),o++;else if(e[i]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(s==="b")return!1;s="a",a.push(e[i]),i++,o++}else if(r[o]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(s==="a")return!1;s="b",a.push(r[o]),i++,o++}else return!1;return e.length===r.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,n=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=e.slice(n)),this.negate=r}matchOne(e,r,n=!1){let i=this.options;if(this.isWindows){let m=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),y=!m&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),g=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),v=!g&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),E=y?3:m?0:void 0,x=v?3:g?0:void 0;if(typeof E=="number"&&typeof x=="number"){let[w,A]=[e[E],r[x]];w.toLowerCase()===A.toLowerCase()&&(r[x]=w,x>E?r=r.slice(x):E>x&&(e=e.slice(E)))}}let{optimizationLevel:o=1}=this.options;o>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var a=0,s=0,l=e.length,c=r.length;a<l&&s<c;a++,s++){this.debug("matchOne loop");var u=r[s],d=e[a];if(this.debug(r,u,d),u===!1)return!1;if(u===ae.GLOBSTAR){this.debug("GLOBSTAR",[r,u,d]);var f=a,p=s+1;if(p===c){for(this.debug("** at the end");a<l;a++)if(e[a]==="."||e[a]===".."||!i.dot&&e[a].charAt(0)===".")return!1;return!0}for(;f<l;){var h=e[f];if(this.debug(`
|
|
226
|
+
`+S);let[,C]=$;return C.replace(/\s/g,"").split(xs).map(N=>N.replace(Jl,"").trim())}function oa(I,S){var $={};return Object.keys(I).forEach(C=>{var N=I[C],j,B=p(N),q=!B&&N.length===1||B&&N.length===0;if(Array.isArray(N))j=[...N],N=j.pop(),$[C]=j.concat(j.length>0?V:N);else if(q)$[C]=N;else{if(j=_d(N),N.length===0&&!B&&j.length===0)throw new Error("autoInject task functions require explicit parameters.");B||j.pop(),$[C]=j.concat(V)}function V(ce,Ye){var ut=j.map(et=>ce[et]);ut.push(Ye),y(N)(...ut)}}),Vr($,S)}class In{constructor(){this.head=this.tail=null,this.length=0}removeLink(S){return S.prev?S.prev.next=S.next:this.head=S.next,S.next?S.next.prev=S.prev:this.tail=S.prev,S.prev=S.next=null,this.length-=1,S}empty(){for(;this.head;)this.shift();return this}insertAfter(S,$){$.prev=S,$.next=S.next,S.next?S.next.prev=$:this.tail=$,S.next=$,this.length+=1}insertBefore(S,$){$.prev=S.prev,$.next=S,S.prev?S.prev.next=$:this.head=$,S.prev=$,this.length+=1}unshift(S){this.head?this.insertBefore(this.head,S):Wr(this,S)}push(S){this.tail?this.insertAfter(this.tail,S):Wr(this,S)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var S=this.head;S;)yield S.data,S=S.next}remove(S){for(var $=this.head;$;){var{next:C}=$;S($)&&this.removeLink($),$=C}return this}}function Wr(I,S){I.length=1,I.head=I.tail=S}function Bn(I,S,$){if(S==null)S=1;else if(S===0)throw new RangeError("Concurrency must not be zero");var C=y(I),N=0,j=[];let B={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function q(he,se){B[he].push(se)}function V(he,se){let me=(...tt)=>{ce(he,me),se(...tt)};B[he].push(me)}function ce(he,se){if(!he)return Object.keys(B).forEach(me=>B[me]=[]);if(!se)return B[he]=[];B[he]=B[he].filter(me=>me!==se)}function Ye(he,...se){B[he].forEach(me=>me(...se))}var ut=!1;function et(he,se,me,tt){if(tt!=null&&typeof tt!="function")throw new Error("task callback must be a function");dt.started=!0;var Zt,ur;function Zn(As,...Td){if(As)return me?ur(As):Zt();if(Td.length<=1)return Zt(Td[0]);Zt(Td)}var tc=dt._createTaskItem(he,me?Zn:tt||Zn);if(se?dt._tasks.unshift(tc):dt._tasks.push(tc),ut||(ut=!0,c(()=>{ut=!1,dt.process()})),me||!tt)return new Promise((As,Td)=>{Zt=As,ur=Td})}function qn(he){return function(se,...me){N-=1;for(var tt=0,Zt=he.length;tt<Zt;tt++){var ur=he[tt],Zn=j.indexOf(ur);Zn===0?j.shift():Zn>0&&j.splice(Zn,1),ur.callback(se,...me),se!=null&&Ye("error",se,ur.data)}N<=dt.concurrency-dt.buffer&&Ye("unsaturated"),dt.idle()&&Ye("drain"),dt.process()}}function ec(he){return he.length===0&&dt.idle()?(c(()=>Ye("drain")),!0):!1}let Ts=he=>se=>{if(!se)return new Promise((me,tt)=>{V(he,(Zt,ur)=>{if(Zt)return tt(Zt);me(ur)})});ce(he),q(he,se)};var Pd=!1,dt={_tasks:new In,_createTaskItem(he,se){return{data:he,callback:se}},*[Symbol.iterator](){yield*dt._tasks[Symbol.iterator]()},concurrency:S,payload:$,buffer:S/4,started:!1,paused:!1,push(he,se){return Array.isArray(he)?ec(he)?void 0:he.map(me=>et(me,!1,!1,se)):et(he,!1,!1,se)},pushAsync(he,se){return Array.isArray(he)?ec(he)?void 0:he.map(me=>et(me,!1,!0,se)):et(he,!1,!0,se)},kill(){ce(),dt._tasks.empty()},unshift(he,se){return Array.isArray(he)?ec(he)?void 0:he.map(me=>et(me,!0,!1,se)):et(he,!0,!1,se)},unshiftAsync(he,se){return Array.isArray(he)?ec(he)?void 0:he.map(me=>et(me,!0,!0,se)):et(he,!0,!0,se)},remove(he){dt._tasks.remove(he)},process(){if(!Pd){for(Pd=!0;!dt.paused&&N<dt.concurrency&&dt._tasks.length;){var he=[],se=[],me=dt._tasks.length;dt.payload&&(me=Math.min(me,dt.payload));for(var tt=0;tt<me;tt++){var Zt=dt._tasks.shift();he.push(Zt),j.push(Zt),se.push(Zt.data)}N+=1,dt._tasks.length===0&&Ye("empty"),N===dt.concurrency&&Ye("saturated");var ur=M(qn(he));C(se,ur)}Pd=!1}},length(){return dt._tasks.length},running(){return N},workersList(){return j},idle(){return dt._tasks.length+N===0},pause(){dt.paused=!0},resume(){dt.paused!==!1&&(dt.paused=!1,c(dt.process))}};return Object.defineProperties(dt,{saturated:{writable:!1,value:Ts("saturated")},unsaturated:{writable:!1,value:Ts("unsaturated")},empty:{writable:!1,value:Ts("empty")},drain:{writable:!1,value:Ts("drain")},error:{writable:!1,value:Ts("error")}}),dt}function Es(I,S){return Bn(I,1,S)}function vd(I,S,$){return Bn(I,S,$)}function aa(I,S,$,C){C=k(C);var N=y($);return kt(I,(j,B,q)=>{N(S,j,(V,ce)=>{S=ce,q(V)})},j=>C(j,S))}var dn=g(aa,4);function bd(...I){var S=I.map(y);return function(...$){var C=this,N=$[$.length-1];return typeof N=="function"?$.pop():N=Fn(),dn(S,$,(j,B,q)=>{B.apply(C,j.concat((V,...ce)=>{q(V,ce)}))},(j,B)=>N(j,...B)),N[Fi]}}function wd(...I){return bd(...I.reverse())}function Dm(I,S,$,C){return E(z(S),I,$,C)}var Un=g(Dm,4);function Is(I,S,$,C){var N=y($);return Un(I,S,(j,B)=>{N(j,(q,...V)=>q?B(q):B(q,V))},(j,B)=>{for(var q=[],V=0;V<B.length;V++)B[V]&&(q=q.concat(...B[V]));return C(j,q)})}var sa=g(Is,4);function Om(I,S,$){return sa(I,1/0,S,$)}var $s=g(Om,3);function ww(I,S,$){return sa(I,1,S,$)}var Kl=g(ww,3);function xd(...I){return function(...S){var $=S.pop();return $(null,...I)}}function gi(I,S){return($,C,N,j)=>{var B=!1,q;let V=y(N);$(C,(ce,Ye,ut)=>{V(ce,(et,qn)=>{if(et||et===!1)return ut(et);if(I(qn)&&!q)return B=!0,q=S(!0,ce),ut(null,w);ut()})},ce=>{if(ce)return j(ce);j(null,B?q:S(!1))})}}function Mm(I,S,$){return gi(C=>C,(C,N)=>N)(Z,I,S,$)}var Yl=g(Mm,3);function Nm(I,S,$,C){return gi(N=>N,(N,j)=>j)(z(S),I,$,C)}var Xl=g(Nm,4);function xw(I,S,$){return gi(C=>C,(C,N)=>N)(z(1),I,S,$)}var Ql=g(xw,3);function Sd(I){return(S,...$)=>y(S)(...$,(C,...N)=>{typeof console=="object"&&(C?console.error&&console.error(C):console[I]&&N.forEach(j=>console[I](j)))})}var jm=Sd("dir");function Sw(I,S,$){$=M($);var C=y(I),N=y(S),j;function B(V,...ce){if(V)return $(V);V!==!1&&(j=ce,N(...ce,q))}function q(V,ce){if(V)return $(V);if(V!==!1){if(!ce)return $(null,...j);C(B)}}return q(null,!0)}var la=g(Sw,3);function zm(I,S,$){let C=y(S);return la(I,(...N)=>{let j=N.pop();C(...N,(B,q)=>j(B,!q))},$)}function Ed(I){return(S,$,C)=>I(S,C)}function Jr(I,S,$){return Z(I,Ed(y(S)),$)}var $n=g(Jr,3);function Lm(I,S,$,C){return z(S)(I,Ed(y($)),C)}var Ps=g(Lm,4);function pY(I,S,$){return Ps(I,1,S,$)}var Id=g(pY,3);function Ew(I){return p(I)?I:function(...S){var $=S.pop(),C=!0;S.push((...N)=>{C?c(()=>$(...N)):$(...N)}),I.apply(this,S),C=!1}}function hY(I,S,$){return gi(C=>!C,C=>!C)(Z,I,S,$)}var Fm=g(hY,3);function mY(I,S,$,C){return gi(N=>!N,N=>!N)(z(S),I,$,C)}var Bm=g(mY,4);function gY(I,S,$){return gi(C=>!C,C=>!C)(kt,I,S,$)}var Um=g(gY,3);function yY(I,S,$,C){var N=new Array(S.length);I(S,(j,B,q)=>{$(j,(V,ce)=>{N[B]=!!ce,q(V)})},j=>{if(j)return C(j);for(var B=[],q=0;q<S.length;q++)N[q]&&B.push(S[q]);C(null,B)})}function _Y(I,S,$,C){var N=[];I(S,(j,B,q)=>{$(j,(V,ce)=>{if(V)return q(V);ce&&N.push({index:B,value:j}),q(V)})},j=>{if(j)return C(j);C(null,N.sort((B,q)=>B.index-q.index).map(B=>B.value))})}function qm(I,S,$,C){var N=x(S)?yY:_Y;return N(I,S,y($),C)}function vY(I,S,$){return qm(Z,I,S,$)}var Zm=g(vY,3);function bY(I,S,$,C){return qm(z(S),I,$,C)}var Hm=g(bY,4);function wY(I,S,$){return qm(kt,I,S,$)}var Vm=g(wY,3);function xY(I,S){var $=M(S),C=y(Ew(I));function N(j){if(j)return $(j);j!==!1&&C(N)}return N()}var PD=g(xY,2);function SY(I,S,$,C){var N=y($);return Un(I,S,(j,B)=>{N(j,(q,V)=>q?B(q):B(q,{key:V,val:j}))},(j,B)=>{for(var q={},{hasOwnProperty:V}=Object.prototype,ce=0;ce<B.length;ce++)if(B[ce]){var{key:Ye}=B[ce],{val:ut}=B[ce];V.call(q,Ye)?q[Ye].push(ut):q[Ye]=[ut]}return C(j,q)})}var Gm=g(SY,4);function TD(I,S,$){return Gm(I,1/0,S,$)}function AD(I,S,$){return Gm(I,1,S,$)}var kD=Sd("log");function EY(I,S,$,C){C=k(C);var N={},j=y($);return z(S)(I,(B,q,V)=>{j(B,q,(ce,Ye)=>{if(ce)return V(ce);N[q]=Ye,V(ce)})},B=>C(B,N))}var Wm=g(EY,4);function CD(I,S,$){return Wm(I,1/0,S,$)}function RD(I,S,$){return Wm(I,1,S,$)}function DD(I,S=$=>$){var $=Object.create(null),C=Object.create(null),N=y(I),j=r((B,q)=>{var V=S(...B);V in $?c(()=>q(null,...$[V])):V in C?C[V].push(q):(C[V]=[q],N(...B,(ce,...Ye)=>{ce||($[V]=Ye);var ut=C[V];delete C[V];for(var et=0,qn=ut.length;et<qn;et++)ut[et](ce,...Ye)}))});return j.memo=$,j.unmemoized=I,j}var Jm;o?Jm=process.nextTick:i?Jm=setImmediate:Jm=a;var OD=s(Jm),Iw=g((I,S,$)=>{var C=x(S)?[]:{};I(S,(N,j,B)=>{y(N)((q,...V)=>{V.length<2&&([V]=V),C[j]=V,B(q)})},N=>$(N,C))},3);function MD(I,S){return Iw(Z,I,S)}function ND(I,S,$){return Iw(z(S),I,$)}function $w(I,S){var $=y(I);return Bn((C,N)=>{$(C[0],N)},S,1)}class IY{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(S){let $;for(;S>0&&Pw(this.heap[S],this.heap[$=jD(S)]);){let C=this.heap[S];this.heap[S]=this.heap[$],this.heap[$]=C,S=$}}percDown(S){let $;for(;($=$Y(S))<this.heap.length&&($+1<this.heap.length&&Pw(this.heap[$+1],this.heap[$])&&($=$+1),!Pw(this.heap[S],this.heap[$]));){let C=this.heap[S];this.heap[S]=this.heap[$],this.heap[$]=C,S=$}}push(S){S.pushCount=++this.pushCount,this.heap.push(S),this.percUp(this.heap.length-1)}unshift(S){return this.heap.push(S)}shift(){let[S]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),S}toArray(){return[...this]}*[Symbol.iterator](){for(let S=0;S<this.heap.length;S++)yield this.heap[S].data}remove(S){let $=0;for(let C=0;C<this.heap.length;C++)S(this.heap[C])||(this.heap[$]=this.heap[C],$++);this.heap.splice($);for(let C=jD(this.heap.length-1);C>=0;C--)this.percDown(C);return this}}function $Y(I){return(I<<1)+1}function jD(I){return(I+1>>1)-1}function Pw(I,S){return I.priority!==S.priority?I.priority<S.priority:I.pushCount<S.pushCount}function zD(I,S){var $=$w(I,S),{push:C,pushAsync:N}=$;$._tasks=new IY,$._createTaskItem=({data:B,priority:q},V)=>({data:B,priority:q,callback:V});function j(B,q){return Array.isArray(B)?B.map(V=>({data:V,priority:q})):{data:B,priority:q}}return $.push=function(B,q=0,V){return C(j(B,q),V)},$.pushAsync=function(B,q=0,V){return N(j(B,q),V)},delete $.unshift,delete $.unshiftAsync,$}function PY(I,S){if(S=k(S),!Array.isArray(I))return S(new TypeError("First argument to race must be an array of functions"));if(!I.length)return S();for(var $=0,C=I.length;$<C;$++)y(I[$])(S)}var LD=g(PY,2);function Km(I,S,$,C){var N=[...I].reverse();return dn(N,S,$,C)}function Ym(I){var S=y(I);return r(function(C,N){return C.push((j,...B)=>{let q={};if(j&&(q.error=j),B.length>0){var V=B;B.length<=1&&([V]=B),q.value=V}N(null,q)}),S.apply(this,C)})}function FD(I){var S;return Array.isArray(I)?S=I.map(Ym):(S={},Object.keys(I).forEach($=>{S[$]=Ym.call(this,I[$])})),S}function Tw(I,S,$,C){let N=y($);return qm(I,S,(j,B)=>{N(j,(q,V)=>{B(q,!V)})},C)}function TY(I,S,$){return Tw(Z,I,S,$)}var BD=g(TY,3);function AY(I,S,$,C){return Tw(z(S),I,$,C)}var UD=g(AY,4);function kY(I,S,$){return Tw(kt,I,S,$)}var qD=g(kY,3);function ZD(I){return function(){return I}}let Aw=5,HD=0;function Xm(I,S,$){var C={times:Aw,intervalFunc:ZD(HD)};if(arguments.length<3&&typeof I=="function"?($=S||Fn(),S=I):(CY(C,I),$=$||Fn()),typeof S!="function")throw new Error("Invalid arguments for async.retry");var N=y(S),j=1;function B(){N((q,...V)=>{q!==!1&&(q&&j++<C.times&&(typeof C.errorFilter!="function"||C.errorFilter(q))?setTimeout(B,C.intervalFunc(j-1)):$(q,...V))})}return B(),$[Fi]}function CY(I,S){if(typeof S=="object")I.times=+S.times||Aw,I.intervalFunc=typeof S.interval=="function"?S.interval:ZD(+S.interval||HD),I.errorFilter=S.errorFilter;else if(typeof S=="number"||typeof S=="string")I.times=+S||Aw;else throw new Error("Invalid arguments for async.retry")}function VD(I,S){S||(S=I,I=null);let $=I&&I.arity||S.length;p(S)&&($+=1);var C=y(S);return r((N,j)=>{(N.length<$-1||j==null)&&(N.push(j),j=Fn());function B(q){C(...N,q)}return I?Xm(I,B,j):Xm(B,j),j[Fi]})}function GD(I,S){return Iw(kt,I,S)}function RY(I,S,$){return gi(Boolean,C=>C)(Z,I,S,$)}var Qm=g(RY,3);function DY(I,S,$,C){return gi(Boolean,N=>N)(z(S),I,$,C)}var eg=g(DY,4);function OY(I,S,$){return gi(Boolean,C=>C)(kt,I,S,$)}var tg=g(OY,3);function MY(I,S,$){var C=y(S);return H(I,(j,B)=>{C(j,(q,V)=>{if(q)return B(q);B(q,{value:j,criteria:V})})},(j,B)=>{if(j)return $(j);$(null,B.sort(N).map(q=>q.value))});function N(j,B){var q=j.criteria,V=B.criteria;return q<V?-1:q>V?1:0}}var WD=g(MY,3);function JD(I,S,$){var C=y(I);return r((N,j)=>{var B=!1,q;function V(){var ce=I.name||"anonymous",Ye=new Error('Callback function "'+ce+'" timed out.');Ye.code="ETIMEDOUT",$&&(Ye.info=$),B=!0,j(Ye)}N.push((...ce)=>{B||(j(...ce),clearTimeout(q))}),q=setTimeout(V,S),C(...N)})}function NY(I){for(var S=Array(I);I--;)S[I]=I;return S}function rg(I,S,$,C){var N=y($);return Un(NY(I),S,N,C)}function KD(I,S,$){return rg(I,1/0,S,$)}function YD(I,S,$){return rg(I,1,S,$)}function XD(I,S,$,C){arguments.length<=3&&typeof S=="function"&&(C=$,$=S,S=Array.isArray(I)?[]:{}),C=k(C||Fn());var N=y($);return Z(I,(j,B,q)=>{N(S,j,B,q)},j=>C(j,S)),C[Fi]}function jY(I,S){var $=null,C;return Id(I,(N,j)=>{y(N)((B,...q)=>{if(B===!1)return j(B);q.length<2?[C]=q:C=q,$=B,j(B?null:{})})},()=>S($,C))}var QD=g(jY);function eO(I){return(...S)=>(I.unmemoized||I)(...S)}function zY(I,S,$){$=M($);var C=y(S),N=y(I),j=[];function B(V,...ce){if(V)return $(V);j=ce,V!==!1&&N(q)}function q(V,ce){if(V)return $(V);if(V!==!1){if(!ce)return $(null,...j);C(B)}}return N(q)}var $d=g(zY,3);function tO(I,S,$){let C=y(I);return $d(N=>C((j,B)=>N(j,!B)),S,$)}function LY(I,S){if(S=k(S),!Array.isArray(I))return S(new Error("First argument to waterfall must be an array of functions"));if(!I.length)return S();var $=0;function C(j){var B=y(I[$++]);B(...j,M(N))}function N(j,...B){if(j!==!1){if(j||$===I.length)return S(j,...B);C(B)}}C([])}var rO=g(LY),FY={apply:e,applyEach:Et,applyEachSeries:wo,asyncify:u,auto:Vr,autoInject:oa,cargo:Es,cargoQueue:vd,compose:wd,concat:$s,concatLimit:sa,concatSeries:Kl,constant:xd,detect:Yl,detectLimit:Xl,detectSeries:Ql,dir:jm,doUntil:zm,doWhilst:la,each:$n,eachLimit:Ps,eachOf:Z,eachOfLimit:K,eachOfSeries:kt,eachSeries:Id,ensureAsync:Ew,every:Fm,everyLimit:Bm,everySeries:Um,filter:Zm,filterLimit:Hm,filterSeries:Vm,forever:PD,groupBy:TD,groupByLimit:Gm,groupBySeries:AD,log:kD,map:H,mapLimit:Un,mapSeries:bo,mapValues:CD,mapValuesLimit:Wm,mapValuesSeries:RD,memoize:DD,nextTick:OD,parallel:MD,parallelLimit:ND,priorityQueue:zD,queue:$w,race:LD,reduce:dn,reduceRight:Km,reflect:Ym,reflectAll:FD,reject:BD,rejectLimit:UD,rejectSeries:qD,retry:Xm,retryable:VD,seq:bd,series:GD,setImmediate:c,some:Qm,someLimit:eg,someSeries:tg,sortBy:WD,timeout:JD,times:KD,timesLimit:rg,timesSeries:YD,transform:XD,tryEach:QD,unmemoize:eO,until:tO,waterfall:rO,whilst:$d,all:Fm,allLimit:Bm,allSeries:Um,any:Qm,anyLimit:eg,anySeries:tg,find:Yl,findLimit:Xl,findSeries:Ql,flatMap:$s,flatMapLimit:sa,flatMapSeries:Kl,forEach:$n,forEachSeries:Id,forEachLimit:Ps,forEachOf:Z,forEachOfSeries:kt,forEachOfLimit:K,inject:dn,foldl:dn,foldr:Km,select:Zm,selectLimit:Hm,selectSeries:Vm,wrapSync:u,during:$d,doDuring:la};t.all=Fm,t.allLimit=Bm,t.allSeries=Um,t.any=Qm,t.anyLimit=eg,t.anySeries=tg,t.apply=e,t.applyEach=Et,t.applyEachSeries=wo,t.asyncify=u,t.auto=Vr,t.autoInject=oa,t.cargo=Es,t.cargoQueue=vd,t.compose=wd,t.concat=$s,t.concatLimit=sa,t.concatSeries=Kl,t.constant=xd,t.default=FY,t.detect=Yl,t.detectLimit=Xl,t.detectSeries=Ql,t.dir=jm,t.doDuring=la,t.doUntil=zm,t.doWhilst=la,t.during=$d,t.each=$n,t.eachLimit=Ps,t.eachOf=Z,t.eachOfLimit=K,t.eachOfSeries=kt,t.eachSeries=Id,t.ensureAsync=Ew,t.every=Fm,t.everyLimit=Bm,t.everySeries=Um,t.filter=Zm,t.filterLimit=Hm,t.filterSeries=Vm,t.find=Yl,t.findLimit=Xl,t.findSeries=Ql,t.flatMap=$s,t.flatMapLimit=sa,t.flatMapSeries=Kl,t.foldl=dn,t.foldr=Km,t.forEach=$n,t.forEachLimit=Ps,t.forEachOf=Z,t.forEachOfLimit=K,t.forEachOfSeries=kt,t.forEachSeries=Id,t.forever=PD,t.groupBy=TD,t.groupByLimit=Gm,t.groupBySeries=AD,t.inject=dn,t.log=kD,t.map=H,t.mapLimit=Un,t.mapSeries=bo,t.mapValues=CD,t.mapValuesLimit=Wm,t.mapValuesSeries=RD,t.memoize=DD,t.nextTick=OD,t.parallel=MD,t.parallelLimit=ND,t.priorityQueue=zD,t.queue=$w,t.race=LD,t.reduce=dn,t.reduceRight=Km,t.reflect=Ym,t.reflectAll=FD,t.reject=BD,t.rejectLimit=UD,t.rejectSeries=qD,t.retry=Xm,t.retryable=VD,t.select=Zm,t.selectLimit=Hm,t.selectSeries=Vm,t.seq=bd,t.series=GD,t.setImmediate=c,t.some=Qm,t.someLimit=eg,t.someSeries=tg,t.sortBy=WD,t.timeout=JD,t.times=KD,t.timesLimit=rg,t.timesSeries=YD,t.transform=XD,t.tryEach=QD,t.unmemoize=eO,t.until=tO,t.waterfall=rO,t.whilst=$d,t.wrapSync=u,Object.defineProperty(t,"__esModule",{value:!0})}))});var UU=b((Rqe,BU)=>{var rs=Q("constants"),t0e=process.cwd,fv=null,r0e=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return fv||(fv=t0e.call(process)),fv};try{process.cwd()}catch{}typeof process.chdir=="function"&&(ZA=process.chdir,process.chdir=function(t){fv=null,ZA.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,ZA));var ZA;BU.exports=n0e;function n0e(t){rs.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||r(t),t.chown=o(t.chown),t.fchown=o(t.fchown),t.lchown=o(t.lchown),t.chmod=n(t.chmod),t.fchmod=n(t.fchmod),t.lchmod=n(t.lchmod),t.chownSync=a(t.chownSync),t.fchownSync=a(t.fchownSync),t.lchownSync=a(t.lchownSync),t.chmodSync=i(t.chmodSync),t.fchmodSync=i(t.fchmodSync),t.lchmodSync=i(t.lchmodSync),t.stat=s(t.stat),t.fstat=s(t.fstat),t.lstat=s(t.lstat),t.statSync=l(t.statSync),t.fstatSync=l(t.fstatSync),t.lstatSync=l(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(u,d,f){f&&process.nextTick(f)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(u,d,f,p){p&&process.nextTick(p)},t.lchownSync=function(){}),r0e==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:(function(u){function d(f,p,h){var m=Date.now(),y=0;u(f,p,function g(v){if(v&&(v.code==="EACCES"||v.code==="EPERM"||v.code==="EBUSY")&&Date.now()-m<6e4){setTimeout(function(){t.stat(p,function(E,x){E&&E.code==="ENOENT"?u(f,p,g):h(v)})},y),y<100&&(y+=10);return}h&&h(v)})}return Object.setPrototypeOf&&Object.setPrototypeOf(d,u),d})(t.rename)),t.read=typeof t.read!="function"?t.read:(function(u){function d(f,p,h,m,y,g){var v;if(g&&typeof g=="function"){var E=0;v=function(x,w,k){if(x&&x.code==="EAGAIN"&&E<10)return E++,u.call(t,f,p,h,m,y,v);g.apply(this,arguments)}}return u.call(t,f,p,h,m,y,v)}return Object.setPrototypeOf&&Object.setPrototypeOf(d,u),d})(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:(function(u){return function(d,f,p,h,m){for(var y=0;;)try{return u.call(t,d,f,p,h,m)}catch(g){if(g.code==="EAGAIN"&&y<10){y++;continue}throw g}}})(t.readSync);function e(u){u.lchmod=function(d,f,p){u.open(d,rs.O_WRONLY|rs.O_SYMLINK,f,function(h,m){if(h){p&&p(h);return}u.fchmod(m,f,function(y){u.close(m,function(g){p&&p(y||g)})})})},u.lchmodSync=function(d,f){var p=u.openSync(d,rs.O_WRONLY|rs.O_SYMLINK,f),h=!0,m;try{m=u.fchmodSync(p,f),h=!1}finally{if(h)try{u.closeSync(p)}catch{}else u.closeSync(p)}return m}}function r(u){rs.hasOwnProperty("O_SYMLINK")&&u.futimes?(u.lutimes=function(d,f,p,h){u.open(d,rs.O_SYMLINK,function(m,y){if(m){h&&h(m);return}u.futimes(y,f,p,function(g){u.close(y,function(v){h&&h(g||v)})})})},u.lutimesSync=function(d,f,p){var h=u.openSync(d,rs.O_SYMLINK),m,y=!0;try{m=u.futimesSync(h,f,p),y=!1}finally{if(y)try{u.closeSync(h)}catch{}else u.closeSync(h)}return m}):u.futimes&&(u.lutimes=function(d,f,p,h){h&&process.nextTick(h)},u.lutimesSync=function(){})}function n(u){return u&&function(d,f,p){return u.call(t,d,f,function(h){c(h)&&(h=null),p&&p.apply(this,arguments)})}}function i(u){return u&&function(d,f){try{return u.call(t,d,f)}catch(p){if(!c(p))throw p}}}function o(u){return u&&function(d,f,p,h){return u.call(t,d,f,p,function(m){c(m)&&(m=null),h&&h.apply(this,arguments)})}}function a(u){return u&&function(d,f,p){try{return u.call(t,d,f,p)}catch(h){if(!c(h))throw h}}}function s(u){return u&&function(d,f,p){typeof f=="function"&&(p=f,f=null);function h(m,y){y&&(y.uid<0&&(y.uid+=4294967296),y.gid<0&&(y.gid+=4294967296)),p&&p.apply(this,arguments)}return f?u.call(t,d,f,h):u.call(t,d,h)}}function l(u){return u&&function(d,f){var p=f?u.call(t,d,f):u.call(t,d);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}function c(u){if(!u||u.code==="ENOSYS")return!0;var d=!process.getuid||process.getuid()!==0;return!!(d&&(u.code==="EINVAL"||u.code==="EPERM"))}}});var HU=b((Dqe,ZU)=>{var qU=Q("stream").Stream;ZU.exports=i0e;function i0e(t){return{ReadStream:e,WriteStream:r};function e(n,i){if(!(this instanceof e))return new e(n,i);qU.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var a=Object.keys(i),s=0,l=a.length;s<l;s++){var c=a[s];this[c]=i[c]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){o._read()});return}t.open(this.path,this.flags,this.mode,function(u,d){if(u){o.emit("error",u),o.readable=!1;return}o.fd=d,o.emit("open",d),o._read()})}function r(n,i){if(!(this instanceof r))return new r(n,i);qU.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),a=0,s=o.length;a<s;a++){var l=o[a];this[l]=i[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var GU=b((Oqe,VU)=>{"use strict";VU.exports=a0e;var o0e=Object.getPrototypeOf||function(t){return t.__proto__};function a0e(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:o0e(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}});var WA=b((Mqe,GA)=>{var Gt=Q("fs"),s0e=UU(),l0e=HU(),c0e=GU(),pv=Q("util"),Er,mv;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Er=Symbol.for("graceful-fs.queue"),mv=Symbol.for("graceful-fs.previous")):(Er="___graceful-fs.queue",mv="___graceful-fs.previous");function u0e(){}function KU(t,e){Object.defineProperty(t,Er,{get:function(){return e}})}var bl=u0e;pv.debuglog?bl=pv.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(bl=function(){var t=pv.format.apply(pv,arguments);t="GFS4: "+t.split(/\n/).join(`
|
|
227
|
+
GFS4: `),console.error(t)});Gt[Er]||(WU=global[Er]||[],KU(Gt,WU),Gt.close=(function(t){function e(r,n){return t.call(Gt,r,function(i){i||JU(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(e,mv,{value:t}),e})(Gt.close),Gt.closeSync=(function(t){function e(r){t.apply(Gt,arguments),JU()}return Object.defineProperty(e,mv,{value:t}),e})(Gt.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){bl(Gt[Er]),Q("assert").equal(Gt[Er].length,0)}));var WU;global[Er]||KU(global,Gt[Er]);GA.exports=HA(c0e(Gt));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Gt.__patched&&(GA.exports=HA(Gt),Gt.__patched=!0);function HA(t){s0e(t),t.gracefulify=HA,t.createReadStream=w,t.createWriteStream=k;var e=t.readFile;t.readFile=r;function r(T,D,A){return typeof D=="function"&&(A=D,D=null),M(T,D,A);function M(U,z,X,K){return e(U,z,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?$u([M,[U,z,X],re,K||Date.now(),Date.now()]):typeof X=="function"&&X.apply(this,arguments)})}}var n=t.writeFile;t.writeFile=i;function i(T,D,A,M){return typeof A=="function"&&(M=A,A=null),U(T,D,A,M);function U(z,X,K,re,pe){return n(z,X,K,function(F){F&&(F.code==="EMFILE"||F.code==="ENFILE")?$u([U,[z,X,K,re],F,pe||Date.now(),Date.now()]):typeof re=="function"&&re.apply(this,arguments)})}}var o=t.appendFile;o&&(t.appendFile=a);function a(T,D,A,M){return typeof A=="function"&&(M=A,A=null),U(T,D,A,M);function U(z,X,K,re,pe){return o(z,X,K,function(F){F&&(F.code==="EMFILE"||F.code==="ENFILE")?$u([U,[z,X,K,re],F,pe||Date.now(),Date.now()]):typeof re=="function"&&re.apply(this,arguments)})}}var s=t.copyFile;s&&(t.copyFile=l);function l(T,D,A,M){return typeof A=="function"&&(M=A,A=0),U(T,D,A,M);function U(z,X,K,re,pe){return s(z,X,K,function(F){F&&(F.code==="EMFILE"||F.code==="ENFILE")?$u([U,[z,X,K,re],F,pe||Date.now(),Date.now()]):typeof re=="function"&&re.apply(this,arguments)})}}var c=t.readdir;t.readdir=d;var u=/^v[0-5]\./;function d(T,D,A){typeof D=="function"&&(A=D,D=null);var M=u.test(process.version)?function(X,K,re,pe){return c(X,U(X,K,re,pe))}:function(X,K,re,pe){return c(X,K,U(X,K,re,pe))};return M(T,D,A);function U(z,X,K,re){return function(pe,F){pe&&(pe.code==="EMFILE"||pe.code==="ENFILE")?$u([M,[z,X,K],pe,re||Date.now(),Date.now()]):(F&&F.sort&&F.sort(),typeof K=="function"&&K.call(this,pe,F))}}}if(process.version.substr(0,4)==="v0.8"){var f=l0e(t);g=f.ReadStream,E=f.WriteStream}var p=t.ReadStream;p&&(g.prototype=Object.create(p.prototype),g.prototype.open=v);var h=t.WriteStream;h&&(E.prototype=Object.create(h.prototype),E.prototype.open=x),Object.defineProperty(t,"ReadStream",{get:function(){return g},set:function(T){g=T},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return E},set:function(T){E=T},enumerable:!0,configurable:!0});var m=g;Object.defineProperty(t,"FileReadStream",{get:function(){return m},set:function(T){m=T},enumerable:!0,configurable:!0});var y=E;Object.defineProperty(t,"FileWriteStream",{get:function(){return y},set:function(T){y=T},enumerable:!0,configurable:!0});function g(T,D){return this instanceof g?(p.apply(this,arguments),this):g.apply(Object.create(g.prototype),arguments)}function v(){var T=this;R(T.path,T.flags,T.mode,function(D,A){D?(T.autoClose&&T.destroy(),T.emit("error",D)):(T.fd=A,T.emit("open",A),T.read())})}function E(T,D){return this instanceof E?(h.apply(this,arguments),this):E.apply(Object.create(E.prototype),arguments)}function x(){var T=this;R(T.path,T.flags,T.mode,function(D,A){D?(T.destroy(),T.emit("error",D)):(T.fd=A,T.emit("open",A))})}function w(T,D){return new t.ReadStream(T,D)}function k(T,D){return new t.WriteStream(T,D)}var P=t.open;t.open=R;function R(T,D,A,M){return typeof A=="function"&&(M=A,A=null),U(T,D,A,M);function U(z,X,K,re,pe){return P(z,X,K,function(F,Z){F&&(F.code==="EMFILE"||F.code==="ENFILE")?$u([U,[z,X,K,re],F,pe||Date.now(),Date.now()]):typeof re=="function"&&re.apply(this,arguments)})}}return t}function $u(t){bl("ENQUEUE",t[0].name,t[1]),Gt[Er].push(t),VA()}var hv;function JU(){for(var t=Date.now(),e=0;e<Gt[Er].length;++e)Gt[Er][e].length>2&&(Gt[Er][e][3]=t,Gt[Er][e][4]=t);VA()}function VA(){if(clearTimeout(hv),hv=void 0,Gt[Er].length!==0){var t=Gt[Er].shift(),e=t[0],r=t[1],n=t[2],i=t[3],o=t[4];if(i===void 0)bl("RETRY",e.name,r),e.apply(null,r);else if(Date.now()-i>=6e4){bl("TIMEOUT",e.name,r);var a=r.pop();typeof a=="function"&&a.call(null,n)}else{var s=Date.now()-o,l=Math.max(o-i,1),c=Math.min(l*1.2,100);s>=c?(bl("RETRY",e.name,r),e.apply(null,r.concat([i]))):Gt[Er].push(t)}hv===void 0&&(hv=setTimeout(VA,0))}}});var gv=b((Nqe,YU)=>{"use strict";var oo=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";oo.writable=t=>oo(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";oo.readable=t=>oo(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";oo.duplex=t=>oo.writable(t)&&oo.readable(t);oo.transform=t=>oo.duplex(t)&&typeof t._transform=="function";YU.exports=oo});var bh=b((jqe,JA)=>{"use strict";typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0?JA.exports={nextTick:d0e}:JA.exports=process;function d0e(t,e,r,n){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var i=arguments.length,o,a;switch(i){case 0:case 1:return process.nextTick(t);case 2:return process.nextTick(function(){t.call(null,e)});case 3:return process.nextTick(function(){t.call(null,e,r)});case 4:return process.nextTick(function(){t.call(null,e,r,n)});default:for(o=new Array(i-1),a=0;a<o.length;)o[a++]=arguments[a];return process.nextTick(function(){t.apply(null,o)})}}});var QU=b((zqe,XU)=>{var f0e={}.toString;XU.exports=Array.isArray||function(t){return f0e.call(t)=="[object Array]"}});var KA=b((Lqe,eq)=>{eq.exports=Q("stream")});var wh=b((YA,rq)=>{var yv=Q("buffer"),Wo=yv.Buffer;function tq(t,e){for(var r in t)e[r]=t[r]}Wo.from&&Wo.alloc&&Wo.allocUnsafe&&Wo.allocUnsafeSlow?rq.exports=yv:(tq(yv,YA),YA.Buffer=Pu);function Pu(t,e,r){return Wo(t,e,r)}tq(Wo,Pu);Pu.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Wo(t,e,r)};Pu.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Wo(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};Pu.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Wo(t)};Pu.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return yv.SlowBuffer(t)}});var Tu=b(Br=>{function p0e(t){return Array.isArray?Array.isArray(t):_v(t)==="[object Array]"}Br.isArray=p0e;function h0e(t){return typeof t=="boolean"}Br.isBoolean=h0e;function m0e(t){return t===null}Br.isNull=m0e;function g0e(t){return t==null}Br.isNullOrUndefined=g0e;function y0e(t){return typeof t=="number"}Br.isNumber=y0e;function _0e(t){return typeof t=="string"}Br.isString=_0e;function v0e(t){return typeof t=="symbol"}Br.isSymbol=v0e;function b0e(t){return t===void 0}Br.isUndefined=b0e;function w0e(t){return _v(t)==="[object RegExp]"}Br.isRegExp=w0e;function x0e(t){return typeof t=="object"&&t!==null}Br.isObject=x0e;function S0e(t){return _v(t)==="[object Date]"}Br.isDate=S0e;function E0e(t){return _v(t)==="[object Error]"||t instanceof Error}Br.isError=E0e;function I0e(t){return typeof t=="function"}Br.isFunction=I0e;function $0e(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}Br.isPrimitive=$0e;Br.isBuffer=Q("buffer").Buffer.isBuffer;function _v(t){return Object.prototype.toString.call(t)}});var nq=b((Bqe,XA)=>{typeof Object.create=="function"?XA.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:XA.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var Au=b((Uqe,ek)=>{try{if(QA=Q("util"),typeof QA.inherits!="function")throw"";ek.exports=QA.inherits}catch{ek.exports=nq()}var QA});var oq=b((qqe,tk)=>{"use strict";function P0e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var iq=wh().Buffer,xh=Q("util");function T0e(t,e,r){t.copy(e,r)}tk.exports=(function(){function t(){P0e(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},t.prototype.unshift=function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i},t.prototype.concat=function(r){if(this.length===0)return iq.alloc(0);for(var n=iq.allocUnsafe(r>>>0),i=this.head,o=0;i;)T0e(i.data,n,o),o+=i.data.length,i=i.next;return n},t})();xh&&xh.inspect&&xh.inspect.custom&&(tk.exports.prototype[xh.inspect.custom]=function(){var t=xh.inspect({length:this.length});return this.constructor.name+" "+t})});var rk=b((Zqe,aq)=>{"use strict";var vv=bh();function A0e(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,vv.nextTick(bv,this,t)):vv.nextTick(bv,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(o){!e&&o?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,vv.nextTick(bv,r,o)):vv.nextTick(bv,r,o):e&&e(o)}),this)}function k0e(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function bv(t,e){t.emit("error",e)}aq.exports={destroy:A0e,undestroy:k0e}});var lq=b((Hqe,sq)=>{sq.exports=Q("util").deprecate});var ik=b((Vqe,gq)=>{"use strict";var wl=bh();gq.exports=nr;function uq(t){var e=this;this.next=null,this.entry=null,this.finish=function(){W0e(e,t)}}var C0e=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:wl.nextTick,ku;nr.WritableState=Eh;var dq=Object.create(Tu());dq.inherits=Au();var R0e={deprecate:lq()},fq=KA(),xv=wh().Buffer,D0e=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function O0e(t){return xv.from(t)}function M0e(t){return xv.isBuffer(t)||t instanceof D0e}var pq=rk();dq.inherits(nr,fq);function N0e(){}function Eh(t,e){ku=ku||xl(),t=t||{};var r=e instanceof ku;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var n=t.highWaterMark,i=t.writableHighWaterMark,o=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=t.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){q0e(e,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new uq(this)}Eh.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Eh.prototype,"buffer",{get:R0e.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var wv;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(wv=Function.prototype[Symbol.hasInstance],Object.defineProperty(nr,Symbol.hasInstance,{value:function(t){return wv.call(this,t)?!0:this!==nr?!1:t&&t._writableState instanceof Eh}})):wv=function(t){return t instanceof this};function nr(t){if(ku=ku||xl(),!wv.call(nr,this)&&!(this instanceof ku))return new nr(t);this._writableState=new Eh(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),fq.call(this)}nr.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function j0e(t,e){var r=new Error("write after end");t.emit("error",r),wl.nextTick(e,r)}function z0e(t,e,r,n){var i=!0,o=!1;return r===null?o=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),wl.nextTick(n,o),i=!1),i}nr.prototype.write=function(t,e,r){var n=this._writableState,i=!1,o=!n.objectMode&&M0e(t);return o&&!xv.isBuffer(t)&&(t=O0e(t)),typeof e=="function"&&(r=e,e=null),o?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=N0e),n.ended?j0e(this,r):(o||z0e(this,n,t,r))&&(n.pendingcb++,i=F0e(this,n,o,t,e,r)),i};nr.prototype.cork=function(){var t=this._writableState;t.corked++};nr.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&hq(this,t))};nr.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function L0e(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=xv.from(e,r)),e}Object.defineProperty(nr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function F0e(t,e,r,n,i,o){if(!r){var a=L0e(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=e.objectMode?1:n.length;e.length+=s;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else nk(t,e,!1,s,n,i,o);return l}function nk(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function B0e(t,e,r,n,i){--e.pendingcb,r?(wl.nextTick(i,n),wl.nextTick(Sh,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),Sh(t,e))}function U0e(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function q0e(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(U0e(r),e)B0e(t,r,n,e,i);else{var o=mq(r);!o&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&hq(t,r),n?C0e(cq,t,r,o,i):cq(t,r,o,i)}}function cq(t,e,r,n){r||Z0e(t,e),e.pendingcb--,n(),Sh(t,e)}function Z0e(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function hq(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,s=!0;r;)i[a]=r,r.isBuf||(s=!1),r=r.next,a+=1;i.allBuffers=s,nk(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new uq(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,c=r.encoding,u=r.callback,d=e.objectMode?1:l.length;if(nk(t,e,!1,d,l,c,u),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}nr.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};nr.prototype._writev=null;nr.prototype.end=function(t,e,r){var n=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||G0e(this,n,r)};function mq(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function H0e(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),Sh(t,e)})}function V0e(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,wl.nextTick(H0e,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Sh(t,e){var r=mq(e);return r&&(V0e(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function G0e(t,e,r){e.ending=!0,Sh(t,e),r&&(e.finished?wl.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function W0e(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(nr.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});nr.prototype.destroy=pq.destroy;nr.prototype._undestroy=pq.undestroy;nr.prototype._destroy=function(t,e){this.end(),e(t)}});var xl=b((Gqe,bq)=>{"use strict";var yq=bh(),J0e=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};bq.exports=Jo;var _q=Object.create(Tu());_q.inherits=Au();var vq=sk(),ak=ik();_q.inherits(Jo,vq);for(ok=J0e(ak.prototype),Sv=0;Sv<ok.length;Sv++)Ev=ok[Sv],Jo.prototype[Ev]||(Jo.prototype[Ev]=ak.prototype[Ev]);var ok,Ev,Sv;function Jo(t){if(!(this instanceof Jo))return new Jo(t);vq.call(this,t),ak.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",K0e)}Object.defineProperty(Jo.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function K0e(){this.allowHalfOpen||this._writableState.ended||yq.nextTick(Y0e,this)}function Y0e(t){t.end()}Object.defineProperty(Jo.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});Jo.prototype._destroy=function(t,e){this.push(null),this.end(),yq.nextTick(e,t)}});var uk=b(xq=>{"use strict";var ck=wh().Buffer,wq=ck.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function X0e(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function Q0e(t){var e=X0e(t);if(typeof e!="string"&&(ck.isEncoding===wq||!wq(t)))throw new Error("Unknown encoding: "+t);return e||t}xq.StringDecoder=Ih;function Ih(t){this.encoding=Q0e(t);var e;switch(this.encoding){case"utf16le":this.text=oye,this.end=aye,e=4;break;case"utf8":this.fillLast=rye,e=4;break;case"base64":this.text=sye,this.end=lye,e=3;break;default:this.write=cye,this.end=uye;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=ck.allocUnsafe(e)}Ih.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Ih.prototype.end=iye;Ih.prototype.text=nye;Ih.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function lk(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function eye(t,e,r){var n=e.length-1;if(n<r)return 0;var i=lk(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=lk(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=lk(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function tye(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"�"}}function rye(t){var e=this.lastTotal-this.lastNeed,r=tye(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function nye(t,e){var r=eye(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function iye(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function oye(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function aye(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function sye(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function lye(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function cye(t){return t.toString(this.encoding)}function uye(t){return t&&t.length?this.write(t):""}});var sk=b((Kqe,Oq)=>{"use strict";var Ru=bh();Oq.exports=Lt;var dye=QU(),$h;Lt.ReadableState=Aq;var Jqe=Q("events").EventEmitter,$q=function(t,e){return t.listeners(e).length},mk=KA(),Ph=wh().Buffer,fye=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function pye(t){return Ph.from(t)}function hye(t){return Ph.isBuffer(t)||t instanceof fye}var Pq=Object.create(Tu());Pq.inherits=Au();var dk=Q("util"),mt=void 0;dk&&dk.debuglog?mt=dk.debuglog("stream"):mt=function(){};var mye=oq(),Tq=rk(),Cu;Pq.inherits(Lt,mk);var fk=["error","close","destroy","pause","resume"];function gye(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):dye(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Aq(t,e){$h=$h||xl(),t=t||{};var r=e instanceof $h;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var n=t.highWaterMark,i=t.readableHighWaterMark,o=this.objectMode?16:16*1024;n||n===0?this.highWaterMark=n:r&&(i||i===0)?this.highWaterMark=i:this.highWaterMark=o,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new mye,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(Cu||(Cu=uk().StringDecoder),this.decoder=new Cu(t.encoding),this.encoding=t.encoding)}function Lt(t){if($h=$h||xl(),!(this instanceof Lt))return new Lt(t);this._readableState=new Aq(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),mk.call(this)}Object.defineProperty(Lt.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});Lt.prototype.destroy=Tq.destroy;Lt.prototype._undestroy=Tq.undestroy;Lt.prototype._destroy=function(t,e){this.push(null),e(t)};Lt.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Ph.from(t,e),e=""),n=!0),kq(this,t,e,!1,n)};Lt.prototype.unshift=function(t){return kq(this,t,null,!0,!1)};function kq(t,e,r,n,i){var o=t._readableState;if(e===null)o.reading=!1,bye(t,o);else{var a;i||(a=yye(o,e)),a?t.emit("error",a):o.objectMode||e&&e.length>0?(typeof e!="string"&&!o.objectMode&&Object.getPrototypeOf(e)!==Ph.prototype&&(e=pye(e)),n?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):pk(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||e.length!==0?pk(t,o,e,!1):Cq(t,o)):pk(t,o,e,!1))):n||(o.reading=!1)}return _ye(o)}function pk(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Iv(t)),Cq(t,e)}function yye(t,e){var r;return!hye(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function _ye(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}Lt.prototype.isPaused=function(){return this._readableState.flowing===!1};Lt.prototype.setEncoding=function(t){return Cu||(Cu=uk().StringDecoder),this._readableState.decoder=new Cu(t),this._readableState.encoding=t,this};var Sq=8388608;function vye(t){return t>=Sq?t=Sq:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Eq(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=vye(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Lt.prototype.read=function(t){mt("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return mt("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?hk(this):Iv(this),null;if(t=Eq(t,e),t===0&&e.ended)return e.length===0&&hk(this),null;var n=e.needReadable;mt("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,mt("length less than watermark",n)),e.ended||e.reading?(n=!1,mt("reading or ended",n)):n&&(mt("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Eq(r,e)));var i;return t>0?i=Rq(t,e):i=null,i===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&hk(this)),i!==null&&this.emit("data",i),i};function bye(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,Iv(t)}}function Iv(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(mt("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Ru.nextTick(Iq,t):Iq(t))}function Iq(t){mt("emit readable"),t.emit("readable"),gk(t)}function Cq(t,e){e.readingMore||(e.readingMore=!0,Ru.nextTick(wye,t,e))}function wye(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(mt("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}Lt.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};Lt.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,mt("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,o=i?s:y;n.endEmitted?Ru.nextTick(o):r.once("end",o),t.on("unpipe",a);function a(g,v){mt("onunpipe"),g===r&&v&&v.hasUnpiped===!1&&(v.hasUnpiped=!0,u())}function s(){mt("onend"),t.end()}var l=xye(r);t.on("drain",l);var c=!1;function u(){mt("cleanup"),t.removeListener("close",h),t.removeListener("finish",m),t.removeListener("drain",l),t.removeListener("error",p),t.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",y),r.removeListener("data",f),c=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}var d=!1;r.on("data",f);function f(g){mt("ondata"),d=!1;var v=t.write(g);v===!1&&!d&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&Dq(n.pipes,t)!==-1)&&!c&&(mt("false write response, pause",n.awaitDrain),n.awaitDrain++,d=!0),r.pause())}function p(g){mt("onerror",g),y(),t.removeListener("error",p),$q(t,"error")===0&&t.emit("error",g)}gye(t,"error",p);function h(){t.removeListener("finish",m),y()}t.once("close",h);function m(){mt("onfinish"),t.removeListener("close",h),y()}t.once("finish",m);function y(){mt("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(mt("pipe resume"),r.resume()),t};function xye(t){return function(){var e=t._readableState;mt("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&$q(t,"data")&&(e.flowing=!0,gk(t))}}Lt.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=Dq(e.pipes,t);return a===-1?this:(e.pipes.splice(a,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Lt.prototype.on=function(t,e){var r=mk.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var n=this._readableState;!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&Iv(this):Ru.nextTick(Sye,this))}return r};Lt.prototype.addListener=Lt.prototype.on;function Sye(t){mt("readable nexttick read 0"),t.read(0)}Lt.prototype.resume=function(){var t=this._readableState;return t.flowing||(mt("resume"),t.flowing=!0,Eye(this,t)),this};function Eye(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Ru.nextTick(Iye,t,e))}function Iye(t,e){e.reading||(mt("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),gk(t),e.flowing&&!e.reading&&t.read(0)}Lt.prototype.pause=function(){return mt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(mt("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function gk(t){var e=t._readableState;for(mt("flow",e.flowing);e.flowing&&t.read()!==null;);}Lt.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(mt("wrapped end"),r.decoder&&!r.ended){var a=r.decoder.end();a&&a.length&&e.push(a)}e.push(null)}),t.on("data",function(a){if(mt("wrapped data"),r.decoder&&(a=r.decoder.write(a)),!(r.objectMode&&a==null)&&!(!r.objectMode&&(!a||!a.length))){var s=e.push(a);s||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=(function(a){return function(){return t[a].apply(t,arguments)}})(i));for(var o=0;o<fk.length;o++)t.on(fk[o],this.emit.bind(this,fk[o]));return this._read=function(a){mt("wrapped _read",a),n&&(n=!1,t.resume())},this};Object.defineProperty(Lt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Lt._fromList=Rq;function Rq(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=$ye(t,e.buffer,e.decoder),r}function $ye(t,e,r){var n;return t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?n=e.shift():n=r?Pye(t,e):Tye(t,e),n}function Pye(t,e){var r=e.head,n=1,i=r.data;for(t-=i.length;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),t-=a,t===0){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++n}return e.length-=n,i}function Tye(t,e){var r=Ph.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),t-=a,t===0){a===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++i}return e.length-=i,r}function hk(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Ru.nextTick(Aye,e,t))}function Aye(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function Dq(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var yk=b((Yqe,jq)=>{"use strict";jq.exports=Ko;var $v=xl(),Nq=Object.create(Tu());Nq.inherits=Au();Nq.inherits(Ko,$v);function kye(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function Ko(t){if(!(this instanceof Ko))return new Ko(t);$v.call(this,t),this._transformState={afterTransform:kye.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Cye)}function Cye(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){Mq(t,e,r)}):Mq(this,null,null)}Ko.prototype.push=function(t,e){return this._transformState.needTransform=!1,$v.prototype.push.call(this,t,e)};Ko.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};Ko.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};Ko.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};Ko.prototype._destroy=function(t,e){var r=this;$v.prototype._destroy.call(this,t,function(n){e(n),r.emit("close")})};function Mq(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var Bq=b((Xqe,Fq)=>{"use strict";Fq.exports=Th;var zq=yk(),Lq=Object.create(Tu());Lq.inherits=Au();Lq.inherits(Th,zq);function Th(t){if(!(this instanceof Th))return new Th(t);zq.call(this,t)}Th.prototype._transform=function(t,e,r){r(null,t)}});var Uq=b((Ir,Pv)=>{var ao=Q("stream");process.env.READABLE_STREAM==="disable"&&ao?(Pv.exports=ao,Ir=Pv.exports=ao.Readable,Ir.Readable=ao.Readable,Ir.Writable=ao.Writable,Ir.Duplex=ao.Duplex,Ir.Transform=ao.Transform,Ir.PassThrough=ao.PassThrough,Ir.Stream=ao):(Ir=Pv.exports=sk(),Ir.Stream=ao||Ir,Ir.Readable=Ir,Ir.Writable=ik(),Ir.Duplex=xl(),Ir.Transform=yk(),Ir.PassThrough=Bq())});var Zq=b((Qqe,qq)=>{qq.exports=Uq().PassThrough});var Wq=b((e5e,Gq)=>{var Hq=Q("util"),kv=Zq();Gq.exports={Readable:Tv,Writable:Av};Hq.inherits(Tv,kv);Hq.inherits(Av,kv);function Vq(t,e,r){t[e]=function(){return delete t[e],r.apply(this,arguments),this[e].apply(this,arguments)}}function Tv(t,e){if(!(this instanceof Tv))return new Tv(t,e);kv.call(this,e),Vq(this,"_read",function(){var r=t.call(this,e),n=this.emit.bind(this,"error");r.on("error",n),r.pipe(this)}),this.emit("readable")}function Av(t,e){if(!(this instanceof Av))return new Av(t,e);kv.call(this,e),Vq(this,"_write",function(){var r=t.call(this,e),n=this.emit.bind(this,"error");r.on("error",n),this.pipe(r)}),this.emit("writable")}});var _k=b((t5e,Jq)=>{Jq.exports=function(t,e){if(typeof t!="string")throw new TypeError("expected path to be a string");if(t==="\\"||t==="/")return"/";var r=t.length;if(r<=1)return t;var n="";if(r>4&&t[3]==="\\"){var i=t[2];(i==="?"||i===".")&&t.slice(0,2)==="\\\\"&&(t=t.slice(2),n="//")}var o=t.split(/[/\\]+/);return e!==!1&&o[o.length-1]===""&&o.pop(),n+o.join("/")}});var vk=b((r5e,Kq)=>{function Rye(t){return t}Kq.exports=Rye});var Xq=b((n5e,Yq)=>{function Dye(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}Yq.exports=Dye});var t5=b((i5e,e5)=>{var Oye=Xq(),Qq=Math.max;function Mye(t,e,r){return e=Qq(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=Qq(n.length-e,0),a=Array(o);++i<o;)a[i]=n[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=n[i];return s[e]=r(a),Oye(t,this,s)}}e5.exports=Mye});var n5=b((o5e,r5)=>{function Nye(t){return function(){return t}}r5.exports=Nye});var bk=b((a5e,i5)=>{var jye=typeof global=="object"&&global&&global.Object===Object&&global;i5.exports=jye});var Du=b((s5e,o5)=>{var zye=bk(),Lye=typeof self=="object"&&self&&self.Object===Object&&self,Fye=zye||Lye||Function("return this")();o5.exports=Fye});var Cv=b((l5e,a5)=>{var Bye=Du(),Uye=Bye.Symbol;a5.exports=Uye});var u5=b((c5e,c5)=>{var s5=Cv(),l5=Object.prototype,qye=l5.hasOwnProperty,Zye=l5.toString,Ah=s5?s5.toStringTag:void 0;function Hye(t){var e=qye.call(t,Ah),r=t[Ah];try{t[Ah]=void 0;var n=!0}catch{}var i=Zye.call(t);return n&&(e?t[Ah]=r:delete t[Ah]),i}c5.exports=Hye});var f5=b((u5e,d5)=>{var Vye=Object.prototype,Gye=Vye.toString;function Wye(t){return Gye.call(t)}d5.exports=Wye});var kh=b((d5e,m5)=>{var p5=Cv(),Jye=u5(),Kye=f5(),Yye="[object Null]",Xye="[object Undefined]",h5=p5?p5.toStringTag:void 0;function Qye(t){return t==null?t===void 0?Xye:Yye:h5&&h5 in Object(t)?Jye(t):Kye(t)}m5.exports=Qye});var Ch=b((f5e,g5)=>{function e_e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}g5.exports=e_e});var wk=b((p5e,y5)=>{var t_e=kh(),r_e=Ch(),n_e="[object AsyncFunction]",i_e="[object Function]",o_e="[object GeneratorFunction]",a_e="[object Proxy]";function s_e(t){if(!r_e(t))return!1;var e=t_e(t);return e==i_e||e==o_e||e==n_e||e==a_e}y5.exports=s_e});var v5=b((h5e,_5)=>{var l_e=Du(),c_e=l_e["__core-js_shared__"];_5.exports=c_e});var x5=b((m5e,w5)=>{var xk=v5(),b5=(function(){var t=/[^.]+$/.exec(xk&&xk.keys&&xk.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function u_e(t){return!!b5&&b5 in t}w5.exports=u_e});var E5=b((g5e,S5)=>{var d_e=Function.prototype,f_e=d_e.toString;function p_e(t){if(t!=null){try{return f_e.call(t)}catch{}try{return t+""}catch{}}return""}S5.exports=p_e});var $5=b((y5e,I5)=>{var h_e=wk(),m_e=x5(),g_e=Ch(),y_e=E5(),__e=/[\\^$.*+?()[\]{}|]/g,v_e=/^\[object .+?Constructor\]$/,b_e=Function.prototype,w_e=Object.prototype,x_e=b_e.toString,S_e=w_e.hasOwnProperty,E_e=RegExp("^"+x_e.call(S_e).replace(__e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function I_e(t){if(!g_e(t)||m_e(t))return!1;var e=h_e(t)?E_e:v_e;return e.test(y_e(t))}I5.exports=I_e});var T5=b((_5e,P5)=>{function $_e(t,e){return t==null?void 0:t[e]}P5.exports=$_e});var Rh=b((v5e,A5)=>{var P_e=$5(),T_e=T5();function A_e(t,e){var r=T_e(t,e);return P_e(r)?r:void 0}A5.exports=A_e});var C5=b((b5e,k5)=>{var k_e=Rh(),C_e=(function(){try{var t=k_e(Object,"defineProperty");return t({},"",{}),t}catch{}})();k5.exports=C_e});var O5=b((w5e,D5)=>{var R_e=n5(),R5=C5(),D_e=vk(),O_e=R5?function(t,e){return R5(t,"toString",{configurable:!0,enumerable:!1,value:R_e(e),writable:!0})}:D_e;D5.exports=O_e});var N5=b((x5e,M5)=>{var M_e=800,N_e=16,j_e=Date.now;function z_e(t){var e=0,r=0;return function(){var n=j_e(),i=N_e-(n-r);if(r=n,i>0){if(++e>=M_e)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}M5.exports=z_e});var z5=b((S5e,j5)=>{var L_e=O5(),F_e=N5(),B_e=F_e(L_e);j5.exports=B_e});var Rv=b((E5e,L5)=>{var U_e=vk(),q_e=t5(),Z_e=z5();function H_e(t,e){return Z_e(q_e(t,e,U_e),t+"")}L5.exports=H_e});var Dv=b((I5e,F5)=>{function V_e(t,e){return t===e||t!==t&&e!==e}F5.exports=V_e});var Sk=b(($5e,B5)=>{var G_e=9007199254740991;function W_e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=G_e}B5.exports=W_e});var Ov=b((P5e,U5)=>{var J_e=wk(),K_e=Sk();function Y_e(t){return t!=null&&K_e(t.length)&&!J_e(t)}U5.exports=Y_e});var Ek=b((T5e,q5)=>{var X_e=9007199254740991,Q_e=/^(?:0|[1-9]\d*)$/;function eve(t,e){var r=typeof t;return e=e??X_e,!!e&&(r=="number"||r!="symbol"&&Q_e.test(t))&&t>-1&&t%1==0&&t<e}q5.exports=eve});var H5=b((A5e,Z5)=>{var tve=Dv(),rve=Ov(),nve=Ek(),ive=Ch();function ove(t,e,r){if(!ive(r))return!1;var n=typeof e;return(n=="number"?rve(r)&&nve(e,r.length):n=="string"&&e in r)?tve(r[e],t):!1}Z5.exports=ove});var G5=b((k5e,V5)=>{function ave(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}V5.exports=ave});var Ou=b((C5e,W5)=>{function sve(t){return t!=null&&typeof t=="object"}W5.exports=sve});var K5=b((R5e,J5)=>{var lve=kh(),cve=Ou(),uve="[object Arguments]";function dve(t){return cve(t)&&lve(t)==uve}J5.exports=dve});var Ik=b((D5e,Q5)=>{var Y5=K5(),fve=Ou(),X5=Object.prototype,pve=X5.hasOwnProperty,hve=X5.propertyIsEnumerable,mve=Y5((function(){return arguments})())?Y5:function(t){return fve(t)&&pve.call(t,"callee")&&!hve.call(t,"callee")};Q5.exports=mve});var $k=b((O5e,e9)=>{var gve=Array.isArray;e9.exports=gve});var r9=b((M5e,t9)=>{function yve(){return!1}t9.exports=yve});var a9=b((Dh,Mu)=>{var _ve=Du(),vve=r9(),o9=typeof Dh=="object"&&Dh&&!Dh.nodeType&&Dh,n9=o9&&typeof Mu=="object"&&Mu&&!Mu.nodeType&&Mu,bve=n9&&n9.exports===o9,i9=bve?_ve.Buffer:void 0,wve=i9?i9.isBuffer:void 0,xve=wve||vve;Mu.exports=xve});var l9=b((N5e,s9)=>{var Sve=kh(),Eve=Sk(),Ive=Ou(),$ve="[object Arguments]",Pve="[object Array]",Tve="[object Boolean]",Ave="[object Date]",kve="[object Error]",Cve="[object Function]",Rve="[object Map]",Dve="[object Number]",Ove="[object Object]",Mve="[object RegExp]",Nve="[object Set]",jve="[object String]",zve="[object WeakMap]",Lve="[object ArrayBuffer]",Fve="[object DataView]",Bve="[object Float32Array]",Uve="[object Float64Array]",qve="[object Int8Array]",Zve="[object Int16Array]",Hve="[object Int32Array]",Vve="[object Uint8Array]",Gve="[object Uint8ClampedArray]",Wve="[object Uint16Array]",Jve="[object Uint32Array]",Ft={};Ft[Bve]=Ft[Uve]=Ft[qve]=Ft[Zve]=Ft[Hve]=Ft[Vve]=Ft[Gve]=Ft[Wve]=Ft[Jve]=!0;Ft[$ve]=Ft[Pve]=Ft[Lve]=Ft[Tve]=Ft[Fve]=Ft[Ave]=Ft[kve]=Ft[Cve]=Ft[Rve]=Ft[Dve]=Ft[Ove]=Ft[Mve]=Ft[Nve]=Ft[jve]=Ft[zve]=!1;function Kve(t){return Ive(t)&&Eve(t.length)&&!!Ft[Sve(t)]}s9.exports=Kve});var Pk=b((j5e,c9)=>{function Yve(t){return function(e){return t(e)}}c9.exports=Yve});var d9=b((Oh,Nu)=>{var Xve=bk(),u9=typeof Oh=="object"&&Oh&&!Oh.nodeType&&Oh,Mh=u9&&typeof Nu=="object"&&Nu&&!Nu.nodeType&&Nu,Qve=Mh&&Mh.exports===u9,Tk=Qve&&Xve.process,ebe=(function(){try{var t=Mh&&Mh.require&&Mh.require("util").types;return t||Tk&&Tk.binding&&Tk.binding("util")}catch{}})();Nu.exports=ebe});var m9=b((z5e,h9)=>{var tbe=l9(),rbe=Pk(),f9=d9(),p9=f9&&f9.isTypedArray,nbe=p9?rbe(p9):tbe;h9.exports=nbe});var y9=b((L5e,g9)=>{var ibe=G5(),obe=Ik(),abe=$k(),sbe=a9(),lbe=Ek(),cbe=m9(),ube=Object.prototype,dbe=ube.hasOwnProperty;function fbe(t,e){var r=abe(t),n=!r&&obe(t),i=!r&&!n&&sbe(t),o=!r&&!n&&!i&&cbe(t),a=r||n||i||o,s=a?ibe(t.length,String):[],l=s.length;for(var c in t)(e||dbe.call(t,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||lbe(c,l)))&&s.push(c);return s}g9.exports=fbe});var v9=b((F5e,_9)=>{var pbe=Object.prototype;function hbe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||pbe;return t===r}_9.exports=hbe});var w9=b((B5e,b9)=>{function mbe(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}b9.exports=mbe});var S9=b((U5e,x9)=>{var gbe=Ch(),ybe=v9(),_be=w9(),vbe=Object.prototype,bbe=vbe.hasOwnProperty;function wbe(t){if(!gbe(t))return _be(t);var e=ybe(t),r=[];for(var n in t)n=="constructor"&&(e||!bbe.call(t,n))||r.push(n);return r}x9.exports=wbe});var I9=b((q5e,E9)=>{var xbe=y9(),Sbe=S9(),Ebe=Ov();function Ibe(t){return Ebe(t)?xbe(t,!0):Sbe(t)}E9.exports=Ibe});var T9=b((Z5e,P9)=>{var $be=Rv(),Pbe=Dv(),Tbe=H5(),Abe=I9(),$9=Object.prototype,kbe=$9.hasOwnProperty,Cbe=$be(function(t,e){t=Object(t);var r=-1,n=e.length,i=n>2?e[2]:void 0;for(i&&Tbe(e[0],e[1],i)&&(n=1);++r<n;)for(var o=e[r],a=Abe(o),s=-1,l=a.length;++s<l;){var c=a[s],u=t[c];(u===void 0||Pbe(u,$9[c])&&!kbe.call(t,c))&&(t[c]=o[c])}return t});P9.exports=Cbe});var Ht=b((H5e,A9)=>{"use strict";var Ak=class extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError(`Expected input to be an Array, got ${typeof e}`);let r="";for(let n=0;n<e.length;n++)r+=` ${e[n].stack}
|
|
228
|
+
`;super(r),this.name="AggregateError",this.errors=e}};A9.exports={AggregateError:Ak,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Boolean,Uint8Array}});var kk=b((V5e,k9)=>{"use strict";k9.exports={format(t,...e){return t.replace(/%([sdifj])/g,function(...[r,n]){let i=e.shift();return n==="f"?i.toFixed(6):n==="j"?JSON.stringify(i):n==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(t){switch(typeof t){case"string":if(t.includes("'"))if(t.includes('"')){if(!t.includes("`")&&!t.includes("${"))return`\`${t}\``}else return`"${t}"`;return`'${t}'`;case"number":return isNaN(t)?"NaN":Object.is(t,-0)?String(t):t;case"bigint":return`${String(t)}n`;case"boolean":case"undefined":return String(t);case"object":return"{}"}}}});var Ur=b((G5e,D9)=>{"use strict";var{format:Rbe,inspect:Mv}=kk(),{AggregateError:Dbe}=Ht(),Obe=globalThis.AggregateError||Dbe,Mbe=Symbol("kIsNodeError"),Nbe=["string","function","number","object","Function","Object","boolean","bigint","symbol"],jbe=/^([A-Z][a-z0-9]*)+$/,zbe="__node_internal_",Nv={};function Sl(t,e){if(!t)throw new Nv.ERR_INTERNAL_ASSERTION(e)}function C9(t){let e="",r=t.length,n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function Lbe(t,e,r){if(typeof e=="function")return Sl(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);let n=(e.match(/%[dfijoOs]/g)||[]).length;return Sl(n===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),r.length===0?e:Rbe(e,...r)}function $r(t,e,r){r||(r=Error);class n extends r{constructor(...o){super(Lbe(t,e,o))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(n.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),n.prototype.code=t,n.prototype[Mbe]=!0,Nv[t]=n}function R9(t){let e=zbe+t.name;return Object.defineProperty(t,"name",{value:e}),t}function Fbe(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;let r=new Obe([e,t],e.message);return r.code=e.code,r}return t||e}var Ck=class extends Error{constructor(e="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new Nv.ERR_INVALID_ARG_TYPE("options","Object",r);super(e,r),this.code="ABORT_ERR",this.name="AbortError"}};$r("ERR_ASSERTION","%s",Error);$r("ERR_INVALID_ARG_TYPE",(t,e,r)=>{Sl(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";let i=[],o=[],a=[];for(let l of e)Sl(typeof l=="string","All expected entries have to be of type string"),Nbe.includes(l)?i.push(l.toLowerCase()):jbe.test(l)?o.push(l):(Sl(l!=="object",'The value "object" should be written as "Object"'),a.push(l));if(o.length>0){let l=i.indexOf("object");l!==-1&&(i.splice(i,l,1),o.push("Object"))}if(i.length>0){switch(i.length){case 1:n+=`of type ${i[0]}`;break;case 2:n+=`one of type ${i[0]} or ${i[1]}`;break;default:{let l=i.pop();n+=`one of type ${i.join(", ")}, or ${l}`}}(o.length>0||a.length>0)&&(n+=" or ")}if(o.length>0){switch(o.length){case 1:n+=`an instance of ${o[0]}`;break;case 2:n+=`an instance of ${o[0]} or ${o[1]}`;break;default:{let l=o.pop();n+=`an instance of ${o.join(", ")}, or ${l}`}}a.length>0&&(n+=" or ")}switch(a.length){case 0:break;case 1:a[0].toLowerCase()!==a[0]&&(n+="an "),n+=`${a[0]}`;break;case 2:n+=`one of ${a[0]} or ${a[1]}`;break;default:{let l=a.pop();n+=`one of ${a.join(", ")}, or ${l}`}}if(r==null)n+=`. Received ${r}`;else if(typeof r=="function"&&r.name)n+=`. Received function ${r.name}`;else if(typeof r=="object"){var s;if((s=r.constructor)!==null&&s!==void 0&&s.name)n+=`. Received an instance of ${r.constructor.name}`;else{let l=Mv(r,{depth:-1});n+=`. Received ${l}`}}else{let l=Mv(r,{colors:!1});l.length>25&&(l=`${l.slice(0,25)}...`),n+=`. Received type ${typeof r} (${l})`}return n},TypeError);$r("ERR_INVALID_ARG_VALUE",(t,e,r="is invalid")=>{let n=Mv(e);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${t.includes(".")?"property":"argument"} '${t}' ${r}. Received ${n}`},TypeError);$r("ERR_INVALID_RETURN_VALUE",(t,e,r)=>{var n;let i=r!=null&&(n=r.constructor)!==null&&n!==void 0&&n.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return`Expected ${t} to be returned from the "${e}" function but got ${i}.`},TypeError);$r("ERR_MISSING_ARGS",(...t)=>{Sl(t.length>0,"At least one arg needs to be specified");let e,r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(n=>`"${n}"`).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{let n=t.pop();e+=`The ${t.join(", ")}, and ${n} arguments`}break}return`${e} must be specified`},TypeError);$r("ERR_OUT_OF_RANGE",(t,e,r)=>{Sl(e,'Missing "range" argument');let n;if(Number.isInteger(r)&&Math.abs(r)>2**32)n=C9(String(r));else if(typeof r=="bigint"){n=String(r);let i=BigInt(2)**BigInt(32);(r>i||r<-i)&&(n=C9(n)),n+="n"}else n=Mv(r);return`The value of "${t}" is out of range. It must be ${e}. Received ${n}`},RangeError);$r("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);$r("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);$r("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);$r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);$r("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);$r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);$r("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);$r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);$r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);$r("ERR_STREAM_WRITE_AFTER_END","write after end",Error);$r("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);D9.exports={AbortError:Ck,aggregateTwoErrors:R9(Fbe),hideStackFrames:R9,codes:Nv}});var q9=b((zh,jh)=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});var L9=new WeakMap,Rk=new WeakMap;function Bt(t){let e=L9.get(t);return console.assert(e!=null,"'this' is expected an Event object, but got",t),e}function O9(t){if(t.passiveListener!=null){typeof console<"u"&&typeof console.error=="function"&&console.error("Unable to preventDefault inside passive event listener invocation.",t.passiveListener);return}t.event.cancelable&&(t.canceled=!0,typeof t.event.preventDefault=="function"&&t.event.preventDefault())}function ju(t,e){L9.set(this,{eventTarget:t,event:e,eventPhase:2,currentTarget:t,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:e.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});let r=Object.keys(e);for(let n=0;n<r.length;++n){let i=r[n];i in this||Object.defineProperty(this,i,F9(i))}}ju.prototype={get type(){return Bt(this).event.type},get target(){return Bt(this).eventTarget},get currentTarget(){return Bt(this).currentTarget},composedPath(){let t=Bt(this).currentTarget;return t==null?[]:[t]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return Bt(this).eventPhase},stopPropagation(){let t=Bt(this);t.stopped=!0,typeof t.event.stopPropagation=="function"&&t.event.stopPropagation()},stopImmediatePropagation(){let t=Bt(this);t.stopped=!0,t.immediateStopped=!0,typeof t.event.stopImmediatePropagation=="function"&&t.event.stopImmediatePropagation()},get bubbles(){return!!Bt(this).event.bubbles},get cancelable(){return!!Bt(this).event.cancelable},preventDefault(){O9(Bt(this))},get defaultPrevented(){return Bt(this).canceled},get composed(){return!!Bt(this).event.composed},get timeStamp(){return Bt(this).timeStamp},get srcElement(){return Bt(this).eventTarget},get cancelBubble(){return Bt(this).stopped},set cancelBubble(t){if(!t)return;let e=Bt(this);e.stopped=!0,typeof e.event.cancelBubble=="boolean"&&(e.event.cancelBubble=!0)},get returnValue(){return!Bt(this).canceled},set returnValue(t){t||O9(Bt(this))},initEvent(){}};Object.defineProperty(ju.prototype,"constructor",{value:ju,configurable:!0,writable:!0});typeof window<"u"&&typeof window.Event<"u"&&(Object.setPrototypeOf(ju.prototype,window.Event.prototype),Rk.set(window.Event.prototype,ju));function F9(t){return{get(){return Bt(this).event[t]},set(e){Bt(this).event[t]=e},configurable:!0,enumerable:!0}}function Bbe(t){return{value(){let e=Bt(this).event;return e[t].apply(e,arguments)},configurable:!0,enumerable:!0}}function Ube(t,e){let r=Object.keys(e);if(r.length===0)return t;function n(i,o){t.call(this,i,o)}n.prototype=Object.create(t.prototype,{constructor:{value:n,configurable:!0,writable:!0}});for(let i=0;i<r.length;++i){let o=r[i];if(!(o in t.prototype)){let s=typeof Object.getOwnPropertyDescriptor(e,o).value=="function";Object.defineProperty(n.prototype,o,s?Bbe(o):F9(o))}}return n}function B9(t){if(t==null||t===Object.prototype)return ju;let e=Rk.get(t);return e==null&&(e=Ube(B9(Object.getPrototypeOf(t)),t),Rk.set(t,e)),e}function qbe(t,e){let r=B9(Object.getPrototypeOf(e));return new r(t,e)}function Zbe(t){return Bt(t).immediateStopped}function Hbe(t,e){Bt(t).eventPhase=e}function Vbe(t,e){Bt(t).currentTarget=e}function M9(t,e){Bt(t).passiveListener=e}var U9=new WeakMap,N9=1,j9=2,jv=3;function zv(t){return t!==null&&typeof t=="object"}function Nh(t){let e=U9.get(t);if(e==null)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return e}function Gbe(t){return{get(){let r=Nh(this).get(t);for(;r!=null;){if(r.listenerType===jv)return r.listener;r=r.next}return null},set(e){typeof e!="function"&&!zv(e)&&(e=null);let r=Nh(this),n=null,i=r.get(t);for(;i!=null;)i.listenerType===jv?n!==null?n.next=i.next:i.next!==null?r.set(t,i.next):r.delete(t):n=i,i=i.next;if(e!==null){let o={listener:e,listenerType:jv,passive:!1,once:!1,next:null};n===null?r.set(t,o):n.next=o}},configurable:!0,enumerable:!0}}function Dk(t,e){Object.defineProperty(t,`on${e}`,Gbe(e))}function z9(t){function e(){Di.call(this)}e.prototype=Object.create(Di.prototype,{constructor:{value:e,configurable:!0,writable:!0}});for(let r=0;r<t.length;++r)Dk(e.prototype,t[r]);return e}function Di(){if(this instanceof Di){U9.set(this,new Map);return}if(arguments.length===1&&Array.isArray(arguments[0]))return z9(arguments[0]);if(arguments.length>0){let t=new Array(arguments.length);for(let e=0;e<arguments.length;++e)t[e]=arguments[e];return z9(t)}throw new TypeError("Cannot call a class as a function")}Di.prototype={addEventListener(t,e,r){if(e==null)return;if(typeof e!="function"&&!zv(e))throw new TypeError("'listener' should be a function or an object.");let n=Nh(this),i=zv(r),a=(i?!!r.capture:!!r)?N9:j9,s={listener:e,listenerType:a,passive:i&&!!r.passive,once:i&&!!r.once,next:null},l=n.get(t);if(l===void 0){n.set(t,s);return}let c=null;for(;l!=null;){if(l.listener===e&&l.listenerType===a)return;c=l,l=l.next}c.next=s},removeEventListener(t,e,r){if(e==null)return;let n=Nh(this),o=(zv(r)?!!r.capture:!!r)?N9:j9,a=null,s=n.get(t);for(;s!=null;){if(s.listener===e&&s.listenerType===o){a!==null?a.next=s.next:s.next!==null?n.set(t,s.next):n.delete(t);return}a=s,s=s.next}},dispatchEvent(t){if(t==null||typeof t.type!="string")throw new TypeError('"event.type" should be a string.');let e=Nh(this),r=t.type,n=e.get(r);if(n==null)return!0;let i=qbe(this,t),o=null;for(;n!=null;){if(n.once?o!==null?o.next=n.next:n.next!==null?e.set(r,n.next):e.delete(r):o=n,M9(i,n.passive?n.listener:null),typeof n.listener=="function")try{n.listener.call(this,i)}catch(a){typeof console<"u"&&typeof console.error=="function"&&console.error(a)}else n.listenerType!==jv&&typeof n.listener.handleEvent=="function"&&n.listener.handleEvent(i);if(Zbe(i))break;n=n.next}return M9(i,null),Hbe(i,0),Vbe(i,null),!i.defaultPrevented}};Object.defineProperty(Di.prototype,"constructor",{value:Di,configurable:!0,writable:!0});typeof window<"u"&&typeof window.EventTarget<"u"&&Object.setPrototypeOf(Di.prototype,window.EventTarget.prototype);zh.defineEventAttribute=Dk;zh.EventTarget=Di;zh.default=Di;jh.exports=Di;jh.exports.EventTarget=jh.exports.default=Di;jh.exports.defineEventAttribute=Dk});var zu=b((Fh,Lh)=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});var Ok=q9(),ns=class extends Ok.EventTarget{constructor(){throw super(),new TypeError("AbortSignal cannot be constructed directly")}get aborted(){let e=Lv.get(this);if(typeof e!="boolean")throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this===null?"null":typeof this}`);return e}};Ok.defineEventAttribute(ns.prototype,"abort");function Wbe(){let t=Object.create(ns.prototype);return Ok.EventTarget.call(t),Lv.set(t,!1),t}function Jbe(t){Lv.get(t)===!1&&(Lv.set(t,!0),t.dispatchEvent({type:"abort"}))}var Lv=new WeakMap;Object.defineProperties(ns.prototype,{aborted:{enumerable:!0}});typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(ns.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortSignal"});var is=class{constructor(){H9.set(this,Wbe())}get signal(){return Z9(this)}abort(){Jbe(Z9(this))}},H9=new WeakMap;function Z9(t){let e=H9.get(t);if(e==null)throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${t===null?"null":typeof t}`);return e}Object.defineProperties(is.prototype,{signal:{enumerable:!0},abort:{enumerable:!0}});typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol"&&Object.defineProperty(is.prototype,Symbol.toStringTag,{configurable:!0,value:"AbortController"});Fh.AbortController=is;Fh.AbortSignal=ns;Fh.default=is;Lh.exports=is;Lh.exports.AbortController=Lh.exports.default=is;Lh.exports.AbortSignal=ns});var sn=b((W5e,Nk)=>{"use strict";var Kbe=Q("buffer"),{format:Ybe,inspect:Xbe}=kk(),{codes:{ERR_INVALID_ARG_TYPE:Mk}}=Ur(),{kResistStopPropagation:Qbe,AggregateError:ewe,SymbolDispose:twe}=Ht(),rwe=globalThis.AbortSignal||zu().AbortSignal,nwe=globalThis.AbortController||zu().AbortController,iwe=Object.getPrototypeOf(async function(){}).constructor,V9=globalThis.Blob||Kbe.Blob,owe=typeof V9<"u"?function(e){return e instanceof V9}:function(e){return!1},G9=(t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new Mk(e,"AbortSignal",t)},awe=(t,e)=>{if(typeof t!="function")throw new Mk(e,"Function",t)};Nk.exports={AggregateError:ewe,kEmptyObject:Object.freeze({}),once(t){let e=!1;return function(...r){e||(e=!0,t.apply(this,r))}},createDeferredPromise:function(){let t,e;return{promise:new Promise((n,i)=>{t=n,e=i}),resolve:t,reject:e}},promisify(t){return new Promise((e,r)=>{t((n,...i)=>n?r(n):e(...i))})},debuglog(){return function(){}},format:Ybe,inspect:Xbe,types:{isAsyncFunction(t){return t instanceof iwe},isArrayBufferView(t){return ArrayBuffer.isView(t)}},isBlob:owe,deprecate(t,e){return t},addAbortListener:Q("events").addAbortListener||function(e,r){if(e===void 0)throw new Mk("signal","AbortSignal",e);G9(e,"signal"),awe(r,"listener");let n;return e.aborted?queueMicrotask(()=>r()):(e.addEventListener("abort",r,{__proto__:null,once:!0,[Qbe]:!0}),n=()=>{e.removeEventListener("abort",r)}),{__proto__:null,[twe](){var i;(i=n)===null||i===void 0||i()}}},AbortSignalAny:rwe.any||function(e){if(e.length===1)return e[0];let r=new nwe,n=()=>r.abort();return e.forEach(i=>{G9(i,"signals"),i.addEventListener("abort",n,{once:!0})}),r.signal.addEventListener("abort",()=>{e.forEach(i=>i.removeEventListener("abort",n))},{once:!0}),r.signal}};Nk.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")});var Fu=b((J5e,n7)=>{"use strict";var{ArrayIsArray:zk,ArrayPrototypeIncludes:Y9,ArrayPrototypeJoin:X9,ArrayPrototypeMap:swe,NumberIsInteger:Lk,NumberIsNaN:lwe,NumberMAX_SAFE_INTEGER:cwe,NumberMIN_SAFE_INTEGER:uwe,NumberParseInt:dwe,ObjectPrototypeHasOwnProperty:fwe,RegExpPrototypeExec:Q9,String:pwe,StringPrototypeToUpperCase:hwe,StringPrototypeTrim:mwe}=Ht(),{hideStackFrames:ci,codes:{ERR_SOCKET_BAD_PORT:gwe,ERR_INVALID_ARG_TYPE:qr,ERR_INVALID_ARG_VALUE:Lu,ERR_OUT_OF_RANGE:El,ERR_UNKNOWN_SIGNAL:W9}}=Ur(),{normalizeEncoding:ywe}=sn(),{isAsyncFunction:_we,isArrayBufferView:vwe}=sn().types,J9={};function bwe(t){return t===(t|0)}function wwe(t){return t===t>>>0}var xwe=/^[0-7]+$/,Swe="must be a 32-bit unsigned integer or an octal string";function Ewe(t,e,r){if(typeof t>"u"&&(t=r),typeof t=="string"){if(Q9(xwe,t)===null)throw new Lu(e,t,Swe);t=dwe(t,8)}return e7(t,e),t}var Iwe=ci((t,e,r=uwe,n=cwe)=>{if(typeof t!="number")throw new qr(e,"number",t);if(!Lk(t))throw new El(e,"an integer",t);if(t<r||t>n)throw new El(e,`>= ${r} && <= ${n}`,t)}),$we=ci((t,e,r=-2147483648,n=2147483647)=>{if(typeof t!="number")throw new qr(e,"number",t);if(!Lk(t))throw new El(e,"an integer",t);if(t<r||t>n)throw new El(e,`>= ${r} && <= ${n}`,t)}),e7=ci((t,e,r=!1)=>{if(typeof t!="number")throw new qr(e,"number",t);if(!Lk(t))throw new El(e,"an integer",t);let n=r?1:0,i=4294967295;if(t<n||t>i)throw new El(e,`>= ${n} && <= ${i}`,t)});function Fk(t,e){if(typeof t!="string")throw new qr(e,"string",t)}function Pwe(t,e,r=void 0,n){if(typeof t!="number")throw new qr(e,"number",t);if(r!=null&&t<r||n!=null&&t>n||(r!=null||n!=null)&&lwe(t))throw new El(e,`${r!=null?`>= ${r}`:""}${r!=null&&n!=null?" && ":""}${n!=null?`<= ${n}`:""}`,t)}var Twe=ci((t,e,r)=>{if(!Y9(r,t)){let i="must be one of: "+X9(swe(r,o=>typeof o=="string"?`'${o}'`:pwe(o)),", ");throw new Lu(e,t,i)}});function t7(t,e){if(typeof t!="boolean")throw new qr(e,"boolean",t)}function jk(t,e,r){return t==null||!fwe(t,e)?r:t[e]}var Awe=ci((t,e,r=null)=>{let n=jk(r,"allowArray",!1),i=jk(r,"allowFunction",!1);if(!jk(r,"nullable",!1)&&t===null||!n&&zk(t)||typeof t!="object"&&(!i||typeof t!="function"))throw new qr(e,"Object",t)}),kwe=ci((t,e)=>{if(t!=null&&typeof t!="object"&&typeof t!="function")throw new qr(e,"a dictionary",t)}),Fv=ci((t,e,r=0)=>{if(!zk(t))throw new qr(e,"Array",t);if(t.length<r){let n=`must be longer than ${r}`;throw new Lu(e,t,n)}});function Cwe(t,e){Fv(t,e);for(let r=0;r<t.length;r++)Fk(t[r],`${e}[${r}]`)}function Rwe(t,e){Fv(t,e);for(let r=0;r<t.length;r++)t7(t[r],`${e}[${r}]`)}function Dwe(t,e){Fv(t,e);for(let r=0;r<t.length;r++){let n=t[r],i=`${e}[${r}]`;if(n==null)throw new qr(i,"AbortSignal",n);r7(n,i)}}function Owe(t,e="signal"){if(Fk(t,e),J9[t]===void 0)throw J9[hwe(t)]!==void 0?new W9(t+" (signals must use all capital letters)"):new W9(t)}var Mwe=ci((t,e="buffer")=>{if(!vwe(t))throw new qr(e,["Buffer","TypedArray","DataView"],t)});function Nwe(t,e){let r=ywe(e),n=t.length;if(r==="hex"&&n%2!==0)throw new Lu("encoding",e,`is invalid for data of length ${n}`)}function jwe(t,e="Port",r=!0){if(typeof t!="number"&&typeof t!="string"||typeof t=="string"&&mwe(t).length===0||+t!==+t>>>0||t>65535||t===0&&!r)throw new gwe(e,t,r);return t|0}var r7=ci((t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new qr(e,"AbortSignal",t)}),zwe=ci((t,e)=>{if(typeof t!="function")throw new qr(e,"Function",t)}),Lwe=ci((t,e)=>{if(typeof t!="function"||_we(t))throw new qr(e,"Function",t)}),Fwe=ci((t,e)=>{if(t!==void 0)throw new qr(e,"undefined",t)});function Bwe(t,e,r){if(!Y9(r,t))throw new qr(e,`('${X9(r,"|")}')`,t)}var Uwe=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function K9(t,e){if(typeof t>"u"||!Q9(Uwe,t))throw new Lu(e,t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function qwe(t){if(typeof t=="string")return K9(t,"hints"),t;if(zk(t)){let e=t.length,r="";if(e===0)return r;for(let n=0;n<e;n++){let i=t[n];K9(i,"hints"),r+=i,n!==e-1&&(r+=", ")}return r}throw new Lu("hints",t,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}n7.exports={isInt32:bwe,isUint32:wwe,parseFileMode:Ewe,validateArray:Fv,validateStringArray:Cwe,validateBooleanArray:Rwe,validateAbortSignalArray:Dwe,validateBoolean:t7,validateBuffer:Mwe,validateDictionary:kwe,validateEncoding:Nwe,validateFunction:zwe,validateInt32:$we,validateInteger:Iwe,validateNumber:Pwe,validateObject:Awe,validateOneOf:Twe,validatePlainFunction:Lwe,validatePort:jwe,validateSignalName:Owe,validateString:Fk,validateUint32:e7,validateUndefined:Fwe,validateUnion:Bwe,validateAbortSignal:r7,validateLinkHeaderValue:qwe}});var os=b((K5e,i7)=>{i7.exports=global.process});var lo=b((Y5e,v7)=>{"use strict";var{SymbolAsyncIterator:o7,SymbolIterator:a7,SymbolFor:Il}=Ht(),s7=Il("nodejs.stream.destroyed"),l7=Il("nodejs.stream.errored"),Bk=Il("nodejs.stream.readable"),Uk=Il("nodejs.stream.writable"),c7=Il("nodejs.stream.disturbed"),Zwe=Il("nodejs.webstream.isClosedPromise"),Hwe=Il("nodejs.webstream.controllerErrorFunction");function Bv(t,e=!1){var r;return!!(t&&typeof t.pipe=="function"&&typeof t.on=="function"&&(!e||typeof t.pause=="function"&&typeof t.resume=="function")&&(!t._writableState||((r=t._readableState)===null||r===void 0?void 0:r.readable)!==!1)&&(!t._writableState||t._readableState))}function Uv(t){var e;return!!(t&&typeof t.write=="function"&&typeof t.on=="function"&&(!t._readableState||((e=t._writableState)===null||e===void 0?void 0:e.writable)!==!1))}function Vwe(t){return!!(t&&typeof t.pipe=="function"&&t._readableState&&typeof t.on=="function"&&typeof t.write=="function")}function so(t){return t&&(t._readableState||t._writableState||typeof t.write=="function"&&typeof t.on=="function"||typeof t.pipe=="function"&&typeof t.on=="function")}function u7(t){return!!(t&&!so(t)&&typeof t.pipeThrough=="function"&&typeof t.getReader=="function"&&typeof t.cancel=="function")}function d7(t){return!!(t&&!so(t)&&typeof t.getWriter=="function"&&typeof t.abort=="function")}function f7(t){return!!(t&&!so(t)&&typeof t.readable=="object"&&typeof t.writable=="object")}function Gwe(t){return u7(t)||d7(t)||f7(t)}function Wwe(t,e){return t==null?!1:e===!0?typeof t[o7]=="function":e===!1?typeof t[a7]=="function":typeof t[o7]=="function"||typeof t[a7]=="function"}function qv(t){if(!so(t))return null;let e=t._writableState,r=t._readableState,n=e||r;return!!(t.destroyed||t[s7]||n!=null&&n.destroyed)}function p7(t){if(!Uv(t))return null;if(t.writableEnded===!0)return!0;let e=t._writableState;return e!=null&&e.errored?!1:typeof(e==null?void 0:e.ended)!="boolean"?null:e.ended}function Jwe(t,e){if(!Uv(t))return null;if(t.writableFinished===!0)return!0;let r=t._writableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.finished)!="boolean"?null:!!(r.finished||e===!1&&r.ended===!0&&r.length===0)}function Kwe(t){if(!Bv(t))return null;if(t.readableEnded===!0)return!0;let e=t._readableState;return!e||e.errored?!1:typeof(e==null?void 0:e.ended)!="boolean"?null:e.ended}function h7(t,e){if(!Bv(t))return null;let r=t._readableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.endEmitted)!="boolean"?null:!!(r.endEmitted||e===!1&&r.ended===!0&&r.length===0)}function m7(t){return t&&t[Bk]!=null?t[Bk]:typeof(t==null?void 0:t.readable)!="boolean"?null:qv(t)?!1:Bv(t)&&t.readable&&!h7(t)}function g7(t){return t&&t[Uk]!=null?t[Uk]:typeof(t==null?void 0:t.writable)!="boolean"?null:qv(t)?!1:Uv(t)&&t.writable&&!p7(t)}function Ywe(t,e){return so(t)?qv(t)?!0:!((e==null?void 0:e.readable)!==!1&&m7(t)||(e==null?void 0:e.writable)!==!1&&g7(t)):null}function Xwe(t){var e,r;return so(t)?t.writableErrored?t.writableErrored:(e=(r=t._writableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function Qwe(t){var e,r;return so(t)?t.readableErrored?t.readableErrored:(e=(r=t._readableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function exe(t){if(!so(t))return null;if(typeof t.closed=="boolean")return t.closed;let e=t._writableState,r=t._readableState;return typeof(e==null?void 0:e.closed)=="boolean"||typeof(r==null?void 0:r.closed)=="boolean"?(e==null?void 0:e.closed)||(r==null?void 0:r.closed):typeof t._closed=="boolean"&&y7(t)?t._closed:null}function y7(t){return typeof t._closed=="boolean"&&typeof t._defaultKeepAlive=="boolean"&&typeof t._removedConnection=="boolean"&&typeof t._removedContLen=="boolean"}function _7(t){return typeof t._sent100=="boolean"&&y7(t)}function txe(t){var e;return typeof t._consuming=="boolean"&&typeof t._dumped=="boolean"&&((e=t.req)===null||e===void 0?void 0:e.upgradeOrConnect)===void 0}function rxe(t){if(!so(t))return null;let e=t._writableState,r=t._readableState,n=e||r;return!n&&_7(t)||!!(n&&n.autoDestroy&&n.emitClose&&n.closed===!1)}function nxe(t){var e;return!!(t&&((e=t[c7])!==null&&e!==void 0?e:t.readableDidRead||t.readableAborted))}function ixe(t){var e,r,n,i,o,a,s,l,c,u;return!!(t&&((e=(r=(n=(i=(o=(a=t[l7])!==null&&a!==void 0?a:t.readableErrored)!==null&&o!==void 0?o:t.writableErrored)!==null&&i!==void 0?i:(s=t._readableState)===null||s===void 0?void 0:s.errorEmitted)!==null&&n!==void 0?n:(l=t._writableState)===null||l===void 0?void 0:l.errorEmitted)!==null&&r!==void 0?r:(c=t._readableState)===null||c===void 0?void 0:c.errored)!==null&&e!==void 0?e:!((u=t._writableState)===null||u===void 0)&&u.errored))}v7.exports={isDestroyed:qv,kIsDestroyed:s7,isDisturbed:nxe,kIsDisturbed:c7,isErrored:ixe,kIsErrored:l7,isReadable:m7,kIsReadable:Bk,kIsClosedPromise:Zwe,kControllerErrorFunction:Hwe,kIsWritable:Uk,isClosed:exe,isDuplexNodeStream:Vwe,isFinished:Ywe,isIterable:Wwe,isReadableNodeStream:Bv,isReadableStream:u7,isReadableEnded:Kwe,isReadableFinished:h7,isReadableErrored:Qwe,isNodeStream:so,isWebStream:Gwe,isWritable:g7,isWritableNodeStream:Uv,isWritableStream:d7,isWritableEnded:p7,isWritableFinished:Jwe,isWritableErrored:Xwe,isServerRequest:txe,isServerResponse:_7,willEmitClose:rxe,isTransformStream:f7}});var Yo=b((X5e,Gk)=>{"use strict";var as=os(),{AbortError:T7,codes:oxe}=Ur(),{ERR_INVALID_ARG_TYPE:axe,ERR_STREAM_PREMATURE_CLOSE:b7}=oxe,{kEmptyObject:Zk,once:Hk}=sn(),{validateAbortSignal:sxe,validateFunction:lxe,validateObject:cxe,validateBoolean:uxe}=Fu(),{Promise:dxe,PromisePrototypeThen:fxe,SymbolDispose:A7}=Ht(),{isClosed:pxe,isReadable:w7,isReadableNodeStream:qk,isReadableStream:hxe,isReadableFinished:x7,isReadableErrored:S7,isWritable:E7,isWritableNodeStream:I7,isWritableStream:mxe,isWritableFinished:$7,isWritableErrored:P7,isNodeStream:gxe,willEmitClose:yxe,kIsClosedPromise:_xe}=lo(),Bu;function vxe(t){return t.setHeader&&typeof t.abort=="function"}var Vk=()=>{};function k7(t,e,r){var n,i;if(arguments.length===2?(r=e,e=Zk):e==null?e=Zk:cxe(e,"options"),lxe(r,"callback"),sxe(e.signal,"options.signal"),r=Hk(r),hxe(t)||mxe(t))return bxe(t,e,r);if(!gxe(t))throw new axe("stream",["ReadableStream","WritableStream","Stream"],t);let o=(n=e.readable)!==null&&n!==void 0?n:qk(t),a=(i=e.writable)!==null&&i!==void 0?i:I7(t),s=t._writableState,l=t._readableState,c=()=>{t.writable||f()},u=yxe(t)&&qk(t)===o&&I7(t)===a,d=$7(t,!1),f=()=>{d=!0,t.destroyed&&(u=!1),!(u&&(!t.readable||o))&&(!o||p)&&r.call(t)},p=x7(t,!1),h=()=>{p=!0,t.destroyed&&(u=!1),!(u&&(!t.writable||a))&&(!a||d)&&r.call(t)},m=w=>{r.call(t,w)},y=pxe(t),g=()=>{y=!0;let w=P7(t)||S7(t);if(w&&typeof w!="boolean")return r.call(t,w);if(o&&!p&&qk(t,!0)&&!x7(t,!1))return r.call(t,new b7);if(a&&!d&&!$7(t,!1))return r.call(t,new b7);r.call(t)},v=()=>{y=!0;let w=P7(t)||S7(t);if(w&&typeof w!="boolean")return r.call(t,w);r.call(t)},E=()=>{t.req.on("finish",f)};vxe(t)?(t.on("complete",f),u||t.on("abort",g),t.req?E():t.on("request",E)):a&&!s&&(t.on("end",c),t.on("close",c)),!u&&typeof t.aborted=="boolean"&&t.on("aborted",g),t.on("end",h),t.on("finish",f),e.error!==!1&&t.on("error",m),t.on("close",g),y?as.nextTick(g):s!=null&&s.errorEmitted||l!=null&&l.errorEmitted?u||as.nextTick(v):(!o&&(!u||w7(t))&&(d||E7(t)===!1)||!a&&(!u||E7(t))&&(p||w7(t)===!1)||l&&t.req&&t.aborted)&&as.nextTick(v);let x=()=>{r=Vk,t.removeListener("aborted",g),t.removeListener("complete",f),t.removeListener("abort",g),t.removeListener("request",E),t.req&&t.req.removeListener("finish",f),t.removeListener("end",c),t.removeListener("close",c),t.removeListener("finish",f),t.removeListener("end",h),t.removeListener("error",m),t.removeListener("close",g)};if(e.signal&&!y){let w=()=>{let k=r;x(),k.call(t,new T7(void 0,{cause:e.signal.reason}))};if(e.signal.aborted)as.nextTick(w);else{Bu=Bu||sn().addAbortListener;let k=Bu(e.signal,w),P=r;r=Hk((...R)=>{k[A7](),P.apply(t,R)})}}return x}function bxe(t,e,r){let n=!1,i=Vk;if(e.signal)if(i=()=>{n=!0,r.call(t,new T7(void 0,{cause:e.signal.reason}))},e.signal.aborted)as.nextTick(i);else{Bu=Bu||sn().addAbortListener;let a=Bu(e.signal,i),s=r;r=Hk((...l)=>{a[A7](),s.apply(t,l)})}let o=(...a)=>{n||as.nextTick(()=>r.apply(t,a))};return fxe(t[_xe].promise,o,o),Vk}function wxe(t,e){var r;let n=!1;return e===null&&(e=Zk),(r=e)!==null&&r!==void 0&&r.cleanup&&(uxe(e.cleanup,"cleanup"),n=e.cleanup),new dxe((i,o)=>{let a=k7(t,e,s=>{n&&a(),s?o(s):i()})})}Gk.exports=k7;Gk.exports.finished=wxe});var $l=b((Q5e,z7)=>{"use strict";var co=os(),{aggregateTwoErrors:xxe,codes:{ERR_MULTIPLE_CALLBACK:Sxe},AbortError:Exe}=Ur(),{Symbol:D7}=Ht(),{kIsDestroyed:Ixe,isDestroyed:$xe,isFinished:Pxe,isServerRequest:Txe}=lo(),O7=D7("kDestroy"),Wk=D7("kConstruct");function M7(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t))}function Axe(t,e){let r=this._readableState,n=this._writableState,i=n||r;return n!=null&&n.destroyed||r!=null&&r.destroyed?(typeof e=="function"&&e(),this):(M7(t,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),i.constructed?C7(this,t,e):this.once(O7,function(o){C7(this,xxe(o,t),e)}),this)}function C7(t,e,r){let n=!1;function i(o){if(n)return;n=!0;let a=t._readableState,s=t._writableState;M7(o,s,a),s&&(s.closed=!0),a&&(a.closed=!0),typeof r=="function"&&r(o),o?co.nextTick(kxe,t,o):co.nextTick(N7,t)}try{t._destroy(e||null,i)}catch(o){i(o)}}function kxe(t,e){Jk(t,e),N7(t)}function N7(t){let e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(r!=null&&r.emitClose||e!=null&&e.emitClose)&&t.emit("close")}function Jk(t,e){let r=t._readableState,n=t._writableState;n!=null&&n.errorEmitted||r!=null&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit("error",e))}function Cxe(){let t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=t.readable===!1,t.endEmitted=t.readable===!1),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=e.writable===!1,e.ending=e.writable===!1,e.finished=e.writable===!1)}function Kk(t,e,r){let n=t._readableState,i=t._writableState;if(i!=null&&i.destroyed||n!=null&&n.destroyed)return this;n!=null&&n.autoDestroy||i!=null&&i.autoDestroy?t.destroy(e):e&&(e.stack,i&&!i.errored&&(i.errored=e),n&&!n.errored&&(n.errored=e),r?co.nextTick(Jk,t,e):Jk(t,e))}function Rxe(t,e){if(typeof t._construct!="function")return;let r=t._readableState,n=t._writableState;r&&(r.constructed=!1),n&&(n.constructed=!1),t.once(Wk,e),!(t.listenerCount(Wk)>1)&&co.nextTick(Dxe,t)}function Dxe(t){let e=!1;function r(n){if(e){Kk(t,n??new Sxe);return}e=!0;let i=t._readableState,o=t._writableState,a=o||i;i&&(i.constructed=!0),o&&(o.constructed=!0),a.destroyed?t.emit(O7,n):n?Kk(t,n,!0):co.nextTick(Oxe,t)}try{t._construct(n=>{co.nextTick(r,n)})}catch(n){co.nextTick(r,n)}}function Oxe(t){t.emit(Wk)}function R7(t){return(t==null?void 0:t.setHeader)&&typeof t.abort=="function"}function j7(t){t.emit("close")}function Mxe(t,e){t.emit("error",e),co.nextTick(j7,t)}function Nxe(t,e){!t||$xe(t)||(!e&&!Pxe(t)&&(e=new Exe),Txe(t)?(t.socket=null,t.destroy(e)):R7(t)?t.abort():R7(t.req)?t.req.abort():typeof t.destroy=="function"?t.destroy(e):typeof t.close=="function"?t.close():e?co.nextTick(Mxe,t,e):co.nextTick(j7,t),t.destroyed||(t[Ixe]=!0))}z7.exports={construct:Rxe,destroyer:Nxe,destroy:Axe,undestroy:Cxe,errorOrDestroy:Kk}});var Vv=b((e9e,F7)=>{"use strict";var{ArrayIsArray:jxe,ObjectSetPrototypeOf:L7}=Ht(),{EventEmitter:Zv}=Q("events");function Hv(t){Zv.call(this,t)}L7(Hv.prototype,Zv.prototype);L7(Hv,Zv);Hv.prototype.pipe=function(t,e){let r=this;function n(u){t.writable&&t.write(u)===!1&&r.pause&&r.pause()}r.on("data",n);function i(){r.readable&&r.resume&&r.resume()}t.on("drain",i),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",a),r.on("close",s));let o=!1;function a(){o||(o=!0,t.end())}function s(){o||(o=!0,typeof t.destroy=="function"&&t.destroy())}function l(u){c(),Zv.listenerCount(this,"error")===0&&this.emit("error",u)}Yk(r,"error",l),Yk(t,"error",l);function c(){r.removeListener("data",n),t.removeListener("drain",i),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",l),t.removeListener("error",l),r.removeListener("end",c),r.removeListener("close",c),t.removeListener("close",c)}return r.on("end",c),r.on("close",c),t.on("close",c),t.emit("pipe",r),t};function Yk(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):jxe(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}F7.exports={Stream:Hv,prependListener:Yk}});var Bh=b((t9e,Gv)=>{"use strict";var{SymbolDispose:zxe}=Ht(),{AbortError:B7,codes:Lxe}=Ur(),{isNodeStream:U7,isWebStream:Fxe,kControllerErrorFunction:Bxe}=lo(),Uxe=Yo(),{ERR_INVALID_ARG_TYPE:q7}=Lxe,Xk,qxe=(t,e)=>{if(typeof t!="object"||!("aborted"in t))throw new q7(e,"AbortSignal",t)};Gv.exports.addAbortSignal=function(e,r){if(qxe(e,"signal"),!U7(r)&&!Fxe(r))throw new q7("stream",["ReadableStream","WritableStream","Stream"],r);return Gv.exports.addAbortSignalNoValidate(e,r)};Gv.exports.addAbortSignalNoValidate=function(t,e){if(typeof t!="object"||!("aborted"in t))return e;let r=U7(e)?()=>{e.destroy(new B7(void 0,{cause:t.reason}))}:()=>{e[Bxe](new B7(void 0,{cause:t.reason}))};if(t.aborted)r();else{Xk=Xk||sn().addAbortListener;let n=Xk(t,r);Uxe(e,n[zxe])}return e}});var V7=b((n9e,H7)=>{"use strict";var{StringPrototypeSlice:Z7,SymbolIterator:Zxe,TypedArrayPrototypeSet:Wv,Uint8Array:Hxe}=Ht(),{Buffer:Qk}=Q("buffer"),{inspect:Vxe}=sn();H7.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){let r={data:e,next:null};this.length>0?this.tail.next=r:this.head=r,this.tail=r,++this.length}unshift(e){let r={data:e,next:this.head};this.length===0&&(this.tail=r),this.head=r,++this.length}shift(){if(this.length===0)return;let e=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(this.length===0)return"";let r=this.head,n=""+r.data;for(;(r=r.next)!==null;)n+=e+r.data;return n}concat(e){if(this.length===0)return Qk.alloc(0);let r=Qk.allocUnsafe(e>>>0),n=this.head,i=0;for(;n;)Wv(r,n.data,i),i+=n.data.length,n=n.next;return r}consume(e,r){let n=this.head.data;if(e<n.length){let i=n.slice(0,e);return this.head.data=n.slice(e),i}return e===n.length?this.shift():r?this._getString(e):this._getBuffer(e)}first(){return this.head.data}*[Zxe](){for(let e=this.head;e;e=e.next)yield e.data}_getString(e){let r="",n=this.head,i=0;do{let o=n.data;if(e>o.length)r+=o,e-=o.length;else{e===o.length?(r+=o,++i,n.next?this.head=n.next:this.head=this.tail=null):(r+=Z7(o,0,e),this.head=n,n.data=Z7(o,e));break}++i}while((n=n.next)!==null);return this.length-=i,r}_getBuffer(e){let r=Qk.allocUnsafe(e),n=e,i=this.head,o=0;do{let a=i.data;if(e>a.length)Wv(r,a,n-e),e-=a.length;else{e===a.length?(Wv(r,a,n-e),++o,i.next?this.head=i.next:this.head=this.tail=null):(Wv(r,new Hxe(a.buffer,a.byteOffset,e),n-e),this.head=i,i.data=a.slice(e));break}++o}while((i=i.next)!==null);return this.length-=o,r}[Symbol.for("nodejs.util.inspect.custom")](e,r){return Vxe(this,{...r,depth:0,customInspect:!1})}}});var Uh=b((i9e,K7)=>{"use strict";var{MathFloor:Gxe,NumberIsInteger:Wxe}=Ht(),{validateInteger:Jxe}=Fu(),{ERR_INVALID_ARG_VALUE:Kxe}=Ur().codes,G7=16*1024,W7=16;function Yxe(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function J7(t){return t?W7:G7}function Xxe(t,e){Jxe(e,"value",0),t?W7=e:G7=e}function Qxe(t,e,r,n){let i=Yxe(e,n,r);if(i!=null){if(!Wxe(i)||i<0){let o=n?`options.${r}`:"options.highWaterMark";throw new Kxe(o,i)}return Gxe(i)}return J7(t.objectMode)}K7.exports={getHighWaterMark:Qxe,getDefaultHighWaterMark:J7,setDefaultHighWaterMark:Xxe}});var Q7=b((eC,X7)=>{var Jv=Q("buffer"),uo=Jv.Buffer;function Y7(t,e){for(var r in t)e[r]=t[r]}uo.from&&uo.alloc&&uo.allocUnsafe&&uo.allocUnsafeSlow?X7.exports=Jv:(Y7(Jv,eC),eC.Buffer=Pl);function Pl(t,e,r){return uo(t,e,r)}Pl.prototype=Object.create(uo.prototype);Y7(uo,Pl);Pl.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return uo(t,e,r)};Pl.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=uo(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};Pl.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return uo(t)};Pl.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Jv.SlowBuffer(t)}});var rZ=b(tZ=>{"use strict";var rC=Q7().Buffer,eZ=rC.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function eSe(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function tSe(t){var e=eSe(t);if(typeof e!="string"&&(rC.isEncoding===eZ||!eZ(t)))throw new Error("Unknown encoding: "+t);return e||t}tZ.StringDecoder=qh;function qh(t){this.encoding=tSe(t);var e;switch(this.encoding){case"utf16le":this.text=sSe,this.end=lSe,e=4;break;case"utf8":this.fillLast=iSe,e=4;break;case"base64":this.text=cSe,this.end=uSe,e=3;break;default:this.write=dSe,this.end=fSe;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=rC.allocUnsafe(e)}qh.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};qh.prototype.end=aSe;qh.prototype.text=oSe;qh.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function tC(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function rSe(t,e,r){var n=e.length-1;if(n<r)return 0;var i=tC(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=tC(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=tC(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function nSe(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"�"}}function iSe(t){var e=this.lastTotal-this.lastNeed,r=nSe(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function oSe(t,e){var r=rSe(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function aSe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function sSe(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function lSe(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function cSe(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function uSe(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function dSe(t){return t.toString(this.encoding)}function fSe(t){return t&&t.length?this.write(t):""}});var nC=b((a9e,aZ)=>{"use strict";var nZ=os(),{PromisePrototypeThen:pSe,SymbolAsyncIterator:iZ,SymbolIterator:oZ}=Ht(),{Buffer:hSe}=Q("buffer"),{ERR_INVALID_ARG_TYPE:mSe,ERR_STREAM_NULL_VALUES:gSe}=Ur().codes;function ySe(t,e,r){let n;if(typeof e=="string"||e instanceof hSe)return new t({objectMode:!0,...r,read(){this.push(e),this.push(null)}});let i;if(e&&e[iZ])i=!0,n=e[iZ]();else if(e&&e[oZ])i=!1,n=e[oZ]();else throw new mSe("iterable",["Iterable"],e);let o=new t({objectMode:!0,highWaterMark:1,...r}),a=!1;o._read=function(){a||(a=!0,l())},o._destroy=function(c,u){pSe(s(c),()=>nZ.nextTick(u,c),d=>nZ.nextTick(u,d||c))};async function s(c){let u=c!=null,d=typeof n.throw=="function";if(u&&d){let{value:f,done:p}=await n.throw(c);if(await f,p)return}if(typeof n.return=="function"){let{value:f}=await n.return();await f}}async function l(){for(;;){try{let{value:c,done:u}=i?await n.next():n.next();if(u)o.push(null);else{let d=c&&typeof c.then=="function"?await c:c;if(d===null)throw a=!1,new gSe;if(o.push(d))continue;a=!1}}catch(c){o.destroy(c)}break}}return o}aZ.exports=ySe});var Hh=b((s9e,EZ)=>{"use strict";var Oi=os(),{ArrayPrototypeIndexOf:_Se,NumberIsInteger:vSe,NumberIsNaN:bSe,NumberParseInt:wSe,ObjectDefineProperties:dC,ObjectKeys:xSe,ObjectSetPrototypeOf:cZ,Promise:uZ,SafeSet:SSe,SymbolAsyncDispose:ESe,SymbolAsyncIterator:ISe,Symbol:$Se}=Ht();EZ.exports=je;je.ReadableState=Qv;var{EventEmitter:PSe}=Q("events"),{Stream:ss,prependListener:TSe}=Vv(),{Buffer:iC}=Q("buffer"),{addAbortSignal:ASe}=Bh(),dZ=Yo(),Je=sn().debuglog("stream",t=>{Je=t}),kSe=V7(),Zu=$l(),{getHighWaterMark:CSe,getDefaultHighWaterMark:RSe}=Uh(),{aggregateTwoErrors:sZ,codes:{ERR_INVALID_ARG_TYPE:DSe,ERR_METHOD_NOT_IMPLEMENTED:OSe,ERR_OUT_OF_RANGE:MSe,ERR_STREAM_PUSH_AFTER_EOF:NSe,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:jSe},AbortError:zSe}=Ur(),{validateObject:LSe}=Fu(),Tl=$Se("kPaused"),{StringDecoder:fZ}=rZ(),FSe=nC();cZ(je.prototype,ss.prototype);cZ(je,ss);var oC=()=>{},{errorOrDestroy:Uu}=Zu,qu=1,BSe=2,pZ=4,Zh=8,hZ=16,Kv=32,Yv=64,mZ=128,USe=256,qSe=512,ZSe=1024,cC=2048,uC=4096,HSe=8192,VSe=16384,GSe=32768,gZ=65536,WSe=1<<17,JSe=1<<18;function sr(t){return{enumerable:!1,get(){return(this.state&t)!==0},set(e){e?this.state|=t:this.state&=~t}}}dC(Qv.prototype,{objectMode:sr(qu),ended:sr(BSe),endEmitted:sr(pZ),reading:sr(Zh),constructed:sr(hZ),sync:sr(Kv),needReadable:sr(Yv),emittedReadable:sr(mZ),readableListening:sr(USe),resumeScheduled:sr(qSe),errorEmitted:sr(ZSe),emitClose:sr(cC),autoDestroy:sr(uC),destroyed:sr(HSe),closed:sr(VSe),closeEmitted:sr(GSe),multiAwaitDrain:sr(gZ),readingMore:sr(WSe),dataEmitted:sr(JSe)});function Qv(t,e,r){typeof r!="boolean"&&(r=e instanceof fo()),this.state=cC|uC|hZ|Kv,t&&t.objectMode&&(this.state|=qu),r&&t&&t.readableObjectMode&&(this.state|=qu),this.highWaterMark=t?CSe(this,t,"readableHighWaterMark",r):RSe(!1),this.buffer=new kSe,this.length=0,this.pipes=[],this.flowing=null,this[Tl]=null,t&&t.emitClose===!1&&(this.state&=~cC),t&&t.autoDestroy===!1&&(this.state&=~uC),this.errored=null,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,t&&t.encoding&&(this.decoder=new fZ(t.encoding),this.encoding=t.encoding)}function je(t){if(!(this instanceof je))return new je(t);let e=this instanceof fo();this._readableState=new Qv(t,this,e),t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.construct=="function"&&(this._construct=t.construct),t.signal&&!e&&ASe(t.signal,this)),ss.call(this,t),Zu.construct(this,()=>{this._readableState.needReadable&&Xv(this,this._readableState)})}je.prototype.destroy=Zu.destroy;je.prototype._undestroy=Zu.undestroy;je.prototype._destroy=function(t,e){e(t)};je.prototype[PSe.captureRejectionSymbol]=function(t){this.destroy(t)};je.prototype[ESe]=function(){let t;return this.destroyed||(t=this.readableEnded?null:new zSe,this.destroy(t)),new uZ((e,r)=>dZ(this,n=>n&&n!==t?r(n):e(null)))};je.prototype.push=function(t,e){return yZ(this,t,e,!1)};je.prototype.unshift=function(t,e){return yZ(this,t,e,!0)};function yZ(t,e,r,n){Je("readableAddChunk",e);let i=t._readableState,o;if((i.state&qu)===0&&(typeof e=="string"?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?e=iC.from(e,r).toString(i.encoding):(e=iC.from(e,r),r=""))):e instanceof iC?r="":ss._isUint8Array(e)?(e=ss._uint8ArrayToBuffer(e),r=""):e!=null&&(o=new DSe("chunk",["string","Buffer","Uint8Array"],e))),o)Uu(t,o);else if(e===null)i.state&=~Zh,XSe(t,i);else if((i.state&qu)!==0||e&&e.length>0)if(n)if((i.state&pZ)!==0)Uu(t,new jSe);else{if(i.destroyed||i.errored)return!1;aC(t,i,e,!0)}else if(i.ended)Uu(t,new NSe);else{if(i.destroyed||i.errored)return!1;i.state&=~Zh,i.decoder&&!r?(e=i.decoder.write(e),i.objectMode||e.length!==0?aC(t,i,e,!1):Xv(t,i)):aC(t,i,e,!1)}else n||(i.state&=~Zh,Xv(t,i));return!i.ended&&(i.length<i.highWaterMark||i.length===0)}function aC(t,e,r,n){e.flowing&&e.length===0&&!e.sync&&t.listenerCount("data")>0?((e.state&gZ)!==0?e.awaitDrainWriters.clear():e.awaitDrainWriters=null,e.dataEmitted=!0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),(e.state&Yv)!==0&&eb(t)),Xv(t,e)}je.prototype.isPaused=function(){let t=this._readableState;return t[Tl]===!0||t.flowing===!1};je.prototype.setEncoding=function(t){let e=new fZ(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;let r=this._readableState.buffer,n="";for(let i of r)n+=e.write(i);return r.clear(),n!==""&&r.push(n),this._readableState.length=n.length,this};var KSe=1073741824;function YSe(t){if(t>KSe)throw new MSe("size","<= 1GiB",t);return t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++,t}function lZ(t,e){return t<=0||e.length===0&&e.ended?0:(e.state&qu)!==0?1:bSe(t)?e.flowing&&e.length?e.buffer.first().length:e.length:t<=e.length?t:e.ended?e.length:0}je.prototype.read=function(t){Je("read",t),t===void 0?t=NaN:vSe(t)||(t=wSe(t,10));let e=this._readableState,r=t;if(t>e.highWaterMark&&(e.highWaterMark=YSe(t)),t!==0&&(e.state&=~mZ),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Je("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?sC(this):eb(this),null;if(t=lZ(t,e),t===0&&e.ended)return e.length===0&&sC(this),null;let n=(e.state&Yv)!==0;if(Je("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,Je("length less than watermark",n)),e.ended||e.reading||e.destroyed||e.errored||!e.constructed)n=!1,Je("reading, ended or constructing",n);else if(n){Je("do read"),e.state|=Zh|Kv,e.length===0&&(e.state|=Yv);try{this._read(e.highWaterMark)}catch(o){Uu(this,o)}e.state&=~Kv,e.reading||(t=lZ(r,e))}let i;return t>0?i=xZ(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.multiAwaitDrain?e.awaitDrainWriters.clear():e.awaitDrainWriters=null),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&sC(this)),i!==null&&!e.errorEmitted&&!e.closeEmitted&&(e.dataEmitted=!0,this.emit("data",i)),i};function XSe(t,e){if(Je("onEofChunk"),!e.ended){if(e.decoder){let r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?eb(t):(e.needReadable=!1,e.emittedReadable=!0,_Z(t))}}function eb(t){let e=t._readableState;Je("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Je("emitReadable",e.flowing),e.emittedReadable=!0,Oi.nextTick(_Z,t))}function _Z(t){let e=t._readableState;Je("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&!e.errored&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,bZ(t)}function Xv(t,e){!e.readingMore&&e.constructed&&(e.readingMore=!0,Oi.nextTick(QSe,t,e))}function QSe(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){let r=e.length;if(Je("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}je.prototype._read=function(t){throw new OSe("_read()")};je.prototype.pipe=function(t,e){let r=this,n=this._readableState;n.pipes.length===1&&(n.multiAwaitDrain||(n.multiAwaitDrain=!0,n.awaitDrainWriters=new SSe(n.awaitDrainWriters?[n.awaitDrainWriters]:[]))),n.pipes.push(t),Je("pipe count=%d opts=%j",n.pipes.length,e);let o=(!e||e.end!==!1)&&t!==Oi.stdout&&t!==Oi.stderr?s:y;n.endEmitted?Oi.nextTick(o):r.once("end",o),t.on("unpipe",a);function a(g,v){Je("onunpipe"),g===r&&v&&v.hasUnpiped===!1&&(v.hasUnpiped=!0,u())}function s(){Je("onend"),t.end()}let l,c=!1;function u(){Je("cleanup"),t.removeListener("close",h),t.removeListener("finish",m),l&&t.removeListener("drain",l),t.removeListener("error",p),t.removeListener("unpipe",a),r.removeListener("end",s),r.removeListener("end",y),r.removeListener("data",f),c=!0,l&&n.awaitDrainWriters&&(!t._writableState||t._writableState.needDrain)&&l()}function d(){c||(n.pipes.length===1&&n.pipes[0]===t?(Je("false write response, pause",0),n.awaitDrainWriters=t,n.multiAwaitDrain=!1):n.pipes.length>1&&n.pipes.includes(t)&&(Je("false write response, pause",n.awaitDrainWriters.size),n.awaitDrainWriters.add(t)),r.pause()),l||(l=eEe(r,t),t.on("drain",l))}r.on("data",f);function f(g){Je("ondata");let v=t.write(g);Je("dest.write",v),v===!1&&d()}function p(g){if(Je("onerror",g),y(),t.removeListener("error",p),t.listenerCount("error")===0){let v=t._writableState||t._readableState;v&&!v.errorEmitted?Uu(t,g):t.emit("error",g)}}TSe(t,"error",p);function h(){t.removeListener("finish",m),y()}t.once("close",h);function m(){Je("onfinish"),t.removeListener("close",h),y()}t.once("finish",m);function y(){Je("unpipe"),r.unpipe(t)}return t.emit("pipe",r),t.writableNeedDrain===!0?d():n.flowing||(Je("pipe resume"),r.resume()),t};function eEe(t,e){return function(){let n=t._readableState;n.awaitDrainWriters===e?(Je("pipeOnDrain",1),n.awaitDrainWriters=null):n.multiAwaitDrain&&(Je("pipeOnDrain",n.awaitDrainWriters.size),n.awaitDrainWriters.delete(e)),(!n.awaitDrainWriters||n.awaitDrainWriters.size===0)&&t.listenerCount("data")&&t.resume()}}je.prototype.unpipe=function(t){let e=this._readableState,r={hasUnpiped:!1};if(e.pipes.length===0)return this;if(!t){let i=e.pipes;e.pipes=[],this.pause();for(let o=0;o<i.length;o++)i[o].emit("unpipe",this,{hasUnpiped:!1});return this}let n=_Se(e.pipes,t);return n===-1?this:(e.pipes.splice(n,1),e.pipes.length===0&&this.pause(),t.emit("unpipe",this,r),this)};je.prototype.on=function(t,e){let r=ss.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,Je("on readable",n.length,n.reading),n.length?eb(this):n.reading||Oi.nextTick(tEe,this)),r};je.prototype.addListener=je.prototype.on;je.prototype.removeListener=function(t,e){let r=ss.prototype.removeListener.call(this,t,e);return t==="readable"&&Oi.nextTick(vZ,this),r};je.prototype.off=je.prototype.removeListener;je.prototype.removeAllListeners=function(t){let e=ss.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&Oi.nextTick(vZ,this),e};function vZ(t){let e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&e[Tl]===!1?e.flowing=!0:t.listenerCount("data")>0?t.resume():e.readableListening||(e.flowing=null)}function tEe(t){Je("readable nexttick read 0"),t.read(0)}je.prototype.resume=function(){let t=this._readableState;return t.flowing||(Je("resume"),t.flowing=!t.readableListening,rEe(this,t)),t[Tl]=!1,this};function rEe(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Oi.nextTick(nEe,t,e))}function nEe(t,e){Je("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),bZ(t),e.flowing&&!e.reading&&t.read(0)}je.prototype.pause=function(){return Je("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Je("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[Tl]=!0,this};function bZ(t){let e=t._readableState;for(Je("flow",e.flowing);e.flowing&&t.read()!==null;);}je.prototype.wrap=function(t){let e=!1;t.on("data",n=>{!this.push(n)&&t.pause&&(e=!0,t.pause())}),t.on("end",()=>{this.push(null)}),t.on("error",n=>{Uu(this,n)}),t.on("close",()=>{this.destroy()}),t.on("destroy",()=>{this.destroy()}),this._read=()=>{e&&t.resume&&(e=!1,t.resume())};let r=xSe(t);for(let n=1;n<r.length;n++){let i=r[n];this[i]===void 0&&typeof t[i]=="function"&&(this[i]=t[i].bind(t))}return this};je.prototype[ISe]=function(){return wZ(this)};je.prototype.iterator=function(t){return t!==void 0&&LSe(t,"options"),wZ(this,t)};function wZ(t,e){typeof t.read!="function"&&(t=je.wrap(t,{objectMode:!0}));let r=iEe(t,e);return r.stream=t,r}async function*iEe(t,e){let r=oC;function n(a){this===t?(r(),r=oC):r=a}t.on("readable",n);let i,o=dZ(t,{writable:!1},a=>{i=a?sZ(i,a):null,r(),r=oC});try{for(;;){let a=t.destroyed?null:t.read();if(a!==null)yield a;else{if(i)throw i;if(i===null)return;await new uZ(n)}}}catch(a){throw i=sZ(i,a),i}finally{(i||(e==null?void 0:e.destroyOnReturn)!==!1)&&(i===void 0||t._readableState.autoDestroy)?Zu.destroyer(t,null):(t.off("readable",n),o())}}dC(je.prototype,{readable:{__proto__:null,get(){let t=this._readableState;return!!t&&t.readable!==!1&&!t.destroyed&&!t.errorEmitted&&!t.endEmitted},set(t){this._readableState&&(this._readableState.readable=!!t)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(t){this._readableState&&(this._readableState.destroyed=t)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}});dC(Qv.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[Tl]!==!1},set(t){this[Tl]=!!t}}});je._fromList=xZ;function xZ(t,e){if(e.length===0)return null;let r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function sC(t){let e=t._readableState;Je("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,Oi.nextTick(oEe,e,t))}function oEe(t,e){if(Je("endReadableNT",t.endEmitted,t.length),!t.errored&&!t.closeEmitted&&!t.endEmitted&&t.length===0){if(t.endEmitted=!0,e.emit("end"),e.writable&&e.allowHalfOpen===!1)Oi.nextTick(aEe,e);else if(t.autoDestroy){let r=e._writableState;(!r||r.autoDestroy&&(r.finished||r.writable===!1))&&e.destroy()}}}function aEe(t){t.writable&&!t.writableEnded&&!t.destroyed&&t.end()}je.from=function(t,e){return FSe(je,t,e)};var lC;function SZ(){return lC===void 0&&(lC={}),lC}je.fromWeb=function(t,e){return SZ().newStreamReadableFromReadableStream(t,e)};je.toWeb=function(t,e){return SZ().newReadableStreamFromStreamReadable(t,e)};je.wrap=function(t,e){var r,n;return new je({objectMode:(r=(n=t.readableObjectMode)!==null&&n!==void 0?n:t.objectMode)!==null&&r!==void 0?r:!0,...e,destroy(i,o){Zu.destroyer(t,i),o(i)}}).wrap(t)}});var ob=b((l9e,NZ)=>{"use strict";var Al=os(),{ArrayPrototypeSlice:PZ,Error:sEe,FunctionPrototypeSymbolHasInstance:TZ,ObjectDefineProperty:AZ,ObjectDefineProperties:lEe,ObjectSetPrototypeOf:kZ,StringPrototypeToLowerCase:cEe,Symbol:uEe,SymbolHasInstance:dEe}=Ht();NZ.exports=Wt;Wt.WritableState=Wh;var{EventEmitter:fEe}=Q("events"),Vh=Vv().Stream,{Buffer:tb}=Q("buffer"),ib=$l(),{addAbortSignal:pEe}=Bh(),{getHighWaterMark:hEe,getDefaultHighWaterMark:mEe}=Uh(),{ERR_INVALID_ARG_TYPE:gEe,ERR_METHOD_NOT_IMPLEMENTED:yEe,ERR_MULTIPLE_CALLBACK:CZ,ERR_STREAM_CANNOT_PIPE:_Ee,ERR_STREAM_DESTROYED:Gh,ERR_STREAM_ALREADY_FINISHED:vEe,ERR_STREAM_NULL_VALUES:bEe,ERR_STREAM_WRITE_AFTER_END:wEe,ERR_UNKNOWN_ENCODING:RZ}=Ur().codes,{errorOrDestroy:Hu}=ib;kZ(Wt.prototype,Vh.prototype);kZ(Wt,Vh);function hC(){}var Vu=uEe("kOnFinished");function Wh(t,e,r){typeof r!="boolean"&&(r=e instanceof fo()),this.objectMode=!!(t&&t.objectMode),r&&(this.objectMode=this.objectMode||!!(t&&t.writableObjectMode)),this.highWaterMark=t?hEe(this,t,"writableHighWaterMark",r):mEe(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;let n=!!(t&&t.decodeStrings===!1);this.decodeStrings=!n,this.defaultEncoding=t&&t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=SEe.bind(void 0,e),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,nb(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!t||t.emitClose!==!1,this.autoDestroy=!t||t.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[Vu]=[]}function nb(t){t.buffered=[],t.bufferedIndex=0,t.allBuffers=!0,t.allNoop=!0}Wh.prototype.getBuffer=function(){return PZ(this.buffered,this.bufferedIndex)};AZ(Wh.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function Wt(t){let e=this instanceof fo();if(!e&&!TZ(Wt,this))return new Wt(t);this._writableState=new Wh(t,this,e),t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final),typeof t.construct=="function"&&(this._construct=t.construct),t.signal&&pEe(t.signal,this)),Vh.call(this,t),ib.construct(this,()=>{let r=this._writableState;r.writing||gC(this,r),yC(this,r)})}AZ(Wt,dEe,{__proto__:null,value:function(t){return TZ(this,t)?!0:this!==Wt?!1:t&&t._writableState instanceof Wh}});Wt.prototype.pipe=function(){Hu(this,new _Ee)};function DZ(t,e,r,n){let i=t._writableState;if(typeof r=="function")n=r,r=i.defaultEncoding;else{if(!r)r=i.defaultEncoding;else if(r!=="buffer"&&!tb.isEncoding(r))throw new RZ(r);typeof n!="function"&&(n=hC)}if(e===null)throw new bEe;if(!i.objectMode)if(typeof e=="string")i.decodeStrings!==!1&&(e=tb.from(e,r),r="buffer");else if(e instanceof tb)r="buffer";else if(Vh._isUint8Array(e))e=Vh._uint8ArrayToBuffer(e),r="buffer";else throw new gEe("chunk",["string","Buffer","Uint8Array"],e);let o;return i.ending?o=new wEe:i.destroyed&&(o=new Gh("write")),o?(Al.nextTick(n,o),Hu(t,o,!0),o):(i.pendingcb++,xEe(t,i,e,r,n))}Wt.prototype.write=function(t,e,r){return DZ(this,t,e,r)===!0};Wt.prototype.cork=function(){this._writableState.corked++};Wt.prototype.uncork=function(){let t=this._writableState;t.corked&&(t.corked--,t.writing||gC(this,t))};Wt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=cEe(e)),!tb.isEncoding(e))throw new RZ(e);return this._writableState.defaultEncoding=e,this};function xEe(t,e,r,n,i){let o=e.objectMode?1:r.length;e.length+=o;let a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked||e.errored||!e.constructed?(e.buffered.push({chunk:r,encoding:n,callback:i}),e.allBuffers&&n!=="buffer"&&(e.allBuffers=!1),e.allNoop&&i!==hC&&(e.allNoop=!1)):(e.writelen=o,e.writecb=i,e.writing=!0,e.sync=!0,t._write(r,n,e.onwrite),e.sync=!1),a&&!e.errored&&!e.destroyed}function IZ(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Gh("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function $Z(t,e,r,n){--e.pendingcb,n(r),mC(e),Hu(t,r)}function SEe(t,e){let r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function"){Hu(t,new CZ);return}r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,e?(e.stack,r.errored||(r.errored=e),t._readableState&&!t._readableState.errored&&(t._readableState.errored=e),n?Al.nextTick($Z,t,r,e,i):$Z(t,r,e,i)):(r.buffered.length>r.bufferedIndex&&gC(t,r),n?r.afterWriteTickInfo!==null&&r.afterWriteTickInfo.cb===i?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:i,stream:t,state:r},Al.nextTick(EEe,r.afterWriteTickInfo)):OZ(t,r,1,i))}function EEe({stream:t,state:e,count:r,cb:n}){return e.afterWriteTickInfo=null,OZ(t,e,r,n)}function OZ(t,e,r,n){for(!e.ending&&!t.destroyed&&e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));r-- >0;)e.pendingcb--,n();e.destroyed&&mC(e),yC(t,e)}function mC(t){if(t.writing)return;for(let i=t.bufferedIndex;i<t.buffered.length;++i){var e;let{chunk:o,callback:a}=t.buffered[i],s=t.objectMode?1:o.length;t.length-=s,a((e=t.errored)!==null&&e!==void 0?e:new Gh("write"))}let r=t[Vu].splice(0);for(let i=0;i<r.length;i++){var n;r[i]((n=t.errored)!==null&&n!==void 0?n:new Gh("end"))}nb(t)}function gC(t,e){if(e.corked||e.bufferProcessing||e.destroyed||!e.constructed)return;let{buffered:r,bufferedIndex:n,objectMode:i}=e,o=r.length-n;if(!o)return;let a=n;if(e.bufferProcessing=!0,o>1&&t._writev){e.pendingcb-=o-1;let s=e.allNoop?hC:c=>{for(let u=a;u<r.length;++u)r[u].callback(c)},l=e.allNoop&&a===0?r:PZ(r,a);l.allBuffers=e.allBuffers,IZ(t,e,!0,e.length,l,"",s),nb(e)}else{do{let{chunk:s,encoding:l,callback:c}=r[a];r[a++]=null;let u=i?1:s.length;IZ(t,e,!1,u,s,l,c)}while(a<r.length&&!e.writing);a===r.length?nb(e):a>256?(r.splice(0,a),e.bufferedIndex=0):e.bufferedIndex=a}e.bufferProcessing=!1}Wt.prototype._write=function(t,e,r){if(this._writev)this._writev([{chunk:t,encoding:e}],r);else throw new yEe("_write()")};Wt.prototype._writev=null;Wt.prototype.end=function(t,e,r){let n=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null);let i;if(t!=null){let o=DZ(this,t,e);o instanceof sEe&&(i=o)}return n.corked&&(n.corked=1,this.uncork()),i||(!n.errored&&!n.ending?(n.ending=!0,yC(this,n,!0),n.ended=!0):n.finished?i=new vEe("end"):n.destroyed&&(i=new Gh("end"))),typeof r=="function"&&(i||n.finished?Al.nextTick(r,i):n[Vu].push(r)),this};function rb(t){return t.ending&&!t.destroyed&&t.constructed&&t.length===0&&!t.errored&&t.buffered.length===0&&!t.finished&&!t.writing&&!t.errorEmitted&&!t.closeEmitted}function IEe(t,e){let r=!1;function n(i){if(r){Hu(t,i??CZ());return}if(r=!0,e.pendingcb--,i){let o=e[Vu].splice(0);for(let a=0;a<o.length;a++)o[a](i);Hu(t,i,e.sync)}else rb(e)&&(e.prefinished=!0,t.emit("prefinish"),e.pendingcb++,Al.nextTick(pC,t,e))}e.sync=!0,e.pendingcb++;try{t._final(n)}catch(i){n(i)}e.sync=!1}function $Ee(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.finalCalled=!0,IEe(t,e)):(e.prefinished=!0,t.emit("prefinish")))}function yC(t,e,r){rb(e)&&($Ee(t,e),e.pendingcb===0&&(r?(e.pendingcb++,Al.nextTick((n,i)=>{rb(i)?pC(n,i):i.pendingcb--},t,e)):rb(e)&&(e.pendingcb++,pC(t,e))))}function pC(t,e){e.pendingcb--,e.finished=!0;let r=e[Vu].splice(0);for(let n=0;n<r.length;n++)r[n]();if(t.emit("finish"),e.autoDestroy){let n=t._readableState;(!n||n.autoDestroy&&(n.endEmitted||n.readable===!1))&&t.destroy()}}lEe(Wt.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(t){this._writableState&&(this._writableState.destroyed=t)}},writable:{__proto__:null,get(){let t=this._writableState;return!!t&&t.writable!==!1&&!t.destroyed&&!t.errored&&!t.ending&&!t.ended},set(t){this._writableState&&(this._writableState.writable=!!t)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){let t=this._writableState;return t?!t.destroyed&&!t.ending&&t.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var PEe=ib.destroy;Wt.prototype.destroy=function(t,e){let r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[Vu].length)&&Al.nextTick(mC,r),PEe.call(this,t,e),this};Wt.prototype._undestroy=ib.undestroy;Wt.prototype._destroy=function(t,e){e(t)};Wt.prototype[fEe.captureRejectionSymbol]=function(t){this.destroy(t)};var fC;function MZ(){return fC===void 0&&(fC={}),fC}Wt.fromWeb=function(t,e){return MZ().newStreamWritableFromWritableStream(t,e)};Wt.toWeb=function(t){return MZ().newWritableStreamFromStreamWritable(t)}});var YZ=b((c9e,KZ)=>{var _C=os(),TEe=Q("buffer"),{isReadable:AEe,isWritable:kEe,isIterable:jZ,isNodeStream:CEe,isReadableNodeStream:zZ,isWritableNodeStream:LZ,isDuplexNodeStream:REe,isReadableStream:FZ,isWritableStream:BZ}=lo(),UZ=Yo(),{AbortError:WZ,codes:{ERR_INVALID_ARG_TYPE:DEe,ERR_INVALID_RETURN_VALUE:qZ}}=Ur(),{destroyer:Wu}=$l(),OEe=fo(),JZ=Hh(),MEe=ob(),{createDeferredPromise:ZZ}=sn(),HZ=nC(),VZ=globalThis.Blob||TEe.Blob,NEe=typeof VZ<"u"?function(e){return e instanceof VZ}:function(e){return!1},jEe=globalThis.AbortController||zu().AbortController,{FunctionPrototypeCall:GZ}=Ht(),ls=class extends OEe{constructor(e){super(e),(e==null?void 0:e.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(e==null?void 0:e.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}};KZ.exports=function t(e,r){if(REe(e))return e;if(zZ(e))return Gu({readable:e});if(LZ(e))return Gu({writable:e});if(CEe(e))return Gu({writable:!1,readable:!1});if(FZ(e))return Gu({readable:JZ.fromWeb(e)});if(BZ(e))return Gu({writable:MEe.fromWeb(e)});if(typeof e=="function"){let{value:i,write:o,final:a,destroy:s}=zEe(e);if(jZ(i))return HZ(ls,i,{objectMode:!0,write:o,final:a,destroy:s});let l=i==null?void 0:i.then;if(typeof l=="function"){let c,u=GZ(l,i,d=>{if(d!=null)throw new qZ("nully","body",d)},d=>{Wu(c,d)});return c=new ls({objectMode:!0,readable:!1,write:o,final(d){a(async()=>{try{await u,_C.nextTick(d,null)}catch(f){_C.nextTick(d,f)}})},destroy:s})}throw new qZ("Iterable, AsyncIterable or AsyncFunction",r,i)}if(NEe(e))return t(e.arrayBuffer());if(jZ(e))return HZ(ls,e,{objectMode:!0,writable:!1});if(FZ(e==null?void 0:e.readable)&&BZ(e==null?void 0:e.writable))return ls.fromWeb(e);if(typeof(e==null?void 0:e.writable)=="object"||typeof(e==null?void 0:e.readable)=="object"){let i=e!=null&&e.readable?zZ(e==null?void 0:e.readable)?e==null?void 0:e.readable:t(e.readable):void 0,o=e!=null&&e.writable?LZ(e==null?void 0:e.writable)?e==null?void 0:e.writable:t(e.writable):void 0;return Gu({readable:i,writable:o})}let n=e==null?void 0:e.then;if(typeof n=="function"){let i;return GZ(n,e,o=>{o!=null&&i.push(o),i.push(null)},o=>{Wu(i,o)}),i=new ls({objectMode:!0,writable:!1,read(){}})}throw new DEe(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],e)};function zEe(t){let{promise:e,resolve:r}=ZZ(),n=new jEe,i=n.signal;return{value:t((async function*(){for(;;){let a=e;e=null;let{chunk:s,done:l,cb:c}=await a;if(_C.nextTick(c),l)return;if(i.aborted)throw new WZ(void 0,{cause:i.reason});({promise:e,resolve:r}=ZZ()),yield s}})(),{signal:i}),write(a,s,l){let c=r;r=null,c({chunk:a,done:!1,cb:l})},final(a){let s=r;r=null,s({done:!0,cb:a})},destroy(a,s){n.abort(),s(a)}}}function Gu(t){let e=t.readable&&typeof t.readable.read!="function"?JZ.wrap(t.readable):t.readable,r=t.writable,n=!!AEe(e),i=!!kEe(r),o,a,s,l,c;function u(d){let f=l;l=null,f?f(d):d&&c.destroy(d)}return c=new ls({readableObjectMode:!!(e!=null&&e.readableObjectMode),writableObjectMode:!!(r!=null&&r.writableObjectMode),readable:n,writable:i}),i&&(UZ(r,d=>{i=!1,d&&Wu(e,d),u(d)}),c._write=function(d,f,p){r.write(d,f)?p():o=p},c._final=function(d){r.end(),a=d},r.on("drain",function(){if(o){let d=o;o=null,d()}}),r.on("finish",function(){if(a){let d=a;a=null,d()}})),n&&(UZ(e,d=>{n=!1,d&&Wu(e,d),u(d)}),e.on("readable",function(){if(s){let d=s;s=null,d()}}),e.on("end",function(){c.push(null)}),c._read=function(){for(;;){let d=e.read();if(d===null){s=c._read;return}if(!c.push(d))return}}),c._destroy=function(d,f){!d&&l!==null&&(d=new WZ),s=null,o=null,a=null,l===null?f(d):(l=f,Wu(r,d),Wu(e,d))},c}});var fo=b((u9e,eH)=>{"use strict";var{ObjectDefineProperties:LEe,ObjectGetOwnPropertyDescriptor:Xo,ObjectKeys:FEe,ObjectSetPrototypeOf:XZ}=Ht();eH.exports=Mi;var wC=Hh(),ui=ob();XZ(Mi.prototype,wC.prototype);XZ(Mi,wC);{let t=FEe(ui.prototype);for(let e=0;e<t.length;e++){let r=t[e];Mi.prototype[r]||(Mi.prototype[r]=ui.prototype[r])}}function Mi(t){if(!(this instanceof Mi))return new Mi(t);wC.call(this,t),ui.call(this,t),t?(this.allowHalfOpen=t.allowHalfOpen!==!1,t.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),t.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}LEe(Mi.prototype,{writable:{__proto__:null,...Xo(ui.prototype,"writable")},writableHighWaterMark:{__proto__:null,...Xo(ui.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...Xo(ui.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...Xo(ui.prototype,"writableBuffer")},writableLength:{__proto__:null,...Xo(ui.prototype,"writableLength")},writableFinished:{__proto__:null,...Xo(ui.prototype,"writableFinished")},writableCorked:{__proto__:null,...Xo(ui.prototype,"writableCorked")},writableEnded:{__proto__:null,...Xo(ui.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...Xo(ui.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(t){this._readableState&&this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}});var vC;function QZ(){return vC===void 0&&(vC={}),vC}Mi.fromWeb=function(t,e){return QZ().newStreamDuplexFromReadableWritablePair(t,e)};Mi.toWeb=function(t){return QZ().newReadableWritablePairFromDuplex(t)};var bC;Mi.from=function(t){return bC||(bC=YZ()),bC(t,"body")}});var EC=b((d9e,rH)=>{"use strict";var{ObjectSetPrototypeOf:tH,Symbol:BEe}=Ht();rH.exports=Qo;var{ERR_METHOD_NOT_IMPLEMENTED:UEe}=Ur().codes,SC=fo(),{getHighWaterMark:qEe}=Uh();tH(Qo.prototype,SC.prototype);tH(Qo,SC);var Jh=BEe("kCallback");function Qo(t){if(!(this instanceof Qo))return new Qo(t);let e=t?qEe(this,t,"readableHighWaterMark",!0):null;e===0&&(t={...t,highWaterMark:null,readableHighWaterMark:e,writableHighWaterMark:t.writableHighWaterMark||0}),SC.call(this,t),this._readableState.sync=!1,this[Jh]=null,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",ZEe)}function xC(t){typeof this._flush=="function"&&!this.destroyed?this._flush((e,r)=>{if(e){t?t(e):this.destroy(e);return}r!=null&&this.push(r),this.push(null),t&&t()}):(this.push(null),t&&t())}function ZEe(){this._final!==xC&&xC.call(this)}Qo.prototype._final=xC;Qo.prototype._transform=function(t,e,r){throw new UEe("_transform()")};Qo.prototype._write=function(t,e,r){let n=this._readableState,i=this._writableState,o=n.length;this._transform(t,e,(a,s)=>{if(a){r(a);return}s!=null&&this.push(s),i.ended||o===n.length||n.length<n.highWaterMark?r():this[Jh]=r})};Qo.prototype._read=function(){if(this[Jh]){let t=this[Jh];this[Jh]=null,t()}}});var $C=b((f9e,iH)=>{"use strict";var{ObjectSetPrototypeOf:nH}=Ht();iH.exports=Ju;var IC=EC();nH(Ju.prototype,IC.prototype);nH(Ju,IC);function Ju(t){if(!(this instanceof Ju))return new Ju(t);IC.call(this,t)}Ju.prototype._transform=function(t,e,r){r(null,t)}});var cb=b((p9e,cH)=>{var Kh=os(),{ArrayIsArray:HEe,Promise:VEe,SymbolAsyncIterator:GEe,SymbolDispose:WEe}=Ht(),lb=Yo(),{once:JEe}=sn(),KEe=$l(),oH=fo(),{aggregateTwoErrors:YEe,codes:{ERR_INVALID_ARG_TYPE:MC,ERR_INVALID_RETURN_VALUE:PC,ERR_MISSING_ARGS:XEe,ERR_STREAM_DESTROYED:QEe,ERR_STREAM_PREMATURE_CLOSE:e1e},AbortError:t1e}=Ur(),{validateFunction:r1e,validateAbortSignal:n1e}=Fu(),{isIterable:kl,isReadable:TC,isReadableNodeStream:sb,isNodeStream:aH,isTransformStream:Ku,isWebStream:i1e,isReadableStream:AC,isReadableFinished:o1e}=lo(),a1e=globalThis.AbortController||zu().AbortController,kC,CC,RC;function sH(t,e,r){let n=!1;t.on("close",()=>{n=!0});let i=lb(t,{readable:e,writable:r},o=>{n=!o});return{destroy:o=>{n||(n=!0,KEe.destroyer(t,o||new QEe("pipe")))},cleanup:i}}function s1e(t){return r1e(t[t.length-1],"streams[stream.length - 1]"),t.pop()}function DC(t){if(kl(t))return t;if(sb(t))return l1e(t);throw new MC("val",["Readable","Iterable","AsyncIterable"],t)}async function*l1e(t){CC||(CC=Hh()),yield*CC.prototype[GEe].call(t)}async function ab(t,e,r,{end:n}){let i,o=null,a=c=>{if(c&&(i=c),o){let u=o;o=null,u()}},s=()=>new VEe((c,u)=>{i?u(i):o=()=>{i?u(i):c()}});e.on("drain",a);let l=lb(e,{readable:!1},a);try{e.writableNeedDrain&&await s();for await(let c of t)e.write(c)||await s();n&&(e.end(),await s()),r()}catch(c){r(i!==c?YEe(i,c):c)}finally{l(),e.off("drain",a)}}async function OC(t,e,r,{end:n}){Ku(e)&&(e=e.writable);let i=e.getWriter();try{for await(let o of t)await i.ready,i.write(o).catch(()=>{});await i.ready,n&&await i.close(),r()}catch(o){try{await i.abort(o),r(o)}catch(a){r(a)}}}function c1e(...t){return lH(t,JEe(s1e(t)))}function lH(t,e,r){if(t.length===1&&HEe(t[0])&&(t=t[0]),t.length<2)throw new XEe("streams");let n=new a1e,i=n.signal,o=r==null?void 0:r.signal,a=[];n1e(o,"options.signal");function s(){h(new t1e)}RC=RC||sn().addAbortListener;let l;o&&(l=RC(o,s));let c,u,d=[],f=0;function p(E){h(E,--f===0)}function h(E,x){var w;if(E&&(!c||c.code==="ERR_STREAM_PREMATURE_CLOSE")&&(c=E),!(!c&&!x)){for(;d.length;)d.shift()(c);(w=l)===null||w===void 0||w[WEe](),n.abort(),x&&(c||a.forEach(k=>k()),Kh.nextTick(e,c,u))}}let m;for(let E=0;E<t.length;E++){let x=t[E],w=E<t.length-1,k=E>0,P=w||(r==null?void 0:r.end)!==!1,R=E===t.length-1;if(aH(x)){let T=function(D){D&&D.name!=="AbortError"&&D.code!=="ERR_STREAM_PREMATURE_CLOSE"&&p(D)};var v=T;if(P){let{destroy:D,cleanup:A}=sH(x,w,k);d.push(D),TC(x)&&R&&a.push(A)}x.on("error",T),TC(x)&&R&&a.push(()=>{x.removeListener("error",T)})}if(E===0)if(typeof x=="function"){if(m=x({signal:i}),!kl(m))throw new PC("Iterable, AsyncIterable or Stream","source",m)}else kl(x)||sb(x)||Ku(x)?m=x:m=oH.from(x);else if(typeof x=="function"){if(Ku(m)){var y;m=DC((y=m)===null||y===void 0?void 0:y.readable)}else m=DC(m);if(m=x(m,{signal:i}),w){if(!kl(m,!0))throw new PC("AsyncIterable",`transform[${E-1}]`,m)}else{var g;kC||(kC=$C());let T=new kC({objectMode:!0}),D=(g=m)===null||g===void 0?void 0:g.then;if(typeof D=="function")f++,D.call(m,U=>{u=U,U!=null&&T.write(U),P&&T.end(),Kh.nextTick(p)},U=>{T.destroy(U),Kh.nextTick(p,U)});else if(kl(m,!0))f++,ab(m,T,p,{end:P});else if(AC(m)||Ku(m)){let U=m.readable||m;f++,ab(U,T,p,{end:P})}else throw new PC("AsyncIterable or Promise","destination",m);m=T;let{destroy:A,cleanup:M}=sH(m,!1,!0);d.push(A),R&&a.push(M)}}else if(aH(x)){if(sb(m)){f+=2;let T=u1e(m,x,p,{end:P});TC(x)&&R&&a.push(T)}else if(Ku(m)||AC(m)){let T=m.readable||m;f++,ab(T,x,p,{end:P})}else if(kl(m))f++,ab(m,x,p,{end:P});else throw new MC("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],m);m=x}else if(i1e(x)){if(sb(m))f++,OC(DC(m),x,p,{end:P});else if(AC(m)||kl(m))f++,OC(m,x,p,{end:P});else if(Ku(m))f++,OC(m.readable,x,p,{end:P});else throw new MC("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],m);m=x}else m=oH.from(x)}return(i!=null&&i.aborted||o!=null&&o.aborted)&&Kh.nextTick(s),m}function u1e(t,e,r,{end:n}){let i=!1;if(e.on("close",()=>{i||r(new e1e)}),t.pipe(e,{end:!1}),n){let a=function(){i=!0,e.end()};var o=a;o1e(t)?Kh.nextTick(a):t.once("end",a)}else r();return lb(t,{readable:!0,writable:!1},a=>{let s=t._readableState;a&&a.code==="ERR_STREAM_PREMATURE_CLOSE"&&s&&s.ended&&!s.errored&&!s.errorEmitted?t.once("end",r).once("error",r):r(a)}),lb(e,{readable:!1,writable:!0},r)}cH.exports={pipelineImpl:lH,pipeline:c1e}});var jC=b((h9e,mH)=>{"use strict";var{pipeline:d1e}=cb(),ub=fo(),{destroyer:f1e}=$l(),{isNodeStream:db,isReadable:uH,isWritable:dH,isWebStream:NC,isTransformStream:Cl,isWritableStream:fH,isReadableStream:pH}=lo(),{AbortError:p1e,codes:{ERR_INVALID_ARG_VALUE:hH,ERR_MISSING_ARGS:h1e}}=Ur(),m1e=Yo();mH.exports=function(...e){if(e.length===0)throw new h1e("streams");if(e.length===1)return ub.from(e[0]);let r=[...e];if(typeof e[0]=="function"&&(e[0]=ub.from(e[0])),typeof e[e.length-1]=="function"){let p=e.length-1;e[p]=ub.from(e[p])}for(let p=0;p<e.length;++p)if(!(!db(e[p])&&!NC(e[p]))){if(p<e.length-1&&!(uH(e[p])||pH(e[p])||Cl(e[p])))throw new hH(`streams[${p}]`,r[p],"must be readable");if(p>0&&!(dH(e[p])||fH(e[p])||Cl(e[p])))throw new hH(`streams[${p}]`,r[p],"must be writable")}let n,i,o,a,s;function l(p){let h=a;a=null,h?h(p):p?s.destroy(p):!f&&!d&&s.destroy()}let c=e[0],u=d1e(e,l),d=!!(dH(c)||fH(c)||Cl(c)),f=!!(uH(u)||pH(u)||Cl(u));if(s=new ub({writableObjectMode:!!(c!=null&&c.writableObjectMode),readableObjectMode:!!(u!=null&&u.readableObjectMode),writable:d,readable:f}),d){if(db(c))s._write=function(h,m,y){c.write(h,m)?y():n=y},s._final=function(h){c.end(),i=h},c.on("drain",function(){if(n){let h=n;n=null,h()}});else if(NC(c)){let m=(Cl(c)?c.writable:c).getWriter();s._write=async function(y,g,v){try{await m.ready,m.write(y).catch(()=>{}),v()}catch(E){v(E)}},s._final=async function(y){try{await m.ready,m.close().catch(()=>{}),i=y}catch(g){y(g)}}}let p=Cl(u)?u.readable:u;m1e(p,()=>{if(i){let h=i;i=null,h()}})}if(f){if(db(u))u.on("readable",function(){if(o){let p=o;o=null,p()}}),u.on("end",function(){s.push(null)}),s._read=function(){for(;;){let p=u.read();if(p===null){o=s._read;return}if(!s.push(p))return}};else if(NC(u)){let h=(Cl(u)?u.readable:u).getReader();s._read=async function(){for(;;)try{let{value:m,done:y}=await h.read();if(!s.push(m))return;if(y){s.push(null);return}}catch{return}}}}return s._destroy=function(p,h){!p&&a!==null&&(p=new p1e),o=null,n=null,i=null,a===null?h(p):(a=h,db(u)&&f1e(u,p))},s}});var IH=b((m9e,FC)=>{"use strict";var g1e=globalThis.AbortController||zu().AbortController,{codes:{ERR_INVALID_ARG_VALUE:y1e,ERR_INVALID_ARG_TYPE:Yh,ERR_MISSING_ARGS:_1e,ERR_OUT_OF_RANGE:v1e},AbortError:po}=Ur(),{validateAbortSignal:Rl,validateInteger:gH,validateObject:Dl}=Fu(),b1e=Ht().Symbol("kWeak"),w1e=Ht().Symbol("kResistStopPropagation"),{finished:x1e}=Yo(),S1e=jC(),{addAbortSignalNoValidate:E1e}=Bh(),{isWritable:I1e,isNodeStream:$1e}=lo(),{deprecate:P1e}=sn(),{ArrayPrototypePush:T1e,Boolean:A1e,MathFloor:yH,Number:k1e,NumberIsNaN:C1e,Promise:_H,PromiseReject:vH,PromiseResolve:R1e,PromisePrototypeThen:bH,Symbol:xH}=Ht(),fb=xH("kEmpty"),wH=xH("kEof");function D1e(t,e){if(e!=null&&Dl(e,"options"),(e==null?void 0:e.signal)!=null&&Rl(e.signal,"options.signal"),$1e(t)&&!I1e(t))throw new y1e("stream",t,"must be writable");let r=S1e(this,t);return e!=null&&e.signal&&E1e(e.signal,r),r}function pb(t,e){if(typeof t!="function")throw new Yh("fn",["Function","AsyncFunction"],t);e!=null&&Dl(e,"options"),(e==null?void 0:e.signal)!=null&&Rl(e.signal,"options.signal");let r=1;(e==null?void 0:e.concurrency)!=null&&(r=yH(e.concurrency));let n=r-1;return(e==null?void 0:e.highWaterMark)!=null&&(n=yH(e.highWaterMark)),gH(r,"options.concurrency",1),gH(n,"options.highWaterMark",0),n+=r,async function*(){let o=sn().AbortSignalAny([e==null?void 0:e.signal].filter(A1e)),a=this,s=[],l={signal:o},c,u,d=!1,f=0;function p(){d=!0,h()}function h(){f-=1,m()}function m(){u&&!d&&f<r&&s.length<n&&(u(),u=null)}async function y(){try{for await(let g of a){if(d)return;if(o.aborted)throw new po;try{if(g=t(g,l),g===fb)continue;g=R1e(g)}catch(v){g=vH(v)}f+=1,bH(g,h,p),s.push(g),c&&(c(),c=null),!d&&(s.length>=n||f>=r)&&await new _H(v=>{u=v})}s.push(wH)}catch(g){let v=vH(g);bH(v,h,p),s.push(v)}finally{d=!0,c&&(c(),c=null)}}y();try{for(;;){for(;s.length>0;){let g=await s[0];if(g===wH)return;if(o.aborted)throw new po;g!==fb&&(yield g),s.shift(),m()}await new _H(g=>{c=g})}}finally{d=!0,u&&(u(),u=null)}}.call(this)}function O1e(t=void 0){return t!=null&&Dl(t,"options"),(t==null?void 0:t.signal)!=null&&Rl(t.signal,"options.signal"),async function*(){let r=0;for await(let i of this){var n;if(t!=null&&(n=t.signal)!==null&&n!==void 0&&n.aborted)throw new po({cause:t.signal.reason});yield[r++,i]}}.call(this)}async function SH(t,e=void 0){for await(let r of LC.call(this,t,e))return!0;return!1}async function M1e(t,e=void 0){if(typeof t!="function")throw new Yh("fn",["Function","AsyncFunction"],t);return!await SH.call(this,async(...r)=>!await t(...r),e)}async function N1e(t,e){for await(let r of LC.call(this,t,e))return r}async function j1e(t,e){if(typeof t!="function")throw new Yh("fn",["Function","AsyncFunction"],t);async function r(n,i){return await t(n,i),fb}for await(let n of pb.call(this,r,e));}function LC(t,e){if(typeof t!="function")throw new Yh("fn",["Function","AsyncFunction"],t);async function r(n,i){return await t(n,i)?n:fb}return pb.call(this,r,e)}var zC=class extends _1e{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}};async function z1e(t,e,r){var n;if(typeof t!="function")throw new Yh("reducer",["Function","AsyncFunction"],t);r!=null&&Dl(r,"options"),(r==null?void 0:r.signal)!=null&&Rl(r.signal,"options.signal");let i=arguments.length>1;if(r!=null&&(n=r.signal)!==null&&n!==void 0&&n.aborted){let c=new po(void 0,{cause:r.signal.reason});throw this.once("error",()=>{}),await x1e(this.destroy(c)),c}let o=new g1e,a=o.signal;if(r!=null&&r.signal){let c={once:!0,[b1e]:this,[w1e]:!0};r.signal.addEventListener("abort",()=>o.abort(),c)}let s=!1;try{for await(let c of this){var l;if(s=!0,r!=null&&(l=r.signal)!==null&&l!==void 0&&l.aborted)throw new po;i?e=await t(e,c,{signal:a}):(e=c,i=!0)}if(!s&&!i)throw new zC}finally{o.abort()}return e}async function L1e(t){t!=null&&Dl(t,"options"),(t==null?void 0:t.signal)!=null&&Rl(t.signal,"options.signal");let e=[];for await(let n of this){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new po(void 0,{cause:t.signal.reason});T1e(e,n)}return e}function F1e(t,e){let r=pb.call(this,t,e);return async function*(){for await(let i of r)yield*i}.call(this)}function EH(t){if(t=k1e(t),C1e(t))return 0;if(t<0)throw new v1e("number",">= 0",t);return t}function B1e(t,e=void 0){return e!=null&&Dl(e,"options"),(e==null?void 0:e.signal)!=null&&Rl(e.signal,"options.signal"),t=EH(t),async function*(){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new po;for await(let o of this){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new po;t--<=0&&(yield o)}}.call(this)}function U1e(t,e=void 0){return e!=null&&Dl(e,"options"),(e==null?void 0:e.signal)!=null&&Rl(e.signal,"options.signal"),t=EH(t),async function*(){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new po;for await(let o of this){var i;if(e!=null&&(i=e.signal)!==null&&i!==void 0&&i.aborted)throw new po;if(t-- >0&&(yield o),t<=0)return}}.call(this)}FC.exports.streamReturningOperators={asIndexedPairs:P1e(O1e,"readable.asIndexedPairs will be removed in a future version."),drop:B1e,filter:LC,flatMap:F1e,map:pb,take:U1e,compose:D1e};FC.exports.promiseReturningOperators={every:M1e,forEach:j1e,reduce:z1e,toArray:L1e,some:SH,find:N1e}});var BC=b((g9e,$H)=>{"use strict";var{ArrayPrototypePop:q1e,Promise:Z1e}=Ht(),{isIterable:H1e,isNodeStream:V1e,isWebStream:G1e}=lo(),{pipelineImpl:W1e}=cb(),{finished:J1e}=Yo();UC();function K1e(...t){return new Z1e((e,r)=>{let n,i,o=t[t.length-1];if(o&&typeof o=="object"&&!V1e(o)&&!H1e(o)&&!G1e(o)){let a=q1e(t);n=a.signal,i=a.end}W1e(t,(a,s)=>{a?r(a):e(s)},{signal:n,end:i})})}$H.exports={finished:J1e,pipeline:K1e}});var UC=b((y9e,MH)=>{"use strict";var{Buffer:Y1e}=Q("buffer"),{ObjectDefineProperty:ea,ObjectKeys:AH,ReflectApply:kH}=Ht(),{promisify:{custom:CH}}=sn(),{streamReturningOperators:PH,promiseReturningOperators:TH}=IH(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:RH}}=Ur(),X1e=jC(),{setDefaultHighWaterMark:Q1e,getDefaultHighWaterMark:eIe}=Uh(),{pipeline:DH}=cb(),{destroyer:tIe}=$l(),OH=Yo(),qC=BC(),Xh=lo(),Ut=MH.exports=Vv().Stream;Ut.isDestroyed=Xh.isDestroyed;Ut.isDisturbed=Xh.isDisturbed;Ut.isErrored=Xh.isErrored;Ut.isReadable=Xh.isReadable;Ut.isWritable=Xh.isWritable;Ut.Readable=Hh();for(let t of AH(PH)){let r=function(...n){if(new.target)throw RH();return Ut.Readable.from(kH(e,this,n))},e=PH[t];ea(r,"name",{__proto__:null,value:e.name}),ea(r,"length",{__proto__:null,value:e.length}),ea(Ut.Readable.prototype,t,{__proto__:null,value:r,enumerable:!1,configurable:!0,writable:!0})}for(let t of AH(TH)){let r=function(...n){if(new.target)throw RH();return kH(e,this,n)},e=TH[t];ea(r,"name",{__proto__:null,value:e.name}),ea(r,"length",{__proto__:null,value:e.length}),ea(Ut.Readable.prototype,t,{__proto__:null,value:r,enumerable:!1,configurable:!0,writable:!0})}Ut.Writable=ob();Ut.Duplex=fo();Ut.Transform=EC();Ut.PassThrough=$C();Ut.pipeline=DH;var{addAbortSignal:rIe}=Bh();Ut.addAbortSignal=rIe;Ut.finished=OH;Ut.destroy=tIe;Ut.compose=X1e;Ut.setDefaultHighWaterMark=Q1e;Ut.getDefaultHighWaterMark=eIe;ea(Ut,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return qC}});ea(DH,CH,{__proto__:null,enumerable:!0,get(){return qC.pipeline}});ea(OH,CH,{__proto__:null,enumerable:!0,get(){return qC.finished}});Ut.Stream=Ut;Ut._isUint8Array=function(e){return e instanceof Uint8Array};Ut._uint8ArrayToBuffer=function(e){return Y1e.from(e.buffer,e.byteOffset,e.byteLength)}});var Ol=b((_9e,Ve)=>{"use strict";var lr=Q("stream");if(lr&&process.env.READABLE_STREAM==="disable"){let t=lr.promises;Ve.exports._uint8ArrayToBuffer=lr._uint8ArrayToBuffer,Ve.exports._isUint8Array=lr._isUint8Array,Ve.exports.isDisturbed=lr.isDisturbed,Ve.exports.isErrored=lr.isErrored,Ve.exports.isReadable=lr.isReadable,Ve.exports.Readable=lr.Readable,Ve.exports.Writable=lr.Writable,Ve.exports.Duplex=lr.Duplex,Ve.exports.Transform=lr.Transform,Ve.exports.PassThrough=lr.PassThrough,Ve.exports.addAbortSignal=lr.addAbortSignal,Ve.exports.finished=lr.finished,Ve.exports.destroy=lr.destroy,Ve.exports.pipeline=lr.pipeline,Ve.exports.compose=lr.compose,Object.defineProperty(lr,"promises",{configurable:!0,enumerable:!0,get(){return t}}),Ve.exports.Stream=lr.Stream}else{let t=UC(),e=BC(),r=t.Readable.destroy;Ve.exports=t.Readable,Ve.exports._uint8ArrayToBuffer=t._uint8ArrayToBuffer,Ve.exports._isUint8Array=t._isUint8Array,Ve.exports.isDisturbed=t.isDisturbed,Ve.exports.isErrored=t.isErrored,Ve.exports.isReadable=t.isReadable,Ve.exports.Readable=t.Readable,Ve.exports.Writable=t.Writable,Ve.exports.Duplex=t.Duplex,Ve.exports.Transform=t.Transform,Ve.exports.PassThrough=t.PassThrough,Ve.exports.addAbortSignal=t.addAbortSignal,Ve.exports.finished=t.finished,Ve.exports.destroy=t.destroy,Ve.exports.destroy=r,Ve.exports.pipeline=t.pipeline,Ve.exports.compose=t.compose,Object.defineProperty(t,"promises",{configurable:!0,enumerable:!0,get(){return e}}),Ve.exports.Stream=t.Stream}Ve.exports.default=Ve.exports});var jH=b((v9e,NH)=>{function nIe(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}NH.exports=nIe});var BH=b((b9e,FH)=>{var zH=Cv(),iIe=Ik(),oIe=$k(),LH=zH?zH.isConcatSpreadable:void 0;function aIe(t){return oIe(t)||iIe(t)||!!(LH&&t&&t[LH])}FH.exports=aIe});var hb=b((w9e,qH)=>{var sIe=jH(),lIe=BH();function UH(t,e,r,n,i){var o=-1,a=t.length;for(r||(r=lIe),i||(i=[]);++o<a;){var s=t[o];e>0&&r(s)?e>1?UH(s,e-1,r,n,i):sIe(i,s):n||(i[i.length]=s)}return i}qH.exports=UH});var HH=b((x9e,ZH)=>{var cIe=hb();function uIe(t){var e=t==null?0:t.length;return e?cIe(t,1):[]}ZH.exports=uIe});var Qh=b((S9e,VH)=>{var dIe=Rh(),fIe=dIe(Object,"create");VH.exports=fIe});var JH=b((E9e,WH)=>{var GH=Qh();function pIe(){this.__data__=GH?GH(null):{},this.size=0}WH.exports=pIe});var YH=b((I9e,KH)=>{function hIe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}KH.exports=hIe});var QH=b(($9e,XH)=>{var mIe=Qh(),gIe="__lodash_hash_undefined__",yIe=Object.prototype,_Ie=yIe.hasOwnProperty;function vIe(t){var e=this.__data__;if(mIe){var r=e[t];return r===gIe?void 0:r}return _Ie.call(e,t)?e[t]:void 0}XH.exports=vIe});var tV=b((P9e,eV)=>{var bIe=Qh(),wIe=Object.prototype,xIe=wIe.hasOwnProperty;function SIe(t){var e=this.__data__;return bIe?e[t]!==void 0:xIe.call(e,t)}eV.exports=SIe});var nV=b((T9e,rV)=>{var EIe=Qh(),IIe="__lodash_hash_undefined__";function $Ie(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=EIe&&e===void 0?IIe:e,this}rV.exports=$Ie});var oV=b((A9e,iV)=>{var PIe=JH(),TIe=YH(),AIe=QH(),kIe=tV(),CIe=nV();function Yu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Yu.prototype.clear=PIe;Yu.prototype.delete=TIe;Yu.prototype.get=AIe;Yu.prototype.has=kIe;Yu.prototype.set=CIe;iV.exports=Yu});var sV=b((k9e,aV)=>{function RIe(){this.__data__=[],this.size=0}aV.exports=RIe});var em=b((C9e,lV)=>{var DIe=Dv();function OIe(t,e){for(var r=t.length;r--;)if(DIe(t[r][0],e))return r;return-1}lV.exports=OIe});var uV=b((R9e,cV)=>{var MIe=em(),NIe=Array.prototype,jIe=NIe.splice;function zIe(t){var e=this.__data__,r=MIe(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():jIe.call(e,r,1),--this.size,!0}cV.exports=zIe});var fV=b((D9e,dV)=>{var LIe=em();function FIe(t){var e=this.__data__,r=LIe(e,t);return r<0?void 0:e[r][1]}dV.exports=FIe});var hV=b((O9e,pV)=>{var BIe=em();function UIe(t){return BIe(this.__data__,t)>-1}pV.exports=UIe});var gV=b((M9e,mV)=>{var qIe=em();function ZIe(t,e){var r=this.__data__,n=qIe(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}mV.exports=ZIe});var _V=b((N9e,yV)=>{var HIe=sV(),VIe=uV(),GIe=fV(),WIe=hV(),JIe=gV();function Xu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Xu.prototype.clear=HIe;Xu.prototype.delete=VIe;Xu.prototype.get=GIe;Xu.prototype.has=WIe;Xu.prototype.set=JIe;yV.exports=Xu});var bV=b((j9e,vV)=>{var KIe=Rh(),YIe=Du(),XIe=KIe(YIe,"Map");vV.exports=XIe});var SV=b((z9e,xV)=>{var wV=oV(),QIe=_V(),e$e=bV();function t$e(){this.size=0,this.__data__={hash:new wV,map:new(e$e||QIe),string:new wV}}xV.exports=t$e});var IV=b((L9e,EV)=>{function r$e(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}EV.exports=r$e});var tm=b((F9e,$V)=>{var n$e=IV();function i$e(t,e){var r=t.__data__;return n$e(e)?r[typeof e=="string"?"string":"hash"]:r.map}$V.exports=i$e});var TV=b((B9e,PV)=>{var o$e=tm();function a$e(t){var e=o$e(this,t).delete(t);return this.size-=e?1:0,e}PV.exports=a$e});var kV=b((U9e,AV)=>{var s$e=tm();function l$e(t){return s$e(this,t).get(t)}AV.exports=l$e});var RV=b((q9e,CV)=>{var c$e=tm();function u$e(t){return c$e(this,t).has(t)}CV.exports=u$e});var OV=b((Z9e,DV)=>{var d$e=tm();function f$e(t,e){var r=d$e(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}DV.exports=f$e});var NV=b((H9e,MV)=>{var p$e=SV(),h$e=TV(),m$e=kV(),g$e=RV(),y$e=OV();function Qu(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Qu.prototype.clear=p$e;Qu.prototype.delete=h$e;Qu.prototype.get=m$e;Qu.prototype.has=g$e;Qu.prototype.set=y$e;MV.exports=Qu});var zV=b((V9e,jV)=>{var _$e="__lodash_hash_undefined__";function v$e(t){return this.__data__.set(t,_$e),this}jV.exports=v$e});var FV=b((G9e,LV)=>{function b$e(t){return this.__data__.has(t)}LV.exports=b$e});var ZC=b((W9e,BV)=>{var w$e=NV(),x$e=zV(),S$e=FV();function mb(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new w$e;++e<r;)this.add(t[e])}mb.prototype.add=mb.prototype.push=x$e;mb.prototype.has=S$e;BV.exports=mb});var qV=b((J9e,UV)=>{function E$e(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}UV.exports=E$e});var HV=b((K9e,ZV)=>{function I$e(t){return t!==t}ZV.exports=I$e});var GV=b((Y9e,VV)=>{function $$e(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}VV.exports=$$e});var JV=b((X9e,WV)=>{var P$e=qV(),T$e=HV(),A$e=GV();function k$e(t,e,r){return e===e?A$e(t,e,r):P$e(t,T$e,r)}WV.exports=k$e});var HC=b((Q9e,KV)=>{var C$e=JV();function R$e(t,e){var r=t==null?0:t.length;return!!r&&C$e(t,e,0)>-1}KV.exports=R$e});var VC=b((e7e,YV)=>{function D$e(t,e,r){for(var n=-1,i=t==null?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}YV.exports=D$e});var QV=b((t7e,XV)=>{function O$e(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}XV.exports=O$e});var GC=b((r7e,eG)=>{function M$e(t,e){return t.has(e)}eG.exports=M$e});var rG=b((n7e,tG)=>{var N$e=ZC(),j$e=HC(),z$e=VC(),L$e=QV(),F$e=Pk(),B$e=GC(),U$e=200;function q$e(t,e,r,n){var i=-1,o=j$e,a=!0,s=t.length,l=[],c=e.length;if(!s)return l;r&&(e=L$e(e,F$e(r))),n?(o=z$e,a=!1):e.length>=U$e&&(o=B$e,a=!1,e=new N$e(e));e:for(;++i<s;){var u=t[i],d=r==null?u:r(u);if(u=n||u!==0?u:0,a&&d===d){for(var f=c;f--;)if(e[f]===d)continue e;l.push(u)}else o(e,d,n)||l.push(u)}return l}tG.exports=q$e});var WC=b((i7e,nG)=>{var Z$e=Ov(),H$e=Ou();function V$e(t){return H$e(t)&&Z$e(t)}nG.exports=V$e});var aG=b((o7e,oG)=>{var G$e=rG(),W$e=hb(),J$e=Rv(),iG=WC(),K$e=J$e(function(t,e){return iG(t)?G$e(t,W$e(e,1,iG,!0)):[]});oG.exports=K$e});var lG=b((a7e,sG)=>{var Y$e=Rh(),X$e=Du(),Q$e=Y$e(X$e,"Set");sG.exports=Q$e});var uG=b((s7e,cG)=>{function ePe(){}cG.exports=ePe});var JC=b((l7e,dG)=>{function tPe(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}dG.exports=tPe});var pG=b((c7e,fG)=>{var KC=lG(),rPe=uG(),nPe=JC(),iPe=1/0,oPe=KC&&1/nPe(new KC([,-0]))[1]==iPe?function(t){return new KC(t)}:rPe;fG.exports=oPe});var mG=b((u7e,hG)=>{var aPe=ZC(),sPe=HC(),lPe=VC(),cPe=GC(),uPe=pG(),dPe=JC(),fPe=200;function pPe(t,e,r){var n=-1,i=sPe,o=t.length,a=!0,s=[],l=s;if(r)a=!1,i=lPe;else if(o>=fPe){var c=e?null:uPe(t);if(c)return dPe(c);a=!1,i=cPe,l=new aPe}else l=e?[]:s;e:for(;++n<o;){var u=t[n],d=e?e(u):u;if(u=r||u!==0?u:0,a&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue e;e&&l.push(d),s.push(u)}else i(l,d,r)||(l!==s&&l.push(d),s.push(u))}return s}hG.exports=pPe});var yG=b((d7e,gG)=>{var hPe=hb(),mPe=Rv(),gPe=mG(),yPe=WC(),_Pe=mPe(function(t){return gPe(hPe(t,1,yPe,!0))});gG.exports=_Pe});var vG=b((f7e,_G)=>{function vPe(t,e){return function(r){return t(e(r))}}_G.exports=vPe});var wG=b((p7e,bG)=>{var bPe=vG(),wPe=bPe(Object.getPrototypeOf,Object);bG.exports=wPe});var EG=b((h7e,SG)=>{var xPe=kh(),SPe=wG(),EPe=Ou(),IPe="[object Object]",$Pe=Function.prototype,PPe=Object.prototype,xG=$Pe.toString,TPe=PPe.hasOwnProperty,APe=xG.call(Object);function kPe(t){if(!EPe(t)||xPe(t)!=IPe)return!1;var e=SPe(t);if(e===null)return!0;var r=TPe.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&xG.call(r)==APe}SG.exports=kPe});var IG=b(gb=>{"use strict";Object.defineProperty(gb,"__esModule",{value:!0});gb.assertValidPattern=void 0;var CPe=1024*64,RPe=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>CPe)throw new TypeError("pattern is too long")};gb.assertValidPattern=RPe});var PG=b(yb=>{"use strict";Object.defineProperty(yb,"__esModule",{value:!0});yb.parseClass=void 0;var DPe={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},rm=t=>t.replace(/[[\]\\-]/g,"\\$&"),OPe=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),$G=t=>t.join(""),MPe=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],i=[],o=r+1,a=!1,s=!1,l=!1,c=!1,u=r,d="";e:for(;o<t.length;){let m=t.charAt(o);if((m==="!"||m==="^")&&o===r+1){c=!0,o++;continue}if(m==="]"&&a&&!l){u=o+1;break}if(a=!0,m==="\\"&&!l){l=!0,o++;continue}if(m==="["&&!l){for(let[y,[g,v,E]]of Object.entries(DPe))if(t.startsWith(y,o)){if(d)return["$.",!1,t.length-r,!0];o+=y.length,E?i.push(g):n.push(g),s=s||v;continue e}}if(l=!1,d){m>d?n.push(rm(d)+"-"+rm(m)):m===d&&n.push(rm(m)),d="",o++;continue}if(t.startsWith("-]",o+1)){n.push(rm(m+"-")),o+=2;continue}if(t.startsWith("-",o+1)){d=m,o+=2;continue}n.push(rm(m)),o++}if(u<o)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,t.length-r,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!c){let m=n[0].length===2?n[0].slice(-1):n[0];return[OPe(m),!1,u-r,!1]}let f="["+(c?"^":"")+$G(n)+"]",p="["+(c?"":"^")+$G(i)+"]";return[n.length&&i.length?"("+f+"|"+p+")":n.length?f:p,s,u-r,!0]};yb.parseClass=MPe});var vb=b(_b=>{"use strict";Object.defineProperty(_b,"__esModule",{value:!0});_b.unescape=void 0;var NPe=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");_b.unescape=NPe});var QC=b(xb=>{"use strict";Object.defineProperty(xb,"__esModule",{value:!0});xb.AST=void 0;var jPe=PG(),bb=vb(),zPe=new Set(["!","?","+","*","@"]),TG=t=>zPe.has(t),LPe="(?!(?:^|/)\\.\\.?(?:$|/))",wb="(?!\\.)",FPe=new Set(["[","."]),BPe=new Set(["..","."]),UPe=new Set("().*{}+?[]^$\\!"),qPe=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),XC="[^/]",AG=XC+"*?",kG=XC+"+?",YC=class t{type;#e;#t;#o=!1;#n=[];#a;#b;#c;#d=!1;#s;#l;#i=!1;constructor(e,r,n={}){this.type=e,e&&(this.#t=!0),this.#a=r,this.#e=this.#a?this.#a.#e:this,this.#s=this.#e===this?n:this.#e.#s,this.#c=this.#e===this?[]:this.#e.#c,e==="!"&&!this.#e.#d&&this.#c.push(this),this.#b=this.#a?this.#a.#n.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#n)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#n.map(e=>String(e)).join("|")+")":this.#l=this.#n.map(e=>String(e)).join("")}#g(){if(this!==this.#e)throw new Error("should only call on root");if(this.#d)return this;this.toString(),this.#d=!0;let e;for(;e=this.#c.pop();){if(e.type!=="!")continue;let r=e,n=r.#a;for(;n;){for(let i=r.#b+1;!n.type&&i<n.#n.length;i++)for(let o of e.#n){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(n.#n[i])}r=n,n=r.#a}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof t&&r.#a===this))throw new Error("invalid part: "+r);this.#n.push(r)}}toJSON(){var r;let e=this.type===null?this.#n.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#n.map(n=>n.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#d&&((r=this.#a)==null?void 0:r.type)==="!")&&e.push({}),e}isStart(){var r;if(this.#e===this)return!0;if(!((r=this.#a)!=null&&r.isStart()))return!1;if(this.#b===0)return!0;let e=this.#a;for(let n=0;n<this.#b;n++){let i=e.#n[n];if(!(i instanceof t&&i.type==="!"))return!1}return!0}isEnd(){var r,n,i;if(this.#e===this||((r=this.#a)==null?void 0:r.type)==="!")return!0;if(!((n=this.#a)!=null&&n.isEnd()))return!1;if(!this.type)return(i=this.#a)==null?void 0:i.isEnd();let e=this.#a?this.#a.#n.length:0;return this.#b===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new t(this.type,e);for(let n of this.#n)r.copyIn(n);return r}static#y(e,r,n,i){let o=!1,a=!1,s=-1,l=!1;if(r.type===null){let p=n,h="";for(;p<e.length;){let m=e.charAt(p++);if(o||m==="\\"){o=!o,h+=m;continue}if(a){p===s+1?(m==="^"||m==="!")&&(l=!0):m==="]"&&!(p===s+2&&l)&&(a=!1),h+=m;continue}else if(m==="["){a=!0,s=p,l=!1,h+=m;continue}if(!i.noext&&TG(m)&&e.charAt(p)==="("){r.push(h),h="";let y=new t(m,r);p=t.#y(e,y,p,i),r.push(y);continue}h+=m}return r.push(h),p}let c=n+1,u=new t(null,r),d=[],f="";for(;c<e.length;){let p=e.charAt(c++);if(o||p==="\\"){o=!o,f+=p;continue}if(a){c===s+1?(p==="^"||p==="!")&&(l=!0):p==="]"&&!(c===s+2&&l)&&(a=!1),f+=p;continue}else if(p==="["){a=!0,s=c,l=!1,f+=p;continue}if(TG(p)&&e.charAt(c)==="("){u.push(f),f="";let h=new t(p,u);u.push(h),c=t.#y(e,h,c,i);continue}if(p==="|"){u.push(f),f="",d.push(u),u=new t(null,r);continue}if(p===")")return f===""&&r.#n.length===0&&(r.#i=!0),u.push(f),f="",r.push(...d,u),c;f+=p}return r.type=null,r.#t=void 0,r.#n=[e.substring(n-1)],c}static fromGlob(e,r={}){let n=new t(null,void 0,r);return t.#y(e,n,0,r),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[r,n,i,o]=this.toRegExpSource();if(!(i||this.#t||this.#s.nocase&&!this.#s.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let s=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,s),{_src:r,_glob:e})}get options(){return this.#s}toRegExpSource(e){var l;let r=e??!!this.#s.dot;if(this.#e===this&&this.#g(),!this.type){let c=this.isStart()&&this.isEnd(),u=this.#n.map(h=>{let[m,y,g,v]=typeof h=="string"?t.#f(h,this.#t,c):h.toRegExpSource(e);return this.#t=this.#t||g,this.#o=this.#o||v,m}).join(""),d="";if(this.isStart()&&typeof this.#n[0]=="string"&&!(this.#n.length===1&&BPe.has(this.#n[0]))){let m=FPe,y=r&&m.has(u.charAt(0))||u.startsWith("\\.")&&m.has(u.charAt(2))||u.startsWith("\\.\\.")&&m.has(u.charAt(4)),g=!r&&!e&&m.has(u.charAt(0));d=y?LPe:g?wb:""}let f="";return this.isEnd()&&this.#e.#d&&((l=this.#a)==null?void 0:l.type)==="!"&&(f="(?:$|\\/)"),[d+u+f,(0,bb.unescape)(u),this.#t=!!this.#t,this.#o]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#p(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let c=this.toString();return this.#n=[c],this.type=null,this.#t=void 0,[c,(0,bb.unescape)(this.toString()),!1,!1]}let a=!n||e||r||!wb?"":this.#p(!0);a===o&&(a=""),a&&(o=`(?:${o})(?:${a})*?`);let s="";if(this.type==="!"&&this.#i)s=(this.isStart()&&!r?wb:"")+kG;else{let c=this.type==="!"?"))"+(this.isStart()&&!r&&!e?wb:"")+AG+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;s=i+o+c}return[s,(0,bb.unescape)(o),this.#t=!!this.#t,this.#o]}#p(e){return this.#n.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,i,o,a]=r.toRegExpSource(e);return this.#o=this.#o||a,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#f(e,r,n=!1){let i=!1,o="",a=!1;for(let s=0;s<e.length;s++){let l=e.charAt(s);if(i){i=!1,o+=(UPe.has(l)?"\\":"")+l;continue}if(l==="\\"){s===e.length-1?o+="\\\\":i=!0;continue}if(l==="["){let[c,u,d,f]=(0,jPe.parseClass)(e,s);if(d){o+=c,a=a||u,s+=d-1,r=r||f;continue}}if(l==="*"){n&&e==="*"?o+=kG:o+=AG,r=!0;continue}if(l==="?"){o+=XC,r=!0;continue}o+=qPe(l)}return[o,(0,bb.unescape)(e),!!r,a]}};xb.AST=YC});var eR=b(Sb=>{"use strict";Object.defineProperty(Sb,"__esModule",{value:!0});Sb.escape=void 0;var ZPe=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");Sb.escape=ZPe});var cs=b(ae=>{"use strict";var HPe=ae&&ae.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ae,"__esModule",{value:!0});ae.unescape=ae.escape=ae.AST=ae.Minimatch=ae.match=ae.makeRe=ae.braceExpand=ae.defaults=ae.filter=ae.GLOBSTAR=ae.sep=ae.minimatch=void 0;var VPe=HPe(NA()),Eb=IG(),DG=QC(),GPe=eR(),WPe=vb(),JPe=(t,e,r={})=>((0,Eb.assertValidPattern)(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Ml(e,r).match(t));ae.minimatch=JPe;var KPe=/^\*+([^+@!?\*\[\(]*)$/,YPe=t=>e=>!e.startsWith(".")&&e.endsWith(t),XPe=t=>e=>e.endsWith(t),QPe=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),eTe=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),tTe=/^\*+\.\*+$/,rTe=t=>!t.startsWith(".")&&t.includes("."),nTe=t=>t!=="."&&t!==".."&&t.includes("."),iTe=/^\.\*+$/,oTe=t=>t!=="."&&t!==".."&&t.startsWith("."),aTe=/^\*+$/,sTe=t=>t.length!==0&&!t.startsWith("."),lTe=t=>t.length!==0&&t!=="."&&t!=="..",cTe=/^\?+([^+@!?\*\[\(]*)?$/,uTe=([t,e=""])=>{let r=OG([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},dTe=([t,e=""])=>{let r=MG([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},fTe=([t,e=""])=>{let r=MG([t]);return e?n=>r(n)&&n.endsWith(e):r},pTe=([t,e=""])=>{let r=OG([t]);return e?n=>r(n)&&n.endsWith(e):r},OG=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},MG=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},NG=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",CG={win32:{sep:"\\"},posix:{sep:"/"}};ae.sep=NG==="win32"?CG.win32.sep:CG.posix.sep;ae.minimatch.sep=ae.sep;ae.GLOBSTAR=Symbol("globstar **");ae.minimatch.GLOBSTAR=ae.GLOBSTAR;var hTe="[^/]",mTe=hTe+"*?",gTe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",yTe="(?:(?!(?:\\/|^)\\.).)*?",_Te=(t,e={})=>r=>(0,ae.minimatch)(r,t,e);ae.filter=_Te;ae.minimatch.filter=ae.filter;var di=(t,e={})=>Object.assign({},t,e),vTe=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return ae.minimatch;let e=ae.minimatch;return Object.assign((n,i,o={})=>e(n,i,di(t,o)),{Minimatch:class extends e.Minimatch{constructor(i,o={}){super(i,di(t,o))}static defaults(i){return e.defaults(di(t,i)).Minimatch}},AST:class extends e.AST{constructor(i,o,a={}){super(i,o,di(t,a))}static fromGlob(i,o={}){return e.AST.fromGlob(i,di(t,o))}},unescape:(n,i={})=>e.unescape(n,di(t,i)),escape:(n,i={})=>e.escape(n,di(t,i)),filter:(n,i={})=>e.filter(n,di(t,i)),defaults:n=>e.defaults(di(t,n)),makeRe:(n,i={})=>e.makeRe(n,di(t,i)),braceExpand:(n,i={})=>e.braceExpand(n,di(t,i)),match:(n,i,o={})=>e.match(n,i,di(t,o)),sep:e.sep,GLOBSTAR:ae.GLOBSTAR})};ae.defaults=vTe;ae.minimatch.defaults=ae.defaults;var bTe=(t,e={})=>((0,Eb.assertValidPattern)(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,VPe.default)(t));ae.braceExpand=bTe;ae.minimatch.braceExpand=ae.braceExpand;var wTe=(t,e={})=>new Ml(t,e).makeRe();ae.makeRe=wTe;ae.minimatch.makeRe=ae.makeRe;var xTe=(t,e,r={})=>{let n=new Ml(e,r);return t=t.filter(i=>n.match(i)),n.options.nonull&&!t.length&&t.push(e),t};ae.match=xTe;ae.minimatch.match=ae.match;var RG=/[?*]|[+@!]\(.*?\)|\[|\]/,STe=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ml=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,r={}){(0,Eb.assertValidPattern)(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||NG,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((o,a,s)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=o[0]===""&&o[1]===""&&(o[2]==="?"||!RG.test(o[2]))&&!RG.test(o[3]),c=/^[a-z]:/i.test(o[0]);if(l)return[...o.slice(0,4),...o.slice(4).map(u=>this.parse(u))];if(c)return[o[0],...o.slice(1).map(u=>this.parse(u))]}return o.map(l=>this.parse(l))});if(this.debug(this.pattern,i),this.set=i.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let a=this.set[o];a[0]===""&&a[1]===""&&this.globParts[o][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n=0;n<e.length;n++)for(let i=0;i<e[n].length;i++)e[n][i]==="**"&&(e[n][i]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let i=n;for(;r[i+1]==="**";)i++;i!==n&&r.splice(n,i-n)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((n,i)=>{let o=n[n.length-1];return i==="**"&&o==="**"?n:i===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(n.pop(),n):(n.push(i),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let o=e[i];i===1&&o===""&&e[0]===""||(o==="."||o==="")&&(r=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let i=e[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&(r=!0,e.splice(n-1,2),n-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let n of e){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let a=i;for(;n[a+1]==="**";)a++;a>i&&n.splice(i+1,a-i);let s=n[i+1],l=n[i+2],c=n[i+3];if(s!==".."||!l||l==="."||l===".."||!c||c==="."||c==="..")continue;r=!0,n.splice(i,1);let u=n.slice(0);u[i]="**",e.push(u),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<n.length-1;a++){let s=n[a];a===1&&s===""&&n[0]===""||(s==="."||s==="")&&(r=!0,n.splice(a,1),a--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let o=0;for(;(o=n.indexOf("..",o+1))!==-1;){let a=n[o-1];if(a&&a!=="."&&a!==".."&&a!=="**"){r=!0;let l=o===1&&n[o+1]==="**"?["."]:[];n.splice(o-1,2,...l),n.length===0&&n.push(""),o-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let n=r+1;n<e.length;n++){let i=this.partsMatch(e[r],e[n],!this.preserveMultipleSlashes);if(i){e[r]=[],e[n]=i;break}}return e.filter(r=>r.length)}partsMatch(e,r,n=!1){let i=0,o=0,a=[],s="";for(;i<e.length&&o<r.length;)if(e[i]===r[o])a.push(s==="b"?r[o]:e[i]),i++,o++;else if(n&&e[i]==="**"&&r[o]===e[i+1])a.push(e[i]),i++;else if(n&&r[o]==="**"&&e[i]===r[o+1])a.push(r[o]),o++;else if(e[i]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(s==="b")return!1;s="a",a.push(e[i]),i++,o++}else if(r[o]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(s==="a")return!1;s="b",a.push(r[o]),i++,o++}else return!1;return e.length===r.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,n=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=e.slice(n)),this.negate=r}matchOne(e,r,n=!1){let i=this.options;if(this.isWindows){let m=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),y=!m&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),g=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),v=!g&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),E=y?3:m?0:void 0,x=v?3:g?0:void 0;if(typeof E=="number"&&typeof x=="number"){let[w,k]=[e[E],r[x]];w.toLowerCase()===k.toLowerCase()&&(r[x]=w,x>E?r=r.slice(x):E>x&&(e=e.slice(E)))}}let{optimizationLevel:o=1}=this.options;o>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var a=0,s=0,l=e.length,c=r.length;a<l&&s<c;a++,s++){this.debug("matchOne loop");var u=r[s],d=e[a];if(this.debug(r,u,d),u===!1)return!1;if(u===ae.GLOBSTAR){this.debug("GLOBSTAR",[r,u,d]);var f=a,p=s+1;if(p===c){for(this.debug("** at the end");a<l;a++)if(e[a]==="."||e[a]===".."||!i.dot&&e[a].charAt(0)===".")return!1;return!0}for(;f<l;){var h=e[f];if(this.debug(`
|
|
229
229
|
globstar while`,e,f,r,p,h),this.matchOne(e.slice(f),r.slice(p),n))return this.debug("globstar found match!",f,l,h),!0;if(h==="."||h===".."||!i.dot&&h.charAt(0)==="."){this.debug("dot detected!",e,f,r,p);break}this.debug("globstar swallow a segment, and continue"),f++}return!!(n&&(this.debug(`
|
|
230
|
-
>>> no match, partial?`,e,f,r,p),f===l))}let m;if(typeof u=="string"?(m=d===u,this.debug("string match",u,d,m)):(m=u.test(d),this.debug("pattern match",u,d,m)),!m)return!1}if(a===l&&s===c)return!0;if(a===l)return n;if(s===c)return a===l-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return(0,ae.braceExpand)(this.pattern,this.options)}parse(e){(0,Eb.assertValidPattern)(e);let r=this.options;if(e==="**")return ae.GLOBSTAR;if(e==="")return"";let n,i=null;(n=e.match(aTe))?i=r.dot?lTe:sTe:(n=e.match(KPe))?i=(r.nocase?r.dot?eTe:QPe:r.dot?XPe:YPe)(n[1]):(n=e.match(cTe))?i=(r.nocase?r.dot?dTe:uTe:r.dot?fTe:pTe)(n):(n=e.match(tTe))?i=r.dot?nTe:rTe:(n=e.match(iTe))&&(i=oTe);let o=DG.AST.fromGlob(e,this.options).toMMPattern();return i&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:i}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?mTe:r.dot?gTe:yTe,i=new Set(r.nocase?["i"]:[]),o=e.map(l=>{let c=l.map(u=>{if(u instanceof RegExp)for(let d of u.flags.split(""))i.add(d);return typeof u=="string"?STe(u):u===ae.GLOBSTAR?ae.GLOBSTAR:u._src});return c.forEach((u,d)=>{let f=c[d+1],p=c[d-1];u!==ae.GLOBSTAR||p===ae.GLOBSTAR||(p===void 0?f!==void 0&&f!==ae.GLOBSTAR?c[d+1]="(?:\\/|"+n+"\\/)?"+f:c[d]=n:f===void 0?c[d-1]=p+"(?:\\/|"+n+")?":f!==ae.GLOBSTAR&&(c[d-1]=p+"(?:\\/|\\/"+n+"\\/)"+f,c[d+1]=ae.GLOBSTAR))}),c.filter(u=>u!==ae.GLOBSTAR).join("/")}).join("|"),[a,s]=e.length>1?["(?:",")"]:["",""];o="^"+a+o+s+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let o=this.set;this.debug(this.pattern,"set",o);let a=i[i.length-1];if(!a)for(let s=i.length-2;!a&&s>=0;s--)a=i[s];for(let s=0;s<o.length;s++){let l=o[s],c=i;if(n.matchBase&&l.length===1&&(c=[a]),this.matchOne(c,l,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return ae.minimatch.defaults(e).Minimatch}};ae.Minimatch=Ml;var ETe=QC();Object.defineProperty(ae,"AST",{enumerable:!0,get:function(){return ETe.AST}});var ITe=eR();Object.defineProperty(ae,"escape",{enumerable:!0,get:function(){return ITe.escape}});var $Te=vb();Object.defineProperty(ae,"unescape",{enumerable:!0,get:function(){return $Te.unescape}});ae.minimatch.AST=DG.AST;ae.minimatch.Minimatch=Ml;ae.minimatch.escape=GPe.escape;ae.minimatch.unescape=WPe.unescape});var UG=b($b=>{"use strict";Object.defineProperty($b,"__esModule",{value:!0});$b.LRUCache=void 0;var ed=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,LG=new Set,tR=typeof process=="object"&&process?process:{},FG=(t,e,r,n)=>{typeof tR.emitWarning=="function"?tR.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)},Ib=globalThis.AbortController,jG=globalThis.AbortSignal,zG;if(typeof Ib>"u"){jG=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(n,i){this._onabort.push(i)}},Ib=class{constructor(){e()}signal=new jG;abort(n){var i,o;if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let a of this.signal._onabort)a(n);(o=(i=this.signal).onabort)==null||o.call(i,n)}}};let t=((zG=tR.env)==null?void 0:zG.LRU_CACHE_IGNORE_AC_WARNING)!=="1",e=()=>{t&&(t=!1,FG("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var PTe=t=>!LG.has(t),I7e=Symbol("type"),us=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),BG=t=>us(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?td:null:null,td=class extends Array{constructor(e){super(e),this.fill(0)}},rR=class t{heap;length;static#e=!1;static create(e){let r=BG(e);if(!r)return[];t.#e=!0;let n=new t(e,r);return t.#e=!1,n}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},nR=class t{#e;#t;#o;#n;#a;#b;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#d;#s;#l;#i;#g;#y;#p;#f;#S;#m;#E;#I;#v;#w;#x;#h;static unsafeExposeInternals(e){return{starts:e.#I,ttls:e.#v,sizes:e.#E,keyMap:e.#s,keyList:e.#l,valList:e.#i,next:e.#g,prev:e.#y,get head(){return e.#p},get tail(){return e.#f},free:e.#S,isBackgroundFetch:r=>e.#u(r),backgroundFetch:(r,n,i,o)=>e.#z(r,n,i,o),moveToTail:r=>e.#F(r),indexes:r=>e.#P(r),rindexes:r=>e.#T(r),isStale:r=>e.#_(r)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#d}get size(){return this.#c}get fetchMethod(){return this.#a}get memoMethod(){return this.#b}get dispose(){return this.#o}get disposeAfter(){return this.#n}constructor(e){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:a,updateAgeOnHas:s,allowStale:l,dispose:c,disposeAfter:u,noDisposeOnSet:d,noUpdateTTL:f,maxSize:p=0,maxEntrySize:h=0,sizeCalculation:m,fetchMethod:y,memoMethod:g,noDeleteOnFetchRejection:v,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:w,ignoreFetchAbort:A}=e;if(r!==0&&!us(r))throw new TypeError("max option must be a nonnegative integer");let $=r?BG(r):Array;if(!$)throw new Error("invalid max value: "+r);if(this.#e=r,this.#t=p,this.maxEntrySize=h||this.#t,this.sizeCalculation=m,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(g!==void 0&&typeof g!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#b=g,y!==void 0&&typeof y!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#a=y,this.#x=!!y,this.#s=new Map,this.#l=new Array(r).fill(void 0),this.#i=new Array(r).fill(void 0),this.#g=new $(r),this.#y=new $(r),this.#p=0,this.#f=0,this.#S=rR.create(r),this.#c=0,this.#d=0,typeof c=="function"&&(this.#o=c),typeof u=="function"?(this.#n=u,this.#m=[]):(this.#n=void 0,this.#m=void 0),this.#w=!!this.#o,this.#h=!!this.#n,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!v,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!w,this.ignoreFetchAbort=!!A,this.maxEntrySize!==0){if(this.#t!==0&&!us(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!us(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#k()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!s,this.ttlResolution=us(i)||i===0?i:1,this.ttlAutopurge=!!o,this.ttl=n||0,this.ttl){if(!us(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#A()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let R="LRU_CACHE_UNBOUNDED";PTe(R)&&(LG.add(R),FG("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",R,t))}}getRemainingTTL(e){return this.#s.has(e)?1/0:0}#A(){let e=new td(this.#e),r=new td(this.#e);this.#v=e,this.#I=r,this.#R=(o,a,s=ed.now())=>{if(r[o]=a!==0?s:0,e[o]=a,a!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#_(o)&&this.#C(this.#l[o],"expire")},a+1);l.unref&&l.unref()}},this.#$=o=>{r[o]=e[o]!==0?ed.now():0},this.#r=(o,a)=>{if(e[a]){let s=e[a],l=r[a];if(!s||!l)return;o.ttl=s,o.start=l,o.now=n||i();let c=o.now-l;o.remainingTTL=s-c}};let n=0,i=()=>{let o=ed.now();if(this.ttlResolution>0){n=o;let a=setTimeout(()=>n=0,this.ttlResolution);a.unref&&a.unref()}return o};this.getRemainingTTL=o=>{let a=this.#s.get(o);if(a===void 0)return 0;let s=e[a],l=r[a];if(!s||!l)return 1/0;let c=(n||i())-l;return s-c},this.#_=o=>{let a=r[o],s=e[o];return!!s&&!!a&&(n||i())-a>s}}#$=()=>{};#r=()=>{};#R=()=>{};#_=()=>!1;#k(){let e=new td(this.#e);this.#d=0,this.#E=e,this.#D=r=>{this.#d-=e[r],e[r]=0},this.#M=(r,n,i,o)=>{if(this.#u(n))return 0;if(!us(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(n,r),!us(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#O=(r,n,i)=>{if(e[r]=n,this.#t){let o=this.#t-e[r];for(;this.#d>o;)this.#j(!0)}this.#d+=e[r],i&&(i.entrySize=n,i.totalCalculatedSize=this.#d)}}#D=e=>{};#O=(e,r,n)=>{};#M=(e,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#P({allowStale:e=this.allowStale}={}){if(this.#c)for(let r=this.#f;!(!this.#N(r)||((e||!this.#_(r))&&(yield r),r===this.#p));)r=this.#y[r]}*#T({allowStale:e=this.allowStale}={}){if(this.#c)for(let r=this.#p;!(!this.#N(r)||((e||!this.#_(r))&&(yield r),r===this.#f));)r=this.#g[r]}#N(e){return e!==void 0&&this.#s.get(this.#l[e])===e}*entries(){for(let e of this.#P())this.#i[e]!==void 0&&this.#l[e]!==void 0&&!this.#u(this.#i[e])&&(yield[this.#l[e],this.#i[e]])}*rentries(){for(let e of this.#T())this.#i[e]!==void 0&&this.#l[e]!==void 0&&!this.#u(this.#i[e])&&(yield[this.#l[e],this.#i[e]])}*keys(){for(let e of this.#P()){let r=this.#l[e];r!==void 0&&!this.#u(this.#i[e])&&(yield r)}}*rkeys(){for(let e of this.#T()){let r=this.#l[e];r!==void 0&&!this.#u(this.#i[e])&&(yield r)}}*values(){for(let e of this.#P())this.#i[e]!==void 0&&!this.#u(this.#i[e])&&(yield this.#i[e])}*rvalues(){for(let e of this.#T())this.#i[e]!==void 0&&!this.#u(this.#i[e])&&(yield this.#i[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let n of this.#P()){let i=this.#i[n],o=this.#u(i)?i.__staleWhileFetching:i;if(o!==void 0&&e(o,this.#l[n],this))return this.get(this.#l[n],r)}}forEach(e,r=this){for(let n of this.#P()){let i=this.#i[n],o=this.#u(i)?i.__staleWhileFetching:i;o!==void 0&&e.call(r,o,this.#l[n],this)}}rforEach(e,r=this){for(let n of this.#T()){let i=this.#i[n],o=this.#u(i)?i.__staleWhileFetching:i;o!==void 0&&e.call(r,o,this.#l[n],this)}}purgeStale(){let e=!1;for(let r of this.#T({allowStale:!0}))this.#_(r)&&(this.#C(this.#l[r],"expire"),e=!0);return e}info(e){let r=this.#s.get(e);if(r===void 0)return;let n=this.#i[r],i=this.#u(n)?n.__staleWhileFetching:n;if(i===void 0)return;let o={value:i};if(this.#v&&this.#I){let a=this.#v[r],s=this.#I[r];if(a&&s){let l=a-(ed.now()-s);o.ttl=l,o.start=Date.now()}}return this.#E&&(o.size=this.#E[r]),o}dump(){let e=[];for(let r of this.#P({allowStale:!0})){let n=this.#l[r],i=this.#i[r],o=this.#u(i)?i.__staleWhileFetching:i;if(o===void 0||n===void 0)continue;let a={value:o};if(this.#v&&this.#I){a.ttl=this.#v[r];let s=ed.now()-this.#I[r];a.start=Math.floor(Date.now()-s)}this.#E&&(a.size=this.#E[r]),e.unshift([n,a])}return e}load(e){this.clear();for(let[r,n]of e){if(n.start){let i=Date.now()-n.start;n.start=ed.now()-i}this.set(r,n.value,n)}}set(e,r,n={}){var f,p,h,m,y;if(r===void 0)return this.delete(e),this;let{ttl:i=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:l}=n,{noUpdateTTL:c=this.noUpdateTTL}=n,u=this.#M(e,r,n.size||0,s);if(this.maxEntrySize&&u>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#C(e,"set"),this;let d=this.#c===0?void 0:this.#s.get(e);if(d===void 0)d=this.#c===0?this.#f:this.#S.length!==0?this.#S.pop():this.#c===this.#e?this.#j(!1):this.#c,this.#l[d]=e,this.#i[d]=r,this.#s.set(e,d),this.#g[this.#f]=d,this.#y[d]=this.#f,this.#f=d,this.#c++,this.#O(d,u,l),l&&(l.set="add"),c=!1;else{this.#F(d);let g=this.#i[d];if(r!==g){if(this.#x&&this.#u(g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:v}=g;v!==void 0&&!a&&(this.#w&&((f=this.#o)==null||f.call(this,v,e,"set")),this.#h&&((p=this.#m)==null||p.push([v,e,"set"])))}else a||(this.#w&&((h=this.#o)==null||h.call(this,g,e,"set")),this.#h&&((m=this.#m)==null||m.push([g,e,"set"])));if(this.#D(d),this.#O(d,u,l),this.#i[d]=r,l){l.set="replace";let v=g&&this.#u(g)?g.__staleWhileFetching:g;v!==void 0&&(l.oldValue=v)}}else l&&(l.set="update")}if(i!==0&&!this.#v&&this.#A(),this.#v&&(c||this.#R(d,i,o),l&&this.#r(l,d)),!a&&this.#h&&this.#m){let g=this.#m,v;for(;v=g==null?void 0:g.shift();)(y=this.#n)==null||y.call(this,...v)}return this}pop(){var e;try{for(;this.#c;){let r=this.#i[this.#p];if(this.#j(!0),this.#u(r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(this.#h&&this.#m){let r=this.#m,n;for(;n=r==null?void 0:r.shift();)(e=this.#n)==null||e.call(this,...n)}}}#j(e){var o,a;let r=this.#p,n=this.#l[r],i=this.#i[r];return this.#x&&this.#u(i)?i.__abortController.abort(new Error("evicted")):(this.#w||this.#h)&&(this.#w&&((o=this.#o)==null||o.call(this,i,n,"evict")),this.#h&&((a=this.#m)==null||a.push([i,n,"evict"]))),this.#D(r),e&&(this.#l[r]=void 0,this.#i[r]=void 0,this.#S.push(r)),this.#c===1?(this.#p=this.#f=0,this.#S.length=0):this.#p=this.#g[r],this.#s.delete(n),this.#c--,r}has(e,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,o=this.#s.get(e);if(o!==void 0){let a=this.#i[o];if(this.#u(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#_(o))i&&(i.has="stale",this.#r(i,o));else return n&&this.#$(o),i&&(i.has="hit",this.#r(i,o)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){let{allowStale:n=this.allowStale}=r,i=this.#s.get(e);if(i===void 0||!n&&this.#_(i))return;let o=this.#i[i];return this.#u(o)?o.__staleWhileFetching:o}#z(e,r,n,i){let o=r===void 0?void 0:this.#i[r];if(this.#u(o))return o;let a=new Ib,{signal:s}=n;s==null||s.addEventListener("abort",()=>a.abort(s.reason),{signal:a.signal});let l={signal:a.signal,options:n,context:i},c=(m,y=!1)=>{let{aborted:g}=a.signal,v=n.ignoreFetchAbort&&m!==void 0;if(n.status&&(g&&!y?(n.status.fetchAborted=!0,n.status.fetchError=a.signal.reason,v&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),g&&!v&&!y)return d(a.signal.reason);let E=p;return this.#i[r]===p&&(m===void 0?E.__staleWhileFetching?this.#i[r]=E.__staleWhileFetching:this.#C(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(e,m,l.options))),m},u=m=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=m),d(m)),d=m=>{let{aborted:y}=a.signal,g=y&&n.allowStaleOnFetchAbort,v=g||n.allowStaleOnFetchRejection,E=v||n.noDeleteOnFetchRejection,x=p;if(this.#i[r]===p&&(!E||x.__staleWhileFetching===void 0?this.#C(e,"fetch"):g||(this.#i[r]=x.__staleWhileFetching)),v)return n.status&&x.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),x.__staleWhileFetching;if(x.__returned===x)throw m},f=(m,y)=>{var v;let g=(v=this.#a)==null?void 0:v.call(this,e,o,l);g&&g instanceof Promise&&g.then(E=>m(E===void 0?void 0:E),y),a.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(m(void 0),n.allowStaleOnFetchAbort&&(m=E=>c(E,!0)))})};n.status&&(n.status.fetchDispatched=!0);let p=new Promise(f).then(c,u),h=Object.assign(p,{__abortController:a,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(e,h,{...l.options,status:void 0}),r=this.#s.get(e)):this.#i[r]=h,h}#u(e){if(!this.#x)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Ib}async fetch(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:l=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:h=this.allowStaleOnFetchAbort,context:m,forceRefresh:y=!1,status:g,signal:v}=r;if(!this.#x)return g&&(g.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:g});let E={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:a,noDisposeOnSet:s,size:l,sizeCalculation:c,noUpdateTTL:u,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:h,ignoreFetchAbort:p,status:g,signal:v},x=this.#s.get(e);if(x===void 0){g&&(g.fetch="miss");let w=this.#z(e,x,E,m);return w.__returned=w}else{let w=this.#i[x];if(this.#u(w)){let D=n&&w.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",D&&(g.returnedStale=!0)),D?w.__staleWhileFetching:w.__returned=w}let A=this.#_(x);if(!y&&!A)return g&&(g.fetch="hit"),this.#F(x),i&&this.#$(x),g&&this.#r(g,x),w;let $=this.#z(e,x,E,m),T=$.__staleWhileFetching!==void 0&&n;return g&&(g.fetch=A?"stale":"refresh",T&&A&&(g.returnedStale=!0)),T?$.__staleWhileFetching:$.__returned=$}}async forceFetch(e,r={}){let n=await this.fetch(e,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,r={}){let n=this.#b;if(!n)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:o,...a}=r,s=this.get(e,a);if(!o&&s!==void 0)return s;let l=n(e,s,{options:a,context:i});return this.set(e,l,a),l}get(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:a}=r,s=this.#s.get(e);if(s!==void 0){let l=this.#i[s],c=this.#u(l);return a&&this.#r(a,s),this.#_(s)?(a&&(a.get="stale"),c?(a&&n&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?l.__staleWhileFetching:void 0):(o||this.#C(e,"expire"),a&&n&&(a.returnedStale=!0),n?l:void 0)):(a&&(a.get="hit"),c?l.__staleWhileFetching:(this.#F(s),i&&this.#$(s),l))}else a&&(a.get="miss")}#L(e,r){this.#y[r]=e,this.#g[e]=r}#F(e){e!==this.#f&&(e===this.#p?this.#p=this.#g[e]:this.#L(this.#y[e],this.#g[e]),this.#L(this.#f,e),this.#f=e)}delete(e){return this.#C(e,"delete")}#C(e,r){var i,o,a,s;let n=!1;if(this.#c!==0){let l=this.#s.get(e);if(l!==void 0)if(n=!0,this.#c===1)this.#B(r);else{this.#D(l);let c=this.#i[l];if(this.#u(c)?c.__abortController.abort(new Error("deleted")):(this.#w||this.#h)&&(this.#w&&((i=this.#o)==null||i.call(this,c,e,r)),this.#h&&((o=this.#m)==null||o.push([c,e,r]))),this.#s.delete(e),this.#l[l]=void 0,this.#i[l]=void 0,l===this.#f)this.#f=this.#y[l];else if(l===this.#p)this.#p=this.#g[l];else{let u=this.#y[l];this.#g[u]=this.#g[l];let d=this.#g[l];this.#y[d]=this.#y[l]}this.#c--,this.#S.push(l)}}if(this.#h&&((a=this.#m)!=null&&a.length)){let l=this.#m,c;for(;c=l==null?void 0:l.shift();)(s=this.#n)==null||s.call(this,...c)}return n}clear(){return this.#B("delete")}#B(e){var r,n,i;for(let o of this.#T({allowStale:!0})){let a=this.#i[o];if(this.#u(a))a.__abortController.abort(new Error("deleted"));else{let s=this.#l[o];this.#w&&((r=this.#o)==null||r.call(this,a,s,e)),this.#h&&((n=this.#m)==null||n.push([a,s,e]))}}if(this.#s.clear(),this.#i.fill(void 0),this.#l.fill(void 0),this.#v&&this.#I&&(this.#v.fill(0),this.#I.fill(0)),this.#E&&this.#E.fill(0),this.#p=0,this.#f=0,this.#S.length=0,this.#d=0,this.#c=0,this.#h&&this.#m){let o=this.#m,a;for(;a=o==null?void 0:o.shift();)(i=this.#n)==null||i.call(this,...a)}}};$b.LRUCache=nR});var dR=b(cn=>{"use strict";var TTe=cn&&cn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cn,"__esModule",{value:!0});cn.Minipass=cn.isWritable=cn.isReadable=cn.isStream=void 0;var qG=typeof process=="object"&&process?process:{stdout:null,stderr:null},uR=Q("node:events"),GG=TTe(Q("node:stream")),ATe=Q("node:string_decoder"),kTe=t=>!!t&&typeof t=="object"&&(t instanceof Db||t instanceof GG.default||(0,cn.isReadable)(t)||(0,cn.isWritable)(t));cn.isStream=kTe;var CTe=t=>!!t&&typeof t=="object"&&t instanceof uR.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==GG.default.Writable.prototype.pipe;cn.isReadable=CTe;var RTe=t=>!!t&&typeof t=="object"&&t instanceof uR.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function";cn.isWritable=RTe;var ta=Symbol("EOF"),ra=Symbol("maybeEmitEnd"),ds=Symbol("emittedEnd"),Pb=Symbol("emittingEnd"),nm=Symbol("emittedError"),Tb=Symbol("closed"),ZG=Symbol("read"),Ab=Symbol("flush"),HG=Symbol("flushChunk"),Ni=Symbol("encoding"),rd=Symbol("decoder"),fr=Symbol("flowing"),im=Symbol("paused"),nd=Symbol("resume"),pr=Symbol("buffer"),ln=Symbol("pipes"),hr=Symbol("bufferLength"),iR=Symbol("bufferPush"),kb=Symbol("bufferShift"),Zr=Symbol("objectMode"),Qt=Symbol("destroyed"),oR=Symbol("error"),aR=Symbol("emitData"),VG=Symbol("emitEnd"),sR=Symbol("emitEnd2"),ho=Symbol("async"),lR=Symbol("abort"),Cb=Symbol("aborted"),om=Symbol("signal"),Nl=Symbol("dataListeners"),Nn=Symbol("discarded"),am=t=>Promise.resolve().then(t),DTe=t=>t(),OTe=t=>t==="end"||t==="finish"||t==="prefinish",MTe=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,NTe=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Rb=class{src;dest;opts;ondrain;constructor(e,r,n){this.src=e,this.dest=r,this.opts=n,this.ondrain=()=>e[nd](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},cR=class extends Rb{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,n){super(e,r,n),this.proxyErrors=i=>r.emit("error",i),e.on("error",this.proxyErrors)}},jTe=t=>!!t.objectMode,zTe=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Db=class extends uR.EventEmitter{[fr]=!1;[im]=!1;[ln]=[];[pr]=[];[Zr];[Ni];[ho];[rd];[ta]=!1;[ds]=!1;[Pb]=!1;[Tb]=!1;[nm]=null;[hr]=0;[Qt]=!1;[om];[Cb]=!1;[Nl]=0;[Nn]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");jTe(r)?(this[Zr]=!0,this[Ni]=null):zTe(r)?(this[Ni]=r.encoding,this[Zr]=!1):(this[Zr]=!1,this[Ni]=null),this[ho]=!!r.async,this[rd]=this[Ni]?new ATe.StringDecoder(this[Ni]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[pr]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[ln]});let{signal:n}=r;n&&(this[om]=n,n.aborted?this[lR]():n.addEventListener("abort",()=>this[lR]()))}get bufferLength(){return this[hr]}get encoding(){return this[Ni]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Zr]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[ho]}set async(e){this[ho]=this[ho]||!!e}[lR](){var e,r;this[Cb]=!0,this.emit("abort",(e=this[om])==null?void 0:e.reason),this.destroy((r=this[om])==null?void 0:r.reason)}get aborted(){return this[Cb]}set aborted(e){}write(e,r,n){var o;if(this[Cb])return!1;if(this[ta])throw new Error("write after end");if(this[Qt])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(n=r,r="utf8"),r||(r="utf8");let i=this[ho]?am:DTe;if(!this[Zr]&&!Buffer.isBuffer(e)){if(NTe(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(MTe(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[Zr]?(this[fr]&&this[hr]!==0&&this[Ab](!0),this[fr]?this.emit("data",e):this[iR](e),this[hr]!==0&&this.emit("readable"),n&&i(n),this[fr]):e.length?(typeof e=="string"&&!(r===this[Ni]&&!((o=this[rd])!=null&&o.lastNeed))&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Ni]&&(e=this[rd].write(e)),this[fr]&&this[hr]!==0&&this[Ab](!0),this[fr]?this.emit("data",e):this[iR](e),this[hr]!==0&&this.emit("readable"),n&&i(n),this[fr]):(this[hr]!==0&&this.emit("readable"),n&&i(n),this[fr])}read(e){if(this[Qt])return null;if(this[Nn]=!1,this[hr]===0||e===0||e&&e>this[hr])return this[ra](),null;this[Zr]&&(e=null),this[pr].length>1&&!this[Zr]&&(this[pr]=[this[Ni]?this[pr].join(""):Buffer.concat(this[pr],this[hr])]);let r=this[ZG](e||null,this[pr][0]);return this[ra](),r}[ZG](e,r){if(this[Zr])this[kb]();else{let n=r;e===n.length||e===null?this[kb]():typeof n=="string"?(this[pr][0]=n.slice(e),r=n.slice(0,e),this[hr]-=e):(this[pr][0]=n.subarray(e),r=n.subarray(0,e),this[hr]-=e)}return this.emit("data",r),!this[pr].length&&!this[ta]&&this.emit("drain"),r}end(e,r,n){return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r="utf8"),e!==void 0&&this.write(e,r),n&&this.once("end",n),this[ta]=!0,this.writable=!1,(this[fr]||!this[im])&&this[ra](),this}[nd](){this[Qt]||(!this[Nl]&&!this[ln].length&&(this[Nn]=!0),this[im]=!1,this[fr]=!0,this.emit("resume"),this[pr].length?this[Ab]():this[ta]?this[ra]():this.emit("drain"))}resume(){return this[nd]()}pause(){this[fr]=!1,this[im]=!0,this[Nn]=!1}get destroyed(){return this[Qt]}get flowing(){return this[fr]}get paused(){return this[im]}[iR](e){this[Zr]?this[hr]+=1:this[hr]+=e.length,this[pr].push(e)}[kb](){return this[Zr]?this[hr]-=1:this[hr]-=this[pr][0].length,this[pr].shift()}[Ab](e=!1){do;while(this[HG](this[kb]())&&this[pr].length);!e&&!this[pr].length&&!this[ta]&&this.emit("drain")}[HG](e){return this.emit("data",e),this[fr]}pipe(e,r){if(this[Qt])return e;this[Nn]=!1;let n=this[ds];return r=r||{},e===qG.stdout||e===qG.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,n?r.end&&e.end():(this[ln].push(r.proxyErrors?new cR(this,e,r):new Rb(this,e,r)),this[ho]?am(()=>this[nd]()):this[nd]()),e}unpipe(e){let r=this[ln].find(n=>n.dest===e);r&&(this[ln].length===1?(this[fr]&&this[Nl]===0&&(this[fr]=!1),this[ln]=[]):this[ln].splice(this[ln].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let n=super.on(e,r);if(e==="data")this[Nn]=!1,this[Nl]++,!this[ln].length&&!this[fr]&&this[nd]();else if(e==="readable"&&this[hr]!==0)super.emit("readable");else if(OTe(e)&&this[ds])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[nm]){let i=r;this[ho]?am(()=>i.call(this,this[nm])):i.call(this,this[nm])}return n}removeListener(e,r){return this.off(e,r)}off(e,r){let n=super.off(e,r);return e==="data"&&(this[Nl]=this.listeners("data").length,this[Nl]===0&&!this[Nn]&&!this[ln].length&&(this[fr]=!1)),n}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Nl]=0,!this[Nn]&&!this[ln].length&&(this[fr]=!1)),r}get emittedEnd(){return this[ds]}[ra](){!this[Pb]&&!this[ds]&&!this[Qt]&&this[pr].length===0&&this[ta]&&(this[Pb]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Tb]&&this.emit("close"),this[Pb]=!1)}emit(e,...r){let n=r[0];if(e!=="error"&&e!=="close"&&e!==Qt&&this[Qt])return!1;if(e==="data")return!this[Zr]&&!n?!1:this[ho]?(am(()=>this[aR](n)),!0):this[aR](n);if(e==="end")return this[VG]();if(e==="close"){if(this[Tb]=!0,!this[ds]&&!this[Qt])return!1;let o=super.emit("close");return this.removeAllListeners("close"),o}else if(e==="error"){this[nm]=n,super.emit(oR,n);let o=!this[om]||this.listeners("error").length?super.emit("error",n):!1;return this[ra](),o}else if(e==="resume"){let o=super.emit("resume");return this[ra](),o}else if(e==="finish"||e==="prefinish"){let o=super.emit(e);return this.removeAllListeners(e),o}let i=super.emit(e,...r);return this[ra](),i}[aR](e){for(let n of this[ln])n.dest.write(e)===!1&&this.pause();let r=this[Nn]?!1:super.emit("data",e);return this[ra](),r}[VG](){return this[ds]?!1:(this[ds]=!0,this.readable=!1,this[ho]?(am(()=>this[sR]()),!0):this[sR]())}[sR](){if(this[rd]){let r=this[rd].end();if(r){for(let n of this[ln])n.dest.write(r);this[Nn]||super.emit("data",r)}}for(let r of this[ln])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[Zr]||(e.dataLength=0);let r=this.promise();return this.on("data",n=>{e.push(n),this[Zr]||(e.dataLength+=n.length)}),await r,e}async concat(){if(this[Zr])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Ni]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(Qt,()=>r(new Error("stream destroyed"))),this.on("error",n=>r(n)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Nn]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[ta])return r();let o,a,s=d=>{this.off("data",l),this.off("end",c),this.off(Qt,u),r(),a(d)},l=d=>{this.off("error",s),this.off("end",c),this.off(Qt,u),this.pause(),o({value:d,done:!!this[ta]})},c=()=>{this.off("error",s),this.off("data",l),this.off(Qt,u),r(),o({done:!0,value:void 0})},u=()=>s(new Error("stream destroyed"));return new Promise((d,f)=>{a=f,o=d,this.once(Qt,u),this.once("error",s),this.once("end",c),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Nn]=!1;let e=!1,r=()=>(this.pause(),this.off(oR,r),this.off(Qt,r),this.off("end",r),e=!0,{done:!0,value:void 0}),n=()=>{if(e)return r();let i=this.read();return i===null?r():{done:!1,value:i}};return this.once("end",r),this.once(oR,r),this.once(Qt,r),{next:n,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[Qt])return e?this.emit("error",e):this.emit(Qt),this;this[Qt]=!0,this[Nn]=!0,this[pr].length=0,this[hr]=0;let r=this;return typeof r.close=="function"&&!this[Tb]&&r.close(),e?this.emit("error",e):this.emit(Qt),this}static get isStream(){return cn.isStream}};cn.Minipass=Db});var lW=b(yt=>{"use strict";var LTe=yt&&yt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),FTe=yt&&yt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),BTe=yt&&yt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&<e(e,t,r);return FTe(e,t),e};Object.defineProperty(yt,"__esModule",{value:!0});yt.PathScurry=yt.Path=yt.PathScurryDarwin=yt.PathScurryPosix=yt.PathScurryWin32=yt.PathScurryBase=yt.PathPosix=yt.PathWin32=yt.PathBase=yt.ChildrenCache=yt.ResolveCache=void 0;var QG=UG(),zb=Q("node:path"),UTe=Q("node:url"),lm=Q("fs"),qTe=BTe(Q("node:fs")),ZTe=lm.realpathSync.native,Ob=Q("node:fs/promises"),WG=dR(),cm={lstatSync:lm.lstatSync,readdir:lm.readdir,readdirSync:lm.readdirSync,readlinkSync:lm.readlinkSync,realpathSync:ZTe,promises:{lstat:Ob.lstat,readdir:Ob.readdir,readlink:Ob.readlink,realpath:Ob.realpath}},eW=t=>!t||t===cm||t===qTe?cm:{...cm,...t,promises:{...cm.promises,...t.promises||{}}},tW=/^\\\\\?\\([a-z]:)\\?$/i,HTe=t=>t.replace(/\//g,"\\").replace(tW,"$1\\"),VTe=/[\\\/]/,pi=0,rW=1,nW=2,mo=4,iW=6,oW=8,jl=10,aW=12,fi=15,sm=~fi,fR=16,JG=32,um=64,ji=128,Mb=256,jb=512,KG=um|ji|jb,GTe=1023,pR=t=>t.isFile()?oW:t.isDirectory()?mo:t.isSymbolicLink()?jl:t.isCharacterDevice()?nW:t.isBlockDevice()?iW:t.isSocket()?aW:t.isFIFO()?rW:pi,YG=new Map,dm=t=>{let e=YG.get(t);if(e)return e;let r=t.normalize("NFKD");return YG.set(t,r),r},XG=new Map,Nb=t=>{let e=XG.get(t);if(e)return e;let r=dm(t.toLowerCase());return XG.set(t,r),r},fm=class extends QG.LRUCache{constructor(){super({max:256})}};yt.ResolveCache=fm;var Lb=class extends QG.LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}};yt.ChildrenCache=Lb;var sW=Symbol("PathScurry setAsCwd"),Pr=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#o;get mode(){return this.#o}#n;get nlink(){return this.#n}#a;get uid(){return this.#a}#b;get gid(){return this.#b}#c;get rdev(){return this.#c}#d;get blksize(){return this.#d}#s;get ino(){return this.#s}#l;get size(){return this.#l}#i;get blocks(){return this.#i}#g;get atimeMs(){return this.#g}#y;get mtimeMs(){return this.#y}#p;get ctimeMs(){return this.#p}#f;get birthtimeMs(){return this.#f}#S;get atime(){return this.#S}#m;get mtime(){return this.#m}#E;get ctime(){return this.#E}#I;get birthtime(){return this.#I}#v;#w;#x;#h;#A;#$;#r;#R;#_;#k;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,r=pi,n,i,o,a,s){this.name=e,this.#v=o?Nb(e):dm(e),this.#r=r>e,this.nocase=o,this.roots=i,this.root=n||this,this.#R=a,this.#x=s.fullpath,this.#A=s.relative,this.#$=s.relativePosix,this.parent=s.parent,this.parent?this.#e=this.parent.#e:this.#e=eW(s.fs)}depth(){return this.#w!==void 0?this.#w:this.parent?this.#w=this.parent.depth()+1:this.#w=0}childrenCache(){return this.#R}resolve(e){if(!e)return this;let r=this.getRootString(e),i=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#D(i):this.#D(i)}#D(e){let r=this;for(let n of e)r=r.child(n);return r}children(){let e=this.#R.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#R.set(this,r),this.#r&=~fR,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let n=this.children(),i=this.nocase?Nb(e):dm(e);for(let l of n)if(l.#v===i)return l;let o=this.parent?this.sep:"",a=this.#x?this.#x+o+e:void 0,s=this.newChild(e,pi,{...r,parent:this,fullpath:a});return this.canReaddir()||(s.#r|=ji),n.push(s),s}relative(){if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let e=this.name,r=this.parent;if(!r)return this.#A=this.name;let n=r.relative();return n+(!n||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#$!==void 0)return this.#$;let e=this.name,r=this.parent;if(!r)return this.#$=this.fullpathPosix();let n=r.relativePosix();return n+(!n||!r.parent?"":"/")+e}fullpath(){if(this.#x!==void 0)return this.#x;let e=this.name,r=this.parent;if(!r)return this.#x=this.name;let i=r.fullpath()+(r.parent?this.sep:"")+e;return this.#x=i}fullpathPosix(){if(this.#h!==void 0)return this.#h;if(this.sep==="/")return this.#h=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#h=`//?/${i}`:this.#h=i}let e=this.parent,r=e.fullpathPosix(),n=r+(!r||!e.parent?"":"/")+this.name;return this.#h=n}isUnknown(){return(this.#r&fi)===pi}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#r&fi)===oW}isDirectory(){return(this.#r&fi)===mo}isCharacterDevice(){return(this.#r&fi)===nW}isBlockDevice(){return(this.#r&fi)===iW}isFIFO(){return(this.#r&fi)===rW}isSocket(){return(this.#r&fi)===aW}isSymbolicLink(){return(this.#r&jl)===jl}lstatCached(){return this.#r&JG?this:void 0}readlinkCached(){return this.#_}realpathCached(){return this.#k}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#_)return!0;if(!this.parent)return!1;let e=this.#r&fi;return!(e!==pi&&e!==jl||this.#r&Mb||this.#r&ji)}calledReaddir(){return!!(this.#r&fR)}isENOENT(){return!!(this.#r&ji)}isNamed(e){return this.nocase?this.#v===Nb(e):this.#v===dm(e)}async readlink(){var r;let e=this.#_;if(e)return e;if(this.canReadlink()&&this.parent)try{let n=await this.#e.promises.readlink(this.fullpath()),i=(r=await this.parent.realpath())==null?void 0:r.resolve(n);if(i)return this.#_=i}catch(n){this.#u(n.code);return}}readlinkSync(){var r;let e=this.#_;if(e)return e;if(this.canReadlink()&&this.parent)try{let n=this.#e.readlinkSync(this.fullpath()),i=(r=this.parent.realpathSync())==null?void 0:r.resolve(n);if(i)return this.#_=i}catch(n){this.#u(n.code);return}}#O(e){this.#r|=fR;for(let r=e.provisional;r<e.length;r++){let n=e[r];n&&n.#M()}}#M(){this.#r&ji||(this.#r=(this.#r|ji)&sm,this.#P())}#P(){let e=this.children();e.provisional=0;for(let r of e)r.#M()}#T(){this.#r|=jb,this.#N()}#N(){if(this.#r&um)return;let e=this.#r;(e&fi)===mo&&(e&=sm),this.#r=e|um,this.#P()}#j(e=""){e==="ENOTDIR"||e==="EPERM"?this.#N():e==="ENOENT"?this.#M():this.children().provisional=0}#z(e=""){e==="ENOTDIR"?this.parent.#N():e==="ENOENT"&&this.#M()}#u(e=""){let r=this.#r;r|=Mb,e==="ENOENT"&&(r|=ji),(e==="EINVAL"||e==="UNKNOWN")&&(r&=sm),this.#r=r,e==="ENOTDIR"&&this.parent&&this.parent.#N()}#L(e,r){return this.#C(e,r)||this.#F(e,r)}#F(e,r){let n=pR(e),i=this.newChild(e.name,n,{parent:this}),o=i.#r&fi;return o!==mo&&o!==jl&&o!==pi&&(i.#r|=um),r.unshift(i),r.provisional++,i}#C(e,r){for(let n=r.provisional;n<r.length;n++){let i=r[n];if((this.nocase?Nb(e.name):dm(e.name))===i.#v)return this.#B(e,i,n,r)}}#B(e,r,n,i){let o=r.name;return r.#r=r.#r&sm|pR(e),o!==e.name&&(r.name=e.name),n!==i.provisional&&(n===i.length-1?i.pop():i.splice(n,1),i.unshift(r)),i.provisional++,r}async lstat(){if((this.#r&ji)===0)try{return this.#H(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#z(e.code)}}lstatSync(){if((this.#r&ji)===0)try{return this.#H(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#z(e.code)}}#H(e){let{atime:r,atimeMs:n,birthtime:i,birthtimeMs:o,blksize:a,blocks:s,ctime:l,ctimeMs:c,dev:u,gid:d,ino:f,mode:p,mtime:h,mtimeMs:m,nlink:y,rdev:g,size:v,uid:E}=e;this.#S=r,this.#g=n,this.#I=i,this.#f=o,this.#d=a,this.#i=s,this.#E=l,this.#p=c,this.#t=u,this.#b=d,this.#s=f,this.#o=p,this.#m=h,this.#y=m,this.#n=y,this.#c=g,this.#l=v,this.#a=E;let x=pR(e);this.#r=this.#r&sm|x|JG,x!==pi&&x!==mo&&x!==jl&&(this.#r|=um)}#q=[];#Z=!1;#V(e){this.#Z=!1;let r=this.#q.slice();this.#q.length=0,r.forEach(n=>n(null,e))}readdirCB(e,r=!1){if(!this.canReaddir()){r?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let o=n.slice(0,n.provisional);r?e(null,o):queueMicrotask(()=>e(null,o));return}if(this.#q.push(e),this.#Z)return;this.#Z=!0;let i=this.fullpath();this.#e.readdir(i,{withFileTypes:!0},(o,a)=>{if(o)this.#j(o.code),n.provisional=0;else{for(let s of a)this.#L(s,n);this.#O(n)}this.#V(n.slice(0,n.provisional))})}#U;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();if(this.#U)await this.#U;else{let n=()=>{};this.#U=new Promise(i=>n=i);try{for(let i of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#L(i,e);this.#O(e)}catch(i){this.#j(i.code),e.provisional=0}this.#U=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();try{for(let n of this.#e.readdirSync(r,{withFileTypes:!0}))this.#L(n,e);this.#O(e)}catch(n){this.#j(n.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#r&KG)return!1;let e=fi&this.#r;return e===pi||e===mo||e===jl}shouldWalk(e,r){return(this.#r&mo)===mo&&!(this.#r&KG)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#k)return this.#k;if(!((jb|Mb|ji)&this.#r))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#k=this.resolve(e)}catch{this.#T()}}realpathSync(){if(this.#k)return this.#k;if(!((jb|Mb|ji)&this.#r))try{let e=this.#e.realpathSync(this.fullpath());return this.#k=this.resolve(e)}catch{this.#T()}}[sW](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let r=new Set([]),n=[],i=this;for(;i&&i.parent;)r.add(i),i.#A=n.join(this.sep),i.#$=n.join("/"),i=i.parent,n.push("..");for(i=e;i&&i.parent&&!r.has(i);)i.#A=void 0,i.#$=void 0,i=i.parent}};yt.PathBase=Pr;var pm=class t extends Pr{sep="\\";splitSep=VTe;constructor(e,r=pi,n,i,o,a,s){super(e,r,n,i,o,a,s)}newChild(e,r=pi,n={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return zb.win32.parse(e).root}getRoot(e){if(e=HTe(e.toUpperCase()),e===this.root.name)return this.root;for(let[r,n]of Object.entries(this.roots))if(this.sameRoot(e,r))return this.roots[e]=n;return this.roots[e]=new gm(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(tW,"$1\\"),e===r}};yt.PathWin32=pm;var hm=class t extends Pr{splitSep="/";sep="/";constructor(e,r=pi,n,i,o,a,s){super(e,r,n,i,o,a,s)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=pi,n={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}};yt.PathPosix=hm;var mm=class{root;rootPath;roots;cwd;#e;#t;#o;nocase;#n;constructor(e=process.cwd(),r,n,{nocase:i,childrenCacheSize:o=16*1024,fs:a=cm}={}){this.#n=eW(a),(e instanceof URL||e.startsWith("file://"))&&(e=(0,UTe.fileURLToPath)(e));let s=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(s),this.#e=new fm,this.#t=new fm,this.#o=new Lb(o);let l=s.substring(this.rootPath.length).split(n);if(l.length===1&&!l[0]&&l.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#n),this.roots[this.rootPath]=this.root;let c=this.root,u=l.length-1,d=r.sep,f=this.rootPath,p=!1;for(let h of l){let m=u--;c=c.child(h,{relative:new Array(m).fill("..").join(d),relativePosix:new Array(m).fill("..").join("/"),fullpath:f+=(p?"":d)+h}),p=!0}this.cwd=c}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#o}resolve(...e){let r="";for(let o=e.length-1;o>=0;o--){let a=e[o];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let n=this.#e.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpath();return this.#e.set(r,i),i}resolvePosix(...e){let r="";for(let o=e.length-1;o>=0;o--){let a=e[o];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let n=this.#t.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpathPosix();return this.#t.set(r,i),i}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e,e=this.cwd);let{withFileTypes:n}=r;if(e.canReaddir()){let i=await e.readdir();return n?i:i.map(o=>o.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e,e=this.cwd);let{withFileTypes:n=!0}=r;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(i=>i.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e.withFileTypes,e=this.cwd);let n=await e.readlink();return r?n:n==null?void 0:n.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return r?n:n==null?void 0:n.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e.withFileTypes,e=this.cwd);let n=await e.realpath();return r?n:n==null?void 0:n.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return r?n:n==null?void 0:n.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,s=[];(!o||o(e))&&s.push(n?e:e.fullpath());let l=new Set,c=(d,f)=>{l.add(d),d.readdirCB((p,h)=>{if(p)return f(p);let m=h.length;if(!m)return f();let y=()=>{--m===0&&f()};for(let g of h)(!o||o(g))&&s.push(n?g:g.fullpath()),i&&g.isSymbolicLink()?g.realpath().then(v=>v!=null&&v.isUnknown()?v.lstat():v).then(v=>v!=null&&v.shouldWalk(l,a)?c(v,y):y()):g.shouldWalk(l,a)?c(g,y):y()},!0)},u=e;return new Promise((d,f)=>{c(u,p=>{if(p)return f(p);d(s)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,s=[];(!o||o(e))&&s.push(n?e:e.fullpath());let l=new Set([e]);for(let c of l){let u=c.readdirSync();for(let d of u){(!o||o(d))&&s.push(n?d:d.fullpath());let f=d;if(d.isSymbolicLink()){if(!(i&&(f=d.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(l,a)&&l.add(f)}}return s}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r;(!o||o(e))&&(yield n?e:e.fullpath());let s=new Set([e]);for(let l of s){let c=l.readdirSync();for(let u of c){(!o||o(u))&&(yield n?u:u.fullpath());let d=u;if(u.isSymbolicLink()){if(!(i&&(d=u.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(s,a)&&s.add(d)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,s=new WG.Minipass({objectMode:!0});(!o||o(e))&&s.write(n?e:e.fullpath());let l=new Set,c=[e],u=0,d=()=>{let f=!1;for(;!f;){let p=c.shift();if(!p){u===0&&s.end();return}u++,l.add(p);let h=(y,g,v=!1)=>{if(y)return s.emit("error",y);if(i&&!v){let E=[];for(let x of g)x.isSymbolicLink()&&E.push(x.realpath().then(w=>w!=null&&w.isUnknown()?w.lstat():w));if(E.length){Promise.all(E).then(()=>h(null,g,!0));return}}for(let E of g)E&&(!o||o(E))&&(s.write(n?E:E.fullpath())||(f=!0));u--;for(let E of g){let x=E.realpathCached()||E;x.shouldWalk(l,a)&&c.push(x)}f&&!s.flowing?s.once("drain",d):m||d()},m=!0;p.readdirCB(h,!0),m=!1}};return d(),s}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,s=new WG.Minipass({objectMode:!0}),l=new Set;(!o||o(e))&&s.write(n?e:e.fullpath());let c=[e],u=0,d=()=>{let f=!1;for(;!f;){let p=c.shift();if(!p){u===0&&s.end();return}u++,l.add(p);let h=p.readdirSync();for(let m of h)(!o||o(m))&&(s.write(n?m:m.fullpath())||(f=!0));u--;for(let m of h){let y=m;if(m.isSymbolicLink()){if(!(i&&(y=m.realpathSync())))continue;y.isUnknown()&&y.lstatSync()}y.shouldWalk(l,a)&&c.push(y)}}f&&!s.flowing&&s.once("drain",d)};return d(),s}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[sW](r)}};yt.PathScurryBase=mm;var gm=class extends mm{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:n=!0}=r;super(e,zb.win32,"\\",{...r,nocase:n}),this.nocase=n;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(e){return zb.win32.parse(e).root.toUpperCase()}newRoot(e){return new pm(this.rootPath,mo,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}};yt.PathScurryWin32=gm;var ym=class extends mm{sep="/";constructor(e=process.cwd(),r={}){let{nocase:n=!1}=r;super(e,zb.posix,"/",{...r,nocase:n}),this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new hm(this.rootPath,mo,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}};yt.PathScurryPosix=ym;var Fb=class extends ym{constructor(e=process.cwd(),r={}){let{nocase:n=!0}=r;super(e,{...r,nocase:n})}};yt.PathScurryDarwin=Fb;yt.Path=process.platform==="win32"?pm:hm;yt.PathScurry=process.platform==="win32"?gm:process.platform==="darwin"?Fb:ym});var mR=b(Bb=>{"use strict";Object.defineProperty(Bb,"__esModule",{value:!0});Bb.Pattern=void 0;var WTe=cs(),JTe=t=>t.length>=1,KTe=t=>t.length>=1,hR=class t{#e;#t;#o;length;#n;#a;#b;#c;#d;#s;#l=!0;constructor(e,r,n,i){if(!JTe(e))throw new TypeError("empty pattern list");if(!KTe(r))throw new TypeError("empty glob list");if(r.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=r,this.#o=n,this.#n=i,this.#o===0){if(this.isUNC()){let[o,a,s,l,...c]=this.#e,[u,d,f,p,...h]=this.#t;c[0]===""&&(c.shift(),h.shift());let m=[o,a,s,l,""].join("/"),y=[u,d,f,p,""].join("/");this.#e=[m,...c],this.#t=[y,...h],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[o,...a]=this.#e,[s,...l]=this.#t;a[0]===""&&(a.shift(),l.shift());let c=o+"/",u=s+"/";this.#e=[c,...a],this.#t=[u,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#o]}isString(){return typeof this.#e[this.#o]=="string"}isGlobstar(){return this.#e[this.#o]===WTe.GLOBSTAR}isRegExp(){return this.#e[this.#o]instanceof RegExp}globString(){return this.#b=this.#b||(this.#o===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#o).join("/"))}hasMore(){return this.length>this.#o+1}rest(){return this.#a!==void 0?this.#a:this.hasMore()?(this.#a=new t(this.#e,this.#t,this.#o+1,this.#n),this.#a.#s=this.#s,this.#a.#d=this.#d,this.#a.#c=this.#c,this.#a):this.#a=null}isUNC(){let e=this.#e;return this.#d!==void 0?this.#d:this.#d=this.#n==="win32"&&this.#o===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=this.#n==="win32"&&this.#o===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#s!==void 0?this.#s:this.#s=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#o===0?e:""}checkFollowGlobstar(){return!(this.#o===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#o===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}};Bb.Pattern=hR});var yR=b(Ub=>{"use strict";Object.defineProperty(Ub,"__esModule",{value:!0});Ub.Ignore=void 0;var cW=cs(),YTe=mR(),XTe=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",gR=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:r,nocase:n,noext:i,noglobstar:o,platform:a=XTe}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=a,this.mmopts={dot:!0,nobrace:r,nocase:n,noext:i,noglobstar:o,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let s of e)this.add(s)}add(e){let r=new cW.Minimatch(e,this.mmopts);for(let n=0;n<r.set.length;n++){let i=r.set[n],o=r.globParts[n];if(!i||!o)throw new Error("invalid pattern object");for(;i[0]==="."&&o[0]===".";)i.shift(),o.shift();let a=new YTe.Pattern(i,o,0,this.platform),s=new cW.Minimatch(a.globString(),this.mmopts),l=o[o.length-1]==="**",c=a.isAbsolute();c?this.absolute.push(s):this.relative.push(s),l&&(c?this.absoluteChildren.push(s):this.relativeChildren.push(s))}}ignored(e){let r=e.fullpath(),n=`${r}/`,i=e.relative()||".",o=`${i}/`;for(let a of this.relative)if(a.match(i)||a.match(o))return!0;for(let a of this.absolute)if(a.match(r)||a.match(n))return!0;return!1}childrenIgnored(e){let r=e.fullpath()+"/",n=(e.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(n))return!0;for(let i of this.absoluteChildren)if(i.match(r))return!0;return!1}};Ub.Ignore=gR});var dW=b(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.Processor=go.SubWalks=go.MatchRecord=go.HasWalkedCache=void 0;var uW=cs(),qb=class t{store;constructor(e=new Map){this.store=e}copy(){return new t(new Map(this.store))}hasWalked(e,r){var n;return(n=this.store.get(e.fullpath()))==null?void 0:n.has(r.globString())}storeWalked(e,r){let n=e.fullpath(),i=this.store.get(n);i?i.add(r.globString()):this.store.set(n,new Set([r.globString()]))}};go.HasWalkedCache=qb;var Zb=class{store=new Map;add(e,r,n){let i=(r?2:0)|(n?1:0),o=this.store.get(e);this.store.set(e,o===void 0?i:i&o)}entries(){return[...this.store.entries()].map(([e,r])=>[e,!!(r&2),!!(r&1)])}};go.MatchRecord=Zb;var Hb=class{store=new Map;add(e,r){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(i=>i.globString()===r.globString())||n.push(r):this.store.set(e,[r])}get(e){let r=this.store.get(e);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};go.SubWalks=Hb;var _R=class t{hasWalkedCache;matches=new Zb;subwalks=new Hb;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new qb}processPatterns(e,r){this.patterns=r;let n=r.map(i=>[e,i]);for(let[i,o]of n){this.hasWalkedCache.storeWalked(i,o);let a=o.root(),s=o.isAbsolute()&&this.opts.absolute!==!1;if(a){i=i.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let d=o.rest();if(d)o=d;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let l,c,u=!1;for(;typeof(l=o.pattern())=="string"&&(c=o.rest());)i=i.resolve(l),o=c,u=!0;if(l=o.pattern(),c=o.rest(),u){if(this.hasWalkedCache.hasWalked(i,o))continue;this.hasWalkedCache.storeWalked(i,o)}if(typeof l=="string"){let d=l===".."||l===""||l===".";this.matches.add(i.resolve(l),s,d);continue}else if(l===uW.GLOBSTAR){(!i.isSymbolicLink()||this.follow||o.checkFollowGlobstar())&&this.subwalks.add(i,o);let d=c==null?void 0:c.pattern(),f=c==null?void 0:c.rest();if(!c||(d===""||d===".")&&!f)this.matches.add(i,s,d===""||d===".");else if(d===".."){let p=i.parent||i;f?this.hasWalkedCache.hasWalked(p,f)||this.subwalks.add(p,f):this.matches.add(p,s,!0)}}else l instanceof RegExp&&this.subwalks.add(i,o)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(e,r){let n=this.subwalks.get(e),i=this.child();for(let o of r)for(let a of n){let s=a.isAbsolute(),l=a.pattern(),c=a.rest();l===uW.GLOBSTAR?i.testGlobstar(o,a,c,s):l instanceof RegExp?i.testRegExp(o,l,c,s):i.testString(o,l,c,s)}return i}testGlobstar(e,r,n,i){if((this.dot||!e.name.startsWith("."))&&(r.hasMore()||this.matches.add(e,i,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,r):e.isSymbolicLink()&&(n&&r.checkFollowGlobstar()?this.subwalks.add(e,n):r.markFollowGlobstar()&&this.subwalks.add(e,r)))),n){let o=n.pattern();if(typeof o=="string"&&o!==".."&&o!==""&&o!==".")this.testString(e,o,n.rest(),i);else if(o===".."){let a=e.parent||e;this.subwalks.add(a,n)}else o instanceof RegExp&&this.testRegExp(e,o,n.rest(),i)}}testRegExp(e,r,n,i){r.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}testString(e,r,n,i){e.isNamed(r)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}};go.Processor=_R});var hW=b(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});fs.GlobStream=fs.GlobWalker=fs.GlobUtil=void 0;var QTe=dR(),fW=yR(),pW=dW(),eAe=(t,e)=>typeof t=="string"?new fW.Ignore([t],e):Array.isArray(t)?new fW.Ignore(t,e):t,_m=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#o;signal;maxDepth;includeChildMatches;constructor(e,r,n){if(this.patterns=e,this.path=r,this.opts=n,this.#o=!n.posix&&n.platform==="win32"?"\\":"/",this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#t=eAe(n.ignore??[],n),!this.includeChildMatches&&typeof this.#t.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#n(e){var r,n;return this.seen.has(e)||!!((n=(r=this.#t)==null?void 0:r.ignored)!=null&&n.call(r,e))}#a(e){var r,n;return!!((n=(r=this.#t)==null?void 0:r.childrenIgnored)!=null&&n.call(r,e))}pause(){this.paused=!0}resume(){var r;if((r=this.signal)!=null&&r.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){var r;(r=this.signal)!=null&&r.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let o=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&(o!=null&&o.isSymbolicLink())){let a=await o.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(o,r)}matchCheckTest(e,r){var n;return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!r||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!((n=e.realpathCached())!=null&&n.isDirectory()))&&!this.#n(e)?e:void 0}matchCheckSync(e,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let o=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&(o!=null&&o.isSymbolicLink())){let a=o.realpathSync();a&&(a!=null&&a.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(o,r)}matchFinish(e,r){var o;if(this.#n(e))return;if(!this.includeChildMatches&&((o=this.#t)!=null&&o.add)){let a=`${e.relativePosix()}/**`;this.#t.add(a)}let n=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(e);let i=this.opts.mark&&e.isDirectory()?this.#o:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let a=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(a+i)}else{let a=this.opts.posix?e.relativePosix():e.relative(),s=this.opts.dotRelative&&!a.startsWith(".."+this.#o)?"."+this.#o:"";this.matchEmit(a?s+a+i:"."+i)}}async match(e,r,n){let i=await this.matchCheck(e,n);i&&this.matchFinish(i,r)}matchSync(e,r,n){let i=this.matchCheckSync(e,n);i&&this.matchFinish(i,r)}walkCB(e,r,n){var i;(i=this.signal)!=null&&i.aborted&&n(),this.walkCB2(e,r,new pW.Processor(this.opts),n)}walkCB2(e,r,n,i){var s;if(this.#a(e))return i();if((s=this.signal)!=null&&s.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(e,r,n,i));return}n.processPatterns(e,r);let o=1,a=()=>{--o===0&&i()};for(let[l,c,u]of n.matches.entries())this.#n(l)||(o++,this.match(l,c,u).then(()=>a()));for(let l of n.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;o++;let c=l.readdirCached();l.calledReaddir()?this.walkCB3(l,c,n,a):l.readdirCB((u,d)=>this.walkCB3(l,d,n,a),!0)}a()}walkCB3(e,r,n,i){n=n.filterEntries(e,r);let o=1,a=()=>{--o===0&&i()};for(let[s,l,c]of n.matches.entries())this.#n(s)||(o++,this.match(s,l,c).then(()=>a()));for(let[s,l]of n.subwalks.entries())o++,this.walkCB2(s,l,n.child(),a);a()}walkCBSync(e,r,n){var i;(i=this.signal)!=null&&i.aborted&&n(),this.walkCB2Sync(e,r,new pW.Processor(this.opts),n)}walkCB2Sync(e,r,n,i){var s;if(this.#a(e))return i();if((s=this.signal)!=null&&s.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(e,r,n,i));return}n.processPatterns(e,r);let o=1,a=()=>{--o===0&&i()};for(let[l,c,u]of n.matches.entries())this.#n(l)||this.matchSync(l,c,u);for(let l of n.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;o++;let c=l.readdirSync();this.walkCB3Sync(l,c,n,a)}a()}walkCB3Sync(e,r,n,i){n=n.filterEntries(e,r);let o=1,a=()=>{--o===0&&i()};for(let[s,l,c]of n.matches.entries())this.#n(s)||this.matchSync(s,l,c);for(let[s,l]of n.subwalks.entries())o++,this.walkCB2Sync(s,l,n.child(),a);a()}};fs.GlobUtil=_m;var vR=class extends _m{matches=new Set;constructor(e,r,n){super(e,r,n)}matchEmit(e){this.matches.add(e)}async walk(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((r,n)=>{this.walkCB(this.path,this.patterns,()=>{var i;(i=this.signal)!=null&&i.aborted?n(this.signal.reason):r(this.matches)})}),this.matches}walkSync(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{var r;if((r=this.signal)!=null&&r.aborted)throw this.signal.reason}),this.matches}};fs.GlobWalker=vR;var bR=class extends _m{results;constructor(e,r,n){super(e,r,n),this.results=new QTe.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};fs.GlobStream=bR});var xR=b(Wb=>{"use strict";Object.defineProperty(Wb,"__esModule",{value:!0});Wb.Glob=void 0;var tAe=cs(),rAe=Q("node:url"),Vb=lW(),nAe=mR(),Gb=hW(),iAe=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",wR=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,rAe.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.includeChildMatches=r.includeChildMatches!==!1,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=r.platform||iAe,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=r.platform==="win32"?Vb.PathScurryWin32:r.platform==="darwin"?Vb.PathScurryDarwin:r.platform?Vb.PathScurryPosix:Vb.PathScurry;this.scurry=new l(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",i={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},o=this.pattern.map(l=>new tAe.Minimatch(l,i)),[a,s]=o.reduce((l,c)=>(l[0].push(...c.set),l[1].push(...c.globParts),l),[[],[]]);this.patterns=a.map((l,c)=>{let u=s[c];if(!u)throw new Error("invalid pattern object");return new nAe.Pattern(l,u,0,this.platform)})}async walk(){return[...await new Gb.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new Gb.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Gb.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Gb.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};Wb.Glob=wR});var SR=b(Jb=>{"use strict";Object.defineProperty(Jb,"__esModule",{value:!0});Jb.hasMagic=void 0;var oAe=cs(),aAe=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new oAe.Minimatch(r,e).hasMagic())return!0;return!1};Jb.hasMagic=aAe});var _W=b(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.glob=Ke.sync=Ke.iterate=Ke.iterateSync=Ke.stream=Ke.streamSync=Ke.Ignore=Ke.hasMagic=Ke.Glob=Ke.unescape=Ke.escape=void 0;Ke.globStreamSync=vm;Ke.globStream=ER;Ke.globSync=IR;Ke.globIterateSync=bm;Ke.globIterate=$R;var mW=cs(),zl=xR(),sAe=SR(),yW=cs();Object.defineProperty(Ke,"escape",{enumerable:!0,get:function(){return yW.escape}});Object.defineProperty(Ke,"unescape",{enumerable:!0,get:function(){return yW.unescape}});var lAe=xR();Object.defineProperty(Ke,"Glob",{enumerable:!0,get:function(){return lAe.Glob}});var cAe=SR();Object.defineProperty(Ke,"hasMagic",{enumerable:!0,get:function(){return cAe.hasMagic}});var uAe=yR();Object.defineProperty(Ke,"Ignore",{enumerable:!0,get:function(){return uAe.Ignore}});function vm(t,e={}){return new zl.Glob(t,e).streamSync()}function ER(t,e={}){return new zl.Glob(t,e).stream()}function IR(t,e={}){return new zl.Glob(t,e).walkSync()}async function gW(t,e={}){return new zl.Glob(t,e).walk()}function bm(t,e={}){return new zl.Glob(t,e).iterateSync()}function $R(t,e={}){return new zl.Glob(t,e).iterate()}Ke.streamSync=vm;Ke.stream=Object.assign(ER,{sync:vm});Ke.iterateSync=bm;Ke.iterate=Object.assign($R,{sync:bm});Ke.sync=Object.assign(IR,{stream:vm,iterate:bm});Ke.glob=Object.assign(gW,{glob:gW,globSync:IR,sync:Ke.sync,globStream:ER,stream:Ke.stream,globStreamSync:vm,streamSync:Ke.streamSync,globIterate:$R,iterate:Ke.iterate,globIterateSync:bm,iterateSync:Ke.iterateSync,Glob:zl.Glob,hasMagic:sAe.hasMagic,escape:mW.escape,unescape:mW.unescape});Ke.glob.glob=Ke.glob});var xW=b((N7e,wW)=>{var bW=WA(),id=Q("path"),PR=HH(),dAe=aG(),fAe=yG(),pAe=EG(),hAe=_W(),Ll=wW.exports={},vW=/[\/\\]/g,mAe=function(t,e){var r=[];return PR(t).forEach(function(n){var i=n.indexOf("!")===0;i&&(n=n.slice(1));var o=e(n);i?r=dAe(r,o):r=fAe(r,o)}),r};Ll.exists=function(){var t=id.join.apply(id,arguments);return bW.existsSync(t)};Ll.expand=function(...t){var e=pAe(t[0])?t.shift():{},r=Array.isArray(t[0])?t[0]:t;if(r.length===0)return[];var n=mAe(r,function(i){return hAe.sync(i,e)});return e.filter&&(n=n.filter(function(i){i=id.join(e.cwd||"",i);try{return typeof e.filter=="function"?e.filter(i):bW.statSync(i)[e.filter]()}catch{return!1}})),n};Ll.expandMapping=function(t,e,r){r=Object.assign({rename:function(o,a){return id.join(o||"",a)}},r);var n=[],i={};return Ll.expand(r,t).forEach(function(o){var a=o;r.flatten&&(a=id.basename(a)),r.ext&&(a=a.replace(/(\.[^\/]*)?$/,r.ext));var s=r.rename(e,a,r);r.cwd&&(o=id.join(r.cwd,o)),s=s.replace(vW,"/"),o=o.replace(vW,"/"),i[s]?i[s].src.push(o):(n.push({src:[o],dest:s}),i[s]=n[n.length-1])}),n};Ll.normalizeFilesArray=function(t){var e=[];return t.forEach(function(r){var n;("src"in r||"dest"in r)&&e.push(r)}),e.length===0?[]:(e=_(e).chain().forEach(function(r){!("src"in r)||!r.src||(Array.isArray(r.src)?r.src=PR(r.src):r.src=[r.src])}).map(function(r){var n=Object.assign({},r);if(delete n.src,delete n.dest,r.expand)return Ll.expandMapping(r.src,r.dest,n).map(function(o){var a=Object.assign({},r);return a.orig=Object.assign({},r),a.src=o.src,a.dest=o.dest,["expand","cwd","flatten","rename","ext"].forEach(function(s){delete a[s]}),a});var i=Object.assign({},r);return i.orig=Object.assign({},r),"src"in i&&Object.defineProperty(i,"src",{enumerable:!0,get:function o(){var a;return"result"in o||(a=r.src,a=Array.isArray(a)?PR(a):[a],o.result=Ll.expand(n,a)),o.result}}),"dest"in i&&(i.dest=r.dest),i}).flatten().value(),e)}});var od=b((z7e,IW)=>{var TR=WA(),SW=Q("path"),gAe=gv(),yAe=Wq(),EW=_k(),_Ae=T9(),j7e=Q("stream").Stream,vAe=Ol().PassThrough,jn=IW.exports={};jn.file=xW();jn.collectStream=function(t,e){var r=[],n=0;t.on("error",e),t.on("data",function(i){r.push(i),n+=i.length}),t.on("end",function(){var i=Buffer.alloc(n),o=0;r.forEach(function(a){a.copy(i,o),o+=a.length}),e(null,i)})};jn.dateify=function(t){return t=t||new Date,t instanceof Date?t=t:typeof t=="string"?t=new Date(t):t=new Date,t};jn.defaults=function(t,e,r){var n=arguments;return n[0]=n[0]||{},_Ae(...n)};jn.isStream=function(t){return gAe(t)};jn.lazyReadStream=function(t){return new yAe.Readable(function(){return TR.createReadStream(t)})};jn.normalizeInputSource=function(t){return t===null?Buffer.alloc(0):typeof t=="string"?Buffer.from(t):jn.isStream(t)?t.pipe(new vAe):t};jn.sanitizePath=function(t){return EW(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")};jn.trailingSlashIt=function(t){return t.slice(-1)!=="/"?t+"/":t};jn.unixifyPath=function(t){return EW(t,!1).replace(/^\w+:/,"")};jn.walkdir=function(t,e,r){var n=[];typeof e=="function"&&(r=e,e=t),TR.readdir(t,function(i,o){var a=0,s,l;if(i)return r(i);(function c(){if(s=o[a++],!s)return r(null,n);l=SW.join(t,s),TR.stat(l,function(u,d){n.push({path:l,relative:SW.relative(e,l).replace(/\\/g,"/"),stats:d}),d&&d.isDirectory()?jn.walkdir(l,e,function(f,p){if(f)return r(f);p.forEach(function(h){n.push(h)}),c()}):c()})})()})}});var AW=b((PW,TW)=>{var bAe=Q("util"),wAe={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function $W(t,e){Error.captureStackTrace(this,this.constructor),this.message=wAe[t]||t,this.code=t,this.data=e}bAe.inherits($W,Error);PW=TW.exports=$W});var OW=b((L7e,DW)=>{var CR=Q("fs"),CW=zU(),kW=FU(),AR=Q("path"),yo=od(),xAe=Q("util").inherits,Kt=AW(),RW=Ol().Transform,kR=process.platform==="win32",pt=function(t,e){if(!(this instanceof pt))return new pt(t,e);typeof t!="string"&&(e=t,t="zip"),e=this.options=yo.defaults(e,{highWaterMark:1024*1024,statConcurrency:4}),RW.call(this,e),this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=kW.queue(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=kW.queue(this._onStatQueueTask.bind(this),e.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};xAe(pt,RW);pt.prototype._abort=function(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()};pt.prototype._append=function(t,e){e=e||{};var r={source:null,filepath:t};e.name||(e.name=t),e.sourcePath=t,r.data=e,this._entriesCount++,e.stats&&e.stats instanceof CR.Stats?(r=this._updateQueueTaskWithStats(r,e.stats),r&&(e.stats.size&&(this._fsEntriesTotalBytes+=e.stats.size),this._queue.push(r))):this._statQueue.push(r)};pt.prototype._finalize=function(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)};pt.prototype._maybeFinalize=function(){return this._state.finalizing||this._state.finalized||this._state.aborted?!1:this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()?(this._finalize(),!0):!1};pt.prototype._moduleAppend=function(t,e,r){if(this._state.aborted){r();return}this._module.append(t,e,function(n){if(this._task=null,this._state.aborted){this._shutdown();return}if(n){this.emit("error",n),setImmediate(r);return}this.emit("entry",e),this._entriesProcessedCount++,e.stats&&e.stats.size&&(this._fsEntriesProcessedBytes+=e.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(r)}.bind(this))};pt.prototype._moduleFinalize=function(){typeof this._module.finalize=="function"?this._module.finalize():typeof this._module.end=="function"?this._module.end():this.emit("error",new Kt("NOENDMETHOD"))};pt.prototype._modulePipe=function(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0};pt.prototype._moduleSupports=function(t){return!this._module.supports||!this._module.supports[t]?!1:this._module.supports[t]};pt.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1};pt.prototype._normalizeEntryData=function(t,e){t=yo.defaults(t,{type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),e&&t.stats===!1&&(t.stats=e);var r=t.type==="directory";return t.name&&(typeof t.prefix=="string"&&t.prefix!==""&&(t.name=t.prefix+"/"+t.name,t.prefix=null),t.name=yo.sanitizePath(t.name),t.type!=="symlink"&&t.name.slice(-1)==="/"?(r=!0,t.type="directory"):r&&(t.name+="/")),typeof t.mode=="number"?kR?t.mode&=511:t.mode&=4095:t.stats&&t.mode===null?(kR?t.mode=t.stats.mode&511:t.mode=t.stats.mode&4095,kR&&r&&(t.mode=493)):t.mode===null&&(t.mode=r?493:420),t.stats&&t.date===null?t.date=t.stats.mtime:t.date=yo.dateify(t.date),t};pt.prototype._onModuleError=function(t){this.emit("error",t)};pt.prototype._onQueueDrain=function(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()};pt.prototype._onQueueTask=function(t,e){var r=()=>{t.data.callback&&t.data.callback(),e()};if(this._state.finalizing||this._state.finalized||this._state.aborted){r();return}this._task=t,this._moduleAppend(t.source,t.data,r)};pt.prototype._onStatQueueTask=function(t,e){if(this._state.finalizing||this._state.finalized||this._state.aborted){e();return}CR.lstat(t.filepath,function(r,n){if(this._state.aborted){setImmediate(e);return}if(r){this._entriesCount--,this.emit("warning",r),setImmediate(e);return}t=this._updateQueueTaskWithStats(t,n),t&&(n.size&&(this._fsEntriesTotalBytes+=n.size),this._queue.push(t)),setImmediate(e)}.bind(this))};pt.prototype._shutdown=function(){this._moduleUnpipe(),this.end()};pt.prototype._transform=function(t,e,r){t&&(this._pointer+=t.length),r(null,t)};pt.prototype._updateQueueTaskWithStats=function(t,e){if(e.isFile())t.data.type="file",t.data.sourceType="stream",t.source=yo.lazyReadStream(t.filepath);else if(e.isDirectory()&&this._moduleSupports("directory"))t.data.name=yo.trailingSlashIt(t.data.name),t.data.type="directory",t.data.sourcePath=yo.trailingSlashIt(t.filepath),t.data.sourceType="buffer",t.source=Buffer.concat([]);else if(e.isSymbolicLink()&&this._moduleSupports("symlink")){var r=CR.readlinkSync(t.filepath),n=AR.dirname(t.filepath);t.data.type="symlink",t.data.linkname=AR.relative(n,AR.resolve(n,r)),t.data.sourceType="buffer",t.source=Buffer.concat([])}else return e.isDirectory()?this.emit("warning",new Kt("DIRECTORYNOTSUPPORTED",t.data)):e.isSymbolicLink()?this.emit("warning",new Kt("SYMLINKNOTSUPPORTED",t.data)):this.emit("warning",new Kt("ENTRYNOTSUPPORTED",t.data)),null;return t.data=this._normalizeEntryData(t.data,e),t};pt.prototype.abort=function(){return this._state.aborted||this._state.finalized?this:(this._abort(),this)};pt.prototype.append=function(t,e){if(this._state.finalize||this._state.aborted)return this.emit("error",new Kt("QUEUECLOSED")),this;if(e=this._normalizeEntryData(e),typeof e.name!="string"||e.name.length===0)return this.emit("error",new Kt("ENTRYNAMEREQUIRED")),this;if(e.type==="directory"&&!this._moduleSupports("directory"))return this.emit("error",new Kt("DIRECTORYNOTSUPPORTED",{name:e.name})),this;if(t=yo.normalizeInputSource(t),Buffer.isBuffer(t))e.sourceType="buffer";else if(yo.isStream(t))e.sourceType="stream";else return this.emit("error",new Kt("INPUTSTEAMBUFFERREQUIRED",{name:e.name})),this;return this._entriesCount++,this._queue.push({data:e,source:t}),this};pt.prototype.directory=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new Kt("QUEUECLOSED")),this;if(typeof t!="string"||t.length===0)return this.emit("error",new Kt("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,e===!1?e="":typeof e!="string"&&(e=t);var n=!1;typeof r=="function"?(n=r,r={}):typeof r!="object"&&(r={});var i={stat:!0,dot:!0};function o(){this._pending--,this._maybeFinalize()}function a(c){this.emit("error",c)}function s(c){l.pause();var u=!1,d=Object.assign({},r);d.name=c.relative,d.prefix=e,d.stats=c.stat,d.callback=l.resume.bind(l);try{if(n){if(d=n(d),d===!1)u=!0;else if(typeof d!="object")throw new Kt("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:t})}}catch(f){this.emit("error",f);return}if(u){l.resume();return}this._append(c.absolute,d)}var l=CW(t,i);return l.on("error",a.bind(this)),l.on("match",s.bind(this)),l.on("end",o.bind(this)),this};pt.prototype.file=function(t,e){return this._state.finalize||this._state.aborted?(this.emit("error",new Kt("QUEUECLOSED")),this):typeof t!="string"||t.length===0?(this.emit("error",new Kt("FILEFILEPATHREQUIRED")),this):(this._append(t,e),this)};pt.prototype.glob=function(t,e,r){this._pending++,e=yo.defaults(e,{stat:!0,pattern:t});function n(){this._pending--,this._maybeFinalize()}function i(s){this.emit("error",s)}function o(s){a.pause();var l=Object.assign({},r);l.callback=a.resume.bind(a),l.stats=s.stat,l.name=s.relative,this._append(s.absolute,l)}var a=CW(e.cwd||".",e);return a.on("error",i.bind(this)),a.on("match",o.bind(this)),a.on("end",n.bind(this)),this};pt.prototype.finalize=function(){if(this._state.aborted){var t=new Kt("ABORTED");return this.emit("error",t),Promise.reject(t)}if(this._state.finalize){var e=new Kt("FINALIZING");return this.emit("error",e),Promise.reject(e)}this._state.finalize=!0,this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var r=this;return new Promise(function(n,i){var o;r._module.on("end",function(){o||n()}),r._module.on("error",function(a){o=!0,i(a)})})};pt.prototype.setFormat=function(t){return this._format?(this.emit("error",new Kt("FORMATSET")),this):(this._format=t,this)};pt.prototype.setModule=function(t){return this._state.aborted?(this.emit("error",new Kt("ABORTED")),this):this._state.module?(this.emit("error",new Kt("MODULESET")),this):(this._module=t,this._modulePipe(),this)};pt.prototype.symlink=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new Kt("QUEUECLOSED")),this;if(typeof t!="string"||t.length===0)return this.emit("error",new Kt("SYMLINKFILEPATHREQUIRED")),this;if(typeof e!="string"||e.length===0)return this.emit("error",new Kt("SYMLINKTARGETREQUIRED",{filepath:t})),this;if(!this._moduleSupports("symlink"))return this.emit("error",new Kt("SYMLINKNOTSUPPORTED",{filepath:t})),this;var n={};return n.type="symlink",n.name=t.replace(/\\/g,"/"),n.linkname=e.replace(/\\/g,"/"),n.sourceType="buffer",typeof r=="number"&&(n.mode=r),this._entriesCount++,this._queue.push({data:n,source:Buffer.concat([])}),this};pt.prototype.pointer=function(){return this._pointer};pt.prototype.use=function(t){return this._streams.push(t),this};DW.exports=pt});var Yb=b((F7e,MW)=>{var Kb=MW.exports=function(){};Kb.prototype.getName=function(){};Kb.prototype.getSize=function(){};Kb.prototype.getLastModifiedDate=function(){};Kb.prototype.isDirectory=function(){}});var Xb=b((B7e,NW)=>{var hi=NW.exports={};hi.dateToDos=function(t,e){e=e||!1;var r=e?t.getFullYear():t.getUTCFullYear();if(r<1980)return 2162688;if(r>=2044)return 2141175677;var n={year:r,month:e?t.getMonth():t.getUTCMonth(),date:e?t.getDate():t.getUTCDate(),hours:e?t.getHours():t.getUTCHours(),minutes:e?t.getMinutes():t.getUTCMinutes(),seconds:e?t.getSeconds():t.getUTCSeconds()};return n.year-1980<<25|n.month+1<<21|n.date<<16|n.hours<<11|n.minutes<<5|n.seconds/2};hi.dosToDate=function(t){return new Date((t>>25&127)+1980,(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(t&31)<<1)};hi.fromDosTime=function(t){return hi.dosToDate(t.readUInt32LE(0))};hi.getEightBytes=function(t){var e=Buffer.alloc(8);return e.writeUInt32LE(t%4294967296,0),e.writeUInt32LE(t/4294967296|0,4),e};hi.getShortBytes=function(t){var e=Buffer.alloc(2);return e.writeUInt16LE((t&65535)>>>0,0),e};hi.getShortBytesValue=function(t,e){return t.readUInt16LE(e)};hi.getLongBytes=function(t){var e=Buffer.alloc(4);return e.writeUInt32LE((t&4294967295)>>>0,0),e};hi.getLongBytesValue=function(t,e){return t.readUInt32LE(e)};hi.toDosTime=function(t){return hi.getLongBytes(hi.dateToDos(t))}});var RR=b((U7e,UW)=>{var jW=Xb(),zW=8,LW=1,SAe=4,EAe=2,FW=64,BW=2048,Tr=UW.exports=function(){return this instanceof Tr?(this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this):new Tr};Tr.prototype.encode=function(){return jW.getShortBytes((this.descriptor?zW:0)|(this.utf8?BW:0)|(this.encryption?LW:0)|(this.strongEncryption?FW:0))};Tr.prototype.parse=function(t,e){var r=jW.getShortBytesValue(t,e),n=new Tr;return n.useDataDescriptor((r&zW)!==0),n.useUTF8ForNames((r&BW)!==0),n.useStrongEncryption((r&FW)!==0),n.useEncryption((r&LW)!==0),n.setSlidingDictionarySize((r&EAe)!==0?8192:4096),n.setNumberOfShannonFanoTrees((r&SAe)!==0?3:2),n};Tr.prototype.setNumberOfShannonFanoTrees=function(t){this.numberOfShannonFanoTrees=t};Tr.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees};Tr.prototype.setSlidingDictionarySize=function(t){this.slidingDictionarySize=t};Tr.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize};Tr.prototype.useDataDescriptor=function(t){this.descriptor=t};Tr.prototype.usesDataDescriptor=function(){return this.descriptor};Tr.prototype.useEncryption=function(t){this.encryption=t};Tr.prototype.usesEncryption=function(){return this.encryption};Tr.prototype.useStrongEncryption=function(t){this.strongEncryption=t};Tr.prototype.usesStrongEncryption=function(){return this.strongEncryption};Tr.prototype.useUTF8ForNames=function(t){this.utf8=t};Tr.prototype.usesUTF8ForNames=function(){return this.utf8}});var ZW=b((q7e,qW)=>{qW.exports={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420}});var DR=b((Z7e,HW)=>{HW.exports={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from(Array(2)),LONG:4,LONG_ZERO:Buffer.from(Array(4)),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1}});var OR=b((H7e,KW)=>{var IAe=Q("util").inherits,$Ae=_k(),GW=Yb(),WW=RR(),VW=ZW(),un=DR(),JW=Xb(),He=KW.exports=function(t){if(!(this instanceof He))return new He(t);GW.call(this),this.platform=un.PLATFORM_FAT,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new WW,this.crc=0,this.time=-1,this.minver=un.MIN_VERSION_INITIAL,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,t&&this.setName(t)};IAe(He,GW);He.prototype.getCentralDirectoryExtra=function(){return this.getExtra()};He.prototype.getComment=function(){return this.comment!==null?this.comment:""};He.prototype.getCompressedSize=function(){return this.csize};He.prototype.getCrc=function(){return this.crc};He.prototype.getExternalAttributes=function(){return this.exattr};He.prototype.getExtra=function(){return this.extra!==null?this.extra:un.EMPTY};He.prototype.getGeneralPurposeBit=function(){return this.gpb};He.prototype.getInternalAttributes=function(){return this.inattr};He.prototype.getLastModifiedDate=function(){return this.getTime()};He.prototype.getLocalFileDataExtra=function(){return this.getExtra()};He.prototype.getMethod=function(){return this.method};He.prototype.getName=function(){return this.name};He.prototype.getPlatform=function(){return this.platform};He.prototype.getSize=function(){return this.size};He.prototype.getTime=function(){return this.time!==-1?JW.dosToDate(this.time):-1};He.prototype.getTimeDos=function(){return this.time!==-1?this.time:0};He.prototype.getUnixMode=function(){return this.platform!==un.PLATFORM_UNIX?0:this.getExternalAttributes()>>un.SHORT_SHIFT&un.SHORT_MASK};He.prototype.getVersionNeededToExtract=function(){return this.minver};He.prototype.setComment=function(t){Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=t};He.prototype.setCompressedSize=function(t){if(t<0)throw new Error("invalid entry compressed size");this.csize=t};He.prototype.setCrc=function(t){if(t<0)throw new Error("invalid entry crc32");this.crc=t};He.prototype.setExternalAttributes=function(t){this.exattr=t>>>0};He.prototype.setExtra=function(t){this.extra=t};He.prototype.setGeneralPurposeBit=function(t){if(!(t instanceof WW))throw new Error("invalid entry GeneralPurposeBit");this.gpb=t};He.prototype.setInternalAttributes=function(t){this.inattr=t};He.prototype.setMethod=function(t){if(t<0)throw new Error("invalid entry compression method");this.method=t};He.prototype.setName=function(t,e=!1){t=$Ae(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),e&&(t=`/${t}`),Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=t};He.prototype.setPlatform=function(t){this.platform=t};He.prototype.setSize=function(t){if(t<0)throw new Error("invalid entry size");this.size=t};He.prototype.setTime=function(t,e){if(!(t instanceof Date))throw new Error("invalid entry time");this.time=JW.dateToDos(t,e)};He.prototype.setUnixMode=function(t){t|=this.isDirectory()?un.S_IFDIR:un.S_IFREG;var e=0;e|=t<<un.SHORT_SHIFT|(this.isDirectory()?un.S_DOS_D:un.S_DOS_A),this.setExternalAttributes(e),this.mode=t&un.MODE_MASK,this.platform=un.PLATFORM_UNIX};He.prototype.setVersionNeededToExtract=function(t){this.minver=t};He.prototype.isDirectory=function(){return this.getName().slice(-1)==="/"};He.prototype.isUnixSymlink=function(){return(this.getUnixMode()&VW.FILE_TYPE_FLAG)===VW.LINK_FLAG};He.prototype.isZip64=function(){return this.csize>un.ZIP64_MAGIC||this.size>un.ZIP64_MAGIC}});var MR=b((G7e,YW)=>{var V7e=Q("stream").Stream,PAe=Ol().PassThrough,TAe=gv(),AAe=YW.exports={};AAe.normalizeInputSource=function(t){if(t===null)return Buffer.alloc(0);if(typeof t=="string")return Buffer.from(t);if(TAe(t)&&!t._readableState){var e=new PAe;return t.pipe(e),e}return t}});var jR=b((W7e,XW)=>{var kAe=Q("util").inherits,CAe=gv(),NR=Ol().Transform,RAe=Yb(),DAe=MR(),zn=XW.exports=function(t){if(!(this instanceof zn))return new zn(t);NR.call(this,t),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}};kAe(zn,NR);zn.prototype._appendBuffer=function(t,e,r){};zn.prototype._appendStream=function(t,e,r){};zn.prototype._emitErrorCallback=function(t){t&&this.emit("error",t)};zn.prototype._finish=function(t){};zn.prototype._normalizeEntry=function(t){};zn.prototype._transform=function(t,e,r){r(null,t)};zn.prototype.entry=function(t,e,r){if(e=e||null,typeof r!="function"&&(r=this._emitErrorCallback.bind(this)),!(t instanceof RAe)){r(new Error("not a valid instance of ArchiveEntry"));return}if(this._archive.finish||this._archive.finished){r(new Error("unacceptable entry after finish"));return}if(this._archive.processing){r(new Error("already processing an entry"));return}if(this._archive.processing=!0,this._normalizeEntry(t),this._entry=t,e=DAe.normalizeInputSource(e),Buffer.isBuffer(e))this._appendBuffer(t,e,r);else if(CAe(e))this._appendStream(t,e,r);else{this._archive.processing=!1,r(new Error("input source must be valid Stream or Buffer instance"));return}return this};zn.prototype.finish=function(){if(this._archive.processing){this._archive.finish=!0;return}this._finish()};zn.prototype.getBytesWritten=function(){return this.offset};zn.prototype.write=function(t,e){return t&&(this.offset+=t.length),NR.prototype.write.call(this,t,e)}});var Qb=b(zR=>{var QW;(function(t){typeof DO_NOT_EXPORT_CRC>"u"?typeof zR=="object"?t(zR):typeof define=="function"&&define.amd?define(function(){var e={};return t(e),e}):t(QW={}):t(QW={})})(function(t){t.version="1.2.2";function e(){for(var $=0,R=new Array(256),T=0;T!=256;++T)$=T,$=$&1?-306674912^$>>>1:$>>>1,$=$&1?-306674912^$>>>1:$>>>1,$=$&1?-306674912^$>>>1:$>>>1,$=$&1?-306674912^$>>>1:$>>>1,$=$&1?-306674912^$>>>1:$>>>1,$=$&1?-306674912^$>>>1:$>>>1,$=$&1?-306674912^$>>>1:$>>>1,$=$&1?-306674912^$>>>1:$>>>1,R[T]=$;return typeof Int32Array<"u"?new Int32Array(R):R}var r=e();function n($){var R=0,T=0,D=0,k=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(D=0;D!=256;++D)k[D]=$[D];for(D=0;D!=256;++D)for(T=$[D],R=256+D;R<4096;R+=256)T=k[R]=T>>>8^$[T&255];var M=[];for(D=1;D!=16;++D)M[D-1]=typeof Int32Array<"u"?k.subarray(D*256,D*256+256):k.slice(D*256,D*256+256);return M}var i=n(r),o=i[0],a=i[1],s=i[2],l=i[3],c=i[4],u=i[5],d=i[6],f=i[7],p=i[8],h=i[9],m=i[10],y=i[11],g=i[12],v=i[13],E=i[14];function x($,R){for(var T=R^-1,D=0,k=$.length;D<k;)T=T>>>8^r[(T^$.charCodeAt(D++))&255];return~T}function w($,R){for(var T=R^-1,D=$.length-15,k=0;k<D;)T=E[$[k++]^T&255]^v[$[k++]^T>>8&255]^g[$[k++]^T>>16&255]^y[$[k++]^T>>>24]^m[$[k++]]^h[$[k++]]^p[$[k++]]^f[$[k++]]^d[$[k++]]^u[$[k++]]^c[$[k++]]^l[$[k++]]^s[$[k++]]^a[$[k++]]^o[$[k++]]^r[$[k++]];for(D+=15;k<D;)T=T>>>8^r[(T^$[k++])&255];return~T}function A($,R){for(var T=R^-1,D=0,k=$.length,M=0,U=0;D<k;)M=$.charCodeAt(D++),M<128?T=T>>>8^r[(T^M)&255]:M<2048?(T=T>>>8^r[(T^(192|M>>6&31))&255],T=T>>>8^r[(T^(128|M&63))&255]):M>=55296&&M<57344?(M=(M&1023)+64,U=$.charCodeAt(D++)&1023,T=T>>>8^r[(T^(240|M>>8&7))&255],T=T>>>8^r[(T^(128|M>>2&63))&255],T=T>>>8^r[(T^(128|U>>6&15|(M&3)<<4))&255],T=T>>>8^r[(T^(128|U&63))&255]):(T=T>>>8^r[(T^(224|M>>12&15))&255],T=T>>>8^r[(T^(128|M>>6&63))&255],T=T>>>8^r[(T^(128|M&63))&255]);return~T}t.table=r,t.bstr=x,t.buf=w,t.str=A})});var tJ=b((K7e,eJ)=>{"use strict";var{Transform:OAe}=Ol(),MAe=Qb(),LR=class extends OAe{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(e,r,n){e&&(this.checksum=MAe.buf(e,this.checksum)>>>0,this.rawSize+=e.length),n(null,e)}digest(e){let r=Buffer.allocUnsafe(4);return r.writeUInt32BE(this.checksum>>>0,0),e?r.toString(e):r}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}};eJ.exports=LR});var nJ=b((Y7e,rJ)=>{"use strict";var{DeflateRaw:NAe}=Q("zlib"),jAe=Qb(),FR=class extends NAe{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(e,r){return e&&(this.compressedSize+=e.length),super.push(e,r)}_transform(e,r,n){e&&(this.checksum=jAe.buf(e,this.checksum)>>>0,this.rawSize+=e.length),super._transform(e,r,n)}digest(e){let r=Buffer.allocUnsafe(4);return r.writeUInt32BE(this.checksum>>>0,0),e?r.toString(e):r}hex(){return this.digest("hex").toUpperCase()}size(e=!1){return e?this.compressedSize:this.rawSize}};rJ.exports=FR});var BR=b((X7e,iJ)=>{"use strict";iJ.exports={CRC32Stream:tJ(),DeflateCRC32Stream:nJ()}});var sJ=b((rZe,aJ)=>{var zAe=Q("util").inherits,LAe=Qb(),{CRC32Stream:FAe}=BR(),{DeflateCRC32Stream:BAe}=BR(),oJ=jR(),Q7e=OR(),eZe=RR(),Oe=DR(),tZe=MR(),ye=Xb(),mr=aJ.exports=function(t){if(!(this instanceof mr))return new mr(t);t=this.options=this._defaults(t),oJ.call(this,t),this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:t.forceZip64,forceLocalTime:t.forceLocalTime}};zAe(mr,oJ);mr.prototype._afterAppend=function(t){this._entries.push(t),t.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(t),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()};mr.prototype._appendBuffer=function(t,e,r){e.length===0&&t.setMethod(Oe.METHOD_STORED);var n=t.getMethod();if(n===Oe.METHOD_STORED&&(t.setSize(e.length),t.setCompressedSize(e.length),t.setCrc(LAe.buf(e)>>>0)),this._writeLocalFileHeader(t),n===Oe.METHOD_STORED){this.write(e),this._afterAppend(t),r(null,t);return}else if(n===Oe.METHOD_DEFLATED){this._smartStream(t,r).end(e);return}else{r(new Error("compression method "+n+" not implemented"));return}};mr.prototype._appendStream=function(t,e,r){t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(Oe.MIN_VERSION_DATA_DESCRIPTOR),this._writeLocalFileHeader(t);var n=this._smartStream(t,r);e.once("error",function(i){n.emit("error",i),n.end()}),e.pipe(n)};mr.prototype._defaults=function(t){return typeof t!="object"&&(t={}),typeof t.zlib!="object"&&(t.zlib={}),typeof t.zlib.level!="number"&&(t.zlib.level=Oe.ZLIB_BEST_SPEED),t.forceZip64=!!t.forceZip64,t.forceLocalTime=!!t.forceLocalTime,t};mr.prototype._finish=function(){this._archive.centralOffset=this.offset,this._entries.forEach(function(t){this._writeCentralFileHeader(t)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()};mr.prototype._normalizeEntry=function(t){t.getMethod()===-1&&t.setMethod(Oe.METHOD_DEFLATED),t.getMethod()===Oe.METHOD_DEFLATED&&(t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(Oe.MIN_VERSION_DATA_DESCRIPTOR)),t.getTime()===-1&&t.setTime(new Date,this._archive.forceLocalTime),t._offsets={file:0,data:0,contents:0}};mr.prototype._smartStream=function(t,e){var r=t.getMethod()===Oe.METHOD_DEFLATED,n=r?new BAe(this.options.zlib):new FAe,i=null;function o(){var a=n.digest().readUInt32BE(0);t.setCrc(a),t.setSize(n.size()),t.setCompressedSize(n.size(!0)),this._afterAppend(t),e(i,t)}return n.once("end",o.bind(this)),n.once("error",function(a){i=a}),n.pipe(this,{end:!1}),n};mr.prototype._writeCentralDirectoryEnd=function(){var t=this._entries.length,e=this._archive.centralLength,r=this._archive.centralOffset;this.isZip64()&&(t=Oe.ZIP64_MAGIC_SHORT,e=Oe.ZIP64_MAGIC,r=Oe.ZIP64_MAGIC),this.write(ye.getLongBytes(Oe.SIG_EOCD)),this.write(Oe.SHORT_ZERO),this.write(Oe.SHORT_ZERO),this.write(ye.getShortBytes(t)),this.write(ye.getShortBytes(t)),this.write(ye.getLongBytes(e)),this.write(ye.getLongBytes(r));var n=this.getComment(),i=Buffer.byteLength(n);this.write(ye.getShortBytes(i)),this.write(n)};mr.prototype._writeCentralDirectoryZip64=function(){this.write(ye.getLongBytes(Oe.SIG_ZIP64_EOCD)),this.write(ye.getEightBytes(44)),this.write(ye.getShortBytes(Oe.MIN_VERSION_ZIP64)),this.write(ye.getShortBytes(Oe.MIN_VERSION_ZIP64)),this.write(Oe.LONG_ZERO),this.write(Oe.LONG_ZERO),this.write(ye.getEightBytes(this._entries.length)),this.write(ye.getEightBytes(this._entries.length)),this.write(ye.getEightBytes(this._archive.centralLength)),this.write(ye.getEightBytes(this._archive.centralOffset)),this.write(ye.getLongBytes(Oe.SIG_ZIP64_EOCD_LOC)),this.write(Oe.LONG_ZERO),this.write(ye.getEightBytes(this._archive.centralOffset+this._archive.centralLength)),this.write(ye.getLongBytes(1))};mr.prototype._writeCentralFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),n=t._offsets.file,i=t.getSize(),o=t.getCompressedSize();if(t.isZip64()||n>Oe.ZIP64_MAGIC){i=Oe.ZIP64_MAGIC,o=Oe.ZIP64_MAGIC,n=Oe.ZIP64_MAGIC,t.setVersionNeededToExtract(Oe.MIN_VERSION_ZIP64);var a=Buffer.concat([ye.getShortBytes(Oe.ZIP64_EXTRA_ID),ye.getShortBytes(24),ye.getEightBytes(t.getSize()),ye.getEightBytes(t.getCompressedSize()),ye.getEightBytes(t._offsets.file)],28);t.setExtra(a)}this.write(ye.getLongBytes(Oe.SIG_CFH)),this.write(ye.getShortBytes(t.getPlatform()<<8|Oe.VERSION_MADEBY)),this.write(ye.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(ye.getShortBytes(r)),this.write(ye.getLongBytes(t.getTimeDos())),this.write(ye.getLongBytes(t.getCrc())),this.write(ye.getLongBytes(o)),this.write(ye.getLongBytes(i));var s=t.getName(),l=t.getComment(),c=t.getCentralDirectoryExtra();e.usesUTF8ForNames()&&(s=Buffer.from(s),l=Buffer.from(l)),this.write(ye.getShortBytes(s.length)),this.write(ye.getShortBytes(c.length)),this.write(ye.getShortBytes(l.length)),this.write(Oe.SHORT_ZERO),this.write(ye.getShortBytes(t.getInternalAttributes())),this.write(ye.getLongBytes(t.getExternalAttributes())),this.write(ye.getLongBytes(n)),this.write(s),this.write(c),this.write(l)};mr.prototype._writeDataDescriptor=function(t){this.write(ye.getLongBytes(Oe.SIG_DD)),this.write(ye.getLongBytes(t.getCrc())),t.isZip64()?(this.write(ye.getEightBytes(t.getCompressedSize())),this.write(ye.getEightBytes(t.getSize()))):(this.write(ye.getLongBytes(t.getCompressedSize())),this.write(ye.getLongBytes(t.getSize())))};mr.prototype._writeLocalFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),n=t.getName(),i=t.getLocalFileDataExtra();t.isZip64()&&(e.useDataDescriptor(!0),t.setVersionNeededToExtract(Oe.MIN_VERSION_ZIP64)),e.usesUTF8ForNames()&&(n=Buffer.from(n)),t._offsets.file=this.offset,this.write(ye.getLongBytes(Oe.SIG_LFH)),this.write(ye.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(ye.getShortBytes(r)),this.write(ye.getLongBytes(t.getTimeDos())),t._offsets.data=this.offset,e.usesDataDescriptor()?(this.write(Oe.LONG_ZERO),this.write(Oe.LONG_ZERO),this.write(Oe.LONG_ZERO)):(this.write(ye.getLongBytes(t.getCrc())),this.write(ye.getLongBytes(t.getCompressedSize())),this.write(ye.getLongBytes(t.getSize()))),this.write(ye.getShortBytes(n.length)),this.write(ye.getShortBytes(i.length)),this.write(n),this.write(i),t._offsets.contents=this.offset};mr.prototype.getComment=function(t){return this._archive.comment!==null?this._archive.comment:""};mr.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>Oe.ZIP64_MAGIC_SHORT||this._archive.centralLength>Oe.ZIP64_MAGIC||this._archive.centralOffset>Oe.ZIP64_MAGIC};mr.prototype.setComment=function(t){this._archive.comment=t}});var UR=b((nZe,lJ)=>{lJ.exports={ArchiveEntry:Yb(),ZipArchiveEntry:OR(),ArchiveOutputStream:jR(),ZipArchiveOutputStream:sJ()}});var uJ=b((iZe,cJ)=>{var UAe=Q("util").inherits,ZR=UR().ZipArchiveOutputStream,qAe=UR().ZipArchiveEntry,qR=od(),ad=cJ.exports=function(t){if(!(this instanceof ad))return new ad(t);t=this.options=t||{},t.zlib=t.zlib||{},ZR.call(this,t),typeof t.level=="number"&&t.level>=0&&(t.zlib.level=t.level,delete t.level),!t.forceZip64&&typeof t.zlib.level=="number"&&t.zlib.level===0&&(t.store=!0),t.namePrependSlash=t.namePrependSlash||!1,t.comment&&t.comment.length>0&&this.setComment(t.comment)};UAe(ad,ZR);ad.prototype._normalizeFileData=function(t){t=qR.defaults(t,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""});var e=t.type==="directory",r=t.type==="symlink";return t.name&&(t.name=qR.sanitizePath(t.name),!r&&t.name.slice(-1)==="/"?(e=!0,t.type="directory"):e&&(t.name+="/")),(e||r)&&(t.store=!0),t.date=qR.dateify(t.date),t};ad.prototype.entry=function(t,e,r){if(typeof r!="function"&&(r=this._emitErrorCallback.bind(this)),e=this._normalizeFileData(e),e.type!=="file"&&e.type!=="directory"&&e.type!=="symlink"){r(new Error(e.type+" entries not currently supported"));return}if(typeof e.name!="string"||e.name.length===0){r(new Error("entry name must be a non-empty string value"));return}if(e.type==="symlink"&&typeof e.linkname!="string"){r(new Error("entry linkname must be a non-empty string value when type equals symlink"));return}var n=new qAe(e.name);return n.setTime(e.date,this.options.forceLocalTime),e.namePrependSlash&&n.setName(e.name,!0),e.store&&n.setMethod(0),e.comment.length>0&&n.setComment(e.comment),e.type==="symlink"&&typeof e.mode!="number"&&(e.mode=40960),typeof e.mode=="number"&&(e.type==="symlink"&&(e.mode|=40960),n.setUnixMode(e.mode)),e.type==="symlink"&&typeof e.linkname=="string"&&(t=Buffer.from(e.linkname)),ZR.prototype.entry.call(this,n,t,r)};ad.prototype.finalize=function(){this.finish()}});var fJ=b((oZe,dJ)=>{var ZAe=uJ(),HAe=od(),ps=function(t){if(!(this instanceof ps))return new ps(t);t=this.options=HAe.defaults(t,{comment:"",forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new ZAe(t)};ps.prototype.append=function(t,e,r){this.engine.entry(t,e,r)};ps.prototype.finalize=function(){this.engine.finalize()};ps.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)};ps.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)};ps.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)};dJ.exports=ps});var hJ=b((aZe,pJ)=>{pJ.exports=Q("events")});var gJ=b((lZe,mJ)=>{mJ.exports=class{constructor(e){if(!(e>0)||(e-1&e)!==0)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(e),this.mask=e-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)}push(e){return this.buffer[this.top]!==void 0?!1:(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0)}shift(){let e=this.buffer[this.btm];if(e!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===void 0}}});var HR=b((uZe,_J)=>{var yJ=gJ();_J.exports=class{constructor(e){this.hwm=e||16,this.head=new yJ(this.hwm),this.tail=this.head,this.length=0}clear(){this.head=this.tail,this.head.clear(),this.length=0}push(e){if(this.length++,!this.head.push(e)){let r=this.head;this.head=r.next=new yJ(2*this.head.buffer.length),this.head.push(e)}}shift(){this.length!==0&&this.length--;let e=this.tail.shift();if(e===void 0&&this.tail.next){let r=this.tail.next;return this.tail.next=null,this.tail=r,this.tail.shift()}return e}peek(){let e=this.tail.peek();return e===void 0&&this.tail.next?this.tail.next.peek():e}isEmpty(){return this.length===0}}});var sd=b((dZe,vJ)=>{function VAe(t){return Buffer.isBuffer(t)||t instanceof Uint8Array}function GAe(t){return Buffer.isEncoding(t)}function WAe(t,e,r){return Buffer.alloc(t,e,r)}function JAe(t){return Buffer.allocUnsafe(t)}function KAe(t){return Buffer.allocUnsafeSlow(t)}function YAe(t,e){return Buffer.byteLength(t,e)}function XAe(t,e){return Buffer.compare(t,e)}function QAe(t,e){return Buffer.concat(t,e)}function eke(t,e,r,n,i){return St(t).copy(e,r,n,i)}function tke(t,e){return St(t).equals(e)}function rke(t,e,r,n,i){return St(t).fill(e,r,n,i)}function nke(t,e,r){return Buffer.from(t,e,r)}function ike(t,e,r,n){return St(t).includes(e,r,n)}function oke(t,e,r,n){return St(t).indexOf(e,r,n)}function ake(t,e,r,n){return St(t).lastIndexOf(e,r,n)}function ske(t){return St(t).swap16()}function lke(t){return St(t).swap32()}function cke(t){return St(t).swap64()}function St(t){return Buffer.isBuffer(t)?t:Buffer.from(t.buffer,t.byteOffset,t.byteLength)}function uke(t,e,r,n){return St(t).toString(e,r,n)}function dke(t,e,r,n,i){return St(t).write(e,r,n,i)}function fke(t,e){return St(t).readDoubleBE(e)}function pke(t,e){return St(t).readDoubleLE(e)}function hke(t,e){return St(t).readFloatBE(e)}function mke(t,e){return St(t).readFloatLE(e)}function gke(t,e){return St(t).readInt32BE(e)}function yke(t,e){return St(t).readInt32LE(e)}function _ke(t,e){return St(t).readUInt32BE(e)}function vke(t,e){return St(t).readUInt32LE(e)}function bke(t,e,r){return St(t).writeDoubleBE(e,r)}function wke(t,e,r){return St(t).writeDoubleLE(e,r)}function xke(t,e,r){return St(t).writeFloatBE(e,r)}function Ske(t,e,r){return St(t).writeFloatLE(e,r)}function Eke(t,e,r){return St(t).writeInt32BE(e,r)}function Ike(t,e,r){return St(t).writeInt32LE(e,r)}function $ke(t,e,r){return St(t).writeUInt32BE(e,r)}function Pke(t,e,r){return St(t).writeUInt32LE(e,r)}vJ.exports={isBuffer:VAe,isEncoding:GAe,alloc:WAe,allocUnsafe:JAe,allocUnsafeSlow:KAe,byteLength:YAe,compare:XAe,concat:QAe,copy:eke,equals:tke,fill:rke,from:nke,includes:ike,indexOf:oke,lastIndexOf:ake,swap16:ske,swap32:lke,swap64:cke,toBuffer:St,toString:uke,write:dke,readDoubleBE:fke,readDoubleLE:pke,readFloatBE:hke,readFloatLE:mke,readInt32BE:gke,readInt32LE:yke,readUInt32BE:_ke,readUInt32LE:vke,writeDoubleBE:bke,writeDoubleLE:wke,writeFloatBE:xke,writeFloatLE:Ske,writeInt32BE:Eke,writeInt32LE:Ike,writeUInt32BE:$ke,writeUInt32LE:Pke}});var wJ=b((pZe,bJ)=>{var Tke=sd();bJ.exports=class{constructor(e){this.encoding=e}get remaining(){return 0}decode(e){return Tke.toString(e,this.encoding)}flush(){return""}}});var SJ=b((mZe,xJ)=>{var Ake=sd();xJ.exports=class{constructor(){this.codePoint=0,this.bytesSeen=0,this.bytesNeeded=0,this.lowerBoundary=128,this.upperBoundary=191}get remaining(){return this.bytesSeen}decode(e){if(this.bytesNeeded===0){let n=!0;for(let i=Math.max(0,e.byteLength-4),o=e.byteLength;i<o&&n;i++)n=e[i]<=127;if(n)return Ake.toString(e,"utf8")}let r="";for(let n=0,i=e.byteLength;n<i;n++){let o=e[n];if(this.bytesNeeded===0){o<=127?r+=String.fromCharCode(o):(this.bytesSeen=1,o>=194&&o<=223?(this.bytesNeeded=2,this.codePoint=o&31):o>=224&&o<=239?(o===224?this.lowerBoundary=160:o===237&&(this.upperBoundary=159),this.bytesNeeded=3,this.codePoint=o&15):o>=240&&o<=244?(o===240&&(this.lowerBoundary=144),o===244&&(this.upperBoundary=143),this.bytesNeeded=4,this.codePoint=o&7):r+="�");continue}if(o<this.lowerBoundary||o>this.upperBoundary){this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191,r+="�";continue}this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|o&63,this.bytesSeen++,this.bytesSeen===this.bytesNeeded&&(r+=String.fromCodePoint(this.codePoint),this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0)}return r}flush(){let e=this.bytesNeeded>0?"�":"";return this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191,e}}});var IJ=b((yZe,EJ)=>{var kke=wJ(),Cke=SJ();EJ.exports=class{constructor(e="utf8"){switch(this.encoding=Rke(e),this.encoding){case"utf8":this.decoder=new Cke;break;case"utf16le":case"base64":throw new Error("Unsupported encoding: "+this.encoding);default:this.decoder=new kke(this.encoding)}}get remaining(){return this.decoder.remaining}push(e){return typeof e=="string"?e:this.decoder.decode(e)}write(e){return this.push(e)}end(e){let r="";return e&&(r=this.push(e)),r+=this.decoder.flush(),r}};function Rke(t){switch(t=t.toLowerCase(),t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:throw new Error("Unknown encoding: "+t)}}});var sD=b((_Ze,WJ)=>{var{EventEmitter:Dke}=hJ(),ow=new Error("Stream was destroyed"),VR=new Error("Premature close"),CJ=HR(),Oke=IJ(),GR=typeof queueMicrotask>"u"?t=>global.process.nextTick(t):queueMicrotask,Jt=(1<<29)-1,_o=1,eD=2,Fl=4,wm=8,RJ=Jt^_o,Mke=Jt^eD,$m=16,ld=32,dd=64,ms=128,Pm=256,tD=512,Bl=1024,WR=2048,rD=4096,nD=8192,zi=16384,hs=32768,aw=65536,Ul=131072,DJ=Pm|tD,Nke=$m|aw,jke=dd|$m,zke=rD|ms,iD=Pm|Ul,Lke=Jt^$m,Fke=Jt^dd,Bke=Jt^(dd|aw),$J=Jt^aw,Uke=Jt^Pm,qke=Jt^(ms|nD),Zke=Jt^Bl,PJ=Jt^DJ,OJ=Jt^hs,Hke=Jt^ld,MJ=Jt^Ul,Vke=Jt^iD,na=1<<18,ud=2<<18,Tm=4<<18,ql=8<<18,Am=16<<18,gs=32<<18,JR=64<<18,cd=128<<18,oD=256<<18,Zl=512<<18,sw=1024<<18,Gke=Jt^(na|oD),NJ=Jt^Tm,Wke=Jt^(na|Zl),Jke=Jt^Am,Kke=Jt^ql,jJ=Jt^cd,Yke=Jt^ud,zJ=Jt^sw,xm=$m|na,LJ=Jt^xm,aD=zi|gs,vo=Fl|wm|eD,Ln=vo|_o,FJ=vo|aD,Xke=NJ&Fke,lw=cd|hs,Qke=lw&LJ,BJ=Ln|Qke,eCe=Ln|Bl|zi,TJ=Ln|zi|ms,tCe=Ln|Bl|ms,rCe=Ln|rD|ms|nD,nCe=Ln|$m|Bl|zi|aw|Ul,iCe=vo|Bl|zi,oCe=ld|Ln|hs|dd,aCe=hs|_o,sCe=Ln|Zl|gs,lCe=ql|Am,UJ=ql|na,cCe=ql|Am|Ln|na,AJ=Ln|na|ql|sw,uCe=Tm|na,dCe=na|oD,fCe=Ln|Zl|UJ|gs,pCe=Am|vo|Zl|gs,hCe=ud|Ln|cd|Tm,mCe=Zl|gs|vo,ew=Symbol.asyncIterator||Symbol("asyncIterator"),tw=class{constructor(e,{highWaterMark:r=16384,map:n=null,mapWritable:i,byteLength:o,byteLengthWritable:a}={}){this.stream=e,this.queue=new CJ,this.highWaterMark=r,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=a||o||GJ,this.map=i||n,this.afterWrite=_Ce.bind(this),this.afterUpdateNextTick=wCe.bind(this)}get ended(){return(this.stream._duplexState&gs)!==0}push(e){return(this.stream._duplexState&mCe)!==0?!1:(this.map!==null&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),this.buffered<this.highWaterMark?(this.stream._duplexState|=ql,!0):(this.stream._duplexState|=lCe,!1))}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=Kke),e}end(e){typeof e=="function"?this.stream.once("finish",e):e!=null&&this.push(e),this.stream._duplexState=(this.stream._duplexState|Zl)&NJ}autoBatch(e,r){let n=[],i=this.stream;for(n.push(e);(i._duplexState&AJ)===UJ;)n.push(i._writableState.shift());if((i._duplexState&Ln)!==0)return r(null);i._writev(n,r)}update(){let e=this.stream;e._duplexState|=ud;do{for(;(e._duplexState&AJ)===ql;){let r=this.shift();e._duplexState|=dCe,e._write(r,this.afterWrite)}(e._duplexState&uCe)===0&&this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=Yke}updateNonPrimary(){let e=this.stream;if((e._duplexState&fCe)===Zl){e._duplexState=e._duplexState|na,e._final(yCe.bind(this));return}if((e._duplexState&vo)===Fl){(e._duplexState&lw)===0&&(e._duplexState|=xm,e._destroy(qJ.bind(this)));return}(e._duplexState&BJ)===_o&&(e._duplexState=(e._duplexState|xm)&RJ,e._open(ZJ.bind(this)))}continueUpdate(){return(this.stream._duplexState&cd)===0?!1:(this.stream._duplexState&=jJ,!0)}updateCallback(){(this.stream._duplexState&hCe)===Tm?this.update():this.updateNextTick()}updateNextTick(){(this.stream._duplexState&cd)===0&&(this.stream._duplexState|=cd,(this.stream._duplexState&ud)===0&&GR(this.afterUpdateNextTick))}},KR=class{constructor(e,{highWaterMark:r=16384,map:n=null,mapReadable:i,byteLength:o,byteLengthReadable:a}={}){this.stream=e,this.queue=new CJ,this.highWaterMark=r===0?1:r,this.buffered=0,this.readAhead=r>0,this.error=null,this.pipeline=null,this.byteLength=a||o||GJ,this.map=i||n,this.pipeTo=null,this.afterRead=vCe.bind(this),this.afterUpdateNextTick=bCe.bind(this)}get ended(){return(this.stream._duplexState&zi)!==0}pipe(e,r){if(this.pipeTo!==null)throw new Error("Can only pipe to one destination");if(typeof r!="function"&&(r=null),this.stream._duplexState|=tD,this.pipeTo=e,this.pipeline=new XR(this.stream,e,r),r&&this.stream.on("error",kJ),Im(e))e._writableState.pipeline=this.pipeline,r&&e.on("error",kJ),e.on("finish",this.pipeline.finished.bind(this.pipeline));else{let n=this.pipeline.done.bind(this.pipeline,e),i=this.pipeline.done.bind(this.pipeline,e,null);e.on("error",n),e.on("close",i),e.on("finish",this.pipeline.finished.bind(this.pipeline))}e.on("drain",gCe.bind(this)),this.stream.emit("piping",e),e.emit("pipe",this.stream)}push(e){let r=this.stream;return e===null?(this.highWaterMark=0,r._duplexState=(r._duplexState|Bl)&Bke,!1):this.map!==null&&(e=this.map(e),e===null)?(r._duplexState&=$J,this.buffered<this.highWaterMark):(this.buffered+=this.byteLength(e),this.queue.push(e),r._duplexState=(r._duplexState|ms)&$J,this.buffered<this.highWaterMark)}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=qke),e}unshift(e){let r=[this.map!==null?this.map(e):e];for(;this.buffered>0;)r.push(this.shift());for(let n=0;n<r.length-1;n++){let i=r[n];this.buffered+=this.byteLength(i),this.queue.push(i)}this.push(r[r.length-1])}read(){let e=this.stream;if((e._duplexState&TJ)===ms){let r=this.shift();return this.pipeTo!==null&&this.pipeTo.write(r)===!1&&(e._duplexState&=PJ),(e._duplexState&WR)!==0&&e.emit("data",r),r}return this.readAhead===!1&&(e._duplexState|=Ul,this.updateNextTick()),null}drain(){let e=this.stream;for(;(e._duplexState&TJ)===ms&&(e._duplexState&DJ)!==0;){let r=this.shift();this.pipeTo!==null&&this.pipeTo.write(r)===!1&&(e._duplexState&=PJ),(e._duplexState&WR)!==0&&e.emit("data",r)}}update(){let e=this.stream;e._duplexState|=ld;do{for(this.drain();this.buffered<this.highWaterMark&&(e._duplexState&nCe)===Ul;)e._duplexState|=Nke,e._read(this.afterRead),this.drain();(e._duplexState&rCe)===zke&&(e._duplexState|=nD,e.emit("readable")),(e._duplexState&jke)===0&&this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=Hke}updateNonPrimary(){let e=this.stream;if((e._duplexState&tCe)===Bl&&(e._duplexState=(e._duplexState|zi)&Zke,e.emit("end"),(e._duplexState&FJ)===aD&&(e._duplexState|=Fl),this.pipeTo!==null&&this.pipeTo.end()),(e._duplexState&vo)===Fl){(e._duplexState&lw)===0&&(e._duplexState|=xm,e._destroy(qJ.bind(this)));return}(e._duplexState&BJ)===_o&&(e._duplexState=(e._duplexState|xm)&RJ,e._open(ZJ.bind(this)))}continueUpdate(){return(this.stream._duplexState&hs)===0?!1:(this.stream._duplexState&=OJ,!0)}updateCallback(){(this.stream._duplexState&oCe)===dd?this.update():this.updateNextTick()}updateNextTickIfOpen(){(this.stream._duplexState&aCe)===0&&(this.stream._duplexState|=hs,(this.stream._duplexState&ld)===0&&GR(this.afterUpdateNextTick))}updateNextTick(){(this.stream._duplexState&hs)===0&&(this.stream._duplexState|=hs,(this.stream._duplexState&ld)===0&&GR(this.afterUpdateNextTick))}},YR=class{constructor(e){this.data=null,this.afterTransform=SCe.bind(e),this.afterFinal=null}},XR=class{constructor(e,r,n){this.from=e,this.to=r,this.afterPipe=n,this.error=null,this.pipeToFinished=!1}finished(){this.pipeToFinished=!0}done(e,r){if(r&&(this.error=r),e===this.to&&(this.to=null,this.from!==null)){((this.from._duplexState&zi)===0||!this.pipeToFinished)&&this.from.destroy(this.error||new Error("Writable stream closed prematurely"));return}if(e===this.from&&(this.from=null,this.to!==null)){(e._duplexState&zi)===0&&this.to.destroy(this.error||new Error("Readable stream closed before ending"));return}this.afterPipe!==null&&this.afterPipe(this.error),this.to=this.from=this.afterPipe=null}};function gCe(){this.stream._duplexState|=tD,this.updateCallback()}function yCe(t){let e=this.stream;t&&e.destroy(t),(e._duplexState&vo)===0&&(e._duplexState|=gs,e.emit("finish")),(e._duplexState&FJ)===aD&&(e._duplexState|=Fl),e._duplexState&=Wke,(e._duplexState&ud)===0?this.update():this.updateNextTick()}function qJ(t){let e=this.stream;!t&&this.error!==ow&&(t=this.error),t&&e.emit("error",t),e._duplexState|=wm,e.emit("close");let r=e._readableState,n=e._writableState;if(r!==null&&r.pipeline!==null&&r.pipeline.done(e,t),n!==null){for(;n.drains!==null&&n.drains.length>0;)n.drains.shift().resolve(!1);n.pipeline!==null&&n.pipeline.done(e,t)}}function _Ce(t){let e=this.stream;t&&e.destroy(t),e._duplexState&=Gke,this.drains!==null&&xCe(this.drains),(e._duplexState&cCe)===Am&&(e._duplexState&=Jke,(e._duplexState&JR)===JR&&e.emit("drain")),this.updateCallback()}function vCe(t){t&&this.stream.destroy(t),this.stream._duplexState&=Lke,this.readAhead===!1&&(this.stream._duplexState&Pm)===0&&(this.stream._duplexState&=MJ),this.updateCallback()}function bCe(){(this.stream._duplexState&ld)===0&&(this.stream._duplexState&=OJ,this.update())}function wCe(){(this.stream._duplexState&ud)===0&&(this.stream._duplexState&=jJ,this.update())}function xCe(t){for(let e=0;e<t.length;e++)--t[e].writes===0&&(t.shift().resolve(!0),e--)}function ZJ(t){let e=this.stream;t&&e.destroy(t),(e._duplexState&Fl)===0&&((e._duplexState&eCe)===0&&(e._duplexState|=dd),(e._duplexState&sCe)===0&&(e._duplexState|=Tm),e.emit("open")),e._duplexState&=LJ,e._writableState!==null&&e._writableState.updateCallback(),e._readableState!==null&&e._readableState.updateCallback()}function SCe(t,e){e!=null&&this.push(e),this._writableState.afterWrite(t)}function ECe(t){this._readableState!==null&&(t==="data"&&(this._duplexState|=WR|iD,this._readableState.updateNextTick()),t==="readable"&&(this._duplexState|=rD,this._readableState.updateNextTick())),this._writableState!==null&&t==="drain"&&(this._duplexState|=JR,this._writableState.updateNextTick())}var Sm=class extends Dke{constructor(e){super(),this._duplexState=0,this._readableState=null,this._writableState=null,e&&(e.open&&(this._open=e.open),e.destroy&&(this._destroy=e.destroy),e.predestroy&&(this._predestroy=e.predestroy),e.signal&&e.signal.addEventListener("abort",OCe.bind(this))),this.on("newListener",ECe)}_open(e){e(null)}_destroy(e){e(null)}_predestroy(){}get readable(){return this._readableState!==null?!0:void 0}get writable(){return this._writableState!==null?!0:void 0}get destroyed(){return(this._duplexState&wm)!==0}get destroying(){return(this._duplexState&vo)!==0}destroy(e){(this._duplexState&vo)===0&&(e||(e=ow),this._duplexState=(this._duplexState|Fl)&Xke,this._readableState!==null&&(this._readableState.highWaterMark=0,this._readableState.error=e),this._writableState!==null&&(this._writableState.highWaterMark=0,this._writableState.error=e),this._duplexState|=eD,this._predestroy(),this._duplexState&=Mke,this._readableState!==null&&this._readableState.updateNextTick(),this._writableState!==null&&this._writableState.updateNextTick())}},rw=class t extends Sm{constructor(e){super(e),this._duplexState|=_o|gs|Ul,this._readableState=new KR(this,e),e&&(this._readableState.readAhead===!1&&(this._duplexState&=MJ),e.read&&(this._read=e.read),e.eagerOpen&&this._readableState.updateNextTick(),e.encoding&&this.setEncoding(e.encoding))}setEncoding(e){let r=new Oke(e),n=this._readableState.map||PCe;return this._readableState.map=i,this;function i(o){let a=r.push(o);return a===""&&(o.byteLength!==0||r.remaining>0)?null:n(a)}}_read(e){e(null)}pipe(e,r){return this._readableState.updateNextTick(),this._readableState.pipe(e,r),e}read(){return this._readableState.updateNextTick(),this._readableState.read()}push(e){return this._readableState.updateNextTickIfOpen(),this._readableState.push(e)}unshift(e){return this._readableState.updateNextTickIfOpen(),this._readableState.unshift(e)}resume(){return this._duplexState|=iD,this._readableState.updateNextTick(),this}pause(){return this._duplexState&=this._readableState.readAhead===!1?Vke:Uke,this}static _fromAsyncIterator(e,r){let n,i=new t({...r,read(a){e.next().then(o).then(a.bind(null,null)).catch(a)},predestroy(){n=e.return()},destroy(a){if(!n)return a(null);n.then(a.bind(null,null)).catch(a)}});return i;function o(a){a.done?i.push(null):i.push(a.value)}}static from(e,r){if(CCe(e))return e;if(e[ew])return this._fromAsyncIterator(e[ew](),r);Array.isArray(e)||(e=e===void 0?[]:[e]);let n=0;return new t({...r,read(i){this.push(n===e.length?null:e[n++]),i(null)}})}static isBackpressured(e){return(e._duplexState&iCe)!==0||e._readableState.buffered>=e._readableState.highWaterMark}static isPaused(e){return(e._duplexState&Pm)===0}[ew](){let e=this,r=null,n=null,i=null;return this.on("error",c=>{r=c}),this.on("readable",o),this.on("close",a),{[ew](){return this},next(){return new Promise(function(c,u){n=c,i=u;let d=e.read();d!==null?s(d):(e._duplexState&wm)!==0&&s(null)})},return(){return l(null)},throw(c){return l(c)}};function o(){n!==null&&s(e.read())}function a(){n!==null&&s(null)}function s(c){i!==null&&(r?i(r):c===null&&(e._duplexState&zi)===0?i(ow):n({value:c,done:c===null}),i=n=null)}function l(c){return e.destroy(c),new Promise((u,d)=>{if(e._duplexState&wm)return u({value:void 0,done:!0});e.once("close",function(){c?d(c):u({value:void 0,done:!0})})})}}},nw=class extends Sm{constructor(e){super(e),this._duplexState|=_o|zi,this._writableState=new tw(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final),e.eagerOpen&&this._writableState.updateNextTick())}cork(){this._duplexState|=sw}uncork(){this._duplexState&=zJ,this._writableState.updateNextTick()}_writev(e,r){r(null)}_write(e,r){this._writableState.autoBatch(e,r)}_final(e){e(null)}static isBackpressured(e){return(e._duplexState&pCe)!==0}static drained(e){if(e.destroyed)return Promise.resolve(!1);let r=e._writableState,i=(MCe(e)?Math.min(1,r.queue.length):r.queue.length)+(e._duplexState&oD?1:0);return i===0?Promise.resolve(!0):(r.drains===null&&(r.drains=[]),new Promise(o=>{r.drains.push({writes:i,resolve:o})}))}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},Em=class extends rw{constructor(e){super(e),this._duplexState=_o|this._duplexState&Ul,this._writableState=new tw(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final))}cork(){this._duplexState|=sw}uncork(){this._duplexState&=zJ,this._writableState.updateNextTick()}_writev(e,r){r(null)}_write(e,r){this._writableState.autoBatch(e,r)}_final(e){e(null)}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},iw=class extends Em{constructor(e){super(e),this._transformState=new YR(this),e&&(e.transform&&(this._transform=e.transform),e.flush&&(this._flush=e.flush))}_write(e,r){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=e:this._transform(e,this._transformState.afterTransform)}_read(e){if(this._transformState.data!==null){let r=this._transformState.data;this._transformState.data=null,e(null),this._transform(r,this._transformState.afterTransform)}else e(null)}destroy(e){super.destroy(e),this._transformState.data!==null&&(this._transformState.data=null,this._transformState.afterTransform())}_transform(e,r){r(null,e)}_flush(e){e(null)}_final(e){this._transformState.afterFinal=e,this._flush(ICe.bind(this))}},QR=class extends iw{};function ICe(t,e){let r=this._transformState.afterFinal;if(t)return r(t);e!=null&&this.push(e),this.push(null),r(null)}function $Ce(...t){return new Promise((e,r)=>HJ(...t,n=>{if(n)return r(n);e()}))}function HJ(t,...e){let r=Array.isArray(t)?[...t,...e]:[t,...e],n=r.length&&typeof r[r.length-1]=="function"?r.pop():null;if(r.length<2)throw new Error("Pipeline requires at least 2 streams");let i=r[0],o=null,a=null;for(let c=1;c<r.length;c++)o=r[c],Im(i)?i.pipe(o,l):(s(i,!0,c>1,l),i.pipe(o)),i=o;if(n){let c=!1,u=Im(o)||!!(o._writableState&&o._writableState.autoDestroy);o.on("error",d=>{a===null&&(a=d)}),o.on("finish",()=>{c=!0,u||n(a)}),u&&o.on("close",()=>n(a||(c?null:VR)))}return o;function s(c,u,d,f){c.on("error",f),c.on("close",p);function p(){if(u&&c._readableState&&!c._readableState.ended||d&&c._writableState&&!c._writableState.ended)return f(VR)}}function l(c){if(!(!c||a)){a=c;for(let u of r)u.destroy(c)}}}function PCe(t){return t}function VJ(t){return!!t._readableState||!!t._writableState}function Im(t){return typeof t._duplexState=="number"&&VJ(t)}function TCe(t){return!!t._readableState&&t._readableState.ended}function ACe(t){return!!t._writableState&&t._writableState.ended}function kCe(t,e={}){let r=t._readableState&&t._readableState.error||t._writableState&&t._writableState.error;return!e.all&&r===ow?null:r}function CCe(t){return Im(t)&&t.readable}function RCe(t){return(t._duplexState&_o)!==_o||(t._duplexState&lw)!==0}function DCe(t){return typeof t=="object"&&t!==null&&typeof t.byteLength=="number"}function GJ(t){return DCe(t)?t.byteLength:1024}function kJ(){}function OCe(){this.destroy(new Error("Stream aborted."))}function MCe(t){return t._writev!==nw.prototype._writev&&t._writev!==Em.prototype._writev}WJ.exports={pipeline:HJ,pipelinePromise:$Ce,isStream:VJ,isStreamx:Im,isEnded:TCe,isFinished:ACe,isDisturbed:RCe,getStreamError:kCe,Stream:Sm,Writable:nw,Readable:rw,Duplex:Em,Transform:iw,PassThrough:QR}});var uD=b(pd=>{var at=sd(),NCe="0000000000000000000",jCe="7777777777777777777",cw=48,JJ=at.from([117,115,116,97,114,0]),zCe=at.from([cw,cw]),LCe=at.from([117,115,116,97,114,32]),FCe=at.from([32,0]),BCe=4095,km=257,cD=263;pd.decodeLongPath=function(e,r){return fd(e,0,e.length,r)};pd.encodePax=function(e){let r="";e.name&&(r+=lD(" path="+e.name+`
|
|
230
|
+
>>> no match, partial?`,e,f,r,p),f===l))}let m;if(typeof u=="string"?(m=d===u,this.debug("string match",u,d,m)):(m=u.test(d),this.debug("pattern match",u,d,m)),!m)return!1}if(a===l&&s===c)return!0;if(a===l)return n;if(s===c)return a===l-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return(0,ae.braceExpand)(this.pattern,this.options)}parse(e){(0,Eb.assertValidPattern)(e);let r=this.options;if(e==="**")return ae.GLOBSTAR;if(e==="")return"";let n,i=null;(n=e.match(aTe))?i=r.dot?lTe:sTe:(n=e.match(KPe))?i=(r.nocase?r.dot?eTe:QPe:r.dot?XPe:YPe)(n[1]):(n=e.match(cTe))?i=(r.nocase?r.dot?dTe:uTe:r.dot?fTe:pTe)(n):(n=e.match(tTe))?i=r.dot?nTe:rTe:(n=e.match(iTe))&&(i=oTe);let o=DG.AST.fromGlob(e,this.options).toMMPattern();return i&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:i}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?mTe:r.dot?gTe:yTe,i=new Set(r.nocase?["i"]:[]),o=e.map(l=>{let c=l.map(u=>{if(u instanceof RegExp)for(let d of u.flags.split(""))i.add(d);return typeof u=="string"?STe(u):u===ae.GLOBSTAR?ae.GLOBSTAR:u._src});return c.forEach((u,d)=>{let f=c[d+1],p=c[d-1];u!==ae.GLOBSTAR||p===ae.GLOBSTAR||(p===void 0?f!==void 0&&f!==ae.GLOBSTAR?c[d+1]="(?:\\/|"+n+"\\/)?"+f:c[d]=n:f===void 0?c[d-1]=p+"(?:\\/|"+n+")?":f!==ae.GLOBSTAR&&(c[d-1]=p+"(?:\\/|\\/"+n+"\\/)"+f,c[d+1]=ae.GLOBSTAR))}),c.filter(u=>u!==ae.GLOBSTAR).join("/")}).join("|"),[a,s]=e.length>1?["(?:",")"]:["",""];o="^"+a+o+s+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let o=this.set;this.debug(this.pattern,"set",o);let a=i[i.length-1];if(!a)for(let s=i.length-2;!a&&s>=0;s--)a=i[s];for(let s=0;s<o.length;s++){let l=o[s],c=i;if(n.matchBase&&l.length===1&&(c=[a]),this.matchOne(c,l,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return ae.minimatch.defaults(e).Minimatch}};ae.Minimatch=Ml;var ETe=QC();Object.defineProperty(ae,"AST",{enumerable:!0,get:function(){return ETe.AST}});var ITe=eR();Object.defineProperty(ae,"escape",{enumerable:!0,get:function(){return ITe.escape}});var $Te=vb();Object.defineProperty(ae,"unescape",{enumerable:!0,get:function(){return $Te.unescape}});ae.minimatch.AST=DG.AST;ae.minimatch.Minimatch=Ml;ae.minimatch.escape=GPe.escape;ae.minimatch.unescape=WPe.unescape});var UG=b($b=>{"use strict";Object.defineProperty($b,"__esModule",{value:!0});$b.LRUCache=void 0;var ed=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,LG=new Set,tR=typeof process=="object"&&process?process:{},FG=(t,e,r,n)=>{typeof tR.emitWarning=="function"?tR.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)},Ib=globalThis.AbortController,jG=globalThis.AbortSignal,zG;if(typeof Ib>"u"){jG=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(n,i){this._onabort.push(i)}},Ib=class{constructor(){e()}signal=new jG;abort(n){var i,o;if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let a of this.signal._onabort)a(n);(o=(i=this.signal).onabort)==null||o.call(i,n)}}};let t=((zG=tR.env)==null?void 0:zG.LRU_CACHE_IGNORE_AC_WARNING)!=="1",e=()=>{t&&(t=!1,FG("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var PTe=t=>!LG.has(t),I7e=Symbol("type"),us=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),BG=t=>us(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?td:null:null,td=class extends Array{constructor(e){super(e),this.fill(0)}},rR=class t{heap;length;static#e=!1;static create(e){let r=BG(e);if(!r)return[];t.#e=!0;let n=new t(e,r);return t.#e=!1,n}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},nR=class t{#e;#t;#o;#n;#a;#b;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#d;#s;#l;#i;#g;#y;#p;#f;#S;#m;#E;#I;#v;#w;#x;#h;static unsafeExposeInternals(e){return{starts:e.#I,ttls:e.#v,sizes:e.#E,keyMap:e.#s,keyList:e.#l,valList:e.#i,next:e.#g,prev:e.#y,get head(){return e.#p},get tail(){return e.#f},free:e.#S,isBackgroundFetch:r=>e.#u(r),backgroundFetch:(r,n,i,o)=>e.#z(r,n,i,o),moveToTail:r=>e.#F(r),indexes:r=>e.#P(r),rindexes:r=>e.#T(r),isStale:r=>e.#_(r)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#d}get size(){return this.#c}get fetchMethod(){return this.#a}get memoMethod(){return this.#b}get dispose(){return this.#o}get disposeAfter(){return this.#n}constructor(e){let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:a,updateAgeOnHas:s,allowStale:l,dispose:c,disposeAfter:u,noDisposeOnSet:d,noUpdateTTL:f,maxSize:p=0,maxEntrySize:h=0,sizeCalculation:m,fetchMethod:y,memoMethod:g,noDeleteOnFetchRejection:v,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:w,ignoreFetchAbort:k}=e;if(r!==0&&!us(r))throw new TypeError("max option must be a nonnegative integer");let P=r?BG(r):Array;if(!P)throw new Error("invalid max value: "+r);if(this.#e=r,this.#t=p,this.maxEntrySize=h||this.#t,this.sizeCalculation=m,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(g!==void 0&&typeof g!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#b=g,y!==void 0&&typeof y!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#a=y,this.#x=!!y,this.#s=new Map,this.#l=new Array(r).fill(void 0),this.#i=new Array(r).fill(void 0),this.#g=new P(r),this.#y=new P(r),this.#p=0,this.#f=0,this.#S=rR.create(r),this.#c=0,this.#d=0,typeof c=="function"&&(this.#o=c),typeof u=="function"?(this.#n=u,this.#m=[]):(this.#n=void 0,this.#m=void 0),this.#w=!!this.#o,this.#h=!!this.#n,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!v,this.allowStaleOnFetchRejection=!!x,this.allowStaleOnFetchAbort=!!w,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.#t!==0&&!us(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!us(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#k()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!s,this.ttlResolution=us(i)||i===0?i:1,this.ttlAutopurge=!!o,this.ttl=n||0,this.ttl){if(!us(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#A()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let R="LRU_CACHE_UNBOUNDED";PTe(R)&&(LG.add(R),FG("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",R,t))}}getRemainingTTL(e){return this.#s.has(e)?1/0:0}#A(){let e=new td(this.#e),r=new td(this.#e);this.#v=e,this.#I=r,this.#R=(o,a,s=ed.now())=>{if(r[o]=a!==0?s:0,e[o]=a,a!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#_(o)&&this.#C(this.#l[o],"expire")},a+1);l.unref&&l.unref()}},this.#$=o=>{r[o]=e[o]!==0?ed.now():0},this.#r=(o,a)=>{if(e[a]){let s=e[a],l=r[a];if(!s||!l)return;o.ttl=s,o.start=l,o.now=n||i();let c=o.now-l;o.remainingTTL=s-c}};let n=0,i=()=>{let o=ed.now();if(this.ttlResolution>0){n=o;let a=setTimeout(()=>n=0,this.ttlResolution);a.unref&&a.unref()}return o};this.getRemainingTTL=o=>{let a=this.#s.get(o);if(a===void 0)return 0;let s=e[a],l=r[a];if(!s||!l)return 1/0;let c=(n||i())-l;return s-c},this.#_=o=>{let a=r[o],s=e[o];return!!s&&!!a&&(n||i())-a>s}}#$=()=>{};#r=()=>{};#R=()=>{};#_=()=>!1;#k(){let e=new td(this.#e);this.#d=0,this.#E=e,this.#D=r=>{this.#d-=e[r],e[r]=0},this.#M=(r,n,i,o)=>{if(this.#u(n))return 0;if(!us(i))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(i=o(n,r),!us(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#O=(r,n,i)=>{if(e[r]=n,this.#t){let o=this.#t-e[r];for(;this.#d>o;)this.#j(!0)}this.#d+=e[r],i&&(i.entrySize=n,i.totalCalculatedSize=this.#d)}}#D=e=>{};#O=(e,r,n)=>{};#M=(e,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#P({allowStale:e=this.allowStale}={}){if(this.#c)for(let r=this.#f;!(!this.#N(r)||((e||!this.#_(r))&&(yield r),r===this.#p));)r=this.#y[r]}*#T({allowStale:e=this.allowStale}={}){if(this.#c)for(let r=this.#p;!(!this.#N(r)||((e||!this.#_(r))&&(yield r),r===this.#f));)r=this.#g[r]}#N(e){return e!==void 0&&this.#s.get(this.#l[e])===e}*entries(){for(let e of this.#P())this.#i[e]!==void 0&&this.#l[e]!==void 0&&!this.#u(this.#i[e])&&(yield[this.#l[e],this.#i[e]])}*rentries(){for(let e of this.#T())this.#i[e]!==void 0&&this.#l[e]!==void 0&&!this.#u(this.#i[e])&&(yield[this.#l[e],this.#i[e]])}*keys(){for(let e of this.#P()){let r=this.#l[e];r!==void 0&&!this.#u(this.#i[e])&&(yield r)}}*rkeys(){for(let e of this.#T()){let r=this.#l[e];r!==void 0&&!this.#u(this.#i[e])&&(yield r)}}*values(){for(let e of this.#P())this.#i[e]!==void 0&&!this.#u(this.#i[e])&&(yield this.#i[e])}*rvalues(){for(let e of this.#T())this.#i[e]!==void 0&&!this.#u(this.#i[e])&&(yield this.#i[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let n of this.#P()){let i=this.#i[n],o=this.#u(i)?i.__staleWhileFetching:i;if(o!==void 0&&e(o,this.#l[n],this))return this.get(this.#l[n],r)}}forEach(e,r=this){for(let n of this.#P()){let i=this.#i[n],o=this.#u(i)?i.__staleWhileFetching:i;o!==void 0&&e.call(r,o,this.#l[n],this)}}rforEach(e,r=this){for(let n of this.#T()){let i=this.#i[n],o=this.#u(i)?i.__staleWhileFetching:i;o!==void 0&&e.call(r,o,this.#l[n],this)}}purgeStale(){let e=!1;for(let r of this.#T({allowStale:!0}))this.#_(r)&&(this.#C(this.#l[r],"expire"),e=!0);return e}info(e){let r=this.#s.get(e);if(r===void 0)return;let n=this.#i[r],i=this.#u(n)?n.__staleWhileFetching:n;if(i===void 0)return;let o={value:i};if(this.#v&&this.#I){let a=this.#v[r],s=this.#I[r];if(a&&s){let l=a-(ed.now()-s);o.ttl=l,o.start=Date.now()}}return this.#E&&(o.size=this.#E[r]),o}dump(){let e=[];for(let r of this.#P({allowStale:!0})){let n=this.#l[r],i=this.#i[r],o=this.#u(i)?i.__staleWhileFetching:i;if(o===void 0||n===void 0)continue;let a={value:o};if(this.#v&&this.#I){a.ttl=this.#v[r];let s=ed.now()-this.#I[r];a.start=Math.floor(Date.now()-s)}this.#E&&(a.size=this.#E[r]),e.unshift([n,a])}return e}load(e){this.clear();for(let[r,n]of e){if(n.start){let i=Date.now()-n.start;n.start=ed.now()-i}this.set(r,n.value,n)}}set(e,r,n={}){var f,p,h,m,y;if(r===void 0)return this.delete(e),this;let{ttl:i=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:s=this.sizeCalculation,status:l}=n,{noUpdateTTL:c=this.noUpdateTTL}=n,u=this.#M(e,r,n.size||0,s);if(this.maxEntrySize&&u>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#C(e,"set"),this;let d=this.#c===0?void 0:this.#s.get(e);if(d===void 0)d=this.#c===0?this.#f:this.#S.length!==0?this.#S.pop():this.#c===this.#e?this.#j(!1):this.#c,this.#l[d]=e,this.#i[d]=r,this.#s.set(e,d),this.#g[this.#f]=d,this.#y[d]=this.#f,this.#f=d,this.#c++,this.#O(d,u,l),l&&(l.set="add"),c=!1;else{this.#F(d);let g=this.#i[d];if(r!==g){if(this.#x&&this.#u(g)){g.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:v}=g;v!==void 0&&!a&&(this.#w&&((f=this.#o)==null||f.call(this,v,e,"set")),this.#h&&((p=this.#m)==null||p.push([v,e,"set"])))}else a||(this.#w&&((h=this.#o)==null||h.call(this,g,e,"set")),this.#h&&((m=this.#m)==null||m.push([g,e,"set"])));if(this.#D(d),this.#O(d,u,l),this.#i[d]=r,l){l.set="replace";let v=g&&this.#u(g)?g.__staleWhileFetching:g;v!==void 0&&(l.oldValue=v)}}else l&&(l.set="update")}if(i!==0&&!this.#v&&this.#A(),this.#v&&(c||this.#R(d,i,o),l&&this.#r(l,d)),!a&&this.#h&&this.#m){let g=this.#m,v;for(;v=g==null?void 0:g.shift();)(y=this.#n)==null||y.call(this,...v)}return this}pop(){var e;try{for(;this.#c;){let r=this.#i[this.#p];if(this.#j(!0),this.#u(r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(this.#h&&this.#m){let r=this.#m,n;for(;n=r==null?void 0:r.shift();)(e=this.#n)==null||e.call(this,...n)}}}#j(e){var o,a;let r=this.#p,n=this.#l[r],i=this.#i[r];return this.#x&&this.#u(i)?i.__abortController.abort(new Error("evicted")):(this.#w||this.#h)&&(this.#w&&((o=this.#o)==null||o.call(this,i,n,"evict")),this.#h&&((a=this.#m)==null||a.push([i,n,"evict"]))),this.#D(r),e&&(this.#l[r]=void 0,this.#i[r]=void 0,this.#S.push(r)),this.#c===1?(this.#p=this.#f=0,this.#S.length=0):this.#p=this.#g[r],this.#s.delete(n),this.#c--,r}has(e,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,o=this.#s.get(e);if(o!==void 0){let a=this.#i[o];if(this.#u(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#_(o))i&&(i.has="stale",this.#r(i,o));else return n&&this.#$(o),i&&(i.has="hit",this.#r(i,o)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){let{allowStale:n=this.allowStale}=r,i=this.#s.get(e);if(i===void 0||!n&&this.#_(i))return;let o=this.#i[i];return this.#u(o)?o.__staleWhileFetching:o}#z(e,r,n,i){let o=r===void 0?void 0:this.#i[r];if(this.#u(o))return o;let a=new Ib,{signal:s}=n;s==null||s.addEventListener("abort",()=>a.abort(s.reason),{signal:a.signal});let l={signal:a.signal,options:n,context:i},c=(m,y=!1)=>{let{aborted:g}=a.signal,v=n.ignoreFetchAbort&&m!==void 0;if(n.status&&(g&&!y?(n.status.fetchAborted=!0,n.status.fetchError=a.signal.reason,v&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),g&&!v&&!y)return d(a.signal.reason);let E=p;return this.#i[r]===p&&(m===void 0?E.__staleWhileFetching?this.#i[r]=E.__staleWhileFetching:this.#C(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(e,m,l.options))),m},u=m=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=m),d(m)),d=m=>{let{aborted:y}=a.signal,g=y&&n.allowStaleOnFetchAbort,v=g||n.allowStaleOnFetchRejection,E=v||n.noDeleteOnFetchRejection,x=p;if(this.#i[r]===p&&(!E||x.__staleWhileFetching===void 0?this.#C(e,"fetch"):g||(this.#i[r]=x.__staleWhileFetching)),v)return n.status&&x.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),x.__staleWhileFetching;if(x.__returned===x)throw m},f=(m,y)=>{var v;let g=(v=this.#a)==null?void 0:v.call(this,e,o,l);g&&g instanceof Promise&&g.then(E=>m(E===void 0?void 0:E),y),a.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(m(void 0),n.allowStaleOnFetchAbort&&(m=E=>c(E,!0)))})};n.status&&(n.status.fetchDispatched=!0);let p=new Promise(f).then(c,u),h=Object.assign(p,{__abortController:a,__staleWhileFetching:o,__returned:void 0});return r===void 0?(this.set(e,h,{...l.options,status:void 0}),r=this.#s.get(e)):this.#i[r]=h,h}#u(e){if(!this.#x)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Ib}async fetch(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:l=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:h=this.allowStaleOnFetchAbort,context:m,forceRefresh:y=!1,status:g,signal:v}=r;if(!this.#x)return g&&(g.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,status:g});let E={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:o,ttl:a,noDisposeOnSet:s,size:l,sizeCalculation:c,noUpdateTTL:u,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:h,ignoreFetchAbort:p,status:g,signal:v},x=this.#s.get(e);if(x===void 0){g&&(g.fetch="miss");let w=this.#z(e,x,E,m);return w.__returned=w}else{let w=this.#i[x];if(this.#u(w)){let D=n&&w.__staleWhileFetching!==void 0;return g&&(g.fetch="inflight",D&&(g.returnedStale=!0)),D?w.__staleWhileFetching:w.__returned=w}let k=this.#_(x);if(!y&&!k)return g&&(g.fetch="hit"),this.#F(x),i&&this.#$(x),g&&this.#r(g,x),w;let P=this.#z(e,x,E,m),T=P.__staleWhileFetching!==void 0&&n;return g&&(g.fetch=k?"stale":"refresh",T&&k&&(g.returnedStale=!0)),T?P.__staleWhileFetching:P.__returned=P}}async forceFetch(e,r={}){let n=await this.fetch(e,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,r={}){let n=this.#b;if(!n)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:o,...a}=r,s=this.get(e,a);if(!o&&s!==void 0)return s;let l=n(e,s,{options:a,context:i});return this.set(e,l,a),l}get(e,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:a}=r,s=this.#s.get(e);if(s!==void 0){let l=this.#i[s],c=this.#u(l);return a&&this.#r(a,s),this.#_(s)?(a&&(a.get="stale"),c?(a&&n&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),n?l.__staleWhileFetching:void 0):(o||this.#C(e,"expire"),a&&n&&(a.returnedStale=!0),n?l:void 0)):(a&&(a.get="hit"),c?l.__staleWhileFetching:(this.#F(s),i&&this.#$(s),l))}else a&&(a.get="miss")}#L(e,r){this.#y[r]=e,this.#g[e]=r}#F(e){e!==this.#f&&(e===this.#p?this.#p=this.#g[e]:this.#L(this.#y[e],this.#g[e]),this.#L(this.#f,e),this.#f=e)}delete(e){return this.#C(e,"delete")}#C(e,r){var i,o,a,s;let n=!1;if(this.#c!==0){let l=this.#s.get(e);if(l!==void 0)if(n=!0,this.#c===1)this.#B(r);else{this.#D(l);let c=this.#i[l];if(this.#u(c)?c.__abortController.abort(new Error("deleted")):(this.#w||this.#h)&&(this.#w&&((i=this.#o)==null||i.call(this,c,e,r)),this.#h&&((o=this.#m)==null||o.push([c,e,r]))),this.#s.delete(e),this.#l[l]=void 0,this.#i[l]=void 0,l===this.#f)this.#f=this.#y[l];else if(l===this.#p)this.#p=this.#g[l];else{let u=this.#y[l];this.#g[u]=this.#g[l];let d=this.#g[l];this.#y[d]=this.#y[l]}this.#c--,this.#S.push(l)}}if(this.#h&&((a=this.#m)!=null&&a.length)){let l=this.#m,c;for(;c=l==null?void 0:l.shift();)(s=this.#n)==null||s.call(this,...c)}return n}clear(){return this.#B("delete")}#B(e){var r,n,i;for(let o of this.#T({allowStale:!0})){let a=this.#i[o];if(this.#u(a))a.__abortController.abort(new Error("deleted"));else{let s=this.#l[o];this.#w&&((r=this.#o)==null||r.call(this,a,s,e)),this.#h&&((n=this.#m)==null||n.push([a,s,e]))}}if(this.#s.clear(),this.#i.fill(void 0),this.#l.fill(void 0),this.#v&&this.#I&&(this.#v.fill(0),this.#I.fill(0)),this.#E&&this.#E.fill(0),this.#p=0,this.#f=0,this.#S.length=0,this.#d=0,this.#c=0,this.#h&&this.#m){let o=this.#m,a;for(;a=o==null?void 0:o.shift();)(i=this.#n)==null||i.call(this,...a)}}};$b.LRUCache=nR});var dR=b(cn=>{"use strict";var TTe=cn&&cn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cn,"__esModule",{value:!0});cn.Minipass=cn.isWritable=cn.isReadable=cn.isStream=void 0;var qG=typeof process=="object"&&process?process:{stdout:null,stderr:null},uR=Q("node:events"),GG=TTe(Q("node:stream")),ATe=Q("node:string_decoder"),kTe=t=>!!t&&typeof t=="object"&&(t instanceof Db||t instanceof GG.default||(0,cn.isReadable)(t)||(0,cn.isWritable)(t));cn.isStream=kTe;var CTe=t=>!!t&&typeof t=="object"&&t instanceof uR.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==GG.default.Writable.prototype.pipe;cn.isReadable=CTe;var RTe=t=>!!t&&typeof t=="object"&&t instanceof uR.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function";cn.isWritable=RTe;var ta=Symbol("EOF"),ra=Symbol("maybeEmitEnd"),ds=Symbol("emittedEnd"),Pb=Symbol("emittingEnd"),nm=Symbol("emittedError"),Tb=Symbol("closed"),ZG=Symbol("read"),Ab=Symbol("flush"),HG=Symbol("flushChunk"),Ni=Symbol("encoding"),rd=Symbol("decoder"),fr=Symbol("flowing"),im=Symbol("paused"),nd=Symbol("resume"),pr=Symbol("buffer"),ln=Symbol("pipes"),hr=Symbol("bufferLength"),iR=Symbol("bufferPush"),kb=Symbol("bufferShift"),Zr=Symbol("objectMode"),Qt=Symbol("destroyed"),oR=Symbol("error"),aR=Symbol("emitData"),VG=Symbol("emitEnd"),sR=Symbol("emitEnd2"),ho=Symbol("async"),lR=Symbol("abort"),Cb=Symbol("aborted"),om=Symbol("signal"),Nl=Symbol("dataListeners"),Nn=Symbol("discarded"),am=t=>Promise.resolve().then(t),DTe=t=>t(),OTe=t=>t==="end"||t==="finish"||t==="prefinish",MTe=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,NTe=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Rb=class{src;dest;opts;ondrain;constructor(e,r,n){this.src=e,this.dest=r,this.opts=n,this.ondrain=()=>e[nd](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},cR=class extends Rb{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,n){super(e,r,n),this.proxyErrors=i=>r.emit("error",i),e.on("error",this.proxyErrors)}},jTe=t=>!!t.objectMode,zTe=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",Db=class extends uR.EventEmitter{[fr]=!1;[im]=!1;[ln]=[];[pr]=[];[Zr];[Ni];[ho];[rd];[ta]=!1;[ds]=!1;[Pb]=!1;[Tb]=!1;[nm]=null;[hr]=0;[Qt]=!1;[om];[Cb]=!1;[Nl]=0;[Nn]=!1;writable=!0;readable=!0;constructor(...e){let r=e[0]||{};if(super(),r.objectMode&&typeof r.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");jTe(r)?(this[Zr]=!0,this[Ni]=null):zTe(r)?(this[Ni]=r.encoding,this[Zr]=!1):(this[Zr]=!1,this[Ni]=null),this[ho]=!!r.async,this[rd]=this[Ni]?new ATe.StringDecoder(this[Ni]):null,r&&r.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[pr]}),r&&r.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[ln]});let{signal:n}=r;n&&(this[om]=n,n.aborted?this[lR]():n.addEventListener("abort",()=>this[lR]()))}get bufferLength(){return this[hr]}get encoding(){return this[Ni]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Zr]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[ho]}set async(e){this[ho]=this[ho]||!!e}[lR](){var e,r;this[Cb]=!0,this.emit("abort",(e=this[om])==null?void 0:e.reason),this.destroy((r=this[om])==null?void 0:r.reason)}get aborted(){return this[Cb]}set aborted(e){}write(e,r,n){var o;if(this[Cb])return!1;if(this[ta])throw new Error("write after end");if(this[Qt])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(n=r,r="utf8"),r||(r="utf8");let i=this[ho]?am:DTe;if(!this[Zr]&&!Buffer.isBuffer(e)){if(NTe(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(MTe(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[Zr]?(this[fr]&&this[hr]!==0&&this[Ab](!0),this[fr]?this.emit("data",e):this[iR](e),this[hr]!==0&&this.emit("readable"),n&&i(n),this[fr]):e.length?(typeof e=="string"&&!(r===this[Ni]&&!((o=this[rd])!=null&&o.lastNeed))&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[Ni]&&(e=this[rd].write(e)),this[fr]&&this[hr]!==0&&this[Ab](!0),this[fr]?this.emit("data",e):this[iR](e),this[hr]!==0&&this.emit("readable"),n&&i(n),this[fr]):(this[hr]!==0&&this.emit("readable"),n&&i(n),this[fr])}read(e){if(this[Qt])return null;if(this[Nn]=!1,this[hr]===0||e===0||e&&e>this[hr])return this[ra](),null;this[Zr]&&(e=null),this[pr].length>1&&!this[Zr]&&(this[pr]=[this[Ni]?this[pr].join(""):Buffer.concat(this[pr],this[hr])]);let r=this[ZG](e||null,this[pr][0]);return this[ra](),r}[ZG](e,r){if(this[Zr])this[kb]();else{let n=r;e===n.length||e===null?this[kb]():typeof n=="string"?(this[pr][0]=n.slice(e),r=n.slice(0,e),this[hr]-=e):(this[pr][0]=n.subarray(e),r=n.subarray(0,e),this[hr]-=e)}return this.emit("data",r),!this[pr].length&&!this[ta]&&this.emit("drain"),r}end(e,r,n){return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r="utf8"),e!==void 0&&this.write(e,r),n&&this.once("end",n),this[ta]=!0,this.writable=!1,(this[fr]||!this[im])&&this[ra](),this}[nd](){this[Qt]||(!this[Nl]&&!this[ln].length&&(this[Nn]=!0),this[im]=!1,this[fr]=!0,this.emit("resume"),this[pr].length?this[Ab]():this[ta]?this[ra]():this.emit("drain"))}resume(){return this[nd]()}pause(){this[fr]=!1,this[im]=!0,this[Nn]=!1}get destroyed(){return this[Qt]}get flowing(){return this[fr]}get paused(){return this[im]}[iR](e){this[Zr]?this[hr]+=1:this[hr]+=e.length,this[pr].push(e)}[kb](){return this[Zr]?this[hr]-=1:this[hr]-=this[pr][0].length,this[pr].shift()}[Ab](e=!1){do;while(this[HG](this[kb]())&&this[pr].length);!e&&!this[pr].length&&!this[ta]&&this.emit("drain")}[HG](e){return this.emit("data",e),this[fr]}pipe(e,r){if(this[Qt])return e;this[Nn]=!1;let n=this[ds];return r=r||{},e===qG.stdout||e===qG.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,n?r.end&&e.end():(this[ln].push(r.proxyErrors?new cR(this,e,r):new Rb(this,e,r)),this[ho]?am(()=>this[nd]()):this[nd]()),e}unpipe(e){let r=this[ln].find(n=>n.dest===e);r&&(this[ln].length===1?(this[fr]&&this[Nl]===0&&(this[fr]=!1),this[ln]=[]):this[ln].splice(this[ln].indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let n=super.on(e,r);if(e==="data")this[Nn]=!1,this[Nl]++,!this[ln].length&&!this[fr]&&this[nd]();else if(e==="readable"&&this[hr]!==0)super.emit("readable");else if(OTe(e)&&this[ds])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[nm]){let i=r;this[ho]?am(()=>i.call(this,this[nm])):i.call(this,this[nm])}return n}removeListener(e,r){return this.off(e,r)}off(e,r){let n=super.off(e,r);return e==="data"&&(this[Nl]=this.listeners("data").length,this[Nl]===0&&!this[Nn]&&!this[ln].length&&(this[fr]=!1)),n}removeAllListeners(e){let r=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[Nl]=0,!this[Nn]&&!this[ln].length&&(this[fr]=!1)),r}get emittedEnd(){return this[ds]}[ra](){!this[Pb]&&!this[ds]&&!this[Qt]&&this[pr].length===0&&this[ta]&&(this[Pb]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Tb]&&this.emit("close"),this[Pb]=!1)}emit(e,...r){let n=r[0];if(e!=="error"&&e!=="close"&&e!==Qt&&this[Qt])return!1;if(e==="data")return!this[Zr]&&!n?!1:this[ho]?(am(()=>this[aR](n)),!0):this[aR](n);if(e==="end")return this[VG]();if(e==="close"){if(this[Tb]=!0,!this[ds]&&!this[Qt])return!1;let o=super.emit("close");return this.removeAllListeners("close"),o}else if(e==="error"){this[nm]=n,super.emit(oR,n);let o=!this[om]||this.listeners("error").length?super.emit("error",n):!1;return this[ra](),o}else if(e==="resume"){let o=super.emit("resume");return this[ra](),o}else if(e==="finish"||e==="prefinish"){let o=super.emit(e);return this.removeAllListeners(e),o}let i=super.emit(e,...r);return this[ra](),i}[aR](e){for(let n of this[ln])n.dest.write(e)===!1&&this.pause();let r=this[Nn]?!1:super.emit("data",e);return this[ra](),r}[VG](){return this[ds]?!1:(this[ds]=!0,this.readable=!1,this[ho]?(am(()=>this[sR]()),!0):this[sR]())}[sR](){if(this[rd]){let r=this[rd].end();if(r){for(let n of this[ln])n.dest.write(r);this[Nn]||super.emit("data",r)}}for(let r of this[ln])r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[Zr]||(e.dataLength=0);let r=this.promise();return this.on("data",n=>{e.push(n),this[Zr]||(e.dataLength+=n.length)}),await r,e}async concat(){if(this[Zr])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Ni]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,r)=>{this.on(Qt,()=>r(new Error("stream destroyed"))),this.on("error",n=>r(n)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Nn]=!1;let e=!1,r=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return r();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[ta])return r();let o,a,s=d=>{this.off("data",l),this.off("end",c),this.off(Qt,u),r(),a(d)},l=d=>{this.off("error",s),this.off("end",c),this.off(Qt,u),this.pause(),o({value:d,done:!!this[ta]})},c=()=>{this.off("error",s),this.off("data",l),this.off(Qt,u),r(),o({done:!0,value:void 0})},u=()=>s(new Error("stream destroyed"));return new Promise((d,f)=>{a=f,o=d,this.once(Qt,u),this.once("error",s),this.once("end",c),this.once("data",l)})},throw:r,return:r,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Nn]=!1;let e=!1,r=()=>(this.pause(),this.off(oR,r),this.off(Qt,r),this.off("end",r),e=!0,{done:!0,value:void 0}),n=()=>{if(e)return r();let i=this.read();return i===null?r():{done:!1,value:i}};return this.once("end",r),this.once(oR,r),this.once(Qt,r),{next:n,throw:r,return:r,[Symbol.iterator](){return this}}}destroy(e){if(this[Qt])return e?this.emit("error",e):this.emit(Qt),this;this[Qt]=!0,this[Nn]=!0,this[pr].length=0,this[hr]=0;let r=this;return typeof r.close=="function"&&!this[Tb]&&r.close(),e?this.emit("error",e):this.emit(Qt),this}static get isStream(){return cn.isStream}};cn.Minipass=Db});var lW=b(yt=>{"use strict";var LTe=yt&&yt.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),FTe=yt&&yt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),BTe=yt&&yt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&<e(e,t,r);return FTe(e,t),e};Object.defineProperty(yt,"__esModule",{value:!0});yt.PathScurry=yt.Path=yt.PathScurryDarwin=yt.PathScurryPosix=yt.PathScurryWin32=yt.PathScurryBase=yt.PathPosix=yt.PathWin32=yt.PathBase=yt.ChildrenCache=yt.ResolveCache=void 0;var QG=UG(),zb=Q("node:path"),UTe=Q("node:url"),lm=Q("fs"),qTe=BTe(Q("node:fs")),ZTe=lm.realpathSync.native,Ob=Q("node:fs/promises"),WG=dR(),cm={lstatSync:lm.lstatSync,readdir:lm.readdir,readdirSync:lm.readdirSync,readlinkSync:lm.readlinkSync,realpathSync:ZTe,promises:{lstat:Ob.lstat,readdir:Ob.readdir,readlink:Ob.readlink,realpath:Ob.realpath}},eW=t=>!t||t===cm||t===qTe?cm:{...cm,...t,promises:{...cm.promises,...t.promises||{}}},tW=/^\\\\\?\\([a-z]:)\\?$/i,HTe=t=>t.replace(/\//g,"\\").replace(tW,"$1\\"),VTe=/[\\\/]/,pi=0,rW=1,nW=2,mo=4,iW=6,oW=8,jl=10,aW=12,fi=15,sm=~fi,fR=16,JG=32,um=64,ji=128,Mb=256,jb=512,KG=um|ji|jb,GTe=1023,pR=t=>t.isFile()?oW:t.isDirectory()?mo:t.isSymbolicLink()?jl:t.isCharacterDevice()?nW:t.isBlockDevice()?iW:t.isSocket()?aW:t.isFIFO()?rW:pi,YG=new Map,dm=t=>{let e=YG.get(t);if(e)return e;let r=t.normalize("NFKD");return YG.set(t,r),r},XG=new Map,Nb=t=>{let e=XG.get(t);if(e)return e;let r=dm(t.toLowerCase());return XG.set(t,r),r},fm=class extends QG.LRUCache{constructor(){super({max:256})}};yt.ResolveCache=fm;var Lb=class extends QG.LRUCache{constructor(e=16*1024){super({maxSize:e,sizeCalculation:r=>r.length+1})}};yt.ChildrenCache=Lb;var sW=Symbol("PathScurry setAsCwd"),Pr=class{name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#o;get mode(){return this.#o}#n;get nlink(){return this.#n}#a;get uid(){return this.#a}#b;get gid(){return this.#b}#c;get rdev(){return this.#c}#d;get blksize(){return this.#d}#s;get ino(){return this.#s}#l;get size(){return this.#l}#i;get blocks(){return this.#i}#g;get atimeMs(){return this.#g}#y;get mtimeMs(){return this.#y}#p;get ctimeMs(){return this.#p}#f;get birthtimeMs(){return this.#f}#S;get atime(){return this.#S}#m;get mtime(){return this.#m}#E;get ctime(){return this.#E}#I;get birthtime(){return this.#I}#v;#w;#x;#h;#A;#$;#r;#R;#_;#k;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,r=pi,n,i,o,a,s){this.name=e,this.#v=o?Nb(e):dm(e),this.#r=r>e,this.nocase=o,this.roots=i,this.root=n||this,this.#R=a,this.#x=s.fullpath,this.#A=s.relative,this.#$=s.relativePosix,this.parent=s.parent,this.parent?this.#e=this.parent.#e:this.#e=eW(s.fs)}depth(){return this.#w!==void 0?this.#w:this.parent?this.#w=this.parent.depth()+1:this.#w=0}childrenCache(){return this.#R}resolve(e){if(!e)return this;let r=this.getRootString(e),i=e.substring(r.length).split(this.splitSep);return r?this.getRoot(r).#D(i):this.#D(i)}#D(e){let r=this;for(let n of e)r=r.child(n);return r}children(){let e=this.#R.get(this);if(e)return e;let r=Object.assign([],{provisional:0});return this.#R.set(this,r),this.#r&=~fR,r}child(e,r){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let n=this.children(),i=this.nocase?Nb(e):dm(e);for(let l of n)if(l.#v===i)return l;let o=this.parent?this.sep:"",a=this.#x?this.#x+o+e:void 0,s=this.newChild(e,pi,{...r,parent:this,fullpath:a});return this.canReaddir()||(s.#r|=ji),n.push(s),s}relative(){if(this.isCWD)return"";if(this.#A!==void 0)return this.#A;let e=this.name,r=this.parent;if(!r)return this.#A=this.name;let n=r.relative();return n+(!n||!r.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#$!==void 0)return this.#$;let e=this.name,r=this.parent;if(!r)return this.#$=this.fullpathPosix();let n=r.relativePosix();return n+(!n||!r.parent?"":"/")+e}fullpath(){if(this.#x!==void 0)return this.#x;let e=this.name,r=this.parent;if(!r)return this.#x=this.name;let i=r.fullpath()+(r.parent?this.sep:"")+e;return this.#x=i}fullpathPosix(){if(this.#h!==void 0)return this.#h;if(this.sep==="/")return this.#h=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#h=`//?/${i}`:this.#h=i}let e=this.parent,r=e.fullpathPosix(),n=r+(!r||!e.parent?"":"/")+this.name;return this.#h=n}isUnknown(){return(this.#r&fi)===pi}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#r&fi)===oW}isDirectory(){return(this.#r&fi)===mo}isCharacterDevice(){return(this.#r&fi)===nW}isBlockDevice(){return(this.#r&fi)===iW}isFIFO(){return(this.#r&fi)===rW}isSocket(){return(this.#r&fi)===aW}isSymbolicLink(){return(this.#r&jl)===jl}lstatCached(){return this.#r&JG?this:void 0}readlinkCached(){return this.#_}realpathCached(){return this.#k}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#_)return!0;if(!this.parent)return!1;let e=this.#r&fi;return!(e!==pi&&e!==jl||this.#r&Mb||this.#r&ji)}calledReaddir(){return!!(this.#r&fR)}isENOENT(){return!!(this.#r&ji)}isNamed(e){return this.nocase?this.#v===Nb(e):this.#v===dm(e)}async readlink(){var r;let e=this.#_;if(e)return e;if(this.canReadlink()&&this.parent)try{let n=await this.#e.promises.readlink(this.fullpath()),i=(r=await this.parent.realpath())==null?void 0:r.resolve(n);if(i)return this.#_=i}catch(n){this.#u(n.code);return}}readlinkSync(){var r;let e=this.#_;if(e)return e;if(this.canReadlink()&&this.parent)try{let n=this.#e.readlinkSync(this.fullpath()),i=(r=this.parent.realpathSync())==null?void 0:r.resolve(n);if(i)return this.#_=i}catch(n){this.#u(n.code);return}}#O(e){this.#r|=fR;for(let r=e.provisional;r<e.length;r++){let n=e[r];n&&n.#M()}}#M(){this.#r&ji||(this.#r=(this.#r|ji)&sm,this.#P())}#P(){let e=this.children();e.provisional=0;for(let r of e)r.#M()}#T(){this.#r|=jb,this.#N()}#N(){if(this.#r&um)return;let e=this.#r;(e&fi)===mo&&(e&=sm),this.#r=e|um,this.#P()}#j(e=""){e==="ENOTDIR"||e==="EPERM"?this.#N():e==="ENOENT"?this.#M():this.children().provisional=0}#z(e=""){e==="ENOTDIR"?this.parent.#N():e==="ENOENT"&&this.#M()}#u(e=""){let r=this.#r;r|=Mb,e==="ENOENT"&&(r|=ji),(e==="EINVAL"||e==="UNKNOWN")&&(r&=sm),this.#r=r,e==="ENOTDIR"&&this.parent&&this.parent.#N()}#L(e,r){return this.#C(e,r)||this.#F(e,r)}#F(e,r){let n=pR(e),i=this.newChild(e.name,n,{parent:this}),o=i.#r&fi;return o!==mo&&o!==jl&&o!==pi&&(i.#r|=um),r.unshift(i),r.provisional++,i}#C(e,r){for(let n=r.provisional;n<r.length;n++){let i=r[n];if((this.nocase?Nb(e.name):dm(e.name))===i.#v)return this.#B(e,i,n,r)}}#B(e,r,n,i){let o=r.name;return r.#r=r.#r&sm|pR(e),o!==e.name&&(r.name=e.name),n!==i.provisional&&(n===i.length-1?i.pop():i.splice(n,1),i.unshift(r)),i.provisional++,r}async lstat(){if((this.#r&ji)===0)try{return this.#H(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#z(e.code)}}lstatSync(){if((this.#r&ji)===0)try{return this.#H(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#z(e.code)}}#H(e){let{atime:r,atimeMs:n,birthtime:i,birthtimeMs:o,blksize:a,blocks:s,ctime:l,ctimeMs:c,dev:u,gid:d,ino:f,mode:p,mtime:h,mtimeMs:m,nlink:y,rdev:g,size:v,uid:E}=e;this.#S=r,this.#g=n,this.#I=i,this.#f=o,this.#d=a,this.#i=s,this.#E=l,this.#p=c,this.#t=u,this.#b=d,this.#s=f,this.#o=p,this.#m=h,this.#y=m,this.#n=y,this.#c=g,this.#l=v,this.#a=E;let x=pR(e);this.#r=this.#r&sm|x|JG,x!==pi&&x!==mo&&x!==jl&&(this.#r|=um)}#q=[];#Z=!1;#V(e){this.#Z=!1;let r=this.#q.slice();this.#q.length=0,r.forEach(n=>n(null,e))}readdirCB(e,r=!1){if(!this.canReaddir()){r?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let o=n.slice(0,n.provisional);r?e(null,o):queueMicrotask(()=>e(null,o));return}if(this.#q.push(e),this.#Z)return;this.#Z=!0;let i=this.fullpath();this.#e.readdir(i,{withFileTypes:!0},(o,a)=>{if(o)this.#j(o.code),n.provisional=0;else{for(let s of a)this.#L(s,n);this.#O(n)}this.#V(n.slice(0,n.provisional))})}#U;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();if(this.#U)await this.#U;else{let n=()=>{};this.#U=new Promise(i=>n=i);try{for(let i of await this.#e.promises.readdir(r,{withFileTypes:!0}))this.#L(i,e);this.#O(e)}catch(i){this.#j(i.code),e.provisional=0}this.#U=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let r=this.fullpath();try{for(let n of this.#e.readdirSync(r,{withFileTypes:!0}))this.#L(n,e);this.#O(e)}catch(n){this.#j(n.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#r&KG)return!1;let e=fi&this.#r;return e===pi||e===mo||e===jl}shouldWalk(e,r){return(this.#r&mo)===mo&&!(this.#r&KG)&&!e.has(this)&&(!r||r(this))}async realpath(){if(this.#k)return this.#k;if(!((jb|Mb|ji)&this.#r))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#k=this.resolve(e)}catch{this.#T()}}realpathSync(){if(this.#k)return this.#k;if(!((jb|Mb|ji)&this.#r))try{let e=this.#e.realpathSync(this.fullpath());return this.#k=this.resolve(e)}catch{this.#T()}}[sW](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let r=new Set([]),n=[],i=this;for(;i&&i.parent;)r.add(i),i.#A=n.join(this.sep),i.#$=n.join("/"),i=i.parent,n.push("..");for(i=e;i&&i.parent&&!r.has(i);)i.#A=void 0,i.#$=void 0,i=i.parent}};yt.PathBase=Pr;var pm=class t extends Pr{sep="\\";splitSep=VTe;constructor(e,r=pi,n,i,o,a,s){super(e,r,n,i,o,a,s)}newChild(e,r=pi,n={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return zb.win32.parse(e).root}getRoot(e){if(e=HTe(e.toUpperCase()),e===this.root.name)return this.root;for(let[r,n]of Object.entries(this.roots))if(this.sameRoot(e,r))return this.roots[e]=n;return this.roots[e]=new gm(e,this).root}sameRoot(e,r=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(tW,"$1\\"),e===r}};yt.PathWin32=pm;var hm=class t extends Pr{splitSep="/";sep="/";constructor(e,r=pi,n,i,o,a,s){super(e,r,n,i,o,a,s)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,r=pi,n={}){return new t(e,r,this.root,this.roots,this.nocase,this.childrenCache(),n)}};yt.PathPosix=hm;var mm=class{root;rootPath;roots;cwd;#e;#t;#o;nocase;#n;constructor(e=process.cwd(),r,n,{nocase:i,childrenCacheSize:o=16*1024,fs:a=cm}={}){this.#n=eW(a),(e instanceof URL||e.startsWith("file://"))&&(e=(0,UTe.fileURLToPath)(e));let s=r.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(s),this.#e=new fm,this.#t=new fm,this.#o=new Lb(o);let l=s.substring(this.rootPath.length).split(n);if(l.length===1&&!l[0]&&l.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#n),this.roots[this.rootPath]=this.root;let c=this.root,u=l.length-1,d=r.sep,f=this.rootPath,p=!1;for(let h of l){let m=u--;c=c.child(h,{relative:new Array(m).fill("..").join(d),relativePosix:new Array(m).fill("..").join("/"),fullpath:f+=(p?"":d)+h}),p=!0}this.cwd=c}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#o}resolve(...e){let r="";for(let o=e.length-1;o>=0;o--){let a=e[o];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let n=this.#e.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpath();return this.#e.set(r,i),i}resolvePosix(...e){let r="";for(let o=e.length-1;o>=0;o--){let a=e[o];if(!(!a||a===".")&&(r=r?`${a}/${r}`:a,this.isAbsolute(a)))break}let n=this.#t.get(r);if(n!==void 0)return n;let i=this.cwd.resolve(r).fullpathPosix();return this.#t.set(r,i),i}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e,e=this.cwd);let{withFileTypes:n}=r;if(e.canReaddir()){let i=await e.readdir();return n?i:i.map(o=>o.name)}else return[]}readdirSync(e=this.cwd,r={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e,e=this.cwd);let{withFileTypes:n=!0}=r;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(i=>i.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e.withFileTypes,e=this.cwd);let n=await e.readlink();return r?n:n==null?void 0:n.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return r?n:n==null?void 0:n.fullpath()}async realpath(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e.withFileTypes,e=this.cwd);let n=await e.realpath();return r?n:n==null?void 0:n.fullpath()}realpathSync(e=this.cwd,{withFileTypes:r}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return r?n:n==null?void 0:n.fullpath()}async walk(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,s=[];(!o||o(e))&&s.push(n?e:e.fullpath());let l=new Set,c=(d,f)=>{l.add(d),d.readdirCB((p,h)=>{if(p)return f(p);let m=h.length;if(!m)return f();let y=()=>{--m===0&&f()};for(let g of h)(!o||o(g))&&s.push(n?g:g.fullpath()),i&&g.isSymbolicLink()?g.realpath().then(v=>v!=null&&v.isUnknown()?v.lstat():v).then(v=>v!=null&&v.shouldWalk(l,a)?c(v,y):y()):g.shouldWalk(l,a)?c(g,y):y()},!0)},u=e;return new Promise((d,f)=>{c(u,p=>{if(p)return f(p);d(s)})})}walkSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,s=[];(!o||o(e))&&s.push(n?e:e.fullpath());let l=new Set([e]);for(let c of l){let u=c.readdirSync();for(let d of u){(!o||o(d))&&s.push(n?d:d.fullpath());let f=d;if(d.isSymbolicLink()){if(!(i&&(f=d.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(l,a)&&l.add(f)}}return s}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,r={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e,e=this.cwd),this.stream(e,r)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r;(!o||o(e))&&(yield n?e:e.fullpath());let s=new Set([e]);for(let l of s){let c=l.readdirSync();for(let u of c){(!o||o(u))&&(yield n?u:u.fullpath());let d=u;if(u.isSymbolicLink()){if(!(i&&(d=u.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(s,a)&&s.add(d)}}}stream(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,s=new WG.Minipass({objectMode:!0});(!o||o(e))&&s.write(n?e:e.fullpath());let l=new Set,c=[e],u=0,d=()=>{let f=!1;for(;!f;){let p=c.shift();if(!p){u===0&&s.end();return}u++,l.add(p);let h=(y,g,v=!1)=>{if(y)return s.emit("error",y);if(i&&!v){let E=[];for(let x of g)x.isSymbolicLink()&&E.push(x.realpath().then(w=>w!=null&&w.isUnknown()?w.lstat():w));if(E.length){Promise.all(E).then(()=>h(null,g,!0));return}}for(let E of g)E&&(!o||o(E))&&(s.write(n?E:E.fullpath())||(f=!0));u--;for(let E of g){let x=E.realpathCached()||E;x.shouldWalk(l,a)&&c.push(x)}f&&!s.flowing?s.once("drain",d):m||d()},m=!0;p.readdirCB(h,!0),m=!1}};return d(),s}streamSync(e=this.cwd,r={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Pr||(r=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:o,walkFilter:a}=r,s=new WG.Minipass({objectMode:!0}),l=new Set;(!o||o(e))&&s.write(n?e:e.fullpath());let c=[e],u=0,d=()=>{let f=!1;for(;!f;){let p=c.shift();if(!p){u===0&&s.end();return}u++,l.add(p);let h=p.readdirSync();for(let m of h)(!o||o(m))&&(s.write(n?m:m.fullpath())||(f=!0));u--;for(let m of h){let y=m;if(m.isSymbolicLink()){if(!(i&&(y=m.realpathSync())))continue;y.isUnknown()&&y.lstatSync()}y.shouldWalk(l,a)&&c.push(y)}}f&&!s.flowing&&s.once("drain",d)};return d(),s}chdir(e=this.cwd){let r=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[sW](r)}};yt.PathScurryBase=mm;var gm=class extends mm{sep="\\";constructor(e=process.cwd(),r={}){let{nocase:n=!0}=r;super(e,zb.win32,"\\",{...r,nocase:n}),this.nocase=n;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(e){return zb.win32.parse(e).root.toUpperCase()}newRoot(e){return new pm(this.rootPath,mo,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}};yt.PathScurryWin32=gm;var ym=class extends mm{sep="/";constructor(e=process.cwd(),r={}){let{nocase:n=!1}=r;super(e,zb.posix,"/",{...r,nocase:n}),this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new hm(this.rootPath,mo,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}};yt.PathScurryPosix=ym;var Fb=class extends ym{constructor(e=process.cwd(),r={}){let{nocase:n=!0}=r;super(e,{...r,nocase:n})}};yt.PathScurryDarwin=Fb;yt.Path=process.platform==="win32"?pm:hm;yt.PathScurry=process.platform==="win32"?gm:process.platform==="darwin"?Fb:ym});var mR=b(Bb=>{"use strict";Object.defineProperty(Bb,"__esModule",{value:!0});Bb.Pattern=void 0;var WTe=cs(),JTe=t=>t.length>=1,KTe=t=>t.length>=1,hR=class t{#e;#t;#o;length;#n;#a;#b;#c;#d;#s;#l=!0;constructor(e,r,n,i){if(!JTe(e))throw new TypeError("empty pattern list");if(!KTe(r))throw new TypeError("empty glob list");if(r.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#t=r,this.#o=n,this.#n=i,this.#o===0){if(this.isUNC()){let[o,a,s,l,...c]=this.#e,[u,d,f,p,...h]=this.#t;c[0]===""&&(c.shift(),h.shift());let m=[o,a,s,l,""].join("/"),y=[u,d,f,p,""].join("/");this.#e=[m,...c],this.#t=[y,...h],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[o,...a]=this.#e,[s,...l]=this.#t;a[0]===""&&(a.shift(),l.shift());let c=o+"/",u=s+"/";this.#e=[c,...a],this.#t=[u,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#o]}isString(){return typeof this.#e[this.#o]=="string"}isGlobstar(){return this.#e[this.#o]===WTe.GLOBSTAR}isRegExp(){return this.#e[this.#o]instanceof RegExp}globString(){return this.#b=this.#b||(this.#o===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#o).join("/"))}hasMore(){return this.length>this.#o+1}rest(){return this.#a!==void 0?this.#a:this.hasMore()?(this.#a=new t(this.#e,this.#t,this.#o+1,this.#n),this.#a.#s=this.#s,this.#a.#d=this.#d,this.#a.#c=this.#c,this.#a):this.#a=null}isUNC(){let e=this.#e;return this.#d!==void 0?this.#d:this.#d=this.#n==="win32"&&this.#o===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#c!==void 0?this.#c:this.#c=this.#n==="win32"&&this.#o===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#s!==void 0?this.#s:this.#s=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#o===0?e:""}checkFollowGlobstar(){return!(this.#o===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#o===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}};Bb.Pattern=hR});var yR=b(Ub=>{"use strict";Object.defineProperty(Ub,"__esModule",{value:!0});Ub.Ignore=void 0;var cW=cs(),YTe=mR(),XTe=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",gR=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:r,nocase:n,noext:i,noglobstar:o,platform:a=XTe}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=a,this.mmopts={dot:!0,nobrace:r,nocase:n,noext:i,noglobstar:o,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let s of e)this.add(s)}add(e){let r=new cW.Minimatch(e,this.mmopts);for(let n=0;n<r.set.length;n++){let i=r.set[n],o=r.globParts[n];if(!i||!o)throw new Error("invalid pattern object");for(;i[0]==="."&&o[0]===".";)i.shift(),o.shift();let a=new YTe.Pattern(i,o,0,this.platform),s=new cW.Minimatch(a.globString(),this.mmopts),l=o[o.length-1]==="**",c=a.isAbsolute();c?this.absolute.push(s):this.relative.push(s),l&&(c?this.absoluteChildren.push(s):this.relativeChildren.push(s))}}ignored(e){let r=e.fullpath(),n=`${r}/`,i=e.relative()||".",o=`${i}/`;for(let a of this.relative)if(a.match(i)||a.match(o))return!0;for(let a of this.absolute)if(a.match(r)||a.match(n))return!0;return!1}childrenIgnored(e){let r=e.fullpath()+"/",n=(e.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(n))return!0;for(let i of this.absoluteChildren)if(i.match(r))return!0;return!1}};Ub.Ignore=gR});var dW=b(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.Processor=go.SubWalks=go.MatchRecord=go.HasWalkedCache=void 0;var uW=cs(),qb=class t{store;constructor(e=new Map){this.store=e}copy(){return new t(new Map(this.store))}hasWalked(e,r){var n;return(n=this.store.get(e.fullpath()))==null?void 0:n.has(r.globString())}storeWalked(e,r){let n=e.fullpath(),i=this.store.get(n);i?i.add(r.globString()):this.store.set(n,new Set([r.globString()]))}};go.HasWalkedCache=qb;var Zb=class{store=new Map;add(e,r,n){let i=(r?2:0)|(n?1:0),o=this.store.get(e);this.store.set(e,o===void 0?i:i&o)}entries(){return[...this.store.entries()].map(([e,r])=>[e,!!(r&2),!!(r&1)])}};go.MatchRecord=Zb;var Hb=class{store=new Map;add(e,r){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(i=>i.globString()===r.globString())||n.push(r):this.store.set(e,[r])}get(e){let r=this.store.get(e);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};go.SubWalks=Hb;var _R=class t{hasWalkedCache;matches=new Zb;subwalks=new Hb;patterns;follow;dot;opts;constructor(e,r){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=r?r.copy():new qb}processPatterns(e,r){this.patterns=r;let n=r.map(i=>[e,i]);for(let[i,o]of n){this.hasWalkedCache.storeWalked(i,o);let a=o.root(),s=o.isAbsolute()&&this.opts.absolute!==!1;if(a){i=i.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let d=o.rest();if(d)o=d;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let l,c,u=!1;for(;typeof(l=o.pattern())=="string"&&(c=o.rest());)i=i.resolve(l),o=c,u=!0;if(l=o.pattern(),c=o.rest(),u){if(this.hasWalkedCache.hasWalked(i,o))continue;this.hasWalkedCache.storeWalked(i,o)}if(typeof l=="string"){let d=l===".."||l===""||l===".";this.matches.add(i.resolve(l),s,d);continue}else if(l===uW.GLOBSTAR){(!i.isSymbolicLink()||this.follow||o.checkFollowGlobstar())&&this.subwalks.add(i,o);let d=c==null?void 0:c.pattern(),f=c==null?void 0:c.rest();if(!c||(d===""||d===".")&&!f)this.matches.add(i,s,d===""||d===".");else if(d===".."){let p=i.parent||i;f?this.hasWalkedCache.hasWalked(p,f)||this.subwalks.add(p,f):this.matches.add(p,s,!0)}}else l instanceof RegExp&&this.subwalks.add(i,o)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(e,r){let n=this.subwalks.get(e),i=this.child();for(let o of r)for(let a of n){let s=a.isAbsolute(),l=a.pattern(),c=a.rest();l===uW.GLOBSTAR?i.testGlobstar(o,a,c,s):l instanceof RegExp?i.testRegExp(o,l,c,s):i.testString(o,l,c,s)}return i}testGlobstar(e,r,n,i){if((this.dot||!e.name.startsWith("."))&&(r.hasMore()||this.matches.add(e,i,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,r):e.isSymbolicLink()&&(n&&r.checkFollowGlobstar()?this.subwalks.add(e,n):r.markFollowGlobstar()&&this.subwalks.add(e,r)))),n){let o=n.pattern();if(typeof o=="string"&&o!==".."&&o!==""&&o!==".")this.testString(e,o,n.rest(),i);else if(o===".."){let a=e.parent||e;this.subwalks.add(a,n)}else o instanceof RegExp&&this.testRegExp(e,o,n.rest(),i)}}testRegExp(e,r,n,i){r.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}testString(e,r,n,i){e.isNamed(r)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}};go.Processor=_R});var hW=b(fs=>{"use strict";Object.defineProperty(fs,"__esModule",{value:!0});fs.GlobStream=fs.GlobWalker=fs.GlobUtil=void 0;var QTe=dR(),fW=yR(),pW=dW(),eAe=(t,e)=>typeof t=="string"?new fW.Ignore([t],e):Array.isArray(t)?new fW.Ignore(t,e):t,_m=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#o;signal;maxDepth;includeChildMatches;constructor(e,r,n){if(this.patterns=e,this.path=r,this.opts=n,this.#o=!n.posix&&n.platform==="win32"?"\\":"/",this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#t=eAe(n.ignore??[],n),!this.includeChildMatches&&typeof this.#t.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#n(e){var r,n;return this.seen.has(e)||!!((n=(r=this.#t)==null?void 0:r.ignored)!=null&&n.call(r,e))}#a(e){var r,n;return!!((n=(r=this.#t)==null?void 0:r.childrenIgnored)!=null&&n.call(r,e))}pause(){this.paused=!0}resume(){var r;if((r=this.signal)!=null&&r.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){var r;(r=this.signal)!=null&&r.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let o=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&(o!=null&&o.isSymbolicLink())){let a=await o.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(o,r)}matchCheckTest(e,r){var n;return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!r||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!((n=e.realpathCached())!=null&&n.isDirectory()))&&!this.#n(e)?e:void 0}matchCheckSync(e,r){if(r&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let o=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&(o!=null&&o.isSymbolicLink())){let a=o.realpathSync();a&&(a!=null&&a.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(o,r)}matchFinish(e,r){var o;if(this.#n(e))return;if(!this.includeChildMatches&&((o=this.#t)!=null&&o.add)){let a=`${e.relativePosix()}/**`;this.#t.add(a)}let n=this.opts.absolute===void 0?r:this.opts.absolute;this.seen.add(e);let i=this.opts.mark&&e.isDirectory()?this.#o:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let a=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(a+i)}else{let a=this.opts.posix?e.relativePosix():e.relative(),s=this.opts.dotRelative&&!a.startsWith(".."+this.#o)?"."+this.#o:"";this.matchEmit(a?s+a+i:"."+i)}}async match(e,r,n){let i=await this.matchCheck(e,n);i&&this.matchFinish(i,r)}matchSync(e,r,n){let i=this.matchCheckSync(e,n);i&&this.matchFinish(i,r)}walkCB(e,r,n){var i;(i=this.signal)!=null&&i.aborted&&n(),this.walkCB2(e,r,new pW.Processor(this.opts),n)}walkCB2(e,r,n,i){var s;if(this.#a(e))return i();if((s=this.signal)!=null&&s.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(e,r,n,i));return}n.processPatterns(e,r);let o=1,a=()=>{--o===0&&i()};for(let[l,c,u]of n.matches.entries())this.#n(l)||(o++,this.match(l,c,u).then(()=>a()));for(let l of n.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;o++;let c=l.readdirCached();l.calledReaddir()?this.walkCB3(l,c,n,a):l.readdirCB((u,d)=>this.walkCB3(l,d,n,a),!0)}a()}walkCB3(e,r,n,i){n=n.filterEntries(e,r);let o=1,a=()=>{--o===0&&i()};for(let[s,l,c]of n.matches.entries())this.#n(s)||(o++,this.match(s,l,c).then(()=>a()));for(let[s,l]of n.subwalks.entries())o++,this.walkCB2(s,l,n.child(),a);a()}walkCBSync(e,r,n){var i;(i=this.signal)!=null&&i.aborted&&n(),this.walkCB2Sync(e,r,new pW.Processor(this.opts),n)}walkCB2Sync(e,r,n,i){var s;if(this.#a(e))return i();if((s=this.signal)!=null&&s.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(e,r,n,i));return}n.processPatterns(e,r);let o=1,a=()=>{--o===0&&i()};for(let[l,c,u]of n.matches.entries())this.#n(l)||this.matchSync(l,c,u);for(let l of n.subwalkTargets()){if(this.maxDepth!==1/0&&l.depth()>=this.maxDepth)continue;o++;let c=l.readdirSync();this.walkCB3Sync(l,c,n,a)}a()}walkCB3Sync(e,r,n,i){n=n.filterEntries(e,r);let o=1,a=()=>{--o===0&&i()};for(let[s,l,c]of n.matches.entries())this.#n(s)||this.matchSync(s,l,c);for(let[s,l]of n.subwalks.entries())o++,this.walkCB2Sync(s,l,n.child(),a);a()}};fs.GlobUtil=_m;var vR=class extends _m{matches=new Set;constructor(e,r,n){super(e,r,n)}matchEmit(e){this.matches.add(e)}async walk(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((r,n)=>{this.walkCB(this.path,this.patterns,()=>{var i;(i=this.signal)!=null&&i.aborted?n(this.signal.reason):r(this.matches)})}),this.matches}walkSync(){var e;if((e=this.signal)!=null&&e.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{var r;if((r=this.signal)!=null&&r.aborted)throw this.signal.reason}),this.matches}};fs.GlobWalker=vR;var bR=class extends _m{results;constructor(e,r,n){super(e,r,n),this.results=new QTe.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};fs.GlobStream=bR});var xR=b(Wb=>{"use strict";Object.defineProperty(Wb,"__esModule",{value:!0});Wb.Glob=void 0;var tAe=cs(),rAe=Q("node:url"),Vb=lW(),nAe=mR(),Gb=hW(),iAe=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",wR=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,r){if(!r)throw new TypeError("glob options required");if(this.withFileTypes=!!r.withFileTypes,this.signal=r.signal,this.follow=!!r.follow,this.dot=!!r.dot,this.dotRelative=!!r.dotRelative,this.nodir=!!r.nodir,this.mark=!!r.mark,r.cwd?(r.cwd instanceof URL||r.cwd.startsWith("file://"))&&(r.cwd=(0,rAe.fileURLToPath)(r.cwd)):this.cwd="",this.cwd=r.cwd||"",this.root=r.root,this.magicalBraces=!!r.magicalBraces,this.nobrace=!!r.nobrace,this.noext=!!r.noext,this.realpath=!!r.realpath,this.absolute=r.absolute,this.includeChildMatches=r.includeChildMatches!==!1,this.noglobstar=!!r.noglobstar,this.matchBase=!!r.matchBase,this.maxDepth=typeof r.maxDepth=="number"?r.maxDepth:1/0,this.stat=!!r.stat,this.ignore=r.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(r.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=r.platform||iAe,this.opts={...r,platform:this.platform},r.scurry){if(this.scurry=r.scurry,r.nocase!==void 0&&r.nocase!==r.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=r.platform==="win32"?Vb.PathScurryWin32:r.platform==="darwin"?Vb.PathScurryDarwin:r.platform?Vb.PathScurryPosix:Vb.PathScurry;this.scurry=new l(this.cwd,{nocase:r.nocase,fs:r.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",i={...r,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},o=this.pattern.map(l=>new tAe.Minimatch(l,i)),[a,s]=o.reduce((l,c)=>(l[0].push(...c.set),l[1].push(...c.globParts),l),[[],[]]);this.patterns=a.map((l,c)=>{let u=s[c];if(!u)throw new Error("invalid pattern object");return new nAe.Pattern(l,u,0,this.platform)})}async walk(){return[...await new Gb.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new Gb.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Gb.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Gb.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};Wb.Glob=wR});var SR=b(Jb=>{"use strict";Object.defineProperty(Jb,"__esModule",{value:!0});Jb.hasMagic=void 0;var oAe=cs(),aAe=(t,e={})=>{Array.isArray(t)||(t=[t]);for(let r of t)if(new oAe.Minimatch(r,e).hasMagic())return!0;return!1};Jb.hasMagic=aAe});var _W=b(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.glob=Ke.sync=Ke.iterate=Ke.iterateSync=Ke.stream=Ke.streamSync=Ke.Ignore=Ke.hasMagic=Ke.Glob=Ke.unescape=Ke.escape=void 0;Ke.globStreamSync=vm;Ke.globStream=ER;Ke.globSync=IR;Ke.globIterateSync=bm;Ke.globIterate=$R;var mW=cs(),zl=xR(),sAe=SR(),yW=cs();Object.defineProperty(Ke,"escape",{enumerable:!0,get:function(){return yW.escape}});Object.defineProperty(Ke,"unescape",{enumerable:!0,get:function(){return yW.unescape}});var lAe=xR();Object.defineProperty(Ke,"Glob",{enumerable:!0,get:function(){return lAe.Glob}});var cAe=SR();Object.defineProperty(Ke,"hasMagic",{enumerable:!0,get:function(){return cAe.hasMagic}});var uAe=yR();Object.defineProperty(Ke,"Ignore",{enumerable:!0,get:function(){return uAe.Ignore}});function vm(t,e={}){return new zl.Glob(t,e).streamSync()}function ER(t,e={}){return new zl.Glob(t,e).stream()}function IR(t,e={}){return new zl.Glob(t,e).walkSync()}async function gW(t,e={}){return new zl.Glob(t,e).walk()}function bm(t,e={}){return new zl.Glob(t,e).iterateSync()}function $R(t,e={}){return new zl.Glob(t,e).iterate()}Ke.streamSync=vm;Ke.stream=Object.assign(ER,{sync:vm});Ke.iterateSync=bm;Ke.iterate=Object.assign($R,{sync:bm});Ke.sync=Object.assign(IR,{stream:vm,iterate:bm});Ke.glob=Object.assign(gW,{glob:gW,globSync:IR,sync:Ke.sync,globStream:ER,stream:Ke.stream,globStreamSync:vm,streamSync:Ke.streamSync,globIterate:$R,iterate:Ke.iterate,globIterateSync:bm,iterateSync:Ke.iterateSync,Glob:zl.Glob,hasMagic:sAe.hasMagic,escape:mW.escape,unescape:mW.unescape});Ke.glob.glob=Ke.glob});var xW=b((N7e,wW)=>{var bW=WA(),id=Q("path"),PR=HH(),dAe=aG(),fAe=yG(),pAe=EG(),hAe=_W(),Ll=wW.exports={},vW=/[\/\\]/g,mAe=function(t,e){var r=[];return PR(t).forEach(function(n){var i=n.indexOf("!")===0;i&&(n=n.slice(1));var o=e(n);i?r=dAe(r,o):r=fAe(r,o)}),r};Ll.exists=function(){var t=id.join.apply(id,arguments);return bW.existsSync(t)};Ll.expand=function(...t){var e=pAe(t[0])?t.shift():{},r=Array.isArray(t[0])?t[0]:t;if(r.length===0)return[];var n=mAe(r,function(i){return hAe.sync(i,e)});return e.filter&&(n=n.filter(function(i){i=id.join(e.cwd||"",i);try{return typeof e.filter=="function"?e.filter(i):bW.statSync(i)[e.filter]()}catch{return!1}})),n};Ll.expandMapping=function(t,e,r){r=Object.assign({rename:function(o,a){return id.join(o||"",a)}},r);var n=[],i={};return Ll.expand(r,t).forEach(function(o){var a=o;r.flatten&&(a=id.basename(a)),r.ext&&(a=a.replace(/(\.[^\/]*)?$/,r.ext));var s=r.rename(e,a,r);r.cwd&&(o=id.join(r.cwd,o)),s=s.replace(vW,"/"),o=o.replace(vW,"/"),i[s]?i[s].src.push(o):(n.push({src:[o],dest:s}),i[s]=n[n.length-1])}),n};Ll.normalizeFilesArray=function(t){var e=[];return t.forEach(function(r){var n;("src"in r||"dest"in r)&&e.push(r)}),e.length===0?[]:(e=_(e).chain().forEach(function(r){!("src"in r)||!r.src||(Array.isArray(r.src)?r.src=PR(r.src):r.src=[r.src])}).map(function(r){var n=Object.assign({},r);if(delete n.src,delete n.dest,r.expand)return Ll.expandMapping(r.src,r.dest,n).map(function(o){var a=Object.assign({},r);return a.orig=Object.assign({},r),a.src=o.src,a.dest=o.dest,["expand","cwd","flatten","rename","ext"].forEach(function(s){delete a[s]}),a});var i=Object.assign({},r);return i.orig=Object.assign({},r),"src"in i&&Object.defineProperty(i,"src",{enumerable:!0,get:function o(){var a;return"result"in o||(a=r.src,a=Array.isArray(a)?PR(a):[a],o.result=Ll.expand(n,a)),o.result}}),"dest"in i&&(i.dest=r.dest),i}).flatten().value(),e)}});var od=b((z7e,IW)=>{var TR=WA(),SW=Q("path"),gAe=gv(),yAe=Wq(),EW=_k(),_Ae=T9(),j7e=Q("stream").Stream,vAe=Ol().PassThrough,jn=IW.exports={};jn.file=xW();jn.collectStream=function(t,e){var r=[],n=0;t.on("error",e),t.on("data",function(i){r.push(i),n+=i.length}),t.on("end",function(){var i=Buffer.alloc(n),o=0;r.forEach(function(a){a.copy(i,o),o+=a.length}),e(null,i)})};jn.dateify=function(t){return t=t||new Date,t instanceof Date?t=t:typeof t=="string"?t=new Date(t):t=new Date,t};jn.defaults=function(t,e,r){var n=arguments;return n[0]=n[0]||{},_Ae(...n)};jn.isStream=function(t){return gAe(t)};jn.lazyReadStream=function(t){return new yAe.Readable(function(){return TR.createReadStream(t)})};jn.normalizeInputSource=function(t){return t===null?Buffer.alloc(0):typeof t=="string"?Buffer.from(t):jn.isStream(t)?t.pipe(new vAe):t};jn.sanitizePath=function(t){return EW(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")};jn.trailingSlashIt=function(t){return t.slice(-1)!=="/"?t+"/":t};jn.unixifyPath=function(t){return EW(t,!1).replace(/^\w+:/,"")};jn.walkdir=function(t,e,r){var n=[];typeof e=="function"&&(r=e,e=t),TR.readdir(t,function(i,o){var a=0,s,l;if(i)return r(i);(function c(){if(s=o[a++],!s)return r(null,n);l=SW.join(t,s),TR.stat(l,function(u,d){n.push({path:l,relative:SW.relative(e,l).replace(/\\/g,"/"),stats:d}),d&&d.isDirectory()?jn.walkdir(l,e,function(f,p){if(f)return r(f);p.forEach(function(h){n.push(h)}),c()}):c()})})()})}});var AW=b((PW,TW)=>{var bAe=Q("util"),wAe={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function $W(t,e){Error.captureStackTrace(this,this.constructor),this.message=wAe[t]||t,this.code=t,this.data=e}bAe.inherits($W,Error);PW=TW.exports=$W});var OW=b((L7e,DW)=>{var CR=Q("fs"),CW=zU(),kW=FU(),AR=Q("path"),yo=od(),xAe=Q("util").inherits,Kt=AW(),RW=Ol().Transform,kR=process.platform==="win32",pt=function(t,e){if(!(this instanceof pt))return new pt(t,e);typeof t!="string"&&(e=t,t="zip"),e=this.options=yo.defaults(e,{highWaterMark:1024*1024,statConcurrency:4}),RW.call(this,e),this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=kW.queue(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=kW.queue(this._onStatQueueTask.bind(this),e.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};xAe(pt,RW);pt.prototype._abort=function(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()};pt.prototype._append=function(t,e){e=e||{};var r={source:null,filepath:t};e.name||(e.name=t),e.sourcePath=t,r.data=e,this._entriesCount++,e.stats&&e.stats instanceof CR.Stats?(r=this._updateQueueTaskWithStats(r,e.stats),r&&(e.stats.size&&(this._fsEntriesTotalBytes+=e.stats.size),this._queue.push(r))):this._statQueue.push(r)};pt.prototype._finalize=function(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)};pt.prototype._maybeFinalize=function(){return this._state.finalizing||this._state.finalized||this._state.aborted?!1:this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()?(this._finalize(),!0):!1};pt.prototype._moduleAppend=function(t,e,r){if(this._state.aborted){r();return}this._module.append(t,e,function(n){if(this._task=null,this._state.aborted){this._shutdown();return}if(n){this.emit("error",n),setImmediate(r);return}this.emit("entry",e),this._entriesProcessedCount++,e.stats&&e.stats.size&&(this._fsEntriesProcessedBytes+=e.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),setImmediate(r)}.bind(this))};pt.prototype._moduleFinalize=function(){typeof this._module.finalize=="function"?this._module.finalize():typeof this._module.end=="function"?this._module.end():this.emit("error",new Kt("NOENDMETHOD"))};pt.prototype._modulePipe=function(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0};pt.prototype._moduleSupports=function(t){return!this._module.supports||!this._module.supports[t]?!1:this._module.supports[t]};pt.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1};pt.prototype._normalizeEntryData=function(t,e){t=yo.defaults(t,{type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),e&&t.stats===!1&&(t.stats=e);var r=t.type==="directory";return t.name&&(typeof t.prefix=="string"&&t.prefix!==""&&(t.name=t.prefix+"/"+t.name,t.prefix=null),t.name=yo.sanitizePath(t.name),t.type!=="symlink"&&t.name.slice(-1)==="/"?(r=!0,t.type="directory"):r&&(t.name+="/")),typeof t.mode=="number"?kR?t.mode&=511:t.mode&=4095:t.stats&&t.mode===null?(kR?t.mode=t.stats.mode&511:t.mode=t.stats.mode&4095,kR&&r&&(t.mode=493)):t.mode===null&&(t.mode=r?493:420),t.stats&&t.date===null?t.date=t.stats.mtime:t.date=yo.dateify(t.date),t};pt.prototype._onModuleError=function(t){this.emit("error",t)};pt.prototype._onQueueDrain=function(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()};pt.prototype._onQueueTask=function(t,e){var r=()=>{t.data.callback&&t.data.callback(),e()};if(this._state.finalizing||this._state.finalized||this._state.aborted){r();return}this._task=t,this._moduleAppend(t.source,t.data,r)};pt.prototype._onStatQueueTask=function(t,e){if(this._state.finalizing||this._state.finalized||this._state.aborted){e();return}CR.lstat(t.filepath,function(r,n){if(this._state.aborted){setImmediate(e);return}if(r){this._entriesCount--,this.emit("warning",r),setImmediate(e);return}t=this._updateQueueTaskWithStats(t,n),t&&(n.size&&(this._fsEntriesTotalBytes+=n.size),this._queue.push(t)),setImmediate(e)}.bind(this))};pt.prototype._shutdown=function(){this._moduleUnpipe(),this.end()};pt.prototype._transform=function(t,e,r){t&&(this._pointer+=t.length),r(null,t)};pt.prototype._updateQueueTaskWithStats=function(t,e){if(e.isFile())t.data.type="file",t.data.sourceType="stream",t.source=yo.lazyReadStream(t.filepath);else if(e.isDirectory()&&this._moduleSupports("directory"))t.data.name=yo.trailingSlashIt(t.data.name),t.data.type="directory",t.data.sourcePath=yo.trailingSlashIt(t.filepath),t.data.sourceType="buffer",t.source=Buffer.concat([]);else if(e.isSymbolicLink()&&this._moduleSupports("symlink")){var r=CR.readlinkSync(t.filepath),n=AR.dirname(t.filepath);t.data.type="symlink",t.data.linkname=AR.relative(n,AR.resolve(n,r)),t.data.sourceType="buffer",t.source=Buffer.concat([])}else return e.isDirectory()?this.emit("warning",new Kt("DIRECTORYNOTSUPPORTED",t.data)):e.isSymbolicLink()?this.emit("warning",new Kt("SYMLINKNOTSUPPORTED",t.data)):this.emit("warning",new Kt("ENTRYNOTSUPPORTED",t.data)),null;return t.data=this._normalizeEntryData(t.data,e),t};pt.prototype.abort=function(){return this._state.aborted||this._state.finalized?this:(this._abort(),this)};pt.prototype.append=function(t,e){if(this._state.finalize||this._state.aborted)return this.emit("error",new Kt("QUEUECLOSED")),this;if(e=this._normalizeEntryData(e),typeof e.name!="string"||e.name.length===0)return this.emit("error",new Kt("ENTRYNAMEREQUIRED")),this;if(e.type==="directory"&&!this._moduleSupports("directory"))return this.emit("error",new Kt("DIRECTORYNOTSUPPORTED",{name:e.name})),this;if(t=yo.normalizeInputSource(t),Buffer.isBuffer(t))e.sourceType="buffer";else if(yo.isStream(t))e.sourceType="stream";else return this.emit("error",new Kt("INPUTSTEAMBUFFERREQUIRED",{name:e.name})),this;return this._entriesCount++,this._queue.push({data:e,source:t}),this};pt.prototype.directory=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new Kt("QUEUECLOSED")),this;if(typeof t!="string"||t.length===0)return this.emit("error",new Kt("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,e===!1?e="":typeof e!="string"&&(e=t);var n=!1;typeof r=="function"?(n=r,r={}):typeof r!="object"&&(r={});var i={stat:!0,dot:!0};function o(){this._pending--,this._maybeFinalize()}function a(c){this.emit("error",c)}function s(c){l.pause();var u=!1,d=Object.assign({},r);d.name=c.relative,d.prefix=e,d.stats=c.stat,d.callback=l.resume.bind(l);try{if(n){if(d=n(d),d===!1)u=!0;else if(typeof d!="object")throw new Kt("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:t})}}catch(f){this.emit("error",f);return}if(u){l.resume();return}this._append(c.absolute,d)}var l=CW(t,i);return l.on("error",a.bind(this)),l.on("match",s.bind(this)),l.on("end",o.bind(this)),this};pt.prototype.file=function(t,e){return this._state.finalize||this._state.aborted?(this.emit("error",new Kt("QUEUECLOSED")),this):typeof t!="string"||t.length===0?(this.emit("error",new Kt("FILEFILEPATHREQUIRED")),this):(this._append(t,e),this)};pt.prototype.glob=function(t,e,r){this._pending++,e=yo.defaults(e,{stat:!0,pattern:t});function n(){this._pending--,this._maybeFinalize()}function i(s){this.emit("error",s)}function o(s){a.pause();var l=Object.assign({},r);l.callback=a.resume.bind(a),l.stats=s.stat,l.name=s.relative,this._append(s.absolute,l)}var a=CW(e.cwd||".",e);return a.on("error",i.bind(this)),a.on("match",o.bind(this)),a.on("end",n.bind(this)),this};pt.prototype.finalize=function(){if(this._state.aborted){var t=new Kt("ABORTED");return this.emit("error",t),Promise.reject(t)}if(this._state.finalize){var e=new Kt("FINALIZING");return this.emit("error",e),Promise.reject(e)}this._state.finalize=!0,this._pending===0&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var r=this;return new Promise(function(n,i){var o;r._module.on("end",function(){o||n()}),r._module.on("error",function(a){o=!0,i(a)})})};pt.prototype.setFormat=function(t){return this._format?(this.emit("error",new Kt("FORMATSET")),this):(this._format=t,this)};pt.prototype.setModule=function(t){return this._state.aborted?(this.emit("error",new Kt("ABORTED")),this):this._state.module?(this.emit("error",new Kt("MODULESET")),this):(this._module=t,this._modulePipe(),this)};pt.prototype.symlink=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new Kt("QUEUECLOSED")),this;if(typeof t!="string"||t.length===0)return this.emit("error",new Kt("SYMLINKFILEPATHREQUIRED")),this;if(typeof e!="string"||e.length===0)return this.emit("error",new Kt("SYMLINKTARGETREQUIRED",{filepath:t})),this;if(!this._moduleSupports("symlink"))return this.emit("error",new Kt("SYMLINKNOTSUPPORTED",{filepath:t})),this;var n={};return n.type="symlink",n.name=t.replace(/\\/g,"/"),n.linkname=e.replace(/\\/g,"/"),n.sourceType="buffer",typeof r=="number"&&(n.mode=r),this._entriesCount++,this._queue.push({data:n,source:Buffer.concat([])}),this};pt.prototype.pointer=function(){return this._pointer};pt.prototype.use=function(t){return this._streams.push(t),this};DW.exports=pt});var Yb=b((F7e,MW)=>{var Kb=MW.exports=function(){};Kb.prototype.getName=function(){};Kb.prototype.getSize=function(){};Kb.prototype.getLastModifiedDate=function(){};Kb.prototype.isDirectory=function(){}});var Xb=b((B7e,NW)=>{var hi=NW.exports={};hi.dateToDos=function(t,e){e=e||!1;var r=e?t.getFullYear():t.getUTCFullYear();if(r<1980)return 2162688;if(r>=2044)return 2141175677;var n={year:r,month:e?t.getMonth():t.getUTCMonth(),date:e?t.getDate():t.getUTCDate(),hours:e?t.getHours():t.getUTCHours(),minutes:e?t.getMinutes():t.getUTCMinutes(),seconds:e?t.getSeconds():t.getUTCSeconds()};return n.year-1980<<25|n.month+1<<21|n.date<<16|n.hours<<11|n.minutes<<5|n.seconds/2};hi.dosToDate=function(t){return new Date((t>>25&127)+1980,(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(t&31)<<1)};hi.fromDosTime=function(t){return hi.dosToDate(t.readUInt32LE(0))};hi.getEightBytes=function(t){var e=Buffer.alloc(8);return e.writeUInt32LE(t%4294967296,0),e.writeUInt32LE(t/4294967296|0,4),e};hi.getShortBytes=function(t){var e=Buffer.alloc(2);return e.writeUInt16LE((t&65535)>>>0,0),e};hi.getShortBytesValue=function(t,e){return t.readUInt16LE(e)};hi.getLongBytes=function(t){var e=Buffer.alloc(4);return e.writeUInt32LE((t&4294967295)>>>0,0),e};hi.getLongBytesValue=function(t,e){return t.readUInt32LE(e)};hi.toDosTime=function(t){return hi.getLongBytes(hi.dateToDos(t))}});var RR=b((U7e,UW)=>{var jW=Xb(),zW=8,LW=1,SAe=4,EAe=2,FW=64,BW=2048,Tr=UW.exports=function(){return this instanceof Tr?(this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this):new Tr};Tr.prototype.encode=function(){return jW.getShortBytes((this.descriptor?zW:0)|(this.utf8?BW:0)|(this.encryption?LW:0)|(this.strongEncryption?FW:0))};Tr.prototype.parse=function(t,e){var r=jW.getShortBytesValue(t,e),n=new Tr;return n.useDataDescriptor((r&zW)!==0),n.useUTF8ForNames((r&BW)!==0),n.useStrongEncryption((r&FW)!==0),n.useEncryption((r&LW)!==0),n.setSlidingDictionarySize((r&EAe)!==0?8192:4096),n.setNumberOfShannonFanoTrees((r&SAe)!==0?3:2),n};Tr.prototype.setNumberOfShannonFanoTrees=function(t){this.numberOfShannonFanoTrees=t};Tr.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees};Tr.prototype.setSlidingDictionarySize=function(t){this.slidingDictionarySize=t};Tr.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize};Tr.prototype.useDataDescriptor=function(t){this.descriptor=t};Tr.prototype.usesDataDescriptor=function(){return this.descriptor};Tr.prototype.useEncryption=function(t){this.encryption=t};Tr.prototype.usesEncryption=function(){return this.encryption};Tr.prototype.useStrongEncryption=function(t){this.strongEncryption=t};Tr.prototype.usesStrongEncryption=function(){return this.strongEncryption};Tr.prototype.useUTF8ForNames=function(t){this.utf8=t};Tr.prototype.usesUTF8ForNames=function(){return this.utf8}});var ZW=b((q7e,qW)=>{qW.exports={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420}});var DR=b((Z7e,HW)=>{HW.exports={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from(Array(2)),LONG:4,LONG_ZERO:Buffer.from(Array(4)),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1}});var OR=b((H7e,KW)=>{var IAe=Q("util").inherits,$Ae=_k(),GW=Yb(),WW=RR(),VW=ZW(),un=DR(),JW=Xb(),He=KW.exports=function(t){if(!(this instanceof He))return new He(t);GW.call(this),this.platform=un.PLATFORM_FAT,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new WW,this.crc=0,this.time=-1,this.minver=un.MIN_VERSION_INITIAL,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,t&&this.setName(t)};IAe(He,GW);He.prototype.getCentralDirectoryExtra=function(){return this.getExtra()};He.prototype.getComment=function(){return this.comment!==null?this.comment:""};He.prototype.getCompressedSize=function(){return this.csize};He.prototype.getCrc=function(){return this.crc};He.prototype.getExternalAttributes=function(){return this.exattr};He.prototype.getExtra=function(){return this.extra!==null?this.extra:un.EMPTY};He.prototype.getGeneralPurposeBit=function(){return this.gpb};He.prototype.getInternalAttributes=function(){return this.inattr};He.prototype.getLastModifiedDate=function(){return this.getTime()};He.prototype.getLocalFileDataExtra=function(){return this.getExtra()};He.prototype.getMethod=function(){return this.method};He.prototype.getName=function(){return this.name};He.prototype.getPlatform=function(){return this.platform};He.prototype.getSize=function(){return this.size};He.prototype.getTime=function(){return this.time!==-1?JW.dosToDate(this.time):-1};He.prototype.getTimeDos=function(){return this.time!==-1?this.time:0};He.prototype.getUnixMode=function(){return this.platform!==un.PLATFORM_UNIX?0:this.getExternalAttributes()>>un.SHORT_SHIFT&un.SHORT_MASK};He.prototype.getVersionNeededToExtract=function(){return this.minver};He.prototype.setComment=function(t){Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=t};He.prototype.setCompressedSize=function(t){if(t<0)throw new Error("invalid entry compressed size");this.csize=t};He.prototype.setCrc=function(t){if(t<0)throw new Error("invalid entry crc32");this.crc=t};He.prototype.setExternalAttributes=function(t){this.exattr=t>>>0};He.prototype.setExtra=function(t){this.extra=t};He.prototype.setGeneralPurposeBit=function(t){if(!(t instanceof WW))throw new Error("invalid entry GeneralPurposeBit");this.gpb=t};He.prototype.setInternalAttributes=function(t){this.inattr=t};He.prototype.setMethod=function(t){if(t<0)throw new Error("invalid entry compression method");this.method=t};He.prototype.setName=function(t,e=!1){t=$Ae(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),e&&(t=`/${t}`),Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=t};He.prototype.setPlatform=function(t){this.platform=t};He.prototype.setSize=function(t){if(t<0)throw new Error("invalid entry size");this.size=t};He.prototype.setTime=function(t,e){if(!(t instanceof Date))throw new Error("invalid entry time");this.time=JW.dateToDos(t,e)};He.prototype.setUnixMode=function(t){t|=this.isDirectory()?un.S_IFDIR:un.S_IFREG;var e=0;e|=t<<un.SHORT_SHIFT|(this.isDirectory()?un.S_DOS_D:un.S_DOS_A),this.setExternalAttributes(e),this.mode=t&un.MODE_MASK,this.platform=un.PLATFORM_UNIX};He.prototype.setVersionNeededToExtract=function(t){this.minver=t};He.prototype.isDirectory=function(){return this.getName().slice(-1)==="/"};He.prototype.isUnixSymlink=function(){return(this.getUnixMode()&VW.FILE_TYPE_FLAG)===VW.LINK_FLAG};He.prototype.isZip64=function(){return this.csize>un.ZIP64_MAGIC||this.size>un.ZIP64_MAGIC}});var MR=b((G7e,YW)=>{var V7e=Q("stream").Stream,PAe=Ol().PassThrough,TAe=gv(),AAe=YW.exports={};AAe.normalizeInputSource=function(t){if(t===null)return Buffer.alloc(0);if(typeof t=="string")return Buffer.from(t);if(TAe(t)&&!t._readableState){var e=new PAe;return t.pipe(e),e}return t}});var jR=b((W7e,XW)=>{var kAe=Q("util").inherits,CAe=gv(),NR=Ol().Transform,RAe=Yb(),DAe=MR(),zn=XW.exports=function(t){if(!(this instanceof zn))return new zn(t);NR.call(this,t),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}};kAe(zn,NR);zn.prototype._appendBuffer=function(t,e,r){};zn.prototype._appendStream=function(t,e,r){};zn.prototype._emitErrorCallback=function(t){t&&this.emit("error",t)};zn.prototype._finish=function(t){};zn.prototype._normalizeEntry=function(t){};zn.prototype._transform=function(t,e,r){r(null,t)};zn.prototype.entry=function(t,e,r){if(e=e||null,typeof r!="function"&&(r=this._emitErrorCallback.bind(this)),!(t instanceof RAe)){r(new Error("not a valid instance of ArchiveEntry"));return}if(this._archive.finish||this._archive.finished){r(new Error("unacceptable entry after finish"));return}if(this._archive.processing){r(new Error("already processing an entry"));return}if(this._archive.processing=!0,this._normalizeEntry(t),this._entry=t,e=DAe.normalizeInputSource(e),Buffer.isBuffer(e))this._appendBuffer(t,e,r);else if(CAe(e))this._appendStream(t,e,r);else{this._archive.processing=!1,r(new Error("input source must be valid Stream or Buffer instance"));return}return this};zn.prototype.finish=function(){if(this._archive.processing){this._archive.finish=!0;return}this._finish()};zn.prototype.getBytesWritten=function(){return this.offset};zn.prototype.write=function(t,e){return t&&(this.offset+=t.length),NR.prototype.write.call(this,t,e)}});var Qb=b(zR=>{var QW;(function(t){typeof DO_NOT_EXPORT_CRC>"u"?typeof zR=="object"?t(zR):typeof define=="function"&&define.amd?define(function(){var e={};return t(e),e}):t(QW={}):t(QW={})})(function(t){t.version="1.2.2";function e(){for(var P=0,R=new Array(256),T=0;T!=256;++T)P=T,P=P&1?-306674912^P>>>1:P>>>1,P=P&1?-306674912^P>>>1:P>>>1,P=P&1?-306674912^P>>>1:P>>>1,P=P&1?-306674912^P>>>1:P>>>1,P=P&1?-306674912^P>>>1:P>>>1,P=P&1?-306674912^P>>>1:P>>>1,P=P&1?-306674912^P>>>1:P>>>1,P=P&1?-306674912^P>>>1:P>>>1,R[T]=P;return typeof Int32Array<"u"?new Int32Array(R):R}var r=e();function n(P){var R=0,T=0,D=0,A=typeof Int32Array<"u"?new Int32Array(4096):new Array(4096);for(D=0;D!=256;++D)A[D]=P[D];for(D=0;D!=256;++D)for(T=P[D],R=256+D;R<4096;R+=256)T=A[R]=T>>>8^P[T&255];var M=[];for(D=1;D!=16;++D)M[D-1]=typeof Int32Array<"u"?A.subarray(D*256,D*256+256):A.slice(D*256,D*256+256);return M}var i=n(r),o=i[0],a=i[1],s=i[2],l=i[3],c=i[4],u=i[5],d=i[6],f=i[7],p=i[8],h=i[9],m=i[10],y=i[11],g=i[12],v=i[13],E=i[14];function x(P,R){for(var T=R^-1,D=0,A=P.length;D<A;)T=T>>>8^r[(T^P.charCodeAt(D++))&255];return~T}function w(P,R){for(var T=R^-1,D=P.length-15,A=0;A<D;)T=E[P[A++]^T&255]^v[P[A++]^T>>8&255]^g[P[A++]^T>>16&255]^y[P[A++]^T>>>24]^m[P[A++]]^h[P[A++]]^p[P[A++]]^f[P[A++]]^d[P[A++]]^u[P[A++]]^c[P[A++]]^l[P[A++]]^s[P[A++]]^a[P[A++]]^o[P[A++]]^r[P[A++]];for(D+=15;A<D;)T=T>>>8^r[(T^P[A++])&255];return~T}function k(P,R){for(var T=R^-1,D=0,A=P.length,M=0,U=0;D<A;)M=P.charCodeAt(D++),M<128?T=T>>>8^r[(T^M)&255]:M<2048?(T=T>>>8^r[(T^(192|M>>6&31))&255],T=T>>>8^r[(T^(128|M&63))&255]):M>=55296&&M<57344?(M=(M&1023)+64,U=P.charCodeAt(D++)&1023,T=T>>>8^r[(T^(240|M>>8&7))&255],T=T>>>8^r[(T^(128|M>>2&63))&255],T=T>>>8^r[(T^(128|U>>6&15|(M&3)<<4))&255],T=T>>>8^r[(T^(128|U&63))&255]):(T=T>>>8^r[(T^(224|M>>12&15))&255],T=T>>>8^r[(T^(128|M>>6&63))&255],T=T>>>8^r[(T^(128|M&63))&255]);return~T}t.table=r,t.bstr=x,t.buf=w,t.str=k})});var tJ=b((K7e,eJ)=>{"use strict";var{Transform:OAe}=Ol(),MAe=Qb(),LR=class extends OAe{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(e,r,n){e&&(this.checksum=MAe.buf(e,this.checksum)>>>0,this.rawSize+=e.length),n(null,e)}digest(e){let r=Buffer.allocUnsafe(4);return r.writeUInt32BE(this.checksum>>>0,0),e?r.toString(e):r}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}};eJ.exports=LR});var nJ=b((Y7e,rJ)=>{"use strict";var{DeflateRaw:NAe}=Q("zlib"),jAe=Qb(),FR=class extends NAe{constructor(e){super(e),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(e,r){return e&&(this.compressedSize+=e.length),super.push(e,r)}_transform(e,r,n){e&&(this.checksum=jAe.buf(e,this.checksum)>>>0,this.rawSize+=e.length),super._transform(e,r,n)}digest(e){let r=Buffer.allocUnsafe(4);return r.writeUInt32BE(this.checksum>>>0,0),e?r.toString(e):r}hex(){return this.digest("hex").toUpperCase()}size(e=!1){return e?this.compressedSize:this.rawSize}};rJ.exports=FR});var BR=b((X7e,iJ)=>{"use strict";iJ.exports={CRC32Stream:tJ(),DeflateCRC32Stream:nJ()}});var sJ=b((rZe,aJ)=>{var zAe=Q("util").inherits,LAe=Qb(),{CRC32Stream:FAe}=BR(),{DeflateCRC32Stream:BAe}=BR(),oJ=jR(),Q7e=OR(),eZe=RR(),Oe=DR(),tZe=MR(),ye=Xb(),mr=aJ.exports=function(t){if(!(this instanceof mr))return new mr(t);t=this.options=this._defaults(t),oJ.call(this,t),this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:t.forceZip64,forceLocalTime:t.forceLocalTime}};zAe(mr,oJ);mr.prototype._afterAppend=function(t){this._entries.push(t),t.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(t),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()};mr.prototype._appendBuffer=function(t,e,r){e.length===0&&t.setMethod(Oe.METHOD_STORED);var n=t.getMethod();if(n===Oe.METHOD_STORED&&(t.setSize(e.length),t.setCompressedSize(e.length),t.setCrc(LAe.buf(e)>>>0)),this._writeLocalFileHeader(t),n===Oe.METHOD_STORED){this.write(e),this._afterAppend(t),r(null,t);return}else if(n===Oe.METHOD_DEFLATED){this._smartStream(t,r).end(e);return}else{r(new Error("compression method "+n+" not implemented"));return}};mr.prototype._appendStream=function(t,e,r){t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(Oe.MIN_VERSION_DATA_DESCRIPTOR),this._writeLocalFileHeader(t);var n=this._smartStream(t,r);e.once("error",function(i){n.emit("error",i),n.end()}),e.pipe(n)};mr.prototype._defaults=function(t){return typeof t!="object"&&(t={}),typeof t.zlib!="object"&&(t.zlib={}),typeof t.zlib.level!="number"&&(t.zlib.level=Oe.ZLIB_BEST_SPEED),t.forceZip64=!!t.forceZip64,t.forceLocalTime=!!t.forceLocalTime,t};mr.prototype._finish=function(){this._archive.centralOffset=this.offset,this._entries.forEach(function(t){this._writeCentralFileHeader(t)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()};mr.prototype._normalizeEntry=function(t){t.getMethod()===-1&&t.setMethod(Oe.METHOD_DEFLATED),t.getMethod()===Oe.METHOD_DEFLATED&&(t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(Oe.MIN_VERSION_DATA_DESCRIPTOR)),t.getTime()===-1&&t.setTime(new Date,this._archive.forceLocalTime),t._offsets={file:0,data:0,contents:0}};mr.prototype._smartStream=function(t,e){var r=t.getMethod()===Oe.METHOD_DEFLATED,n=r?new BAe(this.options.zlib):new FAe,i=null;function o(){var a=n.digest().readUInt32BE(0);t.setCrc(a),t.setSize(n.size()),t.setCompressedSize(n.size(!0)),this._afterAppend(t),e(i,t)}return n.once("end",o.bind(this)),n.once("error",function(a){i=a}),n.pipe(this,{end:!1}),n};mr.prototype._writeCentralDirectoryEnd=function(){var t=this._entries.length,e=this._archive.centralLength,r=this._archive.centralOffset;this.isZip64()&&(t=Oe.ZIP64_MAGIC_SHORT,e=Oe.ZIP64_MAGIC,r=Oe.ZIP64_MAGIC),this.write(ye.getLongBytes(Oe.SIG_EOCD)),this.write(Oe.SHORT_ZERO),this.write(Oe.SHORT_ZERO),this.write(ye.getShortBytes(t)),this.write(ye.getShortBytes(t)),this.write(ye.getLongBytes(e)),this.write(ye.getLongBytes(r));var n=this.getComment(),i=Buffer.byteLength(n);this.write(ye.getShortBytes(i)),this.write(n)};mr.prototype._writeCentralDirectoryZip64=function(){this.write(ye.getLongBytes(Oe.SIG_ZIP64_EOCD)),this.write(ye.getEightBytes(44)),this.write(ye.getShortBytes(Oe.MIN_VERSION_ZIP64)),this.write(ye.getShortBytes(Oe.MIN_VERSION_ZIP64)),this.write(Oe.LONG_ZERO),this.write(Oe.LONG_ZERO),this.write(ye.getEightBytes(this._entries.length)),this.write(ye.getEightBytes(this._entries.length)),this.write(ye.getEightBytes(this._archive.centralLength)),this.write(ye.getEightBytes(this._archive.centralOffset)),this.write(ye.getLongBytes(Oe.SIG_ZIP64_EOCD_LOC)),this.write(Oe.LONG_ZERO),this.write(ye.getEightBytes(this._archive.centralOffset+this._archive.centralLength)),this.write(ye.getLongBytes(1))};mr.prototype._writeCentralFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),n=t._offsets.file,i=t.getSize(),o=t.getCompressedSize();if(t.isZip64()||n>Oe.ZIP64_MAGIC){i=Oe.ZIP64_MAGIC,o=Oe.ZIP64_MAGIC,n=Oe.ZIP64_MAGIC,t.setVersionNeededToExtract(Oe.MIN_VERSION_ZIP64);var a=Buffer.concat([ye.getShortBytes(Oe.ZIP64_EXTRA_ID),ye.getShortBytes(24),ye.getEightBytes(t.getSize()),ye.getEightBytes(t.getCompressedSize()),ye.getEightBytes(t._offsets.file)],28);t.setExtra(a)}this.write(ye.getLongBytes(Oe.SIG_CFH)),this.write(ye.getShortBytes(t.getPlatform()<<8|Oe.VERSION_MADEBY)),this.write(ye.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(ye.getShortBytes(r)),this.write(ye.getLongBytes(t.getTimeDos())),this.write(ye.getLongBytes(t.getCrc())),this.write(ye.getLongBytes(o)),this.write(ye.getLongBytes(i));var s=t.getName(),l=t.getComment(),c=t.getCentralDirectoryExtra();e.usesUTF8ForNames()&&(s=Buffer.from(s),l=Buffer.from(l)),this.write(ye.getShortBytes(s.length)),this.write(ye.getShortBytes(c.length)),this.write(ye.getShortBytes(l.length)),this.write(Oe.SHORT_ZERO),this.write(ye.getShortBytes(t.getInternalAttributes())),this.write(ye.getLongBytes(t.getExternalAttributes())),this.write(ye.getLongBytes(n)),this.write(s),this.write(c),this.write(l)};mr.prototype._writeDataDescriptor=function(t){this.write(ye.getLongBytes(Oe.SIG_DD)),this.write(ye.getLongBytes(t.getCrc())),t.isZip64()?(this.write(ye.getEightBytes(t.getCompressedSize())),this.write(ye.getEightBytes(t.getSize()))):(this.write(ye.getLongBytes(t.getCompressedSize())),this.write(ye.getLongBytes(t.getSize())))};mr.prototype._writeLocalFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),n=t.getName(),i=t.getLocalFileDataExtra();t.isZip64()&&(e.useDataDescriptor(!0),t.setVersionNeededToExtract(Oe.MIN_VERSION_ZIP64)),e.usesUTF8ForNames()&&(n=Buffer.from(n)),t._offsets.file=this.offset,this.write(ye.getLongBytes(Oe.SIG_LFH)),this.write(ye.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(ye.getShortBytes(r)),this.write(ye.getLongBytes(t.getTimeDos())),t._offsets.data=this.offset,e.usesDataDescriptor()?(this.write(Oe.LONG_ZERO),this.write(Oe.LONG_ZERO),this.write(Oe.LONG_ZERO)):(this.write(ye.getLongBytes(t.getCrc())),this.write(ye.getLongBytes(t.getCompressedSize())),this.write(ye.getLongBytes(t.getSize()))),this.write(ye.getShortBytes(n.length)),this.write(ye.getShortBytes(i.length)),this.write(n),this.write(i),t._offsets.contents=this.offset};mr.prototype.getComment=function(t){return this._archive.comment!==null?this._archive.comment:""};mr.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>Oe.ZIP64_MAGIC_SHORT||this._archive.centralLength>Oe.ZIP64_MAGIC||this._archive.centralOffset>Oe.ZIP64_MAGIC};mr.prototype.setComment=function(t){this._archive.comment=t}});var UR=b((nZe,lJ)=>{lJ.exports={ArchiveEntry:Yb(),ZipArchiveEntry:OR(),ArchiveOutputStream:jR(),ZipArchiveOutputStream:sJ()}});var uJ=b((iZe,cJ)=>{var UAe=Q("util").inherits,ZR=UR().ZipArchiveOutputStream,qAe=UR().ZipArchiveEntry,qR=od(),ad=cJ.exports=function(t){if(!(this instanceof ad))return new ad(t);t=this.options=t||{},t.zlib=t.zlib||{},ZR.call(this,t),typeof t.level=="number"&&t.level>=0&&(t.zlib.level=t.level,delete t.level),!t.forceZip64&&typeof t.zlib.level=="number"&&t.zlib.level===0&&(t.store=!0),t.namePrependSlash=t.namePrependSlash||!1,t.comment&&t.comment.length>0&&this.setComment(t.comment)};UAe(ad,ZR);ad.prototype._normalizeFileData=function(t){t=qR.defaults(t,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""});var e=t.type==="directory",r=t.type==="symlink";return t.name&&(t.name=qR.sanitizePath(t.name),!r&&t.name.slice(-1)==="/"?(e=!0,t.type="directory"):e&&(t.name+="/")),(e||r)&&(t.store=!0),t.date=qR.dateify(t.date),t};ad.prototype.entry=function(t,e,r){if(typeof r!="function"&&(r=this._emitErrorCallback.bind(this)),e=this._normalizeFileData(e),e.type!=="file"&&e.type!=="directory"&&e.type!=="symlink"){r(new Error(e.type+" entries not currently supported"));return}if(typeof e.name!="string"||e.name.length===0){r(new Error("entry name must be a non-empty string value"));return}if(e.type==="symlink"&&typeof e.linkname!="string"){r(new Error("entry linkname must be a non-empty string value when type equals symlink"));return}var n=new qAe(e.name);return n.setTime(e.date,this.options.forceLocalTime),e.namePrependSlash&&n.setName(e.name,!0),e.store&&n.setMethod(0),e.comment.length>0&&n.setComment(e.comment),e.type==="symlink"&&typeof e.mode!="number"&&(e.mode=40960),typeof e.mode=="number"&&(e.type==="symlink"&&(e.mode|=40960),n.setUnixMode(e.mode)),e.type==="symlink"&&typeof e.linkname=="string"&&(t=Buffer.from(e.linkname)),ZR.prototype.entry.call(this,n,t,r)};ad.prototype.finalize=function(){this.finish()}});var fJ=b((oZe,dJ)=>{var ZAe=uJ(),HAe=od(),ps=function(t){if(!(this instanceof ps))return new ps(t);t=this.options=HAe.defaults(t,{comment:"",forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new ZAe(t)};ps.prototype.append=function(t,e,r){this.engine.entry(t,e,r)};ps.prototype.finalize=function(){this.engine.finalize()};ps.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)};ps.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)};ps.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)};dJ.exports=ps});var hJ=b((aZe,pJ)=>{pJ.exports=Q("events")});var gJ=b((lZe,mJ)=>{mJ.exports=class{constructor(e){if(!(e>0)||(e-1&e)!==0)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(e),this.mask=e-1,this.top=0,this.btm=0,this.next=null}clear(){this.top=this.btm=0,this.next=null,this.buffer.fill(void 0)}push(e){return this.buffer[this.top]!==void 0?!1:(this.buffer[this.top]=e,this.top=this.top+1&this.mask,!0)}shift(){let e=this.buffer[this.btm];if(e!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,e}peek(){return this.buffer[this.btm]}isEmpty(){return this.buffer[this.btm]===void 0}}});var HR=b((uZe,_J)=>{var yJ=gJ();_J.exports=class{constructor(e){this.hwm=e||16,this.head=new yJ(this.hwm),this.tail=this.head,this.length=0}clear(){this.head=this.tail,this.head.clear(),this.length=0}push(e){if(this.length++,!this.head.push(e)){let r=this.head;this.head=r.next=new yJ(2*this.head.buffer.length),this.head.push(e)}}shift(){this.length!==0&&this.length--;let e=this.tail.shift();if(e===void 0&&this.tail.next){let r=this.tail.next;return this.tail.next=null,this.tail=r,this.tail.shift()}return e}peek(){let e=this.tail.peek();return e===void 0&&this.tail.next?this.tail.next.peek():e}isEmpty(){return this.length===0}}});var sd=b((dZe,vJ)=>{function VAe(t){return Buffer.isBuffer(t)||t instanceof Uint8Array}function GAe(t){return Buffer.isEncoding(t)}function WAe(t,e,r){return Buffer.alloc(t,e,r)}function JAe(t){return Buffer.allocUnsafe(t)}function KAe(t){return Buffer.allocUnsafeSlow(t)}function YAe(t,e){return Buffer.byteLength(t,e)}function XAe(t,e){return Buffer.compare(t,e)}function QAe(t,e){return Buffer.concat(t,e)}function eke(t,e,r,n,i){return St(t).copy(e,r,n,i)}function tke(t,e){return St(t).equals(e)}function rke(t,e,r,n,i){return St(t).fill(e,r,n,i)}function nke(t,e,r){return Buffer.from(t,e,r)}function ike(t,e,r,n){return St(t).includes(e,r,n)}function oke(t,e,r,n){return St(t).indexOf(e,r,n)}function ake(t,e,r,n){return St(t).lastIndexOf(e,r,n)}function ske(t){return St(t).swap16()}function lke(t){return St(t).swap32()}function cke(t){return St(t).swap64()}function St(t){return Buffer.isBuffer(t)?t:Buffer.from(t.buffer,t.byteOffset,t.byteLength)}function uke(t,e,r,n){return St(t).toString(e,r,n)}function dke(t,e,r,n,i){return St(t).write(e,r,n,i)}function fke(t,e){return St(t).readDoubleBE(e)}function pke(t,e){return St(t).readDoubleLE(e)}function hke(t,e){return St(t).readFloatBE(e)}function mke(t,e){return St(t).readFloatLE(e)}function gke(t,e){return St(t).readInt32BE(e)}function yke(t,e){return St(t).readInt32LE(e)}function _ke(t,e){return St(t).readUInt32BE(e)}function vke(t,e){return St(t).readUInt32LE(e)}function bke(t,e,r){return St(t).writeDoubleBE(e,r)}function wke(t,e,r){return St(t).writeDoubleLE(e,r)}function xke(t,e,r){return St(t).writeFloatBE(e,r)}function Ske(t,e,r){return St(t).writeFloatLE(e,r)}function Eke(t,e,r){return St(t).writeInt32BE(e,r)}function Ike(t,e,r){return St(t).writeInt32LE(e,r)}function $ke(t,e,r){return St(t).writeUInt32BE(e,r)}function Pke(t,e,r){return St(t).writeUInt32LE(e,r)}vJ.exports={isBuffer:VAe,isEncoding:GAe,alloc:WAe,allocUnsafe:JAe,allocUnsafeSlow:KAe,byteLength:YAe,compare:XAe,concat:QAe,copy:eke,equals:tke,fill:rke,from:nke,includes:ike,indexOf:oke,lastIndexOf:ake,swap16:ske,swap32:lke,swap64:cke,toBuffer:St,toString:uke,write:dke,readDoubleBE:fke,readDoubleLE:pke,readFloatBE:hke,readFloatLE:mke,readInt32BE:gke,readInt32LE:yke,readUInt32BE:_ke,readUInt32LE:vke,writeDoubleBE:bke,writeDoubleLE:wke,writeFloatBE:xke,writeFloatLE:Ske,writeInt32BE:Eke,writeInt32LE:Ike,writeUInt32BE:$ke,writeUInt32LE:Pke}});var wJ=b((pZe,bJ)=>{var Tke=sd();bJ.exports=class{constructor(e){this.encoding=e}get remaining(){return 0}decode(e){return Tke.toString(e,this.encoding)}flush(){return""}}});var SJ=b((mZe,xJ)=>{var Ake=sd();xJ.exports=class{constructor(){this.codePoint=0,this.bytesSeen=0,this.bytesNeeded=0,this.lowerBoundary=128,this.upperBoundary=191}get remaining(){return this.bytesSeen}decode(e){if(this.bytesNeeded===0){let n=!0;for(let i=Math.max(0,e.byteLength-4),o=e.byteLength;i<o&&n;i++)n=e[i]<=127;if(n)return Ake.toString(e,"utf8")}let r="";for(let n=0,i=e.byteLength;n<i;n++){let o=e[n];if(this.bytesNeeded===0){o<=127?r+=String.fromCharCode(o):(this.bytesSeen=1,o>=194&&o<=223?(this.bytesNeeded=2,this.codePoint=o&31):o>=224&&o<=239?(o===224?this.lowerBoundary=160:o===237&&(this.upperBoundary=159),this.bytesNeeded=3,this.codePoint=o&15):o>=240&&o<=244?(o===240&&(this.lowerBoundary=144),o===244&&(this.upperBoundary=143),this.bytesNeeded=4,this.codePoint=o&7):r+="�");continue}if(o<this.lowerBoundary||o>this.upperBoundary){this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191,r+="�";continue}this.lowerBoundary=128,this.upperBoundary=191,this.codePoint=this.codePoint<<6|o&63,this.bytesSeen++,this.bytesSeen===this.bytesNeeded&&(r+=String.fromCodePoint(this.codePoint),this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0)}return r}flush(){let e=this.bytesNeeded>0?"�":"";return this.codePoint=0,this.bytesNeeded=0,this.bytesSeen=0,this.lowerBoundary=128,this.upperBoundary=191,e}}});var IJ=b((yZe,EJ)=>{var kke=wJ(),Cke=SJ();EJ.exports=class{constructor(e="utf8"){switch(this.encoding=Rke(e),this.encoding){case"utf8":this.decoder=new Cke;break;case"utf16le":case"base64":throw new Error("Unsupported encoding: "+this.encoding);default:this.decoder=new kke(this.encoding)}}get remaining(){return this.decoder.remaining}push(e){return typeof e=="string"?e:this.decoder.decode(e)}write(e){return this.push(e)}end(e){let r="";return e&&(r=this.push(e)),r+=this.decoder.flush(),r}};function Rke(t){switch(t=t.toLowerCase(),t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:throw new Error("Unknown encoding: "+t)}}});var sD=b((_Ze,WJ)=>{var{EventEmitter:Dke}=hJ(),ow=new Error("Stream was destroyed"),VR=new Error("Premature close"),CJ=HR(),Oke=IJ(),GR=typeof queueMicrotask>"u"?t=>global.process.nextTick(t):queueMicrotask,Jt=(1<<29)-1,_o=1,eD=2,Fl=4,wm=8,RJ=Jt^_o,Mke=Jt^eD,$m=16,ld=32,dd=64,ms=128,Pm=256,tD=512,Bl=1024,WR=2048,rD=4096,nD=8192,zi=16384,hs=32768,aw=65536,Ul=131072,DJ=Pm|tD,Nke=$m|aw,jke=dd|$m,zke=rD|ms,iD=Pm|Ul,Lke=Jt^$m,Fke=Jt^dd,Bke=Jt^(dd|aw),$J=Jt^aw,Uke=Jt^Pm,qke=Jt^(ms|nD),Zke=Jt^Bl,PJ=Jt^DJ,OJ=Jt^hs,Hke=Jt^ld,MJ=Jt^Ul,Vke=Jt^iD,na=1<<18,ud=2<<18,Tm=4<<18,ql=8<<18,Am=16<<18,gs=32<<18,JR=64<<18,cd=128<<18,oD=256<<18,Zl=512<<18,sw=1024<<18,Gke=Jt^(na|oD),NJ=Jt^Tm,Wke=Jt^(na|Zl),Jke=Jt^Am,Kke=Jt^ql,jJ=Jt^cd,Yke=Jt^ud,zJ=Jt^sw,xm=$m|na,LJ=Jt^xm,aD=zi|gs,vo=Fl|wm|eD,Ln=vo|_o,FJ=vo|aD,Xke=NJ&Fke,lw=cd|hs,Qke=lw&LJ,BJ=Ln|Qke,eCe=Ln|Bl|zi,TJ=Ln|zi|ms,tCe=Ln|Bl|ms,rCe=Ln|rD|ms|nD,nCe=Ln|$m|Bl|zi|aw|Ul,iCe=vo|Bl|zi,oCe=ld|Ln|hs|dd,aCe=hs|_o,sCe=Ln|Zl|gs,lCe=ql|Am,UJ=ql|na,cCe=ql|Am|Ln|na,AJ=Ln|na|ql|sw,uCe=Tm|na,dCe=na|oD,fCe=Ln|Zl|UJ|gs,pCe=Am|vo|Zl|gs,hCe=ud|Ln|cd|Tm,mCe=Zl|gs|vo,ew=Symbol.asyncIterator||Symbol("asyncIterator"),tw=class{constructor(e,{highWaterMark:r=16384,map:n=null,mapWritable:i,byteLength:o,byteLengthWritable:a}={}){this.stream=e,this.queue=new CJ,this.highWaterMark=r,this.buffered=0,this.error=null,this.pipeline=null,this.drains=null,this.byteLength=a||o||GJ,this.map=i||n,this.afterWrite=_Ce.bind(this),this.afterUpdateNextTick=wCe.bind(this)}get ended(){return(this.stream._duplexState&gs)!==0}push(e){return(this.stream._duplexState&mCe)!==0?!1:(this.map!==null&&(e=this.map(e)),this.buffered+=this.byteLength(e),this.queue.push(e),this.buffered<this.highWaterMark?(this.stream._duplexState|=ql,!0):(this.stream._duplexState|=lCe,!1))}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=Kke),e}end(e){typeof e=="function"?this.stream.once("finish",e):e!=null&&this.push(e),this.stream._duplexState=(this.stream._duplexState|Zl)&NJ}autoBatch(e,r){let n=[],i=this.stream;for(n.push(e);(i._duplexState&AJ)===UJ;)n.push(i._writableState.shift());if((i._duplexState&Ln)!==0)return r(null);i._writev(n,r)}update(){let e=this.stream;e._duplexState|=ud;do{for(;(e._duplexState&AJ)===ql;){let r=this.shift();e._duplexState|=dCe,e._write(r,this.afterWrite)}(e._duplexState&uCe)===0&&this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=Yke}updateNonPrimary(){let e=this.stream;if((e._duplexState&fCe)===Zl){e._duplexState=e._duplexState|na,e._final(yCe.bind(this));return}if((e._duplexState&vo)===Fl){(e._duplexState&lw)===0&&(e._duplexState|=xm,e._destroy(qJ.bind(this)));return}(e._duplexState&BJ)===_o&&(e._duplexState=(e._duplexState|xm)&RJ,e._open(ZJ.bind(this)))}continueUpdate(){return(this.stream._duplexState&cd)===0?!1:(this.stream._duplexState&=jJ,!0)}updateCallback(){(this.stream._duplexState&hCe)===Tm?this.update():this.updateNextTick()}updateNextTick(){(this.stream._duplexState&cd)===0&&(this.stream._duplexState|=cd,(this.stream._duplexState&ud)===0&&GR(this.afterUpdateNextTick))}},KR=class{constructor(e,{highWaterMark:r=16384,map:n=null,mapReadable:i,byteLength:o,byteLengthReadable:a}={}){this.stream=e,this.queue=new CJ,this.highWaterMark=r===0?1:r,this.buffered=0,this.readAhead=r>0,this.error=null,this.pipeline=null,this.byteLength=a||o||GJ,this.map=i||n,this.pipeTo=null,this.afterRead=vCe.bind(this),this.afterUpdateNextTick=bCe.bind(this)}get ended(){return(this.stream._duplexState&zi)!==0}pipe(e,r){if(this.pipeTo!==null)throw new Error("Can only pipe to one destination");if(typeof r!="function"&&(r=null),this.stream._duplexState|=tD,this.pipeTo=e,this.pipeline=new XR(this.stream,e,r),r&&this.stream.on("error",kJ),Im(e))e._writableState.pipeline=this.pipeline,r&&e.on("error",kJ),e.on("finish",this.pipeline.finished.bind(this.pipeline));else{let n=this.pipeline.done.bind(this.pipeline,e),i=this.pipeline.done.bind(this.pipeline,e,null);e.on("error",n),e.on("close",i),e.on("finish",this.pipeline.finished.bind(this.pipeline))}e.on("drain",gCe.bind(this)),this.stream.emit("piping",e),e.emit("pipe",this.stream)}push(e){let r=this.stream;return e===null?(this.highWaterMark=0,r._duplexState=(r._duplexState|Bl)&Bke,!1):this.map!==null&&(e=this.map(e),e===null)?(r._duplexState&=$J,this.buffered<this.highWaterMark):(this.buffered+=this.byteLength(e),this.queue.push(e),r._duplexState=(r._duplexState|ms)&$J,this.buffered<this.highWaterMark)}shift(){let e=this.queue.shift();return this.buffered-=this.byteLength(e),this.buffered===0&&(this.stream._duplexState&=qke),e}unshift(e){let r=[this.map!==null?this.map(e):e];for(;this.buffered>0;)r.push(this.shift());for(let n=0;n<r.length-1;n++){let i=r[n];this.buffered+=this.byteLength(i),this.queue.push(i)}this.push(r[r.length-1])}read(){let e=this.stream;if((e._duplexState&TJ)===ms){let r=this.shift();return this.pipeTo!==null&&this.pipeTo.write(r)===!1&&(e._duplexState&=PJ),(e._duplexState&WR)!==0&&e.emit("data",r),r}return this.readAhead===!1&&(e._duplexState|=Ul,this.updateNextTick()),null}drain(){let e=this.stream;for(;(e._duplexState&TJ)===ms&&(e._duplexState&DJ)!==0;){let r=this.shift();this.pipeTo!==null&&this.pipeTo.write(r)===!1&&(e._duplexState&=PJ),(e._duplexState&WR)!==0&&e.emit("data",r)}}update(){let e=this.stream;e._duplexState|=ld;do{for(this.drain();this.buffered<this.highWaterMark&&(e._duplexState&nCe)===Ul;)e._duplexState|=Nke,e._read(this.afterRead),this.drain();(e._duplexState&rCe)===zke&&(e._duplexState|=nD,e.emit("readable")),(e._duplexState&jke)===0&&this.updateNonPrimary()}while(this.continueUpdate()===!0);e._duplexState&=Hke}updateNonPrimary(){let e=this.stream;if((e._duplexState&tCe)===Bl&&(e._duplexState=(e._duplexState|zi)&Zke,e.emit("end"),(e._duplexState&FJ)===aD&&(e._duplexState|=Fl),this.pipeTo!==null&&this.pipeTo.end()),(e._duplexState&vo)===Fl){(e._duplexState&lw)===0&&(e._duplexState|=xm,e._destroy(qJ.bind(this)));return}(e._duplexState&BJ)===_o&&(e._duplexState=(e._duplexState|xm)&RJ,e._open(ZJ.bind(this)))}continueUpdate(){return(this.stream._duplexState&hs)===0?!1:(this.stream._duplexState&=OJ,!0)}updateCallback(){(this.stream._duplexState&oCe)===dd?this.update():this.updateNextTick()}updateNextTickIfOpen(){(this.stream._duplexState&aCe)===0&&(this.stream._duplexState|=hs,(this.stream._duplexState&ld)===0&&GR(this.afterUpdateNextTick))}updateNextTick(){(this.stream._duplexState&hs)===0&&(this.stream._duplexState|=hs,(this.stream._duplexState&ld)===0&&GR(this.afterUpdateNextTick))}},YR=class{constructor(e){this.data=null,this.afterTransform=SCe.bind(e),this.afterFinal=null}},XR=class{constructor(e,r,n){this.from=e,this.to=r,this.afterPipe=n,this.error=null,this.pipeToFinished=!1}finished(){this.pipeToFinished=!0}done(e,r){if(r&&(this.error=r),e===this.to&&(this.to=null,this.from!==null)){((this.from._duplexState&zi)===0||!this.pipeToFinished)&&this.from.destroy(this.error||new Error("Writable stream closed prematurely"));return}if(e===this.from&&(this.from=null,this.to!==null)){(e._duplexState&zi)===0&&this.to.destroy(this.error||new Error("Readable stream closed before ending"));return}this.afterPipe!==null&&this.afterPipe(this.error),this.to=this.from=this.afterPipe=null}};function gCe(){this.stream._duplexState|=tD,this.updateCallback()}function yCe(t){let e=this.stream;t&&e.destroy(t),(e._duplexState&vo)===0&&(e._duplexState|=gs,e.emit("finish")),(e._duplexState&FJ)===aD&&(e._duplexState|=Fl),e._duplexState&=Wke,(e._duplexState&ud)===0?this.update():this.updateNextTick()}function qJ(t){let e=this.stream;!t&&this.error!==ow&&(t=this.error),t&&e.emit("error",t),e._duplexState|=wm,e.emit("close");let r=e._readableState,n=e._writableState;if(r!==null&&r.pipeline!==null&&r.pipeline.done(e,t),n!==null){for(;n.drains!==null&&n.drains.length>0;)n.drains.shift().resolve(!1);n.pipeline!==null&&n.pipeline.done(e,t)}}function _Ce(t){let e=this.stream;t&&e.destroy(t),e._duplexState&=Gke,this.drains!==null&&xCe(this.drains),(e._duplexState&cCe)===Am&&(e._duplexState&=Jke,(e._duplexState&JR)===JR&&e.emit("drain")),this.updateCallback()}function vCe(t){t&&this.stream.destroy(t),this.stream._duplexState&=Lke,this.readAhead===!1&&(this.stream._duplexState&Pm)===0&&(this.stream._duplexState&=MJ),this.updateCallback()}function bCe(){(this.stream._duplexState&ld)===0&&(this.stream._duplexState&=OJ,this.update())}function wCe(){(this.stream._duplexState&ud)===0&&(this.stream._duplexState&=jJ,this.update())}function xCe(t){for(let e=0;e<t.length;e++)--t[e].writes===0&&(t.shift().resolve(!0),e--)}function ZJ(t){let e=this.stream;t&&e.destroy(t),(e._duplexState&Fl)===0&&((e._duplexState&eCe)===0&&(e._duplexState|=dd),(e._duplexState&sCe)===0&&(e._duplexState|=Tm),e.emit("open")),e._duplexState&=LJ,e._writableState!==null&&e._writableState.updateCallback(),e._readableState!==null&&e._readableState.updateCallback()}function SCe(t,e){e!=null&&this.push(e),this._writableState.afterWrite(t)}function ECe(t){this._readableState!==null&&(t==="data"&&(this._duplexState|=WR|iD,this._readableState.updateNextTick()),t==="readable"&&(this._duplexState|=rD,this._readableState.updateNextTick())),this._writableState!==null&&t==="drain"&&(this._duplexState|=JR,this._writableState.updateNextTick())}var Sm=class extends Dke{constructor(e){super(),this._duplexState=0,this._readableState=null,this._writableState=null,e&&(e.open&&(this._open=e.open),e.destroy&&(this._destroy=e.destroy),e.predestroy&&(this._predestroy=e.predestroy),e.signal&&e.signal.addEventListener("abort",OCe.bind(this))),this.on("newListener",ECe)}_open(e){e(null)}_destroy(e){e(null)}_predestroy(){}get readable(){return this._readableState!==null?!0:void 0}get writable(){return this._writableState!==null?!0:void 0}get destroyed(){return(this._duplexState&wm)!==0}get destroying(){return(this._duplexState&vo)!==0}destroy(e){(this._duplexState&vo)===0&&(e||(e=ow),this._duplexState=(this._duplexState|Fl)&Xke,this._readableState!==null&&(this._readableState.highWaterMark=0,this._readableState.error=e),this._writableState!==null&&(this._writableState.highWaterMark=0,this._writableState.error=e),this._duplexState|=eD,this._predestroy(),this._duplexState&=Mke,this._readableState!==null&&this._readableState.updateNextTick(),this._writableState!==null&&this._writableState.updateNextTick())}},rw=class t extends Sm{constructor(e){super(e),this._duplexState|=_o|gs|Ul,this._readableState=new KR(this,e),e&&(this._readableState.readAhead===!1&&(this._duplexState&=MJ),e.read&&(this._read=e.read),e.eagerOpen&&this._readableState.updateNextTick(),e.encoding&&this.setEncoding(e.encoding))}setEncoding(e){let r=new Oke(e),n=this._readableState.map||PCe;return this._readableState.map=i,this;function i(o){let a=r.push(o);return a===""&&(o.byteLength!==0||r.remaining>0)?null:n(a)}}_read(e){e(null)}pipe(e,r){return this._readableState.updateNextTick(),this._readableState.pipe(e,r),e}read(){return this._readableState.updateNextTick(),this._readableState.read()}push(e){return this._readableState.updateNextTickIfOpen(),this._readableState.push(e)}unshift(e){return this._readableState.updateNextTickIfOpen(),this._readableState.unshift(e)}resume(){return this._duplexState|=iD,this._readableState.updateNextTick(),this}pause(){return this._duplexState&=this._readableState.readAhead===!1?Vke:Uke,this}static _fromAsyncIterator(e,r){let n,i=new t({...r,read(a){e.next().then(o).then(a.bind(null,null)).catch(a)},predestroy(){n=e.return()},destroy(a){if(!n)return a(null);n.then(a.bind(null,null)).catch(a)}});return i;function o(a){a.done?i.push(null):i.push(a.value)}}static from(e,r){if(CCe(e))return e;if(e[ew])return this._fromAsyncIterator(e[ew](),r);Array.isArray(e)||(e=e===void 0?[]:[e]);let n=0;return new t({...r,read(i){this.push(n===e.length?null:e[n++]),i(null)}})}static isBackpressured(e){return(e._duplexState&iCe)!==0||e._readableState.buffered>=e._readableState.highWaterMark}static isPaused(e){return(e._duplexState&Pm)===0}[ew](){let e=this,r=null,n=null,i=null;return this.on("error",c=>{r=c}),this.on("readable",o),this.on("close",a),{[ew](){return this},next(){return new Promise(function(c,u){n=c,i=u;let d=e.read();d!==null?s(d):(e._duplexState&wm)!==0&&s(null)})},return(){return l(null)},throw(c){return l(c)}};function o(){n!==null&&s(e.read())}function a(){n!==null&&s(null)}function s(c){i!==null&&(r?i(r):c===null&&(e._duplexState&zi)===0?i(ow):n({value:c,done:c===null}),i=n=null)}function l(c){return e.destroy(c),new Promise((u,d)=>{if(e._duplexState&wm)return u({value:void 0,done:!0});e.once("close",function(){c?d(c):u({value:void 0,done:!0})})})}}},nw=class extends Sm{constructor(e){super(e),this._duplexState|=_o|zi,this._writableState=new tw(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final),e.eagerOpen&&this._writableState.updateNextTick())}cork(){this._duplexState|=sw}uncork(){this._duplexState&=zJ,this._writableState.updateNextTick()}_writev(e,r){r(null)}_write(e,r){this._writableState.autoBatch(e,r)}_final(e){e(null)}static isBackpressured(e){return(e._duplexState&pCe)!==0}static drained(e){if(e.destroyed)return Promise.resolve(!1);let r=e._writableState,i=(MCe(e)?Math.min(1,r.queue.length):r.queue.length)+(e._duplexState&oD?1:0);return i===0?Promise.resolve(!0):(r.drains===null&&(r.drains=[]),new Promise(o=>{r.drains.push({writes:i,resolve:o})}))}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},Em=class extends rw{constructor(e){super(e),this._duplexState=_o|this._duplexState&Ul,this._writableState=new tw(this,e),e&&(e.writev&&(this._writev=e.writev),e.write&&(this._write=e.write),e.final&&(this._final=e.final))}cork(){this._duplexState|=sw}uncork(){this._duplexState&=zJ,this._writableState.updateNextTick()}_writev(e,r){r(null)}_write(e,r){this._writableState.autoBatch(e,r)}_final(e){e(null)}write(e){return this._writableState.updateNextTick(),this._writableState.push(e)}end(e){return this._writableState.updateNextTick(),this._writableState.end(e),this}},iw=class extends Em{constructor(e){super(e),this._transformState=new YR(this),e&&(e.transform&&(this._transform=e.transform),e.flush&&(this._flush=e.flush))}_write(e,r){this._readableState.buffered>=this._readableState.highWaterMark?this._transformState.data=e:this._transform(e,this._transformState.afterTransform)}_read(e){if(this._transformState.data!==null){let r=this._transformState.data;this._transformState.data=null,e(null),this._transform(r,this._transformState.afterTransform)}else e(null)}destroy(e){super.destroy(e),this._transformState.data!==null&&(this._transformState.data=null,this._transformState.afterTransform())}_transform(e,r){r(null,e)}_flush(e){e(null)}_final(e){this._transformState.afterFinal=e,this._flush(ICe.bind(this))}},QR=class extends iw{};function ICe(t,e){let r=this._transformState.afterFinal;if(t)return r(t);e!=null&&this.push(e),this.push(null),r(null)}function $Ce(...t){return new Promise((e,r)=>HJ(...t,n=>{if(n)return r(n);e()}))}function HJ(t,...e){let r=Array.isArray(t)?[...t,...e]:[t,...e],n=r.length&&typeof r[r.length-1]=="function"?r.pop():null;if(r.length<2)throw new Error("Pipeline requires at least 2 streams");let i=r[0],o=null,a=null;for(let c=1;c<r.length;c++)o=r[c],Im(i)?i.pipe(o,l):(s(i,!0,c>1,l),i.pipe(o)),i=o;if(n){let c=!1,u=Im(o)||!!(o._writableState&&o._writableState.autoDestroy);o.on("error",d=>{a===null&&(a=d)}),o.on("finish",()=>{c=!0,u||n(a)}),u&&o.on("close",()=>n(a||(c?null:VR)))}return o;function s(c,u,d,f){c.on("error",f),c.on("close",p);function p(){if(u&&c._readableState&&!c._readableState.ended||d&&c._writableState&&!c._writableState.ended)return f(VR)}}function l(c){if(!(!c||a)){a=c;for(let u of r)u.destroy(c)}}}function PCe(t){return t}function VJ(t){return!!t._readableState||!!t._writableState}function Im(t){return typeof t._duplexState=="number"&&VJ(t)}function TCe(t){return!!t._readableState&&t._readableState.ended}function ACe(t){return!!t._writableState&&t._writableState.ended}function kCe(t,e={}){let r=t._readableState&&t._readableState.error||t._writableState&&t._writableState.error;return!e.all&&r===ow?null:r}function CCe(t){return Im(t)&&t.readable}function RCe(t){return(t._duplexState&_o)!==_o||(t._duplexState&lw)!==0}function DCe(t){return typeof t=="object"&&t!==null&&typeof t.byteLength=="number"}function GJ(t){return DCe(t)?t.byteLength:1024}function kJ(){}function OCe(){this.destroy(new Error("Stream aborted."))}function MCe(t){return t._writev!==nw.prototype._writev&&t._writev!==Em.prototype._writev}WJ.exports={pipeline:HJ,pipelinePromise:$Ce,isStream:VJ,isStreamx:Im,isEnded:TCe,isFinished:ACe,isDisturbed:RCe,getStreamError:kCe,Stream:Sm,Writable:nw,Readable:rw,Duplex:Em,Transform:iw,PassThrough:QR}});var uD=b(pd=>{var at=sd(),NCe="0000000000000000000",jCe="7777777777777777777",cw=48,JJ=at.from([117,115,116,97,114,0]),zCe=at.from([cw,cw]),LCe=at.from([117,115,116,97,114,32]),FCe=at.from([32,0]),BCe=4095,km=257,cD=263;pd.decodeLongPath=function(e,r){return fd(e,0,e.length,r)};pd.encodePax=function(e){let r="";e.name&&(r+=lD(" path="+e.name+`
|
|
231
231
|
`)),e.linkname&&(r+=lD(" linkpath="+e.linkname+`
|
|
232
232
|
`));let n=e.pax;if(n)for(let i in n)r+=lD(" "+i+"="+n[i]+`
|
|
233
233
|
`);return at.from(r)};pd.decodePax=function(e){let r={};for(;e.length;){let n=0;for(;n<e.length&&e[n]!==32;)n++;let i=parseInt(at.toString(e.subarray(0,n)),10);if(!i)return r;let o=at.toString(e.subarray(n+1,i-1)),a=o.indexOf("=");if(a===-1)return r;r[o.slice(0,a)]=o.slice(a+1),e=e.subarray(i)}return r};pd.encode=function(e){let r=at.alloc(512),n=e.name,i="";if(e.typeflag===5&&n[n.length-1]!=="/"&&(n+="/"),at.byteLength(n)!==n.length)return null;for(;at.byteLength(n)>100;){let o=n.indexOf("/");if(o===-1)return null;i+=i?"/"+n.slice(0,o):n.slice(0,o),n=n.slice(o+1)}return at.byteLength(n)>100||at.byteLength(i)>155||e.linkname&&at.byteLength(e.linkname)>100?null:(at.write(r,n),at.write(r,_s(e.mode&BCe,6),100),at.write(r,_s(e.uid,6),108),at.write(r,_s(e.gid,6),116),WCe(e.size,r,124),at.write(r,_s(e.mtime.getTime()/1e3|0,11),136),r[156]=cw+VCe(e.type),e.linkname&&at.write(r,e.linkname,157),at.copy(JJ,r,km),at.copy(zCe,r,cD),e.uname&&at.write(r,e.uname,265),e.gname&&at.write(r,e.gname,297),at.write(r,_s(e.devmajor||0,6),329),at.write(r,_s(e.devminor||0,6),337),i&&at.write(r,i,345),at.write(r,_s(YJ(r),6),148),r)};pd.decode=function(e,r,n){let i=e[156]===0?0:e[156]-cw,o=fd(e,0,100,r),a=ys(e,100,8),s=ys(e,108,8),l=ys(e,116,8),c=ys(e,124,12),u=ys(e,136,12),d=HCe(i),f=e[157]===0?null:fd(e,157,100,r),p=fd(e,265,32),h=fd(e,297,32),m=ys(e,329,8),y=ys(e,337,8),g=YJ(e);if(g===256)return null;if(g!==ys(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(UCe(e))e[345]&&(o=fd(e,345,155,r)+"/"+o);else if(!qCe(e)){if(!n)throw new Error("Invalid tar header: unknown format.")}return i===0&&o&&o[o.length-1]==="/"&&(i=5),{name:o,mode:a,uid:s,gid:l,size:c,mtime:new Date(1e3*u),type:d,linkname:f,uname:p,gname:h,devmajor:m,devminor:y,pax:null}};function UCe(t){return at.equals(JJ,t.subarray(km,km+6))}function qCe(t){return at.equals(LCe,t.subarray(km,km+6))&&at.equals(FCe,t.subarray(cD,cD+2))}function ZCe(t,e,r){return typeof t!="number"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)}function HCe(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}function VCe(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}function KJ(t,e,r,n){for(;r<n;r++)if(t[r]===e)return r;return n}function YJ(t){let e=256;for(let r=0;r<148;r++)e+=t[r];for(let r=156;r<512;r++)e+=t[r];return e}function _s(t,e){return t=t.toString(8),t.length>e?jCe.slice(0,e)+" ":NCe.slice(0,e-t.length)+t+" "}function GCe(t,e,r){e[r]=128;for(let n=11;n>0;n--)e[r+n]=t&255,t=Math.floor(t/256)}function WCe(t,e,r){t.toString(8).length>11?GCe(t,e,r):at.write(e,_s(t,11),r)}function JCe(t){let e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;let r=[],n;for(n=t.length-1;n>0;n--){let a=t[n];e?r.push(a):r.push(255-a)}let i=0,o=r.length;for(n=0;n<o;n++)i+=r[n]*Math.pow(256,n);return e?i:-1*i}function ys(t,e,r){if(t=t.subarray(e,e+r),e=0,t[e]&128)return JCe(t);{for(;e<t.length&&t[e]===32;)e++;let n=ZCe(KJ(t,32,e,t.length),t.length,t.length);for(;e<n&&t[e]===0;)e++;return n===e?0:parseInt(at.toString(t.subarray(e,n)),8)}}function fd(t,e,r,n){return at.toString(t.subarray(e,KJ(t,0,e,e+r)),n)}function lD(t){let e=at.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t}});var rK=b((bZe,tK)=>{var{Writable:KCe,Readable:YCe,getStreamError:XJ}=sD(),XCe=HR(),QJ=sd(),hd=uD(),QCe=QJ.alloc(0),fD=class{constructor(){this.buffered=0,this.shifted=0,this.queue=new XCe,this._offset=0}push(e){this.buffered+=e.byteLength,this.queue.push(e)}shiftFirst(e){return this._buffered===0?null:this._next(e)}shift(e){if(e>this.buffered)return null;if(e===0)return QCe;let r=this._next(e);if(e===r.byteLength)return r;let n=[r];for(;(e-=r.byteLength)>0;)r=this._next(e),n.push(r);return QJ.concat(n)}_next(e){let r=this.queue.peek(),n=r.byteLength-this._offset;if(e>=n){let i=this._offset?r.subarray(this._offset,r.byteLength):r;return this.queue.shift(),this._offset=0,this.buffered-=n,this.shifted+=n,i}return this.buffered-=e,this.shifted+=e,r.subarray(this._offset,this._offset+=e)}},pD=class extends YCe{constructor(e,r,n){super(),this.header=r,this.offset=n,this._parent=e}_read(e){this.header.size===0&&this.push(null),this._parent._stream===this&&this._parent._update(),e(null)}_predestroy(){this._parent.destroy(XJ(this))}_detach(){this._parent._stream===this&&(this._parent._stream=null,this._parent._missing=eK(this.header.size),this._parent._update())}_destroy(e){this._detach(),e(null)}},hD=class extends KCe{constructor(e){super(e),e||(e={}),this._buffer=new fD,this._offset=0,this._header=null,this._stream=null,this._missing=0,this._longHeader=!1,this._callback=dD,this._locked=!1,this._finished=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null,this._filenameEncoding=e.filenameEncoding||"utf-8",this._allowUnknownFormat=!!e.allowUnknownFormat,this._unlockBound=this._unlock.bind(this)}_unlock(e){if(this._locked=!1,e){this.destroy(e),this._continueWrite(e);return}this._update()}_consumeHeader(){if(this._locked)return!1;this._offset=this._buffer.shifted;try{this._header=hd.decode(this._buffer.shift(512),this._filenameEncoding,this._allowUnknownFormat)}catch(e){return this._continueWrite(e),!1}if(!this._header)return!0;switch(this._header.type){case"gnu-long-path":case"gnu-long-link-path":case"pax-global-header":case"pax-header":return this._longHeader=!0,this._missing=this._header.size,!0}return this._locked=!0,this._applyLongHeaders(),this._header.size===0||this._header.type==="directory"?(this.emit("entry",this._header,this._createStream(),this._unlockBound),!0):(this._stream=this._createStream(),this._missing=this._header.size,this.emit("entry",this._header,this._stream,this._unlockBound),!0)}_applyLongHeaders(){this._gnuLongPath&&(this._header.name=this._gnuLongPath,this._gnuLongPath=null),this._gnuLongLinkPath&&(this._header.linkname=this._gnuLongLinkPath,this._gnuLongLinkPath=null),this._pax&&(this._pax.path&&(this._header.name=this._pax.path),this._pax.linkpath&&(this._header.linkname=this._pax.linkpath),this._pax.size&&(this._header.size=parseInt(this._pax.size,10)),this._header.pax=this._pax,this._pax=null)}_decodeLongHeader(e){switch(this._header.type){case"gnu-long-path":this._gnuLongPath=hd.decodeLongPath(e,this._filenameEncoding);break;case"gnu-long-link-path":this._gnuLongLinkPath=hd.decodeLongPath(e,this._filenameEncoding);break;case"pax-global-header":this._paxGlobal=hd.decodePax(e);break;case"pax-header":this._pax=this._paxGlobal===null?hd.decodePax(e):Object.assign({},this._paxGlobal,hd.decodePax(e));break}}_consumeLongHeader(){this._longHeader=!1,this._missing=eK(this._header.size);let e=this._buffer.shift(this._header.size);try{this._decodeLongHeader(e)}catch(r){return this._continueWrite(r),!1}return!0}_consumeStream(){let e=this._buffer.shiftFirst(this._missing);if(e===null)return!1;this._missing-=e.byteLength;let r=this._stream.push(e);return this._missing===0?(this._stream.push(null),r&&this._stream._detach(),r&&this._locked===!1):r}_createStream(){return new pD(this,this._header,this._offset)}_update(){for(;this._buffer.buffered>0&&!this.destroying;){if(this._missing>0){if(this._stream!==null){if(this._consumeStream()===!1)return;continue}if(this._longHeader===!0){if(this._missing>this._buffer.buffered)break;if(this._consumeLongHeader()===!1)return!1;continue}let e=this._buffer.shiftFirst(this._missing);e!==null&&(this._missing-=e.byteLength);continue}if(this._buffer.buffered<512)break;if(this._stream!==null||this._consumeHeader()===!1)return}this._continueWrite(null)}_continueWrite(e){let r=this._callback;this._callback=dD,r(e)}_write(e,r){this._callback=r,this._buffer.push(e),this._update()}_final(e){this._finished=this._missing===0&&this._buffer.buffered===0,e(this._finished?null:new Error("Unexpected end of data"))}_predestroy(){this._continueWrite(null)}_destroy(e){this._stream&&this._stream.destroy(XJ(this)),e(null)}[Symbol.asyncIterator](){let e=null,r=null,n=null,i=null,o=null,a=this;return this.on("entry",c),this.on("error",f=>{e=f}),this.on("close",u),{[Symbol.asyncIterator](){return this},next(){return new Promise(l)},return(){return d(null)},throw(f){return d(f)}};function s(f){if(!o)return;let p=o;o=null,p(f)}function l(f,p){if(e)return p(e);if(i){f({value:i,done:!1}),i=null;return}r=f,n=p,s(null),a._finished&&r&&(r({value:void 0,done:!0}),r=n=null)}function c(f,p,h){o=h,p.on("error",dD),r?(r({value:p,done:!1}),r=n=null):i=p}function u(){s(e),r&&(e?n(e):r({value:void 0,done:!0}),r=n=null)}function d(f){return a.destroy(f),s(f),new Promise((p,h)=>{if(a.destroyed)return p({value:void 0,done:!0});a.once("close",function(){f?h(f):p({value:void 0,done:!0})})})}}};tK.exports=function(e){return new hD(e)};function dD(){}function eK(t){return t&=511,t&&512-t}});var iK=b((wZe,mD)=>{var nK={S_IFMT:61440,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960};try{mD.exports=Q("fs").constants||nK}catch{mD.exports=nK}});var cK=b((xZe,lK)=>{var{Readable:eRe,Writable:tRe,getStreamError:oK}=sD(),Hl=sd(),md=iK(),uw=uD(),rRe=493,nRe=420,aK=Hl.alloc(1024),yD=class extends tRe{constructor(e,r,n){super({mapWritable:oRe,eagerOpen:!0}),this.written=0,this.header=r,this._callback=n,this._linkname=null,this._isLinkname=r.type==="symlink"&&!r.linkname,this._isVoid=r.type!=="file"&&r.type!=="contiguous-file",this._finished=!1,this._pack=e,this._openCallback=null,this._pack._stream===null?this._pack._stream=this:this._pack._pending.push(this)}_open(e){this._openCallback=e,this._pack._stream===this&&this._continueOpen()}_continuePack(e){if(this._callback===null)return;let r=this._callback;this._callback=null,r(e)}_continueOpen(){this._pack._stream===null&&(this._pack._stream=this);let e=this._openCallback;if(this._openCallback=null,e!==null){if(this._pack.destroying)return e(new Error("pack stream destroyed"));if(this._pack._finalized)return e(new Error("pack stream is already finalized"));this._pack._stream=this,this._isLinkname||this._pack._encode(this.header),this._isVoid&&(this._finish(),this._continuePack(null)),e(null)}}_write(e,r){if(this._isLinkname)return this._linkname=this._linkname?Hl.concat([this._linkname,e]):e,r(null);if(this._isVoid)return e.byteLength>0?r(new Error("No body allowed for this entry")):r();if(this.written+=e.byteLength,this._pack.push(e))return r();this._pack._drain=r}_finish(){this._finished||(this._finished=!0,this._isLinkname&&(this.header.linkname=this._linkname?Hl.toString(this._linkname,"utf-8"):"",this._pack._encode(this.header)),sK(this._pack,this.header.size),this._pack._done(this))}_final(e){if(this.written!==this.header.size)return e(new Error("Size mismatch"));this._finish(),e(null)}_getError(){return oK(this)||new Error("tar entry destroyed")}_predestroy(){this._pack.destroy(this._getError())}_destroy(e){this._pack._done(this),this._continuePack(this._finished?null:this._getError()),e()}},_D=class extends eRe{constructor(e){super(e),this._drain=gD,this._finalized=!1,this._finalizing=!1,this._pending=[],this._stream=null}entry(e,r,n){if(this._finalized||this.destroying)throw new Error("already finalized or destroyed");typeof r=="function"&&(n=r,r=null),n||(n=gD),(!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=iRe(e.mode)),e.mode||(e.mode=e.type==="directory"?rRe:nRe),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof r=="string"&&(r=Hl.from(r));let i=new yD(this,e,n);return Hl.isBuffer(r)?(e.size=r.byteLength,i.write(r),i.end(),i):(i._isVoid,i)}finalize(){if(this._stream||this._pending.length>0){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(aK),this.push(null))}_done(e){e===this._stream&&(this._stream=null,this._finalizing&&this.finalize(),this._pending.length&&this._pending.shift()._continueOpen())}_encode(e){if(!e.pax){let r=uw.encode(e);if(r){this.push(r);return}}this._encodePax(e)}_encodePax(e){let r=uw.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),n={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:r.byteLength,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(uw.encode(n)),this.push(r),sK(this,r.byteLength),n.size=e.size,n.type=e.type,this.push(uw.encode(n))}_doDrain(){let e=this._drain;this._drain=gD,e()}_predestroy(){let e=oK(this);for(this._stream&&this._stream.destroy(e);this._pending.length;){let r=this._pending.shift();r.destroy(e),r._continueOpen()}this._doDrain()}_read(e){this._doDrain(),e()}};lK.exports=function(e){return new _D(e)};function iRe(t){switch(t&md.S_IFMT){case md.S_IFBLK:return"block-device";case md.S_IFCHR:return"character-device";case md.S_IFDIR:return"directory";case md.S_IFIFO:return"fifo";case md.S_IFLNK:return"symlink"}return"file"}function gD(){}function sK(t,e){e&=511,e&&t.push(aK.subarray(0,512-e))}function oRe(t){return Hl.isBuffer(t)?t:Hl.from(t)}});var uK=b(vD=>{vD.extract=rK();vD.pack=cK()});var pK=b((EZe,fK)=>{var aRe=Q("zlib"),sRe=uK(),dK=od(),ia=function(t){if(!(this instanceof ia))return new ia(t);t=this.options=dK.defaults(t,{gzip:!1}),typeof t.gzipOptions!="object"&&(t.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=sRe.pack(t),this.compressor=!1,t.gzip&&(this.compressor=aRe.createGzip(t.gzipOptions),this.compressor.on("error",this._onCompressorError.bind(this)))};ia.prototype._onCompressorError=function(t){this.engine.emit("error",t)};ia.prototype.append=function(t,e,r){var n=this;e.mtime=e.date;function i(a,s){if(a){r(a);return}n.engine.entry(e,s,function(l){r(l,e)})}if(e.sourceType==="buffer")i(null,t);else if(e.sourceType==="stream"&&e.stats){e.size=e.stats.size;var o=n.engine.entry(e,function(a){r(a,e)});t.pipe(o)}else e.sourceType==="stream"&&dK.collectStream(t,i)};ia.prototype.finalize=function(){this.engine.finalize()};ia.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)};ia.prototype.pipe=function(t,e){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(t,e):this.engine.pipe.apply(this.engine,arguments)};ia.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)};fK.exports=ia});var gK=b((IZe,mK)=>{"use strict";function lRe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var cRe=new Int32Array([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]);function hK(t){if(Buffer.isBuffer(t))return t;if(typeof t=="number")return Buffer.alloc(t);if(typeof t=="string")return Buffer.from(t);throw new Error("input must be buffer, number, or string, received "+typeof t)}function uRe(t){let e=hK(4);return e.writeInt32BE(t,0),e}function bD(t,e){t=hK(t),Buffer.isBuffer(e)&&(e=e.readUInt32BE(0));let r=~~e^-1;for(var n=0;n<t.length;n++)r=cRe[(r^t[n])&255]^r>>>8;return r^-1}function wD(){return uRe(bD.apply(null,arguments))}wD.signed=function(){return bD.apply(null,arguments)};wD.unsigned=function(){return bD.apply(null,arguments)>>>0};var dRe=wD,fRe=lRe(dRe);mK.exports=fRe});var bK=b(($Ze,vK)=>{var pRe=Q("util").inherits,yK=Ol().Transform,hRe=gK(),_K=od(),vs=function(t){if(!(this instanceof vs))return new vs(t);t=this.options=_K.defaults(t,{}),yK.call(this,t),this.supports={directory:!0,symlink:!0},this.files=[]};pRe(vs,yK);vs.prototype._transform=function(t,e,r){r(null,t)};vs.prototype._writeStringified=function(){var t=JSON.stringify(this.files);this.write(t)};vs.prototype.append=function(t,e,r){var n=this;e.crc32=0;function i(o,a){if(o){r(o);return}e.size=a.length||0,e.crc32=hRe.unsigned(a),n.files.push(e),r(null,e)}e.sourceType==="buffer"?i(null,t):e.sourceType==="stream"&&_K.collectStream(t,i)};vs.prototype.finalize=function(){this._writeStringified(),this.end()};vK.exports=vs});var xK=b((PZe,wK)=>{var mRe=OW(),Cm={},bs=function(t,e){return bs.create(t,e)};bs.create=function(t,e){if(Cm[t]){var r=new mRe(t,e);return r.setFormat(t),r.setModule(new Cm[t](e)),r}else throw new Error("create("+t+"): format not registered")};bs.registerFormat=function(t,e){if(Cm[t])throw new Error("register("+t+"): format already registered");if(typeof e!="function")throw new Error("register("+t+"): format module invalid");if(typeof e.prototype.append!="function"||typeof e.prototype.finalize!="function")throw new Error("register("+t+"): format module missing methods");Cm[t]=e};bs.isRegisteredFormat=function(t){return!!Cm[t]};bs.registerFormat("zip",fJ());bs.registerFormat("tar",pK());bs.registerFormat("json",bK());wK.exports=bs});var Ge;(function(t){t.assertEqual=i=>{};function e(i){}t.assertIs=e;function r(i){throw new Error}t.assertNever=r,t.arrayToEnum=i=>{let o={};for(let a of i)o[a]=a;return o},t.getValidEnumValues=i=>{let o=t.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(let s of o)a[s]=i[s];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(o){return i[o]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let o=[];for(let a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},t.find=(i,o)=>{for(let a of i)if(o(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function n(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}t.joinValues=n,t.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(Ge||(Ge={}));var nO;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(nO||(nO={}));var ne=Ge.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),xo=t=>{switch(typeof t){case"undefined":return ne.undefined;case"string":return ne.string;case"number":return Number.isNaN(t)?ne.nan:ne.number;case"boolean":return ne.boolean;case"function":return ne.function;case"bigint":return ne.bigint;case"symbol":return ne.symbol;case"object":return Array.isArray(t)?ne.array:t===null?ne.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ne.promise:typeof Map<"u"&&t instanceof Map?ne.map:typeof Set<"u"&&t instanceof Set?ne.set:typeof Date<"u"&&t instanceof Date?ne.date:ne.object;default:return ne.unknown}};var G=Ge.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);var Pn=class t extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){let r=e||function(o){return o.message},n={_errors:[]},i=o=>{for(let a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,l=0;for(;l<a.path.length;){let c=a.path[l];l===a.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(r(a))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return i(this),n}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,Ge.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r=Object.create(null),n=[];for(let i of this.issues)if(i.path.length>0){let o=i.path[0];r[o]=r[o]||[],r[o].push(e(i))}else n.push(e(i));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}};Pn.create=t=>new Pn(t);var GY=(t,e)=>{let r;switch(t.code){case G.invalid_type:t.received===ne.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case G.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Ge.jsonStringifyReplacer)}`;break;case G.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ge.joinValues(t.keys,", ")}`;break;case G.invalid_union:r="Invalid input";break;case G.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ge.joinValues(t.options)}`;break;case G.invalid_enum_value:r=`Invalid enum value. Expected ${Ge.joinValues(t.options)}, received '${t.received}'`;break;case G.invalid_arguments:r="Invalid function arguments";break;case G.invalid_return_type:r="Invalid function return type";break;case G.invalid_date:r="Invalid date";break;case G.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Ge.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case G.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case G.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case G.custom:r="Invalid input";break;case G.invalid_intersection_types:r="Intersection results could not be merged";break;case G.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case G.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ge.assertNever(t)}return{message:r}},ca=GY;var WY=ca;function Ad(){return WY}var ng=t=>{let{data:e,path:r,errorMaps:n,issueData:i}=t,o=[...r,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="",l=n.filter(c=>!!c).slice().reverse();for(let c of l)s=c(a,{data:e,defaultError:s}).message;return{...i,path:o,message:s}};function ee(t,e){let r=Ad(),n=ng({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===ca?void 0:ca].filter(i=>!!i)});t.common.issues.push(n)}var kr=class t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let n=[];for(let i of r){if(i.status==="aborted")return we;i.status==="dirty"&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){let n=[];for(let i of r){let o=await i.key,a=await i.value;n.push({key:o,value:a})}return t.mergeObjectSync(e,n)}static mergeObjectSync(e,r){let n={};for(let i of r){let{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return we;o.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(n[o.value]=a.value)}return{status:e.value,value:n}}},we=Object.freeze({status:"aborted"}),nc=t=>({status:"dirty",value:t}),Kr=t=>({status:"valid",value:t}),Cw=t=>t.status==="aborted",Rw=t=>t.status==="dirty",Cs=t=>t.status==="valid",kd=t=>typeof Promise<"u"&&t instanceof Promise;var le;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(le||(le={}));var Hn=class{constructor(e,r,n,i){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=i}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}},iO=(t,e)=>{if(Cs(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 r=new Pn(t.common.issues);return this._error=r,this._error}}};function Ae(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:n,description:i}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,s)=>{let{message:l}=t;return a.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??n??s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:l??r??s.defaultError}},description:i}}var ze=class{get description(){return this._def.description}_getType(e){return xo(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:xo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new kr,ctx:{common:e.parent.common,data:e.data,parsedType:xo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(kd(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){let n={common:{issues:[],async:(r==null?void 0:r.async)??!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xo(e)},i=this._parseSync({data:e,path:n.path,parent:n});return iO(n,i)}"~validate"(e){var n,i;let r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xo(e)};if(!this["~standard"].async)try{let o=this._parseSync({data:e,path:[],parent:r});return Cs(o)?{value:o.value}:{issues:r.common.issues}}catch(o){(i=(n=o==null?void 0:o.message)==null?void 0:n.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(o=>Cs(o)?{value:o.value}:{issues:r.common.issues})}async parseAsync(e,r){let n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){let n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:xo(e)},i=this._parse({data:e,path:n.path,parent:n}),o=await(kd(i)?i:Promise.resolve(i));return iO(n,o)}refine(e,r){let n=i=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(i):r;return this._refinement((i,o)=>{let a=e(i),s=()=>o.addIssue({code:G.custom,...n(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(e,r){return this._refinement((n,i)=>e(n)?!0:(i.addIssue(typeof r=="function"?r(n,i):r),!1))}_refinement(e){return new vi({schema:this,typeName:ge.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:r=>this["~validate"](r)}}optional(){return _i.create(this,this._def)}nullable(){return Io.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return da.create(this)}promise(){return Rs.create(this,this._def)}or(e){return lc.create([this,e],this._def)}and(e){return cc.create(this,e,this._def)}transform(e){return new vi({...Ae(this._def),schema:this,typeName:ge.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new hc({...Ae(this._def),innerType:this,defaultValue:r,typeName:ge.ZodDefault})}brand(){return new ig({typeName:ge.ZodBranded,type:this,...Ae(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new mc({...Ae(this._def),innerType:this,catchValue:r,typeName:ge.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return og.create(this,e)}readonly(){return gc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},JY=/^c[^\s-]{8,}$/i,KY=/^[0-9a-z]+$/,YY=/^[0-9A-HJKMNP-TV-Z]{26}$/i,XY=/^[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,QY=/^[a-z0-9_-]{21}$/i,eX=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,tX=/^[-+]?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)?)??$/,rX=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,nX="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Dw,iX=/^(?:(?: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])$/,oX=/^(?:(?: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])$/,aX=/^(([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]))$/,sX=/^(([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])$/,lX=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,cX=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,oO="((\\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])))",uX=new RegExp(`^${oO}$`);function aO(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);let r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function dX(t){return new RegExp(`^${aO(t)}$`)}function fX(t){let e=`${oO}T${aO(t)}`,r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function pX(t,e){return!!((e==="v4"||!e)&&iX.test(t)||(e==="v6"||!e)&&aX.test(t))}function hX(t,e){if(!eX.test(t))return!1;try{let[r]=t.split(".");if(!r)return!1;let n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),i=JSON.parse(atob(n));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function mX(t,e){return!!((e==="v4"||!e)&&oX.test(t)||(e==="v6"||!e)&&sX.test(t))}var oc=class t extends ze{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ne.string){let o=this._getOrReturnCtx(e);return ee(o,{code:G.invalid_type,expected:ne.string,received:o.parsedType}),we}let n=new kr,i;for(let o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(i=this._getOrReturnCtx(e,i),ee(i,{code:G.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="max")e.data.length>o.value&&(i=this._getOrReturnCtx(e,i),ee(i,{code:G.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),n.dirty());else if(o.kind==="length"){let a=e.data.length>o.value,s=e.data.length<o.value;(a||s)&&(i=this._getOrReturnCtx(e,i),a?ee(i,{code:G.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):s&&ee(i,{code:G.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),n.dirty())}else if(o.kind==="email")rX.test(e.data)||(i=this._getOrReturnCtx(e,i),ee(i,{validation:"email",code:G.invalid_string,message:o.message}),n.dirty());else if(o.kind==="emoji")Dw||(Dw=new RegExp(nX,"u")),Dw.test(e.data)||(i=this._getOrReturnCtx(e,i),ee(i,{validation:"emoji",code:G.invalid_string,message:o.message}),n.dirty());else if(o.kind==="uuid")XY.test(e.data)||(i=this._getOrReturnCtx(e,i),ee(i,{validation:"uuid",code:G.invalid_string,message:o.message}),n.dirty());else if(o.kind==="nanoid")QY.test(e.data)||(i=this._getOrReturnCtx(e,i),ee(i,{validation:"nanoid",code:G.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid")JY.test(e.data)||(i=this._getOrReturnCtx(e,i),ee(i,{validation:"cuid",code:G.invalid_string,message:o.message}),n.dirty());else if(o.kind==="cuid2")KY.test(e.data)||(i=this._getOrReturnCtx(e,i),ee(i,{validation:"cuid2",code:G.invalid_string,message:o.message}),n.dirty());else if(o.kind==="ulid")YY.test(e.data)||(i=this._getOrReturnCtx(e,i),ee(i,{validation:"ulid",code:G.invalid_string,message:o.message}),n.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),ee(i,{validation:"url",code:G.invalid_string,message:o.message}),n.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),ee(i,{validation:"regex",code:G.invalid_string,message:o.message}),n.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(e,i),ee(i,{code:G.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),n.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(i=this._getOrReturnCtx(e,i),ee(i,{code:G.invalid_string,validation:{startsWith:o.value},message:o.message}),n.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(i=this._getOrReturnCtx(e,i),ee(i,{code:G.invalid_string,validation:{endsWith:o.value},message:o.message}),n.dirty()):o.kind==="datetime"?fX(o).test(e.data)||(i=this._getOrReturnCtx(e,i),ee(i,{code:G.invalid_string,validation:"datetime",message:o.message}),n.dirty()):o.kind==="date"?uX.test(e.data)||(i=this._getOrReturnCtx(e,i),ee(i,{code:G.invalid_string,validation:"date",message:o.message}),n.dirty()):o.kind==="time"?dX(o).test(e.data)||(i=this._getOrReturnCtx(e,i),ee(i,{code:G.invalid_string,validation:"time",message:o.message}),n.dirty()):o.kind==="duration"?tX.test(e.data)||(i=this._getOrReturnCtx(e,i),ee(i,{validation:"duration",code:G.invalid_string,message:o.message}),n.dirty()):o.kind==="ip"?pX(e.data,o.version)||(i=this._getOrReturnCtx(e,i),ee(i,{validation:"ip",code:G.invalid_string,message:o.message}),n.dirty()):o.kind==="jwt"?hX(e.data,o.alg)||(i=this._getOrReturnCtx(e,i),ee(i,{validation:"jwt",code:G.invalid_string,message:o.message}),n.dirty()):o.kind==="cidr"?mX(e.data,o.version)||(i=this._getOrReturnCtx(e,i),ee(i,{validation:"cidr",code:G.invalid_string,message:o.message}),n.dirty()):o.kind==="base64"?lX.test(e.data)||(i=this._getOrReturnCtx(e,i),ee(i,{validation:"base64",code:G.invalid_string,message:o.message}),n.dirty()):o.kind==="base64url"?cX.test(e.data)||(i=this._getOrReturnCtx(e,i),ee(i,{validation:"base64url",code:G.invalid_string,message:o.message}),n.dirty()):Ge.assertNever(o);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(i=>e.test(i),{validation:r,code:G.invalid_string,...le.errToObj(n)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...le.errToObj(e)})}url(e){return this._addCheck({kind:"url",...le.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...le.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...le.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...le.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...le.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...le.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...le.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...le.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...le.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...le.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...le.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...le.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,...le.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,...le.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...le.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...le.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...le.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...le.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...le.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...le.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...le.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...le.errToObj(r)})}nonempty(e){return this.min(1,le.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 r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};oc.create=t=>new oc({checks:[],typeName:ge.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...Ae(t)});function gX(t,e){let r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,i=r>n?r:n,o=Number.parseInt(t.toFixed(i).replace(".","")),a=Number.parseInt(e.toFixed(i).replace(".",""));return o%a/10**i}var Cd=class t extends ze{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)!==ne.number){let o=this._getOrReturnCtx(e);return ee(o,{code:G.invalid_type,expected:ne.number,received:o.parsedType}),we}let n,i=new kr;for(let o of this._def.checks)o.kind==="int"?Ge.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),ee(n,{code:G.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),ee(n,{code:G.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),ee(n,{code:G.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?gX(e.data,o.value)!==0&&(n=this._getOrReturnCtx(e,n),ee(n,{code:G.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),ee(n,{code:G.not_finite,message:o.message}),i.dirty()):Ge.assertNever(o);return{status:i.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,le.toString(r))}gt(e,r){return this.setLimit("min",e,!1,le.toString(r))}lte(e,r){return this.setLimit("max",e,!0,le.toString(r))}lt(e,r){return this.setLimit("max",e,!1,le.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:le.toString(i)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:le.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:le.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:le.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ge.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}};Cd.create=t=>new Cd({checks:[],typeName:ge.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ae(t)});var Rd=class t extends ze{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)!==ne.bigint)return this._getInvalidInput(e);let n,i=new kr;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(n=this._getOrReturnCtx(e,n),ee(n,{code:G.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(n=this._getOrReturnCtx(e,n),ee(n,{code:G.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),ee(n,{code:G.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):Ge.assertNever(o);return{status:i.value,value:e.data}}_getInvalidInput(e){let r=this._getOrReturnCtx(e);return ee(r,{code:G.invalid_type,expected:ne.bigint,received:r.parsedType}),we}gte(e,r){return this.setLimit("min",e,!0,le.toString(r))}gt(e,r){return this.setLimit("min",e,!1,le.toString(r))}lte(e,r){return this.setLimit("max",e,!0,le.toString(r))}lt(e,r){return this.setLimit("max",e,!1,le.toString(r))}setLimit(e,r,n,i){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:le.toString(i)}]})}_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:le.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:le.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};Rd.create=t=>new Rd({checks:[],typeName:ge.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...Ae(t)});var Dd=class extends ze{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ne.boolean){let n=this._getOrReturnCtx(e);return ee(n,{code:G.invalid_type,expected:ne.boolean,received:n.parsedType}),we}return Kr(e.data)}};Dd.create=t=>new Dd({typeName:ge.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ae(t)});var Od=class t extends ze{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ne.date){let o=this._getOrReturnCtx(e);return ee(o,{code:G.invalid_type,expected:ne.date,received:o.parsedType}),we}if(Number.isNaN(e.data.getTime())){let o=this._getOrReturnCtx(e);return ee(o,{code:G.invalid_date}),we}let n=new kr,i;for(let o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(i=this._getOrReturnCtx(e,i),ee(i,{code:G.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),n.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(i=this._getOrReturnCtx(e,i),ee(i,{code:G.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),n.dirty()):Ge.assertNever(o);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:le.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:le.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Od.create=t=>new Od({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ge.ZodDate,...Ae(t)});var Md=class extends ze{_parse(e){if(this._getType(e)!==ne.symbol){let n=this._getOrReturnCtx(e);return ee(n,{code:G.invalid_type,expected:ne.symbol,received:n.parsedType}),we}return Kr(e.data)}};Md.create=t=>new Md({typeName:ge.ZodSymbol,...Ae(t)});var ac=class extends ze{_parse(e){if(this._getType(e)!==ne.undefined){let n=this._getOrReturnCtx(e);return ee(n,{code:G.invalid_type,expected:ne.undefined,received:n.parsedType}),we}return Kr(e.data)}};ac.create=t=>new ac({typeName:ge.ZodUndefined,...Ae(t)});var sc=class extends ze{_parse(e){if(this._getType(e)!==ne.null){let n=this._getOrReturnCtx(e);return ee(n,{code:G.invalid_type,expected:ne.null,received:n.parsedType}),we}return Kr(e.data)}};sc.create=t=>new sc({typeName:ge.ZodNull,...Ae(t)});var Nd=class extends ze{constructor(){super(...arguments),this._any=!0}_parse(e){return Kr(e.data)}};Nd.create=t=>new Nd({typeName:ge.ZodAny,...Ae(t)});var ua=class extends ze{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Kr(e.data)}};ua.create=t=>new ua({typeName:ge.ZodUnknown,...Ae(t)});var Bi=class extends ze{_parse(e){let r=this._getOrReturnCtx(e);return ee(r,{code:G.invalid_type,expected:ne.never,received:r.parsedType}),we}};Bi.create=t=>new Bi({typeName:ge.ZodNever,...Ae(t)});var jd=class extends ze{_parse(e){if(this._getType(e)!==ne.undefined){let n=this._getOrReturnCtx(e);return ee(n,{code:G.invalid_type,expected:ne.void,received:n.parsedType}),we}return Kr(e.data)}};jd.create=t=>new jd({typeName:ge.ZodVoid,...Ae(t)});var da=class t extends ze{_parse(e){let{ctx:r,status:n}=this._processInputParams(e),i=this._def;if(r.parsedType!==ne.array)return ee(r,{code:G.invalid_type,expected:ne.array,received:r.parsedType}),we;if(i.exactLength!==null){let a=r.data.length>i.exactLength.value,s=r.data.length<i.exactLength.value;(a||s)&&(ee(r,{code:a?G.too_big:G.too_small,minimum:s?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(i.minLength!==null&&r.data.length<i.minLength.value&&(ee(r,{code:G.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),i.maxLength!==null&&r.data.length>i.maxLength.value&&(ee(r,{code:G.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>i.type._parseAsync(new Hn(r,a,r.path,s)))).then(a=>kr.mergeArray(n,a));let o=[...r.data].map((a,s)=>i.type._parseSync(new Hn(r,a,r.path,s)));return kr.mergeArray(n,o)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:le.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:le.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:le.toString(r)}})}nonempty(e){return this.min(1,e)}};da.create=(t,e)=>new da({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ge.ZodArray,...Ae(e)});function ic(t){if(t instanceof Tn){let e={};for(let r in t.shape){let n=t.shape[r];e[r]=_i.create(ic(n))}return new Tn({...t._def,shape:()=>e})}else return t instanceof da?new da({...t._def,type:ic(t.element)}):t instanceof _i?_i.create(ic(t.unwrap())):t instanceof Io?Io.create(ic(t.unwrap())):t instanceof Eo?Eo.create(t.items.map(e=>ic(e))):t}var Tn=class t extends ze{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(),r=Ge.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==ne.object){let c=this._getOrReturnCtx(e);return ee(c,{code:G.invalid_type,expected:ne.object,received:c.parsedType}),we}let{status:n,ctx:i}=this._processInputParams(e),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Bi&&this._def.unknownKeys==="strip"))for(let c in i.data)a.includes(c)||s.push(c);let l=[];for(let c of a){let u=o[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Hn(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Bi){let c=this._def.unknownKeys;if(c==="passthrough")for(let u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")s.length>0&&(ee(i,{code:G.unrecognized_keys,keys:s}),n.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let c=this._def.catchall;for(let u of s){let d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Hn(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{let c=[];for(let u of l){let d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>kr.mergeObjectSync(n,c)):kr.mergeObjectSync(n,l)}get shape(){return this._def.shape()}strict(e){return le.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var o,a;let i=((a=(o=this._def).errorMap)==null?void 0:a.call(o,r,n).message)??n.defaultError;return r.code==="unrecognized_keys"?{message:le.errToObj(e).message??i}:{message:i}}}:{}})}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:ge.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};for(let n of Ge.objectKeys(e))e[n]&&this.shape[n]&&(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}omit(e){let r={};for(let n of Ge.objectKeys(this.shape))e[n]||(r[n]=this.shape[n]);return new t({...this._def,shape:()=>r})}deepPartial(){return ic(this)}partial(e){let r={};for(let n of Ge.objectKeys(this.shape)){let i=this.shape[n];e&&!e[n]?r[n]=i:r[n]=i.optional()}return new t({...this._def,shape:()=>r})}required(e){let r={};for(let n of Ge.objectKeys(this.shape))if(e&&!e[n])r[n]=this.shape[n];else{let o=this.shape[n];for(;o instanceof _i;)o=o._def.innerType;r[n]=o}return new t({...this._def,shape:()=>r})}keyof(){return sO(Ge.objectKeys(this.shape))}};Tn.create=(t,e)=>new Tn({shape:()=>t,unknownKeys:"strip",catchall:Bi.create(),typeName:ge.ZodObject,...Ae(e)});Tn.strictCreate=(t,e)=>new Tn({shape:()=>t,unknownKeys:"strict",catchall:Bi.create(),typeName:ge.ZodObject,...Ae(e)});Tn.lazycreate=(t,e)=>new Tn({shape:t,unknownKeys:"strip",catchall:Bi.create(),typeName:ge.ZodObject,...Ae(e)});var lc=class extends ze{_parse(e){let{ctx:r}=this._processInputParams(e),n=this._def.options;function i(o){for(let s of o)if(s.result.status==="valid")return s.result;for(let s of o)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;let a=o.map(s=>new Pn(s.ctx.common.issues));return ee(r,{code:G.invalid_union,unionErrors:a}),we}if(r.common.async)return Promise.all(n.map(async o=>{let a={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(i);{let o,a=[];for(let l of n){let c={...r,common:{...r.common,issues:[]},parent:null},u=l._parseSync({data:r.data,path:r.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let s=a.map(l=>new Pn(l));return ee(r,{code:G.invalid_union,unionErrors:s}),we}}get options(){return this._def.options}};lc.create=(t,e)=>new lc({options:t,typeName:ge.ZodUnion,...Ae(e)});var So=t=>t instanceof uc?So(t.schema):t instanceof vi?So(t.innerType()):t instanceof dc?[t.value]:t instanceof fc?t.options:t instanceof pc?Ge.objectValues(t.enum):t instanceof hc?So(t._def.innerType):t instanceof ac?[void 0]:t instanceof sc?[null]:t instanceof _i?[void 0,...So(t.unwrap())]:t instanceof Io?[null,...So(t.unwrap())]:t instanceof ig||t instanceof gc?So(t.unwrap()):t instanceof mc?So(t._def.innerType):[],Ow=class t extends ze{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==ne.object)return ee(r,{code:G.invalid_type,expected:ne.object,received:r.parsedType}),we;let n=this.discriminator,i=r.data[n],o=this.optionsMap.get(i);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(ee(r,{code:G.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),we)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){let i=new Map;for(let o of r){let a=So(o.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let s of a){if(i.has(s))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(s)}`);i.set(s,o)}}return new t({typeName:ge.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:i,...Ae(n)})}};function Mw(t,e){let r=xo(t),n=xo(e);if(t===e)return{valid:!0,data:t};if(r===ne.object&&n===ne.object){let i=Ge.objectKeys(e),o=Ge.objectKeys(t).filter(s=>i.indexOf(s)!==-1),a={...t,...e};for(let s of o){let l=Mw(t[s],e[s]);if(!l.valid)return{valid:!1};a[s]=l.data}return{valid:!0,data:a}}else if(r===ne.array&&n===ne.array){if(t.length!==e.length)return{valid:!1};let i=[];for(let o=0;o<t.length;o++){let a=t[o],s=e[o],l=Mw(a,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return r===ne.date&&n===ne.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var cc=class extends ze{_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=(o,a)=>{if(Cw(o)||Cw(a))return we;let s=Mw(o.value,a.value);return s.valid?((Rw(o)||Rw(a))&&r.dirty(),{status:r.value,value:s.data}):(ee(n,{code:G.invalid_intersection_types}),we)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};cc.create=(t,e,r)=>new cc({left:t,right:e,typeName:ge.ZodIntersection,...Ae(r)});var Eo=class t extends ze{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==ne.array)return ee(n,{code:G.invalid_type,expected:ne.array,received:n.parsedType}),we;if(n.data.length<this._def.items.length)return ee(n,{code:G.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),we;!this._def.rest&&n.data.length>this._def.items.length&&(ee(n,{code:G.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...n.data].map((a,s)=>{let l=this._def.items[s]||this._def.rest;return l?l._parse(new Hn(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(o).then(a=>kr.mergeArray(r,a)):kr.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Eo.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Eo({items:t,typeName:ge.ZodTuple,rest:null,...Ae(e)})};var Nw=class t extends ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==ne.object)return ee(n,{code:G.invalid_type,expected:ne.object,received:n.parsedType}),we;let i=[],o=this._def.keyType,a=this._def.valueType;for(let s in n.data)i.push({key:o._parse(new Hn(n,s,n.path,s)),value:a._parse(new Hn(n,n.data[s],n.path,s)),alwaysSet:s in n.data});return n.common.async?kr.mergeObjectAsync(r,i):kr.mergeObjectSync(r,i)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof ze?new t({keyType:e,valueType:r,typeName:ge.ZodRecord,...Ae(n)}):new t({keyType:oc.create(),valueType:e,typeName:ge.ZodRecord,...Ae(r)})}},zd=class extends ze{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==ne.map)return ee(n,{code:G.invalid_type,expected:ne.map,received:n.parsedType}),we;let i=this._def.keyType,o=this._def.valueType,a=[...n.data.entries()].map(([s,l],c)=>({key:i._parse(new Hn(n,s,n.path,[c,"key"])),value:o._parse(new Hn(n,l,n.path,[c,"value"]))}));if(n.common.async){let s=new Map;return Promise.resolve().then(async()=>{for(let l of a){let c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return we;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(c.value,u.value)}return{status:r.value,value:s}})}else{let s=new Map;for(let l of a){let c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return we;(c.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(c.value,u.value)}return{status:r.value,value:s}}}};zd.create=(t,e,r)=>new zd({valueType:e,keyType:t,typeName:ge.ZodMap,...Ae(r)});var Ld=class t extends ze{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==ne.set)return ee(n,{code:G.invalid_type,expected:ne.set,received:n.parsedType}),we;let i=this._def;i.minSize!==null&&n.data.size<i.minSize.value&&(ee(n,{code:G.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),r.dirty()),i.maxSize!==null&&n.data.size>i.maxSize.value&&(ee(n,{code:G.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),r.dirty());let o=this._def.valueType;function a(l){let c=new Set;for(let u of l){if(u.status==="aborted")return we;u.status==="dirty"&&r.dirty(),c.add(u.value)}return{status:r.value,value:c}}let s=[...n.data.values()].map((l,c)=>o._parse(new Hn(n,l,n.path,c)));return n.common.async?Promise.all(s).then(l=>a(l)):a(s)}min(e,r){return new t({...this._def,minSize:{value:e,message:le.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:le.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Ld.create=(t,e)=>new Ld({valueType:t,minSize:null,maxSize:null,typeName:ge.ZodSet,...Ae(e)});var jw=class t extends ze{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==ne.function)return ee(r,{code:G.invalid_type,expected:ne.function,received:r.parsedType}),we;function n(s,l){return ng({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ad(),ca].filter(c=>!!c),issueData:{code:G.invalid_arguments,argumentsError:l}})}function i(s,l){return ng({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Ad(),ca].filter(c=>!!c),issueData:{code:G.invalid_return_type,returnTypeError:l}})}let o={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof Rs){let s=this;return Kr(async function(...l){let c=new Pn([]),u=await s._def.args.parseAsync(l,o).catch(p=>{throw c.addIssue(n(l,p)),c}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,o).catch(p=>{throw c.addIssue(i(d,p)),c})})}else{let s=this;return Kr(function(...l){let c=s._def.args.safeParse(l,o);if(!c.success)throw new Pn([n(l,c.error)]);let u=Reflect.apply(a,this,c.data),d=s._def.returns.safeParse(u,o);if(!d.success)throw new Pn([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Eo.create(e).rest(ua.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,r,n){return new t({args:e||Eo.create([]).rest(ua.create()),returns:r||ua.create(),typeName:ge.ZodFunction,...Ae(n)})}},uc=class extends ze{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};uc.create=(t,e)=>new uc({getter:t,typeName:ge.ZodLazy,...Ae(e)});var dc=class extends ze{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return ee(r,{received:r.data,code:G.invalid_literal,expected:this._def.value}),we}return{status:"valid",value:e.data}}get value(){return this._def.value}};dc.create=(t,e)=>new dc({value:t,typeName:ge.ZodLiteral,...Ae(e)});function sO(t,e){return new fc({values:t,typeName:ge.ZodEnum,...Ae(e)})}var fc=class t extends ze{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),n=this._def.values;return ee(r,{expected:Ge.joinValues(n),received:r.parsedType,code:G.invalid_type}),we}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let r=this._getOrReturnCtx(e),n=this._def.values;return ee(r,{received:r.data,code:G.invalid_enum_value,options:n}),we}return Kr(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return t.create(e,{...this._def,...r})}exclude(e,r=this._def){return t.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}};fc.create=sO;var pc=class extends ze{_parse(e){let r=Ge.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==ne.string&&n.parsedType!==ne.number){let i=Ge.objectValues(r);return ee(n,{expected:Ge.joinValues(i),received:n.parsedType,code:G.invalid_type}),we}if(this._cache||(this._cache=new Set(Ge.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let i=Ge.objectValues(r);return ee(n,{received:n.data,code:G.invalid_enum_value,options:i}),we}return Kr(e.data)}get enum(){return this._def.values}};pc.create=(t,e)=>new pc({values:t,typeName:ge.ZodNativeEnum,...Ae(e)});var Rs=class extends ze{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==ne.promise&&r.common.async===!1)return ee(r,{code:G.invalid_type,expected:ne.promise,received:r.parsedType}),we;let n=r.parsedType===ne.promise?r.data:Promise.resolve(r.data);return Kr(n.then(i=>this._def.type.parseAsync(i,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Rs.create=(t,e)=>new Rs({type:t,typeName:ge.ZodPromise,...Ae(e)});var vi=class extends ze{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ge.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:n}=this._processInputParams(e),i=this._def.effect||null,o={addIssue:a=>{ee(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){let a=i.transform(n.data,o);if(n.common.async)return Promise.resolve(a).then(async s=>{if(r.value==="aborted")return we;let l=await this._def.schema._parseAsync({data:s,path:n.path,parent:n});return l.status==="aborted"?we:l.status==="dirty"?nc(l.value):r.value==="dirty"?nc(l.value):l});{if(r.value==="aborted")return we;let s=this._def.schema._parseSync({data:a,path:n.path,parent:n});return s.status==="aborted"?we:s.status==="dirty"?nc(s.value):r.value==="dirty"?nc(s.value):s}}if(i.type==="refinement"){let a=s=>{let l=i.refinement(s,o);if(n.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){let s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?we:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?we:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(i.type==="transform")if(n.common.async===!1){let a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Cs(a))return we;let s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>Cs(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:r.value,value:s})):we);Ge.assertNever(i)}};vi.create=(t,e,r)=>new vi({schema:t,typeName:ge.ZodEffects,effect:e,...Ae(r)});vi.createWithPreprocess=(t,e,r)=>new vi({schema:e,effect:{type:"preprocess",transform:t},typeName:ge.ZodEffects,...Ae(r)});var _i=class extends ze{_parse(e){return this._getType(e)===ne.undefined?Kr(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};_i.create=(t,e)=>new _i({innerType:t,typeName:ge.ZodOptional,...Ae(e)});var Io=class extends ze{_parse(e){return this._getType(e)===ne.null?Kr(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Io.create=(t,e)=>new Io({innerType:t,typeName:ge.ZodNullable,...Ae(e)});var hc=class extends ze{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return r.parsedType===ne.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};hc.create=(t,e)=>new hc({innerType:t,typeName:ge.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ae(e)});var mc=class extends ze{_parse(e){let{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return kd(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Pn(n.common.issues)},input:n.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Pn(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};mc.create=(t,e)=>new mc({innerType:t,typeName:ge.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ae(e)});var Fd=class extends ze{_parse(e){if(this._getType(e)!==ne.nan){let n=this._getOrReturnCtx(e);return ee(n,{code:G.invalid_type,expected:ne.nan,received:n.parsedType}),we}return{status:"valid",value:e.data}}};Fd.create=t=>new Fd({typeName:ge.ZodNaN,...Ae(t)});var YDe=Symbol("zod_brand"),ig=class extends ze{_parse(e){let{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}},og=class t extends ze{_parse(e){let{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?we:o.status==="dirty"?(r.dirty(),nc(o.value)):this._def.out._parseAsync({data:o.value,path:n.path,parent:n})})();{let i=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?we:i.status==="dirty"?(r.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:n.path,parent:n})}}static create(e,r){return new t({in:e,out:r,typeName:ge.ZodPipeline})}},gc=class extends ze{_parse(e){let r=this._def.innerType._parse(e),n=i=>(Cs(i)&&(i.value=Object.freeze(i.value)),i);return kd(r)?r.then(i=>n(i)):n(r)}unwrap(){return this._def.innerType}};gc.create=(t,e)=>new gc({innerType:t,typeName:ge.ZodReadonly,...Ae(e)});var XDe={object:Tn.lazycreate},ge;(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"})(ge||(ge={}));var QDe=oc.create,eOe=Cd.create,tOe=Fd.create,rOe=Rd.create,nOe=Dd.create,iOe=Od.create,oOe=Md.create,aOe=ac.create,sOe=sc.create,lOe=Nd.create,cOe=ua.create,uOe=Bi.create,dOe=jd.create,fOe=da.create,yX=Tn.create,pOe=Tn.strictCreate,hOe=lc.create,mOe=Ow.create,gOe=cc.create,yOe=Eo.create,_Oe=Nw.create,vOe=zd.create,bOe=Ld.create,wOe=jw.create,xOe=uc.create,SOe=dc.create,EOe=fc.create,IOe=pc.create,$Oe=Rs.create,POe=vi.create,TOe=_i.create,AOe=Io.create,kOe=vi.createWithPreprocess,COe=og.create;var lO=Object.freeze({status:"aborted"});function O(t,e,r){function n(s,l){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(t))return;s._zod.traits.add(t),e(s,l);let c=a.prototype,u=Object.keys(c);for(let d=0;d<u.length;d++){let f=u[d];f in s||(s[f]=c[f].bind(s))}}let i=(r==null?void 0:r.Parent)??Object;class o extends i{}Object.defineProperty(o,"name",{value:t});function a(s){var l;let c=r!=null&&r.Parent?new o:this;n(c,s),(l=c._zod).deferred??(l.deferred=[]);for(let u of c._zod.deferred)u();return c}return Object.defineProperty(a,"init",{value:n}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>{var l,c;return r!=null&&r.Parent&&s instanceof r.Parent?!0:(c=(l=s==null?void 0:s._zod)==null?void 0:l.traits)==null?void 0:c.has(t)}}),Object.defineProperty(a,"name",{value:t}),a}var zw=Symbol("zod_brand"),Ui=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ds=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},ag={};function ir(t){return t&&Object.assign(ag,t),ag}var J={};ks(J,{BIGINT_FORMAT_RANGES:()=>Ww,Class:()=>Fw,NUMBER_FORMAT_RANGES:()=>Gw,aborted:()=>ma,allowsEval:()=>qw,assert:()=>EX,assertEqual:()=>bX,assertIs:()=>xX,assertNever:()=>SX,assertNotEqual:()=>wX,assignProp:()=>pa,base64ToUint8Array:()=>gO,base64urlToUint8Array:()=>MX,cached:()=>_c,captureStackTrace:()=>lg,cleanEnum:()=>OX,cleanRegex:()=>qd,clone:()=>Yr,cloneDef:()=>$X,createTransparentProxy:()=>RX,defineLazy:()=>ke,esc:()=>sg,escapeRegex:()=>Vn,extend:()=>fO,finalizeIssue:()=>fn,floatSafeRemainder:()=>Bw,getElementAtPath:()=>PX,getEnumValues:()=>Ud,getLengthableOrigin:()=>Vd,getParsedType:()=>CX,getSizableOrigin:()=>Hd,hexToUint8Array:()=>jX,isObject:()=>Os,isPlainObject:()=>ha,issue:()=>vc,joinValues:()=>ve,jsonStringifyReplacer:()=>yc,merge:()=>DX,mergeDefs:()=>$o,normalizeParams:()=>te,nullish:()=>fa,numKeys:()=>kX,objectClone:()=>IX,omit:()=>dO,optionalKeys:()=>Vw,parsedType:()=>xe,partial:()=>hO,pick:()=>uO,prefixIssues:()=>An,primitiveTypes:()=>Hw,promiseAllObject:()=>TX,propertyKeyTypes:()=>Zd,randomString:()=>AX,required:()=>mO,safeExtend:()=>pO,shallowClone:()=>Zw,slugify:()=>Uw,stringifyPrimitive:()=>be,uint8ArrayToBase64:()=>yO,uint8ArrayToBase64url:()=>NX,uint8ArrayToHex:()=>zX,unwrapMessage:()=>Bd});function bX(t){return t}function wX(t){return t}function xX(t){}function SX(t){throw new Error("Unexpected value in exhaustive check")}function EX(t){}function Ud(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,i])=>e.indexOf(+n)===-1).map(([n,i])=>i)}function ve(t,e="|"){return t.map(r=>be(r)).join(e)}function yc(t,e){return typeof e=="bigint"?e.toString():e}function _c(t){return{get value(){{let r=t();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}function fa(t){return t==null}function qd(t){let e=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;return t.slice(e,r)}function Bw(t,e){let r=(t.toString().split(".")[1]||"").length,n=e.toString(),i=(n.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(n)){let l=n.match(/\d?e-(\d?)/);l!=null&&l[1]&&(i=Number.parseInt(l[1]))}let o=r>i?r:i,a=Number.parseInt(t.toFixed(o).replace(".","")),s=Number.parseInt(e.toFixed(o).replace(".",""));return a%s/10**o}var cO=Symbol("evaluating");function ke(t,e,r){let n;Object.defineProperty(t,e,{get(){if(n!==cO)return n===void 0&&(n=cO,n=r()),n},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function IX(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function pa(t,e,r){Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}function $o(...t){let e={};for(let r of t){let n=Object.getOwnPropertyDescriptors(r);Object.assign(e,n)}return Object.defineProperties({},e)}function $X(t){return $o(t._zod.def)}function PX(t,e){return e?e.reduce((r,n)=>r==null?void 0:r[n],t):t}function TX(t){let e=Object.keys(t),r=e.map(n=>t[n]);return Promise.all(r).then(n=>{let i={};for(let o=0;o<e.length;o++)i[e[o]]=n[o];return i})}function AX(t=10){let e="abcdefghijklmnopqrstuvwxyz",r="";for(let n=0;n<t;n++)r+=e[Math.floor(Math.random()*e.length)];return r}function sg(t){return JSON.stringify(t)}function Uw(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var lg="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Os(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var qw=_c(()=>{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 ha(t){if(Os(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let r=e.prototype;return!(Os(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Zw(t){return ha(t)?{...t}:Array.isArray(t)?[...t]:t}function kX(t){let e=0;for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&e++;return e}var CX=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}`)}},Zd=new Set(["string","number","symbol"]),Hw=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Vn(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Yr(t,e,r){let n=new t._zod.constr(e??t._zod.def);return(!e||r!=null&&r.parent)&&(n._zod.parent=t),n}function te(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 RX(t){let e;return new Proxy({},{get(r,n,i){return e??(e=t()),Reflect.get(e,n,i)},set(r,n,i,o){return e??(e=t()),Reflect.set(e,n,i,o)},has(r,n){return e??(e=t()),Reflect.has(e,n)},deleteProperty(r,n){return e??(e=t()),Reflect.deleteProperty(e,n)},ownKeys(r){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(r,n){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,n)},defineProperty(r,n,i){return e??(e=t()),Reflect.defineProperty(e,n,i)}})}function be(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Vw(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var Gw={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]},Ww={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function uO(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=$o(t._zod.def,{get shape(){let a={};for(let s in e){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&(a[s]=r.shape[s])}return pa(this,"shape",a),a},checks:[]});return Yr(t,o)}function dO(t,e){let r=t._zod.def,n=r.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=$o(t._zod.def,{get shape(){let a={...t._zod.def.shape};for(let s in e){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&delete a[s]}return pa(this,"shape",a),a},checks:[]});return Yr(t,o)}function fO(t,e){if(!ha(e))throw new Error("Invalid input to extend: expected a plain object");let r=t._zod.def.checks;if(r&&r.length>0){let o=t._zod.def.shape;for(let a in e)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=$o(t._zod.def,{get shape(){let o={...t._zod.def.shape,...e};return pa(this,"shape",o),o}});return Yr(t,i)}function pO(t,e){if(!ha(e))throw new Error("Invalid input to safeExtend: expected a plain object");let r=$o(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return pa(this,"shape",n),n}});return Yr(t,r)}function DX(t,e){let r=$o(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e._zod.def.shape};return pa(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:[]});return Yr(t,r)}function hO(t,e,r){let i=e._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=$o(e._zod.def,{get shape(){let s=e._zod.def.shape,l={...s};if(r)for(let c in r){if(!(c in s))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(l[c]=t?new t({type:"optional",innerType:s[c]}):s[c])}else for(let c in s)l[c]=t?new t({type:"optional",innerType:s[c]}):s[c];return pa(this,"shape",l),l},checks:[]});return Yr(e,a)}function mO(t,e,r){let n=$o(e._zod.def,{get shape(){let i=e._zod.def.shape,o={...i};if(r)for(let a in r){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(o[a]=new t({type:"nonoptional",innerType:i[a]}))}else for(let a in i)o[a]=new t({type:"nonoptional",innerType:i[a]});return pa(this,"shape",o),o}});return Yr(e,n)}function ma(t,e=0){var r;if(t.aborted===!0)return!0;for(let n=e;n<t.issues.length;n++)if(((r=t.issues[n])==null?void 0:r.continue)!==!0)return!0;return!1}function An(t,e){return e.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(t),r})}function Bd(t){return typeof t=="string"?t:t==null?void 0:t.message}function fn(t,e,r){var i,o,a,s,l,c;let n={...t,path:t.path??[]};if(!t.message){let u=Bd((a=(o=(i=t.inst)==null?void 0:i._zod.def)==null?void 0:o.error)==null?void 0:a.call(o,t))??Bd((s=e==null?void 0:e.error)==null?void 0:s.call(e,t))??Bd((l=r.customError)==null?void 0:l.call(r,t))??Bd((c=r.localeError)==null?void 0:c.call(r,t))??"Invalid input";n.message=u}return delete n.inst,delete n.continue,e!=null&&e.reportInput||delete n.input,n}function Hd(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Vd(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function xe(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let r=t;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return e}function vc(...t){let[e,r,n]=t;return typeof e=="string"?{message:e,code:"custom",input:r,inst:n}:{...e}}function OX(t){return Object.entries(t).filter(([e,r])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function gO(t){let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function yO(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}function MX(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-e.length%4)%4);return gO(e+r)}function NX(t){return yO(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function jX(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)r[n/2]=Number.parseInt(e.slice(n,n+2),16);return r}function zX(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}var Fw=class{constructor(...e){}};var _O=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,yc,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},cg=O("$ZodError",_O),Gd=O("$ZodError",_O,{Parent:Error});function ug(t,e=r=>r.message){let r={},n=[];for(let i of t.issues)i.path.length>0?(r[i.path[0]]=r[i.path[0]]||[],r[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:r}}function dg(t,e=r=>r.message){let r={_errors:[]},n=i=>{for(let o of i.issues)if(o.code==="invalid_union"&&o.errors.length)o.errors.map(a=>n({issues:a}));else if(o.code==="invalid_key")n({issues:o.issues});else if(o.code==="invalid_element")n({issues:o.issues});else if(o.path.length===0)r._errors.push(e(o));else{let a=r,s=0;for(;s<o.path.length;){let l=o.path[s];s===o.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(e(o))):a[l]=a[l]||{_errors:[]},a=a[l],s++}}};return n(t),r}var Wd=t=>(e,r,n,i)=>{let o=n?Object.assign(n,{async:!1}):{async:!1},a=e._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Ui;if(a.issues.length){let s=new((i==null?void 0:i.Err)??t)(a.issues.map(l=>fn(l,o,ir())));throw lg(s,i==null?void 0:i.callee),s}return a.value},Jd=Wd(Gd),Kd=t=>async(e,r,n,i)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},a=e._zod.run({value:r,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new((i==null?void 0:i.Err)??t)(a.issues.map(l=>fn(l,o,ir())));throw lg(s,i==null?void 0:i.callee),s}return a.value},Yd=Kd(Gd),Xd=t=>(e,r,n)=>{let i=n?{...n,async:!1}:{async:!1},o=e._zod.run({value:r,issues:[]},i);if(o instanceof Promise)throw new Ui;return o.issues.length?{success:!1,error:new(t??cg)(o.issues.map(a=>fn(a,i,ir())))}:{success:!0,data:o.value}},bc=Xd(Gd),Qd=t=>async(e,r,n)=>{let i=n?Object.assign(n,{async:!0}):{async:!0},o=e._zod.run({value:r,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new t(o.issues.map(a=>fn(a,i,ir())))}:{success:!0,data:o.value}},ef=Qd(Gd),vO=t=>(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Wd(t)(e,r,i)};var bO=t=>(e,r,n)=>Wd(t)(e,r,n);var wO=t=>async(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Kd(t)(e,r,i)};var xO=t=>async(e,r,n)=>Kd(t)(e,r,n);var SO=t=>(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Xd(t)(e,r,i)};var EO=t=>(e,r,n)=>Xd(t)(e,r,n);var IO=t=>async(e,r,n)=>{let i=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Qd(t)(e,r,i)};var $O=t=>async(e,r,n)=>Qd(t)(e,r,n);var Gn={};ks(Gn,{base64:()=>ux,base64url:()=>fg,bigint:()=>gx,boolean:()=>_x,browserEmail:()=>GX,cidrv4:()=>lx,cidrv6:()=>cx,cuid:()=>Jw,cuid2:()=>Kw,date:()=>fx,datetime:()=>hx,domain:()=>KX,duration:()=>tx,e164:()=>dx,email:()=>nx,emoji:()=>ix,extendedDuration:()=>FX,guid:()=>rx,hex:()=>YX,hostname:()=>JX,html5Email:()=>ZX,idnEmail:()=>VX,integer:()=>yx,ipv4:()=>ox,ipv6:()=>ax,ksuid:()=>Qw,lowercase:()=>wx,mac:()=>sx,md5_base64:()=>QX,md5_base64url:()=>eQ,md5_hex:()=>XX,nanoid:()=>ex,null:()=>vx,number:()=>pg,rfc5322Email:()=>HX,sha1_base64:()=>rQ,sha1_base64url:()=>nQ,sha1_hex:()=>tQ,sha256_base64:()=>oQ,sha256_base64url:()=>aQ,sha256_hex:()=>iQ,sha384_base64:()=>lQ,sha384_base64url:()=>cQ,sha384_hex:()=>sQ,sha512_base64:()=>dQ,sha512_base64url:()=>fQ,sha512_hex:()=>uQ,string:()=>mx,time:()=>px,ulid:()=>Yw,undefined:()=>bx,unicodeEmail:()=>PO,uppercase:()=>xx,uuid:()=>Ms,uuid4:()=>BX,uuid6:()=>UX,uuid7:()=>qX,xid:()=>Xw});var Jw=/^[cC][^\s-]{8,}$/,Kw=/^[0-9a-z]+$/,Yw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Xw=/^[0-9a-vA-V]{20}$/,Qw=/^[A-Za-z0-9]{27}$/,ex=/^[a-zA-Z0-9_-]{21}$/,tx=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,FX=/^[-+]?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)?)??$/,rx=/^([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})$/,Ms=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|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,BX=Ms(4),UX=Ms(6),qX=Ms(7),nx=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,ZX=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,HX=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,PO=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,VX=PO,GX=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,WX="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function ix(){return new RegExp(WX,"u")}var ox=/^(?:(?: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])$/,ax=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,sx=t=>{let e=Vn(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},lx=/^((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])$/,cx=/^(([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])$/,ux=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,fg=/^[A-Za-z0-9_-]*$/,JX=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,KX=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,dx=/^\+[1-9]\d{6,14}$/,TO="(?:(?:\\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])))",fx=new RegExp(`^${TO}$`);function AO(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 px(t){return new RegExp(`^${AO(t)}$`)}function hx(t){let e=AO({precision:t.precision}),r=["Z"];t.local&&r.push(""),t.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${e}(?:${r.join("|")})`;return new RegExp(`^${TO}T(?:${n})$`)}var mx=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}$`)},gx=/^-?\d+n?$/,yx=/^-?\d+$/,pg=/^-?\d+(?:\.\d+)?$/,_x=/^(?:true|false)$/i,vx=/^null$/i;var bx=/^undefined$/i;var wx=/^[^A-Z]*$/,xx=/^[^a-z]*$/,YX=/^[0-9a-fA-F]*$/;function tf(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function rf(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var XX=/^[0-9a-fA-F]{32}$/,QX=tf(22,"=="),eQ=rf(22),tQ=/^[0-9a-fA-F]{40}$/,rQ=tf(27,"="),nQ=rf(27),iQ=/^[0-9a-fA-F]{64}$/,oQ=tf(43,"="),aQ=rf(43),sQ=/^[0-9a-fA-F]{96}$/,lQ=tf(64,""),cQ=rf(64),uQ=/^[0-9a-fA-F]{128}$/,dQ=tf(86,"=="),fQ=rf(86);var It=O("$ZodCheck",(t,e)=>{var r;t._zod??(t._zod={}),t._zod.def=e,(r=t._zod).onattach??(r.onattach=[])}),CO={number:"number",bigint:"bigint",object:"date"},Sx=O("$ZodCheckLessThan",(t,e)=>{It.init(t,e);let r=CO[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,o=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<o&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:r,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Ex=O("$ZodCheckGreaterThan",(t,e)=>{It.init(t,e);let r=CO[typeof e.value];t._zod.onattach.push(n=>{let i=n._zod.bag,o=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>o&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),RO=O("$ZodCheckMultipleOf",(t,e)=>{It.init(t,e),t._zod.onattach.push(r=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=e.value)}),t._zod.check=r=>{if(typeof r.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%e.value===BigInt(0):Bw(r.value,e.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:e.value,input:r.value,inst:t,continue:!e.abort})}}),DO=O("$ZodCheckNumberFormat",(t,e)=>{var a;It.init(t,e),e.format=e.format||"float64";let r=(a=e.format)==null?void 0:a.includes("int"),n=r?"int":"number",[i,o]=Gw[e.format];t._zod.onattach.push(s=>{let l=s._zod.bag;l.format=e.format,l.minimum=i,l.maximum=o,r&&(l.pattern=yx)}),t._zod.check=s=>{let l=s.value;if(r){if(!Number.isInteger(l)){s.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:l,inst:t});return}if(!Number.isSafeInteger(l)){l>0?s.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort}):s.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:n,inclusive:!0,continue:!e.abort});return}}l<i&&s.issues.push({origin:"number",input:l,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),l>o&&s.issues.push({origin:"number",input:l,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!e.abort})}}),OO=O("$ZodCheckBigIntFormat",(t,e)=>{It.init(t,e);let[r,n]=Ww[e.format];t._zod.onattach.push(i=>{let o=i._zod.bag;o.format=e.format,o.minimum=r,o.maximum=n}),t._zod.check=i=>{let o=i.value;o<r&&i.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:t,continue:!e.abort}),o>n&&i.issues.push({origin:"bigint",input:o,code:"too_big",maximum:n,inclusive:!0,inst:t,continue:!e.abort})}}),MO=O("$ZodCheckMaxSize",(t,e)=>{var r;It.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!fa(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let i=n.value;i.size<=e.maximum||n.issues.push({origin:Hd(i),code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),NO=O("$ZodCheckMinSize",(t,e)=>{var r;It.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!fa(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;i.size>=e.minimum||n.issues.push({origin:Hd(i),code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),jO=O("$ZodCheckSizeEquals",(t,e)=>{var r;It.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!fa(i)&&i.size!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=e.size,i.maximum=e.size,i.size=e.size}),t._zod.check=n=>{let i=n.value,o=i.size;if(o===e.size)return;let a=o>e.size;n.issues.push({origin:Hd(i),...a?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),zO=O("$ZodCheckMaxLength",(t,e)=>{var r;It.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!fa(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(n._zod.bag.maximum=e.maximum)}),t._zod.check=n=>{let i=n.value;if(i.length<=e.maximum)return;let a=Vd(i);n.issues.push({origin:a,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),LO=O("$ZodCheckMinLength",(t,e)=>{var r;It.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!fa(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(n._zod.bag.minimum=e.minimum)}),t._zod.check=n=>{let i=n.value;if(i.length>=e.minimum)return;let a=Vd(i);n.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),FO=O("$ZodCheckLengthEquals",(t,e)=>{var r;It.init(t,e),(r=t._zod.def).when??(r.when=n=>{let i=n.value;return!fa(i)&&i.length!==void 0}),t._zod.onattach.push(n=>{let i=n._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=n=>{let i=n.value,o=i.length;if(o===e.length)return;let a=Vd(i),s=o>e.length;n.issues.push({origin:a,...s?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:t,continue:!e.abort})}}),nf=O("$ZodCheckStringFormat",(t,e)=>{var r,n;It.init(t,e),t._zod.onattach.push(i=>{let o=i._zod.bag;o.format=e.format,e.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(e.pattern))}),e.pattern?(r=t._zod).check??(r.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(n=t._zod).check??(n.check=()=>{})}),BO=O("$ZodCheckRegex",(t,e)=>{nf.init(t,e),t._zod.check=r=>{e.pattern.lastIndex=0,!e.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),UO=O("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=wx),nf.init(t,e)}),qO=O("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=xx),nf.init(t,e)}),ZO=O("$ZodCheckIncludes",(t,e)=>{It.init(t,e);let r=Vn(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${r}`:r);e.pattern=n,t._zod.onattach.push(i=>{let o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),HO=O("$ZodCheckStartsWith",(t,e)=>{It.init(t,e);let r=new RegExp(`^${Vn(e.prefix)}.*`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:t,continue:!e.abort})}}),VO=O("$ZodCheckEndsWith",(t,e)=>{It.init(t,e);let r=new RegExp(`.*${Vn(e.suffix)}$`);e.pattern??(e.pattern=r),t._zod.onattach.push(n=>{let i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),t._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:t,continue:!e.abort})}});function kO(t,e,r){t.issues.length&&e.issues.push(...An(r,t.issues))}var GO=O("$ZodCheckProperty",(t,e)=>{It.init(t,e),t._zod.check=r=>{let n=e.schema._zod.run({value:r.value[e.property],issues:[]},{});if(n instanceof Promise)return n.then(i=>kO(i,r,e.property));kO(n,r,e.property)}}),WO=O("$ZodCheckMimeType",(t,e)=>{It.init(t,e);let r=new Set(e.mime);t._zod.onattach.push(n=>{n._zod.bag.mime=e.mime}),t._zod.check=n=>{r.has(n.value.type)||n.issues.push({code:"invalid_value",values:e.mime,input:n.value.type,inst:t,continue:!e.abort})}}),JO=O("$ZodCheckOverwrite",(t,e)=>{It.init(t,e),t._zod.check=r=>{r.value=e.tx(r.value)}});var hg=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 n=e.split(`
|
|
234
234
|
`).filter(a=>a),i=Math.min(...n.map(a=>a.length-a.trimStart().length)),o=n.map(a=>a.slice(i)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let e=Function,r=this==null?void 0:this.args,i=[...((this==null?void 0:this.content)??[""]).map(o=>` ${o}`)];return new e(...r,i.join(`
|
|
235
|
-
`))}};var YO={major:4,minor:3,patch:6};var Pe=O("$ZodType",(t,e)=>{var i;var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=YO;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let o of n)for(let a of o._zod.onattach)a(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),(i=t._zod.deferred)==null||i.push(()=>{t._zod.run=t._zod.parse});else{let o=(s,l,c)=>{let u=ma(s),d;for(let f of l){if(f._zod.def.when){if(!f._zod.def.when(s))continue}else if(u)continue;let p=s.issues.length,h=f._zod.check(s);if(h instanceof Promise&&(c==null?void 0:c.async)===!1)throw new Ui;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,s.issues.length!==p&&(u||(u=ma(s,p)))});else{if(s.issues.length===p)continue;u||(u=ma(s,p))}}return d?d.then(()=>s):s},a=(s,l,c)=>{if(ma(s))return s.aborted=!0,s;let u=o(l,n,c);if(u instanceof Promise){if(c.async===!1)throw new Ui;return u.then(d=>t._zod.parse(d,c))}return t._zod.parse(u,c)};t._zod.run=(s,l)=>{if(l.skipChecks)return t._zod.parse(s,l);if(l.direction==="backward"){let u=t._zod.parse({value:s.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(d=>a(d,s,l)):a(u,s,l)}let c=t._zod.parse(s,l);if(c instanceof Promise){if(l.async===!1)throw new Ui;return c.then(u=>o(u,n,l))}return o(c,n,l)}}ke(t,"~standard",()=>({validate:o=>{var a;try{let s=bc(t,o);return s.success?{value:s.data}:{issues:(a=s.error)==null?void 0:a.issues}}catch{return ef(t,o).then(l=>{var c;return l.success?{value:l.data}:{issues:(c=l.error)==null?void 0:c.issues}})}},vendor:"zod",version:1}))}),Ns=O("$ZodString",(t,e)=>{var r;Pe.init(t,e),t._zod.pattern=[...((r=t==null?void 0:t._zod.bag)==null?void 0:r.patterns)??[]].pop()??mx(t._zod.bag),t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),vt=O("$ZodStringFormat",(t,e)=>{nf.init(t,e),Ns.init(t,e)}),$x=O("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=rx),vt.init(t,e)}),Px=O("$ZodUUID",(t,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Ms(n))}else e.pattern??(e.pattern=Ms());vt.init(t,e)}),Tx=O("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=nx),vt.init(t,e)}),Ax=O("$ZodURL",(t,e)=>{vt.init(t,e),t._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),kx=O("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=ix()),vt.init(t,e)}),Cx=O("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=ex),vt.init(t,e)}),Rx=O("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Jw),vt.init(t,e)}),Dx=O("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Kw),vt.init(t,e)}),Ox=O("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Yw),vt.init(t,e)}),Mx=O("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Xw),vt.init(t,e)}),Nx=O("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Qw),vt.init(t,e)}),jx=O("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=hx(e)),vt.init(t,e)}),zx=O("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=fx),vt.init(t,e)}),Lx=O("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=px(e)),vt.init(t,e)}),Fx=O("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=tx),vt.init(t,e)}),Bx=O("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=ox),vt.init(t,e),t._zod.bag.format="ipv4"}),Ux=O("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=ax),vt.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),qx=O("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=sx(e.delimiter)),vt.init(t,e),t._zod.bag.format="mac"}),Zx=O("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=lx),vt.init(t,e)}),Hx=O("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=cx),vt.init(t,e),t._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[i,o]=n;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function c2(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var Vx=O("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=ux),vt.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{c2(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function pQ(t){if(!fg.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return c2(r)}var Gx=O("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=fg),vt.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{pQ(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),Wx=O("$ZodE164",(t,e)=>{e.pattern??(e.pattern=dx),vt.init(t,e)});function hQ(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));return!("typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}var Jx=O("$ZodJWT",(t,e)=>{vt.init(t,e),t._zod.check=r=>{hQ(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),Kx=O("$ZodCustomStringFormat",(t,e)=>{vt.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),bg=O("$ZodNumber",(t,e)=>{Pe.init(t,e),t._zod.pattern=t._zod.bag.pattern??pg,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...o?{received:o}:{}}),r}}),Yx=O("$ZodNumberFormat",(t,e)=>{DO.init(t,e),bg.init(t,e)}),of=O("$ZodBoolean",(t,e)=>{Pe.init(t,e),t._zod.pattern=_x,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),r}}),wg=O("$ZodBigInt",(t,e)=>{Pe.init(t,e),t._zod.pattern=gx,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),Xx=O("$ZodBigIntFormat",(t,e)=>{OO.init(t,e),wg.init(t,e)}),Qx=O("$ZodSymbol",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:t}),r}}),eS=O("$ZodUndefined",(t,e)=>{Pe.init(t,e),t._zod.pattern=bx,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:t}),r}}),tS=O("$ZodNull",(t,e)=>{Pe.init(t,e),t._zod.pattern=vx,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:t}),r}}),rS=O("$ZodAny",(t,e)=>{Pe.init(t,e),t._zod.parse=r=>r}),nS=O("$ZodUnknown",(t,e)=>{Pe.init(t,e),t._zod.parse=r=>r}),iS=O("$ZodNever",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),oS=O("$ZodVoid",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:t}),r}}),aS=O("$ZodDate",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:t}),r}});function XO(t,e,r){t.issues.length&&e.issues.push(...An(r,t.issues)),e.value[r]=t.value}var sS=O("$ZodArray",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);let o=[];for(let a=0;a<i.length;a++){let s=i[a],l=e.element._zod.run({value:s,issues:[]},n);l instanceof Promise?o.push(l.then(c=>XO(c,r,a))):XO(l,r,a)}return o.length?Promise.all(o).then(()=>r):r}});function vg(t,e,r,n,i){if(t.issues.length){if(i&&!(r in n))return;e.issues.push(...An(r,t.issues))}t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}function u2(t){var n,i,o,a;let e=Object.keys(t.shape);for(let s of e)if(!((a=(o=(i=(n=t.shape)==null?void 0:n[s])==null?void 0:i._zod)==null?void 0:o.traits)!=null&&a.has("$ZodType")))throw new Error(`Invalid element at key "${s}": expected a Zod schema`);let r=Vw(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function d2(t,e,r,n,i,o){let a=[],s=i.keySet,l=i.catchall._zod,c=l.def.type,u=l.optout==="optional";for(let d in e){if(s.has(d))continue;if(c==="never"){a.push(d);continue}let f=l.run({value:e[d],issues:[]},n);f instanceof Promise?t.push(f.then(p=>vg(p,r,d,e,u))):vg(f,r,d,e,u)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:e,inst:o}),t.length?Promise.all(t).then(()=>r):r}var f2=O("$ZodObject",(t,e)=>{Pe.init(t,e);let r=Object.getOwnPropertyDescriptor(e,"shape");if(!(r!=null&&r.get)){let s=e.shape;Object.defineProperty(e,"shape",{get:()=>{let l={...s};return Object.defineProperty(e,"shape",{value:l}),l}})}let n=_c(()=>u2(e));ke(t._zod,"propValues",()=>{let s=e.shape,l={};for(let c in s){let u=s[c]._zod;if(u.values){l[c]??(l[c]=new Set);for(let d of u.values)l[c].add(d)}}return l});let i=Os,o=e.catchall,a;t._zod.parse=(s,l)=>{a??(a=n.value);let c=s.value;if(!i(c))return s.issues.push({expected:"object",code:"invalid_type",input:c,inst:t}),s;s.value={};let u=[],d=a.shape;for(let f of a.keys){let p=d[f],h=p._zod.optout==="optional",m=p._zod.run({value:c[f],issues:[]},l);m instanceof Promise?u.push(m.then(y=>vg(y,s,f,c,h))):vg(m,s,f,c,h)}return o?d2(u,c,s,l,n.value,t):u.length?Promise.all(u).then(()=>s):s}}),p2=O("$ZodObjectJIT",(t,e)=>{f2.init(t,e);let r=t._zod.parse,n=_c(()=>u2(e)),i=f=>{var E;let p=new hg(["shape","payload","ctx"]),h=n.value,m=x=>{let w=sg(x);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};p.write("const input = payload.value;");let y=Object.create(null),g=0;for(let x of h.keys)y[x]=`key_${g++}`;p.write("const newResult = {};");for(let x of h.keys){let w=y[x],A=sg(x),$=f[x],R=((E=$==null?void 0:$._zod)==null?void 0:E.optout)==="optional";p.write(`const ${w} = ${m(x)};`),R?p.write(`
|
|
235
|
+
`))}};var YO={major:4,minor:3,patch:6};var Pe=O("$ZodType",(t,e)=>{var i;var r;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=YO;let n=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&n.unshift(t);for(let o of n)for(let a of o._zod.onattach)a(t);if(n.length===0)(r=t._zod).deferred??(r.deferred=[]),(i=t._zod.deferred)==null||i.push(()=>{t._zod.run=t._zod.parse});else{let o=(s,l,c)=>{let u=ma(s),d;for(let f of l){if(f._zod.def.when){if(!f._zod.def.when(s))continue}else if(u)continue;let p=s.issues.length,h=f._zod.check(s);if(h instanceof Promise&&(c==null?void 0:c.async)===!1)throw new Ui;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,s.issues.length!==p&&(u||(u=ma(s,p)))});else{if(s.issues.length===p)continue;u||(u=ma(s,p))}}return d?d.then(()=>s):s},a=(s,l,c)=>{if(ma(s))return s.aborted=!0,s;let u=o(l,n,c);if(u instanceof Promise){if(c.async===!1)throw new Ui;return u.then(d=>t._zod.parse(d,c))}return t._zod.parse(u,c)};t._zod.run=(s,l)=>{if(l.skipChecks)return t._zod.parse(s,l);if(l.direction==="backward"){let u=t._zod.parse({value:s.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(d=>a(d,s,l)):a(u,s,l)}let c=t._zod.parse(s,l);if(c instanceof Promise){if(l.async===!1)throw new Ui;return c.then(u=>o(u,n,l))}return o(c,n,l)}}ke(t,"~standard",()=>({validate:o=>{var a;try{let s=bc(t,o);return s.success?{value:s.data}:{issues:(a=s.error)==null?void 0:a.issues}}catch{return ef(t,o).then(l=>{var c;return l.success?{value:l.data}:{issues:(c=l.error)==null?void 0:c.issues}})}},vendor:"zod",version:1}))}),Ns=O("$ZodString",(t,e)=>{var r;Pe.init(t,e),t._zod.pattern=[...((r=t==null?void 0:t._zod.bag)==null?void 0:r.patterns)??[]].pop()??mx(t._zod.bag),t._zod.parse=(n,i)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),vt=O("$ZodStringFormat",(t,e)=>{nf.init(t,e),Ns.init(t,e)}),$x=O("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=rx),vt.init(t,e)}),Px=O("$ZodUUID",(t,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Ms(n))}else e.pattern??(e.pattern=Ms());vt.init(t,e)}),Tx=O("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=nx),vt.init(t,e)}),Ax=O("$ZodURL",(t,e)=>{vt.init(t,e),t._zod.check=r=>{try{let n=r.value.trim(),i=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:r.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:r.value,inst:t,continue:!e.abort})),e.normalize?r.value=i.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:t,continue:!e.abort})}}}),kx=O("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=ix()),vt.init(t,e)}),Cx=O("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=ex),vt.init(t,e)}),Rx=O("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Jw),vt.init(t,e)}),Dx=O("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Kw),vt.init(t,e)}),Ox=O("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Yw),vt.init(t,e)}),Mx=O("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Xw),vt.init(t,e)}),Nx=O("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Qw),vt.init(t,e)}),jx=O("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=hx(e)),vt.init(t,e)}),zx=O("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=fx),vt.init(t,e)}),Lx=O("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=px(e)),vt.init(t,e)}),Fx=O("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=tx),vt.init(t,e)}),Bx=O("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=ox),vt.init(t,e),t._zod.bag.format="ipv4"}),Ux=O("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=ax),vt.init(t,e),t._zod.bag.format="ipv6",t._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:t,continue:!e.abort})}}}),qx=O("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=sx(e.delimiter)),vt.init(t,e),t._zod.bag.format="mac"}),Zx=O("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=lx),vt.init(t,e)}),Hx=O("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=cx),vt.init(t,e),t._zod.check=r=>{let n=r.value.split("/");try{if(n.length!==2)throw new Error;let[i,o]=n;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${i}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:t,continue:!e.abort})}}});function c2(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var Vx=O("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=ux),vt.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=r=>{c2(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:t,continue:!e.abort})}});function pQ(t){if(!fg.test(t))return!1;let e=t.replace(/[-_]/g,n=>n==="-"?"+":"/"),r=e.padEnd(Math.ceil(e.length/4)*4,"=");return c2(r)}var Gx=O("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=fg),vt.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=r=>{pQ(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:t,continue:!e.abort})}}),Wx=O("$ZodE164",(t,e)=>{e.pattern??(e.pattern=dx),vt.init(t,e)});function hQ(t,e=null){try{let r=t.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let i=JSON.parse(atob(n));return!("typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}var Jx=O("$ZodJWT",(t,e)=>{vt.init(t,e),t._zod.check=r=>{hQ(r.value,e.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:t,continue:!e.abort})}}),Kx=O("$ZodCustomStringFormat",(t,e)=>{vt.init(t,e),t._zod.check=r=>{e.fn(r.value)||r.issues.push({code:"invalid_format",format:e.format,input:r.value,inst:t,continue:!e.abort})}}),bg=O("$ZodNumber",(t,e)=>{Pe.init(t,e),t._zod.pattern=t._zod.bag.pattern??pg,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=Number(r.value)}catch{}let i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;let o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...o?{received:o}:{}}),r}}),Yx=O("$ZodNumberFormat",(t,e)=>{DO.init(t,e),bg.init(t,e)}),of=O("$ZodBoolean",(t,e)=>{Pe.init(t,e),t._zod.pattern=_x,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=!!r.value}catch{}let i=r.value;return typeof i=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),r}}),wg=O("$ZodBigInt",(t,e)=>{Pe.init(t,e),t._zod.pattern=gx,t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:t}),r}}),Xx=O("$ZodBigIntFormat",(t,e)=>{OO.init(t,e),wg.init(t,e)}),Qx=O("$ZodSymbol",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:t}),r}}),eS=O("$ZodUndefined",(t,e)=>{Pe.init(t,e),t._zod.pattern=bx,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:t}),r}}),tS=O("$ZodNull",(t,e)=>{Pe.init(t,e),t._zod.pattern=vx,t._zod.values=new Set([null]),t._zod.parse=(r,n)=>{let i=r.value;return i===null||r.issues.push({expected:"null",code:"invalid_type",input:i,inst:t}),r}}),rS=O("$ZodAny",(t,e)=>{Pe.init(t,e),t._zod.parse=r=>r}),nS=O("$ZodUnknown",(t,e)=>{Pe.init(t,e),t._zod.parse=r=>r}),iS=O("$ZodNever",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:t}),r)}),oS=O("$ZodVoid",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return typeof i>"u"||r.issues.push({expected:"void",code:"invalid_type",input:i,inst:t}),r}}),aS=O("$ZodDate",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{if(e.coerce)try{r.value=new Date(r.value)}catch{}let i=r.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:t}),r}});function XO(t,e,r){t.issues.length&&e.issues.push(...An(r,t.issues)),e.value[r]=t.value}var sS=O("$ZodArray",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),r;r.value=Array(i.length);let o=[];for(let a=0;a<i.length;a++){let s=i[a],l=e.element._zod.run({value:s,issues:[]},n);l instanceof Promise?o.push(l.then(c=>XO(c,r,a))):XO(l,r,a)}return o.length?Promise.all(o).then(()=>r):r}});function vg(t,e,r,n,i){if(t.issues.length){if(i&&!(r in n))return;e.issues.push(...An(r,t.issues))}t.value===void 0?r in n&&(e.value[r]=void 0):e.value[r]=t.value}function u2(t){var n,i,o,a;let e=Object.keys(t.shape);for(let s of e)if(!((a=(o=(i=(n=t.shape)==null?void 0:n[s])==null?void 0:i._zod)==null?void 0:o.traits)!=null&&a.has("$ZodType")))throw new Error(`Invalid element at key "${s}": expected a Zod schema`);let r=Vw(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(r)}}function d2(t,e,r,n,i,o){let a=[],s=i.keySet,l=i.catchall._zod,c=l.def.type,u=l.optout==="optional";for(let d in e){if(s.has(d))continue;if(c==="never"){a.push(d);continue}let f=l.run({value:e[d],issues:[]},n);f instanceof Promise?t.push(f.then(p=>vg(p,r,d,e,u))):vg(f,r,d,e,u)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:e,inst:o}),t.length?Promise.all(t).then(()=>r):r}var f2=O("$ZodObject",(t,e)=>{Pe.init(t,e);let r=Object.getOwnPropertyDescriptor(e,"shape");if(!(r!=null&&r.get)){let s=e.shape;Object.defineProperty(e,"shape",{get:()=>{let l={...s};return Object.defineProperty(e,"shape",{value:l}),l}})}let n=_c(()=>u2(e));ke(t._zod,"propValues",()=>{let s=e.shape,l={};for(let c in s){let u=s[c]._zod;if(u.values){l[c]??(l[c]=new Set);for(let d of u.values)l[c].add(d)}}return l});let i=Os,o=e.catchall,a;t._zod.parse=(s,l)=>{a??(a=n.value);let c=s.value;if(!i(c))return s.issues.push({expected:"object",code:"invalid_type",input:c,inst:t}),s;s.value={};let u=[],d=a.shape;for(let f of a.keys){let p=d[f],h=p._zod.optout==="optional",m=p._zod.run({value:c[f],issues:[]},l);m instanceof Promise?u.push(m.then(y=>vg(y,s,f,c,h))):vg(m,s,f,c,h)}return o?d2(u,c,s,l,n.value,t):u.length?Promise.all(u).then(()=>s):s}}),p2=O("$ZodObjectJIT",(t,e)=>{f2.init(t,e);let r=t._zod.parse,n=_c(()=>u2(e)),i=f=>{var E;let p=new hg(["shape","payload","ctx"]),h=n.value,m=x=>{let w=sg(x);return`shape[${w}]._zod.run({ value: input[${w}], issues: [] }, ctx)`};p.write("const input = payload.value;");let y=Object.create(null),g=0;for(let x of h.keys)y[x]=`key_${g++}`;p.write("const newResult = {};");for(let x of h.keys){let w=y[x],k=sg(x),P=f[x],R=((E=P==null?void 0:P._zod)==null?void 0:E.optout)==="optional";p.write(`const ${w} = ${m(x)};`),R?p.write(`
|
|
236
236
|
if (${w}.issues.length) {
|
|
237
|
-
if (${
|
|
237
|
+
if (${k} in input) {
|
|
238
238
|
payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
|
|
239
239
|
...iss,
|
|
240
|
-
path: iss.path ? [${
|
|
240
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
241
241
|
})));
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
if (${w}.value === undefined) {
|
|
246
|
-
if (${
|
|
247
|
-
newResult[${
|
|
246
|
+
if (${k} in input) {
|
|
247
|
+
newResult[${k}] = undefined;
|
|
248
248
|
}
|
|
249
249
|
} else {
|
|
250
|
-
newResult[${
|
|
250
|
+
newResult[${k}] = ${w}.value;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
`):p.write(`
|
|
254
254
|
if (${w}.issues.length) {
|
|
255
255
|
payload.issues = payload.issues.concat(${w}.issues.map(iss => ({
|
|
256
256
|
...iss,
|
|
257
|
-
path: iss.path ? [${
|
|
257
|
+
path: iss.path ? [${k}, ...iss.path] : [${k}]
|
|
258
258
|
})));
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
if (${w}.value === undefined) {
|
|
262
|
-
if (${
|
|
263
|
-
newResult[${
|
|
262
|
+
if (${k} in input) {
|
|
263
|
+
newResult[${k}] = undefined;
|
|
264
264
|
}
|
|
265
265
|
} else {
|
|
266
|
-
newResult[${
|
|
266
|
+
newResult[${k}] = ${w}.value;
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
`)}p.write("payload.value = newResult;"),p.write("return payload;");let v=p.compile();return(x,w)=>v(f,x,w)},o,a=Os,s=!ag.jitless,c=s&&qw.value,u=e.catchall,d;t._zod.parse=(f,p)=>{d??(d=n.value);let h=f.value;return a(h)?s&&c&&(p==null?void 0:p.async)===!1&&p.jitless!==!0?(o||(o=i(e.shape)),f=o(f,p),u?d2([],h,f,p,d,t):f):r(f,p):(f.issues.push({expected:"object",code:"invalid_type",input:h,inst:t}),f)}});function QO(t,e,r,n){for(let o of t)if(o.issues.length===0)return e.value=o.value,e;let i=t.filter(o=>!ma(o));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(a=>fn(a,n,ir())))}),e)}var af=O("$ZodUnion",(t,e)=>{Pe.init(t,e),ke(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),ke(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),ke(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),ke(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){let i=e.options.map(o=>o._zod.pattern);return new RegExp(`^(${i.map(o=>qd(o.source)).join("|")})$`)}});let r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,o)=>{if(r)return n(i,o);let a=!1,s=[];for(let l of e.options){let c=l._zod.run({value:i.value,issues:[]},o);if(c instanceof Promise)s.push(c),a=!0;else{if(c.issues.length===0)return c;s.push(c)}}return a?Promise.all(s).then(l=>QO(l,i,t,o)):QO(s,i,t,o)}});function e2(t,e,r,n){let i=t.filter(o=>o.issues.length===0);return i.length===1?(e.value=i[0].value,e):(i.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:t.map(o=>o.issues.map(a=>fn(a,n,ir())))}):e.issues.push({code:"invalid_union",input:e.value,inst:r,errors:[],inclusive:!1}),e)}var lS=O("$ZodXor",(t,e)=>{af.init(t,e),e.inclusive=!1;let r=e.options.length===1,n=e.options[0]._zod.run;t._zod.parse=(i,o)=>{if(r)return n(i,o);let a=!1,s=[];for(let l of e.options){let c=l._zod.run({value:i.value,issues:[]},o);c instanceof Promise?(s.push(c),a=!0):s.push(c)}return a?Promise.all(s).then(l=>e2(l,i,t,o)):e2(s,i,t,o)}}),cS=O("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,af.init(t,e);let r=t._zod.parse;ke(t._zod,"propValues",()=>{let i={};for(let o of e.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let[s,l]of Object.entries(a)){i[s]||(i[s]=new Set);for(let c of l)i[s].add(c)}}return i});let n=_c(()=>{var a;let i=e.options,o=new Map;for(let s of i){let l=(a=s._zod.propValues)==null?void 0:a[e.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let c of l){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,s)}}return o});t._zod.parse=(i,o)=>{let a=i.value;if(!Os(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:t}),i;let s=n.value.get(a==null?void 0:a[e.discriminator]);return s?s._zod.run(i,o):e.unionFallback?r(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:a,path:[e.discriminator],inst:t}),i)}}),uS=O("$ZodIntersection",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value,o=e.left._zod.run({value:i,issues:[]},n),a=e.right._zod.run({value:i,issues:[]},n);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([l,c])=>t2(r,l,c)):t2(r,o,a)}});function Ix(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(ha(t)&&ha(e)){let r=Object.keys(e),n=Object.keys(t).filter(o=>r.indexOf(o)!==-1),i={...t,...e};for(let o of n){let a=Ix(t[o],e[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};i[o]=a.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<t.length;n++){let i=t[n],o=e[n],a=Ix(i,o);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function t2(t,e,r){let n=new Map,i;for(let s of e.issues)if(s.code==="unrecognized_keys"){i??(i=s);for(let l of s.keys)n.has(l)||n.set(l,{}),n.get(l).l=!0}else t.issues.push(s);for(let s of r.issues)if(s.code==="unrecognized_keys")for(let l of s.keys)n.has(l)||n.set(l,{}),n.get(l).r=!0;else t.issues.push(s);let o=[...n].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&i&&t.issues.push({...i,keys:o}),ma(t))return t;let a=Ix(e.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return t.value=a.data,t}var xg=O("$ZodTuple",(t,e)=>{Pe.init(t,e);let r=e.items;t._zod.parse=(n,i)=>{let o=n.value;if(!Array.isArray(o))return n.issues.push({input:o,inst:t,expected:"tuple",code:"invalid_type"}),n;n.value=[];let a=[],s=[...r].reverse().findIndex(u=>u._zod.optin!=="optional"),l=s===-1?0:r.length-s;if(!e.rest){let u=o.length>r.length,d=o.length<l-1;if(u||d)return n.issues.push({...u?{code:"too_big",maximum:r.length,inclusive:!0}:{code:"too_small",minimum:r.length},input:o,inst:t,origin:"array"}),n}let c=-1;for(let u of r){if(c++,c>=o.length&&c>=l)continue;let d=u._zod.run({value:o[c],issues:[]},i);d instanceof Promise?a.push(d.then(f=>mg(f,n,c))):mg(d,n,c)}if(e.rest){let u=o.slice(r.length);for(let d of u){c++;let f=e.rest._zod.run({value:d,issues:[]},i);f instanceof Promise?a.push(f.then(p=>mg(p,n,c))):mg(f,n,c)}}return a.length?Promise.all(a).then(()=>n):n}});function mg(t,e,r){t.issues.length&&e.issues.push(...An(r,t.issues)),e.value[r]=t.value}var dS=O("$ZodRecord",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!ha(i))return r.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),r;let o=[],a=e.keyType._zod.values;if(a){r.value={};let s=new Set;for(let c of a)if(typeof c=="string"||typeof c=="number"||typeof c=="symbol"){s.add(typeof c=="number"?c.toString():c);let u=e.valueType._zod.run({value:i[c],issues:[]},n);u instanceof Promise?o.push(u.then(d=>{d.issues.length&&r.issues.push(...An(c,d.issues)),r.value[c]=d.value})):(u.issues.length&&r.issues.push(...An(c,u.issues)),r.value[c]=u.value)}let l;for(let c in i)s.has(c)||(l=l??[],l.push(c));l&&l.length>0&&r.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:l})}else{r.value={};for(let s of Reflect.ownKeys(i)){if(s==="__proto__")continue;let l=e.keyType._zod.run({value:s,issues:[]},n);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&pg.test(s)&&l.issues.length){let d=e.keyType._zod.run({value:Number(s),issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(l=d)}if(l.issues.length){e.mode==="loose"?r.value[s]=i[s]:r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(d=>fn(d,n,ir())),input:s,path:[s],inst:t});continue}let u=e.valueType._zod.run({value:i[s],issues:[]},n);u instanceof Promise?o.push(u.then(d=>{d.issues.length&&r.issues.push(...An(s,d.issues)),r.value[l.value]=d.value})):(u.issues.length&&r.issues.push(...An(s,u.issues)),r.value[l.value]=u.value)}}return o.length?Promise.all(o).then(()=>r):r}}),fS=O("$ZodMap",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:i,inst:t}),r;let o=[];r.value=new Map;for(let[a,s]of i){let l=e.keyType._zod.run({value:a,issues:[]},n),c=e.valueType._zod.run({value:s,issues:[]},n);l instanceof Promise||c instanceof Promise?o.push(Promise.all([l,c]).then(([u,d])=>{r2(u,d,r,a,i,t,n)})):r2(l,c,r,a,i,t,n)}return o.length?Promise.all(o).then(()=>r):r}});function r2(t,e,r,n,i,o,a){t.issues.length&&(Zd.has(typeof n)?r.issues.push(...An(n,t.issues)):r.issues.push({code:"invalid_key",origin:"map",input:i,inst:o,issues:t.issues.map(s=>fn(s,a,ir()))})),e.issues.length&&(Zd.has(typeof n)?r.issues.push(...An(n,e.issues)):r.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:n,issues:e.issues.map(s=>fn(s,a,ir()))})),r.value.set(t.value,e.value)}var pS=O("$ZodSet",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;if(!(i instanceof Set))return r.issues.push({input:i,inst:t,expected:"set",code:"invalid_type"}),r;let o=[];r.value=new Set;for(let a of i){let s=e.valueType._zod.run({value:a,issues:[]},n);s instanceof Promise?o.push(s.then(l=>n2(l,r))):n2(s,r)}return o.length?Promise.all(o).then(()=>r):r}});function n2(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}var hS=O("$ZodEnum",(t,e)=>{Pe.init(t,e);let r=Ud(e.entries),n=new Set(r);t._zod.values=n,t._zod.pattern=new RegExp(`^(${r.filter(i=>Zd.has(typeof i)).map(i=>typeof i=="string"?Vn(i):i.toString()).join("|")})$`),t._zod.parse=(i,o)=>{let a=i.value;return n.has(a)||i.issues.push({code:"invalid_value",values:r,input:a,inst:t}),i}}),mS=O("$ZodLiteral",(t,e)=>{if(Pe.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(e.values);t._zod.values=r,t._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?Vn(n):n?Vn(n.toString()):String(n)).join("|")})$`),t._zod.parse=(n,i)=>{let o=n.value;return r.has(o)||n.issues.push({code:"invalid_value",values:e.values,input:o,inst:t}),n}}),gS=O("$ZodFile",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{let i=r.value;return i instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:i,inst:t}),r}}),yS=O("$ZodTransform",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ds(t.constructor.name);let i=e.transform(r.value,r);if(n.async)return(i instanceof Promise?i:Promise.resolve(i)).then(a=>(r.value=a,r));if(i instanceof Promise)throw new Ui;return r.value=i,r}});function i2(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}var Sg=O("$ZodOptional",(t,e)=>{Pe.init(t,e),t._zod.optin="optional",t._zod.optout="optional",ke(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),ke(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${qd(r.source)})?$`):void 0}),t._zod.parse=(r,n)=>{if(e.innerType._zod.optin==="optional"){let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>i2(o,r.value)):i2(i,r.value)}return r.value===void 0?r:e.innerType._zod.run(r,n)}}),_S=O("$ZodExactOptional",(t,e)=>{Sg.init(t,e),ke(t._zod,"values",()=>e.innerType._zod.values),ke(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(r,n)=>e.innerType._zod.run(r,n)}),vS=O("$ZodNullable",(t,e)=>{Pe.init(t,e),ke(t._zod,"optin",()=>e.innerType._zod.optin),ke(t._zod,"optout",()=>e.innerType._zod.optout),ke(t._zod,"pattern",()=>{let r=e.innerType._zod.pattern;return r?new RegExp(`^(${qd(r.source)}|null)$`):void 0}),ke(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(r,n)=>r.value===null?r:e.innerType._zod.run(r,n)}),bS=O("$ZodDefault",(t,e)=>{Pe.init(t,e),t._zod.optin="optional",ke(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);if(r.value===void 0)return r.value=e.defaultValue,r;let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>o2(o,e)):o2(i,e)}});function o2(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var wS=O("$ZodPrefault",(t,e)=>{Pe.init(t,e),t._zod.optin="optional",ke(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>(n.direction==="backward"||r.value===void 0&&(r.value=e.defaultValue),e.innerType._zod.run(r,n))}),xS=O("$ZodNonOptional",(t,e)=>{Pe.init(t,e),ke(t._zod,"values",()=>{let r=e.innerType._zod.values;return r?new Set([...r].filter(n=>n!==void 0)):void 0}),t._zod.parse=(r,n)=>{let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>a2(o,t)):a2(i,t)}});function a2(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 SS=O("$ZodSuccess",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ds("ZodSuccess");let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.issues.length===0,r)):(r.value=i.issues.length===0,r)}}),ES=O("$ZodCatch",(t,e)=>{Pe.init(t,e),ke(t._zod,"optin",()=>e.innerType._zod.optin),ke(t._zod,"optout",()=>e.innerType._zod.optout),ke(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(o=>(r.value=o.value,o.issues.length&&(r.value=e.catchValue({...r,error:{issues:o.issues.map(a=>fn(a,n,ir()))},input:r.value}),r.issues=[]),r)):(r.value=i.value,i.issues.length&&(r.value=e.catchValue({...r,error:{issues:i.issues.map(o=>fn(o,n,ir()))},input:r.value}),r.issues=[]),r)}}),IS=O("$ZodNaN",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:t,expected:"nan",code:"invalid_type"}),r)}),$S=O("$ZodPipe",(t,e)=>{Pe.init(t,e),ke(t._zod,"values",()=>e.in._zod.values),ke(t._zod,"optin",()=>e.in._zod.optin),ke(t._zod,"optout",()=>e.out._zod.optout),ke(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if(n.direction==="backward"){let o=e.out._zod.run(r,n);return o instanceof Promise?o.then(a=>gg(a,e.in,n)):gg(o,e.in,n)}let i=e.in._zod.run(r,n);return i instanceof Promise?i.then(o=>gg(o,e.out,n)):gg(i,e.out,n)}});function gg(t,e,r){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},r)}var sf=O("$ZodCodec",(t,e)=>{Pe.init(t,e),ke(t._zod,"values",()=>e.in._zod.values),ke(t._zod,"optin",()=>e.in._zod.optin),ke(t._zod,"optout",()=>e.out._zod.optout),ke(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(r,n)=>{if((n.direction||"forward")==="forward"){let o=e.in._zod.run(r,n);return o instanceof Promise?o.then(a=>yg(a,e,n)):yg(o,e,n)}else{let o=e.out._zod.run(r,n);return o instanceof Promise?o.then(a=>yg(a,e,n)):yg(o,e,n)}}});function yg(t,e,r){if(t.issues.length)return t.aborted=!0,t;if((r.direction||"forward")==="forward"){let i=e.transform(t.value,t);return i instanceof Promise?i.then(o=>_g(t,o,e.out,r)):_g(t,i,e.out,r)}else{let i=e.reverseTransform(t.value,t);return i instanceof Promise?i.then(o=>_g(t,o,e.in,r)):_g(t,i,e.in,r)}}function _g(t,e,r,n){return t.issues.length?(t.aborted=!0,t):r._zod.run({value:e,issues:t.issues},n)}var PS=O("$ZodReadonly",(t,e)=>{Pe.init(t,e),ke(t._zod,"propValues",()=>e.innerType._zod.propValues),ke(t._zod,"values",()=>e.innerType._zod.values),ke(t._zod,"optin",()=>{var r,n;return(n=(r=e.innerType)==null?void 0:r._zod)==null?void 0:n.optin}),ke(t._zod,"optout",()=>{var r,n;return(n=(r=e.innerType)==null?void 0:r._zod)==null?void 0:n.optout}),t._zod.parse=(r,n)=>{if(n.direction==="backward")return e.innerType._zod.run(r,n);let i=e.innerType._zod.run(r,n);return i instanceof Promise?i.then(s2):s2(i)}});function s2(t){return t.value=Object.freeze(t.value),t}var TS=O("$ZodTemplateLiteral",(t,e)=>{Pe.init(t,e);let r=[];for(let n of e.parts)if(typeof n=="object"&&n!==null){if(!n._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...n._zod.traits].shift()}`);let i=n._zod.pattern instanceof RegExp?n._zod.pattern.source:n._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${n._zod.traits}`);let o=i.startsWith("^")?1:0,a=i.endsWith("$")?i.length-1:i.length;r.push(i.slice(o,a))}else if(n===null||Hw.has(typeof n))r.push(Vn(`${n}`));else throw new Error(`Invalid template literal part: ${n}`);t._zod.pattern=new RegExp(`^${r.join("")}$`),t._zod.parse=(n,i)=>typeof n.value!="string"?(n.issues.push({input:n.value,inst:t,expected:"string",code:"invalid_type"}),n):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),n)}),AS=O("$ZodFunction",(t,e)=>(Pe.init(t,e),t._def=e,t._zod.def=e,t.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...n){let i=t._def.input?Jd(t._def.input,n):n,o=Reflect.apply(r,this,i);return t._def.output?Jd(t._def.output,o):o}},t.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...n){let i=t._def.input?await Yd(t._def.input,n):n,o=await Reflect.apply(r,this,i);return t._def.output?await Yd(t._def.output,o):o}},t._zod.parse=(r,n)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:t}),r):(t._def.output&&t._def.output._zod.def.type==="promise"?r.value=t.implementAsync(r.value):r.value=t.implement(r.value),r),t.input=(...r)=>{let n=t.constructor;return Array.isArray(r[0])?new n({type:"function",input:new xg({type:"tuple",items:r[0],rest:r[1]}),output:t._def.output}):new n({type:"function",input:r[0],output:t._def.output})},t.output=r=>{let n=t.constructor;return new n({type:"function",input:t._def.input,output:r})},t)),kS=O("$ZodPromise",(t,e)=>{Pe.init(t,e),t._zod.parse=(r,n)=>Promise.resolve(r.value).then(i=>e.innerType._zod.run({value:i,issues:[]},n))}),CS=O("$ZodLazy",(t,e)=>{Pe.init(t,e),ke(t._zod,"innerType",()=>e.getter()),ke(t._zod,"pattern",()=>{var r,n;return(n=(r=t._zod.innerType)==null?void 0:r._zod)==null?void 0:n.pattern}),ke(t._zod,"propValues",()=>{var r,n;return(n=(r=t._zod.innerType)==null?void 0:r._zod)==null?void 0:n.propValues}),ke(t._zod,"optin",()=>{var r,n;return((n=(r=t._zod.innerType)==null?void 0:r._zod)==null?void 0:n.optin)??void 0}),ke(t._zod,"optout",()=>{var r,n;return((n=(r=t._zod.innerType)==null?void 0:r._zod)==null?void 0:n.optout)??void 0}),t._zod.parse=(r,n)=>t._zod.innerType._zod.run(r,n)}),RS=O("$ZodCustom",(t,e)=>{It.init(t,e),Pe.init(t,e),t._zod.parse=(r,n)=>r,t._zod.check=r=>{let n=r.value,i=e.fn(n);if(i instanceof Promise)return i.then(o=>l2(o,r,n,t));l2(i,r,n,t)}});function l2(t,e,r,n){if(!t){let i={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(i.params=n._zod.def.params),e.issues.push(vc(i))}}var gQ=()=>{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"},map:{unit:"entries",verb:"to have"}};function e(i){return t[i]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=n[i.expected]??i.expected,a=xe(i.input),s=n[a]??a;return`Invalid input: expected ${o}, received ${s}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${be(i.values[0])}`:`Invalid option: expected one of ${ve(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=e(i.origin);return a?`Too big: expected ${i.origin??"value"} to have ${o}${i.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=e(i.origin);return a?`Too small: expected ${i.origin} to have ${o}${i.minimum.toString()} ${a.unit}`:`Too small: expected ${i.origin} to be ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;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 ${r[o.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${ve(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function DS(){return{localeError:gQ()}}var h2,m2=Symbol("ZodOutput"),g2=Symbol("ZodInput"),MS=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let n=r[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let i={...n,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function NS(){return new MS}(h2=globalThis).__zod_globalRegistry??(h2.__zod_globalRegistry=NS());var Xr=globalThis.__zod_globalRegistry;function jS(t,e){return new t({type:"string",...te(e)})}function Eg(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...te(e)})}function lf(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...te(e)})}function Ig(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...te(e)})}function $g(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...te(e)})}function Pg(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...te(e)})}function Tg(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...te(e)})}function cf(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...te(e)})}function Ag(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...te(e)})}function kg(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...te(e)})}function Cg(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...te(e)})}function Rg(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...te(e)})}function Dg(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...te(e)})}function Og(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...te(e)})}function Mg(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...te(e)})}function Ng(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...te(e)})}function jg(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...te(e)})}function zS(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...te(e)})}function zg(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...te(e)})}function Lg(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...te(e)})}function Fg(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...te(e)})}function Bg(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...te(e)})}function Ug(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...te(e)})}function qg(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...te(e)})}function LS(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...te(e)})}function FS(t,e){return new t({type:"string",format:"date",check:"string_format",...te(e)})}function BS(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...te(e)})}function US(t,e){return new t({type:"string",format:"duration",check:"string_format",...te(e)})}function qS(t,e){return new t({type:"number",checks:[],...te(e)})}function ZS(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...te(e)})}function HS(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...te(e)})}function VS(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...te(e)})}function GS(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...te(e)})}function WS(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...te(e)})}function JS(t,e){return new t({type:"boolean",...te(e)})}function KS(t,e){return new t({type:"bigint",...te(e)})}function YS(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...te(e)})}function XS(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...te(e)})}function QS(t,e){return new t({type:"symbol",...te(e)})}function eE(t,e){return new t({type:"undefined",...te(e)})}function tE(t,e){return new t({type:"null",...te(e)})}function rE(t){return new t({type:"any"})}function nE(t){return new t({type:"unknown"})}function iE(t,e){return new t({type:"never",...te(e)})}function oE(t,e){return new t({type:"void",...te(e)})}function aE(t,e){return new t({type:"date",...te(e)})}function sE(t,e){return new t({type:"nan",...te(e)})}function Po(t,e){return new Sx({check:"less_than",...te(e),value:t,inclusive:!1})}function kn(t,e){return new Sx({check:"less_than",...te(e),value:t,inclusive:!0})}function To(t,e){return new Ex({check:"greater_than",...te(e),value:t,inclusive:!1})}function Qr(t,e){return new Ex({check:"greater_than",...te(e),value:t,inclusive:!0})}function lE(t){return To(0,t)}function cE(t){return Po(0,t)}function uE(t){return kn(0,t)}function dE(t){return Qr(0,t)}function js(t,e){return new RO({check:"multiple_of",...te(e),value:t})}function zs(t,e){return new MO({check:"max_size",...te(e),maximum:t})}function Ao(t,e){return new NO({check:"min_size",...te(e),minimum:t})}function wc(t,e){return new jO({check:"size_equals",...te(e),size:t})}function xc(t,e){return new zO({check:"max_length",...te(e),maximum:t})}function ga(t,e){return new LO({check:"min_length",...te(e),minimum:t})}function Sc(t,e){return new FO({check:"length_equals",...te(e),length:t})}function uf(t,e){return new BO({check:"string_format",format:"regex",...te(e),pattern:t})}function df(t){return new UO({check:"string_format",format:"lowercase",...te(t)})}function ff(t){return new qO({check:"string_format",format:"uppercase",...te(t)})}function pf(t,e){return new ZO({check:"string_format",format:"includes",...te(e),includes:t})}function hf(t,e){return new HO({check:"string_format",format:"starts_with",...te(e),prefix:t})}function mf(t,e){return new VO({check:"string_format",format:"ends_with",...te(e),suffix:t})}function fE(t,e,r){return new GO({check:"property",property:t,schema:e,...te(r)})}function gf(t,e){return new WO({check:"mime_type",mime:t,...te(e)})}function qi(t){return new JO({check:"overwrite",tx:t})}function yf(t){return qi(e=>e.normalize(t))}function _f(){return qi(t=>t.trim())}function vf(){return qi(t=>t.toLowerCase())}function bf(){return qi(t=>t.toUpperCase())}function Zg(){return qi(t=>Uw(t))}function y2(t,e,r){return new t({type:"array",element:e,...te(r)})}function pE(t,e){return new t({type:"file",...te(e)})}function hE(t,e,r){let n=te(r);return n.abort??(n.abort=!0),new t({type:"custom",check:"custom",fn:e,...n})}function mE(t,e,r){return new t({type:"custom",check:"custom",fn:e,...te(r)})}function gE(t){let e=bQ(r=>(r.addIssue=n=>{if(typeof n=="string")r.issues.push(vc(n,r.value,e._zod.def));else{let i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=e),i.continue??(i.continue=!e._zod.def.abort),r.issues.push(vc(i))}},t(r.value,r)));return e}function bQ(t,e){let r=new It({check:"custom",...te(e)});return r._zod.check=t,r}function yE(t){let e=new It({check:"describe"});return e._zod.onattach=[r=>{let n=Xr.get(r)??{};Xr.add(r,{...n,description:t})}],e._zod.check=()=>{},e}function _E(t){let e=new It({check:"meta"});return e._zod.onattach=[r=>{let n=Xr.get(r)??{};Xr.add(r,{...n,...t})}],e._zod.check=()=>{},e}function vE(t,e){let r=te(e),n=r.truthy??["true","1","yes","on","y","enabled"],i=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(n=n.map(p=>typeof p=="string"?p.toLowerCase():p),i=i.map(p=>typeof p=="string"?p.toLowerCase():p));let o=new Set(n),a=new Set(i),s=t.Codec??sf,l=t.Boolean??of,c=t.String??Ns,u=new c({type:"string",error:r.error}),d=new l({type:"boolean",error:r.error}),f=new s({type:"pipe",in:u,out:d,transform:((p,h)=>{let m=p;return r.case!=="sensitive"&&(m=m.toLowerCase()),o.has(m)?!0:a.has(m)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:h.value,inst:f,continue:!1}),{})}),reverseTransform:((p,h)=>p===!0?n[0]||"true":i[0]||"false"),error:r.error});return f}function Ec(t,e,r,n={}){let i=te(n),o={...te(n),check:"string_format",type:"string",format:e,fn:typeof r=="function"?r:s=>r.test(s),...i};return r instanceof RegExp&&(o.pattern=r),new t(o)}function Hg(t){let e=(t==null?void 0:t.target)??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:(t==null?void 0:t.metadata)??Xr,target:e,unrepresentable:(t==null?void 0:t.unrepresentable)??"throw",override:(t==null?void 0:t.override)??(()=>{}),io:(t==null?void 0:t.io)??"output",counter:0,seen:new Map,cycles:(t==null?void 0:t.cycles)??"ref",reused:(t==null?void 0:t.reused)??"inline",external:(t==null?void 0:t.external)??void 0}}function Ct(t,e,r={path:[],schemaPath:[]}){var u,d;var n;let i=t._zod.def,o=e.seen.get(t);if(o)return o.count++,r.schemaPath.includes(t)&&(o.cycle=r.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};e.seen.set(t,a);let s=(d=(u=t._zod).toJSONSchema)==null?void 0:d.call(u);if(s)a.schema=s;else{let f={...r,schemaPath:[...r.schemaPath,t],path:r.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,a.schema,f);else{let h=a.schema,m=e.processors[i.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);m(t,e,h,f)}let p=t._zod.parent;p&&(a.ref||(a.ref=p),Ct(p,e,f),e.seen.get(p).isParent=!0)}let l=e.metadataRegistry.get(t);return l&&Object.assign(a.schema,l),e.io==="input"&&en(t)&&(delete a.schema.examples,delete a.schema.default),e.io==="input"&&a.schema._prefault&&((n=a.schema).default??(n.default=a.schema._prefault)),delete a.schema._prefault,e.seen.get(t).schema}function Vg(t,e){var a,s,l,c;let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let u of t.seen.entries()){let d=(a=t.metadataRegistry.get(u[0]))==null?void 0:a.id;if(d){let f=n.get(d);if(f&&f!==u[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(d,u[0])}}let i=u=>{var m;let d=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let y=(m=t.external.registry.get(u[0]))==null?void 0:m.id,g=t.external.uri??(E=>E);if(y)return{ref:g(y)};let v=u[1].defId??u[1].schema.id??`schema${t.counter++}`;return u[1].defId=v,{defId:v,ref:`${g("__shared")}#/${d}/${v}`}}if(u[1]===r)return{ref:"#"};let p=`#/${d}/`,h=u[1].schema.id??`__schema${t.counter++}`;return{defId:h,ref:p+h}},o=u=>{if(u[1].schema.$ref)return;let d=u[1],{ref:f,defId:p}=i(u);d.def={...d.schema},p&&(d.defId=p);let h=d.schema;for(let m in h)delete h[m];h.$ref=f};if(t.cycles==="throw")for(let u of t.seen.entries()){let d=u[1];if(d.cycle)throw new Error(`Cycle detected: #/${(s=d.cycle)==null?void 0:s.join("/")}/<root>
|
|
270
270
|
|
|
271
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let u of t.seen.entries()){let d=u[1];if(e===u[0]){o(u);continue}if(t.external){let p=(l=t.external.registry.get(u[0]))==null?void 0:l.id;if(e!==u[0]&&p){o(u);continue}}if((c=t.metadataRegistry.get(u[0]))==null?void 0:c.id){o(u);continue}if(d.cycle){o(u);continue}if(d.count>1&&t.reused==="ref"){o(u);continue}}}function Gg(t,e){var a,s,l;let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=c=>{let u=t.seen.get(c);if(u.ref===null)return;let d=u.def??u.schema,f={...d},p=u.ref;if(u.ref=null,p){n(p);let m=t.seen.get(p),y=m.schema;if(y.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(y)):Object.assign(d,y),Object.assign(d,f),c._zod.parent===p)for(let v in d)v==="$ref"||v==="allOf"||v in f||delete d[v];if(y.$ref&&m.def)for(let v in d)v==="$ref"||v==="allOf"||v in m.def&&JSON.stringify(d[v])===JSON.stringify(m.def[v])&&delete d[v]}let h=c._zod.parent;if(h&&h!==p){n(h);let m=t.seen.get(h);if(m!=null&&m.schema.$ref&&(d.$ref=m.schema.$ref,m.def))for(let y in d)y==="$ref"||y==="allOf"||y in m.def&&JSON.stringify(d[y])===JSON.stringify(m.def[y])&&delete d[y]}t.override({zodSchema:c,jsonSchema:d,path:u.path??[]})};for(let c of[...t.seen.entries()].reverse())n(c[0]);let i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,(a=t.external)!=null&&a.uri){let c=(s=t.external.registry.get(e))==null?void 0:s.id;if(!c)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(c)}Object.assign(i,r.def??r.schema);let o=((l=t.external)==null?void 0:l.defs)??{};for(let c of t.seen.entries()){let u=c[1];u.def&&u.defId&&(o[u.defId]=u.def)}t.external||Object.keys(o).length>0&&(t.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{let c=JSON.parse(JSON.stringify(i));return Object.defineProperty(c,"~standard",{value:{...e["~standard"],jsonSchema:{input:wf(e,"input",t.processors),output:wf(e,"output",t.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function en(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let n=t._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return en(n.element,r);if(n.type==="set")return en(n.valueType,r);if(n.type==="lazy")return en(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return en(n.innerType,r);if(n.type==="intersection")return en(n.left,r)||en(n.right,r);if(n.type==="record"||n.type==="map")return en(n.keyType,r)||en(n.valueType,r);if(n.type==="pipe")return en(n.in,r)||en(n.out,r);if(n.type==="object"){for(let i in n.shape)if(en(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(en(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(en(i,r))return!0;return!!(n.rest&&en(n.rest,r))}return!1}var _2=(t,e={})=>r=>{let n=Hg({...r,processors:e});return Ct(t,n),Vg(n,t),Gg(n,t)},wf=(t,e,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},a=Hg({...i??{},target:o,io:e,processors:r});return Ct(t,a),Vg(a,t),Gg(a,t)};var wQ={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},v2=(t,e,r,n)=>{let i=r;i.type="string";let{minimum:o,maximum:a,format:s,patterns:l,contentEncoding:c}=t._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof a=="number"&&(i.maxLength=a),s&&(i.format=wQ[s]??s,i.format===""&&delete i.format,s==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){let u=[...l];u.length===1?i.pattern=u[0].source:u.length>1&&(i.allOf=[...u.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},b2=(t,e,r,n)=>{let i=r,{minimum:o,maximum:a,format:s,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=t._zod.bag;typeof s=="string"&&s.includes("int")?i.type="integer":i.type="number",typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof o=="number"&&(i.minimum=o,typeof u=="number"&&e.target!=="draft-04"&&(u>=o?delete i.minimum:delete i.exclusiveMinimum)),typeof c=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c),typeof a=="number"&&(i.maximum=a,typeof c=="number"&&e.target!=="draft-04"&&(c<=a?delete i.maximum:delete i.exclusiveMaximum)),typeof l=="number"&&(i.multipleOf=l)},w2=(t,e,r,n)=>{r.type="boolean"},x2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},S2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},E2=(t,e,r,n)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},I2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},$2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},P2=(t,e,r,n)=>{r.not={}},T2=(t,e,r,n)=>{},A2=(t,e,r,n)=>{},k2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},C2=(t,e,r,n)=>{let i=t._zod.def,o=Ud(i.entries);o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},R2=(t,e,r,n)=>{let i=t._zod.def,o=[];for(let a of i.values)if(a===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];r.type=a===null?"null":typeof a,e.target==="draft-04"||e.target==="openapi-3.0"?r.enum=[a]:r.const=a}else o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),o.every(a=>typeof a=="boolean")&&(r.type="boolean"),o.every(a=>a===null)&&(r.type="null"),r.enum=o},D2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},O2=(t,e,r,n)=>{let i=r,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source},M2=(t,e,r,n)=>{let i=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:l}=t._zod.bag;a!==void 0&&(o.minLength=a),s!==void 0&&(o.maxLength=s),l?l.length===1?(o.contentMediaType=l[0],Object.assign(i,o)):(Object.assign(i,o),i.anyOf=l.map(c=>({contentMediaType:c}))):Object.assign(i,o)},N2=(t,e,r,n)=>{r.type="boolean"},j2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},z2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},L2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},F2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},B2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},U2=(t,e,r,n)=>{let i=r,o=t._zod.def,{minimum:a,maximum:s}=t._zod.bag;typeof a=="number"&&(i.minItems=a),typeof s=="number"&&(i.maxItems=s),i.type="array",i.items=Ct(o.element,e,{...n,path:[...n.path,"items"]})},q2=(t,e,r,n)=>{var c;let i=r,o=t._zod.def;i.type="object",i.properties={};let a=o.shape;for(let u in a)i.properties[u]=Ct(a[u],e,{...n,path:[...n.path,"properties",u]});let s=new Set(Object.keys(a)),l=new Set([...s].filter(u=>{let d=o.shape[u]._zod;return e.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(i.required=Array.from(l)),((c=o.catchall)==null?void 0:c._zod.def.type)==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=Ct(o.catchall,e,{...n,path:[...n.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)},bE=(t,e,r,n)=>{let i=t._zod.def,o=i.inclusive===!1,a=i.options.map((s,l)=>Ct(s,e,{...n,path:[...n.path,o?"oneOf":"anyOf",l]}));o?r.oneOf=a:r.anyOf=a},Z2=(t,e,r,n)=>{let i=t._zod.def,o=Ct(i.left,e,{...n,path:[...n.path,"allOf",0]}),a=Ct(i.right,e,{...n,path:[...n.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,l=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];r.allOf=l},H2=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="array";let a=e.target==="draft-2020-12"?"prefixItems":"items",s=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",l=o.items.map((f,p)=>Ct(f,e,{...n,path:[...n.path,a,p]})),c=o.rest?Ct(o.rest,e,{...n,path:[...n.path,s,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(i.prefixItems=l,c&&(i.items=c)):e.target==="openapi-3.0"?(i.items={anyOf:l},c&&i.items.anyOf.push(c),i.minItems=l.length,c||(i.maxItems=l.length)):(i.items=l,c&&(i.additionalItems=c));let{minimum:u,maximum:d}=t._zod.bag;typeof u=="number"&&(i.minItems=u),typeof d=="number"&&(i.maxItems=d)},V2=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="object";let a=o.keyType,s=a._zod.bag,l=s==null?void 0:s.patterns;if(o.mode==="loose"&&l&&l.size>0){let u=Ct(o.valueType,e,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let d of l)i.patternProperties[d.source]=u}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(i.propertyNames=Ct(o.keyType,e,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=Ct(o.valueType,e,{...n,path:[...n.path,"additionalProperties"]});let c=a._zod.values;if(c){let u=[...c].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(i.required=u)}},G2=(t,e,r,n)=>{let i=t._zod.def,o=Ct(i.innerType,e,n),a=e.seen.get(t);e.target==="openapi-3.0"?(a.ref=i.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},W2=(t,e,r,n)=>{let i=t._zod.def;Ct(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType},J2=(t,e,r,n)=>{let i=t._zod.def;Ct(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},K2=(t,e,r,n)=>{let i=t._zod.def;Ct(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Y2=(t,e,r,n)=>{let i=t._zod.def;Ct(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType;let a;try{a=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},X2=(t,e,r,n)=>{let i=t._zod.def,o=e.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Ct(o,e,n);let a=e.seen.get(t);a.ref=o},Q2=(t,e,r,n)=>{let i=t._zod.def;Ct(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,r.readOnly=!0},e4=(t,e,r,n)=>{let i=t._zod.def;Ct(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType},wE=(t,e,r,n)=>{let i=t._zod.def;Ct(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType},t4=(t,e,r,n)=>{let i=t._zod.innerType;Ct(i,e,n);let o=e.seen.get(t);o.ref=i};function Ic(t){return!!t._zod}function ya(t,e){return Ic(t)?bc(t,e):t.safeParse(e)}function Wg(t){var r,n;if(!t)return;let e;if(Ic(t)?e=(n=(r=t._zod)==null?void 0:r.def)==null?void 0:n.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function i4(t){var i;if(Ic(t)){let a=(i=t._zod)==null?void 0:i.def;if(a){if(a.value!==void 0)return a.value;if(Array.isArray(a.values)&&a.values.length>0)return a.values[0]}}let r=t._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let n=t.value;if(n!==void 0)return n}var xf={};ks(xf,{ZodAny:()=>x4,ZodArray:()=>$4,ZodBase64:()=>HE,ZodBase64URL:()=>VE,ZodBigInt:()=>n0,ZodBigIntFormat:()=>JE,ZodBoolean:()=>r0,ZodCIDRv4:()=>qE,ZodCIDRv6:()=>ZE,ZodCUID:()=>NE,ZodCUID2:()=>jE,ZodCatch:()=>V4,ZodCodec:()=>r1,ZodCustom:()=>l0,ZodCustomStringFormat:()=>Ef,ZodDate:()=>YE,ZodDefault:()=>F4,ZodDiscriminatedUnion:()=>T4,ZodE164:()=>GE,ZodEmail:()=>DE,ZodEmoji:()=>OE,ZodEnum:()=>Sf,ZodExactOptional:()=>j4,ZodFile:()=>M4,ZodFunction:()=>tM,ZodGUID:()=>Kg,ZodIPv4:()=>BE,ZodIPv6:()=>UE,ZodIntersection:()=>A4,ZodJWT:()=>WE,ZodKSUID:()=>FE,ZodLazy:()=>X4,ZodLiteral:()=>O4,ZodMAC:()=>_4,ZodMap:()=>R4,ZodNaN:()=>W4,ZodNanoID:()=>ME,ZodNever:()=>E4,ZodNonOptional:()=>e1,ZodNull:()=>w4,ZodNullable:()=>L4,ZodNumber:()=>t0,ZodNumberFormat:()=>$c,ZodObject:()=>i0,ZodOptional:()=>QE,ZodPipe:()=>t1,ZodPrefault:()=>U4,ZodPromise:()=>eM,ZodReadonly:()=>J4,ZodRecord:()=>s0,ZodSet:()=>D4,ZodString:()=>Qg,ZodStringFormat:()=>$t,ZodSuccess:()=>H4,ZodSymbol:()=>v4,ZodTemplateLiteral:()=>Y4,ZodTransform:()=>N4,ZodTuple:()=>k4,ZodType:()=>Ce,ZodULID:()=>zE,ZodURL:()=>e0,ZodUUID:()=>ko,ZodUndefined:()=>b4,ZodUnion:()=>o0,ZodUnknown:()=>S4,ZodVoid:()=>I4,ZodXID:()=>LE,ZodXor:()=>P4,_ZodString:()=>RE,_default:()=>B4,_function:()=>jee,any:()=>vee,array:()=>Be,base64:()=>ree,base64url:()=>nee,bigint:()=>hee,boolean:()=>er,catch:()=>G4,check:()=>zee,cidrv4:()=>eee,cidrv6:()=>tee,codec:()=>Oee,cuid:()=>VQ,cuid2:()=>GQ,custom:()=>n1,date:()=>wee,describe:()=>Lee,discriminatedUnion:()=>a0,e164:()=>iee,email:()=>NQ,emoji:()=>ZQ,enum:()=>Rr,exactOptional:()=>z4,file:()=>kee,float32:()=>uee,float64:()=>dee,function:()=>jee,guid:()=>jQ,hash:()=>cee,hex:()=>lee,hostname:()=>see,httpUrl:()=>qQ,instanceof:()=>Bee,int:()=>CE,int32:()=>fee,int64:()=>mee,intersection:()=>$f,ipv4:()=>YQ,ipv6:()=>QQ,json:()=>qee,jwt:()=>oee,keyof:()=>xee,ksuid:()=>KQ,lazy:()=>Q4,literal:()=>ue,looseObject:()=>Cr,looseRecord:()=>$ee,mac:()=>XQ,map:()=>Pee,meta:()=>Fee,nan:()=>Dee,nanoid:()=>HQ,nativeEnum:()=>Aee,never:()=>KE,nonoptional:()=>Z4,null:()=>If,nullable:()=>Yg,nullish:()=>Cee,number:()=>ht,object:()=>ie,optional:()=>Ot,partialRecord:()=>Iee,pipe:()=>Xg,prefault:()=>q4,preprocess:()=>c0,promise:()=>Nee,readonly:()=>K4,record:()=>Rt,refine:()=>rM,set:()=>Tee,strictObject:()=>See,string:()=>L,stringFormat:()=>aee,stringbool:()=>Uee,success:()=>Ree,superRefine:()=>nM,symbol:()=>yee,templateLiteral:()=>Mee,transform:()=>XE,tuple:()=>C4,uint32:()=>pee,uint64:()=>gee,ulid:()=>WQ,undefined:()=>_ee,union:()=>bt,unknown:()=>Pt,url:()=>UQ,uuid:()=>zQ,uuidv4:()=>LQ,uuidv6:()=>FQ,uuidv7:()=>BQ,void:()=>bee,xid:()=>JQ,xor:()=>Eee});var Jg={};ks(Jg,{endsWith:()=>mf,gt:()=>To,gte:()=>Qr,includes:()=>pf,length:()=>Sc,lowercase:()=>df,lt:()=>Po,lte:()=>kn,maxLength:()=>xc,maxSize:()=>zs,mime:()=>gf,minLength:()=>ga,minSize:()=>Ao,multipleOf:()=>js,negative:()=>cE,nonnegative:()=>dE,nonpositive:()=>uE,normalize:()=>yf,overwrite:()=>qi,positive:()=>lE,property:()=>fE,regex:()=>uf,size:()=>wc,slugify:()=>Zg,startsWith:()=>hf,toLowerCase:()=>vf,toUpperCase:()=>bf,trim:()=>_f,uppercase:()=>ff});var Ls={};ks(Ls,{ZodISODate:()=>IE,ZodISODateTime:()=>SE,ZodISODuration:()=>AE,ZodISOTime:()=>PE,date:()=>$E,datetime:()=>EE,duration:()=>kE,time:()=>TE});var SE=O("ZodISODateTime",(t,e)=>{jx.init(t,e),$t.init(t,e)});function EE(t){return LS(SE,t)}var IE=O("ZodISODate",(t,e)=>{zx.init(t,e),$t.init(t,e)});function $E(t){return FS(IE,t)}var PE=O("ZodISOTime",(t,e)=>{Lx.init(t,e),$t.init(t,e)});function TE(t){return BS(PE,t)}var AE=O("ZodISODuration",(t,e)=>{Fx.init(t,e),$t.init(t,e)});function kE(t){return US(AE,t)}var o4=(t,e)=>{cg.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>dg(t,r)},flatten:{value:r=>ug(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,yc,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,yc,2)}},isEmpty:{get(){return t.issues.length===0}}})},DNe=O("ZodError",o4),Cn=O("ZodError",o4,{Parent:Error});var a4=Wd(Cn),s4=Kd(Cn),l4=Xd(Cn),c4=Qd(Cn),u4=vO(Cn),d4=bO(Cn),f4=wO(Cn),p4=xO(Cn),h4=SO(Cn),m4=EO(Cn),g4=IO(Cn),y4=$O(Cn);var Ce=O("ZodType",(t,e)=>(Pe.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:wf(t,"input"),output:wf(t,"output")}}),t.toJSONSchema=_2(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone(J.mergeDefs(e,{checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),t.with=t.check,t.clone=(r,n)=>Yr(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.parse=(r,n)=>a4(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>l4(t,r,n),t.parseAsync=async(r,n)=>s4(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>c4(t,r,n),t.spa=t.safeParseAsync,t.encode=(r,n)=>u4(t,r,n),t.decode=(r,n)=>d4(t,r,n),t.encodeAsync=async(r,n)=>f4(t,r,n),t.decodeAsync=async(r,n)=>p4(t,r,n),t.safeEncode=(r,n)=>h4(t,r,n),t.safeDecode=(r,n)=>m4(t,r,n),t.safeEncodeAsync=async(r,n)=>g4(t,r,n),t.safeDecodeAsync=async(r,n)=>y4(t,r,n),t.refine=(r,n)=>t.check(rM(r,n)),t.superRefine=r=>t.check(nM(r)),t.overwrite=r=>t.check(qi(r)),t.optional=()=>Ot(t),t.exactOptional=()=>z4(t),t.nullable=()=>Yg(t),t.nullish=()=>Ot(Yg(t)),t.nonoptional=r=>Z4(t,r),t.array=()=>Be(t),t.or=r=>bt([t,r]),t.and=r=>$f(t,r),t.transform=r=>Xg(t,XE(r)),t.default=r=>B4(t,r),t.prefault=r=>q4(t,r),t.catch=r=>G4(t,r),t.pipe=r=>Xg(t,r),t.readonly=()=>K4(t),t.describe=r=>{let n=t.clone();return Xr.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){var r;return(r=Xr.get(t))==null?void 0:r.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return Xr.get(t);let n=t.clone();return Xr.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=r=>r(t),t)),RE=O("_ZodString",(t,e)=>{Ns.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(n,i,o)=>v2(t,n,i,o);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...n)=>t.check(uf(...n)),t.includes=(...n)=>t.check(pf(...n)),t.startsWith=(...n)=>t.check(hf(...n)),t.endsWith=(...n)=>t.check(mf(...n)),t.min=(...n)=>t.check(ga(...n)),t.max=(...n)=>t.check(xc(...n)),t.length=(...n)=>t.check(Sc(...n)),t.nonempty=(...n)=>t.check(ga(1,...n)),t.lowercase=n=>t.check(df(n)),t.uppercase=n=>t.check(ff(n)),t.trim=()=>t.check(_f()),t.normalize=(...n)=>t.check(yf(...n)),t.toLowerCase=()=>t.check(vf()),t.toUpperCase=()=>t.check(bf()),t.slugify=()=>t.check(Zg())}),Qg=O("ZodString",(t,e)=>{Ns.init(t,e),RE.init(t,e),t.email=r=>t.check(Eg(DE,r)),t.url=r=>t.check(cf(e0,r)),t.jwt=r=>t.check(qg(WE,r)),t.emoji=r=>t.check(Ag(OE,r)),t.guid=r=>t.check(lf(Kg,r)),t.uuid=r=>t.check(Ig(ko,r)),t.uuidv4=r=>t.check($g(ko,r)),t.uuidv6=r=>t.check(Pg(ko,r)),t.uuidv7=r=>t.check(Tg(ko,r)),t.nanoid=r=>t.check(kg(ME,r)),t.guid=r=>t.check(lf(Kg,r)),t.cuid=r=>t.check(Cg(NE,r)),t.cuid2=r=>t.check(Rg(jE,r)),t.ulid=r=>t.check(Dg(zE,r)),t.base64=r=>t.check(Fg(HE,r)),t.base64url=r=>t.check(Bg(VE,r)),t.xid=r=>t.check(Og(LE,r)),t.ksuid=r=>t.check(Mg(FE,r)),t.ipv4=r=>t.check(Ng(BE,r)),t.ipv6=r=>t.check(jg(UE,r)),t.cidrv4=r=>t.check(zg(qE,r)),t.cidrv6=r=>t.check(Lg(ZE,r)),t.e164=r=>t.check(Ug(GE,r)),t.datetime=r=>t.check(EE(r)),t.date=r=>t.check($E(r)),t.time=r=>t.check(TE(r)),t.duration=r=>t.check(kE(r))});function L(t){return jS(Qg,t)}var $t=O("ZodStringFormat",(t,e)=>{vt.init(t,e),RE.init(t,e)}),DE=O("ZodEmail",(t,e)=>{Tx.init(t,e),$t.init(t,e)});function NQ(t){return Eg(DE,t)}var Kg=O("ZodGUID",(t,e)=>{$x.init(t,e),$t.init(t,e)});function jQ(t){return lf(Kg,t)}var ko=O("ZodUUID",(t,e)=>{Px.init(t,e),$t.init(t,e)});function zQ(t){return Ig(ko,t)}function LQ(t){return $g(ko,t)}function FQ(t){return Pg(ko,t)}function BQ(t){return Tg(ko,t)}var e0=O("ZodURL",(t,e)=>{Ax.init(t,e),$t.init(t,e)});function UQ(t){return cf(e0,t)}function qQ(t){return cf(e0,{protocol:/^https?$/,hostname:Gn.domain,...J.normalizeParams(t)})}var OE=O("ZodEmoji",(t,e)=>{kx.init(t,e),$t.init(t,e)});function ZQ(t){return Ag(OE,t)}var ME=O("ZodNanoID",(t,e)=>{Cx.init(t,e),$t.init(t,e)});function HQ(t){return kg(ME,t)}var NE=O("ZodCUID",(t,e)=>{Rx.init(t,e),$t.init(t,e)});function VQ(t){return Cg(NE,t)}var jE=O("ZodCUID2",(t,e)=>{Dx.init(t,e),$t.init(t,e)});function GQ(t){return Rg(jE,t)}var zE=O("ZodULID",(t,e)=>{Ox.init(t,e),$t.init(t,e)});function WQ(t){return Dg(zE,t)}var LE=O("ZodXID",(t,e)=>{Mx.init(t,e),$t.init(t,e)});function JQ(t){return Og(LE,t)}var FE=O("ZodKSUID",(t,e)=>{Nx.init(t,e),$t.init(t,e)});function KQ(t){return Mg(FE,t)}var BE=O("ZodIPv4",(t,e)=>{Bx.init(t,e),$t.init(t,e)});function YQ(t){return Ng(BE,t)}var _4=O("ZodMAC",(t,e)=>{qx.init(t,e),$t.init(t,e)});function XQ(t){return zS(_4,t)}var UE=O("ZodIPv6",(t,e)=>{Ux.init(t,e),$t.init(t,e)});function QQ(t){return jg(UE,t)}var qE=O("ZodCIDRv4",(t,e)=>{Zx.init(t,e),$t.init(t,e)});function eee(t){return zg(qE,t)}var ZE=O("ZodCIDRv6",(t,e)=>{Hx.init(t,e),$t.init(t,e)});function tee(t){return Lg(ZE,t)}var HE=O("ZodBase64",(t,e)=>{Vx.init(t,e),$t.init(t,e)});function ree(t){return Fg(HE,t)}var VE=O("ZodBase64URL",(t,e)=>{Gx.init(t,e),$t.init(t,e)});function nee(t){return Bg(VE,t)}var GE=O("ZodE164",(t,e)=>{Wx.init(t,e),$t.init(t,e)});function iee(t){return Ug(GE,t)}var WE=O("ZodJWT",(t,e)=>{Jx.init(t,e),$t.init(t,e)});function oee(t){return qg(WE,t)}var Ef=O("ZodCustomStringFormat",(t,e)=>{Kx.init(t,e),$t.init(t,e)});function aee(t,e,r={}){return Ec(Ef,t,e,r)}function see(t){return Ec(Ef,"hostname",Gn.hostname,t)}function lee(t){return Ec(Ef,"hex",Gn.hex,t)}function cee(t,e){let r=(e==null?void 0:e.enc)??"hex",n=`${t}_${r}`,i=Gn[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return Ec(Ef,n,i,e)}var t0=O("ZodNumber",(t,e)=>{bg.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(n,i,o)=>b2(t,n,i,o),t.gt=(n,i)=>t.check(To(n,i)),t.gte=(n,i)=>t.check(Qr(n,i)),t.min=(n,i)=>t.check(Qr(n,i)),t.lt=(n,i)=>t.check(Po(n,i)),t.lte=(n,i)=>t.check(kn(n,i)),t.max=(n,i)=>t.check(kn(n,i)),t.int=n=>t.check(CE(n)),t.safe=n=>t.check(CE(n)),t.positive=n=>t.check(To(0,n)),t.nonnegative=n=>t.check(Qr(0,n)),t.negative=n=>t.check(Po(0,n)),t.nonpositive=n=>t.check(kn(0,n)),t.multipleOf=(n,i)=>t.check(js(n,i)),t.step=(n,i)=>t.check(js(n,i)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function ht(t){return qS(t0,t)}var $c=O("ZodNumberFormat",(t,e)=>{Yx.init(t,e),t0.init(t,e)});function CE(t){return ZS($c,t)}function uee(t){return HS($c,t)}function dee(t){return VS($c,t)}function fee(t){return GS($c,t)}function pee(t){return WS($c,t)}var r0=O("ZodBoolean",(t,e)=>{of.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>w2(t,r,n,i)});function er(t){return JS(r0,t)}var n0=O("ZodBigInt",(t,e)=>{wg.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(n,i,o)=>x2(t,n,i,o),t.gte=(n,i)=>t.check(Qr(n,i)),t.min=(n,i)=>t.check(Qr(n,i)),t.gt=(n,i)=>t.check(To(n,i)),t.gte=(n,i)=>t.check(Qr(n,i)),t.min=(n,i)=>t.check(Qr(n,i)),t.lt=(n,i)=>t.check(Po(n,i)),t.lte=(n,i)=>t.check(kn(n,i)),t.max=(n,i)=>t.check(kn(n,i)),t.positive=n=>t.check(To(BigInt(0),n)),t.negative=n=>t.check(Po(BigInt(0),n)),t.nonpositive=n=>t.check(kn(BigInt(0),n)),t.nonnegative=n=>t.check(Qr(BigInt(0),n)),t.multipleOf=(n,i)=>t.check(js(n,i));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function hee(t){return KS(n0,t)}var JE=O("ZodBigIntFormat",(t,e)=>{Xx.init(t,e),n0.init(t,e)});function mee(t){return YS(JE,t)}function gee(t){return XS(JE,t)}var v4=O("ZodSymbol",(t,e)=>{Qx.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>S2(t,r,n,i)});function yee(t){return QS(v4,t)}var b4=O("ZodUndefined",(t,e)=>{eS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>I2(t,r,n,i)});function _ee(t){return eE(b4,t)}var w4=O("ZodNull",(t,e)=>{tS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>E2(t,r,n,i)});function If(t){return tE(w4,t)}var x4=O("ZodAny",(t,e)=>{rS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>T2(t,r,n,i)});function vee(){return rE(x4)}var S4=O("ZodUnknown",(t,e)=>{nS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>A2(t,r,n,i)});function Pt(){return nE(S4)}var E4=O("ZodNever",(t,e)=>{iS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>P2(t,r,n,i)});function KE(t){return iE(E4,t)}var I4=O("ZodVoid",(t,e)=>{oS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>$2(t,r,n,i)});function bee(t){return oE(I4,t)}var YE=O("ZodDate",(t,e)=>{aS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(n,i,o)=>k2(t,n,i,o),t.min=(n,i)=>t.check(Qr(n,i)),t.max=(n,i)=>t.check(kn(n,i));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function wee(t){return aE(YE,t)}var $4=O("ZodArray",(t,e)=>{sS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>U2(t,r,n,i),t.element=e.element,t.min=(r,n)=>t.check(ga(r,n)),t.nonempty=r=>t.check(ga(1,r)),t.max=(r,n)=>t.check(xc(r,n)),t.length=(r,n)=>t.check(Sc(r,n)),t.unwrap=()=>t.element});function Be(t,e){return y2($4,t,e)}function xee(t){let e=t._zod.def.shape;return Rr(Object.keys(e))}var i0=O("ZodObject",(t,e)=>{p2.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>q2(t,r,n,i),J.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>Rr(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:Pt()}),t.loose=()=>t.clone({...t._zod.def,catchall:Pt()}),t.strict=()=>t.clone({...t._zod.def,catchall:KE()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>J.extend(t,r),t.safeExtend=r=>J.safeExtend(t,r),t.merge=r=>J.merge(t,r),t.pick=r=>J.pick(t,r),t.omit=r=>J.omit(t,r),t.partial=(...r)=>J.partial(QE,t,r[0]),t.required=(...r)=>J.required(e1,t,r[0])});function ie(t,e){let r={type:"object",shape:t??{},...J.normalizeParams(e)};return new i0(r)}function See(t,e){return new i0({type:"object",shape:t,catchall:KE(),...J.normalizeParams(e)})}function Cr(t,e){return new i0({type:"object",shape:t,catchall:Pt(),...J.normalizeParams(e)})}var o0=O("ZodUnion",(t,e)=>{af.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>bE(t,r,n,i),t.options=e.options});function bt(t,e){return new o0({type:"union",options:t,...J.normalizeParams(e)})}var P4=O("ZodXor",(t,e)=>{o0.init(t,e),lS.init(t,e),t._zod.processJSONSchema=(r,n,i)=>bE(t,r,n,i),t.options=e.options});function Eee(t,e){return new P4({type:"union",options:t,inclusive:!1,...J.normalizeParams(e)})}var T4=O("ZodDiscriminatedUnion",(t,e)=>{o0.init(t,e),cS.init(t,e)});function a0(t,e,r){return new T4({type:"union",options:e,discriminator:t,...J.normalizeParams(r)})}var A4=O("ZodIntersection",(t,e)=>{uS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Z2(t,r,n,i)});function $f(t,e){return new A4({type:"intersection",left:t,right:e})}var k4=O("ZodTuple",(t,e)=>{xg.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>H2(t,r,n,i),t.rest=r=>t.clone({...t._zod.def,rest:r})});function C4(t,e,r){let n=e instanceof Pe,i=n?r:e,o=n?e:null;return new k4({type:"tuple",items:t,rest:o,...J.normalizeParams(i)})}var s0=O("ZodRecord",(t,e)=>{dS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>V2(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType});function Rt(t,e,r){return new s0({type:"record",keyType:t,valueType:e,...J.normalizeParams(r)})}function Iee(t,e,r){let n=Yr(t);return n._zod.values=void 0,new s0({type:"record",keyType:n,valueType:e,...J.normalizeParams(r)})}function $ee(t,e,r){return new s0({type:"record",keyType:t,valueType:e,mode:"loose",...J.normalizeParams(r)})}var R4=O("ZodMap",(t,e)=>{fS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>F2(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...r)=>t.check(Ao(...r)),t.nonempty=r=>t.check(Ao(1,r)),t.max=(...r)=>t.check(zs(...r)),t.size=(...r)=>t.check(wc(...r))});function Pee(t,e,r){return new R4({type:"map",keyType:t,valueType:e,...J.normalizeParams(r)})}var D4=O("ZodSet",(t,e)=>{pS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>B2(t,r,n,i),t.min=(...r)=>t.check(Ao(...r)),t.nonempty=r=>t.check(Ao(1,r)),t.max=(...r)=>t.check(zs(...r)),t.size=(...r)=>t.check(wc(...r))});function Tee(t,e){return new D4({type:"set",valueType:t,...J.normalizeParams(e)})}var Sf=O("ZodEnum",(t,e)=>{hS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(n,i,o)=>C2(t,n,i,o),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,i)=>{let o={};for(let a of n)if(r.has(a))o[a]=e.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Sf({...e,checks:[],...J.normalizeParams(i),entries:o})},t.exclude=(n,i)=>{let o={...e.entries};for(let a of n)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new Sf({...e,checks:[],...J.normalizeParams(i),entries:o})}});function Rr(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new Sf({type:"enum",entries:r,...J.normalizeParams(e)})}function Aee(t,e){return new Sf({type:"enum",entries:t,...J.normalizeParams(e)})}var O4=O("ZodLiteral",(t,e)=>{mS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>R2(t,r,n,i),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 ue(t,e){return new O4({type:"literal",values:Array.isArray(t)?t:[t],...J.normalizeParams(e)})}var M4=O("ZodFile",(t,e)=>{gS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>M2(t,r,n,i),t.min=(r,n)=>t.check(Ao(r,n)),t.max=(r,n)=>t.check(zs(r,n)),t.mime=(r,n)=>t.check(gf(Array.isArray(r)?r:[r],n))});function kee(t){return pE(M4,t)}var N4=O("ZodTransform",(t,e)=>{yS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>L2(t,r,n,i),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ds(t.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(J.issue(o,r.value,e));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=t),r.issues.push(J.issue(a))}};let i=e.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r)):(r.value=i,r)}});function XE(t){return new N4({type:"transform",transform:t})}var QE=O("ZodOptional",(t,e)=>{Sg.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>wE(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Ot(t){return new QE({type:"optional",innerType:t})}var j4=O("ZodExactOptional",(t,e)=>{_S.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>wE(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function z4(t){return new j4({type:"optional",innerType:t})}var L4=O("ZodNullable",(t,e)=>{vS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>G2(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Yg(t){return new L4({type:"nullable",innerType:t})}function Cee(t){return Ot(Yg(t))}var F4=O("ZodDefault",(t,e)=>{bS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>J2(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function B4(t,e){return new F4({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():J.shallowClone(e)}})}var U4=O("ZodPrefault",(t,e)=>{wS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>K2(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function q4(t,e){return new U4({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():J.shallowClone(e)}})}var e1=O("ZodNonOptional",(t,e)=>{xS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>W2(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Z4(t,e){return new e1({type:"nonoptional",innerType:t,...J.normalizeParams(e)})}var H4=O("ZodSuccess",(t,e)=>{SS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>N2(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Ree(t){return new H4({type:"success",innerType:t})}var V4=O("ZodCatch",(t,e)=>{ES.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Y2(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function G4(t,e){return new V4({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var W4=O("ZodNaN",(t,e)=>{IS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>D2(t,r,n,i)});function Dee(t){return sE(W4,t)}var t1=O("ZodPipe",(t,e)=>{$S.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>X2(t,r,n,i),t.in=e.in,t.out=e.out});function Xg(t,e){return new t1({type:"pipe",in:t,out:e})}var r1=O("ZodCodec",(t,e)=>{t1.init(t,e),sf.init(t,e)});function Oee(t,e,r){return new r1({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}var J4=O("ZodReadonly",(t,e)=>{PS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Q2(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function K4(t){return new J4({type:"readonly",innerType:t})}var Y4=O("ZodTemplateLiteral",(t,e)=>{TS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>O2(t,r,n,i)});function Mee(t,e){return new Y4({type:"template_literal",parts:t,...J.normalizeParams(e)})}var X4=O("ZodLazy",(t,e)=>{CS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>t4(t,r,n,i),t.unwrap=()=>t._zod.def.getter()});function Q4(t){return new X4({type:"lazy",getter:t})}var eM=O("ZodPromise",(t,e)=>{kS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>e4(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Nee(t){return new eM({type:"promise",innerType:t})}var tM=O("ZodFunction",(t,e)=>{AS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>z2(t,r,n,i)});function jee(t){return new tM({type:"function",input:Array.isArray(t==null?void 0:t.input)?C4(t==null?void 0:t.input):(t==null?void 0:t.input)??Be(Pt()),output:(t==null?void 0:t.output)??Pt()})}var l0=O("ZodCustom",(t,e)=>{RS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>j2(t,r,n,i)});function zee(t){let e=new It({check:"custom"});return e._zod.check=t,e}function n1(t,e){return hE(l0,t??(()=>!0),e)}function rM(t,e={}){return mE(l0,t,e)}function nM(t){return gE(t)}var Lee=yE,Fee=_E;function Bee(t,e={}){let r=new l0({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...J.normalizeParams(e)});return r._zod.bag.Class=t,r._zod.check=n=>{n.value instanceof t||n.issues.push({code:"invalid_type",expected:t.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Uee=(...t)=>vE({Codec:r1,Boolean:r0,String:Qg},...t);function qee(t){let e=Q4(()=>bt([L(t),ht(),er(),If(),Be(e),Rt(L(),e)]));return e}function c0(t,e){return Xg(XE(t),e)}var iM;iM||(iM={});var BNe={...xf,...Jg,iso:Ls};ir(DS());var o1="2025-11-25",oM="2025-03-26",Tc=[o1,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],_a="io.modelcontextprotocol/related-task",d0="2.0",gr=n1(t=>t!==null&&(typeof t=="object"||typeof t=="function")),aM=bt([L(),ht().int()]),sM=L(),aje=Cr({ttl:bt([ht(),If()]).optional(),pollInterval:ht().optional()}),Gee=ie({ttl:ht().optional()}),Wee=ie({taskId:L()}),a1=Cr({progressToken:aM.optional(),[_a]:Wee.optional()}),Rn=ie({_meta:a1.optional()}),Pf=Rn.extend({task:Gee.optional()}),lM=t=>Pf.safeParse(t).success,yr=ie({method:L(),params:Rn.loose().optional()}),Wn=ie({_meta:a1.optional()}),Jn=ie({method:L(),params:Wn.loose().optional()}),_r=Cr({_meta:a1.optional()}),f0=bt([L(),ht().int()]),cM=ie({jsonrpc:ue(d0),id:f0,...yr.shape}).strict(),va=t=>cM.safeParse(t).success,uM=ie({jsonrpc:ue(d0),...Jn.shape}).strict(),dM=t=>uM.safeParse(t).success,s1=ie({jsonrpc:ue(d0),id:f0,result:_r}).strict(),Co=t=>s1.safeParse(t).success;var Te;(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"})(Te||(Te={}));var l1=ie({jsonrpc:ue(d0),id:f0.optional(),error:ie({code:ht().int(),message:L(),data:Pt().optional()})}).strict();var Ac=t=>l1.safeParse(t).success;var Tf=bt([cM,uM,s1,l1]),sje=bt([s1,l1]),p0=_r.strict(),Jee=Wn.extend({requestId:f0.optional(),reason:L().optional()}),h0=Jn.extend({method:ue("notifications/cancelled"),params:Jee}),Kee=ie({src:L(),mimeType:L().optional(),sizes:Be(L()).optional(),theme:Rr(["light","dark"]).optional()}),Af=ie({icons:Be(Kee).optional()}),Pc=ie({name:L(),title:L().optional()}),fM=Pc.extend({...Pc.shape,...Af.shape,version:L(),websiteUrl:L().optional(),description:L().optional()}),Yee=$f(ie({applyDefaults:er().optional()}),Rt(L(),Pt())),Xee=c0(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,$f(ie({form:Yee.optional(),url:gr.optional()}),Rt(L(),Pt()).optional())),Qee=Cr({list:gr.optional(),cancel:gr.optional(),requests:Cr({sampling:Cr({createMessage:gr.optional()}).optional(),elicitation:Cr({create:gr.optional()}).optional()}).optional()}),ete=Cr({list:gr.optional(),cancel:gr.optional(),requests:Cr({tools:Cr({call:gr.optional()}).optional()}).optional()}),tte=ie({experimental:Rt(L(),gr).optional(),sampling:ie({context:gr.optional(),tools:gr.optional()}).optional(),elicitation:Xee.optional(),roots:ie({listChanged:er().optional()}).optional(),tasks:Qee.optional()}),rte=Rn.extend({protocolVersion:L(),capabilities:tte,clientInfo:fM}),m0=yr.extend({method:ue("initialize"),params:rte}),c1=t=>m0.safeParse(t).success,nte=ie({experimental:Rt(L(),gr).optional(),logging:gr.optional(),completions:gr.optional(),prompts:ie({listChanged:er().optional()}).optional(),resources:ie({subscribe:er().optional(),listChanged:er().optional()}).optional(),tools:ie({listChanged:er().optional()}).optional(),tasks:ete.optional()}),ite=_r.extend({protocolVersion:L(),capabilities:nte,serverInfo:fM,instructions:L().optional()}),u1=Jn.extend({method:ue("notifications/initialized"),params:Wn.optional()});var g0=yr.extend({method:ue("ping"),params:Rn.optional()}),ote=ie({progress:ht(),total:Ot(ht()),message:Ot(L())}),ate=ie({...Wn.shape,...ote.shape,progressToken:aM}),y0=Jn.extend({method:ue("notifications/progress"),params:ate}),ste=Rn.extend({cursor:sM.optional()}),kf=yr.extend({params:ste.optional()}),Cf=_r.extend({nextCursor:sM.optional()}),lte=Rr(["working","input_required","completed","failed","cancelled"]),Rf=ie({taskId:L(),status:lte,ttl:bt([ht(),If()]),createdAt:L(),lastUpdatedAt:L(),pollInterval:Ot(ht()),statusMessage:Ot(L())}),kc=_r.extend({task:Rf}),cte=Wn.merge(Rf),Df=Jn.extend({method:ue("notifications/tasks/status"),params:cte}),_0=yr.extend({method:ue("tasks/get"),params:Rn.extend({taskId:L()})}),v0=_r.merge(Rf),b0=yr.extend({method:ue("tasks/result"),params:Rn.extend({taskId:L()})}),lje=_r.loose(),w0=kf.extend({method:ue("tasks/list")}),x0=Cf.extend({tasks:Be(Rf)}),S0=yr.extend({method:ue("tasks/cancel"),params:Rn.extend({taskId:L()})}),pM=_r.merge(Rf),hM=ie({uri:L(),mimeType:Ot(L()),_meta:Rt(L(),Pt()).optional()}),mM=hM.extend({text:L()}),d1=L().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),gM=hM.extend({blob:d1}),Of=Rr(["user","assistant"]),Cc=ie({audience:Be(Of).optional(),priority:ht().min(0).max(1).optional(),lastModified:Ls.datetime({offset:!0}).optional()}),yM=ie({...Pc.shape,...Af.shape,uri:L(),description:Ot(L()),mimeType:Ot(L()),annotations:Cc.optional(),_meta:Ot(Cr({}))}),ute=ie({...Pc.shape,...Af.shape,uriTemplate:L(),description:Ot(L()),mimeType:Ot(L()),annotations:Cc.optional(),_meta:Ot(Cr({}))}),f1=kf.extend({method:ue("resources/list")}),dte=Cf.extend({resources:Be(yM)}),fte=kf.extend({method:ue("resources/templates/list")}),pte=Cf.extend({resourceTemplates:Be(ute)}),p1=Rn.extend({uri:L()}),hte=p1,h1=yr.extend({method:ue("resources/read"),params:hte}),mte=_r.extend({contents:Be(bt([mM,gM]))}),gte=Jn.extend({method:ue("notifications/resources/list_changed"),params:Wn.optional()}),yte=p1,_te=yr.extend({method:ue("resources/subscribe"),params:yte}),vte=p1,bte=yr.extend({method:ue("resources/unsubscribe"),params:vte}),wte=Wn.extend({uri:L()}),xte=Jn.extend({method:ue("notifications/resources/updated"),params:wte}),Ste=ie({name:L(),description:Ot(L()),required:Ot(er())}),Ete=ie({...Pc.shape,...Af.shape,description:Ot(L()),arguments:Ot(Be(Ste)),_meta:Ot(Cr({}))}),Ite=kf.extend({method:ue("prompts/list")}),$te=Cf.extend({prompts:Be(Ete)}),Pte=Rn.extend({name:L(),arguments:Rt(L(),L()).optional()}),Tte=yr.extend({method:ue("prompts/get"),params:Pte}),m1=ie({type:ue("text"),text:L(),annotations:Cc.optional(),_meta:Rt(L(),Pt()).optional()}),g1=ie({type:ue("image"),data:d1,mimeType:L(),annotations:Cc.optional(),_meta:Rt(L(),Pt()).optional()}),y1=ie({type:ue("audio"),data:d1,mimeType:L(),annotations:Cc.optional(),_meta:Rt(L(),Pt()).optional()}),Ate=ie({type:ue("tool_use"),name:L(),id:L(),input:Rt(L(),Pt()),_meta:Rt(L(),Pt()).optional()}),kte=ie({type:ue("resource"),resource:bt([mM,gM]),annotations:Cc.optional(),_meta:Rt(L(),Pt()).optional()}),Cte=yM.extend({type:ue("resource_link")}),_1=bt([m1,g1,y1,Cte,kte]),Rte=ie({role:Of,content:_1}),Dte=_r.extend({description:L().optional(),messages:Be(Rte)}),Ote=Jn.extend({method:ue("notifications/prompts/list_changed"),params:Wn.optional()}),Mte=ie({title:L().optional(),readOnlyHint:er().optional(),destructiveHint:er().optional(),idempotentHint:er().optional(),openWorldHint:er().optional()}),Nte=ie({taskSupport:Rr(["required","optional","forbidden"]).optional()}),_M=ie({...Pc.shape,...Af.shape,description:L().optional(),inputSchema:ie({type:ue("object"),properties:Rt(L(),gr).optional(),required:Be(L()).optional()}).catchall(Pt()),outputSchema:ie({type:ue("object"),properties:Rt(L(),gr).optional(),required:Be(L()).optional()}).catchall(Pt()).optional(),annotations:Mte.optional(),execution:Nte.optional(),_meta:Rt(L(),Pt()).optional()}),v1=kf.extend({method:ue("tools/list")}),jte=Cf.extend({tools:Be(_M)}),E0=_r.extend({content:Be(_1).default([]),structuredContent:Rt(L(),Pt()).optional(),isError:er().optional()}),cje=E0.or(_r.extend({toolResult:Pt()})),zte=Pf.extend({name:L(),arguments:Rt(L(),Pt()).optional()}),Mf=yr.extend({method:ue("tools/call"),params:zte}),Lte=Jn.extend({method:ue("notifications/tools/list_changed"),params:Wn.optional()}),uje=ie({autoRefresh:er().default(!0),debounceMs:ht().int().nonnegative().default(300)}),Nf=Rr(["debug","info","notice","warning","error","critical","alert","emergency"]),Fte=Rn.extend({level:Nf}),jf=yr.extend({method:ue("logging/setLevel"),params:Fte}),Bte=Wn.extend({level:Nf,logger:L().optional(),data:Pt()}),Ute=Jn.extend({method:ue("notifications/message"),params:Bte}),qte=ie({name:L().optional()}),Zte=ie({hints:Be(qte).optional(),costPriority:ht().min(0).max(1).optional(),speedPriority:ht().min(0).max(1).optional(),intelligencePriority:ht().min(0).max(1).optional()}),Hte=ie({mode:Rr(["auto","required","none"]).optional()}),Vte=ie({type:ue("tool_result"),toolUseId:L().describe("The unique identifier for the corresponding tool call."),content:Be(_1).default([]),structuredContent:ie({}).loose().optional(),isError:er().optional(),_meta:Rt(L(),Pt()).optional()}),Gte=a0("type",[m1,g1,y1]),u0=a0("type",[m1,g1,y1,Ate,Vte]),Wte=ie({role:Of,content:bt([u0,Be(u0)]),_meta:Rt(L(),Pt()).optional()}),Jte=Pf.extend({messages:Be(Wte),modelPreferences:Zte.optional(),systemPrompt:L().optional(),includeContext:Rr(["none","thisServer","allServers"]).optional(),temperature:ht().optional(),maxTokens:ht().int(),stopSequences:Be(L()).optional(),metadata:gr.optional(),tools:Be(_M).optional(),toolChoice:Hte.optional()}),Kte=yr.extend({method:ue("sampling/createMessage"),params:Jte}),zf=_r.extend({model:L(),stopReason:Ot(Rr(["endTurn","stopSequence","maxTokens"]).or(L())),role:Of,content:Gte}),b1=_r.extend({model:L(),stopReason:Ot(Rr(["endTurn","stopSequence","maxTokens","toolUse"]).or(L())),role:Of,content:bt([u0,Be(u0)])}),Yte=ie({type:ue("boolean"),title:L().optional(),description:L().optional(),default:er().optional()}),Xte=ie({type:ue("string"),title:L().optional(),description:L().optional(),minLength:ht().optional(),maxLength:ht().optional(),format:Rr(["email","uri","date","date-time"]).optional(),default:L().optional()}),Qte=ie({type:Rr(["number","integer"]),title:L().optional(),description:L().optional(),minimum:ht().optional(),maximum:ht().optional(),default:ht().optional()}),ere=ie({type:ue("string"),title:L().optional(),description:L().optional(),enum:Be(L()),default:L().optional()}),tre=ie({type:ue("string"),title:L().optional(),description:L().optional(),oneOf:Be(ie({const:L(),title:L()})),default:L().optional()}),rre=ie({type:ue("string"),title:L().optional(),description:L().optional(),enum:Be(L()),enumNames:Be(L()).optional(),default:L().optional()}),nre=bt([ere,tre]),ire=ie({type:ue("array"),title:L().optional(),description:L().optional(),minItems:ht().optional(),maxItems:ht().optional(),items:ie({type:ue("string"),enum:Be(L())}),default:Be(L()).optional()}),ore=ie({type:ue("array"),title:L().optional(),description:L().optional(),minItems:ht().optional(),maxItems:ht().optional(),items:ie({anyOf:Be(ie({const:L(),title:L()}))}),default:Be(L()).optional()}),are=bt([ire,ore]),sre=bt([rre,nre,are]),lre=bt([sre,Yte,Xte,Qte]),cre=Pf.extend({mode:ue("form").optional(),message:L(),requestedSchema:ie({type:ue("object"),properties:Rt(L(),lre),required:Be(L()).optional()})}),ure=Pf.extend({mode:ue("url"),message:L(),elicitationId:L(),url:L().url()}),dre=bt([cre,ure]),fre=yr.extend({method:ue("elicitation/create"),params:dre}),pre=Wn.extend({elicitationId:L()}),hre=Jn.extend({method:ue("notifications/elicitation/complete"),params:pre}),Rc=_r.extend({action:Rr(["accept","decline","cancel"]),content:c0(t=>t===null?void 0:t,Rt(L(),bt([L(),ht(),er(),Be(L())])).optional())}),mre=ie({type:ue("ref/resource"),uri:L()});var gre=ie({type:ue("ref/prompt"),name:L()}),yre=Rn.extend({ref:bt([gre,mre]),argument:ie({name:L(),value:L()}),context:ie({arguments:Rt(L(),L()).optional()}).optional()}),_re=yr.extend({method:ue("completion/complete"),params:yre});var vre=_r.extend({completion:Cr({values:Be(L()).max(100),total:Ot(ht().int()),hasMore:Ot(er())})}),bre=ie({uri:L().startsWith("file://"),name:L().optional(),_meta:Rt(L(),Pt()).optional()}),wre=yr.extend({method:ue("roots/list"),params:Rn.optional()}),w1=_r.extend({roots:Be(bre)}),xre=Jn.extend({method:ue("notifications/roots/list_changed"),params:Wn.optional()}),dje=bt([g0,m0,_re,jf,Tte,Ite,f1,fte,h1,_te,bte,Mf,v1,_0,b0,w0,S0]),fje=bt([h0,y0,u1,xre,Df]),pje=bt([p0,zf,b1,Rc,w1,v0,x0,kc]),hje=bt([g0,Kte,fre,wre,_0,b0,w0,S0]),mje=bt([h0,y0,Ute,xte,gte,Lte,Ote,Df,hre]),gje=bt([p0,ite,vre,Dte,$te,dte,pte,mte,E0,jte,v0,x0,kc]),Ee=class t extends Error{constructor(e,r,n){super(`MCP error ${e}: ${r}`),this.code=e,this.data=n,this.name="McpError"}static fromError(e,r,n){if(e===Te.UrlElicitationRequired&&n){let i=n;if(i.elicitations)return new i1(i.elicitations,r)}return new t(e,r,n)}},i1=class extends Ee{constructor(e,r=`URL elicitation${e.length>1?"s":""} required`){super(Te.UrlElicitationRequired,r,{elicitations:e})}get elicitations(){var e;return((e=this.data)==null?void 0:e.elicitations)??[]}};function ba(t){return t==="completed"||t==="failed"||t==="cancelled"}var Sre=Symbol("Let zodToJsonSchema decide on which parser to use");var Kje=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function x1(t){let e=Wg(t),r=e==null?void 0:e.method;if(!r)throw new Error("Schema is missing a method literal");let n=i4(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function S1(t,e){let r=ya(t,e);if(!r.success)throw r.error;return r.data}var Are=6e4,I0=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(h0,r=>{this._oncancel(r)}),this.setNotificationHandler(y0,r=>{this._onprogress(r)}),this.setRequestHandler(g0,r=>({})),this._taskStore=e==null?void 0:e.taskStore,this._taskMessageQueue=e==null?void 0:e.taskMessageQueue,this._taskStore&&(this.setRequestHandler(_0,async(r,n)=>{let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new Ee(Te.InvalidParams,"Failed to retrieve task: Task not found");return{...i}}),this.setRequestHandler(b0,async(r,n)=>{let i=async()=>{var s;let o=r.params.taskId;if(this._taskMessageQueue){let l;for(;l=await this._taskMessageQueue.dequeue(o,n.sessionId);){if(l.type==="response"||l.type==="error"){let c=l.message,u=c.id,d=this._requestResolvers.get(u);if(d)if(this._requestResolvers.delete(u),l.type==="response")d(c);else{let f=c,p=new Ee(f.error.code,f.error.message,f.error.data);d(p)}else{let f=l.type==="response"?"Response":"Error";this._onerror(new Error(`${f} handler missing for request ${u}`))}continue}await((s=this._transport)==null?void 0:s.send(l.message,{relatedRequestId:n.requestId}))}}let a=await this._taskStore.getTask(o,n.sessionId);if(!a)throw new Ee(Te.InvalidParams,`Task not found: ${o}`);if(!ba(a.status))return await this._waitForTaskUpdate(o,n.signal),await i();if(ba(a.status)){let l=await this._taskStore.getTaskResult(o,n.sessionId);return this._clearTaskQueue(o),{...l,_meta:{...l._meta,[_a]:{taskId:o}}}}return await i()};return await i()}),this.setRequestHandler(w0,async(r,n)=>{var i;try{let{tasks:o,nextCursor:a}=await this._taskStore.listTasks((i=r.params)==null?void 0:i.cursor,n.sessionId);return{tasks:o,nextCursor:a,_meta:{}}}catch(o){throw new Ee(Te.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(S0,async(r,n)=>{try{let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new Ee(Te.InvalidParams,`Task not found: ${r.params.taskId}`);if(ba(i.status))throw new Ee(Te.InvalidParams,`Cannot cancel task in terminal status: ${i.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",n.sessionId),this._clearTaskQueue(r.params.taskId);let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new Ee(Te.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...o}}catch(i){throw i instanceof Ee?i:new Ee(Te.InvalidRequest,`Failed to cancel task: ${i instanceof Error?i.message:String(i)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;let r=this._requestHandlerAbortControllers.get(e.params.requestId);r==null||r.abort(e.params.reason)}_setupTimeout(e,r,n,i,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:o,onTimeout:i})}_resetTimeout(e){let r=this._timeoutInfo.get(e);if(!r)return!1;let n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),Ee.fromError(Te.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){let r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var o,a,s;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 r=(o=this.transport)==null?void 0:o.onclose;this._transport.onclose=()=>{r==null||r(),this._onclose()};let n=(a=this.transport)==null?void 0:a.onerror;this._transport.onerror=l=>{n==null||n(l),this._onerror(l)};let i=(s=this._transport)==null?void 0:s.onmessage;this._transport.onmessage=(l,c)=>{i==null||i(l,c),Co(l)||Ac(l)?this._onresponse(l):va(l)?this._onrequest(l,c):dM(l)?this._onnotification(l):this._onerror(new Error(`Unknown message type: ${JSON.stringify(l)}`))},await this._transport.start()}_onclose(){var n;let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let i of this._requestHandlerAbortControllers.values())i.abort();this._requestHandlerAbortControllers.clear();let r=Ee.fromError(Te.ConnectionClosed,"Connection closed");this._transport=void 0,(n=this.onclose)==null||n.call(this);for(let i of e.values())i(r)}_onerror(e){var r;(r=this.onerror)==null||r.call(this,e)}_onnotification(e){let r=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(e)).catch(n=>this._onerror(new Error(`Uncaught error in notification handler: ${n}`)))}_onrequest(e,r){var u,d,f,p;let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,i=this._transport,o=(f=(d=(u=e.params)==null?void 0:u._meta)==null?void 0:d[_a])==null?void 0:f.taskId;if(n===void 0){let h={jsonrpc:"2.0",id:e.id,error:{code:Te.MethodNotFound,message:"Method not found"}};o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:h,timestamp:Date.now()},i==null?void 0:i.sessionId).catch(m=>this._onerror(new Error(`Failed to enqueue error response: ${m}`))):i==null||i.send(h).catch(m=>this._onerror(new Error(`Failed to send an error response: ${m}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let s=lM(e.params)?e.params.task:void 0,l=this._taskStore?this.requestTaskStore(e,i==null?void 0:i.sessionId):void 0,c={signal:a.signal,sessionId:i==null?void 0:i.sessionId,_meta:(p=e.params)==null?void 0:p._meta,sendNotification:async h=>{if(a.signal.aborted)return;let m={relatedRequestId:e.id};o&&(m.relatedTask={taskId:o}),await this.notification(h,m)},sendRequest:async(h,m,y)=>{var E;if(a.signal.aborted)throw new Ee(Te.ConnectionClosed,"Request was cancelled");let g={...y,relatedRequestId:e.id};o&&!g.relatedTask&&(g.relatedTask={taskId:o});let v=((E=g.relatedTask)==null?void 0:E.taskId)??o;return v&&l&&await l.updateTaskStatus(v,"input_required"),await this.request(h,m,g)},authInfo:r==null?void 0:r.authInfo,requestId:e.id,requestInfo:r==null?void 0:r.requestInfo,taskId:o,taskStore:l,taskRequestedTtl:s==null?void 0:s.ttl,closeSSEStream:r==null?void 0:r.closeSSEStream,closeStandaloneSSEStream:r==null?void 0:r.closeStandaloneSSEStream};Promise.resolve().then(()=>{s&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async h=>{if(a.signal.aborted)return;let m={result:h,jsonrpc:"2.0",id:e.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:m,timestamp:Date.now()},i==null?void 0:i.sessionId):await(i==null?void 0:i.send(m))},async h=>{if(a.signal.aborted)return;let m={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(h.code)?h.code:Te.InternalError,message:h.message??"Internal error",...h.data!==void 0&&{data:h.data}}};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"error",message:m,timestamp:Date.now()},i==null?void 0:i.sessionId):await(i==null?void 0:i.send(m))}).catch(h=>this._onerror(new Error(`Failed to send response: ${h}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:r,...n}=e.params,i=Number(r),o=this._progressHandlers.get(i);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(i),s=this._timeoutInfo.get(i);if(s&&a&&s.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(l){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),a(l);return}o(n)}_onresponse(e){let r=Number(e.id),n=this._requestResolvers.get(r);if(n){if(this._requestResolvers.delete(r),Co(e))n(e);else{let a=new Ee(e.error.code,e.error.message,e.error.data);n(a)}return}let i=this._responseHandlers.get(r);if(i===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let o=!1;if(Co(e)&&e.result&&typeof e.result=="object"){let a=e.result;if(a.task&&typeof a.task=="object"){let s=a.task;typeof s.taskId=="string"&&(o=!0,this._taskProgressTokens.set(s.taskId,r))}}if(o||this._progressHandlers.delete(r),Co(e))i(e);else{let a=Ee.fromError(e.error.code,e.error.message,e.error.data);i(a)}}get transport(){return this._transport}async close(){var e;await((e=this._transport)==null?void 0:e.close())}async*requestStream(e,r,n){var a,s;let{task:i}=n??{};if(!i){try{yield{type:"result",result:await this.request(e,r,n)}}catch(l){yield{type:"error",error:l instanceof Ee?l:new Ee(Te.InternalError,String(l))}}return}let o;try{let l=await this.request(e,kc,n);if(l.task)o=l.task.taskId,yield{type:"taskCreated",task:l.task};else throw new Ee(Te.InternalError,"Task creation did not return a task");for(;;){let c=await this.getTask({taskId:o},n);if(yield{type:"taskStatus",task:c},ba(c.status)){c.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},r,n)}:c.status==="failed"?yield{type:"error",error:new Ee(Te.InternalError,`Task ${o} failed`)}:c.status==="cancelled"&&(yield{type:"error",error:new Ee(Te.InternalError,`Task ${o} was cancelled`)});return}if(c.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},r,n)};return}let u=c.pollInterval??((a=this._options)==null?void 0:a.defaultTaskPollInterval)??1e3;await new Promise(d=>setTimeout(d,u)),(s=n==null?void 0:n.signal)==null||s.throwIfAborted()}}catch(l){yield{type:"error",error:l instanceof Ee?l:new Ee(Te.InternalError,String(l))}}}request(e,r,n){let{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a,task:s,relatedTask:l}=n??{};return new Promise((c,u)=>{var v,E,x,w,A;let d=$=>{u($)};if(!this._transport){d(new Error("Not connected"));return}if(((v=this._options)==null?void 0:v.enforceStrictCapabilities)===!0)try{this.assertCapabilityForMethod(e.method),s&&this.assertTaskCapability(e.method)}catch($){d($);return}(E=n==null?void 0:n.signal)==null||E.throwIfAborted();let f=this._requestMessageId++,p={...e,jsonrpc:"2.0",id:f};n!=null&&n.onprogress&&(this._progressHandlers.set(f,n.onprogress),p.params={...e.params,_meta:{...((x=e.params)==null?void 0:x._meta)||{},progressToken:f}}),s&&(p.params={...p.params,task:s}),l&&(p.params={...p.params,_meta:{...((w=p.params)==null?void 0:w._meta)||{},[_a]:l}});let h=$=>{var T;this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),(T=this._transport)==null||T.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String($)}},{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a}).catch(D=>this._onerror(new Error(`Failed to send cancellation: ${D}`)));let R=$ instanceof Ee?$:new Ee(Te.RequestTimeout,String($));u(R)};this._responseHandlers.set(f,$=>{var R;if(!((R=n==null?void 0:n.signal)!=null&&R.aborted)){if($ instanceof Error)return u($);try{let T=ya(r,$.result);T.success?c(T.data):u(T.error)}catch(T){u(T)}}}),(A=n==null?void 0:n.signal)==null||A.addEventListener("abort",()=>{var $;h(($=n==null?void 0:n.signal)==null?void 0:$.reason)});let m=(n==null?void 0:n.timeout)??Are,y=()=>h(Ee.fromError(Te.RequestTimeout,"Request timed out",{timeout:m}));this._setupTimeout(f,m,n==null?void 0:n.maxTotalTimeout,y,(n==null?void 0:n.resetTimeoutOnProgress)??!1);let g=l==null?void 0:l.taskId;if(g){let $=R=>{let T=this._responseHandlers.get(f);T?T(R):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,$),this._enqueueTaskMessage(g,{type:"request",message:p,timestamp:Date.now()}).catch(R=>{this._cleanupTimeout(f),u(R)})}else this._transport.send(p,{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a}).catch($=>{this._cleanupTimeout(f),u($)})})}async getTask(e,r){return this.request({method:"tasks/get",params:e},v0,r)}async getTaskResult(e,r,n){return this.request({method:"tasks/result",params:e},r,n)}async listTasks(e,r){return this.request({method:"tasks/list",params:e},x0,r)}async cancelTask(e,r){return this.request({method:"tasks/cancel",params:e},pM,r)}async notification(e,r){var s,l,c,u;if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let n=(s=r==null?void 0:r.relatedTask)==null?void 0:s.taskId;if(n){let d={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...((l=e.params)==null?void 0:l._meta)||{},[_a]:r.relatedTask}}};await this._enqueueTaskMessage(n,{type:"notification",message:d,timestamp:Date.now()});return}if((((c=this._options)==null?void 0:c.debouncedNotificationMethods)??[]).includes(e.method)&&!e.params&&!(r!=null&&r.relatedRequestId)&&!(r!=null&&r.relatedTask)){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{var f,p;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let d={...e,jsonrpc:"2.0"};r!=null&&r.relatedTask&&(d={...d,params:{...d.params,_meta:{...((f=d.params)==null?void 0:f._meta)||{},[_a]:r.relatedTask}}}),(p=this._transport)==null||p.send(d,r).catch(h=>this._onerror(h))});return}let a={...e,jsonrpc:"2.0"};r!=null&&r.relatedTask&&(a={...a,params:{...a.params,_meta:{...((u=a.params)==null?void 0:u._meta)||{},[_a]:r.relatedTask}}}),await this._transport.send(a,r)}setRequestHandler(e,r){let n=x1(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(i,o)=>{let a=S1(e,i);return Promise.resolve(r(a,o))})}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,r){let n=x1(e);this._notificationHandlers.set(n,i=>{let o=S1(e,i);return Promise.resolve(r(o))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let r=this._taskProgressTokens.get(e);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,r,n){var o;if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let i=(o=this._options)==null?void 0:o.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,r,n,i)}async _clearTaskQueue(e,r){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,r);for(let i of n)if(i.type==="request"&&va(i.message)){let o=i.message.id,a=this._requestResolvers.get(o);a?(a(new Ee(Te.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,r){var i,o;let n=((i=this._options)==null?void 0:i.defaultTaskPollInterval)??1e3;try{let a=await((o=this._taskStore)==null?void 0:o.getTask(e));a!=null&&a.pollInterval&&(n=a.pollInterval)}catch{}return new Promise((a,s)=>{if(r.aborted){s(new Ee(Te.InvalidRequest,"Request cancelled"));return}let l=setTimeout(a,n);r.addEventListener("abort",()=>{clearTimeout(l),s(new Ee(Te.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,r){let n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async i=>{if(!e)throw new Error("No request provided");return await n.createTask(i,e.id,{method:e.method,params:e.params},r)},getTask:async i=>{let o=await n.getTask(i,r);if(!o)throw new Ee(Te.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(i,o,a)=>{await n.storeTaskResult(i,o,a,r);let s=await n.getTask(i,r);if(s){let l=Df.parse({method:"notifications/tasks/status",params:s});await this.notification(l),ba(s.status)&&this._cleanupTaskProgressHandler(i)}},getTaskResult:i=>n.getTaskResult(i,r),updateTaskStatus:async(i,o,a)=>{let s=await n.getTask(i,r);if(!s)throw new Ee(Te.InvalidParams,`Task "${i}" not found - it may have been cleaned up`);if(ba(s.status))throw new Ee(Te.InvalidParams,`Cannot update task "${i}" from terminal status "${s.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(i,o,a,r);let l=await n.getTask(i,r);if(l){let c=Df.parse({method:"notifications/tasks/status",params:l});await this.notification(c),ba(l.status)&&this._cleanupTaskProgressHandler(i)}},listTasks:i=>n.listTasks(i,r)}}};function vM(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function bM(t,e){let r={...t};for(let n in e){let i=n,o=e[i];if(o===void 0)continue;let a=r[i];vM(a)&&vM(o)?r[i]={...a,...o}:r[i]=o}return r}var bL=rc(Vj(),1),wL=rc(vL(),1);function mpe(){let t=new bL.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,wL.default)(t),t}var jy=class{constructor(e){this._ajv=e??mpe()}getValidator(e){let r="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return n=>r(n)?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}};var zy=class{constructor(e){this._server=e}requestStream(e,r,n){return this._server.requestStream(e,r,n)}createMessageStream(e,r){var i;let n=this._server.getClientCapabilities();if((e.tools||e.toolChoice)&&!((i=n==null?void 0:n.sampling)!=null&&i.tools))throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){let o=e.messages[e.messages.length-1],a=Array.isArray(o.content)?o.content:[o.content],s=a.some(d=>d.type==="tool_result"),l=e.messages.length>1?e.messages[e.messages.length-2]:void 0,c=l?Array.isArray(l.content)?l.content:[l.content]:[],u=c.some(d=>d.type==="tool_use");if(s){if(a.some(d=>d.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!u)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(u){let d=new Set(c.filter(p=>p.type==="tool_use").map(p=>p.id)),f=new Set(a.filter(p=>p.type==="tool_result").map(p=>p.toolUseId));if(d.size!==f.size||![...d].every(p=>f.has(p)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:e},zf,r)}elicitInputStream(e,r){var a,s;let n=this._server.getClientCapabilities(),i=e.mode??"form";switch(i){case"url":{if(!((a=n==null?void 0:n.elicitation)!=null&&a.url))throw new Error("Client does not support url elicitation.");break}case"form":{if(!((s=n==null?void 0:n.elicitation)!=null&&s.form))throw new Error("Client does not support form elicitation.");break}}let o=i==="form"&&e.mode===void 0?{...e,mode:"form"}:e;return this.requestStream({method:"elicitation/create",params:o},Rc,r)}async getTask(e,r){return this._server.getTask({taskId:e},r)}async getTaskResult(e,r,n){return this._server.getTaskResult({taskId:e},r,n)}async listTasks(e,r){return this._server.listTasks(e?{cursor:e}:void 0,r)}async cancelTask(e,r){return this._server.cancelTask({taskId:e},r)}};function xL(t,e,r){var n;if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!((n=t.tools)!=null&&n.call))throw new Error(`${r} does not support task creation for tools/call (required for ${e})`);break;default:break}}function SL(t,e,r){var n,i;if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!((n=t.sampling)!=null&&n.createMessage))throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!((i=t.elicitation)!=null&&i.create))throw new Error(`${r} does not support task creation for elicitation/create (required for ${e})`);break;default:break}}var qp=class extends I0{constructor(e,r){super(r),this._serverInfo=e,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Nf.options.map((n,i)=>[n,i])),this.isMessageIgnored=(n,i)=>{let o=this._loggingLevels.get(i);return o?this.LOG_LEVEL_SEVERITY.get(n)<this.LOG_LEVEL_SEVERITY.get(o):!1},this._capabilities=(r==null?void 0:r.capabilities)??{},this._instructions=r==null?void 0:r.instructions,this._jsonSchemaValidator=(r==null?void 0:r.jsonSchemaValidator)??new jy,this.setRequestHandler(m0,n=>this._oninitialize(n)),this.setNotificationHandler(u1,()=>{var n;return(n=this.oninitialized)==null?void 0:n.call(this)}),this._capabilities.logging&&this.setRequestHandler(jf,async(n,i)=>{var l;let o=i.sessionId||((l=i.requestInfo)==null?void 0:l.headers["mcp-session-id"])||void 0,{level:a}=n.params,s=Nf.safeParse(a);return s.success&&this._loggingLevels.set(o,s.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new zy(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=bM(this._capabilities,e)}setRequestHandler(e,r){var s;let n=Wg(e),i=n==null?void 0:n.method;if(!i)throw new Error("Schema is missing a method literal");let o;if(Ic(i)){let l=i,c=(s=l._zod)==null?void 0:s.def;o=(c==null?void 0:c.value)??l.value}else{let l=i,c=l._def;o=(c==null?void 0:c.value)??l.value}if(typeof o!="string")throw new Error("Schema method literal must be a string");if(o==="tools/call"){let l=async(c,u)=>{let d=ya(Mf,c);if(!d.success){let m=d.error instanceof Error?d.error.message:String(d.error);throw new Ee(Te.InvalidParams,`Invalid tools/call request: ${m}`)}let{params:f}=d.data,p=await Promise.resolve(r(c,u));if(f.task){let m=ya(kc,p);if(!m.success){let y=m.error instanceof Error?m.error.message:String(m.error);throw new Ee(Te.InvalidParams,`Invalid task creation result: ${y}`)}return m.data}let h=ya(E0,p);if(!h.success){let m=h.error instanceof Error?h.error.message:String(h.error);throw new Ee(Te.InvalidParams,`Invalid tools/call result: ${m}`)}return h.data};return super.setRequestHandler(e,l)}return super.setRequestHandler(e,r)}assertCapabilityForMethod(e){var r,n,i;switch(e){case"sampling/createMessage":if(!((r=this._clientCapabilities)!=null&&r.sampling))throw new Error(`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!((n=this._clientCapabilities)!=null&&n.elicitation))throw new Error(`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!((i=this._clientCapabilities)!=null&&i.roots))throw new Error(`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){var r,n;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(!((n=(r=this._clientCapabilities)==null?void 0:r.elicitation)!=null&&n.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 r,n;SL((n=(r=this._clientCapabilities)==null?void 0:r.tasks)==null?void 0:n.requests,e,"Client")}assertTaskHandlerCapability(e){var r;this._capabilities&&xL((r=this._capabilities.tasks)==null?void 0:r.requests,e,"Server")}async _oninitialize(e){let r=e.params.protocolVersion;return this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo,{protocolVersion:Tc.includes(r)?r:o1,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"},p0)}async createMessage(e,r){var n,i;if((e.tools||e.toolChoice)&&!((i=(n=this._clientCapabilities)==null?void 0:n.sampling)!=null&&i.tools))throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){let o=e.messages[e.messages.length-1],a=Array.isArray(o.content)?o.content:[o.content],s=a.some(d=>d.type==="tool_result"),l=e.messages.length>1?e.messages[e.messages.length-2]:void 0,c=l?Array.isArray(l.content)?l.content:[l.content]:[],u=c.some(d=>d.type==="tool_use");if(s){if(a.some(d=>d.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!u)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(u){let d=new Set(c.filter(p=>p.type==="tool_use").map(p=>p.id)),f=new Set(a.filter(p=>p.type==="tool_result").map(p=>p.toolUseId));if(d.size!==f.size||![...d].every(p=>f.has(p)))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},b1,r):this.request({method:"sampling/createMessage",params:e},zf,r)}async elicitInput(e,r){var i,o,a,s;switch(e.mode??"form"){case"url":{if(!((o=(i=this._clientCapabilities)==null?void 0:i.elicitation)!=null&&o.url))throw new Error("Client does not support url elicitation.");let l=e;return this.request({method:"elicitation/create",params:l},Rc,r)}case"form":{if(!((s=(a=this._clientCapabilities)==null?void 0:a.elicitation)!=null&&s.form))throw new Error("Client does not support form elicitation.");let l=e.mode==="form"?e:{...e,mode:"form"},c=await this.request({method:"elicitation/create",params:l},Rc,r);if(c.action==="accept"&&c.content&&l.requestedSchema)try{let d=this._jsonSchemaValidator.getValidator(l.requestedSchema)(c.content);if(!d.valid)throw new Ee(Te.InvalidParams,`Elicitation response content does not match requested schema: ${d.errorMessage}`)}catch(u){throw u instanceof Ee?u:new Ee(Te.InternalError,`Error validating elicitation response: ${u instanceof Error?u.message:String(u)}`)}return c}}}createElicitationCompletionNotifier(e,r){var n,i;if(!((i=(n=this._clientCapabilities)==null?void 0:n.elicitation)!=null&&i.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}},r)}async listRoots(e,r){return this.request({method:"roots/list",params:e},w1,r)}async sendLoggingMessage(e,r){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,r))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"})}};import IL from"node:process";var Ly=class{append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
|
|
271
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let u of t.seen.entries()){let d=u[1];if(e===u[0]){o(u);continue}if(t.external){let p=(l=t.external.registry.get(u[0]))==null?void 0:l.id;if(e!==u[0]&&p){o(u);continue}}if((c=t.metadataRegistry.get(u[0]))==null?void 0:c.id){o(u);continue}if(d.cycle){o(u);continue}if(d.count>1&&t.reused==="ref"){o(u);continue}}}function Gg(t,e){var a,s,l;let r=t.seen.get(e);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let n=c=>{let u=t.seen.get(c);if(u.ref===null)return;let d=u.def??u.schema,f={...d},p=u.ref;if(u.ref=null,p){n(p);let m=t.seen.get(p),y=m.schema;if(y.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(y)):Object.assign(d,y),Object.assign(d,f),c._zod.parent===p)for(let v in d)v==="$ref"||v==="allOf"||v in f||delete d[v];if(y.$ref&&m.def)for(let v in d)v==="$ref"||v==="allOf"||v in m.def&&JSON.stringify(d[v])===JSON.stringify(m.def[v])&&delete d[v]}let h=c._zod.parent;if(h&&h!==p){n(h);let m=t.seen.get(h);if(m!=null&&m.schema.$ref&&(d.$ref=m.schema.$ref,m.def))for(let y in d)y==="$ref"||y==="allOf"||y in m.def&&JSON.stringify(d[y])===JSON.stringify(m.def[y])&&delete d[y]}t.override({zodSchema:c,jsonSchema:d,path:u.path??[]})};for(let c of[...t.seen.entries()].reverse())n(c[0]);let i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,(a=t.external)!=null&&a.uri){let c=(s=t.external.registry.get(e))==null?void 0:s.id;if(!c)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(c)}Object.assign(i,r.def??r.schema);let o=((l=t.external)==null?void 0:l.defs)??{};for(let c of t.seen.entries()){let u=c[1];u.def&&u.defId&&(o[u.defId]=u.def)}t.external||Object.keys(o).length>0&&(t.target==="draft-2020-12"?i.$defs=o:i.definitions=o);try{let c=JSON.parse(JSON.stringify(i));return Object.defineProperty(c,"~standard",{value:{...e["~standard"],jsonSchema:{input:wf(e,"input",t.processors),output:wf(e,"output",t.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function en(t,e){let r=e??{seen:new Set};if(r.seen.has(t))return!1;r.seen.add(t);let n=t._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return en(n.element,r);if(n.type==="set")return en(n.valueType,r);if(n.type==="lazy")return en(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return en(n.innerType,r);if(n.type==="intersection")return en(n.left,r)||en(n.right,r);if(n.type==="record"||n.type==="map")return en(n.keyType,r)||en(n.valueType,r);if(n.type==="pipe")return en(n.in,r)||en(n.out,r);if(n.type==="object"){for(let i in n.shape)if(en(n.shape[i],r))return!0;return!1}if(n.type==="union"){for(let i of n.options)if(en(i,r))return!0;return!1}if(n.type==="tuple"){for(let i of n.items)if(en(i,r))return!0;return!!(n.rest&&en(n.rest,r))}return!1}var _2=(t,e={})=>r=>{let n=Hg({...r,processors:e});return Ct(t,n),Vg(n,t),Gg(n,t)},wf=(t,e,r={})=>n=>{let{libraryOptions:i,target:o}=n??{},a=Hg({...i??{},target:o,io:e,processors:r});return Ct(t,a),Vg(a,t),Gg(a,t)};var wQ={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},v2=(t,e,r,n)=>{let i=r;i.type="string";let{minimum:o,maximum:a,format:s,patterns:l,contentEncoding:c}=t._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof a=="number"&&(i.maxLength=a),s&&(i.format=wQ[s]??s,i.format===""&&delete i.format,s==="time"&&delete i.format),c&&(i.contentEncoding=c),l&&l.size>0){let u=[...l];u.length===1?i.pattern=u[0].source:u.length>1&&(i.allOf=[...u.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},b2=(t,e,r,n)=>{let i=r,{minimum:o,maximum:a,format:s,multipleOf:l,exclusiveMaximum:c,exclusiveMinimum:u}=t._zod.bag;typeof s=="string"&&s.includes("int")?i.type="integer":i.type="number",typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof o=="number"&&(i.minimum=o,typeof u=="number"&&e.target!=="draft-04"&&(u>=o?delete i.minimum:delete i.exclusiveMinimum)),typeof c=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c),typeof a=="number"&&(i.maximum=a,typeof c=="number"&&e.target!=="draft-04"&&(c<=a?delete i.maximum:delete i.exclusiveMaximum)),typeof l=="number"&&(i.multipleOf=l)},w2=(t,e,r,n)=>{r.type="boolean"},x2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},S2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},E2=(t,e,r,n)=>{e.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},I2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},$2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},P2=(t,e,r,n)=>{r.not={}},T2=(t,e,r,n)=>{},A2=(t,e,r,n)=>{},k2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},C2=(t,e,r,n)=>{let i=t._zod.def,o=Ud(i.entries);o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},R2=(t,e,r,n)=>{let i=t._zod.def,o=[];for(let a of i.values)if(a===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];r.type=a===null?"null":typeof a,e.target==="draft-04"||e.target==="openapi-3.0"?r.enum=[a]:r.const=a}else o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),o.every(a=>typeof a=="boolean")&&(r.type="boolean"),o.every(a=>a===null)&&(r.type="null"),r.enum=o},D2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},O2=(t,e,r,n)=>{let i=r,o=t._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source},M2=(t,e,r,n)=>{let i=r,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:l}=t._zod.bag;a!==void 0&&(o.minLength=a),s!==void 0&&(o.maxLength=s),l?l.length===1?(o.contentMediaType=l[0],Object.assign(i,o)):(Object.assign(i,o),i.anyOf=l.map(c=>({contentMediaType:c}))):Object.assign(i,o)},N2=(t,e,r,n)=>{r.type="boolean"},j2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},z2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},L2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},F2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},B2=(t,e,r,n)=>{if(e.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},U2=(t,e,r,n)=>{let i=r,o=t._zod.def,{minimum:a,maximum:s}=t._zod.bag;typeof a=="number"&&(i.minItems=a),typeof s=="number"&&(i.maxItems=s),i.type="array",i.items=Ct(o.element,e,{...n,path:[...n.path,"items"]})},q2=(t,e,r,n)=>{var c;let i=r,o=t._zod.def;i.type="object",i.properties={};let a=o.shape;for(let u in a)i.properties[u]=Ct(a[u],e,{...n,path:[...n.path,"properties",u]});let s=new Set(Object.keys(a)),l=new Set([...s].filter(u=>{let d=o.shape[u]._zod;return e.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(i.required=Array.from(l)),((c=o.catchall)==null?void 0:c._zod.def.type)==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=Ct(o.catchall,e,{...n,path:[...n.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)},bE=(t,e,r,n)=>{let i=t._zod.def,o=i.inclusive===!1,a=i.options.map((s,l)=>Ct(s,e,{...n,path:[...n.path,o?"oneOf":"anyOf",l]}));o?r.oneOf=a:r.anyOf=a},Z2=(t,e,r,n)=>{let i=t._zod.def,o=Ct(i.left,e,{...n,path:[...n.path,"allOf",0]}),a=Ct(i.right,e,{...n,path:[...n.path,"allOf",1]}),s=c=>"allOf"in c&&Object.keys(c).length===1,l=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];r.allOf=l},H2=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="array";let a=e.target==="draft-2020-12"?"prefixItems":"items",s=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",l=o.items.map((f,p)=>Ct(f,e,{...n,path:[...n.path,a,p]})),c=o.rest?Ct(o.rest,e,{...n,path:[...n.path,s,...e.target==="openapi-3.0"?[o.items.length]:[]]}):null;e.target==="draft-2020-12"?(i.prefixItems=l,c&&(i.items=c)):e.target==="openapi-3.0"?(i.items={anyOf:l},c&&i.items.anyOf.push(c),i.minItems=l.length,c||(i.maxItems=l.length)):(i.items=l,c&&(i.additionalItems=c));let{minimum:u,maximum:d}=t._zod.bag;typeof u=="number"&&(i.minItems=u),typeof d=="number"&&(i.maxItems=d)},V2=(t,e,r,n)=>{let i=r,o=t._zod.def;i.type="object";let a=o.keyType,s=a._zod.bag,l=s==null?void 0:s.patterns;if(o.mode==="loose"&&l&&l.size>0){let u=Ct(o.valueType,e,{...n,path:[...n.path,"patternProperties","*"]});i.patternProperties={};for(let d of l)i.patternProperties[d.source]=u}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(i.propertyNames=Ct(o.keyType,e,{...n,path:[...n.path,"propertyNames"]})),i.additionalProperties=Ct(o.valueType,e,{...n,path:[...n.path,"additionalProperties"]});let c=a._zod.values;if(c){let u=[...c].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(i.required=u)}},G2=(t,e,r,n)=>{let i=t._zod.def,o=Ct(i.innerType,e,n),a=e.seen.get(t);e.target==="openapi-3.0"?(a.ref=i.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},W2=(t,e,r,n)=>{let i=t._zod.def;Ct(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType},J2=(t,e,r,n)=>{let i=t._zod.def;Ct(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,r.default=JSON.parse(JSON.stringify(i.defaultValue))},K2=(t,e,r,n)=>{let i=t._zod.def;Ct(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,e.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},Y2=(t,e,r,n)=>{let i=t._zod.def;Ct(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType;let a;try{a=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},X2=(t,e,r,n)=>{let i=t._zod.def,o=e.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Ct(o,e,n);let a=e.seen.get(t);a.ref=o},Q2=(t,e,r,n)=>{let i=t._zod.def;Ct(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType,r.readOnly=!0},e4=(t,e,r,n)=>{let i=t._zod.def;Ct(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType},wE=(t,e,r,n)=>{let i=t._zod.def;Ct(i.innerType,e,n);let o=e.seen.get(t);o.ref=i.innerType},t4=(t,e,r,n)=>{let i=t._zod.innerType;Ct(i,e,n);let o=e.seen.get(t);o.ref=i};function Ic(t){return!!t._zod}function ya(t,e){return Ic(t)?bc(t,e):t.safeParse(e)}function Wg(t){var r,n;if(!t)return;let e;if(Ic(t)?e=(n=(r=t._zod)==null?void 0:r.def)==null?void 0:n.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function i4(t){var i;if(Ic(t)){let a=(i=t._zod)==null?void 0:i.def;if(a){if(a.value!==void 0)return a.value;if(Array.isArray(a.values)&&a.values.length>0)return a.values[0]}}let r=t._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}let n=t.value;if(n!==void 0)return n}var xf={};ks(xf,{ZodAny:()=>x4,ZodArray:()=>$4,ZodBase64:()=>HE,ZodBase64URL:()=>VE,ZodBigInt:()=>n0,ZodBigIntFormat:()=>JE,ZodBoolean:()=>r0,ZodCIDRv4:()=>qE,ZodCIDRv6:()=>ZE,ZodCUID:()=>NE,ZodCUID2:()=>jE,ZodCatch:()=>V4,ZodCodec:()=>r1,ZodCustom:()=>l0,ZodCustomStringFormat:()=>Ef,ZodDate:()=>YE,ZodDefault:()=>F4,ZodDiscriminatedUnion:()=>T4,ZodE164:()=>GE,ZodEmail:()=>DE,ZodEmoji:()=>OE,ZodEnum:()=>Sf,ZodExactOptional:()=>j4,ZodFile:()=>M4,ZodFunction:()=>tM,ZodGUID:()=>Kg,ZodIPv4:()=>BE,ZodIPv6:()=>UE,ZodIntersection:()=>A4,ZodJWT:()=>WE,ZodKSUID:()=>FE,ZodLazy:()=>X4,ZodLiteral:()=>O4,ZodMAC:()=>_4,ZodMap:()=>R4,ZodNaN:()=>W4,ZodNanoID:()=>ME,ZodNever:()=>E4,ZodNonOptional:()=>e1,ZodNull:()=>w4,ZodNullable:()=>L4,ZodNumber:()=>t0,ZodNumberFormat:()=>$c,ZodObject:()=>i0,ZodOptional:()=>QE,ZodPipe:()=>t1,ZodPrefault:()=>U4,ZodPromise:()=>eM,ZodReadonly:()=>J4,ZodRecord:()=>s0,ZodSet:()=>D4,ZodString:()=>Qg,ZodStringFormat:()=>$t,ZodSuccess:()=>H4,ZodSymbol:()=>v4,ZodTemplateLiteral:()=>Y4,ZodTransform:()=>N4,ZodTuple:()=>k4,ZodType:()=>Ce,ZodULID:()=>zE,ZodURL:()=>e0,ZodUUID:()=>ko,ZodUndefined:()=>b4,ZodUnion:()=>o0,ZodUnknown:()=>S4,ZodVoid:()=>I4,ZodXID:()=>LE,ZodXor:()=>P4,_ZodString:()=>RE,_default:()=>B4,_function:()=>jee,any:()=>vee,array:()=>Be,base64:()=>ree,base64url:()=>nee,bigint:()=>hee,boolean:()=>er,catch:()=>G4,check:()=>zee,cidrv4:()=>eee,cidrv6:()=>tee,codec:()=>Oee,cuid:()=>VQ,cuid2:()=>GQ,custom:()=>n1,date:()=>wee,describe:()=>Lee,discriminatedUnion:()=>a0,e164:()=>iee,email:()=>NQ,emoji:()=>ZQ,enum:()=>Rr,exactOptional:()=>z4,file:()=>kee,float32:()=>uee,float64:()=>dee,function:()=>jee,guid:()=>jQ,hash:()=>cee,hex:()=>lee,hostname:()=>see,httpUrl:()=>qQ,instanceof:()=>Bee,int:()=>CE,int32:()=>fee,int64:()=>mee,intersection:()=>$f,ipv4:()=>YQ,ipv6:()=>QQ,json:()=>qee,jwt:()=>oee,keyof:()=>xee,ksuid:()=>KQ,lazy:()=>Q4,literal:()=>ue,looseObject:()=>Cr,looseRecord:()=>$ee,mac:()=>XQ,map:()=>Pee,meta:()=>Fee,nan:()=>Dee,nanoid:()=>HQ,nativeEnum:()=>Aee,never:()=>KE,nonoptional:()=>Z4,null:()=>If,nullable:()=>Yg,nullish:()=>Cee,number:()=>ht,object:()=>ie,optional:()=>Ot,partialRecord:()=>Iee,pipe:()=>Xg,prefault:()=>q4,preprocess:()=>c0,promise:()=>Nee,readonly:()=>K4,record:()=>Rt,refine:()=>rM,set:()=>Tee,strictObject:()=>See,string:()=>L,stringFormat:()=>aee,stringbool:()=>Uee,success:()=>Ree,superRefine:()=>nM,symbol:()=>yee,templateLiteral:()=>Mee,transform:()=>XE,tuple:()=>C4,uint32:()=>pee,uint64:()=>gee,ulid:()=>WQ,undefined:()=>_ee,union:()=>bt,unknown:()=>Pt,url:()=>UQ,uuid:()=>zQ,uuidv4:()=>LQ,uuidv6:()=>FQ,uuidv7:()=>BQ,void:()=>bee,xid:()=>JQ,xor:()=>Eee});var Jg={};ks(Jg,{endsWith:()=>mf,gt:()=>To,gte:()=>Qr,includes:()=>pf,length:()=>Sc,lowercase:()=>df,lt:()=>Po,lte:()=>kn,maxLength:()=>xc,maxSize:()=>zs,mime:()=>gf,minLength:()=>ga,minSize:()=>Ao,multipleOf:()=>js,negative:()=>cE,nonnegative:()=>dE,nonpositive:()=>uE,normalize:()=>yf,overwrite:()=>qi,positive:()=>lE,property:()=>fE,regex:()=>uf,size:()=>wc,slugify:()=>Zg,startsWith:()=>hf,toLowerCase:()=>vf,toUpperCase:()=>bf,trim:()=>_f,uppercase:()=>ff});var Ls={};ks(Ls,{ZodISODate:()=>IE,ZodISODateTime:()=>SE,ZodISODuration:()=>AE,ZodISOTime:()=>PE,date:()=>$E,datetime:()=>EE,duration:()=>kE,time:()=>TE});var SE=O("ZodISODateTime",(t,e)=>{jx.init(t,e),$t.init(t,e)});function EE(t){return LS(SE,t)}var IE=O("ZodISODate",(t,e)=>{zx.init(t,e),$t.init(t,e)});function $E(t){return FS(IE,t)}var PE=O("ZodISOTime",(t,e)=>{Lx.init(t,e),$t.init(t,e)});function TE(t){return BS(PE,t)}var AE=O("ZodISODuration",(t,e)=>{Fx.init(t,e),$t.init(t,e)});function kE(t){return US(AE,t)}var o4=(t,e)=>{cg.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:r=>dg(t,r)},flatten:{value:r=>ug(t,r)},addIssue:{value:r=>{t.issues.push(r),t.message=JSON.stringify(t.issues,yc,2)}},addIssues:{value:r=>{t.issues.push(...r),t.message=JSON.stringify(t.issues,yc,2)}},isEmpty:{get(){return t.issues.length===0}}})},DNe=O("ZodError",o4),Cn=O("ZodError",o4,{Parent:Error});var a4=Wd(Cn),s4=Kd(Cn),l4=Xd(Cn),c4=Qd(Cn),u4=vO(Cn),d4=bO(Cn),f4=wO(Cn),p4=xO(Cn),h4=SO(Cn),m4=EO(Cn),g4=IO(Cn),y4=$O(Cn);var Ce=O("ZodType",(t,e)=>(Pe.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:wf(t,"input"),output:wf(t,"output")}}),t.toJSONSchema=_2(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...r)=>t.clone(J.mergeDefs(e,{checks:[...e.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),t.with=t.check,t.clone=(r,n)=>Yr(t,r,n),t.brand=()=>t,t.register=((r,n)=>(r.add(t,n),t)),t.parse=(r,n)=>a4(t,r,n,{callee:t.parse}),t.safeParse=(r,n)=>l4(t,r,n),t.parseAsync=async(r,n)=>s4(t,r,n,{callee:t.parseAsync}),t.safeParseAsync=async(r,n)=>c4(t,r,n),t.spa=t.safeParseAsync,t.encode=(r,n)=>u4(t,r,n),t.decode=(r,n)=>d4(t,r,n),t.encodeAsync=async(r,n)=>f4(t,r,n),t.decodeAsync=async(r,n)=>p4(t,r,n),t.safeEncode=(r,n)=>h4(t,r,n),t.safeDecode=(r,n)=>m4(t,r,n),t.safeEncodeAsync=async(r,n)=>g4(t,r,n),t.safeDecodeAsync=async(r,n)=>y4(t,r,n),t.refine=(r,n)=>t.check(rM(r,n)),t.superRefine=r=>t.check(nM(r)),t.overwrite=r=>t.check(qi(r)),t.optional=()=>Ot(t),t.exactOptional=()=>z4(t),t.nullable=()=>Yg(t),t.nullish=()=>Ot(Yg(t)),t.nonoptional=r=>Z4(t,r),t.array=()=>Be(t),t.or=r=>bt([t,r]),t.and=r=>$f(t,r),t.transform=r=>Xg(t,XE(r)),t.default=r=>B4(t,r),t.prefault=r=>q4(t,r),t.catch=r=>G4(t,r),t.pipe=r=>Xg(t,r),t.readonly=()=>K4(t),t.describe=r=>{let n=t.clone();return Xr.add(n,{description:r}),n},Object.defineProperty(t,"description",{get(){var r;return(r=Xr.get(t))==null?void 0:r.description},configurable:!0}),t.meta=(...r)=>{if(r.length===0)return Xr.get(t);let n=t.clone();return Xr.add(n,r[0]),n},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=r=>r(t),t)),RE=O("_ZodString",(t,e)=>{Ns.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(n,i,o)=>v2(t,n,i,o);let r=t._zod.bag;t.format=r.format??null,t.minLength=r.minimum??null,t.maxLength=r.maximum??null,t.regex=(...n)=>t.check(uf(...n)),t.includes=(...n)=>t.check(pf(...n)),t.startsWith=(...n)=>t.check(hf(...n)),t.endsWith=(...n)=>t.check(mf(...n)),t.min=(...n)=>t.check(ga(...n)),t.max=(...n)=>t.check(xc(...n)),t.length=(...n)=>t.check(Sc(...n)),t.nonempty=(...n)=>t.check(ga(1,...n)),t.lowercase=n=>t.check(df(n)),t.uppercase=n=>t.check(ff(n)),t.trim=()=>t.check(_f()),t.normalize=(...n)=>t.check(yf(...n)),t.toLowerCase=()=>t.check(vf()),t.toUpperCase=()=>t.check(bf()),t.slugify=()=>t.check(Zg())}),Qg=O("ZodString",(t,e)=>{Ns.init(t,e),RE.init(t,e),t.email=r=>t.check(Eg(DE,r)),t.url=r=>t.check(cf(e0,r)),t.jwt=r=>t.check(qg(WE,r)),t.emoji=r=>t.check(Ag(OE,r)),t.guid=r=>t.check(lf(Kg,r)),t.uuid=r=>t.check(Ig(ko,r)),t.uuidv4=r=>t.check($g(ko,r)),t.uuidv6=r=>t.check(Pg(ko,r)),t.uuidv7=r=>t.check(Tg(ko,r)),t.nanoid=r=>t.check(kg(ME,r)),t.guid=r=>t.check(lf(Kg,r)),t.cuid=r=>t.check(Cg(NE,r)),t.cuid2=r=>t.check(Rg(jE,r)),t.ulid=r=>t.check(Dg(zE,r)),t.base64=r=>t.check(Fg(HE,r)),t.base64url=r=>t.check(Bg(VE,r)),t.xid=r=>t.check(Og(LE,r)),t.ksuid=r=>t.check(Mg(FE,r)),t.ipv4=r=>t.check(Ng(BE,r)),t.ipv6=r=>t.check(jg(UE,r)),t.cidrv4=r=>t.check(zg(qE,r)),t.cidrv6=r=>t.check(Lg(ZE,r)),t.e164=r=>t.check(Ug(GE,r)),t.datetime=r=>t.check(EE(r)),t.date=r=>t.check($E(r)),t.time=r=>t.check(TE(r)),t.duration=r=>t.check(kE(r))});function L(t){return jS(Qg,t)}var $t=O("ZodStringFormat",(t,e)=>{vt.init(t,e),RE.init(t,e)}),DE=O("ZodEmail",(t,e)=>{Tx.init(t,e),$t.init(t,e)});function NQ(t){return Eg(DE,t)}var Kg=O("ZodGUID",(t,e)=>{$x.init(t,e),$t.init(t,e)});function jQ(t){return lf(Kg,t)}var ko=O("ZodUUID",(t,e)=>{Px.init(t,e),$t.init(t,e)});function zQ(t){return Ig(ko,t)}function LQ(t){return $g(ko,t)}function FQ(t){return Pg(ko,t)}function BQ(t){return Tg(ko,t)}var e0=O("ZodURL",(t,e)=>{Ax.init(t,e),$t.init(t,e)});function UQ(t){return cf(e0,t)}function qQ(t){return cf(e0,{protocol:/^https?$/,hostname:Gn.domain,...J.normalizeParams(t)})}var OE=O("ZodEmoji",(t,e)=>{kx.init(t,e),$t.init(t,e)});function ZQ(t){return Ag(OE,t)}var ME=O("ZodNanoID",(t,e)=>{Cx.init(t,e),$t.init(t,e)});function HQ(t){return kg(ME,t)}var NE=O("ZodCUID",(t,e)=>{Rx.init(t,e),$t.init(t,e)});function VQ(t){return Cg(NE,t)}var jE=O("ZodCUID2",(t,e)=>{Dx.init(t,e),$t.init(t,e)});function GQ(t){return Rg(jE,t)}var zE=O("ZodULID",(t,e)=>{Ox.init(t,e),$t.init(t,e)});function WQ(t){return Dg(zE,t)}var LE=O("ZodXID",(t,e)=>{Mx.init(t,e),$t.init(t,e)});function JQ(t){return Og(LE,t)}var FE=O("ZodKSUID",(t,e)=>{Nx.init(t,e),$t.init(t,e)});function KQ(t){return Mg(FE,t)}var BE=O("ZodIPv4",(t,e)=>{Bx.init(t,e),$t.init(t,e)});function YQ(t){return Ng(BE,t)}var _4=O("ZodMAC",(t,e)=>{qx.init(t,e),$t.init(t,e)});function XQ(t){return zS(_4,t)}var UE=O("ZodIPv6",(t,e)=>{Ux.init(t,e),$t.init(t,e)});function QQ(t){return jg(UE,t)}var qE=O("ZodCIDRv4",(t,e)=>{Zx.init(t,e),$t.init(t,e)});function eee(t){return zg(qE,t)}var ZE=O("ZodCIDRv6",(t,e)=>{Hx.init(t,e),$t.init(t,e)});function tee(t){return Lg(ZE,t)}var HE=O("ZodBase64",(t,e)=>{Vx.init(t,e),$t.init(t,e)});function ree(t){return Fg(HE,t)}var VE=O("ZodBase64URL",(t,e)=>{Gx.init(t,e),$t.init(t,e)});function nee(t){return Bg(VE,t)}var GE=O("ZodE164",(t,e)=>{Wx.init(t,e),$t.init(t,e)});function iee(t){return Ug(GE,t)}var WE=O("ZodJWT",(t,e)=>{Jx.init(t,e),$t.init(t,e)});function oee(t){return qg(WE,t)}var Ef=O("ZodCustomStringFormat",(t,e)=>{Kx.init(t,e),$t.init(t,e)});function aee(t,e,r={}){return Ec(Ef,t,e,r)}function see(t){return Ec(Ef,"hostname",Gn.hostname,t)}function lee(t){return Ec(Ef,"hex",Gn.hex,t)}function cee(t,e){let r=(e==null?void 0:e.enc)??"hex",n=`${t}_${r}`,i=Gn[n];if(!i)throw new Error(`Unrecognized hash format: ${n}`);return Ec(Ef,n,i,e)}var t0=O("ZodNumber",(t,e)=>{bg.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(n,i,o)=>b2(t,n,i,o),t.gt=(n,i)=>t.check(To(n,i)),t.gte=(n,i)=>t.check(Qr(n,i)),t.min=(n,i)=>t.check(Qr(n,i)),t.lt=(n,i)=>t.check(Po(n,i)),t.lte=(n,i)=>t.check(kn(n,i)),t.max=(n,i)=>t.check(kn(n,i)),t.int=n=>t.check(CE(n)),t.safe=n=>t.check(CE(n)),t.positive=n=>t.check(To(0,n)),t.nonnegative=n=>t.check(Qr(0,n)),t.negative=n=>t.check(Po(0,n)),t.nonpositive=n=>t.check(kn(0,n)),t.multipleOf=(n,i)=>t.check(js(n,i)),t.step=(n,i)=>t.check(js(n,i)),t.finite=()=>t;let r=t._zod.bag;t.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),t.isFinite=!0,t.format=r.format??null});function ht(t){return qS(t0,t)}var $c=O("ZodNumberFormat",(t,e)=>{Yx.init(t,e),t0.init(t,e)});function CE(t){return ZS($c,t)}function uee(t){return HS($c,t)}function dee(t){return VS($c,t)}function fee(t){return GS($c,t)}function pee(t){return WS($c,t)}var r0=O("ZodBoolean",(t,e)=>{of.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>w2(t,r,n,i)});function er(t){return JS(r0,t)}var n0=O("ZodBigInt",(t,e)=>{wg.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(n,i,o)=>x2(t,n,i,o),t.gte=(n,i)=>t.check(Qr(n,i)),t.min=(n,i)=>t.check(Qr(n,i)),t.gt=(n,i)=>t.check(To(n,i)),t.gte=(n,i)=>t.check(Qr(n,i)),t.min=(n,i)=>t.check(Qr(n,i)),t.lt=(n,i)=>t.check(Po(n,i)),t.lte=(n,i)=>t.check(kn(n,i)),t.max=(n,i)=>t.check(kn(n,i)),t.positive=n=>t.check(To(BigInt(0),n)),t.negative=n=>t.check(Po(BigInt(0),n)),t.nonpositive=n=>t.check(kn(BigInt(0),n)),t.nonnegative=n=>t.check(Qr(BigInt(0),n)),t.multipleOf=(n,i)=>t.check(js(n,i));let r=t._zod.bag;t.minValue=r.minimum??null,t.maxValue=r.maximum??null,t.format=r.format??null});function hee(t){return KS(n0,t)}var JE=O("ZodBigIntFormat",(t,e)=>{Xx.init(t,e),n0.init(t,e)});function mee(t){return YS(JE,t)}function gee(t){return XS(JE,t)}var v4=O("ZodSymbol",(t,e)=>{Qx.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>S2(t,r,n,i)});function yee(t){return QS(v4,t)}var b4=O("ZodUndefined",(t,e)=>{eS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>I2(t,r,n,i)});function _ee(t){return eE(b4,t)}var w4=O("ZodNull",(t,e)=>{tS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>E2(t,r,n,i)});function If(t){return tE(w4,t)}var x4=O("ZodAny",(t,e)=>{rS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>T2(t,r,n,i)});function vee(){return rE(x4)}var S4=O("ZodUnknown",(t,e)=>{nS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>A2(t,r,n,i)});function Pt(){return nE(S4)}var E4=O("ZodNever",(t,e)=>{iS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>P2(t,r,n,i)});function KE(t){return iE(E4,t)}var I4=O("ZodVoid",(t,e)=>{oS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>$2(t,r,n,i)});function bee(t){return oE(I4,t)}var YE=O("ZodDate",(t,e)=>{aS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(n,i,o)=>k2(t,n,i,o),t.min=(n,i)=>t.check(Qr(n,i)),t.max=(n,i)=>t.check(kn(n,i));let r=t._zod.bag;t.minDate=r.minimum?new Date(r.minimum):null,t.maxDate=r.maximum?new Date(r.maximum):null});function wee(t){return aE(YE,t)}var $4=O("ZodArray",(t,e)=>{sS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>U2(t,r,n,i),t.element=e.element,t.min=(r,n)=>t.check(ga(r,n)),t.nonempty=r=>t.check(ga(1,r)),t.max=(r,n)=>t.check(xc(r,n)),t.length=(r,n)=>t.check(Sc(r,n)),t.unwrap=()=>t.element});function Be(t,e){return y2($4,t,e)}function xee(t){let e=t._zod.def.shape;return Rr(Object.keys(e))}var i0=O("ZodObject",(t,e)=>{p2.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>q2(t,r,n,i),J.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>Rr(Object.keys(t._zod.def.shape)),t.catchall=r=>t.clone({...t._zod.def,catchall:r}),t.passthrough=()=>t.clone({...t._zod.def,catchall:Pt()}),t.loose=()=>t.clone({...t._zod.def,catchall:Pt()}),t.strict=()=>t.clone({...t._zod.def,catchall:KE()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=r=>J.extend(t,r),t.safeExtend=r=>J.safeExtend(t,r),t.merge=r=>J.merge(t,r),t.pick=r=>J.pick(t,r),t.omit=r=>J.omit(t,r),t.partial=(...r)=>J.partial(QE,t,r[0]),t.required=(...r)=>J.required(e1,t,r[0])});function ie(t,e){let r={type:"object",shape:t??{},...J.normalizeParams(e)};return new i0(r)}function See(t,e){return new i0({type:"object",shape:t,catchall:KE(),...J.normalizeParams(e)})}function Cr(t,e){return new i0({type:"object",shape:t,catchall:Pt(),...J.normalizeParams(e)})}var o0=O("ZodUnion",(t,e)=>{af.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>bE(t,r,n,i),t.options=e.options});function bt(t,e){return new o0({type:"union",options:t,...J.normalizeParams(e)})}var P4=O("ZodXor",(t,e)=>{o0.init(t,e),lS.init(t,e),t._zod.processJSONSchema=(r,n,i)=>bE(t,r,n,i),t.options=e.options});function Eee(t,e){return new P4({type:"union",options:t,inclusive:!1,...J.normalizeParams(e)})}var T4=O("ZodDiscriminatedUnion",(t,e)=>{o0.init(t,e),cS.init(t,e)});function a0(t,e,r){return new T4({type:"union",options:e,discriminator:t,...J.normalizeParams(r)})}var A4=O("ZodIntersection",(t,e)=>{uS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Z2(t,r,n,i)});function $f(t,e){return new A4({type:"intersection",left:t,right:e})}var k4=O("ZodTuple",(t,e)=>{xg.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>H2(t,r,n,i),t.rest=r=>t.clone({...t._zod.def,rest:r})});function C4(t,e,r){let n=e instanceof Pe,i=n?r:e,o=n?e:null;return new k4({type:"tuple",items:t,rest:o,...J.normalizeParams(i)})}var s0=O("ZodRecord",(t,e)=>{dS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>V2(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType});function Rt(t,e,r){return new s0({type:"record",keyType:t,valueType:e,...J.normalizeParams(r)})}function Iee(t,e,r){let n=Yr(t);return n._zod.values=void 0,new s0({type:"record",keyType:n,valueType:e,...J.normalizeParams(r)})}function $ee(t,e,r){return new s0({type:"record",keyType:t,valueType:e,mode:"loose",...J.normalizeParams(r)})}var R4=O("ZodMap",(t,e)=>{fS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>F2(t,r,n,i),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...r)=>t.check(Ao(...r)),t.nonempty=r=>t.check(Ao(1,r)),t.max=(...r)=>t.check(zs(...r)),t.size=(...r)=>t.check(wc(...r))});function Pee(t,e,r){return new R4({type:"map",keyType:t,valueType:e,...J.normalizeParams(r)})}var D4=O("ZodSet",(t,e)=>{pS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>B2(t,r,n,i),t.min=(...r)=>t.check(Ao(...r)),t.nonempty=r=>t.check(Ao(1,r)),t.max=(...r)=>t.check(zs(...r)),t.size=(...r)=>t.check(wc(...r))});function Tee(t,e){return new D4({type:"set",valueType:t,...J.normalizeParams(e)})}var Sf=O("ZodEnum",(t,e)=>{hS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(n,i,o)=>C2(t,n,i,o),t.enum=e.entries,t.options=Object.values(e.entries);let r=new Set(Object.keys(e.entries));t.extract=(n,i)=>{let o={};for(let a of n)if(r.has(a))o[a]=e.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Sf({...e,checks:[],...J.normalizeParams(i),entries:o})},t.exclude=(n,i)=>{let o={...e.entries};for(let a of n)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new Sf({...e,checks:[],...J.normalizeParams(i),entries:o})}});function Rr(t,e){let r=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new Sf({type:"enum",entries:r,...J.normalizeParams(e)})}function Aee(t,e){return new Sf({type:"enum",entries:t,...J.normalizeParams(e)})}var O4=O("ZodLiteral",(t,e)=>{mS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>R2(t,r,n,i),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 ue(t,e){return new O4({type:"literal",values:Array.isArray(t)?t:[t],...J.normalizeParams(e)})}var M4=O("ZodFile",(t,e)=>{gS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>M2(t,r,n,i),t.min=(r,n)=>t.check(Ao(r,n)),t.max=(r,n)=>t.check(zs(r,n)),t.mime=(r,n)=>t.check(gf(Array.isArray(r)?r:[r],n))});function kee(t){return pE(M4,t)}var N4=O("ZodTransform",(t,e)=>{yS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>L2(t,r,n,i),t._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ds(t.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(J.issue(o,r.value,e));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=t),r.issues.push(J.issue(a))}};let i=e.transform(r.value,r);return i instanceof Promise?i.then(o=>(r.value=o,r)):(r.value=i,r)}});function XE(t){return new N4({type:"transform",transform:t})}var QE=O("ZodOptional",(t,e)=>{Sg.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>wE(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Ot(t){return new QE({type:"optional",innerType:t})}var j4=O("ZodExactOptional",(t,e)=>{_S.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>wE(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function z4(t){return new j4({type:"optional",innerType:t})}var L4=O("ZodNullable",(t,e)=>{vS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>G2(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Yg(t){return new L4({type:"nullable",innerType:t})}function Cee(t){return Ot(Yg(t))}var F4=O("ZodDefault",(t,e)=>{bS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>J2(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function B4(t,e){return new F4({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():J.shallowClone(e)}})}var U4=O("ZodPrefault",(t,e)=>{wS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>K2(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function q4(t,e){return new U4({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():J.shallowClone(e)}})}var e1=O("ZodNonOptional",(t,e)=>{xS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>W2(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Z4(t,e){return new e1({type:"nonoptional",innerType:t,...J.normalizeParams(e)})}var H4=O("ZodSuccess",(t,e)=>{SS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>N2(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Ree(t){return new H4({type:"success",innerType:t})}var V4=O("ZodCatch",(t,e)=>{ES.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Y2(t,r,n,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function G4(t,e){return new V4({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var W4=O("ZodNaN",(t,e)=>{IS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>D2(t,r,n,i)});function Dee(t){return sE(W4,t)}var t1=O("ZodPipe",(t,e)=>{$S.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>X2(t,r,n,i),t.in=e.in,t.out=e.out});function Xg(t,e){return new t1({type:"pipe",in:t,out:e})}var r1=O("ZodCodec",(t,e)=>{t1.init(t,e),sf.init(t,e)});function Oee(t,e,r){return new r1({type:"pipe",in:t,out:e,transform:r.decode,reverseTransform:r.encode})}var J4=O("ZodReadonly",(t,e)=>{PS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>Q2(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function K4(t){return new J4({type:"readonly",innerType:t})}var Y4=O("ZodTemplateLiteral",(t,e)=>{TS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>O2(t,r,n,i)});function Mee(t,e){return new Y4({type:"template_literal",parts:t,...J.normalizeParams(e)})}var X4=O("ZodLazy",(t,e)=>{CS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>t4(t,r,n,i),t.unwrap=()=>t._zod.def.getter()});function Q4(t){return new X4({type:"lazy",getter:t})}var eM=O("ZodPromise",(t,e)=>{kS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>e4(t,r,n,i),t.unwrap=()=>t._zod.def.innerType});function Nee(t){return new eM({type:"promise",innerType:t})}var tM=O("ZodFunction",(t,e)=>{AS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>z2(t,r,n,i)});function jee(t){return new tM({type:"function",input:Array.isArray(t==null?void 0:t.input)?C4(t==null?void 0:t.input):(t==null?void 0:t.input)??Be(Pt()),output:(t==null?void 0:t.output)??Pt()})}var l0=O("ZodCustom",(t,e)=>{RS.init(t,e),Ce.init(t,e),t._zod.processJSONSchema=(r,n,i)=>j2(t,r,n,i)});function zee(t){let e=new It({check:"custom"});return e._zod.check=t,e}function n1(t,e){return hE(l0,t??(()=>!0),e)}function rM(t,e={}){return mE(l0,t,e)}function nM(t){return gE(t)}var Lee=yE,Fee=_E;function Bee(t,e={}){let r=new l0({type:"custom",check:"custom",fn:n=>n instanceof t,abort:!0,...J.normalizeParams(e)});return r._zod.bag.Class=t,r._zod.check=n=>{n.value instanceof t||n.issues.push({code:"invalid_type",expected:t.name,input:n.value,inst:r,path:[...r._zod.def.path??[]]})},r}var Uee=(...t)=>vE({Codec:r1,Boolean:r0,String:Qg},...t);function qee(t){let e=Q4(()=>bt([L(t),ht(),er(),If(),Be(e),Rt(L(),e)]));return e}function c0(t,e){return Xg(XE(t),e)}var iM;iM||(iM={});var BNe={...xf,...Jg,iso:Ls};ir(DS());var o1="2025-11-25",oM="2025-03-26",Tc=[o1,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],_a="io.modelcontextprotocol/related-task",d0="2.0",gr=n1(t=>t!==null&&(typeof t=="object"||typeof t=="function")),aM=bt([L(),ht().int()]),sM=L(),aje=Cr({ttl:bt([ht(),If()]).optional(),pollInterval:ht().optional()}),Gee=ie({ttl:ht().optional()}),Wee=ie({taskId:L()}),a1=Cr({progressToken:aM.optional(),[_a]:Wee.optional()}),Rn=ie({_meta:a1.optional()}),Pf=Rn.extend({task:Gee.optional()}),lM=t=>Pf.safeParse(t).success,yr=ie({method:L(),params:Rn.loose().optional()}),Wn=ie({_meta:a1.optional()}),Jn=ie({method:L(),params:Wn.loose().optional()}),_r=Cr({_meta:a1.optional()}),f0=bt([L(),ht().int()]),cM=ie({jsonrpc:ue(d0),id:f0,...yr.shape}).strict(),va=t=>cM.safeParse(t).success,uM=ie({jsonrpc:ue(d0),...Jn.shape}).strict(),dM=t=>uM.safeParse(t).success,s1=ie({jsonrpc:ue(d0),id:f0,result:_r}).strict(),Co=t=>s1.safeParse(t).success;var Te;(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"})(Te||(Te={}));var l1=ie({jsonrpc:ue(d0),id:f0.optional(),error:ie({code:ht().int(),message:L(),data:Pt().optional()})}).strict();var Ac=t=>l1.safeParse(t).success;var Tf=bt([cM,uM,s1,l1]),sje=bt([s1,l1]),p0=_r.strict(),Jee=Wn.extend({requestId:f0.optional(),reason:L().optional()}),h0=Jn.extend({method:ue("notifications/cancelled"),params:Jee}),Kee=ie({src:L(),mimeType:L().optional(),sizes:Be(L()).optional(),theme:Rr(["light","dark"]).optional()}),Af=ie({icons:Be(Kee).optional()}),Pc=ie({name:L(),title:L().optional()}),fM=Pc.extend({...Pc.shape,...Af.shape,version:L(),websiteUrl:L().optional(),description:L().optional()}),Yee=$f(ie({applyDefaults:er().optional()}),Rt(L(),Pt())),Xee=c0(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,$f(ie({form:Yee.optional(),url:gr.optional()}),Rt(L(),Pt()).optional())),Qee=Cr({list:gr.optional(),cancel:gr.optional(),requests:Cr({sampling:Cr({createMessage:gr.optional()}).optional(),elicitation:Cr({create:gr.optional()}).optional()}).optional()}),ete=Cr({list:gr.optional(),cancel:gr.optional(),requests:Cr({tools:Cr({call:gr.optional()}).optional()}).optional()}),tte=ie({experimental:Rt(L(),gr).optional(),sampling:ie({context:gr.optional(),tools:gr.optional()}).optional(),elicitation:Xee.optional(),roots:ie({listChanged:er().optional()}).optional(),tasks:Qee.optional()}),rte=Rn.extend({protocolVersion:L(),capabilities:tte,clientInfo:fM}),m0=yr.extend({method:ue("initialize"),params:rte}),c1=t=>m0.safeParse(t).success,nte=ie({experimental:Rt(L(),gr).optional(),logging:gr.optional(),completions:gr.optional(),prompts:ie({listChanged:er().optional()}).optional(),resources:ie({subscribe:er().optional(),listChanged:er().optional()}).optional(),tools:ie({listChanged:er().optional()}).optional(),tasks:ete.optional()}),ite=_r.extend({protocolVersion:L(),capabilities:nte,serverInfo:fM,instructions:L().optional()}),u1=Jn.extend({method:ue("notifications/initialized"),params:Wn.optional()});var g0=yr.extend({method:ue("ping"),params:Rn.optional()}),ote=ie({progress:ht(),total:Ot(ht()),message:Ot(L())}),ate=ie({...Wn.shape,...ote.shape,progressToken:aM}),y0=Jn.extend({method:ue("notifications/progress"),params:ate}),ste=Rn.extend({cursor:sM.optional()}),kf=yr.extend({params:ste.optional()}),Cf=_r.extend({nextCursor:sM.optional()}),lte=Rr(["working","input_required","completed","failed","cancelled"]),Rf=ie({taskId:L(),status:lte,ttl:bt([ht(),If()]),createdAt:L(),lastUpdatedAt:L(),pollInterval:Ot(ht()),statusMessage:Ot(L())}),kc=_r.extend({task:Rf}),cte=Wn.merge(Rf),Df=Jn.extend({method:ue("notifications/tasks/status"),params:cte}),_0=yr.extend({method:ue("tasks/get"),params:Rn.extend({taskId:L()})}),v0=_r.merge(Rf),b0=yr.extend({method:ue("tasks/result"),params:Rn.extend({taskId:L()})}),lje=_r.loose(),w0=kf.extend({method:ue("tasks/list")}),x0=Cf.extend({tasks:Be(Rf)}),S0=yr.extend({method:ue("tasks/cancel"),params:Rn.extend({taskId:L()})}),pM=_r.merge(Rf),hM=ie({uri:L(),mimeType:Ot(L()),_meta:Rt(L(),Pt()).optional()}),mM=hM.extend({text:L()}),d1=L().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),gM=hM.extend({blob:d1}),Of=Rr(["user","assistant"]),Cc=ie({audience:Be(Of).optional(),priority:ht().min(0).max(1).optional(),lastModified:Ls.datetime({offset:!0}).optional()}),yM=ie({...Pc.shape,...Af.shape,uri:L(),description:Ot(L()),mimeType:Ot(L()),annotations:Cc.optional(),_meta:Ot(Cr({}))}),ute=ie({...Pc.shape,...Af.shape,uriTemplate:L(),description:Ot(L()),mimeType:Ot(L()),annotations:Cc.optional(),_meta:Ot(Cr({}))}),f1=kf.extend({method:ue("resources/list")}),dte=Cf.extend({resources:Be(yM)}),fte=kf.extend({method:ue("resources/templates/list")}),pte=Cf.extend({resourceTemplates:Be(ute)}),p1=Rn.extend({uri:L()}),hte=p1,h1=yr.extend({method:ue("resources/read"),params:hte}),mte=_r.extend({contents:Be(bt([mM,gM]))}),gte=Jn.extend({method:ue("notifications/resources/list_changed"),params:Wn.optional()}),yte=p1,_te=yr.extend({method:ue("resources/subscribe"),params:yte}),vte=p1,bte=yr.extend({method:ue("resources/unsubscribe"),params:vte}),wte=Wn.extend({uri:L()}),xte=Jn.extend({method:ue("notifications/resources/updated"),params:wte}),Ste=ie({name:L(),description:Ot(L()),required:Ot(er())}),Ete=ie({...Pc.shape,...Af.shape,description:Ot(L()),arguments:Ot(Be(Ste)),_meta:Ot(Cr({}))}),Ite=kf.extend({method:ue("prompts/list")}),$te=Cf.extend({prompts:Be(Ete)}),Pte=Rn.extend({name:L(),arguments:Rt(L(),L()).optional()}),Tte=yr.extend({method:ue("prompts/get"),params:Pte}),m1=ie({type:ue("text"),text:L(),annotations:Cc.optional(),_meta:Rt(L(),Pt()).optional()}),g1=ie({type:ue("image"),data:d1,mimeType:L(),annotations:Cc.optional(),_meta:Rt(L(),Pt()).optional()}),y1=ie({type:ue("audio"),data:d1,mimeType:L(),annotations:Cc.optional(),_meta:Rt(L(),Pt()).optional()}),Ate=ie({type:ue("tool_use"),name:L(),id:L(),input:Rt(L(),Pt()),_meta:Rt(L(),Pt()).optional()}),kte=ie({type:ue("resource"),resource:bt([mM,gM]),annotations:Cc.optional(),_meta:Rt(L(),Pt()).optional()}),Cte=yM.extend({type:ue("resource_link")}),_1=bt([m1,g1,y1,Cte,kte]),Rte=ie({role:Of,content:_1}),Dte=_r.extend({description:L().optional(),messages:Be(Rte)}),Ote=Jn.extend({method:ue("notifications/prompts/list_changed"),params:Wn.optional()}),Mte=ie({title:L().optional(),readOnlyHint:er().optional(),destructiveHint:er().optional(),idempotentHint:er().optional(),openWorldHint:er().optional()}),Nte=ie({taskSupport:Rr(["required","optional","forbidden"]).optional()}),_M=ie({...Pc.shape,...Af.shape,description:L().optional(),inputSchema:ie({type:ue("object"),properties:Rt(L(),gr).optional(),required:Be(L()).optional()}).catchall(Pt()),outputSchema:ie({type:ue("object"),properties:Rt(L(),gr).optional(),required:Be(L()).optional()}).catchall(Pt()).optional(),annotations:Mte.optional(),execution:Nte.optional(),_meta:Rt(L(),Pt()).optional()}),v1=kf.extend({method:ue("tools/list")}),jte=Cf.extend({tools:Be(_M)}),E0=_r.extend({content:Be(_1).default([]),structuredContent:Rt(L(),Pt()).optional(),isError:er().optional()}),cje=E0.or(_r.extend({toolResult:Pt()})),zte=Pf.extend({name:L(),arguments:Rt(L(),Pt()).optional()}),Mf=yr.extend({method:ue("tools/call"),params:zte}),Lte=Jn.extend({method:ue("notifications/tools/list_changed"),params:Wn.optional()}),uje=ie({autoRefresh:er().default(!0),debounceMs:ht().int().nonnegative().default(300)}),Nf=Rr(["debug","info","notice","warning","error","critical","alert","emergency"]),Fte=Rn.extend({level:Nf}),jf=yr.extend({method:ue("logging/setLevel"),params:Fte}),Bte=Wn.extend({level:Nf,logger:L().optional(),data:Pt()}),Ute=Jn.extend({method:ue("notifications/message"),params:Bte}),qte=ie({name:L().optional()}),Zte=ie({hints:Be(qte).optional(),costPriority:ht().min(0).max(1).optional(),speedPriority:ht().min(0).max(1).optional(),intelligencePriority:ht().min(0).max(1).optional()}),Hte=ie({mode:Rr(["auto","required","none"]).optional()}),Vte=ie({type:ue("tool_result"),toolUseId:L().describe("The unique identifier for the corresponding tool call."),content:Be(_1).default([]),structuredContent:ie({}).loose().optional(),isError:er().optional(),_meta:Rt(L(),Pt()).optional()}),Gte=a0("type",[m1,g1,y1]),u0=a0("type",[m1,g1,y1,Ate,Vte]),Wte=ie({role:Of,content:bt([u0,Be(u0)]),_meta:Rt(L(),Pt()).optional()}),Jte=Pf.extend({messages:Be(Wte),modelPreferences:Zte.optional(),systemPrompt:L().optional(),includeContext:Rr(["none","thisServer","allServers"]).optional(),temperature:ht().optional(),maxTokens:ht().int(),stopSequences:Be(L()).optional(),metadata:gr.optional(),tools:Be(_M).optional(),toolChoice:Hte.optional()}),Kte=yr.extend({method:ue("sampling/createMessage"),params:Jte}),zf=_r.extend({model:L(),stopReason:Ot(Rr(["endTurn","stopSequence","maxTokens"]).or(L())),role:Of,content:Gte}),b1=_r.extend({model:L(),stopReason:Ot(Rr(["endTurn","stopSequence","maxTokens","toolUse"]).or(L())),role:Of,content:bt([u0,Be(u0)])}),Yte=ie({type:ue("boolean"),title:L().optional(),description:L().optional(),default:er().optional()}),Xte=ie({type:ue("string"),title:L().optional(),description:L().optional(),minLength:ht().optional(),maxLength:ht().optional(),format:Rr(["email","uri","date","date-time"]).optional(),default:L().optional()}),Qte=ie({type:Rr(["number","integer"]),title:L().optional(),description:L().optional(),minimum:ht().optional(),maximum:ht().optional(),default:ht().optional()}),ere=ie({type:ue("string"),title:L().optional(),description:L().optional(),enum:Be(L()),default:L().optional()}),tre=ie({type:ue("string"),title:L().optional(),description:L().optional(),oneOf:Be(ie({const:L(),title:L()})),default:L().optional()}),rre=ie({type:ue("string"),title:L().optional(),description:L().optional(),enum:Be(L()),enumNames:Be(L()).optional(),default:L().optional()}),nre=bt([ere,tre]),ire=ie({type:ue("array"),title:L().optional(),description:L().optional(),minItems:ht().optional(),maxItems:ht().optional(),items:ie({type:ue("string"),enum:Be(L())}),default:Be(L()).optional()}),ore=ie({type:ue("array"),title:L().optional(),description:L().optional(),minItems:ht().optional(),maxItems:ht().optional(),items:ie({anyOf:Be(ie({const:L(),title:L()}))}),default:Be(L()).optional()}),are=bt([ire,ore]),sre=bt([rre,nre,are]),lre=bt([sre,Yte,Xte,Qte]),cre=Pf.extend({mode:ue("form").optional(),message:L(),requestedSchema:ie({type:ue("object"),properties:Rt(L(),lre),required:Be(L()).optional()})}),ure=Pf.extend({mode:ue("url"),message:L(),elicitationId:L(),url:L().url()}),dre=bt([cre,ure]),fre=yr.extend({method:ue("elicitation/create"),params:dre}),pre=Wn.extend({elicitationId:L()}),hre=Jn.extend({method:ue("notifications/elicitation/complete"),params:pre}),Rc=_r.extend({action:Rr(["accept","decline","cancel"]),content:c0(t=>t===null?void 0:t,Rt(L(),bt([L(),ht(),er(),Be(L())])).optional())}),mre=ie({type:ue("ref/resource"),uri:L()});var gre=ie({type:ue("ref/prompt"),name:L()}),yre=Rn.extend({ref:bt([gre,mre]),argument:ie({name:L(),value:L()}),context:ie({arguments:Rt(L(),L()).optional()}).optional()}),_re=yr.extend({method:ue("completion/complete"),params:yre});var vre=_r.extend({completion:Cr({values:Be(L()).max(100),total:Ot(ht().int()),hasMore:Ot(er())})}),bre=ie({uri:L().startsWith("file://"),name:L().optional(),_meta:Rt(L(),Pt()).optional()}),wre=yr.extend({method:ue("roots/list"),params:Rn.optional()}),w1=_r.extend({roots:Be(bre)}),xre=Jn.extend({method:ue("notifications/roots/list_changed"),params:Wn.optional()}),dje=bt([g0,m0,_re,jf,Tte,Ite,f1,fte,h1,_te,bte,Mf,v1,_0,b0,w0,S0]),fje=bt([h0,y0,u1,xre,Df]),pje=bt([p0,zf,b1,Rc,w1,v0,x0,kc]),hje=bt([g0,Kte,fre,wre,_0,b0,w0,S0]),mje=bt([h0,y0,Ute,xte,gte,Lte,Ote,Df,hre]),gje=bt([p0,ite,vre,Dte,$te,dte,pte,mte,E0,jte,v0,x0,kc]),Ee=class t extends Error{constructor(e,r,n){super(`MCP error ${e}: ${r}`),this.code=e,this.data=n,this.name="McpError"}static fromError(e,r,n){if(e===Te.UrlElicitationRequired&&n){let i=n;if(i.elicitations)return new i1(i.elicitations,r)}return new t(e,r,n)}},i1=class extends Ee{constructor(e,r=`URL elicitation${e.length>1?"s":""} required`){super(Te.UrlElicitationRequired,r,{elicitations:e})}get elicitations(){var e;return((e=this.data)==null?void 0:e.elicitations)??[]}};function ba(t){return t==="completed"||t==="failed"||t==="cancelled"}var Sre=Symbol("Let zodToJsonSchema decide on which parser to use");var Kje=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function x1(t){let e=Wg(t),r=e==null?void 0:e.method;if(!r)throw new Error("Schema is missing a method literal");let n=i4(r);if(typeof n!="string")throw new Error("Schema method literal must be a string");return n}function S1(t,e){let r=ya(t,e);if(!r.success)throw r.error;return r.data}var Are=6e4,I0=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(h0,r=>{this._oncancel(r)}),this.setNotificationHandler(y0,r=>{this._onprogress(r)}),this.setRequestHandler(g0,r=>({})),this._taskStore=e==null?void 0:e.taskStore,this._taskMessageQueue=e==null?void 0:e.taskMessageQueue,this._taskStore&&(this.setRequestHandler(_0,async(r,n)=>{let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new Ee(Te.InvalidParams,"Failed to retrieve task: Task not found");return{...i}}),this.setRequestHandler(b0,async(r,n)=>{let i=async()=>{var s;let o=r.params.taskId;if(this._taskMessageQueue){let l;for(;l=await this._taskMessageQueue.dequeue(o,n.sessionId);){if(l.type==="response"||l.type==="error"){let c=l.message,u=c.id,d=this._requestResolvers.get(u);if(d)if(this._requestResolvers.delete(u),l.type==="response")d(c);else{let f=c,p=new Ee(f.error.code,f.error.message,f.error.data);d(p)}else{let f=l.type==="response"?"Response":"Error";this._onerror(new Error(`${f} handler missing for request ${u}`))}continue}await((s=this._transport)==null?void 0:s.send(l.message,{relatedRequestId:n.requestId}))}}let a=await this._taskStore.getTask(o,n.sessionId);if(!a)throw new Ee(Te.InvalidParams,`Task not found: ${o}`);if(!ba(a.status))return await this._waitForTaskUpdate(o,n.signal),await i();if(ba(a.status)){let l=await this._taskStore.getTaskResult(o,n.sessionId);return this._clearTaskQueue(o),{...l,_meta:{...l._meta,[_a]:{taskId:o}}}}return await i()};return await i()}),this.setRequestHandler(w0,async(r,n)=>{var i;try{let{tasks:o,nextCursor:a}=await this._taskStore.listTasks((i=r.params)==null?void 0:i.cursor,n.sessionId);return{tasks:o,nextCursor:a,_meta:{}}}catch(o){throw new Ee(Te.InvalidParams,`Failed to list tasks: ${o instanceof Error?o.message:String(o)}`)}}),this.setRequestHandler(S0,async(r,n)=>{try{let i=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!i)throw new Ee(Te.InvalidParams,`Task not found: ${r.params.taskId}`);if(ba(i.status))throw new Ee(Te.InvalidParams,`Cannot cancel task in terminal status: ${i.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",n.sessionId),this._clearTaskQueue(r.params.taskId);let o=await this._taskStore.getTask(r.params.taskId,n.sessionId);if(!o)throw new Ee(Te.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...o}}catch(i){throw i instanceof Ee?i:new Ee(Te.InvalidRequest,`Failed to cancel task: ${i instanceof Error?i.message:String(i)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;let r=this._requestHandlerAbortControllers.get(e.params.requestId);r==null||r.abort(e.params.reason)}_setupTimeout(e,r,n,i,o=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,r),startTime:Date.now(),timeout:r,maxTotalTimeout:n,resetTimeoutOnProgress:o,onTimeout:i})}_resetTimeout(e){let r=this._timeoutInfo.get(e);if(!r)return!1;let n=Date.now()-r.startTime;if(r.maxTotalTimeout&&n>=r.maxTotalTimeout)throw this._timeoutInfo.delete(e),Ee.fromError(Te.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:n});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(e){let r=this._timeoutInfo.get(e);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var o,a,s;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 r=(o=this.transport)==null?void 0:o.onclose;this._transport.onclose=()=>{r==null||r(),this._onclose()};let n=(a=this.transport)==null?void 0:a.onerror;this._transport.onerror=l=>{n==null||n(l),this._onerror(l)};let i=(s=this._transport)==null?void 0:s.onmessage;this._transport.onmessage=(l,c)=>{i==null||i(l,c),Co(l)||Ac(l)?this._onresponse(l):va(l)?this._onrequest(l,c):dM(l)?this._onnotification(l):this._onerror(new Error(`Unknown message type: ${JSON.stringify(l)}`))},await this._transport.start()}_onclose(){var n;let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let i of this._requestHandlerAbortControllers.values())i.abort();this._requestHandlerAbortControllers.clear();let r=Ee.fromError(Te.ConnectionClosed,"Connection closed");this._transport=void 0,(n=this.onclose)==null||n.call(this);for(let i of e.values())i(r)}_onerror(e){var r;(r=this.onerror)==null||r.call(this,e)}_onnotification(e){let r=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(e)).catch(n=>this._onerror(new Error(`Uncaught error in notification handler: ${n}`)))}_onrequest(e,r){var u,d,f,p;let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,i=this._transport,o=(f=(d=(u=e.params)==null?void 0:u._meta)==null?void 0:d[_a])==null?void 0:f.taskId;if(n===void 0){let h={jsonrpc:"2.0",id:e.id,error:{code:Te.MethodNotFound,message:"Method not found"}};o&&this._taskMessageQueue?this._enqueueTaskMessage(o,{type:"error",message:h,timestamp:Date.now()},i==null?void 0:i.sessionId).catch(m=>this._onerror(new Error(`Failed to enqueue error response: ${m}`))):i==null||i.send(h).catch(m=>this._onerror(new Error(`Failed to send an error response: ${m}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let s=lM(e.params)?e.params.task:void 0,l=this._taskStore?this.requestTaskStore(e,i==null?void 0:i.sessionId):void 0,c={signal:a.signal,sessionId:i==null?void 0:i.sessionId,_meta:(p=e.params)==null?void 0:p._meta,sendNotification:async h=>{if(a.signal.aborted)return;let m={relatedRequestId:e.id};o&&(m.relatedTask={taskId:o}),await this.notification(h,m)},sendRequest:async(h,m,y)=>{var E;if(a.signal.aborted)throw new Ee(Te.ConnectionClosed,"Request was cancelled");let g={...y,relatedRequestId:e.id};o&&!g.relatedTask&&(g.relatedTask={taskId:o});let v=((E=g.relatedTask)==null?void 0:E.taskId)??o;return v&&l&&await l.updateTaskStatus(v,"input_required"),await this.request(h,m,g)},authInfo:r==null?void 0:r.authInfo,requestId:e.id,requestInfo:r==null?void 0:r.requestInfo,taskId:o,taskStore:l,taskRequestedTtl:s==null?void 0:s.ttl,closeSSEStream:r==null?void 0:r.closeSSEStream,closeStandaloneSSEStream:r==null?void 0:r.closeStandaloneSSEStream};Promise.resolve().then(()=>{s&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async h=>{if(a.signal.aborted)return;let m={result:h,jsonrpc:"2.0",id:e.id};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"response",message:m,timestamp:Date.now()},i==null?void 0:i.sessionId):await(i==null?void 0:i.send(m))},async h=>{if(a.signal.aborted)return;let m={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(h.code)?h.code:Te.InternalError,message:h.message??"Internal error",...h.data!==void 0&&{data:h.data}}};o&&this._taskMessageQueue?await this._enqueueTaskMessage(o,{type:"error",message:m,timestamp:Date.now()},i==null?void 0:i.sessionId):await(i==null?void 0:i.send(m))}).catch(h=>this._onerror(new Error(`Failed to send response: ${h}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:r,...n}=e.params,i=Number(r),o=this._progressHandlers.get(i);if(!o){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(i),s=this._timeoutInfo.get(i);if(s&&a&&s.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(l){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),a(l);return}o(n)}_onresponse(e){let r=Number(e.id),n=this._requestResolvers.get(r);if(n){if(this._requestResolvers.delete(r),Co(e))n(e);else{let a=new Ee(e.error.code,e.error.message,e.error.data);n(a)}return}let i=this._responseHandlers.get(r);if(i===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let o=!1;if(Co(e)&&e.result&&typeof e.result=="object"){let a=e.result;if(a.task&&typeof a.task=="object"){let s=a.task;typeof s.taskId=="string"&&(o=!0,this._taskProgressTokens.set(s.taskId,r))}}if(o||this._progressHandlers.delete(r),Co(e))i(e);else{let a=Ee.fromError(e.error.code,e.error.message,e.error.data);i(a)}}get transport(){return this._transport}async close(){var e;await((e=this._transport)==null?void 0:e.close())}async*requestStream(e,r,n){var a,s;let{task:i}=n??{};if(!i){try{yield{type:"result",result:await this.request(e,r,n)}}catch(l){yield{type:"error",error:l instanceof Ee?l:new Ee(Te.InternalError,String(l))}}return}let o;try{let l=await this.request(e,kc,n);if(l.task)o=l.task.taskId,yield{type:"taskCreated",task:l.task};else throw new Ee(Te.InternalError,"Task creation did not return a task");for(;;){let c=await this.getTask({taskId:o},n);if(yield{type:"taskStatus",task:c},ba(c.status)){c.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:o},r,n)}:c.status==="failed"?yield{type:"error",error:new Ee(Te.InternalError,`Task ${o} failed`)}:c.status==="cancelled"&&(yield{type:"error",error:new Ee(Te.InternalError,`Task ${o} was cancelled`)});return}if(c.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:o},r,n)};return}let u=c.pollInterval??((a=this._options)==null?void 0:a.defaultTaskPollInterval)??1e3;await new Promise(d=>setTimeout(d,u)),(s=n==null?void 0:n.signal)==null||s.throwIfAborted()}}catch(l){yield{type:"error",error:l instanceof Ee?l:new Ee(Te.InternalError,String(l))}}}request(e,r,n){let{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a,task:s,relatedTask:l}=n??{};return new Promise((c,u)=>{var v,E,x,w,k;let d=P=>{u(P)};if(!this._transport){d(new Error("Not connected"));return}if(((v=this._options)==null?void 0:v.enforceStrictCapabilities)===!0)try{this.assertCapabilityForMethod(e.method),s&&this.assertTaskCapability(e.method)}catch(P){d(P);return}(E=n==null?void 0:n.signal)==null||E.throwIfAborted();let f=this._requestMessageId++,p={...e,jsonrpc:"2.0",id:f};n!=null&&n.onprogress&&(this._progressHandlers.set(f,n.onprogress),p.params={...e.params,_meta:{...((x=e.params)==null?void 0:x._meta)||{},progressToken:f}}),s&&(p.params={...p.params,task:s}),l&&(p.params={...p.params,_meta:{...((w=p.params)==null?void 0:w._meta)||{},[_a]:l}});let h=P=>{var T;this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),(T=this._transport)==null||T.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(P)}},{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a}).catch(D=>this._onerror(new Error(`Failed to send cancellation: ${D}`)));let R=P instanceof Ee?P:new Ee(Te.RequestTimeout,String(P));u(R)};this._responseHandlers.set(f,P=>{var R;if(!((R=n==null?void 0:n.signal)!=null&&R.aborted)){if(P instanceof Error)return u(P);try{let T=ya(r,P.result);T.success?c(T.data):u(T.error)}catch(T){u(T)}}}),(k=n==null?void 0:n.signal)==null||k.addEventListener("abort",()=>{var P;h((P=n==null?void 0:n.signal)==null?void 0:P.reason)});let m=(n==null?void 0:n.timeout)??Are,y=()=>h(Ee.fromError(Te.RequestTimeout,"Request timed out",{timeout:m}));this._setupTimeout(f,m,n==null?void 0:n.maxTotalTimeout,y,(n==null?void 0:n.resetTimeoutOnProgress)??!1);let g=l==null?void 0:l.taskId;if(g){let P=R=>{let T=this._responseHandlers.get(f);T?T(R):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,P),this._enqueueTaskMessage(g,{type:"request",message:p,timestamp:Date.now()}).catch(R=>{this._cleanupTimeout(f),u(R)})}else this._transport.send(p,{relatedRequestId:i,resumptionToken:o,onresumptiontoken:a}).catch(P=>{this._cleanupTimeout(f),u(P)})})}async getTask(e,r){return this.request({method:"tasks/get",params:e},v0,r)}async getTaskResult(e,r,n){return this.request({method:"tasks/result",params:e},r,n)}async listTasks(e,r){return this.request({method:"tasks/list",params:e},x0,r)}async cancelTask(e,r){return this.request({method:"tasks/cancel",params:e},pM,r)}async notification(e,r){var s,l,c,u;if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);let n=(s=r==null?void 0:r.relatedTask)==null?void 0:s.taskId;if(n){let d={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...((l=e.params)==null?void 0:l._meta)||{},[_a]:r.relatedTask}}};await this._enqueueTaskMessage(n,{type:"notification",message:d,timestamp:Date.now()});return}if((((c=this._options)==null?void 0:c.debouncedNotificationMethods)??[]).includes(e.method)&&!e.params&&!(r!=null&&r.relatedRequestId)&&!(r!=null&&r.relatedTask)){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{var f,p;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let d={...e,jsonrpc:"2.0"};r!=null&&r.relatedTask&&(d={...d,params:{...d.params,_meta:{...((f=d.params)==null?void 0:f._meta)||{},[_a]:r.relatedTask}}}),(p=this._transport)==null||p.send(d,r).catch(h=>this._onerror(h))});return}let a={...e,jsonrpc:"2.0"};r!=null&&r.relatedTask&&(a={...a,params:{...a.params,_meta:{...((u=a.params)==null?void 0:u._meta)||{},[_a]:r.relatedTask}}}),await this._transport.send(a,r)}setRequestHandler(e,r){let n=x1(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(i,o)=>{let a=S1(e,i);return Promise.resolve(r(a,o))})}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,r){let n=x1(e);this._notificationHandlers.set(n,i=>{let o=S1(e,i);return Promise.resolve(r(o))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let r=this._taskProgressTokens.get(e);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,r,n){var o;if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");let i=(o=this._options)==null?void 0:o.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,r,n,i)}async _clearTaskQueue(e,r){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,r);for(let i of n)if(i.type==="request"&&va(i.message)){let o=i.message.id,a=this._requestResolvers.get(o);a?(a(new Ee(Te.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,r){var i,o;let n=((i=this._options)==null?void 0:i.defaultTaskPollInterval)??1e3;try{let a=await((o=this._taskStore)==null?void 0:o.getTask(e));a!=null&&a.pollInterval&&(n=a.pollInterval)}catch{}return new Promise((a,s)=>{if(r.aborted){s(new Ee(Te.InvalidRequest,"Request cancelled"));return}let l=setTimeout(a,n);r.addEventListener("abort",()=>{clearTimeout(l),s(new Ee(Te.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,r){let n=this._taskStore;if(!n)throw new Error("No task store configured");return{createTask:async i=>{if(!e)throw new Error("No request provided");return await n.createTask(i,e.id,{method:e.method,params:e.params},r)},getTask:async i=>{let o=await n.getTask(i,r);if(!o)throw new Ee(Te.InvalidParams,"Failed to retrieve task: Task not found");return o},storeTaskResult:async(i,o,a)=>{await n.storeTaskResult(i,o,a,r);let s=await n.getTask(i,r);if(s){let l=Df.parse({method:"notifications/tasks/status",params:s});await this.notification(l),ba(s.status)&&this._cleanupTaskProgressHandler(i)}},getTaskResult:i=>n.getTaskResult(i,r),updateTaskStatus:async(i,o,a)=>{let s=await n.getTask(i,r);if(!s)throw new Ee(Te.InvalidParams,`Task "${i}" not found - it may have been cleaned up`);if(ba(s.status))throw new Ee(Te.InvalidParams,`Cannot update task "${i}" from terminal status "${s.status}" to "${o}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(i,o,a,r);let l=await n.getTask(i,r);if(l){let c=Df.parse({method:"notifications/tasks/status",params:l});await this.notification(c),ba(l.status)&&this._cleanupTaskProgressHandler(i)}},listTasks:i=>n.listTasks(i,r)}}};function vM(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function bM(t,e){let r={...t};for(let n in e){let i=n,o=e[i];if(o===void 0)continue;let a=r[i];vM(a)&&vM(o)?r[i]={...a,...o}:r[i]=o}return r}var bL=rc(Vj(),1),wL=rc(vL(),1);function mpe(){let t=new bL.default({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return(0,wL.default)(t),t}var jy=class{constructor(e){this._ajv=e??mpe()}getValidator(e){let r="$id"in e&&typeof e.$id=="string"?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return n=>r(n)?{valid:!0,data:n,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}};var zy=class{constructor(e){this._server=e}requestStream(e,r,n){return this._server.requestStream(e,r,n)}createMessageStream(e,r){var i;let n=this._server.getClientCapabilities();if((e.tools||e.toolChoice)&&!((i=n==null?void 0:n.sampling)!=null&&i.tools))throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){let o=e.messages[e.messages.length-1],a=Array.isArray(o.content)?o.content:[o.content],s=a.some(d=>d.type==="tool_result"),l=e.messages.length>1?e.messages[e.messages.length-2]:void 0,c=l?Array.isArray(l.content)?l.content:[l.content]:[],u=c.some(d=>d.type==="tool_use");if(s){if(a.some(d=>d.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!u)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(u){let d=new Set(c.filter(p=>p.type==="tool_use").map(p=>p.id)),f=new Set(a.filter(p=>p.type==="tool_result").map(p=>p.toolUseId));if(d.size!==f.size||![...d].every(p=>f.has(p)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:e},zf,r)}elicitInputStream(e,r){var a,s;let n=this._server.getClientCapabilities(),i=e.mode??"form";switch(i){case"url":{if(!((a=n==null?void 0:n.elicitation)!=null&&a.url))throw new Error("Client does not support url elicitation.");break}case"form":{if(!((s=n==null?void 0:n.elicitation)!=null&&s.form))throw new Error("Client does not support form elicitation.");break}}let o=i==="form"&&e.mode===void 0?{...e,mode:"form"}:e;return this.requestStream({method:"elicitation/create",params:o},Rc,r)}async getTask(e,r){return this._server.getTask({taskId:e},r)}async getTaskResult(e,r,n){return this._server.getTaskResult({taskId:e},r,n)}async listTasks(e,r){return this._server.listTasks(e?{cursor:e}:void 0,r)}async cancelTask(e,r){return this._server.cancelTask({taskId:e},r)}};function xL(t,e,r){var n;if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"tools/call":if(!((n=t.tools)!=null&&n.call))throw new Error(`${r} does not support task creation for tools/call (required for ${e})`);break;default:break}}function SL(t,e,r){var n,i;if(!t)throw new Error(`${r} does not support task creation (required for ${e})`);switch(e){case"sampling/createMessage":if(!((n=t.sampling)!=null&&n.createMessage))throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${e})`);break;case"elicitation/create":if(!((i=t.elicitation)!=null&&i.create))throw new Error(`${r} does not support task creation for elicitation/create (required for ${e})`);break;default:break}}var qp=class extends I0{constructor(e,r){super(r),this._serverInfo=e,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Nf.options.map((n,i)=>[n,i])),this.isMessageIgnored=(n,i)=>{let o=this._loggingLevels.get(i);return o?this.LOG_LEVEL_SEVERITY.get(n)<this.LOG_LEVEL_SEVERITY.get(o):!1},this._capabilities=(r==null?void 0:r.capabilities)??{},this._instructions=r==null?void 0:r.instructions,this._jsonSchemaValidator=(r==null?void 0:r.jsonSchemaValidator)??new jy,this.setRequestHandler(m0,n=>this._oninitialize(n)),this.setNotificationHandler(u1,()=>{var n;return(n=this.oninitialized)==null?void 0:n.call(this)}),this._capabilities.logging&&this.setRequestHandler(jf,async(n,i)=>{var l;let o=i.sessionId||((l=i.requestInfo)==null?void 0:l.headers["mcp-session-id"])||void 0,{level:a}=n.params,s=Nf.safeParse(a);return s.success&&this._loggingLevels.set(o,s.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new zy(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=bM(this._capabilities,e)}setRequestHandler(e,r){var s;let n=Wg(e),i=n==null?void 0:n.method;if(!i)throw new Error("Schema is missing a method literal");let o;if(Ic(i)){let l=i,c=(s=l._zod)==null?void 0:s.def;o=(c==null?void 0:c.value)??l.value}else{let l=i,c=l._def;o=(c==null?void 0:c.value)??l.value}if(typeof o!="string")throw new Error("Schema method literal must be a string");if(o==="tools/call"){let l=async(c,u)=>{let d=ya(Mf,c);if(!d.success){let m=d.error instanceof Error?d.error.message:String(d.error);throw new Ee(Te.InvalidParams,`Invalid tools/call request: ${m}`)}let{params:f}=d.data,p=await Promise.resolve(r(c,u));if(f.task){let m=ya(kc,p);if(!m.success){let y=m.error instanceof Error?m.error.message:String(m.error);throw new Ee(Te.InvalidParams,`Invalid task creation result: ${y}`)}return m.data}let h=ya(E0,p);if(!h.success){let m=h.error instanceof Error?h.error.message:String(h.error);throw new Ee(Te.InvalidParams,`Invalid tools/call result: ${m}`)}return h.data};return super.setRequestHandler(e,l)}return super.setRequestHandler(e,r)}assertCapabilityForMethod(e){var r,n,i;switch(e){case"sampling/createMessage":if(!((r=this._clientCapabilities)!=null&&r.sampling))throw new Error(`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!((n=this._clientCapabilities)!=null&&n.elicitation))throw new Error(`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!((i=this._clientCapabilities)!=null&&i.roots))throw new Error(`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){var r,n;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(!((n=(r=this._clientCapabilities)==null?void 0:r.elicitation)!=null&&n.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 r,n;SL((n=(r=this._clientCapabilities)==null?void 0:r.tasks)==null?void 0:n.requests,e,"Client")}assertTaskHandlerCapability(e){var r;this._capabilities&&xL((r=this._capabilities.tasks)==null?void 0:r.requests,e,"Server")}async _oninitialize(e){let r=e.params.protocolVersion;return this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo,{protocolVersion:Tc.includes(r)?r:o1,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"},p0)}async createMessage(e,r){var n,i;if((e.tools||e.toolChoice)&&!((i=(n=this._clientCapabilities)==null?void 0:n.sampling)!=null&&i.tools))throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){let o=e.messages[e.messages.length-1],a=Array.isArray(o.content)?o.content:[o.content],s=a.some(d=>d.type==="tool_result"),l=e.messages.length>1?e.messages[e.messages.length-2]:void 0,c=l?Array.isArray(l.content)?l.content:[l.content]:[],u=c.some(d=>d.type==="tool_use");if(s){if(a.some(d=>d.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!u)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(u){let d=new Set(c.filter(p=>p.type==="tool_use").map(p=>p.id)),f=new Set(a.filter(p=>p.type==="tool_result").map(p=>p.toolUseId));if(d.size!==f.size||![...d].every(p=>f.has(p)))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},b1,r):this.request({method:"sampling/createMessage",params:e},zf,r)}async elicitInput(e,r){var i,o,a,s;switch(e.mode??"form"){case"url":{if(!((o=(i=this._clientCapabilities)==null?void 0:i.elicitation)!=null&&o.url))throw new Error("Client does not support url elicitation.");let l=e;return this.request({method:"elicitation/create",params:l},Rc,r)}case"form":{if(!((s=(a=this._clientCapabilities)==null?void 0:a.elicitation)!=null&&s.form))throw new Error("Client does not support form elicitation.");let l=e.mode==="form"?e:{...e,mode:"form"},c=await this.request({method:"elicitation/create",params:l},Rc,r);if(c.action==="accept"&&c.content&&l.requestedSchema)try{let d=this._jsonSchemaValidator.getValidator(l.requestedSchema)(c.content);if(!d.valid)throw new Ee(Te.InvalidParams,`Elicitation response content does not match requested schema: ${d.errorMessage}`)}catch(u){throw u instanceof Ee?u:new Ee(Te.InternalError,`Error validating elicitation response: ${u instanceof Error?u.message:String(u)}`)}return c}}}createElicitationCompletionNotifier(e,r){var n,i;if(!((i=(n=this._clientCapabilities)==null?void 0:n.elicitation)!=null&&i.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}},r)}async listRoots(e,r){return this.request({method:"roots/list",params:e},w1,r)}async sendLoggingMessage(e,r){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,r))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"})}};import IL from"node:process";var Ly=class{append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
|
|
272
272
|
`);if(e===-1)return null;let r=this._buffer.toString("utf8",0,e).replace(/\r$/,"");return this._buffer=this._buffer.subarray(e+1),gpe(r)}clear(){this._buffer=void 0}};function gpe(t){return Tf.parse(JSON.parse(t))}function EL(t){return JSON.stringify(t)+`
|
|
273
273
|
`}var Fy=class{constructor(e=IL.stdin,r=IL.stdout){this._stdin=e,this._stdout=r,this._readBuffer=new Ly,this._started=!1,this._ondata=n=>{this._readBuffer.append(n),this.processReadBuffer()},this._onerror=n=>{var i;(i=this.onerror)==null||i.call(this,n)}}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,r;for(;;)try{let n=this._readBuffer.readMessage();if(n===null)break;(e=this.onmessage)==null||e.call(this,n)}catch(n){(r=this.onerror)==null||r.call(this,n)}}async close(){var r;this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),(r=this.onclose)==null||r.call(this)}send(e){return new Promise(r=>{let n=EL(e);this._stdout.write(n)?r():this._stdout.once("drain",r)})}};import{createServer as j3e}from"http";import{Http2ServerRequest as ype}from"http2";import{Http2ServerRequest as GP}from"http2";import{Readable as $L}from"stream";import Ape from"crypto";var al=class extends Error{constructor(t,e){super(t,e),this.name="RequestError"}},_pe=t=>t instanceof al?t:new al(t.message,{cause:t}),vpe=global.Request,Zp=class extends vpe{constructor(t,e){var r;typeof t=="object"&&pu in t&&(t=t[pu]()),typeof((r=e==null?void 0:e.body)==null?void 0:r.getReader)<"u"&&(e.duplex??="half"),super(t,e)}},bpe=t=>{let e=[],r=t.rawHeaders;for(let n=0;n<r.length;n+=2){let{[n]:i,[n+1]:o}=r;i.charCodeAt(0)!==58&&e.push([i,o])}return new Headers(e)},TL=Symbol("wrapBodyStream"),wpe=(t,e,r,n,i)=>{let o={method:t,headers:r,signal:i.signal};if(t==="TRACE"){o.method="GET";let a=new Zp(e,o);return Object.defineProperty(a,"method",{get(){return"TRACE"}}),a}if(!(t==="GET"||t==="HEAD"))if("rawBody"in n&&n.rawBody instanceof Buffer)o.body=new ReadableStream({start(a){a.enqueue(n.rawBody),a.close()}});else if(n[TL]){let a;o.body=new ReadableStream({async pull(s){try{a||=$L.toWeb(n).getReader();let{done:l,value:c}=await a.read();l?s.close():s.enqueue(c)}catch(l){s.error(l)}}})}else o.body=$L.toWeb(n);return new Zp(e,o)},pu=Symbol("getRequestCache"),xpe=Symbol("requestCache"),By=Symbol("incomingKey"),Uy=Symbol("urlKey"),Spe=Symbol("headersKey"),fu=Symbol("abortControllerKey"),Epe=Symbol("getAbortController"),qy={get method(){return this[By].method||"GET"},get url(){return this[Uy]},get headers(){return this[Spe]||=bpe(this[By])},[Epe](){return this[pu](),this[fu]},[pu](){return this[fu]||=new AbortController,this[xpe]||=wpe(this.method,this[Uy],this.headers,this[By],this[fu])}};["body","bodyUsed","cache","credentials","destination","integrity","mode","redirect","referrer","referrerPolicy","signal","keepalive"].forEach(t=>{Object.defineProperty(qy,t,{get(){return this[pu]()[t]}})});["arrayBuffer","blob","clone","formData","json","text"].forEach(t=>{Object.defineProperty(qy,t,{value:function(){return this[pu]()[t]()}})});Object.setPrototypeOf(qy,Zp.prototype);var Ipe=(t,e)=>{let r=Object.create(qy);r[By]=t;let n=t.url||"";if(n[0]!=="/"&&(n.startsWith("http://")||n.startsWith("https://"))){if(t instanceof GP)throw new al("Absolute URL for :path is not allowed in HTTP/2");try{let s=new URL(n);r[Uy]=s.href}catch(s){throw new al("Invalid absolute URL",{cause:s})}return r}let i=(t instanceof GP?t.authority:t.headers.host)||e;if(!i)throw new al("Missing host header");let o;if(t instanceof GP){if(o=t.scheme,!(o==="http"||o==="https"))throw new al("Unsupported scheme")}else o=t.socket&&t.socket.encrypted?"https":"http";let a=new URL(`${o}://${i}${n}`);if(a.hostname.length!==i.length&&a.hostname!==i.replace(/:\d+$/,""))throw new al("Invalid host header");return r[Uy]=a.href,r},PL=Symbol("responseCache"),du=Symbol("getResponseCache"),sl=Symbol("cache"),KP=global.Response,Hp=class AL{#e;#t;[du](){return delete this[sl],this[PL]||=new KP(this.#e,this.#t)}constructor(e,r){let n;if(this.#e=e,r instanceof AL){let i=r[PL];if(i){this.#t=i,this[du]();return}else this.#t=r.#t,n=new Headers(r.#t.headers)}else this.#t=r;(typeof e=="string"||typeof(e==null?void 0:e.getReader)<"u"||e instanceof Blob||e instanceof Uint8Array)&&(this[sl]=[(r==null?void 0:r.status)||200,e,n||(r==null?void 0:r.headers)])}get headers(){let e=this[sl];return e?(e[2]instanceof Headers||(e[2]=new Headers(e[2]||{"content-type":"text/plain; charset=UTF-8"})),e[2]):this[du]().headers}get status(){var e;return((e=this[sl])==null?void 0:e[0])??this[du]().status}get ok(){let e=this.status;return e>=200&&e<300}};["body","bodyUsed","redirected","statusText","trailers","type","url"].forEach(t=>{Object.defineProperty(Hp.prototype,t,{get(){return this[du]()[t]}})});["arrayBuffer","blob","clone","formData","json","text"].forEach(t=>{Object.defineProperty(Hp.prototype,t,{value:function(){return this[du]()[t]()}})});Object.setPrototypeOf(Hp,KP);Object.setPrototypeOf(Hp.prototype,KP.prototype);async function $pe(t){return Promise.race([t,Promise.resolve().then(()=>Promise.resolve(void 0))])}function kL(t,e,r){let n=s=>{t.cancel(s).catch(()=>{})};return e.on("close",n),e.on("error",n),(r??t.read()).then(a,i),t.closed.finally(()=>{e.off("close",n),e.off("error",n)});function i(s){s&&e.destroy(s)}function o(){t.read().then(a,i)}function a({done:s,value:l}){try{if(s)e.end();else if(!e.write(l))e.once("drain",o);else return t.read().then(a,i)}catch(c){i(c)}}}function Ppe(t,e){if(t.locked)throw new TypeError("ReadableStream is locked.");return e.destroyed?void 0:kL(t.getReader(),e)}var WP=t=>{let e={};t instanceof Headers||(t=new Headers(t??void 0));let r=[];for(let[n,i]of t)n==="set-cookie"?r.push(i):e[n]=i;return r.length>0&&(e["set-cookie"]=r),e["content-type"]??="text/plain; charset=UTF-8",e},Tpe="x-hono-already-sent";typeof global.crypto>"u"&&(global.crypto=Ape);var YP=Symbol("outgoingEnded"),kpe=()=>new Response(null,{status:400}),CL=t=>new Response(null,{status:t instanceof Error&&(t.name==="TimeoutError"||t.constructor.name==="TimeoutError")?504:500}),JP=(t,e)=>{let r=t instanceof Error?t:new Error("unknown error",{cause:t});r.code==="ERR_STREAM_PREMATURE_CLOSE"?console.info("The user aborted a request."):(console.error(t),e.headersSent||e.writeHead(500,{"Content-Type":"text/plain"}),e.end(`Error: ${r.message}`),e.destroy(r))},RL=t=>{"flushHeaders"in t&&t.writable&&t.flushHeaders()},DL=async(t,e)=>{var a,s;let[r,n,i]=t[sl],o=!1;if(!i)i={"content-type":"text/plain; charset=UTF-8"};else if(i instanceof Headers)o=i.has("content-length"),i=WP(i);else if(Array.isArray(i)){let l=new Headers(i);o=l.has("content-length"),i=WP(l)}else for(let l in i)if(l.length===14&&l.toLowerCase()==="content-length"){o=!0;break}o||(typeof n=="string"?i["Content-Length"]=Buffer.byteLength(n):n instanceof Uint8Array?i["Content-Length"]=n.byteLength:n instanceof Blob&&(i["Content-Length"]=n.size)),e.writeHead(r,i),typeof n=="string"||n instanceof Uint8Array?e.end(n):n instanceof Blob?e.end(new Uint8Array(await n.arrayBuffer())):(RL(e),await((a=Ppe(n,e))==null?void 0:a.catch(l=>JP(l,e)))),(s=e[YP])==null||s.call(e)},Cpe=t=>typeof t.then=="function",Rpe=async(t,e,r={})=>{var i;if(Cpe(t))if(r.errorHandler)try{t=await t}catch(o){let a=await r.errorHandler(o);if(!a)return;t=a}else t=await t.catch(CL);if(sl in t)return DL(t,e);let n=WP(t.headers);if(t.body){let o=t.body.getReader(),a=[],s=!1,l;if(n["transfer-encoding"]!=="chunked"){let c=2;for(let u=0;u<c;u++){l||=o.read();let d=await $pe(l).catch(f=>{console.error(f),s=!0});if(!d){if(u===1){await new Promise(f=>setTimeout(f)),c=3;continue}break}if(l=void 0,d.value&&a.push(d.value),d.done){s=!0;break}}s&&!("content-length"in n)&&(n["content-length"]=a.reduce((u,d)=>u+d.length,0))}e.writeHead(t.status,n),a.forEach(c=>{e.write(c)}),s?e.end():(a.length===0&&RL(e),await kL(o,e,l))}else n[Tpe]||(e.writeHead(t.status,n),e.end());(i=e[YP])==null||i.call(e)},XP=(t,e={})=>{let r=e.autoCleanupIncoming??!0;return e.overrideGlobalObjects!==!1&&global.Request!==Zp&&(Object.defineProperty(global,"Request",{value:Zp}),Object.defineProperty(global,"Response",{value:Hp})),async(n,i)=>{let o,a;try{a=Ipe(n,e.hostname);let s=!r||n.method==="GET"||n.method==="HEAD";if(s||(n[TL]=!0,n.on("end",()=>{s=!0}),n instanceof ype&&(i[YP]=()=>{s||setTimeout(()=>{s||setTimeout(()=>{n.destroy(),i.destroy()})})})),i.on("close",()=>{a[fu]&&(n.errored?a[fu].abort(n.errored.toString()):i.writableFinished||a[fu].abort("Client connection prematurely closed.")),s||setTimeout(()=>{s||setTimeout(()=>{n.destroy()})})}),o=t(a,{incoming:n,outgoing:i}),sl in o)return DL(o,i)}catch(s){if(o)return JP(s,i);if(e.errorHandler){if(o=await e.errorHandler(a?s:_pe(s)),!o)return}else a?o=CL(s):o=kpe()}try{return await Rpe(o,i,e)}catch(s){return JP(s,i)}}};var Zy=class{constructor(e={}){this._started=!1,this._hasHandledRequest=!1,this._streamMapping=new Map,this._requestToStreamMapping=new Map,this._requestResponseMap=new Map,this._initialized=!1,this._enableJsonResponse=!1,this._standaloneSseStreamId="_GET_stream",this.sessionIdGenerator=e.sessionIdGenerator,this._enableJsonResponse=e.enableJsonResponse??!1,this._eventStore=e.eventStore,this._onsessioninitialized=e.onsessioninitialized,this._onsessionclosed=e.onsessionclosed,this._allowedHosts=e.allowedHosts,this._allowedOrigins=e.allowedOrigins,this._enableDnsRebindingProtection=e.enableDnsRebindingProtection??!1,this._retryInterval=e.retryInterval}async start(){if(this._started)throw new Error("Transport already started");this._started=!0}createJsonErrorResponse(e,r,n,i){let o={code:r,message:n};return(i==null?void 0:i.data)!==void 0&&(o.data=i.data),new Response(JSON.stringify({jsonrpc:"2.0",error:o,id:null}),{status:e,headers:{"Content-Type":"application/json",...i==null?void 0:i.headers}})}validateRequestHeaders(e){var r,n;if(this._enableDnsRebindingProtection){if(this._allowedHosts&&this._allowedHosts.length>0){let i=e.headers.get("host");if(!i||!this._allowedHosts.includes(i)){let o=`Invalid Host header: ${i}`;return(r=this.onerror)==null||r.call(this,new Error(o)),this.createJsonErrorResponse(403,-32e3,o)}}if(this._allowedOrigins&&this._allowedOrigins.length>0){let i=e.headers.get("origin");if(i&&!this._allowedOrigins.includes(i)){let o=`Invalid Origin header: ${i}`;return(n=this.onerror)==null||n.call(this,new Error(o)),this.createJsonErrorResponse(403,-32e3,o)}}}}async handleRequest(e,r){if(!this.sessionIdGenerator&&this._hasHandledRequest)throw new Error("Stateless transport cannot be reused across requests. Create a new transport per request.");this._hasHandledRequest=!0;let n=this.validateRequestHeaders(e);if(n)return n;switch(e.method){case"POST":return this.handlePostRequest(e,r);case"GET":return this.handleGetRequest(e);case"DELETE":return this.handleDeleteRequest(e);default:return this.handleUnsupportedRequest()}}async writePrimingEvent(e,r,n,i){if(!this._eventStore||i<"2025-11-25")return;let o=await this._eventStore.storeEvent(n,{}),a=`id: ${o}
|
|
274
274
|
data:
|
|
@@ -281,7 +281,7 @@ data:
|
|
|
281
281
|
`;return i&&(a+=`id: ${i}
|
|
282
282
|
`),a+=`data: ${JSON.stringify(n)}
|
|
283
283
|
|
|
284
|
-
`,e.enqueue(r.encode(a)),!0}catch(a){return(o=this.onerror)==null||o.call(this,a),!1}}handleUnsupportedRequest(){var e;return(e=this.onerror)==null||e.call(this,new Error("Method not allowed.")),new Response(JSON.stringify({jsonrpc:"2.0",error:{code:-32e3,message:"Method not allowed."},id:null}),{status:405,headers:{Allow:"GET, POST, DELETE","Content-Type":"application/json"}})}async handlePostRequest(e,r){var n,i,o,a,s,l,c,u,d,f;try{let p=e.headers.get("accept");if(!(p!=null&&p.includes("application/json"))||!p.includes("text/event-stream"))return(n=this.onerror)==null||n.call(this,new Error("Not Acceptable: Client must accept both application/json and text/event-stream")),this.createJsonErrorResponse(406,-32e3,"Not Acceptable: Client must accept both application/json and text/event-stream");let h=e.headers.get("content-type");if(!h||!h.includes("application/json"))return(i=this.onerror)==null||i.call(this,new Error("Unsupported Media Type: Content-Type must be application/json")),this.createJsonErrorResponse(415,-32e3,"Unsupported Media Type: Content-Type must be application/json");let m={headers:Object.fromEntries(e.headers.entries()),url:new URL(e.url)},y;if((r==null?void 0:r.parsedBody)!==void 0)y=r.parsedBody;else try{y=await e.json()}catch{return(o=this.onerror)==null||o.call(this,new Error("Parse error: Invalid JSON")),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON")}let g;try{Array.isArray(y)?g=y.map(k=>Tf.parse(k)):g=[Tf.parse(y)]}catch{return(a=this.onerror)==null||a.call(this,new Error("Parse error: Invalid JSON-RPC message")),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON-RPC message")}let v=g.some(c1);if(v){if(this._initialized&&this.sessionId!==void 0)return(s=this.onerror)==null||s.call(this,new Error("Invalid Request: Server already initialized")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Server already initialized");if(g.length>1)return(l=this.onerror)==null||l.call(this,new Error("Invalid Request: Only one initialization request is allowed")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Only one initialization request is allowed");this.sessionId=(c=this.sessionIdGenerator)==null?void 0:c.call(this),this._initialized=!0,this.sessionId&&this._onsessioninitialized&&await Promise.resolve(this._onsessioninitialized(this.sessionId))}if(!v){let k=this.validateSession(e);if(k)return k;let M=this.validateProtocolVersion(e);if(M)return M}if(!g.some(va)){for(let k of g)(u=this.onmessage)==null||u.call(this,k,{authInfo:r==null?void 0:r.authInfo,requestInfo:m});return new Response(null,{status:202})}let x=crypto.randomUUID(),w=g.find(k=>c1(k)),A=w?w.params.protocolVersion:e.headers.get("mcp-protocol-version")??oM;if(this._enableJsonResponse)return new Promise(k=>{var M;this._streamMapping.set(x,{resolveJson:k,cleanup:()=>{this._streamMapping.delete(x)}});for(let U of g)va(U)&&this._requestToStreamMapping.set(U.id,x);for(let U of g)(M=this.onmessage)==null||M.call(this,U,{authInfo:r==null?void 0:r.authInfo,requestInfo:m})});let $=new TextEncoder,R,T=new ReadableStream({start:k=>{R=k},cancel:()=>{this._streamMapping.delete(x)}}),D={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"};this.sessionId!==void 0&&(D["mcp-session-id"]=this.sessionId);for(let k of g)va(k)&&(this._streamMapping.set(x,{controller:R,encoder:$,cleanup:()=>{this._streamMapping.delete(x);try{R.close()}catch{}}}),this._requestToStreamMapping.set(k.id,x));await this.writePrimingEvent(R,$,x,A);for(let k of g){let M,U;va(k)&&this._eventStore&&A>="2025-11-25"&&(M=()=>{this.closeSSEStream(k.id)},U=()=>{this.closeStandaloneSSEStream()}),(d=this.onmessage)==null||d.call(this,k,{authInfo:r==null?void 0:r.authInfo,requestInfo:m,closeSSEStream:M,closeStandaloneSSEStream:U})}return new Response(T,{status:200,headers:D})}catch(p){return(f=this.onerror)==null||f.call(this,p),this.createJsonErrorResponse(400,-32700,"Parse error",{data:String(p)})}}async handleDeleteRequest(e){var i;let r=this.validateSession(e);if(r)return r;let n=this.validateProtocolVersion(e);return n||(await Promise.resolve((i=this._onsessionclosed)==null?void 0:i.call(this,this.sessionId)),await this.close(),new Response(null,{status:200}))}validateSession(e){var n,i,o;if(this.sessionIdGenerator===void 0)return;if(!this._initialized)return(n=this.onerror)==null||n.call(this,new Error("Bad Request: Server not initialized")),this.createJsonErrorResponse(400,-32e3,"Bad Request: Server not initialized");let r=e.headers.get("mcp-session-id");if(!r)return(i=this.onerror)==null||i.call(this,new Error("Bad Request: Mcp-Session-Id header is required")),this.createJsonErrorResponse(400,-32e3,"Bad Request: Mcp-Session-Id header is required");if(r!==this.sessionId)return(o=this.onerror)==null||o.call(this,new Error("Session not found")),this.createJsonErrorResponse(404,-32001,"Session not found")}validateProtocolVersion(e){var n;let r=e.headers.get("mcp-protocol-version");if(r!==null&&!Tc.includes(r))return(n=this.onerror)==null||n.call(this,new Error(`Bad Request: Unsupported protocol version: ${r} (supported versions: ${Tc.join(", ")})`)),this.createJsonErrorResponse(400,-32e3,`Bad Request: Unsupported protocol version: ${r} (supported versions: ${Tc.join(", ")})`)}async close(){var e;this._streamMapping.forEach(({cleanup:r})=>{r()}),this._streamMapping.clear(),this._requestResponseMap.clear(),(e=this.onclose)==null||e.call(this)}closeSSEStream(e){let r=this._requestToStreamMapping.get(e);if(!r)return;let n=this._streamMapping.get(r);n&&n.cleanup()}closeStandaloneSSEStream(){let e=this._streamMapping.get(this._standaloneSseStreamId);e&&e.cleanup()}async send(e,r){let n=r==null?void 0:r.relatedRequestId;if((Co(e)||Ac(e))&&(n=e.id),n===void 0){if(Co(e)||Ac(e))throw new Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request");let a;this._eventStore&&(a=await this._eventStore.storeEvent(this._standaloneSseStreamId,e));let s=this._streamMapping.get(this._standaloneSseStreamId);if(s===void 0)return;s.controller&&s.encoder&&this.writeSSEEvent(s.controller,s.encoder,e,a);return}let i=this._requestToStreamMapping.get(n);if(!i)throw new Error(`No connection established for request ID: ${String(n)}`);let o=this._streamMapping.get(i);if(!this._enableJsonResponse&&(o!=null&&o.controller)&&(o!=null&&o.encoder)){let a;this._eventStore&&(a=await this._eventStore.storeEvent(i,e)),this.writeSSEEvent(o.controller,o.encoder,e,a)}if(Co(e)||Ac(e)){this._requestResponseMap.set(n,e);let a=Array.from(this._requestToStreamMapping.entries()).filter(([l,c])=>c===i).map(([l])=>l);if(a.every(l=>this._requestResponseMap.has(l))){if(!o)throw new Error(`No connection established for request ID: ${String(n)}`);if(this._enableJsonResponse&&o.resolveJson){let l={"Content-Type":"application/json"};this.sessionId!==void 0&&(l["mcp-session-id"]=this.sessionId);let c=a.map(u=>this._requestResponseMap.get(u));c.length===1?o.resolveJson(new Response(JSON.stringify(c[0]),{status:200,headers:l})):o.resolveJson(new Response(JSON.stringify(c),{status:200,headers:l}))}else o.cleanup();for(let l of a)this._requestResponseMap.delete(l),this._requestToStreamMapping.delete(l)}}}};var Hy=class{constructor(e={}){this._requestContext=new WeakMap,this._webStandardTransport=new Zy(e),this._requestListener=XP(async r=>{let n=this._requestContext.get(r);return this._webStandardTransport.handleRequest(r,{authInfo:n==null?void 0:n.authInfo,parsedBody:n==null?void 0:n.parsedBody})},{overrideGlobalObjects:!1})}get sessionId(){return this._webStandardTransport.sessionId}set onclose(e){this._webStandardTransport.onclose=e}get onclose(){return this._webStandardTransport.onclose}set onerror(e){this._webStandardTransport.onerror=e}get onerror(){return this._webStandardTransport.onerror}set onmessage(e){this._webStandardTransport.onmessage=e}get onmessage(){return this._webStandardTransport.onmessage}async start(){return this._webStandardTransport.start()}async close(){return this._webStandardTransport.close()}async send(e,r){return this._webStandardTransport.send(e,r)}async handleRequest(e,r,n){let i=e.auth;await XP(async a=>this._webStandardTransport.handleRequest(a,{authInfo:i,parsedBody:n}),{overrideGlobalObjects:!1})(e,r)}closeSSEStream(e){this._webStandardTransport.closeSSEStream(e)}closeStandaloneSSEStream(){this._webStandardTransport.closeStandaloneSSEStream()}};La();za();rT();import _e from"node:process";import ADe from"node:http";import _w from"node:path";import ID from"node:os";Dn();Jp();za();var c8=rc(l8(),1);async function lh(t="production"){var c,u;let e=Y.getEndpoints(t),r=await gT(),n=`https://${e.authHost}/oauth2/v1/device/code`,i=new URLSearchParams({client_id:r,response_type:"device_code",scope:"public_profile"}),o={"Content-Type":"application/x-www-form-urlencoded"};await oe.logRequest("POST",n,o,i.toString());let a=await fetch(n,{method:"POST",headers:o,body:i}),s=await a.json(),l={};if(a.headers.forEach((d,f)=>{l[f]=d}),await oe.logResponse("POST",n,a.status,a.statusText,s,a.ok,l),!a.ok){let d=((c=s==null?void 0:s.data)==null?void 0:c.msg)||(s==null?void 0:s.error_description)||(s==null?void 0:s.error)||(s==null?void 0:s.message);throw new Error(`Failed to get device code: ${a.status} ${a.statusText}`+(d?` - ${d}`:"")+(s?` | Response: ${JSON.stringify(s)}`:""))}if(s.success===!0&&s.data)return s.data;throw new Error(`Failed to get device code: ${((u=s.data)==null?void 0:u.msg)||"Unknown error"}`)}function ch(t,e="production"){return Y.getEndpoints(e).qrcodeBaseUrl+encodeURIComponent(t)}async function u8(t,e){try{if(!t||t.trim().length===0)return"";let r={width:256,margin:4,errorCorrectionLevel:"M"},n={type:"image/png",errorCorrectionLevel:(e==null?void 0:e.errorCorrectionLevel)||r.errorCorrectionLevel,width:(e==null?void 0:e.width)||r.width,margin:(e==null?void 0:e.margin)!==void 0?e.margin:r.margin},o=(await c8.default.toDataURL(t,n)).split(",")[1];return!o||o.length===0?"":o}catch{return""}}async function uA(t,e="production",r){var c,u;let n=Y.getEndpoints(e),i=await gT(),o=`https://${n.authHost}/oauth2/v1/token`,a=(r==null?void 0:r.maxAttempts)||60,s=(r==null?void 0:r.intervalMs)||2e3,l=0;for(;l<a;){l++,await new Promise(f=>setTimeout(f,s));let d=new URLSearchParams({grant_type:"device_token",client_id:i,secret_type:"hmac-sha-1",code:t});try{let p=await(await fetch(o,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:d})).json();if(p.success===!0&&p.data)return{...p.data,kid:p.data.kid,mac_key:p.data.mac_key,token_type:p.data.token_type||"mac",mac_algorithm:p.data.mac_algorithm||"hmac-sha-1"};let h=(c=p.data)==null?void 0:c.error;if(h==="authorization_pending"||h==="authorization_waiting"){if(l%5===0){let m=l*(s/1e3);process.stderr.write(`⏳ 等待授权中... (${m}秒)
|
|
284
|
+
`,e.enqueue(r.encode(a)),!0}catch(a){return(o=this.onerror)==null||o.call(this,a),!1}}handleUnsupportedRequest(){var e;return(e=this.onerror)==null||e.call(this,new Error("Method not allowed.")),new Response(JSON.stringify({jsonrpc:"2.0",error:{code:-32e3,message:"Method not allowed."},id:null}),{status:405,headers:{Allow:"GET, POST, DELETE","Content-Type":"application/json"}})}async handlePostRequest(e,r){var n,i,o,a,s,l,c,u,d,f;try{let p=e.headers.get("accept");if(!(p!=null&&p.includes("application/json"))||!p.includes("text/event-stream"))return(n=this.onerror)==null||n.call(this,new Error("Not Acceptable: Client must accept both application/json and text/event-stream")),this.createJsonErrorResponse(406,-32e3,"Not Acceptable: Client must accept both application/json and text/event-stream");let h=e.headers.get("content-type");if(!h||!h.includes("application/json"))return(i=this.onerror)==null||i.call(this,new Error("Unsupported Media Type: Content-Type must be application/json")),this.createJsonErrorResponse(415,-32e3,"Unsupported Media Type: Content-Type must be application/json");let m={headers:Object.fromEntries(e.headers.entries()),url:new URL(e.url)},y;if((r==null?void 0:r.parsedBody)!==void 0)y=r.parsedBody;else try{y=await e.json()}catch{return(o=this.onerror)==null||o.call(this,new Error("Parse error: Invalid JSON")),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON")}let g;try{Array.isArray(y)?g=y.map(A=>Tf.parse(A)):g=[Tf.parse(y)]}catch{return(a=this.onerror)==null||a.call(this,new Error("Parse error: Invalid JSON-RPC message")),this.createJsonErrorResponse(400,-32700,"Parse error: Invalid JSON-RPC message")}let v=g.some(c1);if(v){if(this._initialized&&this.sessionId!==void 0)return(s=this.onerror)==null||s.call(this,new Error("Invalid Request: Server already initialized")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Server already initialized");if(g.length>1)return(l=this.onerror)==null||l.call(this,new Error("Invalid Request: Only one initialization request is allowed")),this.createJsonErrorResponse(400,-32600,"Invalid Request: Only one initialization request is allowed");this.sessionId=(c=this.sessionIdGenerator)==null?void 0:c.call(this),this._initialized=!0,this.sessionId&&this._onsessioninitialized&&await Promise.resolve(this._onsessioninitialized(this.sessionId))}if(!v){let A=this.validateSession(e);if(A)return A;let M=this.validateProtocolVersion(e);if(M)return M}if(!g.some(va)){for(let A of g)(u=this.onmessage)==null||u.call(this,A,{authInfo:r==null?void 0:r.authInfo,requestInfo:m});return new Response(null,{status:202})}let x=crypto.randomUUID(),w=g.find(A=>c1(A)),k=w?w.params.protocolVersion:e.headers.get("mcp-protocol-version")??oM;if(this._enableJsonResponse)return new Promise(A=>{var M;this._streamMapping.set(x,{resolveJson:A,cleanup:()=>{this._streamMapping.delete(x)}});for(let U of g)va(U)&&this._requestToStreamMapping.set(U.id,x);for(let U of g)(M=this.onmessage)==null||M.call(this,U,{authInfo:r==null?void 0:r.authInfo,requestInfo:m})});let P=new TextEncoder,R,T=new ReadableStream({start:A=>{R=A},cancel:()=>{this._streamMapping.delete(x)}}),D={"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"};this.sessionId!==void 0&&(D["mcp-session-id"]=this.sessionId);for(let A of g)va(A)&&(this._streamMapping.set(x,{controller:R,encoder:P,cleanup:()=>{this._streamMapping.delete(x);try{R.close()}catch{}}}),this._requestToStreamMapping.set(A.id,x));await this.writePrimingEvent(R,P,x,k);for(let A of g){let M,U;va(A)&&this._eventStore&&k>="2025-11-25"&&(M=()=>{this.closeSSEStream(A.id)},U=()=>{this.closeStandaloneSSEStream()}),(d=this.onmessage)==null||d.call(this,A,{authInfo:r==null?void 0:r.authInfo,requestInfo:m,closeSSEStream:M,closeStandaloneSSEStream:U})}return new Response(T,{status:200,headers:D})}catch(p){return(f=this.onerror)==null||f.call(this,p),this.createJsonErrorResponse(400,-32700,"Parse error",{data:String(p)})}}async handleDeleteRequest(e){var i;let r=this.validateSession(e);if(r)return r;let n=this.validateProtocolVersion(e);return n||(await Promise.resolve((i=this._onsessionclosed)==null?void 0:i.call(this,this.sessionId)),await this.close(),new Response(null,{status:200}))}validateSession(e){var n,i,o;if(this.sessionIdGenerator===void 0)return;if(!this._initialized)return(n=this.onerror)==null||n.call(this,new Error("Bad Request: Server not initialized")),this.createJsonErrorResponse(400,-32e3,"Bad Request: Server not initialized");let r=e.headers.get("mcp-session-id");if(!r)return(i=this.onerror)==null||i.call(this,new Error("Bad Request: Mcp-Session-Id header is required")),this.createJsonErrorResponse(400,-32e3,"Bad Request: Mcp-Session-Id header is required");if(r!==this.sessionId)return(o=this.onerror)==null||o.call(this,new Error("Session not found")),this.createJsonErrorResponse(404,-32001,"Session not found")}validateProtocolVersion(e){var n;let r=e.headers.get("mcp-protocol-version");if(r!==null&&!Tc.includes(r))return(n=this.onerror)==null||n.call(this,new Error(`Bad Request: Unsupported protocol version: ${r} (supported versions: ${Tc.join(", ")})`)),this.createJsonErrorResponse(400,-32e3,`Bad Request: Unsupported protocol version: ${r} (supported versions: ${Tc.join(", ")})`)}async close(){var e;this._streamMapping.forEach(({cleanup:r})=>{r()}),this._streamMapping.clear(),this._requestResponseMap.clear(),(e=this.onclose)==null||e.call(this)}closeSSEStream(e){let r=this._requestToStreamMapping.get(e);if(!r)return;let n=this._streamMapping.get(r);n&&n.cleanup()}closeStandaloneSSEStream(){let e=this._streamMapping.get(this._standaloneSseStreamId);e&&e.cleanup()}async send(e,r){let n=r==null?void 0:r.relatedRequestId;if((Co(e)||Ac(e))&&(n=e.id),n===void 0){if(Co(e)||Ac(e))throw new Error("Cannot send a response on a standalone SSE stream unless resuming a previous client request");let a;this._eventStore&&(a=await this._eventStore.storeEvent(this._standaloneSseStreamId,e));let s=this._streamMapping.get(this._standaloneSseStreamId);if(s===void 0)return;s.controller&&s.encoder&&this.writeSSEEvent(s.controller,s.encoder,e,a);return}let i=this._requestToStreamMapping.get(n);if(!i)throw new Error(`No connection established for request ID: ${String(n)}`);let o=this._streamMapping.get(i);if(!this._enableJsonResponse&&(o!=null&&o.controller)&&(o!=null&&o.encoder)){let a;this._eventStore&&(a=await this._eventStore.storeEvent(i,e)),this.writeSSEEvent(o.controller,o.encoder,e,a)}if(Co(e)||Ac(e)){this._requestResponseMap.set(n,e);let a=Array.from(this._requestToStreamMapping.entries()).filter(([l,c])=>c===i).map(([l])=>l);if(a.every(l=>this._requestResponseMap.has(l))){if(!o)throw new Error(`No connection established for request ID: ${String(n)}`);if(this._enableJsonResponse&&o.resolveJson){let l={"Content-Type":"application/json"};this.sessionId!==void 0&&(l["mcp-session-id"]=this.sessionId);let c=a.map(u=>this._requestResponseMap.get(u));c.length===1?o.resolveJson(new Response(JSON.stringify(c[0]),{status:200,headers:l})):o.resolveJson(new Response(JSON.stringify(c),{status:200,headers:l}))}else o.cleanup();for(let l of a)this._requestResponseMap.delete(l),this._requestToStreamMapping.delete(l)}}}};var Hy=class{constructor(e={}){this._requestContext=new WeakMap,this._webStandardTransport=new Zy(e),this._requestListener=XP(async r=>{let n=this._requestContext.get(r);return this._webStandardTransport.handleRequest(r,{authInfo:n==null?void 0:n.authInfo,parsedBody:n==null?void 0:n.parsedBody})},{overrideGlobalObjects:!1})}get sessionId(){return this._webStandardTransport.sessionId}set onclose(e){this._webStandardTransport.onclose=e}get onclose(){return this._webStandardTransport.onclose}set onerror(e){this._webStandardTransport.onerror=e}get onerror(){return this._webStandardTransport.onerror}set onmessage(e){this._webStandardTransport.onmessage=e}get onmessage(){return this._webStandardTransport.onmessage}async start(){return this._webStandardTransport.start()}async close(){return this._webStandardTransport.close()}async send(e,r){return this._webStandardTransport.send(e,r)}async handleRequest(e,r,n){let i=e.auth;await XP(async a=>this._webStandardTransport.handleRequest(a,{authInfo:i,parsedBody:n}),{overrideGlobalObjects:!1})(e,r)}closeSSEStream(e){this._webStandardTransport.closeSSEStream(e)}closeStandaloneSSEStream(){this._webStandardTransport.closeStandaloneSSEStream()}};La();za();rT();import _e from"node:process";import ADe from"node:http";import _w from"node:path";import ID from"node:os";Dn();Jp();za();var c8=rc(l8(),1);async function lh(t="production"){var c,u;let e=Y.getEndpoints(t),r=await gT(),n=`https://${e.authHost}/oauth2/v1/device/code`,i=new URLSearchParams({client_id:r,response_type:"device_code",scope:"public_profile"}),o={"Content-Type":"application/x-www-form-urlencoded"};await oe.logRequest("POST",n,o,i.toString());let a=await fetch(n,{method:"POST",headers:o,body:i}),s=await a.json(),l={};if(a.headers.forEach((d,f)=>{l[f]=d}),await oe.logResponse("POST",n,a.status,a.statusText,s,a.ok,l),!a.ok){let d=((c=s==null?void 0:s.data)==null?void 0:c.msg)||(s==null?void 0:s.error_description)||(s==null?void 0:s.error)||(s==null?void 0:s.message);throw new Error(`Failed to get device code: ${a.status} ${a.statusText}`+(d?` - ${d}`:"")+(s?` | Response: ${JSON.stringify(s)}`:""))}if(s.success===!0&&s.data)return s.data;throw new Error(`Failed to get device code: ${((u=s.data)==null?void 0:u.msg)||"Unknown error"}`)}function ch(t,e="production"){return Y.getEndpoints(e).qrcodeBaseUrl+encodeURIComponent(t)}async function u8(t,e){try{if(!t||t.trim().length===0)return"";let r={width:256,margin:4,errorCorrectionLevel:"M"},n={type:"image/png",errorCorrectionLevel:(e==null?void 0:e.errorCorrectionLevel)||r.errorCorrectionLevel,width:(e==null?void 0:e.width)||r.width,margin:(e==null?void 0:e.margin)!==void 0?e.margin:r.margin},o=(await c8.default.toDataURL(t,n)).split(",")[1];return!o||o.length===0?"":o}catch{return""}}async function uA(t,e="production",r){var c,u;let n=Y.getEndpoints(e),i=await gT(),o=`https://${n.authHost}/oauth2/v1/token`,a=(r==null?void 0:r.maxAttempts)||60,s=(r==null?void 0:r.intervalMs)||2e3,l=0;for(;l<a;){l++,await new Promise(f=>setTimeout(f,s));let d=new URLSearchParams({grant_type:"device_token",client_id:i,secret_type:"hmac-sha-1",code:t});try{let p=await(await fetch(o,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:d})).json();if(p.success===!0&&p.data)return{...p.data,kid:p.data.kid,mac_key:p.data.mac_key,token_type:p.data.token_type||"mac",mac_algorithm:p.data.mac_algorithm||"hmac-sha-1"};let h=(c=p.data)==null?void 0:c.error;if(h==="authorization_pending"||h==="authorization_waiting"){if(l%5===0){let m=l*(s/1e3);process.stderr.write(`⏳ 等待授权中... (${m}秒)
|
|
285
285
|
`)}continue}throw h==="expired_token"?new Error("❌ 授权码已过期,请重新获取授权链接"):h==="access_denied"?new Error("❌ 用户拒绝授权"):new Error(`❌ 授权失败: ${((u=p.data)==null?void 0:u.error_description)||h||"Unknown error"}`)}catch(f){if(f instanceof Error&&f.message.includes("❌"))throw f;continue}}throw new Error("⏰ 授权超时(2分钟),请重新获取授权链接")}var dA=class{constructor(){this.pendingState=null;this.authInProgress=!1}setPendingState(e){this.pendingState=e}getPendingState(){return this.pendingState}clearPendingState(){this.pendingState=null}setAuthInProgress(e){this.authInProgress=e}isAuthInProgress(){return this.authInProgress}},to=new dA;_l();import*as ov from"node:fs";import*as y8 from"node:path";za();Dn();import*as si from"node:path";import*as bA from"node:fs";var vA=Y.workspaceRoot;function h8(t){if(!(t!=null&&t.projectPath))return vA;let e=si.normalize(t.projectPath);return si.isAbsolute(e)?e:si.join(vA,e)}var iv={ABSOLUTE_PATH_REJECTED:t=>`❌ 参数错误:路径不接受绝对路径
|
|
286
286
|
|
|
287
287
|
您传入了:"${t}"
|
|
@@ -6090,7 +6090,7 @@ class MultiplayerManager {
|
|
|
6090
6090
|
// 导出
|
|
6091
6091
|
// export default MultiplayerManager;
|
|
6092
6092
|
// module.exports = MultiplayerManager;
|
|
6093
|
-
// window.MultiplayerManager = MultiplayerManager;`}]}}};var ws;ws="1.23.7
|
|
6093
|
+
// window.MultiplayerManager = MultiplayerManager;`}]}}};var ws;ws="1.23.7";async function FRe(){return Go(Rm,"api_event_relations")}async function BRe(){return Go(Rm,"protocol_template")}async function SD(){return Go(Rm,"complete_example")}async function URe(){return`# TapTap 多人联机集成指南
|
|
6094
6094
|
|
|
6095
6095
|
---
|
|
6096
6096
|
|
|
@@ -10322,7 +10322,7 @@ adManager.showRewardedVideo(); // 激励视频(核心)
|
|
|
10322
10322
|
adManager.showInterstitial(); // 插屏广告(可选)
|
|
10323
10323
|
adManager.showBanner(); // Banner 广告(可选)
|
|
10324
10324
|
\`\`\`
|
|
10325
|
-
`}];var dY={name:"ads",tools:cY.map(t=>({definition:t.definition,handler:t.handler,requiresAuth:t.definition.name==="check_ads_status"})),resources:uY};Ga();Dn();var yw=class{constructor(e,r={}){this._data=this.merge(e,r)}merge(e,r){var n,i;return{userId:e._user_id||r.userId,projectId:e._project_id||r.projectId,projectPath:e._project_path||r.projectPath,sessionId:e._session_id||r.sessionId,macToken:(n=e._mac_token)!=null&&n.kid&&((i=e._mac_token)!=null&&i.mac_key)?e._mac_token:r.macToken,customFields:e._custom_fields||r.customFields}}get userId(){return this._data.userId?this._data.userId:Y.transport==="stdio"?"local":"anonymous"}get projectId(){return this._data.projectId}get projectPath(){return this._data.projectPath}get sessionId(){return this._data.sessionId}get macToken(){return this._data.macToken}get customFields(){return this._data.customFields}getCacheIsolationKey(){return this._data.projectPath||this._data.projectId}resolveApp(){let e=this.getCacheIsolationKey(),r=xn(e);return{developerId:r==null?void 0:r.developer_id,appId:r==null?void 0:r.app_id,projectPath:this._data.projectPath,developerName:r==null?void 0:r.developer_name,appTitle:r==null?void 0:r.app_title,miniappId:r==null?void 0:r.miniapp_id}}hasApp(){let e=this.resolveApp();return!!(e.developerId&&e.appId)}resolveTokenWithSource(){var n,i;if((n=this._data.macToken)!=null&&n.kid&&((i=this._data.macToken)!=null&&i.mac_key))return{token:this._data.macToken,source:"context"};let e=yh(this.userId,this.projectId),r=g8(e);return r!=null&&r.kid&&(r!=null&&r.mac_key)?{token:r,source:"file"}:{token:null,source:"none"}}resolveToken(){return this.resolveTokenWithSource().token}hasToken(){let e=this.resolveToken();return!!(e!=null&&e.kid&&(e!=null&&e.mac_key))}getTokenStatus(){let{token:e,source:r}=this.resolveTokenWithSource();return{hasMacToken:!!(e!=null&&e.kid&&(e!=null&&e.mac_key)),source:r}}};Dn();pT();Jp();var yd=Y.transport,vw=Y.port,Gl=[z8,nU,fU,MK,zK,UK,QK,eY,dY];function kDe(t){return t.definition.name.endsWith("_raw")}function bw(t){return Y.rawToolsEnabled?t:t.filter(e=>!kDe(e))}function fY(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.values(t).every(e=>typeof e=="string")}var $D=class{constructor(e){this.server=new qp({name:"taptap-minigame-mcp",version:ws},{capabilities:{logging:{},tools:{},resources:{}}}),this.ensureAuth=e,this.toolRegistry=this.buildToolRegistry(),this.resourceRegistry=this.buildResourceRegistry(),this.setupHandlers()}buildToolRegistry(){let e=new Map;for(let r of Gl)for(let n of bw(r.tools)){let i=n.definition.name;e.has(i)&&_e.stderr.write(`⚠️ Warning: Tool name conflict detected!
|
|
10325
|
+
`}];var dY={name:"ads",tools:cY.map(t=>({definition:t.definition,handler:t.handler,requiresAuth:t.definition.name==="check_ads_status"})),resources:uY};Ga();Dn();var yw=class{constructor(e,r={}){this._data=this.merge(e,r)}merge(e,r){var n,i;return{userId:e._user_id||r.userId,projectId:e._project_id||r.projectId,projectPath:e._project_path||r.projectPath,sessionId:e._session_id||r.sessionId,macToken:(n=e._mac_token)!=null&&n.kid&&((i=e._mac_token)!=null&&i.mac_key)?e._mac_token:r.macToken,customFields:e._custom_fields||r.customFields,tag:e._tag||r.tag}}get userId(){return this._data.userId?this._data.userId:Y.transport==="stdio"?"local":"anonymous"}get projectId(){return this._data.projectId}get projectPath(){return this._data.projectPath}get sessionId(){return this._data.sessionId}get macToken(){return this._data.macToken}get customFields(){return this._data.customFields}get tag(){return this._data.tag}getCacheIsolationKey(){return this._data.projectPath||this._data.projectId}resolveApp(){let e=this.getCacheIsolationKey(),r=xn(e);return{developerId:r==null?void 0:r.developer_id,appId:r==null?void 0:r.app_id,projectPath:this._data.projectPath,developerName:r==null?void 0:r.developer_name,appTitle:r==null?void 0:r.app_title,miniappId:r==null?void 0:r.miniapp_id}}hasApp(){let e=this.resolveApp();return!!(e.developerId&&e.appId)}resolveTokenWithSource(){var n,i;if((n=this._data.macToken)!=null&&n.kid&&((i=this._data.macToken)!=null&&i.mac_key))return{token:this._data.macToken,source:"context"};let e=yh(this.userId,this.projectId),r=g8(e);return r!=null&&r.kid&&(r!=null&&r.mac_key)?{token:r,source:"file"}:{token:null,source:"none"}}resolveToken(){return this.resolveTokenWithSource().token}hasToken(){let e=this.resolveToken();return!!(e!=null&&e.kid&&(e!=null&&e.mac_key))}getTokenStatus(){let{token:e,source:r}=this.resolveTokenWithSource();return{hasMacToken:!!(e!=null&&e.kid&&(e!=null&&e.mac_key)),source:r}}};Dn();pT();Jp();var yd=Y.transport,vw=Y.port,Gl=[z8,nU,fU,MK,zK,UK,QK,eY,dY];function kDe(t){return t.definition.name.endsWith("_raw")}function bw(t){return Y.rawToolsEnabled?t:t.filter(e=>!kDe(e))}function fY(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.values(t).every(e=>typeof e=="string")}var $D=class{constructor(e){this.server=new qp({name:"taptap-minigame-mcp",version:ws},{capabilities:{logging:{},tools:{},resources:{}}}),this.ensureAuth=e,this.toolRegistry=this.buildToolRegistry(),this.resourceRegistry=this.buildResourceRegistry(),this.setupHandlers()}buildToolRegistry(){let e=new Map;for(let r of Gl)for(let n of bw(r.tools)){let i=n.definition.name;e.has(i)&&_e.stderr.write(`⚠️ Warning: Tool name conflict detected!
|
|
10326
10326
|
Tool "${i}" is defined in multiple modules.
|
|
10327
10327
|
Later registration will override the previous one.
|
|
10328
10328
|
`),e.set(i,n)}return e}buildResourceRegistry(){let e=new Map;for(let r of Gl)for(let n of r.resources){let i=n.uri;e.has(i)&&_e.stderr.write(`⚠️ Warning: Resource URI conflict detected!
|
|
@@ -10370,7 +10370,7 @@ ${v}
|
|
|
10370
10370
|
`),_e.stderr.write(` - HTTP requests and responses will be logged
|
|
10371
10371
|
`)):_e.stderr.write(`
|
|
10372
10372
|
💡 Tip: Set TAPTAP_MCP_VERBOSE=true for detailed logs
|
|
10373
|
-
`)}async startStdioServer(e,r){let n=new Fy;await this.server.connect(n),oe.initialize(this.server,"stdio"),this.printServerInfo("stdio",e,r)}async startSSEServer(e,r){oe.initialize(this.server,"sse");let n=new Map,i=ADe.createServer(async(o,a)=>{let s=new URL(o.url||"/",`http://${o.headers.host}`);if(a.setHeader("Access-Control-Allow-Origin","*"),a.setHeader("Access-Control-Allow-Methods","GET, POST, DELETE, OPTIONS"),a.setHeader("Access-Control-Allow-Headers","Content-Type, Mcp-Session-Id, X-TapTap-Mac-Token, X-TapTap-User-Id, X-TapTap-Project-Id, X-TapTap-Project-Path, X-TapTap-Custom-Fields"),o.method==="OPTIONS"){a.writeHead(200),a.end();return}if(s.pathname==="/health"&&o.method==="GET"){a.writeHead(200,{"Content-Type":"application/json"}),a.end(JSON.stringify({status:"ok",version:ws,transport:"streamable-http",tools:e,resources:r,activeSessions:n.size}));return}let l=o.headers["mcp-session-id"];if(l&&n.has(l)){let{transport:
|
|
10373
|
+
`)}async startStdioServer(e,r){let n=new Fy;await this.server.connect(n),oe.initialize(this.server,"stdio"),this.printServerInfo("stdio",e,r)}async startSSEServer(e,r){oe.initialize(this.server,"sse");let n=new Map,i=ADe.createServer(async(o,a)=>{let s=new URL(o.url||"/",`http://${o.headers.host}`);if(a.setHeader("Access-Control-Allow-Origin","*"),a.setHeader("Access-Control-Allow-Methods","GET, POST, DELETE, OPTIONS"),a.setHeader("Access-Control-Allow-Headers","Content-Type, Mcp-Session-Id, X-TapTap-Mac-Token, X-TapTap-User-Id, X-TapTap-Project-Id, X-TapTap-Project-Path, X-TapTap-Custom-Fields, X-TapTap-Tag"),o.method==="OPTIONS"){a.writeHead(200),a.end();return}if(s.pathname==="/health"&&o.method==="GET"){a.writeHead(200,{"Content-Type":"application/json"}),a.end(JSON.stringify({status:"ok",version:ws,transport:"streamable-http",tools:e,resources:r,activeSessions:n.size}));return}let l=o.headers["mcp-session-id"];if(l&&n.has(l)){let{transport:A}=n.get(l);await A.handleRequest(o,a);return}let c=A=>{let M=o.headers[A.toLowerCase()];return typeof M=="string"?M:void 0},u=s.searchParams.get("user_id"),d=s.searchParams.get("project_id"),f=s.searchParams.get("project_path"),p=c("X-TapTap-User-Id"),h=c("X-TapTap-Project-Id"),m=c("X-TapTap-Project-Path"),y=c("X-TapTap-Mac-Token"),g=c("X-TapTap-Custom-Fields"),v=c("X-TapTap-Tag"),E=p||(u??void 0),x=h||(d??void 0),w=m||(f??void 0);w&&(w=_w.normalize(w));let k;if(y)try{k=JSON.parse(y)}catch(A){oe.warning(`Failed to parse MAC Token from header: ${A}`)}let P;if(g)try{let A=JSON.parse(g);fY(A)?P=A:oe.warning("Failed to parse Custom Fields from header: expected a JSON object with string values")}catch(A){oe.warning(`Failed to parse Custom Fields from header: ${A}`)}let R={userId:E,projectId:x,projectPath:w,macToken:k,customFields:P,tag:v},T=new qp({name:"taptap-minigame-mcp",version:ws},{capabilities:{logging:{},tools:{},resources:{}}});this.setupHandlersForServer(T,R);let D=new Hy({sessionIdGenerator:()=>Math.random().toString(36).substring(2)+Date.now().toString(36),enableJsonResponse:yd==="http",onsessioninitialized:async A=>{R.sessionId=A,await oe.logClientConnection(A,{userId:R.userId,projectId:R.projectId,projectPath:R.projectPath,macToken:R.macToken}),n.set(A,{server:T,transport:D})},onsessionclosed:async A=>{await oe.logClientDisconnection(A),n.delete(A)}});await T.connect(D),await D.handleRequest(o,a)});i.listen(vw,()=>{let o=yd==="http"?"JSON Only":"SSE Streaming";_e.stderr.write(`🌐 HTTP Server: http://localhost:${vw}
|
|
10374
10374
|
`),_e.stderr.write(`📡 MCP Endpoint: http://localhost:${vw}/
|
|
10375
10375
|
`),_e.stderr.write(`💚 Health Check: http://localhost:${vw}/health
|
|
10376
10376
|
|