/*! For license information please see molstar.js.LICENSE.txt */ !function(A,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.molstar=e():A.molstar=e()}(self,(function(){return(()=>{var A={1944:()=>{"use strict";var A,e,t,r,n,i,o,a;"undefined"!=typeof window&&function(){window.console=window.console||{};for(var A,e,t=window.console,r={},n=function(){},i="memory".split(","),o="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");A=i.pop();)t[A]||(t[A]=r);for(;e=o.pop();)t[e]||(t[e]=n)}(),void 0===window.HTMLCanvasElement||window.HTMLCanvasElement.prototype.toBlob||Object.defineProperty(window.HTMLCanvasElement.prototype,"toBlob",{value:function(A,e,t){for(var r=window.atob(this.toDataURL(e,t).split(",")[1]),n=r.length,i=n>>2,o=new Uint8Array(n),a=new Uint32Array(o.buffer,0,i),s=0,u=0;u0?1:-1}),Number.isInteger||(Number.isInteger=function(A){return"number"==typeof A&&isFinite(A)&&A>-9007199254740992&&A<9007199254740992&&Math.floor(A)===A}),Number.isNaN||(Number.isNaN=function(A){return A!=A}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(A){if(null==A)throw new TypeError("Cannot convert first argument to object");for(var e,t=Object(A),r=!1,n=1;n1?arguments[1]:void 0,a=o?Number(o):0;Number.isNaN(a)&&(a=0);var s=Math.min(Math.max(a,0),r);if(i+s>r)return!1;for(var u=-1;++ut.length)&&(e=t.length),e-=A.length;var r=t.indexOf(A,e);return-1!==r&&r===e}),String.prototype.repeat||(String.prototype.repeat=function(A){if(null===this)throw new TypeError("can't convert "+this+" to object");var e=""+this;if(A=+A,Number.isNaN(A)&&(A=0),A<0)throw new RangeError("repeat count must be non-negative");if(A===1/0)throw new RangeError("repeat count must be less than infinity");if(A=Math.floor(A),0===e.length||0===A)return"";if(e.length*A>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");for(var t="";1==(1&A)&&(t+=e),0!=(A>>>=1);)e+=e;return t}),String.prototype.includes||(String.prototype.includes=function(A,e){return"number"!=typeof e&&(e=0),!(e+A.length>this.length)&&-1!==this.indexOf(A,e)}),Array.prototype.includes||(Array.prototype.includes=function(A){if(null==this)throw new TypeError("Array.prototype.includes called on null or undefined");var e=Object(this),t=parseInt(e.length,10)||0;if(0===t)return!1;var r,n,i=parseInt(arguments[1],10)||0;for(i>=0?r=i:(r=t+i)<0&&(r=0);r0?1:-1)*Math.floor(Math.abs(e)):e}(A);return Math.min(Math.max(e,0),i)},function(A){var e=this,t=Object(A);if(null==A)throw new TypeError("Array.from requires an array-like object - not null or undefined");var r,i=arguments.length>1?arguments[1]:void 0;if(void 0!==i){if(!n(i))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(r=arguments[2])}for(var a,s=o(t.length),u=n(e)?Object(new e(s)):new Array(s),g=0;g>>0;if("function"!=typeof A)throw TypeError("predicate must be a function");for(var r=arguments[1],n=0;n>>0,r=arguments[1],n=r>>0,i=n<0?Math.max(t+n,0):Math.min(n,t),o=arguments[2],a=void 0===o?t:o>>0,s=a<0?Math.max(t+a,0):Math.min(a,t);i>>0,n=A>>0,i=n<0?Math.max(r+n,0):Math.min(n,r),o=e>>0,a=o<0?Math.max(r+o,0):Math.min(o,r),s=arguments[2],u=void 0===s?r:s>>0,g=u<0?Math.max(r+u,0):Math.min(u,r),c=Math.min(g-a,r-i),B=1;for(a0;)a in t?t[i]=t[a]:delete t[i],a+=B,i+=B,c--;return t},configurable:!0,writable:!0}),Int8Array.prototype.copyWithin||Object.defineProperty(Int8Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Int16Array.prototype.copyWithin||Object.defineProperty(Int16Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Int32Array.prototype.copyWithin||Object.defineProperty(Int32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint8Array.prototype.copyWithin||Object.defineProperty(Uint8Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint16Array.prototype.copyWithin||Object.defineProperty(Uint16Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint32Array.prototype.copyWithin||Object.defineProperty(Uint32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Float32Array.prototype.copyWithin||Object.defineProperty(Float32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Float64Array.prototype.copyWithin||Object.defineProperty(Float64Array.prototype,"copyWithin",{value:Array.prototype.copyWithin})},9809:(A,e,t)=>{"use strict";const r=e;r.bignum=t(4590),r.define=t(2500).define,r.base=t(1979),r.constants=t(6826),r.decoders=t(8307),r.encoders=t(6579)},2500:(A,e,t)=>{"use strict";const r=t(6579),n=t(8307),i=t(5717);function o(A,e){this.name=A,this.body=e,this.decoders={},this.encoders={}}e.define=function(A,e){return new o(A,e)},o.prototype._createNamed=function(A){const e=this.name;function t(A){this._initNamed(A,e)}return i(t,A),t.prototype._initNamed=function(e,t){A.call(this,e,t)},new t(this)},o.prototype._getDecoder=function(A){return A=A||"der",this.decoders.hasOwnProperty(A)||(this.decoders[A]=this._createNamed(n[A])),this.decoders[A]},o.prototype.decode=function(A,e,t){return this._getDecoder(e).decode(A,t)},o.prototype._getEncoder=function(A){return A=A||"der",this.encoders.hasOwnProperty(A)||(this.encoders[A]=this._createNamed(r[A])),this.encoders[A]},o.prototype.encode=function(A,e,t){return this._getEncoder(e).encode(A,t)}},6625:(A,e,t)=>{"use strict";const r=t(5717),n=t(8465).b,i=t(2399).Buffer;function o(A,e){n.call(this,e),i.isBuffer(A)?(this.base=A,this.offset=0,this.length=A.length):this.error("Input not Buffer")}function a(A,e){if(Array.isArray(A))this.length=0,this.value=A.map((function(A){return a.isEncoderBuffer(A)||(A=new a(A,e)),this.length+=A.length,A}),this);else if("number"==typeof A){if(!(0<=A&&A<=255))return e.error("non-byte EncoderBuffer value");this.value=A,this.length=1}else if("string"==typeof A)this.value=A,this.length=i.byteLength(A);else{if(!i.isBuffer(A))return e.error("Unsupported type: "+typeof A);this.value=A,this.length=A.length}}r(o,n),e.C=o,o.isDecoderBuffer=function(A){return A instanceof o||"object"==typeof A&&i.isBuffer(A.base)&&"DecoderBuffer"===A.constructor.name&&"number"==typeof A.offset&&"number"==typeof A.length&&"function"==typeof A.save&&"function"==typeof A.restore&&"function"==typeof A.isEmpty&&"function"==typeof A.readUInt8&&"function"==typeof A.skip&&"function"==typeof A.raw},o.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},o.prototype.restore=function(A){const e=new o(this.base);return e.offset=A.offset,e.length=this.offset,this.offset=A.offset,n.prototype.restore.call(this,A.reporter),e},o.prototype.isEmpty=function(){return this.offset===this.length},o.prototype.readUInt8=function(A){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(A||"DecoderBuffer overrun")},o.prototype.skip=function(A,e){if(!(this.offset+A<=this.length))return this.error(e||"DecoderBuffer overrun");const t=new o(this.base);return t._reporterState=this._reporterState,t.offset=this.offset,t.length=this.offset+A,this.offset+=A,t},o.prototype.raw=function(A){return this.base.slice(A?A.offset:this.offset,this.length)},e.R=a,a.isEncoderBuffer=function(A){return A instanceof a||"object"==typeof A&&"EncoderBuffer"===A.constructor.name&&"number"==typeof A.length&&"function"==typeof A.join},a.prototype.join=function(A,e){return A||(A=i.alloc(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(t){t.join(A,e),e+=t.length})):("number"==typeof this.value?A[e]=this.value:"string"==typeof this.value?A.write(this.value,e):i.isBuffer(this.value)&&this.value.copy(A,e),e+=this.length)),A}},1979:(A,e,t)=>{"use strict";const r=e;r.Reporter=t(8465).b,r.DecoderBuffer=t(6625).C,r.EncoderBuffer=t(6625).R,r.Node=t(1949)},1949:(A,e,t)=>{"use strict";const r=t(8465).b,n=t(6625).R,i=t(6625).C,o=t(9746),a=["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"],s=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function u(A,e,t){const r={};this._baseState=r,r.name=t,r.enc=A,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}A.exports=u;const g=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){const A=this._baseState,e={};g.forEach((function(t){e[t]=A[t]}));const t=new this.constructor(e.parent);return t._baseState=e,t},u.prototype._wrap=function(){const A=this._baseState;s.forEach((function(e){this[e]=function(){const t=new this.constructor(this);return A.children.push(t),t[e].apply(t,arguments)}}),this)},u.prototype._init=function(A){const e=this._baseState;o(null===e.parent),A.call(this),e.children=e.children.filter((function(A){return A._baseState.parent===this}),this),o.equal(e.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(A){const e=this._baseState,t=A.filter((function(A){return A instanceof this.constructor}),this);A=A.filter((function(A){return!(A instanceof this.constructor)}),this),0!==t.length&&(o(null===e.children),e.children=t,t.forEach((function(A){A._baseState.parent=this}),this)),0!==A.length&&(o(null===e.args),e.args=A,e.reverseArgs=A.map((function(A){if("object"!=typeof A||A.constructor!==Object)return A;const e={};return Object.keys(A).forEach((function(t){t==(0|t)&&(t|=0);const r=A[t];e[r]=t})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(A){u.prototype[A]=function(){const e=this._baseState;throw new Error(A+" not implemented for encoding: "+e.enc)}})),a.forEach((function(A){u.prototype[A]=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return o(null===e.tag),e.tag=A,this._useArgs(t),this}})),u.prototype.use=function(A){o(A);const e=this._baseState;return o(null===e.use),e.use=A,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(A){const e=this._baseState;return o(null===e.default),e.default=A,e.optional=!0,this},u.prototype.explicit=function(A){const e=this._baseState;return o(null===e.explicit&&null===e.implicit),e.explicit=A,this},u.prototype.implicit=function(A){const e=this._baseState;return o(null===e.explicit&&null===e.implicit),e.implicit=A,this},u.prototype.obj=function(){const A=this._baseState,e=Array.prototype.slice.call(arguments);return A.obj=!0,0!==e.length&&this._useArgs(e),this},u.prototype.key=function(A){const e=this._baseState;return o(null===e.key),e.key=A,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(A){const e=this._baseState;return o(null===e.choice),e.choice=A,this._useArgs(Object.keys(A).map((function(e){return A[e]}))),this},u.prototype.contains=function(A){const e=this._baseState;return o(null===e.use),e.contains=A,this},u.prototype._decode=function(A,e){const t=this._baseState;if(null===t.parent)return A.wrapResult(t.children[0]._decode(A,e));let r,n=t.default,o=!0,a=null;if(null!==t.key&&(a=A.enterKey(t.key)),t.optional){let r=null;if(null!==t.explicit?r=t.explicit:null!==t.implicit?r=t.implicit:null!==t.tag&&(r=t.tag),null!==r||t.any){if(o=this._peekTag(A,r,t.any),A.isError(o))return o}else{const r=A.save();try{null===t.choice?this._decodeGeneric(t.tag,A,e):this._decodeChoice(A,e),o=!0}catch(A){o=!1}A.restore(r)}}if(t.obj&&o&&(r=A.enterObject()),o){if(null!==t.explicit){const e=this._decodeTag(A,t.explicit);if(A.isError(e))return e;A=e}const r=A.offset;if(null===t.use&&null===t.choice){let e;t.any&&(e=A.save());const r=this._decodeTag(A,null!==t.implicit?t.implicit:t.tag,t.any);if(A.isError(r))return r;t.any?n=A.raw(e):A=r}if(e&&e.track&&null!==t.tag&&e.track(A.path(),r,A.length,"tagged"),e&&e.track&&null!==t.tag&&e.track(A.path(),A.offset,A.length,"content"),t.any||(n=null===t.choice?this._decodeGeneric(t.tag,A,e):this._decodeChoice(A,e)),A.isError(n))return n;if(t.any||null!==t.choice||null===t.children||t.children.forEach((function(t){t._decode(A,e)})),t.contains&&("octstr"===t.tag||"bitstr"===t.tag)){const r=new i(n);n=this._getUse(t.contains,A._reporterState.obj)._decode(r,e)}}return t.obj&&o&&(n=A.leaveObject(r)),null===t.key||null===n&&!0!==o?null!==a&&A.exitKey(a):A.leaveKey(a,t.key,n),n},u.prototype._decodeGeneric=function(A,e,t){const r=this._baseState;return"seq"===A||"set"===A?null:"seqof"===A||"setof"===A?this._decodeList(e,A,r.args[0],t):/str$/.test(A)?this._decodeStr(e,A,t):"objid"===A&&r.args?this._decodeObjid(e,r.args[0],r.args[1],t):"objid"===A?this._decodeObjid(e,null,null,t):"gentime"===A||"utctime"===A?this._decodeTime(e,A,t):"null_"===A?this._decodeNull(e,t):"bool"===A?this._decodeBool(e,t):"objDesc"===A?this._decodeStr(e,A,t):"int"===A||"enum"===A?this._decodeInt(e,r.args&&r.args[0],t):null!==r.use?this._getUse(r.use,e._reporterState.obj)._decode(e,t):e.error("unknown tag: "+A)},u.prototype._getUse=function(A,e){const t=this._baseState;return t.useDecoder=this._use(A,e),o(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},u.prototype._decodeChoice=function(A,e){const t=this._baseState;let r=null,n=!1;return Object.keys(t.choice).some((function(i){const o=A.save(),a=t.choice[i];try{const t=a._decode(A,e);if(A.isError(t))return!1;r={type:i,value:t},n=!0}catch(e){return A.restore(o),!1}return!0}),this),n?r:A.error("Choice not matched")},u.prototype._createEncoderBuffer=function(A){return new n(A,this.reporter)},u.prototype._encode=function(A,e,t){const r=this._baseState;if(null!==r.default&&r.default===A)return;const n=this._encodeValue(A,e,t);return void 0===n||this._skipDefault(n,e,t)?void 0:n},u.prototype._encodeValue=function(A,e,t){const n=this._baseState;if(null===n.parent)return n.children[0]._encode(A,e||new r);let i=null;if(this.reporter=e,n.optional&&void 0===A){if(null===n.default)return;A=n.default}let o=null,a=!1;if(n.any)i=this._createEncoderBuffer(A);else if(n.choice)i=this._encodeChoice(A,e);else if(n.contains)o=this._getUse(n.contains,t)._encode(A,e),a=!0;else if(n.children)o=n.children.map((function(t){if("null_"===t._baseState.tag)return t._encode(null,e,A);if(null===t._baseState.key)return e.error("Child should have a key");const r=e.enterKey(t._baseState.key);if("object"!=typeof A)return e.error("Child expected, but input is not object");const n=t._encode(A[t._baseState.key],e,A);return e.leaveKey(r),n}),this).filter((function(A){return A})),o=this._createEncoderBuffer(o);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return e.error("Too many args for : "+n.tag);if(!Array.isArray(A))return e.error("seqof/setof, but data is not Array");const t=this.clone();t._baseState.implicit=null,o=this._createEncoderBuffer(A.map((function(t){const r=this._baseState;return this._getUse(r.args[0],A)._encode(t,e)}),t))}else null!==n.use?i=this._getUse(n.use,t)._encode(A,e):(o=this._encodePrimitive(n.tag,A),a=!0);if(!n.any&&null===n.choice){const A=null!==n.implicit?n.implicit:n.tag,t=null===n.implicit?"universal":"context";null===A?null===n.use&&e.error("Tag could be omitted only for .use()"):null===n.use&&(i=this._encodeComposite(A,a,t,o))}return null!==n.explicit&&(i=this._encodeComposite(n.explicit,!1,"context",i)),i},u.prototype._encodeChoice=function(A,e){const t=this._baseState,r=t.choice[A.type];return r||o(!1,A.type+" not found in "+JSON.stringify(Object.keys(t.choice))),r._encode(A.value,e)},u.prototype._encodePrimitive=function(A,e){const t=this._baseState;if(/str$/.test(A))return this._encodeStr(e,A);if("objid"===A&&t.args)return this._encodeObjid(e,t.reverseArgs[0],t.args[1]);if("objid"===A)return this._encodeObjid(e,null,null);if("gentime"===A||"utctime"===A)return this._encodeTime(e,A);if("null_"===A)return this._encodeNull();if("int"===A||"enum"===A)return this._encodeInt(e,t.args&&t.reverseArgs[0]);if("bool"===A)return this._encodeBool(e);if("objDesc"===A)return this._encodeStr(e,A);throw new Error("Unsupported tag: "+A)},u.prototype._isNumstr=function(A){return/^[0-9 ]*$/.test(A)},u.prototype._isPrintstr=function(A){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(A)}},8465:(A,e,t)=>{"use strict";const r=t(5717);function n(A){this._reporterState={obj:null,path:[],options:A||{},errors:[]}}function i(A,e){this.path=A,this.rethrow(e)}e.b=n,n.prototype.isError=function(A){return A instanceof i},n.prototype.save=function(){const A=this._reporterState;return{obj:A.obj,pathLen:A.path.length}},n.prototype.restore=function(A){const e=this._reporterState;e.obj=A.obj,e.path=e.path.slice(0,A.pathLen)},n.prototype.enterKey=function(A){return this._reporterState.path.push(A)},n.prototype.exitKey=function(A){const e=this._reporterState;e.path=e.path.slice(0,A-1)},n.prototype.leaveKey=function(A,e,t){const r=this._reporterState;this.exitKey(A),null!==r.obj&&(r.obj[e]=t)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){const A=this._reporterState,e=A.obj;return A.obj={},e},n.prototype.leaveObject=function(A){const e=this._reporterState,t=e.obj;return e.obj=A,t},n.prototype.error=function(A){let e;const t=this._reporterState,r=A instanceof i;if(e=r?A:new i(t.path.map((function(A){return"["+JSON.stringify(A)+"]"})).join(""),A.message||A,A.stack),!t.options.partial)throw e;return r||t.errors.push(e),e},n.prototype.wrapResult=function(A){const e=this._reporterState;return e.options.partial?{result:this.isError(A)?null:A,errors:e.errors}:A},r(i,Error),i.prototype.rethrow=function(A){if(this.message=A+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,i),!this.stack)try{throw new Error(this.message)}catch(A){this.stack=A.stack}return this}},160:(A,e)=>{"use strict";function t(A){const e={};return Object.keys(A).forEach((function(t){(0|t)==t&&(t|=0);const r=A[t];e[r]=t})),e}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=t(e.tagClass),e.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"},e.tagByName=t(e.tag)},6826:(A,e,t)=>{"use strict";const r=e;r._reverse=function(A){const e={};return Object.keys(A).forEach((function(t){(0|t)==t&&(t|=0);const r=A[t];e[r]=t})),e},r.der=t(160)},1671:(A,e,t)=>{"use strict";const r=t(5717),n=t(4590),i=t(6625).C,o=t(1949),a=t(160);function s(A){this.enc="der",this.name=A.name,this.entity=A,this.tree=new u,this.tree._init(A.body)}function u(A){o.call(this,"der",A)}function g(A,e){let t=A.readUInt8(e);if(A.isError(t))return t;const r=a.tagClass[t>>6],n=0==(32&t);if(31==(31&t)){let r=t;for(t=0;128==(128&r);){if(r=A.readUInt8(e),A.isError(r))return r;t<<=7,t|=127&r}}else t&=31;return{cls:r,primitive:n,tag:t,tagStr:a.tag[t]}}function c(A,e,t){let r=A.readUInt8(t);if(A.isError(r))return r;if(!e&&128===r)return null;if(0==(128&r))return r;const n=127&r;if(n>4)return A.error("length octect is too long");r=0;for(let e=0;e{"use strict";const r=e;r.der=t(1671),r.pem=t(9631)},9631:(A,e,t)=>{"use strict";const r=t(5717),n=t(2399).Buffer,i=t(1671);function o(A){i.call(this,A),this.enc="pem"}r(o,i),A.exports=o,o.prototype.decode=function(A,e){const t=A.toString().split(/[\r\n]+/g),r=e.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/;let a=-1,s=-1;for(let A=0;A{"use strict";const r=t(5717),n=t(2399).Buffer,i=t(1949),o=t(160);function a(A){this.enc="der",this.name=A.name,this.entity=A,this.tree=new s,this.tree._init(A.body)}function s(A){i.call(this,"der",A)}function u(A){return A<10?"0"+A:A}A.exports=a,a.prototype.encode=function(A,e){return this.tree._encode(A,e).join()},r(s,i),s.prototype._encodeComposite=function(A,e,t,r){const i=function(A,e,t,r){let n;if("seqof"===A?A="seq":"setof"===A&&(A="set"),o.tagByName.hasOwnProperty(A))n=o.tagByName[A];else{if("number"!=typeof A||(0|A)!==A)return r.error("Unknown tag: "+A);n=A}return n>=31?r.error("Multi-octet tag encoding unsupported"):(e||(n|=32),n|=o.tagClassByName[t||"universal"]<<6,n)}(A,e,t,this.reporter);if(r.length<128){const A=n.alloc(2);return A[0]=i,A[1]=r.length,this._createEncoderBuffer([A,r])}let a=1;for(let A=r.length;A>=256;A>>=8)a++;const s=n.alloc(2+a);s[0]=i,s[1]=128|a;for(let A=1+a,e=r.length;e>0;A--,e>>=8)s[A]=255&e;return this._createEncoderBuffer([s,r])},s.prototype._encodeStr=function(A,e){if("bitstr"===e)return this._createEncoderBuffer([0|A.unused,A.data]);if("bmpstr"===e){const e=n.alloc(2*A.length);for(let t=0;t=40)return this.reporter.error("Second objid identifier OOB");A.splice(0,2,40*A[0]+A[1])}let r=0;for(let e=0;e=128;t>>=7)r++}const i=n.alloc(r);let o=i.length-1;for(let e=A.length-1;e>=0;e--){let t=A[e];for(i[o--]=127&t;(t>>=7)>0;)i[o--]=128|127&t}return this._createEncoderBuffer(i)},s.prototype._encodeTime=function(A,e){let t;const r=new Date(A);return"gentime"===e?t=[u(r.getUTCFullYear()),u(r.getUTCMonth()+1),u(r.getUTCDate()),u(r.getUTCHours()),u(r.getUTCMinutes()),u(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?t=[u(r.getUTCFullYear()%100),u(r.getUTCMonth()+1),u(r.getUTCDate()),u(r.getUTCHours()),u(r.getUTCMinutes()),u(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(t,"octstr")},s.prototype._encodeNull=function(){return this._createEncoderBuffer("")},s.prototype._encodeInt=function(A,e){if("string"==typeof A){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(A))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(A));A=e[A]}if("number"!=typeof A&&!n.isBuffer(A)){const e=A.toArray();!A.sign&&128&e[0]&&e.unshift(0),A=n.from(e)}if(n.isBuffer(A)){let e=A.length;0===A.length&&e++;const t=n.alloc(e);return A.copy(t),0===A.length&&(t[0]=0),this._createEncoderBuffer(t)}if(A<128)return this._createEncoderBuffer(A);if(A<256)return this._createEncoderBuffer([0,A]);let t=1;for(let e=A;e>=256;e>>=8)t++;const r=new Array(t);for(let e=r.length-1;e>=0;e--)r[e]=255&A,A>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(n.from(r))},s.prototype._encodeBool=function(A){return this._createEncoderBuffer(A?255:0)},s.prototype._use=function(A,e){return"function"==typeof A&&(A=A(e)),A._getEncoder("der").tree},s.prototype._skipDefault=function(A,e,t){const r=this._baseState;let n;if(null===r.default)return!1;const i=A.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,e,t).join()),i.length!==r.defaultBuffer.length)return!1;for(n=0;n{"use strict";const r=e;r.der=t(6984),r.pem=t(2883)},2883:(A,e,t)=>{"use strict";const r=t(5717),n=t(6984);function i(A){n.call(this,A),this.enc="pem"}r(i,n),A.exports=i,i.prototype.encode=function(A,e){const t=n.prototype.encode.call(this,A).toString("base64"),r=["-----BEGIN "+e.label+"-----"];for(let A=0;A=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function s(A,e,t){var r=a(A,t);return t-1>=e&&(r|=a(A,t-1)<<4),r}function u(A,e,t,r){for(var n=0,i=Math.min(A.length,t),o=e;o=49?a-49+10:a>=17?a-17+10:a}return n}i.isBN=function(A){return A instanceof i||null!==A&&"object"==typeof A&&A.constructor.wordSize===i.wordSize&&Array.isArray(A.words)},i.max=function(A,e){return A.cmp(e)>0?A:e},i.min=function(A,e){return A.cmp(e)<0?A:e},i.prototype._init=function(A,e,t){if("number"==typeof A)return this._initNumber(A,e,t);if("object"==typeof A)return this._initArray(A,e,t);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(A=A.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)o=A[n]|A[n-1]<<8|A[n-2]<<16,this.words[i]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===t)for(n=0,i=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this.strip()},i.prototype._parseHex=function(A,e,t){this.length=Math.ceil((A.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)n=s(A,e,r)<=18?(i-=18,o+=1,this.words[o]|=n>>>26):i+=8;else for(r=(A.length-e)%2==0?e+1:e;r=18?(i-=18,o+=1,this.words[o]|=n>>>26):i+=8;this.strip()},i.prototype._parseBase=function(A,e,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var i=A.length-t,o=i%r,a=Math.min(i,i-o)+t,s=0,g=t;g1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],c=[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],B=[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 l(A,e,t){t.negative=e.negative^A.negative;var r=A.length+e.length|0;t.length=r,r=r-1|0;var n=0|A.words[0],i=0|e.words[0],o=n*i,a=67108863&o,s=o/67108864|0;t.words[0]=a;for(var u=1;u>>26,c=67108863&s,B=Math.min(u,e.length-1),l=Math.max(0,u-A.length+1);l<=B;l++){var Q=u-l|0;g+=(o=(n=0|A.words[Q])*(i=0|e.words[l])+c)/67108864|0,c=67108863&o}t.words[u]=0|c,s=0|g}return 0!==s?t.words[u]=0|s:t.length--,t.strip()}i.prototype.toString=function(A,e){var t;if(e=0|e||1,16===(A=A||10)||"hex"===A){t="";for(var n=0,i=0,o=0;o>>24-n&16777215)||o!==this.length-1?g[6-s.length]+s+t:s+t,(n+=2)>=26&&(n-=26,o--)}for(0!==i&&(t=i.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(A===(0|A)&&A>=2&&A<=36){var u=c[A],l=B[A];t="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var I=Q.modn(l).toString(A);t=(Q=Q.idivn(l)).isZero()?I+t:g[u-I.length]+I+t}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var A=this.words[0];return 2===this.length?A+=67108864*this.words[1]:3===this.length&&1===this.words[2]?A+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-A:A},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(A,e){return r(void 0!==o),this.toArrayLike(o,A,e)},i.prototype.toArray=function(A,e){return this.toArrayLike(Array,A,e)},i.prototype.toArrayLike=function(A,e,t){var n=this.byteLength(),i=t||Math.max(1,n);r(n<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var o,a,s="le"===e,u=new A(i),g=this.clone();if(s){for(a=0;!g.isZero();a++)o=g.andln(255),g.iushrn(8),u[a]=o;for(;a=4096&&(t+=13,e>>>=13),e>=64&&(t+=7,e>>>=7),e>=8&&(t+=4,e>>>=4),e>=2&&(t+=2,e>>>=2),t+e},i.prototype._zeroBits=function(A){if(0===A)return 26;var e=A,t=0;return 0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},i.prototype.bitLength=function(){var A=this.words[this.length-1],e=this._countBits(A);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,e=0;eA.length?this.clone().ior(A):A.clone().ior(this)},i.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},i.prototype.iuand=function(A){var e;e=this.length>A.length?A:this;for(var t=0;tA.length?this.clone().iand(A):A.clone().iand(this)},i.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},i.prototype.iuxor=function(A){var e,t;this.length>A.length?(e=this,t=A):(e=A,t=this);for(var r=0;rA.length?this.clone().ixor(A):A.clone().ixor(this)},i.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},i.prototype.inotn=function(A){r("number"==typeof A&&A>=0);var e=0|Math.ceil(A/26),t=A%26;this._expand(e),t>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-t),this.strip()},i.prototype.notn=function(A){return this.clone().inotn(A)},i.prototype.setn=function(A,e){r("number"==typeof A&&A>=0);var t=A/26|0,n=A%26;return this._expand(t+1),this.words[t]=e?this.words[t]|1<A.length?(t=this,r=A):(t=A,r=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=t.length,0!==n)this.words[this.length]=n,this.length++;else if(t!==this)for(;iA.length?this.clone().iadd(A):A.clone().iadd(this)},i.prototype.isub=function(A){if(0!==A.negative){A.negative=0;var e=this.iadd(A);return A.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var t,r,n=this.cmp(A);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=A):(t=A,r=this);for(var i=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==i&&o>26,this.words[o]=67108863&e;if(0===i&&o>>13,l=0|o[1],Q=8191&l,I=l>>>13,d=0|o[2],h=8191&d,E=d>>>13,f=0|o[3],C=8191&f,p=f>>>13,m=0|o[4],y=8191&m,v=m>>>13,D=0|o[5],b=8191&D,w=D>>>13,F=0|o[6],U=8191&F,S=F>>>13,N=0|o[7],R=8191&N,H=N>>>13,G=0|o[8],M=8191&G,L=G>>>13,x=0|o[9],k=8191&x,Y=x>>>13,_=0|a[0],V=8191&_,T=_>>>13,P=0|a[1],J=8191&P,O=P>>>13,K=0|a[2],j=8191&K,z=K>>>13,q=0|a[3],Z=8191&q,W=q>>>13,X=0|a[4],$=8191&X,AA=X>>>13,eA=0|a[5],tA=8191&eA,rA=eA>>>13,nA=0|a[6],iA=8191&nA,oA=nA>>>13,aA=0|a[7],sA=8191&aA,uA=aA>>>13,gA=0|a[8],cA=8191&gA,BA=gA>>>13,lA=0|a[9],QA=8191&lA,IA=lA>>>13;t.negative=A.negative^e.negative,t.length=19;var dA=(u+(r=Math.imul(c,V))|0)+((8191&(n=(n=Math.imul(c,T))+Math.imul(B,V)|0))<<13)|0;u=((i=Math.imul(B,T))+(n>>>13)|0)+(dA>>>26)|0,dA&=67108863,r=Math.imul(Q,V),n=(n=Math.imul(Q,T))+Math.imul(I,V)|0,i=Math.imul(I,T);var hA=(u+(r=r+Math.imul(c,J)|0)|0)+((8191&(n=(n=n+Math.imul(c,O)|0)+Math.imul(B,J)|0))<<13)|0;u=((i=i+Math.imul(B,O)|0)+(n>>>13)|0)+(hA>>>26)|0,hA&=67108863,r=Math.imul(h,V),n=(n=Math.imul(h,T))+Math.imul(E,V)|0,i=Math.imul(E,T),r=r+Math.imul(Q,J)|0,n=(n=n+Math.imul(Q,O)|0)+Math.imul(I,J)|0,i=i+Math.imul(I,O)|0;var EA=(u+(r=r+Math.imul(c,j)|0)|0)+((8191&(n=(n=n+Math.imul(c,z)|0)+Math.imul(B,j)|0))<<13)|0;u=((i=i+Math.imul(B,z)|0)+(n>>>13)|0)+(EA>>>26)|0,EA&=67108863,r=Math.imul(C,V),n=(n=Math.imul(C,T))+Math.imul(p,V)|0,i=Math.imul(p,T),r=r+Math.imul(h,J)|0,n=(n=n+Math.imul(h,O)|0)+Math.imul(E,J)|0,i=i+Math.imul(E,O)|0,r=r+Math.imul(Q,j)|0,n=(n=n+Math.imul(Q,z)|0)+Math.imul(I,j)|0,i=i+Math.imul(I,z)|0;var fA=(u+(r=r+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,W)|0)+Math.imul(B,Z)|0))<<13)|0;u=((i=i+Math.imul(B,W)|0)+(n>>>13)|0)+(fA>>>26)|0,fA&=67108863,r=Math.imul(y,V),n=(n=Math.imul(y,T))+Math.imul(v,V)|0,i=Math.imul(v,T),r=r+Math.imul(C,J)|0,n=(n=n+Math.imul(C,O)|0)+Math.imul(p,J)|0,i=i+Math.imul(p,O)|0,r=r+Math.imul(h,j)|0,n=(n=n+Math.imul(h,z)|0)+Math.imul(E,j)|0,i=i+Math.imul(E,z)|0,r=r+Math.imul(Q,Z)|0,n=(n=n+Math.imul(Q,W)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0;var CA=(u+(r=r+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,AA)|0)+Math.imul(B,$)|0))<<13)|0;u=((i=i+Math.imul(B,AA)|0)+(n>>>13)|0)+(CA>>>26)|0,CA&=67108863,r=Math.imul(b,V),n=(n=Math.imul(b,T))+Math.imul(w,V)|0,i=Math.imul(w,T),r=r+Math.imul(y,J)|0,n=(n=n+Math.imul(y,O)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,O)|0,r=r+Math.imul(C,j)|0,n=(n=n+Math.imul(C,z)|0)+Math.imul(p,j)|0,i=i+Math.imul(p,z)|0,r=r+Math.imul(h,Z)|0,n=(n=n+Math.imul(h,W)|0)+Math.imul(E,Z)|0,i=i+Math.imul(E,W)|0,r=r+Math.imul(Q,$)|0,n=(n=n+Math.imul(Q,AA)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,AA)|0;var pA=(u+(r=r+Math.imul(c,tA)|0)|0)+((8191&(n=(n=n+Math.imul(c,rA)|0)+Math.imul(B,tA)|0))<<13)|0;u=((i=i+Math.imul(B,rA)|0)+(n>>>13)|0)+(pA>>>26)|0,pA&=67108863,r=Math.imul(U,V),n=(n=Math.imul(U,T))+Math.imul(S,V)|0,i=Math.imul(S,T),r=r+Math.imul(b,J)|0,n=(n=n+Math.imul(b,O)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,O)|0,r=r+Math.imul(y,j)|0,n=(n=n+Math.imul(y,z)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,z)|0,r=r+Math.imul(C,Z)|0,n=(n=n+Math.imul(C,W)|0)+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,AA)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,AA)|0,r=r+Math.imul(Q,tA)|0,n=(n=n+Math.imul(Q,rA)|0)+Math.imul(I,tA)|0,i=i+Math.imul(I,rA)|0;var mA=(u+(r=r+Math.imul(c,iA)|0)|0)+((8191&(n=(n=n+Math.imul(c,oA)|0)+Math.imul(B,iA)|0))<<13)|0;u=((i=i+Math.imul(B,oA)|0)+(n>>>13)|0)+(mA>>>26)|0,mA&=67108863,r=Math.imul(R,V),n=(n=Math.imul(R,T))+Math.imul(H,V)|0,i=Math.imul(H,T),r=r+Math.imul(U,J)|0,n=(n=n+Math.imul(U,O)|0)+Math.imul(S,J)|0,i=i+Math.imul(S,O)|0,r=r+Math.imul(b,j)|0,n=(n=n+Math.imul(b,z)|0)+Math.imul(w,j)|0,i=i+Math.imul(w,z)|0,r=r+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,AA)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,AA)|0,r=r+Math.imul(h,tA)|0,n=(n=n+Math.imul(h,rA)|0)+Math.imul(E,tA)|0,i=i+Math.imul(E,rA)|0,r=r+Math.imul(Q,iA)|0,n=(n=n+Math.imul(Q,oA)|0)+Math.imul(I,iA)|0,i=i+Math.imul(I,oA)|0;var yA=(u+(r=r+Math.imul(c,sA)|0)|0)+((8191&(n=(n=n+Math.imul(c,uA)|0)+Math.imul(B,sA)|0))<<13)|0;u=((i=i+Math.imul(B,uA)|0)+(n>>>13)|0)+(yA>>>26)|0,yA&=67108863,r=Math.imul(M,V),n=(n=Math.imul(M,T))+Math.imul(L,V)|0,i=Math.imul(L,T),r=r+Math.imul(R,J)|0,n=(n=n+Math.imul(R,O)|0)+Math.imul(H,J)|0,i=i+Math.imul(H,O)|0,r=r+Math.imul(U,j)|0,n=(n=n+Math.imul(U,z)|0)+Math.imul(S,j)|0,i=i+Math.imul(S,z)|0,r=r+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,W)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,AA)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,AA)|0,r=r+Math.imul(C,tA)|0,n=(n=n+Math.imul(C,rA)|0)+Math.imul(p,tA)|0,i=i+Math.imul(p,rA)|0,r=r+Math.imul(h,iA)|0,n=(n=n+Math.imul(h,oA)|0)+Math.imul(E,iA)|0,i=i+Math.imul(E,oA)|0,r=r+Math.imul(Q,sA)|0,n=(n=n+Math.imul(Q,uA)|0)+Math.imul(I,sA)|0,i=i+Math.imul(I,uA)|0;var vA=(u+(r=r+Math.imul(c,cA)|0)|0)+((8191&(n=(n=n+Math.imul(c,BA)|0)+Math.imul(B,cA)|0))<<13)|0;u=((i=i+Math.imul(B,BA)|0)+(n>>>13)|0)+(vA>>>26)|0,vA&=67108863,r=Math.imul(k,V),n=(n=Math.imul(k,T))+Math.imul(Y,V)|0,i=Math.imul(Y,T),r=r+Math.imul(M,J)|0,n=(n=n+Math.imul(M,O)|0)+Math.imul(L,J)|0,i=i+Math.imul(L,O)|0,r=r+Math.imul(R,j)|0,n=(n=n+Math.imul(R,z)|0)+Math.imul(H,j)|0,i=i+Math.imul(H,z)|0,r=r+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,W)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,AA)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,AA)|0,r=r+Math.imul(y,tA)|0,n=(n=n+Math.imul(y,rA)|0)+Math.imul(v,tA)|0,i=i+Math.imul(v,rA)|0,r=r+Math.imul(C,iA)|0,n=(n=n+Math.imul(C,oA)|0)+Math.imul(p,iA)|0,i=i+Math.imul(p,oA)|0,r=r+Math.imul(h,sA)|0,n=(n=n+Math.imul(h,uA)|0)+Math.imul(E,sA)|0,i=i+Math.imul(E,uA)|0,r=r+Math.imul(Q,cA)|0,n=(n=n+Math.imul(Q,BA)|0)+Math.imul(I,cA)|0,i=i+Math.imul(I,BA)|0;var DA=(u+(r=r+Math.imul(c,QA)|0)|0)+((8191&(n=(n=n+Math.imul(c,IA)|0)+Math.imul(B,QA)|0))<<13)|0;u=((i=i+Math.imul(B,IA)|0)+(n>>>13)|0)+(DA>>>26)|0,DA&=67108863,r=Math.imul(k,J),n=(n=Math.imul(k,O))+Math.imul(Y,J)|0,i=Math.imul(Y,O),r=r+Math.imul(M,j)|0,n=(n=n+Math.imul(M,z)|0)+Math.imul(L,j)|0,i=i+Math.imul(L,z)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,W)|0)+Math.imul(H,Z)|0,i=i+Math.imul(H,W)|0,r=r+Math.imul(U,$)|0,n=(n=n+Math.imul(U,AA)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,AA)|0,r=r+Math.imul(b,tA)|0,n=(n=n+Math.imul(b,rA)|0)+Math.imul(w,tA)|0,i=i+Math.imul(w,rA)|0,r=r+Math.imul(y,iA)|0,n=(n=n+Math.imul(y,oA)|0)+Math.imul(v,iA)|0,i=i+Math.imul(v,oA)|0,r=r+Math.imul(C,sA)|0,n=(n=n+Math.imul(C,uA)|0)+Math.imul(p,sA)|0,i=i+Math.imul(p,uA)|0,r=r+Math.imul(h,cA)|0,n=(n=n+Math.imul(h,BA)|0)+Math.imul(E,cA)|0,i=i+Math.imul(E,BA)|0;var bA=(u+(r=r+Math.imul(Q,QA)|0)|0)+((8191&(n=(n=n+Math.imul(Q,IA)|0)+Math.imul(I,QA)|0))<<13)|0;u=((i=i+Math.imul(I,IA)|0)+(n>>>13)|0)+(bA>>>26)|0,bA&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,z))+Math.imul(Y,j)|0,i=Math.imul(Y,z),r=r+Math.imul(M,Z)|0,n=(n=n+Math.imul(M,W)|0)+Math.imul(L,Z)|0,i=i+Math.imul(L,W)|0,r=r+Math.imul(R,$)|0,n=(n=n+Math.imul(R,AA)|0)+Math.imul(H,$)|0,i=i+Math.imul(H,AA)|0,r=r+Math.imul(U,tA)|0,n=(n=n+Math.imul(U,rA)|0)+Math.imul(S,tA)|0,i=i+Math.imul(S,rA)|0,r=r+Math.imul(b,iA)|0,n=(n=n+Math.imul(b,oA)|0)+Math.imul(w,iA)|0,i=i+Math.imul(w,oA)|0,r=r+Math.imul(y,sA)|0,n=(n=n+Math.imul(y,uA)|0)+Math.imul(v,sA)|0,i=i+Math.imul(v,uA)|0,r=r+Math.imul(C,cA)|0,n=(n=n+Math.imul(C,BA)|0)+Math.imul(p,cA)|0,i=i+Math.imul(p,BA)|0;var wA=(u+(r=r+Math.imul(h,QA)|0)|0)+((8191&(n=(n=n+Math.imul(h,IA)|0)+Math.imul(E,QA)|0))<<13)|0;u=((i=i+Math.imul(E,IA)|0)+(n>>>13)|0)+(wA>>>26)|0,wA&=67108863,r=Math.imul(k,Z),n=(n=Math.imul(k,W))+Math.imul(Y,Z)|0,i=Math.imul(Y,W),r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,AA)|0)+Math.imul(L,$)|0,i=i+Math.imul(L,AA)|0,r=r+Math.imul(R,tA)|0,n=(n=n+Math.imul(R,rA)|0)+Math.imul(H,tA)|0,i=i+Math.imul(H,rA)|0,r=r+Math.imul(U,iA)|0,n=(n=n+Math.imul(U,oA)|0)+Math.imul(S,iA)|0,i=i+Math.imul(S,oA)|0,r=r+Math.imul(b,sA)|0,n=(n=n+Math.imul(b,uA)|0)+Math.imul(w,sA)|0,i=i+Math.imul(w,uA)|0,r=r+Math.imul(y,cA)|0,n=(n=n+Math.imul(y,BA)|0)+Math.imul(v,cA)|0,i=i+Math.imul(v,BA)|0;var FA=(u+(r=r+Math.imul(C,QA)|0)|0)+((8191&(n=(n=n+Math.imul(C,IA)|0)+Math.imul(p,QA)|0))<<13)|0;u=((i=i+Math.imul(p,IA)|0)+(n>>>13)|0)+(FA>>>26)|0,FA&=67108863,r=Math.imul(k,$),n=(n=Math.imul(k,AA))+Math.imul(Y,$)|0,i=Math.imul(Y,AA),r=r+Math.imul(M,tA)|0,n=(n=n+Math.imul(M,rA)|0)+Math.imul(L,tA)|0,i=i+Math.imul(L,rA)|0,r=r+Math.imul(R,iA)|0,n=(n=n+Math.imul(R,oA)|0)+Math.imul(H,iA)|0,i=i+Math.imul(H,oA)|0,r=r+Math.imul(U,sA)|0,n=(n=n+Math.imul(U,uA)|0)+Math.imul(S,sA)|0,i=i+Math.imul(S,uA)|0,r=r+Math.imul(b,cA)|0,n=(n=n+Math.imul(b,BA)|0)+Math.imul(w,cA)|0,i=i+Math.imul(w,BA)|0;var UA=(u+(r=r+Math.imul(y,QA)|0)|0)+((8191&(n=(n=n+Math.imul(y,IA)|0)+Math.imul(v,QA)|0))<<13)|0;u=((i=i+Math.imul(v,IA)|0)+(n>>>13)|0)+(UA>>>26)|0,UA&=67108863,r=Math.imul(k,tA),n=(n=Math.imul(k,rA))+Math.imul(Y,tA)|0,i=Math.imul(Y,rA),r=r+Math.imul(M,iA)|0,n=(n=n+Math.imul(M,oA)|0)+Math.imul(L,iA)|0,i=i+Math.imul(L,oA)|0,r=r+Math.imul(R,sA)|0,n=(n=n+Math.imul(R,uA)|0)+Math.imul(H,sA)|0,i=i+Math.imul(H,uA)|0,r=r+Math.imul(U,cA)|0,n=(n=n+Math.imul(U,BA)|0)+Math.imul(S,cA)|0,i=i+Math.imul(S,BA)|0;var SA=(u+(r=r+Math.imul(b,QA)|0)|0)+((8191&(n=(n=n+Math.imul(b,IA)|0)+Math.imul(w,QA)|0))<<13)|0;u=((i=i+Math.imul(w,IA)|0)+(n>>>13)|0)+(SA>>>26)|0,SA&=67108863,r=Math.imul(k,iA),n=(n=Math.imul(k,oA))+Math.imul(Y,iA)|0,i=Math.imul(Y,oA),r=r+Math.imul(M,sA)|0,n=(n=n+Math.imul(M,uA)|0)+Math.imul(L,sA)|0,i=i+Math.imul(L,uA)|0,r=r+Math.imul(R,cA)|0,n=(n=n+Math.imul(R,BA)|0)+Math.imul(H,cA)|0,i=i+Math.imul(H,BA)|0;var NA=(u+(r=r+Math.imul(U,QA)|0)|0)+((8191&(n=(n=n+Math.imul(U,IA)|0)+Math.imul(S,QA)|0))<<13)|0;u=((i=i+Math.imul(S,IA)|0)+(n>>>13)|0)+(NA>>>26)|0,NA&=67108863,r=Math.imul(k,sA),n=(n=Math.imul(k,uA))+Math.imul(Y,sA)|0,i=Math.imul(Y,uA),r=r+Math.imul(M,cA)|0,n=(n=n+Math.imul(M,BA)|0)+Math.imul(L,cA)|0,i=i+Math.imul(L,BA)|0;var RA=(u+(r=r+Math.imul(R,QA)|0)|0)+((8191&(n=(n=n+Math.imul(R,IA)|0)+Math.imul(H,QA)|0))<<13)|0;u=((i=i+Math.imul(H,IA)|0)+(n>>>13)|0)+(RA>>>26)|0,RA&=67108863,r=Math.imul(k,cA),n=(n=Math.imul(k,BA))+Math.imul(Y,cA)|0,i=Math.imul(Y,BA);var HA=(u+(r=r+Math.imul(M,QA)|0)|0)+((8191&(n=(n=n+Math.imul(M,IA)|0)+Math.imul(L,QA)|0))<<13)|0;u=((i=i+Math.imul(L,IA)|0)+(n>>>13)|0)+(HA>>>26)|0,HA&=67108863;var GA=(u+(r=Math.imul(k,QA))|0)+((8191&(n=(n=Math.imul(k,IA))+Math.imul(Y,QA)|0))<<13)|0;return u=((i=Math.imul(Y,IA))+(n>>>13)|0)+(GA>>>26)|0,GA&=67108863,s[0]=dA,s[1]=hA,s[2]=EA,s[3]=fA,s[4]=CA,s[5]=pA,s[6]=mA,s[7]=yA,s[8]=vA,s[9]=DA,s[10]=bA,s[11]=wA,s[12]=FA,s[13]=UA,s[14]=SA,s[15]=NA,s[16]=RA,s[17]=HA,s[18]=GA,0!==u&&(s[19]=u,t.length++),t};function I(A,e,t){return(new d).mulp(A,e,t)}function d(A,e){this.x=A,this.y=e}Math.imul||(Q=l),i.prototype.mulTo=function(A,e){var t,r=this.length+A.length;return t=10===this.length&&10===A.length?Q(this,A,e):r<63?l(this,A,e):r<1024?function(A,e,t){t.negative=e.negative^A.negative,t.length=A.length+e.length;for(var r=0,n=0,i=0;i>>26)|0)>>>26,o&=67108863}t.words[i]=a,r=o,o=n}return 0!==r?t.words[i]=r:t.length--,t.strip()}(this,A,e):I(this,A,e),t},d.prototype.makeRBT=function(A){for(var e=new Array(A),t=i.prototype._countBits(A)-1,r=0;r>=1;return r},d.prototype.permute=function(A,e,t,r,n,i){for(var o=0;o>>=1)n++;return 1<>>=13,t[2*o+1]=8191&i,i>>>=13;for(o=2*e;o>=26,e+=n/67108864|0,e+=i>>>26,this.words[t]=67108863&i}return 0!==e&&(this.words[t]=e,this.length++),this},i.prototype.muln=function(A){return this.clone().imuln(A)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(A){var e=function(A){for(var e=new Array(A.bitLength()),t=0;t>>n}return e}(A);if(0===e.length)return new i(1);for(var t=this,r=0;r=0);var e,t=A%26,n=(A-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(e=0;e>>26-t}o&&(this.words[e]=o,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var i=A%26,o=Math.min((A-i)/26,this.length),a=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==g||u>=n);u--){var c=0|this.words[u];this.words[u]=g<<26-i|c>>>i,g=c&a}return s&&0!==g&&(s.words[s.length++]=g),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(A,e,t){return r(0===this.negative),this.iushrn(A,e,t)},i.prototype.shln=function(A){return this.clone().ishln(A)},i.prototype.ushln=function(A){return this.clone().iushln(A)},i.prototype.shrn=function(A){return this.clone().ishrn(A)},i.prototype.ushrn=function(A){return this.clone().iushrn(A)},i.prototype.testn=function(A){r("number"==typeof A&&A>=0);var e=A%26,t=(A-e)/26,n=1<=0);var e=A%26,t=(A-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==e&&t++,this.length=Math.min(t,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},i.prototype.isubn=function(A){if(r("number"==typeof A),r(A<67108864),A<0)return this.iaddn(-A);if(0!==this.negative)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(s/67108864|0),this.words[n+t]=67108863&i}for(;n>26,this.words[n+t]=67108863&i;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(A,e){var t=(this.length,A.length),r=this.clone(),n=A,o=0|n.words[n.length-1];0!=(t=26-this._countBits(o))&&(n=n.ushln(t),r.iushln(t),o=0|n.words[n.length-1]);var a,s=r.length-n.length;if("mod"!==e){(a=new i(null)).length=s+1,a.words=new Array(a.length);for(var u=0;u=0;c--){var B=67108864*(0|r.words[n.length+c])+(0|r.words[n.length+c-1]);for(B=Math.min(B/o|0,67108863),r._ishlnsubmul(n,B,c);0!==r.negative;)B--,r.negative=0,r._ishlnsubmul(n,1,c),r.isZero()||(r.negative^=1);a&&(a.words[c]=B)}return a&&a.strip(),r.strip(),"div"!==e&&0!==t&&r.iushrn(t),{div:a||null,mod:r}},i.prototype.divmod=function(A,e,t){return r(!A.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===A.negative?(a=this.neg().divmod(A,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(o=a.mod.neg(),t&&0!==o.negative&&o.iadd(A)),{div:n,mod:o}):0===this.negative&&0!==A.negative?(a=this.divmod(A.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!=(this.negative&A.negative)?(a=this.neg().divmod(A.neg(),e),"div"!==e&&(o=a.mod.neg(),t&&0!==o.negative&&o.isub(A)),{div:a.div,mod:o}):A.length>this.length||this.cmp(A)<0?{div:new i(0),mod:this}:1===A.length?"div"===e?{div:this.divn(A.words[0]),mod:null}:"mod"===e?{div:null,mod:new i(this.modn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new i(this.modn(A.words[0]))}:this._wordDiv(A,e);var n,o,a},i.prototype.div=function(A){return this.divmod(A,"div",!1).div},i.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},i.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},i.prototype.divRound=function(A){var e=this.divmod(A);if(e.mod.isZero())return e.div;var t=0!==e.div.negative?e.mod.isub(A):e.mod,r=A.ushrn(1),n=A.andln(1),i=t.cmp(r);return i<0||1===n&&0===i?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},i.prototype.modn=function(A){r(A<=67108863);for(var e=(1<<26)%A,t=0,n=this.length-1;n>=0;n--)t=(e*t+(0|this.words[n]))%A;return t},i.prototype.idivn=function(A){r(A<=67108863);for(var e=0,t=this.length-1;t>=0;t--){var n=(0|this.words[t])+67108864*e;this.words[t]=n/A|0,e=n%A}return this.strip()},i.prototype.divn=function(A){return this.clone().idivn(A)},i.prototype.egcd=function(A){r(0===A.negative),r(!A.isZero());var e=this,t=A.clone();e=0!==e.negative?e.umod(A):e.clone();for(var n=new i(1),o=new i(0),a=new i(0),s=new i(1),u=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++u;for(var g=t.clone(),c=e.clone();!e.isZero();){for(var B=0,l=1;0==(e.words[0]&l)&&B<26;++B,l<<=1);if(B>0)for(e.iushrn(B);B-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(g),o.isub(c)),n.iushrn(1),o.iushrn(1);for(var Q=0,I=1;0==(t.words[0]&I)&&Q<26;++Q,I<<=1);if(Q>0)for(t.iushrn(Q);Q-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(g),s.isub(c)),a.iushrn(1),s.iushrn(1);e.cmp(t)>=0?(e.isub(t),n.isub(a),o.isub(s)):(t.isub(e),a.isub(n),s.isub(o))}return{a,b:s,gcd:t.iushln(u)}},i.prototype._invmp=function(A){r(0===A.negative),r(!A.isZero());var e=this,t=A.clone();e=0!==e.negative?e.umod(A):e.clone();for(var n,o=new i(1),a=new i(0),s=t.clone();e.cmpn(1)>0&&t.cmpn(1)>0;){for(var u=0,g=1;0==(e.words[0]&g)&&u<26;++u,g<<=1);if(u>0)for(e.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var c=0,B=1;0==(t.words[0]&B)&&c<26;++c,B<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);e.cmp(t)>=0?(e.isub(t),o.isub(a)):(t.isub(e),a.isub(o))}return(n=0===e.cmpn(1)?o:a).cmpn(0)<0&&n.iadd(A),n},i.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var e=this.clone(),t=A.clone();e.negative=0,t.negative=0;for(var r=0;e.isEven()&&t.isEven();r++)e.iushrn(1),t.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;t.isEven();)t.iushrn(1);var n=e.cmp(t);if(n<0){var i=e;e=t,t=i}else if(0===n||0===t.cmpn(1))break;e.isub(t)}return t.iushln(r)},i.prototype.invm=function(A){return this.egcd(A).a.umod(A)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(A){return this.words[0]&A},i.prototype.bincn=function(A){r("number"==typeof A);var e=A%26,t=(A-e)/26,n=1<>>26,a&=67108863,this.words[o]=a}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(A){var e,t=A<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)e=1;else{t&&(A=-A),r(A<=67108863,"Number is too big");var n=0|this.words[0];e=n===A?0:nA.length)return 1;if(this.length=0;t--){var r=0|this.words[t],n=0|A.words[t];if(r!==n){rn&&(e=1);break}}return e},i.prototype.gtn=function(A){return 1===this.cmpn(A)},i.prototype.gt=function(A){return 1===this.cmp(A)},i.prototype.gten=function(A){return this.cmpn(A)>=0},i.prototype.gte=function(A){return this.cmp(A)>=0},i.prototype.ltn=function(A){return-1===this.cmpn(A)},i.prototype.lt=function(A){return-1===this.cmp(A)},i.prototype.lten=function(A){return this.cmpn(A)<=0},i.prototype.lte=function(A){return this.cmp(A)<=0},i.prototype.eqn=function(A){return 0===this.cmpn(A)},i.prototype.eq=function(A){return 0===this.cmp(A)},i.red=function(A){return new y(A)},i.prototype.toRed=function(A){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),A.convertTo(this)._forceRed(A)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(A){return this.red=A,this},i.prototype.forceRed=function(A){return r(!this.red,"Already a number in reduction context"),this._forceRed(A)},i.prototype.redAdd=function(A){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},i.prototype.redIAdd=function(A){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},i.prototype.redSub=function(A){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},i.prototype.redISub=function(A){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},i.prototype.redShl=function(A){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},i.prototype.redMul=function(A){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},i.prototype.redIMul=function(A){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(A){return r(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var h={k256:null,p224:null,p192:null,p25519:null};function E(A,e){this.name=A,this.p=new i(e,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function f(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function C(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function p(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(A){if("string"==typeof A){var e=i._prime(A);this.m=e.p,this.prime=e}else r(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}function v(A){y.call(this,A),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}E.prototype._tmp=function(){var A=new i(null);return A.words=new Array(Math.ceil(this.n/13)),A},E.prototype.ireduce=function(A){var e,t=A;do{this.split(t,this.tmp),e=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},E.prototype.split=function(A,e){A.iushrn(this.n,0,e)},E.prototype.imulK=function(A){return A.imul(this.k)},n(f,E),f.prototype.split=function(A,e){for(var t=4194303,r=Math.min(A.length,9),n=0;n>>22,i=o}i>>>=22,A.words[n-10]=i,0===i&&A.length>10?A.length-=10:A.length-=9},f.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var e=0,t=0;t>>=26,A.words[t]=n,e=r}return 0!==e&&(A.words[A.length++]=e),A},i._prime=function(A){if(h[A])return h[A];var e;if("k256"===A)e=new f;else if("p224"===A)e=new C;else if("p192"===A)e=new p;else{if("p25519"!==A)throw new Error("Unknown prime "+A);e=new m}return h[A]=e,e},y.prototype._verify1=function(A){r(0===A.negative,"red works only with positives"),r(A.red,"red works only with red numbers")},y.prototype._verify2=function(A,e){r(0==(A.negative|e.negative),"red works only with positives"),r(A.red&&A.red===e.red,"red works only with red numbers")},y.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):A.umod(this.m)._forceRed(this)},y.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},y.prototype.add=function(A,e){this._verify2(A,e);var t=A.add(e);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},y.prototype.iadd=function(A,e){this._verify2(A,e);var t=A.iadd(e);return t.cmp(this.m)>=0&&t.isub(this.m),t},y.prototype.sub=function(A,e){this._verify2(A,e);var t=A.sub(e);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},y.prototype.isub=function(A,e){this._verify2(A,e);var t=A.isub(e);return t.cmpn(0)<0&&t.iadd(this.m),t},y.prototype.shl=function(A,e){return this._verify1(A),this.imod(A.ushln(e))},y.prototype.imul=function(A,e){return this._verify2(A,e),this.imod(A.imul(e))},y.prototype.mul=function(A,e){return this._verify2(A,e),this.imod(A.mul(e))},y.prototype.isqr=function(A){return this.imul(A,A.clone())},y.prototype.sqr=function(A){return this.mul(A,A)},y.prototype.sqrt=function(A){if(A.isZero())return A.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var t=this.m.add(new i(1)).iushrn(2);return this.pow(A,t)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);r(!n.isZero());var a=new i(1).toRed(this),s=a.redNeg(),u=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new i(2*g*g).toRed(this);0!==this.pow(g,u).cmp(s);)g.redIAdd(s);for(var c=this.pow(g,n),B=this.pow(A,n.addn(1).iushrn(1)),l=this.pow(A,n),Q=o;0!==l.cmp(a);){for(var I=l,d=0;0!==I.cmp(a);d++)I=I.redSqr();r(d=0;r--){for(var u=e.words[r],g=s-1;g>=0;g--){var c=u>>g&1;n!==t[0]&&(n=this.sqr(n)),0!==c||0!==o?(o<<=1,o|=c,(4==++a||0===r&&0===g)&&(n=this.mul(n,t[o]),a=0,o=0)):a=0}s=26}return n},y.prototype.convertTo=function(A){var e=A.umod(this.m);return e===A?e.clone():e},y.prototype.convertFrom=function(A){var e=A.clone();return e.red=null,e},i.mont=function(A){return new v(A)},n(v,y),v.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},v.prototype.convertFrom=function(A){var e=this.imod(A.mul(this.rinv));return e.red=null,e},v.prototype.imul=function(A,e){if(A.isZero()||e.isZero())return A.words[0]=0,A.length=1,A;var t=A.imul(e),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),i=n;return n.cmp(this.m)>=0?i=n.isub(this.m):n.cmpn(0)<0&&(i=n.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(A,e){if(A.isZero()||e.isZero())return new i(0)._forceRed(this);var t=A.mul(e),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},v.prototype.invm=function(A){return this.imod(A._invmp(this.m).mul(this.r2))._forceRed(this)}}(A=t.nmd(A),this)},9742:(A,e)=>{"use strict";e.byteLength=function(A){var e=s(A),t=e[0],r=e[1];return 3*(t+r)/4-r},e.toByteArray=function(A){var e,t,i=s(A),o=i[0],a=i[1],u=new n(function(A,e,t){return 3*(e+t)/4-t}(0,o,a)),g=0,c=a>0?o-4:o;for(t=0;t>16&255,u[g++]=e>>8&255,u[g++]=255&e;return 2===a&&(e=r[A.charCodeAt(t)]<<2|r[A.charCodeAt(t+1)]>>4,u[g++]=255&e),1===a&&(e=r[A.charCodeAt(t)]<<10|r[A.charCodeAt(t+1)]<<4|r[A.charCodeAt(t+2)]>>2,u[g++]=e>>8&255,u[g++]=255&e),u},e.fromByteArray=function(A){for(var e,r=A.length,n=r%3,i=[],o=16383,a=0,s=r-n;as?s:a+o));return 1===n?(e=A[r-1],i.push(t[e>>2]+t[e<<4&63]+"==")):2===n&&(e=(A[r-2]<<8)+A[r-1],i.push(t[e>>10]+t[e>>4&63]+t[e<<2&63]+"=")),i.join("")};for(var t=[],r=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var t=A.indexOf("=");return-1===t&&(t=e),[t,t===e?0:4-t%4]}function u(A,e,r){for(var n,i,o=[],a=e;a>18&63]+t[i>>12&63]+t[i>>6&63]+t[63&i]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},3550:function(A,e,t){!function(A,e){"use strict";function r(A,e){if(!A)throw new Error(e||"Assertion failed")}function n(A,e){A.super_=e;var t=function(){};t.prototype=e.prototype,A.prototype=new t,A.prototype.constructor=A}function i(A,e,t){if(i.isBN(A))return A;this.negative=0,this.words=null,this.length=0,this.red=null,null!==A&&("le"!==e&&"be"!==e||(t=e,e=10),this._init(A||0,e||10,t||"be"))}var o;"object"==typeof A?A.exports=i:e.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:t(6601).Buffer}catch(A){}function a(A,e){var t=A.charCodeAt(e);return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:void r(!1,"Invalid character in "+A)}function s(A,e,t){var r=a(A,t);return t-1>=e&&(r|=a(A,t-1)<<4),r}function u(A,e,t,n){for(var i=0,o=0,a=Math.min(A.length,t),s=e;s=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&o0?A:e},i.min=function(A,e){return A.cmp(e)<0?A:e},i.prototype._init=function(A,e,t){if("number"==typeof A)return this._initNumber(A,e,t);if("object"==typeof A)return this._initArray(A,e,t);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(A=A.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)o=A[n]|A[n-1]<<8|A[n-2]<<16,this.words[i]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===t)for(n=0,i=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this._strip()},i.prototype._parseHex=function(A,e,t){this.length=Math.ceil((A.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)n=s(A,e,r)<=18?(i-=18,o+=1,this.words[o]|=n>>>26):i+=8;else for(r=(A.length-e)%2==0?e+1:e;r=18?(i-=18,o+=1,this.words[o]|=n>>>26):i+=8;this._strip()},i.prototype._parseBase=function(A,e,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var i=A.length-t,o=i%r,a=Math.min(i,i-o)+t,s=0,g=t;g1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(A){i.prototype.inspect=c}else i.prototype.inspect=c;function c(){return(this.red?""}var B=["","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"],l=[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],Q=[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 I(A,e,t){t.negative=e.negative^A.negative;var r=A.length+e.length|0;t.length=r,r=r-1|0;var n=0|A.words[0],i=0|e.words[0],o=n*i,a=67108863&o,s=o/67108864|0;t.words[0]=a;for(var u=1;u>>26,c=67108863&s,B=Math.min(u,e.length-1),l=Math.max(0,u-A.length+1);l<=B;l++){var Q=u-l|0;g+=(o=(n=0|A.words[Q])*(i=0|e.words[l])+c)/67108864|0,c=67108863&o}t.words[u]=0|c,s=0|g}return 0!==s?t.words[u]=0|s:t.length--,t._strip()}i.prototype.toString=function(A,e){var t;if(e=0|e||1,16===(A=A||10)||"hex"===A){t="";for(var n=0,i=0,o=0;o>>24-n&16777215)||o!==this.length-1?B[6-s.length]+s+t:s+t,(n+=2)>=26&&(n-=26,o--)}for(0!==i&&(t=i.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(A===(0|A)&&A>=2&&A<=36){var u=l[A],g=Q[A];t="";var c=this.clone();for(c.negative=0;!c.isZero();){var I=c.modrn(g).toString(A);t=(c=c.idivn(g)).isZero()?I+t:B[u-I.length]+I+t}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var A=this.words[0];return 2===this.length?A+=67108864*this.words[1]:3===this.length&&1===this.words[2]?A+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-A:A},i.prototype.toJSON=function(){return this.toString(16,2)},o&&(i.prototype.toBuffer=function(A,e){return this.toArrayLike(o,A,e)}),i.prototype.toArray=function(A,e){return this.toArrayLike(Array,A,e)},i.prototype.toArrayLike=function(A,e,t){this._strip();var n=this.byteLength(),i=t||Math.max(1,n);r(n<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0");var o=function(A,e){return A.allocUnsafe?A.allocUnsafe(e):new A(e)}(A,i);return this["_toArrayLike"+("le"===e?"LE":"BE")](o,n),o},i.prototype._toArrayLikeLE=function(A,e){for(var t=0,r=0,n=0,i=0;n>8&255),t>16&255),6===i?(t>24&255),r=0,i=0):(r=o>>>24,i+=2)}if(t=0&&(A[t--]=o>>8&255),t>=0&&(A[t--]=o>>16&255),6===i?(t>=0&&(A[t--]=o>>24&255),r=0,i=0):(r=o>>>24,i+=2)}if(t>=0)for(A[t--]=r;t>=0;)A[t--]=0},Math.clz32?i.prototype._countBits=function(A){return 32-Math.clz32(A)}:i.prototype._countBits=function(A){var e=A,t=0;return e>=4096&&(t+=13,e>>>=13),e>=64&&(t+=7,e>>>=7),e>=8&&(t+=4,e>>>=4),e>=2&&(t+=2,e>>>=2),t+e},i.prototype._zeroBits=function(A){if(0===A)return 26;var e=A,t=0;return 0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},i.prototype.bitLength=function(){var A=this.words[this.length-1],e=this._countBits(A);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,e=0;eA.length?this.clone().ior(A):A.clone().ior(this)},i.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},i.prototype.iuand=function(A){var e;e=this.length>A.length?A:this;for(var t=0;tA.length?this.clone().iand(A):A.clone().iand(this)},i.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},i.prototype.iuxor=function(A){var e,t;this.length>A.length?(e=this,t=A):(e=A,t=this);for(var r=0;rA.length?this.clone().ixor(A):A.clone().ixor(this)},i.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},i.prototype.inotn=function(A){r("number"==typeof A&&A>=0);var e=0|Math.ceil(A/26),t=A%26;this._expand(e),t>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-t),this._strip()},i.prototype.notn=function(A){return this.clone().inotn(A)},i.prototype.setn=function(A,e){r("number"==typeof A&&A>=0);var t=A/26|0,n=A%26;return this._expand(t+1),this.words[t]=e?this.words[t]|1<A.length?(t=this,r=A):(t=A,r=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=t.length,0!==n)this.words[this.length]=n,this.length++;else if(t!==this)for(;iA.length?this.clone().iadd(A):A.clone().iadd(this)},i.prototype.isub=function(A){if(0!==A.negative){A.negative=0;var e=this.iadd(A);return A.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var t,r,n=this.cmp(A);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=A):(t=A,r=this);for(var i=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==i&&o>26,this.words[o]=67108863&e;if(0===i&&o>>13,l=0|o[1],Q=8191&l,I=l>>>13,d=0|o[2],h=8191&d,E=d>>>13,f=0|o[3],C=8191&f,p=f>>>13,m=0|o[4],y=8191&m,v=m>>>13,D=0|o[5],b=8191&D,w=D>>>13,F=0|o[6],U=8191&F,S=F>>>13,N=0|o[7],R=8191&N,H=N>>>13,G=0|o[8],M=8191&G,L=G>>>13,x=0|o[9],k=8191&x,Y=x>>>13,_=0|a[0],V=8191&_,T=_>>>13,P=0|a[1],J=8191&P,O=P>>>13,K=0|a[2],j=8191&K,z=K>>>13,q=0|a[3],Z=8191&q,W=q>>>13,X=0|a[4],$=8191&X,AA=X>>>13,eA=0|a[5],tA=8191&eA,rA=eA>>>13,nA=0|a[6],iA=8191&nA,oA=nA>>>13,aA=0|a[7],sA=8191&aA,uA=aA>>>13,gA=0|a[8],cA=8191&gA,BA=gA>>>13,lA=0|a[9],QA=8191&lA,IA=lA>>>13;t.negative=A.negative^e.negative,t.length=19;var dA=(u+(r=Math.imul(c,V))|0)+((8191&(n=(n=Math.imul(c,T))+Math.imul(B,V)|0))<<13)|0;u=((i=Math.imul(B,T))+(n>>>13)|0)+(dA>>>26)|0,dA&=67108863,r=Math.imul(Q,V),n=(n=Math.imul(Q,T))+Math.imul(I,V)|0,i=Math.imul(I,T);var hA=(u+(r=r+Math.imul(c,J)|0)|0)+((8191&(n=(n=n+Math.imul(c,O)|0)+Math.imul(B,J)|0))<<13)|0;u=((i=i+Math.imul(B,O)|0)+(n>>>13)|0)+(hA>>>26)|0,hA&=67108863,r=Math.imul(h,V),n=(n=Math.imul(h,T))+Math.imul(E,V)|0,i=Math.imul(E,T),r=r+Math.imul(Q,J)|0,n=(n=n+Math.imul(Q,O)|0)+Math.imul(I,J)|0,i=i+Math.imul(I,O)|0;var EA=(u+(r=r+Math.imul(c,j)|0)|0)+((8191&(n=(n=n+Math.imul(c,z)|0)+Math.imul(B,j)|0))<<13)|0;u=((i=i+Math.imul(B,z)|0)+(n>>>13)|0)+(EA>>>26)|0,EA&=67108863,r=Math.imul(C,V),n=(n=Math.imul(C,T))+Math.imul(p,V)|0,i=Math.imul(p,T),r=r+Math.imul(h,J)|0,n=(n=n+Math.imul(h,O)|0)+Math.imul(E,J)|0,i=i+Math.imul(E,O)|0,r=r+Math.imul(Q,j)|0,n=(n=n+Math.imul(Q,z)|0)+Math.imul(I,j)|0,i=i+Math.imul(I,z)|0;var fA=(u+(r=r+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,W)|0)+Math.imul(B,Z)|0))<<13)|0;u=((i=i+Math.imul(B,W)|0)+(n>>>13)|0)+(fA>>>26)|0,fA&=67108863,r=Math.imul(y,V),n=(n=Math.imul(y,T))+Math.imul(v,V)|0,i=Math.imul(v,T),r=r+Math.imul(C,J)|0,n=(n=n+Math.imul(C,O)|0)+Math.imul(p,J)|0,i=i+Math.imul(p,O)|0,r=r+Math.imul(h,j)|0,n=(n=n+Math.imul(h,z)|0)+Math.imul(E,j)|0,i=i+Math.imul(E,z)|0,r=r+Math.imul(Q,Z)|0,n=(n=n+Math.imul(Q,W)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0;var CA=(u+(r=r+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,AA)|0)+Math.imul(B,$)|0))<<13)|0;u=((i=i+Math.imul(B,AA)|0)+(n>>>13)|0)+(CA>>>26)|0,CA&=67108863,r=Math.imul(b,V),n=(n=Math.imul(b,T))+Math.imul(w,V)|0,i=Math.imul(w,T),r=r+Math.imul(y,J)|0,n=(n=n+Math.imul(y,O)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,O)|0,r=r+Math.imul(C,j)|0,n=(n=n+Math.imul(C,z)|0)+Math.imul(p,j)|0,i=i+Math.imul(p,z)|0,r=r+Math.imul(h,Z)|0,n=(n=n+Math.imul(h,W)|0)+Math.imul(E,Z)|0,i=i+Math.imul(E,W)|0,r=r+Math.imul(Q,$)|0,n=(n=n+Math.imul(Q,AA)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,AA)|0;var pA=(u+(r=r+Math.imul(c,tA)|0)|0)+((8191&(n=(n=n+Math.imul(c,rA)|0)+Math.imul(B,tA)|0))<<13)|0;u=((i=i+Math.imul(B,rA)|0)+(n>>>13)|0)+(pA>>>26)|0,pA&=67108863,r=Math.imul(U,V),n=(n=Math.imul(U,T))+Math.imul(S,V)|0,i=Math.imul(S,T),r=r+Math.imul(b,J)|0,n=(n=n+Math.imul(b,O)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,O)|0,r=r+Math.imul(y,j)|0,n=(n=n+Math.imul(y,z)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,z)|0,r=r+Math.imul(C,Z)|0,n=(n=n+Math.imul(C,W)|0)+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,AA)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,AA)|0,r=r+Math.imul(Q,tA)|0,n=(n=n+Math.imul(Q,rA)|0)+Math.imul(I,tA)|0,i=i+Math.imul(I,rA)|0;var mA=(u+(r=r+Math.imul(c,iA)|0)|0)+((8191&(n=(n=n+Math.imul(c,oA)|0)+Math.imul(B,iA)|0))<<13)|0;u=((i=i+Math.imul(B,oA)|0)+(n>>>13)|0)+(mA>>>26)|0,mA&=67108863,r=Math.imul(R,V),n=(n=Math.imul(R,T))+Math.imul(H,V)|0,i=Math.imul(H,T),r=r+Math.imul(U,J)|0,n=(n=n+Math.imul(U,O)|0)+Math.imul(S,J)|0,i=i+Math.imul(S,O)|0,r=r+Math.imul(b,j)|0,n=(n=n+Math.imul(b,z)|0)+Math.imul(w,j)|0,i=i+Math.imul(w,z)|0,r=r+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,AA)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,AA)|0,r=r+Math.imul(h,tA)|0,n=(n=n+Math.imul(h,rA)|0)+Math.imul(E,tA)|0,i=i+Math.imul(E,rA)|0,r=r+Math.imul(Q,iA)|0,n=(n=n+Math.imul(Q,oA)|0)+Math.imul(I,iA)|0,i=i+Math.imul(I,oA)|0;var yA=(u+(r=r+Math.imul(c,sA)|0)|0)+((8191&(n=(n=n+Math.imul(c,uA)|0)+Math.imul(B,sA)|0))<<13)|0;u=((i=i+Math.imul(B,uA)|0)+(n>>>13)|0)+(yA>>>26)|0,yA&=67108863,r=Math.imul(M,V),n=(n=Math.imul(M,T))+Math.imul(L,V)|0,i=Math.imul(L,T),r=r+Math.imul(R,J)|0,n=(n=n+Math.imul(R,O)|0)+Math.imul(H,J)|0,i=i+Math.imul(H,O)|0,r=r+Math.imul(U,j)|0,n=(n=n+Math.imul(U,z)|0)+Math.imul(S,j)|0,i=i+Math.imul(S,z)|0,r=r+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,W)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,AA)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,AA)|0,r=r+Math.imul(C,tA)|0,n=(n=n+Math.imul(C,rA)|0)+Math.imul(p,tA)|0,i=i+Math.imul(p,rA)|0,r=r+Math.imul(h,iA)|0,n=(n=n+Math.imul(h,oA)|0)+Math.imul(E,iA)|0,i=i+Math.imul(E,oA)|0,r=r+Math.imul(Q,sA)|0,n=(n=n+Math.imul(Q,uA)|0)+Math.imul(I,sA)|0,i=i+Math.imul(I,uA)|0;var vA=(u+(r=r+Math.imul(c,cA)|0)|0)+((8191&(n=(n=n+Math.imul(c,BA)|0)+Math.imul(B,cA)|0))<<13)|0;u=((i=i+Math.imul(B,BA)|0)+(n>>>13)|0)+(vA>>>26)|0,vA&=67108863,r=Math.imul(k,V),n=(n=Math.imul(k,T))+Math.imul(Y,V)|0,i=Math.imul(Y,T),r=r+Math.imul(M,J)|0,n=(n=n+Math.imul(M,O)|0)+Math.imul(L,J)|0,i=i+Math.imul(L,O)|0,r=r+Math.imul(R,j)|0,n=(n=n+Math.imul(R,z)|0)+Math.imul(H,j)|0,i=i+Math.imul(H,z)|0,r=r+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,W)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,AA)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,AA)|0,r=r+Math.imul(y,tA)|0,n=(n=n+Math.imul(y,rA)|0)+Math.imul(v,tA)|0,i=i+Math.imul(v,rA)|0,r=r+Math.imul(C,iA)|0,n=(n=n+Math.imul(C,oA)|0)+Math.imul(p,iA)|0,i=i+Math.imul(p,oA)|0,r=r+Math.imul(h,sA)|0,n=(n=n+Math.imul(h,uA)|0)+Math.imul(E,sA)|0,i=i+Math.imul(E,uA)|0,r=r+Math.imul(Q,cA)|0,n=(n=n+Math.imul(Q,BA)|0)+Math.imul(I,cA)|0,i=i+Math.imul(I,BA)|0;var DA=(u+(r=r+Math.imul(c,QA)|0)|0)+((8191&(n=(n=n+Math.imul(c,IA)|0)+Math.imul(B,QA)|0))<<13)|0;u=((i=i+Math.imul(B,IA)|0)+(n>>>13)|0)+(DA>>>26)|0,DA&=67108863,r=Math.imul(k,J),n=(n=Math.imul(k,O))+Math.imul(Y,J)|0,i=Math.imul(Y,O),r=r+Math.imul(M,j)|0,n=(n=n+Math.imul(M,z)|0)+Math.imul(L,j)|0,i=i+Math.imul(L,z)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,W)|0)+Math.imul(H,Z)|0,i=i+Math.imul(H,W)|0,r=r+Math.imul(U,$)|0,n=(n=n+Math.imul(U,AA)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,AA)|0,r=r+Math.imul(b,tA)|0,n=(n=n+Math.imul(b,rA)|0)+Math.imul(w,tA)|0,i=i+Math.imul(w,rA)|0,r=r+Math.imul(y,iA)|0,n=(n=n+Math.imul(y,oA)|0)+Math.imul(v,iA)|0,i=i+Math.imul(v,oA)|0,r=r+Math.imul(C,sA)|0,n=(n=n+Math.imul(C,uA)|0)+Math.imul(p,sA)|0,i=i+Math.imul(p,uA)|0,r=r+Math.imul(h,cA)|0,n=(n=n+Math.imul(h,BA)|0)+Math.imul(E,cA)|0,i=i+Math.imul(E,BA)|0;var bA=(u+(r=r+Math.imul(Q,QA)|0)|0)+((8191&(n=(n=n+Math.imul(Q,IA)|0)+Math.imul(I,QA)|0))<<13)|0;u=((i=i+Math.imul(I,IA)|0)+(n>>>13)|0)+(bA>>>26)|0,bA&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,z))+Math.imul(Y,j)|0,i=Math.imul(Y,z),r=r+Math.imul(M,Z)|0,n=(n=n+Math.imul(M,W)|0)+Math.imul(L,Z)|0,i=i+Math.imul(L,W)|0,r=r+Math.imul(R,$)|0,n=(n=n+Math.imul(R,AA)|0)+Math.imul(H,$)|0,i=i+Math.imul(H,AA)|0,r=r+Math.imul(U,tA)|0,n=(n=n+Math.imul(U,rA)|0)+Math.imul(S,tA)|0,i=i+Math.imul(S,rA)|0,r=r+Math.imul(b,iA)|0,n=(n=n+Math.imul(b,oA)|0)+Math.imul(w,iA)|0,i=i+Math.imul(w,oA)|0,r=r+Math.imul(y,sA)|0,n=(n=n+Math.imul(y,uA)|0)+Math.imul(v,sA)|0,i=i+Math.imul(v,uA)|0,r=r+Math.imul(C,cA)|0,n=(n=n+Math.imul(C,BA)|0)+Math.imul(p,cA)|0,i=i+Math.imul(p,BA)|0;var wA=(u+(r=r+Math.imul(h,QA)|0)|0)+((8191&(n=(n=n+Math.imul(h,IA)|0)+Math.imul(E,QA)|0))<<13)|0;u=((i=i+Math.imul(E,IA)|0)+(n>>>13)|0)+(wA>>>26)|0,wA&=67108863,r=Math.imul(k,Z),n=(n=Math.imul(k,W))+Math.imul(Y,Z)|0,i=Math.imul(Y,W),r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,AA)|0)+Math.imul(L,$)|0,i=i+Math.imul(L,AA)|0,r=r+Math.imul(R,tA)|0,n=(n=n+Math.imul(R,rA)|0)+Math.imul(H,tA)|0,i=i+Math.imul(H,rA)|0,r=r+Math.imul(U,iA)|0,n=(n=n+Math.imul(U,oA)|0)+Math.imul(S,iA)|0,i=i+Math.imul(S,oA)|0,r=r+Math.imul(b,sA)|0,n=(n=n+Math.imul(b,uA)|0)+Math.imul(w,sA)|0,i=i+Math.imul(w,uA)|0,r=r+Math.imul(y,cA)|0,n=(n=n+Math.imul(y,BA)|0)+Math.imul(v,cA)|0,i=i+Math.imul(v,BA)|0;var FA=(u+(r=r+Math.imul(C,QA)|0)|0)+((8191&(n=(n=n+Math.imul(C,IA)|0)+Math.imul(p,QA)|0))<<13)|0;u=((i=i+Math.imul(p,IA)|0)+(n>>>13)|0)+(FA>>>26)|0,FA&=67108863,r=Math.imul(k,$),n=(n=Math.imul(k,AA))+Math.imul(Y,$)|0,i=Math.imul(Y,AA),r=r+Math.imul(M,tA)|0,n=(n=n+Math.imul(M,rA)|0)+Math.imul(L,tA)|0,i=i+Math.imul(L,rA)|0,r=r+Math.imul(R,iA)|0,n=(n=n+Math.imul(R,oA)|0)+Math.imul(H,iA)|0,i=i+Math.imul(H,oA)|0,r=r+Math.imul(U,sA)|0,n=(n=n+Math.imul(U,uA)|0)+Math.imul(S,sA)|0,i=i+Math.imul(S,uA)|0,r=r+Math.imul(b,cA)|0,n=(n=n+Math.imul(b,BA)|0)+Math.imul(w,cA)|0,i=i+Math.imul(w,BA)|0;var UA=(u+(r=r+Math.imul(y,QA)|0)|0)+((8191&(n=(n=n+Math.imul(y,IA)|0)+Math.imul(v,QA)|0))<<13)|0;u=((i=i+Math.imul(v,IA)|0)+(n>>>13)|0)+(UA>>>26)|0,UA&=67108863,r=Math.imul(k,tA),n=(n=Math.imul(k,rA))+Math.imul(Y,tA)|0,i=Math.imul(Y,rA),r=r+Math.imul(M,iA)|0,n=(n=n+Math.imul(M,oA)|0)+Math.imul(L,iA)|0,i=i+Math.imul(L,oA)|0,r=r+Math.imul(R,sA)|0,n=(n=n+Math.imul(R,uA)|0)+Math.imul(H,sA)|0,i=i+Math.imul(H,uA)|0,r=r+Math.imul(U,cA)|0,n=(n=n+Math.imul(U,BA)|0)+Math.imul(S,cA)|0,i=i+Math.imul(S,BA)|0;var SA=(u+(r=r+Math.imul(b,QA)|0)|0)+((8191&(n=(n=n+Math.imul(b,IA)|0)+Math.imul(w,QA)|0))<<13)|0;u=((i=i+Math.imul(w,IA)|0)+(n>>>13)|0)+(SA>>>26)|0,SA&=67108863,r=Math.imul(k,iA),n=(n=Math.imul(k,oA))+Math.imul(Y,iA)|0,i=Math.imul(Y,oA),r=r+Math.imul(M,sA)|0,n=(n=n+Math.imul(M,uA)|0)+Math.imul(L,sA)|0,i=i+Math.imul(L,uA)|0,r=r+Math.imul(R,cA)|0,n=(n=n+Math.imul(R,BA)|0)+Math.imul(H,cA)|0,i=i+Math.imul(H,BA)|0;var NA=(u+(r=r+Math.imul(U,QA)|0)|0)+((8191&(n=(n=n+Math.imul(U,IA)|0)+Math.imul(S,QA)|0))<<13)|0;u=((i=i+Math.imul(S,IA)|0)+(n>>>13)|0)+(NA>>>26)|0,NA&=67108863,r=Math.imul(k,sA),n=(n=Math.imul(k,uA))+Math.imul(Y,sA)|0,i=Math.imul(Y,uA),r=r+Math.imul(M,cA)|0,n=(n=n+Math.imul(M,BA)|0)+Math.imul(L,cA)|0,i=i+Math.imul(L,BA)|0;var RA=(u+(r=r+Math.imul(R,QA)|0)|0)+((8191&(n=(n=n+Math.imul(R,IA)|0)+Math.imul(H,QA)|0))<<13)|0;u=((i=i+Math.imul(H,IA)|0)+(n>>>13)|0)+(RA>>>26)|0,RA&=67108863,r=Math.imul(k,cA),n=(n=Math.imul(k,BA))+Math.imul(Y,cA)|0,i=Math.imul(Y,BA);var HA=(u+(r=r+Math.imul(M,QA)|0)|0)+((8191&(n=(n=n+Math.imul(M,IA)|0)+Math.imul(L,QA)|0))<<13)|0;u=((i=i+Math.imul(L,IA)|0)+(n>>>13)|0)+(HA>>>26)|0,HA&=67108863;var GA=(u+(r=Math.imul(k,QA))|0)+((8191&(n=(n=Math.imul(k,IA))+Math.imul(Y,QA)|0))<<13)|0;return u=((i=Math.imul(Y,IA))+(n>>>13)|0)+(GA>>>26)|0,GA&=67108863,s[0]=dA,s[1]=hA,s[2]=EA,s[3]=fA,s[4]=CA,s[5]=pA,s[6]=mA,s[7]=yA,s[8]=vA,s[9]=DA,s[10]=bA,s[11]=wA,s[12]=FA,s[13]=UA,s[14]=SA,s[15]=NA,s[16]=RA,s[17]=HA,s[18]=GA,0!==u&&(s[19]=u,t.length++),t};function h(A,e,t){t.negative=e.negative^A.negative,t.length=A.length+e.length;for(var r=0,n=0,i=0;i>>26)|0)>>>26,o&=67108863}t.words[i]=a,r=o,o=n}return 0!==r?t.words[i]=r:t.length--,t._strip()}function E(A,e,t){return h(A,e,t)}function f(A,e){this.x=A,this.y=e}Math.imul||(d=I),i.prototype.mulTo=function(A,e){var t=this.length+A.length;return 10===this.length&&10===A.length?d(this,A,e):t<63?I(this,A,e):t<1024?h(this,A,e):E(this,A,e)},f.prototype.makeRBT=function(A){for(var e=new Array(A),t=i.prototype._countBits(A)-1,r=0;r>=1;return r},f.prototype.permute=function(A,e,t,r,n,i){for(var o=0;o>>=1)n++;return 1<>>=13,t[2*o+1]=8191&i,i>>>=13;for(o=2*e;o>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),e?this.ineg():this},i.prototype.muln=function(A){return this.clone().imuln(A)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(A){var e=function(A){for(var e=new Array(A.bitLength()),t=0;t>>n&1}return e}(A);if(0===e.length)return new i(1);for(var t=this,r=0;r=0);var e,t=A%26,n=(A-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(e=0;e>>26-t}o&&(this.words[e]=o,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var i=A%26,o=Math.min((A-i)/26,this.length),a=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==g||u>=n);u--){var c=0|this.words[u];this.words[u]=g<<26-i|c>>>i,g=c&a}return s&&0!==g&&(s.words[s.length++]=g),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(A,e,t){return r(0===this.negative),this.iushrn(A,e,t)},i.prototype.shln=function(A){return this.clone().ishln(A)},i.prototype.ushln=function(A){return this.clone().iushln(A)},i.prototype.shrn=function(A){return this.clone().ishrn(A)},i.prototype.ushrn=function(A){return this.clone().iushrn(A)},i.prototype.testn=function(A){r("number"==typeof A&&A>=0);var e=A%26,t=(A-e)/26,n=1<=0);var e=A%26,t=(A-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==e&&t++,this.length=Math.min(t,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},i.prototype.isubn=function(A){if(r("number"==typeof A),r(A<67108864),A<0)return this.iaddn(-A);if(0!==this.negative)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(s/67108864|0),this.words[n+t]=67108863&i}for(;n>26,this.words[n+t]=67108863&i;if(0===a)return this._strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this._strip()},i.prototype._wordDiv=function(A,e){var t=(this.length,A.length),r=this.clone(),n=A,o=0|n.words[n.length-1];0!=(t=26-this._countBits(o))&&(n=n.ushln(t),r.iushln(t),o=0|n.words[n.length-1]);var a,s=r.length-n.length;if("mod"!==e){(a=new i(null)).length=s+1,a.words=new Array(a.length);for(var u=0;u=0;c--){var B=67108864*(0|r.words[n.length+c])+(0|r.words[n.length+c-1]);for(B=Math.min(B/o|0,67108863),r._ishlnsubmul(n,B,c);0!==r.negative;)B--,r.negative=0,r._ishlnsubmul(n,1,c),r.isZero()||(r.negative^=1);a&&(a.words[c]=B)}return a&&a._strip(),r._strip(),"div"!==e&&0!==t&&r.iushrn(t),{div:a||null,mod:r}},i.prototype.divmod=function(A,e,t){return r(!A.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===A.negative?(a=this.neg().divmod(A,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(o=a.mod.neg(),t&&0!==o.negative&&o.iadd(A)),{div:n,mod:o}):0===this.negative&&0!==A.negative?(a=this.divmod(A.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!=(this.negative&A.negative)?(a=this.neg().divmod(A.neg(),e),"div"!==e&&(o=a.mod.neg(),t&&0!==o.negative&&o.isub(A)),{div:a.div,mod:o}):A.length>this.length||this.cmp(A)<0?{div:new i(0),mod:this}:1===A.length?"div"===e?{div:this.divn(A.words[0]),mod:null}:"mod"===e?{div:null,mod:new i(this.modrn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new i(this.modrn(A.words[0]))}:this._wordDiv(A,e);var n,o,a},i.prototype.div=function(A){return this.divmod(A,"div",!1).div},i.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},i.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},i.prototype.divRound=function(A){var e=this.divmod(A);if(e.mod.isZero())return e.div;var t=0!==e.div.negative?e.mod.isub(A):e.mod,r=A.ushrn(1),n=A.andln(1),i=t.cmp(r);return i<0||1===n&&0===i?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},i.prototype.modrn=function(A){var e=A<0;e&&(A=-A),r(A<=67108863);for(var t=(1<<26)%A,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%A;return e?-n:n},i.prototype.modn=function(A){return this.modrn(A)},i.prototype.idivn=function(A){var e=A<0;e&&(A=-A),r(A<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/A|0,t=i%A}return this._strip(),e?this.ineg():this},i.prototype.divn=function(A){return this.clone().idivn(A)},i.prototype.egcd=function(A){r(0===A.negative),r(!A.isZero());var e=this,t=A.clone();e=0!==e.negative?e.umod(A):e.clone();for(var n=new i(1),o=new i(0),a=new i(0),s=new i(1),u=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++u;for(var g=t.clone(),c=e.clone();!e.isZero();){for(var B=0,l=1;0==(e.words[0]&l)&&B<26;++B,l<<=1);if(B>0)for(e.iushrn(B);B-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(g),o.isub(c)),n.iushrn(1),o.iushrn(1);for(var Q=0,I=1;0==(t.words[0]&I)&&Q<26;++Q,I<<=1);if(Q>0)for(t.iushrn(Q);Q-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(g),s.isub(c)),a.iushrn(1),s.iushrn(1);e.cmp(t)>=0?(e.isub(t),n.isub(a),o.isub(s)):(t.isub(e),a.isub(n),s.isub(o))}return{a,b:s,gcd:t.iushln(u)}},i.prototype._invmp=function(A){r(0===A.negative),r(!A.isZero());var e=this,t=A.clone();e=0!==e.negative?e.umod(A):e.clone();for(var n,o=new i(1),a=new i(0),s=t.clone();e.cmpn(1)>0&&t.cmpn(1)>0;){for(var u=0,g=1;0==(e.words[0]&g)&&u<26;++u,g<<=1);if(u>0)for(e.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var c=0,B=1;0==(t.words[0]&B)&&c<26;++c,B<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);e.cmp(t)>=0?(e.isub(t),o.isub(a)):(t.isub(e),a.isub(o))}return(n=0===e.cmpn(1)?o:a).cmpn(0)<0&&n.iadd(A),n},i.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var e=this.clone(),t=A.clone();e.negative=0,t.negative=0;for(var r=0;e.isEven()&&t.isEven();r++)e.iushrn(1),t.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;t.isEven();)t.iushrn(1);var n=e.cmp(t);if(n<0){var i=e;e=t,t=i}else if(0===n||0===t.cmpn(1))break;e.isub(t)}return t.iushln(r)},i.prototype.invm=function(A){return this.egcd(A).a.umod(A)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(A){return this.words[0]&A},i.prototype.bincn=function(A){r("number"==typeof A);var e=A%26,t=(A-e)/26,n=1<>>26,a&=67108863,this.words[o]=a}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(A){var e,t=A<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this._strip(),this.length>1)e=1;else{t&&(A=-A),r(A<=67108863,"Number is too big");var n=0|this.words[0];e=n===A?0:nA.length)return 1;if(this.length=0;t--){var r=0|this.words[t],n=0|A.words[t];if(r!==n){rn&&(e=1);break}}return e},i.prototype.gtn=function(A){return 1===this.cmpn(A)},i.prototype.gt=function(A){return 1===this.cmp(A)},i.prototype.gten=function(A){return this.cmpn(A)>=0},i.prototype.gte=function(A){return this.cmp(A)>=0},i.prototype.ltn=function(A){return-1===this.cmpn(A)},i.prototype.lt=function(A){return-1===this.cmp(A)},i.prototype.lten=function(A){return this.cmpn(A)<=0},i.prototype.lte=function(A){return this.cmp(A)<=0},i.prototype.eqn=function(A){return 0===this.cmpn(A)},i.prototype.eq=function(A){return 0===this.cmp(A)},i.red=function(A){return new b(A)},i.prototype.toRed=function(A){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),A.convertTo(this)._forceRed(A)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(A){return this.red=A,this},i.prototype.forceRed=function(A){return r(!this.red,"Already a number in reduction context"),this._forceRed(A)},i.prototype.redAdd=function(A){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},i.prototype.redIAdd=function(A){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},i.prototype.redSub=function(A){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},i.prototype.redISub=function(A){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},i.prototype.redShl=function(A){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},i.prototype.redMul=function(A){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},i.prototype.redIMul=function(A){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(A){return r(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var C={k256:null,p224:null,p192:null,p25519:null};function p(A,e){this.name=A,this.p=new i(e,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function m(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function v(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function D(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function b(A){if("string"==typeof A){var e=i._prime(A);this.m=e.p,this.prime=e}else r(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}function w(A){b.call(this,A),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}p.prototype._tmp=function(){var A=new i(null);return A.words=new Array(Math.ceil(this.n/13)),A},p.prototype.ireduce=function(A){var e,t=A;do{this.split(t,this.tmp),e=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},p.prototype.split=function(A,e){A.iushrn(this.n,0,e)},p.prototype.imulK=function(A){return A.imul(this.k)},n(m,p),m.prototype.split=function(A,e){for(var t=4194303,r=Math.min(A.length,9),n=0;n>>22,i=o}i>>>=22,A.words[n-10]=i,0===i&&A.length>10?A.length-=10:A.length-=9},m.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var e=0,t=0;t>>=26,A.words[t]=n,e=r}return 0!==e&&(A.words[A.length++]=e),A},i._prime=function(A){if(C[A])return C[A];var e;if("k256"===A)e=new m;else if("p224"===A)e=new y;else if("p192"===A)e=new v;else{if("p25519"!==A)throw new Error("Unknown prime "+A);e=new D}return C[A]=e,e},b.prototype._verify1=function(A){r(0===A.negative,"red works only with positives"),r(A.red,"red works only with red numbers")},b.prototype._verify2=function(A,e){r(0==(A.negative|e.negative),"red works only with positives"),r(A.red&&A.red===e.red,"red works only with red numbers")},b.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):(g(A,A.umod(this.m)._forceRed(this)),A)},b.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},b.prototype.add=function(A,e){this._verify2(A,e);var t=A.add(e);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},b.prototype.iadd=function(A,e){this._verify2(A,e);var t=A.iadd(e);return t.cmp(this.m)>=0&&t.isub(this.m),t},b.prototype.sub=function(A,e){this._verify2(A,e);var t=A.sub(e);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},b.prototype.isub=function(A,e){this._verify2(A,e);var t=A.isub(e);return t.cmpn(0)<0&&t.iadd(this.m),t},b.prototype.shl=function(A,e){return this._verify1(A),this.imod(A.ushln(e))},b.prototype.imul=function(A,e){return this._verify2(A,e),this.imod(A.imul(e))},b.prototype.mul=function(A,e){return this._verify2(A,e),this.imod(A.mul(e))},b.prototype.isqr=function(A){return this.imul(A,A.clone())},b.prototype.sqr=function(A){return this.mul(A,A)},b.prototype.sqrt=function(A){if(A.isZero())return A.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var t=this.m.add(new i(1)).iushrn(2);return this.pow(A,t)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);r(!n.isZero());var a=new i(1).toRed(this),s=a.redNeg(),u=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new i(2*g*g).toRed(this);0!==this.pow(g,u).cmp(s);)g.redIAdd(s);for(var c=this.pow(g,n),B=this.pow(A,n.addn(1).iushrn(1)),l=this.pow(A,n),Q=o;0!==l.cmp(a);){for(var I=l,d=0;0!==I.cmp(a);d++)I=I.redSqr();r(d=0;r--){for(var u=e.words[r],g=s-1;g>=0;g--){var c=u>>g&1;n!==t[0]&&(n=this.sqr(n)),0!==c||0!==o?(o<<=1,o|=c,(4==++a||0===r&&0===g)&&(n=this.mul(n,t[o]),a=0,o=0)):a=0}s=26}return n},b.prototype.convertTo=function(A){var e=A.umod(this.m);return e===A?e.clone():e},b.prototype.convertFrom=function(A){var e=A.clone();return e.red=null,e},i.mont=function(A){return new w(A)},n(w,b),w.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},w.prototype.convertFrom=function(A){var e=this.imod(A.mul(this.rinv));return e.red=null,e},w.prototype.imul=function(A,e){if(A.isZero()||e.isZero())return A.words[0]=0,A.length=1,A;var t=A.imul(e),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),i=n;return n.cmp(this.m)>=0?i=n.isub(this.m):n.cmpn(0)<0&&(i=n.iadd(this.m)),i._forceRed(this)},w.prototype.mul=function(A,e){if(A.isZero()||e.isZero())return new i(0)._forceRed(this);var t=A.mul(e),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},w.prototype.invm=function(A){return this.imod(A._invmp(this.m).mul(this.r2))._forceRed(this)}}(A=t.nmd(A),this)},9931:(A,e,t)=>{var r;function n(A){this.rand=A}if(A.exports=function(A){return r||(r=new n(null)),r.generate(A)},A.exports.Rand=n,n.prototype.generate=function(A){return this._rand(A)},n.prototype._rand=function(A){if(this.rand.getBytes)return this.rand.getBytes(A);for(var e=new Uint8Array(A),t=0;t{var r=t(9509).Buffer;function n(A){r.isBuffer(A)||(A=r.from(A));for(var e=A.length/4|0,t=new Array(e),n=0;n>>24]^g[Q>>>16&255]^c[I>>>8&255]^B[255&d]^e[h++],o=u[Q>>>24]^g[I>>>16&255]^c[d>>>8&255]^B[255&l]^e[h++],a=u[I>>>24]^g[d>>>16&255]^c[l>>>8&255]^B[255&Q]^e[h++],s=u[d>>>24]^g[l>>>16&255]^c[Q>>>8&255]^B[255&I]^e[h++],l=i,Q=o,I=a,d=s;return i=(r[l>>>24]<<24|r[Q>>>16&255]<<16|r[I>>>8&255]<<8|r[255&d])^e[h++],o=(r[Q>>>24]<<24|r[I>>>16&255]<<16|r[d>>>8&255]<<8|r[255&l])^e[h++],a=(r[I>>>24]<<24|r[d>>>16&255]<<16|r[l>>>8&255]<<8|r[255&Q])^e[h++],s=(r[d>>>24]<<24|r[l>>>16&255]<<16|r[Q>>>8&255]<<8|r[255&I])^e[h++],[i>>>=0,o>>>=0,a>>>=0,s>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],s=function(){for(var A=new Array(256),e=0;e<256;e++)A[e]=e<128?e<<1:e<<1^283;for(var t=[],r=[],n=[[],[],[],[]],i=[[],[],[],[]],o=0,a=0,s=0;s<256;++s){var u=a^a<<1^a<<2^a<<3^a<<4;u=u>>>8^255&u^99,t[o]=u,r[u]=o;var g=A[o],c=A[g],B=A[c],l=257*A[u]^16843008*u;n[0][o]=l<<24|l>>>8,n[1][o]=l<<16|l>>>16,n[2][o]=l<<8|l>>>24,n[3][o]=l,l=16843009*B^65537*c^257*g^16843008*o,i[0][u]=l<<24|l>>>8,i[1][u]=l<<16|l>>>16,i[2][u]=l<<8|l>>>24,i[3][u]=l,0===o?o=a=1:(o=g^A[A[A[B^g]]],a^=A[A[a]])}return{SBOX:t,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:i}}();function u(A){this._key=n(A),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var A=this._key,e=A.length,t=e+6,r=4*(t+1),n=[],i=0;i>>24,o=s.SBOX[o>>>24]<<24|s.SBOX[o>>>16&255]<<16|s.SBOX[o>>>8&255]<<8|s.SBOX[255&o],o^=a[i/e|0]<<24):e>6&&i%e==4&&(o=s.SBOX[o>>>24]<<24|s.SBOX[o>>>16&255]<<16|s.SBOX[o>>>8&255]<<8|s.SBOX[255&o]),n[i]=n[i-e]^o}for(var u=[],g=0;g>>24]]^s.INV_SUB_MIX[1][s.SBOX[B>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[B>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[255&B]]}this._nRounds=t,this._keySchedule=n,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(A){return o(A=n(A),this._keySchedule,s.SUB_MIX,s.SBOX,this._nRounds)},u.prototype.encryptBlock=function(A){var e=this.encryptBlockRaw(A),t=r.allocUnsafe(16);return t.writeUInt32BE(e[0],0),t.writeUInt32BE(e[1],4),t.writeUInt32BE(e[2],8),t.writeUInt32BE(e[3],12),t},u.prototype.decryptBlock=function(A){var e=(A=n(A))[1];A[1]=A[3],A[3]=e;var t=o(A,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX,this._nRounds),i=r.allocUnsafe(16);return i.writeUInt32BE(t[0],0),i.writeUInt32BE(t[3],4),i.writeUInt32BE(t[2],8),i.writeUInt32BE(t[1],12),i},u.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},A.exports.AES=u},2422:(A,e,t)=>{var r=t(4497),n=t(9509).Buffer,i=t(1027),o=t(5717),a=t(3288),s=t(7295),u=t(685);function g(A,e,t,o){i.call(this);var s=n.alloc(4,0);this._cipher=new r.AES(e);var g=this._cipher.encryptBlock(s);this._ghash=new a(g),t=function(A,e,t){if(12===e.length)return A._finID=n.concat([e,n.from([0,0,0,1])]),n.concat([e,n.from([0,0,0,2])]);var r=new a(t),i=e.length,o=i%16;r.update(e),o&&(o=16-o,r.update(n.alloc(o,0))),r.update(n.alloc(8,0));var s=8*i,g=n.alloc(8);g.writeUIntBE(s,0,8),r.update(g),A._finID=r.state;var c=n.from(A._finID);return u(c),c}(this,t,g),this._prev=n.from(t),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=o,this._alen=0,this._len=0,this._mode=A,this._authTag=null,this._called=!1}o(g,i),g.prototype._update=function(A){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=n.alloc(e,0),this._ghash.update(e))}this._called=!0;var t=this._mode.encrypt(this,A);return this._decrypt?this._ghash.update(A):this._ghash.update(t),this._len+=A.length,t},g.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var A=s(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(A,e){var t=0;A.length!==e.length&&t++;for(var r=Math.min(A.length,e.length),n=0;n{var r=t(1494),n=t(6193),i=t(4946);e.createCipher=e.Cipher=r.createCipher,e.createCipheriv=e.Cipheriv=r.createCipheriv,e.createDecipher=e.Decipher=n.createDecipher,e.createDecipheriv=e.Decipheriv=n.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(i)}},6193:(A,e,t)=>{var r=t(2422),n=t(9509).Buffer,i=t(45),o=t(5969),a=t(1027),s=t(4497),u=t(3048);function g(A,e,t){a.call(this),this._cache=new c,this._last=void 0,this._cipher=new s.AES(e),this._prev=n.from(t),this._mode=A,this._autopadding=!0}function c(){this.cache=n.allocUnsafe(0)}function B(A,e,t){var a=i[A.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=n.from(t)),"GCM"!==a.mode&&t.length!==a.iv)throw new TypeError("invalid iv length "+t.length);if("string"==typeof e&&(e=n.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===a.type?new o(a.module,e,t,!0):"auth"===a.type?new r(a.module,e,t,!0):new g(a.module,e,t)}t(5717)(g,a),g.prototype._update=function(A){var e,t;this._cache.add(A);for(var r=[];e=this._cache.get(this._autopadding);)t=this._mode.decrypt(this,e),r.push(t);return n.concat(r)},g.prototype._final=function(){var A=this._cache.flush();if(this._autopadding)return function(A){var e=A[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var t=-1;++t16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},c.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(A,e){var t=i[A.toLowerCase()];if(!t)throw new TypeError("invalid suite type");var r=u(e,!1,t.key,t.iv);return B(A,r.key,r.iv)},e.createDecipheriv=B},1494:(A,e,t)=>{var r=t(45),n=t(2422),i=t(9509).Buffer,o=t(5969),a=t(1027),s=t(4497),u=t(3048);function g(A,e,t){a.call(this),this._cache=new B,this._cipher=new s.AES(e),this._prev=i.from(t),this._mode=A,this._autopadding=!0}t(5717)(g,a),g.prototype._update=function(A){var e,t;this._cache.add(A);for(var r=[];e=this._cache.get();)t=this._mode.encrypt(this,e),r.push(t);return i.concat(r)};var c=i.alloc(16,16);function B(){this.cache=i.allocUnsafe(0)}function l(A,e,t){var a=r[A.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=i.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof t&&(t=i.from(t)),"GCM"!==a.mode&&t.length!==a.iv)throw new TypeError("invalid iv length "+t.length);return"stream"===a.type?new o(a.module,e,t):"auth"===a.type?new n(a.module,e,t):new g(a.module,e,t)}g.prototype._final=function(){var A=this._cache.flush();if(this._autopadding)return A=this._mode.encrypt(this,A),this._cipher.scrub(),A;if(!A.equals(c))throw this._cipher.scrub(),new Error("data not multiple of block length")},g.prototype.setAutoPadding=function(A){return this._autopadding=!!A,this},B.prototype.add=function(A){this.cache=i.concat([this.cache,A])},B.prototype.get=function(){if(this.cache.length>15){var A=this.cache.slice(0,16);return this.cache=this.cache.slice(16),A}return null},B.prototype.flush=function(){for(var A=16-this.cache.length,e=i.allocUnsafe(A),t=-1;++t{var r=t(9509).Buffer,n=r.alloc(16,0);function i(A){var e=r.allocUnsafe(16);return e.writeUInt32BE(A[0]>>>0,0),e.writeUInt32BE(A[1]>>>0,4),e.writeUInt32BE(A[2]>>>0,8),e.writeUInt32BE(A[3]>>>0,12),e}function o(A){this.h=A,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}o.prototype.ghash=function(A){for(var e=-1;++e0;e--)r[e]=r[e]>>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,t&&(r[0]=r[0]^225<<24)}this.state=i(n)},o.prototype.update=function(A){var e;for(this.cache=r.concat([this.cache,A]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},o.prototype.final=function(A,e){return this.cache.length&&this.ghash(r.concat([this.cache,n],16)),this.ghash(i([0,A,0,e])),this.state},A.exports=o},685:A=>{A.exports=function(A){for(var e,t=A.length;t--;){if(255!==(e=A.readUInt8(t))){e++,A.writeUInt8(e,t);break}A.writeUInt8(0,t)}}},5292:(A,e,t)=>{var r=t(7295);e.encrypt=function(A,e){var t=r(e,A._prev);return A._prev=A._cipher.encryptBlock(t),A._prev},e.decrypt=function(A,e){var t=A._prev;A._prev=e;var n=A._cipher.decryptBlock(e);return r(n,t)}},6311:(A,e,t)=>{var r=t(9509).Buffer,n=t(7295);function i(A,e,t){var i=e.length,o=n(e,A._cache);return A._cache=A._cache.slice(i),A._prev=r.concat([A._prev,t?e:o]),o}e.encrypt=function(A,e,t){for(var n,o=r.allocUnsafe(0);e.length;){if(0===A._cache.length&&(A._cache=A._cipher.encryptBlock(A._prev),A._prev=r.allocUnsafe(0)),!(A._cache.length<=e.length)){o=r.concat([o,i(A,e,t)]);break}n=A._cache.length,o=r.concat([o,i(A,e.slice(0,n),t)]),e=e.slice(n)}return o}},1510:(A,e,t)=>{var r=t(9509).Buffer;function n(A,e,t){for(var r,n,o=-1,a=0;++o<8;)r=e&1<<7-o?128:0,a+=(128&(n=A._cipher.encryptBlock(A._prev)[0]^r))>>o%8,A._prev=i(A._prev,t?r:n);return a}function i(A,e){var t=A.length,n=-1,i=r.allocUnsafe(A.length);for(A=r.concat([A,r.from([e])]);++n>7;return i}e.encrypt=function(A,e,t){for(var i=e.length,o=r.allocUnsafe(i),a=-1;++a{var r=t(9509).Buffer;function n(A,e,t){var n=A._cipher.encryptBlock(A._prev)[0]^e;return A._prev=r.concat([A._prev.slice(1),r.from([t?e:n])]),n}e.encrypt=function(A,e,t){for(var i=e.length,o=r.allocUnsafe(i),a=-1;++a{var r=t(7295),n=t(9509).Buffer,i=t(685);function o(A){var e=A._cipher.encryptBlockRaw(A._prev);return i(A._prev),e}e.encrypt=function(A,e){var t=Math.ceil(e.length/16),i=A._cache.length;A._cache=n.concat([A._cache,n.allocUnsafe(16*t)]);for(var a=0;a{e.encrypt=function(A,e){return A._cipher.encryptBlock(e)},e.decrypt=function(A,e){return A._cipher.decryptBlock(e)}},45:(A,e,t)=>{var r={ECB:t(1084),CBC:t(5292),CFB:t(6311),CFB8:t(1964),CFB1:t(1510),OFB:t(8861),CTR:t(6009),GCM:t(6009)},n=t(4946);for(var i in n)n[i].module=r[n[i].mode];A.exports=n},8861:(A,e,t)=>{var r=t(7295);function n(A){return A._prev=A._cipher.encryptBlock(A._prev),A._prev}e.encrypt=function(A,e){for(;A._cache.length{var r=t(4497),n=t(9509).Buffer,i=t(1027);function o(A,e,t,o){i.call(this),this._cipher=new r.AES(e),this._prev=n.from(t),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=o,this._mode=A}t(5717)(o,i),o.prototype._update=function(A){return this._mode.encrypt(this,A,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},A.exports=o},3614:(A,e,t)=>{var r=t(7667),n=t(4696),i=t(45),o=t(9715),a=t(3048);function s(A,e,t){if(A=A.toLowerCase(),i[A])return n.createCipheriv(A,e,t);if(o[A])return new r({key:e,iv:t,mode:A});throw new TypeError("invalid suite type")}function u(A,e,t){if(A=A.toLowerCase(),i[A])return n.createDecipheriv(A,e,t);if(o[A])return new r({key:e,iv:t,mode:A,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(A,e){var t,r;if(A=A.toLowerCase(),i[A])t=i[A].key,r=i[A].iv;else{if(!o[A])throw new TypeError("invalid suite type");t=8*o[A].key,r=o[A].iv}var n=a(e,!1,t,r);return s(A,n.key,n.iv)},e.createCipheriv=e.Cipheriv=s,e.createDecipher=e.Decipher=function(A,e){var t,r;if(A=A.toLowerCase(),i[A])t=i[A].key,r=i[A].iv;else{if(!o[A])throw new TypeError("invalid suite type");t=8*o[A].key,r=o[A].iv}var n=a(e,!1,t,r);return u(A,n.key,n.iv)},e.createDecipheriv=e.Decipheriv=u,e.listCiphers=e.getCiphers=function(){return Object.keys(o).concat(n.getCiphers())}},7667:(A,e,t)=>{var r=t(1027),n=t(9540),i=t(5717),o=t(9509).Buffer,a={"des-ede3-cbc":n.CBC.instantiate(n.EDE),"des-ede3":n.EDE,"des-ede-cbc":n.CBC.instantiate(n.EDE),"des-ede":n.EDE,"des-cbc":n.CBC.instantiate(n.DES),"des-ecb":n.DES};function s(A){r.call(this);var e,t=A.mode.toLowerCase(),n=a[t];e=A.decrypt?"decrypt":"encrypt";var i=A.key;o.isBuffer(i)||(i=o.from(i)),"des-ede"!==t&&"des-ede-cbc"!==t||(i=o.concat([i,i.slice(0,8)]));var s=A.iv;o.isBuffer(s)||(s=o.from(s)),this._des=n.create({key:i,iv:s,type:e})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],A.exports=s,i(s,r),s.prototype._update=function(A){return o.from(this._des.update(A))},s.prototype._final=function(){return o.from(this._des.final())}},9715:(A,e)=>{e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},3663:(A,e,t)=>{var r=t(3550),n=t(1798);function i(A){var e,t=A.modulus.byteLength();do{e=new r(n(t))}while(e.cmp(A.modulus)>=0||!e.umod(A.prime1)||!e.umod(A.prime2));return e}function o(A,e){var t=function(A){var e=i(A);return{blinder:e.toRed(r.mont(A.modulus)).redPow(new r(A.publicExponent)).fromRed(),unblinder:e.invm(A.modulus)}}(e),n=e.modulus.byteLength(),o=new r(A).mul(t.blinder).umod(e.modulus),a=o.toRed(r.mont(e.prime1)),s=o.toRed(r.mont(e.prime2)),u=e.coefficient,g=e.prime1,c=e.prime2,B=a.redPow(e.exponent1).fromRed(),l=s.redPow(e.exponent2).fromRed(),Q=B.isub(l).imul(u).umod(g).imul(c);return l.iadd(Q).imul(t.unblinder).umod(e.modulus).toArrayLike(Buffer,"be",n)}o.getr=i,A.exports=o},6042:(A,e,t)=>{A.exports=t(5207)},4743:(A,e,t)=>{var r=t(5679).Buffer,n=t(3482),i=t(8473),o=t(5717),a=t(2957),s=t(7753),u=t(5207);function g(A){i.Writable.call(this);var e=u[A];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function c(A){i.Writable.call(this);var e=u[A];if(!e)throw new Error("Unknown message digest");this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function B(A){return new g(A)}function l(A){return new c(A)}Object.keys(u).forEach((function(A){u[A].id=r.from(u[A].id,"hex"),u[A.toLowerCase()]=u[A]})),o(g,i.Writable),g.prototype._write=function(A,e,t){this._hash.update(A),t()},g.prototype.update=function(A,e){return"string"==typeof A&&(A=r.from(A,e)),this._hash.update(A),this},g.prototype.sign=function(A,e){this.end();var t=this._hash.digest(),r=a(t,A,this._hashType,this._signType,this._tag);return e?r.toString(e):r},o(c,i.Writable),c.prototype._write=function(A,e,t){this._hash.update(A),t()},c.prototype.update=function(A,e){return"string"==typeof A&&(A=r.from(A,e)),this._hash.update(A),this},c.prototype.verify=function(A,e,t){"string"==typeof e&&(e=r.from(e,t)),this.end();var n=this._hash.digest();return s(e,n,A,this._signType,this._tag)},A.exports={Sign:B,Verify:l,createSign:B,createVerify:l}},2957:(A,e,t)=>{var r=t(5679).Buffer,n=t(8355),i=t(3663),o=t(6266).ec,a=t(3550),s=t(980),u=t(1308);function g(A,e,t,i){if((A=r.from(A.toArray())).length0&&t.ishrn(r),t}function B(A,e,t){var i,o;do{for(i=r.alloc(0);8*i.length{var r=t(5679).Buffer,n=t(3550),i=t(6266).ec,o=t(980),a=t(1308);function s(A,e){if(A.cmpn(0)<=0)throw new Error("invalid sig");if(A.cmp(e)>=e)throw new Error("invalid sig")}A.exports=function(A,e,t,u,g){var c=o(t);if("ec"===c.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(A,e,t){var r=a[t.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+t.data.algorithm.curve.join("."));var n=new i(r),o=t.data.subjectPrivateKey.data;return n.verify(e,A,o)}(A,e,c)}if("dsa"===c.type){if("dsa"!==u)throw new Error("wrong public key type");return function(A,e,t){var r=t.data.p,i=t.data.q,a=t.data.g,u=t.data.pub_key,g=o.signature.decode(A,"der"),c=g.s,B=g.r;s(c,i),s(B,i);var l=n.mont(r),Q=c.invm(i);return 0===a.toRed(l).redPow(new n(e).mul(Q).mod(i)).fromRed().mul(u.toRed(l).redPow(B.mul(Q).mod(i)).fromRed()).mod(r).mod(i).cmp(B)}(A,e,c)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");e=r.concat([g,e]);for(var B=c.modulus.byteLength(),l=[1],Q=0;e.length+l.length+2{var r=t(8764),n=r.Buffer;function i(A,e){for(var t in A)e[t]=A[t]}function o(A,e,t){return n(A,e,t)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?A.exports=r:(i(r,e),e.Buffer=o),o.prototype=Object.create(n.prototype),i(n,o),o.from=function(A,e,t){if("number"==typeof A)throw new TypeError("Argument must not be a number");return n(A,e,t)},o.alloc=function(A,e,t){if("number"!=typeof A)throw new TypeError("Argument must be a number");var r=n(A);return void 0!==e?"string"==typeof t?r.fill(e,t):r.fill(e):r.fill(0),r},o.allocUnsafe=function(A){if("number"!=typeof A)throw new TypeError("Argument must be a number");return n(A)},o.allocUnsafeSlow=function(A){if("number"!=typeof A)throw new TypeError("Argument must be a number");return r.SlowBuffer(A)}},7295:A=>{A.exports=function(A,e){for(var t=Math.min(A.length,e.length),r=new Buffer(t),n=0;n{"use strict";var r=t(9742),n=t(645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=function(A){return+A!=A&&(A=0),s.alloc(+A)},e.INSPECT_MAX_BYTES=50;var o=2147483647;function a(A){if(A>o)throw new RangeError('The value "'+A+'" is invalid for option "size"');var e=new Uint8Array(A);return Object.setPrototypeOf(e,s.prototype),e}function s(A,e,t){if("number"==typeof A){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(A)}return u(A,e,t)}function u(A,e,t){if("string"==typeof A)return function(A,e){if("string"==typeof e&&""!==e||(e="utf8"),!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var t=0|I(A,e),r=a(t),n=r.write(A,e);return n!==t&&(r=r.slice(0,n)),r}(A,e);if(ArrayBuffer.isView(A))return function(A){if(V(A,Uint8Array)){var e=new Uint8Array(A);return l(e.buffer,e.byteOffset,e.byteLength)}return B(A)}(A);if(null==A)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A);if(V(A,ArrayBuffer)||A&&V(A.buffer,ArrayBuffer))return l(A,e,t);if("undefined"!=typeof SharedArrayBuffer&&(V(A,SharedArrayBuffer)||A&&V(A.buffer,SharedArrayBuffer)))return l(A,e,t);if("number"==typeof A)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=A.valueOf&&A.valueOf();if(null!=r&&r!==A)return s.from(r,e,t);var n=function(A){if(s.isBuffer(A)){var e=0|Q(A.length),t=a(e);return 0===t.length||A.copy(t,0,0,e),t}return void 0!==A.length?"number"!=typeof A.length||T(A.length)?a(0):B(A):"Buffer"===A.type&&Array.isArray(A.data)?B(A.data):void 0}(A);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof A[Symbol.toPrimitive])return s.from(A[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A)}function g(A){if("number"!=typeof A)throw new TypeError('"size" argument must be of type number');if(A<0)throw new RangeError('The value "'+A+'" is invalid for option "size"')}function c(A){return g(A),a(A<0?0:0|Q(A))}function B(A){for(var e=A.length<0?0:0|Q(A.length),t=a(e),r=0;r=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|A}function I(A,e){if(s.isBuffer(A))return A.length;if(ArrayBuffer.isView(A)||V(A,ArrayBuffer))return A.byteLength;if("string"!=typeof A)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof A);var t=A.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===t)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return k(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return Y(A).length;default:if(n)return r?-1:k(A).length;e=(""+e).toLowerCase(),n=!0}}function d(A,e,t){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(e>>>=0))return"";for(A||(A="utf8");;)switch(A){case"hex":return S(this,e,t);case"utf8":case"utf-8":return b(this,e,t);case"ascii":return F(this,e,t);case"latin1":case"binary":return U(this,e,t);case"base64":return D(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,t);default:if(r)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),r=!0}}function h(A,e,t){var r=A[e];A[e]=A[t],A[t]=r}function E(A,e,t,r,n){if(0===A.length)return-1;if("string"==typeof t?(r=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),T(t=+t)&&(t=n?0:A.length-1),t<0&&(t=A.length+t),t>=A.length){if(n)return-1;t=A.length-1}else if(t<0){if(!n)return-1;t=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:f(A,e,t,r,n);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(A,e,t):Uint8Array.prototype.lastIndexOf.call(A,e,t):f(A,[e],t,r,n);throw new TypeError("val must be string, number or Buffer")}function f(A,e,t,r,n){var i,o=1,a=A.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(A.length<2||e.length<2)return-1;o=2,a/=2,s/=2,t/=2}function u(A,e){return 1===o?A[e]:A.readUInt16BE(e*o)}if(n){var g=-1;for(i=t;ia&&(t=a-s),i=t;i>=0;i--){for(var c=!0,B=0;Bn&&(r=n):r=n;var i=e.length;r>i/2&&(r=i/2);for(var o=0;o>8,n=t%256,i.push(n),i.push(r);return i}(e,A.length-t),A,t,r)}function D(A,e,t){return 0===e&&t===A.length?r.fromByteArray(A):r.fromByteArray(A.slice(e,t))}function b(A,e,t){t=Math.min(A.length,t);for(var r=[],n=e;n239?4:u>223?3:u>191?2:1;if(n+c<=t)switch(c){case 1:u<128&&(g=u);break;case 2:128==(192&(i=A[n+1]))&&(s=(31&u)<<6|63&i)>127&&(g=s);break;case 3:i=A[n+1],o=A[n+2],128==(192&i)&&128==(192&o)&&(s=(15&u)<<12|(63&i)<<6|63&o)>2047&&(s<55296||s>57343)&&(g=s);break;case 4:i=A[n+1],o=A[n+2],a=A[n+3],128==(192&i)&&128==(192&o)&&128==(192&a)&&(s=(15&u)<<18|(63&i)<<12|(63&o)<<6|63&a)>65535&&s<1114112&&(g=s)}null===g?(g=65533,c=1):g>65535&&(g-=65536,r.push(g>>>10&1023|55296),g=56320|1023&g),r.push(g),n+=c}return function(A){var e=A.length;if(e<=w)return String.fromCharCode.apply(String,A);for(var t="",r=0;rr.length?s.from(i).copy(r,n):Uint8Array.prototype.set.call(r,i,n);else{if(!s.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,n)}n+=i.length}return r},s.byteLength=I,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var A=this.length;if(A%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;et&&(A+=" ... "),""},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(A,e,t,r,n){if(V(A,Uint8Array)&&(A=s.from(A,A.offset,A.byteLength)),!s.isBuffer(A))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof A);if(void 0===e&&(e=0),void 0===t&&(t=A?A.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),e<0||t>A.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&e>=t)return 0;if(r>=n)return-1;if(e>=t)return 1;if(this===A)return 0;for(var i=(n>>>=0)-(r>>>=0),o=(t>>>=0)-(e>>>=0),a=Math.min(i,o),u=this.slice(r,n),g=A.slice(e,t),c=0;c>>=0,isFinite(t)?(t>>>=0,void 0===r&&(r="utf8")):(r=t,t=void 0)}var n=this.length-e;if((void 0===t||t>n)&&(t=n),A.length>0&&(t<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return C(this,A,e,t);case"utf8":case"utf-8":return p(this,A,e,t);case"ascii":case"latin1":case"binary":return m(this,A,e,t);case"base64":return y(this,A,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,A,e,t);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var w=4096;function F(A,e,t){var r="";t=Math.min(A.length,t);for(var n=e;nr)&&(t=r);for(var n="",i=e;it)throw new RangeError("Trying to access beyond buffer length")}function H(A,e,t,r,n,i){if(!s.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||eA.length)throw new RangeError("Index out of range")}function G(A,e,t,r,n,i){if(t+r>A.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function M(A,e,t,r,i){return e=+e,t>>>=0,i||G(A,0,t,4),n.write(A,e,t,r,23,4),t+4}function L(A,e,t,r,i){return e=+e,t>>>=0,i||G(A,0,t,8),n.write(A,e,t,r,52,8),t+8}s.prototype.slice=function(A,e){var t=this.length;(A=~~A)<0?(A+=t)<0&&(A=0):A>t&&(A=t),(e=void 0===e?t:~~e)<0?(e+=t)<0&&(e=0):e>t&&(e=t),e>>=0,e>>>=0,t||R(A,e,this.length);for(var r=this[A],n=1,i=0;++i>>=0,e>>>=0,t||R(A,e,this.length);for(var r=this[A+--e],n=1;e>0&&(n*=256);)r+=this[A+--e]*n;return r},s.prototype.readUint8=s.prototype.readUInt8=function(A,e){return A>>>=0,e||R(A,1,this.length),this[A]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(A,e){return A>>>=0,e||R(A,2,this.length),this[A]|this[A+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(A,e){return A>>>=0,e||R(A,2,this.length),this[A]<<8|this[A+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(A,e){return A>>>=0,e||R(A,4,this.length),(this[A]|this[A+1]<<8|this[A+2]<<16)+16777216*this[A+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(A,e){return A>>>=0,e||R(A,4,this.length),16777216*this[A]+(this[A+1]<<16|this[A+2]<<8|this[A+3])},s.prototype.readIntLE=function(A,e,t){A>>>=0,e>>>=0,t||R(A,e,this.length);for(var r=this[A],n=1,i=0;++i=(n*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(A,e,t){A>>>=0,e>>>=0,t||R(A,e,this.length);for(var r=e,n=1,i=this[A+--r];r>0&&(n*=256);)i+=this[A+--r]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*e)),i},s.prototype.readInt8=function(A,e){return A>>>=0,e||R(A,1,this.length),128&this[A]?-1*(255-this[A]+1):this[A]},s.prototype.readInt16LE=function(A,e){A>>>=0,e||R(A,2,this.length);var t=this[A]|this[A+1]<<8;return 32768&t?4294901760|t:t},s.prototype.readInt16BE=function(A,e){A>>>=0,e||R(A,2,this.length);var t=this[A+1]|this[A]<<8;return 32768&t?4294901760|t:t},s.prototype.readInt32LE=function(A,e){return A>>>=0,e||R(A,4,this.length),this[A]|this[A+1]<<8|this[A+2]<<16|this[A+3]<<24},s.prototype.readInt32BE=function(A,e){return A>>>=0,e||R(A,4,this.length),this[A]<<24|this[A+1]<<16|this[A+2]<<8|this[A+3]},s.prototype.readFloatLE=function(A,e){return A>>>=0,e||R(A,4,this.length),n.read(this,A,!0,23,4)},s.prototype.readFloatBE=function(A,e){return A>>>=0,e||R(A,4,this.length),n.read(this,A,!1,23,4)},s.prototype.readDoubleLE=function(A,e){return A>>>=0,e||R(A,8,this.length),n.read(this,A,!0,52,8)},s.prototype.readDoubleBE=function(A,e){return A>>>=0,e||R(A,8,this.length),n.read(this,A,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(A,e,t,r){A=+A,e>>>=0,t>>>=0,r||H(this,A,e,t,Math.pow(2,8*t)-1,0);var n=1,i=0;for(this[e]=255&A;++i>>=0,t>>>=0,r||H(this,A,e,t,Math.pow(2,8*t)-1,0);var n=t-1,i=1;for(this[e+n]=255&A;--n>=0&&(i*=256);)this[e+n]=A/i&255;return e+t},s.prototype.writeUint8=s.prototype.writeUInt8=function(A,e,t){return A=+A,e>>>=0,t||H(this,A,e,1,255,0),this[e]=255&A,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(A,e,t){return A=+A,e>>>=0,t||H(this,A,e,2,65535,0),this[e]=255&A,this[e+1]=A>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(A,e,t){return A=+A,e>>>=0,t||H(this,A,e,2,65535,0),this[e]=A>>>8,this[e+1]=255&A,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(A,e,t){return A=+A,e>>>=0,t||H(this,A,e,4,4294967295,0),this[e+3]=A>>>24,this[e+2]=A>>>16,this[e+1]=A>>>8,this[e]=255&A,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(A,e,t){return A=+A,e>>>=0,t||H(this,A,e,4,4294967295,0),this[e]=A>>>24,this[e+1]=A>>>16,this[e+2]=A>>>8,this[e+3]=255&A,e+4},s.prototype.writeIntLE=function(A,e,t,r){if(A=+A,e>>>=0,!r){var n=Math.pow(2,8*t-1);H(this,A,e,t,n-1,-n)}var i=0,o=1,a=0;for(this[e]=255&A;++i>0)-a&255;return e+t},s.prototype.writeIntBE=function(A,e,t,r){if(A=+A,e>>>=0,!r){var n=Math.pow(2,8*t-1);H(this,A,e,t,n-1,-n)}var i=t-1,o=1,a=0;for(this[e+i]=255&A;--i>=0&&(o*=256);)A<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(A/o>>0)-a&255;return e+t},s.prototype.writeInt8=function(A,e,t){return A=+A,e>>>=0,t||H(this,A,e,1,127,-128),A<0&&(A=255+A+1),this[e]=255&A,e+1},s.prototype.writeInt16LE=function(A,e,t){return A=+A,e>>>=0,t||H(this,A,e,2,32767,-32768),this[e]=255&A,this[e+1]=A>>>8,e+2},s.prototype.writeInt16BE=function(A,e,t){return A=+A,e>>>=0,t||H(this,A,e,2,32767,-32768),this[e]=A>>>8,this[e+1]=255&A,e+2},s.prototype.writeInt32LE=function(A,e,t){return A=+A,e>>>=0,t||H(this,A,e,4,2147483647,-2147483648),this[e]=255&A,this[e+1]=A>>>8,this[e+2]=A>>>16,this[e+3]=A>>>24,e+4},s.prototype.writeInt32BE=function(A,e,t){return A=+A,e>>>=0,t||H(this,A,e,4,2147483647,-2147483648),A<0&&(A=4294967295+A+1),this[e]=A>>>24,this[e+1]=A>>>16,this[e+2]=A>>>8,this[e+3]=255&A,e+4},s.prototype.writeFloatLE=function(A,e,t){return M(this,A,e,!0,t)},s.prototype.writeFloatBE=function(A,e,t){return M(this,A,e,!1,t)},s.prototype.writeDoubleLE=function(A,e,t){return L(this,A,e,!0,t)},s.prototype.writeDoubleBE=function(A,e,t){return L(this,A,e,!1,t)},s.prototype.copy=function(A,e,t,r){if(!s.isBuffer(A))throw new TypeError("argument should be a Buffer");if(t||(t=0),r||0===r||(r=this.length),e>=A.length&&(e=A.length),e||(e=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),A.length-e>>=0,t=void 0===t?this.length:t>>>0,A||(A=0),"number"==typeof A)for(i=e;i55295&&t<57344){if(!n){if(t>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(o+1===r){(e-=3)>-1&&i.push(239,191,189);continue}n=t;continue}if(t<56320){(e-=3)>-1&&i.push(239,191,189),n=t;continue}t=65536+(n-55296<<10|t-56320)}else n&&(e-=3)>-1&&i.push(239,191,189);if(n=null,t<128){if((e-=1)<0)break;i.push(t)}else if(t<2048){if((e-=2)<0)break;i.push(t>>6|192,63&t|128)}else if(t<65536){if((e-=3)<0)break;i.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return i}function Y(A){return r.toByteArray(function(A){if((A=(A=A.split("=")[0]).trim().replace(x,"")).length<2)return"";for(;A.length%4!=0;)A+="=";return A}(A))}function _(A,e,t,r){for(var n=0;n=e.length||n>=A.length);++n)e[n+t]=A[n];return n}function V(A,e){return A instanceof e||null!=A&&null!=A.constructor&&null!=A.constructor.name&&A.constructor.name===e.name}function T(A){return A!=A}var P=function(){for(var A="0123456789abcdef",e=new Array(256),t=0;t<16;++t)for(var r=16*t,n=0;n<16;++n)e[r+n]=A[t]+A[n];return e}()},1027:(A,e,t)=>{var r=t(9509).Buffer,n=t(2830).Transform,i=t(2553).s;function o(A){n.call(this),this.hashMode="string"==typeof A,this.hashMode?this[A]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}t(5717)(o,n),o.prototype.update=function(A,e,t){"string"==typeof A&&(A=r.from(A,e));var n=this._update(A);return this.hashMode?this:(t&&(n=this._toString(n,t)),n)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(A,e,t){var r;try{this.hashMode?this._update(A):this.push(this._update(A))}catch(A){r=A}finally{t(r)}},o.prototype._flush=function(A){var e;try{this.push(this.__final())}catch(A){e=A}A(e)},o.prototype._finalOrDigest=function(A){var e=this.__final()||r.alloc(0);return A&&(e=this._toString(e,A,!0)),e},o.prototype._toString=function(A,e,t){if(this._decoder||(this._decoder=new i(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(A);return t&&(r+=this._decoder.end()),r},A.exports=o},6393:(A,e,t)=>{var r=t(6266),n=t(6426);A.exports=function(A){return new o(A)};var i={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 o(A){this.curveType=i[A],this.curveType||(this.curveType={name:A}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function a(A,e,t){Array.isArray(A)||(A=A.toArray());var r=new Buffer(A);if(t&&r.length=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function s(A,e,t){var r=a(A,t);return t-1>=e&&(r|=a(A,t-1)<<4),r}function u(A,e,t,r){for(var n=0,i=Math.min(A.length,t),o=e;o=49?a-49+10:a>=17?a-17+10:a}return n}i.isBN=function(A){return A instanceof i||null!==A&&"object"==typeof A&&A.constructor.wordSize===i.wordSize&&Array.isArray(A.words)},i.max=function(A,e){return A.cmp(e)>0?A:e},i.min=function(A,e){return A.cmp(e)<0?A:e},i.prototype._init=function(A,e,t){if("number"==typeof A)return this._initNumber(A,e,t);if("object"==typeof A)return this._initArray(A,e,t);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(A=A.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)o=A[n]|A[n-1]<<8|A[n-2]<<16,this.words[i]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===t)for(n=0,i=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this.strip()},i.prototype._parseHex=function(A,e,t){this.length=Math.ceil((A.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)n=s(A,e,r)<=18?(i-=18,o+=1,this.words[o]|=n>>>26):i+=8;else for(r=(A.length-e)%2==0?e+1:e;r=18?(i-=18,o+=1,this.words[o]|=n>>>26):i+=8;this.strip()},i.prototype._parseBase=function(A,e,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var i=A.length-t,o=i%r,a=Math.min(i,i-o)+t,s=0,g=t;g1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],c=[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],B=[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 l(A,e,t){t.negative=e.negative^A.negative;var r=A.length+e.length|0;t.length=r,r=r-1|0;var n=0|A.words[0],i=0|e.words[0],o=n*i,a=67108863&o,s=o/67108864|0;t.words[0]=a;for(var u=1;u>>26,c=67108863&s,B=Math.min(u,e.length-1),l=Math.max(0,u-A.length+1);l<=B;l++){var Q=u-l|0;g+=(o=(n=0|A.words[Q])*(i=0|e.words[l])+c)/67108864|0,c=67108863&o}t.words[u]=0|c,s=0|g}return 0!==s?t.words[u]=0|s:t.length--,t.strip()}i.prototype.toString=function(A,e){var t;if(e=0|e||1,16===(A=A||10)||"hex"===A){t="";for(var n=0,i=0,o=0;o>>24-n&16777215)||o!==this.length-1?g[6-s.length]+s+t:s+t,(n+=2)>=26&&(n-=26,o--)}for(0!==i&&(t=i.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(A===(0|A)&&A>=2&&A<=36){var u=c[A],l=B[A];t="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var I=Q.modn(l).toString(A);t=(Q=Q.idivn(l)).isZero()?I+t:g[u-I.length]+I+t}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var A=this.words[0];return 2===this.length?A+=67108864*this.words[1]:3===this.length&&1===this.words[2]?A+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-A:A},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(A,e){return r(void 0!==o),this.toArrayLike(o,A,e)},i.prototype.toArray=function(A,e){return this.toArrayLike(Array,A,e)},i.prototype.toArrayLike=function(A,e,t){var n=this.byteLength(),i=t||Math.max(1,n);r(n<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var o,a,s="le"===e,u=new A(i),g=this.clone();if(s){for(a=0;!g.isZero();a++)o=g.andln(255),g.iushrn(8),u[a]=o;for(;a=4096&&(t+=13,e>>>=13),e>=64&&(t+=7,e>>>=7),e>=8&&(t+=4,e>>>=4),e>=2&&(t+=2,e>>>=2),t+e},i.prototype._zeroBits=function(A){if(0===A)return 26;var e=A,t=0;return 0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},i.prototype.bitLength=function(){var A=this.words[this.length-1],e=this._countBits(A);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,e=0;eA.length?this.clone().ior(A):A.clone().ior(this)},i.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},i.prototype.iuand=function(A){var e;e=this.length>A.length?A:this;for(var t=0;tA.length?this.clone().iand(A):A.clone().iand(this)},i.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},i.prototype.iuxor=function(A){var e,t;this.length>A.length?(e=this,t=A):(e=A,t=this);for(var r=0;rA.length?this.clone().ixor(A):A.clone().ixor(this)},i.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},i.prototype.inotn=function(A){r("number"==typeof A&&A>=0);var e=0|Math.ceil(A/26),t=A%26;this._expand(e),t>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-t),this.strip()},i.prototype.notn=function(A){return this.clone().inotn(A)},i.prototype.setn=function(A,e){r("number"==typeof A&&A>=0);var t=A/26|0,n=A%26;return this._expand(t+1),this.words[t]=e?this.words[t]|1<A.length?(t=this,r=A):(t=A,r=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=t.length,0!==n)this.words[this.length]=n,this.length++;else if(t!==this)for(;iA.length?this.clone().iadd(A):A.clone().iadd(this)},i.prototype.isub=function(A){if(0!==A.negative){A.negative=0;var e=this.iadd(A);return A.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var t,r,n=this.cmp(A);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=A):(t=A,r=this);for(var i=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==i&&o>26,this.words[o]=67108863&e;if(0===i&&o>>13,l=0|o[1],Q=8191&l,I=l>>>13,d=0|o[2],h=8191&d,E=d>>>13,f=0|o[3],C=8191&f,p=f>>>13,m=0|o[4],y=8191&m,v=m>>>13,D=0|o[5],b=8191&D,w=D>>>13,F=0|o[6],U=8191&F,S=F>>>13,N=0|o[7],R=8191&N,H=N>>>13,G=0|o[8],M=8191&G,L=G>>>13,x=0|o[9],k=8191&x,Y=x>>>13,_=0|a[0],V=8191&_,T=_>>>13,P=0|a[1],J=8191&P,O=P>>>13,K=0|a[2],j=8191&K,z=K>>>13,q=0|a[3],Z=8191&q,W=q>>>13,X=0|a[4],$=8191&X,AA=X>>>13,eA=0|a[5],tA=8191&eA,rA=eA>>>13,nA=0|a[6],iA=8191&nA,oA=nA>>>13,aA=0|a[7],sA=8191&aA,uA=aA>>>13,gA=0|a[8],cA=8191&gA,BA=gA>>>13,lA=0|a[9],QA=8191&lA,IA=lA>>>13;t.negative=A.negative^e.negative,t.length=19;var dA=(u+(r=Math.imul(c,V))|0)+((8191&(n=(n=Math.imul(c,T))+Math.imul(B,V)|0))<<13)|0;u=((i=Math.imul(B,T))+(n>>>13)|0)+(dA>>>26)|0,dA&=67108863,r=Math.imul(Q,V),n=(n=Math.imul(Q,T))+Math.imul(I,V)|0,i=Math.imul(I,T);var hA=(u+(r=r+Math.imul(c,J)|0)|0)+((8191&(n=(n=n+Math.imul(c,O)|0)+Math.imul(B,J)|0))<<13)|0;u=((i=i+Math.imul(B,O)|0)+(n>>>13)|0)+(hA>>>26)|0,hA&=67108863,r=Math.imul(h,V),n=(n=Math.imul(h,T))+Math.imul(E,V)|0,i=Math.imul(E,T),r=r+Math.imul(Q,J)|0,n=(n=n+Math.imul(Q,O)|0)+Math.imul(I,J)|0,i=i+Math.imul(I,O)|0;var EA=(u+(r=r+Math.imul(c,j)|0)|0)+((8191&(n=(n=n+Math.imul(c,z)|0)+Math.imul(B,j)|0))<<13)|0;u=((i=i+Math.imul(B,z)|0)+(n>>>13)|0)+(EA>>>26)|0,EA&=67108863,r=Math.imul(C,V),n=(n=Math.imul(C,T))+Math.imul(p,V)|0,i=Math.imul(p,T),r=r+Math.imul(h,J)|0,n=(n=n+Math.imul(h,O)|0)+Math.imul(E,J)|0,i=i+Math.imul(E,O)|0,r=r+Math.imul(Q,j)|0,n=(n=n+Math.imul(Q,z)|0)+Math.imul(I,j)|0,i=i+Math.imul(I,z)|0;var fA=(u+(r=r+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,W)|0)+Math.imul(B,Z)|0))<<13)|0;u=((i=i+Math.imul(B,W)|0)+(n>>>13)|0)+(fA>>>26)|0,fA&=67108863,r=Math.imul(y,V),n=(n=Math.imul(y,T))+Math.imul(v,V)|0,i=Math.imul(v,T),r=r+Math.imul(C,J)|0,n=(n=n+Math.imul(C,O)|0)+Math.imul(p,J)|0,i=i+Math.imul(p,O)|0,r=r+Math.imul(h,j)|0,n=(n=n+Math.imul(h,z)|0)+Math.imul(E,j)|0,i=i+Math.imul(E,z)|0,r=r+Math.imul(Q,Z)|0,n=(n=n+Math.imul(Q,W)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0;var CA=(u+(r=r+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,AA)|0)+Math.imul(B,$)|0))<<13)|0;u=((i=i+Math.imul(B,AA)|0)+(n>>>13)|0)+(CA>>>26)|0,CA&=67108863,r=Math.imul(b,V),n=(n=Math.imul(b,T))+Math.imul(w,V)|0,i=Math.imul(w,T),r=r+Math.imul(y,J)|0,n=(n=n+Math.imul(y,O)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,O)|0,r=r+Math.imul(C,j)|0,n=(n=n+Math.imul(C,z)|0)+Math.imul(p,j)|0,i=i+Math.imul(p,z)|0,r=r+Math.imul(h,Z)|0,n=(n=n+Math.imul(h,W)|0)+Math.imul(E,Z)|0,i=i+Math.imul(E,W)|0,r=r+Math.imul(Q,$)|0,n=(n=n+Math.imul(Q,AA)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,AA)|0;var pA=(u+(r=r+Math.imul(c,tA)|0)|0)+((8191&(n=(n=n+Math.imul(c,rA)|0)+Math.imul(B,tA)|0))<<13)|0;u=((i=i+Math.imul(B,rA)|0)+(n>>>13)|0)+(pA>>>26)|0,pA&=67108863,r=Math.imul(U,V),n=(n=Math.imul(U,T))+Math.imul(S,V)|0,i=Math.imul(S,T),r=r+Math.imul(b,J)|0,n=(n=n+Math.imul(b,O)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,O)|0,r=r+Math.imul(y,j)|0,n=(n=n+Math.imul(y,z)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,z)|0,r=r+Math.imul(C,Z)|0,n=(n=n+Math.imul(C,W)|0)+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,AA)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,AA)|0,r=r+Math.imul(Q,tA)|0,n=(n=n+Math.imul(Q,rA)|0)+Math.imul(I,tA)|0,i=i+Math.imul(I,rA)|0;var mA=(u+(r=r+Math.imul(c,iA)|0)|0)+((8191&(n=(n=n+Math.imul(c,oA)|0)+Math.imul(B,iA)|0))<<13)|0;u=((i=i+Math.imul(B,oA)|0)+(n>>>13)|0)+(mA>>>26)|0,mA&=67108863,r=Math.imul(R,V),n=(n=Math.imul(R,T))+Math.imul(H,V)|0,i=Math.imul(H,T),r=r+Math.imul(U,J)|0,n=(n=n+Math.imul(U,O)|0)+Math.imul(S,J)|0,i=i+Math.imul(S,O)|0,r=r+Math.imul(b,j)|0,n=(n=n+Math.imul(b,z)|0)+Math.imul(w,j)|0,i=i+Math.imul(w,z)|0,r=r+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,AA)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,AA)|0,r=r+Math.imul(h,tA)|0,n=(n=n+Math.imul(h,rA)|0)+Math.imul(E,tA)|0,i=i+Math.imul(E,rA)|0,r=r+Math.imul(Q,iA)|0,n=(n=n+Math.imul(Q,oA)|0)+Math.imul(I,iA)|0,i=i+Math.imul(I,oA)|0;var yA=(u+(r=r+Math.imul(c,sA)|0)|0)+((8191&(n=(n=n+Math.imul(c,uA)|0)+Math.imul(B,sA)|0))<<13)|0;u=((i=i+Math.imul(B,uA)|0)+(n>>>13)|0)+(yA>>>26)|0,yA&=67108863,r=Math.imul(M,V),n=(n=Math.imul(M,T))+Math.imul(L,V)|0,i=Math.imul(L,T),r=r+Math.imul(R,J)|0,n=(n=n+Math.imul(R,O)|0)+Math.imul(H,J)|0,i=i+Math.imul(H,O)|0,r=r+Math.imul(U,j)|0,n=(n=n+Math.imul(U,z)|0)+Math.imul(S,j)|0,i=i+Math.imul(S,z)|0,r=r+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,W)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,AA)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,AA)|0,r=r+Math.imul(C,tA)|0,n=(n=n+Math.imul(C,rA)|0)+Math.imul(p,tA)|0,i=i+Math.imul(p,rA)|0,r=r+Math.imul(h,iA)|0,n=(n=n+Math.imul(h,oA)|0)+Math.imul(E,iA)|0,i=i+Math.imul(E,oA)|0,r=r+Math.imul(Q,sA)|0,n=(n=n+Math.imul(Q,uA)|0)+Math.imul(I,sA)|0,i=i+Math.imul(I,uA)|0;var vA=(u+(r=r+Math.imul(c,cA)|0)|0)+((8191&(n=(n=n+Math.imul(c,BA)|0)+Math.imul(B,cA)|0))<<13)|0;u=((i=i+Math.imul(B,BA)|0)+(n>>>13)|0)+(vA>>>26)|0,vA&=67108863,r=Math.imul(k,V),n=(n=Math.imul(k,T))+Math.imul(Y,V)|0,i=Math.imul(Y,T),r=r+Math.imul(M,J)|0,n=(n=n+Math.imul(M,O)|0)+Math.imul(L,J)|0,i=i+Math.imul(L,O)|0,r=r+Math.imul(R,j)|0,n=(n=n+Math.imul(R,z)|0)+Math.imul(H,j)|0,i=i+Math.imul(H,z)|0,r=r+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,W)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,AA)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,AA)|0,r=r+Math.imul(y,tA)|0,n=(n=n+Math.imul(y,rA)|0)+Math.imul(v,tA)|0,i=i+Math.imul(v,rA)|0,r=r+Math.imul(C,iA)|0,n=(n=n+Math.imul(C,oA)|0)+Math.imul(p,iA)|0,i=i+Math.imul(p,oA)|0,r=r+Math.imul(h,sA)|0,n=(n=n+Math.imul(h,uA)|0)+Math.imul(E,sA)|0,i=i+Math.imul(E,uA)|0,r=r+Math.imul(Q,cA)|0,n=(n=n+Math.imul(Q,BA)|0)+Math.imul(I,cA)|0,i=i+Math.imul(I,BA)|0;var DA=(u+(r=r+Math.imul(c,QA)|0)|0)+((8191&(n=(n=n+Math.imul(c,IA)|0)+Math.imul(B,QA)|0))<<13)|0;u=((i=i+Math.imul(B,IA)|0)+(n>>>13)|0)+(DA>>>26)|0,DA&=67108863,r=Math.imul(k,J),n=(n=Math.imul(k,O))+Math.imul(Y,J)|0,i=Math.imul(Y,O),r=r+Math.imul(M,j)|0,n=(n=n+Math.imul(M,z)|0)+Math.imul(L,j)|0,i=i+Math.imul(L,z)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,W)|0)+Math.imul(H,Z)|0,i=i+Math.imul(H,W)|0,r=r+Math.imul(U,$)|0,n=(n=n+Math.imul(U,AA)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,AA)|0,r=r+Math.imul(b,tA)|0,n=(n=n+Math.imul(b,rA)|0)+Math.imul(w,tA)|0,i=i+Math.imul(w,rA)|0,r=r+Math.imul(y,iA)|0,n=(n=n+Math.imul(y,oA)|0)+Math.imul(v,iA)|0,i=i+Math.imul(v,oA)|0,r=r+Math.imul(C,sA)|0,n=(n=n+Math.imul(C,uA)|0)+Math.imul(p,sA)|0,i=i+Math.imul(p,uA)|0,r=r+Math.imul(h,cA)|0,n=(n=n+Math.imul(h,BA)|0)+Math.imul(E,cA)|0,i=i+Math.imul(E,BA)|0;var bA=(u+(r=r+Math.imul(Q,QA)|0)|0)+((8191&(n=(n=n+Math.imul(Q,IA)|0)+Math.imul(I,QA)|0))<<13)|0;u=((i=i+Math.imul(I,IA)|0)+(n>>>13)|0)+(bA>>>26)|0,bA&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,z))+Math.imul(Y,j)|0,i=Math.imul(Y,z),r=r+Math.imul(M,Z)|0,n=(n=n+Math.imul(M,W)|0)+Math.imul(L,Z)|0,i=i+Math.imul(L,W)|0,r=r+Math.imul(R,$)|0,n=(n=n+Math.imul(R,AA)|0)+Math.imul(H,$)|0,i=i+Math.imul(H,AA)|0,r=r+Math.imul(U,tA)|0,n=(n=n+Math.imul(U,rA)|0)+Math.imul(S,tA)|0,i=i+Math.imul(S,rA)|0,r=r+Math.imul(b,iA)|0,n=(n=n+Math.imul(b,oA)|0)+Math.imul(w,iA)|0,i=i+Math.imul(w,oA)|0,r=r+Math.imul(y,sA)|0,n=(n=n+Math.imul(y,uA)|0)+Math.imul(v,sA)|0,i=i+Math.imul(v,uA)|0,r=r+Math.imul(C,cA)|0,n=(n=n+Math.imul(C,BA)|0)+Math.imul(p,cA)|0,i=i+Math.imul(p,BA)|0;var wA=(u+(r=r+Math.imul(h,QA)|0)|0)+((8191&(n=(n=n+Math.imul(h,IA)|0)+Math.imul(E,QA)|0))<<13)|0;u=((i=i+Math.imul(E,IA)|0)+(n>>>13)|0)+(wA>>>26)|0,wA&=67108863,r=Math.imul(k,Z),n=(n=Math.imul(k,W))+Math.imul(Y,Z)|0,i=Math.imul(Y,W),r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,AA)|0)+Math.imul(L,$)|0,i=i+Math.imul(L,AA)|0,r=r+Math.imul(R,tA)|0,n=(n=n+Math.imul(R,rA)|0)+Math.imul(H,tA)|0,i=i+Math.imul(H,rA)|0,r=r+Math.imul(U,iA)|0,n=(n=n+Math.imul(U,oA)|0)+Math.imul(S,iA)|0,i=i+Math.imul(S,oA)|0,r=r+Math.imul(b,sA)|0,n=(n=n+Math.imul(b,uA)|0)+Math.imul(w,sA)|0,i=i+Math.imul(w,uA)|0,r=r+Math.imul(y,cA)|0,n=(n=n+Math.imul(y,BA)|0)+Math.imul(v,cA)|0,i=i+Math.imul(v,BA)|0;var FA=(u+(r=r+Math.imul(C,QA)|0)|0)+((8191&(n=(n=n+Math.imul(C,IA)|0)+Math.imul(p,QA)|0))<<13)|0;u=((i=i+Math.imul(p,IA)|0)+(n>>>13)|0)+(FA>>>26)|0,FA&=67108863,r=Math.imul(k,$),n=(n=Math.imul(k,AA))+Math.imul(Y,$)|0,i=Math.imul(Y,AA),r=r+Math.imul(M,tA)|0,n=(n=n+Math.imul(M,rA)|0)+Math.imul(L,tA)|0,i=i+Math.imul(L,rA)|0,r=r+Math.imul(R,iA)|0,n=(n=n+Math.imul(R,oA)|0)+Math.imul(H,iA)|0,i=i+Math.imul(H,oA)|0,r=r+Math.imul(U,sA)|0,n=(n=n+Math.imul(U,uA)|0)+Math.imul(S,sA)|0,i=i+Math.imul(S,uA)|0,r=r+Math.imul(b,cA)|0,n=(n=n+Math.imul(b,BA)|0)+Math.imul(w,cA)|0,i=i+Math.imul(w,BA)|0;var UA=(u+(r=r+Math.imul(y,QA)|0)|0)+((8191&(n=(n=n+Math.imul(y,IA)|0)+Math.imul(v,QA)|0))<<13)|0;u=((i=i+Math.imul(v,IA)|0)+(n>>>13)|0)+(UA>>>26)|0,UA&=67108863,r=Math.imul(k,tA),n=(n=Math.imul(k,rA))+Math.imul(Y,tA)|0,i=Math.imul(Y,rA),r=r+Math.imul(M,iA)|0,n=(n=n+Math.imul(M,oA)|0)+Math.imul(L,iA)|0,i=i+Math.imul(L,oA)|0,r=r+Math.imul(R,sA)|0,n=(n=n+Math.imul(R,uA)|0)+Math.imul(H,sA)|0,i=i+Math.imul(H,uA)|0,r=r+Math.imul(U,cA)|0,n=(n=n+Math.imul(U,BA)|0)+Math.imul(S,cA)|0,i=i+Math.imul(S,BA)|0;var SA=(u+(r=r+Math.imul(b,QA)|0)|0)+((8191&(n=(n=n+Math.imul(b,IA)|0)+Math.imul(w,QA)|0))<<13)|0;u=((i=i+Math.imul(w,IA)|0)+(n>>>13)|0)+(SA>>>26)|0,SA&=67108863,r=Math.imul(k,iA),n=(n=Math.imul(k,oA))+Math.imul(Y,iA)|0,i=Math.imul(Y,oA),r=r+Math.imul(M,sA)|0,n=(n=n+Math.imul(M,uA)|0)+Math.imul(L,sA)|0,i=i+Math.imul(L,uA)|0,r=r+Math.imul(R,cA)|0,n=(n=n+Math.imul(R,BA)|0)+Math.imul(H,cA)|0,i=i+Math.imul(H,BA)|0;var NA=(u+(r=r+Math.imul(U,QA)|0)|0)+((8191&(n=(n=n+Math.imul(U,IA)|0)+Math.imul(S,QA)|0))<<13)|0;u=((i=i+Math.imul(S,IA)|0)+(n>>>13)|0)+(NA>>>26)|0,NA&=67108863,r=Math.imul(k,sA),n=(n=Math.imul(k,uA))+Math.imul(Y,sA)|0,i=Math.imul(Y,uA),r=r+Math.imul(M,cA)|0,n=(n=n+Math.imul(M,BA)|0)+Math.imul(L,cA)|0,i=i+Math.imul(L,BA)|0;var RA=(u+(r=r+Math.imul(R,QA)|0)|0)+((8191&(n=(n=n+Math.imul(R,IA)|0)+Math.imul(H,QA)|0))<<13)|0;u=((i=i+Math.imul(H,IA)|0)+(n>>>13)|0)+(RA>>>26)|0,RA&=67108863,r=Math.imul(k,cA),n=(n=Math.imul(k,BA))+Math.imul(Y,cA)|0,i=Math.imul(Y,BA);var HA=(u+(r=r+Math.imul(M,QA)|0)|0)+((8191&(n=(n=n+Math.imul(M,IA)|0)+Math.imul(L,QA)|0))<<13)|0;u=((i=i+Math.imul(L,IA)|0)+(n>>>13)|0)+(HA>>>26)|0,HA&=67108863;var GA=(u+(r=Math.imul(k,QA))|0)+((8191&(n=(n=Math.imul(k,IA))+Math.imul(Y,QA)|0))<<13)|0;return u=((i=Math.imul(Y,IA))+(n>>>13)|0)+(GA>>>26)|0,GA&=67108863,s[0]=dA,s[1]=hA,s[2]=EA,s[3]=fA,s[4]=CA,s[5]=pA,s[6]=mA,s[7]=yA,s[8]=vA,s[9]=DA,s[10]=bA,s[11]=wA,s[12]=FA,s[13]=UA,s[14]=SA,s[15]=NA,s[16]=RA,s[17]=HA,s[18]=GA,0!==u&&(s[19]=u,t.length++),t};function I(A,e,t){return(new d).mulp(A,e,t)}function d(A,e){this.x=A,this.y=e}Math.imul||(Q=l),i.prototype.mulTo=function(A,e){var t,r=this.length+A.length;return t=10===this.length&&10===A.length?Q(this,A,e):r<63?l(this,A,e):r<1024?function(A,e,t){t.negative=e.negative^A.negative,t.length=A.length+e.length;for(var r=0,n=0,i=0;i>>26)|0)>>>26,o&=67108863}t.words[i]=a,r=o,o=n}return 0!==r?t.words[i]=r:t.length--,t.strip()}(this,A,e):I(this,A,e),t},d.prototype.makeRBT=function(A){for(var e=new Array(A),t=i.prototype._countBits(A)-1,r=0;r>=1;return r},d.prototype.permute=function(A,e,t,r,n,i){for(var o=0;o>>=1)n++;return 1<>>=13,t[2*o+1]=8191&i,i>>>=13;for(o=2*e;o>=26,e+=n/67108864|0,e+=i>>>26,this.words[t]=67108863&i}return 0!==e&&(this.words[t]=e,this.length++),this},i.prototype.muln=function(A){return this.clone().imuln(A)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(A){var e=function(A){for(var e=new Array(A.bitLength()),t=0;t>>n}return e}(A);if(0===e.length)return new i(1);for(var t=this,r=0;r=0);var e,t=A%26,n=(A-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(e=0;e>>26-t}o&&(this.words[e]=o,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var i=A%26,o=Math.min((A-i)/26,this.length),a=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==g||u>=n);u--){var c=0|this.words[u];this.words[u]=g<<26-i|c>>>i,g=c&a}return s&&0!==g&&(s.words[s.length++]=g),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(A,e,t){return r(0===this.negative),this.iushrn(A,e,t)},i.prototype.shln=function(A){return this.clone().ishln(A)},i.prototype.ushln=function(A){return this.clone().iushln(A)},i.prototype.shrn=function(A){return this.clone().ishrn(A)},i.prototype.ushrn=function(A){return this.clone().iushrn(A)},i.prototype.testn=function(A){r("number"==typeof A&&A>=0);var e=A%26,t=(A-e)/26,n=1<=0);var e=A%26,t=(A-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==e&&t++,this.length=Math.min(t,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},i.prototype.isubn=function(A){if(r("number"==typeof A),r(A<67108864),A<0)return this.iaddn(-A);if(0!==this.negative)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(s/67108864|0),this.words[n+t]=67108863&i}for(;n>26,this.words[n+t]=67108863&i;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(A,e){var t=(this.length,A.length),r=this.clone(),n=A,o=0|n.words[n.length-1];0!=(t=26-this._countBits(o))&&(n=n.ushln(t),r.iushln(t),o=0|n.words[n.length-1]);var a,s=r.length-n.length;if("mod"!==e){(a=new i(null)).length=s+1,a.words=new Array(a.length);for(var u=0;u=0;c--){var B=67108864*(0|r.words[n.length+c])+(0|r.words[n.length+c-1]);for(B=Math.min(B/o|0,67108863),r._ishlnsubmul(n,B,c);0!==r.negative;)B--,r.negative=0,r._ishlnsubmul(n,1,c),r.isZero()||(r.negative^=1);a&&(a.words[c]=B)}return a&&a.strip(),r.strip(),"div"!==e&&0!==t&&r.iushrn(t),{div:a||null,mod:r}},i.prototype.divmod=function(A,e,t){return r(!A.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===A.negative?(a=this.neg().divmod(A,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(o=a.mod.neg(),t&&0!==o.negative&&o.iadd(A)),{div:n,mod:o}):0===this.negative&&0!==A.negative?(a=this.divmod(A.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!=(this.negative&A.negative)?(a=this.neg().divmod(A.neg(),e),"div"!==e&&(o=a.mod.neg(),t&&0!==o.negative&&o.isub(A)),{div:a.div,mod:o}):A.length>this.length||this.cmp(A)<0?{div:new i(0),mod:this}:1===A.length?"div"===e?{div:this.divn(A.words[0]),mod:null}:"mod"===e?{div:null,mod:new i(this.modn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new i(this.modn(A.words[0]))}:this._wordDiv(A,e);var n,o,a},i.prototype.div=function(A){return this.divmod(A,"div",!1).div},i.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},i.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},i.prototype.divRound=function(A){var e=this.divmod(A);if(e.mod.isZero())return e.div;var t=0!==e.div.negative?e.mod.isub(A):e.mod,r=A.ushrn(1),n=A.andln(1),i=t.cmp(r);return i<0||1===n&&0===i?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},i.prototype.modn=function(A){r(A<=67108863);for(var e=(1<<26)%A,t=0,n=this.length-1;n>=0;n--)t=(e*t+(0|this.words[n]))%A;return t},i.prototype.idivn=function(A){r(A<=67108863);for(var e=0,t=this.length-1;t>=0;t--){var n=(0|this.words[t])+67108864*e;this.words[t]=n/A|0,e=n%A}return this.strip()},i.prototype.divn=function(A){return this.clone().idivn(A)},i.prototype.egcd=function(A){r(0===A.negative),r(!A.isZero());var e=this,t=A.clone();e=0!==e.negative?e.umod(A):e.clone();for(var n=new i(1),o=new i(0),a=new i(0),s=new i(1),u=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++u;for(var g=t.clone(),c=e.clone();!e.isZero();){for(var B=0,l=1;0==(e.words[0]&l)&&B<26;++B,l<<=1);if(B>0)for(e.iushrn(B);B-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(g),o.isub(c)),n.iushrn(1),o.iushrn(1);for(var Q=0,I=1;0==(t.words[0]&I)&&Q<26;++Q,I<<=1);if(Q>0)for(t.iushrn(Q);Q-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(g),s.isub(c)),a.iushrn(1),s.iushrn(1);e.cmp(t)>=0?(e.isub(t),n.isub(a),o.isub(s)):(t.isub(e),a.isub(n),s.isub(o))}return{a,b:s,gcd:t.iushln(u)}},i.prototype._invmp=function(A){r(0===A.negative),r(!A.isZero());var e=this,t=A.clone();e=0!==e.negative?e.umod(A):e.clone();for(var n,o=new i(1),a=new i(0),s=t.clone();e.cmpn(1)>0&&t.cmpn(1)>0;){for(var u=0,g=1;0==(e.words[0]&g)&&u<26;++u,g<<=1);if(u>0)for(e.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var c=0,B=1;0==(t.words[0]&B)&&c<26;++c,B<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);e.cmp(t)>=0?(e.isub(t),o.isub(a)):(t.isub(e),a.isub(o))}return(n=0===e.cmpn(1)?o:a).cmpn(0)<0&&n.iadd(A),n},i.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var e=this.clone(),t=A.clone();e.negative=0,t.negative=0;for(var r=0;e.isEven()&&t.isEven();r++)e.iushrn(1),t.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;t.isEven();)t.iushrn(1);var n=e.cmp(t);if(n<0){var i=e;e=t,t=i}else if(0===n||0===t.cmpn(1))break;e.isub(t)}return t.iushln(r)},i.prototype.invm=function(A){return this.egcd(A).a.umod(A)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(A){return this.words[0]&A},i.prototype.bincn=function(A){r("number"==typeof A);var e=A%26,t=(A-e)/26,n=1<>>26,a&=67108863,this.words[o]=a}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(A){var e,t=A<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)e=1;else{t&&(A=-A),r(A<=67108863,"Number is too big");var n=0|this.words[0];e=n===A?0:nA.length)return 1;if(this.length=0;t--){var r=0|this.words[t],n=0|A.words[t];if(r!==n){rn&&(e=1);break}}return e},i.prototype.gtn=function(A){return 1===this.cmpn(A)},i.prototype.gt=function(A){return 1===this.cmp(A)},i.prototype.gten=function(A){return this.cmpn(A)>=0},i.prototype.gte=function(A){return this.cmp(A)>=0},i.prototype.ltn=function(A){return-1===this.cmpn(A)},i.prototype.lt=function(A){return-1===this.cmp(A)},i.prototype.lten=function(A){return this.cmpn(A)<=0},i.prototype.lte=function(A){return this.cmp(A)<=0},i.prototype.eqn=function(A){return 0===this.cmpn(A)},i.prototype.eq=function(A){return 0===this.cmp(A)},i.red=function(A){return new y(A)},i.prototype.toRed=function(A){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),A.convertTo(this)._forceRed(A)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(A){return this.red=A,this},i.prototype.forceRed=function(A){return r(!this.red,"Already a number in reduction context"),this._forceRed(A)},i.prototype.redAdd=function(A){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},i.prototype.redIAdd=function(A){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},i.prototype.redSub=function(A){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},i.prototype.redISub=function(A){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},i.prototype.redShl=function(A){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},i.prototype.redMul=function(A){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},i.prototype.redIMul=function(A){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(A){return r(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var h={k256:null,p224:null,p192:null,p25519:null};function E(A,e){this.name=A,this.p=new i(e,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function f(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function C(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function p(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(A){if("string"==typeof A){var e=i._prime(A);this.m=e.p,this.prime=e}else r(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}function v(A){y.call(this,A),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}E.prototype._tmp=function(){var A=new i(null);return A.words=new Array(Math.ceil(this.n/13)),A},E.prototype.ireduce=function(A){var e,t=A;do{this.split(t,this.tmp),e=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},E.prototype.split=function(A,e){A.iushrn(this.n,0,e)},E.prototype.imulK=function(A){return A.imul(this.k)},n(f,E),f.prototype.split=function(A,e){for(var t=4194303,r=Math.min(A.length,9),n=0;n>>22,i=o}i>>>=22,A.words[n-10]=i,0===i&&A.length>10?A.length-=10:A.length-=9},f.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var e=0,t=0;t>>=26,A.words[t]=n,e=r}return 0!==e&&(A.words[A.length++]=e),A},i._prime=function(A){if(h[A])return h[A];var e;if("k256"===A)e=new f;else if("p224"===A)e=new C;else if("p192"===A)e=new p;else{if("p25519"!==A)throw new Error("Unknown prime "+A);e=new m}return h[A]=e,e},y.prototype._verify1=function(A){r(0===A.negative,"red works only with positives"),r(A.red,"red works only with red numbers")},y.prototype._verify2=function(A,e){r(0==(A.negative|e.negative),"red works only with positives"),r(A.red&&A.red===e.red,"red works only with red numbers")},y.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):A.umod(this.m)._forceRed(this)},y.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},y.prototype.add=function(A,e){this._verify2(A,e);var t=A.add(e);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},y.prototype.iadd=function(A,e){this._verify2(A,e);var t=A.iadd(e);return t.cmp(this.m)>=0&&t.isub(this.m),t},y.prototype.sub=function(A,e){this._verify2(A,e);var t=A.sub(e);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},y.prototype.isub=function(A,e){this._verify2(A,e);var t=A.isub(e);return t.cmpn(0)<0&&t.iadd(this.m),t},y.prototype.shl=function(A,e){return this._verify1(A),this.imod(A.ushln(e))},y.prototype.imul=function(A,e){return this._verify2(A,e),this.imod(A.imul(e))},y.prototype.mul=function(A,e){return this._verify2(A,e),this.imod(A.mul(e))},y.prototype.isqr=function(A){return this.imul(A,A.clone())},y.prototype.sqr=function(A){return this.mul(A,A)},y.prototype.sqrt=function(A){if(A.isZero())return A.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var t=this.m.add(new i(1)).iushrn(2);return this.pow(A,t)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);r(!n.isZero());var a=new i(1).toRed(this),s=a.redNeg(),u=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new i(2*g*g).toRed(this);0!==this.pow(g,u).cmp(s);)g.redIAdd(s);for(var c=this.pow(g,n),B=this.pow(A,n.addn(1).iushrn(1)),l=this.pow(A,n),Q=o;0!==l.cmp(a);){for(var I=l,d=0;0!==I.cmp(a);d++)I=I.redSqr();r(d=0;r--){for(var u=e.words[r],g=s-1;g>=0;g--){var c=u>>g&1;n!==t[0]&&(n=this.sqr(n)),0!==c||0!==o?(o<<=1,o|=c,(4==++a||0===r&&0===g)&&(n=this.mul(n,t[o]),a=0,o=0)):a=0}s=26}return n},y.prototype.convertTo=function(A){var e=A.umod(this.m);return e===A?e.clone():e},y.prototype.convertFrom=function(A){var e=A.clone();return e.red=null,e},i.mont=function(A){return new v(A)},n(v,y),v.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},v.prototype.convertFrom=function(A){var e=this.imod(A.mul(this.rinv));return e.red=null,e},v.prototype.imul=function(A,e){if(A.isZero()||e.isZero())return A.words[0]=0,A.length=1,A;var t=A.imul(e),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),i=n;return n.cmp(this.m)>=0?i=n.isub(this.m):n.cmpn(0)<0&&(i=n.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(A,e){if(A.isZero()||e.isZero())return new i(0)._forceRed(this);var t=A.mul(e),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},v.prototype.invm=function(A){return this.imod(A._invmp(this.m).mul(this.r2))._forceRed(this)}}(A=t.nmd(A),this)},3482:(A,e,t)=>{"use strict";var r=t(5717),n=t(2318),i=t(9785),o=t(9072),a=t(1027);function s(A){a.call(this,"digest"),this._hash=A}r(s,a),s.prototype._update=function(A){this._hash.update(A)},s.prototype._final=function(){return this._hash.digest()},A.exports=function(A){return"md5"===(A=A.toLowerCase())?new n:"rmd160"===A||"ripemd160"===A?new i:new s(o(A))}},8028:(A,e,t)=>{var r=t(2318);A.exports=function(A){return(new r).update(A).digest()}},8355:(A,e,t)=>{"use strict";var r=t(5717),n=t(1031),i=t(1027),o=t(9509).Buffer,a=t(8028),s=t(9785),u=t(9072),g=o.alloc(128);function c(A,e){i.call(this,"digest"),"string"==typeof e&&(e=o.from(e));var t="sha512"===A||"sha384"===A?128:64;this._alg=A,this._key=e,e.length>t?e=("rmd160"===A?new s:u(A)).update(e).digest():e.length{"use strict";var r=t(5717),n=t(9509).Buffer,i=t(1027),o=n.alloc(128),a=64;function s(A,e){i.call(this,"digest"),"string"==typeof e&&(e=n.from(e)),this._alg=A,this._key=e,e.length>a?e=A(e):e.length{"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=t(1798),e.createHash=e.Hash=t(3482),e.createHmac=e.Hmac=t(8355);var r=t(6042),n=Object.keys(r),i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);e.getHashes=function(){return i};var o=t(5632);e.pbkdf2=o.pbkdf2,e.pbkdf2Sync=o.pbkdf2Sync;var a=t(3614);e.Cipher=a.Cipher,e.createCipher=a.createCipher,e.Cipheriv=a.Cipheriv,e.createCipheriv=a.createCipheriv,e.Decipher=a.Decipher,e.createDecipher=a.createDecipher,e.Decipheriv=a.Decipheriv,e.createDecipheriv=a.createDecipheriv,e.getCiphers=a.getCiphers,e.listCiphers=a.listCiphers;var s=t(2607);e.DiffieHellmanGroup=s.DiffieHellmanGroup,e.createDiffieHellmanGroup=s.createDiffieHellmanGroup,e.getDiffieHellman=s.getDiffieHellman,e.createDiffieHellman=s.createDiffieHellman,e.DiffieHellman=s.DiffieHellman;var u=t(4743);e.createSign=u.createSign,e.Sign=u.Sign,e.createVerify=u.createVerify,e.Verify=u.Verify,e.createECDH=t(6393);var g=t(7900);e.publicEncrypt=g.publicEncrypt,e.privateEncrypt=g.privateEncrypt,e.publicDecrypt=g.publicDecrypt,e.privateDecrypt=g.privateDecrypt;var c=t(7963);e.randomFill=c.randomFill,e.randomFillSync=c.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},9540:(A,e,t)=>{"use strict";e.utils=t(1278),e.Cipher=t(5756),e.DES=t(778),e.CBC=t(9051),e.EDE=t(651)},9051:(A,e,t)=>{"use strict";var r=t(9746),n=t(5717),i={};function o(A){r.equal(A.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e{"use strict";var r=t(9746);function n(A){this.options=A,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}A.exports=n,n.prototype._init=function(){},n.prototype.update=function(A){return 0===A.length?[]:"decrypt"===this.type?this._updateDecrypt(A):this._updateEncrypt(A)},n.prototype._buffer=function(A,e){for(var t=Math.min(this.buffer.length-this.bufferOff,A.length-e),r=0;r0;r--)e+=this._buffer(A,e),t+=this._flushBuffer(n,t);return e+=this._buffer(A,e),n},n.prototype.final=function(A){var e,t;return A&&(e=this.update(A)),t="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(t):t},n.prototype._pad=function(A,e){if(0===e)return!1;for(;e{"use strict";var r=t(9746),n=t(5717),i=t(1278),o=t(5756);function a(){this.tmp=new Array(2),this.keys=null}function s(A){o.call(this,A);var e=new a;this._desState=e,this.deriveKeys(e,A.key)}n(s,o),A.exports=s,s.create=function(A){return new s(A)};var u=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];s.prototype.deriveKeys=function(A,e){A.keys=new Array(32),r.equal(e.length,this.blockSize,"Invalid key length");var t=i.readUInt32BE(e,0),n=i.readUInt32BE(e,4);i.pc1(t,n,A.tmp,0),t=A.tmp[0],n=A.tmp[1];for(var o=0;o>>1];t=i.r28shl(t,a),n=i.r28shl(n,a),i.pc2(t,n,A.keys,o)}},s.prototype._update=function(A,e,t,r){var n=this._desState,o=i.readUInt32BE(A,e),a=i.readUInt32BE(A,e+4);i.ip(o,a,n.tmp,0),o=n.tmp[0],a=n.tmp[1],"encrypt"===this.type?this._encrypt(n,o,a,n.tmp,0):this._decrypt(n,o,a,n.tmp,0),o=n.tmp[0],a=n.tmp[1],i.writeUInt32BE(t,o,r),i.writeUInt32BE(t,a,r+4)},s.prototype._pad=function(A,e){for(var t=A.length-e,r=e;r>>0,o=B}i.rip(a,o,r,n)},s.prototype._decrypt=function(A,e,t,r,n){for(var o=t,a=e,s=A.keys.length-2;s>=0;s-=2){var u=A.keys[s],g=A.keys[s+1];i.expand(o,A.tmp,0),u^=A.tmp[0],g^=A.tmp[1];var c=i.substitute(u,g),B=o;o=(a^i.permute(c))>>>0,a=B}i.rip(o,a,r,n)}},651:(A,e,t)=>{"use strict";var r=t(9746),n=t(5717),i=t(5756),o=t(778);function a(A,e){r.equal(e.length,24,"Invalid key length");var t=e.slice(0,8),n=e.slice(8,16),i=e.slice(16,24);this.ciphers="encrypt"===A?[o.create({type:"encrypt",key:t}),o.create({type:"decrypt",key:n}),o.create({type:"encrypt",key:i})]:[o.create({type:"decrypt",key:i}),o.create({type:"encrypt",key:n}),o.create({type:"decrypt",key:t})]}function s(A){i.call(this,A);var e=new a(this.type,this.options.key);this._edeState=e}n(s,i),A.exports=s,s.create=function(A){return new s(A)},s.prototype._update=function(A,e,t,r){var n=this._edeState;n.ciphers[0]._update(A,e,t,r),n.ciphers[1]._update(t,r,t,r),n.ciphers[2]._update(t,r,t,r)},s.prototype._pad=o.prototype._pad,s.prototype._unpad=o.prototype._unpad},1278:(A,e)=>{"use strict";e.readUInt32BE=function(A,e){return(A[0+e]<<24|A[1+e]<<16|A[2+e]<<8|A[3+e])>>>0},e.writeUInt32BE=function(A,e,t){A[0+t]=e>>>24,A[1+t]=e>>>16&255,A[2+t]=e>>>8&255,A[3+t]=255&e},e.ip=function(A,e,t,r){for(var n=0,i=0,o=6;o>=0;o-=2){for(var a=0;a<=24;a+=8)n<<=1,n|=e>>>a+o&1;for(a=0;a<=24;a+=8)n<<=1,n|=A>>>a+o&1}for(o=6;o>=0;o-=2){for(a=1;a<=25;a+=8)i<<=1,i|=e>>>a+o&1;for(a=1;a<=25;a+=8)i<<=1,i|=A>>>a+o&1}t[r+0]=n>>>0,t[r+1]=i>>>0},e.rip=function(A,e,t,r){for(var n=0,i=0,o=0;o<4;o++)for(var a=24;a>=0;a-=8)n<<=1,n|=e>>>a+o&1,n<<=1,n|=A>>>a+o&1;for(o=4;o<8;o++)for(a=24;a>=0;a-=8)i<<=1,i|=e>>>a+o&1,i<<=1,i|=A>>>a+o&1;t[r+0]=n>>>0,t[r+1]=i>>>0},e.pc1=function(A,e,t,r){for(var n=0,i=0,o=7;o>=5;o--){for(var a=0;a<=24;a+=8)n<<=1,n|=e>>a+o&1;for(a=0;a<=24;a+=8)n<<=1,n|=A>>a+o&1}for(a=0;a<=24;a+=8)n<<=1,n|=e>>a+o&1;for(o=1;o<=3;o++){for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+o&1;for(a=0;a<=24;a+=8)i<<=1,i|=A>>a+o&1}for(a=0;a<=24;a+=8)i<<=1,i|=A>>a+o&1;t[r+0]=n>>>0,t[r+1]=i>>>0},e.r28shl=function(A,e){return A<>>28-e};var t=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(A,e,r,n){for(var i=0,o=0,a=t.length>>>1,s=0;s>>t[s]&1;for(s=a;s>>t[s]&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.expand=function(A,e,t){var r=0,n=0;r=(1&A)<<5|A>>>27;for(var i=23;i>=15;i-=4)r<<=6,r|=A>>>i&63;for(i=11;i>=3;i-=4)n|=A>>>i&63,n<<=6;n|=(31&A)<<1|A>>>31,e[t+0]=r>>>0,e[t+1]=n>>>0};var r=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(A,e){for(var t=0,n=0;n<4;n++)t<<=4,t|=r[64*n+(A>>>18-6*n&63)];for(n=0;n<4;n++)t<<=4,t|=r[256+64*n+(e>>>18-6*n&63)];return t>>>0};var n=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(A){for(var e=0,t=0;t>>n[t]&1;return e>>>0},e.padSplit=function(A,e,t){for(var r=A.toString(2);r.length{var r=t(3590),n=t(9799),i=t(7426),o={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(A){var e=new Buffer(n[A].prime,"hex"),t=new Buffer(n[A].gen,"hex");return new i(e,t)},e.createDiffieHellman=e.DiffieHellman=function A(e,t,n,a){return Buffer.isBuffer(t)||void 0===o[t]?A(e,"binary",t,n):(t=t||"binary",a=a||"binary",n=n||new Buffer([2]),Buffer.isBuffer(n)||(n=new Buffer(n,a)),"number"==typeof e?new i(r(e,n),n,!0):(Buffer.isBuffer(e)||(e=new Buffer(e,t)),new i(e,n,!0)))}},7426:(A,e,t)=>{var r=t(3620),n=new(t(3047)),i=new r(24),o=new r(11),a=new r(10),s=new r(3),u=new r(7),g=t(3590),c=t(1798);function B(A,e){return e=e||"utf8",Buffer.isBuffer(A)||(A=new Buffer(A,e)),this._pub=new r(A),this}function l(A,e){return e=e||"utf8",Buffer.isBuffer(A)||(A=new Buffer(A,e)),this._priv=new r(A),this}A.exports=I;var Q={};function I(A,e,t){this.setGenerator(e),this.__prime=new r(A),this._prime=r.mont(this.__prime),this._primeLen=A.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,t?(this.setPublicKey=B,this.setPrivateKey=l):this._primeCode=8}function d(A,e){var t=new Buffer(A.toArray());return e?t.toString(e):t}Object.defineProperty(I.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(A,e){var t=e.toString("hex"),r=[t,A.toString(16)].join("_");if(r in Q)return Q[r];var c,B=0;if(A.isEven()||!g.simpleSieve||!g.fermatTest(A)||!n.test(A))return B+=1,B+="02"===t||"05"===t?8:4,Q[r]=B,B;switch(n.test(A.shrn(1))||(B+=2),t){case"02":A.mod(i).cmp(o)&&(B+=8);break;case"05":(c=A.mod(a)).cmp(s)&&c.cmp(u)&&(B+=8);break;default:B+=4}return Q[r]=B,B}(this.__prime,this.__gen)),this._primeCode}}),I.prototype.generateKeys=function(){return this._priv||(this._priv=new r(c(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},I.prototype.computeSecret=function(A){var e=(A=(A=new r(A)).toRed(this._prime)).redPow(this._priv).fromRed(),t=new Buffer(e.toArray()),n=this.getPrime();if(t.length{var r=t(1798);A.exports=E,E.simpleSieve=d,E.fermatTest=h;var n=t(3620),i=new n(24),o=new(t(3047)),a=new n(1),s=new n(2),u=new n(5),g=(new n(16),new n(8),new n(10)),c=new n(3),B=(new n(7),new n(11)),l=new n(4),Q=(new n(12),null);function I(){if(null!==Q)return Q;var A=[];A[0]=2;for(var e=1,t=3;t<1048576;t+=2){for(var r=Math.ceil(Math.sqrt(t)),n=0;nA;)t.ishrn(1);if(t.isEven()&&t.iadd(a),t.testn(1)||t.iadd(s),e.cmp(s)){if(!e.cmp(u))for(;t.mod(g).cmp(c);)t.iadd(l)}else for(;t.mod(i).cmp(B);)t.iadd(l);if(d(Q=t.shrn(1))&&d(t)&&h(Q)&&h(t)&&o.test(Q)&&o.test(t))return t}}},3620:function(A,e,t){!function(A,e){"use strict";function r(A,e){if(!A)throw new Error(e||"Assertion failed")}function n(A,e){A.super_=e;var t=function(){};t.prototype=e.prototype,A.prototype=new t,A.prototype.constructor=A}function i(A,e,t){if(i.isBN(A))return A;this.negative=0,this.words=null,this.length=0,this.red=null,null!==A&&("le"!==e&&"be"!==e||(t=e,e=10),this._init(A||0,e||10,t||"be"))}var o;"object"==typeof A?A.exports=i:e.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:t(7748).Buffer}catch(A){}function a(A,e){var t=A.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function s(A,e,t){var r=a(A,t);return t-1>=e&&(r|=a(A,t-1)<<4),r}function u(A,e,t,r){for(var n=0,i=Math.min(A.length,t),o=e;o=49?a-49+10:a>=17?a-17+10:a}return n}i.isBN=function(A){return A instanceof i||null!==A&&"object"==typeof A&&A.constructor.wordSize===i.wordSize&&Array.isArray(A.words)},i.max=function(A,e){return A.cmp(e)>0?A:e},i.min=function(A,e){return A.cmp(e)<0?A:e},i.prototype._init=function(A,e,t){if("number"==typeof A)return this._initNumber(A,e,t);if("object"==typeof A)return this._initArray(A,e,t);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(A=A.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)o=A[n]|A[n-1]<<8|A[n-2]<<16,this.words[i]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===t)for(n=0,i=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this.strip()},i.prototype._parseHex=function(A,e,t){this.length=Math.ceil((A.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)n=s(A,e,r)<=18?(i-=18,o+=1,this.words[o]|=n>>>26):i+=8;else for(r=(A.length-e)%2==0?e+1:e;r=18?(i-=18,o+=1,this.words[o]|=n>>>26):i+=8;this.strip()},i.prototype._parseBase=function(A,e,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var i=A.length-t,o=i%r,a=Math.min(i,i-o)+t,s=0,g=t;g1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],c=[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],B=[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 l(A,e,t){t.negative=e.negative^A.negative;var r=A.length+e.length|0;t.length=r,r=r-1|0;var n=0|A.words[0],i=0|e.words[0],o=n*i,a=67108863&o,s=o/67108864|0;t.words[0]=a;for(var u=1;u>>26,c=67108863&s,B=Math.min(u,e.length-1),l=Math.max(0,u-A.length+1);l<=B;l++){var Q=u-l|0;g+=(o=(n=0|A.words[Q])*(i=0|e.words[l])+c)/67108864|0,c=67108863&o}t.words[u]=0|c,s=0|g}return 0!==s?t.words[u]=0|s:t.length--,t.strip()}i.prototype.toString=function(A,e){var t;if(e=0|e||1,16===(A=A||10)||"hex"===A){t="";for(var n=0,i=0,o=0;o>>24-n&16777215)||o!==this.length-1?g[6-s.length]+s+t:s+t,(n+=2)>=26&&(n-=26,o--)}for(0!==i&&(t=i.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(A===(0|A)&&A>=2&&A<=36){var u=c[A],l=B[A];t="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var I=Q.modn(l).toString(A);t=(Q=Q.idivn(l)).isZero()?I+t:g[u-I.length]+I+t}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var A=this.words[0];return 2===this.length?A+=67108864*this.words[1]:3===this.length&&1===this.words[2]?A+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-A:A},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(A,e){return r(void 0!==o),this.toArrayLike(o,A,e)},i.prototype.toArray=function(A,e){return this.toArrayLike(Array,A,e)},i.prototype.toArrayLike=function(A,e,t){var n=this.byteLength(),i=t||Math.max(1,n);r(n<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var o,a,s="le"===e,u=new A(i),g=this.clone();if(s){for(a=0;!g.isZero();a++)o=g.andln(255),g.iushrn(8),u[a]=o;for(;a=4096&&(t+=13,e>>>=13),e>=64&&(t+=7,e>>>=7),e>=8&&(t+=4,e>>>=4),e>=2&&(t+=2,e>>>=2),t+e},i.prototype._zeroBits=function(A){if(0===A)return 26;var e=A,t=0;return 0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},i.prototype.bitLength=function(){var A=this.words[this.length-1],e=this._countBits(A);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,e=0;eA.length?this.clone().ior(A):A.clone().ior(this)},i.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},i.prototype.iuand=function(A){var e;e=this.length>A.length?A:this;for(var t=0;tA.length?this.clone().iand(A):A.clone().iand(this)},i.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},i.prototype.iuxor=function(A){var e,t;this.length>A.length?(e=this,t=A):(e=A,t=this);for(var r=0;rA.length?this.clone().ixor(A):A.clone().ixor(this)},i.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},i.prototype.inotn=function(A){r("number"==typeof A&&A>=0);var e=0|Math.ceil(A/26),t=A%26;this._expand(e),t>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-t),this.strip()},i.prototype.notn=function(A){return this.clone().inotn(A)},i.prototype.setn=function(A,e){r("number"==typeof A&&A>=0);var t=A/26|0,n=A%26;return this._expand(t+1),this.words[t]=e?this.words[t]|1<A.length?(t=this,r=A):(t=A,r=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=t.length,0!==n)this.words[this.length]=n,this.length++;else if(t!==this)for(;iA.length?this.clone().iadd(A):A.clone().iadd(this)},i.prototype.isub=function(A){if(0!==A.negative){A.negative=0;var e=this.iadd(A);return A.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var t,r,n=this.cmp(A);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=A):(t=A,r=this);for(var i=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==i&&o>26,this.words[o]=67108863&e;if(0===i&&o>>13,l=0|o[1],Q=8191&l,I=l>>>13,d=0|o[2],h=8191&d,E=d>>>13,f=0|o[3],C=8191&f,p=f>>>13,m=0|o[4],y=8191&m,v=m>>>13,D=0|o[5],b=8191&D,w=D>>>13,F=0|o[6],U=8191&F,S=F>>>13,N=0|o[7],R=8191&N,H=N>>>13,G=0|o[8],M=8191&G,L=G>>>13,x=0|o[9],k=8191&x,Y=x>>>13,_=0|a[0],V=8191&_,T=_>>>13,P=0|a[1],J=8191&P,O=P>>>13,K=0|a[2],j=8191&K,z=K>>>13,q=0|a[3],Z=8191&q,W=q>>>13,X=0|a[4],$=8191&X,AA=X>>>13,eA=0|a[5],tA=8191&eA,rA=eA>>>13,nA=0|a[6],iA=8191&nA,oA=nA>>>13,aA=0|a[7],sA=8191&aA,uA=aA>>>13,gA=0|a[8],cA=8191&gA,BA=gA>>>13,lA=0|a[9],QA=8191&lA,IA=lA>>>13;t.negative=A.negative^e.negative,t.length=19;var dA=(u+(r=Math.imul(c,V))|0)+((8191&(n=(n=Math.imul(c,T))+Math.imul(B,V)|0))<<13)|0;u=((i=Math.imul(B,T))+(n>>>13)|0)+(dA>>>26)|0,dA&=67108863,r=Math.imul(Q,V),n=(n=Math.imul(Q,T))+Math.imul(I,V)|0,i=Math.imul(I,T);var hA=(u+(r=r+Math.imul(c,J)|0)|0)+((8191&(n=(n=n+Math.imul(c,O)|0)+Math.imul(B,J)|0))<<13)|0;u=((i=i+Math.imul(B,O)|0)+(n>>>13)|0)+(hA>>>26)|0,hA&=67108863,r=Math.imul(h,V),n=(n=Math.imul(h,T))+Math.imul(E,V)|0,i=Math.imul(E,T),r=r+Math.imul(Q,J)|0,n=(n=n+Math.imul(Q,O)|0)+Math.imul(I,J)|0,i=i+Math.imul(I,O)|0;var EA=(u+(r=r+Math.imul(c,j)|0)|0)+((8191&(n=(n=n+Math.imul(c,z)|0)+Math.imul(B,j)|0))<<13)|0;u=((i=i+Math.imul(B,z)|0)+(n>>>13)|0)+(EA>>>26)|0,EA&=67108863,r=Math.imul(C,V),n=(n=Math.imul(C,T))+Math.imul(p,V)|0,i=Math.imul(p,T),r=r+Math.imul(h,J)|0,n=(n=n+Math.imul(h,O)|0)+Math.imul(E,J)|0,i=i+Math.imul(E,O)|0,r=r+Math.imul(Q,j)|0,n=(n=n+Math.imul(Q,z)|0)+Math.imul(I,j)|0,i=i+Math.imul(I,z)|0;var fA=(u+(r=r+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,W)|0)+Math.imul(B,Z)|0))<<13)|0;u=((i=i+Math.imul(B,W)|0)+(n>>>13)|0)+(fA>>>26)|0,fA&=67108863,r=Math.imul(y,V),n=(n=Math.imul(y,T))+Math.imul(v,V)|0,i=Math.imul(v,T),r=r+Math.imul(C,J)|0,n=(n=n+Math.imul(C,O)|0)+Math.imul(p,J)|0,i=i+Math.imul(p,O)|0,r=r+Math.imul(h,j)|0,n=(n=n+Math.imul(h,z)|0)+Math.imul(E,j)|0,i=i+Math.imul(E,z)|0,r=r+Math.imul(Q,Z)|0,n=(n=n+Math.imul(Q,W)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0;var CA=(u+(r=r+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,AA)|0)+Math.imul(B,$)|0))<<13)|0;u=((i=i+Math.imul(B,AA)|0)+(n>>>13)|0)+(CA>>>26)|0,CA&=67108863,r=Math.imul(b,V),n=(n=Math.imul(b,T))+Math.imul(w,V)|0,i=Math.imul(w,T),r=r+Math.imul(y,J)|0,n=(n=n+Math.imul(y,O)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,O)|0,r=r+Math.imul(C,j)|0,n=(n=n+Math.imul(C,z)|0)+Math.imul(p,j)|0,i=i+Math.imul(p,z)|0,r=r+Math.imul(h,Z)|0,n=(n=n+Math.imul(h,W)|0)+Math.imul(E,Z)|0,i=i+Math.imul(E,W)|0,r=r+Math.imul(Q,$)|0,n=(n=n+Math.imul(Q,AA)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,AA)|0;var pA=(u+(r=r+Math.imul(c,tA)|0)|0)+((8191&(n=(n=n+Math.imul(c,rA)|0)+Math.imul(B,tA)|0))<<13)|0;u=((i=i+Math.imul(B,rA)|0)+(n>>>13)|0)+(pA>>>26)|0,pA&=67108863,r=Math.imul(U,V),n=(n=Math.imul(U,T))+Math.imul(S,V)|0,i=Math.imul(S,T),r=r+Math.imul(b,J)|0,n=(n=n+Math.imul(b,O)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,O)|0,r=r+Math.imul(y,j)|0,n=(n=n+Math.imul(y,z)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,z)|0,r=r+Math.imul(C,Z)|0,n=(n=n+Math.imul(C,W)|0)+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,AA)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,AA)|0,r=r+Math.imul(Q,tA)|0,n=(n=n+Math.imul(Q,rA)|0)+Math.imul(I,tA)|0,i=i+Math.imul(I,rA)|0;var mA=(u+(r=r+Math.imul(c,iA)|0)|0)+((8191&(n=(n=n+Math.imul(c,oA)|0)+Math.imul(B,iA)|0))<<13)|0;u=((i=i+Math.imul(B,oA)|0)+(n>>>13)|0)+(mA>>>26)|0,mA&=67108863,r=Math.imul(R,V),n=(n=Math.imul(R,T))+Math.imul(H,V)|0,i=Math.imul(H,T),r=r+Math.imul(U,J)|0,n=(n=n+Math.imul(U,O)|0)+Math.imul(S,J)|0,i=i+Math.imul(S,O)|0,r=r+Math.imul(b,j)|0,n=(n=n+Math.imul(b,z)|0)+Math.imul(w,j)|0,i=i+Math.imul(w,z)|0,r=r+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,AA)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,AA)|0,r=r+Math.imul(h,tA)|0,n=(n=n+Math.imul(h,rA)|0)+Math.imul(E,tA)|0,i=i+Math.imul(E,rA)|0,r=r+Math.imul(Q,iA)|0,n=(n=n+Math.imul(Q,oA)|0)+Math.imul(I,iA)|0,i=i+Math.imul(I,oA)|0;var yA=(u+(r=r+Math.imul(c,sA)|0)|0)+((8191&(n=(n=n+Math.imul(c,uA)|0)+Math.imul(B,sA)|0))<<13)|0;u=((i=i+Math.imul(B,uA)|0)+(n>>>13)|0)+(yA>>>26)|0,yA&=67108863,r=Math.imul(M,V),n=(n=Math.imul(M,T))+Math.imul(L,V)|0,i=Math.imul(L,T),r=r+Math.imul(R,J)|0,n=(n=n+Math.imul(R,O)|0)+Math.imul(H,J)|0,i=i+Math.imul(H,O)|0,r=r+Math.imul(U,j)|0,n=(n=n+Math.imul(U,z)|0)+Math.imul(S,j)|0,i=i+Math.imul(S,z)|0,r=r+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,W)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,AA)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,AA)|0,r=r+Math.imul(C,tA)|0,n=(n=n+Math.imul(C,rA)|0)+Math.imul(p,tA)|0,i=i+Math.imul(p,rA)|0,r=r+Math.imul(h,iA)|0,n=(n=n+Math.imul(h,oA)|0)+Math.imul(E,iA)|0,i=i+Math.imul(E,oA)|0,r=r+Math.imul(Q,sA)|0,n=(n=n+Math.imul(Q,uA)|0)+Math.imul(I,sA)|0,i=i+Math.imul(I,uA)|0;var vA=(u+(r=r+Math.imul(c,cA)|0)|0)+((8191&(n=(n=n+Math.imul(c,BA)|0)+Math.imul(B,cA)|0))<<13)|0;u=((i=i+Math.imul(B,BA)|0)+(n>>>13)|0)+(vA>>>26)|0,vA&=67108863,r=Math.imul(k,V),n=(n=Math.imul(k,T))+Math.imul(Y,V)|0,i=Math.imul(Y,T),r=r+Math.imul(M,J)|0,n=(n=n+Math.imul(M,O)|0)+Math.imul(L,J)|0,i=i+Math.imul(L,O)|0,r=r+Math.imul(R,j)|0,n=(n=n+Math.imul(R,z)|0)+Math.imul(H,j)|0,i=i+Math.imul(H,z)|0,r=r+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,W)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,AA)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,AA)|0,r=r+Math.imul(y,tA)|0,n=(n=n+Math.imul(y,rA)|0)+Math.imul(v,tA)|0,i=i+Math.imul(v,rA)|0,r=r+Math.imul(C,iA)|0,n=(n=n+Math.imul(C,oA)|0)+Math.imul(p,iA)|0,i=i+Math.imul(p,oA)|0,r=r+Math.imul(h,sA)|0,n=(n=n+Math.imul(h,uA)|0)+Math.imul(E,sA)|0,i=i+Math.imul(E,uA)|0,r=r+Math.imul(Q,cA)|0,n=(n=n+Math.imul(Q,BA)|0)+Math.imul(I,cA)|0,i=i+Math.imul(I,BA)|0;var DA=(u+(r=r+Math.imul(c,QA)|0)|0)+((8191&(n=(n=n+Math.imul(c,IA)|0)+Math.imul(B,QA)|0))<<13)|0;u=((i=i+Math.imul(B,IA)|0)+(n>>>13)|0)+(DA>>>26)|0,DA&=67108863,r=Math.imul(k,J),n=(n=Math.imul(k,O))+Math.imul(Y,J)|0,i=Math.imul(Y,O),r=r+Math.imul(M,j)|0,n=(n=n+Math.imul(M,z)|0)+Math.imul(L,j)|0,i=i+Math.imul(L,z)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,W)|0)+Math.imul(H,Z)|0,i=i+Math.imul(H,W)|0,r=r+Math.imul(U,$)|0,n=(n=n+Math.imul(U,AA)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,AA)|0,r=r+Math.imul(b,tA)|0,n=(n=n+Math.imul(b,rA)|0)+Math.imul(w,tA)|0,i=i+Math.imul(w,rA)|0,r=r+Math.imul(y,iA)|0,n=(n=n+Math.imul(y,oA)|0)+Math.imul(v,iA)|0,i=i+Math.imul(v,oA)|0,r=r+Math.imul(C,sA)|0,n=(n=n+Math.imul(C,uA)|0)+Math.imul(p,sA)|0,i=i+Math.imul(p,uA)|0,r=r+Math.imul(h,cA)|0,n=(n=n+Math.imul(h,BA)|0)+Math.imul(E,cA)|0,i=i+Math.imul(E,BA)|0;var bA=(u+(r=r+Math.imul(Q,QA)|0)|0)+((8191&(n=(n=n+Math.imul(Q,IA)|0)+Math.imul(I,QA)|0))<<13)|0;u=((i=i+Math.imul(I,IA)|0)+(n>>>13)|0)+(bA>>>26)|0,bA&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,z))+Math.imul(Y,j)|0,i=Math.imul(Y,z),r=r+Math.imul(M,Z)|0,n=(n=n+Math.imul(M,W)|0)+Math.imul(L,Z)|0,i=i+Math.imul(L,W)|0,r=r+Math.imul(R,$)|0,n=(n=n+Math.imul(R,AA)|0)+Math.imul(H,$)|0,i=i+Math.imul(H,AA)|0,r=r+Math.imul(U,tA)|0,n=(n=n+Math.imul(U,rA)|0)+Math.imul(S,tA)|0,i=i+Math.imul(S,rA)|0,r=r+Math.imul(b,iA)|0,n=(n=n+Math.imul(b,oA)|0)+Math.imul(w,iA)|0,i=i+Math.imul(w,oA)|0,r=r+Math.imul(y,sA)|0,n=(n=n+Math.imul(y,uA)|0)+Math.imul(v,sA)|0,i=i+Math.imul(v,uA)|0,r=r+Math.imul(C,cA)|0,n=(n=n+Math.imul(C,BA)|0)+Math.imul(p,cA)|0,i=i+Math.imul(p,BA)|0;var wA=(u+(r=r+Math.imul(h,QA)|0)|0)+((8191&(n=(n=n+Math.imul(h,IA)|0)+Math.imul(E,QA)|0))<<13)|0;u=((i=i+Math.imul(E,IA)|0)+(n>>>13)|0)+(wA>>>26)|0,wA&=67108863,r=Math.imul(k,Z),n=(n=Math.imul(k,W))+Math.imul(Y,Z)|0,i=Math.imul(Y,W),r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,AA)|0)+Math.imul(L,$)|0,i=i+Math.imul(L,AA)|0,r=r+Math.imul(R,tA)|0,n=(n=n+Math.imul(R,rA)|0)+Math.imul(H,tA)|0,i=i+Math.imul(H,rA)|0,r=r+Math.imul(U,iA)|0,n=(n=n+Math.imul(U,oA)|0)+Math.imul(S,iA)|0,i=i+Math.imul(S,oA)|0,r=r+Math.imul(b,sA)|0,n=(n=n+Math.imul(b,uA)|0)+Math.imul(w,sA)|0,i=i+Math.imul(w,uA)|0,r=r+Math.imul(y,cA)|0,n=(n=n+Math.imul(y,BA)|0)+Math.imul(v,cA)|0,i=i+Math.imul(v,BA)|0;var FA=(u+(r=r+Math.imul(C,QA)|0)|0)+((8191&(n=(n=n+Math.imul(C,IA)|0)+Math.imul(p,QA)|0))<<13)|0;u=((i=i+Math.imul(p,IA)|0)+(n>>>13)|0)+(FA>>>26)|0,FA&=67108863,r=Math.imul(k,$),n=(n=Math.imul(k,AA))+Math.imul(Y,$)|0,i=Math.imul(Y,AA),r=r+Math.imul(M,tA)|0,n=(n=n+Math.imul(M,rA)|0)+Math.imul(L,tA)|0,i=i+Math.imul(L,rA)|0,r=r+Math.imul(R,iA)|0,n=(n=n+Math.imul(R,oA)|0)+Math.imul(H,iA)|0,i=i+Math.imul(H,oA)|0,r=r+Math.imul(U,sA)|0,n=(n=n+Math.imul(U,uA)|0)+Math.imul(S,sA)|0,i=i+Math.imul(S,uA)|0,r=r+Math.imul(b,cA)|0,n=(n=n+Math.imul(b,BA)|0)+Math.imul(w,cA)|0,i=i+Math.imul(w,BA)|0;var UA=(u+(r=r+Math.imul(y,QA)|0)|0)+((8191&(n=(n=n+Math.imul(y,IA)|0)+Math.imul(v,QA)|0))<<13)|0;u=((i=i+Math.imul(v,IA)|0)+(n>>>13)|0)+(UA>>>26)|0,UA&=67108863,r=Math.imul(k,tA),n=(n=Math.imul(k,rA))+Math.imul(Y,tA)|0,i=Math.imul(Y,rA),r=r+Math.imul(M,iA)|0,n=(n=n+Math.imul(M,oA)|0)+Math.imul(L,iA)|0,i=i+Math.imul(L,oA)|0,r=r+Math.imul(R,sA)|0,n=(n=n+Math.imul(R,uA)|0)+Math.imul(H,sA)|0,i=i+Math.imul(H,uA)|0,r=r+Math.imul(U,cA)|0,n=(n=n+Math.imul(U,BA)|0)+Math.imul(S,cA)|0,i=i+Math.imul(S,BA)|0;var SA=(u+(r=r+Math.imul(b,QA)|0)|0)+((8191&(n=(n=n+Math.imul(b,IA)|0)+Math.imul(w,QA)|0))<<13)|0;u=((i=i+Math.imul(w,IA)|0)+(n>>>13)|0)+(SA>>>26)|0,SA&=67108863,r=Math.imul(k,iA),n=(n=Math.imul(k,oA))+Math.imul(Y,iA)|0,i=Math.imul(Y,oA),r=r+Math.imul(M,sA)|0,n=(n=n+Math.imul(M,uA)|0)+Math.imul(L,sA)|0,i=i+Math.imul(L,uA)|0,r=r+Math.imul(R,cA)|0,n=(n=n+Math.imul(R,BA)|0)+Math.imul(H,cA)|0,i=i+Math.imul(H,BA)|0;var NA=(u+(r=r+Math.imul(U,QA)|0)|0)+((8191&(n=(n=n+Math.imul(U,IA)|0)+Math.imul(S,QA)|0))<<13)|0;u=((i=i+Math.imul(S,IA)|0)+(n>>>13)|0)+(NA>>>26)|0,NA&=67108863,r=Math.imul(k,sA),n=(n=Math.imul(k,uA))+Math.imul(Y,sA)|0,i=Math.imul(Y,uA),r=r+Math.imul(M,cA)|0,n=(n=n+Math.imul(M,BA)|0)+Math.imul(L,cA)|0,i=i+Math.imul(L,BA)|0;var RA=(u+(r=r+Math.imul(R,QA)|0)|0)+((8191&(n=(n=n+Math.imul(R,IA)|0)+Math.imul(H,QA)|0))<<13)|0;u=((i=i+Math.imul(H,IA)|0)+(n>>>13)|0)+(RA>>>26)|0,RA&=67108863,r=Math.imul(k,cA),n=(n=Math.imul(k,BA))+Math.imul(Y,cA)|0,i=Math.imul(Y,BA);var HA=(u+(r=r+Math.imul(M,QA)|0)|0)+((8191&(n=(n=n+Math.imul(M,IA)|0)+Math.imul(L,QA)|0))<<13)|0;u=((i=i+Math.imul(L,IA)|0)+(n>>>13)|0)+(HA>>>26)|0,HA&=67108863;var GA=(u+(r=Math.imul(k,QA))|0)+((8191&(n=(n=Math.imul(k,IA))+Math.imul(Y,QA)|0))<<13)|0;return u=((i=Math.imul(Y,IA))+(n>>>13)|0)+(GA>>>26)|0,GA&=67108863,s[0]=dA,s[1]=hA,s[2]=EA,s[3]=fA,s[4]=CA,s[5]=pA,s[6]=mA,s[7]=yA,s[8]=vA,s[9]=DA,s[10]=bA,s[11]=wA,s[12]=FA,s[13]=UA,s[14]=SA,s[15]=NA,s[16]=RA,s[17]=HA,s[18]=GA,0!==u&&(s[19]=u,t.length++),t};function I(A,e,t){return(new d).mulp(A,e,t)}function d(A,e){this.x=A,this.y=e}Math.imul||(Q=l),i.prototype.mulTo=function(A,e){var t,r=this.length+A.length;return t=10===this.length&&10===A.length?Q(this,A,e):r<63?l(this,A,e):r<1024?function(A,e,t){t.negative=e.negative^A.negative,t.length=A.length+e.length;for(var r=0,n=0,i=0;i>>26)|0)>>>26,o&=67108863}t.words[i]=a,r=o,o=n}return 0!==r?t.words[i]=r:t.length--,t.strip()}(this,A,e):I(this,A,e),t},d.prototype.makeRBT=function(A){for(var e=new Array(A),t=i.prototype._countBits(A)-1,r=0;r>=1;return r},d.prototype.permute=function(A,e,t,r,n,i){for(var o=0;o>>=1)n++;return 1<>>=13,t[2*o+1]=8191&i,i>>>=13;for(o=2*e;o>=26,e+=n/67108864|0,e+=i>>>26,this.words[t]=67108863&i}return 0!==e&&(this.words[t]=e,this.length++),this},i.prototype.muln=function(A){return this.clone().imuln(A)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(A){var e=function(A){for(var e=new Array(A.bitLength()),t=0;t>>n}return e}(A);if(0===e.length)return new i(1);for(var t=this,r=0;r=0);var e,t=A%26,n=(A-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(e=0;e>>26-t}o&&(this.words[e]=o,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var i=A%26,o=Math.min((A-i)/26,this.length),a=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==g||u>=n);u--){var c=0|this.words[u];this.words[u]=g<<26-i|c>>>i,g=c&a}return s&&0!==g&&(s.words[s.length++]=g),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(A,e,t){return r(0===this.negative),this.iushrn(A,e,t)},i.prototype.shln=function(A){return this.clone().ishln(A)},i.prototype.ushln=function(A){return this.clone().iushln(A)},i.prototype.shrn=function(A){return this.clone().ishrn(A)},i.prototype.ushrn=function(A){return this.clone().iushrn(A)},i.prototype.testn=function(A){r("number"==typeof A&&A>=0);var e=A%26,t=(A-e)/26,n=1<=0);var e=A%26,t=(A-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==e&&t++,this.length=Math.min(t,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},i.prototype.isubn=function(A){if(r("number"==typeof A),r(A<67108864),A<0)return this.iaddn(-A);if(0!==this.negative)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(s/67108864|0),this.words[n+t]=67108863&i}for(;n>26,this.words[n+t]=67108863&i;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(A,e){var t=(this.length,A.length),r=this.clone(),n=A,o=0|n.words[n.length-1];0!=(t=26-this._countBits(o))&&(n=n.ushln(t),r.iushln(t),o=0|n.words[n.length-1]);var a,s=r.length-n.length;if("mod"!==e){(a=new i(null)).length=s+1,a.words=new Array(a.length);for(var u=0;u=0;c--){var B=67108864*(0|r.words[n.length+c])+(0|r.words[n.length+c-1]);for(B=Math.min(B/o|0,67108863),r._ishlnsubmul(n,B,c);0!==r.negative;)B--,r.negative=0,r._ishlnsubmul(n,1,c),r.isZero()||(r.negative^=1);a&&(a.words[c]=B)}return a&&a.strip(),r.strip(),"div"!==e&&0!==t&&r.iushrn(t),{div:a||null,mod:r}},i.prototype.divmod=function(A,e,t){return r(!A.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===A.negative?(a=this.neg().divmod(A,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(o=a.mod.neg(),t&&0!==o.negative&&o.iadd(A)),{div:n,mod:o}):0===this.negative&&0!==A.negative?(a=this.divmod(A.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!=(this.negative&A.negative)?(a=this.neg().divmod(A.neg(),e),"div"!==e&&(o=a.mod.neg(),t&&0!==o.negative&&o.isub(A)),{div:a.div,mod:o}):A.length>this.length||this.cmp(A)<0?{div:new i(0),mod:this}:1===A.length?"div"===e?{div:this.divn(A.words[0]),mod:null}:"mod"===e?{div:null,mod:new i(this.modn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new i(this.modn(A.words[0]))}:this._wordDiv(A,e);var n,o,a},i.prototype.div=function(A){return this.divmod(A,"div",!1).div},i.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},i.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},i.prototype.divRound=function(A){var e=this.divmod(A);if(e.mod.isZero())return e.div;var t=0!==e.div.negative?e.mod.isub(A):e.mod,r=A.ushrn(1),n=A.andln(1),i=t.cmp(r);return i<0||1===n&&0===i?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},i.prototype.modn=function(A){r(A<=67108863);for(var e=(1<<26)%A,t=0,n=this.length-1;n>=0;n--)t=(e*t+(0|this.words[n]))%A;return t},i.prototype.idivn=function(A){r(A<=67108863);for(var e=0,t=this.length-1;t>=0;t--){var n=(0|this.words[t])+67108864*e;this.words[t]=n/A|0,e=n%A}return this.strip()},i.prototype.divn=function(A){return this.clone().idivn(A)},i.prototype.egcd=function(A){r(0===A.negative),r(!A.isZero());var e=this,t=A.clone();e=0!==e.negative?e.umod(A):e.clone();for(var n=new i(1),o=new i(0),a=new i(0),s=new i(1),u=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++u;for(var g=t.clone(),c=e.clone();!e.isZero();){for(var B=0,l=1;0==(e.words[0]&l)&&B<26;++B,l<<=1);if(B>0)for(e.iushrn(B);B-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(g),o.isub(c)),n.iushrn(1),o.iushrn(1);for(var Q=0,I=1;0==(t.words[0]&I)&&Q<26;++Q,I<<=1);if(Q>0)for(t.iushrn(Q);Q-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(g),s.isub(c)),a.iushrn(1),s.iushrn(1);e.cmp(t)>=0?(e.isub(t),n.isub(a),o.isub(s)):(t.isub(e),a.isub(n),s.isub(o))}return{a,b:s,gcd:t.iushln(u)}},i.prototype._invmp=function(A){r(0===A.negative),r(!A.isZero());var e=this,t=A.clone();e=0!==e.negative?e.umod(A):e.clone();for(var n,o=new i(1),a=new i(0),s=t.clone();e.cmpn(1)>0&&t.cmpn(1)>0;){for(var u=0,g=1;0==(e.words[0]&g)&&u<26;++u,g<<=1);if(u>0)for(e.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var c=0,B=1;0==(t.words[0]&B)&&c<26;++c,B<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);e.cmp(t)>=0?(e.isub(t),o.isub(a)):(t.isub(e),a.isub(o))}return(n=0===e.cmpn(1)?o:a).cmpn(0)<0&&n.iadd(A),n},i.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var e=this.clone(),t=A.clone();e.negative=0,t.negative=0;for(var r=0;e.isEven()&&t.isEven();r++)e.iushrn(1),t.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;t.isEven();)t.iushrn(1);var n=e.cmp(t);if(n<0){var i=e;e=t,t=i}else if(0===n||0===t.cmpn(1))break;e.isub(t)}return t.iushln(r)},i.prototype.invm=function(A){return this.egcd(A).a.umod(A)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(A){return this.words[0]&A},i.prototype.bincn=function(A){r("number"==typeof A);var e=A%26,t=(A-e)/26,n=1<>>26,a&=67108863,this.words[o]=a}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(A){var e,t=A<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)e=1;else{t&&(A=-A),r(A<=67108863,"Number is too big");var n=0|this.words[0];e=n===A?0:nA.length)return 1;if(this.length=0;t--){var r=0|this.words[t],n=0|A.words[t];if(r!==n){rn&&(e=1);break}}return e},i.prototype.gtn=function(A){return 1===this.cmpn(A)},i.prototype.gt=function(A){return 1===this.cmp(A)},i.prototype.gten=function(A){return this.cmpn(A)>=0},i.prototype.gte=function(A){return this.cmp(A)>=0},i.prototype.ltn=function(A){return-1===this.cmpn(A)},i.prototype.lt=function(A){return-1===this.cmp(A)},i.prototype.lten=function(A){return this.cmpn(A)<=0},i.prototype.lte=function(A){return this.cmp(A)<=0},i.prototype.eqn=function(A){return 0===this.cmpn(A)},i.prototype.eq=function(A){return 0===this.cmp(A)},i.red=function(A){return new y(A)},i.prototype.toRed=function(A){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),A.convertTo(this)._forceRed(A)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(A){return this.red=A,this},i.prototype.forceRed=function(A){return r(!this.red,"Already a number in reduction context"),this._forceRed(A)},i.prototype.redAdd=function(A){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},i.prototype.redIAdd=function(A){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},i.prototype.redSub=function(A){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},i.prototype.redISub=function(A){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},i.prototype.redShl=function(A){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},i.prototype.redMul=function(A){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},i.prototype.redIMul=function(A){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(A){return r(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var h={k256:null,p224:null,p192:null,p25519:null};function E(A,e){this.name=A,this.p=new i(e,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function f(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function C(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function p(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(A){if("string"==typeof A){var e=i._prime(A);this.m=e.p,this.prime=e}else r(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}function v(A){y.call(this,A),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}E.prototype._tmp=function(){var A=new i(null);return A.words=new Array(Math.ceil(this.n/13)),A},E.prototype.ireduce=function(A){var e,t=A;do{this.split(t,this.tmp),e=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},E.prototype.split=function(A,e){A.iushrn(this.n,0,e)},E.prototype.imulK=function(A){return A.imul(this.k)},n(f,E),f.prototype.split=function(A,e){for(var t=4194303,r=Math.min(A.length,9),n=0;n>>22,i=o}i>>>=22,A.words[n-10]=i,0===i&&A.length>10?A.length-=10:A.length-=9},f.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var e=0,t=0;t>>=26,A.words[t]=n,e=r}return 0!==e&&(A.words[A.length++]=e),A},i._prime=function(A){if(h[A])return h[A];var e;if("k256"===A)e=new f;else if("p224"===A)e=new C;else if("p192"===A)e=new p;else{if("p25519"!==A)throw new Error("Unknown prime "+A);e=new m}return h[A]=e,e},y.prototype._verify1=function(A){r(0===A.negative,"red works only with positives"),r(A.red,"red works only with red numbers")},y.prototype._verify2=function(A,e){r(0==(A.negative|e.negative),"red works only with positives"),r(A.red&&A.red===e.red,"red works only with red numbers")},y.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):A.umod(this.m)._forceRed(this)},y.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},y.prototype.add=function(A,e){this._verify2(A,e);var t=A.add(e);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},y.prototype.iadd=function(A,e){this._verify2(A,e);var t=A.iadd(e);return t.cmp(this.m)>=0&&t.isub(this.m),t},y.prototype.sub=function(A,e){this._verify2(A,e);var t=A.sub(e);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},y.prototype.isub=function(A,e){this._verify2(A,e);var t=A.isub(e);return t.cmpn(0)<0&&t.iadd(this.m),t},y.prototype.shl=function(A,e){return this._verify1(A),this.imod(A.ushln(e))},y.prototype.imul=function(A,e){return this._verify2(A,e),this.imod(A.imul(e))},y.prototype.mul=function(A,e){return this._verify2(A,e),this.imod(A.mul(e))},y.prototype.isqr=function(A){return this.imul(A,A.clone())},y.prototype.sqr=function(A){return this.mul(A,A)},y.prototype.sqrt=function(A){if(A.isZero())return A.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var t=this.m.add(new i(1)).iushrn(2);return this.pow(A,t)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);r(!n.isZero());var a=new i(1).toRed(this),s=a.redNeg(),u=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new i(2*g*g).toRed(this);0!==this.pow(g,u).cmp(s);)g.redIAdd(s);for(var c=this.pow(g,n),B=this.pow(A,n.addn(1).iushrn(1)),l=this.pow(A,n),Q=o;0!==l.cmp(a);){for(var I=l,d=0;0!==I.cmp(a);d++)I=I.redSqr();r(d=0;r--){for(var u=e.words[r],g=s-1;g>=0;g--){var c=u>>g&1;n!==t[0]&&(n=this.sqr(n)),0!==c||0!==o?(o<<=1,o|=c,(4==++a||0===r&&0===g)&&(n=this.mul(n,t[o]),a=0,o=0)):a=0}s=26}return n},y.prototype.convertTo=function(A){var e=A.umod(this.m);return e===A?e.clone():e},y.prototype.convertFrom=function(A){var e=A.clone();return e.red=null,e},i.mont=function(A){return new v(A)},n(v,y),v.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},v.prototype.convertFrom=function(A){var e=this.imod(A.mul(this.rinv));return e.red=null,e},v.prototype.imul=function(A,e){if(A.isZero()||e.isZero())return A.words[0]=0,A.length=1,A;var t=A.imul(e),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),i=n;return n.cmp(this.m)>=0?i=n.isub(this.m):n.cmpn(0)<0&&(i=n.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(A,e){if(A.isZero()||e.isZero())return new i(0)._forceRed(this);var t=A.mul(e),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},v.prototype.invm=function(A){return this.imod(A._invmp(this.m).mul(this.r2))._forceRed(this)}}(A=t.nmd(A),this)},6266:(A,e,t)=>{"use strict";var r=e;r.version=t(8597).i8,r.utils=t(953),r.rand=t(9931),r.curve=t(8254),r.curves=t(5427),r.ec=t(7954),r.eddsa=t(5980)},4918:(A,e,t)=>{"use strict";var r=t(3785),n=t(953),i=n.getNAF,o=n.getJSF,a=n.assert;function s(A,e){this.type=A,this.p=new r(e.p,16),this.red=e.prime?r.red(e.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=e.n&&new r(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var t=this.n&&this.p.div(this.n);!t||t.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(A,e){this.curve=A,this.type=e,this.precomputed=null}A.exports=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(A,e){a(A.precomputed);var t=A._getDoubles(),r=i(e,1,this._bitLength),n=(1<=o;g--)s=(s<<1)+r[g];u.push(s)}for(var c=this.jpoint(null,null,null),B=this.jpoint(null,null,null),l=n;l>0;l--){for(o=0;o=0;u--){for(var g=0;u>=0&&0===o[u];u--)g++;if(u>=0&&g++,s=s.dblp(g),u<0)break;var c=o[u];a(0!==c),s="affine"===A.type?c>0?s.mixedAdd(n[c-1>>1]):s.mixedAdd(n[-c-1>>1].neg()):c>0?s.add(n[c-1>>1]):s.add(n[-c-1>>1].neg())}return"affine"===A.type?s.toP():s},s.prototype._wnafMulAdd=function(A,e,t,r,n){var a,s,u,g=this._wnafT1,c=this._wnafT2,B=this._wnafT3,l=0;for(a=0;a=1;a-=2){var I=a-1,d=a;if(1===g[I]&&1===g[d]){var h=[e[I],null,null,e[d]];0===e[I].y.cmp(e[d].y)?(h[1]=e[I].add(e[d]),h[2]=e[I].toJ().mixedAdd(e[d].neg())):0===e[I].y.cmp(e[d].y.redNeg())?(h[1]=e[I].toJ().mixedAdd(e[d]),h[2]=e[I].add(e[d].neg())):(h[1]=e[I].toJ().mixedAdd(e[d]),h[2]=e[I].toJ().mixedAdd(e[d].neg()));var E=[-3,-1,-5,-7,0,7,5,1,3],f=o(t[I],t[d]);for(l=Math.max(f[0].length,l),B[I]=new Array(l),B[d]=new Array(l),s=0;s=0;a--){for(var v=0;a>=0;){var D=!0;for(s=0;s=0&&v++,m=m.dblp(v),a<0)break;for(s=0;s0?u=c[s][b-1>>1]:b<0&&(u=c[s][-b-1>>1].neg()),m="affine"===u.type?m.mixedAdd(u):m.add(u))}}for(a=0;a=Math.ceil((A.bitLength()+1)/e.step)},u.prototype._getDoubles=function(A,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var t=[this],r=this,n=0;n{"use strict";var r=t(953),n=t(3785),i=t(5717),o=t(4918),a=r.assert;function s(A){this.twisted=1!=(0|A.a),this.mOneA=this.twisted&&-1==(0|A.a),this.extended=this.mOneA,o.call(this,"edwards",A),this.a=new n(A.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new n(A.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new n(A.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|A.c)}function u(A,e,t,r,i){o.BasePoint.call(this,A,"projective"),null===e&&null===t&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new n(e,16),this.y=new n(t,16),this.z=r?new n(r,16):this.curve.one,this.t=i&&new n(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}i(s,o),A.exports=s,s.prototype._mulA=function(A){return this.mOneA?A.redNeg():this.a.redMul(A)},s.prototype._mulC=function(A){return this.oneC?A:this.c.redMul(A)},s.prototype.jpoint=function(A,e,t,r){return this.point(A,e,t,r)},s.prototype.pointFromX=function(A,e){(A=new n(A,16)).red||(A=A.toRed(this.red));var t=A.redSqr(),r=this.c2.redSub(this.a.redMul(t)),i=this.one.redSub(this.c2.redMul(this.d).redMul(t)),o=r.redMul(i.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var s=a.fromRed().isOdd();return(e&&!s||!e&&s)&&(a=a.redNeg()),this.point(A,a)},s.prototype.pointFromY=function(A,e){(A=new n(A,16)).red||(A=A.toRed(this.red));var t=A.redSqr(),r=t.redSub(this.c2),i=t.redMul(this.d).redMul(this.c2).redSub(this.a),o=r.redMul(i.redInvm());if(0===o.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,A)}var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==e&&(a=a.redNeg()),this.point(a,A)},s.prototype.validate=function(A){if(A.isInfinity())return!0;A.normalize();var e=A.x.redSqr(),t=A.y.redSqr(),r=e.redMul(this.a).redAdd(t),n=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(t)));return 0===r.cmp(n)},i(u,o.BasePoint),s.prototype.pointFromJSON=function(A){return u.fromJSON(this,A)},s.prototype.point=function(A,e,t,r){return new u(this,A,e,t,r)},u.fromJSON=function(A,e){return new u(A,e[0],e[1],e[2])},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var A=this.x.redSqr(),e=this.y.redSqr(),t=this.z.redSqr();t=t.redIAdd(t);var r=this.curve._mulA(A),n=this.x.redAdd(this.y).redSqr().redISub(A).redISub(e),i=r.redAdd(e),o=i.redSub(t),a=r.redSub(e),s=n.redMul(o),u=i.redMul(a),g=n.redMul(a),c=o.redMul(i);return this.curve.point(s,u,c,g)},u.prototype._projDbl=function(){var A,e,t,r,n,i,o=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),s=this.y.redSqr();if(this.curve.twisted){var u=(r=this.curve._mulA(a)).redAdd(s);this.zOne?(A=o.redSub(a).redSub(s).redMul(u.redSub(this.curve.two)),e=u.redMul(r.redSub(s)),t=u.redSqr().redSub(u).redSub(u)):(n=this.z.redSqr(),i=u.redSub(n).redISub(n),A=o.redSub(a).redISub(s).redMul(i),e=u.redMul(r.redSub(s)),t=u.redMul(i))}else r=a.redAdd(s),n=this.curve._mulC(this.z).redSqr(),i=r.redSub(n).redSub(n),A=this.curve._mulC(o.redISub(r)).redMul(i),e=this.curve._mulC(r).redMul(a.redISub(s)),t=r.redMul(i);return this.curve.point(A,e,t)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(A){var e=this.y.redSub(this.x).redMul(A.y.redSub(A.x)),t=this.y.redAdd(this.x).redMul(A.y.redAdd(A.x)),r=this.t.redMul(this.curve.dd).redMul(A.t),n=this.z.redMul(A.z.redAdd(A.z)),i=t.redSub(e),o=n.redSub(r),a=n.redAdd(r),s=t.redAdd(e),u=i.redMul(o),g=a.redMul(s),c=i.redMul(s),B=o.redMul(a);return this.curve.point(u,g,B,c)},u.prototype._projAdd=function(A){var e,t,r=this.z.redMul(A.z),n=r.redSqr(),i=this.x.redMul(A.x),o=this.y.redMul(A.y),a=this.curve.d.redMul(i).redMul(o),s=n.redSub(a),u=n.redAdd(a),g=this.x.redAdd(this.y).redMul(A.x.redAdd(A.y)).redISub(i).redISub(o),c=r.redMul(s).redMul(g);return this.curve.twisted?(e=r.redMul(u).redMul(o.redSub(this.curve._mulA(i))),t=s.redMul(u)):(e=r.redMul(u).redMul(o.redSub(i)),t=this.curve._mulC(s).redMul(u)),this.curve.point(c,e,t)},u.prototype.add=function(A){return this.isInfinity()?A:A.isInfinity()?this:this.curve.extended?this._extAdd(A):this._projAdd(A)},u.prototype.mul=function(A){return this._hasDoubles(A)?this.curve._fixedNafMul(this,A):this.curve._wnafMul(this,A)},u.prototype.mulAdd=function(A,e,t){return this.curve._wnafMulAdd(1,[this,e],[A,t],2,!1)},u.prototype.jmulAdd=function(A,e,t){return this.curve._wnafMulAdd(1,[this,e],[A,t],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var A=this.z.redInvm();return this.x=this.x.redMul(A),this.y=this.y.redMul(A),this.t&&(this.t=this.t.redMul(A)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(A){return this===A||0===this.getX().cmp(A.getX())&&0===this.getY().cmp(A.getY())},u.prototype.eqXToP=function(A){var e=A.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var t=A.clone(),r=this.curve.redN.redMul(this.z);;){if(t.iadd(this.curve.n),t.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(r),0===this.x.cmp(e))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},8254:(A,e,t)=>{"use strict";var r=e;r.base=t(4918),r.short=t(6673),r.mont=t(2881),r.edwards=t(1138)},2881:(A,e,t)=>{"use strict";var r=t(3785),n=t(5717),i=t(4918),o=t(953);function a(A){i.call(this,"mont",A),this.a=new r(A.a,16).toRed(this.red),this.b=new r(A.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function s(A,e,t){i.BasePoint.call(this,A,"projective"),null===e&&null===t?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(e,16),this.z=new r(t,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(a,i),A.exports=a,a.prototype.validate=function(A){var e=A.normalize().x,t=e.redSqr(),r=t.redMul(e).redAdd(t.redMul(this.a)).redAdd(e);return 0===r.redSqrt().redSqr().cmp(r)},n(s,i.BasePoint),a.prototype.decodePoint=function(A,e){return this.point(o.toArray(A,e),1)},a.prototype.point=function(A,e){return new s(this,A,e)},a.prototype.pointFromJSON=function(A){return s.fromJSON(this,A)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(A,e){return new s(A,e[0],e[1]||A.one)},s.prototype.inspect=function(){return this.isInfinity()?"":""},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},s.prototype.dbl=function(){var A=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),t=A.redSub(e),r=A.redMul(e),n=t.redMul(e.redAdd(this.curve.a24.redMul(t)));return this.curve.point(r,n)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(A,e){var t=this.x.redAdd(this.z),r=this.x.redSub(this.z),n=A.x.redAdd(A.z),i=A.x.redSub(A.z).redMul(t),o=n.redMul(r),a=e.z.redMul(i.redAdd(o).redSqr()),s=e.x.redMul(i.redISub(o).redSqr());return this.curve.point(a,s)},s.prototype.mul=function(A){for(var e=A.clone(),t=this,r=this.curve.point(null,null),n=[];0!==e.cmpn(0);e.iushrn(1))n.push(e.andln(1));for(var i=n.length-1;i>=0;i--)0===n[i]?(t=t.diffAdd(r,this),r=r.dbl()):(r=t.diffAdd(r,this),t=t.dbl());return r},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(A){return 0===this.getX().cmp(A.getX())},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},6673:(A,e,t)=>{"use strict";var r=t(953),n=t(3785),i=t(5717),o=t(4918),a=r.assert;function s(A){o.call(this,"short",A),this.a=new n(A.a,16).toRed(this.red),this.b=new n(A.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(A),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function u(A,e,t,r){o.BasePoint.call(this,A,"affine"),null===e&&null===t?(this.x=null,this.y=null,this.inf=!0):(this.x=new n(e,16),this.y=new n(t,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function g(A,e,t,r){o.BasePoint.call(this,A,"jacobian"),null===e&&null===t&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new n(0)):(this.x=new n(e,16),this.y=new n(t,16),this.z=new n(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}i(s,o),A.exports=s,s.prototype._getEndomorphism=function(A){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,t;if(A.beta)e=new n(A.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);e=(e=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(A.lambda)t=new n(A.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(e))?t=i[0]:(t=i[1],a(0===this.g.mul(t).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:t,basis:A.basis?A.basis.map((function(A){return{a:new n(A.a,16),b:new n(A.b,16)}})):this._getEndoBasis(t)}}},s.prototype._getEndoRoots=function(A){var e=A===this.p?this.red:n.mont(A),t=new n(2).toRed(e).redInvm(),r=t.redNeg(),i=new n(3).toRed(e).redNeg().redSqrt().redMul(t);return[r.redAdd(i).fromRed(),r.redSub(i).fromRed()]},s.prototype._getEndoBasis=function(A){for(var e,t,r,i,o,a,s,u,g,c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),B=A,l=this.n.clone(),Q=new n(1),I=new n(0),d=new n(0),h=new n(1),E=0;0!==B.cmpn(0);){var f=l.div(B);u=l.sub(f.mul(B)),g=d.sub(f.mul(Q));var C=h.sub(f.mul(I));if(!r&&u.cmp(c)<0)e=s.neg(),t=Q,r=u.neg(),i=g;else if(r&&2==++E)break;s=u,l=B,B=u,d=Q,Q=g,h=I,I=C}o=u.neg(),a=g;var p=r.sqr().add(i.sqr());return o.sqr().add(a.sqr()).cmp(p)>=0&&(o=e,a=t),r.negative&&(r=r.neg(),i=i.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:r,b:i},{a:o,b:a}]},s.prototype._endoSplit=function(A){var e=this.endo.basis,t=e[0],r=e[1],n=r.b.mul(A).divRound(this.n),i=t.b.neg().mul(A).divRound(this.n),o=n.mul(t.a),a=i.mul(r.a),s=n.mul(t.b),u=i.mul(r.b);return{k1:A.sub(o).sub(a),k2:s.add(u).neg()}},s.prototype.pointFromX=function(A,e){(A=new n(A,16)).red||(A=A.toRed(this.red));var t=A.redSqr().redMul(A).redIAdd(A.redMul(this.a)).redIAdd(this.b),r=t.redSqrt();if(0!==r.redSqr().redSub(t).cmp(this.zero))throw new Error("invalid point");var i=r.fromRed().isOdd();return(e&&!i||!e&&i)&&(r=r.redNeg()),this.point(A,r)},s.prototype.validate=function(A){if(A.inf)return!0;var e=A.x,t=A.y,r=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(r).redIAdd(this.b);return 0===t.redSqr().redISub(n).cmpn(0)},s.prototype._endoWnafMulAdd=function(A,e,t){for(var r=this._endoWnafT1,n=this._endoWnafT2,i=0;i":""},u.prototype.isInfinity=function(){return this.inf},u.prototype.add=function(A){if(this.inf)return A;if(A.inf)return this;if(this.eq(A))return this.dbl();if(this.neg().eq(A))return this.curve.point(null,null);if(0===this.x.cmp(A.x))return this.curve.point(null,null);var e=this.y.redSub(A.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(A.x).redInvm()));var t=e.redSqr().redISub(this.x).redISub(A.x),r=e.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,r)},u.prototype.dbl=function(){if(this.inf)return this;var A=this.y.redAdd(this.y);if(0===A.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,t=this.x.redSqr(),r=A.redInvm(),n=t.redAdd(t).redIAdd(t).redIAdd(e).redMul(r),i=n.redSqr().redISub(this.x.redAdd(this.x)),o=n.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,o)},u.prototype.getX=function(){return this.x.fromRed()},u.prototype.getY=function(){return this.y.fromRed()},u.prototype.mul=function(A){return A=new n(A,16),this.isInfinity()?this:this._hasDoubles(A)?this.curve._fixedNafMul(this,A):this.curve.endo?this.curve._endoWnafMulAdd([this],[A]):this.curve._wnafMul(this,A)},u.prototype.mulAdd=function(A,e,t){var r=[this,e],n=[A,t];return this.curve.endo?this.curve._endoWnafMulAdd(r,n):this.curve._wnafMulAdd(1,r,n,2)},u.prototype.jmulAdd=function(A,e,t){var r=[this,e],n=[A,t];return this.curve.endo?this.curve._endoWnafMulAdd(r,n,!0):this.curve._wnafMulAdd(1,r,n,2,!0)},u.prototype.eq=function(A){return this===A||this.inf===A.inf&&(this.inf||0===this.x.cmp(A.x)&&0===this.y.cmp(A.y))},u.prototype.neg=function(A){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(A&&this.precomputed){var t=this.precomputed,r=function(A){return A.neg()};e.precomputed={naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(r)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(r)}}}return e},u.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},i(g,o.BasePoint),s.prototype.jpoint=function(A,e,t){return new g(this,A,e,t)},g.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var A=this.z.redInvm(),e=A.redSqr(),t=this.x.redMul(e),r=this.y.redMul(e).redMul(A);return this.curve.point(t,r)},g.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},g.prototype.add=function(A){if(this.isInfinity())return A;if(A.isInfinity())return this;var e=A.z.redSqr(),t=this.z.redSqr(),r=this.x.redMul(e),n=A.x.redMul(t),i=this.y.redMul(e.redMul(A.z)),o=A.y.redMul(t.redMul(this.z)),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),g=u.redMul(a),c=r.redMul(u),B=s.redSqr().redIAdd(g).redISub(c).redISub(c),l=s.redMul(c.redISub(B)).redISub(i.redMul(g)),Q=this.z.redMul(A.z).redMul(a);return this.curve.jpoint(B,l,Q)},g.prototype.mixedAdd=function(A){if(this.isInfinity())return A.toJ();if(A.isInfinity())return this;var e=this.z.redSqr(),t=this.x,r=A.x.redMul(e),n=this.y,i=A.y.redMul(e).redMul(this.z),o=t.redSub(r),a=n.redSub(i);if(0===o.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=o.redSqr(),u=s.redMul(o),g=t.redMul(s),c=a.redSqr().redIAdd(u).redISub(g).redISub(g),B=a.redMul(g.redISub(c)).redISub(n.redMul(u)),l=this.z.redMul(o);return this.curve.jpoint(c,B,l)},g.prototype.dblp=function(A){if(0===A)return this;if(this.isInfinity())return this;if(!A)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var t=this;for(e=0;e=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},g.prototype.inspect=function(){return this.isInfinity()?"":""},g.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},5427:(A,e,t)=>{"use strict";var r,n=e,i=t(3715),o=t(8254),a=t(953).assert;function s(A){"short"===A.type?this.curve=new o.short(A):"edwards"===A.type?this.curve=new o.edwards(A):this.curve=new o.mont(A),this.g=this.curve.g,this.n=this.curve.n,this.hash=A.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(A,e){Object.defineProperty(n,A,{configurable:!0,enumerable:!0,get:function(){var t=new s(e);return Object.defineProperty(n,A,{configurable:!0,enumerable:!0,value:t}),t}})}n.PresetCurve=s,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:i.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:i.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=t(1037)}catch(A){r=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},7954:(A,e,t)=>{"use strict";var r=t(3785),n=t(2156),i=t(953),o=t(5427),a=t(9931),s=i.assert,u=t(1251),g=t(611);function c(A){if(!(this instanceof c))return new c(A);"string"==typeof A&&(s(Object.prototype.hasOwnProperty.call(o,A),"Unknown curve "+A),A=o[A]),A instanceof o.PresetCurve&&(A={curve:A}),this.curve=A.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=A.curve.g,this.g.precompute(A.curve.n.bitLength()+1),this.hash=A.hash||A.curve.hash}A.exports=c,c.prototype.keyPair=function(A){return new u(this,A)},c.prototype.keyFromPrivate=function(A,e){return u.fromPrivate(this,A,e)},c.prototype.keyFromPublic=function(A,e){return u.fromPublic(this,A,e)},c.prototype.genKeyPair=function(A){A||(A={});for(var e=new n({hash:this.hash,pers:A.pers,persEnc:A.persEnc||"utf8",entropy:A.entropy||a(this.hash.hmacStrength),entropyEnc:A.entropy&&A.entropyEnc||"utf8",nonce:this.n.toArray()}),t=this.n.byteLength(),i=this.n.sub(new r(2));;){var o=new r(e.generate(t));if(!(o.cmp(i)>0))return o.iaddn(1),this.keyFromPrivate(o)}},c.prototype._truncateToN=function(A,e){var t=8*A.byteLength()-this.n.bitLength();return t>0&&(A=A.ushrn(t)),!e&&A.cmp(this.n)>=0?A.sub(this.n):A},c.prototype.sign=function(A,e,t,i){"object"==typeof t&&(i=t,t=null),i||(i={}),e=this.keyFromPrivate(e,t),A=this._truncateToN(new r(A,16));for(var o=this.n.byteLength(),a=e.getPrivate().toArray("be",o),s=A.toArray("be",o),u=new n({hash:this.hash,entropy:a,nonce:s,pers:i.pers,persEnc:i.persEnc||"utf8"}),c=this.n.sub(new r(1)),B=0;;B++){var l=i.k?i.k(B):new r(u.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(c)>=0)){var Q=this.g.mul(l);if(!Q.isInfinity()){var I=Q.getX(),d=I.umod(this.n);if(0!==d.cmpn(0)){var h=l.invm(this.n).mul(d.mul(e.getPrivate()).iadd(A));if(0!==(h=h.umod(this.n)).cmpn(0)){var E=(Q.getY().isOdd()?1:0)|(0!==I.cmp(d)?2:0);return i.canonical&&h.cmp(this.nh)>0&&(h=this.n.sub(h),E^=1),new g({r:d,s:h,recoveryParam:E})}}}}}},c.prototype.verify=function(A,e,t,n){A=this._truncateToN(new r(A,16)),t=this.keyFromPublic(t,n);var i=(e=new g(e,"hex")).r,o=e.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a,s=o.invm(this.n),u=s.mul(A).umod(this.n),c=s.mul(i).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(u,t.getPublic(),c)).isInfinity()&&a.eqXToP(i):!(a=this.g.mulAdd(u,t.getPublic(),c)).isInfinity()&&0===a.getX().umod(this.n).cmp(i)},c.prototype.recoverPubKey=function(A,e,t,n){s((3&t)===t,"The recovery param is more than two bits"),e=new g(e,n);var i=this.n,o=new r(A),a=e.r,u=e.s,c=1&t,B=t>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&B)throw new Error("Unable to find sencond key candinate");a=B?this.curve.pointFromX(a.add(this.curve.n),c):this.curve.pointFromX(a,c);var l=e.r.invm(i),Q=i.sub(o).mul(l).umod(i),I=u.mul(l).umod(i);return this.g.mulAdd(Q,a,I)},c.prototype.getKeyRecoveryParam=function(A,e,t,r){if(null!==(e=new g(e,r)).recoveryParam)return e.recoveryParam;for(var n=0;n<4;n++){var i;try{i=this.recoverPubKey(A,e,n)}catch(A){continue}if(i.eq(t))return n}throw new Error("Unable to find valid recovery factor")}},1251:(A,e,t)=>{"use strict";var r=t(3785),n=t(953).assert;function i(A,e){this.ec=A,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}A.exports=i,i.fromPublic=function(A,e,t){return e instanceof i?e:new i(A,{pub:e,pubEnc:t})},i.fromPrivate=function(A,e,t){return e instanceof i?e:new i(A,{priv:e,privEnc:t})},i.prototype.validate=function(){var A=this.getPublic();return A.isInfinity()?{result:!1,reason:"Invalid public key"}:A.validate()?A.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},i.prototype.getPublic=function(A,e){return"string"==typeof A&&(e=A,A=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,A):this.pub},i.prototype.getPrivate=function(A){return"hex"===A?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(A,e){this.priv=new r(A,e||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(A,e){if(A.x||A.y)return"mont"===this.ec.curve.type?n(A.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(A.x&&A.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(A.x,A.y));this.pub=this.ec.curve.decodePoint(A,e)},i.prototype.derive=function(A){return A.validate()||n(A.validate(),"public point not validated"),A.mul(this.priv).getX()},i.prototype.sign=function(A,e,t){return this.ec.sign(A,this,e,t)},i.prototype.verify=function(A,e){return this.ec.verify(A,e,this)},i.prototype.inspect=function(){return""}},611:(A,e,t)=>{"use strict";var r=t(3785),n=t(953),i=n.assert;function o(A,e){if(A instanceof o)return A;this._importDER(A,e)||(i(A.r&&A.s,"Signature without r or s"),this.r=new r(A.r,16),this.s=new r(A.s,16),void 0===A.recoveryParam?this.recoveryParam=null:this.recoveryParam=A.recoveryParam)}function a(){this.place=0}function s(A,e){var t=A[e.place++];if(!(128&t))return t;var r=15&t;if(0===r||r>4)return!1;for(var n=0,i=0,o=e.place;i>>=0;return!(n<=127)&&(e.place=o,n)}function u(A){for(var e=0,t=A.length-1;!A[e]&&!(128&A[e+1])&&e>>3);for(A.push(128|t);--t;)A.push(e>>>(t<<3)&255);A.push(e)}}A.exports=o,o.prototype._importDER=function(A,e){A=n.toArray(A,e);var t=new a;if(48!==A[t.place++])return!1;var i=s(A,t);if(!1===i)return!1;if(i+t.place!==A.length)return!1;if(2!==A[t.place++])return!1;var o=s(A,t);if(!1===o)return!1;var u=A.slice(t.place,o+t.place);if(t.place+=o,2!==A[t.place++])return!1;var g=s(A,t);if(!1===g)return!1;if(A.length!==g+t.place)return!1;var c=A.slice(t.place,g+t.place);if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}return this.r=new r(u),this.s=new r(c),this.recoveryParam=null,!0},o.prototype.toDER=function(A){var e=this.r.toArray(),t=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t)),e=u(e),t=u(t);!(t[0]||128&t[1]);)t=t.slice(1);var r=[2];g(r,e.length),(r=r.concat(e)).push(2),g(r,t.length);var i=r.concat(t),o=[48];return g(o,i.length),o=o.concat(i),n.encode(o,A)}},5980:(A,e,t)=>{"use strict";var r=t(3715),n=t(5427),i=t(953),o=i.assert,a=i.parseBytes,s=t(9087),u=t(3622);function g(A){if(o("ed25519"===A,"only tested with ed25519 so far"),!(this instanceof g))return new g(A);A=n[A].curve,this.curve=A,this.g=A.g,this.g.precompute(A.n.bitLength()+1),this.pointClass=A.point().constructor,this.encodingLength=Math.ceil(A.n.bitLength()/8),this.hash=r.sha512}A.exports=g,g.prototype.sign=function(A,e){A=a(A);var t=this.keyFromSecret(e),r=this.hashInt(t.messagePrefix(),A),n=this.g.mul(r),i=this.encodePoint(n),o=this.hashInt(i,t.pubBytes(),A).mul(t.priv()),s=r.add(o).umod(this.curve.n);return this.makeSignature({R:n,S:s,Rencoded:i})},g.prototype.verify=function(A,e,t){A=a(A),e=this.makeSignature(e);var r=this.keyFromPublic(t),n=this.hashInt(e.Rencoded(),r.pubBytes(),A),i=this.g.mul(e.S());return e.R().add(r.pub().mul(n)).eq(i)},g.prototype.hashInt=function(){for(var A=this.hash(),e=0;e{"use strict";var r=t(953),n=r.assert,i=r.parseBytes,o=r.cachedProperty;function a(A,e){this.eddsa=A,this._secret=i(e.secret),A.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=i(e.pub)}a.fromPublic=function(A,e){return e instanceof a?e:new a(A,{pub:e})},a.fromSecret=function(A,e){return e instanceof a?e:new a(A,{secret:e})},a.prototype.secret=function(){return this._secret},o(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),o(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),o(a,"privBytes",(function(){var A=this.eddsa,e=this.hash(),t=A.encodingLength-1,r=e.slice(0,A.encodingLength);return r[0]&=248,r[t]&=127,r[t]|=64,r})),o(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),o(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),o(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(A){return n(this._secret,"KeyPair can only verify"),this.eddsa.sign(A,this)},a.prototype.verify=function(A,e){return this.eddsa.verify(A,e,this)},a.prototype.getSecret=function(A){return n(this._secret,"KeyPair is public only"),r.encode(this.secret(),A)},a.prototype.getPublic=function(A){return r.encode(this.pubBytes(),A)},A.exports=a},3622:(A,e,t)=>{"use strict";var r=t(3785),n=t(953),i=n.assert,o=n.cachedProperty,a=n.parseBytes;function s(A,e){this.eddsa=A,"object"!=typeof e&&(e=a(e)),Array.isArray(e)&&(e={R:e.slice(0,A.encodingLength),S:e.slice(A.encodingLength)}),i(e.R&&e.S,"Signature without R or S"),A.isPoint(e.R)&&(this._R=e.R),e.S instanceof r&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}o(s,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),o(s,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),o(s,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),o(s,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return n.encode(this.toBytes(),"hex").toUpperCase()},A.exports=s},1037:A=>{A.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},953:(A,e,t)=>{"use strict";var r=e,n=t(3785),i=t(9746),o=t(4504);r.assert=i,r.toArray=o.toArray,r.zero2=o.zero2,r.toHex=o.toHex,r.encode=o.encode,r.getNAF=function(A,e,t){var r=new Array(Math.max(A.bitLength(),t)+1);r.fill(0);for(var n=1<(n>>1)-1?(n>>1)-s:s,i.isubn(a)):a=0,r[o]=a,i.iushrn(1)}return r},r.getJSF=function(A,e){var t=[[],[]];A=A.clone(),e=e.clone();for(var r,n=0,i=0;A.cmpn(-n)>0||e.cmpn(-i)>0;){var o,a,s=A.andln(3)+n&3,u=e.andln(3)+i&3;3===s&&(s=-1),3===u&&(u=-1),o=0==(1&s)?0:3!=(r=A.andln(7)+n&7)&&5!==r||2!==u?s:-s,t[0].push(o),a=0==(1&u)?0:3!=(r=e.andln(7)+i&7)&&5!==r||2!==s?u:-u,t[1].push(a),2*n===o+1&&(n=1-n),2*i===a+1&&(i=1-i),A.iushrn(1),e.iushrn(1)}return t},r.cachedProperty=function(A,e,t){var r="_"+e;A.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=t.call(this)}},r.parseBytes=function(A){return"string"==typeof A?r.toArray(A,"hex"):A},r.intFromLE=function(A){return new n(A,"hex","le")}},3785:function(A,e,t){!function(A,e){"use strict";function r(A,e){if(!A)throw new Error(e||"Assertion failed")}function n(A,e){A.super_=e;var t=function(){};t.prototype=e.prototype,A.prototype=new t,A.prototype.constructor=A}function i(A,e,t){if(i.isBN(A))return A;this.negative=0,this.words=null,this.length=0,this.red=null,null!==A&&("le"!==e&&"be"!==e||(t=e,e=10),this._init(A||0,e||10,t||"be"))}var o;"object"==typeof A?A.exports=i:e.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:t(5568).Buffer}catch(A){}function a(A,e){var t=A.charCodeAt(e);return t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function s(A,e,t){var r=a(A,t);return t-1>=e&&(r|=a(A,t-1)<<4),r}function u(A,e,t,r){for(var n=0,i=Math.min(A.length,t),o=e;o=49?a-49+10:a>=17?a-17+10:a}return n}i.isBN=function(A){return A instanceof i||null!==A&&"object"==typeof A&&A.constructor.wordSize===i.wordSize&&Array.isArray(A.words)},i.max=function(A,e){return A.cmp(e)>0?A:e},i.min=function(A,e){return A.cmp(e)<0?A:e},i.prototype._init=function(A,e,t){if("number"==typeof A)return this._initNumber(A,e,t);if("object"==typeof A)return this._initArray(A,e,t);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(A=A.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)o=A[n]|A[n-1]<<8|A[n-2]<<16,this.words[i]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===t)for(n=0,i=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this.strip()},i.prototype._parseHex=function(A,e,t){this.length=Math.ceil((A.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)n=s(A,e,r)<=18?(i-=18,o+=1,this.words[o]|=n>>>26):i+=8;else for(r=(A.length-e)%2==0?e+1:e;r=18?(i-=18,o+=1,this.words[o]|=n>>>26):i+=8;this.strip()},i.prototype._parseBase=function(A,e,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var i=A.length-t,o=i%r,a=Math.min(i,i-o)+t,s=0,g=t;g1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],c=[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],B=[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 l(A,e,t){t.negative=e.negative^A.negative;var r=A.length+e.length|0;t.length=r,r=r-1|0;var n=0|A.words[0],i=0|e.words[0],o=n*i,a=67108863&o,s=o/67108864|0;t.words[0]=a;for(var u=1;u>>26,c=67108863&s,B=Math.min(u,e.length-1),l=Math.max(0,u-A.length+1);l<=B;l++){var Q=u-l|0;g+=(o=(n=0|A.words[Q])*(i=0|e.words[l])+c)/67108864|0,c=67108863&o}t.words[u]=0|c,s=0|g}return 0!==s?t.words[u]=0|s:t.length--,t.strip()}i.prototype.toString=function(A,e){var t;if(e=0|e||1,16===(A=A||10)||"hex"===A){t="";for(var n=0,i=0,o=0;o>>24-n&16777215)||o!==this.length-1?g[6-s.length]+s+t:s+t,(n+=2)>=26&&(n-=26,o--)}for(0!==i&&(t=i.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(A===(0|A)&&A>=2&&A<=36){var u=c[A],l=B[A];t="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var I=Q.modn(l).toString(A);t=(Q=Q.idivn(l)).isZero()?I+t:g[u-I.length]+I+t}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var A=this.words[0];return 2===this.length?A+=67108864*this.words[1]:3===this.length&&1===this.words[2]?A+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-A:A},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(A,e){return r(void 0!==o),this.toArrayLike(o,A,e)},i.prototype.toArray=function(A,e){return this.toArrayLike(Array,A,e)},i.prototype.toArrayLike=function(A,e,t){var n=this.byteLength(),i=t||Math.max(1,n);r(n<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var o,a,s="le"===e,u=new A(i),g=this.clone();if(s){for(a=0;!g.isZero();a++)o=g.andln(255),g.iushrn(8),u[a]=o;for(;a=4096&&(t+=13,e>>>=13),e>=64&&(t+=7,e>>>=7),e>=8&&(t+=4,e>>>=4),e>=2&&(t+=2,e>>>=2),t+e},i.prototype._zeroBits=function(A){if(0===A)return 26;var e=A,t=0;return 0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},i.prototype.bitLength=function(){var A=this.words[this.length-1],e=this._countBits(A);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,e=0;eA.length?this.clone().ior(A):A.clone().ior(this)},i.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},i.prototype.iuand=function(A){var e;e=this.length>A.length?A:this;for(var t=0;tA.length?this.clone().iand(A):A.clone().iand(this)},i.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},i.prototype.iuxor=function(A){var e,t;this.length>A.length?(e=this,t=A):(e=A,t=this);for(var r=0;rA.length?this.clone().ixor(A):A.clone().ixor(this)},i.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},i.prototype.inotn=function(A){r("number"==typeof A&&A>=0);var e=0|Math.ceil(A/26),t=A%26;this._expand(e),t>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-t),this.strip()},i.prototype.notn=function(A){return this.clone().inotn(A)},i.prototype.setn=function(A,e){r("number"==typeof A&&A>=0);var t=A/26|0,n=A%26;return this._expand(t+1),this.words[t]=e?this.words[t]|1<A.length?(t=this,r=A):(t=A,r=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=t.length,0!==n)this.words[this.length]=n,this.length++;else if(t!==this)for(;iA.length?this.clone().iadd(A):A.clone().iadd(this)},i.prototype.isub=function(A){if(0!==A.negative){A.negative=0;var e=this.iadd(A);return A.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var t,r,n=this.cmp(A);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=A):(t=A,r=this);for(var i=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==i&&o>26,this.words[o]=67108863&e;if(0===i&&o>>13,l=0|o[1],Q=8191&l,I=l>>>13,d=0|o[2],h=8191&d,E=d>>>13,f=0|o[3],C=8191&f,p=f>>>13,m=0|o[4],y=8191&m,v=m>>>13,D=0|o[5],b=8191&D,w=D>>>13,F=0|o[6],U=8191&F,S=F>>>13,N=0|o[7],R=8191&N,H=N>>>13,G=0|o[8],M=8191&G,L=G>>>13,x=0|o[9],k=8191&x,Y=x>>>13,_=0|a[0],V=8191&_,T=_>>>13,P=0|a[1],J=8191&P,O=P>>>13,K=0|a[2],j=8191&K,z=K>>>13,q=0|a[3],Z=8191&q,W=q>>>13,X=0|a[4],$=8191&X,AA=X>>>13,eA=0|a[5],tA=8191&eA,rA=eA>>>13,nA=0|a[6],iA=8191&nA,oA=nA>>>13,aA=0|a[7],sA=8191&aA,uA=aA>>>13,gA=0|a[8],cA=8191&gA,BA=gA>>>13,lA=0|a[9],QA=8191&lA,IA=lA>>>13;t.negative=A.negative^e.negative,t.length=19;var dA=(u+(r=Math.imul(c,V))|0)+((8191&(n=(n=Math.imul(c,T))+Math.imul(B,V)|0))<<13)|0;u=((i=Math.imul(B,T))+(n>>>13)|0)+(dA>>>26)|0,dA&=67108863,r=Math.imul(Q,V),n=(n=Math.imul(Q,T))+Math.imul(I,V)|0,i=Math.imul(I,T);var hA=(u+(r=r+Math.imul(c,J)|0)|0)+((8191&(n=(n=n+Math.imul(c,O)|0)+Math.imul(B,J)|0))<<13)|0;u=((i=i+Math.imul(B,O)|0)+(n>>>13)|0)+(hA>>>26)|0,hA&=67108863,r=Math.imul(h,V),n=(n=Math.imul(h,T))+Math.imul(E,V)|0,i=Math.imul(E,T),r=r+Math.imul(Q,J)|0,n=(n=n+Math.imul(Q,O)|0)+Math.imul(I,J)|0,i=i+Math.imul(I,O)|0;var EA=(u+(r=r+Math.imul(c,j)|0)|0)+((8191&(n=(n=n+Math.imul(c,z)|0)+Math.imul(B,j)|0))<<13)|0;u=((i=i+Math.imul(B,z)|0)+(n>>>13)|0)+(EA>>>26)|0,EA&=67108863,r=Math.imul(C,V),n=(n=Math.imul(C,T))+Math.imul(p,V)|0,i=Math.imul(p,T),r=r+Math.imul(h,J)|0,n=(n=n+Math.imul(h,O)|0)+Math.imul(E,J)|0,i=i+Math.imul(E,O)|0,r=r+Math.imul(Q,j)|0,n=(n=n+Math.imul(Q,z)|0)+Math.imul(I,j)|0,i=i+Math.imul(I,z)|0;var fA=(u+(r=r+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,W)|0)+Math.imul(B,Z)|0))<<13)|0;u=((i=i+Math.imul(B,W)|0)+(n>>>13)|0)+(fA>>>26)|0,fA&=67108863,r=Math.imul(y,V),n=(n=Math.imul(y,T))+Math.imul(v,V)|0,i=Math.imul(v,T),r=r+Math.imul(C,J)|0,n=(n=n+Math.imul(C,O)|0)+Math.imul(p,J)|0,i=i+Math.imul(p,O)|0,r=r+Math.imul(h,j)|0,n=(n=n+Math.imul(h,z)|0)+Math.imul(E,j)|0,i=i+Math.imul(E,z)|0,r=r+Math.imul(Q,Z)|0,n=(n=n+Math.imul(Q,W)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0;var CA=(u+(r=r+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,AA)|0)+Math.imul(B,$)|0))<<13)|0;u=((i=i+Math.imul(B,AA)|0)+(n>>>13)|0)+(CA>>>26)|0,CA&=67108863,r=Math.imul(b,V),n=(n=Math.imul(b,T))+Math.imul(w,V)|0,i=Math.imul(w,T),r=r+Math.imul(y,J)|0,n=(n=n+Math.imul(y,O)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,O)|0,r=r+Math.imul(C,j)|0,n=(n=n+Math.imul(C,z)|0)+Math.imul(p,j)|0,i=i+Math.imul(p,z)|0,r=r+Math.imul(h,Z)|0,n=(n=n+Math.imul(h,W)|0)+Math.imul(E,Z)|0,i=i+Math.imul(E,W)|0,r=r+Math.imul(Q,$)|0,n=(n=n+Math.imul(Q,AA)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,AA)|0;var pA=(u+(r=r+Math.imul(c,tA)|0)|0)+((8191&(n=(n=n+Math.imul(c,rA)|0)+Math.imul(B,tA)|0))<<13)|0;u=((i=i+Math.imul(B,rA)|0)+(n>>>13)|0)+(pA>>>26)|0,pA&=67108863,r=Math.imul(U,V),n=(n=Math.imul(U,T))+Math.imul(S,V)|0,i=Math.imul(S,T),r=r+Math.imul(b,J)|0,n=(n=n+Math.imul(b,O)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,O)|0,r=r+Math.imul(y,j)|0,n=(n=n+Math.imul(y,z)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,z)|0,r=r+Math.imul(C,Z)|0,n=(n=n+Math.imul(C,W)|0)+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,AA)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,AA)|0,r=r+Math.imul(Q,tA)|0,n=(n=n+Math.imul(Q,rA)|0)+Math.imul(I,tA)|0,i=i+Math.imul(I,rA)|0;var mA=(u+(r=r+Math.imul(c,iA)|0)|0)+((8191&(n=(n=n+Math.imul(c,oA)|0)+Math.imul(B,iA)|0))<<13)|0;u=((i=i+Math.imul(B,oA)|0)+(n>>>13)|0)+(mA>>>26)|0,mA&=67108863,r=Math.imul(R,V),n=(n=Math.imul(R,T))+Math.imul(H,V)|0,i=Math.imul(H,T),r=r+Math.imul(U,J)|0,n=(n=n+Math.imul(U,O)|0)+Math.imul(S,J)|0,i=i+Math.imul(S,O)|0,r=r+Math.imul(b,j)|0,n=(n=n+Math.imul(b,z)|0)+Math.imul(w,j)|0,i=i+Math.imul(w,z)|0,r=r+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,AA)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,AA)|0,r=r+Math.imul(h,tA)|0,n=(n=n+Math.imul(h,rA)|0)+Math.imul(E,tA)|0,i=i+Math.imul(E,rA)|0,r=r+Math.imul(Q,iA)|0,n=(n=n+Math.imul(Q,oA)|0)+Math.imul(I,iA)|0,i=i+Math.imul(I,oA)|0;var yA=(u+(r=r+Math.imul(c,sA)|0)|0)+((8191&(n=(n=n+Math.imul(c,uA)|0)+Math.imul(B,sA)|0))<<13)|0;u=((i=i+Math.imul(B,uA)|0)+(n>>>13)|0)+(yA>>>26)|0,yA&=67108863,r=Math.imul(M,V),n=(n=Math.imul(M,T))+Math.imul(L,V)|0,i=Math.imul(L,T),r=r+Math.imul(R,J)|0,n=(n=n+Math.imul(R,O)|0)+Math.imul(H,J)|0,i=i+Math.imul(H,O)|0,r=r+Math.imul(U,j)|0,n=(n=n+Math.imul(U,z)|0)+Math.imul(S,j)|0,i=i+Math.imul(S,z)|0,r=r+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,W)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,AA)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,AA)|0,r=r+Math.imul(C,tA)|0,n=(n=n+Math.imul(C,rA)|0)+Math.imul(p,tA)|0,i=i+Math.imul(p,rA)|0,r=r+Math.imul(h,iA)|0,n=(n=n+Math.imul(h,oA)|0)+Math.imul(E,iA)|0,i=i+Math.imul(E,oA)|0,r=r+Math.imul(Q,sA)|0,n=(n=n+Math.imul(Q,uA)|0)+Math.imul(I,sA)|0,i=i+Math.imul(I,uA)|0;var vA=(u+(r=r+Math.imul(c,cA)|0)|0)+((8191&(n=(n=n+Math.imul(c,BA)|0)+Math.imul(B,cA)|0))<<13)|0;u=((i=i+Math.imul(B,BA)|0)+(n>>>13)|0)+(vA>>>26)|0,vA&=67108863,r=Math.imul(k,V),n=(n=Math.imul(k,T))+Math.imul(Y,V)|0,i=Math.imul(Y,T),r=r+Math.imul(M,J)|0,n=(n=n+Math.imul(M,O)|0)+Math.imul(L,J)|0,i=i+Math.imul(L,O)|0,r=r+Math.imul(R,j)|0,n=(n=n+Math.imul(R,z)|0)+Math.imul(H,j)|0,i=i+Math.imul(H,z)|0,r=r+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,W)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,AA)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,AA)|0,r=r+Math.imul(y,tA)|0,n=(n=n+Math.imul(y,rA)|0)+Math.imul(v,tA)|0,i=i+Math.imul(v,rA)|0,r=r+Math.imul(C,iA)|0,n=(n=n+Math.imul(C,oA)|0)+Math.imul(p,iA)|0,i=i+Math.imul(p,oA)|0,r=r+Math.imul(h,sA)|0,n=(n=n+Math.imul(h,uA)|0)+Math.imul(E,sA)|0,i=i+Math.imul(E,uA)|0,r=r+Math.imul(Q,cA)|0,n=(n=n+Math.imul(Q,BA)|0)+Math.imul(I,cA)|0,i=i+Math.imul(I,BA)|0;var DA=(u+(r=r+Math.imul(c,QA)|0)|0)+((8191&(n=(n=n+Math.imul(c,IA)|0)+Math.imul(B,QA)|0))<<13)|0;u=((i=i+Math.imul(B,IA)|0)+(n>>>13)|0)+(DA>>>26)|0,DA&=67108863,r=Math.imul(k,J),n=(n=Math.imul(k,O))+Math.imul(Y,J)|0,i=Math.imul(Y,O),r=r+Math.imul(M,j)|0,n=(n=n+Math.imul(M,z)|0)+Math.imul(L,j)|0,i=i+Math.imul(L,z)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,W)|0)+Math.imul(H,Z)|0,i=i+Math.imul(H,W)|0,r=r+Math.imul(U,$)|0,n=(n=n+Math.imul(U,AA)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,AA)|0,r=r+Math.imul(b,tA)|0,n=(n=n+Math.imul(b,rA)|0)+Math.imul(w,tA)|0,i=i+Math.imul(w,rA)|0,r=r+Math.imul(y,iA)|0,n=(n=n+Math.imul(y,oA)|0)+Math.imul(v,iA)|0,i=i+Math.imul(v,oA)|0,r=r+Math.imul(C,sA)|0,n=(n=n+Math.imul(C,uA)|0)+Math.imul(p,sA)|0,i=i+Math.imul(p,uA)|0,r=r+Math.imul(h,cA)|0,n=(n=n+Math.imul(h,BA)|0)+Math.imul(E,cA)|0,i=i+Math.imul(E,BA)|0;var bA=(u+(r=r+Math.imul(Q,QA)|0)|0)+((8191&(n=(n=n+Math.imul(Q,IA)|0)+Math.imul(I,QA)|0))<<13)|0;u=((i=i+Math.imul(I,IA)|0)+(n>>>13)|0)+(bA>>>26)|0,bA&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,z))+Math.imul(Y,j)|0,i=Math.imul(Y,z),r=r+Math.imul(M,Z)|0,n=(n=n+Math.imul(M,W)|0)+Math.imul(L,Z)|0,i=i+Math.imul(L,W)|0,r=r+Math.imul(R,$)|0,n=(n=n+Math.imul(R,AA)|0)+Math.imul(H,$)|0,i=i+Math.imul(H,AA)|0,r=r+Math.imul(U,tA)|0,n=(n=n+Math.imul(U,rA)|0)+Math.imul(S,tA)|0,i=i+Math.imul(S,rA)|0,r=r+Math.imul(b,iA)|0,n=(n=n+Math.imul(b,oA)|0)+Math.imul(w,iA)|0,i=i+Math.imul(w,oA)|0,r=r+Math.imul(y,sA)|0,n=(n=n+Math.imul(y,uA)|0)+Math.imul(v,sA)|0,i=i+Math.imul(v,uA)|0,r=r+Math.imul(C,cA)|0,n=(n=n+Math.imul(C,BA)|0)+Math.imul(p,cA)|0,i=i+Math.imul(p,BA)|0;var wA=(u+(r=r+Math.imul(h,QA)|0)|0)+((8191&(n=(n=n+Math.imul(h,IA)|0)+Math.imul(E,QA)|0))<<13)|0;u=((i=i+Math.imul(E,IA)|0)+(n>>>13)|0)+(wA>>>26)|0,wA&=67108863,r=Math.imul(k,Z),n=(n=Math.imul(k,W))+Math.imul(Y,Z)|0,i=Math.imul(Y,W),r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,AA)|0)+Math.imul(L,$)|0,i=i+Math.imul(L,AA)|0,r=r+Math.imul(R,tA)|0,n=(n=n+Math.imul(R,rA)|0)+Math.imul(H,tA)|0,i=i+Math.imul(H,rA)|0,r=r+Math.imul(U,iA)|0,n=(n=n+Math.imul(U,oA)|0)+Math.imul(S,iA)|0,i=i+Math.imul(S,oA)|0,r=r+Math.imul(b,sA)|0,n=(n=n+Math.imul(b,uA)|0)+Math.imul(w,sA)|0,i=i+Math.imul(w,uA)|0,r=r+Math.imul(y,cA)|0,n=(n=n+Math.imul(y,BA)|0)+Math.imul(v,cA)|0,i=i+Math.imul(v,BA)|0;var FA=(u+(r=r+Math.imul(C,QA)|0)|0)+((8191&(n=(n=n+Math.imul(C,IA)|0)+Math.imul(p,QA)|0))<<13)|0;u=((i=i+Math.imul(p,IA)|0)+(n>>>13)|0)+(FA>>>26)|0,FA&=67108863,r=Math.imul(k,$),n=(n=Math.imul(k,AA))+Math.imul(Y,$)|0,i=Math.imul(Y,AA),r=r+Math.imul(M,tA)|0,n=(n=n+Math.imul(M,rA)|0)+Math.imul(L,tA)|0,i=i+Math.imul(L,rA)|0,r=r+Math.imul(R,iA)|0,n=(n=n+Math.imul(R,oA)|0)+Math.imul(H,iA)|0,i=i+Math.imul(H,oA)|0,r=r+Math.imul(U,sA)|0,n=(n=n+Math.imul(U,uA)|0)+Math.imul(S,sA)|0,i=i+Math.imul(S,uA)|0,r=r+Math.imul(b,cA)|0,n=(n=n+Math.imul(b,BA)|0)+Math.imul(w,cA)|0,i=i+Math.imul(w,BA)|0;var UA=(u+(r=r+Math.imul(y,QA)|0)|0)+((8191&(n=(n=n+Math.imul(y,IA)|0)+Math.imul(v,QA)|0))<<13)|0;u=((i=i+Math.imul(v,IA)|0)+(n>>>13)|0)+(UA>>>26)|0,UA&=67108863,r=Math.imul(k,tA),n=(n=Math.imul(k,rA))+Math.imul(Y,tA)|0,i=Math.imul(Y,rA),r=r+Math.imul(M,iA)|0,n=(n=n+Math.imul(M,oA)|0)+Math.imul(L,iA)|0,i=i+Math.imul(L,oA)|0,r=r+Math.imul(R,sA)|0,n=(n=n+Math.imul(R,uA)|0)+Math.imul(H,sA)|0,i=i+Math.imul(H,uA)|0,r=r+Math.imul(U,cA)|0,n=(n=n+Math.imul(U,BA)|0)+Math.imul(S,cA)|0,i=i+Math.imul(S,BA)|0;var SA=(u+(r=r+Math.imul(b,QA)|0)|0)+((8191&(n=(n=n+Math.imul(b,IA)|0)+Math.imul(w,QA)|0))<<13)|0;u=((i=i+Math.imul(w,IA)|0)+(n>>>13)|0)+(SA>>>26)|0,SA&=67108863,r=Math.imul(k,iA),n=(n=Math.imul(k,oA))+Math.imul(Y,iA)|0,i=Math.imul(Y,oA),r=r+Math.imul(M,sA)|0,n=(n=n+Math.imul(M,uA)|0)+Math.imul(L,sA)|0,i=i+Math.imul(L,uA)|0,r=r+Math.imul(R,cA)|0,n=(n=n+Math.imul(R,BA)|0)+Math.imul(H,cA)|0,i=i+Math.imul(H,BA)|0;var NA=(u+(r=r+Math.imul(U,QA)|0)|0)+((8191&(n=(n=n+Math.imul(U,IA)|0)+Math.imul(S,QA)|0))<<13)|0;u=((i=i+Math.imul(S,IA)|0)+(n>>>13)|0)+(NA>>>26)|0,NA&=67108863,r=Math.imul(k,sA),n=(n=Math.imul(k,uA))+Math.imul(Y,sA)|0,i=Math.imul(Y,uA),r=r+Math.imul(M,cA)|0,n=(n=n+Math.imul(M,BA)|0)+Math.imul(L,cA)|0,i=i+Math.imul(L,BA)|0;var RA=(u+(r=r+Math.imul(R,QA)|0)|0)+((8191&(n=(n=n+Math.imul(R,IA)|0)+Math.imul(H,QA)|0))<<13)|0;u=((i=i+Math.imul(H,IA)|0)+(n>>>13)|0)+(RA>>>26)|0,RA&=67108863,r=Math.imul(k,cA),n=(n=Math.imul(k,BA))+Math.imul(Y,cA)|0,i=Math.imul(Y,BA);var HA=(u+(r=r+Math.imul(M,QA)|0)|0)+((8191&(n=(n=n+Math.imul(M,IA)|0)+Math.imul(L,QA)|0))<<13)|0;u=((i=i+Math.imul(L,IA)|0)+(n>>>13)|0)+(HA>>>26)|0,HA&=67108863;var GA=(u+(r=Math.imul(k,QA))|0)+((8191&(n=(n=Math.imul(k,IA))+Math.imul(Y,QA)|0))<<13)|0;return u=((i=Math.imul(Y,IA))+(n>>>13)|0)+(GA>>>26)|0,GA&=67108863,s[0]=dA,s[1]=hA,s[2]=EA,s[3]=fA,s[4]=CA,s[5]=pA,s[6]=mA,s[7]=yA,s[8]=vA,s[9]=DA,s[10]=bA,s[11]=wA,s[12]=FA,s[13]=UA,s[14]=SA,s[15]=NA,s[16]=RA,s[17]=HA,s[18]=GA,0!==u&&(s[19]=u,t.length++),t};function I(A,e,t){return(new d).mulp(A,e,t)}function d(A,e){this.x=A,this.y=e}Math.imul||(Q=l),i.prototype.mulTo=function(A,e){var t,r=this.length+A.length;return t=10===this.length&&10===A.length?Q(this,A,e):r<63?l(this,A,e):r<1024?function(A,e,t){t.negative=e.negative^A.negative,t.length=A.length+e.length;for(var r=0,n=0,i=0;i>>26)|0)>>>26,o&=67108863}t.words[i]=a,r=o,o=n}return 0!==r?t.words[i]=r:t.length--,t.strip()}(this,A,e):I(this,A,e),t},d.prototype.makeRBT=function(A){for(var e=new Array(A),t=i.prototype._countBits(A)-1,r=0;r>=1;return r},d.prototype.permute=function(A,e,t,r,n,i){for(var o=0;o>>=1)n++;return 1<>>=13,t[2*o+1]=8191&i,i>>>=13;for(o=2*e;o>=26,e+=n/67108864|0,e+=i>>>26,this.words[t]=67108863&i}return 0!==e&&(this.words[t]=e,this.length++),this},i.prototype.muln=function(A){return this.clone().imuln(A)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(A){var e=function(A){for(var e=new Array(A.bitLength()),t=0;t>>n}return e}(A);if(0===e.length)return new i(1);for(var t=this,r=0;r=0);var e,t=A%26,n=(A-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(e=0;e>>26-t}o&&(this.words[e]=o,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var i=A%26,o=Math.min((A-i)/26,this.length),a=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==g||u>=n);u--){var c=0|this.words[u];this.words[u]=g<<26-i|c>>>i,g=c&a}return s&&0!==g&&(s.words[s.length++]=g),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(A,e,t){return r(0===this.negative),this.iushrn(A,e,t)},i.prototype.shln=function(A){return this.clone().ishln(A)},i.prototype.ushln=function(A){return this.clone().iushln(A)},i.prototype.shrn=function(A){return this.clone().ishrn(A)},i.prototype.ushrn=function(A){return this.clone().iushrn(A)},i.prototype.testn=function(A){r("number"==typeof A&&A>=0);var e=A%26,t=(A-e)/26,n=1<=0);var e=A%26,t=(A-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==e&&t++,this.length=Math.min(t,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},i.prototype.isubn=function(A){if(r("number"==typeof A),r(A<67108864),A<0)return this.iaddn(-A);if(0!==this.negative)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(s/67108864|0),this.words[n+t]=67108863&i}for(;n>26,this.words[n+t]=67108863&i;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(A,e){var t=(this.length,A.length),r=this.clone(),n=A,o=0|n.words[n.length-1];0!=(t=26-this._countBits(o))&&(n=n.ushln(t),r.iushln(t),o=0|n.words[n.length-1]);var a,s=r.length-n.length;if("mod"!==e){(a=new i(null)).length=s+1,a.words=new Array(a.length);for(var u=0;u=0;c--){var B=67108864*(0|r.words[n.length+c])+(0|r.words[n.length+c-1]);for(B=Math.min(B/o|0,67108863),r._ishlnsubmul(n,B,c);0!==r.negative;)B--,r.negative=0,r._ishlnsubmul(n,1,c),r.isZero()||(r.negative^=1);a&&(a.words[c]=B)}return a&&a.strip(),r.strip(),"div"!==e&&0!==t&&r.iushrn(t),{div:a||null,mod:r}},i.prototype.divmod=function(A,e,t){return r(!A.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===A.negative?(a=this.neg().divmod(A,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(o=a.mod.neg(),t&&0!==o.negative&&o.iadd(A)),{div:n,mod:o}):0===this.negative&&0!==A.negative?(a=this.divmod(A.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!=(this.negative&A.negative)?(a=this.neg().divmod(A.neg(),e),"div"!==e&&(o=a.mod.neg(),t&&0!==o.negative&&o.isub(A)),{div:a.div,mod:o}):A.length>this.length||this.cmp(A)<0?{div:new i(0),mod:this}:1===A.length?"div"===e?{div:this.divn(A.words[0]),mod:null}:"mod"===e?{div:null,mod:new i(this.modn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new i(this.modn(A.words[0]))}:this._wordDiv(A,e);var n,o,a},i.prototype.div=function(A){return this.divmod(A,"div",!1).div},i.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},i.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},i.prototype.divRound=function(A){var e=this.divmod(A);if(e.mod.isZero())return e.div;var t=0!==e.div.negative?e.mod.isub(A):e.mod,r=A.ushrn(1),n=A.andln(1),i=t.cmp(r);return i<0||1===n&&0===i?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},i.prototype.modn=function(A){r(A<=67108863);for(var e=(1<<26)%A,t=0,n=this.length-1;n>=0;n--)t=(e*t+(0|this.words[n]))%A;return t},i.prototype.idivn=function(A){r(A<=67108863);for(var e=0,t=this.length-1;t>=0;t--){var n=(0|this.words[t])+67108864*e;this.words[t]=n/A|0,e=n%A}return this.strip()},i.prototype.divn=function(A){return this.clone().idivn(A)},i.prototype.egcd=function(A){r(0===A.negative),r(!A.isZero());var e=this,t=A.clone();e=0!==e.negative?e.umod(A):e.clone();for(var n=new i(1),o=new i(0),a=new i(0),s=new i(1),u=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++u;for(var g=t.clone(),c=e.clone();!e.isZero();){for(var B=0,l=1;0==(e.words[0]&l)&&B<26;++B,l<<=1);if(B>0)for(e.iushrn(B);B-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(g),o.isub(c)),n.iushrn(1),o.iushrn(1);for(var Q=0,I=1;0==(t.words[0]&I)&&Q<26;++Q,I<<=1);if(Q>0)for(t.iushrn(Q);Q-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(g),s.isub(c)),a.iushrn(1),s.iushrn(1);e.cmp(t)>=0?(e.isub(t),n.isub(a),o.isub(s)):(t.isub(e),a.isub(n),s.isub(o))}return{a,b:s,gcd:t.iushln(u)}},i.prototype._invmp=function(A){r(0===A.negative),r(!A.isZero());var e=this,t=A.clone();e=0!==e.negative?e.umod(A):e.clone();for(var n,o=new i(1),a=new i(0),s=t.clone();e.cmpn(1)>0&&t.cmpn(1)>0;){for(var u=0,g=1;0==(e.words[0]&g)&&u<26;++u,g<<=1);if(u>0)for(e.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var c=0,B=1;0==(t.words[0]&B)&&c<26;++c,B<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);e.cmp(t)>=0?(e.isub(t),o.isub(a)):(t.isub(e),a.isub(o))}return(n=0===e.cmpn(1)?o:a).cmpn(0)<0&&n.iadd(A),n},i.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var e=this.clone(),t=A.clone();e.negative=0,t.negative=0;for(var r=0;e.isEven()&&t.isEven();r++)e.iushrn(1),t.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;t.isEven();)t.iushrn(1);var n=e.cmp(t);if(n<0){var i=e;e=t,t=i}else if(0===n||0===t.cmpn(1))break;e.isub(t)}return t.iushln(r)},i.prototype.invm=function(A){return this.egcd(A).a.umod(A)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(A){return this.words[0]&A},i.prototype.bincn=function(A){r("number"==typeof A);var e=A%26,t=(A-e)/26,n=1<>>26,a&=67108863,this.words[o]=a}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(A){var e,t=A<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)e=1;else{t&&(A=-A),r(A<=67108863,"Number is too big");var n=0|this.words[0];e=n===A?0:nA.length)return 1;if(this.length=0;t--){var r=0|this.words[t],n=0|A.words[t];if(r!==n){rn&&(e=1);break}}return e},i.prototype.gtn=function(A){return 1===this.cmpn(A)},i.prototype.gt=function(A){return 1===this.cmp(A)},i.prototype.gten=function(A){return this.cmpn(A)>=0},i.prototype.gte=function(A){return this.cmp(A)>=0},i.prototype.ltn=function(A){return-1===this.cmpn(A)},i.prototype.lt=function(A){return-1===this.cmp(A)},i.prototype.lten=function(A){return this.cmpn(A)<=0},i.prototype.lte=function(A){return this.cmp(A)<=0},i.prototype.eqn=function(A){return 0===this.cmpn(A)},i.prototype.eq=function(A){return 0===this.cmp(A)},i.red=function(A){return new y(A)},i.prototype.toRed=function(A){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),A.convertTo(this)._forceRed(A)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(A){return this.red=A,this},i.prototype.forceRed=function(A){return r(!this.red,"Already a number in reduction context"),this._forceRed(A)},i.prototype.redAdd=function(A){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},i.prototype.redIAdd=function(A){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},i.prototype.redSub=function(A){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},i.prototype.redISub=function(A){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},i.prototype.redShl=function(A){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},i.prototype.redMul=function(A){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},i.prototype.redIMul=function(A){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(A){return r(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var h={k256:null,p224:null,p192:null,p25519:null};function E(A,e){this.name=A,this.p=new i(e,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function f(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function C(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function p(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(A){if("string"==typeof A){var e=i._prime(A);this.m=e.p,this.prime=e}else r(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}function v(A){y.call(this,A),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}E.prototype._tmp=function(){var A=new i(null);return A.words=new Array(Math.ceil(this.n/13)),A},E.prototype.ireduce=function(A){var e,t=A;do{this.split(t,this.tmp),e=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},E.prototype.split=function(A,e){A.iushrn(this.n,0,e)},E.prototype.imulK=function(A){return A.imul(this.k)},n(f,E),f.prototype.split=function(A,e){for(var t=4194303,r=Math.min(A.length,9),n=0;n>>22,i=o}i>>>=22,A.words[n-10]=i,0===i&&A.length>10?A.length-=10:A.length-=9},f.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var e=0,t=0;t>>=26,A.words[t]=n,e=r}return 0!==e&&(A.words[A.length++]=e),A},i._prime=function(A){if(h[A])return h[A];var e;if("k256"===A)e=new f;else if("p224"===A)e=new C;else if("p192"===A)e=new p;else{if("p25519"!==A)throw new Error("Unknown prime "+A);e=new m}return h[A]=e,e},y.prototype._verify1=function(A){r(0===A.negative,"red works only with positives"),r(A.red,"red works only with red numbers")},y.prototype._verify2=function(A,e){r(0==(A.negative|e.negative),"red works only with positives"),r(A.red&&A.red===e.red,"red works only with red numbers")},y.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):A.umod(this.m)._forceRed(this)},y.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},y.prototype.add=function(A,e){this._verify2(A,e);var t=A.add(e);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},y.prototype.iadd=function(A,e){this._verify2(A,e);var t=A.iadd(e);return t.cmp(this.m)>=0&&t.isub(this.m),t},y.prototype.sub=function(A,e){this._verify2(A,e);var t=A.sub(e);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},y.prototype.isub=function(A,e){this._verify2(A,e);var t=A.isub(e);return t.cmpn(0)<0&&t.iadd(this.m),t},y.prototype.shl=function(A,e){return this._verify1(A),this.imod(A.ushln(e))},y.prototype.imul=function(A,e){return this._verify2(A,e),this.imod(A.imul(e))},y.prototype.mul=function(A,e){return this._verify2(A,e),this.imod(A.mul(e))},y.prototype.isqr=function(A){return this.imul(A,A.clone())},y.prototype.sqr=function(A){return this.mul(A,A)},y.prototype.sqrt=function(A){if(A.isZero())return A.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var t=this.m.add(new i(1)).iushrn(2);return this.pow(A,t)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);r(!n.isZero());var a=new i(1).toRed(this),s=a.redNeg(),u=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new i(2*g*g).toRed(this);0!==this.pow(g,u).cmp(s);)g.redIAdd(s);for(var c=this.pow(g,n),B=this.pow(A,n.addn(1).iushrn(1)),l=this.pow(A,n),Q=o;0!==l.cmp(a);){for(var I=l,d=0;0!==I.cmp(a);d++)I=I.redSqr();r(d=0;r--){for(var u=e.words[r],g=s-1;g>=0;g--){var c=u>>g&1;n!==t[0]&&(n=this.sqr(n)),0!==c||0!==o?(o<<=1,o|=c,(4==++a||0===r&&0===g)&&(n=this.mul(n,t[o]),a=0,o=0)):a=0}s=26}return n},y.prototype.convertTo=function(A){var e=A.umod(this.m);return e===A?e.clone():e},y.prototype.convertFrom=function(A){var e=A.clone();return e.red=null,e},i.mont=function(A){return new v(A)},n(v,y),v.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},v.prototype.convertFrom=function(A){var e=this.imod(A.mul(this.rinv));return e.red=null,e},v.prototype.imul=function(A,e){if(A.isZero()||e.isZero())return A.words[0]=0,A.length=1,A;var t=A.imul(e),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),i=n;return n.cmp(this.m)>=0?i=n.isub(this.m):n.cmpn(0)<0&&(i=n.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(A,e){if(A.isZero()||e.isZero())return new i(0)._forceRed(this);var t=A.mul(e),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},v.prototype.invm=function(A){return this.imod(A._invmp(this.m).mul(this.r2))._forceRed(this)}}(A=t.nmd(A),this)},7187:A=>{"use strict";var e,t="object"==typeof Reflect?Reflect:null,r=t&&"function"==typeof t.apply?t.apply:function(A,e,t){return Function.prototype.apply.call(A,e,t)};e=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))}:function(A){return Object.getOwnPropertyNames(A)};var n=Number.isNaN||function(A){return A!=A};function i(){i.init.call(this)}A.exports=i,A.exports.once=function(A,e){return new Promise((function(t,r){function n(t){A.removeListener(e,i),r(t)}function i(){"function"==typeof A.removeListener&&A.removeListener("error",n),t([].slice.call(arguments))}I(A,e,i,{once:!0}),"error"!==e&&function(A,e,t){"function"==typeof A.on&&I(A,"error",e,{once:!0})}(A,n)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var o=10;function a(A){if("function"!=typeof A)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}function s(A){return void 0===A._maxListeners?i.defaultMaxListeners:A._maxListeners}function u(A,e,t,r){var n,i,o,u;if(a(t),void 0===(i=A._events)?(i=A._events=Object.create(null),A._eventsCount=0):(void 0!==i.newListener&&(A.emit("newListener",e,t.listener?t.listener:t),i=A._events),o=i[e]),void 0===o)o=i[e]=t,++A._eventsCount;else if("function"==typeof o?o=i[e]=r?[t,o]:[o,t]:r?o.unshift(t):o.push(t),(n=s(A))>0&&o.length>n&&!o.warned){o.warned=!0;var g=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");g.name="MaxListenersExceededWarning",g.emitter=A,g.type=e,g.count=o.length,u=g,console&&console.warn&&console.warn(u)}return A}function g(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(A,e,t){var r={fired:!1,wrapFn:void 0,target:A,type:e,listener:t},n=g.bind(r);return n.listener=t,r.wrapFn=n,n}function B(A,e,t){var r=A._events;if(void 0===r)return[];var n=r[e];return void 0===n?[]:"function"==typeof n?t?[n.listener||n]:[n]:t?function(A){for(var e=new Array(A.length),t=0;t0&&(o=e[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[A];if(void 0===s)return!1;if("function"==typeof s)r(s,this,e);else{var u=s.length,g=Q(s,u);for(t=0;t=0;i--)if(t[i]===e||t[i].listener===e){o=t[i].listener,n=i;break}if(n<0)return this;0===n?t.shift():function(A,e){for(;e+1=0;r--)this.removeListener(A,e[r]);return this},i.prototype.listeners=function(A){return B(this,A,!0)},i.prototype.rawListeners=function(A){return B(this,A,!1)},i.listenerCount=function(A,e){return"function"==typeof A.listenerCount?A.listenerCount(e):l.call(A,e)},i.prototype.listenerCount=l,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},3048:(A,e,t)=>{var r=t(9509).Buffer,n=t(2318);A.exports=function(A,e,t,i){if(r.isBuffer(A)||(A=r.from(A,"binary")),e&&(r.isBuffer(e)||(e=r.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var o=t/8,a=r.alloc(o),s=r.alloc(i||0),u=r.alloc(0);o>0||i>0;){var g=new n;g.update(u),g.update(A),e&&g.update(e),u=g.digest();var c=0;if(o>0){var B=a.length-o;c=Math.min(o,u.length),u.copy(a,B,0,c),o-=c}if(c0){var l=s.length-i,Q=Math.min(i,u.length-c);u.copy(s,l,c,c+Q),i-=Q}}return u.fill(0),{key:a,iv:s}}},9071:(A,e,t)=>{A.exports=function(A){var e={};function t(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return A[r].call(n.exports,n,n.exports,t),n.l=!0,n.exports}return t.m=A,t.c=e,t.d=function(A,e,r){t.o(A,e)||Object.defineProperty(A,e,{enumerable:!0,get:r})},t.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},t.t=function(A,e){if(1&e&&(A=t(A)),8&e)return A;if(4&e&&"object"==typeof A&&A&&A.__esModule)return A;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:A}),2&e&&"string"!=typeof A)for(var n in A)t.d(r,n,function(e){return A[e]}.bind(null,n));return r},t.n=function(A){var e=A&&A.__esModule?function(){return A.default}:function(){return A};return t.d(e,"a",e),e},t.o=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},t.p="",t(t.s=2)}([function(A,e){A.exports=t(6470)},function(A,e,t){(function(e,r){var n,i=(n=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0)||e,function(A){var e;A=A||{},e||(e=void 0!==A?A:{});var i,o={};for(i in e)e.hasOwnProperty(i)&&(o[i]=e[i]);var a,s,u,g,c="./this.program";a="object"==typeof window,s="function"==typeof importScripts,u="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,g=!a&&!u&&!s;var B,l,Q,I,d="";u?(d=s?t(0).dirname(d)+"/":r+"/",B=function(A,e){var r=Xe(A);return r?e?r:r.toString():(Q||(Q=t(3)),I||(I=t(0)),A=I.normalize(A),Q.readFileSync(A,e?null:"utf8"))},l=function(A){return(A=B(A,!0)).buffer||(A=new Uint8Array(A)),v(A.buffer),A},1=r);)++t;if(16(n=224==(240&n)?(15&n)<<12|i<<6|o:(7&n)<<18|i<<12|o<<6|63&A[e++])?r+=String.fromCharCode(n):(n-=65536,r+=String.fromCharCode(55296|n>>10,56320|1023&n))}}else r+=String.fromCharCode(n)}return r}function w(A){return A?b(R,A,void 0):""}function F(A,e,t,r){if(!(0=o&&(o=65536+((1023&o)<<10)|1023&A.charCodeAt(++i)),127>=o){if(t>=r)break;e[t++]=o}else{if(2047>=o){if(t+1>=r)break;e[t++]=192|o>>6}else{if(65535>=o){if(t+2>=r)break;e[t++]=224|o>>12}else{if(t+3>=r)break;e[t++]=240|o>>18,e[t++]=128|o>>12&63}e[t++]=128|o>>6&63}e[t++]=128|63&o}}return e[t]=0,t-n}function U(A){for(var e=0,t=0;t=r&&(r=65536+((1023&r)<<10)|1023&A.charCodeAt(++t)),127>=r?++e:e=2047>=r?e+2:65535>=r?e+3:e+4}return e}var S,N,R,H,G,M,L,x,k,Y="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function _(A){var e;for(e=A>>1;H[e];)++e;if(32<(e<<=1)-A&&Y)return Y.decode(R.subarray(A,e));e=0;for(var t="";;){var r=H[A+2*e>>1];if(0==r)return t;++e,t+=String.fromCharCode(r)}}function V(A,e,t){if(void 0===t&&(t=2147483647),2>t)return 0;var r=e;t=(t-=2)<2*A.length?t/2:A.length;for(var n=0;n>1]=A.charCodeAt(n),e+=2;return H[e>>1]=0,e-r}function T(A){return 2*A.length}function P(A){for(var e=0,t="";;){var r=M[A+4*e>>2];if(0==r)return t;++e,65536<=r?(r-=65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=String.fromCharCode(r)}}function J(A,e,t){if(void 0===t&&(t=2147483647),4>t)return 0;var r=e;t=r+t-4;for(var n=0;n=i&&(i=65536+((1023&i)<<10)|1023&A.charCodeAt(++n)),M[e>>2]=i,(e+=4)+4>t)break}return M[e>>2]=0,e-r}function O(A){for(var e=0,t=0;t=r&&++t,e+=4}return e}function K(A){S=A,e.HEAP8=N=new Int8Array(A),e.HEAP16=H=new Int16Array(A),e.HEAP32=M=new Int32Array(A),e.HEAPU8=R=new Uint8Array(A),e.HEAPU16=G=new Uint16Array(A),e.HEAPU32=L=new Uint32Array(A),e.HEAPF32=x=new Float32Array(A),e.HEAPF64=k=new Float64Array(A)}var j=e.INITIAL_MEMORY||16777216;function z(A){for(;0>2]=A}function vA(A,e){for(var t=0,r=A.length-1;0<=r;r--){var n=A[r];"."===n?A.splice(r,1):".."===n?(A.splice(r,1),t++):t&&(A.splice(r,1),t--)}if(e)for(;t;t--)A.unshift("..");return A}function DA(A){var e="/"===A.charAt(0),t="/"===A.substr(-1);return(A=vA(A.split("/").filter((function(A){return!!A})),!e).join("/"))||e||(A="."),A&&t&&(A+="/"),(e?"/":"")+A}function bA(A){var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(A).slice(1);return A=e[0],e=e[1],A||e?(e&&(e=e.substr(0,e.length-1)),A+e):"."}function wA(A){if("/"===A)return"/";var e=A.lastIndexOf("/");return-1===e?A:A.substr(e+1)}function FA(){var A=Array.prototype.slice.call(arguments,0);return DA(A.join("/"))}function UA(A,e){return DA(A+"/"+e)}function SA(){for(var A="",e=!1,t=arguments.length-1;-1<=t&&!e;t--){if("string"!=typeof(e=0<=t?arguments[t]:kA.cwd()))throw new TypeError("Arguments to path.resolve must be strings");if(!e)return"";A=e+"/"+A,e="/"===e.charAt(0)}return(e?"/":"")+(A=vA(A.split("/").filter((function(A){return!!A})),!e).join("/"))||"."}function NA(A,e){function t(A){for(var e=0;et?[]:A.slice(e,t-e+1)}A=SA(A).substr(1),e=SA(e).substr(1),A=t(A.split("/")),e=t(e.split("/"));for(var r=Math.min(A.length,e.length),n=r,i=0;i=e||(e=Math.max(e,t*(1048576>t?2:1.125)>>>0),0!=t&&(e=Math.max(e,256)),t=A.f,A.f=new Uint8Array(e),0e)A.f.length=e;else for(;A.f.length=A.node.l)return 0;if(8<(A=Math.min(A.node.l-n,r))&&i.subarray)e.set(i.subarray(n,n+A),t);else for(r=0;re)throw new kA.b(28);return e},ia:function(A,e,t){xA.lb(A.node,e+t),A.node.l=Math.max(A.node.l,e+t)},na:function(A,e,t,r,n,i,o){if(!kA.isFile(A.node.mode))throw new kA.b(43);if(A=A.node.f,2&o||A.buffer!==e.buffer){if((0>>0)%kA.L.length},sb:function(A){var e=kA.Pa(A.parent.id,A.name);A.Y=kA.L[e],kA.L[e]=A},tb:function(A){var e=kA.Pa(A.parent.id,A.name);if(kA.L[e]===A)kA.L[e]=A.Y;else for(e=kA.L[e];e;){if(e.Y===A){e.Y=A.Y;break}e=e.Y}},P:function(A,e){var t=kA.bc(A);if(t)throw new kA.b(t,A);for(t=kA.L[kA.Pa(A.id,e)];t;t=t.Y){var r=t.name;if(t.parent.id===A.id&&r===e)return t}return kA.lookup(A,e)},createNode:function(A,e,t,r){return A=new kA.Ab(A,e,t,r),kA.sb(A),A},La:function(A){kA.tb(A)},Aa:function(A){return A===A.parent},W:function(A){return!!A.oa},isFile:function(A){return 32768==(61440&A)},v:function(A){return 16384==(61440&A)},ma:function(A){return 40960==(61440&A)},ya:function(A){return 8192==(61440&A)},$b:function(A){return 24576==(61440&A)},isFIFO:function(A){return 4096==(61440&A)},isSocket:function(A){return 49152==(49152&A)},Vb:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},dc:function(A){var e=kA.Vb[A];if(void 0===e)throw Error("Unknown file open mode: "+A);return e},mb:function(A){var e=["r","w","rw"][3&A];return 512&A&&(e+="w"),e},Z:function(A,e){return kA.ub||(-1===e.indexOf("r")||292&A.mode)&&(-1===e.indexOf("w")||146&A.mode)&&(-1===e.indexOf("x")||73&A.mode)?0:2},bc:function(A){return kA.Z(A,"x")||(A.g.lookup?0:2)},Wa:function(A,e){try{return kA.P(A,e),20}catch(A){}return kA.Z(A,"wx")},Ca:function(A,e,t){try{var r=kA.P(A,e)}catch(A){return A.B}if(A=kA.Z(A,"wx"))return A;if(t){if(!kA.v(r.mode))return 54;if(kA.Aa(r)||kA.I(r)===kA.cwd())return 10}else if(kA.v(r.mode))return 31;return 0},cc:function(A,e){return A?kA.ma(A.mode)?32:kA.v(A.mode)&&("r"!==kA.mb(e)||512&e)?31:kA.Z(A,kA.mb(e)):44},Bb:4096,fc:function(A,e){for(e=e||kA.Bb,A=A||0;A<=e;A++)if(!kA.streams[A])return A;throw new kA.b(33)},ba:function(A){return kA.streams[A]},Sb:function(A,e,t){kA.Ja||(kA.Ja=function(){},kA.Ja.prototype={object:{get:function(){return this.node},set:function(A){this.node=A}}});var r,n=new kA.Ja;for(r in A)n[r]=A[r];return A=n,e=kA.fc(e,t),A.fd=e,kA.streams[e]=A},Lb:function(A){kA.streams[A]=null},Kb:{open:function(A){A.h=kA.Xb(A.node.rdev).h,A.h.open&&A.h.open(A)},K:function(){throw new kA.b(70)}},Va:function(A){return A>>8},Oc:function(A){return 255&A},X:function(A,e){return A<<8|e},$a:function(A,e){kA.jb[A]={h:e}},Xb:function(A){return kA.jb[A]},pb:function(A){var e=[];for(A=[A];A.length;){var t=A.pop();e.push(t),A.push.apply(A,t.pa)}return e},yb:function(A,e){function t(A){return kA.Fa--,e(A)}function r(A){if(A){if(!r.S)return r.S=!0,t(A)}else++i>=n.length&&t(null)}"function"==typeof A&&(e=A,A=!1),kA.Fa++,1e)throw new kA.b(28);var t;if(!(t="string"==typeof A?kA.m(A,{H:!0}).node:A).g.A)throw new kA.b(63);if(kA.v(t.mode))throw new kA.b(31);if(!kA.isFile(t.mode))throw new kA.b(28);if(A=kA.Z(t,"w"))throw new kA.b(A);t.g.A(t,{size:e,timestamp:Date.now()})},Fc:function(A,e){if(!(A=kA.ba(A)))throw new kA.b(8);if(0==(2097155&A.flags))throw new kA.b(28);kA.truncate(A.node,e)},Xc:function(A,e,t){(A=kA.m(A,{H:!0}).node).g.A(A,{timestamp:Math.max(e,t)})},open:function(A,t,r,n,i){if(""===A)throw new kA.b(44);if(r=64&(t="string"==typeof t?kA.dc(t):t)?4095&(void 0===r?438:r)|32768:0,"object"==typeof A)var o=A;else{A=DA(A);try{o=kA.m(A,{H:!(131072&t)}).node}catch(A){}}var a=!1;if(64&t)if(o){if(128&t)throw new kA.b(20)}else o=kA.R(A,r,0),a=!0;if(!o)throw new kA.b(44);if(kA.ya(o.mode)&&(t&=-513),65536&t&&!kA.v(o.mode))throw new kA.b(54);if(!a&&(r=kA.cc(o,t)))throw new kA.b(r);512&t&&kA.truncate(o,0),t&=-131713,(n=kA.Sb({node:o,path:kA.I(o),flags:t,seekable:!0,position:0,h:o.h,wc:[],error:!1},n,i)).h.open&&n.h.open(n),!e.logReadFiles||1&t||(kA.Ya||(kA.Ya={}),A in kA.Ya||(kA.Ya[A]=1,E("FS.trackingDelegate error on read file: "+A)));try{kA.u.onOpenFile&&(i=0,1!=(2097155&t)&&(i|=kA.zb.wb.Cb),0!=(2097155&t)&&(i|=kA.zb.wb.Db),kA.u.onOpenFile(A,i))}catch(e){E("FS.trackingDelegate['onOpenFile']('"+A+"', flags) threw an exception: "+e.message)}return n},close:function(A){if(kA.la(A))throw new kA.b(8);A.Oa&&(A.Oa=null);try{A.h.close&&A.h.close(A)}catch(A){throw A}finally{kA.Lb(A.fd)}A.fd=null},la:function(A){return null===A.fd},K:function(A,e,t){if(kA.la(A))throw new kA.b(8);if(!A.seekable||!A.h.K)throw new kA.b(70);if(0!=t&&1!=t&&2!=t)throw new kA.b(28);return A.position=A.h.K(A,e,t),A.wc=[],A.position},read:function(A,e,t,r,n){if(0>r||0>n)throw new kA.b(28);if(kA.la(A))throw new kA.b(8);if(1==(2097155&A.flags))throw new kA.b(8);if(kA.v(A.node.mode))throw new kA.b(31);if(!A.h.read)throw new kA.b(28);var i=void 0!==n;if(i){if(!A.seekable)throw new kA.b(70)}else n=A.position;return e=A.h.read(A,e,t,r,n),i||(A.position+=e),e},write:function(A,e,t,r,n,i){if(0>r||0>n)throw new kA.b(28);if(kA.la(A))throw new kA.b(8);if(0==(2097155&A.flags))throw new kA.b(8);if(kA.v(A.node.mode))throw new kA.b(31);if(!A.h.write)throw new kA.b(28);A.seekable&&1024&A.flags&&kA.K(A,0,2);var o=void 0!==n;if(o){if(!A.seekable)throw new kA.b(70)}else n=A.position;e=A.h.write(A,e,t,r,n,i),o||(A.position+=e);try{A.path&&kA.u.onWriteToFile&&kA.u.onWriteToFile(A.path)}catch(e){E("FS.trackingDelegate['onWriteToFile']('"+A.path+"') threw an exception: "+e.message)}return e},ia:function(A,e,t){if(kA.la(A))throw new kA.b(8);if(0>e||0>=t)throw new kA.b(28);if(0==(2097155&A.flags))throw new kA.b(8);if(!kA.isFile(A.node.mode)&&!kA.v(A.node.mode))throw new kA.b(43);if(!A.h.ia)throw new kA.b(138);A.h.ia(A,e,t)},na:function(A,e,t,r,n,i,o){if(0!=(2&i)&&0==(2&o)&&2!=(2097155&A.flags))throw new kA.b(2);if(1==(2097155&A.flags))throw new kA.b(2);if(!A.h.na)throw new kA.b(43);return A.h.na(A,e,t,r,n,i,o)},da:function(A,e,t,r,n){return A&&A.h.da?A.h.da(A,e,t,r,n):0},Qc:function(){return 0},Ra:function(A,e,t){if(!A.h.Ra)throw new kA.b(59);return A.h.Ra(A,e,t)},readFile:function(A,e){if((e=e||{}).flags=e.flags||"r",e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw Error('Invalid encoding type "'+e.encoding+'"');var t,r=kA.open(A,e.flags);A=kA.stat(A).size;var n=new Uint8Array(A);return kA.read(r,n,0,A,0),"utf8"===e.encoding?t=b(n,0):"binary"===e.encoding&&(t=n),kA.close(r),t},writeFile:function(A,e,t){if((t=t||{}).flags=t.flags||"w",A=kA.open(A,t.flags,t.mode),"string"==typeof e){var r=new Uint8Array(U(e)+1);e=F(e,r,0,r.length),kA.write(A,r,0,e,void 0,t.Jb)}else{if(!ArrayBuffer.isView(e))throw Error("Unsupported data type");kA.write(A,e,0,e.byteLength,void 0,t.Jb)}kA.close(A)},cwd:function(){return kA.ib},chdir:function(A){if(null===(A=kA.m(A,{H:!0})).node)throw new kA.b(44);if(!kA.v(A.node.mode))throw new kA.b(54);var e=kA.Z(A.node,"x");if(e)throw new kA.b(e);kA.ib=A.path},Ob:function(){kA.mkdir("/tmp"),kA.mkdir("/home"),kA.mkdir("/home/web_user")},Nb:function(){if(kA.mkdir("/dev"),kA.$a(kA.X(1,3),{read:function(){return 0},write:function(A,e,t,r){return r}}),kA.Da("/dev/null",kA.X(1,3)),HA(kA.X(5,0),MA),HA(kA.X(6,0),LA),kA.Da("/dev/tty",kA.X(5,0)),kA.Da("/dev/tty1",kA.X(6,0)),"object"==typeof crypto&&"function"==typeof crypto.getRandomValues)var A=new Uint8Array(1),e=function(){return crypto.getRandomValues(A),A[0]};else if(u)try{var r=t(4);e=function(){return r.randomBytes(1)[0]}}catch(A){}e||(e=function(){gA("random_device")}),kA.T("/dev","random",e),kA.T("/dev","urandom",e),kA.mkdir("/dev/shm"),kA.mkdir("/dev/shm/tmp")},Qb:function(){kA.mkdir("/proc"),kA.mkdir("/proc/self"),kA.mkdir("/proc/self/fd"),kA.s({s:function(){var A=kA.createNode("/proc/self","fd",16895,73);return A.g={lookup:function(A,e){var t=kA.ba(+e);if(!t)throw new kA.b(8);return(A={parent:null,s:{vb:"fake"},g:{readlink:function(){return t.path}}}).parent=A}},A}},{},"/proc/self/fd")},Rb:function(){e.stdin?kA.T("/dev","stdin",e.stdin):kA.symlink("/dev/tty","/dev/stdin"),e.stdout?kA.T("/dev","stdout",null,e.stdout):kA.symlink("/dev/tty","/dev/stdout"),e.stderr?kA.T("/dev","stderr",null,e.stderr):kA.symlink("/dev/tty1","/dev/stderr"),kA.open("/dev/stdin","r"),kA.open("/dev/stdout","w"),kA.open("/dev/stderr","w")},kb:function(){kA.b||(kA.b=function(A,e){this.node=e,this.pc=function(A){this.B=A},this.pc(A),this.message="FS error"},kA.b.prototype=Error(),kA.b.prototype.constructor=kA.b,[44].forEach((function(A){kA.Na[A]=new kA.b(A),kA.Na[A].stack=""})))},rc:function(){kA.kb(),kA.L=Array(4096),kA.s(xA,{},"/"),kA.Ob(),kA.Nb(),kA.Qb(),kA.Ub={MEMFS:xA}},ka:function(A,t,r){kA.ka.Qa=!0,kA.kb(),e.stdin=A||e.stdin,e.stdout=t||e.stdout,e.stderr=r||e.stderr,kA.Rb()},quit:function(){kA.ka.Qa=!1;var A=e._fflush;for(A&&A(0),A=0;Athis.length-1||0>A)){var e=A%this.chunkSize;return this.rb(A/this.chunkSize|0)[e]}},i.prototype.Ib=function(A){this.rb=A},i.prototype.eb=function(){var A=new XMLHttpRequest;if(A.open("HEAD",t,!1),A.send(null),!(200<=A.status&&300>A.status||304===A.status))throw Error("Couldn't load "+t+". Status: "+A.status);var e,r=Number(A.getResponseHeader("Content-length")),n=(e=A.getResponseHeader("Accept-Ranges"))&&"bytes"===e;A=(e=A.getResponseHeader("Content-Encoding"))&&"gzip"===e;var i=1048576;n||(i=r);var o=this;o.Ib((function(A){var e=A*i,n=(A+1)*i-1;if(n=Math.min(n,r-1),void 0===o.S[A]){var a=o.S;if(e>n)throw Error("invalid range ("+e+", "+n+") or no bytes requested!");if(n>r-1)throw Error("only "+r+" bytes available! programmer error!");var s=new XMLHttpRequest;if(s.open("GET",t,!1),r!==i&&s.setRequestHeader("Range","bytes="+e+"-"+n),"undefined"!=typeof Uint8Array&&(s.responseType="arraybuffer"),s.overrideMimeType&&s.overrideMimeType("text/plain; charset=x-user-defined"),s.send(null),!(200<=s.status&&300>s.status||304===s.status))throw Error("Couldn't load "+t+". Status: "+s.status);e=void 0!==s.response?new Uint8Array(s.response||[]):qe(s.responseText||"",!0),a[A]=e}if(void 0===o.S[A])throw Error("doXHR failed!");return o.S[A]})),!A&&r||(i=r=1,i=r=this.rb(0).length,h("LazyFiles on gzip forces download of the whole file when length is accessed")),this.Fb=r,this.Eb=i,this.Ua=!0},"undefined"!=typeof XMLHttpRequest){if(!s)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var o=new i;Object.defineProperties(o,{length:{get:function(){return this.Ua||this.eb(),this.Fb}},chunkSize:{get:function(){return this.Ua||this.eb(),this.Eb}}}),o={Sa:!1,f:o}}else o={Sa:!1,url:t};var a=kA.Pb(A,e,o,r,n);o.f?a.f=o.f:o.url&&(a.f=null,a.url=o.url),Object.defineProperties(a,{l:{get:function(){return this.f.length}}});var u={};return Object.keys(a.h).forEach((function(A){var e=a.h[A];u[A]=function(){if(!kA.nb(a))throw new kA.b(29);return e.apply(null,arguments)}})),u.read=function(A,e,t,r,n){if(!kA.nb(a))throw new kA.b(29);if(n>=(A=A.node.f).length)return 0;if(r=Math.min(A.length-n,r),A.slice)for(var i=0;i>2]}function TA(A){if(!(A=kA.ba(A)))throw new kA.b(8);return A}function PA(A){switch(A){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+A)}}var JA=void 0;function OA(A){for(var e="";R[A];)e+=JA[R[A++]];return e}var KA={},jA={},zA={};function qA(A){if(void 0===A)return"_unknown";var e=(A=A.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=e&&57>=e?"_"+A:A}function ZA(A,e){return A=qA(A),new Function("body","return function "+A+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function WA(A){var e=Error,t=ZA(A,(function(e){this.name=A,this.message=e,void 0!==(e=Error(e).stack)&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},t}var XA=void 0;function $A(A){throw new XA(A)}var Ae=void 0;function ee(A){throw new Ae(A)}function te(A,e,t){function r(e){(e=t(e)).length!==A.length&&ee("Mismatched type converter count");for(var r=0;r>2])}var me={};function ye(A,e){return e.o&&e.j||ee("makeClassHandle requires ptr and ptrType"),!!e.F!=!!e.D&&ee("Both smartPtrType and smartPtr must be specified"),e.count={value:1},ue(Object.create(A,{c:{value:e}}))}function ve(A,e,t,r){this.name=A,this.i=e,this.Ta=t,this.za=r,this.Ba=!1,this.$=this.nc=this.mc=this.xb=this.qc=this.kc=void 0,void 0!==e.G?this.toWireType=fe:(this.toWireType=r?Ee:Ce,this.O=null)}function De(A,t){A=OA(A);for(var r=e["dynCall_"+A],n=[],i=1;i>2)+r]);return t}function Se(A){for(;A.length;){var e=A.pop();A.pop()(e)}}function Ne(A,e,t){return A instanceof Object||$A(t+' with invalid "this": '+A),A instanceof e.i.constructor||$A(t+' incompatible with "this" of type '+A.constructor.name),A.c.j||$A("cannot call emscripten binding method "+t+" on deleted object"),he(A.c.j,A.c.o.i,e.i)}var Re=[],He=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Ge(A){switch(A){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=Re.length?Re.pop():He.length;return He[e]={ra:1,value:A},e}}function Me(A){if(null===A)return"null";var e=typeof A;return"object"===e||"array"===e||"function"===e?A.toString():""+A}function Le(A,e){switch(e){case 2:return function(A){return this.fromWireType(x[A>>2])};case 3:return function(A){return this.fromWireType(k[A>>3])};default:throw new TypeError("Unknown float type: "+A)}}function xe(A,e,t){switch(e){case 0:return t?function(A){return N[A]}:function(A){return R[A]};case 1:return t?function(A){return H[A>>1]}:function(A){return G[A>>1]};case 2:return t?function(A){return M[A>>2]}:function(A){return L[A>>2]};default:throw new TypeError("Unknown integer type: "+A)}}var ke,Ye={};function _e(){if(!ke){var A,e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:c||"./this.program"};for(A in Ye)e[A]=Ye[A];var t=[];for(A in e)t.push(A+"="+e[A]);ke=t}return ke}function Ve(A){return 0==A%4&&(0!=A%100||0==A%400)}function Te(A,e){for(var t=0,r=0;r<=e;t+=A[r++]);return t}var Pe=[31,29,31,30,31,30,31,31,30,31,30,31],Je=[31,28,31,30,31,30,31,31,30,31,30,31];function Oe(A,e){for(A=new Date(A.getTime());0r-A.getDate())){A.setDate(A.getDate()+e);break}e-=r-A.getDate()+1,A.setDate(1),11>t?A.setMonth(t+1):(A.setMonth(0),A.setFullYear(A.getFullYear()+1))}return A}function Ke(A,e,t,r){A||(A=this),this.parent=A,this.s=A.s,this.oa=null,this.id=kA.ec++,this.name=e,this.mode=t,this.g={},this.h={},this.rdev=r}Object.defineProperties(Ke.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(A){A?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(A){A?this.mode|=146:this.mode&=-147}},ac:{get:function(){return kA.v(this.mode)}},Sa:{get:function(){return kA.ya(this.mode)}}}),kA.Ab=Ke,kA.rc();for(var je=Array(256),ze=0;256>ze;++ze)je[ze]=String.fromCharCode(ze);function qe(A,e){var t=Array(U(A)+1);return A=F(A,t,0,t.length),e&&(t.length=A),t}function Ze(A){for(var e=[],t=0;t>4,n=(15&n)<<4|i>>2;var a=(3&i)<<6|o;e+=String.fromCharCode(r),64!==i&&(e+=String.fromCharCode(n)),64!==o&&(e+=String.fromCharCode(a))}while(t>2],e.ha.push(A),C=r[n],0|A;return A=M[A>>2],C=t,0|A},__cxa_find_matching_catch_3:function(){var A=pA;if(!A)return C=0;var e=EA[A],t=e.type;if(!t)return C=0,0|A;var r=Array.prototype.slice.call(arguments);st(t),M[22792]=A,A=91168;for(var n=0;n>2],e.ha.push(A),C=r[n],0|A;return A=M[A>>2],C=t,0|A},__cxa_find_matching_catch_4:function(){var A=pA;if(!A)return C=0;var e=EA[A],t=e.type;if(!t)return C=0,0|A;var r=Array.prototype.slice.call(arguments);st(t),M[22792]=A,A=91168;for(var n=0;n>2],e.ha.push(A),C=r[n],0|A;return A=M[A>>2],C=t,0|A},__cxa_find_matching_catch_5:function(){var A=pA;if(!A)return C=0;var e=EA[A],t=e.type;if(!t)return C=0,0|A;var r=Array.prototype.slice.call(arguments);st(t),M[22792]=A,A=91168;for(var n=0;n>2],e.ha.push(A),C=r[n],0|A;return A=M[A>>2],C=t,0|A},__cxa_free_exception:mA,__cxa_get_exception_ptr:function(A){return A},__cxa_rethrow:function(){var A=fA.pop();throw A=CA(A),EA[A].Ea||(fA.push(A),EA[A].Ea=!0),pA=A,A},__cxa_throw:function(A,e,t){throw EA[A]={j:A,ha:[A],type:e,ja:t,ra:0,fb:!1,Ea:!1},pA=A,"uncaught_exception"in ot?ot.ab++:ot.ab=1,A},__cxa_uncaught_exceptions:function(){return ot.ab},__map_file:function(){return yA(63),-1},__resumeException:function(A){throw pA||(pA=A),A},__sys_fcntl64:function(A,e,t){_A=t;try{var r=TA(A);switch(e){case 0:var n=VA();return 0>n?-28:kA.open(r.path,r.flags,0,n).fd;case 1:case 2:case 13:case 14:return 0;case 3:return r.flags;case 4:return n=VA(),r.flags|=n,0;case 12:return n=VA(),H[n+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return yA(28),-1}}catch(A){return void 0!==kA&&A instanceof kA.b||gA(A),-A.B}},__sys_ioctl:function(A,e,t){_A=t;try{var r=TA(A);switch(e){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return r.tty?0:-59;case 21519:if(!r.tty)return-59;var n=VA();return M[n>>2]=0;case 21520:return r.tty?-28:-59;case 21531:return n=VA(),kA.Ra(r,e,n);default:gA("bad ioctl syscall "+e)}}catch(A){return void 0!==kA&&A instanceof kA.b||gA(A),-A.B}},__sys_munmap:function(A,e){try{if(-1==(0|A)||0===e)var t=-28;else{var r=YA[A];if(r&&e===r.Lc){var n=kA.ba(r.fd);if(2&r.Sc){var i=r.flags,o=r.offset,a=R.slice(A,A+e);kA.da(n,a,o,e,i)}YA[A]=null,r.Gb&&rt(r.Nc)}t=0}return t}catch(A){return void 0!==kA&&A instanceof kA.b||gA(A),-A.B}},__sys_open:function(A,e,t){_A=t;try{var r=w(A),n=VA();return kA.open(r,e,n).fd}catch(A){return void 0!==kA&&A instanceof kA.b||gA(A),-A.B}},__sys_stat64:function(A,e){try{A=w(A);A:{var t=kA.stat;try{var r=t(A)}catch(e){if(e&&e.node&&DA(A)!==DA(kA.I(e.node))){var n=-54;break A}throw e}M[e>>2]=r.dev,M[e+4>>2]=0,M[e+8>>2]=r.ino,M[e+12>>2]=r.mode,M[e+16>>2]=r.nlink,M[e+20>>2]=r.uid,M[e+24>>2]=r.gid,M[e+28>>2]=r.rdev,M[e+32>>2]=0,lA=[r.size>>>0,(BA=r.size,1<=+eA(BA)?0>>0:~~+tA((BA-+(~~BA>>>0))/4294967296)>>>0:0)],M[e+40>>2]=lA[0],M[e+44>>2]=lA[1],M[e+48>>2]=4096,M[e+52>>2]=r.blocks,M[e+56>>2]=r.atime.getTime()/1e3|0,M[e+60>>2]=0,M[e+64>>2]=r.mtime.getTime()/1e3|0,M[e+68>>2]=0,M[e+72>>2]=r.ctime.getTime()/1e3|0,M[e+76>>2]=0,lA=[r.ino>>>0,(BA=r.ino,1<=+eA(BA)?0>>0:~~+tA((BA-+(~~BA>>>0))/4294967296)>>>0:0)],M[e+80>>2]=lA[0],M[e+84>>2]=lA[1],n=0}return n}catch(A){return void 0!==kA&&A instanceof kA.b||gA(A),-A.B}},_embind_register_bool:function(A,e,t,r,n){var i=PA(t);re(A,{name:e=OA(e),fromWireType:function(A){return!!A},toWireType:function(A,e){return e?r:n},argPackAdvance:8,readValueFromPointer:function(A){if(1===t)var r=N;else if(2===t)r=H;else{if(4!==t)throw new TypeError("Unknown boolean type size: "+e);r=M}return this.fromWireType(r[A>>i])},O:null})},_embind_register_class:function(A,t,r,n,i,o,a,s,u,g,c,B,l){c=OA(c),o=De(i,o),s&&(s=De(a,s)),g&&(g=De(u,g)),l=De(B,l);var Q=qA(c);!function(A,t){e.hasOwnProperty(A)?($A("Cannot register public name '"+A+"' twice"),Ie(e,A,A),e.hasOwnProperty(void 0)&&$A("Cannot register multiple overloads of a function with the same number of arguments (undefined)!"),e[A].N[void 0]=t):e[A]=t}(Q,(function(){Fe("Cannot construct "+c+" due to unbound types",[n])})),te([A,t,r],n?[n]:[],(function(t){if(t=t[0],n)var r=t.i,i=r.U;else i=le.prototype;t=ZA(Q,(function(){if(Object.getPrototypeOf(this)!==a)throw new XA("Use 'new' to construct "+c);if(void 0===u.V)throw new XA(c+" has no accessible constructor");var A=u.V[arguments.length];if(void 0===A)throw new XA("Tried to invoke ctor of "+c+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(u.V).toString()+") parameters instead!");return A.apply(this,arguments)}));var a=Object.create(i,{constructor:{value:t}});t.prototype=a;var u=new de(c,t,a,l,r,o,s,g);r=new ve(c,u,!0,!1),i=new ve(c+"*",u,!1,!1);var B=new ve(c+" const*",u,!1,!0);return Qe[A]={pointerType:i,Mb:B},function(A,t){e.hasOwnProperty(A)||ee("Replacing nonexistant public symbol"),e[A]=t,e[A].va=void 0}(Q,t),[r,i,B]}))},_embind_register_class_constructor:function(A,e,t,r,n,i){v(0c&&$A("argTypes array size mismatch! Must at least get return value and 'this' types!");var B=null!==r[1]&&null!==s,l=!1;for(s=1;s>>a}}var s=-1!=e.indexOf("unsigned");re(A,{name:e,fromWireType:i,toWireType:function(A,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+Me(t)+'" to '+this.name);if(tn)throw new TypeError('Passing a number "'+Me(t)+'" from JS side to C/C++ side to an argument of type "'+e+'", which is outside the valid range ['+r+", "+n+"]!");return s?t>>>0:0|t},argPackAdvance:8,readValueFromPointer:xe(e,o,0!==r),O:null})},_embind_register_memory_view:function(A,e,t){function r(A){var e=L;return new n(S,e[1+(A>>=2)],e[A])}var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];re(A,{name:t=OA(t),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{Zb:!0})},_embind_register_std_string:function(A,e){var t="std::string"===(e=OA(e));re(A,{name:e,fromWireType:function(A){var e=L[A>>2];if(t){var r=R[A+4+e],n=0;0!=r&&(n=r,R[A+4+e]=0);var i=A+4;for(r=0;r<=e;++r){var o=A+4+r;if(0==R[o]){if(i=w(i),void 0===a)var a=i;else a+=String.fromCharCode(0),a+=i;i=o+1}}0!=n&&(R[A+4+e]=n)}else{for(a=Array(e),r=0;r>2]=n,t&&r)F(e,R,i+4,n+1);else if(r)for(r=0;r>2],n=o(),i=n[A+4+t*e>>a],s=0;0!=i&&(s=i,n[A+4+t*e>>a]=0);var u=A+4;for(i=0;i<=t;++i){var g=A+4+i*e;if(0==n[g>>a]){if(u=r(u),void 0===c)var c=u;else c+=String.fromCharCode(0),c+=u;u=g+e}}return 0!=s&&(n[A+4+t*e>>a]=s),rt(A),c},toWireType:function(A,r){"string"!=typeof r&&$A("Cannot pass non-string to C++ string type "+t);var o=i(r),s=tt(4+o+e);return L[s>>2]=o>>a,n(r,s+4,o+e),null!==A&&A.push(rt,s),s},argPackAdvance:8,readValueFromPointer:pe,O:function(A){rt(A)}})},_embind_register_void:function(A,e){re(A,{Jc:!0,name:e=OA(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},abort:function(){gA()},emscripten_get_sbrk_ptr:function(){return 91008},emscripten_memcpy_big:function(A,e,t){R.copyWithin(A,e,e+t)},emscripten_resize_heap:function(A){A>>>=0;var e=R.length;if(2147483648=t;t*=2){var r=e*(1+.2/t);r=Math.min(r,A+100663296),0<(r=Math.max(16777216,A,r))%65536&&(r+=65536-r%65536);A:{try{p.grow(Math.min(2147483648,r)-S.byteLength+65535>>>16),K(p.buffer);var n=1;break A}catch(A){}n=void 0}if(n)return!0}return!1},environ_get:function(A,e){var t=0;return _e().forEach((function(r,n){var i=e+t;for(n=M[A+4*n>>2]=i,i=0;i>0]=r.charCodeAt(i);N[n>>0]=0,t+=r.length+1})),0},environ_sizes_get:function(A,e){var t=_e();M[A>>2]=t.length;var r=0;return t.forEach((function(A){r+=A.length+1})),M[e>>2]=r,0},fd_close:function(A){try{var e=TA(A);return kA.close(e),0}catch(A){return void 0!==kA&&A instanceof kA.b||gA(A),A.B}},fd_read:function(A,e,t,r){try{A:{for(var n=TA(A),i=A=0;i>2],a=kA.read(n,N,M[e+8*i>>2],o,void 0);if(0>a){var s=-1;break A}if(A+=a,a>2]=s,0}catch(A){return void 0!==kA&&A instanceof kA.b||gA(A),A.B}},fd_seek:function(A,e,t,r,n){try{var i=TA(A);return-9007199254740992>=(A=4294967296*t+(e>>>0))||9007199254740992<=A?-61:(kA.K(i,A,r),lA=[i.position>>>0,(BA=i.position,1<=+eA(BA)?0>>0:~~+tA((BA-+(~~BA>>>0))/4294967296)>>>0:0)],M[n>>2]=lA[0],M[n+4>>2]=lA[1],i.Oa&&0===A&&0===r&&(i.Oa=null),0)}catch(A){return void 0!==kA&&A instanceof kA.b||gA(A),A.B}},fd_write:function(A,e,t,r){try{A:{for(var n=TA(A),i=A=0;i>2],M[e+(8*i+4)>>2],void 0);if(0>o){var a=-1;break A}A+=o}a=A}return M[r>>2]=a,0}catch(A){return void 0!==kA&&A instanceof kA.b||gA(A),A.B}},getTempRet0:function(){return 0|C},gettimeofday:function(A){var e=Date.now();return M[A>>2]=e/1e3|0,M[A+4>>2]=e%1e3*1e3|0,0},invoke_diii:function(A,e,t,r){var n=Tt();try{return Vt(A,e,t,r)}catch(A){if(Jt(n),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_fiii:function(A,e,t,r){var n=Tt();try{return _t(A,e,t,r)}catch(A){if(Jt(n),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_i:function(A){var e=Tt();try{return mt(A)}catch(A){if(Jt(e),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_ii:function(A,e){var t=Tt();try{return yt(A,e)}catch(A){if(Jt(t),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_iif:function(A,e,t){var r=Tt();try{return xt(A,e,t)}catch(A){if(Jt(r),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_iii:function(A,e,t){var r=Tt();try{return vt(A,e,t)}catch(A){if(Jt(r),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_iiii:function(A,e,t,r){var n=Tt();try{return Dt(A,e,t,r)}catch(A){if(Jt(n),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_iiiii:function(A,e,t,r,n){var i=Tt();try{return bt(A,e,t,r,n)}catch(A){if(Jt(i),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_iiiiid:function(A,e,t,r,n,i){var o=Tt();try{return Gt(A,e,t,r,n,i)}catch(A){if(Jt(o),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_iiiiii:function(A,e,t,r,n,i){var o=Tt();try{return wt(A,e,t,r,n,i)}catch(A){if(Jt(o),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_iiiiiii:function(A,e,t,r,n,i,o){var a=Tt();try{return Ft(A,e,t,r,n,i,o)}catch(A){if(Jt(a),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_iiiiiiii:function(A,e,t,r,n,i,o,a){var s=Tt();try{return Ut(A,e,t,r,n,i,o,a)}catch(A){if(Jt(s),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_iiiiiiiiiii:function(A,e,t,r,n,i,o,a,s,u,g){var c=Tt();try{return St(A,e,t,r,n,i,o,a,s,u,g)}catch(A){if(Jt(c),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_iiiiiiiiiiii:function(A,e,t,r,n,i,o,a,s,u,g,c){var B=Tt();try{return Nt(A,e,t,r,n,i,o,a,s,u,g,c)}catch(A){if(Jt(B),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_iiiiiiiiiiiii:function(A,e,t,r,n,i,o,a,s,u,g,c,B){var l=Tt();try{return Rt(A,e,t,r,n,i,o,a,s,u,g,c,B)}catch(A){if(Jt(l),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_iiiiij:function(A,e,t,r,n,i,o){var a=Tt();try{return Ht(A,e,t,r,n,i,o)}catch(A){if(Jt(a),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_iiijiiiiii:function(A,e,t,r,n,i,o,a,s,u,g){var c=Tt();try{return Mt(A,e,t,r,n,i,o,a,s,u,g)}catch(A){if(Jt(c),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_iij:function(A,e,t,r){var n=Tt();try{return Lt(A,e,t,r)}catch(A){if(Jt(n),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_jii:function(A,e,t){var r=Tt();try{return kt(A,e,t)}catch(A){if(Jt(r),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_jiiii:function(A,e,t,r,n){var i=Tt();try{return Yt(A,e,t,r,n)}catch(A){if(Jt(i),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_v:function(A){var e=Tt();try{gt(A)}catch(A){if(Jt(e),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_vi:function(A,e){var t=Tt();try{ct(A,e)}catch(A){if(Jt(t),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_vii:function(A,e,t){var r=Tt();try{Bt(A,e,t)}catch(A){if(Jt(r),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_viii:function(A,e,t,r){var n=Tt();try{lt(A,e,t,r)}catch(A){if(Jt(n),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_viiii:function(A,e,t,r,n){var i=Tt();try{Qt(A,e,t,r,n)}catch(A){if(Jt(i),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_viiiii:function(A,e,t,r,n,i){var o=Tt();try{It(A,e,t,r,n,i)}catch(A){if(Jt(o),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_viiiiiii:function(A,e,t,r,n,i,o,a){var s=Tt();try{dt(A,e,t,r,n,i,o,a)}catch(A){if(Jt(s),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_viiiiiiiiii:function(A,e,t,r,n,i,o,a,s,u,g){var c=Tt();try{ht(A,e,t,r,n,i,o,a,s,u,g)}catch(A){if(Jt(c),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_viiiiiiiiiiiiiii:function(A,e,t,r,n,i,o,a,s,u,g,c,B,l,Q,I){var d=Tt();try{Et(A,e,t,r,n,i,o,a,s,u,g,c,B,l,Q,I)}catch(A){if(Jt(d),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_viiiijji:function(A,e,t,r,n,i,o,a,s,u){var g=Tt();try{ft(A,e,t,r,n,i,o,a,s,u)}catch(A){if(Jt(g),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_viijii:function(A,e,t,r,n,i,o){var a=Tt();try{Ct(A,e,t,r,n,i,o)}catch(A){if(Jt(a),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},invoke_viji:function(A,e,t,r,n){var i=Tt();try{pt(A,e,t,r,n)}catch(A){if(Jt(i),A!==A+0&&"longjmp"!==A)throw A;it(1,0)}},llvm_eh_typeid_for:function(A){return A},memory:p,setTempRet0:function(A){C=0|A},strftime_l:function(A,e,t,r){return function(A,e,t,r){function n(A,e,t){for(A="number"==typeof A?A.toString():A||"";A.lengthA?-1:0=o(t,A)?0>=o(e,A)?A.getFullYear()+1:A.getFullYear():A.getFullYear()-1}var u=M[r+40>>2];for(var g in r={uc:M[r>>2],tc:M[r+4>>2],Ga:M[r+8>>2],sa:M[r+12>>2],fa:M[r+16>>2],C:M[r+20>>2],Ha:M[r+24>>2],Ia:M[r+28>>2],Vc:M[r+32>>2],sc:M[r+36>>2],vc:u?w(u):""},t=w(t),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})t=t.replace(new RegExp(g,"g"),u[g]);var c="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),B="January February March April May June July August September October November December".split(" ");for(g in u={"%a":function(A){return c[A.Ha].substring(0,3)},"%A":function(A){return c[A.Ha]},"%b":function(A){return B[A.fa].substring(0,3)},"%B":function(A){return B[A.fa]},"%C":function(A){return i((A.C+1900)/100|0,2)},"%d":function(A){return i(A.sa,2)},"%e":function(A){return n(A.sa,2," ")},"%g":function(A){return s(A).toString().substring(2)},"%G":function(A){return s(A)},"%H":function(A){return i(A.Ga,2)},"%I":function(A){return 0==(A=A.Ga)?A=12:12A.Ga?"AM":"PM"},"%S":function(A){return i(A.uc,2)},"%t":function(){return"\t"},"%u":function(A){return A.Ha||7},"%U":function(A){var e=new Date(A.C+1900,0,1),t=0===e.getDay()?e:Oe(e,7-e.getDay());return 0>o(t,A=new Date(A.C+1900,A.fa,A.sa))?i(Math.ceil((31-t.getDate()+(Te(Ve(A.getFullYear())?Pe:Je,A.getMonth()-1)-31)+A.getDate())/7),2):0===o(t,e)?"01":"00"},"%V":function(A){var e=new Date(A.C+1901,0,4),t=a(new Date(A.C+1900,0,4));e=a(e);var r=Oe(new Date(A.C+1900,0,1),A.Ia);return 0>o(r,t)?"53":0>=o(e,r)?"01":i(Math.ceil((t.getFullYear()o(t,A=new Date(A.C+1900,A.fa,A.sa))?i(Math.ceil((31-t.getDate()+(Te(Ve(A.getFullYear())?Pe:Je,A.getMonth()-1)-31)+A.getDate())/7),2):0===o(t,e)?"01":"00"},"%y":function(A){return(A.C+1900).toString().substring(2)},"%Y":function(A){return A.C+1900},"%z":function(A){var e=0<=(A=A.sc);return A=Math.abs(A)/60,(e?"+":"-")+String("0000"+(A/60*100+A%60)).slice(-4)},"%Z":function(A){return A.vc},"%%":function(){return"%"}})0<=t.indexOf(g)&&(t=t.replace(new RegExp(g,"g"),u[g](r)));return(g=qe(t,!1)).length>e?0:(N.set(g,A),g.length-1)}(A,e,t,r)},table:m},At=function(){function A(A){e.asm=A.exports,uA()}function t(e){A(e.instance)}function r(A){return(f||!a&&!s||"function"!=typeof fetch||cA(IA,"file://")?new Promise((function(A){A(hA())})):fetch(IA,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+IA+"'";return A.arrayBuffer()})).catch((function(){return hA()}))).then((function(A){return WebAssembly.instantiate(A,n)})).then(A,(function(A){E("failed to asynchronously prepare wasm: "+A),gA(A)}))}var n={env:$e,wasi_snapshot_preview1:$e};if(sA(),e.instantiateWasm)try{return e.instantiateWasm(n,A)}catch(A){return E("Module.instantiateWasm callback failed with error: "+A),!1}return function(){if(f||"function"!=typeof WebAssembly.instantiateStreaming||cA(IA,QA)||cA(IA,"file://")||"function"!=typeof fetch)return r(t);fetch(IA,{credentials:"same-origin"}).then((function(A){return WebAssembly.instantiateStreaming(A,n).then(t,(function(A){E("wasm streaming compile failed: "+A),E("falling back to ArrayBuffer instantiation"),r(t)}))}))}(),{}}();e.asm=At;var et=e.___wasm_call_ctors=function(){return(et=e.___wasm_call_ctors=e.asm.__wasm_call_ctors).apply(null,arguments)},tt=e._malloc=function(){return(tt=e._malloc=e.asm.malloc).apply(null,arguments)},rt=e._free=function(){return(rt=e._free=e.asm.free).apply(null,arguments)},nt=e.___errno_location=function(){return(nt=e.___errno_location=e.asm.__errno_location).apply(null,arguments)},it=e._setThrew=function(){return(it=e._setThrew=e.asm.setThrew).apply(null,arguments)},ot=e.__ZSt18uncaught_exceptionv=function(){return(ot=e.__ZSt18uncaught_exceptionv=e.asm._ZSt18uncaught_exceptionv).apply(null,arguments)},at=e.___cxa_can_catch=function(){return(at=e.___cxa_can_catch=e.asm.__cxa_can_catch).apply(null,arguments)},st=e.___cxa_is_pointer_type=function(){return(st=e.___cxa_is_pointer_type=e.asm.__cxa_is_pointer_type).apply(null,arguments)},ut=e.___getTypeName=function(){return(ut=e.___getTypeName=e.asm.__getTypeName).apply(null,arguments)};e.___embind_register_native_and_builtin_types=function(){return(e.___embind_register_native_and_builtin_types=e.asm.__embind_register_native_and_builtin_types).apply(null,arguments)};var gt=e.dynCall_v=function(){return(gt=e.dynCall_v=e.asm.dynCall_v).apply(null,arguments)},ct=e.dynCall_vi=function(){return(ct=e.dynCall_vi=e.asm.dynCall_vi).apply(null,arguments)},Bt=e.dynCall_vii=function(){return(Bt=e.dynCall_vii=e.asm.dynCall_vii).apply(null,arguments)},lt=e.dynCall_viii=function(){return(lt=e.dynCall_viii=e.asm.dynCall_viii).apply(null,arguments)},Qt=e.dynCall_viiii=function(){return(Qt=e.dynCall_viiii=e.asm.dynCall_viiii).apply(null,arguments)},It=e.dynCall_viiiii=function(){return(It=e.dynCall_viiiii=e.asm.dynCall_viiiii).apply(null,arguments)},dt=e.dynCall_viiiiiii=function(){return(dt=e.dynCall_viiiiiii=e.asm.dynCall_viiiiiii).apply(null,arguments)},ht=e.dynCall_viiiiiiiiii=function(){return(ht=e.dynCall_viiiiiiiiii=e.asm.dynCall_viiiiiiiiii).apply(null,arguments)},Et=e.dynCall_viiiiiiiiiiiiiii=function(){return(Et=e.dynCall_viiiiiiiiiiiiiii=e.asm.dynCall_viiiiiiiiiiiiiii).apply(null,arguments)},ft=e.dynCall_viiiijji=function(){return(ft=e.dynCall_viiiijji=e.asm.dynCall_viiiijji).apply(null,arguments)},Ct=e.dynCall_viijii=function(){return(Ct=e.dynCall_viijii=e.asm.dynCall_viijii).apply(null,arguments)},pt=e.dynCall_viji=function(){return(pt=e.dynCall_viji=e.asm.dynCall_viji).apply(null,arguments)},mt=e.dynCall_i=function(){return(mt=e.dynCall_i=e.asm.dynCall_i).apply(null,arguments)},yt=e.dynCall_ii=function(){return(yt=e.dynCall_ii=e.asm.dynCall_ii).apply(null,arguments)},vt=e.dynCall_iii=function(){return(vt=e.dynCall_iii=e.asm.dynCall_iii).apply(null,arguments)},Dt=e.dynCall_iiii=function(){return(Dt=e.dynCall_iiii=e.asm.dynCall_iiii).apply(null,arguments)},bt=e.dynCall_iiiii=function(){return(bt=e.dynCall_iiiii=e.asm.dynCall_iiiii).apply(null,arguments)},wt=e.dynCall_iiiiii=function(){return(wt=e.dynCall_iiiiii=e.asm.dynCall_iiiiii).apply(null,arguments)},Ft=e.dynCall_iiiiiii=function(){return(Ft=e.dynCall_iiiiiii=e.asm.dynCall_iiiiiii).apply(null,arguments)},Ut=e.dynCall_iiiiiiii=function(){return(Ut=e.dynCall_iiiiiiii=e.asm.dynCall_iiiiiiii).apply(null,arguments)},St=e.dynCall_iiiiiiiiiii=function(){return(St=e.dynCall_iiiiiiiiiii=e.asm.dynCall_iiiiiiiiiii).apply(null,arguments)},Nt=e.dynCall_iiiiiiiiiiii=function(){return(Nt=e.dynCall_iiiiiiiiiiii=e.asm.dynCall_iiiiiiiiiiii).apply(null,arguments)},Rt=e.dynCall_iiiiiiiiiiiii=function(){return(Rt=e.dynCall_iiiiiiiiiiiii=e.asm.dynCall_iiiiiiiiiiiii).apply(null,arguments)},Ht=e.dynCall_iiiiij=function(){return(Ht=e.dynCall_iiiiij=e.asm.dynCall_iiiiij).apply(null,arguments)},Gt=e.dynCall_iiiiid=function(){return(Gt=e.dynCall_iiiiid=e.asm.dynCall_iiiiid).apply(null,arguments)},Mt=e.dynCall_iiijiiiiii=function(){return(Mt=e.dynCall_iiijiiiiii=e.asm.dynCall_iiijiiiiii).apply(null,arguments)},Lt=e.dynCall_iij=function(){return(Lt=e.dynCall_iij=e.asm.dynCall_iij).apply(null,arguments)},xt=e.dynCall_iif=function(){return(xt=e.dynCall_iif=e.asm.dynCall_iif).apply(null,arguments)},kt=e.dynCall_jii=function(){return(kt=e.dynCall_jii=e.asm.dynCall_jii).apply(null,arguments)},Yt=e.dynCall_jiiii=function(){return(Yt=e.dynCall_jiiii=e.asm.dynCall_jiiii).apply(null,arguments)},_t=e.dynCall_fiii=function(){return(_t=e.dynCall_fiii=e.asm.dynCall_fiii).apply(null,arguments)},Vt=e.dynCall_diii=function(){return(Vt=e.dynCall_diii=e.asm.dynCall_diii).apply(null,arguments)},Tt=e.stackSave=function(){return(Tt=e.stackSave=e.asm.stackSave).apply(null,arguments)};e.stackAlloc=function(){return(e.stackAlloc=e.asm.stackAlloc).apply(null,arguments)};var Pt,Jt=e.stackRestore=function(){return(Jt=e.stackRestore=e.asm.stackRestore).apply(null,arguments)};function Ot(){function A(){if(!Pt&&(Pt=!0,e.calledRun=!0,!y)){if(e.noFSInit||kA.ka.Qa||kA.ka(),z(Z),kA.ub=!1,z(W),e.onRuntimeInitialized&&e.onRuntimeInitialized(),e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var A=e.postRun.shift();$.unshift(A)}z($)}}if(!(0{n.then((()=>{A()}))})),o=()=>function(A,e,t,r){return new(t||(t=Promise))((function(A,e){function n(A){try{o(r.next(A))}catch(A){e(A)}}function i(A){try{o(r.throw(A))}catch(A){e(A)}}function o(e){var r;e.done?A(e.value):(r=e.value,r instanceof t?r:new t((function(A){A(r)}))).then(n,i)}o((r=r.apply(undefined,[])).next())}))}(0,0,void 0,(function*(){yield i;const A=new n.H264MP4Encoder;return A.FS=n.FS,A}))},function(A,e){A.exports=t(1497)},function(A,e){A.exports=t(5835)}])},3349:(A,e,t)=>{"use strict";var r=t(213).Buffer,n=t(8473).Transform;function i(A){n.call(this),this._block=r.allocUnsafe(A),this._blockSize=A,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}t(5717)(i,n),i.prototype._transform=function(A,e,t){var r=null;try{this.update(A,e)}catch(A){r=A}t(r)},i.prototype._flush=function(A){var e=null;try{this.push(this.digest())}catch(A){e=A}A(e)},i.prototype.update=function(A,e){if(function(A,e){if(!r.isBuffer(A)&&"string"!=typeof A)throw new TypeError("Data must be a string or a buffer")}(A),this._finalized)throw new Error("Digest already called");r.isBuffer(A)||(A=r.from(A,e));for(var t=this._block,n=0;this._blockOffset+A.length-n>=this._blockSize;){for(var i=this._blockOffset;i0;++o)this._length[o]+=a,(a=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*a);return this},i.prototype._update=function(){throw new Error("_update is not implemented")},i.prototype.digest=function(A){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==A&&(e=e.toString(A)),this._block.fill(0),this._blockOffset=0;for(var t=0;t<4;++t)this._length[t]=0;return e},i.prototype._digest=function(){throw new Error("_digest is not implemented")},A.exports=i},213:(A,e,t)=>{var r=t(8764),n=r.Buffer;function i(A,e){for(var t in A)e[t]=A[t]}function o(A,e,t){return n(A,e,t)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?A.exports=r:(i(r,e),e.Buffer=o),o.prototype=Object.create(n.prototype),i(n,o),o.from=function(A,e,t){if("number"==typeof A)throw new TypeError("Argument must not be a number");return n(A,e,t)},o.alloc=function(A,e,t){if("number"!=typeof A)throw new TypeError("Argument must be a number");var r=n(A);return void 0!==e?"string"==typeof t?r.fill(e,t):r.fill(e):r.fill(0),r},o.allocUnsafe=function(A){if("number"!=typeof A)throw new TypeError("Argument must be a number");return n(A)},o.allocUnsafeSlow=function(A){if("number"!=typeof A)throw new TypeError("Argument must be a number");return r.SlowBuffer(A)}},3715:(A,e,t)=>{var r=e;r.utils=t(6436),r.common=t(5772),r.sha=t(9041),r.ripemd=t(2949),r.hmac=t(2344),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},5772:(A,e,t)=>{"use strict";var r=t(6436),n=t(9746);function i(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=i,i.prototype.update=function(A,e){if(A=r.toArray(A,e),this.pending?this.pending=this.pending.concat(A):this.pending=A,this.pendingTotal+=A.length,this.pending.length>=this._delta8){var t=(A=this.pending).length%this._delta8;this.pending=A.slice(A.length-t,A.length),0===this.pending.length&&(this.pending=null),A=r.join32(A,0,A.length-t,this.endian);for(var n=0;n>>24&255,r[n++]=A>>>16&255,r[n++]=A>>>8&255,r[n++]=255&A}else for(r[n++]=255&A,r[n++]=A>>>8&255,r[n++]=A>>>16&255,r[n++]=A>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,i=8;i{"use strict";var r=t(6436),n=t(9746);function i(A,e,t){if(!(this instanceof i))return new i(A,e,t);this.Hash=A,this.blockSize=A.blockSize/8,this.outSize=A.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(e,t))}A.exports=i,i.prototype._init=function(A){A.length>this.blockSize&&(A=(new this.Hash).update(A).digest()),n(A.length<=this.blockSize);for(var e=A.length;e{"use strict";var r=t(6436),n=t(5772),i=r.rotl32,o=r.sum32,a=r.sum32_3,s=r.sum32_4,u=n.BlockHash;function g(){if(!(this instanceof g))return new g;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function c(A,e,t,r){return A<=15?e^t^r:A<=31?e&t|~e&r:A<=47?(e|~t)^r:A<=63?e&r|t&~r:e^(t|~r)}function B(A){return A<=15?0:A<=31?1518500249:A<=47?1859775393:A<=63?2400959708:2840853838}function l(A){return A<=15?1352829926:A<=31?1548603684:A<=47?1836072691:A<=63?2053994217:0}r.inherits(g,u),e.ripemd160=g,g.blockSize=512,g.outSize=160,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(A,e){for(var t=this.h[0],r=this.h[1],n=this.h[2],u=this.h[3],g=this.h[4],E=t,f=r,C=n,p=u,m=g,y=0;y<80;y++){var v=o(i(s(t,c(y,r,n,u),A[Q[y]+e],B(y)),d[y]),g);t=g,g=u,u=i(n,10),n=r,r=v,v=o(i(s(E,c(79-y,f,C,p),A[I[y]+e],l(y)),h[y]),m),E=m,m=p,p=i(C,10),C=f,f=v}v=a(this.h[1],n,p),this.h[1]=a(this.h[2],u,m),this.h[2]=a(this.h[3],g,E),this.h[3]=a(this.h[4],t,f),this.h[4]=a(this.h[0],r,C),this.h[0]=v},g.prototype._digest=function(A){return"hex"===A?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var Q=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],I=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],h=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},9041:(A,e,t)=>{"use strict";e.sha1=t(4761),e.sha224=t(799),e.sha256=t(9344),e.sha384=t(772),e.sha512=t(5900)},4761:(A,e,t)=>{"use strict";var r=t(6436),n=t(5772),i=t(7038),o=r.rotl32,a=r.sum32,s=r.sum32_5,u=i.ft_1,g=n.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function B(){if(!(this instanceof B))return new B;g.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(B,g),A.exports=B,B.blockSize=512,B.outSize=160,B.hmacStrength=80,B.padLength=64,B.prototype._update=function(A,e){for(var t=this.W,r=0;r<16;r++)t[r]=A[e+r];for(;r{"use strict";var r=t(6436),n=t(9344);function i(){if(!(this instanceof i))return new i;n.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(i,n),A.exports=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(A){return"hex"===A?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},9344:(A,e,t)=>{"use strict";var r=t(6436),n=t(5772),i=t(7038),o=t(9746),a=r.sum32,s=r.sum32_4,u=r.sum32_5,g=i.ch32,c=i.maj32,B=i.s0_256,l=i.s1_256,Q=i.g0_256,I=i.g1_256,d=n.BlockHash,h=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function E(){if(!(this instanceof E))return new E;d.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=h,this.W=new Array(64)}r.inherits(E,d),A.exports=E,E.blockSize=512,E.outSize=256,E.hmacStrength=192,E.padLength=64,E.prototype._update=function(A,e){for(var t=this.W,r=0;r<16;r++)t[r]=A[e+r];for(;r{"use strict";var r=t(6436),n=t(5900);function i(){if(!(this instanceof i))return new i;n.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(i,n),A.exports=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(A){return"hex"===A?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},5900:(A,e,t)=>{"use strict";var r=t(6436),n=t(5772),i=t(9746),o=r.rotr64_hi,a=r.rotr64_lo,s=r.shr64_hi,u=r.shr64_lo,g=r.sum64,c=r.sum64_hi,B=r.sum64_lo,l=r.sum64_4_hi,Q=r.sum64_4_lo,I=r.sum64_5_hi,d=r.sum64_5_lo,h=n.BlockHash,E=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function f(){if(!(this instanceof f))return new f;h.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=E,this.W=new Array(160)}function C(A,e,t,r,n){var i=A&t^~A&n;return i<0&&(i+=4294967296),i}function p(A,e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function m(A,e,t,r,n){var i=A&t^A&n^t&n;return i<0&&(i+=4294967296),i}function y(A,e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function v(A,e){var t=o(A,e,28)^o(e,A,2)^o(e,A,7);return t<0&&(t+=4294967296),t}function D(A,e){var t=a(A,e,28)^a(e,A,2)^a(e,A,7);return t<0&&(t+=4294967296),t}function b(A,e){var t=a(A,e,14)^a(A,e,18)^a(e,A,9);return t<0&&(t+=4294967296),t}function w(A,e){var t=o(A,e,1)^o(A,e,8)^s(A,e,7);return t<0&&(t+=4294967296),t}function F(A,e){var t=a(A,e,1)^a(A,e,8)^u(A,e,7);return t<0&&(t+=4294967296),t}function U(A,e){var t=a(A,e,19)^a(e,A,29)^u(A,e,6);return t<0&&(t+=4294967296),t}r.inherits(f,h),A.exports=f,f.blockSize=1024,f.outSize=512,f.hmacStrength=192,f.padLength=128,f.prototype._prepareBlock=function(A,e){for(var t=this.W,r=0;r<32;r++)t[r]=A[e+r];for(;r{"use strict";var r=t(6436).rotr32;function n(A,e,t){return A&e^~A&t}function i(A,e,t){return A&e^A&t^e&t}function o(A,e,t){return A^e^t}e.ft_1=function(A,e,t,r){return 0===A?n(e,t,r):1===A||3===A?o(e,t,r):2===A?i(e,t,r):void 0},e.ch32=n,e.maj32=i,e.p32=o,e.s0_256=function(A){return r(A,2)^r(A,13)^r(A,22)},e.s1_256=function(A){return r(A,6)^r(A,11)^r(A,25)},e.g0_256=function(A){return r(A,7)^r(A,18)^A>>>3},e.g1_256=function(A){return r(A,17)^r(A,19)^A>>>10}},6436:(A,e,t)=>{"use strict";var r=t(9746),n=t(5717);function i(A,e){return 55296==(64512&A.charCodeAt(e))&&!(e<0||e+1>=A.length)&&56320==(64512&A.charCodeAt(e+1))}function o(A){return(A>>>24|A>>>8&65280|A<<8&16711680|(255&A)<<24)>>>0}function a(A){return 1===A.length?"0"+A:A}function s(A){return 7===A.length?"0"+A:6===A.length?"00"+A:5===A.length?"000"+A:4===A.length?"0000"+A:3===A.length?"00000"+A:2===A.length?"000000"+A:1===A.length?"0000000"+A:A}e.inherits=n,e.toArray=function(A,e){if(Array.isArray(A))return A.slice();if(!A)return[];var t=[];if("string"==typeof A)if(e){if("hex"===e)for((A=A.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(A="0"+A),n=0;n>6|192,t[r++]=63&o|128):i(A,n)?(o=65536+((1023&o)<<10)+(1023&A.charCodeAt(++n)),t[r++]=o>>18|240,t[r++]=o>>12&63|128,t[r++]=o>>6&63|128,t[r++]=63&o|128):(t[r++]=o>>12|224,t[r++]=o>>6&63|128,t[r++]=63&o|128)}else for(n=0;n>>0}return o},e.split32=function(A,e){for(var t=new Array(4*A.length),r=0,n=0;r>>24,t[n+1]=i>>>16&255,t[n+2]=i>>>8&255,t[n+3]=255&i):(t[n+3]=i>>>24,t[n+2]=i>>>16&255,t[n+1]=i>>>8&255,t[n]=255&i)}return t},e.rotr32=function(A,e){return A>>>e|A<<32-e},e.rotl32=function(A,e){return A<>>32-e},e.sum32=function(A,e){return A+e>>>0},e.sum32_3=function(A,e,t){return A+e+t>>>0},e.sum32_4=function(A,e,t,r){return A+e+t+r>>>0},e.sum32_5=function(A,e,t,r,n){return A+e+t+r+n>>>0},e.sum64=function(A,e,t,r){var n=A[e],i=r+A[e+1]>>>0,o=(i>>0,A[e+1]=i},e.sum64_hi=function(A,e,t,r){return(e+r>>>0>>0},e.sum64_lo=function(A,e,t,r){return e+r>>>0},e.sum64_4_hi=function(A,e,t,r,n,i,o,a){var s=0,u=e;return s+=(u=u+r>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(A,e,t,r,n,i,o,a){return e+r+i+a>>>0},e.sum64_5_hi=function(A,e,t,r,n,i,o,a,s,u){var g=0,c=e;return g+=(c=c+r>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(A,e,t,r,n,i,o,a,s,u){return e+r+i+a+u>>>0},e.rotr64_hi=function(A,e,t){return(e<<32-t|A>>>t)>>>0},e.rotr64_lo=function(A,e,t){return(A<<32-t|e>>>t)>>>0},e.shr64_hi=function(A,e,t){return A>>>t},e.shr64_lo=function(A,e,t){return(A<<32-t|e>>>t)>>>0}},2156:(A,e,t)=>{"use strict";var r=t(3715),n=t(4504),i=t(9746);function o(A){if(!(this instanceof o))return new o(A);this.hash=A.hash,this.predResist=!!A.predResist,this.outLen=this.hash.outSize,this.minEntropy=A.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=n.toArray(A.entropy,A.entropyEnc||"hex"),t=n.toArray(A.nonce,A.nonceEnc||"hex"),r=n.toArray(A.pers,A.persEnc||"hex");i(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,t,r)}A.exports=o,o.prototype._init=function(A,e,t){var r=A.concat(e).concat(t);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(A.concat(t||[])),this._reseed=1},o.prototype.generate=function(A,e,t,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(r=t,t=e,e=null),t&&(t=n.toArray(t,r||"hex"),this._update(t));for(var i=[];i.length{e.read=function(A,e,t,r,n){var i,o,a=8*n-r-1,s=(1<>1,g=-7,c=t?n-1:0,B=t?-1:1,l=A[e+c];for(c+=B,i=l&(1<<-g)-1,l>>=-g,g+=a;g>0;i=256*i+A[e+c],c+=B,g-=8);for(o=i&(1<<-g)-1,i>>=-g,g+=r;g>0;o=256*o+A[e+c],c+=B,g-=8);if(0===i)i=1-u;else{if(i===s)return o?NaN:1/0*(l?-1:1);o+=Math.pow(2,r),i-=u}return(l?-1:1)*o*Math.pow(2,i-r)},e.write=function(A,e,t,r,n,i){var o,a,s,u=8*i-n-1,g=(1<>1,B=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,l=r?0:i-1,Q=r?1:-1,I=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=g):(o=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-o))<1&&(o--,s*=2),(e+=o+c>=1?B/s:B*Math.pow(2,1-c))*s>=2&&(o++,s/=2),o+c>=g?(a=0,o=g):o+c>=1?(a=(e*s-1)*Math.pow(2,n),o+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,n),o=0));n>=8;A[t+l]=255&a,l+=Q,a/=256,n-=8);for(o=o<0;A[t+l]=255&o,l+=Q,o/=256,u-=8);A[t+l-Q]|=128*I}},3393:function(A){A.exports=function(){"use strict";var A=Array.prototype.slice;function e(A,e){e&&(A.prototype=Object.create(e.prototype)),A.prototype.constructor=A}function t(A){return o(A)?A:T(A)}function r(A){return a(A)?A:P(A)}function n(A){return s(A)?A:J(A)}function i(A){return o(A)&&!u(A)?A:O(A)}function o(A){return!(!A||!A[c])}function a(A){return!(!A||!A[B])}function s(A){return!(!A||!A[l])}function u(A){return a(A)||s(A)}function g(A){return!(!A||!A[Q])}e(r,t),e(n,t),e(i,t),t.isIterable=o,t.isKeyed=a,t.isIndexed=s,t.isAssociative=u,t.isOrdered=g,t.Keyed=r,t.Indexed=n,t.Set=i;var c="@@__IMMUTABLE_ITERABLE__@@",B="@@__IMMUTABLE_KEYED__@@",l="@@__IMMUTABLE_INDEXED__@@",Q="@@__IMMUTABLE_ORDERED__@@",I=32,d=31,h={},E={value:!1},f={value:!1};function C(A){return A.value=!1,A}function p(A){A&&(A.value=!0)}function m(){}function y(A,e){e=e||0;for(var t=Math.max(0,A.length-e),r=new Array(t),n=0;n>>0;if(""+t!==e||4294967295===t)return NaN;e=t}return e<0?v(A)+e:e}function b(){return!0}function w(A,e,t){return(0===A||void 0!==t&&A<=-t)&&(void 0===e||void 0!==t&&e>=t)}function F(A,e){return S(A,e,0)}function U(A,e){return S(A,e,e)}function S(A,e,t){return void 0===A?t:A<0?Math.max(0,e+A):void 0===e?A:Math.min(e,A)}var N="function"==typeof Symbol&&Symbol.iterator,R="@@iterator",H=N||R;function G(A){this.next=A}function M(A,e,t,r){var n=0===A?e:1===A?t:[e,t];return r?r.value=n:r={value:n,done:!1},r}function L(){return{value:void 0,done:!0}}function x(A){return!!_(A)}function k(A){return A&&"function"==typeof A.next}function Y(A){var e=_(A);return e&&e.call(A)}function _(A){var e=A&&(N&&A[N]||A["@@iterator"]);if("function"==typeof e)return e}function V(A){return A&&"number"==typeof A.length}function T(A){return null==A?eA():o(A)?A.toSeq():function(A){var e=nA(A)||"object"==typeof A&&new W(A);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+A);return e}(A)}function P(A){return null==A?eA().toKeyedSeq():o(A)?a(A)?A.toSeq():A.fromEntrySeq():tA(A)}function J(A){return null==A?eA():o(A)?a(A)?A.entrySeq():A.toIndexedSeq():rA(A)}function O(A){return(null==A?eA():o(A)?a(A)?A.entrySeq():A:rA(A)).toSetSeq()}G.prototype.toString=function(){return"[Iterator]"},G.KEYS=0,G.VALUES=1,G.ENTRIES=2,G.prototype.inspect=G.prototype.toSource=function(){return this.toString()},G.prototype[H]=function(){return this},e(T,t),T.of=function(){return T(arguments)},T.prototype.toSeq=function(){return this},T.prototype.toString=function(){return this.__toString("Seq {","}")},T.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},T.prototype.__iterate=function(A,e){return iA(this,A,e,!0)},T.prototype.__iterator=function(A,e){return oA(this,A,e,!0)},e(P,T),P.prototype.toKeyedSeq=function(){return this},e(J,T),J.of=function(){return J(arguments)},J.prototype.toIndexedSeq=function(){return this},J.prototype.toString=function(){return this.__toString("Seq [","]")},J.prototype.__iterate=function(A,e){return iA(this,A,e,!1)},J.prototype.__iterator=function(A,e){return oA(this,A,e,!1)},e(O,T),O.of=function(){return O(arguments)},O.prototype.toSetSeq=function(){return this},T.isSeq=AA,T.Keyed=P,T.Set=O,T.Indexed=J;var K,j,z,q="@@__IMMUTABLE_SEQ__@@";function Z(A){this._array=A,this.size=A.length}function W(A){var e=Object.keys(A);this._object=A,this._keys=e,this.size=e.length}function X(A){this._iterable=A,this.size=A.length||A.size}function $(A){this._iterator=A,this._iteratorCache=[]}function AA(A){return!(!A||!A[q])}function eA(){return K||(K=new Z([]))}function tA(A){var e=Array.isArray(A)?new Z(A).fromEntrySeq():k(A)?new $(A).fromEntrySeq():x(A)?new X(A).fromEntrySeq():"object"==typeof A?new W(A):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+A);return e}function rA(A){var e=nA(A);if(!e)throw new TypeError("Expected Array or iterable object of values: "+A);return e}function nA(A){return V(A)?new Z(A):k(A)?new $(A):x(A)?new X(A):void 0}function iA(A,e,t,r){var n=A._cache;if(n){for(var i=n.length-1,o=0;o<=i;o++){var a=n[t?i-o:o];if(!1===e(a[1],r?a[0]:o,A))return o+1}return o}return A.__iterateUncached(e,t)}function oA(A,e,t,r){var n=A._cache;if(n){var i=n.length-1,o=0;return new G((function(){var A=n[t?i-o:o];return o++>i?{value:void 0,done:!0}:M(e,r?A[0]:o-1,A[1])}))}return A.__iteratorUncached(e,t)}function aA(A,e){return e?sA(e,A,"",{"":A}):uA(A)}function sA(A,e,t,r){return Array.isArray(e)?A.call(r,t,J(e).map((function(t,r){return sA(A,t,r,e)}))):gA(e)?A.call(r,t,P(e).map((function(t,r){return sA(A,t,r,e)}))):e}function uA(A){return Array.isArray(A)?J(A).map(uA).toList():gA(A)?P(A).map(uA).toMap():A}function gA(A){return A&&(A.constructor===Object||void 0===A.constructor)}function cA(A,e){if(A===e||A!=A&&e!=e)return!0;if(!A||!e)return!1;if("function"==typeof A.valueOf&&"function"==typeof e.valueOf){if((A=A.valueOf())===(e=e.valueOf())||A!=A&&e!=e)return!0;if(!A||!e)return!1}return!("function"!=typeof A.equals||"function"!=typeof e.equals||!A.equals(e))}function BA(A,e){if(A===e)return!0;if(!o(e)||void 0!==A.size&&void 0!==e.size&&A.size!==e.size||void 0!==A.__hash&&void 0!==e.__hash&&A.__hash!==e.__hash||a(A)!==a(e)||s(A)!==s(e)||g(A)!==g(e))return!1;if(0===A.size&&0===e.size)return!0;var t=!u(A);if(g(A)){var r=A.entries();return e.every((function(A,e){var n=r.next().value;return n&&cA(n[1],A)&&(t||cA(n[0],e))}))&&r.next().done}var n=!1;if(void 0===A.size)if(void 0===e.size)"function"==typeof A.cacheResult&&A.cacheResult();else{n=!0;var i=A;A=e,e=i}var c=!0,B=e.__iterate((function(e,r){if(t?!A.has(e):n?!cA(e,A.get(r,h)):!cA(A.get(r,h),e))return c=!1,!1}));return c&&A.size===B}function lA(A,e){if(!(this instanceof lA))return new lA(A,e);if(this._value=A,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(j)return j;j=this}}function QA(A,e){if(!A)throw new Error(e)}function IA(A,e,t){if(!(this instanceof IA))return new IA(A,e,t);if(QA(0!==t,"Cannot step a Range by 0"),A=A||0,void 0===e&&(e=1/0),t=void 0===t?1:Math.abs(t),er?{value:void 0,done:!0}:M(A,n,t[e?r-n++:n++])}))},e(W,P),W.prototype.get=function(A,e){return void 0===e||this.has(A)?this._object[A]:e},W.prototype.has=function(A){return this._object.hasOwnProperty(A)},W.prototype.__iterate=function(A,e){for(var t=this._object,r=this._keys,n=r.length-1,i=0;i<=n;i++){var o=r[e?n-i:i];if(!1===A(t[o],o,this))return i+1}return i},W.prototype.__iterator=function(A,e){var t=this._object,r=this._keys,n=r.length-1,i=0;return new G((function(){var o=r[e?n-i:i];return i++>n?{value:void 0,done:!0}:M(A,o,t[o])}))},W.prototype[Q]=!0,e(X,J),X.prototype.__iterateUncached=function(A,e){if(e)return this.cacheResult().__iterate(A,e);var t=Y(this._iterable),r=0;if(k(t))for(var n;!(n=t.next()).done&&!1!==A(n.value,r++,this););return r},X.prototype.__iteratorUncached=function(A,e){if(e)return this.cacheResult().__iterator(A,e);var t=Y(this._iterable);if(!k(t))return new G(L);var r=0;return new G((function(){var e=t.next();return e.done?e:M(A,r++,e.value)}))},e($,J),$.prototype.__iterateUncached=function(A,e){if(e)return this.cacheResult().__iterate(A,e);for(var t,r=this._iterator,n=this._iteratorCache,i=0;i=r.length){var e=t.next();if(e.done)return e;r[n]=e.value}return M(A,n,r[n++])}))},e(lA,J),lA.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},lA.prototype.get=function(A,e){return this.has(A)?this._value:e},lA.prototype.includes=function(A){return cA(this._value,A)},lA.prototype.slice=function(A,e){var t=this.size;return w(A,e,t)?this:new lA(this._value,U(e,t)-F(A,t))},lA.prototype.reverse=function(){return this},lA.prototype.indexOf=function(A){return cA(this._value,A)?0:-1},lA.prototype.lastIndexOf=function(A){return cA(this._value,A)?this.size:-1},lA.prototype.__iterate=function(A,e){for(var t=0;t=0&&e=0&&tt?{value:void 0,done:!0}:M(A,i++,o)}))},IA.prototype.equals=function(A){return A instanceof IA?this._start===A._start&&this._end===A._end&&this._step===A._step:BA(this,A)},e(dA,t),e(hA,dA),e(EA,dA),e(fA,dA),dA.Keyed=hA,dA.Indexed=EA,dA.Set=fA;var CA="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(A,e){var t=65535&(A|=0),r=65535&(e|=0);return t*r+((A>>>16)*r+t*(e>>>16)<<16>>>0)|0};function pA(A){return A>>>1&1073741824|3221225471&A}function mA(A){if(!1===A||null==A)return 0;if("function"==typeof A.valueOf&&(!1===(A=A.valueOf())||null==A))return 0;if(!0===A)return 1;var e=typeof A;if("number"===e){if(A!=A||A===1/0)return 0;var t=0|A;for(t!==A&&(t^=4294967295*A);A>4294967295;)t^=A/=4294967295;return pA(t)}if("string"===e)return A.length>SA?function(A){var e=HA[A];return void 0===e&&(e=yA(A),RA===NA&&(RA=0,HA={}),RA++,HA[A]=e),e}(A):yA(A);if("function"==typeof A.hashCode)return A.hashCode();if("object"===e)return function(A){var e;if(wA&&void 0!==(e=bA.get(A)))return e;if(void 0!==(e=A[UA]))return e;if(!DA){if(void 0!==(e=A.propertyIsEnumerable&&A.propertyIsEnumerable[UA]))return e;if(void 0!==(e=function(A){if(A&&A.nodeType>0)switch(A.nodeType){case 1:return A.uniqueID;case 9:return A.documentElement&&A.documentElement.uniqueID}}(A)))return e}if(e=++FA,1073741824&FA&&(FA=0),wA)bA.set(A,e);else{if(void 0!==vA&&!1===vA(A))throw new Error("Non-extensible objects are not allowed as keys.");if(DA)Object.defineProperty(A,UA,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==A.propertyIsEnumerable&&A.propertyIsEnumerable===A.constructor.prototype.propertyIsEnumerable)A.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},A.propertyIsEnumerable[UA]=e;else{if(void 0===A.nodeType)throw new Error("Unable to set a non-enumerable property on object.");A[UA]=e}}return e}(A);if("function"==typeof A.toString)return yA(A.toString());throw new Error("Value type "+e+" cannot be hashed.")}function yA(A){for(var e=0,t=0;t=e.length)throw new Error("Missing value for key: "+e[t]);A.set(e[t],e[t+1])}}))},MA.prototype.toString=function(){return this.__toString("Map {","}")},MA.prototype.get=function(A,e){return this._root?this._root.get(0,void 0,A,e):e},MA.prototype.set=function(A,e){return ZA(this,A,e)},MA.prototype.setIn=function(A,e){return this.updateIn(A,h,(function(){return e}))},MA.prototype.remove=function(A){return ZA(this,A,h)},MA.prototype.deleteIn=function(A){return this.updateIn(A,(function(){return h}))},MA.prototype.update=function(A,e,t){return 1===arguments.length?A(this):this.updateIn([A],e,t)},MA.prototype.updateIn=function(A,e,t){t||(t=e,e=void 0);var r=ne(this,et(A),e,t);return r===h?void 0:r},MA.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):qA()},MA.prototype.merge=function(){return Ae(this,void 0,arguments)},MA.prototype.mergeWith=function(e){return Ae(this,e,A.call(arguments,1))},MA.prototype.mergeIn=function(e){var t=A.call(arguments,1);return this.updateIn(e,qA(),(function(A){return"function"==typeof A.merge?A.merge.apply(A,t):t[t.length-1]}))},MA.prototype.mergeDeep=function(){return Ae(this,ee,arguments)},MA.prototype.mergeDeepWith=function(e){var t=A.call(arguments,1);return Ae(this,te(e),t)},MA.prototype.mergeDeepIn=function(e){var t=A.call(arguments,1);return this.updateIn(e,qA(),(function(A){return"function"==typeof A.mergeDeep?A.mergeDeep.apply(A,t):t[t.length-1]}))},MA.prototype.sort=function(A){return we(Je(this,A))},MA.prototype.sortBy=function(A,e){return we(Je(this,e,A))},MA.prototype.withMutations=function(A){var e=this.asMutable();return A(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},MA.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new m)},MA.prototype.asImmutable=function(){return this.__ensureOwner()},MA.prototype.wasAltered=function(){return this.__altered},MA.prototype.__iterator=function(A,e){return new OA(this,A,e)},MA.prototype.__iterate=function(A,e){var t=this,r=0;return this._root&&this._root.iterate((function(e){return r++,A(e[1],e[0],t)}),e),r},MA.prototype.__ensureOwner=function(A){return A===this.__ownerID?this:A?zA(this.size,this._root,A,this.__hash):(this.__ownerID=A,this.__altered=!1,this)},MA.isMap=LA;var xA,kA="@@__IMMUTABLE_MAP__@@",YA=MA.prototype;function _A(A,e){this.ownerID=A,this.entries=e}function VA(A,e,t){this.ownerID=A,this.bitmap=e,this.nodes=t}function TA(A,e,t){this.ownerID=A,this.count=e,this.nodes=t}function PA(A,e,t){this.ownerID=A,this.keyHash=e,this.entries=t}function JA(A,e,t){this.ownerID=A,this.keyHash=e,this.entry=t}function OA(A,e,t){this._type=e,this._reverse=t,this._stack=A._root&&jA(A._root)}function KA(A,e){return M(A,e[0],e[1])}function jA(A,e){return{node:A,index:0,__prev:e}}function zA(A,e,t,r){var n=Object.create(YA);return n.size=A,n._root=e,n.__ownerID=t,n.__hash=r,n.__altered=!1,n}function qA(){return xA||(xA=zA(0))}function ZA(A,e,t){var r,n;if(A._root){var i=C(E),o=C(f);if(r=WA(A._root,A.__ownerID,0,void 0,e,t,i,o),!o.value)return A;n=A.size+(i.value?t===h?-1:1:0)}else{if(t===h)return A;n=1,r=new _A(A.__ownerID,[[e,t]])}return A.__ownerID?(A.size=n,A._root=r,A.__hash=void 0,A.__altered=!0,A):r?zA(n,r):qA()}function WA(A,e,t,r,n,i,o,a){return A?A.update(e,t,r,n,i,o,a):i===h?A:(p(a),p(o),new JA(e,r,[n,i]))}function XA(A){return A.constructor===JA||A.constructor===PA}function $A(A,e,t,r,n){if(A.keyHash===r)return new PA(e,r,[A.entry,n]);var i,o=(0===t?A.keyHash:A.keyHash>>>t)&d,a=(0===t?r:r>>>t)&d;return new VA(e,1<>1&1431655765))+(A>>2&858993459))+(A>>4)&252645135,127&(A+=A>>8)+(A>>16)}function oe(A,e,t,r){var n=r?A:y(A);return n[e]=t,n}YA[kA]=!0,YA.delete=YA.remove,YA.removeIn=YA.deleteIn,_A.prototype.get=function(A,e,t,r){for(var n=this.entries,i=0,o=n.length;i=ae)return function(A,e,t,r){A||(A=new m);for(var n=new JA(A,mA(t),[t,r]),i=0;i>>A)&d),i=this.bitmap;return 0==(i&n)?r:this.nodes[ie(i&n-1)].get(A+5,e,t,r)},VA.prototype.update=function(A,e,t,r,n,i,o){void 0===t&&(t=mA(r));var a=(0===e?t:t>>>e)&d,s=1<=se)return function(A,e,t,r,n){for(var i=0,o=new Array(I),a=0;0!==t;a++,t>>>=1)o[a]=1&t?e[i++]:void 0;return o[r]=n,new TA(A,i+1,o)}(A,B,u,a,Q);if(g&&!Q&&2===B.length&&XA(B[1^c]))return B[1^c];if(g&&Q&&1===B.length&&XA(Q))return Q;var E=A&&A===this.ownerID,f=g?Q?u:u^s:u|s,C=g?Q?oe(B,c,Q,E):function(A,e,t){var r=A.length-1;if(t&&e===r)return A.pop(),A;for(var n=new Array(r),i=0,o=0;o>>A)&d,i=this.nodes[n];return i?i.get(A+5,e,t,r):r},TA.prototype.update=function(A,e,t,r,n,i,o){void 0===t&&(t=mA(r));var a=(0===e?t:t>>>e)&d,s=n===h,u=this.nodes,g=u[a];if(s&&!g)return this;var c=WA(g,A,e+5,t,r,n,i,o);if(c===g)return this;var B=this.count;if(g){if(!c&&--B0&&r=0&&A=A.size||e<0)return A.withMutations((function(A){e<0?ve(A,e).set(0,t):ve(A,0,e+1).set(e,t)}));e+=A._origin;var r=A._tail,n=A._root,i=C(f);return e>=be(A._capacity)?r=pe(r,A.__ownerID,0,e,t,i):n=pe(n,A.__ownerID,A._level,e,t,i),i.value?A.__ownerID?(A._root=n,A._tail=r,A.__hash=void 0,A.__altered=!0,A):fe(A._origin,A._capacity,A._level,n,r):A}(this,A,e)},ge.prototype.remove=function(A){return this.has(A)?0===A?this.shift():A===this.size-1?this.pop():this.splice(A,1):this},ge.prototype.insert=function(A,e){return this.splice(A,0,e)},ge.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):Ce()},ge.prototype.push=function(){var A=arguments,e=this.size;return this.withMutations((function(t){ve(t,0,e+A.length);for(var r=0;r>>e&d;if(r>=this.array.length)return new Qe([],A);var n,i=0===r;if(e>0){var o=this.array[r];if((n=o&&o.removeBefore(A,e-5,t))===o&&i)return this}if(i&&!n)return this;var a=me(this,A);if(!i)for(var s=0;s>>e&d;if(n>=this.array.length)return this;if(e>0){var i=this.array[n];if((r=i&&i.removeAfter(A,e-5,t))===i&&n===this.array.length-1)return this}var o=me(this,A);return o.array.splice(n+1),r&&(o.array[n]=r),o};var Ie,de,he={};function Ee(A,e){var t=A._origin,r=A._capacity,n=be(r),i=A._tail;return o(A._root,A._level,0);function o(A,a,s){return 0===a?function(A,o){var a=o===n?i&&i.array:A&&A.array,s=o>t?0:t-o,u=r-o;return u>I&&(u=I),function(){if(s===u)return he;var A=e?--u:s++;return a&&a[A]}}(A,s):function(A,n,i){var a,s=A&&A.array,u=i>t?0:t-i>>n,g=1+(r-i>>n);return g>I&&(g=I),function(){for(;;){if(a){var A=a();if(A!==he)return A;a=null}if(u===g)return he;var t=e?--g:u++;a=o(s&&s[t],n-5,i+(t<>>t&d,s=A&&a0){var u=A&&A.array[a],g=pe(u,e,t-5,r,n,i);return g===u?A:((o=me(A,e)).array[a]=g,o)}return s&&A.array[a]===n?A:(p(i),o=me(A,e),void 0===n&&a===o.array.length-1?o.array.pop():o.array[a]=n,o)}function me(A,e){return e&&A&&e===A.ownerID?A:new Qe(A?A.array.slice():[],e)}function ye(A,e){if(e>=be(A._capacity))return A._tail;if(e<1<0;)t=t.array[e>>>r&d],r-=5;return t}}function ve(A,e,t){void 0!==e&&(e|=0),void 0!==t&&(t|=0);var r=A.__ownerID||new m,n=A._origin,i=A._capacity,o=n+e,a=void 0===t?i:t<0?i+t:n+t;if(o===n&&a===i)return A;if(o>=a)return A.clear();for(var s=A._level,u=A._root,g=0;o+g<0;)u=new Qe(u&&u.array.length?[void 0,u]:[],r),g+=1<<(s+=5);g&&(o+=g,n+=g,a+=g,i+=g);for(var c=be(i),B=be(a);B>=1<c?new Qe([],r):l;if(l&&B>c&&o5;h-=5){var E=c>>>h&d;I=I.array[E]=me(I.array[E],r)}I.array[c>>>5&d]=l}if(a=B)o-=B,a-=B,s=5,u=null,Q=Q&&Q.removeBefore(r,0,o);else if(o>n||B>>s&d;if(f!==B>>>s&d)break;f&&(g+=(1<n&&(u=u.removeBefore(r,s,o-g)),u&&Bi&&(i=u.size),o(s)||(u=u.map((function(A){return aA(A)}))),r.push(u)}return i>A.size&&(A=A.setSize(i)),re(A,e,r)}function be(A){return A>>5<<5}function we(A){return null==A?Se():Fe(A)?A:Se().withMutations((function(e){var t=r(A);GA(t.size),t.forEach((function(A,t){return e.set(t,A)}))}))}function Fe(A){return LA(A)&&g(A)}function Ue(A,e,t,r){var n=Object.create(we.prototype);return n.size=A?A.size:0,n._map=A,n._list=e,n.__ownerID=t,n.__hash=r,n}function Se(){return de||(de=Ue(qA(),Ce()))}function Ne(A,e,t){var r,n,i=A._map,o=A._list,a=i.get(e),s=void 0!==a;if(t===h){if(!s)return A;o.size>=I&&o.size>=2*i.size?(r=(n=o.filter((function(A,e){return void 0!==A&&a!==e}))).toKeyedSeq().map((function(A){return A[0]})).flip().toMap(),A.__ownerID&&(r.__ownerID=n.__ownerID=A.__ownerID)):(r=i.remove(e),n=a===o.size-1?o.pop():o.set(a,void 0))}else if(s){if(t===o.get(a)[1])return A;r=i,n=o.set(a,[e,t])}else r=i.set(e,o.size),n=o.set(o.size,[e,t]);return A.__ownerID?(A.size=r.size,A._map=r,A._list=n,A.__hash=void 0,A):Ue(r,n)}function Re(A,e){this._iter=A,this._useKeys=e,this.size=A.size}function He(A){this._iter=A,this.size=A.size}function Ge(A){this._iter=A,this.size=A.size}function Me(A){this._iter=A,this.size=A.size}function Le(A){var e=Xe(A);return e._iter=A,e.size=A.size,e.flip=function(){return A},e.reverse=function(){var e=A.reverse.apply(this);return e.flip=function(){return A.reverse()},e},e.has=function(e){return A.includes(e)},e.includes=function(e){return A.has(e)},e.cacheResult=$e,e.__iterateUncached=function(e,t){var r=this;return A.__iterate((function(A,t){return!1!==e(t,A,r)}),t)},e.__iteratorUncached=function(e,t){if(2===e){var r=A.__iterator(e,t);return new G((function(){var A=r.next();if(!A.done){var e=A.value[0];A.value[0]=A.value[1],A.value[1]=e}return A}))}return A.__iterator(1===e?0:1,t)},e}function xe(A,e,t){var r=Xe(A);return r.size=A.size,r.has=function(e){return A.has(e)},r.get=function(r,n){var i=A.get(r,h);return i===h?n:e.call(t,i,r,A)},r.__iterateUncached=function(r,n){var i=this;return A.__iterate((function(A,n,o){return!1!==r(e.call(t,A,n,o),n,i)}),n)},r.__iteratorUncached=function(r,n){var i=A.__iterator(2,n);return new G((function(){var n=i.next();if(n.done)return n;var o=n.value,a=o[0];return M(r,a,e.call(t,o[1],a,A),n)}))},r}function ke(A,e){var t=Xe(A);return t._iter=A,t.size=A.size,t.reverse=function(){return A},A.flip&&(t.flip=function(){var e=Le(A);return e.reverse=function(){return A.flip()},e}),t.get=function(t,r){return A.get(e?t:-1-t,r)},t.has=function(t){return A.has(e?t:-1-t)},t.includes=function(e){return A.includes(e)},t.cacheResult=$e,t.__iterate=function(e,t){var r=this;return A.__iterate((function(A,t){return e(A,t,r)}),!t)},t.__iterator=function(e,t){return A.__iterator(e,!t)},t}function Ye(A,e,t,r){var n=Xe(A);return r&&(n.has=function(r){var n=A.get(r,h);return n!==h&&!!e.call(t,n,r,A)},n.get=function(r,n){var i=A.get(r,h);return i!==h&&e.call(t,i,r,A)?i:n}),n.__iterateUncached=function(n,i){var o=this,a=0;return A.__iterate((function(A,i,s){if(e.call(t,A,i,s))return a++,n(A,r?i:a-1,o)}),i),a},n.__iteratorUncached=function(n,i){var o=A.__iterator(2,i),a=0;return new G((function(){for(;;){var i=o.next();if(i.done)return i;var s=i.value,u=s[0],g=s[1];if(e.call(t,g,u,A))return M(n,r?u:a++,g,i)}}))},n}function _e(A,e,t,r){var n=A.size;if(void 0!==e&&(e|=0),void 0!==t&&(t===1/0?t=n:t|=0),w(e,t,n))return A;var i=F(e,n),o=U(t,n);if(i!=i||o!=o)return _e(A.toSeq().cacheResult(),e,t,r);var a,s=o-i;s==s&&(a=s<0?0:s);var u=Xe(A);return u.size=0===a?a:A.size&&a||void 0,!r&&AA(A)&&a>=0&&(u.get=function(e,t){return(e=D(this,e))>=0&&ea)return{value:void 0,done:!0};var A=n.next();return r||1===e?A:M(e,s-1,0===e?void 0:A.value[1],A)}))},u}function Ve(A,e,t,r){var n=Xe(A);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var a=!0,s=0;return A.__iterate((function(A,i,u){if(!a||!(a=e.call(t,A,i,u)))return s++,n(A,r?i:s-1,o)})),s},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var a=A.__iterator(2,i),s=!0,u=0;return new G((function(){var A,i,g;do{if((A=a.next()).done)return r||1===n?A:M(n,u++,0===n?void 0:A.value[1],A);var c=A.value;i=c[0],g=c[1],s&&(s=e.call(t,g,i,o))}while(s);return 2===n?A:M(n,i,g,A)}))},n}function Te(A,e){var t=a(A),n=[A].concat(e).map((function(A){return o(A)?t&&(A=r(A)):A=t?tA(A):rA(Array.isArray(A)?A:[A]),A})).filter((function(A){return 0!==A.size}));if(0===n.length)return A;if(1===n.length){var i=n[0];if(i===A||t&&a(i)||s(A)&&s(i))return i}var u=new Z(n);return t?u=u.toKeyedSeq():s(A)||(u=u.toSetSeq()),(u=u.flatten(!0)).size=n.reduce((function(A,e){if(void 0!==A){var t=e.size;if(void 0!==t)return A+t}}),0),u}function Pe(A,e,t){var r=Xe(A);return r.__iterateUncached=function(r,n){var i=0,a=!1;return function A(s,u){var g=this;s.__iterate((function(n,s){return(!e||u0}function je(A,e,r){var n=Xe(A);return n.size=new Z(r).map((function(A){return A.size})).min(),n.__iterate=function(A,e){for(var t,r=this.__iterator(1,e),n=0;!(t=r.next()).done&&!1!==A(t.value,n++,this););return n},n.__iteratorUncached=function(A,n){var i=r.map((function(A){return A=t(A),Y(n?A.reverse():A)})),o=0,a=!1;return new G((function(){var t;return a||(t=i.map((function(A){return A.next()})),a=t.some((function(A){return A.done}))),a?{value:void 0,done:!0}:M(A,o++,e.apply(null,t.map((function(A){return A.value}))))}))},n}function ze(A,e){return AA(A)?e:A.constructor(e)}function qe(A){if(A!==Object(A))throw new TypeError("Expected [K, V] tuple: "+A)}function Ze(A){return GA(A.size),v(A)}function We(A){return a(A)?r:s(A)?n:i}function Xe(A){return Object.create((a(A)?P:s(A)?J:O).prototype)}function $e(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):T.prototype.cacheResult.call(this)}function At(A,e){return A>e?1:A=0;t--)e={value:arguments[t],next:e};return this.__ownerID?(this.size=A,this._head=e,this.__hash=void 0,this.__altered=!0,this):bt(A,e)},pt.prototype.pushAll=function(A){if(0===(A=n(A)).size)return this;GA(A.size);var e=this.size,t=this._head;return A.reverse().forEach((function(A){e++,t={value:A,next:t}})),this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):bt(e,t)},pt.prototype.pop=function(){return this.slice(1)},pt.prototype.unshift=function(){return this.push.apply(this,arguments)},pt.prototype.unshiftAll=function(A){return this.pushAll(A)},pt.prototype.shift=function(){return this.pop.apply(this,arguments)},pt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):wt()},pt.prototype.slice=function(A,e){if(w(A,e,this.size))return this;var t=F(A,this.size);if(U(e,this.size)!==this.size)return EA.prototype.slice.call(this,A,e);for(var r=this.size-t,n=this._head;t--;)n=n.next;return this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):bt(r,n)},pt.prototype.__ensureOwner=function(A){return A===this.__ownerID?this:A?bt(this.size,this._head,A,this.__hash):(this.__ownerID=A,this.__altered=!1,this)},pt.prototype.__iterate=function(A,e){if(e)return this.reverse().__iterate(A);for(var t=0,r=this._head;r&&!1!==A(r.value,t++,this);)r=r.next;return t},pt.prototype.__iterator=function(A,e){if(e)return this.reverse().__iterator(A);var t=0,r=this._head;return new G((function(){if(r){var e=r.value;return r=r.next,M(A,t++,e)}return{value:void 0,done:!0}}))},pt.isStack=mt;var yt,vt="@@__IMMUTABLE_STACK__@@",Dt=pt.prototype;function bt(A,e,t,r){var n=Object.create(Dt);return n.size=A,n._head=e,n.__ownerID=t,n.__hash=r,n.__altered=!1,n}function wt(){return yt||(yt=bt(0))}function Ft(A,e){var t=function(t){A.prototype[t]=e[t]};return Object.keys(e).forEach(t),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(t),A}Dt[vt]=!0,Dt.withMutations=YA.withMutations,Dt.asMutable=YA.asMutable,Dt.asImmutable=YA.asImmutable,Dt.wasAltered=YA.wasAltered,t.Iterator=G,Ft(t,{toArray:function(){GA(this.size);var A=new Array(this.size||0);return this.valueSeq().__iterate((function(e,t){A[t]=e})),A},toIndexedSeq:function(){return new He(this)},toJS:function(){return this.toSeq().map((function(A){return A&&"function"==typeof A.toJS?A.toJS():A})).__toJS()},toJSON:function(){return this.toSeq().map((function(A){return A&&"function"==typeof A.toJSON?A.toJSON():A})).__toJS()},toKeyedSeq:function(){return new Re(this,!0)},toMap:function(){return MA(this.toKeyedSeq())},toObject:function(){GA(this.size);var A={};return this.__iterate((function(e,t){A[t]=e})),A},toOrderedMap:function(){return we(this.toKeyedSeq())},toOrderedSet:function(){return It(a(this)?this.valueSeq():this)},toSet:function(){return at(a(this)?this.valueSeq():this)},toSetSeq:function(){return new Ge(this)},toSeq:function(){return s(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return pt(a(this)?this.valueSeq():this)},toList:function(){return ge(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(A,e){return 0===this.size?A+e:A+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){return ze(this,Te(this,A.call(arguments,0)))},includes:function(A){return this.some((function(e){return cA(e,A)}))},entries:function(){return this.__iterator(2)},every:function(A,e){GA(this.size);var t=!0;return this.__iterate((function(r,n,i){if(!A.call(e,r,n,i))return t=!1,!1})),t},filter:function(A,e){return ze(this,Ye(this,A,e,!0))},find:function(A,e,t){var r=this.findEntry(A,e);return r?r[1]:t},forEach:function(A,e){return GA(this.size),this.__iterate(e?A.bind(e):A)},join:function(A){GA(this.size),A=void 0!==A?""+A:",";var e="",t=!0;return this.__iterate((function(r){t?t=!1:e+=A,e+=null!=r?r.toString():""})),e},keys:function(){return this.__iterator(0)},map:function(A,e){return ze(this,xe(this,A,e))},reduce:function(A,e,t){var r,n;return GA(this.size),arguments.length<2?n=!0:r=e,this.__iterate((function(e,i,o){n?(n=!1,r=e):r=A.call(t,r,e,i,o)})),r},reduceRight:function(A,e,t){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return ze(this,ke(this,!0))},slice:function(A,e){return ze(this,_e(this,A,e,!0))},some:function(A,e){return!this.every(Ht(A),e)},sort:function(A){return ze(this,Je(this,A))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(A,e){return v(A?this.toSeq().filter(A,e):this)},countBy:function(A,e){return function(A,e,t){var r=MA().asMutable();return A.__iterate((function(n,i){r.update(e.call(t,n,i,A),0,(function(A){return A+1}))})),r.asImmutable()}(this,A,e)},equals:function(A){return BA(this,A)},entrySeq:function(){var A=this;if(A._cache)return new Z(A._cache);var e=A.toSeq().map(Rt).toIndexedSeq();return e.fromEntrySeq=function(){return A.toSeq()},e},filterNot:function(A,e){return this.filter(Ht(A),e)},findEntry:function(A,e,t){var r=t;return this.__iterate((function(t,n,i){if(A.call(e,t,n,i))return r=[n,t],!1})),r},findKey:function(A,e){var t=this.findEntry(A,e);return t&&t[0]},findLast:function(A,e,t){return this.toKeyedSeq().reverse().find(A,e,t)},findLastEntry:function(A,e,t){return this.toKeyedSeq().reverse().findEntry(A,e,t)},findLastKey:function(A,e){return this.toKeyedSeq().reverse().findKey(A,e)},first:function(){return this.find(b)},flatMap:function(A,e){return ze(this,function(A,e,t){var r=We(A);return A.toSeq().map((function(n,i){return r(e.call(t,n,i,A))})).flatten(!0)}(this,A,e))},flatten:function(A){return ze(this,Pe(this,A,!0))},fromEntrySeq:function(){return new Me(this)},get:function(A,e){return this.find((function(e,t){return cA(t,A)}),void 0,e)},getIn:function(A,e){for(var t,r=this,n=et(A);!(t=n.next()).done;){var i=t.value;if((r=r&&r.get?r.get(i,h):h)===h)return e}return r},groupBy:function(A,e){return function(A,e,t){var r=a(A),n=(g(A)?we():MA()).asMutable();A.__iterate((function(i,o){n.update(e.call(t,i,o,A),(function(A){return(A=A||[]).push(r?[o,i]:i),A}))}));var i=We(A);return n.map((function(e){return ze(A,i(e))}))}(this,A,e)},has:function(A){return this.get(A,h)!==h},hasIn:function(A){return this.getIn(A,h)!==h},isSubset:function(A){return A="function"==typeof A.includes?A:t(A),this.every((function(e){return A.includes(e)}))},isSuperset:function(A){return(A="function"==typeof A.isSubset?A:t(A)).isSubset(this)},keyOf:function(A){return this.findKey((function(e){return cA(e,A)}))},keySeq:function(){return this.toSeq().map(Nt).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(A){return this.toKeyedSeq().reverse().keyOf(A)},max:function(A){return Oe(this,A)},maxBy:function(A,e){return Oe(this,e,A)},min:function(A){return Oe(this,A?Gt(A):xt)},minBy:function(A,e){return Oe(this,e?Gt(e):xt,A)},rest:function(){return this.slice(1)},skip:function(A){return this.slice(Math.max(0,A))},skipLast:function(A){return ze(this,this.toSeq().reverse().skip(A).reverse())},skipWhile:function(A,e){return ze(this,Ve(this,A,e,!0))},skipUntil:function(A,e){return this.skipWhile(Ht(A),e)},sortBy:function(A,e){return ze(this,Je(this,e,A))},take:function(A){return this.slice(0,Math.max(0,A))},takeLast:function(A){return ze(this,this.toSeq().reverse().take(A).reverse())},takeWhile:function(A,e){return ze(this,function(A,e,t){var r=Xe(A);return r.__iterateUncached=function(r,n){var i=this;if(n)return this.cacheResult().__iterate(r,n);var o=0;return A.__iterate((function(A,n,a){return e.call(t,A,n,a)&&++o&&r(A,n,i)})),o},r.__iteratorUncached=function(r,n){var i=this;if(n)return this.cacheResult().__iterator(r,n);var o=A.__iterator(2,n),a=!0;return new G((function(){if(!a)return{value:void 0,done:!0};var A=o.next();if(A.done)return A;var n=A.value,s=n[0],u=n[1];return e.call(t,u,s,i)?2===r?A:M(r,s,u,A):(a=!1,{value:void 0,done:!0})}))},r}(this,A,e))},takeUntil:function(A,e){return this.takeWhile(Ht(A),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(A){if(A.size===1/0)return 0;var e=g(A),t=a(A),r=e?1:0;return function(A,e){return e=CA(e,3432918353),e=CA(e<<15|e>>>-15,461845907),e=CA(e<<13|e>>>-13,5),e=CA((e=(e+3864292196|0)^A)^e>>>16,2246822507),pA((e=CA(e^e>>>13,3266489909))^e>>>16)}(A.__iterate(t?e?function(A,e){r=31*r+kt(mA(A),mA(e))|0}:function(A,e){r=r+kt(mA(A),mA(e))|0}:e?function(A){r=31*r+mA(A)|0}:function(A){r=r+mA(A)|0}),r)}(this))}});var Ut=t.prototype;Ut[c]=!0,Ut[H]=Ut.values,Ut.__toJS=Ut.toArray,Ut.__toStringMapper=Mt,Ut.inspect=Ut.toSource=function(){return this.toString()},Ut.chain=Ut.flatMap,Ut.contains=Ut.includes,Ft(r,{flip:function(){return ze(this,Le(this))},mapEntries:function(A,e){var t=this,r=0;return ze(this,this.toSeq().map((function(n,i){return A.call(e,[i,n],r++,t)})).fromEntrySeq())},mapKeys:function(A,e){var t=this;return ze(this,this.toSeq().flip().map((function(r,n){return A.call(e,r,n,t)})).flip())}});var St=r.prototype;function Nt(A,e){return e}function Rt(A,e){return[e,A]}function Ht(A){return function(){return!A.apply(this,arguments)}}function Gt(A){return function(){return-A.apply(this,arguments)}}function Mt(A){return"string"==typeof A?JSON.stringify(A):String(A)}function Lt(){return y(arguments)}function xt(A,e){return Ae?-1:0}function kt(A,e){return A^e+2654435769+(A<<6)+(A>>2)|0}return St[B]=!0,St[H]=Ut.entries,St.__toJS=Ut.toObject,St.__toStringMapper=function(A,e){return JSON.stringify(e)+": "+Mt(A)},Ft(n,{toKeyedSeq:function(){return new Re(this,!1)},filter:function(A,e){return ze(this,Ye(this,A,e,!1))},findIndex:function(A,e){var t=this.findEntry(A,e);return t?t[0]:-1},indexOf:function(A){var e=this.keyOf(A);return void 0===e?-1:e},lastIndexOf:function(A){var e=this.lastKeyOf(A);return void 0===e?-1:e},reverse:function(){return ze(this,ke(this,!1))},slice:function(A,e){return ze(this,_e(this,A,e,!1))},splice:function(A,e){var t=arguments.length;if(e=Math.max(0|e,0),0===t||2===t&&!e)return this;A=F(A,A<0?this.count():this.size);var r=this.slice(0,A);return ze(this,1===t?r:r.concat(y(arguments,2),this.slice(A+e)))},findLastIndex:function(A,e){var t=this.findLastEntry(A,e);return t?t[0]:-1},first:function(){return this.get(0)},flatten:function(A){return ze(this,Pe(this,A,!1))},get:function(A,e){return(A=D(this,A))<0||this.size===1/0||void 0!==this.size&&A>this.size?e:this.find((function(e,t){return t===A}),void 0,e)},has:function(A){return(A=D(this,A))>=0&&(void 0!==this.size?this.size===1/0||A{"function"==typeof Object.create?A.exports=function(A,e){e&&(A.super_=e,A.prototype=Object.create(e.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}))}:A.exports=function(A,e){if(e){A.super_=e;var t=function(){};t.prototype=e.prototype,A.prototype=new t,A.prototype.constructor=A}}},2318:(A,e,t)=>{"use strict";var r=t(5717),n=t(3349),i=t(9509).Buffer,o=new Array(16);function a(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(A,e){return A<>>32-e}function u(A,e,t,r,n,i,o){return s(A+(e&t|~e&r)+n+i|0,o)+e|0}function g(A,e,t,r,n,i,o){return s(A+(e&r|t&~r)+n+i|0,o)+e|0}function c(A,e,t,r,n,i,o){return s(A+(e^t^r)+n+i|0,o)+e|0}function B(A,e,t,r,n,i,o){return s(A+(t^(e|~r))+n+i|0,o)+e|0}r(a,n),a.prototype._update=function(){for(var A=o,e=0;e<16;++e)A[e]=this._block.readInt32LE(4*e);var t=this._a,r=this._b,n=this._c,i=this._d;t=u(t,r,n,i,A[0],3614090360,7),i=u(i,t,r,n,A[1],3905402710,12),n=u(n,i,t,r,A[2],606105819,17),r=u(r,n,i,t,A[3],3250441966,22),t=u(t,r,n,i,A[4],4118548399,7),i=u(i,t,r,n,A[5],1200080426,12),n=u(n,i,t,r,A[6],2821735955,17),r=u(r,n,i,t,A[7],4249261313,22),t=u(t,r,n,i,A[8],1770035416,7),i=u(i,t,r,n,A[9],2336552879,12),n=u(n,i,t,r,A[10],4294925233,17),r=u(r,n,i,t,A[11],2304563134,22),t=u(t,r,n,i,A[12],1804603682,7),i=u(i,t,r,n,A[13],4254626195,12),n=u(n,i,t,r,A[14],2792965006,17),t=g(t,r=u(r,n,i,t,A[15],1236535329,22),n,i,A[1],4129170786,5),i=g(i,t,r,n,A[6],3225465664,9),n=g(n,i,t,r,A[11],643717713,14),r=g(r,n,i,t,A[0],3921069994,20),t=g(t,r,n,i,A[5],3593408605,5),i=g(i,t,r,n,A[10],38016083,9),n=g(n,i,t,r,A[15],3634488961,14),r=g(r,n,i,t,A[4],3889429448,20),t=g(t,r,n,i,A[9],568446438,5),i=g(i,t,r,n,A[14],3275163606,9),n=g(n,i,t,r,A[3],4107603335,14),r=g(r,n,i,t,A[8],1163531501,20),t=g(t,r,n,i,A[13],2850285829,5),i=g(i,t,r,n,A[2],4243563512,9),n=g(n,i,t,r,A[7],1735328473,14),t=c(t,r=g(r,n,i,t,A[12],2368359562,20),n,i,A[5],4294588738,4),i=c(i,t,r,n,A[8],2272392833,11),n=c(n,i,t,r,A[11],1839030562,16),r=c(r,n,i,t,A[14],4259657740,23),t=c(t,r,n,i,A[1],2763975236,4),i=c(i,t,r,n,A[4],1272893353,11),n=c(n,i,t,r,A[7],4139469664,16),r=c(r,n,i,t,A[10],3200236656,23),t=c(t,r,n,i,A[13],681279174,4),i=c(i,t,r,n,A[0],3936430074,11),n=c(n,i,t,r,A[3],3572445317,16),r=c(r,n,i,t,A[6],76029189,23),t=c(t,r,n,i,A[9],3654602809,4),i=c(i,t,r,n,A[12],3873151461,11),n=c(n,i,t,r,A[15],530742520,16),t=B(t,r=c(r,n,i,t,A[2],3299628645,23),n,i,A[0],4096336452,6),i=B(i,t,r,n,A[7],1126891415,10),n=B(n,i,t,r,A[14],2878612391,15),r=B(r,n,i,t,A[5],4237533241,21),t=B(t,r,n,i,A[12],1700485571,6),i=B(i,t,r,n,A[3],2399980690,10),n=B(n,i,t,r,A[10],4293915773,15),r=B(r,n,i,t,A[1],2240044497,21),t=B(t,r,n,i,A[8],1873313359,6),i=B(i,t,r,n,A[15],4264355552,10),n=B(n,i,t,r,A[6],2734768916,15),r=B(r,n,i,t,A[13],1309151649,21),t=B(t,r,n,i,A[4],4149444226,6),i=B(i,t,r,n,A[11],3174756917,10),n=B(n,i,t,r,A[2],718787259,15),r=B(r,n,i,t,A[9],3951481745,21),this._a=this._a+t|0,this._b=this._b+r|0,this._c=this._c+n|0,this._d=this._d+i|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var A=i.allocUnsafe(16);return A.writeInt32LE(this._a,0),A.writeInt32LE(this._b,4),A.writeInt32LE(this._c,8),A.writeInt32LE(this._d,12),A},A.exports=a},3047:(A,e,t)=>{var r=t(6240),n=t(9931);function i(A){this.rand=A||new n.Rand}A.exports=i,i.create=function(A){return new i(A)},i.prototype._randbelow=function(A){var e=A.bitLength(),t=Math.ceil(e/8);do{var n=new r(this.rand.generate(t))}while(n.cmp(A)>=0);return n},i.prototype._randrange=function(A,e){var t=e.sub(A);return A.add(this._randbelow(t))},i.prototype.test=function(A,e,t){var n=A.bitLength(),i=r.mont(A),o=new r(1).toRed(i);e||(e=Math.max(1,n/48|0));for(var a=A.subn(1),s=0;!a.testn(s);s++);for(var u=A.shrn(s),g=a.toRed(i);e>0;e--){var c=this._randrange(new r(2),a);t&&t(c);var B=c.toRed(i).redPow(u);if(0!==B.cmp(o)&&0!==B.cmp(g)){for(var l=1;l0;e--){var g=this._randrange(new r(2),o),c=A.gcd(g);if(0!==c.cmpn(1))return c;var B=g.toRed(n).redPow(s);if(0!==B.cmp(i)&&0!==B.cmp(u)){for(var l=1;l=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function s(A,e,t){var r=a(A,t);return t-1>=e&&(r|=a(A,t-1)<<4),r}function u(A,e,t,r){for(var n=0,i=Math.min(A.length,t),o=e;o=49?a-49+10:a>=17?a-17+10:a}return n}i.isBN=function(A){return A instanceof i||null!==A&&"object"==typeof A&&A.constructor.wordSize===i.wordSize&&Array.isArray(A.words)},i.max=function(A,e){return A.cmp(e)>0?A:e},i.min=function(A,e){return A.cmp(e)<0?A:e},i.prototype._init=function(A,e,t){if("number"==typeof A)return this._initNumber(A,e,t);if("object"==typeof A)return this._initArray(A,e,t);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(A=A.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)o=A[n]|A[n-1]<<8|A[n-2]<<16,this.words[i]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===t)for(n=0,i=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this.strip()},i.prototype._parseHex=function(A,e,t){this.length=Math.ceil((A.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)n=s(A,e,r)<=18?(i-=18,o+=1,this.words[o]|=n>>>26):i+=8;else for(r=(A.length-e)%2==0?e+1:e;r=18?(i-=18,o+=1,this.words[o]|=n>>>26):i+=8;this.strip()},i.prototype._parseBase=function(A,e,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var i=A.length-t,o=i%r,a=Math.min(i,i-o)+t,s=0,g=t;g1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],c=[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],B=[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 l(A,e,t){t.negative=e.negative^A.negative;var r=A.length+e.length|0;t.length=r,r=r-1|0;var n=0|A.words[0],i=0|e.words[0],o=n*i,a=67108863&o,s=o/67108864|0;t.words[0]=a;for(var u=1;u>>26,c=67108863&s,B=Math.min(u,e.length-1),l=Math.max(0,u-A.length+1);l<=B;l++){var Q=u-l|0;g+=(o=(n=0|A.words[Q])*(i=0|e.words[l])+c)/67108864|0,c=67108863&o}t.words[u]=0|c,s=0|g}return 0!==s?t.words[u]=0|s:t.length--,t.strip()}i.prototype.toString=function(A,e){var t;if(e=0|e||1,16===(A=A||10)||"hex"===A){t="";for(var n=0,i=0,o=0;o>>24-n&16777215)||o!==this.length-1?g[6-s.length]+s+t:s+t,(n+=2)>=26&&(n-=26,o--)}for(0!==i&&(t=i.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(A===(0|A)&&A>=2&&A<=36){var u=c[A],l=B[A];t="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var I=Q.modn(l).toString(A);t=(Q=Q.idivn(l)).isZero()?I+t:g[u-I.length]+I+t}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var A=this.words[0];return 2===this.length?A+=67108864*this.words[1]:3===this.length&&1===this.words[2]?A+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-A:A},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(A,e){return r(void 0!==o),this.toArrayLike(o,A,e)},i.prototype.toArray=function(A,e){return this.toArrayLike(Array,A,e)},i.prototype.toArrayLike=function(A,e,t){var n=this.byteLength(),i=t||Math.max(1,n);r(n<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var o,a,s="le"===e,u=new A(i),g=this.clone();if(s){for(a=0;!g.isZero();a++)o=g.andln(255),g.iushrn(8),u[a]=o;for(;a=4096&&(t+=13,e>>>=13),e>=64&&(t+=7,e>>>=7),e>=8&&(t+=4,e>>>=4),e>=2&&(t+=2,e>>>=2),t+e},i.prototype._zeroBits=function(A){if(0===A)return 26;var e=A,t=0;return 0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},i.prototype.bitLength=function(){var A=this.words[this.length-1],e=this._countBits(A);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,e=0;eA.length?this.clone().ior(A):A.clone().ior(this)},i.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},i.prototype.iuand=function(A){var e;e=this.length>A.length?A:this;for(var t=0;tA.length?this.clone().iand(A):A.clone().iand(this)},i.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},i.prototype.iuxor=function(A){var e,t;this.length>A.length?(e=this,t=A):(e=A,t=this);for(var r=0;rA.length?this.clone().ixor(A):A.clone().ixor(this)},i.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},i.prototype.inotn=function(A){r("number"==typeof A&&A>=0);var e=0|Math.ceil(A/26),t=A%26;this._expand(e),t>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-t),this.strip()},i.prototype.notn=function(A){return this.clone().inotn(A)},i.prototype.setn=function(A,e){r("number"==typeof A&&A>=0);var t=A/26|0,n=A%26;return this._expand(t+1),this.words[t]=e?this.words[t]|1<A.length?(t=this,r=A):(t=A,r=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=t.length,0!==n)this.words[this.length]=n,this.length++;else if(t!==this)for(;iA.length?this.clone().iadd(A):A.clone().iadd(this)},i.prototype.isub=function(A){if(0!==A.negative){A.negative=0;var e=this.iadd(A);return A.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var t,r,n=this.cmp(A);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=A):(t=A,r=this);for(var i=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==i&&o>26,this.words[o]=67108863&e;if(0===i&&o>>13,l=0|o[1],Q=8191&l,I=l>>>13,d=0|o[2],h=8191&d,E=d>>>13,f=0|o[3],C=8191&f,p=f>>>13,m=0|o[4],y=8191&m,v=m>>>13,D=0|o[5],b=8191&D,w=D>>>13,F=0|o[6],U=8191&F,S=F>>>13,N=0|o[7],R=8191&N,H=N>>>13,G=0|o[8],M=8191&G,L=G>>>13,x=0|o[9],k=8191&x,Y=x>>>13,_=0|a[0],V=8191&_,T=_>>>13,P=0|a[1],J=8191&P,O=P>>>13,K=0|a[2],j=8191&K,z=K>>>13,q=0|a[3],Z=8191&q,W=q>>>13,X=0|a[4],$=8191&X,AA=X>>>13,eA=0|a[5],tA=8191&eA,rA=eA>>>13,nA=0|a[6],iA=8191&nA,oA=nA>>>13,aA=0|a[7],sA=8191&aA,uA=aA>>>13,gA=0|a[8],cA=8191&gA,BA=gA>>>13,lA=0|a[9],QA=8191&lA,IA=lA>>>13;t.negative=A.negative^e.negative,t.length=19;var dA=(u+(r=Math.imul(c,V))|0)+((8191&(n=(n=Math.imul(c,T))+Math.imul(B,V)|0))<<13)|0;u=((i=Math.imul(B,T))+(n>>>13)|0)+(dA>>>26)|0,dA&=67108863,r=Math.imul(Q,V),n=(n=Math.imul(Q,T))+Math.imul(I,V)|0,i=Math.imul(I,T);var hA=(u+(r=r+Math.imul(c,J)|0)|0)+((8191&(n=(n=n+Math.imul(c,O)|0)+Math.imul(B,J)|0))<<13)|0;u=((i=i+Math.imul(B,O)|0)+(n>>>13)|0)+(hA>>>26)|0,hA&=67108863,r=Math.imul(h,V),n=(n=Math.imul(h,T))+Math.imul(E,V)|0,i=Math.imul(E,T),r=r+Math.imul(Q,J)|0,n=(n=n+Math.imul(Q,O)|0)+Math.imul(I,J)|0,i=i+Math.imul(I,O)|0;var EA=(u+(r=r+Math.imul(c,j)|0)|0)+((8191&(n=(n=n+Math.imul(c,z)|0)+Math.imul(B,j)|0))<<13)|0;u=((i=i+Math.imul(B,z)|0)+(n>>>13)|0)+(EA>>>26)|0,EA&=67108863,r=Math.imul(C,V),n=(n=Math.imul(C,T))+Math.imul(p,V)|0,i=Math.imul(p,T),r=r+Math.imul(h,J)|0,n=(n=n+Math.imul(h,O)|0)+Math.imul(E,J)|0,i=i+Math.imul(E,O)|0,r=r+Math.imul(Q,j)|0,n=(n=n+Math.imul(Q,z)|0)+Math.imul(I,j)|0,i=i+Math.imul(I,z)|0;var fA=(u+(r=r+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,W)|0)+Math.imul(B,Z)|0))<<13)|0;u=((i=i+Math.imul(B,W)|0)+(n>>>13)|0)+(fA>>>26)|0,fA&=67108863,r=Math.imul(y,V),n=(n=Math.imul(y,T))+Math.imul(v,V)|0,i=Math.imul(v,T),r=r+Math.imul(C,J)|0,n=(n=n+Math.imul(C,O)|0)+Math.imul(p,J)|0,i=i+Math.imul(p,O)|0,r=r+Math.imul(h,j)|0,n=(n=n+Math.imul(h,z)|0)+Math.imul(E,j)|0,i=i+Math.imul(E,z)|0,r=r+Math.imul(Q,Z)|0,n=(n=n+Math.imul(Q,W)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0;var CA=(u+(r=r+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,AA)|0)+Math.imul(B,$)|0))<<13)|0;u=((i=i+Math.imul(B,AA)|0)+(n>>>13)|0)+(CA>>>26)|0,CA&=67108863,r=Math.imul(b,V),n=(n=Math.imul(b,T))+Math.imul(w,V)|0,i=Math.imul(w,T),r=r+Math.imul(y,J)|0,n=(n=n+Math.imul(y,O)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,O)|0,r=r+Math.imul(C,j)|0,n=(n=n+Math.imul(C,z)|0)+Math.imul(p,j)|0,i=i+Math.imul(p,z)|0,r=r+Math.imul(h,Z)|0,n=(n=n+Math.imul(h,W)|0)+Math.imul(E,Z)|0,i=i+Math.imul(E,W)|0,r=r+Math.imul(Q,$)|0,n=(n=n+Math.imul(Q,AA)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,AA)|0;var pA=(u+(r=r+Math.imul(c,tA)|0)|0)+((8191&(n=(n=n+Math.imul(c,rA)|0)+Math.imul(B,tA)|0))<<13)|0;u=((i=i+Math.imul(B,rA)|0)+(n>>>13)|0)+(pA>>>26)|0,pA&=67108863,r=Math.imul(U,V),n=(n=Math.imul(U,T))+Math.imul(S,V)|0,i=Math.imul(S,T),r=r+Math.imul(b,J)|0,n=(n=n+Math.imul(b,O)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,O)|0,r=r+Math.imul(y,j)|0,n=(n=n+Math.imul(y,z)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,z)|0,r=r+Math.imul(C,Z)|0,n=(n=n+Math.imul(C,W)|0)+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,AA)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,AA)|0,r=r+Math.imul(Q,tA)|0,n=(n=n+Math.imul(Q,rA)|0)+Math.imul(I,tA)|0,i=i+Math.imul(I,rA)|0;var mA=(u+(r=r+Math.imul(c,iA)|0)|0)+((8191&(n=(n=n+Math.imul(c,oA)|0)+Math.imul(B,iA)|0))<<13)|0;u=((i=i+Math.imul(B,oA)|0)+(n>>>13)|0)+(mA>>>26)|0,mA&=67108863,r=Math.imul(R,V),n=(n=Math.imul(R,T))+Math.imul(H,V)|0,i=Math.imul(H,T),r=r+Math.imul(U,J)|0,n=(n=n+Math.imul(U,O)|0)+Math.imul(S,J)|0,i=i+Math.imul(S,O)|0,r=r+Math.imul(b,j)|0,n=(n=n+Math.imul(b,z)|0)+Math.imul(w,j)|0,i=i+Math.imul(w,z)|0,r=r+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,AA)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,AA)|0,r=r+Math.imul(h,tA)|0,n=(n=n+Math.imul(h,rA)|0)+Math.imul(E,tA)|0,i=i+Math.imul(E,rA)|0,r=r+Math.imul(Q,iA)|0,n=(n=n+Math.imul(Q,oA)|0)+Math.imul(I,iA)|0,i=i+Math.imul(I,oA)|0;var yA=(u+(r=r+Math.imul(c,sA)|0)|0)+((8191&(n=(n=n+Math.imul(c,uA)|0)+Math.imul(B,sA)|0))<<13)|0;u=((i=i+Math.imul(B,uA)|0)+(n>>>13)|0)+(yA>>>26)|0,yA&=67108863,r=Math.imul(M,V),n=(n=Math.imul(M,T))+Math.imul(L,V)|0,i=Math.imul(L,T),r=r+Math.imul(R,J)|0,n=(n=n+Math.imul(R,O)|0)+Math.imul(H,J)|0,i=i+Math.imul(H,O)|0,r=r+Math.imul(U,j)|0,n=(n=n+Math.imul(U,z)|0)+Math.imul(S,j)|0,i=i+Math.imul(S,z)|0,r=r+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,W)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,AA)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,AA)|0,r=r+Math.imul(C,tA)|0,n=(n=n+Math.imul(C,rA)|0)+Math.imul(p,tA)|0,i=i+Math.imul(p,rA)|0,r=r+Math.imul(h,iA)|0,n=(n=n+Math.imul(h,oA)|0)+Math.imul(E,iA)|0,i=i+Math.imul(E,oA)|0,r=r+Math.imul(Q,sA)|0,n=(n=n+Math.imul(Q,uA)|0)+Math.imul(I,sA)|0,i=i+Math.imul(I,uA)|0;var vA=(u+(r=r+Math.imul(c,cA)|0)|0)+((8191&(n=(n=n+Math.imul(c,BA)|0)+Math.imul(B,cA)|0))<<13)|0;u=((i=i+Math.imul(B,BA)|0)+(n>>>13)|0)+(vA>>>26)|0,vA&=67108863,r=Math.imul(k,V),n=(n=Math.imul(k,T))+Math.imul(Y,V)|0,i=Math.imul(Y,T),r=r+Math.imul(M,J)|0,n=(n=n+Math.imul(M,O)|0)+Math.imul(L,J)|0,i=i+Math.imul(L,O)|0,r=r+Math.imul(R,j)|0,n=(n=n+Math.imul(R,z)|0)+Math.imul(H,j)|0,i=i+Math.imul(H,z)|0,r=r+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,W)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,AA)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,AA)|0,r=r+Math.imul(y,tA)|0,n=(n=n+Math.imul(y,rA)|0)+Math.imul(v,tA)|0,i=i+Math.imul(v,rA)|0,r=r+Math.imul(C,iA)|0,n=(n=n+Math.imul(C,oA)|0)+Math.imul(p,iA)|0,i=i+Math.imul(p,oA)|0,r=r+Math.imul(h,sA)|0,n=(n=n+Math.imul(h,uA)|0)+Math.imul(E,sA)|0,i=i+Math.imul(E,uA)|0,r=r+Math.imul(Q,cA)|0,n=(n=n+Math.imul(Q,BA)|0)+Math.imul(I,cA)|0,i=i+Math.imul(I,BA)|0;var DA=(u+(r=r+Math.imul(c,QA)|0)|0)+((8191&(n=(n=n+Math.imul(c,IA)|0)+Math.imul(B,QA)|0))<<13)|0;u=((i=i+Math.imul(B,IA)|0)+(n>>>13)|0)+(DA>>>26)|0,DA&=67108863,r=Math.imul(k,J),n=(n=Math.imul(k,O))+Math.imul(Y,J)|0,i=Math.imul(Y,O),r=r+Math.imul(M,j)|0,n=(n=n+Math.imul(M,z)|0)+Math.imul(L,j)|0,i=i+Math.imul(L,z)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,W)|0)+Math.imul(H,Z)|0,i=i+Math.imul(H,W)|0,r=r+Math.imul(U,$)|0,n=(n=n+Math.imul(U,AA)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,AA)|0,r=r+Math.imul(b,tA)|0,n=(n=n+Math.imul(b,rA)|0)+Math.imul(w,tA)|0,i=i+Math.imul(w,rA)|0,r=r+Math.imul(y,iA)|0,n=(n=n+Math.imul(y,oA)|0)+Math.imul(v,iA)|0,i=i+Math.imul(v,oA)|0,r=r+Math.imul(C,sA)|0,n=(n=n+Math.imul(C,uA)|0)+Math.imul(p,sA)|0,i=i+Math.imul(p,uA)|0,r=r+Math.imul(h,cA)|0,n=(n=n+Math.imul(h,BA)|0)+Math.imul(E,cA)|0,i=i+Math.imul(E,BA)|0;var bA=(u+(r=r+Math.imul(Q,QA)|0)|0)+((8191&(n=(n=n+Math.imul(Q,IA)|0)+Math.imul(I,QA)|0))<<13)|0;u=((i=i+Math.imul(I,IA)|0)+(n>>>13)|0)+(bA>>>26)|0,bA&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,z))+Math.imul(Y,j)|0,i=Math.imul(Y,z),r=r+Math.imul(M,Z)|0,n=(n=n+Math.imul(M,W)|0)+Math.imul(L,Z)|0,i=i+Math.imul(L,W)|0,r=r+Math.imul(R,$)|0,n=(n=n+Math.imul(R,AA)|0)+Math.imul(H,$)|0,i=i+Math.imul(H,AA)|0,r=r+Math.imul(U,tA)|0,n=(n=n+Math.imul(U,rA)|0)+Math.imul(S,tA)|0,i=i+Math.imul(S,rA)|0,r=r+Math.imul(b,iA)|0,n=(n=n+Math.imul(b,oA)|0)+Math.imul(w,iA)|0,i=i+Math.imul(w,oA)|0,r=r+Math.imul(y,sA)|0,n=(n=n+Math.imul(y,uA)|0)+Math.imul(v,sA)|0,i=i+Math.imul(v,uA)|0,r=r+Math.imul(C,cA)|0,n=(n=n+Math.imul(C,BA)|0)+Math.imul(p,cA)|0,i=i+Math.imul(p,BA)|0;var wA=(u+(r=r+Math.imul(h,QA)|0)|0)+((8191&(n=(n=n+Math.imul(h,IA)|0)+Math.imul(E,QA)|0))<<13)|0;u=((i=i+Math.imul(E,IA)|0)+(n>>>13)|0)+(wA>>>26)|0,wA&=67108863,r=Math.imul(k,Z),n=(n=Math.imul(k,W))+Math.imul(Y,Z)|0,i=Math.imul(Y,W),r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,AA)|0)+Math.imul(L,$)|0,i=i+Math.imul(L,AA)|0,r=r+Math.imul(R,tA)|0,n=(n=n+Math.imul(R,rA)|0)+Math.imul(H,tA)|0,i=i+Math.imul(H,rA)|0,r=r+Math.imul(U,iA)|0,n=(n=n+Math.imul(U,oA)|0)+Math.imul(S,iA)|0,i=i+Math.imul(S,oA)|0,r=r+Math.imul(b,sA)|0,n=(n=n+Math.imul(b,uA)|0)+Math.imul(w,sA)|0,i=i+Math.imul(w,uA)|0,r=r+Math.imul(y,cA)|0,n=(n=n+Math.imul(y,BA)|0)+Math.imul(v,cA)|0,i=i+Math.imul(v,BA)|0;var FA=(u+(r=r+Math.imul(C,QA)|0)|0)+((8191&(n=(n=n+Math.imul(C,IA)|0)+Math.imul(p,QA)|0))<<13)|0;u=((i=i+Math.imul(p,IA)|0)+(n>>>13)|0)+(FA>>>26)|0,FA&=67108863,r=Math.imul(k,$),n=(n=Math.imul(k,AA))+Math.imul(Y,$)|0,i=Math.imul(Y,AA),r=r+Math.imul(M,tA)|0,n=(n=n+Math.imul(M,rA)|0)+Math.imul(L,tA)|0,i=i+Math.imul(L,rA)|0,r=r+Math.imul(R,iA)|0,n=(n=n+Math.imul(R,oA)|0)+Math.imul(H,iA)|0,i=i+Math.imul(H,oA)|0,r=r+Math.imul(U,sA)|0,n=(n=n+Math.imul(U,uA)|0)+Math.imul(S,sA)|0,i=i+Math.imul(S,uA)|0,r=r+Math.imul(b,cA)|0,n=(n=n+Math.imul(b,BA)|0)+Math.imul(w,cA)|0,i=i+Math.imul(w,BA)|0;var UA=(u+(r=r+Math.imul(y,QA)|0)|0)+((8191&(n=(n=n+Math.imul(y,IA)|0)+Math.imul(v,QA)|0))<<13)|0;u=((i=i+Math.imul(v,IA)|0)+(n>>>13)|0)+(UA>>>26)|0,UA&=67108863,r=Math.imul(k,tA),n=(n=Math.imul(k,rA))+Math.imul(Y,tA)|0,i=Math.imul(Y,rA),r=r+Math.imul(M,iA)|0,n=(n=n+Math.imul(M,oA)|0)+Math.imul(L,iA)|0,i=i+Math.imul(L,oA)|0,r=r+Math.imul(R,sA)|0,n=(n=n+Math.imul(R,uA)|0)+Math.imul(H,sA)|0,i=i+Math.imul(H,uA)|0,r=r+Math.imul(U,cA)|0,n=(n=n+Math.imul(U,BA)|0)+Math.imul(S,cA)|0,i=i+Math.imul(S,BA)|0;var SA=(u+(r=r+Math.imul(b,QA)|0)|0)+((8191&(n=(n=n+Math.imul(b,IA)|0)+Math.imul(w,QA)|0))<<13)|0;u=((i=i+Math.imul(w,IA)|0)+(n>>>13)|0)+(SA>>>26)|0,SA&=67108863,r=Math.imul(k,iA),n=(n=Math.imul(k,oA))+Math.imul(Y,iA)|0,i=Math.imul(Y,oA),r=r+Math.imul(M,sA)|0,n=(n=n+Math.imul(M,uA)|0)+Math.imul(L,sA)|0,i=i+Math.imul(L,uA)|0,r=r+Math.imul(R,cA)|0,n=(n=n+Math.imul(R,BA)|0)+Math.imul(H,cA)|0,i=i+Math.imul(H,BA)|0;var NA=(u+(r=r+Math.imul(U,QA)|0)|0)+((8191&(n=(n=n+Math.imul(U,IA)|0)+Math.imul(S,QA)|0))<<13)|0;u=((i=i+Math.imul(S,IA)|0)+(n>>>13)|0)+(NA>>>26)|0,NA&=67108863,r=Math.imul(k,sA),n=(n=Math.imul(k,uA))+Math.imul(Y,sA)|0,i=Math.imul(Y,uA),r=r+Math.imul(M,cA)|0,n=(n=n+Math.imul(M,BA)|0)+Math.imul(L,cA)|0,i=i+Math.imul(L,BA)|0;var RA=(u+(r=r+Math.imul(R,QA)|0)|0)+((8191&(n=(n=n+Math.imul(R,IA)|0)+Math.imul(H,QA)|0))<<13)|0;u=((i=i+Math.imul(H,IA)|0)+(n>>>13)|0)+(RA>>>26)|0,RA&=67108863,r=Math.imul(k,cA),n=(n=Math.imul(k,BA))+Math.imul(Y,cA)|0,i=Math.imul(Y,BA);var HA=(u+(r=r+Math.imul(M,QA)|0)|0)+((8191&(n=(n=n+Math.imul(M,IA)|0)+Math.imul(L,QA)|0))<<13)|0;u=((i=i+Math.imul(L,IA)|0)+(n>>>13)|0)+(HA>>>26)|0,HA&=67108863;var GA=(u+(r=Math.imul(k,QA))|0)+((8191&(n=(n=Math.imul(k,IA))+Math.imul(Y,QA)|0))<<13)|0;return u=((i=Math.imul(Y,IA))+(n>>>13)|0)+(GA>>>26)|0,GA&=67108863,s[0]=dA,s[1]=hA,s[2]=EA,s[3]=fA,s[4]=CA,s[5]=pA,s[6]=mA,s[7]=yA,s[8]=vA,s[9]=DA,s[10]=bA,s[11]=wA,s[12]=FA,s[13]=UA,s[14]=SA,s[15]=NA,s[16]=RA,s[17]=HA,s[18]=GA,0!==u&&(s[19]=u,t.length++),t};function I(A,e,t){return(new d).mulp(A,e,t)}function d(A,e){this.x=A,this.y=e}Math.imul||(Q=l),i.prototype.mulTo=function(A,e){var t,r=this.length+A.length;return t=10===this.length&&10===A.length?Q(this,A,e):r<63?l(this,A,e):r<1024?function(A,e,t){t.negative=e.negative^A.negative,t.length=A.length+e.length;for(var r=0,n=0,i=0;i>>26)|0)>>>26,o&=67108863}t.words[i]=a,r=o,o=n}return 0!==r?t.words[i]=r:t.length--,t.strip()}(this,A,e):I(this,A,e),t},d.prototype.makeRBT=function(A){for(var e=new Array(A),t=i.prototype._countBits(A)-1,r=0;r>=1;return r},d.prototype.permute=function(A,e,t,r,n,i){for(var o=0;o>>=1)n++;return 1<>>=13,t[2*o+1]=8191&i,i>>>=13;for(o=2*e;o>=26,e+=n/67108864|0,e+=i>>>26,this.words[t]=67108863&i}return 0!==e&&(this.words[t]=e,this.length++),this},i.prototype.muln=function(A){return this.clone().imuln(A)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(A){var e=function(A){for(var e=new Array(A.bitLength()),t=0;t>>n}return e}(A);if(0===e.length)return new i(1);for(var t=this,r=0;r=0);var e,t=A%26,n=(A-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(e=0;e>>26-t}o&&(this.words[e]=o,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var i=A%26,o=Math.min((A-i)/26,this.length),a=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==g||u>=n);u--){var c=0|this.words[u];this.words[u]=g<<26-i|c>>>i,g=c&a}return s&&0!==g&&(s.words[s.length++]=g),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(A,e,t){return r(0===this.negative),this.iushrn(A,e,t)},i.prototype.shln=function(A){return this.clone().ishln(A)},i.prototype.ushln=function(A){return this.clone().iushln(A)},i.prototype.shrn=function(A){return this.clone().ishrn(A)},i.prototype.ushrn=function(A){return this.clone().iushrn(A)},i.prototype.testn=function(A){r("number"==typeof A&&A>=0);var e=A%26,t=(A-e)/26,n=1<=0);var e=A%26,t=(A-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==e&&t++,this.length=Math.min(t,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},i.prototype.isubn=function(A){if(r("number"==typeof A),r(A<67108864),A<0)return this.iaddn(-A);if(0!==this.negative)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(s/67108864|0),this.words[n+t]=67108863&i}for(;n>26,this.words[n+t]=67108863&i;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(A,e){var t=(this.length,A.length),r=this.clone(),n=A,o=0|n.words[n.length-1];0!=(t=26-this._countBits(o))&&(n=n.ushln(t),r.iushln(t),o=0|n.words[n.length-1]);var a,s=r.length-n.length;if("mod"!==e){(a=new i(null)).length=s+1,a.words=new Array(a.length);for(var u=0;u=0;c--){var B=67108864*(0|r.words[n.length+c])+(0|r.words[n.length+c-1]);for(B=Math.min(B/o|0,67108863),r._ishlnsubmul(n,B,c);0!==r.negative;)B--,r.negative=0,r._ishlnsubmul(n,1,c),r.isZero()||(r.negative^=1);a&&(a.words[c]=B)}return a&&a.strip(),r.strip(),"div"!==e&&0!==t&&r.iushrn(t),{div:a||null,mod:r}},i.prototype.divmod=function(A,e,t){return r(!A.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===A.negative?(a=this.neg().divmod(A,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(o=a.mod.neg(),t&&0!==o.negative&&o.iadd(A)),{div:n,mod:o}):0===this.negative&&0!==A.negative?(a=this.divmod(A.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!=(this.negative&A.negative)?(a=this.neg().divmod(A.neg(),e),"div"!==e&&(o=a.mod.neg(),t&&0!==o.negative&&o.isub(A)),{div:a.div,mod:o}):A.length>this.length||this.cmp(A)<0?{div:new i(0),mod:this}:1===A.length?"div"===e?{div:this.divn(A.words[0]),mod:null}:"mod"===e?{div:null,mod:new i(this.modn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new i(this.modn(A.words[0]))}:this._wordDiv(A,e);var n,o,a},i.prototype.div=function(A){return this.divmod(A,"div",!1).div},i.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},i.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},i.prototype.divRound=function(A){var e=this.divmod(A);if(e.mod.isZero())return e.div;var t=0!==e.div.negative?e.mod.isub(A):e.mod,r=A.ushrn(1),n=A.andln(1),i=t.cmp(r);return i<0||1===n&&0===i?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},i.prototype.modn=function(A){r(A<=67108863);for(var e=(1<<26)%A,t=0,n=this.length-1;n>=0;n--)t=(e*t+(0|this.words[n]))%A;return t},i.prototype.idivn=function(A){r(A<=67108863);for(var e=0,t=this.length-1;t>=0;t--){var n=(0|this.words[t])+67108864*e;this.words[t]=n/A|0,e=n%A}return this.strip()},i.prototype.divn=function(A){return this.clone().idivn(A)},i.prototype.egcd=function(A){r(0===A.negative),r(!A.isZero());var e=this,t=A.clone();e=0!==e.negative?e.umod(A):e.clone();for(var n=new i(1),o=new i(0),a=new i(0),s=new i(1),u=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++u;for(var g=t.clone(),c=e.clone();!e.isZero();){for(var B=0,l=1;0==(e.words[0]&l)&&B<26;++B,l<<=1);if(B>0)for(e.iushrn(B);B-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(g),o.isub(c)),n.iushrn(1),o.iushrn(1);for(var Q=0,I=1;0==(t.words[0]&I)&&Q<26;++Q,I<<=1);if(Q>0)for(t.iushrn(Q);Q-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(g),s.isub(c)),a.iushrn(1),s.iushrn(1);e.cmp(t)>=0?(e.isub(t),n.isub(a),o.isub(s)):(t.isub(e),a.isub(n),s.isub(o))}return{a,b:s,gcd:t.iushln(u)}},i.prototype._invmp=function(A){r(0===A.negative),r(!A.isZero());var e=this,t=A.clone();e=0!==e.negative?e.umod(A):e.clone();for(var n,o=new i(1),a=new i(0),s=t.clone();e.cmpn(1)>0&&t.cmpn(1)>0;){for(var u=0,g=1;0==(e.words[0]&g)&&u<26;++u,g<<=1);if(u>0)for(e.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var c=0,B=1;0==(t.words[0]&B)&&c<26;++c,B<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);e.cmp(t)>=0?(e.isub(t),o.isub(a)):(t.isub(e),a.isub(o))}return(n=0===e.cmpn(1)?o:a).cmpn(0)<0&&n.iadd(A),n},i.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var e=this.clone(),t=A.clone();e.negative=0,t.negative=0;for(var r=0;e.isEven()&&t.isEven();r++)e.iushrn(1),t.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;t.isEven();)t.iushrn(1);var n=e.cmp(t);if(n<0){var i=e;e=t,t=i}else if(0===n||0===t.cmpn(1))break;e.isub(t)}return t.iushln(r)},i.prototype.invm=function(A){return this.egcd(A).a.umod(A)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(A){return this.words[0]&A},i.prototype.bincn=function(A){r("number"==typeof A);var e=A%26,t=(A-e)/26,n=1<>>26,a&=67108863,this.words[o]=a}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(A){var e,t=A<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)e=1;else{t&&(A=-A),r(A<=67108863,"Number is too big");var n=0|this.words[0];e=n===A?0:nA.length)return 1;if(this.length=0;t--){var r=0|this.words[t],n=0|A.words[t];if(r!==n){rn&&(e=1);break}}return e},i.prototype.gtn=function(A){return 1===this.cmpn(A)},i.prototype.gt=function(A){return 1===this.cmp(A)},i.prototype.gten=function(A){return this.cmpn(A)>=0},i.prototype.gte=function(A){return this.cmp(A)>=0},i.prototype.ltn=function(A){return-1===this.cmpn(A)},i.prototype.lt=function(A){return-1===this.cmp(A)},i.prototype.lten=function(A){return this.cmpn(A)<=0},i.prototype.lte=function(A){return this.cmp(A)<=0},i.prototype.eqn=function(A){return 0===this.cmpn(A)},i.prototype.eq=function(A){return 0===this.cmp(A)},i.red=function(A){return new y(A)},i.prototype.toRed=function(A){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),A.convertTo(this)._forceRed(A)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(A){return this.red=A,this},i.prototype.forceRed=function(A){return r(!this.red,"Already a number in reduction context"),this._forceRed(A)},i.prototype.redAdd=function(A){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},i.prototype.redIAdd=function(A){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},i.prototype.redSub=function(A){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},i.prototype.redISub=function(A){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},i.prototype.redShl=function(A){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},i.prototype.redMul=function(A){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},i.prototype.redIMul=function(A){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(A){return r(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var h={k256:null,p224:null,p192:null,p25519:null};function E(A,e){this.name=A,this.p=new i(e,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function f(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function C(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function p(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(A){if("string"==typeof A){var e=i._prime(A);this.m=e.p,this.prime=e}else r(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}function v(A){y.call(this,A),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}E.prototype._tmp=function(){var A=new i(null);return A.words=new Array(Math.ceil(this.n/13)),A},E.prototype.ireduce=function(A){var e,t=A;do{this.split(t,this.tmp),e=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},E.prototype.split=function(A,e){A.iushrn(this.n,0,e)},E.prototype.imulK=function(A){return A.imul(this.k)},n(f,E),f.prototype.split=function(A,e){for(var t=4194303,r=Math.min(A.length,9),n=0;n>>22,i=o}i>>>=22,A.words[n-10]=i,0===i&&A.length>10?A.length-=10:A.length-=9},f.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var e=0,t=0;t>>=26,A.words[t]=n,e=r}return 0!==e&&(A.words[A.length++]=e),A},i._prime=function(A){if(h[A])return h[A];var e;if("k256"===A)e=new f;else if("p224"===A)e=new C;else if("p192"===A)e=new p;else{if("p25519"!==A)throw new Error("Unknown prime "+A);e=new m}return h[A]=e,e},y.prototype._verify1=function(A){r(0===A.negative,"red works only with positives"),r(A.red,"red works only with red numbers")},y.prototype._verify2=function(A,e){r(0==(A.negative|e.negative),"red works only with positives"),r(A.red&&A.red===e.red,"red works only with red numbers")},y.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):A.umod(this.m)._forceRed(this)},y.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},y.prototype.add=function(A,e){this._verify2(A,e);var t=A.add(e);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},y.prototype.iadd=function(A,e){this._verify2(A,e);var t=A.iadd(e);return t.cmp(this.m)>=0&&t.isub(this.m),t},y.prototype.sub=function(A,e){this._verify2(A,e);var t=A.sub(e);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},y.prototype.isub=function(A,e){this._verify2(A,e);var t=A.isub(e);return t.cmpn(0)<0&&t.iadd(this.m),t},y.prototype.shl=function(A,e){return this._verify1(A),this.imod(A.ushln(e))},y.prototype.imul=function(A,e){return this._verify2(A,e),this.imod(A.imul(e))},y.prototype.mul=function(A,e){return this._verify2(A,e),this.imod(A.mul(e))},y.prototype.isqr=function(A){return this.imul(A,A.clone())},y.prototype.sqr=function(A){return this.mul(A,A)},y.prototype.sqrt=function(A){if(A.isZero())return A.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var t=this.m.add(new i(1)).iushrn(2);return this.pow(A,t)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);r(!n.isZero());var a=new i(1).toRed(this),s=a.redNeg(),u=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new i(2*g*g).toRed(this);0!==this.pow(g,u).cmp(s);)g.redIAdd(s);for(var c=this.pow(g,n),B=this.pow(A,n.addn(1).iushrn(1)),l=this.pow(A,n),Q=o;0!==l.cmp(a);){for(var I=l,d=0;0!==I.cmp(a);d++)I=I.redSqr();r(d=0;r--){for(var u=e.words[r],g=s-1;g>=0;g--){var c=u>>g&1;n!==t[0]&&(n=this.sqr(n)),0!==c||0!==o?(o<<=1,o|=c,(4==++a||0===r&&0===g)&&(n=this.mul(n,t[o]),a=0,o=0)):a=0}s=26}return n},y.prototype.convertTo=function(A){var e=A.umod(this.m);return e===A?e.clone():e},y.prototype.convertFrom=function(A){var e=A.clone();return e.red=null,e},i.mont=function(A){return new v(A)},n(v,y),v.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},v.prototype.convertFrom=function(A){var e=this.imod(A.mul(this.rinv));return e.red=null,e},v.prototype.imul=function(A,e){if(A.isZero()||e.isZero())return A.words[0]=0,A.length=1,A;var t=A.imul(e),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),i=n;return n.cmp(this.m)>=0?i=n.isub(this.m):n.cmpn(0)<0&&(i=n.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(A,e){if(A.isZero()||e.isZero())return new i(0)._forceRed(this);var t=A.mul(e),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},v.prototype.invm=function(A){return this.imod(A._invmp(this.m).mul(this.r2))._forceRed(this)}}(A=t.nmd(A),this)},5733:(A,e,t)=>{"use strict";t.r(e)},9746:A=>{function e(A,e){if(!A)throw new Error(e||"Assertion failed")}A.exports=e,e.equal=function(A,e,t){if(A!=e)throw new Error(t||"Assertion failed: "+A+" != "+e)}},4504:(A,e)=>{"use strict";var t=e;function r(A){return 1===A.length?"0"+A:A}function n(A){for(var e="",t=0;t>8,o=255&n;i?t.push(i,o):t.push(o)}return t},t.zero2=r,t.toHex=n,t.encode=function(A,e){return"hex"===e?n(A):A}},7418:A=>{"use strict";var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(A){if(null==A)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(A)}A.exports=function(){try{if(!Object.assign)return!1;var A=new String("abc");if(A[5]="de","5"===Object.getOwnPropertyNames(A)[0])return!1;for(var e={},t=0;t<10;t++)e["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(A){return e[A]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(A){r[A]=A})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(A){return!1}}()?Object.assign:function(A,i){for(var o,a,s=n(A),u=1;u{"use strict";var r=t(9809);e.certificate=t(1934);var n=r.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));e.RSAPrivateKey=n;var i=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));e.RSAPublicKey=i;var o=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}));e.PublicKey=o;var a=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),s=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())}));e.PrivateKey=s;var u=r.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));e.EncryptedPrivateKey=u;var g=r.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));e.DSAPrivateKey=g,e.DSAparam=r.define("DSAparam",(function(){this.int()}));var c=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(B),this.key("publicKey").optional().explicit(1).bitstr())}));e.ECPrivateKey=c;var B=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));e.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},1934:(A,e,t)=>{"use strict";var r=t(9809),n=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),i=r.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),o=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())})),s=r.define("RelativeDistinguishedName",(function(){this.setof(i)})),u=r.define("RDNSequence",(function(){this.seqof(s)})),g=r.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),c=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(n),this.key("notAfter").use(n))})),B=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),l=r.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(g),this.key("validity").use(c),this.key("subject").use(g),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(B).optional())})),Q=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(l),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())}));A.exports=Q},7631:(A,e,t)=>{var r=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,n=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,o=t(3048),a=t(4696),s=t(9509).Buffer;A.exports=function(A,e){var t,u=A.toString(),g=u.match(r);if(g){var c="aes"+g[1],B=s.from(g[2],"hex"),l=s.from(g[3].replace(/[\r\n]/g,""),"base64"),Q=o(e,B.slice(0,8),parseInt(g[1],10)).key,I=[],d=a.createDecipheriv(c,Q,B);I.push(d.update(l)),I.push(d.final()),t=s.concat(I)}else{var h=u.match(i);t=s.from(h[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(n)[1],data:t}}},980:(A,e,t)=>{var r=t(2818),n=t(2562),i=t(7631),o=t(4696),a=t(5632),s=t(9509).Buffer;function u(A){var e;"object"!=typeof A||s.isBuffer(A)||(e=A.passphrase,A=A.key),"string"==typeof A&&(A=s.from(A));var t,u,g=i(A,e),c=g.tag,B=g.data;switch(c){case"CERTIFICATE":u=r.certificate.decode(B,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(u||(u=r.PublicKey.decode(B,"der")),t=u.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(u.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return u.subjectPrivateKey=u.subjectPublicKey,{type:"ec",data:u};case"1.2.840.10040.4.1":return u.algorithm.params.pub_key=r.DSAparam.decode(u.subjectPublicKey.data,"der"),{type:"dsa",data:u.algorithm.params};default:throw new Error("unknown key id "+t)}case"ENCRYPTED PRIVATE KEY":B=function(A,e){var t=A.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(A.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=n[A.algorithm.decrypt.cipher.algo.join(".")],u=A.algorithm.decrypt.cipher.iv,g=A.subjectPrivateKey,c=parseInt(i.split("-")[1],10)/8,B=a.pbkdf2Sync(e,t,r,c,"sha1"),l=o.createDecipheriv(i,B,u),Q=[];return Q.push(l.update(g)),Q.push(l.final()),s.concat(Q)}(B=r.EncryptedPrivateKey.decode(B,"der"),e);case"PRIVATE KEY":switch(t=(u=r.PrivateKey.decode(B,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(u.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:u.algorithm.curve,privateKey:r.ECPrivateKey.decode(u.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return u.algorithm.params.priv_key=r.DSAparam.decode(u.subjectPrivateKey,"der"),{type:"dsa",params:u.algorithm.params};default:throw new Error("unknown key id "+t)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(B,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(B,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(B,"der")};case"EC PRIVATE KEY":return{curve:(B=r.ECPrivateKey.decode(B,"der")).parameters.value,privateKey:B.privateKey};default:throw new Error("unknown key type "+c)}}A.exports=u,u.signature=r.signature},6470:A=>{"use strict";function e(A){if("string"!=typeof A)throw new TypeError("Path must be a string. Received "+JSON.stringify(A))}function t(A,e){for(var t,r="",n=0,i=-1,o=0,a=0;a<=A.length;++a){if(a2){var s=r.lastIndexOf("/");if(s!==r.length-1){-1===s?(r="",n=0):n=(r=r.slice(0,s)).length-1-r.lastIndexOf("/"),i=a,o=0;continue}}else if(2===r.length||1===r.length){r="",n=0,i=a,o=0;continue}e&&(r.length>0?r+="/..":r="..",n=2)}else r.length>0?r+="/"+A.slice(i+1,a):r=A.slice(i+1,a),n=a-i-1;i=a,o=0}else 46===t&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var A,r="",n=!1,i=arguments.length-1;i>=-1&&!n;i--){var o;i>=0?o=arguments[i]:(void 0===A&&(A=process.cwd()),o=A),e(o),0!==o.length&&(r=o+"/"+r,n=47===o.charCodeAt(0))}return r=t(r,!n),n?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(A){if(e(A),0===A.length)return".";var r=47===A.charCodeAt(0),n=47===A.charCodeAt(A.length-1);return 0!==(A=t(A,!r)).length||r||(A="."),A.length>0&&n&&(A+="/"),r?"/"+A:A},isAbsolute:function(A){return e(A),A.length>0&&47===A.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var A,t=0;t0&&(void 0===A?A=n:A+="/"+n)}return void 0===A?".":r.normalize(A)},relative:function(A,t){if(e(A),e(t),A===t)return"";if((A=r.resolve(A))===(t=r.resolve(t)))return"";for(var n=1;nu){if(47===t.charCodeAt(a+c))return t.slice(a+c+1);if(0===c)return t.slice(a+c)}else o>u&&(47===A.charCodeAt(n+c)?g=c:0===c&&(g=0));break}var B=A.charCodeAt(n+c);if(B!==t.charCodeAt(a+c))break;47===B&&(g=c)}var l="";for(c=n+g+1;c<=i;++c)c!==i&&47!==A.charCodeAt(c)||(0===l.length?l+="..":l+="/..");return l.length>0?l+t.slice(a+g):(a+=g,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(A){return A},dirname:function(A){if(e(A),0===A.length)return".";for(var t=A.charCodeAt(0),r=47===t,n=-1,i=!0,o=A.length-1;o>=1;--o)if(47===(t=A.charCodeAt(o))){if(!i){n=o;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"//":A.slice(0,n)},basename:function(A,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');e(A);var r,n=0,i=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=A.length){if(t.length===A.length&&t===A)return"";var a=t.length-1,s=-1;for(r=A.length-1;r>=0;--r){var u=A.charCodeAt(r);if(47===u){if(!o){n=r+1;break}}else-1===s&&(o=!1,s=r+1),a>=0&&(u===t.charCodeAt(a)?-1==--a&&(i=r):(a=-1,i=s))}return n===i?i=s:-1===i&&(i=A.length),A.slice(n,i)}for(r=A.length-1;r>=0;--r)if(47===A.charCodeAt(r)){if(!o){n=r+1;break}}else-1===i&&(o=!1,i=r+1);return-1===i?"":A.slice(n,i)},extname:function(A){e(A);for(var t=-1,r=0,n=-1,i=!0,o=0,a=A.length-1;a>=0;--a){var s=A.charCodeAt(a);if(47!==s)-1===n&&(i=!1,n=a+1),46===s?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){r=a+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===r+1?"":A.slice(t,n)},format:function(A){if(null===A||"object"!=typeof A)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof A);return function(A,e){var t=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return t?t===e.root?t+r:t+"/"+r:r}(0,A)},parse:function(A){e(A);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===A.length)return t;var r,n=A.charCodeAt(0),i=47===n;i?(t.root="/",r=1):r=0;for(var o=-1,a=0,s=-1,u=!0,g=A.length-1,c=0;g>=r;--g)if(47!==(n=A.charCodeAt(g)))-1===s&&(u=!1,s=g+1),46===n?-1===o?o=g:1!==c&&(c=1):-1!==o&&(c=-1);else if(!u){a=g+1;break}return-1===o||-1===s||0===c||1===c&&o===s-1&&o===a+1?-1!==s&&(t.base=t.name=0===a&&i?A.slice(1,s):A.slice(a,s)):(0===a&&i?(t.name=A.slice(1,o),t.base=A.slice(1,s)):(t.name=A.slice(a,o),t.base=A.slice(a,s)),t.ext=A.slice(o,s)),a>0?t.dir=A.slice(0,a-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,A.exports=r},5632:(A,e,t)=>{e.pbkdf2=t(8638),e.pbkdf2Sync=t(1257)},8638:(A,e,t)=>{var r,n,i=t(9509).Buffer,o=t(7357),a=t(2368),s=t(1257),u=t(7777),g=t.g.crypto&&t.g.crypto.subtle,c={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},B=[];function l(){return n||(n=t.g.process&&t.g.process.nextTick?t.g.process.nextTick:t.g.queueMicrotask?t.g.queueMicrotask:t.g.setImmediate?t.g.setImmediate:t.g.setTimeout)}function Q(A,e,t,r,n){return g.importKey("raw",A,{name:"PBKDF2"},!1,["deriveBits"]).then((function(A){return g.deriveBits({name:"PBKDF2",salt:e,iterations:t,hash:{name:n}},A,r<<3)})).then((function(A){return i.from(A)}))}A.exports=function(A,e,n,I,d,h){"function"==typeof d&&(h=d,d=void 0);var E=c[(d=d||"sha1").toLowerCase()];if(E&&"function"==typeof t.g.Promise){if(o(n,I),A=u(A,a,"Password"),e=u(e,a,"Salt"),"function"!=typeof h)throw new Error("No callback provided to pbkdf2");!function(A,e){A.then((function(A){l()((function(){e(null,A)}))}),(function(A){l()((function(){e(A)}))}))}(function(A){if(t.g.process&&!t.g.process.browser)return Promise.resolve(!1);if(!g||!g.importKey||!g.deriveBits)return Promise.resolve(!1);if(void 0!==B[A])return B[A];var e=Q(r=r||i.alloc(8),r,10,128,A).then((function(){return!0})).catch((function(){return!1}));return B[A]=e,e}(E).then((function(t){return t?Q(A,e,n,I,E):s(A,e,n,I,d)})),h)}else l()((function(){var t;try{t=s(A,e,n,I,d)}catch(A){return h(A)}h(null,t)}))}},2368:(A,e,t)=>{var r;r=t.g.process&&t.g.process.browser?"utf-8":t.g.process&&t.g.process.version?parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",A.exports=r},7357:A=>{var e=Math.pow(2,30)-1;A.exports=function(A,t){if("number"!=typeof A)throw new TypeError("Iterations not a number");if(A<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>e||t!=t)throw new TypeError("Bad key length")}},1257:(A,e,t)=>{var r=t(8028),n=t(9785),i=t(9072),o=t(9509).Buffer,a=t(7357),s=t(2368),u=t(7777),g=o.alloc(128),c={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function B(A,e,t){var a=function(A){return"rmd160"===A||"ripemd160"===A?function(A){return(new n).update(A).digest()}:"md5"===A?r:function(e){return i(A).update(e).digest()}}(A),s="sha512"===A||"sha384"===A?128:64;e.length>s?e=a(e):e.length{var r=t(9509).Buffer;A.exports=function(A,e,t){if(r.isBuffer(A))return A;if("string"==typeof A)return r.from(A,e);if(ArrayBuffer.isView(A))return r.from(A.buffer);throw new TypeError(t+" must be a string, a Buffer, a typed array or a DataView")}},7900:(A,e,t)=>{e.publicEncrypt=t(6559),e.privateDecrypt=t(6138),e.privateEncrypt=function(A,t){return e.publicEncrypt(A,t,!0)},e.publicDecrypt=function(A,t){return e.privateDecrypt(A,t,!0)}},9199:(A,e,t)=>{var r=t(3482),n=t(9509).Buffer;function i(A){var e=n.allocUnsafe(4);return e.writeUInt32BE(A,0),e}A.exports=function(A,e){for(var t,o=n.alloc(0),a=0;o.length=65&&t<=70?t-55:t>=97&&t<=102?t-87:t-48&15}function s(A,e,t){var r=a(A,t);return t-1>=e&&(r|=a(A,t-1)<<4),r}function u(A,e,t,r){for(var n=0,i=Math.min(A.length,t),o=e;o=49?a-49+10:a>=17?a-17+10:a}return n}i.isBN=function(A){return A instanceof i||null!==A&&"object"==typeof A&&A.constructor.wordSize===i.wordSize&&Array.isArray(A.words)},i.max=function(A,e){return A.cmp(e)>0?A:e},i.min=function(A,e){return A.cmp(e)<0?A:e},i.prototype._init=function(A,e,t){if("number"==typeof A)return this._initNumber(A,e,t);if("object"==typeof A)return this._initArray(A,e,t);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(A=A.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)o=A[n]|A[n-1]<<8|A[n-2]<<16,this.words[i]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===t)for(n=0,i=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this.strip()},i.prototype._parseHex=function(A,e,t){this.length=Math.ceil((A.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)n=s(A,e,r)<=18?(i-=18,o+=1,this.words[o]|=n>>>26):i+=8;else for(r=(A.length-e)%2==0?e+1:e;r=18?(i-=18,o+=1,this.words[o]|=n>>>26):i+=8;this.strip()},i.prototype._parseBase=function(A,e,t){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var i=A.length-t,o=i%r,a=Math.min(i,i-o)+t,s=0,g=t;g1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var g=["","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"],c=[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],B=[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 l(A,e,t){t.negative=e.negative^A.negative;var r=A.length+e.length|0;t.length=r,r=r-1|0;var n=0|A.words[0],i=0|e.words[0],o=n*i,a=67108863&o,s=o/67108864|0;t.words[0]=a;for(var u=1;u>>26,c=67108863&s,B=Math.min(u,e.length-1),l=Math.max(0,u-A.length+1);l<=B;l++){var Q=u-l|0;g+=(o=(n=0|A.words[Q])*(i=0|e.words[l])+c)/67108864|0,c=67108863&o}t.words[u]=0|c,s=0|g}return 0!==s?t.words[u]=0|s:t.length--,t.strip()}i.prototype.toString=function(A,e){var t;if(e=0|e||1,16===(A=A||10)||"hex"===A){t="";for(var n=0,i=0,o=0;o>>24-n&16777215)||o!==this.length-1?g[6-s.length]+s+t:s+t,(n+=2)>=26&&(n-=26,o--)}for(0!==i&&(t=i.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(A===(0|A)&&A>=2&&A<=36){var u=c[A],l=B[A];t="";var Q=this.clone();for(Q.negative=0;!Q.isZero();){var I=Q.modn(l).toString(A);t=(Q=Q.idivn(l)).isZero()?I+t:g[u-I.length]+I+t}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var A=this.words[0];return 2===this.length?A+=67108864*this.words[1]:3===this.length&&1===this.words[2]?A+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-A:A},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(A,e){return r(void 0!==o),this.toArrayLike(o,A,e)},i.prototype.toArray=function(A,e){return this.toArrayLike(Array,A,e)},i.prototype.toArrayLike=function(A,e,t){var n=this.byteLength(),i=t||Math.max(1,n);r(n<=i,"byte array longer than desired length"),r(i>0,"Requested array length <= 0"),this.strip();var o,a,s="le"===e,u=new A(i),g=this.clone();if(s){for(a=0;!g.isZero();a++)o=g.andln(255),g.iushrn(8),u[a]=o;for(;a=4096&&(t+=13,e>>>=13),e>=64&&(t+=7,e>>>=7),e>=8&&(t+=4,e>>>=4),e>=2&&(t+=2,e>>>=2),t+e},i.prototype._zeroBits=function(A){if(0===A)return 26;var e=A,t=0;return 0==(8191&e)&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t},i.prototype.bitLength=function(){var A=this.words[this.length-1],e=this._countBits(A);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,e=0;eA.length?this.clone().ior(A):A.clone().ior(this)},i.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},i.prototype.iuand=function(A){var e;e=this.length>A.length?A:this;for(var t=0;tA.length?this.clone().iand(A):A.clone().iand(this)},i.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},i.prototype.iuxor=function(A){var e,t;this.length>A.length?(e=this,t=A):(e=A,t=this);for(var r=0;rA.length?this.clone().ixor(A):A.clone().ixor(this)},i.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},i.prototype.inotn=function(A){r("number"==typeof A&&A>=0);var e=0|Math.ceil(A/26),t=A%26;this._expand(e),t>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-t),this.strip()},i.prototype.notn=function(A){return this.clone().inotn(A)},i.prototype.setn=function(A,e){r("number"==typeof A&&A>=0);var t=A/26|0,n=A%26;return this._expand(t+1),this.words[t]=e?this.words[t]|1<A.length?(t=this,r=A):(t=A,r=this);for(var n=0,i=0;i>>26;for(;0!==n&&i>>26;if(this.length=t.length,0!==n)this.words[this.length]=n,this.length++;else if(t!==this)for(;iA.length?this.clone().iadd(A):A.clone().iadd(this)},i.prototype.isub=function(A){if(0!==A.negative){A.negative=0;var e=this.iadd(A);return A.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var t,r,n=this.cmp(A);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=A):(t=A,r=this);for(var i=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==i&&o>26,this.words[o]=67108863&e;if(0===i&&o>>13,l=0|o[1],Q=8191&l,I=l>>>13,d=0|o[2],h=8191&d,E=d>>>13,f=0|o[3],C=8191&f,p=f>>>13,m=0|o[4],y=8191&m,v=m>>>13,D=0|o[5],b=8191&D,w=D>>>13,F=0|o[6],U=8191&F,S=F>>>13,N=0|o[7],R=8191&N,H=N>>>13,G=0|o[8],M=8191&G,L=G>>>13,x=0|o[9],k=8191&x,Y=x>>>13,_=0|a[0],V=8191&_,T=_>>>13,P=0|a[1],J=8191&P,O=P>>>13,K=0|a[2],j=8191&K,z=K>>>13,q=0|a[3],Z=8191&q,W=q>>>13,X=0|a[4],$=8191&X,AA=X>>>13,eA=0|a[5],tA=8191&eA,rA=eA>>>13,nA=0|a[6],iA=8191&nA,oA=nA>>>13,aA=0|a[7],sA=8191&aA,uA=aA>>>13,gA=0|a[8],cA=8191&gA,BA=gA>>>13,lA=0|a[9],QA=8191&lA,IA=lA>>>13;t.negative=A.negative^e.negative,t.length=19;var dA=(u+(r=Math.imul(c,V))|0)+((8191&(n=(n=Math.imul(c,T))+Math.imul(B,V)|0))<<13)|0;u=((i=Math.imul(B,T))+(n>>>13)|0)+(dA>>>26)|0,dA&=67108863,r=Math.imul(Q,V),n=(n=Math.imul(Q,T))+Math.imul(I,V)|0,i=Math.imul(I,T);var hA=(u+(r=r+Math.imul(c,J)|0)|0)+((8191&(n=(n=n+Math.imul(c,O)|0)+Math.imul(B,J)|0))<<13)|0;u=((i=i+Math.imul(B,O)|0)+(n>>>13)|0)+(hA>>>26)|0,hA&=67108863,r=Math.imul(h,V),n=(n=Math.imul(h,T))+Math.imul(E,V)|0,i=Math.imul(E,T),r=r+Math.imul(Q,J)|0,n=(n=n+Math.imul(Q,O)|0)+Math.imul(I,J)|0,i=i+Math.imul(I,O)|0;var EA=(u+(r=r+Math.imul(c,j)|0)|0)+((8191&(n=(n=n+Math.imul(c,z)|0)+Math.imul(B,j)|0))<<13)|0;u=((i=i+Math.imul(B,z)|0)+(n>>>13)|0)+(EA>>>26)|0,EA&=67108863,r=Math.imul(C,V),n=(n=Math.imul(C,T))+Math.imul(p,V)|0,i=Math.imul(p,T),r=r+Math.imul(h,J)|0,n=(n=n+Math.imul(h,O)|0)+Math.imul(E,J)|0,i=i+Math.imul(E,O)|0,r=r+Math.imul(Q,j)|0,n=(n=n+Math.imul(Q,z)|0)+Math.imul(I,j)|0,i=i+Math.imul(I,z)|0;var fA=(u+(r=r+Math.imul(c,Z)|0)|0)+((8191&(n=(n=n+Math.imul(c,W)|0)+Math.imul(B,Z)|0))<<13)|0;u=((i=i+Math.imul(B,W)|0)+(n>>>13)|0)+(fA>>>26)|0,fA&=67108863,r=Math.imul(y,V),n=(n=Math.imul(y,T))+Math.imul(v,V)|0,i=Math.imul(v,T),r=r+Math.imul(C,J)|0,n=(n=n+Math.imul(C,O)|0)+Math.imul(p,J)|0,i=i+Math.imul(p,O)|0,r=r+Math.imul(h,j)|0,n=(n=n+Math.imul(h,z)|0)+Math.imul(E,j)|0,i=i+Math.imul(E,z)|0,r=r+Math.imul(Q,Z)|0,n=(n=n+Math.imul(Q,W)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0;var CA=(u+(r=r+Math.imul(c,$)|0)|0)+((8191&(n=(n=n+Math.imul(c,AA)|0)+Math.imul(B,$)|0))<<13)|0;u=((i=i+Math.imul(B,AA)|0)+(n>>>13)|0)+(CA>>>26)|0,CA&=67108863,r=Math.imul(b,V),n=(n=Math.imul(b,T))+Math.imul(w,V)|0,i=Math.imul(w,T),r=r+Math.imul(y,J)|0,n=(n=n+Math.imul(y,O)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,O)|0,r=r+Math.imul(C,j)|0,n=(n=n+Math.imul(C,z)|0)+Math.imul(p,j)|0,i=i+Math.imul(p,z)|0,r=r+Math.imul(h,Z)|0,n=(n=n+Math.imul(h,W)|0)+Math.imul(E,Z)|0,i=i+Math.imul(E,W)|0,r=r+Math.imul(Q,$)|0,n=(n=n+Math.imul(Q,AA)|0)+Math.imul(I,$)|0,i=i+Math.imul(I,AA)|0;var pA=(u+(r=r+Math.imul(c,tA)|0)|0)+((8191&(n=(n=n+Math.imul(c,rA)|0)+Math.imul(B,tA)|0))<<13)|0;u=((i=i+Math.imul(B,rA)|0)+(n>>>13)|0)+(pA>>>26)|0,pA&=67108863,r=Math.imul(U,V),n=(n=Math.imul(U,T))+Math.imul(S,V)|0,i=Math.imul(S,T),r=r+Math.imul(b,J)|0,n=(n=n+Math.imul(b,O)|0)+Math.imul(w,J)|0,i=i+Math.imul(w,O)|0,r=r+Math.imul(y,j)|0,n=(n=n+Math.imul(y,z)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,z)|0,r=r+Math.imul(C,Z)|0,n=(n=n+Math.imul(C,W)|0)+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,r=r+Math.imul(h,$)|0,n=(n=n+Math.imul(h,AA)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,AA)|0,r=r+Math.imul(Q,tA)|0,n=(n=n+Math.imul(Q,rA)|0)+Math.imul(I,tA)|0,i=i+Math.imul(I,rA)|0;var mA=(u+(r=r+Math.imul(c,iA)|0)|0)+((8191&(n=(n=n+Math.imul(c,oA)|0)+Math.imul(B,iA)|0))<<13)|0;u=((i=i+Math.imul(B,oA)|0)+(n>>>13)|0)+(mA>>>26)|0,mA&=67108863,r=Math.imul(R,V),n=(n=Math.imul(R,T))+Math.imul(H,V)|0,i=Math.imul(H,T),r=r+Math.imul(U,J)|0,n=(n=n+Math.imul(U,O)|0)+Math.imul(S,J)|0,i=i+Math.imul(S,O)|0,r=r+Math.imul(b,j)|0,n=(n=n+Math.imul(b,z)|0)+Math.imul(w,j)|0,i=i+Math.imul(w,z)|0,r=r+Math.imul(y,Z)|0,n=(n=n+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,AA)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,AA)|0,r=r+Math.imul(h,tA)|0,n=(n=n+Math.imul(h,rA)|0)+Math.imul(E,tA)|0,i=i+Math.imul(E,rA)|0,r=r+Math.imul(Q,iA)|0,n=(n=n+Math.imul(Q,oA)|0)+Math.imul(I,iA)|0,i=i+Math.imul(I,oA)|0;var yA=(u+(r=r+Math.imul(c,sA)|0)|0)+((8191&(n=(n=n+Math.imul(c,uA)|0)+Math.imul(B,sA)|0))<<13)|0;u=((i=i+Math.imul(B,uA)|0)+(n>>>13)|0)+(yA>>>26)|0,yA&=67108863,r=Math.imul(M,V),n=(n=Math.imul(M,T))+Math.imul(L,V)|0,i=Math.imul(L,T),r=r+Math.imul(R,J)|0,n=(n=n+Math.imul(R,O)|0)+Math.imul(H,J)|0,i=i+Math.imul(H,O)|0,r=r+Math.imul(U,j)|0,n=(n=n+Math.imul(U,z)|0)+Math.imul(S,j)|0,i=i+Math.imul(S,z)|0,r=r+Math.imul(b,Z)|0,n=(n=n+Math.imul(b,W)|0)+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,r=r+Math.imul(y,$)|0,n=(n=n+Math.imul(y,AA)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,AA)|0,r=r+Math.imul(C,tA)|0,n=(n=n+Math.imul(C,rA)|0)+Math.imul(p,tA)|0,i=i+Math.imul(p,rA)|0,r=r+Math.imul(h,iA)|0,n=(n=n+Math.imul(h,oA)|0)+Math.imul(E,iA)|0,i=i+Math.imul(E,oA)|0,r=r+Math.imul(Q,sA)|0,n=(n=n+Math.imul(Q,uA)|0)+Math.imul(I,sA)|0,i=i+Math.imul(I,uA)|0;var vA=(u+(r=r+Math.imul(c,cA)|0)|0)+((8191&(n=(n=n+Math.imul(c,BA)|0)+Math.imul(B,cA)|0))<<13)|0;u=((i=i+Math.imul(B,BA)|0)+(n>>>13)|0)+(vA>>>26)|0,vA&=67108863,r=Math.imul(k,V),n=(n=Math.imul(k,T))+Math.imul(Y,V)|0,i=Math.imul(Y,T),r=r+Math.imul(M,J)|0,n=(n=n+Math.imul(M,O)|0)+Math.imul(L,J)|0,i=i+Math.imul(L,O)|0,r=r+Math.imul(R,j)|0,n=(n=n+Math.imul(R,z)|0)+Math.imul(H,j)|0,i=i+Math.imul(H,z)|0,r=r+Math.imul(U,Z)|0,n=(n=n+Math.imul(U,W)|0)+Math.imul(S,Z)|0,i=i+Math.imul(S,W)|0,r=r+Math.imul(b,$)|0,n=(n=n+Math.imul(b,AA)|0)+Math.imul(w,$)|0,i=i+Math.imul(w,AA)|0,r=r+Math.imul(y,tA)|0,n=(n=n+Math.imul(y,rA)|0)+Math.imul(v,tA)|0,i=i+Math.imul(v,rA)|0,r=r+Math.imul(C,iA)|0,n=(n=n+Math.imul(C,oA)|0)+Math.imul(p,iA)|0,i=i+Math.imul(p,oA)|0,r=r+Math.imul(h,sA)|0,n=(n=n+Math.imul(h,uA)|0)+Math.imul(E,sA)|0,i=i+Math.imul(E,uA)|0,r=r+Math.imul(Q,cA)|0,n=(n=n+Math.imul(Q,BA)|0)+Math.imul(I,cA)|0,i=i+Math.imul(I,BA)|0;var DA=(u+(r=r+Math.imul(c,QA)|0)|0)+((8191&(n=(n=n+Math.imul(c,IA)|0)+Math.imul(B,QA)|0))<<13)|0;u=((i=i+Math.imul(B,IA)|0)+(n>>>13)|0)+(DA>>>26)|0,DA&=67108863,r=Math.imul(k,J),n=(n=Math.imul(k,O))+Math.imul(Y,J)|0,i=Math.imul(Y,O),r=r+Math.imul(M,j)|0,n=(n=n+Math.imul(M,z)|0)+Math.imul(L,j)|0,i=i+Math.imul(L,z)|0,r=r+Math.imul(R,Z)|0,n=(n=n+Math.imul(R,W)|0)+Math.imul(H,Z)|0,i=i+Math.imul(H,W)|0,r=r+Math.imul(U,$)|0,n=(n=n+Math.imul(U,AA)|0)+Math.imul(S,$)|0,i=i+Math.imul(S,AA)|0,r=r+Math.imul(b,tA)|0,n=(n=n+Math.imul(b,rA)|0)+Math.imul(w,tA)|0,i=i+Math.imul(w,rA)|0,r=r+Math.imul(y,iA)|0,n=(n=n+Math.imul(y,oA)|0)+Math.imul(v,iA)|0,i=i+Math.imul(v,oA)|0,r=r+Math.imul(C,sA)|0,n=(n=n+Math.imul(C,uA)|0)+Math.imul(p,sA)|0,i=i+Math.imul(p,uA)|0,r=r+Math.imul(h,cA)|0,n=(n=n+Math.imul(h,BA)|0)+Math.imul(E,cA)|0,i=i+Math.imul(E,BA)|0;var bA=(u+(r=r+Math.imul(Q,QA)|0)|0)+((8191&(n=(n=n+Math.imul(Q,IA)|0)+Math.imul(I,QA)|0))<<13)|0;u=((i=i+Math.imul(I,IA)|0)+(n>>>13)|0)+(bA>>>26)|0,bA&=67108863,r=Math.imul(k,j),n=(n=Math.imul(k,z))+Math.imul(Y,j)|0,i=Math.imul(Y,z),r=r+Math.imul(M,Z)|0,n=(n=n+Math.imul(M,W)|0)+Math.imul(L,Z)|0,i=i+Math.imul(L,W)|0,r=r+Math.imul(R,$)|0,n=(n=n+Math.imul(R,AA)|0)+Math.imul(H,$)|0,i=i+Math.imul(H,AA)|0,r=r+Math.imul(U,tA)|0,n=(n=n+Math.imul(U,rA)|0)+Math.imul(S,tA)|0,i=i+Math.imul(S,rA)|0,r=r+Math.imul(b,iA)|0,n=(n=n+Math.imul(b,oA)|0)+Math.imul(w,iA)|0,i=i+Math.imul(w,oA)|0,r=r+Math.imul(y,sA)|0,n=(n=n+Math.imul(y,uA)|0)+Math.imul(v,sA)|0,i=i+Math.imul(v,uA)|0,r=r+Math.imul(C,cA)|0,n=(n=n+Math.imul(C,BA)|0)+Math.imul(p,cA)|0,i=i+Math.imul(p,BA)|0;var wA=(u+(r=r+Math.imul(h,QA)|0)|0)+((8191&(n=(n=n+Math.imul(h,IA)|0)+Math.imul(E,QA)|0))<<13)|0;u=((i=i+Math.imul(E,IA)|0)+(n>>>13)|0)+(wA>>>26)|0,wA&=67108863,r=Math.imul(k,Z),n=(n=Math.imul(k,W))+Math.imul(Y,Z)|0,i=Math.imul(Y,W),r=r+Math.imul(M,$)|0,n=(n=n+Math.imul(M,AA)|0)+Math.imul(L,$)|0,i=i+Math.imul(L,AA)|0,r=r+Math.imul(R,tA)|0,n=(n=n+Math.imul(R,rA)|0)+Math.imul(H,tA)|0,i=i+Math.imul(H,rA)|0,r=r+Math.imul(U,iA)|0,n=(n=n+Math.imul(U,oA)|0)+Math.imul(S,iA)|0,i=i+Math.imul(S,oA)|0,r=r+Math.imul(b,sA)|0,n=(n=n+Math.imul(b,uA)|0)+Math.imul(w,sA)|0,i=i+Math.imul(w,uA)|0,r=r+Math.imul(y,cA)|0,n=(n=n+Math.imul(y,BA)|0)+Math.imul(v,cA)|0,i=i+Math.imul(v,BA)|0;var FA=(u+(r=r+Math.imul(C,QA)|0)|0)+((8191&(n=(n=n+Math.imul(C,IA)|0)+Math.imul(p,QA)|0))<<13)|0;u=((i=i+Math.imul(p,IA)|0)+(n>>>13)|0)+(FA>>>26)|0,FA&=67108863,r=Math.imul(k,$),n=(n=Math.imul(k,AA))+Math.imul(Y,$)|0,i=Math.imul(Y,AA),r=r+Math.imul(M,tA)|0,n=(n=n+Math.imul(M,rA)|0)+Math.imul(L,tA)|0,i=i+Math.imul(L,rA)|0,r=r+Math.imul(R,iA)|0,n=(n=n+Math.imul(R,oA)|0)+Math.imul(H,iA)|0,i=i+Math.imul(H,oA)|0,r=r+Math.imul(U,sA)|0,n=(n=n+Math.imul(U,uA)|0)+Math.imul(S,sA)|0,i=i+Math.imul(S,uA)|0,r=r+Math.imul(b,cA)|0,n=(n=n+Math.imul(b,BA)|0)+Math.imul(w,cA)|0,i=i+Math.imul(w,BA)|0;var UA=(u+(r=r+Math.imul(y,QA)|0)|0)+((8191&(n=(n=n+Math.imul(y,IA)|0)+Math.imul(v,QA)|0))<<13)|0;u=((i=i+Math.imul(v,IA)|0)+(n>>>13)|0)+(UA>>>26)|0,UA&=67108863,r=Math.imul(k,tA),n=(n=Math.imul(k,rA))+Math.imul(Y,tA)|0,i=Math.imul(Y,rA),r=r+Math.imul(M,iA)|0,n=(n=n+Math.imul(M,oA)|0)+Math.imul(L,iA)|0,i=i+Math.imul(L,oA)|0,r=r+Math.imul(R,sA)|0,n=(n=n+Math.imul(R,uA)|0)+Math.imul(H,sA)|0,i=i+Math.imul(H,uA)|0,r=r+Math.imul(U,cA)|0,n=(n=n+Math.imul(U,BA)|0)+Math.imul(S,cA)|0,i=i+Math.imul(S,BA)|0;var SA=(u+(r=r+Math.imul(b,QA)|0)|0)+((8191&(n=(n=n+Math.imul(b,IA)|0)+Math.imul(w,QA)|0))<<13)|0;u=((i=i+Math.imul(w,IA)|0)+(n>>>13)|0)+(SA>>>26)|0,SA&=67108863,r=Math.imul(k,iA),n=(n=Math.imul(k,oA))+Math.imul(Y,iA)|0,i=Math.imul(Y,oA),r=r+Math.imul(M,sA)|0,n=(n=n+Math.imul(M,uA)|0)+Math.imul(L,sA)|0,i=i+Math.imul(L,uA)|0,r=r+Math.imul(R,cA)|0,n=(n=n+Math.imul(R,BA)|0)+Math.imul(H,cA)|0,i=i+Math.imul(H,BA)|0;var NA=(u+(r=r+Math.imul(U,QA)|0)|0)+((8191&(n=(n=n+Math.imul(U,IA)|0)+Math.imul(S,QA)|0))<<13)|0;u=((i=i+Math.imul(S,IA)|0)+(n>>>13)|0)+(NA>>>26)|0,NA&=67108863,r=Math.imul(k,sA),n=(n=Math.imul(k,uA))+Math.imul(Y,sA)|0,i=Math.imul(Y,uA),r=r+Math.imul(M,cA)|0,n=(n=n+Math.imul(M,BA)|0)+Math.imul(L,cA)|0,i=i+Math.imul(L,BA)|0;var RA=(u+(r=r+Math.imul(R,QA)|0)|0)+((8191&(n=(n=n+Math.imul(R,IA)|0)+Math.imul(H,QA)|0))<<13)|0;u=((i=i+Math.imul(H,IA)|0)+(n>>>13)|0)+(RA>>>26)|0,RA&=67108863,r=Math.imul(k,cA),n=(n=Math.imul(k,BA))+Math.imul(Y,cA)|0,i=Math.imul(Y,BA);var HA=(u+(r=r+Math.imul(M,QA)|0)|0)+((8191&(n=(n=n+Math.imul(M,IA)|0)+Math.imul(L,QA)|0))<<13)|0;u=((i=i+Math.imul(L,IA)|0)+(n>>>13)|0)+(HA>>>26)|0,HA&=67108863;var GA=(u+(r=Math.imul(k,QA))|0)+((8191&(n=(n=Math.imul(k,IA))+Math.imul(Y,QA)|0))<<13)|0;return u=((i=Math.imul(Y,IA))+(n>>>13)|0)+(GA>>>26)|0,GA&=67108863,s[0]=dA,s[1]=hA,s[2]=EA,s[3]=fA,s[4]=CA,s[5]=pA,s[6]=mA,s[7]=yA,s[8]=vA,s[9]=DA,s[10]=bA,s[11]=wA,s[12]=FA,s[13]=UA,s[14]=SA,s[15]=NA,s[16]=RA,s[17]=HA,s[18]=GA,0!==u&&(s[19]=u,t.length++),t};function I(A,e,t){return(new d).mulp(A,e,t)}function d(A,e){this.x=A,this.y=e}Math.imul||(Q=l),i.prototype.mulTo=function(A,e){var t,r=this.length+A.length;return t=10===this.length&&10===A.length?Q(this,A,e):r<63?l(this,A,e):r<1024?function(A,e,t){t.negative=e.negative^A.negative,t.length=A.length+e.length;for(var r=0,n=0,i=0;i>>26)|0)>>>26,o&=67108863}t.words[i]=a,r=o,o=n}return 0!==r?t.words[i]=r:t.length--,t.strip()}(this,A,e):I(this,A,e),t},d.prototype.makeRBT=function(A){for(var e=new Array(A),t=i.prototype._countBits(A)-1,r=0;r>=1;return r},d.prototype.permute=function(A,e,t,r,n,i){for(var o=0;o>>=1)n++;return 1<>>=13,t[2*o+1]=8191&i,i>>>=13;for(o=2*e;o>=26,e+=n/67108864|0,e+=i>>>26,this.words[t]=67108863&i}return 0!==e&&(this.words[t]=e,this.length++),this},i.prototype.muln=function(A){return this.clone().imuln(A)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(A){var e=function(A){for(var e=new Array(A.bitLength()),t=0;t>>n}return e}(A);if(0===e.length)return new i(1);for(var t=this,r=0;r=0);var e,t=A%26,n=(A-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(e=0;e>>26-t}o&&(this.words[e]=o,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var i=A%26,o=Math.min((A-i)/26,this.length),a=67108863^67108863>>>i<o)for(this.length-=o,u=0;u=0&&(0!==g||u>=n);u--){var c=0|this.words[u];this.words[u]=g<<26-i|c>>>i,g=c&a}return s&&0!==g&&(s.words[s.length++]=g),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(A,e,t){return r(0===this.negative),this.iushrn(A,e,t)},i.prototype.shln=function(A){return this.clone().ishln(A)},i.prototype.ushln=function(A){return this.clone().iushln(A)},i.prototype.shrn=function(A){return this.clone().ishrn(A)},i.prototype.ushrn=function(A){return this.clone().iushrn(A)},i.prototype.testn=function(A){r("number"==typeof A&&A>=0);var e=A%26,t=(A-e)/26,n=1<=0);var e=A%26,t=(A-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=t)return this;if(0!==e&&t++,this.length=Math.min(t,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},i.prototype.isubn=function(A){if(r("number"==typeof A),r(A<67108864),A<0)return this.iaddn(-A);if(0!==this.negative)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(s/67108864|0),this.words[n+t]=67108863&i}for(;n>26,this.words[n+t]=67108863&i;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(A,e){var t=(this.length,A.length),r=this.clone(),n=A,o=0|n.words[n.length-1];0!=(t=26-this._countBits(o))&&(n=n.ushln(t),r.iushln(t),o=0|n.words[n.length-1]);var a,s=r.length-n.length;if("mod"!==e){(a=new i(null)).length=s+1,a.words=new Array(a.length);for(var u=0;u=0;c--){var B=67108864*(0|r.words[n.length+c])+(0|r.words[n.length+c-1]);for(B=Math.min(B/o|0,67108863),r._ishlnsubmul(n,B,c);0!==r.negative;)B--,r.negative=0,r._ishlnsubmul(n,1,c),r.isZero()||(r.negative^=1);a&&(a.words[c]=B)}return a&&a.strip(),r.strip(),"div"!==e&&0!==t&&r.iushrn(t),{div:a||null,mod:r}},i.prototype.divmod=function(A,e,t){return r(!A.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===A.negative?(a=this.neg().divmod(A,e),"mod"!==e&&(n=a.div.neg()),"div"!==e&&(o=a.mod.neg(),t&&0!==o.negative&&o.iadd(A)),{div:n,mod:o}):0===this.negative&&0!==A.negative?(a=this.divmod(A.neg(),e),"mod"!==e&&(n=a.div.neg()),{div:n,mod:a.mod}):0!=(this.negative&A.negative)?(a=this.neg().divmod(A.neg(),e),"div"!==e&&(o=a.mod.neg(),t&&0!==o.negative&&o.isub(A)),{div:a.div,mod:o}):A.length>this.length||this.cmp(A)<0?{div:new i(0),mod:this}:1===A.length?"div"===e?{div:this.divn(A.words[0]),mod:null}:"mod"===e?{div:null,mod:new i(this.modn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new i(this.modn(A.words[0]))}:this._wordDiv(A,e);var n,o,a},i.prototype.div=function(A){return this.divmod(A,"div",!1).div},i.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},i.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},i.prototype.divRound=function(A){var e=this.divmod(A);if(e.mod.isZero())return e.div;var t=0!==e.div.negative?e.mod.isub(A):e.mod,r=A.ushrn(1),n=A.andln(1),i=t.cmp(r);return i<0||1===n&&0===i?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},i.prototype.modn=function(A){r(A<=67108863);for(var e=(1<<26)%A,t=0,n=this.length-1;n>=0;n--)t=(e*t+(0|this.words[n]))%A;return t},i.prototype.idivn=function(A){r(A<=67108863);for(var e=0,t=this.length-1;t>=0;t--){var n=(0|this.words[t])+67108864*e;this.words[t]=n/A|0,e=n%A}return this.strip()},i.prototype.divn=function(A){return this.clone().idivn(A)},i.prototype.egcd=function(A){r(0===A.negative),r(!A.isZero());var e=this,t=A.clone();e=0!==e.negative?e.umod(A):e.clone();for(var n=new i(1),o=new i(0),a=new i(0),s=new i(1),u=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++u;for(var g=t.clone(),c=e.clone();!e.isZero();){for(var B=0,l=1;0==(e.words[0]&l)&&B<26;++B,l<<=1);if(B>0)for(e.iushrn(B);B-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(g),o.isub(c)),n.iushrn(1),o.iushrn(1);for(var Q=0,I=1;0==(t.words[0]&I)&&Q<26;++Q,I<<=1);if(Q>0)for(t.iushrn(Q);Q-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(g),s.isub(c)),a.iushrn(1),s.iushrn(1);e.cmp(t)>=0?(e.isub(t),n.isub(a),o.isub(s)):(t.isub(e),a.isub(n),s.isub(o))}return{a,b:s,gcd:t.iushln(u)}},i.prototype._invmp=function(A){r(0===A.negative),r(!A.isZero());var e=this,t=A.clone();e=0!==e.negative?e.umod(A):e.clone();for(var n,o=new i(1),a=new i(0),s=t.clone();e.cmpn(1)>0&&t.cmpn(1)>0;){for(var u=0,g=1;0==(e.words[0]&g)&&u<26;++u,g<<=1);if(u>0)for(e.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var c=0,B=1;0==(t.words[0]&B)&&c<26;++c,B<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);e.cmp(t)>=0?(e.isub(t),o.isub(a)):(t.isub(e),a.isub(o))}return(n=0===e.cmpn(1)?o:a).cmpn(0)<0&&n.iadd(A),n},i.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var e=this.clone(),t=A.clone();e.negative=0,t.negative=0;for(var r=0;e.isEven()&&t.isEven();r++)e.iushrn(1),t.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;t.isEven();)t.iushrn(1);var n=e.cmp(t);if(n<0){var i=e;e=t,t=i}else if(0===n||0===t.cmpn(1))break;e.isub(t)}return t.iushln(r)},i.prototype.invm=function(A){return this.egcd(A).a.umod(A)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(A){return this.words[0]&A},i.prototype.bincn=function(A){r("number"==typeof A);var e=A%26,t=(A-e)/26,n=1<>>26,a&=67108863,this.words[o]=a}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(A){var e,t=A<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;if(this.strip(),this.length>1)e=1;else{t&&(A=-A),r(A<=67108863,"Number is too big");var n=0|this.words[0];e=n===A?0:nA.length)return 1;if(this.length=0;t--){var r=0|this.words[t],n=0|A.words[t];if(r!==n){rn&&(e=1);break}}return e},i.prototype.gtn=function(A){return 1===this.cmpn(A)},i.prototype.gt=function(A){return 1===this.cmp(A)},i.prototype.gten=function(A){return this.cmpn(A)>=0},i.prototype.gte=function(A){return this.cmp(A)>=0},i.prototype.ltn=function(A){return-1===this.cmpn(A)},i.prototype.lt=function(A){return-1===this.cmp(A)},i.prototype.lten=function(A){return this.cmpn(A)<=0},i.prototype.lte=function(A){return this.cmp(A)<=0},i.prototype.eqn=function(A){return 0===this.cmpn(A)},i.prototype.eq=function(A){return 0===this.cmp(A)},i.red=function(A){return new y(A)},i.prototype.toRed=function(A){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),A.convertTo(this)._forceRed(A)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(A){return this.red=A,this},i.prototype.forceRed=function(A){return r(!this.red,"Already a number in reduction context"),this._forceRed(A)},i.prototype.redAdd=function(A){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},i.prototype.redIAdd=function(A){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},i.prototype.redSub=function(A){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},i.prototype.redISub=function(A){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},i.prototype.redShl=function(A){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},i.prototype.redMul=function(A){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},i.prototype.redIMul=function(A){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(A){return r(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var h={k256:null,p224:null,p192:null,p25519:null};function E(A,e){this.name=A,this.p=new i(e,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function f(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function C(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function p(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(A){if("string"==typeof A){var e=i._prime(A);this.m=e.p,this.prime=e}else r(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}function v(A){y.call(this,A),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}E.prototype._tmp=function(){var A=new i(null);return A.words=new Array(Math.ceil(this.n/13)),A},E.prototype.ireduce=function(A){var e,t=A;do{this.split(t,this.tmp),e=(t=(t=this.imulK(t)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?t.isub(this.p):void 0!==t.strip?t.strip():t._strip(),t},E.prototype.split=function(A,e){A.iushrn(this.n,0,e)},E.prototype.imulK=function(A){return A.imul(this.k)},n(f,E),f.prototype.split=function(A,e){for(var t=4194303,r=Math.min(A.length,9),n=0;n>>22,i=o}i>>>=22,A.words[n-10]=i,0===i&&A.length>10?A.length-=10:A.length-=9},f.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var e=0,t=0;t>>=26,A.words[t]=n,e=r}return 0!==e&&(A.words[A.length++]=e),A},i._prime=function(A){if(h[A])return h[A];var e;if("k256"===A)e=new f;else if("p224"===A)e=new C;else if("p192"===A)e=new p;else{if("p25519"!==A)throw new Error("Unknown prime "+A);e=new m}return h[A]=e,e},y.prototype._verify1=function(A){r(0===A.negative,"red works only with positives"),r(A.red,"red works only with red numbers")},y.prototype._verify2=function(A,e){r(0==(A.negative|e.negative),"red works only with positives"),r(A.red&&A.red===e.red,"red works only with red numbers")},y.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):A.umod(this.m)._forceRed(this)},y.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},y.prototype.add=function(A,e){this._verify2(A,e);var t=A.add(e);return t.cmp(this.m)>=0&&t.isub(this.m),t._forceRed(this)},y.prototype.iadd=function(A,e){this._verify2(A,e);var t=A.iadd(e);return t.cmp(this.m)>=0&&t.isub(this.m),t},y.prototype.sub=function(A,e){this._verify2(A,e);var t=A.sub(e);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},y.prototype.isub=function(A,e){this._verify2(A,e);var t=A.isub(e);return t.cmpn(0)<0&&t.iadd(this.m),t},y.prototype.shl=function(A,e){return this._verify1(A),this.imod(A.ushln(e))},y.prototype.imul=function(A,e){return this._verify2(A,e),this.imod(A.imul(e))},y.prototype.mul=function(A,e){return this._verify2(A,e),this.imod(A.mul(e))},y.prototype.isqr=function(A){return this.imul(A,A.clone())},y.prototype.sqr=function(A){return this.mul(A,A)},y.prototype.sqrt=function(A){if(A.isZero())return A.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var t=this.m.add(new i(1)).iushrn(2);return this.pow(A,t)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);r(!n.isZero());var a=new i(1).toRed(this),s=a.redNeg(),u=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new i(2*g*g).toRed(this);0!==this.pow(g,u).cmp(s);)g.redIAdd(s);for(var c=this.pow(g,n),B=this.pow(A,n.addn(1).iushrn(1)),l=this.pow(A,n),Q=o;0!==l.cmp(a);){for(var I=l,d=0;0!==I.cmp(a);d++)I=I.redSqr();r(d=0;r--){for(var u=e.words[r],g=s-1;g>=0;g--){var c=u>>g&1;n!==t[0]&&(n=this.sqr(n)),0!==c||0!==o?(o<<=1,o|=c,(4==++a||0===r&&0===g)&&(n=this.mul(n,t[o]),a=0,o=0)):a=0}s=26}return n},y.prototype.convertTo=function(A){var e=A.umod(this.m);return e===A?e.clone():e},y.prototype.convertFrom=function(A){var e=A.clone();return e.red=null,e},i.mont=function(A){return new v(A)},n(v,y),v.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},v.prototype.convertFrom=function(A){var e=this.imod(A.mul(this.rinv));return e.red=null,e},v.prototype.imul=function(A,e){if(A.isZero()||e.isZero())return A.words[0]=0,A.length=1,A;var t=A.imul(e),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),i=n;return n.cmp(this.m)>=0?i=n.isub(this.m):n.cmpn(0)<0&&(i=n.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(A,e){if(A.isZero()||e.isZero())return new i(0)._forceRed(this);var t=A.mul(e),r=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=t.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},v.prototype.invm=function(A){return this.imod(A._invmp(this.m).mul(this.r2))._forceRed(this)}}(A=t.nmd(A),this)},6138:(A,e,t)=>{var r=t(980),n=t(9199),i=t(7859),o=t(2144),a=t(3663),s=t(3482),u=t(4818),g=t(9509).Buffer;A.exports=function(A,e,t){var c;c=A.padding?A.padding:t?1:4;var B,l=r(A),Q=l.modulus.byteLength();if(e.length>Q||new o(e).cmp(l.modulus)>=0)throw new Error("decryption error");B=t?u(new o(e),l):a(e,l);var I=g.alloc(Q-B.length);if(B=g.concat([I,B],Q),4===c)return function(A,e){var t=A.modulus.byteLength(),r=s("sha1").update(g.alloc(0)).digest(),o=r.length;if(0!==e[0])throw new Error("decryption error");var a=e.slice(1,o+1),u=e.slice(o+1),c=i(a,n(u,o)),B=i(u,n(c,t-o-1));if(function(A,e){A=g.from(A),e=g.from(e);var t=0,r=A.length;A.length!==e.length&&(t++,r=Math.min(A.length,e.length));for(var n=-1;++n=e.length){i++;break}var o=e.slice(2,n-1);if(("0002"!==r.toString("hex")&&!t||"0001"!==r.toString("hex")&&t)&&i++,o.length<8&&i++,i)throw new Error("decryption error");return e.slice(n)}(0,B,t);if(3===c)return B;throw new Error("unknown padding")}},6559:(A,e,t)=>{var r=t(980),n=t(1798),i=t(3482),o=t(9199),a=t(7859),s=t(2144),u=t(4818),g=t(3663),c=t(9509).Buffer;A.exports=function(A,e,t){var B;B=A.padding?A.padding:t?1:4;var l,Q=r(A);if(4===B)l=function(A,e){var t=A.modulus.byteLength(),r=e.length,u=i("sha1").update(c.alloc(0)).digest(),g=u.length,B=2*g;if(r>t-B-2)throw new Error("message too long");var l=c.alloc(t-r-B-2),Q=t-g-1,I=n(g),d=a(c.concat([u,l,c.alloc(1,1),e],Q),o(I,Q)),h=a(I,o(d,g));return new s(c.concat([c.alloc(1),h,d],t))}(Q,e);else if(1===B)l=function(A,e,t){var r,i=e.length,o=A.modulus.byteLength();if(i>o-11)throw new Error("message too long");return r=t?c.alloc(o-i-3,255):function(A){for(var e,t=c.allocUnsafe(A),r=0,i=n(2*A),o=0;r=0)throw new Error("data too long for modulus")}return t?g(l,Q):u(l,Q)}},4818:(A,e,t)=>{var r=t(2144),n=t(9509).Buffer;A.exports=function(A,e){return n.from(A.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed().toArray())}},7859:A=>{A.exports=function(A,e){for(var t=A.length,r=-1;++r{"use strict";var r=65536,n=t(9509).Buffer,i=t.g.crypto||t.g.msCrypto;i&&i.getRandomValues?A.exports=function(A,e){if(A>4294967295)throw new RangeError("requested too many random bytes");var t=n.allocUnsafe(A);if(A>0)if(A>r)for(var o=0;o{"use strict";function r(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var n=t(9509),i=t(1798),o=n.Buffer,a=n.kMaxLength,s=t.g.crypto||t.g.msCrypto,u=Math.pow(2,32)-1;function g(A,e){if("number"!=typeof A||A!=A)throw new TypeError("offset must be a number");if(A>u||A<0)throw new TypeError("offset must be a uint32");if(A>a||A>e)throw new RangeError("offset out of range")}function c(A,e,t){if("number"!=typeof A||A!=A)throw new TypeError("size must be a number");if(A>u||A<0)throw new TypeError("size must be a uint32");if(A+e>t||A>a)throw new RangeError("buffer too small")}function B(A,e,t,r){if(process.browser){var n=A.buffer,o=new Uint8Array(n,e,t);return s.getRandomValues(o),r?void process.nextTick((function(){r(null,A)})):A}if(!r)return i(t).copy(A,e),A;i(t,(function(t,n){if(t)return r(t);n.copy(A,e),r(null,A)}))}s&&s.getRandomValues||!process.browser?(e.randomFill=function(A,e,r,n){if(!(o.isBuffer(A)||A instanceof t.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)n=e,e=0,r=A.length;else if("function"==typeof r)n=r,r=A.length-e;else if("function"!=typeof n)throw new TypeError('"cb" argument must be a function');return g(e,A.length),c(r,e,A.length),B(A,e,r,n)},e.randomFillSync=function(A,e,r){if(void 0===e&&(e=0),!(o.isBuffer(A)||A instanceof t.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return g(e,A.length),void 0===r&&(r=A.length-e),c(r,e,A.length),B(A,e,r)}):(e.randomFill=r,e.randomFillSync=r)},3101:(A,e,t)=>{"use strict";var r=t(7294),n=t(7418),i=t(3840);function o(A){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+A,t=1;t