diff --git a/dist/tornado.umd.js b/dist/tornado.umd.js
index d802b1a..96b29eb 100644
--- a/dist/tornado.umd.js
+++ b/dist/tornado.umd.js
@@ -66563,7 +66563,18 @@ class AbstractProvider {
}
this.emit("debug", { action: "sendCcipReadFetchRequest", request, index: i, urls });
let errorMessage = "unknown error";
- const resp = await request.send();
+ // Fetch the resource...
+ let resp;
+ try {
+ resp = await request.send();
+ }
+ catch (error) {
+ // ...low-level fetch error (missing host, bad SSL, etc.),
+ // so try next URL
+ errorMessages.push(error.message);
+ this.emit("debug", { action: "receiveCcipReadFetchError", request, result: { error } });
+ continue;
+ }
try {
const result = resp.bodyJson;
if (result.data) {
@@ -161490,7 +161501,7 @@ const poseidonContract=(/* unused pure expression or super */ null && (_poseidon
/**
* The current version of Ethers.
*/
-const version = "6.13.2";
+const version = "6.13.3";
//# sourceMappingURL=_version.js.map
/***/ }),
diff --git a/dist/tornado.umd.min.js b/dist/tornado.umd.min.js
index 12ffb56..2849796 100644
--- a/dist/tornado.umd.min.js
+++ b/dist/tornado.umd.min.js
@@ -5,4 +5,4 @@
|| ${n} === "boolean" || ${f} === null`).assign(i,r._`[${f}]`)}}c.else(),h(e),c.endIf(),c.if(r._`${i} !== undefined`,(()=>{c.assign(f,i),function({gen:e,parentData:a,parentDataProperty:t},c){e.if(r._`${a} !== undefined`,(()=>e.assign(r._`${a}[${t}]`,c)))}(e,i)}))}(e,a,n):h(e)}))}return b};const o=new Set(["string","number","integer","boolean","null"]);function s(e,a,t,c=i.Correct){const f=c===i.Correct?r.operators.EQ:r.operators.NEQ;let d;switch(e){case"null":return r._`${a} ${f} null`;case"array":d=r._`Array.isArray(${a})`;break;case"object":d=r._`${a} && typeof ${a} == "object" && !Array.isArray(${a})`;break;case"integer":d=n(r._`!(${a} % 1) && !isNaN(${a})`);break;case"number":d=n();break;default:return r._`typeof ${a} ${f} ${e}`}return c===i.Correct?d:(0,r.not)(d);function n(e=r.nil){return(0,r.and)(r._`typeof ${a} == "number"`,e,t?r._`isFinite(${a})`:r.nil)}}function l(e,a,t,c){if(1===e.length)return s(e[0],a,t,c);let f;const d=(0,n.toHash)(e);if(d.array&&d.object){const e=r._`typeof ${a} != "object"`;f=d.null?e:r._`!${a} || ${e}`,delete d.null,delete d.array,delete d.object}else f=r.nil;d.number&&delete d.integer;for(const e in d)f=(0,r.and)(f,s(e,a,t,c));return f}a.checkDataType=s,a.checkDataTypes=l;const u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:a})=>"string"==typeof e?r._`{type: ${e}}`:r._`{type: ${a}}`};function h(e){const a=function(e){const{gen:a,data:t,schema:c}=e,f=(0,n.schemaRefOrVal)(e,c,"type");return{gen:a,keyword:"type",data:t,schema:c.type,schemaCode:f,schemaValue:f,parentSchema:c,params:{},it:e}}(e);(0,d.reportError)(a,u)}a.reportTypeError=h},7870:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.assignDefaults=void 0;const c=t(99029),f=t(94227);function d(e,a,t){const{gen:d,compositeRule:r,data:n,opts:i}=e;if(void 0===t)return;const b=c._`${n}${(0,c.getProperty)(a)}`;if(r)return void(0,f.checkStrictMode)(e,`default is ignored for: ${b}`);let o=c._`${b} === undefined`;"empty"===i.useDefaults&&(o=c._`${o} || ${b} === null || ${b} === ""`),d.if(o,c._`${b} = ${(0,c.stringify)(t)}`)}a.assignDefaults=function(e,a){const{properties:t,items:c}=e.schema;if("object"===a&&t)for(const a in t)d(e,a,t[a].default);else"array"===a&&Array.isArray(c)&&c.forEach(((a,t)=>d(e,t,a.default)))}},62586:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.getData=a.KeywordCxt=a.validateFunctionCode=void 0;const c=t(28727),f=t(10208),d=t(7887),r=t(10208),n=t(7870),i=t(33673),b=t(24495),o=t(99029),s=t(42023),l=t(66939),u=t(94227),h=t(48708);function p({gen:e,validateName:a,schema:t,schemaEnv:c,opts:f},d){f.code.es5?e.func(a,o._`${s.default.data}, ${s.default.valCxt}`,c.$async,(()=>{e.code(o._`"use strict"; ${g(t,f)}`),function(e,a){e.if(s.default.valCxt,(()=>{e.var(s.default.instancePath,o._`${s.default.valCxt}.${s.default.instancePath}`),e.var(s.default.parentData,o._`${s.default.valCxt}.${s.default.parentData}`),e.var(s.default.parentDataProperty,o._`${s.default.valCxt}.${s.default.parentDataProperty}`),e.var(s.default.rootData,o._`${s.default.valCxt}.${s.default.rootData}`),a.dynamicRef&&e.var(s.default.dynamicAnchors,o._`${s.default.valCxt}.${s.default.dynamicAnchors}`)}),(()=>{e.var(s.default.instancePath,o._`""`),e.var(s.default.parentData,o._`undefined`),e.var(s.default.parentDataProperty,o._`undefined`),e.var(s.default.rootData,s.default.data),a.dynamicRef&&e.var(s.default.dynamicAnchors,o._`{}`)}))}(e,f),e.code(d)})):e.func(a,o._`${s.default.data}, ${function(e){return o._`{${s.default.instancePath}="", ${s.default.parentData}, ${s.default.parentDataProperty}, ${s.default.rootData}=${s.default.data}${e.dynamicRef?o._`, ${s.default.dynamicAnchors}={}`:o.nil}}={}`}(f)}`,c.$async,(()=>e.code(g(t,f)).code(d)))}function g(e,a){const t="object"==typeof e&&e[a.schemaId];return t&&(a.code.source||a.code.process)?o._`/*# sourceURL=${t} */`:o.nil}function m({schema:e,self:a}){if("boolean"==typeof e)return!e;for(const t in e)if(a.RULES.all[t])return!0;return!1}function x(e){return"boolean"!=typeof e.schema}function y(e){(0,u.checkUnknownRules)(e),function(e){const{schema:a,errSchemaPath:t,opts:c,self:f}=e;a.$ref&&c.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(a,f.RULES)&&f.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}(e)}function A(e,a){if(e.opts.jtd)return w(e,[],!1,a);const t=(0,f.getSchemaTypes)(e.schema);w(e,t,!(0,f.coerceAndCheckDataType)(e,t),a)}function v({gen:e,schemaEnv:a,schema:t,errSchemaPath:c,opts:f}){const d=t.$comment;if(!0===f.$comment)e.code(o._`${s.default.self}.logger.log(${d})`);else if("function"==typeof f.$comment){const t=o.str`${c}/$comment`,f=e.scopeValue("root",{ref:a.root});e.code(o._`${s.default.self}.opts.$comment(${d}, ${t}, ${f}.schema)`)}}function w(e,a,t,c){const{gen:f,schema:n,data:i,allErrors:b,opts:l,self:h}=e,{RULES:p}=h;function g(u){(0,d.shouldUseGroup)(n,u)&&(u.type?(f.if((0,r.checkDataType)(u.type,i,l.strictNumbers)),_(e,u),1===a.length&&a[0]===u.type&&t&&(f.else(),(0,r.reportTypeError)(e)),f.endIf()):_(e,u),b||f.if(o._`${s.default.errors} === ${c||0}`))}!n.$ref||!l.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(n,p)?(l.jtd||function(e,a){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,a){a.length&&(e.dataTypes.length?(a.forEach((a=>{I(e.dataTypes,a)||E(e,`type "${a}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,a){const t=[];for(const c of e.dataTypes)I(a,c)?t.push(c):a.includes("integer")&&"number"===c&&t.push("integer");e.dataTypes=t}(e,a)):e.dataTypes=a)}(e,a),e.opts.allowUnionTypes||function(e,a){a.length>1&&(2!==a.length||!a.includes("null"))&&E(e,"use allowUnionTypes to allow union type keyword")}(e,a),function(e,a){const t=e.self.RULES.all;for(const c in t){const f=t[c];if("object"==typeof f&&(0,d.shouldUseRule)(e.schema,f)){const{type:t}=f.definition;t.length&&!t.some((e=>{return c=e,(t=a).includes(c)||"number"===c&&t.includes("integer");var t,c}))&&E(e,`missing type "${t.join(",")}" for keyword "${c}"`)}}}(e,e.dataTypes))}(e,a),f.block((()=>{for(const e of p.rules)g(e);g(p.post)}))):f.block((()=>M(e,"$ref",p.all.$ref.definition)))}function _(e,a){const{gen:t,schema:c,opts:{useDefaults:f}}=e;f&&(0,n.assignDefaults)(e,a.type),t.block((()=>{for(const t of a.rules)(0,d.shouldUseRule)(c,t)&&M(e,t.keyword,t.definition,a.type)}))}function I(e,a){return e.includes(a)||"integer"===a&&e.includes("number")}function E(e,a){a+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,u.checkStrictMode)(e,a,e.opts.strictTypes)}a.validateFunctionCode=function(e){x(e)&&(y(e),m(e))?function(e){const{schema:a,opts:t,gen:c}=e;p(e,(()=>{t.$comment&&a.$comment&&v(e),function(e){const{schema:a,opts:t}=e;void 0!==a.default&&t.useDefaults&&t.strictSchema&&(0,u.checkStrictMode)(e,"default is ignored in the schema root")}(e),c.let(s.default.vErrors,null),c.let(s.default.errors,0),t.unevaluated&&function(e){const{gen:a,validateName:t}=e;e.evaluated=a.const("evaluated",o._`${t}.evaluated`),a.if(o._`${e.evaluated}.dynamicProps`,(()=>a.assign(o._`${e.evaluated}.props`,o._`undefined`))),a.if(o._`${e.evaluated}.dynamicItems`,(()=>a.assign(o._`${e.evaluated}.items`,o._`undefined`)))}(e),A(e),function(e){const{gen:a,schemaEnv:t,validateName:c,ValidationError:f,opts:d}=e;t.$async?a.if(o._`${s.default.errors} === 0`,(()=>a.return(s.default.data)),(()=>a.throw(o._`new ${f}(${s.default.vErrors})`))):(a.assign(o._`${c}.errors`,s.default.vErrors),d.unevaluated&&function({gen:e,evaluated:a,props:t,items:c}){t instanceof o.Name&&e.assign(o._`${a}.props`,t),c instanceof o.Name&&e.assign(o._`${a}.items`,c)}(e),a.return(o._`${s.default.errors} === 0`))}(e)}))}(e):p(e,(()=>(0,c.topBoolOrEmptySchema)(e)))};class C{constructor(e,a,t){if((0,i.validateKeywordUsage)(e,a,t),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=t,this.data=e.data,this.schema=e.schema[t],this.$data=a.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(e,this.schema,t,this.$data),this.schemaType=a.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=a,this.$data)this.schemaCode=e.gen.const("vSchema",S(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,a.schemaType,a.allowUndefined))throw new Error(`${t} value must be ${JSON.stringify(a.schemaType)}`);("code"in a?a.trackErrors:!1!==a.errors)&&(this.errsCount=e.gen.const("_errs",s.default.errors))}result(e,a,t){this.failResult((0,o.not)(e),a,t)}failResult(e,a,t){this.gen.if(e),t?t():this.error(),a?(this.gen.else(),a(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,a){this.failResult((0,o.not)(e),void 0,a)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:a}=this;this.fail(o._`${a} !== undefined && (${(0,o.or)(this.invalid$data(),e)})`)}error(e,a,t){if(a)return this.setParams(a),this._error(e,t),void this.setParams({});this._error(e,t)}_error(e,a){(e?h.reportExtraError:h.reportError)(this,this.def.error,a)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,a){a?Object.assign(this.params,e):this.params=e}block$data(e,a,t=o.nil){this.gen.block((()=>{this.check$data(e,t),a()}))}check$data(e=o.nil,a=o.nil){if(!this.$data)return;const{gen:t,schemaCode:c,schemaType:f,def:d}=this;t.if((0,o.or)(o._`${c} === undefined`,a)),e!==o.nil&&t.assign(e,!0),(f.length||d.validateSchema)&&(t.elseIf(this.invalid$data()),this.$dataError(),e!==o.nil&&t.assign(e,!1)),t.else()}invalid$data(){const{gen:e,schemaCode:a,schemaType:t,def:c,it:f}=this;return(0,o.or)(function(){if(t.length){if(!(a instanceof o.Name))throw new Error("ajv implementation error");const e=Array.isArray(t)?t:[t];return o._`${(0,r.checkDataTypes)(e,a,f.opts.strictNumbers,r.DataType.Wrong)}`}return o.nil}(),function(){if(c.validateSchema){const t=e.scopeValue("validate$data",{ref:c.validateSchema});return o._`!${t}(${a})`}return o.nil}())}subschema(e,a){const t=(0,b.getSubschema)(this.it,e);(0,b.extendSubschemaData)(t,this.it,e),(0,b.extendSubschemaMode)(t,e);const f={...this.it,...t,items:void 0,props:void 0};return function(e,a){x(e)&&(y(e),m(e))?function(e,a){const{schema:t,gen:c,opts:f}=e;f.$comment&&t.$comment&&v(e),function(e){const a=e.schema[e.opts.schemaId];a&&(e.baseId=(0,l.resolveUrl)(e.opts.uriResolver,e.baseId,a))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const d=c.const("_errs",s.default.errors);A(e,d),c.var(a,o._`${d} === ${s.default.errors}`)}(e,a):(0,c.boolOrEmptySchema)(e,a)}(f,a),f}mergeEvaluated(e,a){const{it:t,gen:c}=this;t.opts.unevaluated&&(!0!==t.props&&void 0!==e.props&&(t.props=u.mergeEvaluated.props(c,e.props,t.props,a)),!0!==t.items&&void 0!==e.items&&(t.items=u.mergeEvaluated.items(c,e.items,t.items,a)))}mergeValidEvaluated(e,a){const{it:t,gen:c}=this;if(t.opts.unevaluated&&(!0!==t.props||!0!==t.items))return c.if(a,(()=>this.mergeEvaluated(e,o.Name))),!0}}function M(e,a,t,c){const f=new C(e,t,a);"code"in t?t.code(f,c):f.$data&&t.validate?(0,i.funcKeywordCode)(f,t):"macro"in t?(0,i.macroKeywordCode)(f,t):(t.compile||t.validate)&&(0,i.funcKeywordCode)(f,t)}a.KeywordCxt=C;const B=/^\/(?:[^~]|~0|~1)*$/,L=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function S(e,{dataLevel:a,dataNames:t,dataPathArr:c}){let f,d;if(""===e)return s.default.rootData;if("/"===e[0]){if(!B.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);f=e,d=s.default.rootData}else{const r=L.exec(e);if(!r)throw new Error(`Invalid JSON-pointer: ${e}`);const n=+r[1];if(f=r[2],"#"===f){if(n>=a)throw new Error(i("property/index",n));return c[a-n]}if(n>a)throw new Error(i("data",n));if(d=t[a-n],!f)return d}let r=d;const n=f.split("/");for(const e of n)e&&(d=o._`${d}${(0,o.getProperty)((0,u.unescapeJsonPointer)(e))}`,r=o._`${r} && ${d}`);return r;function i(e,t){return`Cannot access ${e} ${t} levels up, current level is ${a}`}}a.getData=S},33673:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateKeywordUsage=a.validSchemaType=a.funcKeywordCode=a.macroKeywordCode=void 0;const c=t(99029),f=t(42023),d=t(15765),r=t(48708);function n(e){const{gen:a,data:t,it:f}=e;a.if(f.parentData,(()=>a.assign(t,c._`${f.parentData}[${f.parentDataProperty}]`)))}function i(e,a,t){if(void 0===t)throw new Error(`keyword "${a}" failed to compile`);return e.scopeValue("keyword","function"==typeof t?{ref:t}:{ref:t,code:(0,c.stringify)(t)})}a.macroKeywordCode=function(e,a){const{gen:t,keyword:f,schema:d,parentSchema:r,it:n}=e,b=a.macro.call(n.self,d,r,n),o=i(t,f,b);!1!==n.opts.validateSchema&&n.self.validateSchema(b,!0);const s=t.name("valid");e.subschema({schema:b,schemaPath:c.nil,errSchemaPath:`${n.errSchemaPath}/${f}`,topSchemaRef:o,compositeRule:!0},s),e.pass(s,(()=>e.error(!0)))},a.funcKeywordCode=function(e,a){var t;const{gen:b,keyword:o,schema:s,parentSchema:l,$data:u,it:h}=e;!function({schemaEnv:e},a){if(a.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,a);const p=!u&&a.compile?a.compile.call(h.self,s,l,h):a.validate,g=i(b,o,p),m=b.let("valid");function x(t=(a.async?c._`await `:c.nil)){const r=h.opts.passContext?f.default.this:f.default.self,n=!("compile"in a&&!u||!1===a.schema);b.assign(m,c._`${t}${(0,d.callValidateCode)(e,g,r,n)}`,a.modifying)}function y(e){var t;b.if((0,c.not)(null!==(t=a.valid)&&void 0!==t?t:m),e)}e.block$data(m,(function(){if(!1===a.errors)x(),a.modifying&&n(e),y((()=>e.error()));else{const t=a.async?function(){const e=b.let("ruleErrs",null);return b.try((()=>x(c._`await `)),(a=>b.assign(m,!1).if(c._`${a} instanceof ${h.ValidationError}`,(()=>b.assign(e,c._`${a}.errors`)),(()=>b.throw(a))))),e}():function(){const e=c._`${g}.errors`;return b.assign(e,null),x(c.nil),e}();a.modifying&&n(e),y((()=>function(e,a){const{gen:t}=e;t.if(c._`Array.isArray(${a})`,(()=>{t.assign(f.default.vErrors,c._`${f.default.vErrors} === null ? ${a} : ${f.default.vErrors}.concat(${a})`).assign(f.default.errors,c._`${f.default.vErrors}.length`),(0,r.extendErrors)(e)}),(()=>e.error()))}(e,t)))}})),e.ok(null!==(t=a.valid)&&void 0!==t?t:m)},a.validSchemaType=function(e,a,t=!1){return!a.length||a.some((a=>"array"===a?Array.isArray(e):"object"===a?e&&"object"==typeof e&&!Array.isArray(e):typeof e==a||t&&void 0===e))},a.validateKeywordUsage=function({schema:e,opts:a,self:t,errSchemaPath:c},f,d){if(Array.isArray(f.keyword)?!f.keyword.includes(d):f.keyword!==d)throw new Error("ajv implementation error");const r=f.dependencies;if(null==r?void 0:r.some((a=>!Object.prototype.hasOwnProperty.call(e,a))))throw new Error(`parent schema must have dependencies of ${d}: ${r.join(",")}`);if(f.validateSchema&&!f.validateSchema(e[d])){const e=`keyword "${d}" value is invalid at path "${c}": `+t.errorsText(f.validateSchema.errors);if("log"!==a.validateSchema)throw new Error(e);t.logger.error(e)}}},24495:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.extendSubschemaMode=a.extendSubschemaData=a.getSubschema=void 0;const c=t(99029),f=t(94227);a.getSubschema=function(e,{keyword:a,schemaProp:t,schema:d,schemaPath:r,errSchemaPath:n,topSchemaRef:i}){if(void 0!==a&&void 0!==d)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==a){const d=e.schema[a];return void 0===t?{schema:d,schemaPath:c._`${e.schemaPath}${(0,c.getProperty)(a)}`,errSchemaPath:`${e.errSchemaPath}/${a}`}:{schema:d[t],schemaPath:c._`${e.schemaPath}${(0,c.getProperty)(a)}${(0,c.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${a}/${(0,f.escapeFragment)(t)}`}}if(void 0!==d){if(void 0===r||void 0===n||void 0===i)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:d,schemaPath:r,topSchemaRef:i,errSchemaPath:n}}throw new Error('either "keyword" or "schema" must be passed')},a.extendSubschemaData=function(e,a,{dataProp:t,dataPropType:d,data:r,dataTypes:n,propertyName:i}){if(void 0!==r&&void 0!==t)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:b}=a;if(void 0!==t){const{errorPath:r,dataPathArr:n,opts:i}=a;o(b.let("data",c._`${a.data}${(0,c.getProperty)(t)}`,!0)),e.errorPath=c.str`${r}${(0,f.getErrorPath)(t,d,i.jsPropertySyntax)}`,e.parentDataProperty=c._`${t}`,e.dataPathArr=[...n,e.parentDataProperty]}function o(t){e.data=t,e.dataLevel=a.dataLevel+1,e.dataTypes=[],a.definedProperties=new Set,e.parentData=a.data,e.dataNames=[...a.dataNames,t]}void 0!==r&&(o(r instanceof c.Name?r:b.let("data",r,!0)),void 0!==i&&(e.propertyName=i)),n&&(e.dataTypes=n)},a.extendSubschemaMode=function(e,{jtdDiscriminator:a,jtdMetadata:t,compositeRule:c,createErrors:f,allErrors:d}){void 0!==c&&(e.compositeRule=c),void 0!==f&&(e.createErrors=f),void 0!==d&&(e.allErrors=d),e.jtdDiscriminator=a,e.jtdMetadata=t}},4042:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.CodeGen=a.Name=a.nil=a.stringify=a.str=a._=a.KeywordCxt=void 0;var c=t(62586);Object.defineProperty(a,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var f=t(99029);Object.defineProperty(a,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(a,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(a,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(a,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(a,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(a,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});const d=t(13558),r=t(34551),n=t(10396),i=t(73835),b=t(99029),o=t(66939),s=t(10208),l=t(94227),u=t(63837),h=t(55944),p=(e,a)=>new RegExp(e,a);p.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),x={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."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function A(e){var a,t,c,f,d,r,n,i,b,o,s,l,u,g,m,x,y,A,v,w,_,I,E,C,M;const B=e.strict,L=null===(a=e.code)||void 0===a?void 0:a.optimize,S=!0===L||void 0===L?1:L||0,k=null!==(c=null===(t=e.code)||void 0===t?void 0:t.regExp)&&void 0!==c?c:p,N=null!==(f=e.uriResolver)&&void 0!==f?f:h.default;return{strictSchema:null===(r=null!==(d=e.strictSchema)&&void 0!==d?d:B)||void 0===r||r,strictNumbers:null===(i=null!==(n=e.strictNumbers)&&void 0!==n?n:B)||void 0===i||i,strictTypes:null!==(o=null!==(b=e.strictTypes)&&void 0!==b?b:B)&&void 0!==o?o:"log",strictTuples:null!==(l=null!==(s=e.strictTuples)&&void 0!==s?s:B)&&void 0!==l?l:"log",strictRequired:null!==(g=null!==(u=e.strictRequired)&&void 0!==u?u:B)&&void 0!==g&&g,code:e.code?{...e.code,optimize:S,regExp:k}:{optimize:S,regExp:k},loopRequired:null!==(m=e.loopRequired)&&void 0!==m?m:200,loopEnum:null!==(x=e.loopEnum)&&void 0!==x?x:200,meta:null===(y=e.meta)||void 0===y||y,messages:null===(A=e.messages)||void 0===A||A,inlineRefs:null===(v=e.inlineRefs)||void 0===v||v,schemaId:null!==(w=e.schemaId)&&void 0!==w?w:"$id",addUsedSchema:null===(_=e.addUsedSchema)||void 0===_||_,validateSchema:null===(I=e.validateSchema)||void 0===I||I,validateFormats:null===(E=e.validateFormats)||void 0===E||E,unicodeRegExp:null===(C=e.unicodeRegExp)||void 0===C||C,int32range:null===(M=e.int32range)||void 0===M||M,uriResolver:N}}class v{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...A(e)};const{es5:a,lines:t}=this.opts.code;this.scope=new b.ValueScope({scope:{},prefixes:m,es5:a,lines:t}),this.logger=function(e){if(!1===e)return B;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const c=e.validateFormats;e.validateFormats=!1,this.RULES=(0,n.getRules)(),w.call(this,x,e,"NOT SUPPORTED"),w.call(this,y,e,"DEPRECATED","warn"),this._metaOpts=M.call(this),e.formats&&E.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&C.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),I.call(this),e.validateFormats=c}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:a,schemaId:t}=this.opts;let c=u;"id"===t&&(c={...u},c.id=c.$id,delete c.$id),a&&e&&this.addMetaSchema(c,c[t],!1)}defaultMeta(){const{meta:e,schemaId:a}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[a]||e:void 0}validate(e,a){let t;if("string"==typeof e){if(t=this.getSchema(e),!t)throw new Error(`no schema with key or ref "${e}"`)}else t=this.compile(e);const c=t(a);return"$async"in t||(this.errors=t.errors),c}compile(e,a){const t=this._addSchema(e,a);return t.validate||this._compileSchemaEnv(t)}compileAsync(e,a){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:t}=this.opts;return c.call(this,e,a);async function c(e,a){await f.call(this,e.$schema);const t=this._addSchema(e,a);return t.validate||d.call(this,t)}async function f(e){e&&!this.getSchema(e)&&await c.call(this,{$ref:e},!0)}async function d(e){try{return this._compileSchemaEnv(e)}catch(a){if(!(a instanceof r.default))throw a;return n.call(this,a),await i.call(this,a.missingSchema),d.call(this,e)}}function n({missingSchema:e,missingRef:a}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${a} cannot be resolved`)}async function i(e){const t=await b.call(this,e);this.refs[e]||await f.call(this,t.$schema),this.refs[e]||this.addSchema(t,e,a)}async function b(e){const a=this._loading[e];if(a)return a;try{return await(this._loading[e]=t(e))}finally{delete this._loading[e]}}}addSchema(e,a,t,c=this.opts.validateSchema){if(Array.isArray(e)){for(const a of e)this.addSchema(a,void 0,t,c);return this}let f;if("object"==typeof e){const{schemaId:a}=this.opts;if(f=e[a],void 0!==f&&"string"!=typeof f)throw new Error(`schema ${a} must be string`)}return a=(0,o.normalizeId)(a||f),this._checkUnique(a),this.schemas[a]=this._addSchema(e,t,a,c,!0),this}addMetaSchema(e,a,t=this.opts.validateSchema){return this.addSchema(e,a,!0,t),this}validateSchema(e,a){if("boolean"==typeof e)return!0;let t;if(t=e.$schema,void 0!==t&&"string"!=typeof t)throw new Error("$schema must be a string");if(t=t||this.opts.defaultMeta||this.defaultMeta(),!t)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const c=this.validate(t,e);if(!c&&a){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return c}getSchema(e){let a;for(;"string"==typeof(a=_.call(this,e));)e=a;if(void 0===a){const{schemaId:t}=this.opts,c=new i.SchemaEnv({schema:{},schemaId:t});if(a=i.resolveSchema.call(this,c,e),!a)return;this.refs[e]=a}return a.validate||this._compileSchemaEnv(a)}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":{const a=_.call(this,e);return"object"==typeof a&&this._cache.delete(a.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const a=e;this._cache.delete(a);let t=e[this.opts.schemaId];return t&&(t=(0,o.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const a of e)this.addKeyword(a);return this}addKeyword(e,a){let t;if("string"==typeof e)t=e,"object"==typeof a&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),a.keyword=t);else{if("object"!=typeof e||void 0!==a)throw new Error("invalid addKeywords parameters");if(t=(a=e).keyword,Array.isArray(t)&&!t.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(S.call(this,t,a),!a)return(0,l.eachItem)(t,(e=>k.call(this,e))),this;P.call(this,a);const c={...a,type:(0,s.getJSONTypes)(a.type),schemaType:(0,s.getJSONTypes)(a.schemaType)};return(0,l.eachItem)(t,0===c.type.length?e=>k.call(this,e,c):e=>c.type.forEach((a=>k.call(this,e,c,a)))),this}getKeyword(e){const a=this.RULES.all[e];return"object"==typeof a?a.definition:!!a}removeKeyword(e){const{RULES:a}=this;delete a.keywords[e],delete a.all[e];for(const t of a.rules){const a=t.rules.findIndex((a=>a.keyword===e));a>=0&&t.rules.splice(a,1)}return this}addFormat(e,a){return"string"==typeof a&&(a=new RegExp(a)),this.formats[e]=a,this}errorsText(e=this.errors,{separator:a=", ",dataVar:t="data"}={}){return e&&0!==e.length?e.map((e=>`${t}${e.instancePath} ${e.message}`)).reduce(((e,t)=>e+a+t)):"No errors"}$dataMetaSchema(e,a){const t=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const c of a){const a=c.split("/").slice(1);let f=e;for(const e of a)f=f[e];for(const e in t){const a=t[e];if("object"!=typeof a)continue;const{$data:c}=a.definition,d=f[e];c&&d&&(f[e]=O(d))}}return e}_removeAllSchemas(e,a){for(const t in e){const c=e[t];a&&!a.test(t)||("string"==typeof c?delete e[t]:c&&!c.meta&&(this._cache.delete(c.schema),delete e[t]))}}_addSchema(e,a,t,c=this.opts.validateSchema,f=this.opts.addUsedSchema){let d;const{schemaId:r}=this.opts;if("object"==typeof e)d=e[r];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let n=this._cache.get(e);if(void 0!==n)return n;t=(0,o.normalizeId)(d||t);const b=o.getSchemaRefs.call(this,e,t);return n=new i.SchemaEnv({schema:e,schemaId:r,meta:a,baseId:t,localRefs:b}),this._cache.set(n.schema,n),f&&!t.startsWith("#")&&(t&&this._checkUnique(t),this.refs[t]=n),c&&this.validateSchema(e,!0),n}_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):i.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const a=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,e)}finally{this.opts=a}}}function w(e,a,t,c="error"){for(const f in e){const d=f;d in a&&this.logger[c](`${t}: option ${f}. ${e[d]}`)}}function _(e){return e=(0,o.normalizeId)(e),this.schemas[e]||this.refs[e]}function I(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const a in e)this.addSchema(e[a],a)}function E(){for(const e in this.opts.formats){const a=this.opts.formats[e];a&&this.addFormat(e,a)}}function C(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const a in e){const t=e[a];t.keyword||(t.keyword=a),this.addKeyword(t)}}}function M(){const e={...this.opts};for(const a of g)delete e[a];return e}v.ValidationError=d.default,v.MissingRefError=r.default,a.default=v;const B={log(){},warn(){},error(){}},L=/^[a-z_$][a-z0-9_$:-]*$/i;function S(e,a){const{RULES:t}=this;if((0,l.eachItem)(e,(e=>{if(t.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!L.test(e))throw new Error(`Keyword ${e} has invalid name`)})),a&&a.$data&&!("code"in a)&&!("validate"in a))throw new Error('$data keyword must have "code" or "validate" function')}function k(e,a,t){var c;const f=null==a?void 0:a.post;if(t&&f)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:d}=this;let r=f?d.post:d.rules.find((({type:e})=>e===t));if(r||(r={type:t,rules:[]},d.rules.push(r)),d.keywords[e]=!0,!a)return;const n={keyword:e,definition:{...a,type:(0,s.getJSONTypes)(a.type),schemaType:(0,s.getJSONTypes)(a.schemaType)}};a.before?N.call(this,r,n,a.before):r.rules.push(n),d.all[e]=n,null===(c=a.implements)||void 0===c||c.forEach((e=>this.addKeyword(e)))}function N(e,a,t){const c=e.rules.findIndex((e=>e.keyword===t));c>=0?e.rules.splice(c,0,a):(e.rules.push(a),this.logger.warn(`rule ${t} is not defined`))}function P(e){let{metaSchema:a}=e;void 0!==a&&(e.$data&&this.opts.$data&&(a=O(a)),e.validateSchema=this.compile(a,!0))}const R={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function O(e){return{anyOf:[e,R]}}},76250:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(32017);c.code='require("ajv/dist/runtime/equal").default',a.default=c},53853:(e,a)=>{"use strict";function t(e){const a=e.length;let t,c=0,f=0;for(;f=55296&&t<=56319&&f{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(48343);c.code='require("ajv/dist/runtime/uri").default',a.default=c},13558:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});class t extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}a.default=t},15457:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateAdditionalItems=void 0;const c=t(99029),f=t(94227),d={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>c.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>c._`{limit: ${e}}`},code(e){const{parentSchema:a,it:t}=e,{items:c}=a;Array.isArray(c)?r(e,c):(0,f.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas')}};function r(e,a){const{gen:t,schema:d,data:r,keyword:n,it:i}=e;i.items=!0;const b=t.const("len",c._`${r}.length`);if(!1===d)e.setParams({len:a.length}),e.pass(c._`${b} <= ${a.length}`);else if("object"==typeof d&&!(0,f.alwaysValidSchema)(i,d)){const d=t.var("valid",c._`${b} <= ${a.length}`);t.if((0,c.not)(d),(()=>function(d){t.forRange("i",a.length,b,(a=>{e.subschema({keyword:n,dataProp:a,dataPropType:f.Type.Num},d),i.allErrors||t.if((0,c.not)(d),(()=>t.break()))}))}(d))),e.ok(d)}}a.validateAdditionalItems=r,a.default=d},38660:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(15765),f=t(99029),d=t(42023),r=t(94227),n={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>f._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:a,schema:t,parentSchema:n,data:i,errsCount:b,it:o}=e;if(!b)throw new Error("ajv implementation error");const{allErrors:s,opts:l}=o;if(o.props=!0,"all"!==l.removeAdditional&&(0,r.alwaysValidSchema)(o,t))return;const u=(0,c.allSchemaProperties)(n.properties),h=(0,c.allSchemaProperties)(n.patternProperties);function p(e){a.code(f._`delete ${i}[${e}]`)}function g(c){if("all"===l.removeAdditional||l.removeAdditional&&!1===t)p(c);else{if(!1===t)return e.setParams({additionalProperty:c}),e.error(),void(s||a.break());if("object"==typeof t&&!(0,r.alwaysValidSchema)(o,t)){const t=a.name("valid");"failing"===l.removeAdditional?(m(c,t,!1),a.if((0,f.not)(t),(()=>{e.reset(),p(c)}))):(m(c,t),s||a.if((0,f.not)(t),(()=>a.break())))}}}function m(a,t,c){const f={keyword:"additionalProperties",dataProp:a,dataPropType:r.Type.Str};!1===c&&Object.assign(f,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(f,t)}a.forIn("key",i,(t=>{u.length||h.length?a.if(function(t){let d;if(u.length>8){const e=(0,r.schemaRefOrVal)(o,n.properties,"properties");d=(0,c.isOwnProperty)(a,e,t)}else d=u.length?(0,f.or)(...u.map((e=>f._`${t} === ${e}`))):f.nil;return h.length&&(d=(0,f.or)(d,...h.map((a=>f._`${(0,c.usePattern)(e,a)}.test(${t})`)))),(0,f.not)(d)}(t),(()=>g(t))):g(t)})),e.ok(f._`${b} === ${d.default.errors}`)}};a.default=n},15844:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(94227),f={keyword:"allOf",schemaType:"array",code(e){const{gen:a,schema:t,it:f}=e;if(!Array.isArray(t))throw new Error("ajv implementation error");const d=a.name("valid");t.forEach(((a,t)=>{if((0,c.alwaysValidSchema)(f,a))return;const r=e.subschema({keyword:"allOf",schemaProp:t},d);e.ok(d),e.mergeEvaluated(r)}))}};a.default=f},16505:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:t(15765).validateUnion,error:{message:"must match a schema in anyOf"}};a.default=c},12661:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:a}})=>void 0===a?c.str`must contain at least ${e} valid item(s)`:c.str`must contain at least ${e} and no more than ${a} valid item(s)`,params:({params:{min:e,max:a}})=>void 0===a?c._`{minContains: ${e}}`:c._`{minContains: ${e}, maxContains: ${a}}`},code(e){const{gen:a,schema:t,parentSchema:d,data:r,it:n}=e;let i,b;const{minContains:o,maxContains:s}=d;n.opts.next?(i=void 0===o?1:o,b=s):i=1;const l=a.const("len",c._`${r}.length`);if(e.setParams({min:i,max:b}),void 0===b&&0===i)return void(0,f.checkStrictMode)(n,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==b&&i>b)return(0,f.checkStrictMode)(n,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,f.alwaysValidSchema)(n,t)){let a=c._`${l} >= ${i}`;return void 0!==b&&(a=c._`${a} && ${l} <= ${b}`),void e.pass(a)}n.items=!0;const u=a.name("valid");function h(){const e=a.name("_valid"),t=a.let("count",0);p(e,(()=>a.if(e,(()=>function(e){a.code(c._`${e}++`),void 0===b?a.if(c._`${e} >= ${i}`,(()=>a.assign(u,!0).break())):(a.if(c._`${e} > ${b}`,(()=>a.assign(u,!1).break())),1===i?a.assign(u,!0):a.if(c._`${e} >= ${i}`,(()=>a.assign(u,!0))))}(t)))))}function p(t,c){a.forRange("i",0,l,(a=>{e.subschema({keyword:"contains",dataProp:a,dataPropType:f.Type.Num,compositeRule:!0},t),c()}))}void 0===b&&1===i?p(u,(()=>a.if(u,(()=>a.break())))):0===i?(a.let(u,!0),void 0!==b&&a.if(c._`${r}.length > 0`,h)):(a.let(u,!1),h()),e.result(u,(()=>e.reset()))}};a.default=d},83025:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateSchemaDeps=a.validatePropertyDeps=a.error=void 0;const c=t(99029),f=t(94227),d=t(15765);a.error={message:({params:{property:e,depsCount:a,deps:t}})=>{const f=1===a?"property":"properties";return c.str`must have ${f} ${t} when property ${e} is present`},params:({params:{property:e,depsCount:a,deps:t,missingProperty:f}})=>c._`{property: ${e},
missingProperty: ${f},
depsCount: ${a},
- deps: ${t}}`};const r={keyword:"dependencies",type:"object",schemaType:"object",error:a.error,code(e){const[a,t]=function({schema:e}){const a={},t={};for(const c in e)"__proto__"!==c&&((Array.isArray(e[c])?a:t)[c]=e[c]);return[a,t]}(e);n(e,a),i(e,t)}};function n(e,a=e.schema){const{gen:t,data:f,it:r}=e;if(0===Object.keys(a).length)return;const n=t.let("missing");for(const i in a){const b=a[i];if(0===b.length)continue;const o=(0,d.propertyInData)(t,f,i,r.opts.ownProperties);e.setParams({property:i,depsCount:b.length,deps:b.join(", ")}),r.allErrors?t.if(o,(()=>{for(const a of b)(0,d.checkReportMissingProp)(e,a)})):(t.if(c._`${o} && (${(0,d.checkMissingProp)(e,b,n)})`),(0,d.reportMissingProp)(e,n),t.else())}}function i(e,a=e.schema){const{gen:t,data:c,keyword:r,it:n}=e,i=t.name("valid");for(const b in a)(0,f.alwaysValidSchema)(n,a[b])||(t.if((0,d.propertyInData)(t,c,b,n.opts.ownProperties),(()=>{const a=e.subschema({keyword:r,schemaProp:b},i);e.mergeValidEvaluated(a,i)}),(()=>t.var(i,!0))),e.ok(i))}a.validatePropertyDeps=n,a.validateSchemaDeps=i,a.default=r},1239:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>c.str`must match "${e.ifClause}" schema`,params:({params:e})=>c._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:a,parentSchema:t,it:d}=e;void 0===t.then&&void 0===t.else&&(0,f.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const n=r(d,"then"),i=r(d,"else");if(!n&&!i)return;const b=a.let("valid",!0),o=a.name("_valid");if(function(){const a=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);e.mergeEvaluated(a)}(),e.reset(),n&&i){const t=a.let("ifClause");e.setParams({ifClause:t}),a.if(o,s("then",t),s("else",t))}else n?a.if(o,s("then")):a.if((0,c.not)(o),s("else"));function s(t,f){return()=>{const d=e.subschema({keyword:t},o);a.assign(b,o),e.mergeValidEvaluated(d,b),f?a.assign(f,c._`${t}`):e.setParams({ifClause:t})}}e.pass(b,(()=>e.error(!0)))}};function r(e,a){const t=e.schema[a];return void 0!==t&&!(0,f.alwaysValidSchema)(e,t)}a.default=d},56378:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(15457),f=t(65354),d=t(20494),r=t(93966),n=t(12661),i=t(83025),b=t(19713),o=t(38660),s=t(40117),l=t(45333),u=t(57923),h=t(16505),p=t(96163),g=t(15844),m=t(1239),x=t(14426);a.default=function(e=!1){const a=[u.default,h.default,p.default,g.default,m.default,x.default,b.default,o.default,i.default,s.default,l.default];return e?a.push(f.default,r.default):a.push(c.default,d.default),a.push(n.default),a}},20494:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateTuple=void 0;const c=t(99029),f=t(94227),d=t(15765),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:a,it:t}=e;if(Array.isArray(a))return n(e,"additionalItems",a);t.items=!0,(0,f.alwaysValidSchema)(t,a)||e.ok((0,d.validateArray)(e))}};function n(e,a,t=e.schema){const{gen:d,parentSchema:r,data:n,keyword:i,it:b}=e;!function(e){const{opts:c,errSchemaPath:d}=b,r=t.length,n=r===e.minItems&&(r===e.maxItems||!1===e[a]);if(c.strictTuples&&!n){const e=`"${i}" is ${r}-tuple, but minItems or maxItems/${a} are not specified or different at path "${d}"`;(0,f.checkStrictMode)(b,e,c.strictTuples)}}(r),b.opts.unevaluated&&t.length&&!0!==b.items&&(b.items=f.mergeEvaluated.items(d,t.length,b.items));const o=d.name("valid"),s=d.const("len",c._`${n}.length`);t.forEach(((a,t)=>{(0,f.alwaysValidSchema)(b,a)||(d.if(c._`${s} > ${t}`,(()=>e.subschema({keyword:i,schemaProp:t,dataProp:t},o))),e.ok(o))}))}a.validateTuple=n,a.default=r},93966:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d=t(15765),r=t(15457),n={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>c.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>c._`{limit: ${e}}`},code(e){const{schema:a,parentSchema:t,it:c}=e,{prefixItems:n}=t;c.items=!0,(0,f.alwaysValidSchema)(c,a)||(n?(0,r.validateAdditionalItems)(e,n):e.ok((0,d.validateArray)(e)))}};a.default=n},57923:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(94227),f={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:a,schema:t,it:f}=e;if((0,c.alwaysValidSchema)(f,t))return void e.fail();const d=a.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},d),e.failResult(d,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};a.default=f},96163:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>c._`{passingSchemas: ${e.passing}}`},code(e){const{gen:a,schema:t,parentSchema:d,it:r}=e;if(!Array.isArray(t))throw new Error("ajv implementation error");if(r.opts.discriminator&&d.discriminator)return;const n=t,i=a.let("valid",!1),b=a.let("passing",null),o=a.name("_valid");e.setParams({passing:b}),a.block((function(){n.forEach(((t,d)=>{let n;(0,f.alwaysValidSchema)(r,t)?a.var(o,!0):n=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},o),d>0&&a.if(c._`${o} && ${i}`).assign(i,!1).assign(b,c._`[${b}, ${d}]`).else(),a.if(o,(()=>{a.assign(i,!0),a.assign(b,d),n&&e.mergeEvaluated(n,c.Name)}))}))})),e.result(i,(()=>e.reset()),(()=>e.error(!0)))}};a.default=d},45333:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(15765),f=t(99029),d=t(94227),r=t(94227),n={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:a,schema:t,data:n,parentSchema:i,it:b}=e,{opts:o}=b,s=(0,c.allSchemaProperties)(t),l=s.filter((e=>(0,d.alwaysValidSchema)(b,t[e])));if(0===s.length||l.length===s.length&&(!b.opts.unevaluated||!0===b.props))return;const u=o.strictSchema&&!o.allowMatchingProperties&&i.properties,h=a.name("valid");!0===b.props||b.props instanceof f.Name||(b.props=(0,r.evaluatedPropsToName)(a,b.props));const{props:p}=b;function g(e){for(const a in u)new RegExp(e).test(a)&&(0,d.checkStrictMode)(b,`property ${a} matches pattern ${e} (use allowMatchingProperties)`)}function m(t){a.forIn("key",n,(d=>{a.if(f._`${(0,c.usePattern)(e,t)}.test(${d})`,(()=>{const c=l.includes(t);c||e.subschema({keyword:"patternProperties",schemaProp:t,dataProp:d,dataPropType:r.Type.Str},h),b.opts.unevaluated&&!0!==p?a.assign(f._`${p}[${d}]`,!0):c||b.allErrors||a.if((0,f.not)(h),(()=>a.break()))}))}))}!function(){for(const e of s)u&&g(e),b.allErrors?m(e):(a.var(h,!0),m(e),a.if(h))}()}};a.default=n},65354:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(20494),f={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,c.validateTuple)(e,"items")};a.default=f},40117:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(62586),f=t(15765),d=t(94227),r=t(38660),n={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:a,schema:t,parentSchema:n,data:i,it:b}=e;"all"===b.opts.removeAdditional&&void 0===n.additionalProperties&&r.default.code(new c.KeywordCxt(b,r.default,"additionalProperties"));const o=(0,f.allSchemaProperties)(t);for(const e of o)b.definedProperties.add(e);b.opts.unevaluated&&o.length&&!0!==b.props&&(b.props=d.mergeEvaluated.props(a,(0,d.toHash)(o),b.props));const s=o.filter((e=>!(0,d.alwaysValidSchema)(b,t[e])));if(0===s.length)return;const l=a.name("valid");for(const t of s)u(t)?h(t):(a.if((0,f.propertyInData)(a,i,t,b.opts.ownProperties)),h(t),b.allErrors||a.else().var(l,!0),a.endIf()),e.it.definedProperties.add(t),e.ok(l);function u(e){return b.opts.useDefaults&&!b.compositeRule&&void 0!==t[e].default}function h(a){e.subschema({keyword:"properties",schemaProp:a,dataProp:a},l)}}};a.default=n},19713:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>c._`{propertyName: ${e.propertyName}}`},code(e){const{gen:a,schema:t,data:d,it:r}=e;if((0,f.alwaysValidSchema)(r,t))return;const n=a.name("valid");a.forIn("key",d,(t=>{e.setParams({propertyName:t}),e.subschema({keyword:"propertyNames",data:t,dataTypes:["string"],propertyName:t,compositeRule:!0},n),a.if((0,c.not)(n),(()=>{e.error(!0),r.allErrors||a.break()}))})),e.ok(n)}};a.default=d},14426:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(94227),f={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:a,it:t}){void 0===a.if&&(0,c.checkStrictMode)(t,`"${e}" without "if" is ignored`)}};a.default=f},15765:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.validateUnion=a.validateArray=a.usePattern=a.callValidateCode=a.schemaProperties=a.allSchemaProperties=a.noPropertyInData=a.propertyInData=a.isOwnProperty=a.hasPropFunc=a.reportMissingProp=a.checkMissingProp=a.checkReportMissingProp=void 0;const c=t(99029),f=t(94227),d=t(42023),r=t(94227);function n(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:c._`Object.prototype.hasOwnProperty`})}function i(e,a,t){return c._`${n(e)}.call(${a}, ${t})`}function b(e,a,t,f){const d=c._`${a}${(0,c.getProperty)(t)} === undefined`;return f?(0,c.or)(d,(0,c.not)(i(e,a,t))):d}function o(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}a.checkReportMissingProp=function(e,a){const{gen:t,data:f,it:d}=e;t.if(b(t,f,a,d.opts.ownProperties),(()=>{e.setParams({missingProperty:c._`${a}`},!0),e.error()}))},a.checkMissingProp=function({gen:e,data:a,it:{opts:t}},f,d){return(0,c.or)(...f.map((f=>(0,c.and)(b(e,a,f,t.ownProperties),c._`${d} = ${f}`))))},a.reportMissingProp=function(e,a){e.setParams({missingProperty:a},!0),e.error()},a.hasPropFunc=n,a.isOwnProperty=i,a.propertyInData=function(e,a,t,f){const d=c._`${a}${(0,c.getProperty)(t)} !== undefined`;return f?c._`${d} && ${i(e,a,t)}`:d},a.noPropertyInData=b,a.allSchemaProperties=o,a.schemaProperties=function(e,a){return o(a).filter((t=>!(0,f.alwaysValidSchema)(e,a[t])))},a.callValidateCode=function({schemaCode:e,data:a,it:{gen:t,topSchemaRef:f,schemaPath:r,errorPath:n},it:i},b,o,s){const l=s?c._`${e}, ${a}, ${f}${r}`:a,u=[[d.default.instancePath,(0,c.strConcat)(d.default.instancePath,n)],[d.default.parentData,i.parentData],[d.default.parentDataProperty,i.parentDataProperty],[d.default.rootData,d.default.rootData]];i.opts.dynamicRef&&u.push([d.default.dynamicAnchors,d.default.dynamicAnchors]);const h=c._`${l}, ${t.object(...u)}`;return o!==c.nil?c._`${b}.call(${o}, ${h})`:c._`${b}(${h})`};const s=c._`new RegExp`;a.usePattern=function({gen:e,it:{opts:a}},t){const f=a.unicodeRegExp?"u":"",{regExp:d}=a.code,n=d(t,f);return e.scopeValue("pattern",{key:n.toString(),ref:n,code:c._`${"new RegExp"===d.code?s:(0,r.useFunc)(e,d)}(${t}, ${f})`})},a.validateArray=function(e){const{gen:a,data:t,keyword:d,it:r}=e,n=a.name("valid");if(r.allErrors){const e=a.let("valid",!0);return i((()=>a.assign(e,!1))),e}return a.var(n,!0),i((()=>a.break())),n;function i(r){const i=a.const("len",c._`${t}.length`);a.forRange("i",0,i,(t=>{e.subschema({keyword:d,dataProp:t,dataPropType:f.Type.Num},n),a.if((0,c.not)(n),r)}))}},a.validateUnion=function(e){const{gen:a,schema:t,keyword:d,it:r}=e;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some((e=>(0,f.alwaysValidSchema)(r,e)))&&!r.opts.unevaluated)return;const n=a.let("valid",!1),i=a.name("_valid");a.block((()=>t.forEach(((t,f)=>{const r=e.subschema({keyword:d,schemaProp:f,compositeRule:!0},i);a.assign(n,c._`${n} || ${i}`),e.mergeValidEvaluated(r,i)||a.if((0,c.not)(n))})))),e.result(n,(()=>e.reset()),(()=>e.error(!0)))}},83463:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};a.default=t},72128:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(83463),f=t(13693),d=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",c.default,f.default];a.default=d},13693:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.callRef=a.getValidate=void 0;const c=t(34551),f=t(15765),d=t(99029),r=t(42023),n=t(73835),i=t(94227),b={keyword:"$ref",schemaType:"string",code(e){const{gen:a,schema:t,it:f}=e,{baseId:r,schemaEnv:i,validateName:b,opts:l,self:u}=f,{root:h}=i;if(("#"===t||"#/"===t)&&r===h.baseId)return function(){if(i===h)return s(e,b,i,i.$async);const t=a.scopeValue("root",{ref:h});return s(e,d._`${t}.validate`,h,h.$async)}();const p=n.resolveRef.call(u,h,r,t);if(void 0===p)throw new c.default(f.opts.uriResolver,r,t);return p instanceof n.SchemaEnv?function(a){const t=o(e,a);s(e,t,a,a.$async)}(p):function(c){const f=a.scopeValue("schema",!0===l.code.source?{ref:c,code:(0,d.stringify)(c)}:{ref:c}),r=a.name("valid"),n=e.subschema({schema:c,dataTypes:[],schemaPath:d.nil,topSchemaRef:f,errSchemaPath:t},r);e.mergeEvaluated(n),e.ok(r)}(p)}};function o(e,a){const{gen:t}=e;return a.validate?t.scopeValue("validate",{ref:a.validate}):d._`${t.scopeValue("wrapper",{ref:a})}.validate`}function s(e,a,t,c){const{gen:n,it:b}=e,{allErrors:o,schemaEnv:s,opts:l}=b,u=l.passContext?r.default.this:d.nil;function h(e){const a=d._`${e}.errors`;n.assign(r.default.vErrors,d._`${r.default.vErrors} === null ? ${a} : ${r.default.vErrors}.concat(${a})`),n.assign(r.default.errors,d._`${r.default.vErrors}.length`)}function p(e){var a;if(!b.opts.unevaluated)return;const c=null===(a=null==t?void 0:t.validate)||void 0===a?void 0:a.evaluated;if(!0!==b.props)if(c&&!c.dynamicProps)void 0!==c.props&&(b.props=i.mergeEvaluated.props(n,c.props,b.props));else{const a=n.var("props",d._`${e}.evaluated.props`);b.props=i.mergeEvaluated.props(n,a,b.props,d.Name)}if(!0!==b.items)if(c&&!c.dynamicItems)void 0!==c.items&&(b.items=i.mergeEvaluated.items(n,c.items,b.items));else{const a=n.var("items",d._`${e}.evaluated.items`);b.items=i.mergeEvaluated.items(n,a,b.items,d.Name)}}c?function(){if(!s.$async)throw new Error("async schema referenced by sync schema");const t=n.let("valid");n.try((()=>{n.code(d._`await ${(0,f.callValidateCode)(e,a,u)}`),p(a),o||n.assign(t,!0)}),(e=>{n.if(d._`!(${e} instanceof ${b.ValidationError})`,(()=>n.throw(e))),h(e),o||n.assign(t,!1)})),e.ok(t)}():e.result((0,f.callValidateCode)(e,a,u),(()=>p(a)),(()=>h(a)))}a.getValidate=o,a.callRef=s,a.default=b},36653:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(97652),d=t(73835),r=t(34551),n=t(94227),i={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:a}})=>e===f.DiscrError.Tag?`tag "${a}" must be string`:`value of tag "${a}" must be in oneOf`,params:({params:{discrError:e,tag:a,tagName:t}})=>c._`{error: ${e}, tag: ${t}, tagValue: ${a}}`},code(e){const{gen:a,data:t,schema:i,parentSchema:b,it:o}=e,{oneOf:s}=b;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");const l=i.propertyName;if("string"!=typeof l)throw new Error("discriminator: requires propertyName");if(i.mapping)throw new Error("discriminator: mapping is not supported");if(!s)throw new Error("discriminator: requires oneOf keyword");const u=a.let("valid",!1),h=a.const("tag",c._`${t}${(0,c.getProperty)(l)}`);function p(t){const f=a.name("valid"),d=e.subschema({keyword:"oneOf",schemaProp:t},f);return e.mergeEvaluated(d,c.Name),f}a.if(c._`typeof ${h} == "string"`,(()=>function(){const t=function(){var e;const a={},t=f(b);let c=!0;for(let a=0;ae.error(!1,{discrError:f.DiscrError.Tag,tag:h,tagName:l}))),e.ok(u)}};a.default=i},97652:(e,a)=>{"use strict";var t;Object.defineProperty(a,"__esModule",{value:!0}),a.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t||(a.DiscrError=t={}))},86144:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(72128),f=t(67060),d=t(56378),r=t(97532),n=t(69857),i=[c.default,f.default,(0,d.default)(),r.default,n.metadataVocabulary,n.contentVocabulary];a.default=i},94737:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>c.str`must match format "${e}"`,params:({schemaCode:e})=>c._`{format: ${e}}`},code(e,a){const{gen:t,data:f,$data:d,schema:r,schemaCode:n,it:i}=e,{opts:b,errSchemaPath:o,schemaEnv:s,self:l}=i;b.validateFormats&&(d?function(){const d=t.scopeValue("formats",{ref:l.formats,code:b.code.formats}),r=t.const("fDef",c._`${d}[${n}]`),i=t.let("fType"),o=t.let("format");t.if(c._`typeof ${r} == "object" && !(${r} instanceof RegExp)`,(()=>t.assign(i,c._`${r}.type || "string"`).assign(o,c._`${r}.validate`)),(()=>t.assign(i,c._`"string"`).assign(o,r))),e.fail$data((0,c.or)(!1===b.strictSchema?c.nil:c._`${n} && !${o}`,function(){const e=s.$async?c._`(${r}.async ? await ${o}(${f}) : ${o}(${f}))`:c._`${o}(${f})`,t=c._`(typeof ${o} == "function" ? ${e} : ${o}.test(${f}))`;return c._`${o} && ${o} !== true && ${i} === ${a} && !${t}`}()))}():function(){const d=l.formats[r];if(!d)return void function(){if(!1!==b.strictSchema)throw new Error(e());function e(){return`unknown format "${r}" ignored in schema at path "${o}"`}l.logger.warn(e())}();if(!0===d)return;const[n,i,u]=function(e){const a=e instanceof RegExp?(0,c.regexpCode)(e):b.code.formats?c._`${b.code.formats}${(0,c.getProperty)(r)}`:void 0,f=t.scopeValue("formats",{key:r,ref:e,code:a});return"object"!=typeof e||e instanceof RegExp?["string",e,f]:[e.type||"string",e.validate,c._`${f}.validate`]}(d);n===a&&e.pass(function(){if("object"==typeof d&&!(d instanceof RegExp)&&d.async){if(!s.$async)throw new Error("async format in sync schema");return c._`await ${u}(${f})`}return"function"==typeof i?c._`${u}(${f})`:c._`${u}.test(${f})`}())}())}};a.default=f},97532:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=[t(94737).default];a.default=c},69857:(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.contentVocabulary=a.metadataVocabulary=void 0,a.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],a.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},27935:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d=t(76250),r={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>c._`{allowedValue: ${e}}`},code(e){const{gen:a,data:t,$data:r,schemaCode:n,schema:i}=e;r||i&&"object"==typeof i?e.fail$data(c._`!${(0,f.useFunc)(a,d.default)}(${t}, ${n})`):e.fail(c._`${i} !== ${t}`)}};a.default=r},28643:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d=t(76250),r={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>c._`{allowedValues: ${e}}`},code(e){const{gen:a,data:t,$data:r,schema:n,schemaCode:i,it:b}=e;if(!r&&0===n.length)throw new Error("enum must have non-empty array");const o=n.length>=b.opts.loopEnum;let s;const l=()=>null!=s?s:s=(0,f.useFunc)(a,d.default);let u;if(o||r)u=a.let("valid"),e.block$data(u,(function(){a.assign(u,!1),a.forOf("v",i,(e=>a.if(c._`${l()}(${t}, ${e})`,(()=>a.assign(u,!0).break()))))}));else{if(!Array.isArray(n))throw new Error("ajv implementation error");const e=a.const("vSchema",i);u=(0,c.or)(...n.map(((a,f)=>function(e,a){const f=n[a];return"object"==typeof f&&null!==f?c._`${l()}(${t}, ${e}[${a}])`:c._`${t} === ${f}`}(e,f))))}e.pass(u)}};a.default=r},67060:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(75882),f=t(63439),d=t(77307),r=t(90422),n=t(34486),i=t(34003),b=t(61163),o=t(60617),s=t(27935),l=t(28643),u=[c.default,f.default,d.default,r.default,n.default,i.default,b.default,o.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},s.default,l.default];a.default=u},61163:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:a}){const t="maxItems"===e?"more":"fewer";return c.str`must NOT have ${t} than ${a} items`},params:({schemaCode:e})=>c._`{limit: ${e}}`},code(e){const{keyword:a,data:t,schemaCode:f}=e,d="maxItems"===a?c.operators.GT:c.operators.LT;e.fail$data(c._`${t}.length ${d} ${f}`)}};a.default=f},77307:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=t(94227),d=t(53853),r={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:a}){const t="maxLength"===e?"more":"fewer";return c.str`must NOT have ${t} than ${a} characters`},params:({schemaCode:e})=>c._`{limit: ${e}}`},code(e){const{keyword:a,data:t,schemaCode:r,it:n}=e,i="maxLength"===a?c.operators.GT:c.operators.LT,b=!1===n.opts.unicode?c._`${t}.length`:c._`${(0,f.useFunc)(e.gen,d.default)}(${t})`;e.fail$data(c._`${b} ${i} ${r}`)}};a.default=r},75882:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f=c.operators,d={maximum:{okStr:"<=",ok:f.LTE,fail:f.GT},minimum:{okStr:">=",ok:f.GTE,fail:f.LT},exclusiveMaximum:{okStr:"<",ok:f.LT,fail:f.GTE},exclusiveMinimum:{okStr:">",ok:f.GT,fail:f.LTE}},r={message:({keyword:e,schemaCode:a})=>c.str`must be ${d[e].okStr} ${a}`,params:({keyword:e,schemaCode:a})=>c._`{comparison: ${d[e].okStr}, limit: ${a}}`},n={keyword:Object.keys(d),type:"number",schemaType:"number",$data:!0,error:r,code(e){const{keyword:a,data:t,schemaCode:f}=e;e.fail$data(c._`${t} ${d[a].fail} ${f} || isNaN(${t})`)}};a.default=n},34486:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:a}){const t="maxProperties"===e?"more":"fewer";return c.str`must NOT have ${t} than ${a} properties`},params:({schemaCode:e})=>c._`{limit: ${e}}`},code(e){const{keyword:a,data:t,schemaCode:f}=e,d="maxProperties"===a?c.operators.GT:c.operators.LT;e.fail$data(c._`Object.keys(${t}).length ${d} ${f}`)}};a.default=f},63439:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(99029),f={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>c.str`must be multiple of ${e}`,params:({schemaCode:e})=>c._`{multipleOf: ${e}}`},code(e){const{gen:a,data:t,schemaCode:f,it:d}=e,r=d.opts.multipleOfPrecision,n=a.let("res"),i=r?c._`Math.abs(Math.round(${n}) - ${n}) > 1e-${r}`:c._`${n} !== parseInt(${n})`;e.fail$data(c._`(${f} === 0 || (${n} = ${t}/${f}, ${i}))`)}};a.default=f},90422:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(15765),f=t(99029),d={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>f.str`must match pattern "${e}"`,params:({schemaCode:e})=>f._`{pattern: ${e}}`},code(e){const{data:a,$data:t,schema:d,schemaCode:r,it:n}=e,i=n.opts.unicodeRegExp?"u":"",b=t?f._`(new RegExp(${r}, ${i}))`:(0,c.usePattern)(e,d);e.fail$data(f._`!${b}.test(${a})`)}};a.default=d},34003:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(15765),f=t(99029),d=t(94227),r={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>f.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>f._`{missingProperty: ${e}}`},code(e){const{gen:a,schema:t,schemaCode:r,data:n,$data:i,it:b}=e,{opts:o}=b;if(!i&&0===t.length)return;const s=t.length>=o.loopRequired;if(b.allErrors?function(){if(s||i)e.block$data(f.nil,l);else for(const a of t)(0,c.checkReportMissingProp)(e,a)}():function(){const d=a.let("missing");if(s||i){const t=a.let("valid",!0);e.block$data(t,(()=>function(t,d){e.setParams({missingProperty:t}),a.forOf(t,r,(()=>{a.assign(d,(0,c.propertyInData)(a,n,t,o.ownProperties)),a.if((0,f.not)(d),(()=>{e.error(),a.break()}))}),f.nil)}(d,t))),e.ok(t)}else a.if((0,c.checkMissingProp)(e,t,d)),(0,c.reportMissingProp)(e,d),a.else()}(),o.strictRequired){const a=e.parentSchema.properties,{definedProperties:c}=e.it;for(const e of t)if(void 0===(null==a?void 0:a[e])&&!c.has(e)){const a=`required property "${e}" is not defined at "${b.schemaEnv.baseId+b.errSchemaPath}" (strictRequired)`;(0,d.checkStrictMode)(b,a,b.opts.strictRequired)}}function l(){a.forOf("prop",r,(t=>{e.setParams({missingProperty:t}),a.if((0,c.noPropertyInData)(a,n,t,o.ownProperties),(()=>e.error()))}))}}};a.default=r},60617:(e,a,t)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});const c=t(10208),f=t(99029),d=t(94227),r=t(76250),n={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:a}})=>f.str`must NOT have duplicate items (items ## ${a} and ${e} are identical)`,params:({params:{i:e,j:a}})=>f._`{i: ${e}, j: ${a}}`},code(e){const{gen:a,data:t,$data:n,schema:i,parentSchema:b,schemaCode:o,it:s}=e;if(!n&&!i)return;const l=a.let("valid"),u=b.items?(0,c.getSchemaTypes)(b.items):[];function h(d,r){const n=a.name("item"),i=(0,c.checkDataTypes)(u,n,s.opts.strictNumbers,c.DataType.Wrong),b=a.const("indices",f._`{}`);a.for(f._`;${d}--;`,(()=>{a.let(n,f._`${t}[${d}]`),a.if(i,f._`continue`),u.length>1&&a.if(f._`typeof ${n} == "string"`,f._`${n} += "_"`),a.if(f._`typeof ${b}[${n}] == "number"`,(()=>{a.assign(r,f._`${b}[${n}]`),e.error(),a.assign(l,!1).break()})).code(f._`${b}[${n}] = ${d}`)}))}function p(c,n){const i=(0,d.useFunc)(a,r.default),b=a.name("outer");a.label(b).for(f._`;${c}--;`,(()=>a.for(f._`${n} = ${c}; ${n}--;`,(()=>a.if(f._`${i}(${t}[${c}], ${t}[${n}])`,(()=>{e.error(),a.assign(l,!1).break(b)}))))))}e.block$data(l,(function(){const c=a.let("i",f._`${t}.length`),d=a.let("j");e.setParams({i:c,j:d}),a.assign(l,!0),a.if(f._`${c} > 1`,(()=>(u.length>0&&!u.some((e=>"object"===e||"array"===e))?h:p)(c,d)))}),f._`${o} === false`),e.ok(l)}};a.default=n},87568:(e,a,t)=>{var c=a;c.bignum=t(72344),c.define=t(47363).define,c.base=t(9673),c.constants=t(22153),c.decoders=t(22853),c.encoders=t(24669)},47363:(e,a,t)=>{var c=t(87568),f=t(56698);function d(e,a){this.name=e,this.body=a,this.decoders={},this.encoders={}}a.define=function(e,a){return new d(e,a)},d.prototype._createNamed=function(e){var a;try{a=t(68961).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){a=function(e){this._initNamed(e)}}return f(a,e),a.prototype._initNamed=function(a){e.call(this,a)},new a(this)},d.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(c.decoders[e])),this.decoders[e]},d.prototype.decode=function(e,a,t){return this._getDecoder(a).decode(e,t)},d.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(c.encoders[e])),this.encoders[e]},d.prototype.encode=function(e,a,t){return this._getEncoder(a).encode(e,t)}},47227:(e,a,t)=>{var c=t(56698),f=t(9673).Reporter,d=t(48287).Buffer;function r(e,a){f.call(this,a),d.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function n(e,a){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof n||(e=new n(e,a)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return a.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=d.byteLength(e);else{if(!d.isBuffer(e))return a.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}c(r,f),a.t=r,r.prototype.save=function(){return{offset:this.offset,reporter:f.prototype.save.call(this)}},r.prototype.restore=function(e){var a=new r(this.base);return a.offset=e.offset,a.length=this.offset,this.offset=e.offset,f.prototype.restore.call(this,e.reporter),a},r.prototype.isEmpty=function(){return this.offset===this.length},r.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},r.prototype.skip=function(e,a){if(!(this.offset+e<=this.length))return this.error(a||"DecoderBuffer overrun");var t=new r(this.base);return t._reporterState=this._reporterState,t.offset=this.offset,t.length=this.offset+e,this.offset+=e,t},r.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},a.d=n,n.prototype.join=function(e,a){return e||(e=new d(this.length)),a||(a=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(t){t.join(e,a),a+=t.length})):("number"==typeof this.value?e[a]=this.value:"string"==typeof this.value?e.write(this.value,a):d.isBuffer(this.value)&&this.value.copy(e,a),a+=this.length)),e}},9673:(e,a,t)=>{var c=a;c.Reporter=t(89220).a,c.DecoderBuffer=t(47227).t,c.EncoderBuffer=t(47227).d,c.Node=t(90993)},90993:(e,a,t)=>{var c=t(9673).Reporter,f=t(9673).EncoderBuffer,d=t(9673).DecoderBuffer,r=t(43349),n=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],i=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(n);function b(e,a){var t={};this._baseState=t,t.enc=e,t.parent=a||null,t.children=null,t.tag=null,t.args=null,t.reverseArgs=null,t.choice=null,t.optional=!1,t.any=!1,t.obj=!1,t.use=null,t.useDecoder=null,t.key=null,t.default=null,t.explicit=null,t.implicit=null,t.contains=null,t.parent||(t.children=[],this._wrap())}e.exports=b;var o=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];b.prototype.clone=function(){var e=this._baseState,a={};o.forEach((function(t){a[t]=e[t]}));var t=new this.constructor(a.parent);return t._baseState=a,t},b.prototype._wrap=function(){var e=this._baseState;i.forEach((function(a){this[a]=function(){var t=new this.constructor(this);return e.children.push(t),t[a].apply(t,arguments)}}),this)},b.prototype._init=function(e){var a=this._baseState;r(null===a.parent),e.call(this),a.children=a.children.filter((function(e){return e._baseState.parent===this}),this),r.equal(a.children.length,1,"Root node can have only one child")},b.prototype._useArgs=function(e){var a=this._baseState,t=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==t.length&&(r(null===a.children),a.children=t,t.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(r(null===a.args),a.args=e,a.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;var a={};return Object.keys(e).forEach((function(t){t==(0|t)&&(t|=0);var c=e[t];a[c]=t})),a})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){b.prototype[e]=function(){var a=this._baseState;throw new Error(e+" not implemented for encoding: "+a.enc)}})),n.forEach((function(e){b.prototype[e]=function(){var a=this._baseState,t=Array.prototype.slice.call(arguments);return r(null===a.tag),a.tag=e,this._useArgs(t),this}})),b.prototype.use=function(e){r(e);var a=this._baseState;return r(null===a.use),a.use=e,this},b.prototype.optional=function(){return this._baseState.optional=!0,this},b.prototype.def=function(e){var a=this._baseState;return r(null===a.default),a.default=e,a.optional=!0,this},b.prototype.explicit=function(e){var a=this._baseState;return r(null===a.explicit&&null===a.implicit),a.explicit=e,this},b.prototype.implicit=function(e){var a=this._baseState;return r(null===a.explicit&&null===a.implicit),a.implicit=e,this},b.prototype.obj=function(){var e=this._baseState,a=Array.prototype.slice.call(arguments);return e.obj=!0,0!==a.length&&this._useArgs(a),this},b.prototype.key=function(e){var a=this._baseState;return r(null===a.key),a.key=e,this},b.prototype.any=function(){return this._baseState.any=!0,this},b.prototype.choice=function(e){var a=this._baseState;return r(null===a.choice),a.choice=e,this._useArgs(Object.keys(e).map((function(a){return e[a]}))),this},b.prototype.contains=function(e){var a=this._baseState;return r(null===a.use),a.contains=e,this},b.prototype._decode=function(e,a){var t=this._baseState;if(null===t.parent)return e.wrapResult(t.children[0]._decode(e,a));var c,f=t.default,r=!0,n=null;if(null!==t.key&&(n=e.enterKey(t.key)),t.optional){var i=null;if(null!==t.explicit?i=t.explicit:null!==t.implicit?i=t.implicit:null!==t.tag&&(i=t.tag),null!==i||t.any){if(r=this._peekTag(e,i,t.any),e.isError(r))return r}else{var b=e.save();try{null===t.choice?this._decodeGeneric(t.tag,e,a):this._decodeChoice(e,a),r=!0}catch(e){r=!1}e.restore(b)}}if(t.obj&&r&&(c=e.enterObject()),r){if(null!==t.explicit){var o=this._decodeTag(e,t.explicit);if(e.isError(o))return o;e=o}var s=e.offset;if(null===t.use&&null===t.choice){t.any&&(b=e.save());var l=this._decodeTag(e,null!==t.implicit?t.implicit:t.tag,t.any);if(e.isError(l))return l;t.any?f=e.raw(b):e=l}if(a&&a.track&&null!==t.tag&&a.track(e.path(),s,e.length,"tagged"),a&&a.track&&null!==t.tag&&a.track(e.path(),e.offset,e.length,"content"),t.any||(f=null===t.choice?this._decodeGeneric(t.tag,e,a):this._decodeChoice(e,a)),e.isError(f))return f;if(t.any||null!==t.choice||null===t.children||t.children.forEach((function(t){t._decode(e,a)})),t.contains&&("octstr"===t.tag||"bitstr"===t.tag)){var u=new d(f);f=this._getUse(t.contains,e._reporterState.obj)._decode(u,a)}}return t.obj&&r&&(f=e.leaveObject(c)),null===t.key||null===f&&!0!==r?null!==n&&e.exitKey(n):e.leaveKey(n,t.key,f),f},b.prototype._decodeGeneric=function(e,a,t){var c=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(a,e,c.args[0],t):/str$/.test(e)?this._decodeStr(a,e,t):"objid"===e&&c.args?this._decodeObjid(a,c.args[0],c.args[1],t):"objid"===e?this._decodeObjid(a,null,null,t):"gentime"===e||"utctime"===e?this._decodeTime(a,e,t):"null_"===e?this._decodeNull(a,t):"bool"===e?this._decodeBool(a,t):"objDesc"===e?this._decodeStr(a,e,t):"int"===e||"enum"===e?this._decodeInt(a,c.args&&c.args[0],t):null!==c.use?this._getUse(c.use,a._reporterState.obj)._decode(a,t):a.error("unknown tag: "+e)},b.prototype._getUse=function(e,a){var t=this._baseState;return t.useDecoder=this._use(e,a),r(null===t.useDecoder._baseState.parent),t.useDecoder=t.useDecoder._baseState.children[0],t.implicit!==t.useDecoder._baseState.implicit&&(t.useDecoder=t.useDecoder.clone(),t.useDecoder._baseState.implicit=t.implicit),t.useDecoder},b.prototype._decodeChoice=function(e,a){var t=this._baseState,c=null,f=!1;return Object.keys(t.choice).some((function(d){var r=e.save(),n=t.choice[d];try{var i=n._decode(e,a);if(e.isError(i))return!1;c={type:d,value:i},f=!0}catch(a){return e.restore(r),!1}return!0}),this),f?c:e.error("Choice not matched")},b.prototype._createEncoderBuffer=function(e){return new f(e,this.reporter)},b.prototype._encode=function(e,a,t){var c=this._baseState;if(null===c.default||c.default!==e){var f=this._encodeValue(e,a,t);if(void 0!==f&&!this._skipDefault(f,a,t))return f}},b.prototype._encodeValue=function(e,a,t){var f=this._baseState;if(null===f.parent)return f.children[0]._encode(e,a||new c);var d=null;if(this.reporter=a,f.optional&&void 0===e){if(null===f.default)return;e=f.default}var r=null,n=!1;if(f.any)d=this._createEncoderBuffer(e);else if(f.choice)d=this._encodeChoice(e,a);else if(f.contains)r=this._getUse(f.contains,t)._encode(e,a),n=!0;else if(f.children)r=f.children.map((function(t){if("null_"===t._baseState.tag)return t._encode(null,a,e);if(null===t._baseState.key)return a.error("Child should have a key");var c=a.enterKey(t._baseState.key);if("object"!=typeof e)return a.error("Child expected, but input is not object");var f=t._encode(e[t._baseState.key],a,e);return a.leaveKey(c),f}),this).filter((function(e){return e})),r=this._createEncoderBuffer(r);else if("seqof"===f.tag||"setof"===f.tag){if(!f.args||1!==f.args.length)return a.error("Too many args for : "+f.tag);if(!Array.isArray(e))return a.error("seqof/setof, but data is not Array");var i=this.clone();i._baseState.implicit=null,r=this._createEncoderBuffer(e.map((function(t){var c=this._baseState;return this._getUse(c.args[0],e)._encode(t,a)}),i))}else null!==f.use?d=this._getUse(f.use,t)._encode(e,a):(r=this._encodePrimitive(f.tag,e),n=!0);if(!f.any&&null===f.choice){var b=null!==f.implicit?f.implicit:f.tag,o=null===f.implicit?"universal":"context";null===b?null===f.use&&a.error("Tag could be omitted only for .use()"):null===f.use&&(d=this._encodeComposite(b,n,o,r))}return null!==f.explicit&&(d=this._encodeComposite(f.explicit,!1,"context",d)),d},b.prototype._encodeChoice=function(e,a){var t=this._baseState,c=t.choice[e.type];return c||r(!1,e.type+" not found in "+JSON.stringify(Object.keys(t.choice))),c._encode(e.value,a)},b.prototype._encodePrimitive=function(e,a){var t=this._baseState;if(/str$/.test(e))return this._encodeStr(a,e);if("objid"===e&&t.args)return this._encodeObjid(a,t.reverseArgs[0],t.args[1]);if("objid"===e)return this._encodeObjid(a,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(a,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(a,t.args&&t.reverseArgs[0]);if("bool"===e)return this._encodeBool(a);if("objDesc"===e)return this._encodeStr(a,e);throw new Error("Unsupported tag: "+e)},b.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},b.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},89220:(e,a,t)=>{var c=t(56698);function f(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function d(e,a){this.path=e,this.rethrow(a)}a.a=f,f.prototype.isError=function(e){return e instanceof d},f.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},f.prototype.restore=function(e){var a=this._reporterState;a.obj=e.obj,a.path=a.path.slice(0,e.pathLen)},f.prototype.enterKey=function(e){return this._reporterState.path.push(e)},f.prototype.exitKey=function(e){var a=this._reporterState;a.path=a.path.slice(0,e-1)},f.prototype.leaveKey=function(e,a,t){var c=this._reporterState;this.exitKey(e),null!==c.obj&&(c.obj[a]=t)},f.prototype.path=function(){return this._reporterState.path.join("/")},f.prototype.enterObject=function(){var e=this._reporterState,a=e.obj;return e.obj={},a},f.prototype.leaveObject=function(e){var a=this._reporterState,t=a.obj;return a.obj=e,t},f.prototype.error=function(e){var a,t=this._reporterState,c=e instanceof d;if(a=c?e:new d(t.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!t.options.partial)throw a;return c||t.errors.push(a),a},f.prototype.wrapResult=function(e){var a=this._reporterState;return a.options.partial?{result:this.isError(e)?null:e,errors:a.errors}:e},c(d,Error),d.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,d),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},74598:(e,a,t)=>{var c=t(22153);a.tagClass={0:"universal",1:"application",2:"context",3:"private"},a.tagClassByName=c._reverse(a.tagClass),a.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},a.tagByName=c._reverse(a.tag)},22153:(e,a,t)=>{var c=a;c._reverse=function(e){var a={};return Object.keys(e).forEach((function(t){(0|t)==t&&(t|=0);var c=e[t];a[c]=t})),a},c.der=t(74598)},62010:(e,a,t)=>{var c=t(56698),f=t(87568),d=f.base,r=f.bignum,n=f.constants.der;function i(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new b,this.tree._init(e.body)}function b(e){d.Node.call(this,"der",e)}function o(e,a){var t=e.readUInt8(a);if(e.isError(t))return t;var c=n.tagClass[t>>6],f=!(32&t);if(31&~t)t&=31;else{var d=t;for(t=0;!(128&~d);){if(d=e.readUInt8(a),e.isError(d))return d;t<<=7,t|=127&d}}return{cls:c,primitive:f,tag:t,tagStr:n.tag[t]}}function s(e,a,t){var c=e.readUInt8(t);if(e.isError(c))return c;if(!a&&128===c)return null;if(!(128&c))return c;var f=127&c;if(f>4)return e.error("length octect is too long");c=0;for(var d=0;d{var c=a;c.der=t(62010),c.pem=t(58903)},58903:(e,a,t)=>{var c=t(56698),f=t(48287).Buffer,d=t(62010);function r(e){d.call(this,e),this.enc="pem"}c(r,d),e.exports=r,r.prototype.decode=function(e,a){for(var t=e.toString().split(/[\r\n]+/g),c=a.label.toUpperCase(),r=/^-----(BEGIN|END) ([^-]+)-----$/,n=-1,i=-1,b=0;b{var c=t(56698),f=t(48287).Buffer,d=t(87568),r=d.base,n=d.constants.der;function i(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new b,this.tree._init(e.body)}function b(e){r.Node.call(this,"der",e)}function o(e){return e<10?"0"+e:e}e.exports=i,i.prototype.encode=function(e,a){return this.tree._encode(e,a).join()},c(b,r.Node),b.prototype._encodeComposite=function(e,a,t,c){var d,r=function(e,a,t,c){var f;if("seqof"===e?e="seq":"setof"===e&&(e="set"),n.tagByName.hasOwnProperty(e))f=n.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return c.error("Unknown tag: "+e);f=e}return f>=31?c.error("Multi-octet tag encoding unsupported"):(a||(f|=32),f|=n.tagClassByName[t||"universal"]<<6)}(e,a,t,this.reporter);if(c.length<128)return(d=new f(2))[0]=r,d[1]=c.length,this._createEncoderBuffer([d,c]);for(var i=1,b=c.length;b>=256;b>>=8)i++;(d=new f(2+i))[0]=r,d[1]=128|i,b=1+i;for(var o=c.length;o>0;b--,o>>=8)d[b]=255&o;return this._createEncoderBuffer([d,c])},b.prototype._encodeStr=function(e,a){if("bitstr"===a)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===a){for(var t=new f(2*e.length),c=0;c=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var d=0;for(c=0;c=128;r>>=7)d++}var n=new f(d),i=n.length-1;for(c=e.length-1;c>=0;c--)for(r=e[c],n[i--]=127&r;(r>>=7)>0;)n[i--]=128|127&r;return this._createEncoderBuffer(n)},b.prototype._encodeTime=function(e,a){var t,c=new Date(e);return"gentime"===a?t=[o(c.getFullYear()),o(c.getUTCMonth()+1),o(c.getUTCDate()),o(c.getUTCHours()),o(c.getUTCMinutes()),o(c.getUTCSeconds()),"Z"].join(""):"utctime"===a?t=[o(c.getFullYear()%100),o(c.getUTCMonth()+1),o(c.getUTCDate()),o(c.getUTCHours()),o(c.getUTCMinutes()),o(c.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+a+" time is not supported yet"),this._encodeStr(t,"octstr")},b.prototype._encodeNull=function(){return this._createEncoderBuffer("")},b.prototype._encodeInt=function(e,a){if("string"==typeof e){if(!a)return this.reporter.error("String int or enum given, but no values map");if(!a.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=a[e]}if("number"!=typeof e&&!f.isBuffer(e)){var t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=new f(t)}if(f.isBuffer(e)){var c=e.length;0===e.length&&c++;var d=new f(c);return e.copy(d),0===e.length&&(d[0]=0),this._createEncoderBuffer(d)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);c=1;for(var r=e;r>=256;r>>=8)c++;for(r=(d=new Array(c)).length-1;r>=0;r--)d[r]=255&e,e>>=8;return 128&d[0]&&d.unshift(0),this._createEncoderBuffer(new f(d))},b.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},b.prototype._use=function(e,a){return"function"==typeof e&&(e=e(a)),e._getEncoder("der").tree},b.prototype._skipDefault=function(e,a,t){var c,f=this._baseState;if(null===f.default)return!1;var d=e.join();if(void 0===f.defaultBuffer&&(f.defaultBuffer=this._encodeValue(f.default,a,t).join()),d.length!==f.defaultBuffer.length)return!1;for(c=0;c{var c=a;c.der=t(70082),c.pem=t(90735)},90735:(e,a,t)=>{var c=t(56698),f=t(70082);function d(e){f.call(this,e),this.enc="pem"}c(d,f),e.exports=d,d.prototype.encode=function(e,a){for(var t=f.prototype.encode.call(this,e).toString("base64"),c=["-----BEGIN "+a.label+"-----"],d=0;d=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,c){for(var f=0,d=Math.min(e.length,t),r=a;r=49?n-49+10:n>=17?n-17+10:n}return f}d.isBN=function(e){return e instanceof d||null!==e&&"object"==typeof e&&e.constructor.wordSize===d.wordSize&&Array.isArray(e.words)},d.max=function(e,a){return e.cmp(a)>0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this.strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this.strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var o=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],s=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function u(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t.strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215)||r!==this.length-1?o[6-i.length]+i+t:i+t,(f+=2)>=26&&(f-=26,r--)}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],u=l[e];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(u).toString(e);t=(h=h.idivn(u)).isZero()?p+t:o[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(e,a){return c(void 0!==r),this.toArrayLike(r,e,a)},d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0"),this.strip();var r,n,i="le"===a,b=new e(d),o=this.clone();if(i){for(n=0;!o.isZero();n++)r=o.andln(255),o.iushrn(8),b[n]=r;for(;n=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this.strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function p(e,a,t){return(new g).mulp(e,a,t)}function g(e,a){this.x=e,this.y=a}Math.imul||(h=u),d.prototype.mulTo=function(e,a){var t,c=this.length+e.length;return t=10===this.length&&10===e.length?h(this,e,a):c<63?u(this,e,a):c<1024?function(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t.strip()}(this,e,a):p(this,e,a),t},g.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},g.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,a+=f/67108864|0,a+=d>>>26,this.words[t]=67108863&d}return 0!==a&&(this.words[t]=a,this.length++),this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<=0);var a=e%26,t=(e-a)/26;if(c(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var f=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},d.prototype.isubn=function(e){if(c("number"==typeof e),c(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(i/67108864|0),this.words[f+t]=67108863&d}for(;f>26,this.words[f+t]=67108863&d;if(0===n)return this.strip();for(c(-1===n),n=0,f=0;f>26,this.words[f]=67108863&d;return this.negative=1,this.strip()},d.prototype._wordDiv=function(e,a){var t=(this.length,e.length),c=this.clone(),f=e,r=0|f.words[f.length-1];0!=(t=26-this._countBits(r))&&(f=f.ushln(t),c.iushln(t),r=0|f.words[f.length-1]);var n,i=c.length-f.length;if("mod"!==a){(n=new d(null)).length=i+1,n.words=new Array(n.length);for(var b=0;b=0;s--){var l=67108864*(0|c.words[f.length+s])+(0|c.words[f.length+s-1]);for(l=Math.min(l/r|0,67108863),c._ishlnsubmul(f,l,s);0!==c.negative;)l--,c.negative=0,c._ishlnsubmul(f,1,s),c.isZero()||(c.negative^=1);n&&(n.words[s]=l)}return n&&n.strip(),c.strip(),"div"!==a&&0!==t&&c.iushrn(t),{div:n||null,mod:c}},d.prototype.divmod=function(e,a,t){return c(!e.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===e.negative?(n=this.neg().divmod(e,a),"mod"!==a&&(f=n.div.neg()),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.iadd(e)),{div:f,mod:r}):0===this.negative&&0!==e.negative?(n=this.divmod(e.neg(),a),"mod"!==a&&(f=n.div.neg()),{div:f,mod:n.mod}):this.negative&e.negative?(n=this.neg().divmod(e.neg(),a),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.isub(e)),{div:n.div,mod:r}):e.length>this.length||this.cmp(e)<0?{div:new d(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new d(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new d(this.modn(e.words[0]))}:this._wordDiv(e,a);var f,r,n},d.prototype.div=function(e){return this.divmod(e,"div",!1).div},d.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},d.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},d.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,c=e.ushrn(1),f=e.andln(1),d=t.cmp(c);return d<0||1===f&&0===d?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},d.prototype.modn=function(e){c(e<=67108863);for(var a=(1<<26)%e,t=0,f=this.length-1;f>=0;f--)t=(a*t+(0|this.words[f]))%e;return t},d.prototype.idivn=function(e){c(e<=67108863);for(var a=0,t=this.length-1;t>=0;t--){var f=(0|this.words[t])+67108864*a;this.words[t]=f/e|0,a=f%e}return this.strip()},d.prototype.divn=function(e){return this.clone().idivn(e)},d.prototype.egcd=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f=new d(1),r=new d(0),n=new d(0),i=new d(1),b=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++b;for(var o=t.clone(),s=a.clone();!a.isZero();){for(var l=0,u=1;!(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(f.isOdd()||r.isOdd())&&(f.iadd(o),r.isub(s)),f.iushrn(1),r.iushrn(1);for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(o),i.isub(s)),n.iushrn(1),i.iushrn(1);a.cmp(t)>=0?(a.isub(t),f.isub(n),r.isub(i)):(t.isub(a),n.isub(f),i.isub(r))}return{a:n,b:i,gcd:t.iushln(b)}},d.prototype._invmp=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f,r=new d(1),n=new d(0),i=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var b=0,o=1;!(a.words[0]&o)&&b<26;++b,o<<=1);if(b>0)for(a.iushrn(b);b-- >0;)r.isOdd()&&r.iadd(i),r.iushrn(1);for(var s=0,l=1;!(t.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(i),n.iushrn(1);a.cmp(t)>=0?(a.isub(t),r.isub(n)):(t.isub(a),n.isub(r))}return(f=0===a.cmpn(1)?r:n).cmpn(0)<0&&f.iadd(e),f},d.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var c=0;a.isEven()&&t.isEven();c++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var f=a.cmp(t);if(f<0){var d=a;a=t,t=d}else if(0===f||0===t.cmpn(1))break;a.isub(t)}return t.iushln(c)},d.prototype.invm=function(e){return this.egcd(e).a.umod(e)},d.prototype.isEven=function(){return!(1&this.words[0])},d.prototype.isOdd=function(){return!(1&~this.words[0])},d.prototype.andln=function(e){return this.words[0]&e},d.prototype.bincn=function(e){c("number"==typeof e);var a=e%26,t=(e-a)/26,f=1<>>26,n&=67108863,this.words[r]=n}return 0!==d&&(this.words[r]=d,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)a=1;else{t&&(e=-e),c(e<=67108863,"Number is too big");var f=0|this.words[0];a=f===e?0:fe.length)return 1;if(this.length=0;t--){var c=0|this.words[t],f=0|e.words[t];if(c!==f){cf&&(a=1);break}}return a},d.prototype.gtn=function(e){return 1===this.cmpn(e)},d.prototype.gt=function(e){return 1===this.cmp(e)},d.prototype.gten=function(e){return this.cmpn(e)>=0},d.prototype.gte=function(e){return this.cmp(e)>=0},d.prototype.ltn=function(e){return-1===this.cmpn(e)},d.prototype.lt=function(e){return-1===this.cmp(e)},d.prototype.lten=function(e){return this.cmpn(e)<=0},d.prototype.lte=function(e){return this.cmp(e)<=0},d.prototype.eqn=function(e){return 0===this.cmpn(e)},d.prototype.eq=function(e){return 0===this.cmp(e)},d.red=function(e){return new _(e)},d.prototype.toRed=function(e){return c(!this.red,"Already a number in reduction context"),c(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(e){return this.red=e,this},d.prototype.forceRed=function(e){return c(!this.red,"Already a number in reduction context"),this._forceRed(e)},d.prototype.redAdd=function(e){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},d.prototype.redIAdd=function(e){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},d.prototype.redSub=function(e){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},d.prototype.redISub=function(e){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},d.prototype.redShl=function(e){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},d.prototype.redMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},d.prototype.redIMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(e){return c(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var m={k256:null,p224:null,p192:null,p25519:null};function x(e,a){this.name=e,this.p=new d(a,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var a=d._prime(e);this.m=a.p,this.prime=a}else c(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}x.prototype._tmp=function(){var e=new d(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var c=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},x.prototype.split=function(e,a){e.iushrn(this.n,0,a)},x.prototype.imulK=function(e){return e.imul(this.k)},f(y,x),y.prototype.split=function(e,a){for(var t=4194303,c=Math.min(e.length,9),f=0;f>>22,d=r}d>>>=22,e.words[f-10]=d,0===d&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=f,a=c}return 0!==a&&(e.words[e.length++]=a),e},d._prime=function(e){if(m[e])return m[e];var a;if("k256"===e)a=new y;else if("p224"===e)a=new A;else if("p192"===e)a=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new w}return m[e]=a,a},_.prototype._verify1=function(e){c(0===e.negative,"red works only with positives"),c(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,a){c(!(e.negative|a.negative),"red works only with positives"),c(e.red&&e.red===a.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},_.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},_.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},_.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},_.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},_.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},_.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(c(a%2==1),3===a){var t=this.m.add(new d(1)).iushrn(2);return this.pow(e,t)}for(var f=this.m.subn(1),r=0;!f.isZero()&&0===f.andln(1);)r++,f.iushrn(1);c(!f.isZero());var n=new d(1).toRed(this),i=n.redNeg(),b=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new d(2*o*o).toRed(this);0!==this.pow(o,b).cmp(i);)o.redIAdd(i);for(var s=this.pow(o,f),l=this.pow(e,f.addn(1).iushrn(1)),u=this.pow(e,f),h=r;0!==u.cmp(n);){for(var p=u,g=0;0!==p.cmp(n);g++)p=p.redSqr();c(g=0;c--){for(var b=a.words[c],o=i-1;o>=0;o--){var s=b>>o&1;f!==t[0]&&(f=this.sqr(f)),0!==s||0!==r?(r<<=1,r|=s,(4==++n||0===c&&0===o)&&(f=this.mul(f,t[r]),n=0,r=0)):n=0}i=26}return f},_.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},_.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},d.mont=function(e){return new I(e)},f(I,_),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},I.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),d=f;return f.cmp(this.m)>=0?d=f.isub(this.m):f.cmpn(0)<0&&(d=f.iadd(this.m)),d._forceRed(this)},I.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new d(0)._forceRed(this);var t=e.mul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),r=f;return f.cmp(this.m)>=0?r=f.isub(this.m):f.cmpn(0)<0&&(r=f.iadd(this.m)),r._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},94148:(e,a,t)=>{"use strict";function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function f(e,a){for(var t=0;t1?t-1:0),f=1;f1?t-1:0),f=1;f1?t-1:0),f=1;f1?t-1:0),f=1;f{"use strict";function c(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);a&&(c=c.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,c)}return t}function f(e){for(var a=1;ae.length)&&(t=e.length),e.substring(t-a.length,t)===a}var x="",y="",A="",v="",w={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function _(e){var a=Object.keys(e),t=Object.create(Object.getPrototypeOf(e));return a.forEach((function(a){t[a]=e[a]})),Object.defineProperty(t,"message",{value:e.message}),t}function I(e){return p(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var E=function(e,a){!function(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),a&&l(e,a)}(E,e);var t,c,r,b,o=(t=E,c=s(),function(){var e,a=u(t);if(c){var f=u(this).constructor;e=Reflect.construct(a,arguments,f)}else e=a.apply(this,arguments);return n(this,e)});function E(e){var a;if(function(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this,E),"object"!==h(e)||null===e)throw new g("options","Object",e);var t=e.message,c=e.operator,f=e.stackStartFn,d=e.actual,r=e.expected,b=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=t)a=o.call(this,String(t));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&1!==process.stderr.getColorDepth()?(x="[34m",y="[32m",v="[39m",A="[31m"):(x="",y="",v="",A="")),"object"===h(d)&&null!==d&&"object"===h(r)&&null!==r&&"stack"in d&&d instanceof Error&&"stack"in r&&r instanceof Error&&(d=_(d),r=_(r)),"deepStrictEqual"===c||"strictEqual"===c)a=o.call(this,function(e,a,t){var c="",f="",d=0,r="",n=!1,i=I(e),b=i.split("\n"),o=I(a).split("\n"),s=0,l="";if("strictEqual"===t&&"object"===h(e)&&"object"===h(a)&&null!==e&&null!==a&&(t="strictEqualObject"),1===b.length&&1===o.length&&b[0]!==o[0]){var u=b[0].length+o[0].length;if(u<=10){if(!("object"===h(e)&&null!==e||"object"===h(a)&&null!==a||0===e&&0===a))return"".concat(w[t],"\n\n")+"".concat(b[0]," !== ").concat(o[0],"\n")}else if("strictEqualObject"!==t&&u<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;b[0][s]===o[0][s];)s++;s>2&&(l="\n ".concat(function(e,a){if(a=Math.floor(a),0==e.length||0==a)return"";var t=e.length*a;for(a=Math.floor(Math.log(a)/Math.log(2));a;)e+=e,a--;return e+e.substring(0,t-e.length)}(" ",s),"^"),s=0)}}for(var p=b[b.length-1],g=o[o.length-1];p===g&&(s++<2?r="\n ".concat(p).concat(r):c=p,b.pop(),o.pop(),0!==b.length&&0!==o.length);)p=b[b.length-1],g=o[o.length-1];var _=Math.max(b.length,o.length);if(0===_){var E=i.split("\n");if(E.length>30)for(E[26]="".concat(x,"...").concat(v);E.length>27;)E.pop();return"".concat(w.notIdentical,"\n\n").concat(E.join("\n"),"\n")}s>3&&(r="\n".concat(x,"...").concat(v).concat(r),n=!0),""!==c&&(r="\n ".concat(c).concat(r),c="");var C=0,M=w[t]+"\n".concat(y,"+ actual").concat(v," ").concat(A,"- expected").concat(v),B=" ".concat(x,"...").concat(v," Lines skipped");for(s=0;s<_;s++){var L=s-d;if(b.length1&&s>2&&(L>4?(f+="\n".concat(x,"...").concat(v),n=!0):L>3&&(f+="\n ".concat(o[s-2]),C++),f+="\n ".concat(o[s-1]),C++),d=s,c+="\n".concat(A,"-").concat(v," ").concat(o[s]),C++;else if(o.length1&&s>2&&(L>4?(f+="\n".concat(x,"...").concat(v),n=!0):L>3&&(f+="\n ".concat(b[s-2]),C++),f+="\n ".concat(b[s-1]),C++),d=s,f+="\n".concat(y,"+").concat(v," ").concat(b[s]),C++;else{var S=o[s],k=b[s],N=k!==S&&(!m(k,",")||k.slice(0,-1)!==S);N&&m(S,",")&&S.slice(0,-1)===k&&(N=!1,k+=","),N?(L>1&&s>2&&(L>4?(f+="\n".concat(x,"...").concat(v),n=!0):L>3&&(f+="\n ".concat(b[s-2]),C++),f+="\n ".concat(b[s-1]),C++),d=s,f+="\n".concat(y,"+").concat(v," ").concat(k),c+="\n".concat(A,"-").concat(v," ").concat(S),C+=2):(f+=c,c="",1!==L&&0!==s||(f+="\n ".concat(k),C++))}if(C>20&&s<_-2)return"".concat(M).concat(B,"\n").concat(f,"\n").concat(x,"...").concat(v).concat(c,"\n")+"".concat(x,"...").concat(v)}return"".concat(M).concat(n?B:"","\n").concat(f).concat(c).concat(r).concat(l)}(d,r,c));else if("notDeepStrictEqual"===c||"notStrictEqual"===c){var s=w[c],l=I(d).split("\n");if("notStrictEqual"===c&&"object"===h(d)&&null!==d&&(s=w.notStrictEqualObject),l.length>30)for(l[26]="".concat(x,"...").concat(v);l.length>27;)l.pop();a=1===l.length?o.call(this,"".concat(s," ").concat(l[0])):o.call(this,"".concat(s,"\n\n").concat(l.join("\n"),"\n"))}else{var u=I(d),p="",C=w[c];"notDeepEqual"===c||"notEqual"===c?(u="".concat(w[c],"\n\n").concat(u)).length>1024&&(u="".concat(u.slice(0,1021),"...")):(p="".concat(I(r)),u.length>512&&(u="".concat(u.slice(0,509),"...")),p.length>512&&(p="".concat(p.slice(0,509),"...")),"deepEqual"===c||"equal"===c?u="".concat(C,"\n\n").concat(u,"\n\nshould equal\n\n"):p=" ".concat(c," ").concat(p)),a=o.call(this,"".concat(u).concat(p))}return Error.stackTraceLimit=b,a.generatedMessage=!t,Object.defineProperty(i(a),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),a.code="ERR_ASSERTION",a.actual=d,a.expected=r,a.operator=c,Error.captureStackTrace&&Error.captureStackTrace(i(a),f),a.stack,a.name="AssertionError",n(a)}return r=E,(b=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:a,value:function(e,a){return p(this,f(f({},a),{},{customInspect:!1,depth:0}))}}])&&d(r.prototype,b),Object.defineProperty(r,"prototype",{writable:!1}),E}(b(Error),p.custom);e.exports=E},69597:(e,a,t)=>{"use strict";function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function f(e,a){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,a){return e.__proto__=a,e},f(e,a)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var r,n,i={};function b(e,a,t){t||(t=Error);var r=function(t){!function(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),a&&f(e,a)}(o,t);var r,n,i,b=(n=o,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,a=d(n);if(i){var t=d(this).constructor;e=Reflect.construct(a,arguments,t)}else e=a.apply(this,arguments);return function(e,a){if(a&&("object"===c(a)||"function"==typeof a))return a;if(void 0!==a)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function o(t,c,f){var d;return function(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this,o),d=b.call(this,function(e,t,c){return"string"==typeof a?a:a(e,t,c)}(t,c,f)),d.code=e,d}return r=o,Object.defineProperty(r,"prototype",{writable:!1}),r}(t);i[e]=r}function o(e,a){if(Array.isArray(e)){var t=e.length;return e=e.map((function(e){return String(e)})),t>2?"one of ".concat(a," ").concat(e.slice(0,t-1).join(", "),", or ")+e[t-1]:2===t?"one of ".concat(a," ").concat(e[0]," or ").concat(e[1]):"of ".concat(a," ").concat(e[0])}return"of ".concat(a," ").concat(String(e))}b("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),b("ERR_INVALID_ARG_TYPE",(function(e,a,f){var d,n,i,b,s;if(void 0===r&&(r=t(94148)),r("string"==typeof e,"'name' must be a string"),"string"==typeof a&&(n="not ",a.substr(0,4)===n)?(d="must not be",a=a.replace(/^not /,"")):d="must be",function(e,a,t){return(void 0===t||t>e.length)&&(t=e.length),e.substring(t-9,t)===a}(e," argument"))i="The ".concat(e," ").concat(d," ").concat(o(a,"type"));else{var l=("number"!=typeof s&&(s=0),s+1>(b=e).length||-1===b.indexOf(".",s)?"argument":"property");i='The "'.concat(e,'" ').concat(l," ").concat(d," ").concat(o(a,"type"))}return i+". Received type ".concat(c(f))}),TypeError),b("ERR_INVALID_ARG_VALUE",(function(e,a){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===n&&(n=t(40537));var f=n.inspect(a);return f.length>128&&(f="".concat(f.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(c,". Received ").concat(f)}),TypeError,RangeError),b("ERR_INVALID_RETURN_VALUE",(function(e,a,t){var f;return f=t&&t.constructor&&t.constructor.name?"instance of ".concat(t.constructor.name):"type ".concat(c(t)),"Expected ".concat(e,' to be returned from the "').concat(a,'"')+" function but got ".concat(f,".")}),TypeError),b("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,a=new Array(e),c=0;c0,"At least one arg needs to be specified");var f="The ",d=a.length;switch(a=a.map((function(e){return'"'.concat(e,'"')})),d){case 1:f+="".concat(a[0]," argument");break;case 2:f+="".concat(a[0]," and ").concat(a[1]," arguments");break;default:f+=a.slice(0,d-1).join(", "),f+=", and ".concat(a[d-1]," arguments")}return"".concat(f," must be specified")}),TypeError),e.exports.codes=i},82299:(e,a,t)=>{"use strict";function c(e,a){return function(e){if(Array.isArray(e))return e}(e)||function(e,a){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var c,f,d,r,n=[],i=!0,b=!1;try{if(d=(t=t.call(e)).next,0===a){if(Object(t)!==t)return;i=!1}else for(;!(i=(c=d.call(t)).done)&&(n.push(c.value),n.length!==a);i=!0);}catch(e){b=!0,f=e}finally{try{if(!i&&null!=t.return&&(r=t.return(),Object(r)!==r))return}finally{if(b)throw f}}return n}}(e,a)||function(e,a){if(e){if("string"==typeof e)return f(e,a);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?f(e,a):void 0}}(e,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,a){(null==a||a>e.length)&&(a=e.length);for(var t=0,c=new Array(a);t10)return!0;for(var a=0;a57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function P(e){return Object.keys(e).filter(N).concat(o(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function R(e,a){if(e===a)return 0;for(var t=e.length,c=a.length,f=0,d=Math.min(t,c);f{const c=t(36209),f=t(10943),d=t(51847),r=t(86679),n=t(65435),i=255===new Uint8Array(Uint16Array.of(255).buffer)[0];function b(e){switch(e){case"ascii":return c;case"base64":return f;case"hex":return d;case"utf8":case"utf-8":case void 0:return r;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n;default:throw new Error(`Unknown encoding: ${e}`)}}function o(e){return e instanceof Uint8Array}function s(e,a,t){return"string"==typeof e?function(e,a){const t=b(a),c=new Uint8Array(t.byteLength(e));return t.write(c,e,0,c.byteLength),c}(e,a):Array.isArray(e)?function(e){const a=new Uint8Array(e.length);return a.set(e),a}(e):ArrayBuffer.isView(e)?function(e){const a=new Uint8Array(e.byteLength);return a.set(e),a}(e):function(e,a,t){return new Uint8Array(e,a,t)}(e,a,t)}function l(e,a,t,c,f){if(0===e.byteLength)return-1;if("string"==typeof t?(c=t,t=0):void 0===t?t=f?0:e.length-1:t<0&&(t+=e.byteLength),t>=e.byteLength){if(f)return-1;t=e.byteLength-1}else if(t<0){if(!f)return-1;t=0}if("string"==typeof a)a=s(a,c);else if("number"==typeof a)return a&=255,f?e.indexOf(a,t):e.lastIndexOf(a,t);if(0===a.byteLength)return-1;if(f){let c=-1;for(let f=t;fe.byteLength&&(t=e.byteLength-a.byteLength);for(let c=t;c>=0;c--){let t=!0;for(let f=0;ff)return 1}return e.byteLength>a.byteLength?1:e.byteLengthe+a.byteLength),0));const t=new Uint8Array(a);let c=0;for(const a of e){if(c+a.byteLength>t.byteLength){const e=a.subarray(0,t.byteLength-c);return t.set(e,c),t}t.set(a,c),c+=a.byteLength}return t},copy:function(e,a,t=0,c=0,f=e.byteLength){if(f>0&&f=e.byteLength)throw new RangeError("sourceStart is out of range");if(f<0)throw new RangeError("sourceEnd is out of range");t>=a.byteLength&&(t=a.byteLength),f>e.byteLength&&(f=e.byteLength),a.byteLength-t=f||c<=t?"":(t<0&&(t=0),c>f&&(c=f),(0!==t||c{function a(e){return e.length}e.exports={byteLength:a,toString:function(e){const a=e.byteLength;let t="";for(let c=0;c{const a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=new Uint8Array(256);for(let e=0;e<64;e++)t[a.charCodeAt(e)]=e;function c(e){let a=e.length;return 61===e.charCodeAt(a-1)&&a--,a>1&&61===e.charCodeAt(a-1)&&a--,3*a>>>2}t[45]=62,t[95]=63,e.exports={byteLength:c,toString:function(e){const t=e.byteLength;let c="";for(let f=0;f>2]+a[(3&e[f])<<4|e[f+1]>>4]+a[(15&e[f+1])<<2|e[f+2]>>6]+a[63&e[f+2]];return t%3==2?c=c.substring(0,c.length-1)+"=":t%3==1&&(c=c.substring(0,c.length-2)+"=="),c},write:function(e,a,f=0,d=c(a)){const r=Math.min(d,e.byteLength-f);for(let c=0,f=0;f>4,e[f++]=(15&r)<<4|n>>2,e[f++]=(3&n)<<6|63&i}return r}}},51847:e=>{function a(e){return e.length>>>1}function t(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:void 0}e.exports={byteLength:a,toString:function(e){const a=e.byteLength;e=new DataView(e.buffer,e.byteOffset,a);let t="",c=0;for(let f=a-a%4;c{function a(e){return 2*e.length}e.exports={byteLength:a,toString:function(e){const a=e.byteLength;let t="";for(let c=0;c>8,r=f%256;e[c+2*a]=r,e[c+2*a+1]=d}return d}}},86679:e=>{function a(e){let a=0;for(let t=0,c=e.length;t=55296&&f<=56319&&t+1=56320&&c<=57343){a+=4,t++;continue}}a+=f<=127?1:f<=2047?2:3}return a}let t,c;if("undefined"!=typeof TextDecoder){const e=new TextDecoder;t=function(a){return e.decode(a)}}else t=function(e){const a=e.byteLength;let t="",c=0;for(;c0){let a=0;for(;a>c,c-=6;c>=0;)e[n++]=128|a>>c&63,c-=6;r+=a>=65536?2:1}return d};e.exports={byteLength:a,toString:t,write:c}},67526:(e,a)=>{"use strict";a.byteLength=function(e){var a=n(e),t=a[0],c=a[1];return 3*(t+c)/4-c},a.toByteArray=function(e){var a,t,d=n(e),r=d[0],i=d[1],b=new f(function(e,a,t){return 3*(a+t)/4-t}(0,r,i)),o=0,s=i>0?r-4:r;for(t=0;t>16&255,b[o++]=a>>8&255,b[o++]=255&a;return 2===i&&(a=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,b[o++]=255&a),1===i&&(a=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,b[o++]=a>>8&255,b[o++]=255&a),b},a.fromByteArray=function(e){for(var a,c=e.length,f=c%3,d=[],r=16383,n=0,b=c-f;nb?b:n+r));return 1===f?(a=e[c-1],d.push(t[a>>2]+t[a<<4&63]+"==")):2===f&&(a=(e[c-2]<<8)+e[c-1],d.push(t[a>>10]+t[a>>4&63]+t[a<<2&63]+"=")),d.join("")};for(var t=[],c=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0;r<64;++r)t[r]=d[r],c[d.charCodeAt(r)]=r;function n(e){var a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");return-1===t&&(t=a),[t,t===a?0:4-t%4]}function i(e,a,c){for(var f,d,r=[],n=a;n>18&63]+t[d>>12&63]+t[d>>6&63]+t[63&d]);return r.join("")}c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},92096:(e,a,t)=>{var c;e=t.nmd(e);var f=function(e){"use strict";var a=1e7,t=9007199254740992,c=l(t),d="0123456789abcdefghijklmnopqrstuvwxyz",r="function"==typeof BigInt;function n(e,a,t,c){return void 0===e?n[0]:void 0===a||10==+a&&!t?Z(e):q(e,a,t,c)}function i(e,a){this.value=e,this.sign=a,this.isSmall=!1}function b(e){this.value=e,this.sign=e<0,this.isSmall=!0}function o(e){this.value=e}function s(e){return-t0?Math.floor(e):Math.ceil(e)}function m(e,t){var c,f,d=e.length,r=t.length,n=new Array(d),i=0,b=a;for(f=0;f=b?1:0,n[f]=c-i*b;for(;f0&&n.push(i),n}function x(e,a){return e.length>=a.length?m(e,a):m(a,e)}function y(e,t){var c,f,d=e.length,r=new Array(d),n=a;for(f=0;f0;)r[f++]=t%n,t=Math.floor(t/n);return r}function A(e,t){var c,f,d=e.length,r=t.length,n=new Array(d),i=0,b=a;for(c=0;c0;)r[f++]=i%n,i=Math.floor(i/n);return r}function I(e,a){for(var t=[];a-- >0;)t.push(0);return t.concat(e)}function E(e,a){var t=Math.max(e.length,a.length);if(t<=30)return w(e,a);t=Math.ceil(t/2);var c=e.slice(t),f=e.slice(0,t),d=a.slice(t),r=a.slice(0,t),n=E(f,r),i=E(c,d),b=E(x(f,c),x(r,d)),o=x(x(n,I(A(A(b,n),i),t)),I(i,2*t));return h(o),o}function C(e,t,c){return new i(e=0;--c)d=(r=d*b+e[c])-(f=g(r/t))*t,i[c]=0|f;return[i,0|d]}function L(e,t){var c,f=Z(t);if(r)return[new o(e.value/f.value),new o(e.value%f.value)];var d,s=e.value,m=f.value;if(0===m)throw new Error("Cannot divide by zero");if(e.isSmall)return f.isSmall?[new b(g(s/m)),new b(s%m)]:[n[0],e];if(f.isSmall){if(1===m)return[e,n[0]];if(-1==m)return[e.negate(),n[0]];var x=Math.abs(m);if(x=0;f--){for(c=l-1,x[f+s]!==g&&(c=Math.floor((x[f+s]*l+x[f+s-1])/g)),d=0,r=0,i=y.length,n=0;nb&&(d=(d+1)*l),c=Math.ceil(d/r);do{if(S(n=_(t,c),s)<=0)break;c--}while(c);o.push(c),s=A(s,n)}return o.reverse(),[u(o),u(s)]}(s,m),d=c[0];var w=e.sign!==f.sign,I=c[1],E=e.sign;return"number"==typeof d?(w&&(d=-d),d=new b(d)):d=new i(d,w),"number"==typeof I?(E&&(I=-I),I=new b(I)):I=new i(I,E),[d,I]}function S(e,a){if(e.length!==a.length)return e.length>a.length?1:-1;for(var t=e.length-1;t>=0;t--)if(e[t]!==a[t])return e[t]>a[t]?1:-1;return 0}function k(e){var a=e.abs();return!a.isUnit()&&(!!(a.equals(2)||a.equals(3)||a.equals(5))||!(a.isEven()||a.isDivisibleBy(3)||a.isDivisibleBy(5))&&(!!a.lesser(49)||void 0))}function N(e,a){for(var t,c,d,r=e.prev(),n=r,i=0;n.isEven();)n=n.divide(2),i++;e:for(c=0;c=0?c=A(e,a):(c=A(a,e),t=!t),"number"==typeof(c=u(c))?(t&&(c=-c),new b(c)):new i(c,t)}(t,c,this.sign)},i.prototype.minus=i.prototype.subtract,b.prototype.subtract=function(e){var a=Z(e),t=this.value;if(t<0!==a.sign)return this.add(a.negate());var c=a.value;return a.isSmall?new b(t-c):v(c,Math.abs(t),t>=0)},b.prototype.minus=b.prototype.subtract,o.prototype.subtract=function(e){return new o(this.value-Z(e).value)},o.prototype.minus=o.prototype.subtract,i.prototype.negate=function(){return new i(this.value,!this.sign)},b.prototype.negate=function(){var e=this.sign,a=new b(-this.value);return a.sign=!e,a},o.prototype.negate=function(){return new o(-this.value)},i.prototype.abs=function(){return new i(this.value,!1)},b.prototype.abs=function(){return new b(Math.abs(this.value))},o.prototype.abs=function(){return new o(this.value>=0?this.value:-this.value)},i.prototype.multiply=function(e){var t,c,f,d=Z(e),r=this.value,b=d.value,o=this.sign!==d.sign;if(d.isSmall){if(0===b)return n[0];if(1===b)return this;if(-1===b)return this.negate();if((t=Math.abs(b))0?E(r,b):w(r,b),o)},i.prototype.times=i.prototype.multiply,b.prototype._multiplyBySmall=function(e){return s(e.value*this.value)?new b(e.value*this.value):C(Math.abs(e.value),l(Math.abs(this.value)),this.sign!==e.sign)},i.prototype._multiplyBySmall=function(e){return 0===e.value?n[0]:1===e.value?this:-1===e.value?this.negate():C(Math.abs(e.value),this.value,this.sign!==e.sign)},b.prototype.multiply=function(e){return Z(e)._multiplyBySmall(this)},b.prototype.times=b.prototype.multiply,o.prototype.multiply=function(e){return new o(this.value*Z(e).value)},o.prototype.times=o.prototype.multiply,i.prototype.square=function(){return new i(M(this.value),!1)},b.prototype.square=function(){var e=this.value*this.value;return s(e)?new b(e):new i(M(l(Math.abs(this.value))),!1)},o.prototype.square=function(e){return new o(this.value*this.value)},i.prototype.divmod=function(e){var a=L(this,e);return{quotient:a[0],remainder:a[1]}},o.prototype.divmod=b.prototype.divmod=i.prototype.divmod,i.prototype.divide=function(e){return L(this,e)[0]},o.prototype.over=o.prototype.divide=function(e){return new o(this.value/Z(e).value)},b.prototype.over=b.prototype.divide=i.prototype.over=i.prototype.divide,i.prototype.mod=function(e){return L(this,e)[1]},o.prototype.mod=o.prototype.remainder=function(e){return new o(this.value%Z(e).value)},b.prototype.remainder=b.prototype.mod=i.prototype.remainder=i.prototype.mod,i.prototype.pow=function(e){var a,t,c,f=Z(e),d=this.value,r=f.value;if(0===r)return n[1];if(0===d)return n[0];if(1===d)return n[1];if(-1===d)return f.isEven()?n[1]:n[-1];if(f.sign)return n[0];if(!f.isSmall)throw new Error("The exponent "+f.toString()+" is too large.");if(this.isSmall&&s(a=Math.pow(d,r)))return new b(g(a));for(t=this,c=n[1];!0&r&&(c=c.times(t),--r),0!==r;)r/=2,t=t.square();return c},b.prototype.pow=i.prototype.pow,o.prototype.pow=function(e){var a=Z(e),t=this.value,c=a.value,f=BigInt(0),d=BigInt(1),r=BigInt(2);if(c===f)return n[1];if(t===f)return n[0];if(t===d)return n[1];if(t===BigInt(-1))return a.isEven()?n[1]:n[-1];if(a.isNegative())return new o(f);for(var i=this,b=n[1];(c&d)===d&&(b=b.times(i),--c),c!==f;)c/=r,i=i.square();return b},i.prototype.modPow=function(e,a){if(e=Z(e),(a=Z(a)).isZero())throw new Error("Cannot take modPow with modulus 0");var t=n[1],c=this.mod(a);for(e.isNegative()&&(e=e.multiply(n[-1]),c=c.modInv(a));e.isPositive();){if(c.isZero())return n[0];e.isOdd()&&(t=t.multiply(c).mod(a)),e=e.divide(2),c=c.square().mod(a)}return t},o.prototype.modPow=b.prototype.modPow=i.prototype.modPow,i.prototype.compareAbs=function(e){var a=Z(e),t=this.value,c=a.value;return a.isSmall?1:S(t,c)},b.prototype.compareAbs=function(e){var a=Z(e),t=Math.abs(this.value),c=a.value;return a.isSmall?t===(c=Math.abs(c))?0:t>c?1:-1:-1},o.prototype.compareAbs=function(e){var a=this.value,t=Z(e).value;return(a=a>=0?a:-a)===(t=t>=0?t:-t)?0:a>t?1:-1},i.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var a=Z(e),t=this.value,c=a.value;return this.sign!==a.sign?a.sign?1:-1:a.isSmall?this.sign?-1:1:S(t,c)*(this.sign?-1:1)},i.prototype.compareTo=i.prototype.compare,b.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var a=Z(e),t=this.value,c=a.value;return a.isSmall?t==c?0:t>c?1:-1:t<0!==a.sign?t<0?-1:1:t<0?1:-1},b.prototype.compareTo=b.prototype.compare,o.prototype.compare=function(e){if(e===1/0)return-1;if(e===-1/0)return 1;var a=this.value,t=Z(e).value;return a===t?0:a>t?1:-1},o.prototype.compareTo=o.prototype.compare,i.prototype.equals=function(e){return 0===this.compare(e)},o.prototype.eq=o.prototype.equals=b.prototype.eq=b.prototype.equals=i.prototype.eq=i.prototype.equals,i.prototype.notEquals=function(e){return 0!==this.compare(e)},o.prototype.neq=o.prototype.notEquals=b.prototype.neq=b.prototype.notEquals=i.prototype.neq=i.prototype.notEquals,i.prototype.greater=function(e){return this.compare(e)>0},o.prototype.gt=o.prototype.greater=b.prototype.gt=b.prototype.greater=i.prototype.gt=i.prototype.greater,i.prototype.lesser=function(e){return this.compare(e)<0},o.prototype.lt=o.prototype.lesser=b.prototype.lt=b.prototype.lesser=i.prototype.lt=i.prototype.lesser,i.prototype.greaterOrEquals=function(e){return this.compare(e)>=0},o.prototype.geq=o.prototype.greaterOrEquals=b.prototype.geq=b.prototype.greaterOrEquals=i.prototype.geq=i.prototype.greaterOrEquals,i.prototype.lesserOrEquals=function(e){return this.compare(e)<=0},o.prototype.leq=o.prototype.lesserOrEquals=b.prototype.leq=b.prototype.lesserOrEquals=i.prototype.leq=i.prototype.lesserOrEquals,i.prototype.isEven=function(){return!(1&this.value[0])},b.prototype.isEven=function(){return!(1&this.value)},o.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},i.prototype.isOdd=function(){return!(1&~this.value[0])},b.prototype.isOdd=function(){return!(1&~this.value)},o.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},i.prototype.isPositive=function(){return!this.sign},b.prototype.isPositive=function(){return this.value>0},o.prototype.isPositive=b.prototype.isPositive,i.prototype.isNegative=function(){return this.sign},b.prototype.isNegative=function(){return this.value<0},o.prototype.isNegative=b.prototype.isNegative,i.prototype.isUnit=function(){return!1},b.prototype.isUnit=function(){return 1===Math.abs(this.value)},o.prototype.isUnit=function(){return this.abs().value===BigInt(1)},i.prototype.isZero=function(){return!1},b.prototype.isZero=function(){return 0===this.value},o.prototype.isZero=function(){return this.value===BigInt(0)},i.prototype.isDivisibleBy=function(e){var a=Z(e);return!a.isZero()&&(!!a.isUnit()||(0===a.compareAbs(2)?this.isEven():this.mod(a).isZero()))},o.prototype.isDivisibleBy=b.prototype.isDivisibleBy=i.prototype.isDivisibleBy,i.prototype.isPrime=function(a){var t=k(this);if(t!==e)return t;var c=this.abs(),d=c.bitLength();if(d<=64)return N(c,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var r=Math.log(2)*d.toJSNumber(),n=Math.ceil(!0===a?2*Math.pow(r,2):r),i=[],b=0;b-t?new b(e-1):new i(c,!0)},o.prototype.prev=function(){return new o(this.value-BigInt(1))};for(var P=[1];2*P[P.length-1]<=a;)P.push(2*P[P.length-1]);var R=P.length,O=P[R-1];function D(e){return Math.abs(e)<=a}function T(e,a,t){a=Z(a);for(var c=e.isNegative(),d=a.isNegative(),r=c?e.not():e,n=d?a.not():a,i=0,b=0,o=null,s=null,l=[];!r.isZero()||!n.isZero();)i=(o=L(r,O))[1].toJSNumber(),c&&(i=O-1-i),b=(s=L(n,O))[1].toJSNumber(),d&&(b=O-1-b),r=o[0],n=s[0],l.push(t(i,b));for(var u=0!==t(c?1:0,d?1:0)?f(-1):f(0),h=l.length-1;h>=0;h-=1)u=u.multiply(O).add(f(l[h]));return u}i.prototype.shiftLeft=function(e){var a=Z(e).toJSNumber();if(!D(a))throw new Error(String(a)+" is too large for shifting.");if(a<0)return this.shiftRight(-a);var t=this;if(t.isZero())return t;for(;a>=R;)t=t.multiply(O),a-=R-1;return t.multiply(P[a])},o.prototype.shiftLeft=b.prototype.shiftLeft=i.prototype.shiftLeft,i.prototype.shiftRight=function(e){var a,t=Z(e).toJSNumber();if(!D(t))throw new Error(String(t)+" is too large for shifting.");if(t<0)return this.shiftLeft(-t);for(var c=this;t>=R;){if(c.isZero()||c.isNegative()&&c.isUnit())return c;c=(a=L(c,O))[1].isNegative()?a[0].prev():a[0],t-=R-1}return(a=L(c,P[t]))[1].isNegative()?a[0].prev():a[0]},o.prototype.shiftRight=b.prototype.shiftRight=i.prototype.shiftRight,i.prototype.not=function(){return this.negate().prev()},o.prototype.not=b.prototype.not=i.prototype.not,i.prototype.and=function(e){return T(this,e,(function(e,a){return e&a}))},o.prototype.and=b.prototype.and=i.prototype.and,i.prototype.or=function(e){return T(this,e,(function(e,a){return e|a}))},o.prototype.or=b.prototype.or=i.prototype.or,i.prototype.xor=function(e){return T(this,e,(function(e,a){return e^a}))},o.prototype.xor=b.prototype.xor=i.prototype.xor;var F=1<<30;function Q(e){var t=e.value,c="number"==typeof t?t|F:"bigint"==typeof t?t|BigInt(F):t[0]+t[1]*a|1073758208;return c&-c}function U(e,a){if(a.compareTo(e)<=0){var t=U(e,a.square(a)),c=t.p,d=t.e,r=c.multiply(a);return r.compareTo(e)<=0?{p:r,e:2*d+1}:{p:c,e:2*d}}return{p:f(1),e:0}}function j(e,a){return e=Z(e),a=Z(a),e.greater(a)?e:a}function H(e,a){return e=Z(e),a=Z(a),e.lesser(a)?e:a}function $(e,a){if(e=Z(e).abs(),a=Z(a).abs(),e.equals(a))return e;if(e.isZero())return a;if(a.isZero())return e;for(var t,c,f=n[1];e.isEven()&&a.isEven();)t=H(Q(e),Q(a)),e=e.divide(t),a=a.divide(t),f=f.multiply(t);for(;e.isEven();)e=e.divide(Q(e));do{for(;a.isEven();)a=a.divide(Q(a));e.greater(a)&&(c=a,a=e,e=c),a=a.subtract(e)}while(!a.isZero());return f.isUnit()?e:e.multiply(f)}i.prototype.bitLength=function(){var e=this;return e.compareTo(f(0))<0&&(e=e.negate().subtract(f(1))),0===e.compareTo(f(0))?f(0):f(U(e,f(2)).e).add(f(1))},o.prototype.bitLength=b.prototype.bitLength=i.prototype.bitLength;var q=function(e,a,t,c){t=t||d,e=String(e),c||(e=e.toLowerCase(),t=t.toLowerCase());var f,r=e.length,n=Math.abs(a),i={};for(f=0;f=n){if("1"===s&&1===n)continue;throw new Error(s+" is not a valid digit in base "+a+".")}a=Z(a);var b=[],o="-"===e[0];for(f=o?1:0;f"!==e[f]&&f=0;c--)f=f.add(e[c].times(d)),d=d.times(a);return t?f.negate():f}function z(e,a){if((a=f(a)).isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(a.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var t=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return t.unshift([1]),{value:[].concat.apply([],t),isNegative:!1}}var c=!1;if(e.isNegative()&&a.isPositive()&&(c=!0,e=e.abs()),a.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:c};for(var d,r=[],n=e;n.isNegative()||n.compareAbs(a)>=0;){d=n.divmod(a),n=d.quotient;var i=d.remainder;i.isNegative()&&(i=a.minus(i).abs(),n=n.next()),r.push(i.toJSNumber())}return r.push(n.toJSNumber()),{value:r.reverse(),isNegative:c}}function K(e,a,t){var c=z(e,a);return(c.isNegative?"-":"")+c.value.map((function(e){return function(e,a){return e<(a=a||d).length?a[e]:"<"+e+">"}(e,t)})).join("")}function V(e){if(s(+e)){var a=+e;if(a===g(a))return r?new o(BigInt(a)):new b(a);throw new Error("Invalid integer: "+e)}var t="-"===e[0];t&&(e=e.slice(1));var c=e.split(/e/i);if(c.length>2)throw new Error("Invalid integer: "+c.join("e"));if(2===c.length){var f=c[1];if("+"===f[0]&&(f=f.slice(1)),(f=+f)!==g(f)||!s(f))throw new Error("Invalid integer: "+f+" is not a valid exponent.");var d=c[0],n=d.indexOf(".");if(n>=0&&(f-=d.length-n-1,d=d.slice(0,n)+d.slice(n+1)),f<0)throw new Error("Cannot include negative exponent part for integers");e=d+=new Array(f+1).join("0")}if(!/^([0-9][0-9]*)$/.test(e))throw new Error("Invalid integer: "+e);if(r)return new o(BigInt(t?"-"+e:e));for(var l=[],u=e.length,p=u-7;u>0;)l.push(+e.slice(p,u)),(p-=7)<0&&(p=0),u-=7;return h(l),new i(l,t)}function Z(e){return"number"==typeof e?function(e){if(r)return new o(BigInt(e));if(s(e)){if(e!==g(e))throw new Error(e+" is not an integer.");return new b(e)}return V(e.toString())}(e):"string"==typeof e?V(e):"bigint"==typeof e?new o(e):e}i.prototype.toArray=function(e){return z(this,e)},b.prototype.toArray=function(e){return z(this,e)},o.prototype.toArray=function(e){return z(this,e)},i.prototype.toString=function(a,t){if(a===e&&(a=10),10!==a||t)return K(this,a,t);for(var c,f=this.value,d=f.length,r=String(f[--d]);--d>=0;)c=String(f[d]),r+="0000000".slice(c.length)+c;return(this.sign?"-":"")+r},b.prototype.toString=function(a,t){return a===e&&(a=10),10!=a||t?K(this,a,t):String(this.value)},o.prototype.toString=b.prototype.toString,o.prototype.toJSON=i.prototype.toJSON=b.prototype.toJSON=function(){return this.toString()},i.prototype.valueOf=function(){return parseInt(this.toString(),10)},i.prototype.toJSNumber=i.prototype.valueOf,b.prototype.valueOf=function(){return this.value},b.prototype.toJSNumber=b.prototype.valueOf,o.prototype.valueOf=o.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var J=0;J<1e3;J++)n[J]=Z(J),J>0&&(n[-J]=Z(-J));return n.one=n[1],n.zero=n[0],n.minusOne=n[-1],n.max=j,n.min=H,n.gcd=$,n.lcm=function(e,a){return e=Z(e).abs(),a=Z(a).abs(),e.divide($(e,a)).multiply(a)},n.isInstance=function(e){return e instanceof i||e instanceof b||e instanceof o},n.randBetween=function(e,t,c){e=Z(e),t=Z(t);var f=c||Math.random,d=H(e,t),r=j(e,t).subtract(d).add(1);if(r.isSmall)return d.add(Math.floor(f()*r));for(var i=z(r,a).value,b=[],o=!0,s=0;s{e.exports=t(85702)(t(86989))},4315:(e,a,t)=>{var c=t(48287).Buffer;const f=t(28399).Transform;e.exports=class extends f{constructor(e,a){super(a),this._engine=e,this._finalized=!1}_transform(e,a,t){let c=null;try{this.update(e,a)}catch(e){c=e}t(c)}_flush(e){let a=null;try{this.push(this.digest())}catch(e){a=e}e(a)}update(e,a){if(!c.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return c.isBuffer(e)||(e=c.from(e,a)),this._engine.update(e),this}digest(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;let a=this._engine.digest();return void 0!==e&&(a=a.toString(e)),a}}},85702:(e,a,t)=>{const c=t(4315);e.exports=e=>(a,t)=>{const f=(a=>{switch("string"==typeof a?a.toLowerCase():a){case"blake224":return e.Blake224;case"blake256":return e.Blake256;case"blake384":return e.Blake384;case"blake512":return e.Blake512;default:throw new Error("Invald algorithm: "+a)}})(a);return new c(new f,t)}},34588:(e,a,t)=>{var c=t(48287).Buffer;class f{_lengthCarry(e){for(let a=0;a=a.length;){for(let c=this._blockOffset;c{var c=t(48287).Buffer;const f=t(23287),d=c.from([0]),r=c.from([128]);e.exports=class extends f{constructor(){super(),this._h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428],this._zo=d,this._oo=r}digest(){this._padding();const e=c.alloc(28);for(let a=0;a<7;++a)e.writeUInt32BE(this._h[a],4*a);return e}}},23287:(e,a,t)=>{var c=t(48287).Buffer;const f=t(34588),d=c.from([1]),r=c.from([129]),n=(e,a)=>(e<<32-a|e>>>a)>>>0;function i(e,a,t,c,d,r,i,b){const o=f.sigma,s=f.u256;e[c]=e[c]+((a[o[t][b]]^s[o[t][b+1]])>>>0)+e[d]>>>0,e[i]=n(e[i]^e[c],16),e[r]=e[r]+e[i]>>>0,e[d]=n(e[d]^e[r],12),e[c]=e[c]+((a[o[t][b+1]]^s[o[t][b]])>>>0)+e[d]>>>0,e[i]=n(e[i]^e[c],8),e[r]=e[r]+e[i]>>>0,e[d]=n(e[d]^e[r],7)}e.exports=class extends f{constructor(){super(),this._h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this._s=[0,0,0,0],this._block=c.alloc(64),this._blockOffset=0,this._length=[0,0],this._nullt=!1,this._zo=d,this._oo=r}_compress(){const e=f.u256,a=new Array(16),t=new Array(16);let c;for(c=0;c<16;++c)t[c]=this._block.readUInt32BE(4*c);for(c=0;c<8;++c)a[c]=this._h[c]>>>0;for(c=8;c<12;++c)a[c]=(this._s[c-8]^e[c-8])>>>0;for(c=12;c<16;++c)a[c]=e[c-8];for(this._nullt||(a[12]=(a[12]^this._length[0])>>>0,a[13]=(a[13]^this._length[0])>>>0,a[14]=(a[14]^this._length[1])>>>0,a[15]=(a[15]^this._length[1])>>>0),c=0;c<14;++c)i(a,t,c,0,4,8,12,0),i(a,t,c,1,5,9,13,2),i(a,t,c,2,6,10,14,4),i(a,t,c,3,7,11,15,6),i(a,t,c,0,5,10,15,8),i(a,t,c,1,6,11,12,10),i(a,t,c,2,7,8,13,12),i(a,t,c,3,4,9,14,14);for(c=0;c<16;++c)this._h[c%8]=(this._h[c%8]^a[c])>>>0;for(c=0;c<8;++c)this._h[c]=(this._h[c]^this._s[c%4])>>>0}_padding(){let e=this._length[0]+8*this._blockOffset,a=this._length[1];e>=4294967296&&(e-=4294967296,a+=1);const t=c.alloc(8);t.writeUInt32BE(a,0),t.writeUInt32BE(e,4),55===this._blockOffset?(this._length[0]-=8,this.update(this._oo)):(this._blockOffset<55?(0===this._blockOffset&&(this._nullt=!0),this._length[0]-=8*(55-this._blockOffset),this.update(f.padding.slice(0,55-this._blockOffset))):(this._length[0]-=8*(64-this._blockOffset),this.update(f.padding.slice(0,64-this._blockOffset)),this._length[0]-=440,this.update(f.padding.slice(1,56)),this._nullt=!0),this.update(this._zo),this._length[0]-=8),this._length[0]-=64,this.update(t)}digest(){this._padding();const e=c.alloc(32);for(let a=0;a<8;++a)e.writeUInt32BE(this._h[a],4*a);return e}}},399:(e,a,t)=>{var c=t(48287).Buffer;const f=t(61070),d=c.from([0]),r=c.from([128]);e.exports=class extends f{constructor(){super(),this._h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428],this._zo=d,this._oo=r}digest(){this._padding();const e=c.alloc(48);for(let a=0;a<12;++a)e.writeUInt32BE(this._h[a],4*a);return e}}},61070:(e,a,t)=>{var c=t(48287).Buffer;const f=t(34588),d=c.from([1]),r=c.from([129]);function n(e,a,t,c){let f=e[2*a]^e[2*t],d=e[2*a+1]^e[2*t+1];c>=32&&(d^=f,f^=d,d^=f,c-=32),0===c?(e[2*a]=f>>>0,e[2*a+1]=d>>>0):(e[2*a]=(f>>>c|d<<32-c)>>>0,e[2*a+1]=(d>>>c|f<<32-c)>>>0)}function i(e,a,t,c,d,r,i,b){const o=f.sigma,s=f.u512;let l;l=e[2*c+1]+((a[2*o[t][b]+1]^s[2*o[t][b+1]+1])>>>0)+e[2*d+1],e[2*c]=e[2*c]+((a[2*o[t][b]]^s[2*o[t][b+1]])>>>0)+e[2*d]+~~(l/4294967296)>>>0,e[2*c+1]=l>>>0,n(e,i,c,32),l=e[2*r+1]+e[2*i+1],e[2*r]=e[2*r]+e[2*i]+~~(l/4294967296)>>>0,e[2*r+1]=l>>>0,n(e,d,r,25),l=e[2*c+1]+((a[2*o[t][b+1]+1]^s[2*o[t][b]+1])>>>0)+e[2*d+1],e[2*c]=e[2*c]+((a[2*o[t][b+1]]^s[2*o[t][b]])>>>0)+e[2*d]+~~(l/4294967296)>>>0,e[2*c+1]=l>>>0,n(e,i,c,16),l=e[2*r+1]+e[2*i+1],e[2*r]=e[2*r]+e[2*i]+~~(l/4294967296)>>>0,e[2*r+1]=l>>>0,n(e,d,r,11)}e.exports=class extends f{constructor(){super(),this._h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this._s=[0,0,0,0,0,0,0,0],this._block=c.alloc(128),this._blockOffset=0,this._length=[0,0,0,0],this._nullt=!1,this._zo=d,this._oo=r}_compress(){const e=f.u512,a=new Array(32),t=new Array(32);let c;for(c=0;c<32;++c)t[c]=this._block.readUInt32BE(4*c);for(c=0;c<16;++c)a[c]=this._h[c]>>>0;for(c=16;c<24;++c)a[c]=(this._s[c-16]^e[c-16])>>>0;for(c=24;c<32;++c)a[c]=e[c-16];for(this._nullt||(a[24]=(a[24]^this._length[1])>>>0,a[25]=(a[25]^this._length[0])>>>0,a[26]=(a[26]^this._length[1])>>>0,a[27]=(a[27]^this._length[0])>>>0,a[28]=(a[28]^this._length[3])>>>0,a[29]=(a[29]^this._length[2])>>>0,a[30]=(a[30]^this._length[3])>>>0,a[31]=(a[31]^this._length[2])>>>0),c=0;c<16;++c)i(a,t,c,0,4,8,12,0),i(a,t,c,1,5,9,13,2),i(a,t,c,2,6,10,14,4),i(a,t,c,3,7,11,15,6),i(a,t,c,0,5,10,15,8),i(a,t,c,1,6,11,12,10),i(a,t,c,2,7,8,13,12),i(a,t,c,3,4,9,14,14);for(c=0;c<16;++c)this._h[c%8*2]=(this._h[c%8*2]^a[2*c])>>>0,this._h[c%8*2+1]=(this._h[c%8*2+1]^a[2*c+1])>>>0;for(c=0;c<8;++c)this._h[2*c]=(this._h[2*c]^this._s[c%4*2])>>>0,this._h[2*c+1]=(this._h[2*c+1]^this._s[c%4*2+1])>>>0}_padding(){const e=this._length.slice();e[0]+=8*this._blockOffset,this._lengthCarry(e);const a=c.alloc(16);for(let t=0;t<4;++t)a.writeUInt32BE(e[3-t],4*t);111===this._blockOffset?(this._length[0]-=8,this.update(this._oo)):(this._blockOffset<111?(0===this._blockOffset&&(this._nullt=!0),this._length[0]-=8*(111-this._blockOffset),this.update(f.padding.slice(0,111-this._blockOffset))):(this._length[0]-=8*(128-this._blockOffset),this.update(f.padding.slice(0,128-this._blockOffset)),this._length[0]-=888,this.update(f.padding.slice(1,112)),this._nullt=!0),this.update(this._zo),this._length[0]-=8),this._length[0]-=128,this.update(a)}digest(){this._padding();const e=c.alloc(64);for(let a=0;a<16;++a)e.writeUInt32BE(this._h[a],4*a);return e}}},86989:(e,a,t)=>{e.exports={Blake224:t(48746),Blake256:t(23287),Blake384:t(399),Blake512:t(61070)}},91892:e=>{var a,t,c=(()=>{for(var e=new Uint8Array(128),a=0;a<64;a++)e[a<26?a+65:a<52?a+71:a<62?a-4:4*a-205]=a;return a=>{for(var t=a.length,c=new Uint8Array(3*(t-("="==a[t-1])-("="==a[t-2]))/4|0),f=0,d=0;f>4,c[d++]=n<<4|i>>2,c[d++]=i<<6|b}return c}})(),f=(a={"wasm-binary:./blake2b.wat"(e,a){a.exports=c("AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMKvz8EwAIAIABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCAAQgA3AyAgAEIANwMoIABCADcDMCAAQgA3AzggAEIANwNAIABCADcDSCAAQgA3A1AgAEIANwNYIABCADcDYCAAQgA3A2ggAEIANwNwIABCADcDeCAAQoiS853/zPmE6gBBACkDAIU3A4ABIABCu86qptjQ67O7f0EIKQMAhTcDiAEgAEKr8NP0r+68tzxBECkDAIU3A5ABIABC8e30+KWn/aelf0EYKQMAhTcDmAEgAELRhZrv+s+Uh9EAQSApAwCFNwOgASAAQp/Y+dnCkdqCm39BKCkDAIU3A6gBIABC6/qG2r+19sEfQTApAwCFNwOwASAAQvnC+JuRo7Pw2wBBOCkDAIU3A7gBIABCADcDwAEgAEIANwPIASAAQgA3A9ABC20BA38gAEHAAWohAyAAQcgBaiEEIAQpAwCnIQUCQANAIAEgAkYNASAFQYABRgRAIAMgAykDACAFrXw3AwBBACEFIAAQAwsgACAFaiABLQAAOgAAIAVBAWohBSABQQFqIQEMAAsLIAQgBa03AwALYQEDfyAAQcABaiEBIABByAFqIQIgASABKQMAIAIpAwB8NwMAIABCfzcD0AEgAikDAKchAwJAA0AgA0GAAUYNASAAIANqQQA6AAAgA0EBaiEDDAALCyACIAOtNwMAIAAQAwuqOwIgfgl/IABBgAFqISEgAEGIAWohIiAAQZABaiEjIABBmAFqISQgAEGgAWohJSAAQagBaiEmIABBsAFqIScgAEG4AWohKCAhKQMAIQEgIikDACECICMpAwAhAyAkKQMAIQQgJSkDACEFICYpAwAhBiAnKQMAIQcgKCkDACEIQoiS853/zPmE6gAhCUK7zqqm2NDrs7t/IQpCq/DT9K/uvLc8IQtC8e30+KWn/aelfyEMQtGFmu/6z5SH0QAhDUKf2PnZwpHagpt/IQ5C6/qG2r+19sEfIQ9C+cL4m5Gjs/DbACEQIAApAwAhESAAKQMIIRIgACkDECETIAApAxghFCAAKQMgIRUgACkDKCEWIAApAzAhFyAAKQM4IRggACkDQCEZIAApA0ghGiAAKQNQIRsgACkDWCEcIAApA2AhHSAAKQNoIR4gACkDcCEfIAApA3ghICANIAApA8ABhSENIA8gACkD0AGFIQ8gASAFIBF8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSASfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgE3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBR8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAVfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgFnx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBd8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAYfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgGXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBp8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAbfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgHHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIB18fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAefHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgH3x8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFICB8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAffHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgG3x8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBV8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAZfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgGnx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHICB8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAefHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggF3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBJ8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAdfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgEXx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBN8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAcfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggGHx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBZ8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAUfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgHHx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBl8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAdfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgEXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBZ8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByATfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggIHx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIB58fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAbfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgH3x8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBR8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAXfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggGHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBJ8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAafHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFXx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBh8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAafHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgFHx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBJ8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAefHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHXx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBx8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAffHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgE3x8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBd8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAWfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgG3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBV8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCARfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgIHx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBl8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAafHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEXx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBZ8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAYfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgE3x8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBV8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAbfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggIHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIB98fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiASfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgHHx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIB18fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAXfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggGXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBR8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAefHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgE3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIB18fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAXfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgG3x8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBF8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAcfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggGXx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBR8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAVfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBh8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAWfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggIHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIB98fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSASfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgGnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIB18fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAWfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgEnx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGICB8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAffHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHnx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBV8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAbfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgEXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBh8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAXfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgFHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBp8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCATfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgGXx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBx8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAefHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgHHx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBh8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAffHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgHXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBJ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAUfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGnx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBZ8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiARfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgIHx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBV8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAZfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggF3x8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBN8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAbfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgF3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFICB8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAffHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGnx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBx8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAUfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggEXx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBl8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAdfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgE3x8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIB58fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAYfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggEnx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBV8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAbfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBt8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSATfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgGXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBV8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAYfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgF3x8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBJ8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAWfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgIHx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBx8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAafHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgH3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBR8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAdfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgHnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBF8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSARfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBN8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAUfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgFXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBZ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAXfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBl8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAafHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgG3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBx8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAdfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHnx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB98fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAgfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgH3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBt8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAVfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBp8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAgfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggHnx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBd8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiASfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBF8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByATfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBh8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAWfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgISAhKQMAIAEgCYWFNwMAICIgIikDACACIAqFhTcDACAjICMpAwAgAyALhYU3AwAgJCAkKQMAIAQgDIWFNwMAICUgJSkDACAFIA2FhTcDACAmICYpAwAgBiAOhYU3AwAgJyAnKQMAIAcgD4WFNwMAICggKCkDACAIIBCFhTcDAAs=")}},function(){return t||(0,a[Object.keys(a)[0]])((t={exports:{}}).exports,t),t.exports})(),d=WebAssembly.compile(f);e.exports=async e=>(await WebAssembly.instantiate(await d,e)).exports},51685:(e,a,t)=>{var c=t(86889),f=t(35682),d=null,r="undefined"!=typeof WebAssembly&&t(91892)().then((e=>{d=e})),n=64,i=[];e.exports=p;var b=e.exports.BYTES_MIN=16,o=e.exports.BYTES_MAX=64,s=(e.exports.BYTES=32,e.exports.KEYBYTES_MIN=16),l=e.exports.KEYBYTES_MAX=64,u=(e.exports.KEYBYTES=32,e.exports.SALTBYTES=16),h=e.exports.PERSONALBYTES=16;function p(e,a,t,f,r){if(!(this instanceof p))return new p(e,a,t,f,r);if(!d)throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");e||(e=32),!0!==r&&(c(e>=b,"digestLength must be at least "+b+", was given "+e),c(e<=o,"digestLength must be at most "+o+", was given "+e),null!=a&&(c(a instanceof Uint8Array,"key must be Uint8Array or Buffer"),c(a.length>=s,"key must be at least "+s+", was given "+a.length),c(a.length<=l,"key must be at least "+l+", was given "+a.length)),null!=t&&(c(t instanceof Uint8Array,"salt must be Uint8Array or Buffer"),c(t.length===u,"salt must be exactly "+u+", was given "+t.length)),null!=f&&(c(f instanceof Uint8Array,"personal must be Uint8Array or Buffer"),c(f.length===h,"personal must be exactly "+h+", was given "+f.length))),i.length||(i.push(n),n+=216),this.digestLength=e,this.finalized=!1,this.pointer=i.pop(),this._memory=new Uint8Array(d.memory.buffer),this._memory.fill(0,0,64),this._memory[0]=this.digestLength,this._memory[1]=a?a.length:0,this._memory[2]=1,this._memory[3]=1,t&&this._memory.set(t,32),f&&this._memory.set(f,48),this.pointer+216>this._memory.length&&this._realloc(this.pointer+216),d.blake2b_init(this.pointer,this.digestLength),a&&(this.update(a),this._memory.fill(0,n,n+a.length),this._memory[this.pointer+200]=128)}function g(){}p.prototype._realloc=function(e){d.memory.grow(Math.max(0,Math.ceil(Math.abs(e-this._memory.length)/65536))),this._memory=new Uint8Array(d.memory.buffer)},p.prototype.update=function(e){return c(!1===this.finalized,"Hash instance finalized"),c(e instanceof Uint8Array,"input must be Uint8Array or Buffer"),n+e.length>this._memory.length&&this._realloc(n+e.length),this._memory.set(e,n),d.blake2b_update(this.pointer,n,n+e.length),this},p.prototype.digest=function(e){if(c(!1===this.finalized,"Hash instance finalized"),this.finalized=!0,i.push(this.pointer),d.blake2b_final(this.pointer),!e||"binary"===e)return this._memory.slice(this.pointer+128,this.pointer+128+this.digestLength);if("string"==typeof e)return f.toString(this._memory,e,this.pointer+128,this.pointer+128+this.digestLength);c(e instanceof Uint8Array&&e.length>=this.digestLength,"input must be Uint8Array or Buffer");for(var a=0;ae()),e):e(new Error("WebAssembly not supported"))},p.prototype.ready=p.ready,p.prototype.getPartialHash=function(){return this._memory.slice(this.pointer,this.pointer+216)},p.prototype.setPartialHash=function(e){this._memory.set(e,this.pointer)}},72206:(e,a,t)=>{var c=t(86889),f=t(51685);function d(e,a,t){var c=e[a]+e[t],f=e[a+1]+e[t+1];c>=4294967296&&f++,e[a]=c,e[a+1]=f}function r(e,a,t,c){var f=e[a]+t;t<0&&(f+=4294967296);var d=e[a+1]+c;f>=4294967296&&d++,e[a]=f,e[a+1]=d}function n(e,a){return e[a]^e[a+1]<<8^e[a+2]<<16^e[a+3]<<24}function i(e,a,t,c,f,n){var i=l[f],b=l[f+1],o=l[n],u=l[n+1];d(s,e,a),r(s,e,i,b);var h=s[c]^s[e],p=s[c+1]^s[e+1];s[c]=p,s[c+1]=h,d(s,t,c),h=s[a]^s[t],p=s[a+1]^s[t+1],s[a]=h>>>24^p<<8,s[a+1]=p>>>24^h<<8,d(s,e,a),r(s,e,o,u),h=s[c]^s[e],p=s[c+1]^s[e+1],s[c]=h>>>16^p<<16,s[c+1]=p>>>16^h<<16,d(s,t,c),h=s[a]^s[t],p=s[a+1]^s[t+1],s[a]=p>>>31^h<<1,s[a+1]=h>>>31^p<<1}var b=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),o=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(e){return 2*e}))),s=new Uint32Array(32),l=new Uint32Array(32);function u(e,a){var t=0;for(t=0;t<16;t++)s[t]=e.h[t],s[t+16]=b[t];for(s[24]=s[24]^e.t,s[25]=s[25]^e.t/4294967296,a&&(s[28]=~s[28],s[29]=~s[29]),t=0;t<32;t++)l[t]=n(e.b,4*t);for(t=0;t<12;t++)i(0,8,16,24,o[16*t+0],o[16*t+1]),i(2,10,18,26,o[16*t+2],o[16*t+3]),i(4,12,20,28,o[16*t+4],o[16*t+5]),i(6,14,22,30,o[16*t+6],o[16*t+7]),i(0,10,20,30,o[16*t+8],o[16*t+9]),i(2,12,22,24,o[16*t+10],o[16*t+11]),i(4,14,16,26,o[16*t+12],o[16*t+13]),i(6,8,18,28,o[16*t+14],o[16*t+15]);for(t=0;t<16;t++)e.h[t]=e.h[t]^s[t]^s[t+16]}var h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function p(e,a,t,c){h.fill(0),this.b=new Uint8Array(128),this.h=new Uint32Array(16),this.t=0,this.c=0,this.outlen=e,h[0]=e,a&&(h[1]=a.length),h[2]=1,h[3]=1,t&&h.set(t,32),c&&h.set(c,48);for(var f=0;f<16;f++)this.h[f]=b[f]^n(h,4*f);a&&(g(this,a),this.c=128)}function g(e,a){for(var t=0;t=this.outlen,"out must have at least outlen bytes of space"),function(e,a){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;u(e,!0);for(var t=0;t>2]>>8*(3&t)}(this,a),"hex"===e?function(e){for(var a="",t=0;t=x,"outlen must be at least "+x+", was given "+e),c(e<=y,"outlen must be at most "+y+", was given "+e),null!=a&&(c(a instanceof Uint8Array,"key must be Uint8Array or Buffer"),c(a.length>=A,"key must be at least "+A+", was given "+a.length),c(a.length<=v,"key must be at most "+v+", was given "+a.length)),null!=t&&(c(t instanceof Uint8Array,"salt must be Uint8Array or Buffer"),c(t.length===w,"salt must be exactly "+w+", was given "+t.length)),null!=f&&(c(f instanceof Uint8Array,"personal must be Uint8Array or Buffer"),c(f.length===_,"personal must be exactly "+_+", was given "+f.length))),new m(e,a,t,f)},e.exports.ready=function(e){f.ready((function(){e()}))},e.exports.WASM_SUPPORTED=f.SUPPORTED,e.exports.WASM_LOADED=!1;var x=e.exports.BYTES_MIN=16,y=e.exports.BYTES_MAX=64,A=(e.exports.BYTES=32,e.exports.KEYBYTES_MIN=16),v=e.exports.KEYBYTES_MAX=64,w=(e.exports.KEYBYTES=32,e.exports.SALTBYTES=16),_=e.exports.PERSONALBYTES=16;f.ready((function(a){a||(e.exports.WASM_LOADED=!0,e.exports=f)}))},39404:function(e,a,t){!function(e,a){"use strict";function c(e,a){if(!e)throw new Error(a||"Assertion failed")}function f(e,a){e.super_=a;var t=function(){};t.prototype=a.prototype,e.prototype=new t,e.prototype.constructor=e}function d(e,a,t){if(d.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==a&&"be"!==a||(t=a,a=10),this._init(e||0,a||10,t||"be"))}var r;"object"==typeof e?e.exports=d:a.BN=d,d.BN=d,d.wordSize=26;try{r="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:t(47790).Buffer}catch(e){}function n(e,a){var t=e.charCodeAt(a);return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:void c(!1,"Invalid character in "+e)}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,f){for(var d=0,r=0,n=Math.min(e.length,t),i=a;i=49?b-49+10:b>=17?b-17+10:b,c(b>=0&&r0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this._strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this._strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{d.prototype[Symbol.for("nodejs.util.inspect.custom")]=s}catch(e){d.prototype.inspect=s}else d.prototype.inspect=s;function s(){return(this.red?""}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t._strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215,(f+=2)>=26&&(f-=26,r--),t=0!==d||r!==this.length-1?l[6-i.length]+i+t:i+t}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=u[e],o=h[e];t="";var s=this.clone();for(s.negative=0;!s.isZero();){var p=s.modrn(o).toString(e);t=(s=s.idivn(o)).isZero()?p+t:l[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16,2)},r&&(d.prototype.toBuffer=function(e,a){return this.toArrayLike(r,e,a)}),d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){this._strip();var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0");var r=function(e,a){return e.allocUnsafe?e.allocUnsafe(a):new e(a)}(e,d);return this["_toArrayLike"+("le"===a?"LE":"BE")](r,f),r},d.prototype._toArrayLikeLE=function(e,a){for(var t=0,c=0,f=0,d=0;f>8&255),t>16&255),6===d?(t>24&255),c=0,d=0):(c=r>>>24,d+=2)}if(t=0&&(e[t--]=r>>8&255),t>=0&&(e[t--]=r>>16&255),6===d?(t>=0&&(e[t--]=r>>24&255),c=0,d=0):(c=r>>>24,d+=2)}if(t>=0)for(e[t--]=c;t>=0;)e[t--]=0},Math.clz32?d.prototype._countBits=function(e){return 32-Math.clz32(e)}:d.prototype._countBits=function(e){var a=e,t=0;return a>=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this._strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function m(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t._strip()}function x(e,a,t){return m(e,a,t)}function y(e,a){this.x=e,this.y=a}Math.imul||(g=p),d.prototype.mulTo=function(e,a){var t=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,a):t<63?p(this,e,a):t<1024?m(this,e,a):x(this,e,a)},y.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},y.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,t+=d/67108864|0,t+=r>>>26,this.words[f]=67108863&r}return 0!==t&&(this.words[f]=t,this.length++),a?this.ineg():this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f&1}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<=0);var a=e%26,t=(e-a)/26;if(c(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==a&&t++,this.length=Math.min(t,this.length),0!==a){var f=67108863^67108863>>>a<=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},d.prototype.isubn=function(e){if(c("number"==typeof e),c(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var a=0;a>26)-(i/67108864|0),this.words[f+t]=67108863&d}for(;f>26,this.words[f+t]=67108863&d;if(0===n)return this._strip();for(c(-1===n),n=0,f=0;f>26,this.words[f]=67108863&d;return this.negative=1,this._strip()},d.prototype._wordDiv=function(e,a){var t=(this.length,e.length),c=this.clone(),f=e,r=0|f.words[f.length-1];0!=(t=26-this._countBits(r))&&(f=f.ushln(t),c.iushln(t),r=0|f.words[f.length-1]);var n,i=c.length-f.length;if("mod"!==a){(n=new d(null)).length=i+1,n.words=new Array(n.length);for(var b=0;b=0;s--){var l=67108864*(0|c.words[f.length+s])+(0|c.words[f.length+s-1]);for(l=Math.min(l/r|0,67108863),c._ishlnsubmul(f,l,s);0!==c.negative;)l--,c.negative=0,c._ishlnsubmul(f,1,s),c.isZero()||(c.negative^=1);n&&(n.words[s]=l)}return n&&n._strip(),c._strip(),"div"!==a&&0!==t&&c.iushrn(t),{div:n||null,mod:c}},d.prototype.divmod=function(e,a,t){return c(!e.isZero()),this.isZero()?{div:new d(0),mod:new d(0)}:0!==this.negative&&0===e.negative?(n=this.neg().divmod(e,a),"mod"!==a&&(f=n.div.neg()),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.iadd(e)),{div:f,mod:r}):0===this.negative&&0!==e.negative?(n=this.divmod(e.neg(),a),"mod"!==a&&(f=n.div.neg()),{div:f,mod:n.mod}):this.negative&e.negative?(n=this.neg().divmod(e.neg(),a),"div"!==a&&(r=n.mod.neg(),t&&0!==r.negative&&r.isub(e)),{div:n.div,mod:r}):e.length>this.length||this.cmp(e)<0?{div:new d(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new d(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new d(this.modrn(e.words[0]))}:this._wordDiv(e,a);var f,r,n},d.prototype.div=function(e){return this.divmod(e,"div",!1).div},d.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},d.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},d.prototype.divRound=function(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var t=0!==a.div.negative?a.mod.isub(e):a.mod,c=e.ushrn(1),f=e.andln(1),d=t.cmp(c);return d<0||1===f&&0===d?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},d.prototype.modrn=function(e){var a=e<0;a&&(e=-e),c(e<=67108863);for(var t=(1<<26)%e,f=0,d=this.length-1;d>=0;d--)f=(t*f+(0|this.words[d]))%e;return a?-f:f},d.prototype.modn=function(e){return this.modrn(e)},d.prototype.idivn=function(e){var a=e<0;a&&(e=-e),c(e<=67108863);for(var t=0,f=this.length-1;f>=0;f--){var d=(0|this.words[f])+67108864*t;this.words[f]=d/e|0,t=d%e}return this._strip(),a?this.ineg():this},d.prototype.divn=function(e){return this.clone().idivn(e)},d.prototype.egcd=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f=new d(1),r=new d(0),n=new d(0),i=new d(1),b=0;a.isEven()&&t.isEven();)a.iushrn(1),t.iushrn(1),++b;for(var o=t.clone(),s=a.clone();!a.isZero();){for(var l=0,u=1;!(a.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(a.iushrn(l);l-- >0;)(f.isOdd()||r.isOdd())&&(f.iadd(o),r.isub(s)),f.iushrn(1),r.iushrn(1);for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||i.isOdd())&&(n.iadd(o),i.isub(s)),n.iushrn(1),i.iushrn(1);a.cmp(t)>=0?(a.isub(t),f.isub(n),r.isub(i)):(t.isub(a),n.isub(f),i.isub(r))}return{a:n,b:i,gcd:t.iushln(b)}},d.prototype._invmp=function(e){c(0===e.negative),c(!e.isZero());var a=this,t=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var f,r=new d(1),n=new d(0),i=t.clone();a.cmpn(1)>0&&t.cmpn(1)>0;){for(var b=0,o=1;!(a.words[0]&o)&&b<26;++b,o<<=1);if(b>0)for(a.iushrn(b);b-- >0;)r.isOdd()&&r.iadd(i),r.iushrn(1);for(var s=0,l=1;!(t.words[0]&l)&&s<26;++s,l<<=1);if(s>0)for(t.iushrn(s);s-- >0;)n.isOdd()&&n.iadd(i),n.iushrn(1);a.cmp(t)>=0?(a.isub(t),r.isub(n)):(t.isub(a),n.isub(r))}return(f=0===a.cmpn(1)?r:n).cmpn(0)<0&&f.iadd(e),f},d.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),t=e.clone();a.negative=0,t.negative=0;for(var c=0;a.isEven()&&t.isEven();c++)a.iushrn(1),t.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;t.isEven();)t.iushrn(1);var f=a.cmp(t);if(f<0){var d=a;a=t,t=d}else if(0===f||0===t.cmpn(1))break;a.isub(t)}return t.iushln(c)},d.prototype.invm=function(e){return this.egcd(e).a.umod(e)},d.prototype.isEven=function(){return!(1&this.words[0])},d.prototype.isOdd=function(){return!(1&~this.words[0])},d.prototype.andln=function(e){return this.words[0]&e},d.prototype.bincn=function(e){c("number"==typeof e);var a=e%26,t=(e-a)/26,f=1<>>26,n&=67108863,this.words[r]=n}return 0!==d&&(this.words[r]=d,this.length++),this},d.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},d.prototype.cmpn=function(e){var a,t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this._strip(),this.length>1)a=1;else{t&&(e=-e),c(e<=67108863,"Number is too big");var f=0|this.words[0];a=f===e?0:fe.length)return 1;if(this.length=0;t--){var c=0|this.words[t],f=0|e.words[t];if(c!==f){cf&&(a=1);break}}return a},d.prototype.gtn=function(e){return 1===this.cmpn(e)},d.prototype.gt=function(e){return 1===this.cmp(e)},d.prototype.gten=function(e){return this.cmpn(e)>=0},d.prototype.gte=function(e){return this.cmp(e)>=0},d.prototype.ltn=function(e){return-1===this.cmpn(e)},d.prototype.lt=function(e){return-1===this.cmp(e)},d.prototype.lten=function(e){return this.cmpn(e)<=0},d.prototype.lte=function(e){return this.cmp(e)<=0},d.prototype.eqn=function(e){return 0===this.cmpn(e)},d.prototype.eq=function(e){return 0===this.cmp(e)},d.red=function(e){return new C(e)},d.prototype.toRed=function(e){return c(!this.red,"Already a number in reduction context"),c(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},d.prototype.fromRed=function(){return c(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(e){return this.red=e,this},d.prototype.forceRed=function(e){return c(!this.red,"Already a number in reduction context"),this._forceRed(e)},d.prototype.redAdd=function(e){return c(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},d.prototype.redIAdd=function(e){return c(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},d.prototype.redSub=function(e){return c(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},d.prototype.redISub=function(e){return c(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},d.prototype.redShl=function(e){return c(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},d.prototype.redMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},d.prototype.redIMul=function(e){return c(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},d.prototype.redSqr=function(){return c(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return c(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return c(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return c(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return c(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(e){return c(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var A={k256:null,p224:null,p192:null,p25519:null};function v(e,a){this.name=e,this.p=new d(a,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function I(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var a=d._prime(e);this.m=a.p,this.prime=a}else c(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new d(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new d(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var a,t=e;do{this.split(t,this.tmp),a=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(a>this.n);var c=a0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},v.prototype.split=function(e,a){e.iushrn(this.n,0,a)},v.prototype.imulK=function(e){return e.imul(this.k)},f(w,v),w.prototype.split=function(e,a){for(var t=4194303,c=Math.min(e.length,9),f=0;f>>22,d=r}d>>>=22,e.words[f-10]=d,0===d&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,t=0;t>>=26,e.words[t]=f,a=c}return 0!==a&&(e.words[e.length++]=a),e},d._prime=function(e){if(A[e])return A[e];var a;if("k256"===e)a=new w;else if("p224"===e)a=new _;else if("p192"===e)a=new I;else{if("p25519"!==e)throw new Error("Unknown prime "+e);a=new E}return A[e]=a,a},C.prototype._verify1=function(e){c(0===e.negative,"red works only with positives"),c(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,a){c(!(e.negative|a.negative),"red works only with positives"),c(e.red&&e.red===a.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(o(e,e.umod(this.m)._forceRed(this)),e)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,a){this._verify2(e,a);var t=e.add(a);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},C.prototype.iadd=function(e,a){this._verify2(e,a);var t=e.iadd(a);return t.cmp(this.m)>=0&&t.isub(this.m),t},C.prototype.sub=function(e,a){this._verify2(e,a);var t=e.sub(a);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},C.prototype.isub=function(e,a){this._verify2(e,a);var t=e.isub(a);return t.cmpn(0)<0&&t.iadd(this.m),t},C.prototype.shl=function(e,a){return this._verify1(e),this.imod(e.ushln(a))},C.prototype.imul=function(e,a){return this._verify2(e,a),this.imod(e.imul(a))},C.prototype.mul=function(e,a){return this._verify2(e,a),this.imod(e.mul(a))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(c(a%2==1),3===a){var t=this.m.add(new d(1)).iushrn(2);return this.pow(e,t)}for(var f=this.m.subn(1),r=0;!f.isZero()&&0===f.andln(1);)r++,f.iushrn(1);c(!f.isZero());var n=new d(1).toRed(this),i=n.redNeg(),b=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new d(2*o*o).toRed(this);0!==this.pow(o,b).cmp(i);)o.redIAdd(i);for(var s=this.pow(o,f),l=this.pow(e,f.addn(1).iushrn(1)),u=this.pow(e,f),h=r;0!==u.cmp(n);){for(var p=u,g=0;0!==p.cmp(n);g++)p=p.redSqr();c(g=0;c--){for(var b=a.words[c],o=i-1;o>=0;o--){var s=b>>o&1;f!==t[0]&&(f=this.sqr(f)),0!==s||0!==r?(r<<=1,r|=s,(4==++n||0===c&&0===o)&&(f=this.mul(f,t[r]),n=0,r=0)):n=0}i=26}return f},C.prototype.convertTo=function(e){var a=e.umod(this.m);return a===e?a.clone():a},C.prototype.convertFrom=function(e){var a=e.clone();return a.red=null,a},d.mont=function(e){return new M(e)},f(M,C),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},M.prototype.imul=function(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var t=e.imul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),d=f;return f.cmp(this.m)>=0?d=f.isub(this.m):f.cmpn(0)<0&&(d=f.iadd(this.m)),d._forceRed(this)},M.prototype.mul=function(e,a){if(e.isZero()||a.isZero())return new d(0)._forceRed(this);var t=e.mul(a),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=t.isub(c).iushrn(this.shift),r=f;return f.cmp(this.m)>=0?r=f.isub(this.m):f.cmpn(0)<0&&(r=f.iadd(this.m)),r._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=t.nmd(e),this)},15037:(e,a,t)=>{var c;function f(e){this.rand=e}if(e.exports=function(e){return c||(c=new f(null)),c.generate(e)},e.exports.Rand=f,f.prototype.generate=function(e){return this._rand(e)},f.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var a=new Uint8Array(e),t=0;t{var c=t(92861).Buffer;function f(e){c.isBuffer(e)||(e=c.from(e));for(var a=e.length/4|0,t=new Array(a),f=0;f>>24]^o[h>>>16&255]^s[p>>>8&255]^l[255&g]^a[m++],r=b[h>>>24]^o[p>>>16&255]^s[g>>>8&255]^l[255&u]^a[m++],n=b[p>>>24]^o[g>>>16&255]^s[u>>>8&255]^l[255&h]^a[m++],i=b[g>>>24]^o[u>>>16&255]^s[h>>>8&255]^l[255&p]^a[m++],u=d,h=r,p=n,g=i;return d=(c[u>>>24]<<24|c[h>>>16&255]<<16|c[p>>>8&255]<<8|c[255&g])^a[m++],r=(c[h>>>24]<<24|c[p>>>16&255]<<16|c[g>>>8&255]<<8|c[255&u])^a[m++],n=(c[p>>>24]<<24|c[g>>>16&255]<<16|c[u>>>8&255]<<8|c[255&h])^a[m++],i=(c[g>>>24]<<24|c[u>>>16&255]<<16|c[h>>>8&255]<<8|c[255&p])^a[m++],[d>>>=0,r>>>=0,n>>>=0,i>>>=0]}var n=[0,1,2,4,8,16,32,64,128,27,54],i=function(){for(var e=new Array(256),a=0;a<256;a++)e[a]=a<128?a<<1:a<<1^283;for(var t=[],c=[],f=[[],[],[],[]],d=[[],[],[],[]],r=0,n=0,i=0;i<256;++i){var b=n^n<<1^n<<2^n<<3^n<<4;b=b>>>8^255&b^99,t[r]=b,c[b]=r;var o=e[r],s=e[o],l=e[s],u=257*e[b]^16843008*b;f[0][r]=u<<24|u>>>8,f[1][r]=u<<16|u>>>16,f[2][r]=u<<8|u>>>24,f[3][r]=u,u=16843009*l^65537*s^257*o^16843008*r,d[0][b]=u<<24|u>>>8,d[1][b]=u<<16|u>>>16,d[2][b]=u<<8|u>>>24,d[3][b]=u,0===r?r=n=1:(r=o^e[e[e[l^o]]],n^=e[e[n]])}return{SBOX:t,INV_SBOX:c,SUB_MIX:f,INV_SUB_MIX:d}}();function b(e){this._key=f(e),this._reset()}b.blockSize=16,b.keySize=32,b.prototype.blockSize=b.blockSize,b.prototype.keySize=b.keySize,b.prototype._reset=function(){for(var e=this._key,a=e.length,t=a+6,c=4*(t+1),f=[],d=0;d>>24,r=i.SBOX[r>>>24]<<24|i.SBOX[r>>>16&255]<<16|i.SBOX[r>>>8&255]<<8|i.SBOX[255&r],r^=n[d/a|0]<<24):a>6&&d%a==4&&(r=i.SBOX[r>>>24]<<24|i.SBOX[r>>>16&255]<<16|i.SBOX[r>>>8&255]<<8|i.SBOX[255&r]),f[d]=f[d-a]^r}for(var b=[],o=0;o>>24]]^i.INV_SUB_MIX[1][i.SBOX[l>>>16&255]]^i.INV_SUB_MIX[2][i.SBOX[l>>>8&255]]^i.INV_SUB_MIX[3][i.SBOX[255&l]]}this._nRounds=t,this._keySchedule=f,this._invKeySchedule=b},b.prototype.encryptBlockRaw=function(e){return r(e=f(e),this._keySchedule,i.SUB_MIX,i.SBOX,this._nRounds)},b.prototype.encryptBlock=function(e){var a=this.encryptBlockRaw(e),t=c.allocUnsafe(16);return t.writeUInt32BE(a[0],0),t.writeUInt32BE(a[1],4),t.writeUInt32BE(a[2],8),t.writeUInt32BE(a[3],12),t},b.prototype.decryptBlock=function(e){var a=(e=f(e))[1];e[1]=e[3],e[3]=a;var t=r(e,this._invKeySchedule,i.INV_SUB_MIX,i.INV_SBOX,this._nRounds),d=c.allocUnsafe(16);return d.writeUInt32BE(t[0],0),d.writeUInt32BE(t[3],4),d.writeUInt32BE(t[2],8),d.writeUInt32BE(t[1],12),d},b.prototype.scrub=function(){d(this._keySchedule),d(this._invKeySchedule),d(this._key)},e.exports.AES=b},92356:(e,a,t)=>{var c=t(50462),f=t(92861).Buffer,d=t(56168),r=t(56698),n=t(25892),i=t(30295),b=t(45122);function o(e,a,t,r){d.call(this);var i=f.alloc(4,0);this._cipher=new c.AES(a);var o=this._cipher.encryptBlock(i);this._ghash=new n(o),t=function(e,a,t){if(12===a.length)return e._finID=f.concat([a,f.from([0,0,0,1])]),f.concat([a,f.from([0,0,0,2])]);var c=new n(t),d=a.length,r=d%16;c.update(a),r&&(r=16-r,c.update(f.alloc(r,0))),c.update(f.alloc(8,0));var i=8*d,o=f.alloc(8);o.writeUIntBE(i,0,8),c.update(o),e._finID=c.state;var s=f.from(e._finID);return b(s),s}(this,t,o),this._prev=f.from(t),this._cache=f.allocUnsafe(0),this._secCache=f.allocUnsafe(0),this._decrypt=r,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}r(o,d),o.prototype._update=function(e){if(!this._called&&this._alen){var a=16-this._alen%16;a<16&&(a=f.alloc(a,0),this._ghash.update(a))}this._called=!0;var t=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(t),this._len+=e.length,t},o.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=i(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,a){var t=0;e.length!==a.length&&t++;for(var c=Math.min(e.length,a.length),f=0;f{var c=t(25799),f=t(36171),d=t(3219);a.createCipher=a.Cipher=c.createCipher,a.createCipheriv=a.Cipheriv=c.createCipheriv,a.createDecipher=a.Decipher=f.createDecipher,a.createDecipheriv=a.Decipheriv=f.createDecipheriv,a.listCiphers=a.getCiphers=function(){return Object.keys(d)}},36171:(e,a,t)=>{var c=t(92356),f=t(92861).Buffer,d=t(530),r=t(50650),n=t(56168),i=t(50462),b=t(68078);function o(e,a,t){n.call(this),this._cache=new s,this._last=void 0,this._cipher=new i.AES(a),this._prev=f.from(t),this._mode=e,this._autopadding=!0}function s(){this.cache=f.allocUnsafe(0)}function l(e,a,t){var n=d[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=f.from(t)),"GCM"!==n.mode&&t.length!==n.iv)throw new TypeError("invalid iv length "+t.length);if("string"==typeof a&&(a=f.from(a)),a.length!==n.key/8)throw new TypeError("invalid key length "+a.length);return"stream"===n.type?new r(n.module,a,t,!0):"auth"===n.type?new c(n.module,a,t,!0):new o(n.module,a,t)}t(56698)(o,n),o.prototype._update=function(e){var a,t;this._cache.add(e);for(var c=[];a=this._cache.get(this._autopadding);)t=this._mode.decrypt(this,a),c.push(t);return f.concat(c)},o.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var a=e[15];if(a<1||a>16)throw new Error("unable to decrypt data");for(var t=-1;++t16)return a=this.cache.slice(0,16),this.cache=this.cache.slice(16),a}else if(this.cache.length>=16)return a=this.cache.slice(0,16),this.cache=this.cache.slice(16),a;return null},s.prototype.flush=function(){if(this.cache.length)return this.cache},a.createDecipher=function(e,a){var t=d[e.toLowerCase()];if(!t)throw new TypeError("invalid suite type");var c=b(a,!1,t.key,t.iv);return l(e,c.key,c.iv)},a.createDecipheriv=l},25799:(e,a,t)=>{var c=t(530),f=t(92356),d=t(92861).Buffer,r=t(50650),n=t(56168),i=t(50462),b=t(68078);function o(e,a,t){n.call(this),this._cache=new l,this._cipher=new i.AES(a),this._prev=d.from(t),this._mode=e,this._autopadding=!0}t(56698)(o,n),o.prototype._update=function(e){var a,t;this._cache.add(e);for(var c=[];a=this._cache.get();)t=this._mode.encrypt(this,a),c.push(t);return d.concat(c)};var s=d.alloc(16,16);function l(){this.cache=d.allocUnsafe(0)}function u(e,a,t){var n=c[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"==typeof a&&(a=d.from(a)),a.length!==n.key/8)throw new TypeError("invalid key length "+a.length);if("string"==typeof t&&(t=d.from(t)),"GCM"!==n.mode&&t.length!==n.iv)throw new TypeError("invalid iv length "+t.length);return"stream"===n.type?new r(n.module,a,t):"auth"===n.type?new f(n.module,a,t):new o(n.module,a,t)}o.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(s))throw this._cipher.scrub(),new Error("data not multiple of block length")},o.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},l.prototype.add=function(e){this.cache=d.concat([this.cache,e])},l.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},l.prototype.flush=function(){for(var e=16-this.cache.length,a=d.allocUnsafe(e),t=-1;++t{var c=t(92861).Buffer,f=c.alloc(16,0);function d(e){var a=c.allocUnsafe(16);return a.writeUInt32BE(e[0]>>>0,0),a.writeUInt32BE(e[1]>>>0,4),a.writeUInt32BE(e[2]>>>0,8),a.writeUInt32BE(e[3]>>>0,12),a}function r(e){this.h=e,this.state=c.alloc(16,0),this.cache=c.allocUnsafe(0)}r.prototype.ghash=function(e){for(var a=-1;++a0;a--)c[a]=c[a]>>>1|(1&c[a-1])<<31;c[0]=c[0]>>>1,t&&(c[0]=c[0]^225<<24)}this.state=d(f)},r.prototype.update=function(e){var a;for(this.cache=c.concat([this.cache,e]);this.cache.length>=16;)a=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(a)},r.prototype.final=function(e,a){return this.cache.length&&this.ghash(c.concat([this.cache,f],16)),this.ghash(d([0,e,0,a])),this.state},e.exports=r},45122:e=>{e.exports=function(e){for(var a,t=e.length;t--;){if(255!==(a=e.readUInt8(t))){a++,e.writeUInt8(a,t);break}e.writeUInt8(0,t)}}},92884:(e,a,t)=>{var c=t(30295);a.encrypt=function(e,a){var t=c(a,e._prev);return e._prev=e._cipher.encryptBlock(t),e._prev},a.decrypt=function(e,a){var t=e._prev;e._prev=a;var f=e._cipher.decryptBlock(a);return c(f,t)}},46383:(e,a,t)=>{var c=t(92861).Buffer,f=t(30295);function d(e,a,t){var d=a.length,r=f(a,e._cache);return e._cache=e._cache.slice(d),e._prev=c.concat([e._prev,t?a:r]),r}a.encrypt=function(e,a,t){for(var f,r=c.allocUnsafe(0);a.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=c.allocUnsafe(0)),!(e._cache.length<=a.length)){r=c.concat([r,d(e,a,t)]);break}f=e._cache.length,r=c.concat([r,d(e,a.slice(0,f),t)]),a=a.slice(f)}return r}},55264:(e,a,t)=>{var c=t(92861).Buffer;function f(e,a,t){for(var c,f,r=-1,n=0;++r<8;)c=a&1<<7-r?128:0,n+=(128&(f=e._cipher.encryptBlock(e._prev)[0]^c))>>r%8,e._prev=d(e._prev,t?c:f);return n}function d(e,a){var t=e.length,f=-1,d=c.allocUnsafe(e.length);for(e=c.concat([e,c.from([a])]);++f>7;return d}a.encrypt=function(e,a,t){for(var d=a.length,r=c.allocUnsafe(d),n=-1;++n{var c=t(92861).Buffer;function f(e,a,t){var f=e._cipher.encryptBlock(e._prev)[0]^a;return e._prev=c.concat([e._prev.slice(1),c.from([t?a:f])]),f}a.encrypt=function(e,a,t){for(var d=a.length,r=c.allocUnsafe(d),n=-1;++n{var c=t(30295),f=t(92861).Buffer,d=t(45122);function r(e){var a=e._cipher.encryptBlockRaw(e._prev);return d(e._prev),a}a.encrypt=function(e,a){var t=Math.ceil(a.length/16),d=e._cache.length;e._cache=f.concat([e._cache,f.allocUnsafe(16*t)]);for(var n=0;n{a.encrypt=function(e,a){return e._cipher.encryptBlock(a)},a.decrypt=function(e,a){return e._cipher.decryptBlock(a)}},530:(e,a,t)=>{var c={ECB:t(52632),CBC:t(92884),CFB:t(46383),CFB8:t(86975),CFB1:t(55264),OFB:t(46843),CTR:t(63053),GCM:t(63053)},f=t(3219);for(var d in f)f[d].module=c[f[d].mode];e.exports=f},46843:(e,a,t)=>{var c=t(48287).Buffer,f=t(30295);function d(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}a.encrypt=function(e,a){for(;e._cache.length{var c=t(50462),f=t(92861).Buffer,d=t(56168);function r(e,a,t,r){d.call(this),this._cipher=new c.AES(a),this._prev=f.from(t),this._cache=f.allocUnsafe(0),this._secCache=f.allocUnsafe(0),this._decrypt=r,this._mode=e}t(56698)(r,d),r.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},r.prototype._final=function(){this._cipher.scrub()},e.exports=r},30125:(e,a,t)=>{var c=t(84050),f=t(1241),d=t(530),r=t(32438),n=t(68078);function i(e,a,t){if(e=e.toLowerCase(),d[e])return f.createCipheriv(e,a,t);if(r[e])return new c({key:a,iv:t,mode:e});throw new TypeError("invalid suite type")}function b(e,a,t){if(e=e.toLowerCase(),d[e])return f.createDecipheriv(e,a,t);if(r[e])return new c({key:a,iv:t,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}a.createCipher=a.Cipher=function(e,a){var t,c;if(e=e.toLowerCase(),d[e])t=d[e].key,c=d[e].iv;else{if(!r[e])throw new TypeError("invalid suite type");t=8*r[e].key,c=r[e].iv}var f=n(a,!1,t,c);return i(e,f.key,f.iv)},a.createCipheriv=a.Cipheriv=i,a.createDecipher=a.Decipher=function(e,a){var t,c;if(e=e.toLowerCase(),d[e])t=d[e].key,c=d[e].iv;else{if(!r[e])throw new TypeError("invalid suite type");t=8*r[e].key,c=r[e].iv}var f=n(a,!1,t,c);return b(e,f.key,f.iv)},a.createDecipheriv=a.Decipheriv=b,a.listCiphers=a.getCiphers=function(){return Object.keys(r).concat(f.getCiphers())}},84050:(e,a,t)=>{var c=t(56168),f=t(29560),d=t(56698),r=t(92861).Buffer,n={"des-ede3-cbc":f.CBC.instantiate(f.EDE),"des-ede3":f.EDE,"des-ede-cbc":f.CBC.instantiate(f.EDE),"des-ede":f.EDE,"des-cbc":f.CBC.instantiate(f.DES),"des-ecb":f.DES};function i(e){c.call(this);var a,t=e.mode.toLowerCase(),f=n[t];a=e.decrypt?"decrypt":"encrypt";var d=e.key;r.isBuffer(d)||(d=r.from(d)),"des-ede"!==t&&"des-ede-cbc"!==t||(d=r.concat([d,d.slice(0,8)]));var i=e.iv;r.isBuffer(i)||(i=r.from(i)),this._des=f.create({key:d,iv:i,type:a})}n.des=n["des-cbc"],n.des3=n["des-ede3-cbc"],e.exports=i,d(i,c),i.prototype._update=function(e){return r.from(this._des.update(e))},i.prototype._final=function(){return r.from(this._des.final())}},32438:(e,a)=>{a["des-ecb"]={key:8,iv:0},a["des-cbc"]=a.des={key:8,iv:8},a["des-ede3-cbc"]=a.des3={key:24,iv:8},a["des-ede3"]={key:24,iv:0},a["des-ede-cbc"]={key:16,iv:8},a["des-ede"]={key:16,iv:0}},67332:(e,a,t)=>{var c=t(48287).Buffer,f=t(39404),d=t(53209);function r(e){var a,t=e.modulus.byteLength();do{a=new f(d(t))}while(a.cmp(e.modulus)>=0||!a.umod(e.prime1)||!a.umod(e.prime2));return a}function n(e,a){var t=function(e){var a=r(e);return{blinder:a.toRed(f.mont(e.modulus)).redPow(new f(e.publicExponent)).fromRed(),unblinder:a.invm(e.modulus)}}(a),d=a.modulus.byteLength(),n=new f(e).mul(t.blinder).umod(a.modulus),i=n.toRed(f.mont(a.prime1)),b=n.toRed(f.mont(a.prime2)),o=a.coefficient,s=a.prime1,l=a.prime2,u=i.redPow(a.exponent1).fromRed(),h=b.redPow(a.exponent2).fromRed(),p=u.isub(h).imul(o).umod(s).imul(l);return h.iadd(p).imul(t.unblinder).umod(a.modulus).toArrayLike(c,"be",d)}n.getr=r,e.exports=n},55715:(e,a,t)=>{"use strict";e.exports=t(62951)},20:(e,a,t)=>{"use strict";var c=t(92861).Buffer,f=t(47108),d=t(46737),r=t(56698),n=t(35359),i=t(74847),b=t(62951);function o(e){d.Writable.call(this);var a=b[e];if(!a)throw new Error("Unknown message digest");this._hashType=a.hash,this._hash=f(a.hash),this._tag=a.id,this._signType=a.sign}function s(e){d.Writable.call(this);var a=b[e];if(!a)throw new Error("Unknown message digest");this._hash=f(a.hash),this._tag=a.id,this._signType=a.sign}function l(e){return new o(e)}function u(e){return new s(e)}Object.keys(b).forEach((function(e){b[e].id=c.from(b[e].id,"hex"),b[e.toLowerCase()]=b[e]})),r(o,d.Writable),o.prototype._write=function(e,a,t){this._hash.update(e),t()},o.prototype.update=function(e,a){return this._hash.update("string"==typeof e?c.from(e,a):e),this},o.prototype.sign=function(e,a){this.end();var t=this._hash.digest(),c=n(t,e,this._hashType,this._signType,this._tag);return a?c.toString(a):c},r(s,d.Writable),s.prototype._write=function(e,a,t){this._hash.update(e),t()},s.prototype.update=function(e,a){return this._hash.update("string"==typeof e?c.from(e,a):e),this},s.prototype.verify=function(e,a,t){var f="string"==typeof a?c.from(a,t):a;this.end();var d=this._hash.digest();return i(f,d,e,this._signType,this._tag)},e.exports={Sign:l,Verify:u,createSign:l,createVerify:u}},35359:(e,a,t)=>{"use strict";var c=t(92861).Buffer,f=t(83507),d=t(67332),r=t(86729).ec,n=t(39404),i=t(78170),b=t(64589);function o(e,a,t,d){if((e=c.from(e.toArray())).length0&&t.ishrn(c),t}function l(e,a,t){var d,r;do{for(d=c.alloc(0);8*d.length{"use strict";var c=t(92861).Buffer,f=t(39404),d=t(86729).ec,r=t(78170),n=t(64589);function i(e,a){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(a)>=0)throw new Error("invalid sig")}e.exports=function(e,a,t,b,o){var s=r(t);if("ec"===s.type){if("ecdsa"!==b&&"ecdsa/rsa"!==b)throw new Error("wrong public key type");return function(e,a,t){var c=n[t.data.algorithm.curve.join(".")];if(!c)throw new Error("unknown curve "+t.data.algorithm.curve.join("."));var f=new d(c),r=t.data.subjectPrivateKey.data;return f.verify(a,e,r)}(e,a,s)}if("dsa"===s.type){if("dsa"!==b)throw new Error("wrong public key type");return function(e,a,t){var c=t.data.p,d=t.data.q,n=t.data.g,b=t.data.pub_key,o=r.signature.decode(e,"der"),s=o.s,l=o.r;i(s,d),i(l,d);var u=f.mont(c),h=s.invm(d);return 0===n.toRed(u).redPow(new f(a).mul(h).mod(d)).fromRed().mul(b.toRed(u).redPow(l.mul(h).mod(d)).fromRed()).mod(c).mod(d).cmp(l)}(e,a,s)}if("rsa"!==b&&"ecdsa/rsa"!==b)throw new Error("wrong public key type");a=c.concat([o,a]);for(var l=s.modulus.byteLength(),u=[1],h=0;a.length+u.length+2{var a={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==a.call(e)}},26248:(e,a,t)=>{"use strict";var c=t(33225),f=Object.keys||function(e){var a=[];for(var t in e)a.push(t);return a};e.exports=s;var d=Object.create(t(15622));d.inherits=t(56698);var r=t(30206),n=t(7314);d.inherits(s,r);for(var i=f(n.prototype),b=0;b{"use strict";e.exports=d;var c=t(81816),f=Object.create(t(15622));function d(e){if(!(this instanceof d))return new d(e);c.call(this,e)}f.inherits=t(56698),f.inherits(d,c),d.prototype._transform=function(e,a,t){t(null,e)}},30206:(e,a,t)=>{"use strict";var c=t(33225);e.exports=x;var f,d=t(32240);x.ReadableState=m,t(37007).EventEmitter;var r=function(e,a){return e.listeners(a).length},n=t(5567),i=t(24116).Buffer,b=(void 0!==t.g?t.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},o=Object.create(t(15622));o.inherits=t(56698);var s=t(92668),l=void 0;l=s&&s.debuglog?s.debuglog("stream"):function(){};var u,h=t(20672),p=t(36278);o.inherits(x,n);var g=["error","close","destroy","pause","resume"];function m(e,a){e=e||{};var c=a instanceof(f=f||t(26248));this.objectMode=!!e.objectMode,c&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var d=e.highWaterMark,r=e.readableHighWaterMark,n=this.objectMode?16:16384;this.highWaterMark=d||0===d?d:c&&(r||0===r)?r:n,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new h,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(u||(u=t(6427).I),this.decoder=new u(e.encoding),this.encoding=e.encoding)}function x(e){if(f=f||t(26248),!(this instanceof x))return new x(e);this._readableState=new m(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),n.call(this)}function y(e,a,t,c,f){var d,r=e._readableState;return null===a?(r.reading=!1,function(e,a){if(!a.ended){if(a.decoder){var t=a.decoder.end();t&&t.length&&(a.buffer.push(t),a.length+=a.objectMode?1:t.length)}a.ended=!0,_(e)}}(e,r)):(f||(d=function(e,a){var t,c;return c=a,i.isBuffer(c)||c instanceof b||"string"==typeof a||void 0===a||e.objectMode||(t=new TypeError("Invalid non-string/buffer chunk")),t}(r,a)),d?e.emit("error",d):r.objectMode||a&&a.length>0?("string"==typeof a||r.objectMode||Object.getPrototypeOf(a)===i.prototype||(a=function(e){return i.from(e)}(a)),c?r.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):A(e,r,a,!0):r.ended?e.emit("error",new Error("stream.push() after EOF")):(r.reading=!1,r.decoder&&!t?(a=r.decoder.write(a),r.objectMode||0!==a.length?A(e,r,a,!1):E(e,r)):A(e,r,a,!1))):c||(r.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.lengtha.highWaterMark&&(a.highWaterMark=function(e){return e>=v?e=v:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=a.length?e:a.ended?a.length:(a.needReadable=!0,0))}function _(e){var a=e._readableState;a.needReadable=!1,a.emittedReadable||(l("emitReadable",a.flowing),a.emittedReadable=!0,a.sync?c.nextTick(I,e):I(e))}function I(e){l("emit readable"),e.emit("readable"),L(e)}function E(e,a){a.readingMore||(a.readingMore=!0,c.nextTick(C,e,a))}function C(e,a){for(var t=a.length;!a.reading&&!a.flowing&&!a.ended&&a.length=a.length?(t=a.decoder?a.buffer.join(""):1===a.buffer.length?a.buffer.head.data:a.buffer.concat(a.length),a.buffer.clear()):t=function(e,a,t){var c;return ed.length?d.length:e;if(r===d.length?f+=d:f+=d.slice(0,e),0==(e-=r)){r===d.length?(++c,t.next?a.head=t.next:a.head=a.tail=null):(a.head=t,t.data=d.slice(r));break}++c}return a.length-=c,f}(e,a):function(e,a){var t=i.allocUnsafe(e),c=a.head,f=1;for(c.data.copy(t),e-=c.data.length;c=c.next;){var d=c.data,r=e>d.length?d.length:e;if(d.copy(t,t.length-e,0,r),0==(e-=r)){r===d.length?(++f,c.next?a.head=c.next:a.head=a.tail=null):(a.head=c,c.data=d.slice(r));break}++f}return a.length-=f,t}(e,a),c}(e,a.buffer,a.decoder),t);var t}function k(e){var a=e._readableState;if(a.length>0)throw new Error('"endReadable()" called on non-empty stream');a.endEmitted||(a.ended=!0,c.nextTick(N,a,e))}function N(e,a){e.endEmitted||0!==e.length||(e.endEmitted=!0,a.readable=!1,a.emit("end"))}function P(e,a){for(var t=0,c=e.length;t=a.highWaterMark||a.ended))return l("read: emitReadable",a.length,a.ended),0===a.length&&a.ended?k(this):_(this),null;if(0===(e=w(e,a))&&a.ended)return 0===a.length&&k(this),null;var c,f=a.needReadable;return l("need readable",f),(0===a.length||a.length-e0?S(e,a):null)?(a.needReadable=!0,e=0):a.length-=e,0===a.length&&(a.ended||(a.needReadable=!0),t!==e&&a.ended&&k(this)),null!==c&&this.emit("data",c),c},x.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},x.prototype.pipe=function(e,a){var t=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=e;break;case 1:f.pipes=[f.pipes,e];break;default:f.pipes.push(e)}f.pipesCount+=1,l("pipe count=%d opts=%j",f.pipesCount,a);var n=a&&!1===a.end||e===process.stdout||e===process.stderr?m:i;function i(){l("onend"),e.end()}f.endEmitted?c.nextTick(n):t.once("end",n),e.on("unpipe",(function a(c,d){l("onunpipe"),c===t&&d&&!1===d.hasUnpiped&&(d.hasUnpiped=!0,l("cleanup"),e.removeListener("close",p),e.removeListener("finish",g),e.removeListener("drain",b),e.removeListener("error",h),e.removeListener("unpipe",a),t.removeListener("end",i),t.removeListener("end",m),t.removeListener("data",u),o=!0,!f.awaitDrain||e._writableState&&!e._writableState.needDrain||b())}));var b=function(e){return function(){var a=e._readableState;l("pipeOnDrain",a.awaitDrain),a.awaitDrain&&a.awaitDrain--,0===a.awaitDrain&&r(e,"data")&&(a.flowing=!0,L(e))}}(t);e.on("drain",b);var o=!1,s=!1;function u(a){l("ondata"),s=!1,!1!==e.write(a)||s||((1===f.pipesCount&&f.pipes===e||f.pipesCount>1&&-1!==P(f.pipes,e))&&!o&&(l("false write response, pause",f.awaitDrain),f.awaitDrain++,s=!0),t.pause())}function h(a){l("onerror",a),m(),e.removeListener("error",h),0===r(e,"error")&&e.emit("error",a)}function p(){e.removeListener("finish",g),m()}function g(){l("onfinish"),e.removeListener("close",p),m()}function m(){l("unpipe"),t.unpipe(e)}return t.on("data",u),function(e,a,t){if("function"==typeof e.prependListener)return e.prependListener(a,t);e._events&&e._events[a]?d(e._events[a])?e._events[a].unshift(t):e._events[a]=[t,e._events[a]]:e.on(a,t)}(e,"error",h),e.once("close",p),e.once("finish",g),e.emit("pipe",t),f.flowing||(l("pipe resume"),t.resume()),e},x.prototype.unpipe=function(e){var a=this._readableState,t={hasUnpiped:!1};if(0===a.pipesCount)return this;if(1===a.pipesCount)return e&&e!==a.pipes||(e||(e=a.pipes),a.pipes=null,a.pipesCount=0,a.flowing=!1,e&&e.emit("unpipe",this,t)),this;if(!e){var c=a.pipes,f=a.pipesCount;a.pipes=null,a.pipesCount=0,a.flowing=!1;for(var d=0;d{"use strict";e.exports=r;var c=t(26248),f=Object.create(t(15622));function d(e,a){var t=this._transformState;t.transforming=!1;var c=t.writecb;if(!c)return this.emit("error",new Error("write callback called multiple times"));t.writechunk=null,t.writecb=null,null!=a&&this.push(a),c(e);var f=this._readableState;f.reading=!1,(f.needReadable||f.length{"use strict";var c=t(33225);function f(e){var a=this;this.next=null,this.entry=null,this.finish=function(){!function(e,a){var t=e.entry;for(e.entry=null;t;){var c=t.callback;a.pendingcb--,c(undefined),t=t.next}a.corkedRequestsFree.next=e}(a,e)}}e.exports=g;var d,r=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:c.nextTick;g.WritableState=p;var n=Object.create(t(15622));n.inherits=t(56698);var i,b={deprecate:t(94643)},o=t(5567),s=t(24116).Buffer,l=(void 0!==t.g?t.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},u=t(36278);function h(){}function p(e,a){d=d||t(26248),e=e||{};var n=a instanceof d;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,b=e.writableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(b||0===b)?b: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 s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,a){var t=e._writableState,f=t.sync,d=t.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(t),a)!function(e,a,t,f,d){--a.pendingcb,t?(c.nextTick(d,f),c.nextTick(w,e,a),e._writableState.errorEmitted=!0,e.emit("error",f)):(d(f),e._writableState.errorEmitted=!0,e.emit("error",f),w(e,a))}(e,t,f,a,d);else{var n=A(t);n||t.corked||t.bufferProcessing||!t.bufferedRequest||y(e,t),f?r(x,e,t,n,d):x(e,t,n,d)}}(a,e)},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 f(this)}function g(e){if(d=d||t(26248),!(i.call(g,this)||this instanceof d))return new g(e);this._writableState=new p(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function m(e,a,t,c,f,d,r){a.writelen=c,a.writecb=r,a.writing=!0,a.sync=!0,t?e._writev(f,a.onwrite):e._write(f,d,a.onwrite),a.sync=!1}function x(e,a,t,c){t||function(e,a){0===a.length&&a.needDrain&&(a.needDrain=!1,e.emit("drain"))}(e,a),a.pendingcb--,c(),w(e,a)}function y(e,a){a.bufferProcessing=!0;var t=a.bufferedRequest;if(e._writev&&t&&t.next){var c=a.bufferedRequestCount,d=new Array(c),r=a.corkedRequestsFree;r.entry=t;for(var n=0,i=!0;t;)d[n]=t,t.isBuf||(i=!1),t=t.next,n+=1;d.allBuffers=i,m(e,a,!0,a.length,d,"",r.finish),a.pendingcb++,a.lastBufferedRequest=null,r.next?(a.corkedRequestsFree=r.next,r.next=null):a.corkedRequestsFree=new f(a),a.bufferedRequestCount=0}else{for(;t;){var b=t.chunk,o=t.encoding,s=t.callback;if(m(e,a,!1,a.objectMode?1:b.length,b,o,s),t=t.next,a.bufferedRequestCount--,a.writing)break}null===t&&(a.lastBufferedRequest=null)}a.bufferedRequest=t,a.bufferProcessing=!1}function A(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function v(e,a){e._final((function(t){a.pendingcb--,t&&e.emit("error",t),a.prefinished=!0,e.emit("prefinish"),w(e,a)}))}function w(e,a){var t=A(a);return t&&(function(e,a){a.prefinished||a.finalCalled||("function"==typeof e._final?(a.pendingcb++,a.finalCalled=!0,c.nextTick(v,e,a)):(a.prefinished=!0,e.emit("prefinish")))}(e,a),0===a.pendingcb&&(a.finished=!0,e.emit("finish"))),t}n.inherits(g,o),p.prototype.getBuffer=function(){for(var e=this.bufferedRequest,a=[];e;)a.push(e),e=e.next;return a},function(){try{Object.defineProperty(p.prototype,"buffer",{get:b.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(i=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(e){return!!i.call(this,e)||this===g&&e&&e._writableState instanceof p}})):i=function(e){return e instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(e,a,t){var f,d=this._writableState,r=!1,n=!d.objectMode&&(f=e,s.isBuffer(f)||f instanceof l);return n&&!s.isBuffer(e)&&(e=function(e){return s.from(e)}(e)),"function"==typeof a&&(t=a,a=null),n?a="buffer":a||(a=d.defaultEncoding),"function"!=typeof t&&(t=h),d.ended?function(e,a){var t=new Error("write after end");e.emit("error",t),c.nextTick(a,t)}(this,t):(n||function(e,a,t,f){var d=!0,r=!1;return null===t?r=new TypeError("May not write null values to stream"):"string"==typeof t||void 0===t||a.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r&&(e.emit("error",r),c.nextTick(f,r),d=!1),d}(this,d,e,t))&&(d.pendingcb++,r=function(e,a,t,c,f,d){if(!t){var r=function(e,a,t){return e.objectMode||!1===e.decodeStrings||"string"!=typeof a||(a=s.from(a,t)),a}(a,c,f);c!==r&&(t=!0,f="buffer",c=r)}var n=a.objectMode?1:c.length;a.length+=n;var i=a.length-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(e,a,t){t(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(e,a,t){var f=this._writableState;"function"==typeof e?(t=e,e=null,a=null):"function"==typeof a&&(t=a,a=null),null!=e&&this.write(e,a),f.corked&&(f.corked=1,this.uncork()),f.ending||function(e,a,t){a.ending=!0,w(e,a),t&&(a.finished?c.nextTick(t):e.once("finish",t)),a.ended=!0,e.writable=!1}(this,f,t)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),g.prototype.destroy=u.destroy,g.prototype._undestroy=u.undestroy,g.prototype._destroy=function(e,a){this.end(),a(e)}},20672:(e,a,t)=>{"use strict";var c=t(24116).Buffer,f=t(21638);e.exports=function(){function e(){!function(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var a={data:e,next:null};this.length>0?this.tail.next=a:this.head=a,this.tail=a,++this.length},e.prototype.unshift=function(e){var a={data:e,next:this.head};0===this.length&&(this.tail=a),this.head=a,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var a=this.head,t=""+a.data;a=a.next;)t+=e+a.data;return t},e.prototype.concat=function(e){if(0===this.length)return c.alloc(0);for(var a,t,f=c.allocUnsafe(e>>>0),d=this.head,r=0;d;)a=f,t=r,d.data.copy(a,t),r+=d.data.length,d=d.next;return f},e}(),f&&f.inspect&&f.inspect.custom&&(e.exports.prototype[f.inspect.custom]=function(){var e=f.inspect({length:this.length});return this.constructor.name+" "+e})},36278:(e,a,t)=>{"use strict";var c=t(33225);function f(e,a){e.emit("error",a)}e.exports={destroy:function(e,a){var t=this,d=this._readableState&&this._readableState.destroyed,r=this._writableState&&this._writableState.destroyed;return d||r?(a?a(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,c.nextTick(f,this,e)):c.nextTick(f,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!a&&e?t._writableState?t._writableState.errorEmitted||(t._writableState.errorEmitted=!0,c.nextTick(f,t,e)):c.nextTick(f,t,e):a&&a(e)})),this)},undestroy:function(){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)}}},5567:(e,a,t)=>{e.exports=t(37007).EventEmitter},24116:(e,a,t)=>{var c=t(48287),f=c.Buffer;function d(e,a){for(var t in e)a[t]=e[t]}function r(e,a,t){return f(e,a,t)}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?e.exports=c:(d(c,a),a.Buffer=r),d(f,r),r.from=function(e,a,t){if("number"==typeof e)throw new TypeError("Argument must not be a number");return f(e,a,t)},r.alloc=function(e,a,t){if("number"!=typeof e)throw new TypeError("Argument must be a number");var c=f(e);return void 0!==a?"string"==typeof t?c.fill(a,t):c.fill(a):c.fill(0),c},r.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return f(e)},r.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return c.SlowBuffer(e)}},46737:(e,a,t)=>{(a=e.exports=t(30206)).Stream=a,a.Readable=a,a.Writable=t(7314),a.Duplex=t(26248),a.Transform=t(81816),a.PassThrough=t(75242)},6427:(e,a,t)=>{"use strict";var c=t(88393).Buffer,f=c.isEncoding||function(e){switch((e=""+e)&&e.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 d(e){var a;switch(this.encoding=function(e){var a=function(e){if(!e)return"utf8";for(var a;;)switch(e){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 e;default:if(a)return;e=(""+e).toLowerCase(),a=!0}}(e);if("string"!=typeof a&&(c.isEncoding===f||!f(e)))throw new Error("Unknown encoding: "+e);return a||e}(e),this.encoding){case"utf16le":this.text=i,this.end=b,a=4;break;case"utf8":this.fillLast=n,a=4;break;case"base64":this.text=o,this.end=s,a=3;break;default:return this.write=l,void(this.end=u)}this.lastNeed=0,this.lastTotal=0,this.lastChar=c.allocUnsafe(a)}function r(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function n(e){var a=this.lastTotal-this.lastNeed,t=function(e,a){if(128!=(192&a[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&a.length>1){if(128!=(192&a[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&a.length>2&&128!=(192&a[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==t?t:this.lastNeed<=e.length?(e.copy(this.lastChar,a,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,a,0,e.length),void(this.lastNeed-=e.length))}function i(e,a){if((e.length-a)%2==0){var t=e.toString("utf16le",a);if(t){var c=t.charCodeAt(t.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",a,e.length-1)}function b(e){var a=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return a+this.lastChar.toString("utf16le",0,t)}return a}function o(e,a){var t=(e.length-a)%3;return 0===t?e.toString("base64",a):(this.lastNeed=3-t,this.lastTotal=3,1===t?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",a,e.length-t))}function s(e){var a=e&&e.length?this.write(e):"";return this.lastNeed?a+this.lastChar.toString("base64",0,3-this.lastNeed):a}function l(e){return e.toString(this.encoding)}function u(e){return e&&e.length?this.write(e):""}a.I=d,d.prototype.write=function(e){if(0===e.length)return"";var a,t;if(this.lastNeed){if(void 0===(a=this.fillLast(e)))return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t=0?(f>0&&(e.lastNeed=f-1),f):--c=0?(f>0&&(e.lastNeed=f-2),f):--c=0?(f>0&&(2===f?f=0:e.lastNeed=f-3),f):0}(this,e,a);if(!this.lastNeed)return e.toString("utf8",a);this.lastTotal=t;var c=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,c),e.toString("utf8",a,c)},d.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},88393:(e,a,t)=>{var c=t(48287),f=c.Buffer;function d(e,a){for(var t in e)a[t]=e[t]}function r(e,a,t){return f(e,a,t)}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?e.exports=c:(d(c,a),a.Buffer=r),d(f,r),r.from=function(e,a,t){if("number"==typeof e)throw new TypeError("Argument must not be a number");return f(e,a,t)},r.alloc=function(e,a,t){if("number"!=typeof e)throw new TypeError("Argument must be a number");var c=f(e);return void 0!==a?"string"==typeof t?c.fill(a,t):c.fill(a):c.fill(0),c},r.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return f(e)},r.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return c.SlowBuffer(e)}},5974:(e,a,t)=>{"use strict";var c=t(48287).Buffer,f=t(94148),d=t(44442),r=t(58411),n=t(71447),i=t(19681);for(var b in i)a[b]=i[b];function o(e){if("number"!=typeof e||ea.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}a.NONE=0,a.DEFLATE=1,a.INFLATE=2,a.GZIP=3,a.GUNZIP=4,a.DEFLATERAW=5,a.INFLATERAW=6,a.UNZIP=7,o.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,f(this.init_done,"close before init"),f(this.mode<=a.UNZIP),this.mode===a.DEFLATE||this.mode===a.GZIP||this.mode===a.DEFLATERAW?r.deflateEnd(this.strm):this.mode!==a.INFLATE&&this.mode!==a.GUNZIP&&this.mode!==a.INFLATERAW&&this.mode!==a.UNZIP||n.inflateEnd(this.strm),this.mode=a.NONE,this.dictionary=null)},o.prototype.write=function(e,a,t,c,f,d,r){return this._write(!0,e,a,t,c,f,d,r)},o.prototype.writeSync=function(e,a,t,c,f,d,r){return this._write(!1,e,a,t,c,f,d,r)},o.prototype._write=function(e,t,d,r,n,i,b,o){if(f.equal(arguments.length,8),f(this.init_done,"write before init"),f(this.mode!==a.NONE,"already finalized"),f.equal(!1,this.write_in_progress,"write already in progress"),f.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,f.equal(!1,void 0===t,"must provide flush value"),this.write_in_progress=!0,t!==a.Z_NO_FLUSH&&t!==a.Z_PARTIAL_FLUSH&&t!==a.Z_SYNC_FLUSH&&t!==a.Z_FULL_FLUSH&&t!==a.Z_FINISH&&t!==a.Z_BLOCK)throw new Error("Invalid flush value");if(null==d&&(d=c.alloc(0),n=0,r=0),this.strm.avail_in=n,this.strm.input=d,this.strm.next_in=r,this.strm.avail_out=o,this.strm.output=i,this.strm.next_out=b,this.flush=t,!e)return this._process(),this._checkError()?this._afterSync():void 0;var s=this;return process.nextTick((function(){s._process(),s._after()})),this},o.prototype._afterSync=function(){var e=this.strm.avail_out,a=this.strm.avail_in;return this.write_in_progress=!1,[a,e]},o.prototype._process=function(){var e=null;switch(this.mode){case a.DEFLATE:case a.GZIP:case a.DEFLATERAW:this.err=r.deflate(this.strm,this.flush);break;case a.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=a.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=a.GUNZIP):this.mode=a.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case a.INFLATE:case a.GUNZIP:case a.INFLATERAW:for(this.err=n.inflate(this.strm,this.flush),this.err===a.Z_NEED_DICT&&this.dictionary&&(this.err=n.inflateSetDictionary(this.strm,this.dictionary),this.err===a.Z_OK?this.err=n.inflate(this.strm,this.flush):this.err===a.Z_DATA_ERROR&&(this.err=a.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===a.GUNZIP&&this.err===a.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=n.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},o.prototype._checkError=function(){switch(this.err){case a.Z_OK:case a.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===a.Z_FINISH)return this._error("unexpected end of file"),!1;break;case a.Z_STREAM_END:break;case a.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},o.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,a=this.strm.avail_in;this.write_in_progress=!1,this.callback(a,e),this.pending_close&&this.close()}},o.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},o.prototype.init=function(e,t,c,d,r){f(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),f(e>=8&&e<=15,"invalid windowBits"),f(t>=-1&&t<=9,"invalid compression level"),f(c>=1&&c<=9,"invalid memlevel"),f(d===a.Z_FILTERED||d===a.Z_HUFFMAN_ONLY||d===a.Z_RLE||d===a.Z_FIXED||d===a.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(t,e,c,d,r),this._setDictionary()},o.prototype.params=function(){throw new Error("deflateParams Not supported")},o.prototype.reset=function(){this._reset(),this._setDictionary()},o.prototype._init=function(e,t,c,f,i){switch(this.level=e,this.windowBits=t,this.memLevel=c,this.strategy=f,this.flush=a.Z_NO_FLUSH,this.err=a.Z_OK,this.mode!==a.GZIP&&this.mode!==a.GUNZIP||(this.windowBits+=16),this.mode===a.UNZIP&&(this.windowBits+=32),this.mode!==a.DEFLATERAW&&this.mode!==a.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new d,this.mode){case a.DEFLATE:case a.GZIP:case a.DEFLATERAW:this.err=r.deflateInit2(this.strm,this.level,a.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case a.INFLATE:case a.GUNZIP:case a.INFLATERAW:case a.UNZIP:this.err=n.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==a.Z_OK&&this._error("Init error"),this.dictionary=i,this.write_in_progress=!1,this.init_done=!0},o.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=a.Z_OK,this.mode){case a.DEFLATE:case a.DEFLATERAW:this.err=r.deflateSetDictionary(this.strm,this.dictionary)}this.err!==a.Z_OK&&this._error("Failed to set dictionary")}},o.prototype._reset=function(){switch(this.err=a.Z_OK,this.mode){case a.DEFLATE:case a.DEFLATERAW:case a.GZIP:this.err=r.deflateReset(this.strm);break;case a.INFLATE:case a.INFLATERAW:case a.GUNZIP:this.err=n.inflateReset(this.strm)}this.err!==a.Z_OK&&this._error("Failed to reset stream")},a.Zlib=o},78559:(e,a,t)=>{"use strict";var c=t(48287).Buffer,f=t(88310).Transform,d=t(5974),r=t(40537),n=t(94148).ok,i=t(48287).kMaxLength,b="Cannot create final Buffer. It would be larger than 0x"+i.toString(16)+" bytes";d.Z_MIN_WINDOWBITS=8,d.Z_MAX_WINDOWBITS=15,d.Z_DEFAULT_WINDOWBITS=15,d.Z_MIN_CHUNK=64,d.Z_MAX_CHUNK=1/0,d.Z_DEFAULT_CHUNK=16384,d.Z_MIN_MEMLEVEL=1,d.Z_MAX_MEMLEVEL=9,d.Z_DEFAULT_MEMLEVEL=8,d.Z_MIN_LEVEL=-1,d.Z_MAX_LEVEL=9,d.Z_DEFAULT_LEVEL=d.Z_DEFAULT_COMPRESSION;for(var o=Object.keys(d),s=0;s=i?r=new RangeError(b):a=c.concat(f,d),f=[],e.close(),t(r,a)}e.on("error",(function(a){e.removeListener("end",n),e.removeListener("readable",r),t(a)})),e.on("end",n),e.end(a),r()}function x(e,a){if("string"==typeof a&&(a=c.from(a)),!c.isBuffer(a))throw new TypeError("Not a string or buffer");var t=e._finishFlushFlag;return e._processChunk(a,t)}function y(e){if(!(this instanceof y))return new y(e);M.call(this,e,d.DEFLATE)}function A(e){if(!(this instanceof A))return new A(e);M.call(this,e,d.INFLATE)}function v(e){if(!(this instanceof v))return new v(e);M.call(this,e,d.GZIP)}function w(e){if(!(this instanceof w))return new w(e);M.call(this,e,d.GUNZIP)}function _(e){if(!(this instanceof _))return new _(e);M.call(this,e,d.DEFLATERAW)}function I(e){if(!(this instanceof I))return new I(e);M.call(this,e,d.INFLATERAW)}function E(e){if(!(this instanceof E))return new E(e);M.call(this,e,d.UNZIP)}function C(e){return e===d.Z_NO_FLUSH||e===d.Z_PARTIAL_FLUSH||e===d.Z_SYNC_FLUSH||e===d.Z_FULL_FLUSH||e===d.Z_FINISH||e===d.Z_BLOCK}function M(e,t){var r=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||a.Z_DEFAULT_CHUNK,f.call(this,e),e.flush&&!C(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!C(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||d.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:d.Z_FINISH,e.chunkSize&&(e.chunkSizea.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitsa.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.levela.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevela.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=a.Z_FILTERED&&e.strategy!=a.Z_HUFFMAN_ONLY&&e.strategy!=a.Z_RLE&&e.strategy!=a.Z_FIXED&&e.strategy!=a.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!c.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new d.Zlib(t);var n=this;this._hadError=!1,this._handle.onerror=function(e,t){B(n),n._hadError=!0;var c=new Error(e);c.errno=t,c.code=a.codes[t],n.emit("error",c)};var i=a.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(i=e.level);var b=a.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(b=e.strategy),this._handle.init(e.windowBits||a.Z_DEFAULT_WINDOWBITS,i,e.memLevel||a.Z_DEFAULT_MEMLEVEL,b,e.dictionary),this._buffer=c.allocUnsafe(this._chunkSize),this._offset=0,this._level=i,this._strategy=b,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!r._handle},configurable:!0,enumerable:!0})}function B(e,a){a&&process.nextTick(a),e._handle&&(e._handle.close(),e._handle=null)}function L(e){e.emit("close")}Object.defineProperty(a,"codes",{enumerable:!0,value:Object.freeze(u),writable:!1}),a.Deflate=y,a.Inflate=A,a.Gzip=v,a.Gunzip=w,a.DeflateRaw=_,a.InflateRaw=I,a.Unzip=E,a.createDeflate=function(e){return new y(e)},a.createInflate=function(e){return new A(e)},a.createDeflateRaw=function(e){return new _(e)},a.createInflateRaw=function(e){return new I(e)},a.createGzip=function(e){return new v(e)},a.createGunzip=function(e){return new w(e)},a.createUnzip=function(e){return new E(e)},a.deflate=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new y(a),e,t)},a.deflateSync=function(e,a){return x(new y(a),e)},a.gzip=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new v(a),e,t)},a.gzipSync=function(e,a){return x(new v(a),e)},a.deflateRaw=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new _(a),e,t)},a.deflateRawSync=function(e,a){return x(new _(a),e)},a.unzip=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new E(a),e,t)},a.unzipSync=function(e,a){return x(new E(a),e)},a.inflate=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new A(a),e,t)},a.inflateSync=function(e,a){return x(new A(a),e)},a.gunzip=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new w(a),e,t)},a.gunzipSync=function(e,a){return x(new w(a),e)},a.inflateRaw=function(e,a,t){return"function"==typeof a&&(t=a,a={}),m(new I(a),e,t)},a.inflateRawSync=function(e,a){return x(new I(a),e)},r.inherits(M,f),M.prototype.params=function(e,t,c){if(ea.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(t!=a.Z_FILTERED&&t!=a.Z_HUFFMAN_ONLY&&t!=a.Z_RLE&&t!=a.Z_FIXED&&t!=a.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+t);if(this._level!==e||this._strategy!==t){var f=this;this.flush(d.Z_SYNC_FLUSH,(function(){n(f._handle,"zlib binding closed"),f._handle.params(e,t),f._hadError||(f._level=e,f._strategy=t,c&&c())}))}else process.nextTick(c)},M.prototype.reset=function(){return n(this._handle,"zlib binding closed"),this._handle.reset()},M.prototype._flush=function(e){this._transform(c.alloc(0),"",e)},M.prototype.flush=function(e,a){var t=this,f=this._writableState;("function"==typeof e||void 0===e&&!a)&&(a=e,e=d.Z_FULL_FLUSH),f.ended?a&&process.nextTick(a):f.ending?a&&this.once("end",a):f.needDrain?a&&this.once("drain",(function(){return t.flush(e,a)})):(this._flushFlag=e,this.write(c.alloc(0),"",a))},M.prototype.close=function(e){B(this,e),process.nextTick(L,this)},M.prototype._transform=function(e,a,t){var f,r=this._writableState,n=(r.ending||r.ended)&&(!e||r.length===e.length);return null===e||c.isBuffer(e)?this._handle?(n?f=this._finishFlushFlag:(f=this._flushFlag,e.length>=r.length&&(this._flushFlag=this._opts.flush||d.Z_NO_FLUSH)),void this._processChunk(e,f,t)):t(new Error("zlib binding closed")):t(new Error("invalid input"))},M.prototype._processChunk=function(e,a,t){var f=e&&e.length,d=this._chunkSize-this._offset,r=0,o=this,s="function"==typeof t;if(!s){var l,u=[],h=0;this.on("error",(function(e){l=e})),n(this._handle,"zlib binding closed");do{var p=this._handle.writeSync(a,e,r,f,this._buffer,this._offset,d)}while(!this._hadError&&x(p[0],p[1]));if(this._hadError)throw l;if(h>=i)throw B(this),new RangeError(b);var g=c.concat(u,h);return B(this),g}n(this._handle,"zlib binding closed");var m=this._handle.write(a,e,r,f,this._buffer,this._offset,d);function x(i,b){if(this&&(this.buffer=null,this.callback=null),!o._hadError){var l=d-b;if(n(l>=0,"have should not go down"),l>0){var p=o._buffer.slice(o._offset,o._offset+l);o._offset+=l,s?o.push(p):(u.push(p),h+=p.length)}if((0===b||o._offset>=o._chunkSize)&&(d=o._chunkSize,o._offset=0,o._buffer=c.allocUnsafe(o._chunkSize)),0===b){if(r+=f-i,f=i,!s)return!0;var g=o._handle.write(a,e,r,f,o._buffer,o._offset,o._chunkSize);return g.callback=x,void(g.buffer=e)}if(!s)return!1;t()}}m.buffer=e,m.callback=x},r.inherits(y,M),r.inherits(A,M),r.inherits(v,M),r.inherits(w,M),r.inherits(_,M),r.inherits(I,M),r.inherits(E,M)},30295:(e,a,t)=>{var c=t(48287).Buffer;e.exports=function(e,a){for(var t=Math.min(e.length,a.length),f=new c(t),d=0;d{"use strict";const c=t(67526),f=t(251),d="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=i,a.SlowBuffer=function(e){return+e!=e&&(e=0),i.alloc(+e)},a.INSPECT_MAX_BYTES=50;const r=2147483647;function n(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');const a=new Uint8Array(e);return Object.setPrototypeOf(a,i.prototype),a}function i(e,a,t){if("number"==typeof e){if("string"==typeof a)throw new TypeError('The "string" argument must be of type string. Received type number');return s(e)}return b(e,a,t)}function b(e,a,t){if("string"==typeof e)return function(e,a){if("string"==typeof a&&""!==a||(a="utf8"),!i.isEncoding(a))throw new TypeError("Unknown encoding: "+a);const t=0|p(e,a);let c=n(t);const f=c.write(e,a);return f!==t&&(c=c.slice(0,f)),c}(e,a);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const a=new Uint8Array(e);return u(a.buffer,a.byteOffset,a.byteLength)}return l(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return u(e,a,t);if("undefined"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return u(e,a,t);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const c=e.valueOf&&e.valueOf();if(null!=c&&c!==e)return i.from(c,a,t);const f=function(e){if(i.isBuffer(e)){const a=0|h(e.length),t=n(a);return 0===t.length||e.copy(t,0,0,a),t}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?n(0):l(e):"Buffer"===e.type&&Array.isArray(e.data)?l(e.data):void 0}(e);if(f)return f;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return i.from(e[Symbol.toPrimitive]("string"),a,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function o(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function s(e){return o(e),n(e<0?0:0|h(e))}function l(e){const a=e.length<0?0:0|h(e.length),t=n(a);for(let c=0;c=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function p(e,a){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const t=e.length,c=arguments.length>2&&!0===arguments[2];if(!c&&0===t)return 0;let f=!1;for(;;)switch(a){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return K(e).length;default:if(f)return c?-1:z(e).length;a=(""+a).toLowerCase(),f=!0}}function g(e,a,t){let c=!1;if((void 0===a||a<0)&&(a=0),a>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(a>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,a,t);case"utf8":case"utf-8":return C(this,a,t);case"ascii":return B(this,a,t);case"latin1":case"binary":return L(this,a,t);case"base64":return E(this,a,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,a,t);default:if(c)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),c=!0}}function m(e,a,t){const c=e[a];e[a]=e[t],e[t]=c}function x(e,a,t,c,f){if(0===e.length)return-1;if("string"==typeof t?(c=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),J(t=+t)&&(t=f?0:e.length-1),t<0&&(t=e.length+t),t>=e.length){if(f)return-1;t=e.length-1}else if(t<0){if(!f)return-1;t=0}if("string"==typeof a&&(a=i.from(a,c)),i.isBuffer(a))return 0===a.length?-1:y(e,a,t,c,f);if("number"==typeof a)return a&=255,"function"==typeof Uint8Array.prototype.indexOf?f?Uint8Array.prototype.indexOf.call(e,a,t):Uint8Array.prototype.lastIndexOf.call(e,a,t):y(e,[a],t,c,f);throw new TypeError("val must be string, number or Buffer")}function y(e,a,t,c,f){let d,r=1,n=e.length,i=a.length;if(void 0!==c&&("ucs2"===(c=String(c).toLowerCase())||"ucs-2"===c||"utf16le"===c||"utf-16le"===c)){if(e.length<2||a.length<2)return-1;r=2,n/=2,i/=2,t/=2}function b(e,a){return 1===r?e[a]:e.readUInt16BE(a*r)}if(f){let c=-1;for(d=t;dn&&(t=n-i),d=t;d>=0;d--){let t=!0;for(let c=0;cf&&(c=f):c=f;const d=a.length;let r;for(c>d/2&&(c=d/2),r=0;r>8,f=t%256,d.push(f),d.push(c);return d}(a,e.length-t),e,t,c)}function E(e,a,t){return 0===a&&t===e.length?c.fromByteArray(e):c.fromByteArray(e.slice(a,t))}function C(e,a,t){t=Math.min(e.length,t);const c=[];let f=a;for(;f239?4:a>223?3:a>191?2:1;if(f+r<=t){let t,c,n,i;switch(r){case 1:a<128&&(d=a);break;case 2:t=e[f+1],128==(192&t)&&(i=(31&a)<<6|63&t,i>127&&(d=i));break;case 3:t=e[f+1],c=e[f+2],128==(192&t)&&128==(192&c)&&(i=(15&a)<<12|(63&t)<<6|63&c,i>2047&&(i<55296||i>57343)&&(d=i));break;case 4:t=e[f+1],c=e[f+2],n=e[f+3],128==(192&t)&&128==(192&c)&&128==(192&n)&&(i=(15&a)<<18|(63&t)<<12|(63&c)<<6|63&n,i>65535&&i<1114112&&(d=i))}}null===d?(d=65533,r=1):d>65535&&(d-=65536,c.push(d>>>10&1023|55296),d=56320|1023&d),c.push(d),f+=r}return function(e){const a=e.length;if(a<=M)return String.fromCharCode.apply(String,e);let t="",c=0;for(;cc.length?(i.isBuffer(a)||(a=i.from(a)),a.copy(c,f)):Uint8Array.prototype.set.call(c,a,f);else{if(!i.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(c,f)}f+=a.length}return c},i.byteLength=p,i.prototype._isBuffer=!0,i.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let a=0;at&&(e+=" ... "),""},d&&(i.prototype[d]=i.prototype.inspect),i.prototype.compare=function(e,a,t,c,f){if(Z(e,Uint8Array)&&(e=i.from(e,e.offset,e.byteLength)),!i.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===a&&(a=0),void 0===t&&(t=e?e.length:0),void 0===c&&(c=0),void 0===f&&(f=this.length),a<0||t>e.length||c<0||f>this.length)throw new RangeError("out of range index");if(c>=f&&a>=t)return 0;if(c>=f)return-1;if(a>=t)return 1;if(this===e)return 0;let d=(f>>>=0)-(c>>>=0),r=(t>>>=0)-(a>>>=0);const n=Math.min(d,r),b=this.slice(c,f),o=e.slice(a,t);for(let e=0;e>>=0,isFinite(t)?(t>>>=0,void 0===c&&(c="utf8")):(c=t,t=void 0)}const f=this.length-a;if((void 0===t||t>f)&&(t=f),e.length>0&&(t<0||a<0)||a>this.length)throw new RangeError("Attempt to write outside buffer bounds");c||(c="utf8");let d=!1;for(;;)switch(c){case"hex":return A(this,e,a,t);case"utf8":case"utf-8":return v(this,e,a,t);case"ascii":case"latin1":case"binary":return w(this,e,a,t);case"base64":return _(this,e,a,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,a,t);default:if(d)throw new TypeError("Unknown encoding: "+c);c=(""+c).toLowerCase(),d=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const M=4096;function B(e,a,t){let c="";t=Math.min(e.length,t);for(let f=a;fc)&&(t=c);let f="";for(let c=a;ct)throw new RangeError("Trying to access beyond buffer length")}function P(e,a,t,c,f,d){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(a>f||ae.length)throw new RangeError("Index out of range")}function R(e,a,t,c,f){H(a,c,f,e,t,7);let d=Number(a&BigInt(4294967295));e[t++]=d,d>>=8,e[t++]=d,d>>=8,e[t++]=d,d>>=8,e[t++]=d;let r=Number(a>>BigInt(32)&BigInt(4294967295));return e[t++]=r,r>>=8,e[t++]=r,r>>=8,e[t++]=r,r>>=8,e[t++]=r,t}function O(e,a,t,c,f){H(a,c,f,e,t,7);let d=Number(a&BigInt(4294967295));e[t+7]=d,d>>=8,e[t+6]=d,d>>=8,e[t+5]=d,d>>=8,e[t+4]=d;let r=Number(a>>BigInt(32)&BigInt(4294967295));return e[t+3]=r,r>>=8,e[t+2]=r,r>>=8,e[t+1]=r,r>>=8,e[t]=r,t+8}function D(e,a,t,c,f,d){if(t+c>e.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function T(e,a,t,c,d){return a=+a,t>>>=0,d||D(e,0,t,4),f.write(e,a,t,c,23,4),t+4}function F(e,a,t,c,d){return a=+a,t>>>=0,d||D(e,0,t,8),f.write(e,a,t,c,52,8),t+8}i.prototype.slice=function(e,a){const t=this.length;(e=~~e)<0?(e+=t)<0&&(e=0):e>t&&(e=t),(a=void 0===a?t:~~a)<0?(a+=t)<0&&(a=0):a>t&&(a=t),a>>=0,a>>>=0,t||N(e,a,this.length);let c=this[e],f=1,d=0;for(;++d>>=0,a>>>=0,t||N(e,a,this.length);let c=this[e+--a],f=1;for(;a>0&&(f*=256);)c+=this[e+--a]*f;return c},i.prototype.readUint8=i.prototype.readUInt8=function(e,a){return e>>>=0,a||N(e,1,this.length),this[e]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(e,a){return e>>>=0,a||N(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(e,a){return e>>>=0,a||N(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(e,a){return e>>>=0,a||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(e,a){return e>>>=0,a||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readBigUInt64LE=Y((function(e){$(e>>>=0,"offset");const a=this[e],t=this[e+7];void 0!==a&&void 0!==t||q(e,this.length-8);const c=a+256*this[++e]+65536*this[++e]+this[++e]*2**24,f=this[++e]+256*this[++e]+65536*this[++e]+t*2**24;return BigInt(c)+(BigInt(f)<>>=0,"offset");const a=this[e],t=this[e+7];void 0!==a&&void 0!==t||q(e,this.length-8);const c=a*2**24+65536*this[++e]+256*this[++e]+this[++e],f=this[++e]*2**24+65536*this[++e]+256*this[++e]+t;return(BigInt(c)<>>=0,a>>>=0,t||N(e,a,this.length);let c=this[e],f=1,d=0;for(;++d=f&&(c-=Math.pow(2,8*a)),c},i.prototype.readIntBE=function(e,a,t){e>>>=0,a>>>=0,t||N(e,a,this.length);let c=a,f=1,d=this[e+--c];for(;c>0&&(f*=256);)d+=this[e+--c]*f;return f*=128,d>=f&&(d-=Math.pow(2,8*a)),d},i.prototype.readInt8=function(e,a){return e>>>=0,a||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,a){e>>>=0,a||N(e,2,this.length);const t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt16BE=function(e,a){e>>>=0,a||N(e,2,this.length);const t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt32LE=function(e,a){return e>>>=0,a||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,a){return e>>>=0,a||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readBigInt64LE=Y((function(e){$(e>>>=0,"offset");const a=this[e],t=this[e+7];void 0!==a&&void 0!==t||q(e,this.length-8);const c=this[e+4]+256*this[e+5]+65536*this[e+6]+(t<<24);return(BigInt(c)<>>=0,"offset");const a=this[e],t=this[e+7];void 0!==a&&void 0!==t||q(e,this.length-8);const c=(a<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(c)<>>=0,a||N(e,4,this.length),f.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,a){return e>>>=0,a||N(e,4,this.length),f.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,a){return e>>>=0,a||N(e,8,this.length),f.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,a){return e>>>=0,a||N(e,8,this.length),f.read(this,e,!1,52,8)},i.prototype.writeUintLE=i.prototype.writeUIntLE=function(e,a,t,c){e=+e,a>>>=0,t>>>=0,c||P(this,e,a,t,Math.pow(2,8*t)-1,0);let f=1,d=0;for(this[a]=255&e;++d>>=0,t>>>=0,c||P(this,e,a,t,Math.pow(2,8*t)-1,0);let f=t-1,d=1;for(this[a+f]=255&e;--f>=0&&(d*=256);)this[a+f]=e/d&255;return a+t},i.prototype.writeUint8=i.prototype.writeUInt8=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,1,255,0),this[a]=255&e,a+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,2,65535,0),this[a]=255&e,this[a+1]=e>>>8,a+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,2,65535,0),this[a]=e>>>8,this[a+1]=255&e,a+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,4,4294967295,0),this[a+3]=e>>>24,this[a+2]=e>>>16,this[a+1]=e>>>8,this[a]=255&e,a+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,4,4294967295,0),this[a]=e>>>24,this[a+1]=e>>>16,this[a+2]=e>>>8,this[a+3]=255&e,a+4},i.prototype.writeBigUInt64LE=Y((function(e,a=0){return R(this,e,a,BigInt(0),BigInt("0xffffffffffffffff"))})),i.prototype.writeBigUInt64BE=Y((function(e,a=0){return O(this,e,a,BigInt(0),BigInt("0xffffffffffffffff"))})),i.prototype.writeIntLE=function(e,a,t,c){if(e=+e,a>>>=0,!c){const c=Math.pow(2,8*t-1);P(this,e,a,t,c-1,-c)}let f=0,d=1,r=0;for(this[a]=255&e;++f>>=0,!c){const c=Math.pow(2,8*t-1);P(this,e,a,t,c-1,-c)}let f=t-1,d=1,r=0;for(this[a+f]=255&e;--f>=0&&(d*=256);)e<0&&0===r&&0!==this[a+f+1]&&(r=1),this[a+f]=(e/d|0)-r&255;return a+t},i.prototype.writeInt8=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,1,127,-128),e<0&&(e=255+e+1),this[a]=255&e,a+1},i.prototype.writeInt16LE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,2,32767,-32768),this[a]=255&e,this[a+1]=e>>>8,a+2},i.prototype.writeInt16BE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,2,32767,-32768),this[a]=e>>>8,this[a+1]=255&e,a+2},i.prototype.writeInt32LE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,4,2147483647,-2147483648),this[a]=255&e,this[a+1]=e>>>8,this[a+2]=e>>>16,this[a+3]=e>>>24,a+4},i.prototype.writeInt32BE=function(e,a,t){return e=+e,a>>>=0,t||P(this,e,a,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[a]=e>>>24,this[a+1]=e>>>16,this[a+2]=e>>>8,this[a+3]=255&e,a+4},i.prototype.writeBigInt64LE=Y((function(e,a=0){return R(this,e,a,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),i.prototype.writeBigInt64BE=Y((function(e,a=0){return O(this,e,a,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),i.prototype.writeFloatLE=function(e,a,t){return T(this,e,a,!0,t)},i.prototype.writeFloatBE=function(e,a,t){return T(this,e,a,!1,t)},i.prototype.writeDoubleLE=function(e,a,t){return F(this,e,a,!0,t)},i.prototype.writeDoubleBE=function(e,a,t){return F(this,e,a,!1,t)},i.prototype.copy=function(e,a,t,c){if(!i.isBuffer(e))throw new TypeError("argument should be a Buffer");if(t||(t=0),c||0===c||(c=this.length),a>=e.length&&(a=e.length),a||(a=0),c>0&&c=this.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("sourceEnd out of bounds");c>this.length&&(c=this.length),e.length-a>>=0,t=void 0===t?this.length:t>>>0,e||(e=0),"number"==typeof e)for(f=a;f=c+4;t-=3)a=`_${e.slice(t-3,t)}${a}`;return`${e.slice(0,t)}${a}`}function H(e,a,t,c,f,d){if(e>t||e3?0===a||a===BigInt(0)?`>= 0${c} and < 2${c} ** ${8*(d+1)}${c}`:`>= -(2${c} ** ${8*(d+1)-1}${c}) and < 2 ** ${8*(d+1)-1}${c}`:`>= ${a}${c} and <= ${t}${c}`,new Q.ERR_OUT_OF_RANGE("value",f,e)}!function(e,a,t){$(a,"offset"),void 0!==e[a]&&void 0!==e[a+t]||q(a,e.length-(t+1))}(c,f,d)}function $(e,a){if("number"!=typeof e)throw new Q.ERR_INVALID_ARG_TYPE(a,"number",e)}function q(e,a,t){if(Math.floor(e)!==e)throw $(e,t),new Q.ERR_OUT_OF_RANGE(t||"offset","an integer",e);if(a<0)throw new Q.ERR_BUFFER_OUT_OF_BOUNDS;throw new Q.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${a}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,a){return`The "${e}" argument must be of type number. Received type ${typeof a}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,a,t){let c=`The value of "${e}" is out of range.`,f=t;return Number.isInteger(t)&&Math.abs(t)>2**32?f=j(String(t)):"bigint"==typeof t&&(f=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(f=j(f)),f+="n"),c+=` It must be ${a}. Received ${f}`,c}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function z(e,a){let t;a=a||1/0;const c=e.length;let f=null;const d=[];for(let r=0;r55295&&t<57344){if(!f){if(t>56319){(a-=3)>-1&&d.push(239,191,189);continue}if(r+1===c){(a-=3)>-1&&d.push(239,191,189);continue}f=t;continue}if(t<56320){(a-=3)>-1&&d.push(239,191,189),f=t;continue}t=65536+(f-55296<<10|t-56320)}else f&&(a-=3)>-1&&d.push(239,191,189);if(f=null,t<128){if((a-=1)<0)break;d.push(t)}else if(t<2048){if((a-=2)<0)break;d.push(t>>6|192,63&t|128)}else if(t<65536){if((a-=3)<0)break;d.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((a-=4)<0)break;d.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return d}function K(e){return c.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,a,t,c){let f;for(f=0;f=a.length||f>=e.length);++f)a[f+t]=e[f];return f}function Z(e,a){return e instanceof a||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===a.name}function J(e){return e!=e}const W=function(){const e="0123456789abcdef",a=new Array(256);for(let t=0;t<16;++t){const c=16*t;for(let f=0;f<16;++f)a[c+f]=e[t]+e[f]}return a}();function Y(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},86866:e=>{e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},38075:(e,a,t)=>{"use strict";var c=t(70453),f=t(10487),d=f(c("String.prototype.indexOf"));e.exports=function(e,a){var t=c(e,!!a);return"function"==typeof t&&d(e,".prototype.")>-1?f(t):t}},10487:(e,a,t)=>{"use strict";var c=t(66743),f=t(70453),d=t(96897),r=t(69675),n=f("%Function.prototype.apply%"),i=f("%Function.prototype.call%"),b=f("%Reflect.apply%",!0)||c.call(i,n),o=t(30655),s=f("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new r("a function is required");var a=b(c,i,arguments);return d(a,1+s(0,e.length-(arguments.length-1)),!0)};var l=function(){return b(c,n,arguments)};o?o(e.exports,"apply",{value:l}):e.exports.apply=l},56168:(e,a,t)=>{var c=t(92861).Buffer,f=t(88310).Transform,d=t(83141).I;function r(e){f.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}t(56698)(r,f),r.prototype.update=function(e,a,t){"string"==typeof e&&(e=c.from(e,a));var f=this._update(e);return this.hashMode?this:(t&&(f=this._toString(f,t)),f)},r.prototype.setAutoPadding=function(){},r.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},r.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},r.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},r.prototype._transform=function(e,a,t){var c;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){c=e}finally{t(c)}},r.prototype._flush=function(e){var a;try{this.push(this.__final())}catch(e){a=e}e(a)},r.prototype._finalOrDigest=function(e){var a=this.__final()||c.alloc(0);return e&&(a=this._toString(a,e,!0)),a},r.prototype._toString=function(e,a,t){if(this._decoder||(this._decoder=new d(a),this._encoding=a),this._encoding!==a)throw new Error("can't switch encodings");var c=this._decoder.write(e);return t&&(c+=this._decoder.end()),c},e.exports=r},15622:(e,a,t)=>{function c(e){return Object.prototype.toString.call(e)}a.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===c(e)},a.isBoolean=function(e){return"boolean"==typeof e},a.isNull=function(e){return null===e},a.isNullOrUndefined=function(e){return null==e},a.isNumber=function(e){return"number"==typeof e},a.isString=function(e){return"string"==typeof e},a.isSymbol=function(e){return"symbol"==typeof e},a.isUndefined=function(e){return void 0===e},a.isRegExp=function(e){return"[object RegExp]"===c(e)},a.isObject=function(e){return"object"==typeof e&&null!==e},a.isDate=function(e){return"[object Date]"===c(e)},a.isError=function(e){return"[object Error]"===c(e)||e instanceof Error},a.isFunction=function(e){return"function"==typeof e},a.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},a.isBuffer=t(48287).Buffer.isBuffer},61324:(e,a,t)=>{var c=t(48287).Buffer,f=t(86729),d=t(92801);e.exports=function(e){return new n(e)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function n(e){this.curveType=r[e],this.curveType||(this.curveType={name:e}),this.curve=new f.ec(this.curveType.name),this.keys=void 0}function i(e,a,t){Array.isArray(e)||(e=e.toArray());var f=new c(e);if(t&&f.length=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function i(e,a,t){var c=n(e,t);return t-1>=a&&(c|=n(e,t-1)<<4),c}function b(e,a,t,c){for(var f=0,d=Math.min(e.length,t),r=a;r=49?n-49+10:n>=17?n-17+10:n}return f}d.isBN=function(e){return e instanceof d||null!==e&&"object"==typeof e&&e.constructor.wordSize===d.wordSize&&Array.isArray(e.words)},d.max=function(e,a){return e.cmp(a)>0?e:a},d.min=function(e,a){return e.cmp(a)<0?e:a},d.prototype._init=function(e,a,t){if("number"==typeof e)return this._initNumber(e,a,t);if("object"==typeof e)return this._initArray(e,a,t);"hex"===a&&(a=16),c(a===(0|a)&&a>=2&&a<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(f++,this.negative=1),f=0;f-=3)r=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[d]|=r<>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);else if("le"===t)for(f=0,d=0;f>>26-n&67108863,(n+=24)>=26&&(n-=26,d++);return this.strip()},d.prototype._parseHex=function(e,a,t){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var c=0;c=a;c-=2)f=i(e,a,c)<=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;else for(c=(e.length-a)%2==0?a+1:a;c=18?(d-=18,r+=1,this.words[r]|=f>>>26):d+=8;this.strip()},d.prototype._parseBase=function(e,a,t){this.words=[0],this.length=1;for(var c=0,f=1;f<=67108863;f*=a)c++;c--,f=f/a|0;for(var d=e.length-t,r=d%c,n=Math.min(d,d-r)+t,i=0,o=t;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},d.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?""};var o=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],s=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function u(e,a,t){t.negative=a.negative^e.negative;var c=e.length+a.length|0;t.length=c,c=c-1|0;var f=0|e.words[0],d=0|a.words[0],r=f*d,n=67108863&r,i=r/67108864|0;t.words[0]=n;for(var b=1;b>>26,s=67108863&i,l=Math.min(b,a.length-1),u=Math.max(0,b-e.length+1);u<=l;u++){var h=b-u|0;o+=(r=(f=0|e.words[h])*(d=0|a.words[u])+s)/67108864|0,s=67108863&r}t.words[b]=0|s,i=0|o}return 0!==i?t.words[b]=0|i:t.length--,t.strip()}d.prototype.toString=function(e,a){var t;if(a=0|a||1,16===(e=e||10)||"hex"===e){t="";for(var f=0,d=0,r=0;r>>24-f&16777215)||r!==this.length-1?o[6-i.length]+i+t:i+t,(f+=2)>=26&&(f-=26,r--)}for(0!==d&&(t=d.toString(16)+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(e===(0|e)&&e>=2&&e<=36){var b=s[e],u=l[e];t="";var h=this.clone();for(h.negative=0;!h.isZero();){var p=h.modn(u).toString(e);t=(h=h.idivn(u)).isZero()?p+t:o[b-p.length]+p+t}for(this.isZero()&&(t="0"+t);t.length%a!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}c(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&c(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(e,a){return c(void 0!==r),this.toArrayLike(r,e,a)},d.prototype.toArray=function(e,a){return this.toArrayLike(Array,e,a)},d.prototype.toArrayLike=function(e,a,t){var f=this.byteLength(),d=t||Math.max(1,f);c(f<=d,"byte array longer than desired length"),c(d>0,"Requested array length <= 0"),this.strip();var r,n,i="le"===a,b=new e(d),o=this.clone();if(i){for(n=0;!o.isZero();n++)r=o.andln(255),o.iushrn(8),b[n]=r;for(;n=4096&&(t+=13,a>>>=13),a>=64&&(t+=7,a>>>=7),a>=8&&(t+=4,a>>>=4),a>=2&&(t+=2,a>>>=2),t+a},d.prototype._zeroBits=function(e){if(0===e)return 26;var a=e,t=0;return 8191&a||(t+=13,a>>>=13),127&a||(t+=7,a>>>=7),15&a||(t+=4,a>>>=4),3&a||(t+=2,a>>>=2),1&a||t++,t},d.prototype.bitLength=function(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,a=0;ae.length?this.clone().ior(e):e.clone().ior(this)},d.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},d.prototype.iuand=function(e){var a;a=this.length>e.length?e:this;for(var t=0;te.length?this.clone().iand(e):e.clone().iand(this)},d.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},d.prototype.iuxor=function(e){var a,t;this.length>e.length?(a=this,t=e):(a=e,t=this);for(var c=0;ce.length?this.clone().ixor(e):e.clone().ixor(this)},d.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},d.prototype.inotn=function(e){c("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),t=e%26;this._expand(a),t>0&&a--;for(var f=0;f0&&(this.words[f]=~this.words[f]&67108863>>26-t),this.strip()},d.prototype.notn=function(e){return this.clone().inotn(e)},d.prototype.setn=function(e,a){c("number"==typeof e&&e>=0);var t=e/26|0,f=e%26;return this._expand(t+1),this.words[t]=a?this.words[t]|1<e.length?(t=this,c=e):(t=e,c=this);for(var f=0,d=0;d>>26;for(;0!==f&&d>>26;if(this.length=t.length,0!==f)this.words[this.length]=f,this.length++;else if(t!==this)for(;de.length?this.clone().iadd(e):e.clone().iadd(this)},d.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var t,c,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(t=this,c=e):(t=e,c=this);for(var d=0,r=0;r>26,this.words[r]=67108863&a;for(;0!==d&&r>26,this.words[r]=67108863&a;if(0===d&&r>>13,u=0|r[1],h=8191&u,p=u>>>13,g=0|r[2],m=8191&g,x=g>>>13,y=0|r[3],A=8191&y,v=y>>>13,w=0|r[4],_=8191&w,I=w>>>13,E=0|r[5],C=8191&E,M=E>>>13,B=0|r[6],L=8191&B,S=B>>>13,k=0|r[7],N=8191&k,P=k>>>13,R=0|r[8],O=8191&R,D=R>>>13,T=0|r[9],F=8191&T,Q=T>>>13,U=0|n[0],j=8191&U,H=U>>>13,$=0|n[1],q=8191&$,G=$>>>13,z=0|n[2],K=8191&z,V=z>>>13,Z=0|n[3],J=8191&Z,W=Z>>>13,Y=0|n[4],X=8191&Y,ee=Y>>>13,ae=0|n[5],te=8191&ae,ce=ae>>>13,fe=0|n[6],de=8191&fe,re=fe>>>13,ne=0|n[7],ie=8191&ne,be=ne>>>13,oe=0|n[8],se=8191&oe,le=oe>>>13,ue=0|n[9],he=8191&ue,pe=ue>>>13;t.negative=e.negative^a.negative,t.length=19;var ge=(b+(c=Math.imul(s,j))|0)+((8191&(f=(f=Math.imul(s,H))+Math.imul(l,j)|0))<<13)|0;b=((d=Math.imul(l,H))+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,c=Math.imul(h,j),f=(f=Math.imul(h,H))+Math.imul(p,j)|0,d=Math.imul(p,H);var me=(b+(c=c+Math.imul(s,q)|0)|0)+((8191&(f=(f=f+Math.imul(s,G)|0)+Math.imul(l,q)|0))<<13)|0;b=((d=d+Math.imul(l,G)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,c=Math.imul(m,j),f=(f=Math.imul(m,H))+Math.imul(x,j)|0,d=Math.imul(x,H),c=c+Math.imul(h,q)|0,f=(f=f+Math.imul(h,G)|0)+Math.imul(p,q)|0,d=d+Math.imul(p,G)|0;var xe=(b+(c=c+Math.imul(s,K)|0)|0)+((8191&(f=(f=f+Math.imul(s,V)|0)+Math.imul(l,K)|0))<<13)|0;b=((d=d+Math.imul(l,V)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,c=Math.imul(A,j),f=(f=Math.imul(A,H))+Math.imul(v,j)|0,d=Math.imul(v,H),c=c+Math.imul(m,q)|0,f=(f=f+Math.imul(m,G)|0)+Math.imul(x,q)|0,d=d+Math.imul(x,G)|0,c=c+Math.imul(h,K)|0,f=(f=f+Math.imul(h,V)|0)+Math.imul(p,K)|0,d=d+Math.imul(p,V)|0;var ye=(b+(c=c+Math.imul(s,J)|0)|0)+((8191&(f=(f=f+Math.imul(s,W)|0)+Math.imul(l,J)|0))<<13)|0;b=((d=d+Math.imul(l,W)|0)+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,c=Math.imul(_,j),f=(f=Math.imul(_,H))+Math.imul(I,j)|0,d=Math.imul(I,H),c=c+Math.imul(A,q)|0,f=(f=f+Math.imul(A,G)|0)+Math.imul(v,q)|0,d=d+Math.imul(v,G)|0,c=c+Math.imul(m,K)|0,f=(f=f+Math.imul(m,V)|0)+Math.imul(x,K)|0,d=d+Math.imul(x,V)|0,c=c+Math.imul(h,J)|0,f=(f=f+Math.imul(h,W)|0)+Math.imul(p,J)|0,d=d+Math.imul(p,W)|0;var Ae=(b+(c=c+Math.imul(s,X)|0)|0)+((8191&(f=(f=f+Math.imul(s,ee)|0)+Math.imul(l,X)|0))<<13)|0;b=((d=d+Math.imul(l,ee)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,c=Math.imul(C,j),f=(f=Math.imul(C,H))+Math.imul(M,j)|0,d=Math.imul(M,H),c=c+Math.imul(_,q)|0,f=(f=f+Math.imul(_,G)|0)+Math.imul(I,q)|0,d=d+Math.imul(I,G)|0,c=c+Math.imul(A,K)|0,f=(f=f+Math.imul(A,V)|0)+Math.imul(v,K)|0,d=d+Math.imul(v,V)|0,c=c+Math.imul(m,J)|0,f=(f=f+Math.imul(m,W)|0)+Math.imul(x,J)|0,d=d+Math.imul(x,W)|0,c=c+Math.imul(h,X)|0,f=(f=f+Math.imul(h,ee)|0)+Math.imul(p,X)|0,d=d+Math.imul(p,ee)|0;var ve=(b+(c=c+Math.imul(s,te)|0)|0)+((8191&(f=(f=f+Math.imul(s,ce)|0)+Math.imul(l,te)|0))<<13)|0;b=((d=d+Math.imul(l,ce)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,c=Math.imul(L,j),f=(f=Math.imul(L,H))+Math.imul(S,j)|0,d=Math.imul(S,H),c=c+Math.imul(C,q)|0,f=(f=f+Math.imul(C,G)|0)+Math.imul(M,q)|0,d=d+Math.imul(M,G)|0,c=c+Math.imul(_,K)|0,f=(f=f+Math.imul(_,V)|0)+Math.imul(I,K)|0,d=d+Math.imul(I,V)|0,c=c+Math.imul(A,J)|0,f=(f=f+Math.imul(A,W)|0)+Math.imul(v,J)|0,d=d+Math.imul(v,W)|0,c=c+Math.imul(m,X)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(x,X)|0,d=d+Math.imul(x,ee)|0,c=c+Math.imul(h,te)|0,f=(f=f+Math.imul(h,ce)|0)+Math.imul(p,te)|0,d=d+Math.imul(p,ce)|0;var we=(b+(c=c+Math.imul(s,de)|0)|0)+((8191&(f=(f=f+Math.imul(s,re)|0)+Math.imul(l,de)|0))<<13)|0;b=((d=d+Math.imul(l,re)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,c=Math.imul(N,j),f=(f=Math.imul(N,H))+Math.imul(P,j)|0,d=Math.imul(P,H),c=c+Math.imul(L,q)|0,f=(f=f+Math.imul(L,G)|0)+Math.imul(S,q)|0,d=d+Math.imul(S,G)|0,c=c+Math.imul(C,K)|0,f=(f=f+Math.imul(C,V)|0)+Math.imul(M,K)|0,d=d+Math.imul(M,V)|0,c=c+Math.imul(_,J)|0,f=(f=f+Math.imul(_,W)|0)+Math.imul(I,J)|0,d=d+Math.imul(I,W)|0,c=c+Math.imul(A,X)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(v,X)|0,d=d+Math.imul(v,ee)|0,c=c+Math.imul(m,te)|0,f=(f=f+Math.imul(m,ce)|0)+Math.imul(x,te)|0,d=d+Math.imul(x,ce)|0,c=c+Math.imul(h,de)|0,f=(f=f+Math.imul(h,re)|0)+Math.imul(p,de)|0,d=d+Math.imul(p,re)|0;var _e=(b+(c=c+Math.imul(s,ie)|0)|0)+((8191&(f=(f=f+Math.imul(s,be)|0)+Math.imul(l,ie)|0))<<13)|0;b=((d=d+Math.imul(l,be)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,c=Math.imul(O,j),f=(f=Math.imul(O,H))+Math.imul(D,j)|0,d=Math.imul(D,H),c=c+Math.imul(N,q)|0,f=(f=f+Math.imul(N,G)|0)+Math.imul(P,q)|0,d=d+Math.imul(P,G)|0,c=c+Math.imul(L,K)|0,f=(f=f+Math.imul(L,V)|0)+Math.imul(S,K)|0,d=d+Math.imul(S,V)|0,c=c+Math.imul(C,J)|0,f=(f=f+Math.imul(C,W)|0)+Math.imul(M,J)|0,d=d+Math.imul(M,W)|0,c=c+Math.imul(_,X)|0,f=(f=f+Math.imul(_,ee)|0)+Math.imul(I,X)|0,d=d+Math.imul(I,ee)|0,c=c+Math.imul(A,te)|0,f=(f=f+Math.imul(A,ce)|0)+Math.imul(v,te)|0,d=d+Math.imul(v,ce)|0,c=c+Math.imul(m,de)|0,f=(f=f+Math.imul(m,re)|0)+Math.imul(x,de)|0,d=d+Math.imul(x,re)|0,c=c+Math.imul(h,ie)|0,f=(f=f+Math.imul(h,be)|0)+Math.imul(p,ie)|0,d=d+Math.imul(p,be)|0;var Ie=(b+(c=c+Math.imul(s,se)|0)|0)+((8191&(f=(f=f+Math.imul(s,le)|0)+Math.imul(l,se)|0))<<13)|0;b=((d=d+Math.imul(l,le)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,c=Math.imul(F,j),f=(f=Math.imul(F,H))+Math.imul(Q,j)|0,d=Math.imul(Q,H),c=c+Math.imul(O,q)|0,f=(f=f+Math.imul(O,G)|0)+Math.imul(D,q)|0,d=d+Math.imul(D,G)|0,c=c+Math.imul(N,K)|0,f=(f=f+Math.imul(N,V)|0)+Math.imul(P,K)|0,d=d+Math.imul(P,V)|0,c=c+Math.imul(L,J)|0,f=(f=f+Math.imul(L,W)|0)+Math.imul(S,J)|0,d=d+Math.imul(S,W)|0,c=c+Math.imul(C,X)|0,f=(f=f+Math.imul(C,ee)|0)+Math.imul(M,X)|0,d=d+Math.imul(M,ee)|0,c=c+Math.imul(_,te)|0,f=(f=f+Math.imul(_,ce)|0)+Math.imul(I,te)|0,d=d+Math.imul(I,ce)|0,c=c+Math.imul(A,de)|0,f=(f=f+Math.imul(A,re)|0)+Math.imul(v,de)|0,d=d+Math.imul(v,re)|0,c=c+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,be)|0)+Math.imul(x,ie)|0,d=d+Math.imul(x,be)|0,c=c+Math.imul(h,se)|0,f=(f=f+Math.imul(h,le)|0)+Math.imul(p,se)|0,d=d+Math.imul(p,le)|0;var Ee=(b+(c=c+Math.imul(s,he)|0)|0)+((8191&(f=(f=f+Math.imul(s,pe)|0)+Math.imul(l,he)|0))<<13)|0;b=((d=d+Math.imul(l,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,c=Math.imul(F,q),f=(f=Math.imul(F,G))+Math.imul(Q,q)|0,d=Math.imul(Q,G),c=c+Math.imul(O,K)|0,f=(f=f+Math.imul(O,V)|0)+Math.imul(D,K)|0,d=d+Math.imul(D,V)|0,c=c+Math.imul(N,J)|0,f=(f=f+Math.imul(N,W)|0)+Math.imul(P,J)|0,d=d+Math.imul(P,W)|0,c=c+Math.imul(L,X)|0,f=(f=f+Math.imul(L,ee)|0)+Math.imul(S,X)|0,d=d+Math.imul(S,ee)|0,c=c+Math.imul(C,te)|0,f=(f=f+Math.imul(C,ce)|0)+Math.imul(M,te)|0,d=d+Math.imul(M,ce)|0,c=c+Math.imul(_,de)|0,f=(f=f+Math.imul(_,re)|0)+Math.imul(I,de)|0,d=d+Math.imul(I,re)|0,c=c+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,be)|0)+Math.imul(v,ie)|0,d=d+Math.imul(v,be)|0,c=c+Math.imul(m,se)|0,f=(f=f+Math.imul(m,le)|0)+Math.imul(x,se)|0,d=d+Math.imul(x,le)|0;var Ce=(b+(c=c+Math.imul(h,he)|0)|0)+((8191&(f=(f=f+Math.imul(h,pe)|0)+Math.imul(p,he)|0))<<13)|0;b=((d=d+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,c=Math.imul(F,K),f=(f=Math.imul(F,V))+Math.imul(Q,K)|0,d=Math.imul(Q,V),c=c+Math.imul(O,J)|0,f=(f=f+Math.imul(O,W)|0)+Math.imul(D,J)|0,d=d+Math.imul(D,W)|0,c=c+Math.imul(N,X)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(P,X)|0,d=d+Math.imul(P,ee)|0,c=c+Math.imul(L,te)|0,f=(f=f+Math.imul(L,ce)|0)+Math.imul(S,te)|0,d=d+Math.imul(S,ce)|0,c=c+Math.imul(C,de)|0,f=(f=f+Math.imul(C,re)|0)+Math.imul(M,de)|0,d=d+Math.imul(M,re)|0,c=c+Math.imul(_,ie)|0,f=(f=f+Math.imul(_,be)|0)+Math.imul(I,ie)|0,d=d+Math.imul(I,be)|0,c=c+Math.imul(A,se)|0,f=(f=f+Math.imul(A,le)|0)+Math.imul(v,se)|0,d=d+Math.imul(v,le)|0;var Me=(b+(c=c+Math.imul(m,he)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(x,he)|0))<<13)|0;b=((d=d+Math.imul(x,pe)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,c=Math.imul(F,J),f=(f=Math.imul(F,W))+Math.imul(Q,J)|0,d=Math.imul(Q,W),c=c+Math.imul(O,X)|0,f=(f=f+Math.imul(O,ee)|0)+Math.imul(D,X)|0,d=d+Math.imul(D,ee)|0,c=c+Math.imul(N,te)|0,f=(f=f+Math.imul(N,ce)|0)+Math.imul(P,te)|0,d=d+Math.imul(P,ce)|0,c=c+Math.imul(L,de)|0,f=(f=f+Math.imul(L,re)|0)+Math.imul(S,de)|0,d=d+Math.imul(S,re)|0,c=c+Math.imul(C,ie)|0,f=(f=f+Math.imul(C,be)|0)+Math.imul(M,ie)|0,d=d+Math.imul(M,be)|0,c=c+Math.imul(_,se)|0,f=(f=f+Math.imul(_,le)|0)+Math.imul(I,se)|0,d=d+Math.imul(I,le)|0;var Be=(b+(c=c+Math.imul(A,he)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(v,he)|0))<<13)|0;b=((d=d+Math.imul(v,pe)|0)+(f>>>13)|0)+(Be>>>26)|0,Be&=67108863,c=Math.imul(F,X),f=(f=Math.imul(F,ee))+Math.imul(Q,X)|0,d=Math.imul(Q,ee),c=c+Math.imul(O,te)|0,f=(f=f+Math.imul(O,ce)|0)+Math.imul(D,te)|0,d=d+Math.imul(D,ce)|0,c=c+Math.imul(N,de)|0,f=(f=f+Math.imul(N,re)|0)+Math.imul(P,de)|0,d=d+Math.imul(P,re)|0,c=c+Math.imul(L,ie)|0,f=(f=f+Math.imul(L,be)|0)+Math.imul(S,ie)|0,d=d+Math.imul(S,be)|0,c=c+Math.imul(C,se)|0,f=(f=f+Math.imul(C,le)|0)+Math.imul(M,se)|0,d=d+Math.imul(M,le)|0;var Le=(b+(c=c+Math.imul(_,he)|0)|0)+((8191&(f=(f=f+Math.imul(_,pe)|0)+Math.imul(I,he)|0))<<13)|0;b=((d=d+Math.imul(I,pe)|0)+(f>>>13)|0)+(Le>>>26)|0,Le&=67108863,c=Math.imul(F,te),f=(f=Math.imul(F,ce))+Math.imul(Q,te)|0,d=Math.imul(Q,ce),c=c+Math.imul(O,de)|0,f=(f=f+Math.imul(O,re)|0)+Math.imul(D,de)|0,d=d+Math.imul(D,re)|0,c=c+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,be)|0)+Math.imul(P,ie)|0,d=d+Math.imul(P,be)|0,c=c+Math.imul(L,se)|0,f=(f=f+Math.imul(L,le)|0)+Math.imul(S,se)|0,d=d+Math.imul(S,le)|0;var Se=(b+(c=c+Math.imul(C,he)|0)|0)+((8191&(f=(f=f+Math.imul(C,pe)|0)+Math.imul(M,he)|0))<<13)|0;b=((d=d+Math.imul(M,pe)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,c=Math.imul(F,de),f=(f=Math.imul(F,re))+Math.imul(Q,de)|0,d=Math.imul(Q,re),c=c+Math.imul(O,ie)|0,f=(f=f+Math.imul(O,be)|0)+Math.imul(D,ie)|0,d=d+Math.imul(D,be)|0,c=c+Math.imul(N,se)|0,f=(f=f+Math.imul(N,le)|0)+Math.imul(P,se)|0,d=d+Math.imul(P,le)|0;var ke=(b+(c=c+Math.imul(L,he)|0)|0)+((8191&(f=(f=f+Math.imul(L,pe)|0)+Math.imul(S,he)|0))<<13)|0;b=((d=d+Math.imul(S,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863,c=Math.imul(F,ie),f=(f=Math.imul(F,be))+Math.imul(Q,ie)|0,d=Math.imul(Q,be),c=c+Math.imul(O,se)|0,f=(f=f+Math.imul(O,le)|0)+Math.imul(D,se)|0,d=d+Math.imul(D,le)|0;var Ne=(b+(c=c+Math.imul(N,he)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(P,he)|0))<<13)|0;b=((d=d+Math.imul(P,pe)|0)+(f>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,c=Math.imul(F,se),f=(f=Math.imul(F,le))+Math.imul(Q,se)|0,d=Math.imul(Q,le);var Pe=(b+(c=c+Math.imul(O,he)|0)|0)+((8191&(f=(f=f+Math.imul(O,pe)|0)+Math.imul(D,he)|0))<<13)|0;b=((d=d+Math.imul(D,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Re=(b+(c=Math.imul(F,he))|0)+((8191&(f=(f=Math.imul(F,pe))+Math.imul(Q,he)|0))<<13)|0;return b=((d=Math.imul(Q,pe))+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,i[0]=ge,i[1]=me,i[2]=xe,i[3]=ye,i[4]=Ae,i[5]=ve,i[6]=we,i[7]=_e,i[8]=Ie,i[9]=Ee,i[10]=Ce,i[11]=Me,i[12]=Be,i[13]=Le,i[14]=Se,i[15]=ke,i[16]=Ne,i[17]=Pe,i[18]=Re,0!==b&&(i[19]=b,t.length++),t};function p(e,a,t){return(new g).mulp(e,a,t)}function g(e,a){this.x=e,this.y=a}Math.imul||(h=u),d.prototype.mulTo=function(e,a){var t,c=this.length+e.length;return t=10===this.length&&10===e.length?h(this,e,a):c<63?u(this,e,a):c<1024?function(e,a,t){t.negative=a.negative^e.negative,t.length=e.length+a.length;for(var c=0,f=0,d=0;d>>26)|0)>>>26,r&=67108863}t.words[d]=n,c=r,r=f}return 0!==c?t.words[d]=c:t.length--,t.strip()}(this,e,a):p(this,e,a),t},g.prototype.makeRBT=function(e){for(var a=new Array(e),t=d.prototype._countBits(e)-1,c=0;c>=1;return c},g.prototype.permute=function(e,a,t,c,f,d){for(var r=0;r>>=1)f++;return 1<>>=13,t[2*r+1]=8191&d,d>>>=13;for(r=2*a;r>=26,a+=f/67108864|0,a+=d>>>26,this.words[t]=67108863&d}return 0!==a&&(this.words[t]=a,this.length++),this},d.prototype.muln=function(e){return this.clone().imuln(e)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(e){var a=function(e){for(var a=new Array(e.bitLength()),t=0;t>>f}return a}(e);if(0===a.length)return new d(1);for(var t=this,c=0;c=0);var a,t=e%26,f=(e-t)/26,d=67108863>>>26-t<<26-t;if(0!==t){var r=0;for(a=0;a>>26-t}r&&(this.words[a]=r,this.length++)}if(0!==f){for(a=this.length-1;a>=0;a--)this.words[a+f]=this.words[a];for(a=0;a=0),f=a?(a-a%26)/26:0;var d=e%26,r=Math.min((e-d)/26,this.length),n=67108863^67108863>>>d<r)for(this.length-=r,b=0;b=0&&(0!==o||b>=f);b--){var s=0|this.words[b];this.words[b]=o<<26-d|s>>>d,o=s&n}return i&&0!==o&&(i.words[i.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(e,a,t){return c(0===this.negative),this.iushrn(e,a,t)},d.prototype.shln=function(e){return this.clone().ishln(e)},d.prototype.ushln=function(e){return this.clone().iushln(e)},d.prototype.shrn=function(e){return this.clone().ishrn(e)},d.prototype.ushrn=function(e){return this.clone().iushrn(e)},d.prototype.testn=function(e){c("number"==typeof e&&e>=0);var a=e%26,t=(e-a)/26,f=1<