/*! For license information please see Crypto.js.LICENSE.txt */ (()=>{var t={53905(t,e,r){var n,i=r(65606),a="undefined"!=typeof self&&void 0!==self.Module?self.Module:{},s={};for(n in a)a.hasOwnProperty(n)&&(s[n]=a[n]);var o,u,h,c,l=[];o="object"==typeof window,u="function"==typeof importScripts,h="object"==typeof i&&"object"==typeof i.versions&&"string"==typeof i.versions.node,c=!o&&!h&&!u;var f,p,d,g,m,y="";h?(y=u?r(43627).dirname(y)+"/":"//",f=function(t,e){return g||(g=r(42789)),m||(m=r(43627)),t=m.normalize(t),g.readFileSync(t,e?null:"utf8")},d=function(t){var e=f(t,!0);return e.buffer||(e=new Uint8Array(e)),C(e.buffer),e},i.argv.length>1&&i.argv[1].replace(/\\/g,"/"),l=i.argv.slice(2),t.exports=a,i.on("uncaughtException",function(t){if(!(t instanceof Y))throw t}),i.on("unhandledRejection",H),a.inspect=function(){return"[Emscripten Module object]"}):c?("undefined"!=typeof read&&(f=function(t){return read(t)}),d=function(t){var e;return"function"==typeof readbuffer?new Uint8Array(readbuffer(t)):(C("object"==typeof(e=read(t,"binary"))),e)},"undefined"!=typeof scriptArgs?l=scriptArgs:void 0!==arguments&&(l=arguments),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)):(o||u)&&(u?y=self.location.href:"undefined"!=typeof document&&document.currentScript&&(y=document.currentScript.src),y=0!==y.indexOf("blob:")?y.substr(0,y.lastIndexOf("/")+1):"",f=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},u&&(d=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),p=function(t,e,r){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?e(n.response):r()},n.onerror=r,n.send(null)}),a.print||console.log.bind(console);var A,v,b=a.printErr||console.warn.bind(console);for(n in s)s.hasOwnProperty(n)&&(a[n]=s[n]);s=null,a.arguments&&(l=a.arguments),a.thisProgram&&a.thisProgram,a.quit&&a.quit,a.wasmBinary&&(A=a.wasmBinary),a.noExitRuntime,"object"!=typeof WebAssembly&&H("no native wasm support detected");var w=!1;function C(t,e){t||H("Assertion failed: "+e)}var E,S,I="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function B(t,e){return t%e>0&&(t+=e-t%e),t}function _(t){E=t,a.HEAP8=new Int8Array(t),a.HEAP16=new Int16Array(t),a.HEAP32=new Int32Array(t),a.HEAPU8=S=new Uint8Array(t),a.HEAPU16=new Uint16Array(t),a.HEAPU32=new Uint32Array(t),a.HEAPF32=new Float32Array(t),a.HEAPF64=new Float64Array(t)}a.INITIAL_MEMORY;var M,x=[],T=[],R=[];function F(t){x.unshift(t)}function D(t){R.unshift(t)}var k=0,L=null,N=null;function H(t){throw a.onAbort&&a.onAbort(t),b(t+=""),w=!0,t="abort("+t+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(t)}function P(t){return t.startsWith("data:application/octet-stream;base64,")}function U(t){return t.startsWith("file://")}a.preloadedImages={},a.preloadedAudios={};var O,Q="argon2.wasm";function j(t){try{if(t==Q&&A)return new Uint8Array(A);if(d)return d(t);throw"both async and sync fetching of the wasm failed"}catch(t){H(t)}}function K(t){for(;t.length>0;){var e=t.shift();if("function"!=typeof e){var r=e.func;"number"==typeof r?void 0===e.arg?M.get(r)():M.get(r)(e.arg):r(void 0===e.arg?null:e.arg)}else e(a)}}function G(t){try{return v.grow(t-E.byteLength+65535>>>16),_(v.buffer),1}catch(t){}}P(Q)||(O=Q,Q=a.locateFile?a.locateFile(O,y):y+O);var V,q={a:function(t,e,r){S.copyWithin(t,e,e+r)},b:function(t){var e=S.length,r=2147418112;if((t>>>=0)>r)return!1;for(var n=1;n<=4;n*=2){var i=e*(1+.2/n);if(i=Math.min(i,t+100663296),G(Math.min(r,B(Math.max(t,i),65536))))return!0}return!1}},W=(function(){var t={a:q};function e(t,e){var r,n=t.exports;a.asm=n,_((v=a.asm.c).buffer),M=a.asm.k,r=a.asm.d,T.unshift(r),function(){if(k--,a.monitorRunDependencies&&a.monitorRunDependencies(k),0==k&&(null!==L&&(clearInterval(L),L=null),N)){var t=N;N=null,t()}}()}function r(t){e(t.instance)}function n(e){return function(){if(!A&&(o||u)){if("function"==typeof fetch&&!U(Q))return fetch(Q,{credentials:"same-origin"}).then(function(t){if(!t.ok)throw"failed to load wasm binary file at '"+Q+"'";return t.arrayBuffer()}).catch(function(){return j(Q)});if(p)return new Promise(function(t,e){p(Q,function(e){t(new Uint8Array(e))},e)})}return Promise.resolve().then(function(){return j(Q)})}().then(function(e){return WebAssembly.instantiate(e,t)}).then(e,function(t){b("failed to asynchronously prepare wasm: "+t),H(t)})}if(k++,a.monitorRunDependencies&&a.monitorRunDependencies(k),a.instantiateWasm)try{return a.instantiateWasm(t,e)}catch(t){return b("Module.instantiateWasm callback failed with error: "+t),!1}A||"function"!=typeof WebAssembly.instantiateStreaming||P(Q)||U(Q)||"function"!=typeof fetch?n(r):fetch(Q,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,t).then(r,function(t){return b("wasm streaming compile failed: "+t),b("falling back to ArrayBuffer instantiation"),n(r)})})}(),a.___wasm_call_ctors=function(){return(a.___wasm_call_ctors=a.asm.d).apply(null,arguments)},a._argon2_hash=function(){return(a._argon2_hash=a.asm.e).apply(null,arguments)},a._malloc=function(){return(W=a._malloc=a.asm.f).apply(null,arguments)}),z=(a._free=function(){return(a._free=a.asm.g).apply(null,arguments)},a._argon2_verify=function(){return(a._argon2_verify=a.asm.h).apply(null,arguments)},a._argon2_error_message=function(){return(a._argon2_error_message=a.asm.i).apply(null,arguments)},a._argon2_encodedlen=function(){return(a._argon2_encodedlen=a.asm.j).apply(null,arguments)},a._argon2_hash_ext=function(){return(a._argon2_hash_ext=a.asm.l).apply(null,arguments)},a._argon2_verify_ext=function(){return(a._argon2_verify_ext=a.asm.m).apply(null,arguments)},a.stackAlloc=function(){return(z=a.stackAlloc=a.asm.n).apply(null,arguments)});function Y(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function J(t){function e(){V||(V=!0,a.calledRun=!0,w||(K(T),a.onRuntimeInitialized&&a.onRuntimeInitialized(),function(){if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)D(a.postRun.shift());K(R)}()))}t=t||l,k>0||(function(){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)F(a.preRun.shift());K(x)}(),k>0||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1),e()},1)):e()))}if(a.allocate=function(t,e){var r;return r=1==e?z(t.length):W(t.length),t.subarray||t.slice?S.set(t,r):S.set(new Uint8Array(t),r),r},a.UTF8ToString=function(t,e){return t?function(t,e,r){for(var n=e+r,i=e;t[i]&&!(i>=n);)++i;if(i-e>16&&t.subarray&&I)return I.decode(t.subarray(e,i));for(var a="";e>10,56320|1023&h)}}else a+=String.fromCharCode((31&s)<<6|o)}else a+=String.fromCharCode(s)}return a}(S,t,e):""},a.ALLOC_NORMAL=0,N=function t(){V||J(),V||(N=t)},a.run=J,a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();J(),t.exports=a,a.unloadRuntime=function(){"undefined"!=typeof self&&delete self.Module,a=v=M=E=S=void 0,delete t.exports}},46452(t,e,r){var n,i,a=r(48287).Buffer;"undefined"!=typeof self&&self,void 0===(i="function"==typeof(n=function(){const t="undefined"!=typeof self?self:this,e={Argon2d:0,Argon2i:1,Argon2id:2};function n(e){if(n._promise)return n._promise;if(n._module)return Promise.resolve(n._module);let a;return a=t.process&&t.process.versions&&t.process.versions.node?i().then(t=>new Promise(e=>{t.postRun=()=>e(t)})):(t.loadArgon2WasmBinary?t.loadArgon2WasmBinary():Promise.resolve(r(56104)).then(t=>function(t){const e=atob(t),r=new Uint8Array(new ArrayBuffer(e.length));for(let t=0;tfunction(e,r){return new Promise(n=>(t.Module={wasmBinary:e,wasmMemory:r,postRun(){n(Module)}},i()))}(r,e?function(t){const e=1024,r=64*e,n=(1024*e*1024*2-64*e)/r,i=Math.min(Math.max(Math.ceil(t*e/r),256)+256,n);return new WebAssembly.Memory({initial:i,maximum:n})}(e):void 0)),n._promise=a,a.then(t=>(n._module=t,delete n._promise,t))}function i(){return t.loadArgon2WasmModule?t.loadArgon2WasmModule():Promise.resolve(r(53905))}function s(t,e){return t.allocate(e,"i8",t.ALLOC_NORMAL)}function o(t,e){return s(t,new Uint8Array([...e,0]))}function u(t){if("string"!=typeof t)return t;if("function"==typeof TextEncoder)return(new TextEncoder).encode(t);if("function"==typeof a)return a.from(t);throw new Error("Don't know how to encode UTF8")}return{ArgonType:e,hash:function(t){const r=t.mem||1024;return n(r).then(n=>{const i=t.time||1,a=t.parallelism||1,h=u(t.pass),c=o(n,h),l=h.length,f=u(t.salt),p=o(n,f),d=f.length,g=t.type||e.Argon2d,m=n.allocate(new Array(t.hashLen||24),"i8",n.ALLOC_NORMAL),y=t.secret?s(n,t.secret):0,A=t.secret?t.secret.byteLength:0,v=t.ad?s(n,t.ad):0,b=t.ad?t.ad.byteLength:0,w=t.hashLen||24,C=n._argon2_encodedlen(i,r,a,d,w,g),E=n.allocate(new Array(C+1),"i8",n.ALLOC_NORMAL);let S,I,B;try{I=n._argon2_hash_ext(i,r,a,c,l,p,d,m,w,E,C,g,y,A,v,b,19)}catch(t){S=t}if(0!==I||S){try{S||(S=n.UTF8ToString(n._argon2_error_message(I)))}catch(t){}B={message:S,code:I}}else{let t="";const e=new Uint8Array(w);for(let r=0;r{const n=u(t.pass),i=o(r,n),a=n.length,h=t.secret?s(r,t.secret):0,c=t.secret?t.secret.byteLength:0,l=t.ad?s(r,t.ad):0,f=t.ad?t.ad.byteLength:0,p=o(r,u(t.encoded));let d,g,m,y=t.type;if(void 0===y){let r=t.encoded.split("$")[1];r&&(r=r.replace("a","A"),y=e[r]||e.Argon2d)}try{g=r._argon2_verify_ext(p,i,a,h,c,l,f,y)}catch(t){d=t}if(g||d){try{d||(d=r.UTF8ToString(r._argon2_error_message(g)))}catch(t){}m={message:d,code:g}}try{r._free(i),r._free(p)}catch(t){}if(d)throw m;return m})},unloadRuntime:function(){n._module&&(n._module.unloadRuntime(),delete n._promise,delete n._module)}}})?n.apply(e,[]):n)||(t.exports=i)},87568(t,e,r){var n=e;n.bignum=r(72344),n.define=r(47363).define,n.base=r(9673),n.constants=r(22153),n.decoders=r(22853),n.encoders=r(24669)},47363(t,e,r){var n=r(87568),i=r(56698);function a(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new a(t,e)},a.prototype._createNamed=function(t){var e;try{e=r(18950).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){e=function(t){this._initNamed(t)}}return i(e,t),e.prototype._initNamed=function(e){t.call(this,e)},new e(this)},a.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(n.decoders[t])),this.decoders[t]},a.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},a.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(n.encoders[t])),this.encoders[t]},a.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},47227(t,e,r){var n=r(56698),i=r(9673).Reporter,a=r(48287).Buffer;function s(t,e){i.call(this,e),a.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function o(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(t){return t instanceof o||(t=new o(t,e)),this.length+=t.length,t},this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=a.byteLength(t);else{if(!a.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}n(s,i),e.t=s,s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(t){var e=new s(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),e},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},s.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},s.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.d=o,o.prototype.join=function(t,e){return t||(t=new a(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(r){r.join(t,e),e+=r.length}):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):a.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},9673(t,e,r){var n=e;n.Reporter=r(89220).a,n.DecoderBuffer=r(47227).t,n.EncoderBuffer=r(47227).d,n.Node=r(90993)},90993(t,e,r){var n=r(9673).Reporter,i=r(9673).EncoderBuffer,a=r(9673).DecoderBuffer,s=r(43349),o=["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"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(o);function h(t,e){var r={};this._baseState=r,r.enc=t,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())}t.exports=h;var c=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];h.prototype.clone=function(){var t=this._baseState,e={};c.forEach(function(r){e[r]=t[r]});var r=new this.constructor(e.parent);return r._baseState=e,r},h.prototype._wrap=function(){var t=this._baseState;u.forEach(function(e){this[e]=function(){var r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}},this)},h.prototype._init=function(t){var e=this._baseState;s(null===e.parent),t.call(this),e.children=e.children.filter(function(t){return t._baseState.parent===this},this),s.equal(e.children.length,1,"Root node can have only one child")},h.prototype._useArgs=function(t){var e=this._baseState,r=t.filter(function(t){return t instanceof this.constructor},this);t=t.filter(function(t){return!(t instanceof this.constructor)},this),0!==r.length&&(s(null===e.children),e.children=r,r.forEach(function(t){t._baseState.parent=this},this)),0!==t.length&&(s(null===e.args),e.args=t,e.reverseArgs=t.map(function(t){if("object"!=typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach(function(r){r==(0|r)&&(r|=0);var n=t[r];e[n]=r}),e}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(t){h.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}}),o.forEach(function(t){h.prototype[t]=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===e.tag),e.tag=t,this._useArgs(r),this}}),h.prototype.use=function(t){s(t);var e=this._baseState;return s(null===e.use),e.use=t,this},h.prototype.optional=function(){return this._baseState.optional=!0,this},h.prototype.def=function(t){var e=this._baseState;return s(null===e.default),e.default=t,e.optional=!0,this},h.prototype.explicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.explicit=t,this},h.prototype.implicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.implicit=t,this},h.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},h.prototype.key=function(t){var e=this._baseState;return s(null===e.key),e.key=t,this},h.prototype.any=function(){return this._baseState.any=!0,this},h.prototype.choice=function(t){var e=this._baseState;return s(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map(function(e){return t[e]})),this},h.prototype.contains=function(t){var e=this._baseState;return s(null===e.use),e.contains=t,this},h.prototype._decode=function(t,e){var r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));var n,i=r.default,s=!0,o=null;if(null!==r.key&&(o=t.enterKey(r.key)),r.optional){var u=null;if(null!==r.explicit?u=r.explicit:null!==r.implicit?u=r.implicit:null!==r.tag&&(u=r.tag),null!==u||r.any){if(s=this._peekTag(t,u,r.any),t.isError(s))return s}else{var h=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),s=!0}catch(t){s=!1}t.restore(h)}}if(r.obj&&s&&(n=t.enterObject()),s){if(null!==r.explicit){var c=this._decodeTag(t,r.explicit);if(t.isError(c))return c;t=c}var l=t.offset;if(null===r.use&&null===r.choice){r.any&&(h=t.save());var f=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(f))return f;r.any?i=t.raw(h):t=f}if(e&&e.track&&null!==r.tag&&e.track(t.path(),l,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e)),t.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(t,e)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var p=new a(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(p,e)}}return r.obj&&s&&(i=t.leaveObject(n)),null===r.key||null===i&&!0!==s?null!==o&&t.exitKey(o):t.leaveKey(o,r.key,i),i},h.prototype._decodeGeneric=function(t,e,r){var n=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},h.prototype._getUse=function(t,e){var r=this._baseState;return r.useDecoder=this._use(t,e),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},h.prototype._decodeChoice=function(t,e){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some(function(a){var s=t.save(),o=r.choice[a];try{var u=o._decode(t,e);if(t.isError(u))return!1;n={type:a,value:u},i=!0}catch(e){return t.restore(s),!1}return!0},this),i?n:t.error("Choice not matched")},h.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},h.prototype._encode=function(t,e,r){var n=this._baseState;if(null===n.default||n.default!==t){var i=this._encodeValue(t,e,r);if(void 0!==i&&!this._skipDefault(i,e,r))return i}},h.prototype._encodeValue=function(t,e,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new n);var a=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}var s=null,o=!1;if(i.any)a=this._createEncoderBuffer(t);else if(i.choice)a=this._encodeChoice(t,e);else if(i.contains)s=this._getUse(i.contains,r)._encode(t,e),o=!0;else if(i.children)s=i.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");var n=e.enterKey(r._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");var i=r._encode(t[r._baseState.key],e,t);return e.leaveKey(n),i},this).filter(function(t){return t}),s=this._createEncoderBuffer(s);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,s=this._createEncoderBuffer(t.map(function(r){var n=this._baseState;return this._getUse(n.args[0],t)._encode(r,e)},u))}else null!==i.use?a=this._getUse(i.use,r)._encode(t,e):(s=this._encodePrimitive(i.tag,t),o=!0);if(!i.any&&null===i.choice){var h=null!==i.implicit?i.implicit:i.tag,c=null===i.implicit?"universal":"context";null===h?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(a=this._encodeComposite(h,o,c,s))}return null!==i.explicit&&(a=this._encodeComposite(i.explicit,!1,"context",a)),a},h.prototype._encodeChoice=function(t,e){var r=this._baseState,n=r.choice[t.type];return n||s(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(t.value,e)},h.prototype._encodePrimitive=function(t,e){var r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},h.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},h.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}},89220(t,e,r){var n=r(56698);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function a(t,e){this.path=t,this.rethrow(e)}e.a=i,i.prototype.isError=function(t){return t instanceof a},i.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,r){var n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){var e=this._reporterState,r=e.obj;return e.obj=t,r},i.prototype.error=function(t){var e,r=this._reporterState,n=t instanceof a;if(e=n?t:new a(r.path.map(function(t){return"["+JSON.stringify(t)+"]"}).join(""),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},i.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},n(a,Error),a.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},74598(t,e,r){var n=r(22153);e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=n._reverse(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=n._reverse(e.tag)},22153(t,e,r){var n=e;n._reverse=function(t){var e={};return Object.keys(t).forEach(function(r){(0|r)==r&&(r|=0);var n=t[r];e[n]=r}),e},n.der=r(74598)},62010(t,e,r){var n=r(56698),i=r(87568),a=i.base,s=i.bignum,o=i.constants.der;function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new h,this.tree._init(t.body)}function h(t){a.Node.call(this,"der",t)}function c(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var n=o.tagClass[r>>6],i=!(32&r);if(31&~r)r&=31;else{var a=r;for(r=0;!(128&~a);){if(a=t.readUInt8(e),t.isError(a))return a;r<<=7,r|=127&a}}return{cls:n,primitive:i,tag:r,tagStr:o.tag[r]}}function l(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(!(128&n))return n;var i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(var a=0;a=31?n.error("Multi-octet tag encoding unsupported"):(e||(i|=32),i|=o.tagClassByName[r||"universal"]<<6)}(t,e,r,this.reporter);if(n.length<128)return(a=new i(2))[0]=s,a[1]=n.length,this._createEncoderBuffer([a,n]);for(var u=1,h=n.length;h>=256;h>>=8)u++;(a=new i(2+u))[0]=s,a[1]=128|u,h=1+u;for(var c=n.length;c>0;h--,c>>=8)a[h]=255&c;return this._createEncoderBuffer([a,n])},h.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=new i(2*t.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var a=0;for(n=0;n=128;s>>=7)a++}var o=new i(a),u=o.length-1;for(n=t.length-1;n>=0;n--)for(s=t[n],o[u--]=127&s;(s>>=7)>0;)o[u--]=128|127&s;return this._createEncoderBuffer(o)},h.prototype._encodeTime=function(t,e){var r,n=new Date(t);return"gentime"===e?r=[c(n.getFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[c(n.getFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},h.prototype._encodeNull=function(){return this._createEncoderBuffer("")},h.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!i.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=new i(r)}if(i.isBuffer(t)){var n=t.length;0===t.length&&n++;var a=new i(n);return t.copy(a),0===t.length&&(a[0]=0),this._createEncoderBuffer(a)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);n=1;for(var s=t;s>=256;s>>=8)n++;for(s=(a=new Array(n)).length-1;s>=0;s--)a[s]=255&t,t>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(new i(a))},h.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},h.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},h.prototype._skipDefault=function(t,e,r){var n,i=this._baseState;if(null===i.default)return!1;var a=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),a.length!==i.defaultBuffer.length)return!1;for(n=0;n=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=o(t,r);return r-1>=e&&(n|=o(t,r-1)<<4),n}function h(t,e,r,n){for(var i=0,a=Math.min(t.length,r),s=e;s=49?o-49+10:o>=17?o-17+10:o}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,s=a%n,o=Math.min(a,a-s)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var c=["","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],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],s=i*a,o=67108863&s,u=s/67108864|0;r.words[0]=o;for(var h=1;h>>26,l=67108863&u,f=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);p<=f;p++){var d=h-p|0;c+=(s=(i=0|t.words[d])*(a=0|e.words[p])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,a=0,s=0;s>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?c[6-u.length]+u+r:u+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],p=f[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var s,o,u="le"===e,h=new t(a),c=this.clone();if(u){for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),h[o]=s;for(;o=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var a=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==a&&s>26,this.words[s]=67108863&e;if(0===a&&s>>13,p=0|s[1],d=8191&p,g=p>>>13,m=0|s[2],y=8191&m,A=m>>>13,v=0|s[3],b=8191&v,w=v>>>13,C=0|s[4],E=8191&C,S=C>>>13,I=0|s[5],B=8191&I,_=I>>>13,M=0|s[6],x=8191&M,T=M>>>13,R=0|s[7],F=8191&R,D=R>>>13,k=0|s[8],L=8191&k,N=k>>>13,H=0|s[9],P=8191&H,U=H>>>13,O=0|o[0],Q=8191&O,j=O>>>13,K=0|o[1],G=8191&K,V=K>>>13,q=0|o[2],W=8191&q,z=q>>>13,Y=0|o[3],J=8191&Y,X=Y>>>13,Z=0|o[4],$=8191&Z,tt=Z>>>13,et=0|o[5],rt=8191&et,nt=et>>>13,it=0|o[6],at=8191&it,st=it>>>13,ot=0|o[7],ut=8191&ot,ht=ot>>>13,ct=0|o[8],lt=8191&ct,ft=ct>>>13,pt=0|o[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(h+(n=Math.imul(l,Q))|0)+((8191&(i=(i=Math.imul(l,j))+Math.imul(f,Q)|0))<<13)|0;h=((a=Math.imul(f,j))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(d,Q),i=(i=Math.imul(d,j))+Math.imul(g,Q)|0,a=Math.imul(g,j);var yt=(h+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(f,G)|0))<<13)|0;h=((a=a+Math.imul(f,V)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,j))+Math.imul(A,Q)|0,a=Math.imul(A,j),n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(g,G)|0,a=a+Math.imul(g,V)|0;var At=(h+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,z)|0)+Math.imul(f,W)|0))<<13)|0;h=((a=a+Math.imul(f,z)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(b,Q),i=(i=Math.imul(b,j))+Math.imul(w,Q)|0,a=Math.imul(w,j),n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,V)|0)+Math.imul(A,G)|0,a=a+Math.imul(A,V)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,z)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,z)|0;var vt=(h+(n=n+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(f,J)|0))<<13)|0;h=((a=a+Math.imul(f,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,j))+Math.imul(S,Q)|0,a=Math.imul(S,j),n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,V)|0)+Math.imul(w,G)|0,a=a+Math.imul(w,V)|0,n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,z)|0)+Math.imul(A,W)|0,a=a+Math.imul(A,z)|0,n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,X)|0;var bt=(h+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(f,$)|0))<<13)|0;h=((a=a+Math.imul(f,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,j))+Math.imul(_,Q)|0,a=Math.imul(_,j),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(S,G)|0,a=a+Math.imul(S,V)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,z)|0)+Math.imul(w,W)|0,a=a+Math.imul(w,z)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(A,J)|0,a=a+Math.imul(A,X)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,$)|0,a=a+Math.imul(g,tt)|0;var wt=(h+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(f,rt)|0))<<13)|0;h=((a=a+Math.imul(f,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,j))+Math.imul(T,Q)|0,a=Math.imul(T,j),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,V)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,z)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,z)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(w,J)|0,a=a+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,a=a+Math.imul(g,nt)|0;var Ct=(h+(n=n+Math.imul(l,at)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(f,at)|0))<<13)|0;h=((a=a+Math.imul(f,st)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,j))+Math.imul(D,Q)|0,a=Math.imul(D,j),n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(T,G)|0,a=a+Math.imul(T,V)|0,n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,z)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,z)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(A,rt)|0,a=a+Math.imul(A,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,st)|0;var Et=(h+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(f,ut)|0))<<13)|0;h=((a=a+Math.imul(f,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,j))+Math.imul(N,Q)|0,a=Math.imul(N,j),n=n+Math.imul(F,G)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(D,G)|0,a=a+Math.imul(D,V)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,z)|0)+Math.imul(T,W)|0,a=a+Math.imul(T,z)|0,n=n+Math.imul(B,J)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(w,rt)|0,a=a+Math.imul(w,nt)|0,n=n+Math.imul(y,at)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(A,at)|0,a=a+Math.imul(A,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(g,ut)|0,a=a+Math.imul(g,ht)|0;var St=(h+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ft)|0)+Math.imul(f,lt)|0))<<13)|0;h=((a=a+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(P,Q),i=(i=Math.imul(P,j))+Math.imul(U,Q)|0,a=Math.imul(U,j),n=n+Math.imul(L,G)|0,i=(i=i+Math.imul(L,V)|0)+Math.imul(N,G)|0,a=a+Math.imul(N,V)|0,n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,z)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,z)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(T,J)|0,a=a+Math.imul(T,X)|0,n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(w,at)|0,a=a+Math.imul(w,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(A,ut)|0,a=a+Math.imul(A,ht)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(g,lt)|0,a=a+Math.imul(g,ft)|0;var It=(h+(n=n+Math.imul(l,dt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(f,dt)|0))<<13)|0;h=((a=a+Math.imul(f,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(P,G),i=(i=Math.imul(P,V))+Math.imul(U,G)|0,a=Math.imul(U,V),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,z)|0)+Math.imul(N,W)|0,a=a+Math.imul(N,z)|0,n=n+Math.imul(F,J)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(E,at)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,st)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(w,ut)|0,a=a+Math.imul(w,ht)|0,n=n+Math.imul(y,lt)|0,i=(i=i+Math.imul(y,ft)|0)+Math.imul(A,lt)|0,a=a+Math.imul(A,ft)|0;var Bt=(h+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;h=((a=a+Math.imul(g,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(P,W),i=(i=Math.imul(P,z))+Math.imul(U,W)|0,a=Math.imul(U,z),n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,J)|0,a=a+Math.imul(N,X)|0,n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,nt)|0,n=n+Math.imul(B,at)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(S,ut)|0,a=a+Math.imul(S,ht)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(w,lt)|0,a=a+Math.imul(w,ft)|0;var _t=(h+(n=n+Math.imul(y,dt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(A,dt)|0))<<13)|0;h=((a=a+Math.imul(A,gt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(P,J),i=(i=Math.imul(P,X))+Math.imul(U,J)|0,a=Math.imul(U,X),n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,$)|0,a=a+Math.imul(N,tt)|0,n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(D,rt)|0,a=a+Math.imul(D,nt)|0,n=n+Math.imul(x,at)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(_,ut)|0,a=a+Math.imul(_,ht)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ft)|0;var Mt=(h+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(w,dt)|0))<<13)|0;h=((a=a+Math.imul(w,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(P,$),i=(i=Math.imul(P,tt))+Math.imul(U,$)|0,a=Math.imul(U,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,a=a+Math.imul(N,nt)|0,n=n+Math.imul(F,at)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(T,ut)|0,a=a+Math.imul(T,ht)|0,n=n+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,ft)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ft)|0;var xt=(h+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(S,dt)|0))<<13)|0;h=((a=a+Math.imul(S,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(P,rt),i=(i=Math.imul(P,nt))+Math.imul(U,rt)|0,a=Math.imul(U,nt),n=n+Math.imul(L,at)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(N,at)|0,a=a+Math.imul(N,st)|0,n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ht)|0)+Math.imul(D,ut)|0,a=a+Math.imul(D,ht)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ft)|0;var Tt=(h+(n=n+Math.imul(B,dt)|0)|0)+((8191&(i=(i=i+Math.imul(B,gt)|0)+Math.imul(_,dt)|0))<<13)|0;h=((a=a+Math.imul(_,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(P,at),i=(i=Math.imul(P,st))+Math.imul(U,at)|0,a=Math.imul(U,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,ut)|0,a=a+Math.imul(N,ht)|0,n=n+Math.imul(F,lt)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(D,lt)|0,a=a+Math.imul(D,ft)|0;var Rt=(h+(n=n+Math.imul(x,dt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(T,dt)|0))<<13)|0;h=((a=a+Math.imul(T,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(P,ut),i=(i=Math.imul(P,ht))+Math.imul(U,ut)|0,a=Math.imul(U,ht),n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ft)|0)+Math.imul(N,lt)|0,a=a+Math.imul(N,ft)|0;var Ft=(h+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,gt)|0)+Math.imul(D,dt)|0))<<13)|0;h=((a=a+Math.imul(D,gt)|0)+(i>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,n=Math.imul(P,lt),i=(i=Math.imul(P,ft))+Math.imul(U,lt)|0,a=Math.imul(U,ft);var Dt=(h+(n=n+Math.imul(L,dt)|0)|0)+((8191&(i=(i=i+Math.imul(L,gt)|0)+Math.imul(N,dt)|0))<<13)|0;h=((a=a+Math.imul(N,gt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var kt=(h+(n=Math.imul(P,dt))|0)+((8191&(i=(i=Math.imul(P,gt))+Math.imul(U,dt)|0))<<13)|0;return h=((a=Math.imul(U,gt))+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,u[0]=mt,u[1]=yt,u[2]=At,u[3]=vt,u[4]=bt,u[5]=wt,u[6]=Ct,u[7]=Et,u[8]=St,u[9]=It,u[10]=Bt,u[11]=_t,u[12]=Mt,u[13]=xt,u[14]=Tt,u[15]=Rt,u[16]=Ft,u[17]=Dt,u[18]=kt,0!==h&&(u[19]=h,r.length++),r};function g(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=p),a.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?p(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,s&=67108863}r.words[a]=o,n=s,s=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):g(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},m.prototype.permute=function(t,e,r,n,i,a){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this.length=0===t?1:this.length,this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,h=0;h=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-a|l>>>a,c=l&o}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=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},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===o)return this.strip();for(n(-1===o),o=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var o,u=n.length-i.length;if("mod"!==e){(o=new a(null)).length=u+1,o.words=new Array(o.length);for(var h=0;h=0;l--){var f=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,l);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);o&&(o.words[l]=f)}return o&&o.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:o||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(i=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(i=o.div.neg()),{div:i,mod:o.mod}):0!==(this.negative&t.negative)?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),s=new a(0),o=new a(0),u=new a(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),l=e.clone();!e.isZero();){for(var f=0,p=1;0===(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0===(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(c),u.isub(l)),o.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(o),s.isub(u)):(r.isub(e),o.isub(i),u.isub(s))}return{a:o,b:u,gcd:r.iushln(h)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new a(1),o=new a(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0===(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,f=1;0===(r.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(i=0===e.cmpn(1)?s:o).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new E(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function A(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}A.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},A.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(t,e){t.iushrn(this.n,0,e)},A.prototype.imulK=function(t){return t.imul(this.k)},i(v,A),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,a=s}a>>>=22,t.words[i-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new b;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new C}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var o=new a(1).toRed(this),u=o.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(o);){for(var g=p,m=0;0!==g.cmp(o);m++)g=g.redSqr();n(m=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var l=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++o||0===n&&0===c)&&(i=this.mul(i,r[s]),o=0,s=0)):o=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new S(t)},i(S,E),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},67526(t,e){"use strict";e.byteLength=function(t){var e=o(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,a=o(t),s=a[0],u=a[1],h=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,u)),c=0,l=u>0?s-4:s;for(r=0;r>16&255,h[c++]=e>>8&255,h[c++]=255&e;return 2===u&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,h[c++]=255&e),1===u&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,h[c++]=e>>8&255,h[c++]=255&e),h},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,a=[],s=16383,o=0,u=n-i;ou?u:o+s));return 1===i?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=a[s],n[a.charCodeAt(s)]=s;function o(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function h(t,e,r){for(var n,i=[],a=e;a31&&(t=31);var r=[];return r.push("$2a$"),t<10&&r.push("0"),r.push(t.toString()),r.push("$"),r.push(l(i(d),d)),r.join("")},e.genSalt=function(t,r,n){if("function"==typeof r&&(n=r,r=void 0),"function"==typeof t&&(n=t,t=void 0),void 0===t)t=g;else if("number"!=typeof t)throw Error("illegal arguments: "+typeof t);function i(r){o(function(){try{r(null,e.genSaltSync(t))}catch(t){r(t)}})}if(!n)return new Promise(function(t,e){i(function(r,n){r?e(r):t(n)})});if("function"!=typeof n)throw Error("Illegal callback: "+typeof n);i(n)},e.hashSync=function(t,r){if(void 0===r&&(r=g),"number"==typeof r&&(r=e.genSaltSync(r)),"string"!=typeof t||"string"!=typeof r)throw Error("Illegal arguments: "+typeof t+", "+typeof r);return I(t,r)},e.hash=function(t,r,n,i){function a(n){"string"==typeof t&&"number"==typeof r?e.genSalt(r,function(e,r){I(t,r,n,i)}):"string"==typeof t&&"string"==typeof r?I(t,r,n,i):o(n.bind(this,Error("Illegal arguments: "+typeof t+", "+typeof r)))}if(!n)return new Promise(function(t,e){a(function(r,n){r?e(r):t(n)})});if("function"!=typeof n)throw Error("Illegal callback: "+typeof n);a(n)},e.compareSync=function(t,r){if("string"!=typeof t||"string"!=typeof r)throw Error("Illegal arguments: "+typeof t+", "+typeof r);return 60===r.length&&s(e.hashSync(t,r.substr(0,r.length-31)),r)},e.compare=function(t,r,n,i){function a(n){"string"==typeof t&&"string"==typeof r?60===r.length?e.hash(t,r.substr(0,29),function(t,e){t?n(t):n(null,s(e,r))},i):o(n.bind(this,null,!1)):o(n.bind(this,Error("Illegal arguments: "+typeof t+", "+typeof r)))}if(!n)return new Promise(function(t,e){a(function(r,n){r?e(r):t(n)})});if("function"!=typeof n)throw Error("Illegal callback: "+typeof n);a(n)},e.getRounds=function(t){if("string"!=typeof t)throw Error("Illegal arguments: "+typeof t);return parseInt(t.split("$")[2],10)},e.getSalt=function(t){if("string"!=typeof t)throw Error("Illegal arguments: "+typeof t);if(60!==t.length)throw Error("Illegal hash length: "+t.length+" != 60");return t.substring(0,29)};var o=void 0!==a&&a&&"function"==typeof a.nextTick?"function"==typeof setImmediate?setImmediate:a.nextTick:setTimeout;var u="./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),h=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,54,55,56,57,58,59,60,61,62,63,-1,-1,-1,-1,-1,-1,-1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,-1,-1,-1,-1,-1,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,-1,-1,-1,-1,-1],c=String.fromCharCode;function l(t,e){var r,n,i=0,a=[];if(e<=0||e>t.length)throw Error("Illegal len: "+e);for(;i>2&63]),r=(3&r)<<4,i>=e){a.push(u[63&r]);break}if(r|=(n=255&t[i++])>>4&15,a.push(u[63&r]),r=(15&n)<<2,i>=e){a.push(u[63&r]);break}r|=(n=255&t[i++])>>6&3,a.push(u[63&r]),a.push(u[63&n])}return a.join("")}function f(t,e){var r,n,i,a,s,o=0,u=t.length,l=0,f=[];if(e<=0)throw Error("Illegal len: "+e);for(;o>>0,a|=(48&n)>>4,f.push(c(a)),!(++l>=e||o>=u))&&-1!=(i=(s=t.charCodeAt(o++))>>0,a|=(60&i)>>2,f.push(c(a)),!(++l>=e||o>=u));)a=(3&i)<<6>>>0,a|=(s=t.charCodeAt(o++))>6&31|192),e(63&r|128)):r<65536?(e(r>>12&15|224),e(r>>6&63|128),e(63&r|128)):(e(r>>18&7|240),e(r>>12&63|128),e(r>>6&63|128),e(63&r|128)),r=null},decodeUTF8:function(t,e){for(var r,n,i,a,s=function(t){t=t.slice(0,t.indexOf(null));var e=Error(t.toString());throw e.name="TruncatedError",e.bytes=t,e};null!==(r=t());)if(128&r)if(192==(224&r))null===(n=t())&&s([r,n]),e((31&r)<<6|63&n);else if(224==(240&r))(null===(n=t())||null===(i=t()))&&s([r,n,i]),e((15&r)<<12|(63&n)<<6|63&i);else{if(240!=(248&r))throw RangeError("Illegal starting byte: "+r);(null===(n=t())||null===(i=t())||null===(a=t()))&&s([r,n,i,a]),e((7&r)<<18|(63&n)<<12|(63&i)<<6|63&a)}else e(r)},UTF16toUTF8:function(t,e){for(var r,n=null;null!==(r=null!==n?n:t());)r>=55296&&r<=57343&&null!==(n=t())&&n>=56320&&n<=57343?(e(1024*(r-55296)+n-56320+65536),n=null):e(r);null!==n&&e(n)},UTF8toUTF16:function(t,e){var r=null;for("number"==typeof t&&(r=t,t=function(){return null});null!==r||null!==(r=t());)r<=65535?e(r):(e(55296+((r-=65536)>>10)),e(r%1024+56320)),r=null},encodeUTF16toUTF8:function(e,r){t.UTF16toUTF8(e,function(e){t.encodeUTF8(e,r)})},decodeUTF8toUTF16:function(e,r){t.decodeUTF8(e,function(e){t.UTF8toUTF16(e,r)})},calculateCodePoint:function(t){return t<128?1:t<2048?2:t<65536?3:4},calculateUTF8:function(e){for(var r,n=0;null!==(r=e());)n+=t.calculateCodePoint(r);return n},calculateUTF16asUTF8:function(e){var r=0,n=0;return t.UTF16toUTF8(e,function(e){++r,n+=t.calculateCodePoint(e)}),[r,n]}};return t}();Date.now=Date.now||function(){return+new Date};var d=16,g=10,m=16,y=100,A=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],v=[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946,1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055,3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504,976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462],b=[1332899944,1700884034,1701343084,1684370003,1668446532,1869963892];function w(t,e,r,n){var i,a=t[e],s=t[e+1];return i=n[(a^=r[0])>>>24],i+=n[256|a>>16&255],i^=n[512|a>>8&255],i=n[(s^=(i+=n[768|255&a])^r[1])>>>24],i+=n[256|s>>16&255],i^=n[512|s>>8&255],i=n[(a^=(i+=n[768|255&s])^r[2])>>>24],i+=n[256|a>>16&255],i^=n[512|a>>8&255],i=n[(s^=(i+=n[768|255&a])^r[3])>>>24],i+=n[256|s>>16&255],i^=n[512|s>>8&255],i=n[(a^=(i+=n[768|255&s])^r[4])>>>24],i+=n[256|a>>16&255],i^=n[512|a>>8&255],i=n[(s^=(i+=n[768|255&a])^r[5])>>>24],i+=n[256|s>>16&255],i^=n[512|s>>8&255],i=n[(a^=(i+=n[768|255&s])^r[6])>>>24],i+=n[256|a>>16&255],i^=n[512|a>>8&255],i=n[(s^=(i+=n[768|255&a])^r[7])>>>24],i+=n[256|s>>16&255],i^=n[512|s>>8&255],i=n[(a^=(i+=n[768|255&s])^r[8])>>>24],i+=n[256|a>>16&255],i^=n[512|a>>8&255],i=n[(s^=(i+=n[768|255&a])^r[9])>>>24],i+=n[256|s>>16&255],i^=n[512|s>>8&255],i=n[(a^=(i+=n[768|255&s])^r[10])>>>24],i+=n[256|a>>16&255],i^=n[512|a>>8&255],i=n[(s^=(i+=n[768|255&a])^r[11])>>>24],i+=n[256|s>>16&255],i^=n[512|s>>8&255],i=n[(a^=(i+=n[768|255&s])^r[12])>>>24],i+=n[256|a>>16&255],i^=n[512|a>>8&255],i=n[(s^=(i+=n[768|255&a])^r[13])>>>24],i+=n[256|s>>16&255],i^=n[512|s>>8&255],i=n[(a^=(i+=n[768|255&s])^r[14])>>>24],i+=n[256|a>>16&255],i^=n[512|a>>8&255],i=n[(s^=(i+=n[768|255&a])^r[15])>>>24],i+=n[256|s>>16&255],i^=n[512|s>>8&255],a^=(i+=n[768|255&s])^r[16],t[e]=s^r[m+1],t[e+1]=a,t}function C(t,e){for(var r=0,n=0;r<4;++r)n=n<<8|255&t[e],e=(e+1)%t.length;return{key:n,offp:e}}function E(t,e,r){for(var n,i=0,a=[0,0],s=e.length,o=r.length,u=0;u31){if(a=Error("Illegal number of rounds (4-31): "+r),n)return void o(n.bind(this,a));throw a}if(e.length!==d){if(a=Error("Illegal salt length: "+e.length+" != "+d),n)return void o(n.bind(this,a));throw a}r=1<>>0;var h,c,l,f=0;function p(){if(i&&i(f/r),!(f>1;l++)w(s,l<<1,h,c);var a=[];for(f=0;f>24&255)>>>0),a.push((s[f]>>16&255)>>>0),a.push((s[f]>>8&255)>>>0),a.push((255&s[f])>>>0);return n?void n(null,a):a}for(var d=Date.now();fy)););n&&o(p)}if(Int32Array?(h=new Int32Array(A),c=new Int32Array(v)):(h=A.slice(),c=v.slice()),function(t,e,r,n){for(var i,a=0,s=[0,0],o=r.length,u=n.length,h=0;h"$"){if(i=Error("Missing salt rounds"),r)return void o(r.bind(this,i));throw i}var u,h,c,g=10*parseInt(e.substring(s,s+1),10)+parseInt(e.substring(s+1,s+2),10),m=e.substring(s+3,s+25),y=(u=t+=a>="a"?"\0":"",h=[],c=0,p.encodeUTF16toUTF8(function(){return c>=u.length?null:u.charCodeAt(c++)},function(t){h.push(t)}),h),A=f(m,d);function v(t){var e=[];return e.push("$2"),a>="a"&&e.push(a),e.push("$"),g<10&&e.push("0"),e.push(g.toString()),e.push("$"),e.push(l(A,A.length)),e.push(l(t,4*b.length-1)),e.join("")}if(void 0===r)return v(S(y,A,g));S(y,A,g,function(t,e){t?r(t,null):r(null,v(e))},n)}return e.encodeBase64=l,e.decodeBase64=f,e})?n.apply(e,[]):n)||(t.exports=i)},74156(t,e,r){const n=r(20829);function i(t,e,r){const n=t[e]+t[r];let i=t[e+1]+t[r+1];n>=4294967296&&i++,t[e]=n,t[e+1]=i}function a(t,e,r,n){let i=t[e]+r;r<0&&(i+=4294967296);let a=t[e+1]+n;i>=4294967296&&a++,t[e]=i,t[e+1]=a}function s(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function o(t,e,r,n,s,o){const u=l[s],h=l[s+1],f=l[o],p=l[o+1];i(c,t,e),a(c,t,u,h);let d=c[n]^c[t],g=c[n+1]^c[t+1];c[n]=g,c[n+1]=d,i(c,r,n),d=c[e]^c[r],g=c[e+1]^c[r+1],c[e]=d>>>24^g<<8,c[e+1]=g>>>24^d<<8,i(c,t,e),a(c,t,f,p),d=c[n]^c[t],g=c[n+1]^c[t+1],c[n]=d>>>16^g<<16,c[n+1]=g>>>16^d<<16,i(c,r,n),d=c[e]^c[r],g=c[e+1]^c[r+1],c[e]=g>>>31^d<<1,c[e+1]=d>>>31^g<<1}const u=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),h=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map(function(t){return 2*t})),c=new Uint32Array(32),l=new Uint32Array(32);function f(t,e){let r=0;for(r=0;r<16;r++)c[r]=t.h[r],c[r+16]=u[r];for(c[24]=c[24]^t.t,c[25]=c[25]^t.t/4294967296,e&&(c[28]=~c[28],c[29]=~c[29]),r=0;r<32;r++)l[r]=s(t.b,4*r);for(r=0;r<12;r++)o(0,8,16,24,h[16*r+0],h[16*r+1]),o(2,10,18,26,h[16*r+2],h[16*r+3]),o(4,12,20,28,h[16*r+4],h[16*r+5]),o(6,14,22,30,h[16*r+6],h[16*r+7]),o(0,10,20,30,h[16*r+8],h[16*r+9]),o(2,12,22,24,h[16*r+10],h[16*r+11]),o(4,14,16,26,h[16*r+12],h[16*r+13]),o(6,8,18,28,h[16*r+14],h[16*r+15]);for(r=0;r<16;r++)t.h[r]=t.h[r]^c[r]^c[r+16]}const p=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function d(t,e,r,n){if(0===t||t>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(e&&e.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(r&&16!==r.length)throw new Error("Illegal salt, expected Uint8Array with length is 16");if(n&&16!==n.length)throw new Error("Illegal personal, expected Uint8Array with length is 16");const i={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:t};p.fill(0),p[0]=t,e&&(p[1]=e.length),p[2]=1,p[3]=1,r&&p.set(r,32),n&&p.set(n,48);for(let t=0;t<16;t++)i.h[t]=u[t]^s(p,4*t);return e&&(g(i,e),i.c=128),i}function g(t,e){for(let r=0;r>2]>>8*(3&r);return e}function y(t,e,r,i,a){r=r||64,t=n.normalizeInput(t),i&&(i=n.normalizeInput(i)),a&&(a=n.normalizeInput(a));const s=d(r,e,i,a);return g(s,t),m(s)}t.exports={blake2b:y,blake2bHex:function(t,e,r,i,a){const s=y(t,e,r,i,a);return n.toHex(s)},blake2bInit:d,blake2bUpdate:g,blake2bFinal:m}},51843(t,e,r){const n=r(20829);function i(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function a(t,e,r,n,i,a){h[t]=h[t]+h[e]+i,h[n]=s(h[n]^h[t],16),h[r]=h[r]+h[n],h[e]=s(h[e]^h[r],12),h[t]=h[t]+h[e]+a,h[n]=s(h[n]^h[t],8),h[r]=h[r]+h[n],h[e]=s(h[e]^h[r],7)}function s(t,e){return t>>>e^t<<32-e}const o=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),h=new Uint32Array(16),c=new Uint32Array(16);function l(t,e){let r=0;for(r=0;r<8;r++)h[r]=t.h[r],h[r+8]=o[r];for(h[12]^=t.t,h[13]^=t.t/4294967296,e&&(h[14]=~h[14]),r=0;r<16;r++)c[r]=i(t.b,4*r);for(r=0;r<10;r++)a(0,4,8,12,c[u[16*r+0]],c[u[16*r+1]]),a(1,5,9,13,c[u[16*r+2]],c[u[16*r+3]]),a(2,6,10,14,c[u[16*r+4]],c[u[16*r+5]]),a(3,7,11,15,c[u[16*r+6]],c[u[16*r+7]]),a(0,5,10,15,c[u[16*r+8]],c[u[16*r+9]]),a(1,6,11,12,c[u[16*r+10]],c[u[16*r+11]]),a(2,7,8,13,c[u[16*r+12]],c[u[16*r+13]]),a(3,4,9,14,c[u[16*r+14]],c[u[16*r+15]]);for(r=0;r<8;r++)t.h[r]^=h[r]^h[r+8]}function f(t,e){if(!(t>0&&t<=32))throw new Error("Incorrect output length, should be in [1, 32]");const r=e?e.length:0;if(e&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]");const n={h:new Uint32Array(o),b:new Uint8Array(64),c:0,t:0,outlen:t};return n.h[0]^=16842752^r<<8^t,r>0&&(p(n,e),n.c=64),n}function p(t,e){for(let r=0;r>2]>>8*(3&r)&255;return e}function g(t,e,r){r=r||32,t=n.normalizeInput(t);const i=f(r,e);return p(i,t),d(i)}t.exports={blake2s:g,blake2sHex:function(t,e,r){const i=g(t,e,r);return n.toHex(i)},blake2sInit:f,blake2sUpdate:p,blake2sFinal:d}},92493(t,e,r){const n=r(74156),i=r(51843);t.exports={blake2b:n.blake2b,blake2bHex:n.blake2bHex,blake2bInit:n.blake2bInit,blake2bUpdate:n.blake2bUpdate,blake2bFinal:n.blake2bFinal,blake2s:i.blake2s,blake2sHex:i.blake2sHex,blake2sInit:i.blake2sInit,blake2sUpdate:i.blake2sUpdate,blake2sFinal:i.blake2sFinal}},20829(t){function e(t){return(4294967296+t).toString(16).substring(1)}t.exports={normalizeInput:function(t){let e;if(t instanceof Uint8Array)e=t;else{if("string"!=typeof t)throw new Error("Input must be an string, Buffer or Uint8Array");e=(new TextEncoder).encode(t)}return e},toHex:function(t){return Array.prototype.map.call(t,function(t){return(t<16?"0":"")+t.toString(16)}).join("")},debugPrint:function(t,r,n){let i="\n"+t+" = ";for(let a=0;a=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=o(t,r);return r-1>=e&&(n|=o(t,r-1)<<4),n}function h(t,e,r,i){for(var a=0,s=0,o=Math.min(t.length,r),u=e;u=49?h-49+10:h>=17?h-17+10:h,n(h>=0&&s0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this._strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this._strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,s=a%n,o=Math.min(a,a-s)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(t){a.prototype.inspect=l}else a.prototype.inspect=l;function l(){return(this.red?""}var f=["","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"],p=[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],d=[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 g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],s=i*a,o=67108863&s,u=s/67108864|0;r.words[0]=o;for(var h=1;h>>26,l=67108863&u,f=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);p<=f;p++){var d=h-p|0;c+=(s=(i=0|t.words[d])*(a=0|e.words[p])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r._strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,a=0,s=0;s>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?f[6-u.length]+u+r:u+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=p[t],c=d[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var g=l.modrn(c).toString(t);r=(l=l.idivn(c)).isZero()?g+r:f[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16,2)},s&&(a.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,a);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},a.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,a=0;i>8&255),r>16&255),6===a?(r>24&255),n=0,a=0):(n=s>>>24,a+=2)}if(r=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===a?(r>=0&&(t[r--]=s>>24&255),n=0,a=0):(n=s>>>24,a+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var a=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==a&&s>26,this.words[s]=67108863&e;if(0===a&&s>>13,p=0|s[1],d=8191&p,g=p>>>13,m=0|s[2],y=8191&m,A=m>>>13,v=0|s[3],b=8191&v,w=v>>>13,C=0|s[4],E=8191&C,S=C>>>13,I=0|s[5],B=8191&I,_=I>>>13,M=0|s[6],x=8191&M,T=M>>>13,R=0|s[7],F=8191&R,D=R>>>13,k=0|s[8],L=8191&k,N=k>>>13,H=0|s[9],P=8191&H,U=H>>>13,O=0|o[0],Q=8191&O,j=O>>>13,K=0|o[1],G=8191&K,V=K>>>13,q=0|o[2],W=8191&q,z=q>>>13,Y=0|o[3],J=8191&Y,X=Y>>>13,Z=0|o[4],$=8191&Z,tt=Z>>>13,et=0|o[5],rt=8191&et,nt=et>>>13,it=0|o[6],at=8191&it,st=it>>>13,ot=0|o[7],ut=8191&ot,ht=ot>>>13,ct=0|o[8],lt=8191&ct,ft=ct>>>13,pt=0|o[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(h+(n=Math.imul(l,Q))|0)+((8191&(i=(i=Math.imul(l,j))+Math.imul(f,Q)|0))<<13)|0;h=((a=Math.imul(f,j))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(d,Q),i=(i=Math.imul(d,j))+Math.imul(g,Q)|0,a=Math.imul(g,j);var yt=(h+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(f,G)|0))<<13)|0;h=((a=a+Math.imul(f,V)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,j))+Math.imul(A,Q)|0,a=Math.imul(A,j),n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(g,G)|0,a=a+Math.imul(g,V)|0;var At=(h+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,z)|0)+Math.imul(f,W)|0))<<13)|0;h=((a=a+Math.imul(f,z)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(b,Q),i=(i=Math.imul(b,j))+Math.imul(w,Q)|0,a=Math.imul(w,j),n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,V)|0)+Math.imul(A,G)|0,a=a+Math.imul(A,V)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,z)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,z)|0;var vt=(h+(n=n+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(f,J)|0))<<13)|0;h=((a=a+Math.imul(f,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,j))+Math.imul(S,Q)|0,a=Math.imul(S,j),n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,V)|0)+Math.imul(w,G)|0,a=a+Math.imul(w,V)|0,n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,z)|0)+Math.imul(A,W)|0,a=a+Math.imul(A,z)|0,n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,X)|0;var bt=(h+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(f,$)|0))<<13)|0;h=((a=a+Math.imul(f,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,j))+Math.imul(_,Q)|0,a=Math.imul(_,j),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(S,G)|0,a=a+Math.imul(S,V)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,z)|0)+Math.imul(w,W)|0,a=a+Math.imul(w,z)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(A,J)|0,a=a+Math.imul(A,X)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,$)|0,a=a+Math.imul(g,tt)|0;var wt=(h+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(f,rt)|0))<<13)|0;h=((a=a+Math.imul(f,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,j))+Math.imul(T,Q)|0,a=Math.imul(T,j),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,V)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,z)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,z)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(w,J)|0,a=a+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,a=a+Math.imul(g,nt)|0;var Ct=(h+(n=n+Math.imul(l,at)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(f,at)|0))<<13)|0;h=((a=a+Math.imul(f,st)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,j))+Math.imul(D,Q)|0,a=Math.imul(D,j),n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(T,G)|0,a=a+Math.imul(T,V)|0,n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,z)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,z)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(A,rt)|0,a=a+Math.imul(A,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,st)|0;var Et=(h+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(f,ut)|0))<<13)|0;h=((a=a+Math.imul(f,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,j))+Math.imul(N,Q)|0,a=Math.imul(N,j),n=n+Math.imul(F,G)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(D,G)|0,a=a+Math.imul(D,V)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,z)|0)+Math.imul(T,W)|0,a=a+Math.imul(T,z)|0,n=n+Math.imul(B,J)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(w,rt)|0,a=a+Math.imul(w,nt)|0,n=n+Math.imul(y,at)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(A,at)|0,a=a+Math.imul(A,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(g,ut)|0,a=a+Math.imul(g,ht)|0;var St=(h+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ft)|0)+Math.imul(f,lt)|0))<<13)|0;h=((a=a+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(P,Q),i=(i=Math.imul(P,j))+Math.imul(U,Q)|0,a=Math.imul(U,j),n=n+Math.imul(L,G)|0,i=(i=i+Math.imul(L,V)|0)+Math.imul(N,G)|0,a=a+Math.imul(N,V)|0,n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,z)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,z)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(T,J)|0,a=a+Math.imul(T,X)|0,n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(w,at)|0,a=a+Math.imul(w,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(A,ut)|0,a=a+Math.imul(A,ht)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(g,lt)|0,a=a+Math.imul(g,ft)|0;var It=(h+(n=n+Math.imul(l,dt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(f,dt)|0))<<13)|0;h=((a=a+Math.imul(f,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(P,G),i=(i=Math.imul(P,V))+Math.imul(U,G)|0,a=Math.imul(U,V),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,z)|0)+Math.imul(N,W)|0,a=a+Math.imul(N,z)|0,n=n+Math.imul(F,J)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(E,at)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,st)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(w,ut)|0,a=a+Math.imul(w,ht)|0,n=n+Math.imul(y,lt)|0,i=(i=i+Math.imul(y,ft)|0)+Math.imul(A,lt)|0,a=a+Math.imul(A,ft)|0;var Bt=(h+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;h=((a=a+Math.imul(g,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(P,W),i=(i=Math.imul(P,z))+Math.imul(U,W)|0,a=Math.imul(U,z),n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,J)|0,a=a+Math.imul(N,X)|0,n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,nt)|0,n=n+Math.imul(B,at)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(S,ut)|0,a=a+Math.imul(S,ht)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(w,lt)|0,a=a+Math.imul(w,ft)|0;var _t=(h+(n=n+Math.imul(y,dt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(A,dt)|0))<<13)|0;h=((a=a+Math.imul(A,gt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(P,J),i=(i=Math.imul(P,X))+Math.imul(U,J)|0,a=Math.imul(U,X),n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,$)|0,a=a+Math.imul(N,tt)|0,n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(D,rt)|0,a=a+Math.imul(D,nt)|0,n=n+Math.imul(x,at)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(_,ut)|0,a=a+Math.imul(_,ht)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ft)|0;var Mt=(h+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(w,dt)|0))<<13)|0;h=((a=a+Math.imul(w,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(P,$),i=(i=Math.imul(P,tt))+Math.imul(U,$)|0,a=Math.imul(U,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,a=a+Math.imul(N,nt)|0,n=n+Math.imul(F,at)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(T,ut)|0,a=a+Math.imul(T,ht)|0,n=n+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,ft)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ft)|0;var xt=(h+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(S,dt)|0))<<13)|0;h=((a=a+Math.imul(S,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(P,rt),i=(i=Math.imul(P,nt))+Math.imul(U,rt)|0,a=Math.imul(U,nt),n=n+Math.imul(L,at)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(N,at)|0,a=a+Math.imul(N,st)|0,n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ht)|0)+Math.imul(D,ut)|0,a=a+Math.imul(D,ht)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ft)|0;var Tt=(h+(n=n+Math.imul(B,dt)|0)|0)+((8191&(i=(i=i+Math.imul(B,gt)|0)+Math.imul(_,dt)|0))<<13)|0;h=((a=a+Math.imul(_,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(P,at),i=(i=Math.imul(P,st))+Math.imul(U,at)|0,a=Math.imul(U,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,ut)|0,a=a+Math.imul(N,ht)|0,n=n+Math.imul(F,lt)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(D,lt)|0,a=a+Math.imul(D,ft)|0;var Rt=(h+(n=n+Math.imul(x,dt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(T,dt)|0))<<13)|0;h=((a=a+Math.imul(T,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(P,ut),i=(i=Math.imul(P,ht))+Math.imul(U,ut)|0,a=Math.imul(U,ht),n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ft)|0)+Math.imul(N,lt)|0,a=a+Math.imul(N,ft)|0;var Ft=(h+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,gt)|0)+Math.imul(D,dt)|0))<<13)|0;h=((a=a+Math.imul(D,gt)|0)+(i>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,n=Math.imul(P,lt),i=(i=Math.imul(P,ft))+Math.imul(U,lt)|0,a=Math.imul(U,ft);var Dt=(h+(n=n+Math.imul(L,dt)|0)|0)+((8191&(i=(i=i+Math.imul(L,gt)|0)+Math.imul(N,dt)|0))<<13)|0;h=((a=a+Math.imul(N,gt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var kt=(h+(n=Math.imul(P,dt))|0)+((8191&(i=(i=Math.imul(P,gt))+Math.imul(U,dt)|0))<<13)|0;return h=((a=Math.imul(U,gt))+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,u[0]=mt,u[1]=yt,u[2]=At,u[3]=vt,u[4]=bt,u[5]=wt,u[6]=Ct,u[7]=Et,u[8]=St,u[9]=It,u[10]=Bt,u[11]=_t,u[12]=Mt,u[13]=xt,u[14]=Tt,u[15]=Rt,u[16]=Ft,u[17]=Dt,u[18]=kt,0!==h&&(u[19]=h,r.length++),r};function y(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,s&=67108863}r.words[a]=o,n=s,s=i}return 0!==n?r.words[a]=n:r.length--,r._strip()}function A(t,e,r){return y(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(m=g),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?g(this,t,e):r<1024?y(this,t,e):A(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},v.prototype.permute=function(t,e,r,n,i,a){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s>=26,r+=a/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),this.length=0===t?1:this.length,e?this.ineg():this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,h=0;h=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-a|l>>>a,c=l&o}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=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},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===o)return this._strip();for(n(-1===o),o=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this._strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var o,u=n.length-i.length;if("mod"!==e){(o=new a(null)).length=u+1,o.words=new Array(o.length);for(var h=0;h=0;l--){var f=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,l);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);o&&(o.words[l]=f)}return o&&o._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:o||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(i=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(i=o.div.neg()),{div:i,mod:o.mod}):0!==(this.negative&t.negative)?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,a=this.length-1;a>=0;a--)i=(r*i+(0|this.words[a]))%t;return e?-i:i},a.prototype.modn=function(t){return this.modrn(t)},a.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var a=(0|this.words[i])+67108864*r;this.words[i]=a/t|0,r=a%t}return this._strip(),e?this.ineg():this},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),s=new a(0),o=new a(0),u=new a(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),l=e.clone();!e.isZero();){for(var f=0,p=1;0===(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0===(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(c),u.isub(l)),o.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(o),s.isub(u)):(r.isub(e),o.isub(i),u.isub(s))}return{a:o,b:u,gcd:r.iushln(h)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new a(1),o=new a(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0===(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,f=1;0===(r.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(i=0===e.cmpn(1)?s:o).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new B(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function C(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function B(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function _(t){B.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}w.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(C,w),C.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,a=s}a>>>=22,t.words[i-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},C.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new C;else if("p224"===t)e=new E;else if("p192"===t)e=new S;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new I}return b[t]=e,e},B.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},B.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},B.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(c(t,t.umod(this.m)._forceRed(this)),t)},B.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},B.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},B.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},B.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},B.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},B.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},B.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},B.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},B.prototype.isqr=function(t){return this.imul(t,t.clone())},B.prototype.sqr=function(t){return this.mul(t,t)},B.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var o=new a(1).toRed(this),u=o.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(o);){for(var g=p,m=0;0!==g.cmp(o);m++)g=g.redSqr();n(m=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var l=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++o||0===n&&0===c)&&(i=this.mul(i,r[s]),o=0,s=0)):o=0}u=26}return i},B.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},B.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new _(t)},i(_,B),_.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},_.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},_.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},_.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},_.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},15037(t,e,r){var n;function i(t){this.rand=t}if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r>>24]^c[d>>>16&255]^l[g>>>8&255]^f[255&m]^e[y++],s=h[d>>>24]^c[g>>>16&255]^l[m>>>8&255]^f[255&p]^e[y++],o=h[g>>>24]^c[m>>>16&255]^l[p>>>8&255]^f[255&d]^e[y++],u=h[m>>>24]^c[p>>>16&255]^l[d>>>8&255]^f[255&g]^e[y++],p=a,d=s,g=o,m=u;return a=(n[p>>>24]<<24|n[d>>>16&255]<<16|n[g>>>8&255]<<8|n[255&m])^e[y++],s=(n[d>>>24]<<24|n[g>>>16&255]<<16|n[m>>>8&255]<<8|n[255&p])^e[y++],o=(n[g>>>24]<<24|n[m>>>16&255]<<16|n[p>>>8&255]<<8|n[255&d])^e[y++],u=(n[m>>>24]<<24|n[p>>>16&255]<<16|n[d>>>8&255]<<8|n[255&g])^e[y++],[a>>>=0,s>>>=0,o>>>=0,u>>>=0]}var o=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],a=[[],[],[],[]],s=0,o=0,u=0;u<256;++u){var h=o^o<<1^o<<2^o<<3^o<<4;h=h>>>8^255&h^99,r[s]=h,n[h]=s;var c=t[s],l=t[c],f=t[l],p=257*t[h]^16843008*h;i[0][s]=p<<24|p>>>8,i[1][s]=p<<16|p>>>16,i[2][s]=p<<8|p>>>24,i[3][s]=p,p=16843009*f^65537*l^257*c^16843008*s,a[0][h]=p<<24|p>>>8,a[1][h]=p<<16|p>>>16,a[2][h]=p<<8|p>>>24,a[3][h]=p,0===s?s=o=1:(s=c^t[t[t[f^c]]],o^=t[t[o]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:a}}();function h(t){this._key=i(t),this._reset()}h.blockSize=16,h.keySize=32,h.prototype.blockSize=h.blockSize,h.prototype.keySize=h.keySize,h.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],a=0;a>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=o[a/e|0]<<24):e>6&&a%e===4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),i[a]=i[a-e]^s}for(var h=[],c=0;c>>24]]^u.INV_SUB_MIX[1][u.SBOX[f>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[f>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&f]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=h},h.prototype.encryptBlockRaw=function(t){return s(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},h.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},h.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=s(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),a=n.allocUnsafe(16);return a.writeUInt32BE(r[0],0),a.writeUInt32BE(r[3],4),a.writeUInt32BE(r[2],8),a.writeUInt32BE(r[1],12),a},h.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},t.exports.AES=h},92356(t,e,r){var n=r(50462),i=r(92861).Buffer,a=r(56168),s=r(56698),o=r(25892),u=r(30295),h=r(45122);function c(t,e,r,s){a.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(e);var c=this._cipher.encryptBlock(u);this._ghash=new o(c),r=function(t,e,r){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var n=new o(r),a=e.length,s=a%16;n.update(e),s&&(s=16-s,n.update(i.alloc(s,0))),n.update(i.alloc(8,0));var u=8*a,c=i.alloc(8);c.writeUIntBE(u,0,8),n.update(c),t._finID=n.state;var l=i.from(t._finID);return h(l),l}(this,r,c),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}s(c,a),c.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},c.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i16)throw new Error("unable to decrypt data");for(var r=-1;++r16)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},l.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=a[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=h(e,!1,r.key,r.iv);return f(t,n.key,n.iv)},e.createDecipheriv=f},25799(t,e,r){var n=r(530),i=r(92356),a=r(92861).Buffer,s=r(50650),o=r(56168),u=r(50462),h=r(68078);function c(t,e,r){o.call(this),this._cache=new f,this._cipher=new u.AES(e),this._prev=a.from(r),this._mode=t,this._autopadding=!0}r(56698)(c,o),c.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return a.concat(n)};var l=a.alloc(16,16);function f(){this.cache=a.allocUnsafe(0)}function p(t,e,r){var o=n[t.toLowerCase()];if(!o)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=a.from(e)),e.length!==o.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=a.from(r)),"GCM"!==o.mode&&r.length!==o.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===o.type?new s(o.module,e,r):"auth"===o.type?new i(o.module,e,r):new c(o.module,e,r)}c.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},f.prototype.add=function(t){this.cache=a.concat([this.cache,t])},f.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},f.prototype.flush=function(){for(var t=16-this.cache.length,e=a.allocUnsafe(t),r=-1;++r>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function s(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(t){for(var e=-1;++e0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=a(i)},s.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},s.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(a([0,t,0,e])),this.state},t.exports=s},45122(t){t.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},92884(t,e,r){var n=r(30295);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},46383(t,e,r){var n=r(92861).Buffer,i=r(30295);function a(t,e,r){var a=e.length,s=i(e,t._cache);return t._cache=t._cache.slice(a),t._prev=n.concat([t._prev,r?e:s]),s}e.encrypt=function(t,e,r){for(var i,s=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length<=e.length)){s=n.concat([s,a(t,e,r)]);break}i=t._cache.length,s=n.concat([s,a(t,e.slice(0,i),r)]),e=e.slice(i)}return s}},55264(t,e,r){var n=r(92861).Buffer;function i(t,e,r){for(var n,i,s=-1,o=0;++s<8;)n=e&1<<7-s?128:0,o+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^n))>>s%8,t._prev=a(t._prev,r?n:i);return o}function a(t,e){var r=t.length,i=-1,a=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i>7;return a}e.encrypt=function(t,e,r){for(var a=e.length,s=n.allocUnsafe(a),o=-1;++o=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function o(t,e){var r=function(t){var e=s(t);return{blinder:e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),i=e.modulus.byteLength(),o=new n(t).mul(r.blinder).umod(e.modulus),u=o.toRed(n.mont(e.prime1)),h=o.toRed(n.mont(e.prime2)),c=e.coefficient,l=e.prime1,f=e.prime2,p=u.redPow(e.exponent1).fromRed(),d=h.redPow(e.exponent2).fromRed(),g=p.isub(d).imul(c).umod(l).imul(f);return d.iadd(g).imul(r.unblinder).umod(e.modulus).toArrayLike(a,"be",i)}o.getr=s,t.exports=o},55715(t,e,r){"use strict";t.exports=r(62951)},20(t,e,r){"use strict";var n=r(92861).Buffer,i=r(47108),a=r(28399),s=r(56698),o=r(35359),u=r(74847),h=r(62951);function c(t){a.Writable.call(this);var e=h[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){a.Writable.call(this);var e=h[t];if(!e)throw new Error("Unknown message digest");this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function f(t){return new c(t)}function p(t){return new l(t)}Object.keys(h).forEach(function(t){h[t].id=n.from(h[t].id,"hex"),h[t.toLowerCase()]=h[t]}),s(c,a.Writable),c.prototype._write=function(t,e,r){this._hash.update(t),r()},c.prototype.update=function(t,e){return this._hash.update("string"==typeof t?n.from(t,e):t),this},c.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=o(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},s(l,a.Writable),l.prototype._write=function(t,e,r){this._hash.update(t),r()},l.prototype.update=function(t,e){return this._hash.update("string"==typeof t?n.from(t,e):t),this},l.prototype.verify=function(t,e,r){var i="string"==typeof e?n.from(e,r):e;this.end();var a=this._hash.digest();return u(i,a,t,this._signType,this._tag)},t.exports={Sign:f,Verify:p,createSign:f,createVerify:p}},35359(t,e,r){"use strict";var n=r(92861).Buffer,i=r(83507),a=r(67332),s=r(86729).ec,o=r(39404),u=r(78170),h=r(64589);function c(t,e,r,a){if((t=n.from(t.toArray())).length0&&r.ishrn(n),r}function f(t,e,r){var a,s;do{for(a=n.alloc(0);8*a.length=0)throw new Error("invalid sig")}t.exports=function(t,e,r,h,c){var l=s(r);if("ec"===l.type){if("ecdsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong public key type");return function(t,e,r){var n=o[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new a(n),s=r.data.subjectPrivateKey.data;return i.verify(e,t,s)}(t,e,l)}if("dsa"===l.type){if("dsa"!==h)throw new Error("wrong public key type");return function(t,e,r){var n=r.data.p,a=r.data.q,o=r.data.g,h=r.data.pub_key,c=s.signature.decode(t,"der"),l=c.s,f=c.r;u(l,a),u(f,a);var p=i.mont(n),d=l.invm(a);return 0===o.toRed(p).redPow(new i(e).mul(d).mod(a)).fromRed().mul(h.toRed(p).redPow(f.mul(d).mod(a)).fromRed()).mod(n).mod(a).cmp(f)}(t,e,l)}if("rsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong public key type");e=n.concat([c,e]);for(var f=l.modulus.byteLength(),p=[1],d=0;e.length+p.length+2s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return h(t,e,r)}function h(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|g(t,e);let n=o(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(Y(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Y(t,ArrayBuffer)||t&&Y(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(t,SharedArrayBuffer)||t&&Y(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);const i=function(t){if(u.isBuffer(t)){const e=0|d(t.length),r=o(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||J(t.length)?o(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return c(t),o(t<0?0:0|d(t))}function f(t){const e=t.length<0?0:0|d(t.length),r=o(e);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function g(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Y(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(t).length;default:if(i)return n?-1:q(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return B(this,e,r);case"ascii":return M(this,e,r);case"latin1":case"binary":return x(this,e,r);case"base64":return I(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function A(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){let a,s=1,o=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,o/=2,u/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(a=r;ao&&(r=o-u),a=r;a>=0;a--){let r=!0;for(let n=0;ni&&(n=i):n=i;const a=e.length;let s;for(n>a/2&&(n=a/2),s=0;s>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function I(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function B(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,o,u;switch(s){case 1:e<128&&(a=e);break;case 2:r=t[i+1],128==(192&r)&&(u=(31&e)<<6|63&r,u>127&&(a=u));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(a=u));break;case 4:r=t[i+1],n=t[i+2],o=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&o)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&o,u>65535&&u<1114112&&(a=u))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return function(t){const e=t.length;if(e<=_)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nn.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;er&&(t+=" ... "),""},a&&(u.prototype[a]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(Y(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let a=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const o=Math.min(a,s),h=this.slice(n,i),c=t.slice(e,r);for(let t=0;t>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let a=!1;for(;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":case"latin1":case"binary":return C(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const _=4096;function M(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;in)&&(r=n);let i="";for(let n=e;nr)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,r,n,i,a){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function k(t,e,r,n,i){j(e,n,i,t,r,7);let a=Number(e&BigInt(4294967295));t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function L(t,e,r,n,i){j(e,n,i,t,r,7);let a=Number(e&BigInt(4294967295));t[r+7]=a,a>>=8,t[r+6]=a,a>>=8,t[r+5]=a,a>>=8,t[r+4]=a;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function N(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function H(t,e,r,n,a){return e=+e,r>>>=0,a||N(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,a){return e=+e,r>>>=0,a||N(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||F(t,e,this.length);let n=this[t],i=1,a=0;for(;++a>>=0,e>>>=0,r||F(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||F(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||F(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||F(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||F(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||F(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=Z(function(t){K(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||G(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||G(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||F(t,e,this.length);let n=this[t],i=1,a=0;for(;++a=i&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||F(t,e,this.length);let n=e,i=1,a=this[t+--n];for(;n>0&&(i*=256);)a+=this[t+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*e)),a},u.prototype.readInt8=function(t,e){return t>>>=0,e||F(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||F(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||F(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||F(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||F(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=Z(function(t){K(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||G(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||G(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<>>=0,e||F(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||F(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||F(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||F(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||D(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,n||D(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=Z(function(t,e=0){return k(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=Z(function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);D(this,t,e,r,n-1,-n)}let i=0,a=1,s=0;for(this[e]=255&t;++i>>=0,!n){const n=Math.pow(2,8*r-1);D(this,t,e,r,n-1,-n)}let i=r-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a|0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=Z(function(t,e=0){return k(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=Z(function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(t,e,r){return H(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return H(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function j(t,e,r,n,i,a){if(t>r||t3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(a+1)}${n}`:`>= -(2${n} ** ${8*(a+1)-1}${n}) and < 2 ** ${8*(a+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new U.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){K(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||G(e,t.length-(r+1))}(n,i,a)}function K(t,e){if("number"!=typeof t)throw new U.ERR_INVALID_ARG_TYPE(e,"number",t)}function G(t,e,r){if(Math.floor(t)!==t)throw K(t,r),new U.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}O("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),O("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),O("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=Q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Q(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);const V=/[^+/0-9A-Za-z-_]/g;function q(t,e){let r;e=e||1/0;const n=t.length;let i=null;const a=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function W(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(V,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Y(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function J(t){return t!=t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function Z(t){return"undefined"==typeof BigInt?$:t}function $(){throw new Error("BigInt not supported")}},13144(t,e,r){"use strict";var n=r(66743),i=r(11002),a=r(10076),s=r(47119);t.exports=s||n.call(a,i)},12205(t,e,r){"use strict";var n=r(66743),i=r(11002),a=r(13144);t.exports=function(){return a(n,i,arguments)}},11002(t){"use strict";t.exports=Function.prototype.apply},10076(t){"use strict";t.exports=Function.prototype.call},73126(t,e,r){"use strict";var n=r(66743),i=r(69675),a=r(10076),s=r(13144);t.exports=function(t){if(t.length<1||"function"!=typeof t[0])throw new i("a function is required");return s(n,a,t)}},47119(t){"use strict";t.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},10487(t,e,r){"use strict";var n=r(96897),i=r(30655),a=r(73126),s=r(12205);t.exports=function(t){var e=a(arguments),r=t.length-(arguments.length-1);return n(e,1+(r>0?r:0),!0)},i?i(t.exports,"apply",{value:s}):t.exports.apply=s},36556(t,e,r){"use strict";var n=r(70453),i=r(73126),a=i([n("%String.prototype.indexOf%")]);t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&a(t,".prototype.")>-1?i([r]):r}},56168(t,e,r){"use strict";var n=r(92861).Buffer,i=r(88310).Transform,a=r(83141).I;function s(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(56698)(s,i);var o="undefined"!=typeof Uint8Array,u="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&ArrayBuffer.isView&&(n.prototype instanceof Uint8Array||n.TYPED_ARRAY_SUPPORT);s.prototype.update=function(t,e,r){var i=function(t,e){if(t instanceof n)return t;if("string"==typeof t)return n.from(t,e);if(u&&ArrayBuffer.isView(t)){if(0===t.byteLength)return n.alloc(0);var r=n.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}if(o&&t instanceof Uint8Array)return n.from(t);if(n.isBuffer(t)&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return n.from(t);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}(t,e),a=this._update(i);return this.hashMode?this:(r&&(a=this._toString(a,r)),a)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new a(e),this._encoding=e),this._encoding!==e)throw new Error("can’t switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=s},15622(t,e,r){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(48287).Buffer.isBuffer},61324(t,e,r){var n=r(48287).Buffer,i=r(86729),a=r(92801);t.exports=function(t){return new o(t)};var s={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(t){this.curveType=s[t],this.curveType||(this.curveType={name:t}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function u(t,e,r){Array.isArray(t)||(t=t.toArray());var i=new n(t);if(r&&i.length=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=o(t,r);return r-1>=e&&(n|=o(t,r-1)<<4),n}function h(t,e,r,n){for(var i=0,a=Math.min(t.length,r),s=e;s=49?o-49+10:o>=17?o-17+10:o}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,s=a%n,o=Math.min(a,a-s)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var c=["","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],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],s=i*a,o=67108863&s,u=s/67108864|0;r.words[0]=o;for(var h=1;h>>26,l=67108863&u,f=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);p<=f;p++){var d=h-p|0;c+=(s=(i=0|t.words[d])*(a=0|e.words[p])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,a=0,s=0;s>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?c[6-u.length]+u+r:u+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],p=f[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var s,o,u="le"===e,h=new t(a),c=this.clone();if(u){for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),h[o]=s;for(;o=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var a=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==a&&s>26,this.words[s]=67108863&e;if(0===a&&s>>13,p=0|s[1],d=8191&p,g=p>>>13,m=0|s[2],y=8191&m,A=m>>>13,v=0|s[3],b=8191&v,w=v>>>13,C=0|s[4],E=8191&C,S=C>>>13,I=0|s[5],B=8191&I,_=I>>>13,M=0|s[6],x=8191&M,T=M>>>13,R=0|s[7],F=8191&R,D=R>>>13,k=0|s[8],L=8191&k,N=k>>>13,H=0|s[9],P=8191&H,U=H>>>13,O=0|o[0],Q=8191&O,j=O>>>13,K=0|o[1],G=8191&K,V=K>>>13,q=0|o[2],W=8191&q,z=q>>>13,Y=0|o[3],J=8191&Y,X=Y>>>13,Z=0|o[4],$=8191&Z,tt=Z>>>13,et=0|o[5],rt=8191&et,nt=et>>>13,it=0|o[6],at=8191&it,st=it>>>13,ot=0|o[7],ut=8191&ot,ht=ot>>>13,ct=0|o[8],lt=8191&ct,ft=ct>>>13,pt=0|o[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(h+(n=Math.imul(l,Q))|0)+((8191&(i=(i=Math.imul(l,j))+Math.imul(f,Q)|0))<<13)|0;h=((a=Math.imul(f,j))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(d,Q),i=(i=Math.imul(d,j))+Math.imul(g,Q)|0,a=Math.imul(g,j);var yt=(h+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(f,G)|0))<<13)|0;h=((a=a+Math.imul(f,V)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,j))+Math.imul(A,Q)|0,a=Math.imul(A,j),n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(g,G)|0,a=a+Math.imul(g,V)|0;var At=(h+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,z)|0)+Math.imul(f,W)|0))<<13)|0;h=((a=a+Math.imul(f,z)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(b,Q),i=(i=Math.imul(b,j))+Math.imul(w,Q)|0,a=Math.imul(w,j),n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,V)|0)+Math.imul(A,G)|0,a=a+Math.imul(A,V)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,z)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,z)|0;var vt=(h+(n=n+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(f,J)|0))<<13)|0;h=((a=a+Math.imul(f,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,j))+Math.imul(S,Q)|0,a=Math.imul(S,j),n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,V)|0)+Math.imul(w,G)|0,a=a+Math.imul(w,V)|0,n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,z)|0)+Math.imul(A,W)|0,a=a+Math.imul(A,z)|0,n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,X)|0;var bt=(h+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(f,$)|0))<<13)|0;h=((a=a+Math.imul(f,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,j))+Math.imul(_,Q)|0,a=Math.imul(_,j),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(S,G)|0,a=a+Math.imul(S,V)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,z)|0)+Math.imul(w,W)|0,a=a+Math.imul(w,z)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(A,J)|0,a=a+Math.imul(A,X)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,$)|0,a=a+Math.imul(g,tt)|0;var wt=(h+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(f,rt)|0))<<13)|0;h=((a=a+Math.imul(f,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,j))+Math.imul(T,Q)|0,a=Math.imul(T,j),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,V)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,z)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,z)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(w,J)|0,a=a+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,a=a+Math.imul(g,nt)|0;var Ct=(h+(n=n+Math.imul(l,at)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(f,at)|0))<<13)|0;h=((a=a+Math.imul(f,st)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,j))+Math.imul(D,Q)|0,a=Math.imul(D,j),n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(T,G)|0,a=a+Math.imul(T,V)|0,n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,z)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,z)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(A,rt)|0,a=a+Math.imul(A,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,st)|0;var Et=(h+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(f,ut)|0))<<13)|0;h=((a=a+Math.imul(f,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,j))+Math.imul(N,Q)|0,a=Math.imul(N,j),n=n+Math.imul(F,G)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(D,G)|0,a=a+Math.imul(D,V)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,z)|0)+Math.imul(T,W)|0,a=a+Math.imul(T,z)|0,n=n+Math.imul(B,J)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(w,rt)|0,a=a+Math.imul(w,nt)|0,n=n+Math.imul(y,at)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(A,at)|0,a=a+Math.imul(A,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(g,ut)|0,a=a+Math.imul(g,ht)|0;var St=(h+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ft)|0)+Math.imul(f,lt)|0))<<13)|0;h=((a=a+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(P,Q),i=(i=Math.imul(P,j))+Math.imul(U,Q)|0,a=Math.imul(U,j),n=n+Math.imul(L,G)|0,i=(i=i+Math.imul(L,V)|0)+Math.imul(N,G)|0,a=a+Math.imul(N,V)|0,n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,z)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,z)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(T,J)|0,a=a+Math.imul(T,X)|0,n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(w,at)|0,a=a+Math.imul(w,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(A,ut)|0,a=a+Math.imul(A,ht)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(g,lt)|0,a=a+Math.imul(g,ft)|0;var It=(h+(n=n+Math.imul(l,dt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(f,dt)|0))<<13)|0;h=((a=a+Math.imul(f,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(P,G),i=(i=Math.imul(P,V))+Math.imul(U,G)|0,a=Math.imul(U,V),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,z)|0)+Math.imul(N,W)|0,a=a+Math.imul(N,z)|0,n=n+Math.imul(F,J)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(E,at)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,st)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(w,ut)|0,a=a+Math.imul(w,ht)|0,n=n+Math.imul(y,lt)|0,i=(i=i+Math.imul(y,ft)|0)+Math.imul(A,lt)|0,a=a+Math.imul(A,ft)|0;var Bt=(h+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;h=((a=a+Math.imul(g,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(P,W),i=(i=Math.imul(P,z))+Math.imul(U,W)|0,a=Math.imul(U,z),n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,J)|0,a=a+Math.imul(N,X)|0,n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,nt)|0,n=n+Math.imul(B,at)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(S,ut)|0,a=a+Math.imul(S,ht)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(w,lt)|0,a=a+Math.imul(w,ft)|0;var _t=(h+(n=n+Math.imul(y,dt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(A,dt)|0))<<13)|0;h=((a=a+Math.imul(A,gt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(P,J),i=(i=Math.imul(P,X))+Math.imul(U,J)|0,a=Math.imul(U,X),n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,$)|0,a=a+Math.imul(N,tt)|0,n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(D,rt)|0,a=a+Math.imul(D,nt)|0,n=n+Math.imul(x,at)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(_,ut)|0,a=a+Math.imul(_,ht)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ft)|0;var Mt=(h+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(w,dt)|0))<<13)|0;h=((a=a+Math.imul(w,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(P,$),i=(i=Math.imul(P,tt))+Math.imul(U,$)|0,a=Math.imul(U,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,a=a+Math.imul(N,nt)|0,n=n+Math.imul(F,at)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(T,ut)|0,a=a+Math.imul(T,ht)|0,n=n+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,ft)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ft)|0;var xt=(h+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(S,dt)|0))<<13)|0;h=((a=a+Math.imul(S,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(P,rt),i=(i=Math.imul(P,nt))+Math.imul(U,rt)|0,a=Math.imul(U,nt),n=n+Math.imul(L,at)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(N,at)|0,a=a+Math.imul(N,st)|0,n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ht)|0)+Math.imul(D,ut)|0,a=a+Math.imul(D,ht)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ft)|0;var Tt=(h+(n=n+Math.imul(B,dt)|0)|0)+((8191&(i=(i=i+Math.imul(B,gt)|0)+Math.imul(_,dt)|0))<<13)|0;h=((a=a+Math.imul(_,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(P,at),i=(i=Math.imul(P,st))+Math.imul(U,at)|0,a=Math.imul(U,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,ut)|0,a=a+Math.imul(N,ht)|0,n=n+Math.imul(F,lt)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(D,lt)|0,a=a+Math.imul(D,ft)|0;var Rt=(h+(n=n+Math.imul(x,dt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(T,dt)|0))<<13)|0;h=((a=a+Math.imul(T,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(P,ut),i=(i=Math.imul(P,ht))+Math.imul(U,ut)|0,a=Math.imul(U,ht),n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ft)|0)+Math.imul(N,lt)|0,a=a+Math.imul(N,ft)|0;var Ft=(h+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,gt)|0)+Math.imul(D,dt)|0))<<13)|0;h=((a=a+Math.imul(D,gt)|0)+(i>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,n=Math.imul(P,lt),i=(i=Math.imul(P,ft))+Math.imul(U,lt)|0,a=Math.imul(U,ft);var Dt=(h+(n=n+Math.imul(L,dt)|0)|0)+((8191&(i=(i=i+Math.imul(L,gt)|0)+Math.imul(N,dt)|0))<<13)|0;h=((a=a+Math.imul(N,gt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var kt=(h+(n=Math.imul(P,dt))|0)+((8191&(i=(i=Math.imul(P,gt))+Math.imul(U,dt)|0))<<13)|0;return h=((a=Math.imul(U,gt))+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,u[0]=mt,u[1]=yt,u[2]=At,u[3]=vt,u[4]=bt,u[5]=wt,u[6]=Ct,u[7]=Et,u[8]=St,u[9]=It,u[10]=Bt,u[11]=_t,u[12]=Mt,u[13]=xt,u[14]=Tt,u[15]=Rt,u[16]=Ft,u[17]=Dt,u[18]=kt,0!==h&&(u[19]=h,r.length++),r};function g(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=p),a.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?p(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,s&=67108863}r.words[a]=o,n=s,s=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):g(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},m.prototype.permute=function(t,e,r,n,i,a){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this.length=0===t?1:this.length,this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,h=0;h=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-a|l>>>a,c=l&o}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=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},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===o)return this.strip();for(n(-1===o),o=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var o,u=n.length-i.length;if("mod"!==e){(o=new a(null)).length=u+1,o.words=new Array(o.length);for(var h=0;h=0;l--){var f=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,l);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);o&&(o.words[l]=f)}return o&&o.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:o||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(i=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(i=o.div.neg()),{div:i,mod:o.mod}):0!==(this.negative&t.negative)?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),s=new a(0),o=new a(0),u=new a(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),l=e.clone();!e.isZero();){for(var f=0,p=1;0===(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0===(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(c),u.isub(l)),o.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(o),s.isub(u)):(r.isub(e),o.isub(i),u.isub(s))}return{a:o,b:u,gcd:r.iushln(h)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new a(1),o=new a(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0===(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,f=1;0===(r.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(i=0===e.cmpn(1)?s:o).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new E(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function A(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}A.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},A.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(t,e){t.iushrn(this.n,0,e)},A.prototype.imulK=function(t){return t.imul(this.k)},i(v,A),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,a=s}a>>>=22,t.words[i-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new b;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new C}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var o=new a(1).toRed(this),u=o.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(o);){for(var g=p,m=0;0!==g.cmp(o);m++)g=g.redSqr();n(m=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var l=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++o||0===n&&0===c)&&(i=this.mul(i,r[s]),o=0,s=0)):o=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new S(t)},i(S,E),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},47108(t,e,r){"use strict";var n=r(56698),i=r(88276),a=r(66011),s=r(62802),o=r(56168);function u(t){o.call(this,"digest"),this._hash=t}n(u,o),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new a:new u(s(t))}},20320(t,e,r){var n=r(88276);t.exports=function(t){return(new n).update(t).digest()}},83507(t,e,r){"use strict";var n=r(56698),i=r(41800),a=r(56168),s=r(92861).Buffer,o=r(20320),u=r(66011),h=r(62802),c=s.alloc(128);function l(t,e){a.call(this,"digest"),"string"==typeof e&&(e=s.from(e));var r="sha512"===t||"sha384"===t?128:64;this._alg=t,this._key=e,e.length>r?e=("rmd160"===t?new u:h(t)).update(e).digest():e.lengtho?e=t(e):e.length>>0}function o(){this.x=0,this.y=0,this.z=0,this.c=0,this.window=new Array(7)}function u(t,e){for(var r=["",""],n=i,u=i,h=new o,c=0,l=t.length;c>>0,this.z=(this.z^t)>>>0},o.prototype.sum=function(){return this.x+this.y+this.z>>>0},e.digest=function(t){return"string"==typeof t&&(t=r?function(t){for(var e=unescape(encodeURIComponent(t)),r=[],n=0;n0&&r[0].length<32;)r=u(t,3<<--e);return a.charAt(e)+":"+r[0]+":"+r[1]}(t)},e.similarity=function(t,e){var r,n,i=a.indexOf(t.charAt(0)),s=a.indexOf(e.charAt(0));return i>s?arguments.callee(e,t):Math.abs(i-s)>1?0:(r=i===s?t.split(":")[1]:t.split(":")[2],n=e.split(":")[1],100*(1-function(t,e){if(t===e)return 0;if(0===t.length)return e.length;if(0===e.length)return t.length;var r,n,i,a,s,o=new Array(e.length+1);for(i=0;i(s=r+1)&&(n=s),n>(s=o[a+1]+1)&&(n=s),o[a]=r;o[a]=n}return n}(r,n)/Math.max(r.length,n.length)))}}()},30041(t,e,r){"use strict";var n=r(30655),i=r(58068),a=r(69675),s=r(75795);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],l=!!s&&s(t,e);if(n)n(t,e,{configurable:null===h&&l?l.configurable:!h,enumerable:null===o&&l?l.enumerable:!o,value:r,writable:null===u&&l?l.writable:!u});else{if(!c&&(o||u||h))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},29560(t,e,r){"use strict";e.utils=r(87626),e.Cipher=r(82808),e.DES=r(82211),e.CBC=r(3389),e.EDE=r(65279)},3389(t,e,r){"use strict";var n=r(43349),i=r(56698),a={};function s(t){n.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e>>1];r=a.r28shl(r,o),i=a.r28shl(i,o),a.pc2(r,i,t.keys,s)}},u.prototype._update=function(t,e,r,n){var i=this._desState,s=a.readUInt32BE(t,e),o=a.readUInt32BE(t,e+4);a.ip(s,o,i.tmp,0),s=i.tmp[0],o=i.tmp[1],"encrypt"===this.type?this._encrypt(i,s,o,i.tmp,0):this._decrypt(i,s,o,i.tmp,0),s=i.tmp[0],o=i.tmp[1],a.writeUInt32BE(r,s,n),a.writeUInt32BE(r,o,n+4)},u.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var r=t.length-e,n=e;n>>0,s=f}a.rip(o,s,n,i)},u.prototype._decrypt=function(t,e,r,n,i){for(var s=r,o=e,u=t.keys.length-2;u>=0;u-=2){var h=t.keys[u],c=t.keys[u+1];a.expand(s,t.tmp,0),h^=t.tmp[0],c^=t.tmp[1];var l=a.substitute(h,c),f=s;s=(o^a.permute(l))>>>0,o=f}a.rip(s,o,n,i)}},65279(t,e,r){"use strict";var n=r(43349),i=r(56698),a=r(82808),s=r(82211);function o(t,e){n.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),a=e.slice(16,24);this.ciphers="encrypt"===t?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:a})]:[s.create({type:"decrypt",key:a}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r})]}function u(t){a.call(this,t);var e=new o(this.type,this.options.key);this._edeState=e}i(u,a),t.exports=u,u.create=function(t){return new u(t)},u.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},87626(t,e){"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,n){for(var i=0,a=0,s=6;s>=0;s-=2){for(var o=0;o<=24;o+=8)i<<=1,i|=e>>>o+s&1;for(o=0;o<=24;o+=8)i<<=1,i|=t>>>o+s&1}for(s=6;s>=0;s-=2){for(o=1;o<=25;o+=8)a<<=1,a|=e>>>o+s&1;for(o=1;o<=25;o+=8)a<<=1,a|=t>>>o+s&1}r[n+0]=i>>>0,r[n+1]=a>>>0},e.rip=function(t,e,r,n){for(var i=0,a=0,s=0;s<4;s++)for(var o=24;o>=0;o-=8)i<<=1,i|=e>>>o+s&1,i<<=1,i|=t>>>o+s&1;for(s=4;s<8;s++)for(o=24;o>=0;o-=8)a<<=1,a|=e>>>o+s&1,a<<=1,a|=t>>>o+s&1;r[n+0]=i>>>0,r[n+1]=a>>>0},e.pc1=function(t,e,r,n){for(var i=0,a=0,s=7;s>=5;s--){for(var o=0;o<=24;o+=8)i<<=1,i|=e>>o+s&1;for(o=0;o<=24;o+=8)i<<=1,i|=t>>o+s&1}for(o=0;o<=24;o+=8)i<<=1,i|=e>>o+s&1;for(s=1;s<=3;s++){for(o=0;o<=24;o+=8)a<<=1,a|=e>>o+s&1;for(o=0;o<=24;o+=8)a<<=1,a|=t>>o+s&1}for(o=0;o<=24;o+=8)a<<=1,a|=t>>o+s&1;r[n+0]=i>>>0,r[n+1]=a>>>0},e.r28shl=function(t,e){return t<>>28-e};var r=[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(t,e,n,i){for(var a=0,s=0,o=r.length>>>1,u=0;u>>r[u]&1;for(u=o;u>>r[u]&1;n[i+0]=a>>>0,n[i+1]=s>>>0},e.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var a=23;a>=15;a-=4)n<<=6,n|=t>>>a&63;for(a=11;a>=3;a-=4)i|=t>>>a&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var n=[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(t,e){for(var r=0,i=0;i<4;i++)r<<=4,r|=n[64*i+(t>>>18-6*i&63)];for(i=0;i<4;i++)r<<=4,r|=n[256+64*i+(e>>>18-6*i&63)];return r>>>0};var i=[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(t){for(var e=0,r=0;r>>i[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var n=t.toString(2);n.lengtht;)r.ishrn(1);if(r.isEven()&&r.iadd(o),r.testn(1)||r.iadd(u),e.cmp(u)){if(!e.cmp(h))for(;r.mod(c).cmp(l);)r.iadd(p)}else for(;r.mod(a).cmp(f);)r.iadd(p);if(m(d=r.shrn(1))&&m(r)&&y(d)&&y(r)&&s.test(d)&&s.test(r))return r}}},66473(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(66089).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=o(t,r);return r-1>=e&&(n|=o(t,r-1)<<4),n}function h(t,e,r,n){for(var i=0,a=Math.min(t.length,r),s=e;s=49?o-49+10:o>=17?o-17+10:o}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,s=a%n,o=Math.min(a,a-s)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var c=["","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],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],s=i*a,o=67108863&s,u=s/67108864|0;r.words[0]=o;for(var h=1;h>>26,l=67108863&u,f=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);p<=f;p++){var d=h-p|0;c+=(s=(i=0|t.words[d])*(a=0|e.words[p])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,a=0,s=0;s>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?c[6-u.length]+u+r:u+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],p=f[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var s,o,u="le"===e,h=new t(a),c=this.clone();if(u){for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),h[o]=s;for(;o=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var a=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==a&&s>26,this.words[s]=67108863&e;if(0===a&&s>>13,p=0|s[1],d=8191&p,g=p>>>13,m=0|s[2],y=8191&m,A=m>>>13,v=0|s[3],b=8191&v,w=v>>>13,C=0|s[4],E=8191&C,S=C>>>13,I=0|s[5],B=8191&I,_=I>>>13,M=0|s[6],x=8191&M,T=M>>>13,R=0|s[7],F=8191&R,D=R>>>13,k=0|s[8],L=8191&k,N=k>>>13,H=0|s[9],P=8191&H,U=H>>>13,O=0|o[0],Q=8191&O,j=O>>>13,K=0|o[1],G=8191&K,V=K>>>13,q=0|o[2],W=8191&q,z=q>>>13,Y=0|o[3],J=8191&Y,X=Y>>>13,Z=0|o[4],$=8191&Z,tt=Z>>>13,et=0|o[5],rt=8191&et,nt=et>>>13,it=0|o[6],at=8191&it,st=it>>>13,ot=0|o[7],ut=8191&ot,ht=ot>>>13,ct=0|o[8],lt=8191&ct,ft=ct>>>13,pt=0|o[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(h+(n=Math.imul(l,Q))|0)+((8191&(i=(i=Math.imul(l,j))+Math.imul(f,Q)|0))<<13)|0;h=((a=Math.imul(f,j))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(d,Q),i=(i=Math.imul(d,j))+Math.imul(g,Q)|0,a=Math.imul(g,j);var yt=(h+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(f,G)|0))<<13)|0;h=((a=a+Math.imul(f,V)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,j))+Math.imul(A,Q)|0,a=Math.imul(A,j),n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(g,G)|0,a=a+Math.imul(g,V)|0;var At=(h+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,z)|0)+Math.imul(f,W)|0))<<13)|0;h=((a=a+Math.imul(f,z)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(b,Q),i=(i=Math.imul(b,j))+Math.imul(w,Q)|0,a=Math.imul(w,j),n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,V)|0)+Math.imul(A,G)|0,a=a+Math.imul(A,V)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,z)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,z)|0;var vt=(h+(n=n+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(f,J)|0))<<13)|0;h=((a=a+Math.imul(f,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,j))+Math.imul(S,Q)|0,a=Math.imul(S,j),n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,V)|0)+Math.imul(w,G)|0,a=a+Math.imul(w,V)|0,n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,z)|0)+Math.imul(A,W)|0,a=a+Math.imul(A,z)|0,n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,X)|0;var bt=(h+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(f,$)|0))<<13)|0;h=((a=a+Math.imul(f,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,j))+Math.imul(_,Q)|0,a=Math.imul(_,j),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(S,G)|0,a=a+Math.imul(S,V)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,z)|0)+Math.imul(w,W)|0,a=a+Math.imul(w,z)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(A,J)|0,a=a+Math.imul(A,X)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,$)|0,a=a+Math.imul(g,tt)|0;var wt=(h+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(f,rt)|0))<<13)|0;h=((a=a+Math.imul(f,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,j))+Math.imul(T,Q)|0,a=Math.imul(T,j),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,V)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,z)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,z)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(w,J)|0,a=a+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,a=a+Math.imul(g,nt)|0;var Ct=(h+(n=n+Math.imul(l,at)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(f,at)|0))<<13)|0;h=((a=a+Math.imul(f,st)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,j))+Math.imul(D,Q)|0,a=Math.imul(D,j),n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(T,G)|0,a=a+Math.imul(T,V)|0,n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,z)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,z)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(A,rt)|0,a=a+Math.imul(A,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,st)|0;var Et=(h+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(f,ut)|0))<<13)|0;h=((a=a+Math.imul(f,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,j))+Math.imul(N,Q)|0,a=Math.imul(N,j),n=n+Math.imul(F,G)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(D,G)|0,a=a+Math.imul(D,V)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,z)|0)+Math.imul(T,W)|0,a=a+Math.imul(T,z)|0,n=n+Math.imul(B,J)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(w,rt)|0,a=a+Math.imul(w,nt)|0,n=n+Math.imul(y,at)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(A,at)|0,a=a+Math.imul(A,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(g,ut)|0,a=a+Math.imul(g,ht)|0;var St=(h+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ft)|0)+Math.imul(f,lt)|0))<<13)|0;h=((a=a+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(P,Q),i=(i=Math.imul(P,j))+Math.imul(U,Q)|0,a=Math.imul(U,j),n=n+Math.imul(L,G)|0,i=(i=i+Math.imul(L,V)|0)+Math.imul(N,G)|0,a=a+Math.imul(N,V)|0,n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,z)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,z)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(T,J)|0,a=a+Math.imul(T,X)|0,n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(w,at)|0,a=a+Math.imul(w,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(A,ut)|0,a=a+Math.imul(A,ht)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(g,lt)|0,a=a+Math.imul(g,ft)|0;var It=(h+(n=n+Math.imul(l,dt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(f,dt)|0))<<13)|0;h=((a=a+Math.imul(f,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(P,G),i=(i=Math.imul(P,V))+Math.imul(U,G)|0,a=Math.imul(U,V),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,z)|0)+Math.imul(N,W)|0,a=a+Math.imul(N,z)|0,n=n+Math.imul(F,J)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(E,at)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,st)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(w,ut)|0,a=a+Math.imul(w,ht)|0,n=n+Math.imul(y,lt)|0,i=(i=i+Math.imul(y,ft)|0)+Math.imul(A,lt)|0,a=a+Math.imul(A,ft)|0;var Bt=(h+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;h=((a=a+Math.imul(g,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(P,W),i=(i=Math.imul(P,z))+Math.imul(U,W)|0,a=Math.imul(U,z),n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,J)|0,a=a+Math.imul(N,X)|0,n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,nt)|0,n=n+Math.imul(B,at)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(S,ut)|0,a=a+Math.imul(S,ht)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(w,lt)|0,a=a+Math.imul(w,ft)|0;var _t=(h+(n=n+Math.imul(y,dt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(A,dt)|0))<<13)|0;h=((a=a+Math.imul(A,gt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(P,J),i=(i=Math.imul(P,X))+Math.imul(U,J)|0,a=Math.imul(U,X),n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,$)|0,a=a+Math.imul(N,tt)|0,n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(D,rt)|0,a=a+Math.imul(D,nt)|0,n=n+Math.imul(x,at)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(_,ut)|0,a=a+Math.imul(_,ht)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ft)|0;var Mt=(h+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(w,dt)|0))<<13)|0;h=((a=a+Math.imul(w,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(P,$),i=(i=Math.imul(P,tt))+Math.imul(U,$)|0,a=Math.imul(U,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,a=a+Math.imul(N,nt)|0,n=n+Math.imul(F,at)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(T,ut)|0,a=a+Math.imul(T,ht)|0,n=n+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,ft)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ft)|0;var xt=(h+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(S,dt)|0))<<13)|0;h=((a=a+Math.imul(S,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(P,rt),i=(i=Math.imul(P,nt))+Math.imul(U,rt)|0,a=Math.imul(U,nt),n=n+Math.imul(L,at)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(N,at)|0,a=a+Math.imul(N,st)|0,n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ht)|0)+Math.imul(D,ut)|0,a=a+Math.imul(D,ht)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ft)|0;var Tt=(h+(n=n+Math.imul(B,dt)|0)|0)+((8191&(i=(i=i+Math.imul(B,gt)|0)+Math.imul(_,dt)|0))<<13)|0;h=((a=a+Math.imul(_,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(P,at),i=(i=Math.imul(P,st))+Math.imul(U,at)|0,a=Math.imul(U,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,ut)|0,a=a+Math.imul(N,ht)|0,n=n+Math.imul(F,lt)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(D,lt)|0,a=a+Math.imul(D,ft)|0;var Rt=(h+(n=n+Math.imul(x,dt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(T,dt)|0))<<13)|0;h=((a=a+Math.imul(T,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(P,ut),i=(i=Math.imul(P,ht))+Math.imul(U,ut)|0,a=Math.imul(U,ht),n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ft)|0)+Math.imul(N,lt)|0,a=a+Math.imul(N,ft)|0;var Ft=(h+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,gt)|0)+Math.imul(D,dt)|0))<<13)|0;h=((a=a+Math.imul(D,gt)|0)+(i>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,n=Math.imul(P,lt),i=(i=Math.imul(P,ft))+Math.imul(U,lt)|0,a=Math.imul(U,ft);var Dt=(h+(n=n+Math.imul(L,dt)|0)|0)+((8191&(i=(i=i+Math.imul(L,gt)|0)+Math.imul(N,dt)|0))<<13)|0;h=((a=a+Math.imul(N,gt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var kt=(h+(n=Math.imul(P,dt))|0)+((8191&(i=(i=Math.imul(P,gt))+Math.imul(U,dt)|0))<<13)|0;return h=((a=Math.imul(U,gt))+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,u[0]=mt,u[1]=yt,u[2]=At,u[3]=vt,u[4]=bt,u[5]=wt,u[6]=Ct,u[7]=Et,u[8]=St,u[9]=It,u[10]=Bt,u[11]=_t,u[12]=Mt,u[13]=xt,u[14]=Tt,u[15]=Rt,u[16]=Ft,u[17]=Dt,u[18]=kt,0!==h&&(u[19]=h,r.length++),r};function g(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=p),a.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?p(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,s&=67108863}r.words[a]=o,n=s,s=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):g(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},m.prototype.permute=function(t,e,r,n,i,a){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this.length=0===t?1:this.length,this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,h=0;h=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-a|l>>>a,c=l&o}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=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},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===o)return this.strip();for(n(-1===o),o=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var o,u=n.length-i.length;if("mod"!==e){(o=new a(null)).length=u+1,o.words=new Array(o.length);for(var h=0;h=0;l--){var f=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,l);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);o&&(o.words[l]=f)}return o&&o.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:o||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(i=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(i=o.div.neg()),{div:i,mod:o.mod}):0!==(this.negative&t.negative)?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),s=new a(0),o=new a(0),u=new a(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),l=e.clone();!e.isZero();){for(var f=0,p=1;0===(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0===(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(c),u.isub(l)),o.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(o),s.isub(u)):(r.isub(e),o.isub(i),u.isub(s))}return{a:o,b:u,gcd:r.iushln(h)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new a(1),o=new a(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0===(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,f=1;0===(r.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(i=0===e.cmpn(1)?s:o).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new E(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function A(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}A.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},A.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(t,e){t.iushrn(this.n,0,e)},A.prototype.imulK=function(t){return t.imul(this.k)},i(v,A),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,a=s}a>>>=22,t.words[i-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new b;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new C}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var o=new a(1).toRed(this),u=o.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(o);){for(var g=p,m=0;0!==g.cmp(o);m++)g=g.redSqr();n(m=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var l=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++o||0===n&&0===c)&&(i=this.mul(i,r[s]),o=0,s=0)):o=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new S(t)},i(S,E),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},7176(t,e,r){"use strict";var n,i=r(73126),a=r(75795);try{n=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var s=!!n&&a&&a(Object.prototype,"__proto__"),o=Object,u=o.getPrototypeOf;t.exports=s&&"function"==typeof s.get?i([s.get]):"function"==typeof u&&function(t){return u(null==t?t:o(t))}},22010(t,e,r){"use strict";var n=r(92861).Buffer,i=r(3527);function a(t){if(n.isBuffer(t))return t;if("string"==typeof t)return n.from(t,"base64");throw new TypeError("ECDSA signature must be a Base64 string or a Buffer")}function s(t,e,r){for(var n=0;e+n=128&&--n,n}t.exports={derToJose:function(t,e){t=a(t);var r=i(e),s=r+1,o=t.length,u=0;if(48!==t[u++])throw new Error('Could not find expected "seq"');var h=t[u++];if(129===h&&(h=t[u++]),o-u0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function h(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){o(t.precomputed);var r=t._getDoubles(),n=a(e,1,this._bitLength),i=(1<=s;c--)u=(u<<1)+n[c];h.push(u)}for(var l=this.jpoint(null,null,null),f=this.jpoint(null,null,null),p=i;p>0;p--){for(s=0;s=0;h--){for(var c=0;h>=0&&0===s[h];h--)c++;if(h>=0&&c++,u=u.dblp(c),h<0)break;var l=s[h];o(0!==l),u="affine"===t.type?l>0?u.mixedAdd(i[l-1>>1]):u.mixedAdd(i[-l-1>>1].neg()):l>0?u.add(i[l-1>>1]):u.add(i[-l-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){var o,u,h,c=this._wnafT1,l=this._wnafT2,f=this._wnafT3,p=0;for(o=0;o=1;o-=2){var g=o-1,m=o;if(1===c[g]&&1===c[m]){var y=[e[g],null,null,e[m]];0===e[g].y.cmp(e[m].y)?(y[1]=e[g].add(e[m]),y[2]=e[g].toJ().mixedAdd(e[m].neg())):0===e[g].y.cmp(e[m].y.redNeg())?(y[1]=e[g].toJ().mixedAdd(e[m]),y[2]=e[g].add(e[m].neg())):(y[1]=e[g].toJ().mixedAdd(e[m]),y[2]=e[g].toJ().mixedAdd(e[m].neg()));var A=[-3,-1,-5,-7,0,7,5,1,3],v=s(r[g],r[m]);for(p=Math.max(v[0].length,p),f[g]=new Array(p),f[m]=new Array(p),u=0;u=0;o--){for(var S=0;o>=0;){var I=!0;for(u=0;u=0&&S++,C=C.dblp(S),o<0)break;for(u=0;u0?h=l[u][B-1>>1]:B<0&&(h=l[u][-B-1>>1].neg()),C="affine"===h.type?C.mixedAdd(h):C.add(h))}}for(o=0;o=Math.ceil((t.bitLength()+1)/e.step)},h.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},h.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},h.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),a=n.redAdd(e),s=a.redSub(r),o=n.redSub(e),u=i.redMul(s),h=a.redMul(o),c=i.redMul(o),l=s.redMul(a);return this.curve.point(u,h,l,c)},h.prototype._projDbl=function(){var t,e,r,n,i,a,s=this.x.redAdd(this.y).redSqr(),o=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var h=(n=this.curve._mulA(o)).redAdd(u);this.zOne?(t=s.redSub(o).redSub(u).redMul(h.redSub(this.curve.two)),e=h.redMul(n.redSub(u)),r=h.redSqr().redSub(h).redSub(h)):(i=this.z.redSqr(),a=h.redSub(i).redISub(i),t=s.redSub(o).redISub(u).redMul(a),e=h.redMul(n.redSub(u)),r=h.redMul(a))}else n=o.redAdd(u),i=this.curve._mulC(this.z).redSqr(),a=n.redSub(i).redSub(i),t=this.curve._mulC(s.redISub(n)).redMul(a),e=this.curve._mulC(n).redMul(o.redISub(u)),r=n.redMul(a);return this.curve.point(t,e,r)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},h.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),a=r.redSub(e),s=i.redSub(n),o=i.redAdd(n),u=r.redAdd(e),h=a.redMul(s),c=o.redMul(u),l=a.redMul(u),f=s.redMul(o);return this.curve.point(h,c,f,l)},h.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),a=this.x.redMul(t.x),s=this.y.redMul(t.y),o=this.curve.d.redMul(a).redMul(s),u=i.redSub(o),h=i.redAdd(o),c=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(a).redISub(s),l=n.redMul(u).redMul(c);return this.curve.twisted?(e=n.redMul(h).redMul(s.redSub(this.curve._mulA(a))),r=u.redMul(h)):(e=n.redMul(h).redMul(s.redSub(a)),r=this.curve._mulC(u).redMul(h)),this.curve.point(l,e,r)},h.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},h.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},h.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},h.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},h.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()},h.prototype.getY=function(){return this.normalize(),this.y.fromRed()},h.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},h.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},h.prototype.toP=h.prototype.normalize,h.prototype.mixedAdd=h.prototype.add},894(t,e,r){"use strict";var n=e;n.base=r(36677),n.short=r(39188),n.mont=r(30370),n.edwards=r(31298)},30370(t,e,r){"use strict";var n=r(28490),i=r(56698),a=r(36677),s=r(47011);function o(t){a.call(this,"mont",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,r){a.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(o,a),t.exports=o,o.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},i(u,a.BasePoint),o.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},o.prototype.point=function(t,e){return new u(this,t,e)},o.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),a=t.x.redSub(t.z).redMul(r),s=i.redMul(n),o=e.z.redMul(a.redAdd(s).redSqr()),u=e.x.redMul(a.redISub(s).redSqr());return this.curve.point(o,u)},u.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var a=i.length-1;a>=0;a--)0===i[a]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},39188(t,e,r){"use strict";var n=r(47011),i=r(28490),a=r(56698),s=r(36677),o=n.assert;function u(t){s.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.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(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function h(t,e,r,n){s.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(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 c(t,e,r,n){s.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,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}a(u,s),t.exports=u,u.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new i(t.lambda,16);else{var a=this._getEndoRoots(this.n);0===this.g.mul(a[0]).x.cmp(this.g.x.redMul(e))?r=a[0]:(r=a[1],o(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map(function(t){return{a:new i(t.a,16),b:new i(t.b,16)}}):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=new i(2).toRed(e).redInvm(),n=r.redNeg(),a=new i(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(a).fromRed(),n.redSub(a).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,r,n,a,s,o,u,h,c,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=t,p=this.n.clone(),d=new i(1),g=new i(0),m=new i(0),y=new i(1),A=0;0!==f.cmpn(0);){var v=p.div(f);h=p.sub(v.mul(f)),c=m.sub(v.mul(d));var b=y.sub(v.mul(g));if(!n&&h.cmp(l)<0)e=u.neg(),r=d,n=h.neg(),a=c;else if(n&&2===++A)break;u=h,p=f,f=h,m=d,d=c,y=g,g=b}s=h.neg(),o=c;var w=n.sqr().add(a.sqr());return s.sqr().add(o.sqr()).cmp(w)>=0&&(s=e,o=r),n.negative&&(n=n.neg(),a=a.neg()),s.negative&&(s=s.neg(),o=o.neg()),[{a:n,b:a},{a:s,b:o}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),a=r.b.neg().mul(t).divRound(this.n),s=i.mul(r.a),o=a.mul(n.a),u=i.mul(r.b),h=a.mul(n.b);return{k1:t.sub(s).sub(o),k2:u.add(h).neg()}},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var a=n.fromRed().isOdd();return(e&&!a||!e&&a)&&(n=n.redNeg()),this.point(t,n)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,a=0;a":""},h.prototype.isInfinity=function(){return this.inf},h.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},h.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),a=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,s)},h.prototype.getX=function(){return this.x.fromRed()},h.prototype.getY=function(){return this.y.fromRed()},h.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},h.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},h.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},h.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},h.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(c,s.BasePoint),u.prototype.jpoint=function(t,e,r){return new c(this,t,e,r)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),a=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),o=n.redSub(i),u=a.redSub(s);if(0===o.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=o.redSqr(),c=h.redMul(o),l=n.redMul(h),f=u.redSqr().redIAdd(c).redISub(l).redISub(l),p=u.redMul(l.redISub(f)).redISub(a.redMul(c)),d=this.z.redMul(t.z).redMul(o);return this.curve.jpoint(f,p,d)},c.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,a=t.y.redMul(e).redMul(this.z),s=r.redSub(n),o=i.redSub(a);if(0===s.cmpn(0))return 0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),h=u.redMul(s),c=r.redMul(u),l=o.redSqr().redIAdd(h).redISub(c).redISub(c),f=o.redMul(c.redISub(l)).redISub(i.redMul(h)),p=this.z.redMul(s);return this.curve.jpoint(l,f,p)},c.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},60480(t,e,r){"use strict";var n,i=e,a=r(77952),s=r(894),o=r(47011).assert;function u(t){"short"===t.type?this.curve=new s.short(t):"edwards"===t.type?this.curve=new s.edwards(t):this.curve=new s.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function h(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,h("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:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),h("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:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),h("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:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),h("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:a.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"]}),h("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:a.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"]}),h("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),h("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:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(74011)}catch(t){n=void 0}h("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:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},57447(t,e,r){"use strict";var n=r(28490),i=r(32723),a=r(47011),s=r(60480),o=r(15037),u=a.assert,h=r(61200),c=r(28545);function l(t){if(!(this instanceof l))return new l(t);"string"==typeof t&&(u(Object.prototype.hasOwnProperty.call(s,t),"Unknown curve "+t),t=s[t]),t instanceof s.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=l,l.prototype.keyPair=function(t){return new h(this,t)},l.prototype.keyFromPrivate=function(t,e){return h.fromPrivate(this,t,e)},l.prototype.keyFromPublic=function(t,e){return h.fromPublic(this,t,e)},l.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||o(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),a=this.n.sub(new n(2));;){var s=new n(e.generate(r));if(!(s.cmp(a)>0))return s.iaddn(1),this.keyFromPrivate(s)}},l.prototype._truncateToN=function(t,e,r){var i;if(n.isBN(t)||"number"==typeof t)i=(t=new n(t,16)).byteLength();else if("object"==typeof t)i=t.length,t=new n(t,16);else{var a=t.toString();i=a.length+1>>>1,t=new n(a,16)}"number"!=typeof r&&(r=8*i);var s=r-this.n.bitLength();return s>0&&(t=t.ushrn(s)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},l.prototype.sign=function(t,e,r,a){if("object"==typeof r&&(a=r,r=null),a||(a={}),"string"!=typeof t&&"number"!=typeof t&&!n.isBN(t)){u("object"==typeof t&&t&&"number"==typeof t.length,"Expected message to be an array-like, a hex string, or a BN instance"),u(t.length>>>0===t.length);for(var s=0;s=0)){var m=this.g.mul(g);if(!m.isInfinity()){var y=m.getX(),A=y.umod(this.n);if(0!==A.cmpn(0)){var v=g.invm(this.n).mul(A.mul(e.getPrivate()).iadd(t));if(0!==(v=v.umod(this.n)).cmpn(0)){var b=(m.getY().isOdd()?1:0)|(0!==y.cmp(A)?2:0);return a.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new c({r:A,s:v,recoveryParam:b})}}}}}},l.prototype.verify=function(t,e,r,n,i){i||(i={}),t=this._truncateToN(t,!1,i.msgBitLength),r=this.keyFromPublic(r,n);var a=(e=new c(e,"hex")).r,s=e.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var o,u=s.invm(this.n),h=u.mul(t).umod(this.n),l=u.mul(a).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(h,r.getPublic(),l)).isInfinity()&&o.eqXToP(a):!(o=this.g.mulAdd(h,r.getPublic(),l)).isInfinity()&&0===o.getX().umod(this.n).cmp(a)},l.prototype.recoverPubKey=function(t,e,r,i){u((3&r)===r,"The recovery param is more than two bits"),e=new c(e,i);var a=this.n,s=new n(t),o=e.r,h=e.s,l=1&r,f=r>>1;if(o.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");o=f?this.curve.pointFromX(o.add(this.curve.n),l):this.curve.pointFromX(o,l);var p=e.r.invm(a),d=a.sub(s).mul(p).umod(a),g=h.mul(p).umod(a);return this.g.mulAdd(d,o,g)},l.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new c(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(t,e,i)}catch(t){continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},61200(t,e,r){"use strict";var n=r(28490),i=r(47011).assert;function a(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=a,a.fromPublic=function(t,e,r){return e instanceof a?e:new a(t,{pub:e,pubEnc:r})},a.fromPrivate=function(t,e,r){return e instanceof a?e:new a(t,{priv:e,privEnc:r})},a.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.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"}},a.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},a.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},a.prototype.derive=function(t){return t.validate()||i(t.validate(),"public point not validated"),t.mul(this.priv).getX()},a.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},a.prototype.verify=function(t,e,r){return this.ec.verify(t,e,this,void 0,r)},a.prototype.inspect=function(){return""}},28545(t,e,r){"use strict";var n=r(28490),i=r(47011),a=i.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(a(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function o(){this.place=0}function u(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;if(0===t[e.place])return!1;for(var i=0,a=0,s=e.place;a>>=0;return!(i<=127)&&(e.place=s,i)}function h(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new o;if(48!==t[r.place++])return!1;var a=u(t,r);if(!1===a)return!1;if(a+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var s=u(t,r);if(!1===s)return!1;if(128&t[r.place])return!1;var h=t.slice(r.place,s+r.place);if(r.place+=s,2!==t[r.place++])return!1;var c=u(t,r);if(!1===c)return!1;if(t.length!==c+r.place)return!1;if(128&t[r.place])return!1;var l=t.slice(r.place,c+r.place);if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new n(h),this.s=new n(l),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=h(e),r=h(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];c(n,e.length),(n=n.concat(e)).push(2),c(n,r.length);var a=n.concat(r),s=[48];return c(s,a.length),s=s.concat(a),i.encode(s,t)}},8650(t,e,r){"use strict";var n=r(77952),i=r(60480),a=r(47011),s=a.assert,o=a.parseBytes,u=r(46661),h=r(90220);function c(t){if(s("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof c))return new c(t);t=i[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=c,c.prototype.sign=function(t,e){t=o(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),a=this.encodePoint(i),s=this.hashInt(a,r.pubBytes(),t).mul(r.priv()),u=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:a})},c.prototype.verify=function(t,e,r){if(t=o(t),(e=this.makeSignature(e)).S().gte(e.eddsa.curve.n)||e.S().isNeg())return!1;var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),a=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(a)},c.prototype.hashInt=function(){for(var t=this.hash(),e=0;e(a>>1)-1?(a>>1)-u:u,s.isubn(o)):o=0,i[n]=o,s.iushrn(1)}return i},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,a=0;t.cmpn(-i)>0||e.cmpn(-a)>0;){var s,o,u=t.andln(3)+i&3,h=e.andln(3)+a&3;3===u&&(u=-1),3===h&&(h=-1),s=1&u?3!=(n=t.andln(7)+i&7)&&5!==n||2!==h?u:-u:0,r[0].push(s),o=1&h?3!=(n=e.andln(7)+a&7)&&5!==n||2!==u?h:-h:0,r[1].push(o),2*i===s+1&&(i=1-i),2*a===o+1&&(a=1-a),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"==typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},28490(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(79368).Buffer}catch(t){}function o(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=o(t,r);return r-1>=e&&(n|=o(t,r-1)<<4),n}function h(t,e,r,n){for(var i=0,a=Math.min(t.length,r),s=e;s=49?o-49+10:o>=17?o-17+10:o}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,s=a%n,o=Math.min(a,a-s)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var c=["","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],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],s=i*a,o=67108863&s,u=s/67108864|0;r.words[0]=o;for(var h=1;h>>26,l=67108863&u,f=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);p<=f;p++){var d=h-p|0;c+=(s=(i=0|t.words[d])*(a=0|e.words[p])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,a=0,s=0;s>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?c[6-u.length]+u+r:u+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],p=f[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var s,o,u="le"===e,h=new t(a),c=this.clone();if(u){for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),h[o]=s;for(;o=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var a=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==a&&s>26,this.words[s]=67108863&e;if(0===a&&s>>13,p=0|s[1],d=8191&p,g=p>>>13,m=0|s[2],y=8191&m,A=m>>>13,v=0|s[3],b=8191&v,w=v>>>13,C=0|s[4],E=8191&C,S=C>>>13,I=0|s[5],B=8191&I,_=I>>>13,M=0|s[6],x=8191&M,T=M>>>13,R=0|s[7],F=8191&R,D=R>>>13,k=0|s[8],L=8191&k,N=k>>>13,H=0|s[9],P=8191&H,U=H>>>13,O=0|o[0],Q=8191&O,j=O>>>13,K=0|o[1],G=8191&K,V=K>>>13,q=0|o[2],W=8191&q,z=q>>>13,Y=0|o[3],J=8191&Y,X=Y>>>13,Z=0|o[4],$=8191&Z,tt=Z>>>13,et=0|o[5],rt=8191&et,nt=et>>>13,it=0|o[6],at=8191&it,st=it>>>13,ot=0|o[7],ut=8191&ot,ht=ot>>>13,ct=0|o[8],lt=8191&ct,ft=ct>>>13,pt=0|o[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(h+(n=Math.imul(l,Q))|0)+((8191&(i=(i=Math.imul(l,j))+Math.imul(f,Q)|0))<<13)|0;h=((a=Math.imul(f,j))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(d,Q),i=(i=Math.imul(d,j))+Math.imul(g,Q)|0,a=Math.imul(g,j);var yt=(h+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(f,G)|0))<<13)|0;h=((a=a+Math.imul(f,V)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,j))+Math.imul(A,Q)|0,a=Math.imul(A,j),n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(g,G)|0,a=a+Math.imul(g,V)|0;var At=(h+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,z)|0)+Math.imul(f,W)|0))<<13)|0;h=((a=a+Math.imul(f,z)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(b,Q),i=(i=Math.imul(b,j))+Math.imul(w,Q)|0,a=Math.imul(w,j),n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,V)|0)+Math.imul(A,G)|0,a=a+Math.imul(A,V)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,z)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,z)|0;var vt=(h+(n=n+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(f,J)|0))<<13)|0;h=((a=a+Math.imul(f,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,j))+Math.imul(S,Q)|0,a=Math.imul(S,j),n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,V)|0)+Math.imul(w,G)|0,a=a+Math.imul(w,V)|0,n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,z)|0)+Math.imul(A,W)|0,a=a+Math.imul(A,z)|0,n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,X)|0;var bt=(h+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(f,$)|0))<<13)|0;h=((a=a+Math.imul(f,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,j))+Math.imul(_,Q)|0,a=Math.imul(_,j),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(S,G)|0,a=a+Math.imul(S,V)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,z)|0)+Math.imul(w,W)|0,a=a+Math.imul(w,z)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(A,J)|0,a=a+Math.imul(A,X)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,$)|0,a=a+Math.imul(g,tt)|0;var wt=(h+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(f,rt)|0))<<13)|0;h=((a=a+Math.imul(f,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,j))+Math.imul(T,Q)|0,a=Math.imul(T,j),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,V)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,z)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,z)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(w,J)|0,a=a+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,a=a+Math.imul(g,nt)|0;var Ct=(h+(n=n+Math.imul(l,at)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(f,at)|0))<<13)|0;h=((a=a+Math.imul(f,st)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,j))+Math.imul(D,Q)|0,a=Math.imul(D,j),n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(T,G)|0,a=a+Math.imul(T,V)|0,n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,z)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,z)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(A,rt)|0,a=a+Math.imul(A,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,st)|0;var Et=(h+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(f,ut)|0))<<13)|0;h=((a=a+Math.imul(f,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,j))+Math.imul(N,Q)|0,a=Math.imul(N,j),n=n+Math.imul(F,G)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(D,G)|0,a=a+Math.imul(D,V)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,z)|0)+Math.imul(T,W)|0,a=a+Math.imul(T,z)|0,n=n+Math.imul(B,J)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(w,rt)|0,a=a+Math.imul(w,nt)|0,n=n+Math.imul(y,at)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(A,at)|0,a=a+Math.imul(A,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(g,ut)|0,a=a+Math.imul(g,ht)|0;var St=(h+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ft)|0)+Math.imul(f,lt)|0))<<13)|0;h=((a=a+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(P,Q),i=(i=Math.imul(P,j))+Math.imul(U,Q)|0,a=Math.imul(U,j),n=n+Math.imul(L,G)|0,i=(i=i+Math.imul(L,V)|0)+Math.imul(N,G)|0,a=a+Math.imul(N,V)|0,n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,z)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,z)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(T,J)|0,a=a+Math.imul(T,X)|0,n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(w,at)|0,a=a+Math.imul(w,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(A,ut)|0,a=a+Math.imul(A,ht)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(g,lt)|0,a=a+Math.imul(g,ft)|0;var It=(h+(n=n+Math.imul(l,dt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(f,dt)|0))<<13)|0;h=((a=a+Math.imul(f,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(P,G),i=(i=Math.imul(P,V))+Math.imul(U,G)|0,a=Math.imul(U,V),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,z)|0)+Math.imul(N,W)|0,a=a+Math.imul(N,z)|0,n=n+Math.imul(F,J)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(E,at)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,st)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(w,ut)|0,a=a+Math.imul(w,ht)|0,n=n+Math.imul(y,lt)|0,i=(i=i+Math.imul(y,ft)|0)+Math.imul(A,lt)|0,a=a+Math.imul(A,ft)|0;var Bt=(h+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;h=((a=a+Math.imul(g,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(P,W),i=(i=Math.imul(P,z))+Math.imul(U,W)|0,a=Math.imul(U,z),n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,J)|0,a=a+Math.imul(N,X)|0,n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,nt)|0,n=n+Math.imul(B,at)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(S,ut)|0,a=a+Math.imul(S,ht)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(w,lt)|0,a=a+Math.imul(w,ft)|0;var _t=(h+(n=n+Math.imul(y,dt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(A,dt)|0))<<13)|0;h=((a=a+Math.imul(A,gt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(P,J),i=(i=Math.imul(P,X))+Math.imul(U,J)|0,a=Math.imul(U,X),n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,$)|0,a=a+Math.imul(N,tt)|0,n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(D,rt)|0,a=a+Math.imul(D,nt)|0,n=n+Math.imul(x,at)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(_,ut)|0,a=a+Math.imul(_,ht)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ft)|0;var Mt=(h+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(w,dt)|0))<<13)|0;h=((a=a+Math.imul(w,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(P,$),i=(i=Math.imul(P,tt))+Math.imul(U,$)|0,a=Math.imul(U,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,a=a+Math.imul(N,nt)|0,n=n+Math.imul(F,at)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(T,ut)|0,a=a+Math.imul(T,ht)|0,n=n+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,ft)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ft)|0;var xt=(h+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(S,dt)|0))<<13)|0;h=((a=a+Math.imul(S,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(P,rt),i=(i=Math.imul(P,nt))+Math.imul(U,rt)|0,a=Math.imul(U,nt),n=n+Math.imul(L,at)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(N,at)|0,a=a+Math.imul(N,st)|0,n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ht)|0)+Math.imul(D,ut)|0,a=a+Math.imul(D,ht)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ft)|0;var Tt=(h+(n=n+Math.imul(B,dt)|0)|0)+((8191&(i=(i=i+Math.imul(B,gt)|0)+Math.imul(_,dt)|0))<<13)|0;h=((a=a+Math.imul(_,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(P,at),i=(i=Math.imul(P,st))+Math.imul(U,at)|0,a=Math.imul(U,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,ut)|0,a=a+Math.imul(N,ht)|0,n=n+Math.imul(F,lt)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(D,lt)|0,a=a+Math.imul(D,ft)|0;var Rt=(h+(n=n+Math.imul(x,dt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(T,dt)|0))<<13)|0;h=((a=a+Math.imul(T,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(P,ut),i=(i=Math.imul(P,ht))+Math.imul(U,ut)|0,a=Math.imul(U,ht),n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ft)|0)+Math.imul(N,lt)|0,a=a+Math.imul(N,ft)|0;var Ft=(h+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,gt)|0)+Math.imul(D,dt)|0))<<13)|0;h=((a=a+Math.imul(D,gt)|0)+(i>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,n=Math.imul(P,lt),i=(i=Math.imul(P,ft))+Math.imul(U,lt)|0,a=Math.imul(U,ft);var Dt=(h+(n=n+Math.imul(L,dt)|0)|0)+((8191&(i=(i=i+Math.imul(L,gt)|0)+Math.imul(N,dt)|0))<<13)|0;h=((a=a+Math.imul(N,gt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var kt=(h+(n=Math.imul(P,dt))|0)+((8191&(i=(i=Math.imul(P,gt))+Math.imul(U,dt)|0))<<13)|0;return h=((a=Math.imul(U,gt))+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,u[0]=mt,u[1]=yt,u[2]=At,u[3]=vt,u[4]=bt,u[5]=wt,u[6]=Ct,u[7]=Et,u[8]=St,u[9]=It,u[10]=Bt,u[11]=_t,u[12]=Mt,u[13]=xt,u[14]=Tt,u[15]=Rt,u[16]=Ft,u[17]=Dt,u[18]=kt,0!==h&&(u[19]=h,r.length++),r};function g(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=p),a.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?p(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,s&=67108863}r.words[a]=o,n=s,s=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):g(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},m.prototype.permute=function(t,e,r,n,i,a){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this.length=0===t?1:this.length,this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,h=0;h=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-a|l>>>a,c=l&o}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=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},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===o)return this.strip();for(n(-1===o),o=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var o,u=n.length-i.length;if("mod"!==e){(o=new a(null)).length=u+1,o.words=new Array(o.length);for(var h=0;h=0;l--){var f=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,l);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);o&&(o.words[l]=f)}return o&&o.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:o||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(i=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(i=o.div.neg()),{div:i,mod:o.mod}):0!==(this.negative&t.negative)?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),s=new a(0),o=new a(0),u=new a(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),l=e.clone();!e.isZero();){for(var f=0,p=1;0===(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0===(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(c),u.isub(l)),o.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(o),s.isub(u)):(r.isub(e),o.isub(i),u.isub(s))}return{a:o,b:u,gcd:r.iushln(h)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new a(1),o=new a(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0===(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,f=1;0===(r.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(i=0===e.cmpn(1)?s:o).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new E(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function A(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}A.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},A.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(t,e){t.iushrn(this.n,0,e)},A.prototype.imulK=function(t){return t.imul(this.k)},i(v,A),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,a=s}a>>>=22,t.words[i-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new b;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new C}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var o=new a(1).toRed(this),u=o.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(o);){for(var g=p,m=0;0!==g.cmp(o);m++)g=g.redSqr();n(m=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var l=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++o||0===n&&0===c)&&(i=this.mul(i,r[s]),o=0,s=0)):o=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new S(t)},i(S,E),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},30655(t){"use strict";var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}t.exports=e},41237(t){"use strict";t.exports=EvalError},69383(t){"use strict";t.exports=Error},79290(t){"use strict";t.exports=RangeError},79538(t){"use strict";t.exports=ReferenceError},58068(t){"use strict";t.exports=SyntaxError},69675(t){"use strict";t.exports=TypeError},35345(t){"use strict";t.exports=URIError},79612(t){"use strict";t.exports=Object},37007(t){"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise(function(r,n){function i(r){t.removeListener(e,a),n(r)}function a(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}g(t,e,a,{once:!0}),"error"!==e&&function(t,e){"function"==typeof t.on&&g(t,"error",e,{once:!0})}(t,i)})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function o(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function h(t,e,r,n){var i,a,s,h;if(o(r),void 0===(a=t._events)?(a=t._events=Object.create(null),t._eventsCount=0):(void 0!==a.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),s=a[e]),void 0===s)s=a[e]=r,++t._eventsCount;else if("function"==typeof s?s=a[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,h=c,console&&console.warn&&console.warn(h)}return t}function c(){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 l(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function f(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(s=e[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var u=a[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var h=u.length,c=d(u,h);for(r=0;r=0;a--)if(r[a]===e||r[a].listener===e){s=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return f(this,t,!0)},a.prototype.rawListeners=function(t){return f(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},68078(t,e,r){var n=r(92861).Buffer,i=r(88276);t.exports=function(t,e,r,a){if(n.isBuffer(t)||(t=n.from(t,"binary")),e&&(n.isBuffer(e)||(e=n.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,o=n.alloc(s),u=n.alloc(a||0),h=n.alloc(0);s>0||a>0;){var c=new i;c.update(h),c.update(t),e&&c.update(e),h=c.digest();var l=0;if(s>0){var f=o.length-s;l=Math.min(s,h.length),h.copy(o,f,0,l),s-=l}if(l0){var p=u.length-a,d=Math.min(a,h.length-l);h.copy(u,p,l,l+d),a-=d}}return h.fill(0),{key:o,iv:u}}},60301(t,e,r){"use strict";var n=r(69600),i=Object.prototype.toString,a=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=r),"[object Array]"===i.call(t)?function(t,e,r){for(var n=0,i=t.length;n1&&"boolean"!=typeof e)throw new c('"allowMissing" argument must be a boolean');if(null===K(/^%?[^%]*%?$/,t))throw new h("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=j(t,0,1),r=j(t,-1);if("%"===e&&"%"!==r)throw new h("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new h("invalid intrinsic syntax, expected opening `%`");var n=[];return Q(t,G,function(t,e,r,i){n[n.length]=r?Q(i,V,"$1"):e||t}),n}(t),n=r.length>0?r[0]:"",i=q("%"+n+"%",e),a=i.name,s=i.value,o=!1,u=i.alias;u&&(n=u[0],O(r,U([0,1],u)));for(var l=1,f=!0;l=r.length){var m=w(s,p);s=(f=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:s[p]}else f=P(s,p),s=s[p];f&&!o&&(D[a]=s)}}return s}},71064(t,e,r){"use strict";var n=r(79612);t.exports=n.getPrototypeOf||null},48648(t){"use strict";t.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},93628(t,e,r){"use strict";var n=r(48648),i=r(71064),a=r(7176);t.exports=n?function(t){return n(t)}:i?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return i(t)}:a?function(t){return a(t)}:null},6549(t){"use strict";t.exports=Object.getOwnPropertyDescriptor},75795(t,e,r){"use strict";var n=r(6549);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},30592(t,e,r){"use strict";var n=r(30655),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},64039(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(41333);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},41333(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var i=Object.getOwnPropertySymbols(t);if(1!==i.length||i[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(t,e);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},49092(t,e,r){"use strict";var n=r(41333);t.exports=function(){return n()&&!!Symbol.toStringTag}},4729(t,e,r){"use strict";var n=r(92861).Buffer,i=r(88310).Transform;function a(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(56698)(a,i),a.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},a.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)};var s="undefined"!=typeof Uint8Array,o="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&ArrayBuffer.isView&&(n.prototype instanceof Uint8Array||n.TYPED_ARRAY_SUPPORT);a.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");t=function(t,e){if(t instanceof n)return t;if("string"==typeof t)return n.from(t,e);if(o&&ArrayBuffer.isView(t)){if(0===t.byteLength)return n.alloc(0);var r=n.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}if(s&&t instanceof Uint8Array)return n.from(t);if(n.isBuffer(t)&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return n.from(t);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}(t,e);for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var a=this._blockOffset;a0;++u)this._length[u]+=h,(h=this._length[u]/4294967296|0)>0&&(this._length[u]-=4294967296*h);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},a.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=a},77952(t,e,r){var n=e;n.utils=r(67426),n.common=r(66166),n.sha=r(46229),n.ripemd=r(46784),n.hmac=r(28948),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},66166(t,e,r){"use strict";var n=r(67426),i=r(43349);function a(){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=a,a.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;athis.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},67426(t,e,r){"use strict";var n=r(43349),i=r(56698);function a(t,e){return 55296==(64512&t.charCodeAt(e))&&!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function o(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i>6|192,r[n++]=63&s|128):a(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],a=n+t[e+1]>>>0,s=(a>>0,t[e+1]=a},e.sum64_hi=function(t,e,r,n){return(e+n>>>0>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,a,s,o){var u=0,h=e;return u+=(h=h+n>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,r,n,i,a,s,o){return e+n+a+o>>>0},e.sum64_5_hi=function(t,e,r,n,i,a,s,o,u,h){var c=0,l=e;return c+=(l=l+n>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,r,n,i,a,s,o,u,h){return e+n+a+o+h>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},9957(t,e,r){"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,a=r(66743);t.exports=a.call(n,i)},32723(t,e,r){"use strict";var n=r(77952),i=r(64367),a=r(43349);function s(t){if(!(this instanceof s))return new s(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex"),n=i.toArray(t.pers,t.persEnc||"hex");a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}t.exports=s,s.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},s.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var a=[];a.length>1,c=-7,l=r?i-1:0,f=r?-1:1,p=t[e+l];for(l+=f,a=p&(1<<-c)-1,p>>=-c,c+=o;c>0;a=256*a+t[e+l],l+=f,c-=8);for(s=a&(1<<-c)-1,a>>=-c,c+=n;c>0;s=256*s+t[e+l],l+=f,c-=8);if(0===a)a=1-h;else{if(a===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),a-=h}return(p?-1:1)*s*Math.pow(2,a-n)},e.write=function(t,e,r,n,i,a){var s,o,u,h=8*a-i-1,c=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+l>=1?f/u:f*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=c?(o=0,s=c):s+l>=1?(o=(e*u-1)*Math.pow(2,i),s+=l):(o=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&o,p+=d,o/=256,i-=8);for(s=s<0;t[r+p]=255&s,p+=d,s/=256,h-=8);t[r+p-d]|=128*g}},72057(t,e,r){var n=r(28413);function i(t,e){n.cipher.registerAlgorithm(t,function(){return new n.aes.Algorithm(t,e)})}r(10207),r(19111),r(23564),t.exports=n.aes=n.aes||{},n.aes.startEncrypting=function(t,e,r,n){var i=d({key:t,output:r,decrypt:!1,mode:n});return i.start(e),i},n.aes.createEncryptionCipher=function(t,e){return d({key:t,output:null,decrypt:!1,mode:e})},n.aes.startDecrypting=function(t,e,r,n){var i=d({key:t,output:r,decrypt:!0,mode:n});return i.start(e),i},n.aes.createDecryptionCipher=function(t,e){return d({key:t,output:null,decrypt:!0,mode:e})},n.aes.Algorithm=function(t,e){c||l();var r=this;r.name=t,r.mode=new e({blockSize:16,cipher:{encrypt:function(t,e){return p(r._w,t,e,!1)},decrypt:function(t,e){return p(r._w,t,e,!0)}}}),r._init=!1},n.aes.Algorithm.prototype.initialize=function(t){if(!this._init){var e,r=t.key;if("string"!=typeof r||16!==r.length&&24!==r.length&&32!==r.length){if(n.util.isArray(r)&&(16===r.length||24===r.length||32===r.length)){e=r,r=n.util.createBuffer();for(var i=0;i>>=2,i=0;i>8^255&l^99,a[g]=l,s[l]=g,p=(f=t[l])<<24^l<<16^l<<8^l^f,d=((r=t[g])^(n=t[r])^(i=t[n]))<<24^(g^i)<<16^(g^n^i)<<8^g^r^i;for(var y=0;y<4;++y)u[y][g]=p,h[y][l]=d,p=p<<24|p>>>8,d=d<<24|d>>>8;0===g?g=m=1:(g=r^t[t[t[r^i]]],m^=t[t[m]])}}function f(t,e){for(var r,n=t.slice(0),i=1,s=n.length,u=4*(s+6+1),c=s;c>>16&255]<<24^a[r>>>8&255]<<16^a[255&r]<<8^a[r>>>24]^o[i]<<24,i++):s>6&&c%s===4&&(r=a[r>>>24]<<24^a[r>>>16&255]<<16^a[r>>>8&255]<<8^a[255&r]),n[c]=n[c-s]^r;if(e){for(var l,f=h[0],p=h[1],d=h[2],g=h[3],m=n.slice(0),y=(c=0,(u=n.length)-4);c>>24]]^p[a[l>>>16&255]]^d[a[l>>>8&255]]^g[a[255&l]];n=m}return n}function p(t,e,r,n){var i,o,c,l,f,p,d,g,m,y,A,v,b=t.length/4-1;n?(i=h[0],o=h[1],c=h[2],l=h[3],f=s):(i=u[0],o=u[1],c=u[2],l=u[3],f=a),p=e[0]^t[0],d=e[n?3:1]^t[1],g=e[2]^t[2],m=e[n?1:3]^t[3];for(var w=3,C=1;C>>24]^o[d>>>16&255]^c[g>>>8&255]^l[255&m]^t[++w],A=i[d>>>24]^o[g>>>16&255]^c[m>>>8&255]^l[255&p]^t[++w],v=i[g>>>24]^o[m>>>16&255]^c[p>>>8&255]^l[255&d]^t[++w],m=i[m>>>24]^o[p>>>16&255]^c[d>>>8&255]^l[255&g]^t[++w],p=y,d=A,g=v;r[0]=f[p>>>24]<<24^f[d>>>16&255]<<16^f[g>>>8&255]<<8^f[255&m]^t[++w],r[n?3:1]=f[d>>>24]<<24^f[g>>>16&255]<<16^f[m>>>8&255]<<8^f[255&p]^t[++w],r[2]=f[g>>>24]<<24^f[m>>>16&255]<<16^f[p>>>8&255]<<8^f[255&d]^t[++w],r[n?1:3]=f[m>>>24]<<24^f[p>>>16&255]<<16^f[d>>>8&255]<<8^f[255&g]^t[++w]}function d(t){var e,r="AES-"+((t=t||{}).mode||"CBC").toUpperCase(),i=(e=t.decrypt?n.cipher.createDecipher(r,t.key):n.cipher.createCipher(r,t.key)).start;return e.start=function(t,r){var a=null;r instanceof n.util.ByteBuffer&&(a=r,r={}),(r=r||{}).output=a,r.iv=t,i.call(e,r)},e}},73115(t,e,r){var n=r(28413);r(72057),r(88415);var i=t.exports=n.tls;function a(t,e,r){var a=e.entity===n.tls.ConnectionEnd.client;t.read.cipherState={init:!1,cipher:n.cipher.createDecipher("AES-CBC",a?r.keys.server_write_key:r.keys.client_write_key),iv:a?r.keys.server_write_IV:r.keys.client_write_IV},t.write.cipherState={init:!1,cipher:n.cipher.createCipher("AES-CBC",a?r.keys.client_write_key:r.keys.server_write_key),iv:a?r.keys.client_write_IV:r.keys.server_write_IV},t.read.cipherFunction=h,t.write.cipherFunction=s,t.read.macLength=t.write.macLength=r.mac_length,t.read.macFunction=t.write.macFunction=i.hmac_sha1}function s(t,e){var r,a=!1,s=e.macFunction(e.macKey,e.sequenceNumber,t);t.fragment.putBytes(s),e.updateSequenceNumber(),r=t.version.minor===i.Versions.TLS_1_0.minor?e.cipherState.init?null:e.cipherState.iv:n.random.getBytesSync(16),e.cipherState.init=!0;var u=e.cipherState.cipher;return u.start({iv:r}),t.version.minor>=i.Versions.TLS_1_1.minor&&u.output.putBytes(r),u.update(t.fragment),u.finish(o)&&(t.fragment=u.output,t.length=t.fragment.length(),a=!0),a}function o(t,e,r){if(!r){var n=t-e.length()%t;e.fillWithByte(n-1,n)}return!0}function u(t,e,r){var n=!0;if(r){for(var i=e.length(),a=e.last(),s=i-1-a;s=o?(t.fragment=s.output.getBytes(c-o),h=s.output.getBytes(o)):t.fragment=s.output.getBytes(),t.fragment=n.util.createBuffer(t.fragment),t.length=t.fragment.length();var l=e.macFunction(e.macKey,e.sequenceNumber,t);return e.updateSequenceNumber(),a=function(t,e,r){var i=n.hmac.create();return i.start("SHA1",t),i.update(e),e=i.digest().getBytes(),i.start(null,null),i.update(r),e===(r=i.digest().getBytes())}(e.macKey,h,l)&&a,a}i.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(t){t.bulk_cipher_algorithm=i.BulkCipherAlgorithm.aes,t.cipher_type=i.CipherType.block,t.enc_key_length=16,t.block_length=16,t.fixed_iv_length=16,t.record_iv_length=16,t.mac_algorithm=i.MACAlgorithm.hmac_sha1,t.mac_length=20,t.mac_key_length=20},initConnectionState:a},i.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(t){t.bulk_cipher_algorithm=i.BulkCipherAlgorithm.aes,t.cipher_type=i.CipherType.block,t.enc_key_length=32,t.block_length=16,t.fixed_iv_length=16,t.record_iv_length=16,t.mac_algorithm=i.MACAlgorithm.hmac_sha1,t.mac_length=20,t.mac_key_length=20},initConnectionState:a}},36166(t,e,r){var n=r(28413);r(25129);var i=n.asn1;e.privateKeyValidator={name:"PrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:i.Class.UNIVERSAL,type:i.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},e.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:i.Class.UNIVERSAL,type:i.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:i.Class.UNIVERSAL,type:i.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:i.Class.UNIVERSAL,type:i.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}},25129(t,e,r){var n=r(28413);r(23564),r(12889);var i=t.exports=n.asn1=n.asn1||{};function a(t,e,r){if(r>e){var n=new Error("Too few bytes to parse DER.");throw n.available=t.length(),n.remaining=e,n.requested=r,n}}function s(t,e,r,n){if(r>=n.maxDepth)throw new Error("ASN.1 parsing error: Max depth exceeded.");var o;a(t,e,2);var u=t.getByte();e--;var h=192&u,c=31&u;o=t.length();var l,f,p=function(t,e){var r=t.getByte();if(e--,128!==r){var n;if(128&r){var i=127&r;a(t,e,i),n=t.getInt(i<<3)}else n=r;if(n<0)throw new Error("Negative length: "+n);return n}}(t,e);if(e-=o-t.length(),void 0!==p&&p>e){if(n.strict){var d=new Error("Too few bytes to read ASN.1 value.");throw d.available=t.length(),d.remaining=e,d.requested=p,d}p=e}var g=!(32&~u);if(g)if(l=[],void 0===p)for(;;){if(a(t,e,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),e-=2;break}o=t.length(),l.push(s(t,e,r+1,n)),e-=o-t.length()}else for(;p>0;)o=t.length(),l.push(s(t,p,r+1,n)),e-=o-t.length(),p-=o-t.length();if(void 0===l&&h===i.Class.UNIVERSAL&&c===i.Type.BITSTRING&&(f=t.bytes(p)),void 0===l&&n.decodeBitStrings&&h===i.Class.UNIVERSAL&&c===i.Type.BITSTRING&&p>1){var m=t.read,y=e,A=0;if(c===i.Type.BITSTRING&&(a(t,e,1),A=t.getByte(),e--),0===A)try{o=t.length();var v=s(t,e,r+1,{strict:!0,decodeBitStrings:!0}),b=o-t.length();e-=b,c==i.Type.BITSTRING&&b++;var w=v.tagClass;b!==p||w!==i.Class.UNIVERSAL&&w!==i.Class.CONTEXT_SPECIFIC||(l=[v])}catch(t){}void 0===l&&(t.read=m,e=y)}if(void 0===l){if(void 0===p){if(n.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");p=e}if(c===i.Type.BMPSTRING)for(l="";p>0;p-=2)a(t,e,2),l+=String.fromCharCode(t.getInt16()),e-=2;else l=t.getBytes(p),e-=p}var C=void 0===f?null:{bitStringContents:f};return i.create(h,c,g,l,C)}i.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},i.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},i.maxDepth=256,i.create=function(t,e,r,a,s){if(n.util.isArray(a)){for(var o=[],u=0;u1)||(0!==t.value.charCodeAt(0)||128&t.value.charCodeAt(1))&&(255!==t.value.charCodeAt(0)||128&~t.value.charCodeAt(1))?a.putBytes(t.value):a.putBytes(t.value.substr(1));if(e.putByte(r),a.length()<=127)e.putByte(127&a.length());else{var u=a.length(),h="";do{h+=String.fromCharCode(255&u),u>>>=8}while(u>0);for(e.putByte(128|h.length),o=h.length-1;o>=0;--o)e.putByte(h.charCodeAt(o))}return e.putBuffer(a),e},i.oidToDer=function(t){var e,r,i,a,s=t.split("."),o=n.util.createBuffer();o.putByte(40*parseInt(s[0],10)+parseInt(s[1],10));for(var u=2;u4294967295)throw new Error("OID value too large; max is 32-bits.");do{a=127&i,i>>>=7,e||(a|=128),r.push(a),e=!1}while(i>0);for(var h=r.length-1;h>=0;--h)o.putByte(r[h])}return o},i.derToOid=function(t){var e;"string"==typeof t&&(t=n.util.createBuffer(t));var r=t.getByte();e=Math.floor(r/40)+"."+r%40;for(var i=0;t.length()>0;){if(i>70368744177663)throw new Error("OID value too large; max is 53-bits.");i*=128,128&(r=t.getByte())?i+=127&r:(e+="."+(i+r),i=0)}return e},i.utcTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,2),10);r=r>=50?1900+r:2e3+r;var n=parseInt(t.substr(2,2),10)-1,i=parseInt(t.substr(4,2),10),a=parseInt(t.substr(6,2),10),s=parseInt(t.substr(8,2),10),o=0;if(t.length>11){var u=t.charAt(10),h=10;"+"!==u&&"-"!==u&&(o=parseInt(t.substr(10,2),10),h+=2)}if(e.setUTCFullYear(r,n,i),e.setUTCHours(a,s,o,0),h&&("+"===(u=t.charAt(h))||"-"===u)){var c=60*parseInt(t.substr(h+1,2),10)+parseInt(t.substr(h+4,2),10);c*=6e4,"+"===u?e.setTime(+e-c):e.setTime(+e+c)}return e},i.generalizedTimeToDate=function(t){var e=new Date,r=parseInt(t.substr(0,4),10),n=parseInt(t.substr(4,2),10)-1,i=parseInt(t.substr(6,2),10),a=parseInt(t.substr(8,2),10),s=parseInt(t.substr(10,2),10),o=parseInt(t.substr(12,2),10),u=0,h=0,c=!1;"Z"===t.charAt(t.length-1)&&(c=!0);var l=t.length-5,f=t.charAt(l);return"+"!==f&&"-"!==f||(h=60*parseInt(t.substr(l+1,2),10)+parseInt(t.substr(l+4,2),10),h*=6e4,"+"===f&&(h*=-1),c=!0),"."===t.charAt(14)&&(u=1e3*parseFloat(t.substr(14),10)),c?(e.setUTCFullYear(r,n,i),e.setUTCHours(a,s,o,u),e.setTime(+e+h)):(e.setFullYear(r,n,i),e.setHours(a,s,o,u)),e},i.dateToUtcTime=function(t){if("string"==typeof t)return t;var e="",r=[];r.push((""+t.getUTCFullYear()).substr(2)),r.push(""+(t.getUTCMonth()+1)),r.push(""+t.getUTCDate()),r.push(""+t.getUTCHours()),r.push(""+t.getUTCMinutes()),r.push(""+t.getUTCSeconds());for(var n=0;n=-128&&t<128)return e.putSignedInt(t,8);if(t>=-32768&&t<32768)return e.putSignedInt(t,16);if(t>=-8388608&&t<8388608)return e.putSignedInt(t,24);if(t>=-2147483648&&t<2147483648)return e.putSignedInt(t,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=t,r},i.derToInteger=function(t){"string"==typeof t&&(t=n.util.createBuffer(t));var e=8*t.length();if(e>32)throw new Error("Integer too large; max is 32-bits.");return t.getSignedInt(e)},i.validate=function(t,e,r,a){var s=!1;if(t.tagClass!==e.tagClass&&void 0!==e.tagClass||t.type!==e.type&&void 0!==e.type)a&&(t.tagClass!==e.tagClass&&a.push("["+e.name+'] Expected tag class "'+e.tagClass+'", got "'+t.tagClass+'"'),t.type!==e.type&&a.push("["+e.name+'] Expected type "'+e.type+'", got "'+t.type+'"'));else if(t.constructed===e.constructed||void 0===e.constructed){if(s=!0,e.value&&n.util.isArray(e.value))for(var o=0,u=0;s&&u0&&(a+="\n");for(var s="",u=0;u1?a+="0x"+n.util.bytesToHex(t.value.slice(1)):a+="(none)",t.value.length>0){var f=t.value.charCodeAt(0);1==f?a+=" (1 unused bit shown)":f>1&&(a+=" ("+f+" unused bits shown)")}}else if(t.type===i.Type.OCTETSTRING)o.test(t.value)||(a+="("+t.value+") "),a+="0x"+n.util.bytesToHex(t.value);else if(t.type===i.Type.UTF8)try{a+=n.util.decodeUtf8(t.value)}catch(e){if("URI malformed"!==e.message)throw e;a+="0x"+n.util.bytesToHex(t.value)+" (malformed UTF8)"}else t.type===i.Type.PRINTABLESTRING||t.type===i.Type.IA5String?a+=t.value:o.test(t.value)?a+="0x"+n.util.bytesToHex(t.value):0===t.value.length?a+="[null]":a+=t.value}return a}},84775(t,e,r){var n=r(42363).Buffer,i={};t.exports=i;var a={};i.encode=function(t,e,r){if("string"!=typeof e)throw new TypeError('"alphabet" must be a string.');if(void 0!==r&&"number"!=typeof r)throw new TypeError('"maxline" must be a number.');var n="";if(t instanceof Uint8Array){var i=0,a=e.length,s=e.charAt(0),o=[0];for(i=0;i0;)o.push(h%a),h=h/a|0}for(i=0;0===t[i]&&i=0;--i)n+=e[o[i]]}else n=function(t,e){var r=0,n=e.length,i=e.charAt(0),a=[0];for(r=0;r0;)a.push(o%n),o=o/n|0}var u="";for(r=0;0===t.at(r)&&r=0;--r)u+=e[a[r]];return u}(t,e);if(r){var c=new RegExp(".{1,"+r+"}","g");n=n.match(c).join("\r\n")}return n},i.decode=function(t,e){if("string"!=typeof t)throw new TypeError('"input" must be a string.');if("string"!=typeof e)throw new TypeError('"alphabet" must be a string.');var r=a[e];if(!r){r=a[e]=[];for(var i=0;i>=8;for(;l>0;)u.push(255&l),l>>=8}for(var f=0;t[f]===o&&f4){var r=t;t=n.util.createBuffer();for(var i=0;i0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=t.length(),n=t.at(r-1);return!(n>this.blockSize<<2||(t.truncate(n),0))},i.cbc=function(t){t=t||{},this.name="CBC",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(t){if(null===t.iv){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=a(t.iv,this.blockSize),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(t,e,r){if(t.length()0))return!0;for(var n=0;n0))return!0;for(var n=0;n0)return!1;var r=t.length(),n=t.at(r-1);return!(n>this.blockSize<<2||(t.truncate(n),0))},i.cfb=function(t){t=t||{},this.name="CFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=a(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(a=this.blockSize-a),this._partialOutput.clear(),i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(a=this.blockSize-a),this._partialOutput.clear(),i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb=function(t){t=t||{},this.name="OFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=a(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(t,e,r){var n=t.length();if(0===t.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(a=this.blockSize-a),this._partialOutput.clear(),i=0;i0)t.read-=this.blockSize;else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(t){t=t||{},this.name="CTR",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");this._iv=a(t.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(a=this.blockSize-a),this._partialOutput.clear(),i=0;i0&&(t.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}s(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(t){t=t||{},this.name="GCM",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");var e,r=n.util.createBuffer(t.iv);if(this._cipherLength=0,e="additionalData"in t?n.util.createBuffer(t.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in t?t.tagLength:128,this._tag=null,t.decrypt&&(this._tag=n.util.createBuffer(t.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var i=r.length();if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1];else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(o(8*i)))}this._inBlock=this._j0.slice(0),s(this._inBlock),this._partialBytes=0,e=n.util.createBuffer(e),this._aDataLength=o(8*e.length());var a=e.length()%this.blockSize;for(a&&e.fillWithByte(0,this.blockSize-a),this._s=[0,0,0,0];e.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[e.getInt32(),e.getInt32(),e.getInt32(),e.getInt32()])},i.gcm.prototype.encrypt=function(t,e,r){var n=t.length();if(0===n)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i0&&(a=this.blockSize-a),this._partialOutput.clear(),i=0;i0&&this._partialOutput.getBytes(this._partialBytes),a>0&&!r)return t.read-=this.blockSize,e.putBytes(this._partialOutput.getBytes(a-this._partialBytes)),this._partialBytes=a,!0;e.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),s(this._inBlock)},i.gcm.prototype.decrypt=function(t,e,r){var n=t.length();if(n0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),s(this._inBlock),this._hashBlock[0]=t.getInt32(),this._hashBlock[1]=t.getInt32(),this._hashBlock[2]=t.getInt32(),this._hashBlock[3]=t.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var i=0;i0;--n)e[n]=t[n]>>>1|(1&t[n-1])<<31;e[0]=t[0]>>>1,r&&(e[0]^=this._R)},i.gcm.prototype.tableMultiply=function(t){for(var e=[0,0,0,0],r=0;r<32;++r){var n=t[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n];e[0]^=i[0],e[1]^=i[1],e[2]^=i[2],e[3]^=i[3]}return e},i.gcm.prototype.ghash=function(t,e,r){return e[0]^=r[0],e[1]^=r[1],e[2]^=r[2],e[3]^=r[3],this.tableMultiply(e)},i.gcm.prototype.generateHashTable=function(t,e){for(var r=8/e,n=4*r,i=16*r,a=new Array(i),s=0;s>>1,i=new Array(r);i[n]=t.slice(0);for(var a=n>>>1;a>0;)this.pow(i[2*a],i[a]=[]),a>>=1;for(a=2;a8?3:1,y=[],A=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],v=0,b=0;b>>4^C))<<4,w^=e=65535&((C^=e)>>>-16^w),w^=(e=858993459&(w>>>2^(C^=e<<-16)))<<2,w^=e=65535&((C^=e)>>>-16^w),w^=(e=1431655765&(w>>>1^(C^=e<<-16)))<<1,w^=e=16711935&((C^=e)>>>8^w),e=(w^=(e=1431655765&(w>>>1^(C^=e<<8)))<<1)<<8|(C^=e)>>>20&240,w=C<<24|C<<8&16711680|C>>>8&65280|C>>>24&240,C=e;for(var E=0;E>>26,C=C<<2|C>>>26):(w=w<<1|w>>>27,C=C<<1|C>>>27);var S=r[(w&=-15)>>>28]|n[w>>>24&15]|i[w>>>20&15]|a[w>>>16&15]|s[w>>>12&15]|o[w>>>8&15]|u[w>>>4&15],I=h[(C&=-15)>>>28]|c[C>>>24&15]|l[C>>>20&15]|f[C>>>16&15]|p[C>>>12&15]|d[C>>>8&15]|g[C>>>4&15];e=65535&(I>>>16^S),y[v++]=S^e,y[v++]=I^e<<16}}return y}(e),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr);var a=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],s=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],o=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],h=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],c=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],l=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],f=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function p(t,e,r,n){var i,p,d=32===t.length?3:9;i=3===d?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var g=e[0],m=e[1];g^=(p=252645135&(g>>>4^m))<<4,g^=(p=65535&(g>>>16^(m^=p)))<<16,g^=p=858993459&((m^=p)>>>2^g),g^=p=16711935&((m^=p<<2)>>>8^g),g=(g^=(p=1431655765&(g>>>1^(m^=p<<8)))<<1)<<1|g>>>31,m=(m^=p)<<1|m>>>31;for(var y=0;y>>4|m<<28)^t[b+1];p=g,g=m,m=p^(s[w>>>24&63]|u[w>>>16&63]|c[w>>>8&63]|f[63&w]|a[C>>>24&63]|o[C>>>16&63]|h[C>>>8&63]|l[63&C])}p=g,g=m,m=p}m=m>>>1|m<<31,m^=p=1431655765&((g=g>>>1|g<<31)>>>1^m),m^=(p=16711935&(m>>>8^(g^=p<<1)))<<8,m^=(p=858993459&(m>>>2^(g^=p)))<<2,m^=p=65535&((g^=p)>>>16^m),m^=p=252645135&((g^=p<<16)>>>4^m),g^=p<<4,r[0]=g,r[1]=m}function d(t){var e,r="DES-"+((t=t||{}).mode||"CBC").toUpperCase(),i=(e=t.decrypt?n.cipher.createDecipher(r,t.key):n.cipher.createCipher(r,t.key)).start;return e.start=function(t,r){var a=null;r instanceof n.util.ByteBuffer&&(a=r,r={}),(r=r||{}).output=a,r.iv=t,i.call(e,r)},e}},7931(t,e,r){var n=r(42363).Buffer,i=r(28413);r(29127),r(93851),r(39194),r(23564);var a=r(36166),s=a.publicKeyValidator,o=a.privateKeyValidator;if(void 0===u)var u=i.jsbn.BigInteger;var h=i.util.ByteBuffer,c=void 0===n?Uint8Array:n;i.pki=i.pki||{},t.exports=i.pki.ed25519=i.ed25519=i.ed25519||{};var l=i.ed25519;function f(t){var e=t.message;if(e instanceof Uint8Array||e instanceof c)return e;var r=t.encoding;if(void 0===e){if(!t.md)throw new TypeError('"options.message" or "options.md" not specified.');e=t.md.digest().getBytes(),r="binary"}if("string"==typeof e&&!r)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if("string"==typeof e){if(void 0!==n)return n.from(e,r);e=new h(e,r)}else if(!(e instanceof h))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var i=new c(e.length()),a=0;a=0;--r)U(n,n),1!==r&&O(n,n,e);for(r=0;r<16;++r)t[r]=n[r]}(r,r),O(r,r,i),O(r,r,a),O(r,r,a),O(t[0],r,a),U(n,t[0]),O(n,n,a),M(n,i)&&O(t[0],t[0],b),U(n,t[0]),O(n,n,a),M(n,i)?-1:(T(t[0])===e[31]>>7&&P(t[0],p,t[0]),O(t[3],t[0],t[1]),0)}(o,n))return-1;for(i=0;i=0};var p=N(),d=N([1]),g=N([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),m=N([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),y=N([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),A=N([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),v=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),b=N([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function w(t,e){var r=i.md.sha512.create(),a=new h(t);r.update(a.getBytes(e),"binary");var s=r.digest().getBytes();if(void 0!==n)return n.from(s,"binary");for(var o=new c(l.constants.HASH_BYTE_LENGTH),u=0;u<64;++u)o[u]=s.charCodeAt(u);return o}function C(t,e){var r,n,i,a;for(n=63;n>=32;--n){for(r=0,i=n-32,a=n-12;i>8,e[i]-=256*r;e[i]+=r,e[n]=0}for(r=0,i=0;i<32;++i)e[i]+=r-(e[31]>>4)*v[i],r=e[i]>>8,e[i]&=255;for(i=0;i<32;++i)e[i]-=r*v[i];for(n=0;n<32;++n)e[n+1]+=e[n]>>8,t[n]=255&e[n]}function E(t){for(var e=new Float64Array(64),r=0;r<64;++r)e[r]=t[r],t[r]=0;C(t,e)}function S(t,e){var r=N(),n=N(),i=N(),a=N(),s=N(),o=N(),u=N(),h=N(),c=N();P(r,t[1],t[0]),P(c,e[1],e[0]),O(r,r,c),H(n,t[0],t[1]),H(c,e[0],e[1]),O(n,n,c),O(i,t[3],e[3]),O(i,i,m),O(a,t[2],e[2]),H(a,a,a),P(s,n,r),P(o,a,i),H(u,a,i),H(h,n,r),O(t[0],s,o),O(t[1],h,u),O(t[2],u,o),O(t[3],s,h)}function I(t,e,r){for(var n=0;n<4;++n)L(t[n],e[n],r)}function B(t,e){var r=N(),n=N(),i=N();!function(t,e){var r,n=N();for(r=0;r<16;++r)n[r]=e[r];for(r=253;r>=0;--r)U(n,n),2!==r&&4!==r&&O(n,n,e);for(r=0;r<16;++r)t[r]=n[r]}(i,e[2]),O(r,e[0],i),O(n,e[1],i),_(t,n),t[31]^=T(r)<<7}function _(t,e){var r,n,i,a=N(),s=N();for(r=0;r<16;++r)s[r]=e[r];for(k(s),k(s),k(s),n=0;n<2;++n){for(a[0]=s[0]-65517,r=1;r<15;++r)a[r]=s[r]-65535-(a[r-1]>>16&1),a[r-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),i=a[15]>>16&1,a[14]&=65535,L(s,a,1-i)}for(r=0;r<16;r++)t[2*r]=255&s[r],t[2*r+1]=s[r]>>8}function M(t,e){var r=new c(32),n=new c(32);return _(r,t),_(n,e),x(r,0,n,0)}function x(t,e,r,n){return function(t,e,r,n){var i,a=0;for(i=0;i<32;++i)a|=t[e+i]^r[n+i];return(1&a-1>>>8)-1}(t,e,r,n)}function T(t){var e=new c(32);return _(e,t),1&e[0]}function R(t,e,r){var n,i;for(D(t[0],p),D(t[1],d),D(t[2],d),D(t[3],p),i=255;i>=0;--i)I(t,e,n=r[i/8|0]>>(7&i)&1),S(e,t),S(t,t),I(t,e,n)}function F(t,e){var r=[N(),N(),N(),N()];D(r[0],y),D(r[1],A),D(r[2],d),O(r[3],y,A),R(t,r,e)}function D(t,e){var r;for(r=0;r<16;r++)t[r]=0|e[r]}function k(t){var e,r,n=1;for(e=0;e<16;++e)r=t[e]+n+65535,n=Math.floor(r/65536),t[e]=r-65536*n;t[0]+=n-1+37*(n-1)}function L(t,e,r){for(var n,i=~(r-1),a=0;a<16;++a)n=i&(t[a]^e[a]),t[a]^=n,e[a]^=n}function N(t){var e,r=new Float64Array(16);if(t)for(e=0;ee.blockLength&&(e.start(),e.update(s.bytes()),s=e.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),h=s.length(),u=0;u>14;--a>=0;){var u=16383&this.data[t],h=this.data[t++]>>14,c=o*u+h*s;i=((u=s*u+((16383&c)<<14)+r.data[n]+i)>>28)+(c>>14)+o*h,r.data[n++]=268435455&u}return i}t.exports=i.jsbn=i.jsbn||{},i.jsbn.BigInteger=a,"undefined"==typeof navigator?(a.prototype.am=o,n=28):"Microsoft Internet Explorer"==navigator.appName?(a.prototype.am=function(t,e,r,n,i,a){for(var s=32767&e,o=e>>15;--a>=0;){var u=32767&this.data[t],h=this.data[t++]>>15,c=o*u+h*s;i=((u=s*u+((32767&c)<<15)+r.data[n]+(1073741823&i))>>>30)+(c>>>15)+o*h+(i>>>30),r.data[n++]=1073741823&u}return i},n=30):"Netscape"!=navigator.appName?(a.prototype.am=function(t,e,r,n,i,a){for(;--a>=0;){var s=e*this.data[t++]+r.data[n]+i;i=Math.floor(s/67108864),r.data[n++]=67108863&s}return i},n=26):(a.prototype.am=o,n=28),a.prototype.DB=n,a.prototype.DM=(1<>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function g(t){this.m=t}function m(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function C(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function E(){}function S(t){return t}function I(t){this.r2=s(),this.q3=s(),a.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}g.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},g.prototype.revert=function(t){return t},g.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},g.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},g.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},m.prototype.convert=function(t){var e=s();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(a.ZERO)>0&&this.m.subTo(e,e),e},m.prototype.revert=function(t){var e=s();return t.copyTo(e),this.reduce(e),e},m.prototype.reduce=function(t){for(;t.t<=this.mt2;)t.data[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(r=e+this.m.t,t.data[r]+=this.m.am(0,n,t,e,0,this.m.t);t.data[r]>=t.DV;)t.data[r]-=t.DV,t.data[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},m.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},m.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},a.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t.data[e]=this.data[e];t.t=this.t,t.s=this.s},a.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this.data[0]=t:t<-1?this.data[0]=t+this.DV:this.t=0},a.prototype.fromString=function(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var n=t.length,i=!1,s=0;--n>=0;){var o=8==r?255&t[n]:f(t,n);o<0?"-"==t.charAt(n)&&(i=!0):(i=!1,0==s?this.data[this.t++]=o:s+r>this.DB?(this.data[this.t-1]|=(o&(1<>this.DB-s):this.data[this.t-1]|=o<=this.DB&&(s-=this.DB))}8==r&&128&t[0]&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==t;)--this.t},a.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e.data[r+t]=this.data[r];for(r=t-1;r>=0;--r)e.data[r]=0;e.t=this.t+t,e.s=this.s},a.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--r)e.data[r+s+1]=this.data[r]>>i|o,o=(this.data[r]&a)<=0;--r)e.data[r]=0;e.data[s]=o,e.t=this.t+s+1,e.s=this.s,e.clamp()},a.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,a=(1<>n;for(var s=r+1;s>n;n>0&&(e.data[this.t-r-1]|=(this.s&a)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e.data[r++]=this.DV+n:n>0&&(e.data[r++]=n),e.t=r,e.clamp()},a.prototype.multiplyTo=function(t,e){var r=this.abs(),n=t.abs(),i=r.t;for(e.t=i+n.t;--i>=0;)e.data[i]=0;for(i=0;i=0;)t.data[r]=0;for(r=0;r=e.DV&&(t.data[r+e.t]-=e.DV,t.data[r+e.t+1]=1)}t.t>0&&(t.data[t.t-1]+=e.am(r,e.data[r],t,2*r,0,1)),t.s=0,t.clamp()},a.prototype.divRemTo=function(t,e,r){var n=t.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(c,o),i.lShiftTo(c,r)):(n.copyTo(o),i.copyTo(r));var l=o.t,f=o.data[l-1];if(0!=f){var p=f*(1<1?o.data[l-2]>>this.F2:0),g=this.FV/p,m=(1<=0&&(r.data[r.t++]=1,r.subTo(b,r)),a.ONE.dlShiftTo(l,b),b.subTo(o,o);o.t=0;){var w=r.data[--A]==f?this.DM:Math.floor(r.data[A]*g+(r.data[A-1]+y)*m);if((r.data[A]+=o.am(0,w,r,v,0,l))0&&r.rShiftTo(c,r),u<0&&a.ZERO.subTo(r,r)}}},a.prototype.invDigit=function(){if(this.t<1)return 0;var t=this.data[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},a.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},a.prototype.exp=function(t,e){if(t>4294967295||t<1)return a.ONE;var r=s(),n=s(),i=e.convert(this),o=d(t)-1;for(i.copyTo(r);--o>=0;)if(e.sqrTo(r,n),(t&1<0)e.mulTo(n,i,r);else{var u=r;r=n,n=u}return e.revert(r)},a.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<0)for(o>o)>0&&(i=!0,a=l(r));s>=0;)o>(o+=this.DB-e)):(r=this.data[s]>>(o-=e)&n,o<=0&&(o+=this.DB,--s)),r>0&&(i=!0),i&&(a+=l(r));return i?a:"0"},a.prototype.negate=function(){var t=s();return a.ZERO.subTo(this,t),t},a.prototype.abs=function(){return this.s<0?this.negate():this},a.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this.data[r]-t.data[r]))return e;return 0},a.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+d(this.data[this.t-1]^this.s&this.DM)},a.prototype.mod=function(t){var e=s();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(a.ZERO)>0&&t.subTo(e,e),e},a.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new g(e):new m(e),this.exp(t,r)},a.ZERO=p(0),a.ONE=p(1),E.prototype.convert=S,E.prototype.revert=S,E.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},E.prototype.sqrTo=function(t,e){t.squareTo(e)},I.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=s();return t.copyTo(e),this.reduce(e),e},I.prototype.revert=function(t){return t},I.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},I.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},I.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var B=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],_=(1<<26)/B[B.length-1];a.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},a.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),n=p(r),i=s(),a=s(),o="";for(this.divRemTo(n,i,a);i.signum()>0;)o=(r+a.intValue()).toString(t).substr(1)+o,i.divRemTo(n,i,a);return a.intValue().toString(t)+o},a.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),n=Math.pow(e,r),i=!1,s=0,o=0,u=0;u=r&&(this.dMultiply(n),this.dAddOffset(o,0),s=0,o=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(o,0)),i&&a.ZERO.subTo(this,this)},a.prototype.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(a.ONE.shiftLeft(t-1),A,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(a.ONE.shiftLeft(t-1),this);else{var n=new Array,i=7&t;n.length=1+(t>>3),e.nextBytes(n),i>0?n[0]&=(1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e.data[r++]=n:n<-1&&(e.data[r++]=this.DV+n),e.t=r,e.clamp()},a.prototype.dMultiply=function(t){this.data[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},a.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this.data[this.t++]=0;for(this.data[e]+=t;this.data[e]>=this.DV;)this.data[e]-=this.DV,++e>=this.t&&(this.data[this.t++]=0),++this.data[e]}},a.prototype.multiplyLowerTo=function(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r.data[--i]=0;for(n=r.t-this.t;i=0;)r.data[n]=0;for(n=Math.max(e-this.t,0);n0)if(0==e)r=this.data[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this.data[n])%t;return r},a.prototype.millerRabin=function(t){var e=this.subtract(a.ONE),r=e.getLowestSetBit();if(r<=0)return!1;for(var n,i=e.shiftRight(r),s={nextBytes:function(t){for(var e=0;e=0);var u=n.modPow(i,this);if(0!=u.compareTo(a.ONE)&&0!=u.compareTo(e)){for(var h=1;h++>24},a.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},a.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},a.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,n=this.DB-t*this.DB%8,i=0;if(t-- >0)for(n>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<=0;)n<8?(r=(this.data[t]&(1<>(n+=this.DB-8)):(r=this.data[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),128&r&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(e[i++]=r);return e},a.prototype.equals=function(t){return 0==this.compareTo(t)},a.prototype.min=function(t){return this.compareTo(t)<0?this:t},a.prototype.max=function(t){return this.compareTo(t)>0?this:t},a.prototype.and=function(t){var e=s();return this.bitwiseTo(t,y,e),e},a.prototype.or=function(t){var e=s();return this.bitwiseTo(t,A,e),e},a.prototype.xor=function(t){var e=s();return this.bitwiseTo(t,v,e),e},a.prototype.andNot=function(t){var e=s();return this.bitwiseTo(t,b,e),e},a.prototype.not=function(){for(var t=s(),e=0;e=this.t?0!=this.s:!!(this.data[e]&1<1){var l=s();for(n.sqrTo(o[1],l);u<=c;)o[u]=s(),n.mulTo(l,o[u-2],o[u]),u+=2}var f,y,A=t.t-1,v=!0,b=s();for(i=d(t.data[A])-1;A>=0;){for(i>=h?f=t.data[A]>>i-h&c:(f=(t.data[A]&(1<0&&(f|=t.data[A-1]>>this.DB+i-h)),u=r;!(1&f);)f>>=1,--u;if((i-=u)<0&&(i+=this.DB,--A),v)o[f].copyTo(a),v=!1;else{for(;u>1;)n.sqrTo(a,b),n.sqrTo(b,a),u-=2;u>0?n.sqrTo(a,b):(y=a,a=b,b=y),n.mulTo(b,o[f],a)}for(;A>=0&&!(t.data[A]&1<=0?(r.subTo(n,r),e&&i.subTo(o,i),s.subTo(u,s)):(n.subTo(r,n),e&&o.subTo(i,o),u.subTo(s,u))}return 0!=n.compareTo(a.ONE)?a.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},a.prototype.pow=function(t){return this.exp(t,new E)},a.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return e;for(i0&&(e.rShiftTo(a,e),r.rShiftTo(a,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r},a.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r.data[0]<=B[B.length-1]){for(e=0;e0&&(s=n.util.fillString(String.fromCharCode(0),u)+s),{encapsulation:e.encrypt(s,"NONE"),key:t.generate(s,a)}},decrypt:function(e,r,n){var i=e.decrypt(r,"NONE");return t.generate(i,n)}}},n.kem.kdf1=function(t,e){a(this,t,0,e||t.digestLength)},n.kem.kdf2=function(t,e){a(this,t,1,e||t.digestLength)}},54728(t,e,r){var n=r(28413);r(23564),t.exports=n.log=n.log||{},n.log.levels=["none","error","warning","info","debug","verbose","max"];var i={},a=[],s=null;n.log.LEVEL_LOCKED=2,n.log.NO_LEVEL_CHECK=4,n.log.INTERPOLATE=8;for(var o=0;o>>0,o>>>0];for(var u=i.fullMessageLength.length-1;u>=0;--u)i.fullMessageLength[u]+=o[1],o[1]=o[0]+(i.fullMessageLength[u]/4294967296>>>0),i.fullMessageLength[u]=i.fullMessageLength[u]>>>0,o[0]=o[1]/4294967296>>>0;return e.putBytes(a),c(t,r,e),(e.read>2048||0===e.length())&&e.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(e.bytes());var o=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(a.substr(0,i.blockLength-o));for(var u,h=0,l=i.fullMessageLength.length-1;l>=0;--l)h=(u=8*i.fullMessageLength[l]+h)/4294967296>>>0,s.putInt32Le(u>>>0);var f={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3};c(f,r,s);var p=n.util.createBuffer();return p.putInt32Le(f.h0),p.putInt32Le(f.h1),p.putInt32Le(f.h2),p.putInt32Le(f.h3),p},i};var a=null,s=null,o=null,u=null,h=!1;function c(t,e,r){for(var n,i,a,h,c,l,f,p=r.length();p>=64;){for(i=t.h0,a=t.h1,h=t.h2,c=t.h3,f=0;f<16;++f)e[f]=r.getInt32Le(),n=i+(c^a&(h^c))+u[f]+e[f],i=c,c=h,h=a,a+=n<<(l=o[f])|n>>>32-l;for(;f<32;++f)n=i+(h^c&(a^h))+u[f]+e[s[f]],i=c,c=h,h=a,a+=n<<(l=o[f])|n>>>32-l;for(;f<48;++f)n=i+(a^h^c)+u[f]+e[s[f]],i=c,c=h,h=a,a+=n<<(l=o[f])|n>>>32-l;for(;f<64;++f)n=i+(h^(a|~c))+u[f]+e[s[f]],i=c,c=h,h=a,a+=n<<(l=o[f])|n>>>32-l;t.h0=t.h0+i|0,t.h1=t.h1+a|0,t.h2=t.h2+h|0,t.h3=t.h3+c|0,p-=64}}},22328(t,e,r){var n=r(28413);r(81321),t.exports=n.mgf=n.mgf||{},n.mgf.mgf1=n.mgf1},81321(t,e,r){var n=r(28413);r(23564),n.mgf=n.mgf||{},(t.exports=n.mgf.mgf1=n.mgf1=n.mgf1||{}).create=function(t){return{generate:function(e,r){for(var i=new n.util.ByteBuffer,a=Math.ceil(r/t.digestLength),s=0;s=0;u--)x>>=8,x+=I.at(u)+M.at(u),M.setAt(u,255&x);_.putBuffer(M)}b=_,l.putBuffer(E)}return l.truncate(l.length()-a),l},s.pbe.getCipher=function(t,e,r){switch(t){case s.oids.pkcs5PBES2:return s.pbe.getCipherForPBES2(t,e,r);case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case s.oids["pbewithSHAAnd40BitRC2-CBC"]:return s.pbe.getCipherForPKCS12PBE(t,e,r);default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw n.oid=t,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},s.pbe.getCipherForPBES2=function(t,e,r){var i,o={},u=[];if(!a.validate(e,h,o,u))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=u,i;if((t=a.derToOid(o.kdfOid))!==s.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=t,i.supportedOids=["pkcs5PBKDF2"],i;if((t=a.derToOid(o.encOid))!==s.oids["aes128-CBC"]&&t!==s.oids["aes192-CBC"]&&t!==s.oids["aes256-CBC"]&&t!==s.oids["des-EDE3-CBC"]&&t!==s.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=t,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i;var c,l,p=o.kdfSalt,d=n.util.createBuffer(o.kdfIterationCount);switch(d=d.getInt(d.length()<<3),s.oids[t]){case"aes128-CBC":c=16,l=n.aes.createDecryptionCipher;break;case"aes192-CBC":c=24,l=n.aes.createDecryptionCipher;break;case"aes256-CBC":c=32,l=n.aes.createDecryptionCipher;break;case"des-EDE3-CBC":c=24,l=n.des.createDecryptionCipher;break;case"desCBC":c=8,l=n.des.createDecryptionCipher}var g=f(o.prfOid),m=n.pkcs5.pbkdf2(r,p,d,c,g),y=o.encIv,A=l(m);return A.start(y),A},s.pbe.getCipherForPKCS12PBE=function(t,e,r){var i={},o=[];if(!a.validate(e,c,i,o))throw(g=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=o,g;var u,h,l,p=n.util.createBuffer(i.salt),d=n.util.createBuffer(i.iterations);switch(d=d.getInt(d.length()<<3),t){case s.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,h=8,l=n.des.startDecrypting;break;case s.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,h=8,l=function(t,e){var r=n.rc2.createDecryptionCipher(t,40);return r.start(e,null),r};break;default:var g;throw(g=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=t,g}var m=f(i.prfOid),y=s.pbe.generatePkcs12Key(r,p,1,d,u,m);return m.start(),l(y,s.pbe.generatePkcs12Key(r,p,2,d,h,m))},s.pbe.opensslDeriveBytes=function(t,e,r,i){if(null==i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.');i=n.md.md5.create()}null===e&&(e="");for(var a=[l(i,t+e)],s=16,o=1;s4||!o||"sha1"===o))return"string"!=typeof o&&(o="sha1"),t=n.from(t,"binary"),e=n.from(e,"binary"),u?4===a.pbkdf2Sync.length?a.pbkdf2(t,e,r,s,function(t,e){if(t)return u(t);u(null,e.toString("binary"))}):a.pbkdf2(t,e,r,s,o,function(t,e){if(t)return u(t);u(null,e.toString("binary"))}):4===a.pbkdf2Sync.length?a.pbkdf2Sync(t,e,r,s).toString("binary"):a.pbkdf2Sync(t,e,r,s,o).toString("binary");if(null==o&&(o="sha1"),"string"==typeof o){if(!(o in i.md.algorithms))throw new Error("Unknown hash algorithm: "+o);o=i.md[o].create()}var h=o.digestLength;if(s>4294967295*h){var c=new Error("Derived key is too long.");if(u)return u(c);throw c}var l=Math.ceil(s/h),f=s-(l-1)*h,p=i.hmac.create();p.start(o,t);var d,g,m,y="";if(!u){for(var A=1;A<=l;++A){p.start(null,null),p.update(e),p.update(i.util.int32ToBytes(A)),d=m=p.digest().getBytes();for(var v=2;v<=r;++v)p.start(null,null),p.update(m),g=p.digest().getBytes(),d=i.util.xorBytes(d,g,h),m=g;y+=Al)return u(null,y);p.start(null,null),p.update(e),p.update(i.util.int32ToBytes(A)),d=m=p.digest().getBytes(),v=2,w()}function w(){if(v<=r)return p.start(null,null),p.update(m),g=p.digest().getBytes(),d=i.util.xorBytes(d,g,h),m=g,++v,i.util.setImmediate(w);y+=A65&&-1!==s){var o=e[s];","===o?(++s,e=e.substr(0,s)+"\r\n "+e.substr(s)):e=e.substr(0,s)+"\r\n"+o+e.substr(s+1),a=i-s-1,s=-1,++i}else" "!==e[i]&&"\t"!==e[i]&&","!==e[i]||(s=i);return e}function s(t){return t.replace(/^\s+/,"")}i.encode=function(t,e){e=e||{};var r,i="-----BEGIN "+t.type+"-----\r\n";if(t.procType&&(i+=a(r={name:"Proc-Type",values:[String(t.procType.version),t.procType.type]})),t.contentDomain&&(i+=a(r={name:"Content-Domain",values:[t.contentDomain]})),t.dekInfo&&(r={name:"DEK-Info",values:[t.dekInfo.algorithm]},t.dekInfo.parameters&&r.values.push(t.dekInfo.parameters),i+=a(r)),t.headers)for(var s=0;s>24&255,s>>16&255,s>>8&255,255&s);r.start(),r.update(t+o),i+=r.digest().getBytes()}return i.substring(0,e)}i.encode_rsa_oaep=function(t,e,r){var i,s,o,u;"string"==typeof r?(i=r,s=arguments[3]||void 0,o=arguments[4]||void 0):r&&(i=r.label||void 0,s=r.seed||void 0,o=r.md||void 0,r.mgf1&&r.mgf1.md&&(u=r.mgf1.md)),o?o.start():o=n.md.sha1.create(),u||(u=o);var h=Math.ceil(t.n.bitLength()/8),c=h-2*o.digestLength-2;if(e.length>c)throw(m=new Error("RSAES-OAEP input message length is too long.")).length=e.length,m.maxLength=c,m;i||(i=""),o.update(i,"raw");for(var l=o.digest(),f="",p=c-e.length,d=0;d=0&&i.push(o):i.push(o))}return i}function p(t){if(t.composed||t.constructed){for(var e=n.util.createBuffer(),r=0;r2)throw new Error("Invalid PKCS#12. macData field present but MAC was not validated.");return function(t,e,r,n){if((e=i.fromDer(e,r)).tagClass!==i.Class.UNIVERSAL||e.type!==i.Type.SEQUENCE||!0!==e.constructed)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var s=0;s0&&(u=i.create(i.Class.UNIVERSAL,i.Type.SET,!0,l));var f=[],p=[];null!==e&&(p=n.util.isArray(e)?e:[e]);for(var d=[],g=0;g0){var v=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,d),b=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(v).getBytes())])]);f.push(b)}var w=null;if(null!==t){var C=a.wrapRsaPrivateKey(a.privateKeyToAsn1(t));w=null===r?i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.keyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[C]),u]):i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.pkcs8ShroudedKeyBag).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[a.encryptPrivateKeyInfo(C,r,o)]),u]);var E=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[w]),S=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(E).getBytes())])]);f.push(S)}var I,B=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,f);if(o.useMac){var _=n.md.sha1.create(),M=new n.util.ByteBuffer(n.random.getBytes(o.saltSize)),x=o.count,T=(t=s.generateKey(r,M,3,x,20),n.hmac.create());T.start(_,t),T.update(i.toDer(B).getBytes());var R=T.getMac();I=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.sha1).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,R.getBytes())]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,M.getBytes()),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(x).getBytes())])}return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(3).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(a.oids.data).getBytes()),i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,i.toDer(B).getBytes())])]),I])},s.generateKey=n.pbe.generatePkcs12Key},43474(t,e,r){var n=r(28413);r(72057),r(25129),r(35690),r(12889),r(67928),r(56435),r(93851),r(23564),r(14284);var i=n.asn1,a=t.exports=n.pkcs7=n.pkcs7||{};function s(t){var e={},r=[];if(!i.validate(t,a.asn1.recipientInfoValidator,e,r)){var s=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw s.errors=r,s}return{version:e.version.charCodeAt(0),issuer:n.pki.RDNAttributesAsArray(e.issuer),serialNumber:n.util.createBuffer(e.serial).toHex(),encryptedContent:{algorithm:i.derToOid(e.encAlgorithm),parameter:e.encParameter?e.encParameter.value:void 0,content:e.encKey}}}function o(t){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(t.version).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[n.pki.distinguishedNameToAsn1({attributes:t.issuer}),i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,n.util.hexToBytes(t.serialNumber))]),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.encryptedContent.algorithm).getBytes()),i.create(i.Class.UNIVERSAL,i.Type.NULL,!1,"")]),i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,t.encryptedContent.content)])}function u(t){for(var e=[],r=0;r0){for(var r=i.create(i.Class.CONTEXT_SPECIFIC,1,!0,[]),a=0;a=r&&s0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!0,e)),a.length>0&&s.value[0].value.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,a)),s.value[0].value.push(i.create(i.Class.UNIVERSAL,i.Type.SET,!0,t.signerInfos)),i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.type).getBytes()),s])},addSigner:function(e){var r=e.issuer,i=e.serialNumber;if(e.certificate){var a=e.certificate;"string"==typeof a&&(a=n.pki.certificateFromPem(a)),r=a.issuer.attributes,i=a.serialNumber}var s=e.key;if(!s)throw new Error("Could not add PKCS#7 signer; no private key specified.");"string"==typeof s&&(s=n.pki.privateKeyFromPem(s));var o=e.digestAlgorithm||n.pki.oids.sha1;switch(o){case n.pki.oids.sha1:case n.pki.oids.sha256:case n.pki.oids.sha384:case n.pki.oids.sha512:case n.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+o)}var u=e.authenticatedAttributes||[];if(u.length>0){for(var h=!1,c=!1,l=0;lt&&(s=h(t,e));var p=s.toString(16);i.target.postMessage({hex:p,workLoad:c}),s.dAddOffset(l,0)}}}p()}(t,e,i,a):o(t,e,i,a)}(t,u,a.options,i);throw new Error("Invalid prime generation algorithm: "+a.name)}}function o(t,e,r,n){var i=h(t,e),a=function(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}(i.bitLength());"millerRabinTests"in r&&(a=r.millerRabinTests);var s=10;"maxBlockTime"in r&&(s=r.maxBlockTime),u(i,t,e,0,a,s,n)}function u(t,e,r,a,s,o,c){var l=+new Date;do{if(t.bitLength()>e&&(t=h(e,r)),t.isProbablePrime(s))return c(null,t);t.dAddOffset(i[a++%8],0)}while(o<0||+new Date-l=32)return u();var t=32-e.pools[0].messageLength<<5;e.collect(e.seedFileSync(t)),u()}function u(){e.reseeds=4294967295===e.reseeds?0:e.reseeds+1;var t=e.plugin.md.create();t.update(e.keyBytes);for(var r=1,n=0;n<32;++n)e.reseeds%r===0&&(t.update(e.pools[n].digest().getBytes()),e.pools[n].start()),r<<=1;e.keyBytes=t.digest().getBytes(),t.start(),t.update(e.keyBytes);var i=t.digest().getBytes();e.key=e.plugin.formatKey(e.keyBytes),e.seed=e.plugin.formatSeed(i),e.generated=0}function h(t){var e=null,r=i.util.globalScope,n=r.crypto||r.msCrypto;n&&n.getRandomValues&&(e=function(t){return n.getRandomValues(t)});var a=i.util.createBuffer();if(e)for(;a.length()>16)))<<16,f=4294967295&(c=(2147483647&(c+=h>>15))+(c>>31)),u=0;u<3;++u)l=f>>>(u<<3),l^=Math.floor(256*Math.random()),a.putByte(255&l);return a.getBytes(t)}return e.pools=n,e.pool=0,e.generate=function(t,r){if(!r)return e.generateSync(t);var n=e.plugin.cipher,a=e.plugin.increment,s=e.plugin.formatKey,o=e.plugin.formatSeed,h=i.util.createBuffer();e.key=null,function c(l){if(l)return r(l);if(h.length()>=t)return r(null,h.getBytes(t));if(e.generated>1048575&&(e.key=null),null===e.key)return i.util.nextTick(function(){!function(t){if(e.pools[0].messageLength>=32)return u(),t();var r=32-e.pools[0].messageLength<<5;e.seedFile(r,function(r,n){if(r)return t(r);e.collect(n),u(),t()})}(c)});var f=n(e.key,e.seed);e.generated+=f.length,h.putBytes(f),e.key=s(n(e.key,a(e.seed))),e.seed=o(n(e.key,e.seed)),i.util.setImmediate(c)}()},e.generateSync=function(t){var r=e.plugin.cipher,n=e.plugin.increment,a=e.plugin.formatKey,s=e.plugin.formatSeed;e.key=null;for(var u=i.util.createBuffer();u.length()1048575&&(e.key=null),null===e.key&&o();var h=r(e.key,e.seed);e.generated+=h.length,u.putBytes(h),e.key=a(r(e.key,n(e.seed))),e.seed=s(r(e.key,e.seed))}return u.getBytes(t)},a?(e.seedFile=function(t,e){a.randomBytes(t,function(t,r){if(t)return e(t);e(null,r.toString())})},e.seedFileSync=function(t){return a.randomBytes(t).toString()}):(e.seedFile=function(t,e){try{e(null,h(t))}catch(t){e(t)}},e.seedFileSync=h),e.collect=function(t){for(var r=t.length,n=0;n>i&255);e.collect(n)},e.registerWorker=function(t){t===self?e.seedFile=function(t,e){self.addEventListener("message",function t(r){var n=r.data;n.forge&&n.forge.prng&&(self.removeEventListener("message",t),e(n.forge.prng.err,n.forge.prng.bytes))}),self.postMessage({forge:{prng:{needed:t}}})}:t.addEventListener("message",function(r){var n=r.data;n.forge&&n.forge.prng&&e.seedFile(n.forge.prng.needed,function(e,r){t.postMessage({forge:{prng:{err:e,bytes:r}}})})})},e}},26892(t,e,r){var n=r(28413);r(93851),r(23564),(t.exports=n.pss=n.pss||{}).create=function(t){3===arguments.length&&(t={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var e,r=t.md,i=t.mgf,a=r.digestLength,s=t.salt||null;if("string"==typeof s&&(s=n.util.createBuffer(s)),"saltLength"in t)e=t.saltLength;else{if(null===s)throw new Error("Salt length not specified or specific salt not given.");e=s.length()}if(null!==s&&s.length()!==e)throw new Error("Given salt length does not match length of given salt.");var o=t.prng||n.random;return{encode:function(t,u){var h,c,l=u-1,f=Math.ceil(l/8),p=t.digest().getBytes();if(f>8*f-l&255;return(b=String.fromCharCode(b.charCodeAt(0)&~w)+b.substr(1))+g+String.fromCharCode(188)},verify:function(t,s,o){var u,h=o-1,c=Math.ceil(h/8);if(s=s.substr(-c),c>8*c-h&255;if(0!==(f.charCodeAt(0)&d))throw new Error("Bits beyond keysize not zero as expected.");var g=i.generate(p,l),m="";for(u=0;u>16-e},o=function(t,e){return(65535&t)>>e|t<<16-e&65535};t.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(t,e){"string"==typeof t&&(t=n.util.createBuffer(t)),e=e||128;var r,a=t,s=t.length(),o=e,u=Math.ceil(o/8),h=255>>(7&o);for(r=s;r<128;r++)a.putByte(i[a.at(r-1)+a.at(r-s)&255]);for(a.setAt(128-u,i[a.at(128-u)&h]),r=127-u;r>=0;r--)a.setAt(r,i[a.at(r+1)^a.at(r+u)]);return a};var u=function(t,e,r){var i,u,h,c,l=!1,f=null,p=null,d=null,g=[];for(t=n.rc2.expandKey(t,e),h=0;h<64;h++)g.push(t.getInt16Le());r?(i=function(t){for(h=0;h<4;h++)t[h]+=g[c]+(t[(h+3)%4]&t[(h+2)%4])+(~t[(h+3)%4]&t[(h+1)%4]),t[h]=s(t[h],a[h]),c++},u=function(t){for(h=0;h<4;h++)t[h]+=g[63&t[(h+3)%4]]}):(i=function(t){for(h=3;h>=0;h--)t[h]=o(t[h],a[h]),t[h]-=g[c]+(t[(h+3)%4]&t[(h+2)%4])+(~t[(h+3)%4]&t[(h+1)%4]),c--},u=function(t){for(h=3;h>=0;h--)t[h]-=g[63&t[(h+3)%4]]});var m=function(t){var e=[];for(h=0;h<4;h++){var n=f.getInt16Le();null!==d&&(r?n^=d.getInt16Le():d.putInt16Le(n)),e.push(65535&n)}c=r?0:63;for(var i=0;i=8;)m([[5,i],[1,u],[6,i],[1,u],[5,i]])},finish:function(t){var e=!0;if(r)if(t)e=t(8,f,!r);else{var n=8===f.length()?8:8-f.length();f.fillWithByte(n,n)}if(e&&(l=!0,y.update()),!r&&(e=0===f.length()))if(t)e=t(8,p,!r);else{var i=p.length(),a=p.at(i-1);a>i?e=!1:p.truncate(a)}return e}}};n.rc2.startEncrypting=function(t,e,r){var i=n.rc2.createEncryptionCipher(t,128);return i.start(e,r),i},n.rc2.createEncryptionCipher=function(t,e){return u(t,e,!0)},n.rc2.startDecrypting=function(t,e,r){var i=n.rc2.createDecryptionCipher(t,128);return i.start(e,r),i},n.rc2.createDecryptionCipher=function(t,e){return u(t,e,!1)}},72112(t,e,r){var n=r(28413);if(r(25129),r(29127),r(12889),r(26036),r(16721),r(93851),r(23564),void 0===i)var i=n.jsbn.BigInteger;var a=n.util.isNodejs?r(50310):null,s=n.asn1,o=n.util;n.pki=n.pki||{},t.exports=n.pki.rsa=n.rsa=n.rsa||{};var u=n.pki,h=[6,4,2,4,2,4,6,2],c={name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},l={name:"RSAPrivateKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},f={name:"RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:s.Class.UNIVERSAL,type:s.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},p=n.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},d={name:"DigestInfo",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:s.Class.UNIVERSAL,type:s.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:s.Class.UNIVERSAL,type:s.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:s.Class.UNIVERSAL,type:s.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:s.Class.UNIVERSAL,type:s.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},g=function(t){var e;if(!(t.algorithm in u.oids)){var r=new Error("Unknown message digest algorithm.");throw r.algorithm=t.algorithm,r}e=u.oids[t.algorithm];var n=s.oidToDer(e).getBytes(),i=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]),a=s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[]);a.value.push(s.create(s.Class.UNIVERSAL,s.Type.OID,!1,n)),a.value.push(s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,""));var o=s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,t.digest().getBytes());return i.value.push(a),i.value.push(o),s.toDer(i).getBytes()},m=function(t,e,r){if(r)return t.modPow(e.e,e.n);if(!e.p||!e.q)return t.modPow(e.d,e.n);var a;e.dP||(e.dP=e.d.mod(e.p.subtract(i.ONE))),e.dQ||(e.dQ=e.d.mod(e.q.subtract(i.ONE))),e.qInv||(e.qInv=e.q.modInverse(e.p));do{a=new i(n.util.bytesToHex(n.random.getBytes(e.n.bitLength()/8)),16)}while(a.compareTo(e.n)>=0||!a.gcd(e.n).equals(i.ONE));for(var s=(t=t.multiply(a.modPow(e.e,e.n)).mod(e.n)).mod(e.p).modPow(e.dP,e.p),o=t.mod(e.q).modPow(e.dQ,e.q);s.compareTo(o)<0;)s=s.add(e.p);var u=s.subtract(o).multiply(e.qInv).mod(e.p).multiply(e.q).add(o);return u.multiply(a.modInverse(e.n)).mod(e.n)};function y(t,e,r){var i=n.util.createBuffer(),a=Math.ceil(e.n.bitLength()/8);if(t.length>a-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=t.length,s.max=a-11,s}i.putByte(0),i.putByte(r);var o,u=a-3-t.length;if(0===r||1===r){o=0===r?0:255;for(var h=0;h0;){var c=0,l=n.random.getBytes(u);for(h=0;h1;){if(255!==s.getByte()){--s.read;break}++h}else if(2===u)for(h=0;s.length()>1;){if(0===s.getByte()){--s.read;break}++h}if(0!==s.getByte()||h!==a-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function v(t){var e=t.toString(16);e[0]>="8"&&(e="00"+e);var r=n.util.hexToBytes(e);return!(r.length>1)||(0!==r.charCodeAt(0)||128&r.charCodeAt(1))&&(255!==r.charCodeAt(0)||128&~r.charCodeAt(1))?r:r.substr(1)}function b(t){return t<=100?27:t<=150?18:t<=200?15:t<=250?12:t<=300?9:t<=350?8:t<=400?7:t<=500?6:t<=600?5:t<=800?4:t<=1250?3:2}function w(t){return n.util.isNodejs&&"function"==typeof a[t]}function C(t){return void 0!==o.globalScope&&"object"==typeof o.globalScope.crypto&&"object"==typeof o.globalScope.crypto.subtle&&"function"==typeof o.globalScope.crypto.subtle[t]}function E(t){return void 0!==o.globalScope&&"object"==typeof o.globalScope.msCrypto&&"object"==typeof o.globalScope.msCrypto.subtle&&"function"==typeof o.globalScope.msCrypto.subtle[t]}function S(t){for(var e=n.util.hexToBytes(t.toString(16)),r=new Uint8Array(e.length),i=0;i0;)c.putByte(0),--l;return c.putBytes(n.util.hexToBytes(h)),c.getBytes()},u.rsa.decrypt=function(t,e,r,a){var s=Math.ceil(e.n.bitLength()/8);if(t.length!==s){var o=new Error("Encrypted message length is invalid.");throw o.length=t.length,o.expected=s,o}var u=new i(n.util.createBuffer(t).toHex(),16);if(u.compareTo(e.n)>=0)throw new Error("Encrypted message is invalid.");for(var h=m(u,e,r).toString(16),c=n.util.createBuffer(),l=s-Math.ceil(h.length/2);l>0;)c.putByte(0),--l;return c.putBytes(n.util.hexToBytes(h)),!1!==a?A(c.getBytes(),e,r):c.getBytes()},u.rsa.createKeyPairGenerationState=function(t,e,r){"string"==typeof t&&(t=parseInt(t,10)),t=t||2048;var a,s=(r=r||{}).prng||n.random,o={nextBytes:function(t){for(var e=s.getBytesSync(t.length),r=0;r>1,pBits:t-(t>>1),pqState:0,num:null,keys:null}).e.fromInt(a.eInt),a},u.rsa.stepKeyPairGenerationState=function(t,e){"algorithm"in t||(t.algorithm="PRIMEINC");var r=new i(null);r.fromInt(30);for(var n,a=0,s=function(t,e){return t|e},o=+new Date,c=0;null===t.keys&&(e<=0||cl?t.pqState=0:t.num.isProbablePrime(b(t.num.bitLength()))?++t.pqState:t.num.dAddOffset(h[a++%8],0):2===t.pqState?t.pqState=0===t.num.subtract(i.ONE).gcd(t.e).compareTo(i.ONE)?3:0:3===t.pqState&&(t.pqState=0,null===t.p?t.p=t.num:t.q=t.num,null!==t.p&&null!==t.q&&++t.state,t.num=null)}else if(1===t.state)t.p.compareTo(t.q)<0&&(t.num=t.p,t.p=t.q,t.q=t.num),++t.state;else if(2===t.state)t.p1=t.p.subtract(i.ONE),t.q1=t.q.subtract(i.ONE),t.phi=t.p1.multiply(t.q1),++t.state;else if(3===t.state)0===t.phi.gcd(t.e).compareTo(i.ONE)?++t.state:(t.p=null,t.q=null,t.state=0);else if(4===t.state)t.n=t.p.multiply(t.q),t.n.bitLength()===t.bits?++t.state:(t.q=null,t.state=0);else if(5===t.state){var p=t.e.modInverse(t.phi);t.keys={privateKey:u.rsa.setPrivateKey(t.n,t.e,p,t.p,t.q,p.mod(t.p1),p.mod(t.q1),t.q.modInverse(t.p)),publicKey:u.rsa.setPublicKey(t.n,t.e)}}c+=(n=+new Date)-o,o=n}return null!==t.keys},u.rsa.generateKeyPair=function(t,e,r,h){if(1===arguments.length?"object"==typeof t?(r=t,t=void 0):"function"==typeof t&&(h=t,t=void 0):2===arguments.length?"number"==typeof t?"function"==typeof e?(h=e,e=void 0):"number"!=typeof e&&(r=e,e=void 0):(r=t,h=e,t=void 0,e=void 0):3===arguments.length&&("number"==typeof e?"function"==typeof r&&(h=r,r=void 0):(h=r,r=e,e=void 0)),r=r||{},void 0===t&&(t=r.bits||2048),void 0===e&&(e=r.e||65537),!n.options.usePureJavaScript&&!r.prng&&t>=256&&t<=16384&&(65537===e||3===e))if(h){if(w("generateKeyPair"))return a.generateKeyPair("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(t,e,r){if(t)return h(t);h(null,{privateKey:u.privateKeyFromPem(r),publicKey:u.publicKeyFromPem(e)})});if(C("generateKey")&&C("exportKey"))return o.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:S(e),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(t){return o.globalScope.crypto.subtle.exportKey("pkcs8",t.privateKey)}).then(void 0,function(t){h(t)}).then(function(t){if(t){var e=u.privateKeyFromAsn1(s.fromDer(n.util.createBuffer(t)));h(null,{privateKey:e,publicKey:u.setRsaPublicKey(e.n,e.e)})}});if(E("generateKey")&&E("exportKey")){var c=o.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:t,publicExponent:S(e),hash:{name:"SHA-256"}},!0,["sign","verify"]);return c.oncomplete=function(t){var e=t.target.result,r=o.globalScope.msCrypto.subtle.exportKey("pkcs8",e.privateKey);r.oncomplete=function(t){var e=t.target.result,r=u.privateKeyFromAsn1(s.fromDer(n.util.createBuffer(e)));h(null,{privateKey:r,publicKey:u.setRsaPublicKey(r.n,r.e)})},r.onerror=function(t){h(t)}},void(c.onerror=function(t){h(t)})}}else if(w("generateKeyPairSync")){var l=a.generateKeyPairSync("rsa",{modulusLength:t,publicExponent:e,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:u.privateKeyFromPem(l.privateKey),publicKey:u.publicKeyFromPem(l.publicKey)}}var f=u.rsa.createKeyPairGenerationState(t,e,r);if(!h)return u.rsa.stepKeyPairGenerationState(f,0),f.keys;!function(t,e,r){"function"==typeof e&&(r=e,e={});var a={algorithm:{name:(e=e||{}).algorithm||"PRIMEINC",options:{workers:e.workers||2,workLoad:e.workLoad||100,workerScript:e.workerScript}}};function s(){o(t.pBits,function(e,n){return e?r(e):(t.p=n,null!==t.q?h(e,t.q):void o(t.qBits,h))})}function o(t,e){n.prime.generateProbablePrime(t,a,e)}function h(e,n){if(e)return r(e);if(t.q=n,t.p.compareTo(t.q)<0){var a=t.p;t.p=t.q,t.q=a}if(0!==t.p.subtract(i.ONE).gcd(t.e).compareTo(i.ONE))return t.p=null,void s();if(0!==t.q.subtract(i.ONE).gcd(t.e).compareTo(i.ONE))return t.q=null,void o(t.qBits,h);if(t.p1=t.p.subtract(i.ONE),t.q1=t.q.subtract(i.ONE),t.phi=t.p1.multiply(t.q1),0!==t.phi.gcd(t.e).compareTo(i.ONE))return t.p=t.q=null,void s();if(t.n=t.p.multiply(t.q),t.n.bitLength()!==t.bits)return t.q=null,void o(t.qBits,h);var c=t.e.modInverse(t.phi);t.keys={privateKey:u.rsa.setPrivateKey(t.n,t.e,c,t.p,t.q,c.mod(t.p1),c.mod(t.q1),t.q.modInverse(t.p)),publicKey:u.rsa.setPublicKey(t.n,t.e)},r(null,t.keys)}"prng"in e&&(a.prng=e.prng),s()}(f,r,h)},u.setRsaPublicKey=u.rsa.setPublicKey=function(t,e){var r={n:t,e,encrypt:function(t,e,i){if("string"==typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===e)e={encode:function(t,e,r){return y(t,e,2).getBytes()}};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={encode:function(t,e){return n.pkcs1.encode_rsa_oaep(e,t,i)}};else if(-1!==["RAW","NONE","NULL",null].indexOf(e))e={encode:function(t){return t}};else if("string"==typeof e)throw new Error('Unsupported encryption scheme: "'+e+'".');var a=e.encode(t,r,!0);return u.rsa.encrypt(a,r,!0)},verify:function(t,e,i,a){"string"==typeof i?i=i.toUpperCase():void 0===i&&(i="RSASSA-PKCS1-V1_5"),void 0===a&&(a={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in a||(a._parseAllDigestBytes=!0),"RSASSA-PKCS1-V1_5"===i?i={verify:function(t,e){e=A(e,r,!0);var i=s.fromDer(e,{parseAllBytes:a._parseAllDigestBytes}),o={},u=[];if(!s.validate(i,d,o,u))throw(h=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.")).errors=u,h;var h,c=s.derToOid(o.algorithmIdentifier);if(c!==n.oids.md2&&c!==n.oids.md5&&c!==n.oids.sha1&&c!==n.oids.sha224&&c!==n.oids.sha256&&c!==n.oids.sha384&&c!==n.oids.sha512&&c!==n.oids["sha512-224"]&&c!==n.oids["sha512-256"])throw(h=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.")).oid=c,h;if((c===n.oids.md2||c===n.oids.md5)&&!("parameters"in o))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifier NULL parameters.");return t===o.digest}}:"NONE"!==i&&"NULL"!==i&&null!==i||(i={verify:function(t,e){return t===A(e,r,!0)}});var o=u.rsa.decrypt(e,r,!0,!1);return i.verify(t,o,r.n.bitLength())}};return r},u.setRsaPrivateKey=u.rsa.setPrivateKey=function(t,e,r,i,a,s,o,h){var c={n:t,e,d:r,p:i,q:a,dP:s,dQ:o,qInv:h,decrypt:function(t,e,r){"string"==typeof e?e=e.toUpperCase():void 0===e&&(e="RSAES-PKCS1-V1_5");var i=u.rsa.decrypt(t,c,!1,!1);if("RSAES-PKCS1-V1_5"===e)e={decode:A};else if("RSA-OAEP"===e||"RSAES-OAEP"===e)e={decode:function(t,e){return n.pkcs1.decode_rsa_oaep(e,t,r)}};else{if(-1===["RAW","NONE","NULL",null].indexOf(e))throw new Error('Unsupported encryption scheme: "'+e+'".');e={decode:function(t){return t}}}return e.decode(i,c,!1)},sign:function(t,e){var r=!1;"string"==typeof e&&(e=e.toUpperCase()),void 0===e||"RSASSA-PKCS1-V1_5"===e?(e={encode:g},r=1):"NONE"!==e&&"NULL"!==e&&null!==e||(e={encode:function(){return t}},r=1);var n=e.encode(t,c.n.bitLength());return u.rsa.encrypt(n,c,r)}};return c},u.wrapRsaPrivateKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(u.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.OCTETSTRING,!1,s.toDer(t).getBytes())])},u.privateKeyFromAsn1=function(t){var e,r,a,o,h,f,p,d,g={},m=[];if(s.validate(t,c,g,m)&&(t=s.fromDer(n.util.createBuffer(g.privateKey))),g={},m=[],!s.validate(t,l,g,m)){var y=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw y.errors=m,y}return e=n.util.createBuffer(g.privateKeyModulus).toHex(),r=n.util.createBuffer(g.privateKeyPublicExponent).toHex(),a=n.util.createBuffer(g.privateKeyPrivateExponent).toHex(),o=n.util.createBuffer(g.privateKeyPrime1).toHex(),h=n.util.createBuffer(g.privateKeyPrime2).toHex(),f=n.util.createBuffer(g.privateKeyExponent1).toHex(),p=n.util.createBuffer(g.privateKeyExponent2).toHex(),d=n.util.createBuffer(g.privateKeyCoefficient).toHex(),u.setRsaPrivateKey(new i(e,16),new i(r,16),new i(a,16),new i(o,16),new i(h,16),new i(f,16),new i(p,16),new i(d,16))},u.privateKeyToAsn1=u.privateKeyToRSAPrivateKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,s.integerToDer(0).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(t.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(t.e)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(t.d)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(t.p)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(t.q)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(t.dP)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(t.dQ)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(t.qInv))])},u.publicKeyFromAsn1=function(t){var e={},r=[];if(s.validate(t,p,e,r)){var a,o=s.derToOid(e.publicKeyOid);if(o!==u.oids.rsaEncryption)throw(a=new Error("Cannot read public key. Unknown OID.")).oid=o,a;t=e.rsaPublicKey}if(r=[],!s.validate(t,f,e,r))throw(a=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,a;var h=n.util.createBuffer(e.publicKeyModulus).toHex(),c=n.util.createBuffer(e.publicKeyExponent).toHex();return u.setRsaPublicKey(new i(h,16),new i(c,16))},u.publicKeyToAsn1=u.publicKeyToSubjectPublicKeyInfo=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.OID,!1,s.oidToDer(u.oids.rsaEncryption).getBytes()),s.create(s.Class.UNIVERSAL,s.Type.NULL,!1,"")]),s.create(s.Class.UNIVERSAL,s.Type.BITSTRING,!1,[u.publicKeyToRSAPublicKey(t)])])},u.publicKeyToRSAPublicKey=function(t){return s.create(s.Class.UNIVERSAL,s.Type.SEQUENCE,!0,[s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(t.n)),s.create(s.Class.UNIVERSAL,s.Type.INTEGER,!1,v(t.e))])}},13417(t,e,r){var n=r(28413);r(25853),r(23564);var i=t.exports=n.sha1=n.sha1||{};n.md.sha1=n.md.algorithms.sha1=i,i.create=function(){s||(a=String.fromCharCode(128),a+=n.util.fillString(String.fromCharCode(0),64),s=!0);var t=null,e=n.util.createBuffer(),r=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,a=0;a>>0,u>>>0];for(var h=i.fullMessageLength.length-1;h>=0;--h)i.fullMessageLength[h]+=u[1],u[1]=u[0]+(i.fullMessageLength[h]/4294967296>>>0),i.fullMessageLength[h]=i.fullMessageLength[h]>>>0,u[0]=u[1]/4294967296>>>0;return e.putBytes(a),o(t,r,e),(e.read>2048||0===e.length())&&e.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(e.bytes());var u,h=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(a.substr(0,i.blockLength-h));for(var c=8*i.fullMessageLength[0],l=0;l>>0,s.putInt32(c>>>0),c=u>>>0;s.putInt32(c);var f={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4};o(f,r,s);var p=n.util.createBuffer();return p.putInt32(f.h0),p.putInt32(f.h1),p.putInt32(f.h2),p.putInt32(f.h3),p.putInt32(f.h4),p},i};var a=null,s=!1;function o(t,e,r){for(var n,i,a,s,o,u,h,c=r.length();c>=64;){for(i=t.h0,a=t.h1,s=t.h2,o=t.h3,u=t.h4,h=0;h<16;++h)n=r.getInt32(),e[h]=n,n=(i<<5|i>>>27)+(o^a&(s^o))+u+1518500249+n,u=o,o=s,s=(a<<30|a>>>2)>>>0,a=i,i=n;for(;h<20;++h)n=(n=e[h-3]^e[h-8]^e[h-14]^e[h-16])<<1|n>>>31,e[h]=n,n=(i<<5|i>>>27)+(o^a&(s^o))+u+1518500249+n,u=o,o=s,s=(a<<30|a>>>2)>>>0,a=i,i=n;for(;h<32;++h)n=(n=e[h-3]^e[h-8]^e[h-14]^e[h-16])<<1|n>>>31,e[h]=n,n=(i<<5|i>>>27)+(a^s^o)+u+1859775393+n,u=o,o=s,s=(a<<30|a>>>2)>>>0,a=i,i=n;for(;h<40;++h)n=(n=e[h-6]^e[h-16]^e[h-28]^e[h-32])<<2|n>>>30,e[h]=n,n=(i<<5|i>>>27)+(a^s^o)+u+1859775393+n,u=o,o=s,s=(a<<30|a>>>2)>>>0,a=i,i=n;for(;h<60;++h)n=(n=e[h-6]^e[h-16]^e[h-28]^e[h-32])<<2|n>>>30,e[h]=n,n=(i<<5|i>>>27)+(a&s|o&(a^s))+u+2400959708+n,u=o,o=s,s=(a<<30|a>>>2)>>>0,a=i,i=n;for(;h<80;++h)n=(n=e[h-6]^e[h-16]^e[h-28]^e[h-32])<<2|n>>>30,e[h]=n,n=(i<<5|i>>>27)+(a^s^o)+u+3395469782+n,u=o,o=s,s=(a<<30|a>>>2)>>>0,a=i,i=n;t.h0=t.h0+i|0,t.h1=t.h1+a|0,t.h2=t.h2+s|0,t.h3=t.h3+o|0,t.h4=t.h4+u|0,c-=64}}},24955(t,e,r){var n=r(28413);r(25853),r(23564);var i=t.exports=n.sha256=n.sha256||{};n.md.sha256=n.md.algorithms.sha256=i,i.create=function(){s||(a=String.fromCharCode(128),a+=n.util.fillString(String.fromCharCode(0),64),o=[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],s=!0);var t=null,e=n.util.createBuffer(),r=new Array(64),i={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var r=i.messageLengthSize/4,a=0;a>>0,o>>>0];for(var h=i.fullMessageLength.length-1;h>=0;--h)i.fullMessageLength[h]+=o[1],o[1]=o[0]+(i.fullMessageLength[h]/4294967296>>>0),i.fullMessageLength[h]=i.fullMessageLength[h]>>>0,o[0]=o[1]/4294967296>>>0;return e.putBytes(a),u(t,r,e),(e.read>2048||0===e.length())&&e.compact(),i},i.digest=function(){var s=n.util.createBuffer();s.putBytes(e.bytes());var o,h=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1;s.putBytes(a.substr(0,i.blockLength-h));for(var c=8*i.fullMessageLength[0],l=0;l>>0,s.putInt32(c>>>0),c=o>>>0;s.putInt32(c);var f={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4,h5:t.h5,h6:t.h6,h7:t.h7};u(f,r,s);var p=n.util.createBuffer();return p.putInt32(f.h0),p.putInt32(f.h1),p.putInt32(f.h2),p.putInt32(f.h3),p.putInt32(f.h4),p.putInt32(f.h5),p.putInt32(f.h6),p.putInt32(f.h7),p},i};var a=null,s=!1,o=null;function u(t,e,r){for(var n,i,a,s,u,h,c,l,f,p,d,g,m,y=r.length();y>=64;){for(u=0;u<16;++u)e[u]=r.getInt32();for(;u<64;++u)n=((n=e[u-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=e[u-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,e[u]=n+e[u-7]+i+e[u-16]|0;for(h=t.h0,c=t.h1,l=t.h2,f=t.h3,p=t.h4,d=t.h5,g=t.h6,m=t.h7,u=0;u<64;++u)a=(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10),s=h&c|l&(h^c),n=m+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))+(g^p&(d^g))+o[u]+e[u],m=g,g=d,d=p,p=f+n>>>0,f=l,l=c,c=h,h=n+(i=a+s)>>>0;t.h0=t.h0+h|0,t.h1=t.h1+c|0,t.h2=t.h2+l|0,t.h3=t.h3+f|0,t.h4=t.h4+p|0,t.h5=t.h5+d|0,t.h6=t.h6+g|0,t.h7=t.h7+m|0,y-=64}}},39194(t,e,r){var n=r(28413);r(25853),r(23564);var i=t.exports=n.sha512=n.sha512||{};n.md.sha512=n.md.algorithms.sha512=i;var a=n.sha384=n.sha512.sha384=n.sha512.sha384||{};a.create=function(){return i.create("SHA-384")},n.md.sha384=n.md.algorithms.sha384=a,n.sha512.sha256=n.sha512.sha256||{create:function(){return i.create("SHA-512/256")}},n.md["sha512/256"]=n.md.algorithms["sha512/256"]=n.sha512.sha256,n.sha512.sha224=n.sha512.sha224||{create:function(){return i.create("SHA-512/224")}},n.md["sha512/224"]=n.md.algorithms["sha512/224"]=n.sha512.sha224,i.create=function(t){if(o||(s=String.fromCharCode(128),s+=n.util.fillString(String.fromCharCode(0),128),u=[[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]],(h={})["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],h["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],h["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],h["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],o=!0),void 0===t&&(t="SHA-512"),!(t in h))throw new Error("Invalid SHA-512 algorithm: "+t);for(var e=h[t],r=null,i=n.util.createBuffer(),a=new Array(80),l=0;l<80;++l)a[l]=new Array(2);var f=64;switch(t){case"SHA-384":f=48;break;case"SHA-512/256":f=32;break;case"SHA-512/224":f=28}var p={algorithm:t.replace("-","").toLowerCase(),blockLength:128,digestLength:f,messageLength:0,fullMessageLength:null,messageLengthSize:16,start:function(){p.messageLength=0,p.fullMessageLength=p.messageLength128=[];for(var t=p.messageLengthSize/4,a=0;a>>0,s>>>0];for(var o=p.fullMessageLength.length-1;o>=0;--o)p.fullMessageLength[o]+=s[1],s[1]=s[0]+(p.fullMessageLength[o]/4294967296>>>0),p.fullMessageLength[o]=p.fullMessageLength[o]>>>0,s[0]=s[1]/4294967296>>>0;return i.putBytes(t),c(r,a,i),(i.read>2048||0===i.length())&&i.compact(),p},p.digest=function(){var e=n.util.createBuffer();e.putBytes(i.bytes());var o,u=p.fullMessageLength[p.fullMessageLength.length-1]+p.messageLengthSize&p.blockLength-1;e.putBytes(s.substr(0,p.blockLength-u));for(var h=8*p.fullMessageLength[0],l=0;l>>0,e.putInt32(h>>>0),h=o>>>0;e.putInt32(h);var f=new Array(r.length);for(l=0;l=128;){for(T=0;T<16;++T)e[T][0]=r.getInt32()>>>0,e[T][1]=r.getInt32()>>>0;for(;T<80;++T)n=(((R=(D=e[T-2])[0])>>>19|(F=D[1])<<13)^(F>>>29|R<<3)^R>>>6)>>>0,i=((R<<13|F>>>19)^(F<<3|R>>>29)^(R<<26|F>>>6))>>>0,a=(((R=(L=e[T-15])[0])>>>1|(F=L[1])<<31)^(R>>>8|F<<24)^R>>>7)>>>0,s=((R<<31|F>>>1)^(R<<24|F>>>8)^(R<<25|F>>>7))>>>0,k=e[T-7],N=e[T-16],F=i+k[1]+s+N[1],e[T][0]=n+k[0]+a+N[0]+(F/4294967296>>>0)>>>0,e[T][1]=F>>>0;for(d=t[0][0],g=t[0][1],m=t[1][0],y=t[1][1],A=t[2][0],v=t[2][1],b=t[3][0],w=t[3][1],C=t[4][0],E=t[4][1],S=t[5][0],I=t[5][1],B=t[6][0],_=t[6][1],M=t[7][0],x=t[7][1],T=0;T<80;++T)c=((C>>>14|E<<18)^(C>>>18|E<<14)^(E>>>9|C<<23))>>>0,l=(B^C&(S^B))>>>0,o=((d>>>28|g<<4)^(g>>>2|d<<30)^(g>>>7|d<<25))>>>0,h=((d<<4|g>>>28)^(g<<30|d>>>2)^(g<<25|d>>>7))>>>0,f=(d&m|A&(d^m))>>>0,p=(g&y|v&(g^y))>>>0,F=x+(((C<<18|E>>>14)^(C<<14|E>>>18)^(E<<23|C>>>9))>>>0)+((_^E&(I^_))>>>0)+u[T][1]+e[T][1],n=M+c+l+u[T][0]+e[T][0]+(F/4294967296>>>0)>>>0,i=F>>>0,a=o+f+((F=h+p)/4294967296>>>0)>>>0,s=F>>>0,M=B,x=_,B=S,_=I,S=C,I=E,C=b+n+((F=w+i)/4294967296>>>0)>>>0,E=F>>>0,b=A,w=v,A=m,v=y,m=d,y=g,d=n+a+((F=i+s)/4294967296>>>0)>>>0,g=F>>>0;F=t[0][1]+g,t[0][0]=t[0][0]+d+(F/4294967296>>>0)>>>0,t[0][1]=F>>>0,F=t[1][1]+y,t[1][0]=t[1][0]+m+(F/4294967296>>>0)>>>0,t[1][1]=F>>>0,F=t[2][1]+v,t[2][0]=t[2][0]+A+(F/4294967296>>>0)>>>0,t[2][1]=F>>>0,F=t[3][1]+w,t[3][0]=t[3][0]+b+(F/4294967296>>>0)>>>0,t[3][1]=F>>>0,F=t[4][1]+E,t[4][0]=t[4][0]+C+(F/4294967296>>>0)>>>0,t[4][1]=F>>>0,F=t[5][1]+I,t[5][0]=t[5][0]+S+(F/4294967296>>>0)>>>0,t[5][1]=F>>>0,F=t[6][1]+_,t[6][0]=t[6][0]+B+(F/4294967296>>>0)>>>0,t[6][1]=F>>>0,F=t[7][1]+x,t[7][0]=t[7][0]+M+(F/4294967296>>>0)>>>0,t[7][1]=F>>>0,H-=128}}},78560(t,e,r){var n=r(28413);r(72057),r(77827),r(22926),r(13417),r(23564);var i=t.exports=n.ssh=n.ssh||{};function a(t,e){var r=e.toString(16);r[0]>="8"&&(r="00"+r);var i=n.util.hexToBytes(r);t.putInt32(i.length),t.putBytes(i)}function s(t,e){t.putInt32(e.length),t.putString(e)}function o(){for(var t=n.md.sha1.create(),e=arguments.length,r=0;r>1,o=s+(1&t.length),u=t.substr(0,o),h=t.substr(s,o),c=n.util.createBuffer(),l=n.hmac.create();r=e+r;var f=Math.ceil(i/16),p=Math.ceil(i/20);l.start("MD5",u);var d=n.util.createBuffer();c.putBytes(r);for(var g=0;g0&&(h.queue(t,h.createAlert(t,{level:h.Alert.Level.warning,description:h.Alert.Description.no_renegotiation})),h.flush(t)),t.process()},h.parseHelloMessage=function(t,e,r){var i=null,a=t.entity===h.ConnectionEnd.client;if(r<38)t.error(t,{message:a?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.illegal_parameter}});else{var s=e.fragment,u=s.length();if(i={version:{major:s.getByte(),minor:s.getByte()},random:n.util.createBuffer(s.getBytes(32)),session_id:o(s,1),extensions:[]},a?(i.cipher_suite=s.getBytes(2),i.compression_method=s.getByte()):(i.cipher_suites=o(s,2),i.compression_methods=o(s,1)),(u=r-(u-s.length()))>0){for(var c=o(s,2);c.length()>0;)i.extensions.push({type:[c.getByte(),c.getByte()],data:o(c,2)});if(!a)for(var l=0;l0&&0===p.getByte();)t.session.extensions.server_name.serverNameList.push(o(p,2).getBytes())}}if(t.session.version&&(i.version.major!==t.session.version.major||i.version.minor!==t.session.version.minor))return t.error(t,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.protocol_version}});if(a)t.session.cipherSuite=h.getCipherSuite(i.cipher_suite);else for(var d=n.util.createBuffer(i.cipher_suites.bytes());d.length()>0&&(t.session.cipherSuite=h.getCipherSuite(d.getBytes(2)),null===t.session.cipherSuite););if(null===t.session.cipherSuite)return t.error(t,{message:"No cipher suites in common.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.handshake_failure},cipherSuite:n.util.bytesToHex(i.cipher_suite)});t.session.compressionMethod=a?i.compression_method:h.CompressionMethod.none}return i},h.createSecurityParameters=function(t,e){var r=t.entity===h.ConnectionEnd.client,n=e.random.bytes(),i=r?t.session.sp.client_random:n,a=r?n:h.createRandom().getBytes();t.session.sp={entity:t.entity,prf_algorithm:h.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:t.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:i,server_random:a}},h.handleServerHello=function(t,e,r){var n=h.parseHelloMessage(t,e,r);if(!t.fail){if(!(n.version.minor<=t.version.minor))return t.error(t,{message:"Incompatible TLS version.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.protocol_version}});t.version.minor=n.version.minor,t.session.version=t.version;var i=n.session_id.bytes();i.length>0&&i===t.session.id?(t.expect=d,t.session.resuming=!0,t.session.sp.server_random=n.random.bytes()):(t.expect=c,t.session.resuming=!1,h.createSecurityParameters(t,n)),t.session.id=i,t.process()}},h.handleClientHello=function(t,e,r){var i=h.parseHelloMessage(t,e,r);if(!t.fail){var a=i.session_id.bytes(),s=null;if(t.sessionCache&&(null===(s=t.sessionCache.getSession(a))?a="":(s.version.major!==i.version.major||s.version.minor>i.version.minor)&&(s=null,a="")),0===a.length&&(a=n.random.getBytes(32)),t.session.id=a,t.session.clientHelloVersion=i.version,t.session.sp={},s)t.version=t.session.version=s.version,t.session.sp=s.sp;else{for(var o,u=1;u0;)i=o(u.certificate_list,3),a=n.asn1.fromDer(i),i=n.pki.certificateFromAsn1(a,!0),c.push(i)}catch(e){return t.error(t,{message:"Could not parse certificate list.",cause:e,send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.bad_certificate}})}var f=t.entity===h.ConnectionEnd.client;!f&&!0!==t.verifyClient||0!==c.length?0===c.length?t.expect=f?l:v:(f?t.session.serverCertificate=c[0]:t.session.clientCertificate=c[0],h.verifyCertificateChain(t,c)&&(t.expect=f?l:v)):t.error(t,{message:f?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.illegal_parameter}}),t.process()},h.handleServerKeyExchange=function(t,e,r){if(r>0)return t.error(t,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.unsupported_certificate}});t.expect=f,t.process()},h.handleClientKeyExchange=function(t,e,r){if(r<48)return t.error(t,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.unsupported_certificate}});var i=e.fragment,a={enc_pre_master_secret:o(i,2).getBytes()},s=null;if(t.getPrivateKey)try{s=t.getPrivateKey(t,t.session.serverCertificate),s=n.pki.privateKeyFromPem(s)}catch(e){t.error(t,{message:"Could not get private key.",cause:e,send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.internal_error}})}if(null===s)return t.error(t,{message:"No private key set.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.internal_error}});try{var u=t.session.sp;u.pre_master_secret=s.decrypt(a.enc_pre_master_secret);var c=t.session.clientHelloVersion;if(c.major!==u.pre_master_secret.charCodeAt(0)||c.minor!==u.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch(t){u.pre_master_secret=n.random.getBytes(48)}t.expect=w,null!==t.session.clientCertificate&&(t.expect=b),t.process()},h.handleCertificateRequest=function(t,e,r){if(r<3)return t.error(t,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.illegal_parameter}});var n=e.fragment,i={certificate_types:o(n,1),certificate_authorities:o(n,2)};t.session.certificateRequest=i,t.expect=p,t.process()},h.handleCertificateVerify=function(t,e,r){if(r<2)return t.error(t,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.illegal_parameter}});var i=e.fragment;i.read-=4;var a=i.bytes();i.read+=4;var s={signature:o(i,2).getBytes()},u=n.util.createBuffer();u.putBuffer(t.session.md5.digest()),u.putBuffer(t.session.sha1.digest()),u=u.getBytes();try{if(!t.session.clientCertificate.publicKey.verify(u,s.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");t.session.md5.update(a),t.session.sha1.update(a)}catch(e){return t.error(t,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.handshake_failure}})}t.expect=w,t.process()},h.handleServerHelloDone=function(t,e,r){if(r>0)return t.error(t,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.record_overflow}});if(null===t.serverCertificate){var i={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.insufficient_security}},a=t.verify(t,i.alert.description,0,[]);if(!0!==a)return(a||0===a)&&("object"!=typeof a||n.util.isArray(a)?"number"==typeof a&&(i.alert.description=a):(a.message&&(i.message=a.message),a.alert&&(i.alert.description=a.alert))),t.error(t,i)}null!==t.session.certificateRequest&&(e=h.createRecord(t,{type:h.ContentType.handshake,data:h.createCertificate(t)}),h.queue(t,e)),e=h.createRecord(t,{type:h.ContentType.handshake,data:h.createClientKeyExchange(t)}),h.queue(t,e),t.expect=y;var s=function(t,e){null!==t.session.certificateRequest&&null!==t.session.clientCertificate&&h.queue(t,h.createRecord(t,{type:h.ContentType.handshake,data:h.createCertificateVerify(t,e)})),h.queue(t,h.createRecord(t,{type:h.ContentType.change_cipher_spec,data:h.createChangeCipherSpec()})),t.state.pending=h.createConnectionState(t),t.state.current.write=t.state.pending.write,h.queue(t,h.createRecord(t,{type:h.ContentType.handshake,data:h.createFinished(t)})),t.expect=d,h.flush(t),t.process()};if(null===t.session.certificateRequest||null===t.session.clientCertificate)return s(t,null);h.getClientSignature(t,s)},h.handleChangeCipherSpec=function(t,e){if(1!==e.fragment.getByte())return t.error(t,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.illegal_parameter}});var r=t.entity===h.ConnectionEnd.client;(t.session.resuming&&r||!t.session.resuming&&!r)&&(t.state.pending=h.createConnectionState(t)),t.state.current.read=t.state.pending.read,(!t.session.resuming&&r||t.session.resuming&&!r)&&(t.state.pending=null),t.expect=r?g:C,t.process()},h.handleFinished=function(t,e,r){var a=e.fragment;a.read-=4;var s=a.bytes();a.read+=4;var o=e.fragment.getBytes();(a=n.util.createBuffer()).putBuffer(t.session.md5.digest()),a.putBuffer(t.session.sha1.digest());var u=t.entity===h.ConnectionEnd.client,c=u?"server finished":"client finished",l=t.session.sp;if((a=i(l.master_secret,c,a.getBytes(),12)).getBytes()!==o)return t.error(t,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.decrypt_error}});t.session.md5.update(s),t.session.sha1.update(s),(t.session.resuming&&u||!t.session.resuming&&!u)&&(h.queue(t,h.createRecord(t,{type:h.ContentType.change_cipher_spec,data:h.createChangeCipherSpec()})),t.state.current.write=t.state.pending.write,t.state.pending=null,h.queue(t,h.createRecord(t,{type:h.ContentType.handshake,data:h.createFinished(t)}))),t.expect=u?m:E,t.handshaking=!1,++t.handshakes,t.peerCertificate=u?t.session.serverCertificate:t.session.clientCertificate,h.flush(t),t.isConnected=!0,t.connected(t),t.process()},h.handleAlert=function(t,e){var r,n=e.fragment,i={level:n.getByte(),description:n.getByte()};switch(i.description){case h.Alert.Description.close_notify:r="Connection closed.";break;case h.Alert.Description.unexpected_message:r="Unexpected message.";break;case h.Alert.Description.bad_record_mac:r="Bad record MAC.";break;case h.Alert.Description.decryption_failed:r="Decryption failed.";break;case h.Alert.Description.record_overflow:r="Record overflow.";break;case h.Alert.Description.decompression_failure:r="Decompression failed.";break;case h.Alert.Description.handshake_failure:r="Handshake failure.";break;case h.Alert.Description.bad_certificate:r="Bad certificate.";break;case h.Alert.Description.unsupported_certificate:r="Unsupported certificate.";break;case h.Alert.Description.certificate_revoked:r="Certificate revoked.";break;case h.Alert.Description.certificate_expired:r="Certificate expired.";break;case h.Alert.Description.certificate_unknown:r="Certificate unknown.";break;case h.Alert.Description.illegal_parameter:r="Illegal parameter.";break;case h.Alert.Description.unknown_ca:r="Unknown certificate authority.";break;case h.Alert.Description.access_denied:r="Access denied.";break;case h.Alert.Description.decode_error:r="Decode error.";break;case h.Alert.Description.decrypt_error:r="Decrypt error.";break;case h.Alert.Description.export_restriction:r="Export restriction.";break;case h.Alert.Description.protocol_version:r="Unsupported protocol version.";break;case h.Alert.Description.insufficient_security:r="Insufficient security.";break;case h.Alert.Description.internal_error:r="Internal error.";break;case h.Alert.Description.user_canceled:r="User canceled.";break;case h.Alert.Description.no_renegotiation:r="Renegotiation not supported.";break;default:r="Unknown error."}if(i.description===h.Alert.Description.close_notify)return t.close();t.error(t,{message:r,send:!1,origin:t.entity===h.ConnectionEnd.client?"server":"client",alert:i}),t.process()},h.handleHandshake=function(t,e){var r=e.fragment,i=r.getByte(),a=r.getInt24();if(a>r.length())return t.fragmented=e,e.fragment=n.util.createBuffer(),r.read-=4,t.process();t.fragmented=null,r.read-=4;var s=r.bytes(a+4);r.read+=4,i in P[t.entity][t.expect]?(t.entity!==h.ConnectionEnd.server||t.open||t.fail||(t.handshaking=!0,t.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:n.md.md5.create(),sha1:n.md.sha1.create()}),i!==h.HandshakeType.hello_request&&i!==h.HandshakeType.certificate_verify&&i!==h.HandshakeType.finished&&(t.session.md5.update(s),t.session.sha1.update(s)),P[t.entity][t.expect][i](t,e,a)):h.handleUnexpected(t,e)},h.handleApplicationData=function(t,e){t.data.putBuffer(e.fragment),t.dataReady(t),t.process()},h.handleHeartbeat=function(t,e){var r=e.fragment,i=r.getByte(),a=r.getInt16(),s=r.getBytes(a);if(i===h.HeartbeatMessageType.heartbeat_request){if(t.handshaking||a>s.length)return t.process();h.queue(t,h.createRecord(t,{type:h.ContentType.heartbeat,data:h.createHeartbeat(h.HeartbeatMessageType.heartbeat_response,s)})),h.flush(t)}else if(i===h.HeartbeatMessageType.heartbeat_response){if(s!==t.expectedHeartbeatPayload)return t.process();t.heartbeatReceived&&t.heartbeatReceived(t,n.util.createBuffer(s))}t.process()};var c=1,l=2,f=3,p=4,d=5,g=6,m=7,y=8,A=1,v=2,b=3,w=4,C=5,E=6,S=h.handleUnexpected,I=h.handleChangeCipherSpec,B=h.handleAlert,_=h.handleHandshake,M=h.handleApplicationData,x=h.handleHeartbeat,T=[];T[h.ConnectionEnd.client]=[[S,B,_,S,x],[S,B,_,S,x],[S,B,_,S,x],[S,B,_,S,x],[S,B,_,S,x],[I,B,S,S,x],[S,B,_,S,x],[S,B,_,M,x],[S,B,_,S,x]],T[h.ConnectionEnd.server]=[[S,B,_,S,x],[S,B,_,S,x],[S,B,_,S,x],[S,B,_,S,x],[I,B,S,S,x],[S,B,_,S,x],[S,B,_,M,x],[S,B,_,S,x]];var R=h.handleHelloRequest,F=h.handleServerHello,D=h.handleCertificate,k=h.handleServerKeyExchange,L=h.handleCertificateRequest,N=h.handleServerHelloDone,H=h.handleFinished,P=[];P[h.ConnectionEnd.client]=[[S,S,F,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S],[R,S,S,S,S,S,S,S,S,S,S,D,k,L,N,S,S,S,S,S,S],[R,S,S,S,S,S,S,S,S,S,S,S,k,L,N,S,S,S,S,S,S],[R,S,S,S,S,S,S,S,S,S,S,S,S,L,N,S,S,S,S,S,S],[R,S,S,S,S,S,S,S,S,S,S,S,S,S,N,S,S,S,S,S,S],[R,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S],[R,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,H],[R,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S],[R,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S]];var U=h.handleClientHello,O=h.handleClientKeyExchange,Q=h.handleCertificateVerify;P[h.ConnectionEnd.server]=[[S,U,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S],[S,S,S,S,S,S,S,S,S,S,S,D,S,S,S,S,S,S,S,S,S],[S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,O,S,S,S,S],[S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,Q,S,S,S,S,S],[S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S],[S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,H],[S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S],[S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S,S]],h.generateKeys=function(t,e){var r=i,n=e.client_random+e.server_random;t.session.resuming||(e.master_secret=r(e.pre_master_secret,"master secret",n,48).bytes(),e.pre_master_secret=null),n=e.server_random+e.client_random;var a=2*e.mac_key_length+2*e.enc_key_length,s=t.version.major===h.Versions.TLS_1_0.major&&t.version.minor===h.Versions.TLS_1_0.minor;s&&(a+=2*e.fixed_iv_length);var o=r(e.master_secret,"key expansion",n,a),u={client_write_MAC_key:o.getBytes(e.mac_key_length),server_write_MAC_key:o.getBytes(e.mac_key_length),client_write_key:o.getBytes(e.enc_key_length),server_write_key:o.getBytes(e.enc_key_length)};return s&&(u.client_write_IV=o.getBytes(e.fixed_iv_length),u.server_write_IV=o.getBytes(e.fixed_iv_length)),u},h.createConnectionState=function(t){var e=t.entity===h.ConnectionEnd.client,r=function(){var t={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(t){return!0},compressionState:null,compressFunction:function(t){return!0},updateSequenceNumber:function(){4294967295===t.sequenceNumber[1]?(t.sequenceNumber[1]=0,++t.sequenceNumber[0]):++t.sequenceNumber[1]}};return t},n={read:r(),write:r()};if(n.read.update=function(t,e){return n.read.cipherFunction(e,n.read)?n.read.compressFunction(t,e,n.read)||t.error(t,{message:"Could not decompress record.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.decompression_failure}}):t.error(t,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.bad_record_mac}}),!t.fail},n.write.update=function(t,e){return n.write.compressFunction(t,e,n.write)?n.write.cipherFunction(e,n.write)||t.error(t,{message:"Could not encrypt record.",send:!1,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.internal_error}}):t.error(t,{message:"Could not compress record.",send:!1,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.internal_error}}),!t.fail},t.session){var i=t.session.sp;switch(t.session.cipherSuite.initSecurityParameters(i),i.keys=h.generateKeys(t,i),n.read.macKey=e?i.keys.server_write_MAC_key:i.keys.client_write_MAC_key,n.write.macKey=e?i.keys.client_write_MAC_key:i.keys.server_write_MAC_key,t.session.cipherSuite.initConnectionState(n,t,i),i.compression_algorithm){case h.CompressionMethod.none:break;case h.CompressionMethod.deflate:n.read.compressFunction=s,n.write.compressFunction=a;break;default:throw new Error("Unsupported compression algorithm.")}}return n},h.createRandom=function(){var t=new Date,e=+t+6e4*t.getTimezoneOffset(),r=n.util.createBuffer();return r.putInt32(e),r.putBytes(n.random.getBytes(28)),r},h.createRecord=function(t,e){return e.data?{type:e.type,version:{major:t.version.major,minor:t.version.minor},length:e.data.length(),fragment:e.data}:null},h.createAlert=function(t,e){var r=n.util.createBuffer();return r.putByte(e.level),r.putByte(e.description),h.createRecord(t,{type:h.ContentType.alert,data:r})},h.createClientHello=function(t){t.session.clientHelloVersion={major:t.version.major,minor:t.version.minor};for(var e=n.util.createBuffer(),r=0;r0&&(d+=2);var g=t.session.id,m=g.length+1+2+4+28+2+a+1+o+d,y=n.util.createBuffer();return y.putByte(h.HandshakeType.client_hello),y.putInt24(m),y.putByte(t.version.major),y.putByte(t.version.minor),y.putBytes(t.session.sp.client_random),u(y,1,n.util.createBuffer(g)),u(y,2,e),u(y,1,s),d>0&&u(y,2,c),y},h.createServerHello=function(t){var e=t.session.id,r=e.length+1+2+4+28+2+1,i=n.util.createBuffer();return i.putByte(h.HandshakeType.server_hello),i.putInt24(r),i.putByte(t.version.major),i.putByte(t.version.minor),i.putBytes(t.session.sp.server_random),u(i,1,n.util.createBuffer(e)),i.putByte(t.session.cipherSuite.id[0]),i.putByte(t.session.cipherSuite.id[1]),i.putByte(t.session.compressionMethod),i},h.createCertificate=function(t){var e,r=t.entity===h.ConnectionEnd.client,i=null;t.getCertificate&&(e=r?t.session.certificateRequest:t.session.extensions.server_name.serverNameList,i=t.getCertificate(t,e));var a=n.util.createBuffer();if(null!==i)try{n.util.isArray(i)||(i=[i]);for(var s=null,o=0;oh.MaxFragment;)i.push(h.createRecord(t,{type:e.type,data:n.util.createBuffer(a.slice(0,h.MaxFragment))})),a=a.slice(h.MaxFragment);a.length>0&&i.push(h.createRecord(t,{type:e.type,data:n.util.createBuffer(a)}))}for(var s=0;s0&&(i=r.order[0]),null!==i&&i in r.cache)for(var a in e=r.cache[i],delete r.cache[i],r.order)if(r.order[a]===i){r.order.splice(a,1);break}return e},r.setSession=function(t,e){if(r.order.length===r.capacity){var i=r.order.shift();delete r.cache[i]}i=n.util.bytesToHex(t),r.order.push(i),r.cache[i]=e}}return r},h.createConnection=function(t){var e;e=t.caStore?n.util.isArray(t.caStore)?n.pki.createCaStore(t.caStore):t.caStore:n.pki.createCaStore();var r=t.cipherSuites||null;if(null===r)for(var i in r=[],h.CipherSuites)r.push(h.CipherSuites[i]);var a=t.server?h.ConnectionEnd.server:h.ConnectionEnd.client,s=t.sessionCache?h.createSessionCache(t.sessionCache):null,o={version:{major:h.Version.major,minor:h.Version.minor},entity:a,sessionId:t.sessionId,caStore:e,sessionCache:s,cipherSuites:r,connected:t.connected,virtualHost:t.virtualHost||null,verifyClient:t.verifyClient||!1,verify:t.verify||function(t,e,r,n){return e},verifyOptions:t.verifyOptions||{},getCertificate:t.getCertificate||null,getPrivateKey:t.getPrivateKey||null,getSignature:t.getSignature||null,input:n.util.createBuffer(),tlsData:n.util.createBuffer(),data:n.util.createBuffer(),tlsDataReady:t.tlsDataReady,dataReady:t.dataReady,heartbeatReceived:t.heartbeatReceived,closed:t.closed,error:function(e,r){r.origin=r.origin||(e.entity===h.ConnectionEnd.client?"client":"server"),r.send&&(h.queue(e,h.createAlert(e,r.alert)),h.flush(e));var n=!1!==r.fatal;n&&(e.fail=!0),t.error(e,r),n&&e.close(!1)},deflate:t.deflate||null,inflate:t.inflate||null,reset:function(t){o.version={major:h.Version.major,minor:h.Version.minor},o.record=null,o.session=null,o.peerCertificate=null,o.state={pending:null,current:null},o.expect=(o.entity,h.ConnectionEnd.client,0),o.fragmented=null,o.records=[],o.open=!1,o.handshakes=0,o.handshaking=!1,o.isConnected=!1,o.fail=!(t||void 0===t),o.input.clear(),o.tlsData.clear(),o.data.clear(),o.state.current=h.createConnectionState(o)}};return o.reset(),o.handshake=function(t){if(o.entity!==h.ConnectionEnd.client)o.error(o,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(o.handshaking)o.error(o,{message:"Handshake already in progress.",fatal:!1});else{o.fail&&!o.open&&0===o.handshakes&&(o.fail=!1),o.handshaking=!0;var e=null;(t=t||"").length>0&&(o.sessionCache&&(e=o.sessionCache.getSession(t)),null===e&&(t="")),0===t.length&&o.sessionCache&&null!==(e=o.sessionCache.getSession())&&(t=e.id),o.session={id:t,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:n.md.md5.create(),sha1:n.md.sha1.create()},e&&(o.version=e.version,o.session.sp=e.sp),o.session.sp.client_random=h.createRandom().getBytes(),o.open=!0,h.queue(o,h.createRecord(o,{type:h.ContentType.handshake,data:h.createClientHello(o)})),h.flush(o)}},o.process=function(t){var e=0;return t&&o.input.putBytes(t),o.fail||(null!==o.record&&o.record.ready&&o.record.fragment.isEmpty()&&(o.record=null),null===o.record&&(e=function(t){var e=0,r=t.input,i=r.length();if(i<5)e=5-i;else{t.record={type:r.getByte(),version:{major:r.getByte(),minor:r.getByte()},length:r.getInt16(),fragment:n.util.createBuffer(),ready:!1};var a=t.record.version.major===t.version.major;a&&t.session&&t.session.version&&(a=t.record.version.minor===t.version.minor),a||t.error(t,{message:"Incompatible TLS version.",send:!0,alert:{level:h.Alert.Level.fatal,description:h.Alert.Description.protocol_version}})}return e}(o)),o.fail||null===o.record||o.record.ready||(e=function(t){var e=0,r=t.input,n=r.length();return n15?(r=Date.now(),s(t)):(e.push(t),1===e.length&&a.setAttribute("a",i=!i))}}o.nextTick=o.setImmediate}(),o.isNodejs=void 0!==n&&n.versions&&n.versions.node,o.globalScope=o.isNodejs?r.g:"undefined"==typeof self?window:self,o.isArray=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},o.isArrayBuffer=function(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer},o.isArrayBufferView=function(t){return t&&o.isArrayBuffer(t.buffer)&&void 0!==t.byteLength},o.ByteBuffer=h,o.ByteStringBuffer=h,o.ByteStringBuffer.prototype._optimizeConstructedString=function(t){this._constructedStringLength+=t,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},o.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},o.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},o.ByteStringBuffer.prototype.putByte=function(t){return this.putBytes(String.fromCharCode(t))},o.ByteStringBuffer.prototype.fillWithByte=function(t,e){t=String.fromCharCode(t);for(var r=this.data;e>0;)1&e&&(r+=t),(e>>>=1)>0&&(t+=t);return this.data=r,this._optimizeConstructedString(e),this},o.ByteStringBuffer.prototype.putBytes=function(t){return this.data+=t,this._optimizeConstructedString(t.length),this},o.ByteStringBuffer.prototype.putString=function(t){return this.putBytes(o.encodeUtf8(t))},o.ByteStringBuffer.prototype.putInt16=function(t){return this.putBytes(String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},o.ByteStringBuffer.prototype.putInt24=function(t){return this.putBytes(String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},o.ByteStringBuffer.prototype.putInt32=function(t){return this.putBytes(String.fromCharCode(t>>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t))},o.ByteStringBuffer.prototype.putInt16Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255))},o.ByteStringBuffer.prototype.putInt24Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255))},o.ByteStringBuffer.prototype.putInt32Le=function(t){return this.putBytes(String.fromCharCode(255&t)+String.fromCharCode(t>>8&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>24&255))},o.ByteStringBuffer.prototype.putInt=function(t,e){u(e);var r="";do{e-=8,r+=String.fromCharCode(t>>e&255)}while(e>0);return this.putBytes(r)},o.ByteStringBuffer.prototype.putSignedInt=function(t,e){return t<0&&(t+=2<0);return e},o.ByteStringBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<=r&&(e-=r<<1),e},o.ByteStringBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},o.ByteStringBuffer.prototype.bytes=function(t){return void 0===t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},o.ByteStringBuffer.prototype.at=function(t){return this.data.charCodeAt(this.read+t)},o.ByteStringBuffer.prototype.setAt=function(t,e){return this.data=this.data.substr(0,this.read+t)+String.fromCharCode(e)+this.data.substr(this.read+t+1),this},o.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},o.ByteStringBuffer.prototype.copy=function(){var t=o.createBuffer(this.data);return t.read=this.read,t},o.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},o.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},o.ByteStringBuffer.prototype.truncate=function(t){var e=Math.max(0,this.length()-t);return this.data=this.data.substr(this.read,e),this.read=0,this},o.ByteStringBuffer.prototype.toHex=function(){for(var t="",e=this.read;e=t)return this;e=Math.max(e||this.growSize,t);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+e);return n.set(r),this.data=new DataView(n.buffer),this},o.DataBuffer.prototype.putByte=function(t){return this.accommodate(1),this.data.setUint8(this.write++,t),this},o.DataBuffer.prototype.fillWithByte=function(t,e){this.accommodate(e);for(var r=0;r>8&65535),this.data.setInt8(this.write,t>>16&255),this.write+=3,this},o.DataBuffer.prototype.putInt32=function(t){return this.accommodate(4),this.data.setInt32(this.write,t),this.write+=4,this},o.DataBuffer.prototype.putInt16Le=function(t){return this.accommodate(2),this.data.setInt16(this.write,t,!0),this.write+=2,this},o.DataBuffer.prototype.putInt24Le=function(t){return this.accommodate(3),this.data.setInt8(this.write,t>>16&255),this.data.setInt16(this.write,t>>8&65535,!0),this.write+=3,this},o.DataBuffer.prototype.putInt32Le=function(t){return this.accommodate(4),this.data.setInt32(this.write,t,!0),this.write+=4,this},o.DataBuffer.prototype.putInt=function(t,e){u(e),this.accommodate(e/8);do{e-=8,this.data.setInt8(this.write++,t>>e&255)}while(e>0);return this},o.DataBuffer.prototype.putSignedInt=function(t,e){return u(e),this.accommodate(e/8),t<0&&(t+=2<0);return e},o.DataBuffer.prototype.getSignedInt=function(t){var e=this.getInt(t),r=2<=r&&(e-=r<<1),e},o.DataBuffer.prototype.getBytes=function(t){var e;return t?(t=Math.min(this.length(),t),e=this.data.slice(this.read,this.read+t),this.read+=t):0===t?e="":(e=0===this.read?this.data:this.data.slice(this.read),this.clear()),e},o.DataBuffer.prototype.bytes=function(t){return void 0===t?this.data.slice(this.read):this.data.slice(this.read,this.read+t)},o.DataBuffer.prototype.at=function(t){return this.data.getUint8(this.read+t)},o.DataBuffer.prototype.setAt=function(t,e){return this.data.setUint8(t,e),this},o.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},o.DataBuffer.prototype.copy=function(){return new o.DataBuffer(this)},o.DataBuffer.prototype.compact=function(){if(this.read>0){var t=new Uint8Array(this.data.buffer,this.read),e=new Uint8Array(t.byteLength);e.set(t),this.data=new DataView(e),this.write-=this.read,this.read=0}return this},o.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},o.DataBuffer.prototype.truncate=function(t){return this.write=Math.max(0,this.length()-t),this.read=Math.min(this.read,this.write),this},o.DataBuffer.prototype.toHex=function(){for(var t="",e=this.read;e0;)1&e&&(r+=t),(e>>>=1)>0&&(t+=t);return r},o.xorBytes=function(t,e,r){for(var n="",i="",a="",s=0,o=0;r>0;--r,++s)i=t.charCodeAt(s)^e.charCodeAt(s),o>=10&&(n+=a,a="",o=0),a+=String.fromCharCode(i),++o;return n+a},o.hexToBytes=function(t){var e="",r=0;for(!0&t.length&&(r=1,e+=String.fromCharCode(parseInt(t[0],16)));r>24&255)+String.fromCharCode(t>>16&255)+String.fromCharCode(t>>8&255)+String.fromCharCode(255&t)};var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],f="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";o.encode64=function(t,e){for(var r,n,i,a="",s="",o=0;o>2),a+=c.charAt((3&r)<<4|n>>4),isNaN(n)?a+="==":(a+=c.charAt((15&n)<<2|i>>6),a+=isNaN(i)?"=":c.charAt(63&i)),e&&a.length>e&&(s+=a.substr(0,e)+"\r\n",a=a.substr(e));return s+a},o.decode64=function(t){t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var e,r,n,i,a="",s=0;s>4),64!==n&&(a+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(a+=String.fromCharCode((3&n)<<6|i)));return a},o.encodeUtf8=function(t){return unescape(encodeURIComponent(t))},o.decodeUtf8=function(t){return decodeURIComponent(escape(t))},o.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:s.encode,decode:s.decode}},o.binary.raw.encode=function(t){return String.fromCharCode.apply(null,t)},o.binary.raw.decode=function(t,e,r){var n=e;n||(n=new Uint8Array(t.length));for(var i=r=r||0,a=0;a>2),a+=c.charAt((3&r)<<4|n>>4),isNaN(n)?a+="==":(a+=c.charAt((15&n)<<2|i>>6),a+=isNaN(i)?"=":c.charAt(63&i)),e&&a.length>e&&(s+=a.substr(0,e)+"\r\n",a=a.substr(e));return s+a},o.binary.base64.decode=function(t,e,r){var n,i,a,s,o=e;o||(o=new Uint8Array(3*Math.ceil(t.length/4))),t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var u=0,h=r=r||0;u>4,64!==a&&(o[h++]=(15&i)<<4|a>>2,64!==s&&(o[h++]=(3&a)<<6|s));return e?h-r:o.subarray(0,h)},o.binary.base58.encode=function(t,e){return o.binary.baseN.encode(t,f,e)},o.binary.base58.decode=function(t,e){return o.binary.baseN.decode(t,f,e)},o.text={utf8:{},utf16:{}},o.text.utf8.encode=function(t,e,r){t=o.encodeUtf8(t);var n=e;n||(n=new Uint8Array(t.length));for(var i=r=r||0,a=0;a0&&a.push(r),s=n.lastIndex;var o=e[0][1];switch(o){case"s":case"o":i");break;case"%":a.push("%");break;default:a.push("<%"+o+"?>")}}return a.push(t.substring(s)),a.join("")},o.formatNumber=function(t,e,r,n){var i=t,a=isNaN(e=Math.abs(e))?2:e,s=void 0===r?",":r,o=void 0===n?".":n,u=i<0?"-":"",h=parseInt(i=Math.abs(+i||0).toFixed(a),10)+"",c=h.length>3?h.length%3:0;return u+(c?h.substr(0,c)+o:"")+h.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+o)+(a?s+Math.abs(i-h).toFixed(a).slice(2):"")},o.formatSize=function(t){return t>=1073741824?o.formatNumber(t/1073741824,2,".","")+" GiB":t>=1048576?o.formatNumber(t/1048576,2,".","")+" MiB":t>=1024?o.formatNumber(t/1024,0)+" KiB":o.formatNumber(t,0)+" bytes"},o.bytesFromIP=function(t){return-1!==t.indexOf(".")?o.bytesFromIPv4(t):-1!==t.indexOf(":")?o.bytesFromIPv6(t):null},o.bytesFromIPv4=function(t){if(4!==(t=t.split(".")).length)return null;for(var e=o.createBuffer(),r=0;rr[n].end-r[n].start&&(n=r.length-1)):r.push({start:u,end:u})}e.push(a)}if(r.length>0){var h=r[n];h.end-h.start>0&&(e.splice(h.start,h.end-h.start+1,""),0===h.start&&e.unshift(""),7===h.end&&e.push(""))}return e.join(":")},o.estimateCores=function(t,e){if("function"==typeof t&&(e=t,t={}),t=t||{},"cores"in o&&!t.update)return e(null,o.cores);if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return o.cores=navigator.hardwareConcurrency,e(null,o.cores);if("undefined"==typeof Worker)return o.cores=1,e(null,o.cores);if("undefined"==typeof Blob)return o.cores=2,e(null,o.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(t){for(var e=Date.now(),r=e+4;Date.now()o.st&&i.sti.st&&o.st128)throw new Error('Invalid "nsComment" content.');t.value=i.create(i.Class.UNIVERSAL,i.Type.IA5STRING,!1,t.comment)}else if("subjectKeyIdentifier"===t.name&&e.cert){var p=e.cert.generateSubjectKeyIdentifier();t.subjectKeyIdentifier=p.toHex(),t.value=i.create(i.Class.UNIVERSAL,i.Type.OCTETSTRING,!1,p.getBytes())}else if("authorityKeyIdentifier"===t.name&&e.cert){if(t.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),c=t.value.value,t.keyIdentifier){var d=!0===t.keyIdentifier?e.cert.generateSubjectKeyIdentifier().getBytes():t.keyIdentifier;c.push(i.create(i.Class.CONTEXT_SPECIFIC,0,!1,d))}if(t.authorityCertIssuer){var g=[i.create(i.Class.CONTEXT_SPECIFIC,4,!0,[y(!0===t.authorityCertIssuer?e.cert.issuer:t.authorityCertIssuer)])];c.push(i.create(i.Class.CONTEXT_SPECIFIC,1,!0,g))}if(t.serialNumber){var m=n.util.hexToBytes(!0===t.serialNumber?e.cert.serialNumber:t.serialNumber);c.push(i.create(i.Class.CONTEXT_SPECIFIC,2,!1,m))}}else if("cRLDistributionPoints"===t.name){t.value=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),c=t.value.value;var A,v=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]),b=i.create(i.Class.CONTEXT_SPECIFIC,0,!0,[]);for(f=0;f2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(l.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(u.validity.notBefore=l[0],u.validity.notAfter=l[1],u.tbsCertificate=r.tbsCertificate,e){u.md=g({signatureOid:u.signatureOid,type:"certificate"});var f=i.toDer(u.tbsCertificate);u.md.update(f.getBytes())}var m=n.md.sha1.create(),y=i.toDer(r.certIssuer);m.update(y.getBytes()),u.issuer.getField=function(t){return p(u.issuer,t)},u.issuer.addField=function(t){A([t]),u.issuer.attributes.push(t)},u.issuer.attributes=a.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(u.issuer.uniqueId=r.certIssuerUniqueId),u.issuer.hash=m.digest().toHex();var v=n.md.sha1.create(),b=i.toDer(r.certSubject);return v.update(b.getBytes()),u.subject.getField=function(t){return p(u.subject,t)},u.subject.addField=function(t){A([t]),u.subject.attributes.push(t)},u.subject.attributes=a.RDNAttributesAsArray(r.certSubject),r.certSubjectUniqueId&&(u.subject.uniqueId=r.certSubjectUniqueId),u.subject.hash=v.digest().toHex(),r.certExtensions?u.extensions=a.certificateExtensionsFromAsn1(r.certExtensions):u.extensions=[],u.publicKey=a.publicKeyFromAsn1(r.subjectPublicKeyInfo),u},a.certificateExtensionsFromAsn1=function(t){for(var e=[],r=0;r1&&(r=u.value.charCodeAt(1),a=u.value.length>2?u.value.charCodeAt(2):0),e.digitalSignature=!(128&~r),e.nonRepudiation=!(64&~r),e.keyEncipherment=!(32&~r),e.dataEncipherment=!(16&~r),e.keyAgreement=!(8&~r),e.keyCertSign=!(4&~r),e.cRLSign=!(2&~r),e.encipherOnly=!(1&~r),e.decipherOnly=!(128&~a)}else if("basicConstraints"===e.name){(u=i.fromDer(e.value)).value.length>0&&u.value[0].type===i.Type.BOOLEAN?e.cA=0!==u.value[0].value.charCodeAt(0):e.cA=!1;var o=null;u.value.length>0&&u.value[0].type===i.Type.INTEGER?o=u.value[0].value:u.value.length>1&&(o=u.value[1].value),null!==o&&(e.pathLenConstraint=i.derToInteger(o))}else if("extKeyUsage"===e.name)for(var u=i.fromDer(e.value),h=0;h1&&(r=u.value.charCodeAt(1)),e.client=!(128&~r),e.server=!(64&~r),e.email=!(32&~r),e.objsign=!(16&~r),e.reserved=!(8&~r),e.sslCA=!(4&~r),e.emailCA=!(2&~r),e.objCA=!(1&~r);else if("subjectAltName"===e.name||"issuerAltName"===e.name){var l;e.altNames=[],u=i.fromDer(e.value);for(var f=0;f=C&&t0&&s.value.push(a.certificateExtensionsToAsn1(t.extensions)),s},a.getCertificationRequestInfo=function(t){return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.INTEGER,!1,i.integerToDer(t.version).getBytes()),y(t.subject),a.publicKeyToAsn1(t.publicKey),w(t)])},a.distinguishedNameToAsn1=function(t){return y(t)},a.certificateToAsn1=function(t){var e=t.tbsCertificate||a.getTBSCertificate(t);return i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[e,i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[i.create(i.Class.UNIVERSAL,i.Type.OID,!1,i.oidToDer(t.signatureOid).getBytes()),b(t.signatureOid,t.signatureParameters)]),i.create(i.Class.UNIVERSAL,i.Type.BITSTRING,!1,String.fromCharCode(0)+t.signature)])},a.certificateExtensionsToAsn1=function(t){var e=i.create(i.Class.CONTEXT_SPECIFIC,3,!0,[]),r=i.create(i.Class.UNIVERSAL,i.Type.SEQUENCE,!0,[]);e.value.push(r);for(var n=0;nc.validity.notAfter)&&(u={message:"Certificate is not valid yet or has expired.",error:a.certificateError.certificate_expired,notBefore:c.validity.notBefore,notAfter:c.validity.notAfter,now:s}),null===u){if(null===(l=e[0]||t.getIssuer(c))&&c.isIssuer(c)&&(f=!0,l=c),l){var p=l;n.util.isArray(p)||(p=[p]);for(var d=!1;!d&&p.length>0;){l=p.shift();try{d=l.verify(c)}catch(t){}}d||(u={message:"Certificate signature is invalid.",error:a.certificateError.bad_certificate})}null!==u||l&&!f||t.hasCertificate(c)||(u={message:"Certificate is not trusted.",error:a.certificateError.unknown_ca})}if(null===u&&l&&!c.isIssuer(l)&&(u={message:"Certificate issuer is invalid.",error:a.certificateError.bad_certificate}),null===u)for(var g={keyUsage:!0,basicConstraints:!0},m=0;null===u&&mA.pathLenConstraint&&(u={message:"Certificate basicConstraints pathLenConstraint violated.",error:a.certificateError.bad_certificate})}var b=null===u||u.error,w=r.verify?r.verify(b,h,i):b;if(!0!==w)throw!0===b&&(u={message:"The application rejected the certificate.",error:a.certificateError.bad_certificate}),(w||0===w)&&("object"!=typeof w||n.util.isArray(w)?"string"==typeof w&&(u.error=w):(w.message&&(u.message=w.message),w.error&&(u.error=w.error))),u;u=null,o=!1,++h}while(e.length>0);return!0}},56698(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},69600(t){"use strict";var e,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i(function(){throw 42},null,e)}catch(t){t!==r&&(i=null)}else i=null;var a=/^\s*class\b/,s=function(t){try{var e=n.call(t);return a.test(e)}catch(t){return!1}},o=function(t){try{return!s(t)&&(n.call(t),!0)}catch(t){return!1}},u=Object.prototype.toString,h="function"==typeof Symbol&&!!Symbol.toStringTag,c=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var f=document.all;u.call(f)===u.call(document.all)&&(l=function(t){if((c||!t)&&(void 0===t||"object"==typeof t))try{var e=u.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=i?function(t){if(l(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{i(t,null,e)}catch(t){if(t!==r)return!1}return!s(t)&&o(t)}:function(t){if(l(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(h)return o(t);if(s(t))return!1;var e=u.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&o(t)}},35680(t,e,r){"use strict";var n=r(25767);t.exports=function(t){return!!n(t)}},64634(t){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},31176(t,e,r){var n,i=r(65606);!function(){"use strict";var a="input is invalid type",s="object"==typeof window,o=s?window:{};o.JS_SHA3_NO_WINDOW&&(s=!1);var u=!s&&"object"==typeof self;!o.JS_SHA3_NO_NODE_JS&&"object"==typeof i&&i.versions&&i.versions.node?o=r.g:u&&(o=self);for(var h=!o.JS_SHA3_NO_COMMON_JS&&t.exports,c=r.amdO,l=!o.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,f="0123456789abcdef".split(""),p=[4,1024,262144,67108864],d=[0,8,16,24],g=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],m=[224,256,384,512],y=[128,256],A=["hex","buffer","arrayBuffer","array","digest"],v={128:168,256:136},b=o.JS_SHA3_NO_NODE_JS||!Array.isArray?function(t){return"[object Array]"===Object.prototype.toString.call(t)}:Array.isArray,w=!l||!o.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView?ArrayBuffer.isView:function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer},C=function(t){var e=typeof t;if("string"===e)return[t,!0];if("object"!==e||null===t)throw new Error(a);if(l&&t.constructor===ArrayBuffer)return[new Uint8Array(t),!1];if(!b(t)&&!w(t))throw new Error(a);return[t,!1]},E=function(t){return 0===C(t)[0].length},S=function(t){for(var e=[],r=0;r>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function Q(t,e,r){O.call(this,t,e,r)}O.prototype.update=function(t){if(this.finalized)throw new Error("finalize already called");var e=C(t);t=e[0];for(var r,n,i=e[1],a=this.blocks,s=this.byteCount,o=t.length,u=this.blockCount,h=0,c=this.s;h>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(a[r>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=t[h]<=s){for(this.start=r-s,this.block=a[u],r=0;r>=8);r>0;)i.unshift(r),r=255&(t>>=8),++n;return e?i.push(n):i.unshift(n),this.update(i),i.length},O.prototype.encodeString=function(t){var e=C(t);t=e[0];var r=e[1],n=0,i=t.length;if(r)for(var a=0;a=57344?n+=3:(s=65536+((1023&s)<<10|1023&t.charCodeAt(++a)),n+=4)}else n=i;return n+=this.encode(8*n),this.update(t),n},O.prototype.bytepad=function(t,e){for(var r=this.encode(e),n=0;n>2]|=this.padding[3&e],this.lastByteIndex===this.byteCount)for(t[0]=t[r],e=1;e>4&15]+f[15&t]+f[t>>12&15]+f[t>>8&15]+f[t>>20&15]+f[t>>16&15]+f[t>>28&15]+f[t>>24&15];s%e===0&&(r=S(r),j(r),a=0)}return i&&(t=r[a],o+=f[t>>4&15]+f[15&t],i>1&&(o+=f[t>>12&15]+f[t>>8&15]),i>2&&(o+=f[t>>20&15]+f[t>>16&15])),o},O.prototype.arrayBuffer=function(){this.finalize();var t,e=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,a=0,s=0,o=this.outputBits>>3;t=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(o);for(var u=new Uint32Array(t);s>8&255,u[t+2]=e>>16&255,u[t+3]=e>>24&255;o%r===0&&(n=S(n),j(n))}return a&&(t=o<<2,e=n[s],u[t]=255&e,a>1&&(u[t+1]=e>>8&255),a>2&&(u[t+2]=e>>16&255)),u},Q.prototype=new O,Q.prototype.finalize=function(){return this.encode(this.outputBits,!0),O.prototype.finalize.call(this)};var j=function(t){var e,r,n,i,a,s,o,u,h,c,l,f,p,d,m,y,A,v,b,w,C,E,S,I,B,_,M,x,T,R,F,D,k,L,N,H,P,U,O,Q,j,K,G,V,q,W,z,Y,J,X,Z,$,tt,et,rt,nt,it,at,st,ot,ut,ht,ct;for(n=0;n<48;n+=2)i=t[0]^t[10]^t[20]^t[30]^t[40],a=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],o=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],h=t[5]^t[15]^t[25]^t[35]^t[45],c=t[6]^t[16]^t[26]^t[36]^t[46],l=t[7]^t[17]^t[27]^t[37]^t[47],e=(f=t[8]^t[18]^t[28]^t[38]^t[48])^(s<<1|o>>>31),r=(p=t[9]^t[19]^t[29]^t[39]^t[49])^(o<<1|s>>>31),t[0]^=e,t[1]^=r,t[10]^=e,t[11]^=r,t[20]^=e,t[21]^=r,t[30]^=e,t[31]^=r,t[40]^=e,t[41]^=r,e=i^(u<<1|h>>>31),r=a^(h<<1|u>>>31),t[2]^=e,t[3]^=r,t[12]^=e,t[13]^=r,t[22]^=e,t[23]^=r,t[32]^=e,t[33]^=r,t[42]^=e,t[43]^=r,e=s^(c<<1|l>>>31),r=o^(l<<1|c>>>31),t[4]^=e,t[5]^=r,t[14]^=e,t[15]^=r,t[24]^=e,t[25]^=r,t[34]^=e,t[35]^=r,t[44]^=e,t[45]^=r,e=u^(f<<1|p>>>31),r=h^(p<<1|f>>>31),t[6]^=e,t[7]^=r,t[16]^=e,t[17]^=r,t[26]^=e,t[27]^=r,t[36]^=e,t[37]^=r,t[46]^=e,t[47]^=r,e=c^(i<<1|a>>>31),r=l^(a<<1|i>>>31),t[8]^=e,t[9]^=r,t[18]^=e,t[19]^=r,t[28]^=e,t[29]^=r,t[38]^=e,t[39]^=r,t[48]^=e,t[49]^=r,d=t[0],m=t[1],W=t[11]<<4|t[10]>>>28,z=t[10]<<4|t[11]>>>28,x=t[20]<<3|t[21]>>>29,T=t[21]<<3|t[20]>>>29,ot=t[31]<<9|t[30]>>>23,ut=t[30]<<9|t[31]>>>23,K=t[40]<<18|t[41]>>>14,G=t[41]<<18|t[40]>>>14,L=t[2]<<1|t[3]>>>31,N=t[3]<<1|t[2]>>>31,y=t[13]<<12|t[12]>>>20,A=t[12]<<12|t[13]>>>20,Y=t[22]<<10|t[23]>>>22,J=t[23]<<10|t[22]>>>22,R=t[33]<<13|t[32]>>>19,F=t[32]<<13|t[33]>>>19,ht=t[42]<<2|t[43]>>>30,ct=t[43]<<2|t[42]>>>30,et=t[5]<<30|t[4]>>>2,rt=t[4]<<30|t[5]>>>2,H=t[14]<<6|t[15]>>>26,P=t[15]<<6|t[14]>>>26,v=t[25]<<11|t[24]>>>21,b=t[24]<<11|t[25]>>>21,X=t[34]<<15|t[35]>>>17,Z=t[35]<<15|t[34]>>>17,D=t[45]<<29|t[44]>>>3,k=t[44]<<29|t[45]>>>3,I=t[6]<<28|t[7]>>>4,B=t[7]<<28|t[6]>>>4,nt=t[17]<<23|t[16]>>>9,it=t[16]<<23|t[17]>>>9,U=t[26]<<25|t[27]>>>7,O=t[27]<<25|t[26]>>>7,w=t[36]<<21|t[37]>>>11,C=t[37]<<21|t[36]>>>11,$=t[47]<<24|t[46]>>>8,tt=t[46]<<24|t[47]>>>8,V=t[8]<<27|t[9]>>>5,q=t[9]<<27|t[8]>>>5,_=t[18]<<20|t[19]>>>12,M=t[19]<<20|t[18]>>>12,at=t[29]<<7|t[28]>>>25,st=t[28]<<7|t[29]>>>25,Q=t[38]<<8|t[39]>>>24,j=t[39]<<8|t[38]>>>24,E=t[48]<<14|t[49]>>>18,S=t[49]<<14|t[48]>>>18,t[0]=d^~y&v,t[1]=m^~A&b,t[10]=I^~_&x,t[11]=B^~M&T,t[20]=L^~H&U,t[21]=N^~P&O,t[30]=V^~W&Y,t[31]=q^~z&J,t[40]=et^~nt&at,t[41]=rt^~it&st,t[2]=y^~v&w,t[3]=A^~b&C,t[12]=_^~x&R,t[13]=M^~T&F,t[22]=H^~U&Q,t[23]=P^~O&j,t[32]=W^~Y&X,t[33]=z^~J&Z,t[42]=nt^~at&ot,t[43]=it^~st&ut,t[4]=v^~w&E,t[5]=b^~C&S,t[14]=x^~R&D,t[15]=T^~F&k,t[24]=U^~Q&K,t[25]=O^~j&G,t[34]=Y^~X&$,t[35]=J^~Z&tt,t[44]=at^~ot&ht,t[45]=st^~ut&ct,t[6]=w^~E&d,t[7]=C^~S&m,t[16]=R^~D&I,t[17]=F^~k&B,t[26]=Q^~K&L,t[27]=j^~G&N,t[36]=X^~$&V,t[37]=Z^~tt&q,t[46]=ot^~ht&et,t[47]=ut^~ct&rt,t[8]=E^~d&y,t[9]=S^~m&A,t[18]=D^~I&_,t[19]=k^~B&M,t[28]=K^~L&H,t[29]=G^~N&P,t[38]=$^~V&W,t[39]=tt^~q&z,t[48]=ht^~et&nt,t[49]=ct^~rt&it,t[0]^=g[n],t[1]^=g[n+1]};if(h)t.exports=F;else{for(k=0;k=15.7.0")},74977(t,e,r){var n=r(65606),i=r(95864);t.exports=i.satisfies(n.version,"^6.12.0 || >=8.0.0")},34623(t,e,r){var n=r(65606);const i=r(95864);t.exports=i.satisfies(n.version,">=16.9.0")},40855(t,e,r){var n=r(6585);t.exports=function(t,e){var r=e||Math.floor(Date.now()/1e3);if("string"==typeof t){var i=n(t);if(void 0===i)return;return Math.floor(r+i/1e3)}return"number"==typeof t?r+t:void 0}},47019(t,e,r){const n=r(1977),i=r(34623),a={ec:["ES256","ES384","ES512"],rsa:["RS256","PS256","RS384","PS384","RS512","PS512"],"rsa-pss":["PS256","PS384","PS512"]},s={ES256:"prime256v1",ES384:"secp384r1",ES512:"secp521r1"};t.exports=function(t,e){if(!t||!e)return;const r=e.asymmetricKeyType;if(!r)return;const o=a[r];if(!o)throw new Error(`Unknown key type "${r}".`);if(!o.includes(t))throw new Error(`"alg" parameter for "${r}" key type must be one of: ${o.join(", ")}.`);if(n)switch(r){case"ec":const r=e.asymmetricKeyDetails.namedCurve,n=s[t];if(r!==n)throw new Error(`"alg" parameter "${t}" requires curve "${n}".`);break;case"rsa-pss":if(i){const r=parseInt(t.slice(-3),10),{hashAlgorithm:n,mgf1HashAlgorithm:i,saltLength:a}=e.asymmetricKeyDetails;if(n!==`sha${r}`||i!==n)throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${t}.`);if(void 0!==a&&a>r>>3)throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${t}.`)}}}},32659(t,e,r){"use strict";const n=Symbol("SemVer ANY");class i{static get ANY(){return n}constructor(t,e){if(e=a(e),t instanceof i){if(t.loose===!!e.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),h("comparator",t,e),this.options=e,this.loose=!!e.loose,this.parse(t),this.semver===n?this.value="":this.value=this.operator+this.semver.version,h("comp",this)}parse(t){const e=this.options.loose?s[o.COMPARATORLOOSE]:s[o.COMPARATOR],r=t.match(e);if(!r)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(t){if(h("Comparator.test",t,this.options.loose),this.semver===n||t===n)return!0;if("string"==typeof t)try{t=new c(t,this.options)}catch(t){return!1}return u(t,this.operator,this.semver,this.options)}intersects(t,e){if(!(t instanceof i))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(t.value,e).test(this.value):""===t.operator?""===t.value||new l(this.value,e).test(t.semver):!((e=a(e)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===t.value)||!e.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!t.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!t.operator.startsWith("<"))&&(this.semver.version!==t.semver.version||!this.operator.includes("=")||!t.operator.includes("="))&&!(u(this.semver,"<",t.semver,e)&&this.operator.startsWith(">")&&t.operator.startsWith("<"))&&!(u(this.semver,">",t.semver,e)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}}t.exports=i;const a=r(9284),{safeRe:s,t:o}=r(12351),u=r(80630),h=r(86839),c=r(86315),l=r(15006)},15006(t,e,r){"use strict";const n=/\s+/g;class i{constructor(t,e){if(e=s(e),t instanceof i)return t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease?t:new i(t.raw,e);if(t instanceof o)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease,this.raw=t.trim().replace(n," "),this.set=this.raw.split("||").map(t=>this.parseRange(t.trim())).filter(t=>t.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const t=this.set[0];if(this.set=this.set.filter(t=>!y(t[0])),0===this.set.length)this.set=[t];else if(this.set.length>1)for(const t of this.set)if(1===t.length&&A(t[0])){this.set=[t];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let t=0;t0&&(this.formatted+="||");const e=this.set[t];for(let t=0;t0&&(this.formatted+=" "),this.formatted+=e[t].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){const e=((this.options.includePrerelease&&g)|(this.options.loose&&m))+":"+t,r=a.get(e);if(r)return r;const n=this.options.loose,i=n?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];t=t.replace(i,T(this.options.includePrerelease)),u("hyphen replace",t),t=t.replace(c[l.COMPARATORTRIM],f),u("comparator trim",t),t=t.replace(c[l.TILDETRIM],p),u("tilde trim",t),t=t.replace(c[l.CARETTRIM],d),u("caret trim",t);let s=t.split(" ").map(t=>b(t,this.options)).join(" ").split(/\s+/).map(t=>x(t,this.options));n&&(s=s.filter(t=>(u("loose invalid filter",t,this.options),!!t.match(c[l.COMPARATORLOOSE])))),u("range list",s);const h=new Map,A=s.map(t=>new o(t,this.options));for(const t of A){if(y(t))return[t];h.set(t.value,t)}h.size>1&&h.has("")&&h.delete("");const v=[...h.values()];return a.set(e,v),v}intersects(t,e){if(!(t instanceof i))throw new TypeError("a Range is required");return this.set.some(r=>v(r,e)&&t.set.some(t=>v(t,e)&&r.every(r=>t.every(t=>r.intersects(t,e)))))}test(t){if(!t)return!1;if("string"==typeof t)try{t=new h(t,this.options)}catch(t){return!1}for(let e=0;e"<0.0.0-0"===t.value,A=t=>""===t.value,v=(t,e)=>{let r=!0;const n=t.slice();let i=n.pop();for(;r&&n.length;)r=n.every(t=>i.intersects(t,e)),i=n.pop();return r},b=(t,e)=>(t=t.replace(c[l.BUILD],""),u("comp",t,e),t=S(t,e),u("caret",t),t=C(t,e),u("tildes",t),t=B(t,e),u("xrange",t),t=M(t,e),u("stars",t),t),w=t=>!t||"x"===t.toLowerCase()||"*"===t,C=(t,e)=>t.trim().split(/\s+/).map(t=>E(t,e)).join(" "),E=(t,e)=>{const r=e.loose?c[l.TILDELOOSE]:c[l.TILDE];return t.replace(r,(e,r,n,i,a)=>{let s;return u("tilde",t,e,r,n,i,a),w(r)?s="":w(n)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:w(i)?s=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:a?(u("replaceTilde pr",a),s=`>=${r}.${n}.${i}-${a} <${r}.${+n+1}.0-0`):s=`>=${r}.${n}.${i} <${r}.${+n+1}.0-0`,u("tilde return",s),s})},S=(t,e)=>t.trim().split(/\s+/).map(t=>I(t,e)).join(" "),I=(t,e)=>{u("caret",t,e);const r=e.loose?c[l.CARETLOOSE]:c[l.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(e,r,i,a,s)=>{let o;return u("caret",t,e,r,i,a,s),w(r)?o="":w(i)?o=`>=${r}.0.0${n} <${+r+1}.0.0-0`:w(a)?o="0"===r?`>=${r}.${i}.0${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.0${n} <${+r+1}.0.0-0`:s?(u("replaceCaret pr",s),o="0"===r?"0"===i?`>=${r}.${i}.${a}-${s} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}-${s} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a}-${s} <${+r+1}.0.0-0`):(u("no pr"),o="0"===r?"0"===i?`>=${r}.${i}.${a}${n} <${r}.${i}.${+a+1}-0`:`>=${r}.${i}.${a}${n} <${r}.${+i+1}.0-0`:`>=${r}.${i}.${a} <${+r+1}.0.0-0`),u("caret return",o),o})},B=(t,e)=>(u("replaceXRanges",t,e),t.split(/\s+/).map(t=>_(t,e)).join(" ")),_=(t,e)=>{t=t.trim();const r=e.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return t.replace(r,(r,n,i,a,s,o)=>{u("xRange",t,r,n,i,a,s,o);const h=w(i),c=h||w(a),l=c||w(s),f=l;return"="===n&&f&&(n=""),o=e.includePrerelease?"-0":"",h?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&f?(c&&(a=0),s=0,">"===n?(n=">=",c?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):"<="===n&&(n="<",c?i=+i+1:a=+a+1),"<"===n&&(o="-0"),r=`${n+i}.${a}.${s}${o}`):c?r=`>=${i}.0.0${o} <${+i+1}.0.0-0`:l&&(r=`>=${i}.${a}.0${o} <${i}.${+a+1}.0-0`),u("xRange return",r),r})},M=(t,e)=>(u("replaceStars",t,e),t.trim().replace(c[l.STAR],"")),x=(t,e)=>(u("replaceGTE0",t,e),t.trim().replace(c[e.includePrerelease?l.GTE0PRE:l.GTE0],"")),T=t=>(e,r,n,i,a,s,o,u,h,c,l,f)=>`${r=w(n)?"":w(i)?`>=${n}.0.0${t?"-0":""}`:w(a)?`>=${n}.${i}.0${t?"-0":""}`:s?`>=${r}`:`>=${r}${t?"-0":""}`} ${u=w(h)?"":w(c)?`<${+h+1}.0.0-0`:w(l)?`<${h}.${+c+1}.0-0`:f?`<=${h}.${c}.${l}-${f}`:t?`<${h}.${c}.${+l+1}-0`:`<=${u}`}`.trim(),R=(t,e,r)=>{for(let r=0;r0){const n=t[r].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}},86315(t,e,r){"use strict";const n=r(86839),{MAX_LENGTH:i,MAX_SAFE_INTEGER:a}=r(25501),{safeRe:s,t:o}=r(12351),u=r(9284),{compareIdentifiers:h}=r(9716);class c{constructor(t,e){if(e=u(e),t instanceof c){if(t.loose===!!e.loose&&t.includePrerelease===!!e.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>i)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",t,e),this.options=e,this.loose=!!e.loose,this.includePrerelease=!!e.includePrerelease;const r=t.trim().match(e.loose?s[o.LOOSE]:s[o.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(t=>{if(/^[0-9]+$/.test(t)){const e=+t;if(e>=0&&et.major?1:this.minort.minor?1:this.patcht.patch?1:0}comparePre(t){if(t instanceof c||(t=new c(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let e=0;do{const r=this.prerelease[e],i=t.prerelease[e];if(n("prerelease compare",e,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return h(r,i)}while(++e)}compareBuild(t){t instanceof c||(t=new c(t,this.options));let e=0;do{const r=this.build[e],i=t.build[e];if(n("build compare",e,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return h(r,i)}while(++e)}inc(t,e,r){if(t.startsWith("pre")){if(!e&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(e){const t=`-${e}`.match(this.options.loose?s[o.PRERELEASELOOSE]:s[o.PRERELEASE]);if(!t||t[1]!==e)throw new Error(`invalid identifier: ${e}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",e,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",e,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",e,r),this.inc("pre",e,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",e,r),this.inc("pre",e,r);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const t=Number(r)?1:0;if(0===this.prerelease.length)this.prerelease=[t];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(e===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(t)}}if(e){let n=[e,t];!1===r&&(n=[e]),0===h(this.prerelease[0],e)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}t.exports=c},50871(t,e,r){"use strict";const n=r(47153);t.exports=(t,e)=>{const r=n(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null}},80630(t,e,r){"use strict";const n=r(84506),i=r(54654),a=r(9671),s=r(29540),o=r(76912),u=r(68445);t.exports=(t,e,r,h)=>{switch(e){case"===":return"object"==typeof t&&(t=t.version),"object"==typeof r&&(r=r.version),t===r;case"!==":return"object"==typeof t&&(t=t.version),"object"==typeof r&&(r=r.version),t!==r;case"":case"=":case"==":return n(t,r,h);case"!=":return i(t,r,h);case">":return a(t,r,h);case">=":return s(t,r,h);case"<":return o(t,r,h);case"<=":return u(t,r,h);default:throw new TypeError(`Invalid operator: ${e}`)}}},52393(t,e,r){"use strict";const n=r(86315),i=r(47153),{safeRe:a,t:s}=r(12351);t.exports=(t,e)=>{if(t instanceof n)return t;if("number"==typeof t&&(t=String(t)),"string"!=typeof t)return null;let r=null;if((e=e||{}).rtl){const n=e.includePrerelease?a[s.COERCERTLFULL]:a[s.COERCERTL];let i;for(;(i=n.exec(t))&&(!r||r.index+r[0].length!==t.length);)r&&i.index+i[0].length===r.index+r[0].length||(r=i),n.lastIndex=i.index+i[1].length+i[2].length;n.lastIndex=-1}else r=t.match(e.includePrerelease?a[s.COERCEFULL]:a[s.COERCE]);if(null===r)return null;const o=r[2],u=r[3]||"0",h=r[4]||"0",c=e.includePrerelease&&r[5]?`-${r[5]}`:"",l=e.includePrerelease&&r[6]?`+${r[6]}`:"";return i(`${o}.${u}.${h}${c}${l}`,e)}},94848(t,e,r){"use strict";const n=r(86315);t.exports=(t,e,r)=>{const i=new n(t,r),a=new n(e,r);return i.compare(a)||i.compareBuild(a)}},8474(t,e,r){"use strict";const n=r(43701);t.exports=(t,e)=>n(t,e,!0)},43701(t,e,r){"use strict";const n=r(86315);t.exports=(t,e,r)=>new n(t,r).compare(new n(e,r))},3719(t,e,r){"use strict";const n=r(47153);t.exports=(t,e)=>{const r=n(t,null,!0),i=n(e,null,!0),a=r.compare(i);if(0===a)return null;const s=a>0,o=s?r:i,u=s?i:r,h=!!o.prerelease.length;if(u.prerelease.length&&!h){if(!u.patch&&!u.minor)return"major";if(0===u.compareMain(o))return u.minor&&!u.patch?"minor":"patch"}const c=h?"pre":"";return r.major!==i.major?c+"major":r.minor!==i.minor?c+"minor":r.patch!==i.patch?c+"patch":"prerelease"}},84506(t,e,r){"use strict";const n=r(43701);t.exports=(t,e,r)=>0===n(t,e,r)},9671(t,e,r){"use strict";const n=r(43701);t.exports=(t,e,r)=>n(t,e,r)>0},29540(t,e,r){"use strict";const n=r(43701);t.exports=(t,e,r)=>n(t,e,r)>=0},49746(t,e,r){"use strict";const n=r(86315);t.exports=(t,e,r,i,a)=>{"string"==typeof r&&(a=i,i=r,r=void 0);try{return new n(t instanceof n?t.version:t,r).inc(e,i,a).version}catch(t){return null}}},76912(t,e,r){"use strict";const n=r(43701);t.exports=(t,e,r)=>n(t,e,r)<0},68445(t,e,r){"use strict";const n=r(43701);t.exports=(t,e,r)=>n(t,e,r)<=0},87887(t,e,r){"use strict";const n=r(86315);t.exports=(t,e)=>new n(t,e).major},76651(t,e,r){"use strict";const n=r(86315);t.exports=(t,e)=>new n(t,e).minor},54654(t,e,r){"use strict";const n=r(43701);t.exports=(t,e,r)=>0!==n(t,e,r)},47153(t,e,r){"use strict";const n=r(86315);t.exports=(t,e,r=!1)=>{if(t instanceof n)return t;try{return new n(t,e)}catch(t){if(!r)return null;throw t}}},10180(t,e,r){"use strict";const n=r(86315);t.exports=(t,e)=>new n(t,e).patch},40818(t,e,r){"use strict";const n=r(47153);t.exports=(t,e)=>{const r=n(t,e);return r&&r.prerelease.length?r.prerelease:null}},6813(t,e,r){"use strict";const n=r(43701);t.exports=(t,e,r)=>n(e,t,r)},9544(t,e,r){"use strict";const n=r(94848);t.exports=(t,e)=>t.sort((t,r)=>n(r,t,e))},71995(t,e,r){"use strict";const n=r(15006);t.exports=(t,e,r)=>{try{e=new n(e,r)}catch(t){return!1}return e.test(t)}},38080(t,e,r){"use strict";const n=r(94848);t.exports=(t,e)=>t.sort((t,r)=>n(t,r,e))},8300(t,e,r){"use strict";const n=r(47153);t.exports=(t,e)=>{const r=n(t,e);return r?r.version:null}},95864(t,e,r){"use strict";const n=r(12351),i=r(25501),a=r(86315),s=r(9716),o=r(47153),u=r(8300),h=r(50871),c=r(49746),l=r(3719),f=r(87887),p=r(76651),d=r(10180),g=r(40818),m=r(43701),y=r(6813),A=r(8474),v=r(94848),b=r(38080),w=r(9544),C=r(9671),E=r(76912),S=r(84506),I=r(54654),B=r(29540),_=r(68445),M=r(80630),x=r(52393),T=r(32659),R=r(15006),F=r(71995),D=r(59278),k=r(21017),L=r(43811),N=r(33514),H=r(96561),P=r(5368),U=r(9924),O=r(74173),Q=r(20153),j=r(99388),K=r(66529);t.exports={parse:o,valid:u,clean:h,inc:c,diff:l,major:f,minor:p,patch:d,prerelease:g,compare:m,rcompare:y,compareLoose:A,compareBuild:v,sort:b,rsort:w,gt:C,lt:E,eq:S,neq:I,gte:B,lte:_,cmp:M,coerce:x,Comparator:T,Range:R,satisfies:F,toComparators:D,maxSatisfying:k,minSatisfying:L,minVersion:N,validRange:H,outside:P,gtr:U,ltr:O,intersects:Q,simplifyRange:j,subset:K,SemVer:a,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},25501(t){"use strict";const e=Number.MAX_SAFE_INTEGER||9007199254740991;t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},86839(t,e,r){"use strict";var n=r(65606);const i="object"==typeof n&&n.env&&n.env.NODE_DEBUG&&/\bsemver\b/i.test(n.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};t.exports=i},9716(t){"use strict";const e=/^[0-9]+$/,r=(t,r)=>{if("number"==typeof t&&"number"==typeof r)return t===r?0:tr(e,t)}},17207(t){"use strict";t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(t){const e=this.map.get(t);return void 0===e?void 0:(this.map.delete(t),this.map.set(t,e),e)}delete(t){return this.map.delete(t)}set(t,e){if(!this.delete(t)&&void 0!==e){if(this.map.size>=this.max){const t=this.map.keys().next().value;this.delete(t)}this.map.set(t,e)}return this}}},9284(t){"use strict";const e=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=t=>t?"object"!=typeof t?e:t:r},12351(t,e,r){"use strict";const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:a}=r(25501),s=r(86839),o=(e=t.exports={}).re=[],u=e.safeRe=[],h=e.src=[],c=e.safeSrc=[],l=e.t={};let f=0;const p="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",a],[p,i]],g=(t,e,r)=>{const n=(t=>{for(const[e,r]of d)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t})(e),i=f++;s(t,i,e),l[t]=i,h[i]=e,c[i]=n,o[i]=new RegExp(e,r?"g":void 0),u[i]=new RegExp(n,r?"g":void 0)};g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),g("MAINVERSION",`(${h[l.NUMERICIDENTIFIER]})\\.(${h[l.NUMERICIDENTIFIER]})\\.(${h[l.NUMERICIDENTIFIER]})`),g("MAINVERSIONLOOSE",`(${h[l.NUMERICIDENTIFIERLOOSE]})\\.(${h[l.NUMERICIDENTIFIERLOOSE]})\\.(${h[l.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASEIDENTIFIER",`(?:${h[l.NONNUMERICIDENTIFIER]}|${h[l.NUMERICIDENTIFIER]})`),g("PRERELEASEIDENTIFIERLOOSE",`(?:${h[l.NONNUMERICIDENTIFIER]}|${h[l.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASE",`(?:-(${h[l.PRERELEASEIDENTIFIER]}(?:\\.${h[l.PRERELEASEIDENTIFIER]})*))`),g("PRERELEASELOOSE",`(?:-?(${h[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${h[l.PRERELEASEIDENTIFIERLOOSE]})*))`),g("BUILDIDENTIFIER",`${p}+`),g("BUILD",`(?:\\+(${h[l.BUILDIDENTIFIER]}(?:\\.${h[l.BUILDIDENTIFIER]})*))`),g("FULLPLAIN",`v?${h[l.MAINVERSION]}${h[l.PRERELEASE]}?${h[l.BUILD]}?`),g("FULL",`^${h[l.FULLPLAIN]}$`),g("LOOSEPLAIN",`[v=\\s]*${h[l.MAINVERSIONLOOSE]}${h[l.PRERELEASELOOSE]}?${h[l.BUILD]}?`),g("LOOSE",`^${h[l.LOOSEPLAIN]}$`),g("GTLT","((?:<|>)?=?)"),g("XRANGEIDENTIFIERLOOSE",`${h[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g("XRANGEIDENTIFIER",`${h[l.NUMERICIDENTIFIER]}|x|X|\\*`),g("XRANGEPLAIN",`[v=\\s]*(${h[l.XRANGEIDENTIFIER]})(?:\\.(${h[l.XRANGEIDENTIFIER]})(?:\\.(${h[l.XRANGEIDENTIFIER]})(?:${h[l.PRERELEASE]})?${h[l.BUILD]}?)?)?`),g("XRANGEPLAINLOOSE",`[v=\\s]*(${h[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${h[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${h[l.XRANGEIDENTIFIERLOOSE]})(?:${h[l.PRERELEASELOOSE]})?${h[l.BUILD]}?)?)?`),g("XRANGE",`^${h[l.GTLT]}\\s*${h[l.XRANGEPLAIN]}$`),g("XRANGELOOSE",`^${h[l.GTLT]}\\s*${h[l.XRANGEPLAINLOOSE]}$`),g("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),g("COERCE",`${h[l.COERCEPLAIN]}(?:$|[^\\d])`),g("COERCEFULL",h[l.COERCEPLAIN]+`(?:${h[l.PRERELEASE]})?`+`(?:${h[l.BUILD]})?(?:$|[^\\d])`),g("COERCERTL",h[l.COERCE],!0),g("COERCERTLFULL",h[l.COERCEFULL],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM",`(\\s*)${h[l.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",g("TILDE",`^${h[l.LONETILDE]}${h[l.XRANGEPLAIN]}$`),g("TILDELOOSE",`^${h[l.LONETILDE]}${h[l.XRANGEPLAINLOOSE]}$`),g("LONECARET","(?:\\^)"),g("CARETTRIM",`(\\s*)${h[l.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",g("CARET",`^${h[l.LONECARET]}${h[l.XRANGEPLAIN]}$`),g("CARETLOOSE",`^${h[l.LONECARET]}${h[l.XRANGEPLAINLOOSE]}$`),g("COMPARATORLOOSE",`^${h[l.GTLT]}\\s*(${h[l.LOOSEPLAIN]})$|^$`),g("COMPARATOR",`^${h[l.GTLT]}\\s*(${h[l.FULLPLAIN]})$|^$`),g("COMPARATORTRIM",`(\\s*)${h[l.GTLT]}\\s*(${h[l.LOOSEPLAIN]}|${h[l.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",g("HYPHENRANGE",`^\\s*(${h[l.XRANGEPLAIN]})\\s+-\\s+(${h[l.XRANGEPLAIN]})\\s*$`),g("HYPHENRANGELOOSE",`^\\s*(${h[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${h[l.XRANGEPLAINLOOSE]})\\s*$`),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},9924(t,e,r){"use strict";const n=r(5368);t.exports=(t,e,r)=>n(t,e,">",r)},20153(t,e,r){"use strict";const n=r(15006);t.exports=(t,e,r)=>(t=new n(t,r),e=new n(e,r),t.intersects(e,r))},74173(t,e,r){"use strict";const n=r(5368);t.exports=(t,e,r)=>n(t,e,"<",r)},21017(t,e,r){"use strict";const n=r(86315),i=r(15006);t.exports=(t,e,r)=>{let a=null,s=null,o=null;try{o=new i(e,r)}catch(t){return null}return t.forEach(t=>{o.test(t)&&(a&&-1!==s.compare(t)||(a=t,s=new n(a,r)))}),a}},43811(t,e,r){"use strict";const n=r(86315),i=r(15006);t.exports=(t,e,r)=>{let a=null,s=null,o=null;try{o=new i(e,r)}catch(t){return null}return t.forEach(t=>{o.test(t)&&(a&&1!==s.compare(t)||(a=t,s=new n(a,r)))}),a}},33514(t,e,r){"use strict";const n=r(86315),i=r(15006),a=r(9671);t.exports=(t,e)=>{t=new i(t,e);let r=new n("0.0.0");if(t.test(r))return r;if(r=new n("0.0.0-0"),t.test(r))return r;r=null;for(let e=0;e{const e=new n(t.semver.version);switch(t.operator){case">":0===e.prerelease.length?e.patch++:e.prerelease.push(0),e.raw=e.format();case"":case">=":s&&!a(e,s)||(s=e);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}}),!s||r&&!a(r,s)||(r=s)}return r&&t.test(r)?r:null}},5368(t,e,r){"use strict";const n=r(86315),i=r(32659),{ANY:a}=i,s=r(15006),o=r(71995),u=r(9671),h=r(76912),c=r(68445),l=r(29540);t.exports=(t,e,r,f)=>{let p,d,g,m,y;switch(t=new n(t,f),e=new s(e,f),r){case">":p=u,d=c,g=h,m=">",y=">=";break;case"<":p=h,d=l,g=u,m="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(o(t,e,f))return!1;for(let r=0;r{t.semver===a&&(t=new i(">=0.0.0")),s=s||t,o=o||t,p(t.semver,s.semver,f)?s=t:g(t.semver,o.semver,f)&&(o=t)}),s.operator===m||s.operator===y)return!1;if((!o.operator||o.operator===m)&&d(t,o.semver))return!1;if(o.operator===y&&g(t,o.semver))return!1}return!0}},99388(t,e,r){"use strict";const n=r(71995),i=r(43701);t.exports=(t,e,r)=>{const a=[];let s=null,o=null;const u=t.sort((t,e)=>i(t,e,r));for(const t of u)n(t,e,r)?(o=t,s||(s=t)):(o&&a.push([s,o]),o=null,s=null);s&&a.push([s,null]);const h=[];for(const[t,e]of a)t===e?h.push(t):e||t!==u[0]?e?t===u[0]?h.push(`<=${e}`):h.push(`${t} - ${e}`):h.push(`>=${t}`):h.push("*");const c=h.join(" || "),l="string"==typeof e.raw?e.raw:String(e);return c.length=0.0.0-0")],h=[new i(">=0.0.0")],c=(t,e,r)=>{if(t===e)return!0;if(1===t.length&&t[0].semver===a){if(1===e.length&&e[0].semver===a)return!0;t=r.includePrerelease?u:h}if(1===e.length&&e[0].semver===a){if(r.includePrerelease)return!0;e=h}const n=new Set;let i,c,p,d,g,m,y;for(const e of t)">"===e.operator||">="===e.operator?i=l(i,e,r):"<"===e.operator||"<="===e.operator?c=f(c,e,r):n.add(e.semver);if(n.size>1)return null;if(i&&c){if(p=o(i.semver,c.semver,r),p>0)return null;if(0===p&&(">="!==i.operator||"<="!==c.operator))return null}for(const t of n){if(i&&!s(t,String(i),r))return null;if(c&&!s(t,String(c),r))return null;for(const n of e)if(!s(t,String(n),r))return!1;return!0}let A=!(!c||r.includePrerelease||!c.semver.prerelease.length)&&c.semver,v=!(!i||r.includePrerelease||!i.semver.prerelease.length)&&i.semver;A&&1===A.prerelease.length&&"<"===c.operator&&0===A.prerelease[0]&&(A=!1);for(const t of e){if(y=y||">"===t.operator||">="===t.operator,m=m||"<"===t.operator||"<="===t.operator,i)if(v&&t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===v.major&&t.semver.minor===v.minor&&t.semver.patch===v.patch&&(v=!1),">"===t.operator||">="===t.operator){if(d=l(i,t,r),d===t&&d!==i)return!1}else if(">="===i.operator&&!s(i.semver,String(t),r))return!1;if(c)if(A&&t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===A.major&&t.semver.minor===A.minor&&t.semver.patch===A.patch&&(A=!1),"<"===t.operator||"<="===t.operator){if(g=f(c,t,r),g===t&&g!==c)return!1}else if("<="===c.operator&&!s(c.semver,String(t),r))return!1;if(!t.operator&&(c||i)&&0!==p)return!1}return!(i&&m&&!c&&0!==p||c&&y&&!i&&0!==p||v||A)},l=(t,e,r)=>{if(!t)return e;const n=o(t.semver,e.semver,r);return n>0?t:n<0||">"===e.operator&&">="===t.operator?e:t},f=(t,e,r)=>{if(!t)return e;const n=o(t.semver,e.semver,r);return n<0?t:n>0||"<"===e.operator&&"<="===t.operator?e:t};t.exports=(t,e,r={})=>{if(t===e)return!0;t=new n(t,r),e=new n(e,r);let i=!1;t:for(const n of t.set){for(const t of e.set){const e=c(n,t,r);if(i=i||null!==e,e)continue t}if(i)return!1}return!0}},59278(t,e,r){"use strict";const n=r(15006);t.exports=(t,e)=>new n(t,e).set.map(t=>t.map(t=>t.value).join(" ").trim().split(" "))},96561(t,e,r){"use strict";const n=r(15006);t.exports=(t,e)=>{try{return new n(t,e).range||"*"}catch(t){return null}}},37651(t,e,r){var n=r(48287).Buffer;const i=r(40855),a=r(74977),s=r(47019),o=r(25747),u=r(46111),h=r(87914),c=r(58928),l=r(73639),f=r(79001),p=r(45931),d=r(67083),{KeyObject:g,createSecretKey:m,createPrivateKey:y}=r(91565),A=["RS256","RS384","RS512","ES256","ES384","ES512","HS256","HS384","HS512","none"];a&&A.splice(3,0,"PS256","PS384","PS512");const v={expiresIn:{isValid:function(t){return c(t)||p(t)&&t},message:'"expiresIn" should be a number of seconds or string representing a timespan'},notBefore:{isValid:function(t){return c(t)||p(t)&&t},message:'"notBefore" should be a number of seconds or string representing a timespan'},audience:{isValid:function(t){return p(t)||Array.isArray(t)},message:'"audience" must be a string or array'},algorithm:{isValid:u.bind(null,A),message:'"algorithm" must be a valid string enum value'},header:{isValid:f,message:'"header" must be an object'},encoding:{isValid:p,message:'"encoding" must be a string'},issuer:{isValid:p,message:'"issuer" must be a string'},subject:{isValid:p,message:'"subject" must be a string'},jwtid:{isValid:p,message:'"jwtid" must be a string'},noTimestamp:{isValid:h,message:'"noTimestamp" must be a boolean'},keyid:{isValid:p,message:'"keyid" must be a string'},mutatePayload:{isValid:h,message:'"mutatePayload" must be a boolean'},allowInsecureKeySizes:{isValid:h,message:'"allowInsecureKeySizes" must be a boolean'},allowInvalidAsymmetricKeyTypes:{isValid:h,message:'"allowInvalidAsymmetricKeyTypes" must be a boolean'}},b={iat:{isValid:l,message:'"iat" should be a number of seconds'},exp:{isValid:l,message:'"exp" should be a number of seconds'},nbf:{isValid:l,message:'"nbf" should be a number of seconds'}};function w(t,e,r,n){if(!f(r))throw new Error('Expected "'+n+'" to be a plain object.');Object.keys(r).forEach(function(i){const a=t[i];if(a){if(!a.isValid(r[i]))throw new Error(a.message)}else if(!e)throw new Error('"'+i+'" is not allowed in "'+n+'"')})}const C={audience:"aud",issuer:"iss",subject:"sub",jwtid:"jti"},E=["expiresIn","notBefore","noTimestamp","audience","issuer","subject","jwtid"];t.exports=function(t,e,r,a){"function"==typeof r?(a=r,r={}):r=r||{};const u="object"==typeof t&&!n.isBuffer(t),h=Object.assign({alg:r.algorithm||"HS256",typ:u?"JWT":void 0,kid:r.keyid},r.header);function c(t){if(a)return a(t);throw t}if(!e&&"none"!==r.algorithm)return c(new Error("secretOrPrivateKey must have a value"));if(null!=e&&!(e instanceof g))try{e=y(e)}catch(t){try{e=m("string"==typeof e?n.from(e):e)}catch(t){return c(new Error("secretOrPrivateKey is not valid key material"))}}if(h.alg.startsWith("HS")&&"secret"!==e.type)return c(new Error(`secretOrPrivateKey must be a symmetric key when using ${h.alg}`));if(/^(?:RS|PS|ES)/.test(h.alg)){if("private"!==e.type)return c(new Error(`secretOrPrivateKey must be an asymmetric key when using ${h.alg}`));if(!r.allowInsecureKeySizes&&!h.alg.startsWith("ES")&&void 0!==e.asymmetricKeyDetails&&e.asymmetricKeyDetails.modulusLength<2048)return c(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${h.alg}`))}if(void 0===t)return c(new Error("payload is required"));if(u){try{!function(t){w(b,!0,t,"payload")}(t)}catch(t){return c(t)}r.mutatePayload||(t=Object.assign({},t))}else{const e=E.filter(function(t){return void 0!==r[t]});if(e.length>0)return c(new Error("invalid "+e.join(",")+" option for "+typeof t+" payload"))}if(void 0!==t.exp&&void 0!==r.expiresIn)return c(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.'));if(void 0!==t.nbf&&void 0!==r.notBefore)return c(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.'));try{!function(t){w(v,!1,t,"options")}(r)}catch(t){return c(t)}if(!r.allowInvalidAsymmetricKeyTypes)try{s(h.alg,e)}catch(t){return c(t)}const l=t.iat||Math.floor(Date.now()/1e3);if(r.noTimestamp?delete t.iat:u&&(t.iat=l),void 0!==r.notBefore){try{t.nbf=i(r.notBefore,l)}catch(t){return c(t)}if(void 0===t.nbf)return c(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}if(void 0!==r.expiresIn&&"object"==typeof t){try{t.exp=i(r.expiresIn,l)}catch(t){return c(t)}if(void 0===t.exp)return c(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'))}Object.keys(C).forEach(function(e){const n=C[e];if(void 0!==r[e]){if(void 0!==t[n])return c(new Error('Bad "options.'+e+'" option. The payload already has an "'+n+'" property.'));t[n]=r[e]}});const f=r.encoding||"utf8";if("function"!=typeof a){let n=o.sign({header:h,payload:t,secret:e,encoding:f});if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(h.alg)&&n.length<256)throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${h.alg}`);return n}a=a&&d(a),o.createSign({header:h,privateKey:e,payload:t,encoding:f}).once("error",a).once("done",function(t){if(!r.allowInsecureKeySizes&&/^(?:RS|PS)/.test(h.alg)&&t.length<256)return a(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${h.alg}`));a(null,t)})}},91691(t,e,r){var n=r(48287).Buffer;const i=r(81741),a=r(13726),s=r(18980),o=r(37260),u=r(40855),h=r(47019),c=r(74977),l=r(25747),{KeyObject:f,createSecretKey:p,createPublicKey:d}=r(91565),g=["RS256","RS384","RS512"],m=["ES256","ES384","ES512"],y=["RS256","RS384","RS512"],A=["HS256","HS384","HS512"];c&&(g.splice(g.length,0,"PS256","PS384","PS512"),y.splice(y.length,0,"PS256","PS384","PS512")),t.exports=function(t,e,r,c){let v;if("function"!=typeof r||c||(c=r,r={}),r||(r={}),r=Object.assign({},r),v=c||function(t,e){if(t)throw t;return e},r.clockTimestamp&&"number"!=typeof r.clockTimestamp)return v(new i("clockTimestamp must be a number"));if(void 0!==r.nonce&&("string"!=typeof r.nonce||""===r.nonce.trim()))return v(new i("nonce must be a non-empty string"));if(void 0!==r.allowInvalidAsymmetricKeyTypes&&"boolean"!=typeof r.allowInvalidAsymmetricKeyTypes)return v(new i("allowInvalidAsymmetricKeyTypes must be a boolean"));const b=r.clockTimestamp||Math.floor(Date.now()/1e3);if(!t)return v(new i("jwt must be provided"));if("string"!=typeof t)return v(new i("jwt must be a string"));const w=t.split(".");if(3!==w.length)return v(new i("jwt malformed"));let C;try{C=o(t,{complete:!0})}catch(t){return v(t)}if(!C)return v(new i("invalid token"));const E=C.header;let S;if("function"==typeof e){if(!c)return v(new i("verify must be called asynchronous if secret or public key is provided as a callback"));S=e}else S=function(t,r){return r(null,e)};return S(E,function(e,o){if(e)return v(new i("error in secret or public key callback: "+e.message));const c=""!==w[2].trim();if(!c&&o)return v(new i("jwt signature is required"));if(c&&!o)return v(new i("secret or public key must be provided"));if(!c&&!r.algorithms)return v(new i('please specify "none" in "algorithms" to verify unsigned tokens'));if(null!=o&&!(o instanceof f))try{o=d(o)}catch(t){try{o=p("string"==typeof o?n.from(o):o)}catch(t){return v(new i("secretOrPublicKey is not valid key material"))}}if(r.algorithms||("secret"===o.type?r.algorithms=A:["rsa","rsa-pss"].includes(o.asymmetricKeyType)?r.algorithms=y:"ec"===o.asymmetricKeyType?r.algorithms=m:r.algorithms=g),-1===r.algorithms.indexOf(C.header.alg))return v(new i("invalid algorithm"));if(E.alg.startsWith("HS")&&"secret"!==o.type)return v(new i(`secretOrPublicKey must be a symmetric key when using ${E.alg}`));if(/^(?:RS|PS|ES)/.test(E.alg)&&"public"!==o.type)return v(new i(`secretOrPublicKey must be an asymmetric key when using ${E.alg}`));if(!r.allowInvalidAsymmetricKeyTypes)try{h(E.alg,o)}catch(t){return v(t)}let S;try{S=l.verify(t,C.header.alg,o)}catch(t){return v(t)}if(!S)return v(new i("invalid signature"));const I=C.payload;if(void 0!==I.nbf&&!r.ignoreNotBefore){if("number"!=typeof I.nbf)return v(new i("invalid nbf value"));if(I.nbf>b+(r.clockTolerance||0))return v(new a("jwt not active",new Date(1e3*I.nbf)))}if(void 0!==I.exp&&!r.ignoreExpiration){if("number"!=typeof I.exp)return v(new i("invalid exp value"));if(b>=I.exp+(r.clockTolerance||0))return v(new s("jwt expired",new Date(1e3*I.exp)))}if(r.audience){const t=Array.isArray(r.audience)?r.audience:[r.audience];if(!(Array.isArray(I.aud)?I.aud:[I.aud]).some(function(e){return t.some(function(t){return t instanceof RegExp?t.test(e):t===e})}))return v(new i("jwt audience invalid. expected: "+t.join(" or ")))}if(r.issuer&&("string"==typeof r.issuer&&I.iss!==r.issuer||Array.isArray(r.issuer)&&-1===r.issuer.indexOf(I.iss)))return v(new i("jwt issuer invalid. expected: "+r.issuer));if(r.subject&&I.sub!==r.subject)return v(new i("jwt subject invalid. expected: "+r.subject));if(r.jwtid&&I.jti!==r.jwtid)return v(new i("jwt jwtid invalid. expected: "+r.jwtid));if(r.nonce&&I.nonce!==r.nonce)return v(new i("jwt nonce invalid. expected: "+r.nonce));if(r.maxAge){if("number"!=typeof I.iat)return v(new i("iat required when maxAge is specified"));const t=u(r.maxAge,I.iat);if(void 0===t)return v(new i('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60'));if(b>=t+(r.clockTolerance||0))return v(new s("maxAge exceeded",new Date(1e3*t)))}if(!0===r.complete){const t=C.signature;return v(null,{header:E,payload:I,signature:t})}return v(null,I)})}},95355(t,e,r){var n,i,a,s,o,u,h,c,l,f,p,d=r(48287).Buffer,g={userAgent:!1},m={},y=y||(n=Math,a=(i={}).lib={},s=a.Base=function(){function t(){}return{extend:function(e){t.prototype=this;var r=new t;return e&&r.mixIn(e),r.hasOwnProperty("init")||(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),o=a.WordArray=s.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||h).stringify(this)},concat:function(t){var e=this.words,r=t.words,n=this.sigBytes,i=t.sigBytes;if(this.clamp(),n%4)for(var a=0;a>>2]>>>24-a%4*8&255;e[n+a>>>2]|=s<<24-(n+a)%4*8}else for(a=0;a>>2]=r[a>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,e=this.sigBytes;t[e>>>2]&=4294967295<<32-e%4*8,t.length=n.ceil(e/4)},clone:function(){var t=s.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],r=0;r>>2]>>>24-i%4*8&255;n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new o.init(r,e/2)}},c=u.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(a))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new o.init(r,e)}},l=u.Utf8={stringify:function(t){try{return decodeURIComponent(escape(c.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return c.parse(unescape(encodeURIComponent(t)))}},f=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=l.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(t){var e=this._data,r=e.words,i=e.sigBytes,a=this.blockSize,s=i/(4*a),u=(s=t?n.ceil(s):n.max((0|s)-this._minBufferSize,0))*a,h=n.min(4*u,i);if(u){for(var c=0;c>>2]}},t.BlockCipher=s.extend({cfg:s.cfg.extend({mode:o,padding:h}),reset:function(){s.reset.call(this);var t=(e=this.cfg).iv,e=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=e.createEncryptor;else r=e.createDecryptor,this._minBufferSize=1;this._mode=r.call(e,this,t&&t.words)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else e=this._process(!0),t.unpad(e);return e},blockSize:4});var c=t.CipherParams=e.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),l=(o=(f.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext;return((t=t.salt)?r.create([1398893684,1701076831]).concat(t).concat(e):e).toString(i)},parse:function(t){var e=(t=i.parse(t)).words;if(1398893684==e[0]&&1701076831==e[1]){var n=r.create(e.slice(2,4));e.splice(0,4),t.sigBytes-=16}return c.create({ciphertext:t,salt:n})}},t.SerializableCipher=e.extend({cfg:e.extend({format:o}),encrypt:function(t,e,r,n){n=this.cfg.extend(n);var i=t.createEncryptor(r,n);return e=i.finalize(e),i=i.cfg,c.create({ciphertext:e,key:r,iv:i.iv,algorithm:t,mode:i.mode,padding:i.padding,blockSize:t.blockSize,formatter:n.format})},decrypt:function(t,e,r,n){return n=this.cfg.extend(n),e=this._parse(e,n.format),t.createDecryptor(r,n).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}})),f=(f.kdf={}).OpenSSL={execute:function(t,e,n,i){return i||(i=r.random(8)),t=a.create({keySize:e+n}).compute(t,i),n=r.create(t.words.slice(e),4*n),t.sigBytes=4*e,c.create({key:t,iv:n,salt:i})}},p=t.PasswordBasedCipher=l.extend({cfg:l.cfg.extend({kdf:f}),encrypt:function(t,e,r,n){return r=(n=this.cfg.extend(n)).kdf.execute(r,t.keySize,t.ivSize),n.iv=r.iv,(t=l.encrypt.call(this,t,e,r.key,n)).mixIn(r),t},decrypt:function(t,e,r,n){return n=this.cfg.extend(n),e=this._parse(e,n.format),r=n.kdf.execute(r,t.keySize,t.ivSize,e.salt),n.iv=r.iv,l.decrypt.call(this,t,e,r.key,n)}})}(),function(){for(var t=y,e=t.lib.BlockCipher,r=t.algo,n=[],i=[],a=[],s=[],o=[],u=[],h=[],c=[],l=[],f=[],p=[],d=0;256>d;d++)p[d]=128>d?d<<1:d<<1^283;var g=0,m=0;for(d=0;256>d;d++){var A=(A=m^m<<1^m<<2^m<<3^m<<4)>>>8^255&A^99;n[g]=A,i[A]=g;var v=p[g],b=p[v],w=p[b],C=257*p[A]^16843008*A;a[g]=C<<24|C>>>8,s[g]=C<<16|C>>>16,o[g]=C<<8|C>>>24,u[g]=C,C=16843009*w^65537*b^257*v^16843008*g,h[A]=C<<24|C>>>8,c[A]=C<<16|C>>>16,l[A]=C<<8|C>>>24,f[A]=C,g?(g=v^p[p[p[w^v]]],m^=p[p[m]]):g=m=1}var E=[0,1,2,4,8,16,32,64,128,27,54];r=r.AES=e.extend({_doReset:function(){for(var t=(r=this._key).words,e=r.sigBytes/4,r=4*((this._nRounds=e+6)+1),i=this._keySchedule=[],a=0;a>>24]<<24|n[s>>>16&255]<<16|n[s>>>8&255]<<8|n[255&s]):(s=n[(s=s<<8|s>>>24)>>>24]<<24|n[s>>>16&255]<<16|n[s>>>8&255]<<8|n[255&s],s^=E[a/e|0]<<24),i[a]=i[a-e]^s}for(t=this._invKeySchedule=[],e=0;ee||4>=a?s:h[n[s>>>24]]^c[n[s>>>16&255]]^l[n[s>>>8&255]]^f[n[255&s]]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,a,s,o,u,n)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,h,c,l,f,i),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,n,i,a,s,o){for(var u=this._nRounds,h=t[e]^r[0],c=t[e+1]^r[1],l=t[e+2]^r[2],f=t[e+3]^r[3],p=4,d=1;d>>24]^i[c>>>16&255]^a[l>>>8&255]^s[255&f]^r[p++],m=n[c>>>24]^i[l>>>16&255]^a[f>>>8&255]^s[255&h]^r[p++],y=n[l>>>24]^i[f>>>16&255]^a[h>>>8&255]^s[255&c]^r[p++];f=n[f>>>24]^i[h>>>16&255]^a[c>>>8&255]^s[255&l]^r[p++],h=g,c=m,l=y}g=(o[h>>>24]<<24|o[c>>>16&255]<<16|o[l>>>8&255]<<8|o[255&f])^r[p++],m=(o[c>>>24]<<24|o[l>>>16&255]<<16|o[f>>>8&255]<<8|o[255&h])^r[p++],y=(o[l>>>24]<<24|o[f>>>16&255]<<16|o[h>>>8&255]<<8|o[255&c])^r[p++],f=(o[f>>>24]<<24|o[h>>>16&255]<<16|o[c>>>8&255]<<8|o[255&l])^r[p++],t[e]=g,t[e+1]=m,t[e+2]=y,t[e+3]=f},keySize:8}),t.AES=e._createHelper(r)}(),function(){function t(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r<>>t^this._lBlock)&e;this._lBlock^=r,this._rBlock^=r<r;r++){var n=s[r]-1;e[r]=t[n>>>5]>>>31-n%32&1}for(t=this._subKeys=[],n=0;16>n;n++){var i=t[n]=[],a=u[n];for(r=0;24>r;r++)i[r/6|0]|=e[(o[r]-1+a)%28]<<31-r%6,i[4+(r/6|0)]|=e[28+(o[r+24]-1+a)%28]<<31-r%6;for(i[0]=i[0]<<1|i[0]>>>31,r=1;7>r;r++)i[r]>>>=4*(r-1)+3;i[7]=i[7]<<5|i[7]>>>27}for(e=this._invSubKeys=[],r=0;16>r;r++)e[r]=t[15-r]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(r,n,i){this._lBlock=r[n],this._rBlock=r[n+1],t.call(this,4,252645135),t.call(this,16,65535),e.call(this,2,858993459),e.call(this,8,16711935),t.call(this,1,1431655765);for(var a=0;16>a;a++){for(var s=i[a],o=this._lBlock,u=this._rBlock,l=0,f=0;8>f;f++)l|=h[f][((u^s[f])&c[f])>>>0];this._lBlock=u,this._rBlock=o^l}i=this._lBlock,this._lBlock=this._rBlock,this._rBlock=i,t.call(this,1,1431655765),e.call(this,8,16711935),e.call(this,2,858993459),t.call(this,16,65535),t.call(this,4,252645135),r[n]=this._lBlock,r[n+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});r.DES=i._createHelper(l),a=a.TripleDES=i.extend({_doReset:function(){var t=this._key.words;this._des1=l.createEncryptor(n.create(t.slice(0,2))),this._des2=l.createEncryptor(n.create(t.slice(2,4))),this._des3=l.createEncryptor(n.create(t.slice(4,6)))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2}),r.TripleDES=i._createHelper(a)}(),function(){var t=y,e=t.lib.WordArray;t.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,n=this._map;t.clamp(),t=[];for(var i=0;i>>2]>>>24-i%4*8&255)<<16|(e[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|e[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;4>s&&i+.75*s>>6*(3-s)&63));if(e=n.charAt(64))for(;t.length%4;)t.push(e);return t.join("")},parse:function(t){var r=t.length,n=this._map;(i=n.charAt(64))&&-1!=(i=t.indexOf(i))&&(r=i);for(var i=[],a=0,s=0;s>>6-s%4*2;i[a>>>2]|=(o|u)<<24-a%4*8,a++}return e.create(i,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(t){function e(t,e,r,n,i,a,s){return((t=t+(e&r|~e&n)+i+s)<>>32-a)+e}function r(t,e,r,n,i,a,s){return((t=t+(e&n|r&~n)+i+s)<>>32-a)+e}function n(t,e,r,n,i,a,s){return((t=t+(e^r^n)+i+s)<>>32-a)+e}function i(t,e,r,n,i,a,s){return((t=t+(r^(e|~n))+i+s)<>>32-a)+e}for(var a=y,s=(u=a.lib).WordArray,o=u.Hasher,u=a.algo,h=[],c=0;64>c;c++)h[c]=4294967296*t.abs(t.sin(c+1))|0;u=u.MD5=o.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,a){for(var s=0;16>s;s++){var o=t[u=a+s];t[u]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}s=this._hash.words;var u=t[a+0],c=(o=t[a+1],t[a+2]),l=t[a+3],f=t[a+4],p=t[a+5],d=t[a+6],g=t[a+7],m=t[a+8],y=t[a+9],A=t[a+10],v=t[a+11],b=t[a+12],w=t[a+13],C=t[a+14],E=t[a+15],S=e(S=s[0],_=s[1],B=s[2],I=s[3],u,7,h[0]),I=e(I,S,_,B,o,12,h[1]),B=e(B,I,S,_,c,17,h[2]),_=e(_,B,I,S,l,22,h[3]);S=e(S,_,B,I,f,7,h[4]),I=e(I,S,_,B,p,12,h[5]),B=e(B,I,S,_,d,17,h[6]),_=e(_,B,I,S,g,22,h[7]),S=e(S,_,B,I,m,7,h[8]),I=e(I,S,_,B,y,12,h[9]),B=e(B,I,S,_,A,17,h[10]),_=e(_,B,I,S,v,22,h[11]),S=e(S,_,B,I,b,7,h[12]),I=e(I,S,_,B,w,12,h[13]),B=e(B,I,S,_,C,17,h[14]),S=r(S,_=e(_,B,I,S,E,22,h[15]),B,I,o,5,h[16]),I=r(I,S,_,B,d,9,h[17]),B=r(B,I,S,_,v,14,h[18]),_=r(_,B,I,S,u,20,h[19]),S=r(S,_,B,I,p,5,h[20]),I=r(I,S,_,B,A,9,h[21]),B=r(B,I,S,_,E,14,h[22]),_=r(_,B,I,S,f,20,h[23]),S=r(S,_,B,I,y,5,h[24]),I=r(I,S,_,B,C,9,h[25]),B=r(B,I,S,_,l,14,h[26]),_=r(_,B,I,S,m,20,h[27]),S=r(S,_,B,I,w,5,h[28]),I=r(I,S,_,B,c,9,h[29]),B=r(B,I,S,_,g,14,h[30]),S=n(S,_=r(_,B,I,S,b,20,h[31]),B,I,p,4,h[32]),I=n(I,S,_,B,m,11,h[33]),B=n(B,I,S,_,v,16,h[34]),_=n(_,B,I,S,C,23,h[35]),S=n(S,_,B,I,o,4,h[36]),I=n(I,S,_,B,f,11,h[37]),B=n(B,I,S,_,g,16,h[38]),_=n(_,B,I,S,A,23,h[39]),S=n(S,_,B,I,w,4,h[40]),I=n(I,S,_,B,u,11,h[41]),B=n(B,I,S,_,l,16,h[42]),_=n(_,B,I,S,d,23,h[43]),S=n(S,_,B,I,y,4,h[44]),I=n(I,S,_,B,b,11,h[45]),B=n(B,I,S,_,E,16,h[46]),S=i(S,_=n(_,B,I,S,c,23,h[47]),B,I,u,6,h[48]),I=i(I,S,_,B,g,10,h[49]),B=i(B,I,S,_,C,15,h[50]),_=i(_,B,I,S,p,21,h[51]),S=i(S,_,B,I,b,6,h[52]),I=i(I,S,_,B,l,10,h[53]),B=i(B,I,S,_,A,15,h[54]),_=i(_,B,I,S,o,21,h[55]),S=i(S,_,B,I,m,6,h[56]),I=i(I,S,_,B,E,10,h[57]),B=i(B,I,S,_,d,15,h[58]),_=i(_,B,I,S,w,21,h[59]),S=i(S,_,B,I,f,6,h[60]),I=i(I,S,_,B,v,10,h[61]),B=i(B,I,S,_,c,15,h[62]),_=i(_,B,I,S,y,21,h[63]),s[0]=s[0]+S|0,s[1]=s[1]+_|0,s[2]=s[2]+B|0,s[3]=s[3]+I|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;r[i>>>5]|=128<<24-i%32;var a=t.floor(n/4294967296);for(r[15+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),r[14+(i+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(r.length+1),this._process(),r=(e=this._hash).words,n=0;4>n;n++)i=r[n],r[n]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);return e},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}}),a.MD5=o._createHelper(u),a.HmacMD5=o._createHmacHelper(u)}(Math),function(){var t=y,e=(i=t.lib).WordArray,r=i.Hasher,n=[],i=t.algo.SHA1=r.extend({_doReset:function(){this._hash=new e.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],a=r[1],s=r[2],o=r[3],u=r[4],h=0;80>h;h++){if(16>h)n[h]=0|t[e+h];else{var c=n[h-3]^n[h-8]^n[h-14]^n[h-16];n[h]=c<<1|c>>>31}c=(i<<5|i>>>27)+u+n[h],c=20>h?c+(1518500249+(a&s|~a&o)):40>h?c+(1859775393+(a^s^o)):60>h?c+((a&s|a&o|s&o)-1894007588):c+((a^s^o)-899497514),u=o,o=s,s=a<<30|a>>>2,a=i,i=c}r[0]=r[0]+i|0,r[1]=r[1]+a|0,r[2]=r[2]+s|0,r[3]=r[3]+o|0,r[4]=r[4]+u|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=Math.floor(r/4294967296),e[15+(n+64>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA1=r._createHelper(i),t.HmacSHA1=r._createHmacHelper(i)}(),function(t){for(var e=y,r=(i=e.lib).WordArray,n=i.Hasher,i=e.algo,a=[],s=[],o=function(t){return 4294967296*(t-(0|t))|0},u=2,h=0;64>h;){var c;t:{c=u;for(var l=t.sqrt(c),f=2;f<=l;f++)if(!(c%f)){c=!1;break t}c=!0}c&&(8>h&&(a[h]=o(t.pow(u,.5))),s[h]=o(t.pow(u,1/3)),h++),u++}var p=[];i=i.SHA256=n.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],o=r[3],u=r[4],h=r[5],c=r[6],l=r[7],f=0;64>f;f++){if(16>f)p[f]=0|t[e+f];else{var d=p[f-15],g=p[f-2];p[f]=((d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3)+p[f-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+p[f-16]}d=l+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&h^~u&c)+s[f]+p[f],g=((n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22))+(n&i^n&a^i&a),l=c,c=h,h=u,u=o+d|0,o=a,a=i,i=n,n=d+g|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+u|0,r[5]=r[5]+h|0,r[6]=r[6]+c|0,r[7]=r[7]+l|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=t.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}}),e.SHA256=n._createHelper(i),e.HmacSHA256=n._createHmacHelper(i)}(Math),function(){var t=y,e=t.lib.WordArray,r=(n=t.algo).SHA256,n=n.SHA224=r.extend({_doReset:function(){this._hash=new e.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=r._doFinalize.call(this);return t.sigBytes-=4,t}});t.SHA224=r._createHelper(n),t.HmacSHA224=r._createHmacHelper(n)}(),function(){function t(){return n.create.apply(n,arguments)}for(var e=y,r=e.lib.Hasher,n=(a=e.x64).Word,i=a.WordArray,a=e.algo,s=[t(1116352408,3609767458),t(1899447441,602891725),t(3049323471,3964484399),t(3921009573,2173295548),t(961987163,4081628472),t(1508970993,3053834265),t(2453635748,2937671579),t(2870763221,3664609560),t(3624381080,2734883394),t(310598401,1164996542),t(607225278,1323610764),t(1426881987,3590304994),t(1925078388,4068182383),t(2162078206,991336113),t(2614888103,633803317),t(3248222580,3479774868),t(3835390401,2666613458),t(4022224774,944711139),t(264347078,2341262773),t(604807628,2007800933),t(770255983,1495990901),t(1249150122,1856431235),t(1555081692,3175218132),t(1996064986,2198950837),t(2554220882,3999719339),t(2821834349,766784016),t(2952996808,2566594879),t(3210313671,3203337956),t(3336571891,1034457026),t(3584528711,2466948901),t(113926993,3758326383),t(338241895,168717936),t(666307205,1188179964),t(773529912,1546045734),t(1294757372,1522805485),t(1396182291,2643833823),t(1695183700,2343527390),t(1986661051,1014477480),t(2177026350,1206759142),t(2456956037,344077627),t(2730485921,1290863460),t(2820302411,3158454273),t(3259730800,3505952657),t(3345764771,106217008),t(3516065817,3606008344),t(3600352804,1432725776),t(4094571909,1467031594),t(275423344,851169720),t(430227734,3100823752),t(506948616,1363258195),t(659060556,3750685593),t(883997877,3785050280),t(958139571,3318307427),t(1322822218,3812723403),t(1537002063,2003034995),t(1747873779,3602036899),t(1955562222,1575990012),t(2024104815,1125592928),t(2227730452,2716904306),t(2361852424,442776044),t(2428436474,593698344),t(2756734187,3733110249),t(3204031479,2999351573),t(3329325298,3815920427),t(3391569614,3928383900),t(3515267271,566280711),t(3940187606,3454069534),t(4118630271,4000239992),t(116418474,1914138554),t(174292421,2731055270),t(289380356,3203993006),t(460393269,320620315),t(685471733,587496836),t(852142971,1086792851),t(1017036298,365543100),t(1126000580,2618297676),t(1288033470,3409855158),t(1501505948,4234509866),t(1607167915,987167468),t(1816402316,1246189591)],o=[],u=0;80>u;u++)o[u]=t();a=a.SHA512=r.extend({_doReset:function(){this._hash=new i.init([new n.init(1779033703,4089235720),new n.init(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new n.init(1359893119,2917565137),new n.init(2600822924,725511199),new n.init(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var r=(l=this._hash.words)[0],n=l[1],i=l[2],a=l[3],u=l[4],h=l[5],c=l[6],l=l[7],f=r.high,p=r.low,d=n.high,g=n.low,m=i.high,y=i.low,A=a.high,v=a.low,b=u.high,w=u.low,C=h.high,E=h.low,S=c.high,I=c.low,B=l.high,_=l.low,M=f,x=p,T=d,R=g,F=m,D=y,k=A,L=v,N=b,H=w,P=C,U=E,O=S,Q=I,j=B,K=_,G=0;80>G;G++){var V=o[G];if(16>G)var q=V.high=0|t[e+2*G],W=V.low=0|t[e+2*G+1];else{q=((W=(q=o[G-15]).high)>>>1|(z=q.low)<<31)^(W>>>8|z<<24)^W>>>7;var z=(z>>>1|W<<31)^(z>>>8|W<<24)^(z>>>7|W<<25),Y=((W=(Y=o[G-2]).high)>>>19|(J=Y.low)<<13)^(W<<3|J>>>29)^W>>>6,J=(J>>>19|W<<13)^(J<<3|W>>>29)^(J>>>6|W<<26),X=(W=o[G-7]).high,Z=($=o[G-16]).high,$=$.low;q=(q=(q=q+X+((W=z+W.low)>>>0>>0?1:0))+Y+((W+=J)>>>0>>0?1:0))+Z+((W+=$)>>>0<$>>>0?1:0),V.high=q,V.low=W}X=N&P^~N&O,$=H&U^~H&Q,V=M&T^M&F^T&F;var tt=x&R^x&D^R&D,et=(z=(M>>>28|x<<4)^(M<<30|x>>>2)^(M<<25|x>>>7),Y=(x>>>28|M<<4)^(x<<30|M>>>2)^(x<<25|M>>>7),(J=s[G]).high),rt=J.low;Z=j+((N>>>14|H<<18)^(N>>>18|H<<14)^(N<<23|H>>>9))+((J=K+((H>>>14|N<<18)^(H>>>18|N<<14)^(H<<23|N>>>9)))>>>0>>0?1:0),j=O,K=Q,O=P,Q=U,P=N,U=H,N=k+(Z=(Z=(Z=Z+X+((J+=$)>>>0<$>>>0?1:0))+et+((J+=rt)>>>0>>0?1:0))+q+((J+=W)>>>0>>0?1:0))+((H=L+J|0)>>>0>>0?1:0)|0,k=F,L=D,F=T,D=R,T=M,R=x,M=Z+(V=z+V+((W=Y+tt)>>>0>>0?1:0))+((x=J+W|0)>>>0>>0?1:0)|0}p=r.low=p+x,r.high=f+M+(p>>>0>>0?1:0),g=n.low=g+R,n.high=d+T+(g>>>0>>0?1:0),y=i.low=y+D,i.high=m+F+(y>>>0>>0?1:0),v=a.low=v+L,a.high=A+k+(v>>>0>>0?1:0),w=u.low=w+H,u.high=b+N+(w>>>0>>0?1:0),E=h.low=E+U,h.high=C+P+(E>>>0>>0?1:0),I=c.low=I+Q,c.high=S+O+(I>>>0>>0?1:0),_=l.low=_+K,l.high=B+j+(_>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;return e[n>>>5]|=128<<24-n%32,e[30+(n+128>>>10<<5)]=Math.floor(r/4294967296),e[31+(n+128>>>10<<5)]=r,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32}),e.SHA512=r._createHelper(a),e.HmacSHA512=r._createHmacHelper(a)}(),function(){var t=y,e=(i=t.x64).Word,r=i.WordArray,n=(i=t.algo).SHA512,i=i.SHA384=n.extend({_doReset:function(){this._hash=new r.init([new e.init(3418070365,3238371032),new e.init(1654270250,914150663),new e.init(2438529370,812702999),new e.init(355462360,4144912697),new e.init(1731405415,4290775857),new e.init(2394180231,1750603025),new e.init(3675008525,1694076839),new e.init(1203062813,3204075428)])},_doFinalize:function(){var t=n._doFinalize.call(this);return t.sigBytes-=16,t}});t.SHA384=n._createHelper(i),t.HmacSHA384=n._createHmacHelper(i)}(),function(){var t=y,e=(n=t.lib).WordArray,r=n.Hasher,n=t.algo,i=e.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),a=e.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),s=e.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),o=e.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),u=e.create([0,1518500249,1859775393,2400959708,2840853838]),h=e.create([1352829926,1548603684,1836072691,2053994217,0]);n=n.RIPEMD160=r.extend({_doReset:function(){this._hash=e.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=0;16>r;r++){var n=t[w=e+r];t[w]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var c,l,f,p,d,g,m,y,A,v,b,w=this._hash.words,C=(n=u.words,h.words),E=i.words,S=a.words,I=s.words,B=o.words;for(g=c=w[0],m=l=w[1],y=f=w[2],A=p=w[3],v=d=w[4],r=0;80>r;r+=1)b=c+t[e+E[r]]|0,b=16>r?b+((l^f^p)+n[0]):32>r?b+((l&f|~l&p)+n[1]):48>r?b+(((l|~f)^p)+n[2]):64>r?b+((l&p|f&~p)+n[3]):b+((l^(f|~p))+n[4]),b=(b=(b|=0)<>>32-I[r])+d|0,c=d,d=p,p=f<<10|f>>>22,f=l,l=b,b=g+t[e+S[r]]|0,b=16>r?b+((m^(y|~A))+C[0]):32>r?b+((m&A|y&~A)+C[1]):48>r?b+(((m|~y)^A)+C[2]):64>r?b+((m&y|~m&A)+C[3]):b+((m^y^A)+C[4]),b=(b=(b|=0)<>>32-B[r])+v|0,g=v,v=A,A=y<<10|y>>>22,y=m,m=b;b=w[1]+f+A|0,w[1]=w[2]+p+v|0,w[2]=w[3]+d+g|0,w[3]=w[4]+c+m|0,w[4]=w[0]+l+y|0,w[0]=b},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,n=8*t.sigBytes;for(e[n>>>5]|=128<<24-n%32,e[14+(n+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(e.length+1),this._process(),e=(t=this._hash).words,r=0;5>r;r++)n=e[r],e[r]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8);return t},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}}),t.RIPEMD160=r._createHelper(n),t.HmacRIPEMD160=r._createHmacHelper(n)}(Math),function(){var t=y,e=t.enc.Utf8;t.algo.HMAC=t.lib.Base.extend({init:function(t,r){t=this._hasher=new t.init,"string"==typeof r&&(r=e.parse(r));var n=t.blockSize,i=4*n;r.sigBytes>i&&(r=t.finalize(r)),r.clamp();for(var a=this._oKey=r.clone(),s=this._iKey=r.clone(),o=a.words,u=s.words,h=0;h>6)+v.charAt(63&r);for(e+1==t.length?(r=parseInt(t.substring(e,e+1),16),n+=v.charAt(r<<2)):e+2==t.length&&(r=parseInt(t.substring(e,e+2),16),n+=v.charAt(r>>2)+v.charAt((3&r)<<4));(3&n.length)>0;)n+="=";return n}function w(t){var e,r,n,i="",a=0;for(e=0;e>2),r=3&n,a=1):1==a?(i+=_(r<<2|n>>4),r=15&n,a=2):2==a?(i+=_(r),i+=_(n>>2),r=3&n,a=3):(i+=_(r<<2|n>>4),i+=_(15&n),a=0));return 1==a&&(i+=_(r<<2)),i}function C(t,e,r){null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function E(){return new C(null)}"Microsoft Internet Explorer"==g.appName?(C.prototype.am=function(t,e,r,n,i,a){for(var s=32767&e,o=e>>15;--a>=0;){var u=32767&this[t],h=this[t++]>>15,c=o*u+h*s;i=((u=s*u+((32767&c)<<15)+r[n]+(1073741823&i))>>>30)+(c>>>15)+o*h+(i>>>30),r[n++]=1073741823&u}return i},A=30):"Netscape"!=g.appName?(C.prototype.am=function(t,e,r,n,i,a){for(;--a>=0;){var s=e*this[t++]+r[n]+i;i=Math.floor(s/67108864),r[n++]=67108863&s}return i},A=26):(C.prototype.am=function(t,e,r,n,i,a){for(var s=16383&e,o=e>>14;--a>=0;){var u=16383&this[t],h=this[t++]>>14,c=o*u+h*s;i=((u=s*u+((16383&c)<<14)+r[n]+i)>>28)+(c>>14)+o*h,r[n++]=268435455&u}return i},A=28),C.prototype.DB=A,C.prototype.DM=(1<>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function R(t){this.m=t}function F(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function P(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function U(){}function O(t){return t}function Q(t){this.r2=E(),this.q3=E(),C.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}R.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},R.prototype.revert=function(t){return t},R.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},R.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},R.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},F.prototype.convert=function(t){var e=E();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(C.ZERO)>0&&this.m.subTo(e,e),e},F.prototype.revert=function(t){var e=E();return t.copyTo(e),this.reduce(e),e},F.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},F.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},F.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},C.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},C.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},C.prototype.fromString=function(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var n=t.length,i=!1,a=0;--n>=0;){var s=8==r?255&t[n]:M(t,n);s<0?"-"==t.charAt(n)&&(i=!0):(i=!1,0==a?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<>this.DB-a):this[this.t-1]|=s<=this.DB&&(a-=this.DB))}8==r&&128&t[0]&&(this.s=-1,a>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t},C.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},C.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--r)e[r+s+1]=this[r]>>i|o,o=(this[r]&a)<=0;--r)e[r]=0;e[s]=o,e.t=this.t+s+1,e.s=this.s,e.clamp()},C.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,a=(1<>n;for(var s=r+1;s>n;n>0&&(e[this.t-r-1]|=(this.s&a)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()},C.prototype.multiplyTo=function(t,e){var r=this.abs(),n=t.abs(),i=r.t;for(e.t=i+n.t;--i>=0;)e[i]=0;for(i=0;i=0;)t[r]=0;for(r=0;r=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},C.prototype.divRemTo=function(t,e,r){var n=t.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(u,a),i.lShiftTo(u,r)):(n.copyTo(a),i.copyTo(r));var h=a.t,c=a[h-1];if(0!=c){var l=c*(1<1?a[h-2]>>this.F2:0),f=this.FV/l,p=(1<=0&&(r[r.t++]=1,r.subTo(y,r)),C.ONE.dlShiftTo(h,y),y.subTo(a,a);a.t=0;){var A=r[--g]==c?this.DM:Math.floor(r[g]*f+(r[g-1]+d)*p);if((r[g]+=a.am(0,A,r,m,0,h))0&&r.rShiftTo(u,r),s<0&&C.ZERO.subTo(r,r)}}},C.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},C.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},C.prototype.exp=function(t,e){if(t>4294967295||t<1)return C.ONE;var r=E(),n=E(),i=e.convert(this),a=T(t)-1;for(i.copyTo(r);--a>=0;)if(e.sqrTo(r,n),(t&1<0)e.mulTo(n,i,r);else{var s=r;r=n,n=s}return e.revert(r)},C.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<0)for(o>o)>0&&(i=!0,a=_(r));s>=0;)o>(o+=this.DB-e)):(r=this[s]>>(o-=e)&n,o<=0&&(o+=this.DB,--s)),r>0&&(i=!0),i&&(a+=_(r));return i?a:"0"},C.prototype.negate=function(){var t=E();return C.ZERO.subTo(this,t),t},C.prototype.abs=function(){return this.s<0?this.negate():this},C.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},C.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+T(this[this.t-1]^this.s&this.DM)},C.prototype.mod=function(t){var e=E();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(C.ZERO)>0&&t.subTo(e,e),e},C.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new R(e):new F(e),this.exp(t,r)},C.ZERO=x(0),C.ONE=x(1),U.prototype.convert=O,U.prototype.revert=O,U.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},U.prototype.sqrTo=function(t,e){t.squareTo(e)},Q.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=E();return t.copyTo(e),this.reduce(e),e},Q.prototype.revert=function(t){return t},Q.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},Q.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},Q.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var j,K,G,V=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],q=(1<<26)/V[V.length-1];function W(){this.i=0,this.j=0,this.S=new Array}function z(){!function(t){K[G++]^=255&t,K[G++]^=t>>8&255,K[G++]^=t>>16&255,K[G++]^=t>>24&255,G>=256&&(G-=256)}((new Date).getTime())}if(C.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},C.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),n=x(r),i=E(),a=E(),s="";for(this.divRemTo(n,i,a);i.signum()>0;)s=(r+a.intValue()).toString(t).substr(1)+s,i.divRemTo(n,i,a);return a.intValue().toString(t)+s},C.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),n=Math.pow(e,r),i=!1,a=0,s=0,o=0;o=r&&(this.dMultiply(n),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(e,a)),this.dAddOffset(s,0)),i&&C.ZERO.subTo(this,this)},C.prototype.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(C.ONE.shiftLeft(t-1),k,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(C.ONE.shiftLeft(t-1),this);else{var n=new Array,i=7&t;n.length=1+(t>>3),e.nextBytes(n),i>0?n[0]&=(1<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()},C.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},C.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},C.prototype.multiplyLowerTo=function(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i=0;)r[n]=0;for(n=Math.max(e-this.t,0);n0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r},C.prototype.millerRabin=function(t){var e=this.subtract(C.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var n=e.shiftRight(r);(t=t+1>>1)>V.length&&(t=V.length);for(var i=E(),a=0;a>24},C.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},C.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},C.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,n=this.DB-t*this.DB%8,i=0;if(t-- >0)for(n>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<=0;)n<8?(r=(this[t]&(1<>(n+=this.DB-8)):(r=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),128&r&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(e[i++]=r);return e},C.prototype.equals=function(t){return 0==this.compareTo(t)},C.prototype.min=function(t){return this.compareTo(t)<0?this:t},C.prototype.max=function(t){return this.compareTo(t)>0?this:t},C.prototype.and=function(t){var e=E();return this.bitwiseTo(t,D,e),e},C.prototype.or=function(t){var e=E();return this.bitwiseTo(t,k,e),e},C.prototype.xor=function(t){var e=E();return this.bitwiseTo(t,L,e),e},C.prototype.andNot=function(t){var e=E();return this.bitwiseTo(t,N,e),e},C.prototype.not=function(){for(var t=E(),e=0;e=this.t?0!=this.s:!!(this[e]&1<1){var c=E();for(n.sqrTo(s[1],c);o<=h;)s[o]=E(),n.mulTo(c,s[o-2],s[o]),o+=2}var l,f,p=t.t-1,d=!0,g=E();for(i=T(t[p])-1;p>=0;){for(i>=u?l=t[p]>>i-u&h:(l=(t[p]&(1<0&&(l|=t[p-1]>>this.DB+i-u)),o=r;!(1&l);)l>>=1,--o;if((i-=o)<0&&(i+=this.DB,--p),d)s[l].copyTo(a),d=!1;else{for(;o>1;)n.sqrTo(a,g),n.sqrTo(g,a),o-=2;o>0?n.sqrTo(a,g):(f=a,a=g,g=f),n.mulTo(g,s[l],a)}for(;p>=0&&!(t[p]&1<=0?(r.subTo(n,r),e&&i.subTo(s,i),a.subTo(o,a)):(n.subTo(r,n),e&&s.subTo(i,s),o.subTo(a,o))}return 0!=n.compareTo(C.ONE)?C.ZERO:o.compareTo(t)>=0?o.subtract(t):o.signum()<0?(o.addTo(t,o),o.signum()<0?o.add(t):o):o},C.prototype.pow=function(t){return this.exp(t,new U)},C.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return e;for(i0&&(e.rShiftTo(a,e),r.rShiftTo(a,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r},C.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=V[V.length-1]){for(e=0;e>>8,K[G++]=255&Y;G=0,z()}function $(){if(null==j){for(z(),(j=new W).init(K),G=0;G0&&e.length>0))throw"Invalid RSA public key";this.n=et(t,16),this.e=parseInt(e,16)}if(null==this.n||"function"!=typeof this.n.compareTo||this.n.compareTo(C.ONE)<=0||null==this.e||isNaN(this.e)||this.e<=0)throw"Invalid RSA public key"},rt.prototype.type="RSA",rt.prototype.doPrivate=function(t){if(null==this.p||null==this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),r=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(r)<0;)e=e.add(this.p);return e.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},rt.prototype.setPrivate=function(t,e,r){if(this.isPrivate=!0,"string"!=typeof t)this.n=t,this.e=e,this.d=r;else{if(!(null!=t&&null!=e&&t.length>0&&e.length>0))throw"Invalid RSA private key";this.n=et(t,16),this.e=parseInt(e,16),this.d=et(r,16)}},rt.prototype.setPrivateEx=function(t,e,r,n,i,a,s,o){if(this.isPrivate=!0,this.isPublic=!1,null==t)throw"RSASetPrivateEx N == null";if(null==e)throw"RSASetPrivateEx E == null";if(0==t.length)throw"RSASetPrivateEx N.length == 0";if(0==e.length)throw"RSASetPrivateEx E.length == 0";if(!(null!=t&&null!=e&&t.length>0&&e.length>0))throw"Invalid RSA private key in RSASetPrivateEx";this.n=et(t,16),this.e=parseInt(e,16),this.d=et(r,16),this.p=et(n,16),this.q=et(i,16),this.dmp1=et(a,16),this.dmq1=et(s,16),this.coeff=et(o,16)},rt.prototype.generate=function(t,e){var r=new tt,n=t>>1;this.e=parseInt(e,16);for(var i=new C(e,16),a=t/2-100,s=C.ONE.shiftLeft(a);;){for(;this.p=new C(t-n,1,r),0!=this.p.subtract(C.ONE).gcd(i).compareTo(C.ONE)||!this.p.isProbablePrime(10););for(;this.q=new C(n,1,r),0!=this.q.subtract(C.ONE).gcd(i).compareTo(C.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var o=this.p;this.p=this.q,this.q=o}var u=this.q.subtract(this.p).abs();if(!(u.bitLength()0;--e){a=a.twice();var c=n.testBit(e);c!=r.testBit(e)&&(a=a.add(c?this:i))}for(e=o.bitLength()-2;e>0;--e){u=u.twice();var l=o.testBit(e);l!=s.testBit(e)&&(u=u.add(l?u:h))}return a},it.prototype.multiplyTwo=function(t,e,r){var n;n=t.bitLength()>r.bitLength()?t.bitLength()-1:r.bitLength()-1;for(var i=this.curve.getInfinity(),a=this.add(e);n>=0;)i=i.twice(),t.testBit(n)?i=r.testBit(n)?i.add(a):i.add(this):r.testBit(n)&&(i=i.add(e)),--n;return i},at.prototype.getQ=function(){return this.q},at.prototype.getA=function(){return this.a},at.prototype.getB=function(){return this.b},at.prototype.equals=function(t){return t==this||this.q.equals(t.q)&&this.a.equals(t.a)&&this.b.equals(t.b)},at.prototype.getInfinity=function(){return this.infinity},at.prototype.fromBigInteger=function(t){return new nt(this.q,t)},at.prototype.decodePointHex=function(t){switch(parseInt(t.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:var e=t.substr(0,2),r=(t.substr(2),this.fromBigInteger(new C(o,16))),n=this.getA(),i=this.getB(),a=r.square().add(n).multiply(r).add(i).sqrt();return"03"==e&&(a=a.negate()),new it(this,r,a);case 4:case 6:case 7:var s=(t.length-2)/2,o=t.substr(2,s),u=t.substr(s+2,s);return new it(this,this.fromBigInteger(new C(o,16)),this.fromBigInteger(new C(u,16)));default:return null}},nt.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)},it.prototype.getEncoded=function(t){var e=function(t,e){var r=t.toByteArrayUnsigned();if(er.length;)r.unshift(0);return r},r=this.getX().toBigInteger(),n=this.getY().toBigInteger(),i=e(r,32);return t?n.isEven()?i.unshift(2):i.unshift(3):(i.unshift(4),i=i.concat(e(n,32))),i},it.decodeFrom=function(t,e){e[0];var r=e.length-1,n=e.slice(1,1+r/2),i=e.slice(1+r/2,1+r);n.unshift(0),i.unshift(0);var a=new C(n),s=new C(i);return new it(t,t.fromBigInteger(a),t.fromBigInteger(s))},it.decodeFromHex=function(t,e){e.substr(0,2);var r=e.length-2,n=e.substr(2,r/2),i=e.substr(2+r/2,r/2),a=new C(n,16),s=new C(i,16);return new it(t,t.fromBigInteger(a),t.fromBigInteger(s))},it.prototype.add2D=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;if(this.x.equals(t.x))return this.y.equals(t.y)?this.twice():this.curve.getInfinity();var e=t.x.subtract(this.x),r=t.y.subtract(this.y).divide(e),n=r.square().subtract(this.x).subtract(t.x),i=r.multiply(this.x.subtract(n)).subtract(this.y);return new it(this.curve,n,i)},it.prototype.twice2D=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var t=this.curve.fromBigInteger(C.valueOf(2)),e=this.curve.fromBigInteger(C.valueOf(3)),r=this.x.square().multiply(e).add(this.curve.a).divide(this.y.multiply(t)),n=r.square().subtract(this.x.multiply(t)),i=r.multiply(this.x.subtract(n)).subtract(this.y);return new it(this.curve,n,i)},it.prototype.multiply2D=function(t){if(this.isInfinity())return this;if(0==t.signum())return this.curve.getInfinity();var e,r=t,n=r.multiply(new C("3")),i=this.negate(),a=this;for(e=n.bitLength()-2;e>0;--e){a=a.twice();var s=n.testBit(e);s!=r.testBit(e)&&(a=a.add2D(s?this:i))}return a},it.prototype.isOnCurve=function(){var t=this.getX().toBigInteger(),e=this.getY().toBigInteger(),r=this.curve.getA().toBigInteger(),n=this.curve.getB().toBigInteger(),i=this.curve.getQ(),a=e.multiply(e).mod(i),s=t.multiply(t).multiply(t).add(r.multiply(t)).add(n).mod(i);return a.equals(s)},it.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"},it.prototype.validate=function(){var t=this.curve.getQ();if(this.isInfinity())throw new Error("Point is at infinity.");var e=this.getX().toBigInteger(),r=this.getY().toBigInteger();if(e.compareTo(C.ONE)<0||e.compareTo(t.subtract(C.ONE))>0)throw new Error("x coordinate out of bounds");if(r.compareTo(C.ONE)<0||r.compareTo(t.subtract(C.ONE))>0)throw new Error("y coordinate out of bounds");if(!this.isOnCurve())throw new Error("Point is not on the curve.");if(this.multiply(t).isInfinity())throw new Error("Point is not a scalar multiple of G.");return!0};var st=function(){var t=new RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)|(?:"(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))*"))',"g"),e=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),r={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function n(t,e,n){return e?r[e]:String.fromCharCode(parseInt(n,16))}var i=new String(""),a=Object.hasOwnProperty;return function(r,s){var o,u,h=r.match(t),c=h[0],l=!1;"{"===c?o={}:"["===c?o=[]:(o=[],l=!0);for(var f=[o],p=1-l,d=h.length;p=0;)delete r[n[u]]}return s.call(t,e,r)};o=m({"":o},"")}return o}}();void 0!==ot&&ot||(ot={}),void 0!==ot.asn1&&ot.asn1||(ot.asn1={}),ot.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){return Ot(t)},this.getPEMStringFromHex=function(t,e){return Ct(t,e)},this.newObject=function(t){var e=ot.asn1,r=e.ASN1Object,n=e.DERBoolean,i=e.DERInteger,a=e.DERBitString,s=e.DEROctetString,o=e.DERNull,u=e.DERObjectIdentifier,h=e.DEREnumerated,c=e.DERUTF8String,l=e.DERNumericString,f=e.DERPrintableString,p=e.DERTeletexString,d=e.DERIA5String,g=e.DERUTCTime,m=e.DERGeneralizedTime,y=e.DERVisibleString,A=e.DERBMPString,v=e.DERSequence,b=e.DERSet,w=e.DERTaggedObject,C=e.ASN1Util.newObject;if(t instanceof e.ASN1Object)return t;var E=Object.keys(t);if(1!=E.length)throw new Error("key of param shall be only one.");var S=E[0];if(-1==":asn1:bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:visstr:bmpstr:seq:set:tag:".indexOf(":"+S+":"))throw new Error("undefined key: "+S);if("bool"==S)return new n(t[S]);if("int"==S)return new i(t[S]);if("bitstr"==S)return new a(t[S]);if("octstr"==S)return new s(t[S]);if("null"==S)return new o(t[S]);if("oid"==S)return new u(t[S]);if("enum"==S)return new h(t[S]);if("utf8str"==S)return new c(t[S]);if("numstr"==S)return new l(t[S]);if("prnstr"==S)return new f(t[S]);if("telstr"==S)return new p(t[S]);if("ia5str"==S)return new d(t[S]);if("utctime"==S)return new g(t[S]);if("gentime"==S)return new m(t[S]);if("visstr"==S)return new y(t[S]);if("bmpstr"==S)return new A(t[S]);if("asn1"==S)return new r(t[S]);if("seq"==S){for(var I=t[S],B=[],_=0;_15)throw new Error("ASN.1 length too long to represent by 8x: n = "+t.toString(16));return(128+r).toString(16)+e},this.tohex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getEncodedHex=function(){return this.tohex()},this.getValueHex=function(){return this.tohex(),this.hV},this.getFreshValueHex=function(){return""},this.setByParam=function(t){this.params=t},null!=t&&null!=t.tlv&&(this.hTLV=t.tlv,this.isModified=!1)},ot.asn1.DERAbstractString=function(t){ot.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=yt(this.s).toLowerCase()},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},Gt(ot.asn1.DERAbstractString,ot.asn1.ASN1Object),ot.asn1.DERAbstractTime=function(t){ot.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){var e=t.getTime()+6e4*t.getTimezoneOffset();return new Date(e)},this.formatDate=function(t,e,r){var n=this.zeroPadding,i=this.localDateToUTC(t),a=String(i.getFullYear());"utc"==e&&(a=a.substr(2,2));var s=a+n(String(i.getMonth()+1),2)+n(String(i.getDate()),2)+n(String(i.getHours()),2)+n(String(i.getMinutes()),2)+n(String(i.getSeconds()),2);if(!0===r){var o=i.getMilliseconds();if(0!=o){var u=n(String(o),3);s=s+"."+(u=u.replace(/[0]+$/,""))}}return s+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.setByParam=function(t){this.hV=null,this.hTLV=null,this.params=t},this.getString=function(){},this.setString=function(t){this.hTLV=null,this.isModified=!0,null==this.params&&(this.params={}),this.params.str=t},this.setByDate=function(t){this.hTLV=null,this.isModified=!0,null==this.params&&(this.params={}),this.params.date=t},this.setByDateValue=function(t,e,r,n,i,a){var s=new Date(Date.UTC(t,e-1,r,n,i,a,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}},Gt(ot.asn1.DERAbstractTime,ot.asn1.ASN1Object),ot.asn1.DERAbstractStructured=function(t){ot.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},Gt(ot.asn1.DERAbstractStructured,ot.asn1.ASN1Object),ot.asn1.DERBoolean=function(t){ot.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV=0==t?"010100":"0101ff"},Gt(ot.asn1.DERBoolean,ot.asn1.ASN1Object),ot.asn1.DERInteger=function(t){ot.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.params=null;var e=Ot;this.setByBigInteger=function(t){this.isModified=!0,this.params={bigint:t}},this.setByInteger=function(t){this.isModified=!0,this.params=t},this.setValueHex=function(t){this.isModified=!0,this.params={hex:t}},this.getFreshValueHex=function(){var t=this.params,r=null;if(null==t)throw new Error("value not set");if("object"==typeof t&&null!=t.hex)return this.hV=t.hex,this.hV;if("number"==typeof t)r=new C(String(t),10);else if(null!=t.int)r=new C(String(t.int),10);else{if(null==t.bigint)throw new Error("wrong parameter");r=t.bigint}return this.hV=e(r),this.hV},null!=t&&(this.params=t)},Gt(ot.asn1.DERInteger,ot.asn1.ASN1Object),ot.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=ot.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.tohex()}ot.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7>6).toString(16)+n.toString(16))}n=128|(15&e)<<2|(192&r)>>6;var i=128|63&r;return At((224|(240&e)>>4).toString(16)+n.toString(16)+i.toString(16))});return e.join("")}function kt(t){for(var e=encodeURIComponent(t),r="",n=0;n"7"?"00"+t:t}function Pt(t){if(!Lt(t))return null;try{var e=[],r=t.substr(0,2),n=parseInt(r,16);e[0]=new String(Math.floor(n/40)),e[1]=new String(n%40);for(var i=t.substr(2),a=[],s=0;s0&&(h=h+"."+o.join(".")),h}catch(t){return null}}function Ut(t){return Ot(new C(String(t),10))}function Ot(t){var e=t.toString(16);if("-"!=e.substr(0,1))return e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e),e;var r=e.substr(1).length;r%2==1?r+=1:e.match(/^[0-7]/)||(r+=2);for(var n="",i=0;i=n)break}return s},ct.getNthChildIdx=function(t,e,r){return ct.getChildIdx(t,e)[r]},ct.getIdxbyList=function(t,e,r,n){var i,a,s=ct;return 0==r.length?void 0!==n&&t.substr(e,2)!==n?-1:e:(i=r.shift())>=(a=s.getChildIdx(t,e)).length?-1:s.getIdxbyList(t,a[i],r,n)},ct.getIdxbyListEx=function(t,e,r,n){var i,a,s=ct;if(0==r.length)return void 0!==n&&t.substr(e,2)!==n?-1:e;i=r.shift(),a=s.getChildIdx(t,e);for(var o=0,u=0;u=t.length?null:i.getTLV(t,a)},ct.getTLVbyListEx=function(t,e,r,n){var i=ct,a=i.getIdxbyListEx(t,e,r,n);return-1==a?null:i.getTLV(t,a)},ct.getVbyList=function(t,e,r,n,i){var a,s,o=ct;return-1==(a=o.getIdxbyList(t,e,r,n))||a>=t.length?null:(s=o.getV(t,a),!0===i&&(s=s.substr(2)),s)},ct.getVbyListEx=function(t,e,r,n,i){var a,s,o=ct;return-1==(a=o.getIdxbyListEx(t,e,r,n))?null:(s=o.getV(t,a),"03"==t.substr(a,2)&&!1!==i&&(s=s.substr(2)),s)},ct.getInt=function(t,e,r){null==r&&(r=-1);try{var n=t.substr(e,2);if("02"!=n&&"03"!=n)return r;var i=ct.getV(t,e);return"02"==n?parseInt(i,16):function(t){if(t.length%2!=0)return-1;if(null==(t=t.toLowerCase()).match(/^[0-9a-f]+$/))return-1;try{var e=t.substr(0,2);if("00"==e)return parseInt(t.substr(2),16);var r=parseInt(e,16);if(r>7)return-1;var n=t.substr(2),i=parseInt(n,16).toString(2);"0"==i&&(i="00000000"),i=i.slice(0,0-r);var a=parseInt(i,2);return NaN==a?-1:a}catch(t){return-1}}(i)}catch(t){return r}},ct.getOID=function(t,e,r){null==r&&(r=null);try{return"06"!=t.substr(e,2)?r:Pt(ct.getV(t,e))}catch(t){return r}},ct.getOIDName=function(t,e,r){null==r&&(r=null);try{var n=ct.getOID(t,e,r);if(n==r)return r;var i=ot.asn1.x509.OID.oid2name(n);return""==i?n:i}catch(t){return r}},ct.getString=function(t,e,r){null==r&&(r=null);try{return bt(ct.getV(t,e))}catch(t){return r}},ct.hextooidstr=function(t){var e=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},r=[],n=t.substr(0,2),i=parseInt(n,16);r[0]=new String(Math.floor(i/40)),r[1]=new String(i%40);for(var a=t.substr(2),s=[],o=0;o0&&(c=c+"."+u.join(".")),c},ct.dump=function(t,e,r,n){var i=ct,a=i.getV,s=i.dump,o=i.getChildIdx,u=t;t instanceof ot.asn1.ASN1Object&&(u=t.tohex());var h=function(t,e){return t.length<=2*e?t:t.substr(0,e)+"..(total "+t.length/2+"bytes).."+t.substr(t.length-e,e)};void 0===e&&(e={ommit_long_octet:32}),void 0===r&&(r=0),void 0===n&&(n="");var c,l=e.ommit_long_octet;if("01"==(c=u.substr(r,2)))return"00"==(f=a(u,r))?n+"BOOLEAN FALSE\n":n+"BOOLEAN TRUE\n";if("02"==c)return n+"INTEGER "+h(f=a(u,r),l)+"\n";if("03"==c){var f=a(u,r);return i.isASN1HEX(f.substr(2))?(w=n+"BITSTRING, encapsulates\n")+s(f.substr(2),e,0,n+" "):n+"BITSTRING "+h(f,l)+"\n"}if("04"==c)return f=a(u,r),i.isASN1HEX(f)?(w=n+"OCTETSTRING, encapsulates\n")+s(f,e,0,n+" "):n+"OCTETSTRING "+h(f,l)+"\n";if("05"==c)return n+"NULL\n";if("06"==c){var p=a(u,r),d=ot.asn1.ASN1Util.oidHexToInt(p),g=ot.asn1.x509.OID.oid2name(d),m=d.replace(/\./g," ");return""!=g?n+"ObjectIdentifier "+g+" ("+m+")\n":n+"ObjectIdentifier ("+m+")\n"}if("0a"==c)return n+"ENUMERATED "+parseInt(a(u,r))+"\n";if("0c"==c)return n+"UTF8String '"+At(a(u,r))+"'\n";if("13"==c)return n+"PrintableString '"+At(a(u,r))+"'\n";if("14"==c)return n+"TeletexString '"+At(a(u,r))+"'\n";if("16"==c)return n+"IA5String '"+At(a(u,r))+"'\n";if("17"==c)return n+"UTCTime "+At(a(u,r))+"\n";if("18"==c)return n+"GeneralizedTime "+At(a(u,r))+"\n";if("1a"==c)return n+"VisualString '"+At(a(u,r))+"'\n";if("1e"==c)return n+"BMPString '"+Dt(a(u,r))+"'\n";if("30"==c){if("3000"==u.substr(r,4))return n+"SEQUENCE {}\n";w=n+"SEQUENCE\n";var y=e;if((2==(b=o(u,r)).length||3==b.length)&&"06"==u.substr(b[0],2)&&"04"==u.substr(b[b.length-1],2)){g=i.oidname(a(u,b[0]));var A=JSON.parse(JSON.stringify(e));A.x509ExtName=g,y=A}for(var v=0;v4?{enum:{hex:m}}:{enum:parseInt(m,16)};if("30"==d||"31"==d)return g[p[d]]=function(t){for(var e=[],n=s(t,0),i=0;i31)&&128==(192&r)&&(31&r)==n}catch(t){return!1}},ct.isASN1HEX=function(t){var e=ct;if(t.length%2==1)return!1;var r=e.getVblen(t,0),n=t.substr(0,2),i=e.getL(t,0);return t.length-n.length-i.length==2*r},ct.checkStrictDER=function(t,e,r,n,i){var a=ct;if(void 0===r){if("string"!=typeof t)throw new Error("not hex string");if(t=t.toLowerCase(),!ot.lang.String.isHex(t))throw new Error("not hex string");r=t.length,i=(n=t.length/2)<128?1:Math.ceil(n.toString(16))+1}if(a.getL(t,e).length>2*i)throw new Error("L of TLV too long: idx="+e);var s=a.getVblen(t,e);if(s>n)throw new Error("value of L too long than hex: idx="+e);var o=a.getTLV(t,e),u=o.length-2-a.getL(t,e).length;if(u!==2*s)throw new Error("V string length and L's value not the same:"+u+"/"+2*s);if(0===e&&t.length!=o.length)throw new Error("total length and TLV length unmatch:"+t.length+"!="+o.length);var h=t.substr(e,2);if("02"===h){var c=a.getVidx(t,e);if("00"==t.substr(c,2)&&t.charCodeAt(c+2)<56)throw new Error("not least zeros for DER INTEGER")}if(32&parseInt(h,16)){for(var l=a.getVblen(t,e),f=0,p=a.getChildIdx(t,e),d=0;d0&&t.push(new n({tag:"a3",obj:new h(e.ext)})),new ot.asn1.DERSequence({array:t}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!==t&&this.setByParam(t)},Gt(ot.asn1.x509.TBSCertificate,ot.asn1.ASN1Object),ot.asn1.x509.Extensions=function(t){ot.asn1.x509.Extensions.superclass.constructor.call(this);var e=ot.asn1,r=e.DERSequence,n=e.x509;this.aParam=[],this.setByParam=function(t){this.aParam=t},this.tohex=function(){for(var t=[],e=0;e-1&&t.push(new n({int:this.pathLen}));var e=new i({array:t});return this.asn1ExtnValue=e,this.asn1ExtnValue.tohex()},this.oid="2.5.29.19",this.cA=!1,this.pathLen=-1,void 0!==t&&(void 0!==t.cA&&(this.cA=t.cA),void 0!==t.pathLen&&(this.pathLen=t.pathLen))},Gt(ot.asn1.x509.BasicConstraints,ot.asn1.x509.Extension),ot.asn1.x509.CRLDistributionPoints=function(t){ot.asn1.x509.CRLDistributionPoints.superclass.constructor.call(this,t);var e=ot.asn1,r=e.x509;this.getExtnValueHex=function(){return this.asn1ExtnValue.tohex()},this.setByDPArray=function(t){for(var n=[],i=0;i0&&t.push(new r({array:e}))}return new r({array:t}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!==t&&(this.params=t)},Gt(ot.asn1.x509.PolicyInformation,ot.asn1.ASN1Object),ot.asn1.x509.PolicyQualifierInfo=function(t){ot.asn1.x509.PolicyQualifierInfo.superclass.constructor.call(this,t);var e=ot.asn1,r=e.DERSequence,n=e.DERIA5String,i=e.DERObjectIdentifier,a=e.x509.UserNotice;this.params=null,this.tohex=function(){return void 0!==this.params.cps?new r({array:[new i({oid:"1.3.6.1.5.5.7.2.1"}),new n({str:this.params.cps})]}).tohex():null!=this.params.unotice?new r({array:[new i({oid:"1.3.6.1.5.5.7.2.2"}),new a(this.params.unotice)]}).tohex():void 0},this.getEncodedHex=function(){return this.tohex()},void 0!==t&&(this.params=t)},Gt(ot.asn1.x509.PolicyQualifierInfo,ot.asn1.ASN1Object),ot.asn1.x509.UserNotice=function(t){ot.asn1.x509.UserNotice.superclass.constructor.call(this,t);var e=ot.asn1.DERSequence,r=(ot.asn1.DERInteger,ot.asn1.x509.DisplayText),n=ot.asn1.x509.NoticeReference;this.params=null,this.tohex=function(){var t=[];return void 0!==this.params.noticeref&&t.push(new n(this.params.noticeref)),void 0!==this.params.exptext&&t.push(new r(this.params.exptext)),new e({array:t}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!==t&&(this.params=t)},Gt(ot.asn1.x509.UserNotice,ot.asn1.ASN1Object),ot.asn1.x509.NoticeReference=function(t){ot.asn1.x509.NoticeReference.superclass.constructor.call(this,t);var e=ot.asn1.DERSequence,r=ot.asn1.DERInteger,n=ot.asn1.x509.DisplayText;this.params=null,this.tohex=function(){var t=[];if(void 0!==this.params.org&&t.push(new n(this.params.org)),void 0!==this.params.noticenum){for(var i=[],a=this.params.noticenum,s=0;s0)for(var t=0;t0;i++){var a=e.shift();if(!0===r){var s=(n.pop()+","+a).replace(/\\,/g,",");n.push(s),r=!1}else n.push(a);"\\"===a.substr(-1,1)&&(r=!0)}return n=n.map(function(t){return t.replace("/","\\/")}),n.reverse(),"/"+n.join("/")},ot.asn1.x509.X500Name.ldapToOneline=function(t){return ot.asn1.x509.X500Name.ldapToCompat(t)},ot.asn1.x509.RDN=function(t){ot.asn1.x509.RDN.superclass.constructor.call(this),this.asn1Array=[],this.paramArray=[],this.sRule="utf8";var e=ot.asn1.x509.AttributeTypeAndValue;this.setByParam=function(t){void 0!==t.rule&&(this.sRule=t.rule),void 0!==t.str&&this.addByMultiValuedString(t.str),void 0!==t.array&&(this.paramArray=t.array)},this.addByString=function(t){this.asn1Array.push(new ot.asn1.x509.AttributeTypeAndValue({str:t,rule:this.sRule}))},this.addByMultiValuedString=function(t){for(var e=ot.asn1.x509.RDN.parseString(t),r=0;r0)for(var t=0;t0;i++){var a=e.shift();if(!0===r){var s=(n.pop()+"+"+a).replace(/\\\+/g,"+");n.push(s),r=!1}else n.push(a);"\\"===a.substr(-1,1)&&(r=!0)}var o=!1,u=[];for(i=0;n.length>0;i++){if(a=n.shift(),!0===o){var h=u.pop();a.match(/"$/)?(s=(h+"+"+a).replace(/^([^=]+)="(.*)"$/,"$1=$2"),u.push(s),o=!1):u.push(h+"+"+a)}else u.push(a);a.match(/^[^=]+="/)&&(o=!0)}return u},ot.asn1.x509.AttributeTypeAndValue=function(t){ot.asn1.x509.AttributeTypeAndValue.superclass.constructor.call(this),this.sRule="utf8",this.sType=null,this.sValue=null,this.dsType=null;var e=ot,r=e.asn1,n=r.DERSequence,i=r.DERUTF8String,a=r.DERPrintableString,s=r.DERTeletexString,o=r.DERIA5String,u=r.DERVisibleString,h=r.DERBMPString,c=e.lang.String.isMail,l=e.lang.String.isPrintable;this.setByParam=function(t){if(void 0!==t.rule&&(this.sRule=t.rule),void 0!==t.ds&&(this.dsType=t.ds),void 0===t.value&&void 0!==t.str){var e=t.str.match(/^([^=]+)=(.+)$/);if(!e)throw new Error("malformed attrTypeAndValueStr: "+attrTypeAndValueStr);this.sType=e[1],this.sValue=e[2]}else this.sType=t.type,this.sValue=t.value},this.setByString=function(t,e){void 0!==e&&(this.sRule=e);var r=t.match(/^([^=]+)=(.+)$/);if(!r)throw new Error("malformed attrTypeAndValueStr: "+attrTypeAndValueStr);this.setByAttrTypeAndValueStr(r[1],r[2])},this._getDsType=function(){var t=this.sType,e=this.sValue,r=this.sRule;return"prn"===r?"CN"==t&&c(e)?"ia5":l(e)?"prn":"utf8":"utf8"===r?"CN"==t&&c(e)?"ia5":"C"==t?"prn":"utf8":"utf8"},this.setByAttrTypeAndValueStr=function(t,e,r){void 0!==r&&(this.sRule=r),this.sType=t,this.sValue=e},this.getValueObj=function(t,e){if("utf8"==t)return new i({str:e});if("prn"==t)return new a({str:e});if("tel"==t)return new s({str:e});if("ia5"==t)return new o({str:e});if("vis"==t)return new u({str:e});if("bmp"==t)return new h({str:e});throw new Error("unsupported directory string type: type="+t+" value="+e)},this.tohex=function(){null==this.dsType&&(this.dsType=this._getDsType());var t=ot.asn1.x509.OID.atype2obj(this.sType),e=this.getValueObj(this.dsType,this.sValue),r=new n({array:[t,e]});return this.TLV=r.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},void 0!==t&&this.setByParam(t)},Gt(ot.asn1.x509.AttributeTypeAndValue,ot.asn1.ASN1Object),ot.asn1.x509.SubjectPublicKeyInfo=function(t){ot.asn1.x509.SubjectPublicKeyInfo.superclass.constructor.call(this);var e=ot,r=e.asn1,n=r.DERInteger,i=r.DERBitString,a=r.DERObjectIdentifier,s=r.DERSequence,o=r.ASN1Util.newObject,u=r.x509.AlgorithmIdentifier,h=e.crypto;h.ECDSA,h.DSA,this.getASN1Object=function(){if(null==this.asn1AlgId||null==this.asn1SubjPKey)throw"algId and/or subjPubKey not set";return new s({array:[this.asn1AlgId,this.asn1SubjPKey]})},this.tohex=function(){var t=this.getASN1Object();return this.hTLV=t.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},this.setPubKey=function(t){try{if(t instanceof rt){var e=o({seq:[{int:{bigint:t.n}},{int:{int:t.e}}]}).tohex();this.asn1AlgId=new u({name:"rsaEncryption"}),this.asn1SubjPKey=new i({hex:"00"+e})}}catch(t){}try{if(t instanceof ot.crypto.ECDSA){var r=new a({name:t.curveName});this.asn1AlgId=new u({name:"ecPublicKey",asn1params:r}),this.asn1SubjPKey=new i({hex:"00"+t.pubKeyHex})}}catch(t){}try{if(t instanceof ot.crypto.DSA){r=new o({seq:[{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.g}}]}),this.asn1AlgId=new u({name:"dsa",asn1params:r});var s=new n({bigint:t.y});this.asn1SubjPKey=new i({hex:"00"+s.tohex()})}}catch(t){}},void 0!==t&&this.setPubKey(t)},Gt(ot.asn1.x509.SubjectPublicKeyInfo,ot.asn1.ASN1Object),ot.asn1.x509.Time=function(t){ot.asn1.x509.Time.superclass.constructor.call(this);var e=ot.asn1,r=e.DERUTCTime,n=e.DERGeneralizedTime;this.params=null,this.type=null,this.setTimeParams=function(t){this.timeParams=t},this.setByParam=function(t){this.params=t},this.getType=function(t){return t.match(/^[0-9]{12}Z$/)?"utc":t.match(/^[0-9]{14}Z$/)?"gen":t.match(/^[0-9]{12}\.[0-9]+Z$/)?"utc":t.match(/^[0-9]{14}\.[0-9]+Z$/)?"gen":null},this.tohex=function(){var t=this.params,e=null;if("string"==typeof t&&(t={str:t}),null==t||!t.str||null!=t.type&&null!=t.type||(t.type=this.getType(t.str)),null!=t&&t.str?("utc"==t.type&&(e=new r(t.str)),"gen"==t.type&&(e=new n(t.str))):e="gen"==this.type?new n:new r,null==e)throw new Error("wrong setting for Time");return this.TLV=e.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},null!=t&&this.setByParam(t)},ot.asn1.x509.Time_bak=function(t){ot.asn1.x509.Time_bak.superclass.constructor.call(this);var e=ot.asn1,r=e.DERUTCTime,n=e.DERGeneralizedTime;this.setTimeParams=function(t){this.timeParams=t},this.tohex=function(){var t=null;return t=null!=this.timeParams?"utc"==this.type?new r(this.timeParams):new n(this.timeParams):"utc"==this.type?new r:new n,this.TLV=t.tohex(),this.TLV},this.getEncodedHex=function(){return this.tohex()},this.type="utc",void 0!==t&&(void 0!==t.type?this.type=t.type:void 0!==t.str&&(t.str.match(/^[0-9]{12}Z$/)&&(this.type="utc"),t.str.match(/^[0-9]{14}Z$/)&&(this.type="gen")),this.timeParams=t)},Gt(ot.asn1.x509.Time,ot.asn1.ASN1Object),ot.asn1.x509.AlgorithmIdentifier=function(t){ot.asn1.x509.AlgorithmIdentifier.superclass.constructor.call(this),this.nameAlg=null,this.asn1Alg=null,this.asn1Params=null,this.paramEmpty=!1;var e=ot.asn1,r=e.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV;if(this.tohex=function(){if(null===this.nameAlg&&null===this.asn1Alg)throw new Error("algorithm not specified");if(null!==this.nameAlg){var t=null;for(var n in r)n===this.nameAlg&&(t=r[n]);if(null!==t)return this.hTLV=t,this.hTLV}null!==this.nameAlg&&null===this.asn1Alg&&(this.asn1Alg=e.x509.OID.name2obj(this.nameAlg));var i=[this.asn1Alg];null!==this.asn1Params&&i.push(this.asn1Params);var a=new e.DERSequence({array:i});return this.hTLV=a.tohex(),this.hTLV},this.getEncodedHex=function(){return this.tohex()},void 0!==t&&(void 0!==t.name&&(this.nameAlg=t.name),void 0!==t.asn1params&&(this.asn1Params=t.asn1params),void 0!==t.paramempty&&(this.paramEmpty=t.paramempty)),null===this.asn1Params&&!1===this.paramEmpty&&null!==this.nameAlg){void 0!==this.nameAlg.name&&(this.nameAlg=this.nameAlg.name);var n=this.nameAlg.toLowerCase();"withdsa"!==n.substr(-7,7)&&"withecdsa"!==n.substr(-9,9)&&(this.asn1Params=new e.DERNull)}},Gt(ot.asn1.x509.AlgorithmIdentifier,ot.asn1.ASN1Object),ot.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV={SHAwithRSAandMGF1:"300d06092a864886f70d01010a3000",SHA256withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040201a11a301806092a864886f70d010108300b0609608648016503040201a203020120",SHA384withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040202a11a301806092a864886f70d010108300b0609608648016503040202a203020130",SHA512withRSAandMGF1:"303d06092a864886f70d01010a3030a00d300b0609608648016503040203a11a301806092a864886f70d010108300b0609608648016503040203a203020140"},ot.asn1.x509.GeneralName=function(t){ot.asn1.x509.GeneralName.superclass.constructor.call(this);var e=ot.asn1,r=e.x509,n=r.X500Name,i=r.OtherName,a=e.DERIA5String,s=(e.DERPrintableString,e.DEROctetString),o=e.DERTaggedObject,u=e.ASN1Object,h=Error;this.params=null,this.setByParam=function(t){this.params=t},this.tohex=function(){var t,e,r=this.params,c=!1;if(void 0!==r.other)t="a0",e=new i(r.other);else if(void 0!==r.rfc822)t="81",e=new a({str:r.rfc822});else if(void 0!==r.dns)t="82",e=new a({str:r.dns});else if(void 0!==r.dn)t="a4",c=!0,e="string"==typeof r.dn?new n({str:r.dn}):r.dn instanceof ot.asn1.x509.X500Name?r.dn:new n(r.dn);else if(void 0!==r.ldapdn)t="a4",c=!0,e=new n({ldapstr:r.ldapdn});else if(void 0!==r.certissuer||void 0!==r.certsubj){var l,f;t="a4",c=!0;var p=null;if(void 0!==r.certsubj?(l=!1,f=r.certsubj):(l=!0,f=r.certissuer),f.match(/^[0-9A-Fa-f]+$/),-1!=f.indexOf("-----BEGIN ")&&(p=Et(f)),null==p)throw new Error("certsubj/certissuer not cert");var d,g=new Yt;g.hex=p,d=l?g.getIssuerHex():g.getSubjectHex(),(e=new u).hTLV=d}else if(void 0!==r.uri)t="86",e=new a({str:r.uri});else{if(void 0===r.ip)throw new h("improper params");var m;t="87";var y=r.ip;try{if(y.match(/^[0-9a-f]+$/)){var A=y.length;if(8!=A&&16!=A&&32!=A&&64!=A)throw"err";m=y}else m=Rt(y)}catch(t){throw new h("malformed IP address: "+r.ip+":"+t.message)}e=new s({hex:m})}return new o({tag:t,explicit:c,obj:e}).tohex()},this.getEncodedHex=function(){return this.tohex()},void 0!==t&&this.setByParam(t)},Gt(ot.asn1.x509.GeneralName,ot.asn1.ASN1Object),ot.asn1.x509.GeneralNames=function(t){ot.asn1.x509.GeneralNames.superclass.constructor.call(this);var e=ot.asn1;this.setByParamArray=function(t){for(var r=0;r0){for(var r=a(t.valhex,e[0]),n=c(r,0),i=[],s=0;s1){var h=a(t.valhex,e[1]);t.polhex=h}delete t.valhex},this.setSignaturePolicyIdentifier=function(t){var r=c(t.valhex,0);if(r.length>0){var s=n.getOID(t.valhex,r[0]);t.oid=s}if(r.length>1){var o=new e,u=c(t.valhex,r[1]),h=a(t.valhex,u[0]),l=o.getAlgorithmIdentifierName(h);t.alg=l;var f=i(t.valhex,u[1]);t.hash=f}delete t.valhex},this.setSigningCertificateV2=function(t){var e=c(t.valhex,0);if(e.length>0){for(var r=a(t.valhex,e[0]),n=c(r,0),i=[],s=0;s1){var h=a(t.valhex,e[1]);t.polhex=h}delete t.valhex},this.getESSCertID=function(t){var e={},r=c(t,0);if(r.length>0){var n=i(t,r[0]);e.hash=n}if(r.length>1){var s=a(t,r[1]),o=this.getIssuerSerial(s);null!=o.serial&&(e.serial=o.serial),null!=o.issuer&&(e.issuer=o.issuer)}return e},this.getESSCertIDv2=function(e){var n={},s=c(e,0);if(s.length<1||3o+1){var l=a(e,s[o+1]),f=this.getIssuerSerial(l);n.issuer=f.issuer,n.serial=f.serial}return n},this.getIssuerSerial=function(t){var e={},n=c(t,0),s=a(t,n[0]),o=r.getGeneralNames(s)[0].dn;e.issuer=o;var u=i(t,n[1]);return e.serial={hex:u},e},this.getCertificateSet=function(t){for(var e=c(t,0),r=[],n=0;n=0;s--)i+=n[s];return i}if("string"==typeof t&&null!=a[t])return jt([t],a);if("object"==typeof t&&null!=t.length)return jt(t,a);throw new e("wrong params")},this.tohex=function(){this.params;var t=this.getBinValue();return new n({bin:t}).tohex()},this.getEncodedHex=function(){return this.tohex()},null!=t&&this.setByParam(t)},Gt(ot.asn1.tsp.PKIFailureInfo,ot.asn1.ASN1Object),ot.asn1.tsp.AbstractTSAAdapter=function(t){this.getTSTHex=function(t,e){throw"not implemented yet"}},ot.asn1.tsp.SimpleTSAAdapter=function(t){var e=ot,r=e.asn1.tsp,n=e.crypto.Util.hashHex;r.SimpleTSAAdapter.superclass.constructor.call(this),this.params=null,this.serial=0,this.getTSTHex=function(t,e){var i=n(t,e);this.params.econtent.content.messageImprint={alg:e,hash:i},this.params.econtent.content.serial={int:this.serial++};var a=Math.floor(1e9*Math.random());return this.params.econtent.content.nonce={int:a},new r.TimeStampToken(this.params).getContentInfoEncodedHex()},void 0!==t&&(this.params=t)},Gt(ot.asn1.tsp.SimpleTSAAdapter,ot.asn1.tsp.AbstractTSAAdapter),ot.asn1.tsp.FixedTSAAdapter=function(t){var e=ot,r=e.asn1.tsp,n=e.crypto.Util.hashHex;r.FixedTSAAdapter.superclass.constructor.call(this),this.params=null,this.getTSTHex=function(t,e){var i=n(t,e);return this.params.econtent.content.messageImprint={alg:e,hash:i},new r.TimeStampToken(this.params).getContentInfoEncodedHex()},void 0!==t&&(this.params=t)},Gt(ot.asn1.tsp.FixedTSAAdapter,ot.asn1.tsp.AbstractTSAAdapter),ot.asn1.tsp.TSPUtil=new function(){},ot.asn1.tsp.TSPUtil.newTimeStampToken=function(t){return new ot.asn1.tsp.TimeStampToken(t)},ot.asn1.tsp.TSPUtil.parseTimeStampReq=function(t){return(new ot.asn1.tsp.TSPParser).getTimeStampReq(t)},ot.asn1.tsp.TSPUtil.parseMessageImprint=function(t){return(new ot.asn1.tsp.TSPParser).getMessageImprint(t)},ot.asn1.tsp.TSPParser=function(){Error;var t=new Yt,e=ct,r=e.getV,n=e.getTLV,i=e.getIdxbyList,a=(e.getTLVbyListEx,e.getChildIdx),s=["granted","grantedWithMods","rejection","waiting","revocationWarning","revocationNotification"],o={0:"badAlg",2:"badRequest",5:"badDataFormat",14:"timeNotAvailable",15:"unacceptedPolicy",16:"unacceptedExtension",17:"addInfoNotAvailable",25:"systemFailure"};this.getResponse=function(t){var e=a(t,0);if(1==e.length)return this.getPKIStatusInfo(n(t,e[0]));if(e.length>1){var r=this.getPKIStatusInfo(n(t,e[0])),i=n(t,e[1]),s=this.getToken(i);return s.statusinfo=r,s}},this.getToken=function(t){var e=(new ot.asn1.cms.CMSParser).getCMSSignedData(t);return this.setTSTInfo(e),e},this.setTSTInfo=function(t){var e=t.econtent;if("tstinfo"==e.type){var r=e.content.hex,n=this.getTSTInfo(r);e.content=n}},this.getTSTInfo=function(e){var i={},s=a(e,0),o=r(e,s[1]);i.policy=Pt(o);var u=n(e,s[2]);i.messageImprint=this.getMessageImprint(u);var h=r(e,s[3]);i.serial={hex:h};var c=r(e,s[4]);i.genTime={str:At(c)};var l=0;if(s.length>5&&"30"==e.substr(s[5],2)){var f=n(e,s[5]);i.accuracy=this.getAccuracy(f),l++}if(s.length>5+l&&"01"==e.substr(s[5+l],2)&&("ff"==r(e,s[5+l])&&(i.ordering=!0),l++),s.length>5+l&&"02"==e.substr(s[5+l],2)){var p=r(e,s[5+l]);i.nonce={hex:p},l++}if(s.length>5+l&&"a0"==e.substr(s[5+l],2)){var d=n(e,s[5+l]);d="30"+d.substr(2),pGeneralNames=t.getGeneralNames(d);var g=pGeneralNames[0].dn;i.tsa=g,l++}if(s.length>5+l&&"a1"==e.substr(s[5+l],2)){var m=n(e,s[5+l]);m="30"+m.substr(2);var y=t.getExtParamArray(m);i.ext=y,l++}return i},this.getAccuracy=function(t){for(var e={},n=a(t,0),i=0;i1&&"30"==t.substr(i[1],2)){var c=n(t,i[1]);e.statusstr=this.getPKIFreeText(c),o++}if(i.length>o&&"03"==t.substr(i[1+o],2)){var l=n(t,i[1+o]);e.failinfo=this.getPKIFailureInfo(l)}return e},this.getPKIFreeText=function(t){for(var r=[],n=a(t,0),i=0;i=e?t:new Array(e-t.length+1).join(r)+t};function jt(t,e){for(var r=0,n=0;n=0;n--)a+=i[n];return a}function Kt(t,e,r){if("object"==typeof t){e=String(e).split(".");for(var n=0;ni)throw"key is too short for SigAlg: keylen="+r+","+e;for(var a="00"+n,s="",o=i-4-a.length,u=0;u=0)return r}},ot.crypto.Util.getRandomBigIntegerMinToMax=function(t,e){var r=t.compareTo(e);if(r>0)throw"biMin is greater than biMax";if(0==r)return t;var n=e.subtract(t);return ot.crypto.Util.getRandomBigIntegerZeroToMax(n).add(t)},ot.crypto.MessageDigest=function(t){this.setAlgAndProvider=function(t,e){if(null!==(t=ot.crypto.MessageDigest.getCanonicalAlgName(t))&&void 0===e&&(e=ot.crypto.Util.DEFAULTPROVIDER[t]),-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(t)&&"cryptojs"==e){try{this.md=ot.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[t].create()}catch(e){throw"setAlgAndProvider hash alg set fail alg="+t+"/"+e}this.updateString=function(t){this.md.update(t)},this.updateHex=function(t){var e=y.enc.Hex.parse(t);this.md.update(e)},this.digest=function(){return this.md.finalize().toString(y.enc.Hex)},this.digestString=function(t){return this.updateString(t),this.digest()},this.digestHex=function(t){return this.updateHex(t),this.digest()}}if(-1!=":sha256:".indexOf(t)&&"sjcl"==e){try{this.md=new sjcl.hash.sha256}catch(e){throw"setAlgAndProvider hash alg set fail alg="+t+"/"+e}this.updateString=function(t){this.md.update(t)},this.updateHex=function(t){var e=sjcl.codec.hex.toBits(t);this.md.update(e)},this.digest=function(){var t=this.md.finalize();return sjcl.codec.hex.fromBits(t)},this.digestString=function(t){return this.updateString(t),this.digest()},this.digestHex=function(t){return this.updateHex(t),this.digest()}}},this.updateString=function(t){throw"updateString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.updateHex=function(t){throw"updateHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digest=function(){throw"digest() not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestString=function(t){throw"digestString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestHex=function(t){throw"digestHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},void 0!==t&&void 0!==t.alg&&(this.algName=t.alg,void 0===t.prov&&(this.provName=ot.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName))},ot.crypto.MessageDigest.getCanonicalAlgName=function(t){return"string"==typeof t&&(t=(t=t.toLowerCase()).replace(/-/,"")),t},ot.crypto.MessageDigest.getHashLength=function(t){var e=ot.crypto.MessageDigest,r=e.getCanonicalAlgName(t);if(void 0===e.HASHLENGTH[r])throw"not supported algorithm: "+t;return e.HASHLENGTH[r]},ot.crypto.MessageDigest.HASHLENGTH={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,ripemd160:20},ot.crypto.Mac=function(t){this.setAlgAndProvider=function(t,e){if(null==(t=t.toLowerCase())&&(t="hmacsha1"),"hmac"!=(t=t.toLowerCase()).substr(0,4))throw"setAlgAndProvider unsupported HMAC alg: "+t;void 0===e&&(e=ot.crypto.Util.DEFAULTPROVIDER[t]),this.algProv=t+"/"+e;var r=t.substr(4);if(-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(r)&&"cryptojs"==e){try{var n=ot.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[r];this.mac=y.algo.HMAC.create(n,this.pass)}catch(t){throw"setAlgAndProvider hash alg set fail hashAlg="+r+"/"+t}this.updateString=function(t){this.mac.update(t)},this.updateHex=function(t){var e=y.enc.Hex.parse(t);this.mac.update(e)},this.doFinal=function(){return this.mac.finalize().toString(y.enc.Hex)},this.doFinalString=function(t){return this.updateString(t),this.doFinal()},this.doFinalHex=function(t){return this.updateHex(t),this.doFinal()}}},this.updateString=function(t){throw"updateString(str) not supported for this alg/prov: "+this.algProv},this.updateHex=function(t){throw"updateHex(hex) not supported for this alg/prov: "+this.algProv},this.doFinal=function(){throw"digest() not supported for this alg/prov: "+this.algProv},this.doFinalString=function(t){throw"digestString(str) not supported for this alg/prov: "+this.algProv},this.doFinalHex=function(t){throw"digestHex(hex) not supported for this alg/prov: "+this.algProv},this.setPassword=function(t){if("string"==typeof t){var e=t;return t.length%2!=1&&t.match(/^[0-9A-Fa-f]+$/)||(e=wt(t)),void(this.pass=y.enc.Hex.parse(e))}if("object"!=typeof t)throw"KJUR.crypto.Mac unsupported password type: "+t;if(e=null,void 0!==t.hex){if(t.hex.length%2!=0||!t.hex.match(/^[0-9A-Fa-f]+$/))throw"Mac: wrong hex password: "+t.hex;e=t.hex}if(void 0!==t.utf8&&(e=yt(t.utf8)),void 0!==t.rstr&&(e=wt(t.rstr)),void 0!==t.b64&&(e=w(t.b64)),void 0!==t.b64u&&(e=mt(t.b64u)),null==e)throw"KJUR.crypto.Mac unsupported password type: "+t;this.pass=y.enc.Hex.parse(e)},void 0!==t&&(void 0!==t.pass&&this.setPassword(t.pass),void 0!==t.alg&&(this.algName=t.alg,void 0===t.prov&&(this.provName=ot.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName)))},ot.crypto.Signature=function(t){var e=null;if(this._setAlgNames=function(){var t=this.algName.match(/^(.+)with(.+)$/);t&&(this.mdAlgName=t[1].toLowerCase(),this.pubkeyAlgName=t[2].toLowerCase(),"rsaandmgf1"==this.pubkeyAlgName&&"sha"==this.mdAlgName&&(this.mdAlgName="sha1"))},this._zeroPaddingOfSignature=function(t,e){for(var r="",n=e/4-t.length,i=0;i=0)return!1;if(n.compareTo(r.ONE)<0||n.compareTo(a)>=0)return!1;var o=n.modInverse(a),u=t.multiply(o).mod(a),h=e.multiply(o).mod(a);return s.multiply(u).add(i.multiply(h)).getX().toBigInteger().mod(a).equals(e)},this.serializeSig=function(t,e){var r=t.toByteArraySigned(),n=e.toByteArraySigned(),i=[];return i.push(2),i.push(r.length),(i=i.concat(r)).push(2),i.push(n.length),(i=i.concat(n)).unshift(i.length),i.unshift(48),i},this.parseSig=function(t){var e;if(48!=t[0])throw new Error("Signature not a valid DERSequence");if(2!=t[e=2])throw new Error("First element in signature must be a DERInteger");var n=t.slice(e+2,e+2+t[e+1]);if(2!=t[e+=2+t[e+1]])throw new Error("Second element in signature must be a DERInteger");var i=t.slice(e+2,e+2+t[e+1]);return e+=2+t[e+1],{r:r.fromByteArrayUnsigned(n),s:r.fromByteArrayUnsigned(i)}},this.parseSigCompact=function(t){if(65!==t.length)throw"Signature has the wrong length";var e=t[0]-27;if(e<0||e>7)throw"Invalid signature type";var n=this.ecparams.n;return{r:r.fromByteArrayUnsigned(t.slice(1,33)).mod(n),s:r.fromByteArrayUnsigned(t.slice(33,65)).mod(n),i:e}},this.readPKCS5PrvKeyHex=function(t){if(!1===h(t))throw new Error("not ASN.1 hex string");var e,r,n;try{e=u(t,0,["[0]",0],"06"),r=u(t,0,[1],"04");try{n=u(t,0,["[1]",0],"03")}catch(t){}}catch(t){throw new Error("malformed PKCS#1/5 plain ECC private key")}if(this.curveName=s(e),void 0===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(n),this.setPrivateKeyHex(r),this.isPublic=!1},this.readPKCS8PrvKeyHex=function(t){if(!1===h(t))throw new e("not ASN.1 hex string");var r,n,i;try{u(t,0,[1,0],"06"),r=u(t,0,[1,1],"06"),n=u(t,0,[2,0,1],"04");try{i=u(t,0,[2,0,"[1]",0],"03")}catch(t){}}catch(t){throw new e("malformed PKCS#8 plain ECC private key")}if(this.curveName=s(r),void 0===this.curveName)throw new e("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(i),this.setPrivateKeyHex(n),this.isPublic=!1},this.readPKCS8PubKeyHex=function(t){if(!1===h(t))throw new e("not ASN.1 hex string");var r,n;try{u(t,0,[0,0],"06"),r=u(t,0,[0,1],"06"),n=u(t,0,[1],"03")}catch(t){throw new e("malformed PKCS#8 ECC public key")}if(this.curveName=s(r),null===this.curveName)throw new e("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(n)},this.readCertPubKeyHex=function(t,r){if(!1===h(t))throw new e("not ASN.1 hex string");var n,i;try{n=u(t,0,[0,5,0,1],"06"),i=u(t,0,[0,5,1],"03")}catch(t){throw new e("malformed X.509 certificate ECC public key")}if(this.curveName=s(n),null===this.curveName)throw new e("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(i)},void 0!==t&&void 0!==t.curve&&(this.curveName=t.curve),void 0===this.curveName&&(this.curveName="secp256r1"),this.setNamedCurve(this.curveName),void 0!==t&&(void 0!==t.prv&&this.setPrivateKeyHex(t.prv),void 0!==t.pub&&this.setPublicKeyHex(t.pub))},ot.crypto.ECDSA.parseSigHex=function(t){var e=ot.crypto.ECDSA.parseSigHexInHexRS(t);return{r:new C(e.r,16),s:new C(e.s,16)}},ot.crypto.ECDSA.parseSigHexInHexRS=function(t){var e=ct,r=e.getChildIdx,n=e.getV;if(e.checkStrictDER(t,0),"30"!=t.substr(0,2))throw new Error("signature is not a ASN.1 sequence");var i=r(t,0);if(2!=i.length)throw new Error("signature shall have two elements");var a=i[0],s=i[1];if("02"!=t.substr(a,2))throw new Error("1st item not ASN.1 integer");if("02"!=t.substr(s,2))throw new Error("2nd item not ASN.1 integer");return{r:n(t,a),s:n(t,s)}},ot.crypto.ECDSA.asn1SigToConcatSig=function(t){var e=ot.crypto.ECDSA.parseSigHexInHexRS(t),r=e.r,n=e.s;if(r.length>=130&&r.length<=134){if(r.length%2!=0)throw Error("unknown ECDSA sig r length error");if(n.length%2!=0)throw Error("unknown ECDSA sig s length error");"00"==r.substr(0,2)&&(r=r.substr(2)),"00"==n.substr(0,2)&&(n=n.substr(2));var i=Math.max(r.length,n.length);return(r=("000000"+r).slice(-i))+("000000"+n).slice(-i)}if("00"==r.substr(0,2)&&r.length%32==2&&(r=r.substr(2)),"00"==n.substr(0,2)&&n.length%32==2&&(n=n.substr(2)),r.length%32==30&&(r="00"+r),n.length%32==30&&(n="00"+n),r.length%32!=0)throw Error("unknown ECDSA sig r length error");if(n.length%32!=0)throw Error("unknown ECDSA sig s length error");return r+n},ot.crypto.ECDSA.concatSigToASN1Sig=function(t){if(t.length%4!=0)throw Error("unknown ECDSA concatinated r-s sig length error");var e=t.substr(0,t.length/2),r=t.substr(t.length/2);return ot.crypto.ECDSA.hexRSSigToASN1Sig(e,r)},ot.crypto.ECDSA.hexRSSigToASN1Sig=function(t,e){var r=new C(t,16),n=new C(e,16);return ot.crypto.ECDSA.biRSSigToASN1Sig(r,n)},ot.crypto.ECDSA.biRSSigToASN1Sig=function(t,e){var r=ot.asn1,n=new r.DERInteger({bigint:t}),i=new r.DERInteger({bigint:e});return new r.DERSequence({array:[n,i]}).tohex()},ot.crypto.ECDSA.getName=function(t){return"2b8104001f"===t?"secp192k1":"2a8648ce3d030107"===t?"secp256r1":"2b8104000a"===t?"secp256k1":"2b81040021"===t?"secp224r1":"2b81040022"===t?"secp384r1":"2b81040023"===t?"secp521r1":-1!=="|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(t)?"secp256r1":-1!=="|secp256k1|".indexOf(t)?"secp256k1":-1!=="|secp224r1|NIST P-224|P-224|".indexOf(t)?"secp224r1":-1!=="|secp384r1|NIST P-384|P-384|".indexOf(t)?"secp384r1":-1!=="|secp521r1|NIST P-521|P-521|".indexOf(t)?"secp521r1":null},void 0!==ot&&ot||(ot={}),void 0!==ot.crypto&&ot.crypto||(ot.crypto={}),ot.crypto.ECParameterDB=new function(){var t={},e={};function r(t){return new C(t,16)}this.getByName=function(r){var n=r;if(void 0!==e[n]&&(n=e[r]),void 0!==t[n])return t[n];throw"unregistered EC curve name: "+n},this.regist=function(n,i,a,s,o,u,h,c,l,f,p,d){t[n]={};var g=r(a),m=r(s),y=r(o),A=r(u),v=r(h),b=new at(g,m,y),w=b.decodePointHex("04"+c+l);t[n].name=n,t[n].keylen=i,t[n].keycharlen=2*Math.ceil(i/8),t[n].curve=b,t[n].G=w,t[n].n=A,t[n].h=v,t[n].oid=p,t[n].info=d;for(var C=0;C1?new C(n,16):null,h=new C(i,16),this.setPrivate(a,s,o,u,h)},this.setPublic=function(t,e,r,n){!function(t,e,r,n){if(null==t||null==e||null==r||null==n)throw new Error("invalid DSA public key");if(i.compareTo(e)>=0||e.compareTo(t)>=0)throw new Error("invalid DSA public key");if(i.compareTo(r)>=0||r.compareTo(t)>=0)throw new Error("invalid DSA public key");if(i.compareTo(n)>=0||n.compareTo(t)>=0)throw new Error("invalid DSA public key");if(0!=r.modPow(e,t).compareTo(i))throw new Error("invalid DSA public key")}(t,e,r,n),this.isPublic=!0,this.p=t,this.q=e,this.g=r,this.y=n,this.x=null},this.setPublicHex=function(t,e,r,n){var i,a,s,o;i=new C(t,16),a=new C(e,16),s=new C(r,16),o=new C(n,16),this.setPublic(i,a,s,o)},this.signWithMessageHash=function(t){var e,r,n,i=this.p,a=this.q,s=this.g,o=(this.y,this.x),u=new C(t.substr(0,a.bitLength()/4),16);do{e=ot.crypto.Util.getRandomBigIntegerMinToMax(C.ONE.add(C.ONE),a.subtract(C.ONE)),r=s.modPow(e,i).mod(a),n=e.modInverse(a).multiply(u.add(o.multiply(r))).mod(a)}while(0==r.compareTo(C.ZERO)||0==n.compareTo(C.ZERO));return ot.asn1.ASN1Util.jsonToASN1HEX({seq:[{int:{bigint:r}},{int:{bigint:n}}]})},this.verifyWithMessageHash=function(t,e){var r=this.p,n=this.q,i=this.g,a=this.y,s=this.parseASN1Signature(e),o=s[0],u=s[1],h=new C(t.substr(0,n.bitLength()/4),16);if(C.ZERO.compareTo(o)>0||o.compareTo(n)>0)throw"invalid DSA signature";if(C.ZERO.compareTo(u)>=0||u.compareTo(n)>0)throw"invalid DSA signature";var c=u.modInverse(n),l=h.multiply(c).mod(n),f=o.multiply(c).mod(n);return 0==i.modPow(l,r).multiply(a.modPow(f,r)).mod(r).mod(n).compareTo(o)},this.parseASN1Signature=function(t){try{return[new n(e(t,0,[0],"02"),16),new n(e(t,0,[1],"02"),16)]}catch(t){throw new Error("malformed ASN.1 DSA signature")}},this.readPKCS5PrvKeyHex=function(t){var n,i,a,s,o;if(!1===r(t))throw new Error("not ASN.1 hex string");try{n=e(t,0,[1],"02"),i=e(t,0,[2],"02"),a=e(t,0,[3],"02"),s=e(t,0,[4],"02"),o=e(t,0,[5],"02")}catch(t){throw new Error("malformed PKCS#1/5 plain DSA private key")}this.setPrivateHex(n,i,a,s,o)},this.readPKCS8PrvKeyHex=function(t){var n,i,a,s;if(!1===r(t))throw new Error("not ASN.1 hex string");try{n=e(t,0,[1,1,0],"02"),i=e(t,0,[1,1,1],"02"),a=e(t,0,[1,1,2],"02"),s=e(t,0,[2,0],"02")}catch(t){throw new Error("malformed PKCS#8 plain DSA private key")}this.setPrivateHex(n,i,a,null,s)},this.readPKCS8PubKeyHex=function(t){var n,i,a,s;if(!1===r(t))throw new Error("not ASN.1 hex string");try{n=e(t,0,[0,1,0],"02"),i=e(t,0,[0,1,1],"02"),a=e(t,0,[0,1,2],"02"),s=e(t,0,[1,0],"02")}catch(t){throw new Error("malformed PKCS#8 DSA public key")}this.setPublicHex(n,i,a,s)},this.readCertPubKeyHex=function(t,n){var i,a,s,o;if(!1===r(t))throw new Error("not ASN.1 hex string");try{i=e(t,0,[0,5,0,1,0],"02"),a=e(t,0,[0,5,0,1,1],"02"),s=e(t,0,[0,5,0,1,2],"02"),o=e(t,0,[0,5,1,0],"02")}catch(t){throw new Error("malformed X.509 certificate DSA public key")}this.setPublicHex(i,a,s,o)}};var Vt=function(){var t=function(t,r,n){return e(y.AES,t,r,n)},e=function(t,e,r,n){var i=y.enc.Hex.parse(e),a=y.enc.Hex.parse(r),s=y.enc.Hex.parse(n),o={};o.key=a,o.iv=s,o.ciphertext=i;var u=t.decrypt(o,a,{iv:s});return y.enc.Hex.stringify(u)},r=function(t,e,r){return n(y.AES,t,e,r)},n=function(t,e,r,n){var i=y.enc.Hex.parse(e),a=y.enc.Hex.parse(r),s=y.enc.Hex.parse(n),o=t.encrypt(i,a,{iv:s}),u=y.enc.Hex.parse(o.toString());return y.enc.Base64.stringify(u)},i={"AES-256-CBC":{proc:t,eproc:r,keylen:32,ivlen:16},"AES-192-CBC":{proc:t,eproc:r,keylen:24,ivlen:16},"AES-128-CBC":{proc:t,eproc:r,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:function(t,r,n){return e(y.TripleDES,t,r,n)},eproc:function(t,e,r){return n(y.TripleDES,t,e,r)},keylen:24,ivlen:8},"DES-CBC":{proc:function(t,r,n){return e(y.DES,t,r,n)},eproc:function(t,e,r){return n(y.DES,t,e,r)},keylen:8,ivlen:8}},a=function(t){var e={},r=t.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"));r&&(e.cipher=r[1],e.ivsalt=r[2]);var n=t.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));n&&(e.type=n[1]);var i=-1,a=0;-1!=t.indexOf("\r\n\r\n")&&(i=t.indexOf("\r\n\r\n"),a=2),-1!=t.indexOf("\n\n")&&(i=t.indexOf("\n\n"),a=1);var s=t.indexOf("-----END");if(-1!=i&&-1!=s){var o=t.substring(i+2*a,s-a);o=o.replace(/\s+/g,""),e.data=o}return e},s=function(t,e,r){for(var n=r.substring(0,16),a=y.enc.Hex.parse(n),s=y.enc.Utf8.parse(e),o=i[t].keylen+i[t].ivlen,u="",h=null;;){var c=y.algo.MD5.create();if(null!=h&&c.update(h),c.update(s),c.update(a),h=c.finalize(),(u+=y.enc.Hex.stringify(h)).length>=2*o)break}var l={};return l.keyhex=u.substr(0,2*i[t].keylen),l.ivhex=u.substr(2*i[t].keylen,2*i[t].ivlen),l},o=function(t,e,r,n){var a=y.enc.Base64.parse(t),s=y.enc.Hex.stringify(a);return(0,i[e].proc)(s,r,n)};return{version:"1.0.0",parsePKCS5PEM:function(t){return a(t)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(t,e,r){return s(t,e,r)},decryptKeyB64:function(t,e,r,n){return o(t,e,r,n)},getDecryptedKeyHex:function(t,e){var r=a(t),n=(r.type,r.cipher),i=r.ivsalt,u=r.data,h=s(n,e,i).keyhex;return o(u,n,h,i)},getEncryptedPKCS5PEMFromPrvKeyHex:function(t,e,r,n,a){var o="";if(void 0!==n&&null!=n||(n="AES-256-CBC"),void 0===i[n])throw new Error("KEYUTIL unsupported algorithm: "+n);if(void 0===a||null==a){var u=function(t){var e=y.lib.WordArray.random(t);return y.enc.Hex.stringify(e)}(i[n].ivlen);a=u.toUpperCase()}var h=function(t,e,r,n){return(0,i[e].eproc)(t,r,n)}(e,n,s(n,r,a).keyhex,a);return o="-----BEGIN "+t+" PRIVATE KEY-----\r\n",o+="Proc-Type: 4,ENCRYPTED\r\n",o+="DEK-Info: "+n+","+a+"\r\n",o+="\r\n",(o+=h.replace(/(.{64})/g,"$1\r\n"))+"\r\n-----END "+t+" PRIVATE KEY-----\r\n"},getEncryptedPKCS8PEM:function(t,e,r){return Ct(this.getEncryptedPKCS8Hex(t,e,r),"ENCRYPTED PRIVATE KEY")},getEncryptedPKCS8Hex:function(t,e,r){var n;(n=null==r||null==r?{}:JSON.parse(JSON.stringify(r))).plain=t,this.initPBES2Param(n),this.encryptPBES2Param(n,e);var i=this.generatePBES2ASN1Param(n);return ot.asn1.ASN1Util.newObject(i).tohex()},initPBES2Param:function(t){var e;null==Kt(t,"encalg")&&(t.encalg="aes256-CBC"),null==Kt(t,"iter")&&(t.iter=2048),null==Kt(t,"prf")&&(t.prf="hmacWithSHA256"),null==Kt(t,"salt")&&(t.salt=y.enc.Hex.stringify(y.lib.WordArray.random(8))),null==Kt(t,"enciv")&&("des-EDE3-CBC"==t.encalg&&(e=8),"aes128-CBC"==t.encalg&&(e=16),"aes256-CBC"==t.encalg&&(e=16),t.enciv=y.enc.Hex.stringify(y.lib.WordArray.random(e)))},encryptPBES2Param:function(t,e){var r=Vt.getDKFromPBES2Param(t,e);try{var n=ot.crypto.Cipher.encrypt(t.plain,r,t.encalg,{iv:t.enciv})}catch(e){throw new Error("encrypt error: "+t.plain+" "+r+" "+t.encalg+" "+t.enciv)}t.enc=n},generatePBES2ASN1Param:function(t){var e={seq:[{seq:[{oid:"pkcs5PBES2"},{seq:[{seq:[{oid:"pkcs5PBKDF2"},{seq:[{octstr:{hex:t.salt}},{int:{hex:Ut(t.iter)}}]}]},{seq:[{oid:t.encalg},{octstr:{hex:t.enciv}}]}]}]},{octstr:{hex:t.enc}}]};return"hmacWithSHA1"!=t.prf&&e.seq[0].seq[1].seq[0].seq[1].seq.push({seq:[{oid:t.prf},{null:""}]}),e},parseHexOfEncryptedPKCS8:function(t){var e=ct,r=e.getChildIdx,n=e.getV,i={},a=r(t,0);if(2!=a.length)throw new Error("malformed format: SEQUENCE(0).items != 2: "+a.length);i.ciphertext=n(t,a[1]);var s=r(t,a[0]);if(2!=s.length)throw new Error("malformed format: SEQUENCE(0.0).items != 2: "+s.length);if("2a864886f70d01050d"!=n(t,s[0]))throw new Error("this only supports pkcs5PBES2");var o=r(t,s[1]);if(2!=s.length)throw new Error("malformed format: SEQUENCE(0.0.1).items != 2: "+o.length);var u=r(t,o[1]);if(2!=u.length)throw new Error("malformed format: SEQUENCE(0.0.1.1).items != 2: "+u.length);if("2a864886f70d0307"!=n(t,u[0]))throw"this only supports TripleDES";i.encryptionSchemeAlg="TripleDES",i.encryptionSchemeIV=n(t,u[1]);var h=r(t,o[0]);if(2!=h.length)throw new Error("malformed format: SEQUENCE(0.0.1.0).items != 2: "+h.length);if("2a864886f70d01050c"!=n(t,h[0]))throw new Error("this only supports pkcs5PBKDF2");var c=r(t,h[1]);if(c.length<2)throw new Error("malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+c.length);i.pbkdf2Salt=n(t,c[0]);var l=n(t,c[1]);try{i.pbkdf2Iter=parseInt(l,16)}catch(t){throw new Error("malformed format pbkdf2Iter: "+l)}return i},getPBKDF2KeyHexFromParam:function(t,e){var r=y.enc.Hex.parse(t.pbkdf2Salt),n=t.pbkdf2Iter,i=y.PBKDF2(e,r,{keySize:6,iterations:n});return y.enc.Hex.stringify(i)},_getPlainPKCS8HexFromEncryptedPKCS8PEM:function(t,e){var r=Et(t,"ENCRYPTED PRIVATE KEY"),n=this.parseHexOfEncryptedPKCS8(r),i=Vt.getPBKDF2KeyHexFromParam(n,e),a={};a.ciphertext=y.enc.Hex.parse(n.ciphertext);var s=y.enc.Hex.parse(i),o=y.enc.Hex.parse(n.encryptionSchemeIV),u=y.TripleDES.decrypt(a,s,{iv:o});return y.enc.Hex.stringify(u)},parsePBES2:function(t){var e=ct.parse(t);if("pkcs5PBES2"!=Kt(e,"seq.0.seq.0.oid")||"pkcs5PBKDF2"!=Kt(e,"seq.0.seq.1.seq.0.seq.0.oid"))throw new Error("not pkcs5PBES2 and pkcs5PBKDF2 used");var r=Kt(e,"seq.0.seq.1.seq.0.seq.1.seq");if(null==r)throw new Error("PBKDF2 parameter not found");var n=Kt(r,"0.octstr.hex"),i=Kt(r,"1.int.hex"),a=Kt(r,"2.seq.0.oid","hmacWithSHA1"),s=-1;try{s=parseInt(i,16)}catch(t){throw new Error("iter not proper value")}var o=Kt(e,"seq.0.seq.1.seq.1.seq.0.oid"),u=Kt(e,"seq.0.seq.1.seq.1.seq.1.octstr.hex"),h=Kt(e,"seq.1.octstr.hex");if(null==o||null==u||null==h)throw new Error("encalg, enciv or enc is undefined");return{salt:n,iter:s,prf:a,encalg:o,enciv:u,enc:h}},getDKFromPBES2Param:function(t,e){var r={hmacWithSHA1:y.algo.SHA1,hmacWithSHA224:y.algo.SHA224,hmacWithSHA256:y.algo.SHA256,hmacWithSHA384:y.algo.SHA384,hmacWithSHA512:y.algo.SHA512}[t.prf];if(null==r)throw new Error("unsupported prf");var n={"des-EDE3-CBC":6,"aes128-CBC":4,"aes256-CBC":8}[t.encalg];if(null==n)throw new Error("unsupported encalg");var i=y.enc.Hex.parse(t.salt),a=t.iter;try{var s=y.PBKDF2(e,i,{keySize:n,iterations:a,hasher:r});return y.enc.Hex.stringify(s)}catch(r){throw new Error("PBKDF2 error: "+r+" "+JSON.stringify(t)+" "+e)}},getPlainHexFromEncryptedPKCS8PEM:function(t,e){if(-1==t.indexOf("BEGIN ENCRYPTED PRIVATE KEY"))throw new Error("not Encrypted PKCS#8 PEM string");var r,n=Et(t);try{r=Vt.parsePBES2(n)}catch(t){throw new Error("malformed PBES2 format: "+t.message)}var i=Vt.getDKFromPBES2Param(r,e);return ot.crypto.Cipher.decrypt(r.enc,i,r.encalg,{iv:r.enciv})},getKeyFromEncryptedPKCS8PEM:function(t,e){var r=this.getPlainHexFromEncryptedPKCS8PEM(t,e);return this.getKeyFromPlainPrivatePKCS8Hex(r)},parsePlainPrivatePKCS8Hex:function(t){var e=ct,r=e.getChildIdx,n=e.getV,i={algparam:null};if("30"!=t.substr(0,2))throw new Error("malformed plain PKCS8 private key(code:001)");var a=r(t,0);if(a.length<3)throw new Error("malformed plain PKCS8 private key(code:002)");if("30"!=t.substr(a[1],2))throw new Error("malformed PKCS8 private key(code:003)");var s=r(t,a[1]);if(2!=s.length)throw new Error("malformed PKCS8 private key(code:004)");if("06"!=t.substr(s[0],2))throw new Error("malformed PKCS8 private key(code:005)");if(i.algoid=n(t,s[0]),"06"==t.substr(s[1],2)&&(i.algparam=n(t,s[1])),"04"!=t.substr(a[2],2))throw new Error("malformed PKCS8 private key(code:006)");return i.keyidx=e.getVidx(t,a[2]),i},getKeyFromPlainPrivatePKCS8PEM:function(t){var e=Et(t,"PRIVATE KEY");return this.getKeyFromPlainPrivatePKCS8Hex(e)},getKeyFromPlainPrivatePKCS8Hex:function(t){var e,r=this.parsePlainPrivatePKCS8Hex(t);if("2a864886f70d010101"==r.algoid)e=new rt;else if("2a8648ce380401"==r.algoid)e=new ot.crypto.DSA;else{if("2a8648ce3d0201"!=r.algoid)throw new Error("unsupported private key algorithm");e=new ot.crypto.ECDSA}return e.readPKCS8PrvKeyHex(t),e},_getKeyFromPublicPKCS8Hex:function(t){var e,r=ct.getVbyList(t,0,[0,0],"06");if("2a864886f70d010101"===r)e=new rt;else if("2a8648ce380401"===r)e=new ot.crypto.DSA;else{if("2a8648ce3d0201"!==r)throw new Error("unsupported PKCS#8 public key hex");e=new ot.crypto.ECDSA}return e.readPKCS8PubKeyHex(t),e},parsePublicRawRSAKeyHex:function(t){var e=ct,r=e.getChildIdx,n=e.getV,i={};if("30"!=t.substr(0,2))throw new Error("malformed RSA key(code:001)");var a=r(t,0);if(2!=a.length)throw new Error("malformed RSA key(code:002)");if("02"!=t.substr(a[0],2))throw new Error("malformed RSA key(code:003)");if(i.n=n(t,a[0]),"02"!=t.substr(a[1],2))throw new Error("malformed RSA key(code:004)");return i.e=n(t,a[1]),i},parsePublicPKCS8Hex:function(t){var e=ct,r=e.getChildIdx,n=e.getV,i={algparam:null},a=r(t,0);if(2!=a.length)throw new Error("outer DERSequence shall have 2 elements: "+a.length);var s=a[0];if("30"!=t.substr(s,2))throw new Error("malformed PKCS8 public key(code:001)");var o=r(t,s);if(2!=o.length)throw new Error("malformed PKCS8 public key(code:002)");if("06"!=t.substr(o[0],2))throw new Error("malformed PKCS8 public key(code:003)");if(i.algoid=n(t,o[0]),"06"==t.substr(o[1],2)?i.algparam=n(t,o[1]):"30"==t.substr(o[1],2)&&(i.algparam={},i.algparam.p=e.getVbyList(t,o[1],[0],"02"),i.algparam.q=e.getVbyList(t,o[1],[1],"02"),i.algparam.g=e.getVbyList(t,o[1],[2],"02")),"03"!=t.substr(a[1],2))throw new Error("malformed PKCS8 public key(code:004)");return i.key=n(t,a[1]).substr(2),i}}}();function qt(t,e){for(var r="",n=e/4-t.length,i=0;i>24,(16711680&i)>>16,(65280&i)>>8,255&i])))),i+=1;return n}function zt(t){for(var e in ot.crypto.Util.DIGESTINFOHEAD){var r=ot.crypto.Util.DIGESTINFOHEAD[e],n=r.length;if(t.substring(0,n)==r)return[e,t.substring(n)]}return[]}function Yt(t){var e,r=ct,n=r.getChildIdx,i=r.getV,a=(r.dump,r.parse),s=r.getTLV,o=r.getVbyList,u=r.getVbyListEx,h=r.getTLVbyList,c=r.getTLVbyListEx,l=r.getIdxbyList,f=r.getIdxbyListEx,p=r.getVidx,d=r.getInt,g=r.oidname,m=r.hextooidstr,y=Et,A=Error;try{e=ot.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV}catch(t){}this.HEX2STAG={"0c":"utf8",13:"prn",16:"ia5","1a":"vis","1e":"bmp"},this.hex=null,this.version=0,this.foffset=0,this.aExtInfo=null,this.getVersion=function(){if(null===this.hex||0!==this.version)return this.version;var t=h(this.hex,0,[0,0]);if("a0"==t.substr(0,2)){var e=h(t,0,[0]),r=d(e,0);if(r<0||20?e:void 0}catch(t){return}},this._asn1ToNoticeRef=function(t){try{for(var e={},r=Kt(t,"seq"),n=0;n0?e:void 0}catch(t){return}},this._asn1ToNoticeNum=function(t){try{for(var e=Kt(t,"seq"),r=[],n=0;n1){var o=s(t,a[1]),u=this.getGeneralName(o);null!=u.uri&&(i.uri=u.uri)}if(a.length>2){var h=s(t,a[2]);"0101ff"==h&&(i.reqauth=!0),"010100"==h&&(i.reqauth=!1)}return i},this.getExtSubjectDirectoryAttributes=function(t,e){if(void 0===t&&void 0===e){var r=this.getExtInfo("subjectDirectoryAttributes");if(void 0===r)return;t=s(this.hex,r.vidx),e=r.critical}var n={extname:"subjectDirectoryAttributes"};e&&(n.critical=!0);try{for(var i=a(t),o=[],u=0;u0&&(e.ext=this.getExtParamArray()),e.sighex=this.getSignatureValueHex(),1==t.tbshex&&(e.tbshex=h(this.hex,0,[0])),1==t.nodnarray&&(delete e.issuer.array,delete e.subject.array),e},this.getExtParamArray=function(t){null==t&&-1!=f(this.hex,0,[0,"[3]"])&&(t=c(this.hex,0,[0,"[3]",0],"30"));for(var e=[],r=n(t,0),i=0;i2&&"04"===m.substr(g[1],2)))throw new Error("unsupported PKCS#1/5 hexadecimal key");(x=new o).readPKCS5PrvKeyHex(m)}return x}if("pkcs8prv"===r)return l.getKeyFromPlainPrivatePKCS8Hex(t);if("pkcs8pub"===r)return l._getKeyFromPublicPKCS8Hex(t);if("x509pub"===r)return Yt.getPublicKeyFromCertHex(t);if(-1!=t.indexOf("-END CERTIFICATE-",0)||-1!=t.indexOf("-END X509 CERTIFICATE-",0)||-1!=t.indexOf("-END TRUSTED CERTIFICATE-",0))return Yt.getPublicKeyFromCertPEM(t);if(-1!=t.indexOf("-END PUBLIC KEY-")){var A=Et(t,"PUBLIC KEY");return l._getKeyFromPublicPKCS8Hex(A)}if(-1!=t.indexOf("-END RSA PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED")){var v=c(t,"RSA PRIVATE KEY");return l.getKey(v,null,"pkcs5prv")}if(-1!=t.indexOf("-END DSA PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED")){var b=a(n=c(t,"DSA PRIVATE KEY"),0,[1],"02"),w=a(n,0,[2],"02"),E=a(n,0,[3],"02"),S=a(n,0,[4],"02"),I=a(n,0,[5],"02");return(x=new u).setPrivate(new C(b,16),new C(w,16),new C(E,16),new C(S,16),new C(I,16)),x}if(-1!=t.indexOf("-END EC PRIVATE KEY-")&&-1==t.indexOf("4,ENCRYPTED"))return v=c(t,"EC PRIVATE KEY"),l.getKey(v,null,"pkcs5prv");if(-1!=t.indexOf("-END PRIVATE KEY-"))return l.getKeyFromPlainPrivatePKCS8PEM(t);if(-1!=t.indexOf("-END RSA PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var B=l.getDecryptedKeyHex(t,e),_=new rt;return _.readPKCS5PrvKeyHex(B),_}if(-1!=t.indexOf("-END EC PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED")){var M,x=a(n=l.getDecryptedKeyHex(t,e),0,[1],"04"),T=a(n,0,[2,0],"06"),R=a(n,0,[3,0],"03").substr(2);if(void 0===ot.crypto.OID.oidhex2name[T])throw new Error("undefined OID(hex) in KJUR.crypto.OID: "+T);return(M=new o({curve:ot.crypto.OID.oidhex2name[T]})).setPublicKeyHex(R),M.setPrivateKeyHex(x),M.isPublic=!1,M}if(-1!=t.indexOf("-END DSA PRIVATE KEY-")&&-1!=t.indexOf("4,ENCRYPTED"))return b=a(n=l.getDecryptedKeyHex(t,e),0,[1],"02"),w=a(n,0,[2],"02"),E=a(n,0,[3],"02"),S=a(n,0,[4],"02"),I=a(n,0,[5],"02"),(x=new u).setPrivate(new C(b,16),new C(w,16),new C(E,16),new C(S,16),new C(I,16)),x;if(-1!=t.indexOf("-END ENCRYPTED PRIVATE KEY-"))return l.getKeyFromEncryptedPKCS8PEM(t,e);throw new Error("not supported argument")},Vt.generateKeypair=function(t,e){if("RSA"==t){var r=e;(s=new rt).generate(r,"10001"),s.isPrivate=!0,s.isPublic=!0;var n=new rt,i=s.n.toString(16),a=s.e.toString(16);return n.setPublic(i,a),n.isPrivate=!1,n.isPublic=!0,(o={}).prvKeyObj=s,o.pubKeyObj=n,o}if("EC"==t){var s,o,u=e,h=new ot.crypto.ECDSA({curve:u}).generateKeyPairHex();return(s=new ot.crypto.ECDSA({curve:u})).setPublicKeyHex(h.ecpubhex),s.setPrivateKeyHex(h.ecprvhex),s.isPrivate=!0,s.isPublic=!1,(n=new ot.crypto.ECDSA({curve:u})).setPublicKeyHex(h.ecpubhex),n.isPrivate=!1,n.isPublic=!0,(o={}).prvKeyObj=s,o.pubKeyObj=n,o}throw new Error("unknown algorithm: "+t)},Vt.getPEM=function(t,e,r,n,i,a){var s=ot,o=s.asn1,u=o.DERObjectIdentifier,h=o.DERInteger,c=o.ASN1Util.newObject,l=o.x509.SubjectPublicKeyInfo,f=s.crypto,p=f.DSA,d=f.ECDSA,g=rt;function m(t){return c({seq:[{int:0},{int:{bigint:t.n}},{int:t.e},{int:{bigint:t.d}},{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.dmp1}},{int:{bigint:t.dmq1}},{int:{bigint:t.coeff}}]})}function y(t){return c({seq:[{int:1},{octstr:{hex:t.prvKeyHex}},{tag:["a0",!0,{oid:{name:t.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+t.pubKeyHex}}]}]})}function A(t){return c({seq:[{int:0},{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.g}},{int:{bigint:t.y}},{int:{bigint:t.x}}]})}if((void 0!==g&&t instanceof g||void 0!==p&&t instanceof p||void 0!==d&&t instanceof d)&&1==t.isPublic&&(void 0===e||"PKCS8PUB"==e))return Ct(C=new l(t).tohex(),"PUBLIC KEY");if("PKCS1PRV"==e&&void 0!==g&&t instanceof g&&(void 0===r||null==r)&&1==t.isPrivate)return Ct(C=m(t).tohex(),"RSA PRIVATE KEY");if("PKCS1PRV"==e&&void 0!==d&&t instanceof d&&(void 0===r||null==r)&&1==t.isPrivate){var v=new u({name:t.curveName}).tohex(),b=y(t).tohex(),w="";return(w+=Ct(v,"EC PARAMETERS"))+Ct(b,"EC PRIVATE KEY")}if("PKCS1PRV"==e&&void 0!==p&&t instanceof p&&(void 0===r||null==r)&&1==t.isPrivate)return Ct(C=A(t).tohex(),"DSA PRIVATE KEY");if("PKCS5PRV"==e&&void 0!==g&&t instanceof g&&void 0!==r&&null!=r&&1==t.isPrivate){var C=m(t).tohex();return void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",C,r,n,a)}if("PKCS5PRV"==e&&void 0!==d&&t instanceof d&&void 0!==r&&null!=r&&1==t.isPrivate)return C=y(t).tohex(),void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",C,r,n,a);if("PKCS5PRV"==e&&void 0!==p&&t instanceof p&&void 0!==r&&null!=r&&1==t.isPrivate)return C=A(t).tohex(),void 0===n&&(n="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",C,r,n,a);var E=function(t,e){if("string"==typeof e)return Vt.getEncryptedPKCS8PEM(t,e);if("object"==typeof e&&null!=Kt(e,"passcode")){var r=JSON.parse(JSON.stringify(e)),n=r.passcode;return delete r.passcode,Vt.getEncryptedPKCS8PEM(t,n,r)}};if("PKCS8PRV"==e&&null!=g&&t instanceof g&&1==t.isPrivate){var S=m(t).tohex();return C=c({seq:[{int:0},{seq:[{oid:{name:"rsaEncryption"}},{null:!0}]},{octstr:{hex:S}}]}).tohex(),void 0===r||null==r?Ct(C,"PRIVATE KEY"):E(C,r)}if("PKCS8PRV"==e&&void 0!==d&&t instanceof d&&1==t.isPrivate){var I={seq:[{int:1},{octstr:{hex:t.prvKeyHex}}]};return"string"==typeof t.pubKeyHex&&I.seq.push({tag:["a1",!0,{bitstr:{hex:"00"+t.pubKeyHex}}]}),S=new c(I).tohex(),C=c({seq:[{int:0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:t.curveName}}]},{octstr:{hex:S}}]}).tohex(),void 0===r||null==r?Ct(C,"PRIVATE KEY"):E(C,r)}if("PKCS8PRV"==e&&void 0!==p&&t instanceof p&&1==t.isPrivate)return S=new h({bigint:t.x}).tohex(),C=c({seq:[{int:0},{seq:[{oid:{name:"dsa"}},{seq:[{int:{bigint:t.p}},{int:{bigint:t.q}},{int:{bigint:t.g}}]}]},{octstr:{hex:S}}]}).tohex(),void 0===r||null==r?Ct(C,"PRIVATE KEY"):E(C,r);throw new Error("unsupported object nor format")},Vt.getKeyFromCSRPEM=function(t){var e=Et(t,"CERTIFICATE REQUEST");return Vt.getKeyFromCSRHex(e)},Vt.getKeyFromCSRHex=function(t){var e=Vt.parseCSRHex(t);return Vt.getKey(e.p8pubkeyhex,null,"pkcs8pub")},Vt.parseCSRHex=function(t){var e=ct,r=e.getChildIdx,n=e.getTLV,i={},a=t;if("30"!=a.substr(0,2))throw new Error("malformed CSR(code:001)");var s=r(a,0);if(s.length<1)throw new Error("malformed CSR(code:002)");if("30"!=a.substr(s[0],2))throw new Error("malformed CSR(code:003)");var o=r(a,s[0]);if(o.length<3)throw new Error("malformed CSR(code:004)");return i.p8pubkeyhex=n(a,o[2]),i},Vt.getKeyID=function(t){var e=Vt,r=ct;"string"==typeof t&&-1!=t.indexOf("BEGIN ")&&(t=e.getKey(t));var n=Et(e.getPEM(t)),i=r.getIdxbyList(n,0,[1]),a=r.getV(n,i).substring(2);return ot.crypto.Util.hashHex(a,"sha1")},Vt.getJWK=function(t,e,r,n,i){var a,s,o={},u=ot.crypto.Util.hashHex;if("string"==typeof t)a=Vt.getKey(t),-1!=t.indexOf("CERTIFICATE")&&(s=Et(t));else{if("object"!=typeof t)throw new Error("unsupported keyinfo type");t instanceof Yt?(a=t.getPublicKey(),s=t.hex):a=t}if(a instanceof rt&&a.isPrivate)o.kty="RSA",o.n=gt(a.n.toString(16)),o.e=gt(a.e.toString(16)),o.d=gt(a.d.toString(16)),o.p=gt(a.p.toString(16)),o.q=gt(a.q.toString(16)),o.dp=gt(a.dmp1.toString(16)),o.dq=gt(a.dmq1.toString(16)),o.qi=gt(a.coeff.toString(16));else if(a instanceof rt&&a.isPublic)o.kty="RSA",o.n=gt(a.n.toString(16)),o.e=gt(a.e.toString(16));else if(a instanceof ot.crypto.ECDSA&&a.isPrivate){if("P-256"!==(c=a.getShortNISTPCurveName())&&"P-384"!==c&&"P-521"!==c)throw new Error("unsupported curve name for JWT: "+c);var h=a.getPublicKeyXYHex();o.kty="EC",o.crv=c,o.x=gt(h.x),o.y=gt(h.y),o.d=gt(a.prvKeyHex)}else if(a instanceof ot.crypto.ECDSA&&a.isPublic){var c;if("P-256"!==(c=a.getShortNISTPCurveName())&&"P-384"!==c&&"P-521"!==c)throw new Error("unsupported curve name for JWT: "+c);h=a.getPublicKeyXYHex(),o.kty="EC",o.crv=c,o.x=gt(h.x),o.y=gt(h.y)}if(null==o.kty)throw new Error("unsupported keyinfo");return a.isPrivate||1==e||(o.kid=ot.jws.JWS.getJWKthumbprint(o)),null!=s&&1!=r&&(o.x5c=[b(s)]),null!=s&&1!=n&&(o.x5t=pt(b(u(s,"sha1")))),null!=s&&1!=i&&(o["x5t#S256"]=pt(b(u(s,"sha256")))),o},Vt.getJWKFromKey=function(t){return Vt.getJWK(t,!0,!0,!0,!0)},rt.getPosArrayOfChildrenFromHex=function(t){return ct.getChildIdx(t,0)},rt.getHexValueArrayOfChildrenFromHex=function(t){var e,r=ct.getV,n=r(t,(e=rt.getPosArrayOfChildrenFromHex(t))[0]),i=r(t,e[1]),a=r(t,e[2]),s=r(t,e[3]),o=r(t,e[4]),u=r(t,e[5]),h=r(t,e[6]),c=r(t,e[7]),l=r(t,e[8]);return(e=new Array).push(n,i,a,s,o,u,h,c,l),e},rt.prototype.readPrivateKeyFromPEMString=function(t){var e=Et(t),r=rt.getHexValueArrayOfChildrenFromHex(e);this.setPrivateEx(r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8])},rt.prototype.readPKCS5PrvKeyHex=function(t){var e=rt.getHexValueArrayOfChildrenFromHex(t);this.setPrivateEx(e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8])},rt.prototype.readPKCS8PrvKeyHex=function(t){var e,r,n,i,a,s,o,u,h=ct,c=h.getVbyListEx;if(!1===h.isASN1HEX(t))throw new Error("not ASN.1 hex string");try{e=c(t,0,[2,0,1],"02"),r=c(t,0,[2,0,2],"02"),n=c(t,0,[2,0,3],"02"),i=c(t,0,[2,0,4],"02"),a=c(t,0,[2,0,5],"02"),s=c(t,0,[2,0,6],"02"),o=c(t,0,[2,0,7],"02"),u=c(t,0,[2,0,8],"02")}catch(t){throw new Error("malformed PKCS#8 plain RSA private key")}this.setPrivateEx(e,r,n,i,a,s,o,u)},rt.prototype.readPKCS5PubKeyHex=function(t){var e=ct,r=e.getV;if(!1===e.isASN1HEX(t))throw new Error("keyHex is not ASN.1 hex string");var n=e.getChildIdx(t,0);if(2!==n.length||"02"!==t.substr(n[0],2)||"02"!==t.substr(n[1],2))throw new Error("wrong hex for PKCS#5 public key");var i=r(t,n[0]),a=r(t,n[1]);this.setPublic(i,a)},rt.prototype.readPKCS8PubKeyHex=function(t){var e=ct;if(!1===e.isASN1HEX(t))throw new Error("not ASN.1 hex string");if("06092a864886f70d010101"!==e.getTLVbyListEx(t,0,[0,0]))throw new Error("not PKCS8 RSA public key");var r=e.getTLVbyListEx(t,0,[1,0]);this.readPKCS5PubKeyHex(r)},rt.prototype.readCertPubKeyHex=function(t,e){var r,n;(r=new Yt).readCertHex(t),n=r.getPublicKeyHex(),this.readPKCS8PubKeyHex(n)},rt.prototype.sign=function(t,e){var r=function(t){return ot.crypto.Util.hashString(t,e)}(t);return this.signWithMessageHash(r,e)},rt.prototype.signWithMessageHash=function(t,e){var r=et(ot.crypto.Util.getPaddedDigestInfoHex(t,e,this.n.bitLength()),16);return qt(this.doPrivate(r).toString(16),this.n.bitLength())},rt.prototype.signPSS=function(t,e,r){var n,i=(n=wt(t),ot.crypto.Util.hashHex(n,e));return void 0===r&&(r=-1),this.signWithMessageHashPSS(i,e,r)},rt.prototype.signWithMessageHashPSS=function(t,e,r){var n,i=bt(t),a=i.length,s=this.n.bitLength()-1,o=Math.ceil(s/8),u=function(t){return ot.crypto.Util.hashHex(t,e)};if(-1===r||void 0===r)r=a;else if(-2===r)r=o-a-2;else if(r<-2)throw new Error("invalid salt length");if(o0&&(h=new Array(r),(new tt).nextBytes(h),h=String.fromCharCode.apply(String,h));var c=bt(u(wt("\0\0\0\0\0\0\0\0"+i+h))),l=[];for(n=0;n>8*o-s&255;for(d[0]&=~g,n=0;nn)return!1;var i=this.doPublic(r).toString(16);if(i.length+3!=n/4)return!1;var a=zt(i.replace(/^1f+00/,""));if(0==a.length)return!1;var s=a[0],o=a[1],u=function(t){return ot.crypto.Util.hashString(t,s)}(t);return o==u},rt.prototype.verifyWithMessageHash=function(t,e){if(e.length!=Math.ceil(this.n.bitLength()/4))return!1;var r=et(e,16);if(r.bitLength()>this.n.bitLength())return 0;var n=zt(this.doPublic(r).toString(16).replace(/^1f+00/,""));return 0!=n.length&&(n[0],n[1]==t)},rt.prototype.verifyPSS=function(t,e,r,n){var i,a=(i=wt(t),ot.crypto.Util.hashHex(i,r));return void 0===n&&(n=-1),this.verifyWithMessageHashPSS(a,e,r,n)},rt.prototype.verifyWithMessageHashPSS=function(t,e,r,n){if(e.length!=Math.ceil(this.n.bitLength()/4))return!1;var i,a=new C(e,16),s=function(t){return ot.crypto.Util.hashHex(t,r)},o=bt(t),u=o.length,h=this.n.bitLength()-1,c=Math.ceil(h/8);if(-1===n||void 0===n)n=u;else if(-2===n)n=c-u-2;else if(n<-2)throw new Error("invalid salt length");if(c>8*c-h&255;if(0!==(f.charCodeAt(0)&d))throw new Error("bits beyond keysize not zero");var g=Wt(p,f.length,s),m=[];for(i=0;i0&&-1==(":"+r.join(":")+":").indexOf(":"+m+":"))throw"algorithm '"+m+"' not accepted in the list";if("none"!=m&&null===e)throw"key shall be specified to verify.";if("string"==typeof e&&-1!=e.indexOf("-----BEGIN ")&&(e=Vt.getKey(e)),!("RS"!=f&&"PS"!=f||e instanceof n))throw"key shall be a RSAKey obj for RS* and PS* algs";if("ES"==f&&!(e instanceof u))throw"key shall be a ECDSA obj for ES* algs";var y=null;if(void 0===a.jwsalg2sigalg[g.alg])throw"unsupported alg name: "+m;if("none"==(y=a.jwsalg2sigalg[m]))throw"not supported";if("Hmac"==y.substr(0,4)){if(void 0===e)throw"hexadecimal key shall be specified for HMAC";var A=new h({alg:y,pass:e});return A.updateString(p),d==A.doFinal()}if(-1!=y.indexOf("withECDSA")){var v,b=null;try{b=u.concatSigToASN1Sig(d)}catch(t){return!1}return(v=new c({alg:y})).init(e),v.updateString(p),v.verify(b)}return(v=new c({alg:y})).init(e),v.updateString(p),v.verify(d)},ot.jws.JWS.parse=function(t){var e,r,n,i=t.split("."),a={};if(2!=i.length&&3!=i.length)throw"malformed sJWS: wrong number of '.' splitted elements";return e=i[0],r=i[1],3==i.length&&(n=i[2]),a.headerObj=ot.jws.JWS.readSafeJSONString(ht(e)),a.payloadObj=ot.jws.JWS.readSafeJSONString(ht(r)),a.headerPP=JSON.stringify(a.headerObj,null," "),null==a.payloadObj?a.payloadPP=ht(r):a.payloadPP=JSON.stringify(a.payloadObj,null," "),void 0!==n&&(a.sigHex=mt(n)),a},ot.jws.JWS.verifyJWT=function(t,e,r){var n=ot.jws,i=n.JWS,a=i.readSafeJSONString,s=i.inArray,o=i.includedArray;if(!Nt(t))return!1;var u=t.split(".");if(3!=u.length)return!1;var h=u[0],c=u[1],l=(mt(u[2]),a(ht(h))),f=a(ht(c));if(void 0===l.alg)return!1;if(void 0===r.alg)throw"acceptField.alg shall be specified";if(!s(l.alg,r.alg))return!1;if(void 0!==f.iss&&"object"==typeof r.iss&&!s(f.iss,r.iss))return!1;if(void 0!==f.sub&&"object"==typeof r.sub&&!s(f.sub,r.sub))return!1;if(void 0!==f.aud&&"object"==typeof r.aud)if("string"==typeof f.aud){if(!s(f.aud,r.aud))return!1}else if("object"==typeof f.aud&&!o(f.aud,r.aud))return!1;var p=n.IntDate.getNow();return void 0!==r.verifyAt&&"number"==typeof r.verifyAt&&(p=r.verifyAt),void 0!==r.gracePeriod&&"number"==typeof r.gracePeriod||(r.gracePeriod=0),!(void 0!==f.exp&&"number"==typeof f.exp&&f.exp+r.gracePeriodi&&this.aHeader.pop(),this.aSignature.length>i&&this.aSignature.pop(),"addSignature failed: "+t}},this.verifyAll=function(t){if(this.aHeader.length!==t.length||this.aSignature.length!==t.length)return!1;for(var e=0;e0))throw"malformed header";if(this.aHeader=t.headers,"string"!=typeof t.payload)throw"malformed signatures";if(this.sPayload=t.payload,!(t.signatures.length>0))throw"malformed signatures";this.aSignature=t.signatures}catch(t){throw"malformed JWS-JS JSON object: "+t}},this.getJSON=function(){return{headers:this.aHeader,payload:this.sPayload,signatures:this.aSignature}},this.isEmpty=function(){return 0==this.aHeader.length?1:0}},e.Dm=tt,e.jZ=C,ot.crypto.ECDSA,ot.crypto.DSA,ot.crypto.Signature,ot.crypto.MessageDigest,ot.crypto.Mac,e.Et=ot.crypto,ot.asn1,ot.jws,ot.lang},58789(t,e,r){var n,i=r(92861).Buffer,a=r(91565),s=r(22010),o=r(40537),u="secret must be a string or buffer",h="key must be a string or a buffer",c="function"==typeof a.createPublicKey;function l(t){if(!i.isBuffer(t)&&"string"!=typeof t){if(!c)throw g(h);if("object"!=typeof t)throw g(h);if("string"!=typeof t.type)throw g(h);if("string"!=typeof t.asymmetricKeyType)throw g(h);if("function"!=typeof t.export)throw g(h)}}function f(t){if(!i.isBuffer(t)&&"string"!=typeof t&&"object"!=typeof t)throw g("key must be a string, a buffer or an object")}function p(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function d(t){var e=4-(t=t.toString()).length%4;if(4!==e)for(var r=0;r-1&&t%1==0&&t-1&&t%1==0&&t<=r}(t.length)&&!function(t){var e=w(t)?d.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)}function w(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function C(t){return!!t&&"object"==typeof t}t.exports=function(t,r,o,c){var l;t=b(t)?t:(l=t)?function(t,e){return function(t,e){for(var r=-1,n=t?t.length:0,i=Array(n);++r-1:!!E&&function(t,e,r){if(e!=e)return function(t,e,r){for(var n=t.length,i=r+-1;++i-1}},87914(t){var e=Object.prototype.toString;t.exports=function(t){return!0===t||!1===t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Boolean]"==e.call(t)}},58928(t){var e=1/0,r=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,o=Object.prototype.toString;function u(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=function(t){return"number"==typeof t&&t==function(t){var h=function(t){return t?(t=function(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==o.call(t)}(t))return NaN;if(u(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=u(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(r,"");var h=i.test(t);return h||a.test(t)?s(t.slice(2),h?2:8):n.test(t)?NaN:+t}(t))===e||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}(t),c=h%1;return h==h?c?h-c:h:0}(t)}},73639(t){var e=Object.prototype.toString;t.exports=function(t){return"number"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Number]"==e.call(t)}},79001(t){var e,r,n=Function.prototype,i=Object.prototype,a=n.toString,s=i.hasOwnProperty,o=a.call(Object),u=i.toString,h=(e=Object.getPrototypeOf,r=Object,function(t){return e(r(t))});t.exports=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=u.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=h(t);if(null===e)return!0;var r=s.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&a.call(r)==o}},45931(t){var e=Object.prototype.toString,r=Array.isArray;t.exports=function(t){return"string"==typeof t||!r(t)&&function(t){return!!t&&"object"==typeof t}(t)&&"[object String]"==e.call(t)}},67083(t){var e=1/0,r=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,o=Object.prototype.toString;function u(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=function(t){return function(t,h){var c;if("function"!=typeof h)throw new TypeError("Expected a function");return t=function(t){var h=function(t){return t?(t=function(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==o.call(t)}(t))return NaN;if(u(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=u(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(r,"");var h=i.test(t);return h||a.test(t)?s(t.slice(2),h?2:8):n.test(t)?NaN:+t}(t))===e||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}(t),c=h%1;return h==h?c?h-c:h:0}(t),function(){return--t>0&&(c=h.apply(this,arguments)),t<=1&&(h=void 0),c}}(2,t)}},73065(t,e,r){var n,i;!function(){"use strict";n=function(){var t=function(){},e="undefined",r=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],i={},a=null;function s(t,e){var r=t[e];if("function"==typeof r.bind)return r.bind(t);try{return Function.prototype.bind.call(r,t)}catch(e){return function(){return Function.prototype.apply.apply(r,[t,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(){for(var r=this.getLevel(),i=0;i=0&&e<=l.levels.SILENT)return e;throw new TypeError("log.setLevel() called with invalid level: "+t)}"string"==typeof t?f+=":"+t:"symbol"==typeof t&&(f=void 0),l.name=t,l.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},l.methodFactory=r||c,l.getLevel=function(){return null!=h?h:null!=o?o:s},l.setLevel=function(t,r){return h=d(t),!1!==r&&function(t){var r=(n[t]||"silent").toUpperCase();if(typeof window!==e&&f){try{return void(window.localStorage[f]=r)}catch(t){}try{window.document.cookie=encodeURIComponent(f)+"="+r+";"}catch(t){}}}(h),u.call(l)},l.setDefaultLevel=function(t){o=d(t),p()||l.setLevel(t,!1)},l.resetLevel=function(){h=null,function(){if(typeof window!==e&&f){try{window.localStorage.removeItem(f)}catch(t){}try{window.document.cookie=encodeURIComponent(f)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(t){}}}(),u.call(l)},l.enableAll=function(t){l.setLevel(l.levels.TRACE,t)},l.disableAll=function(t){l.setLevel(l.levels.SILENT,t)},l.rebuild=function(){if(a!==l&&(s=d(a.getLevel())),u.call(l),a===l)for(var t in i)i[t].rebuild()},s=d(a?a.getLevel():"WARN");var g=p();null!=g&&(h=d(g)),u.call(l)}(a=new l).getLogger=function(t){if("symbol"!=typeof t&&"string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=i[t];return e||(e=i[t]=new l(t,a.methodFactory)),e};var f=typeof window!==e?window.log:void 0;return a.noConflict=function(){return typeof window!==e&&window.log===a&&(window.log=f),a},a.getLoggers=function(){return i},a.default=a,a},void 0===(i=n.call(e,r,e,t))||(t.exports=i)}()},71514(t){"use strict";t.exports=Math.abs},58968(t){"use strict";t.exports=Math.floor},94459(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},6188(t){"use strict";t.exports=Math.max},68002(t){"use strict";t.exports=Math.min},75880(t){"use strict";t.exports=Math.pow},70414(t){"use strict";t.exports=Math.round},73093(t,e,r){"use strict";var n=r(94459);t.exports=function(t){return n(t)||0===t?t:t<0?-1:1}},88276(t,e,r){"use strict";var n=r(56698),i=r(4729),a=r(92861).Buffer,s=new Array(16);function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<>>32-e}function h(t,e,r,n,i,a,s){return u(t+(e&r|~e&n)+i+a|0,s)+e|0}function c(t,e,r,n,i,a,s){return u(t+(e&n|r&~n)+i+a|0,s)+e|0}function l(t,e,r,n,i,a,s){return u(t+(e^r^n)+i+a|0,s)+e|0}function f(t,e,r,n,i,a,s){return u(t+(r^(e|~n))+i+a|0,s)+e|0}n(o,i),o.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,a=this._d;r=h(r,n,i,a,t[0],3614090360,7),a=h(a,r,n,i,t[1],3905402710,12),i=h(i,a,r,n,t[2],606105819,17),n=h(n,i,a,r,t[3],3250441966,22),r=h(r,n,i,a,t[4],4118548399,7),a=h(a,r,n,i,t[5],1200080426,12),i=h(i,a,r,n,t[6],2821735955,17),n=h(n,i,a,r,t[7],4249261313,22),r=h(r,n,i,a,t[8],1770035416,7),a=h(a,r,n,i,t[9],2336552879,12),i=h(i,a,r,n,t[10],4294925233,17),n=h(n,i,a,r,t[11],2304563134,22),r=h(r,n,i,a,t[12],1804603682,7),a=h(a,r,n,i,t[13],4254626195,12),i=h(i,a,r,n,t[14],2792965006,17),r=c(r,n=h(n,i,a,r,t[15],1236535329,22),i,a,t[1],4129170786,5),a=c(a,r,n,i,t[6],3225465664,9),i=c(i,a,r,n,t[11],643717713,14),n=c(n,i,a,r,t[0],3921069994,20),r=c(r,n,i,a,t[5],3593408605,5),a=c(a,r,n,i,t[10],38016083,9),i=c(i,a,r,n,t[15],3634488961,14),n=c(n,i,a,r,t[4],3889429448,20),r=c(r,n,i,a,t[9],568446438,5),a=c(a,r,n,i,t[14],3275163606,9),i=c(i,a,r,n,t[3],4107603335,14),n=c(n,i,a,r,t[8],1163531501,20),r=c(r,n,i,a,t[13],2850285829,5),a=c(a,r,n,i,t[2],4243563512,9),i=c(i,a,r,n,t[7],1735328473,14),r=l(r,n=c(n,i,a,r,t[12],2368359562,20),i,a,t[5],4294588738,4),a=l(a,r,n,i,t[8],2272392833,11),i=l(i,a,r,n,t[11],1839030562,16),n=l(n,i,a,r,t[14],4259657740,23),r=l(r,n,i,a,t[1],2763975236,4),a=l(a,r,n,i,t[4],1272893353,11),i=l(i,a,r,n,t[7],4139469664,16),n=l(n,i,a,r,t[10],3200236656,23),r=l(r,n,i,a,t[13],681279174,4),a=l(a,r,n,i,t[0],3936430074,11),i=l(i,a,r,n,t[3],3572445317,16),n=l(n,i,a,r,t[6],76029189,23),r=l(r,n,i,a,t[9],3654602809,4),a=l(a,r,n,i,t[12],3873151461,11),i=l(i,a,r,n,t[15],530742520,16),r=f(r,n=l(n,i,a,r,t[2],3299628645,23),i,a,t[0],4096336452,6),a=f(a,r,n,i,t[7],1126891415,10),i=f(i,a,r,n,t[14],2878612391,15),n=f(n,i,a,r,t[5],4237533241,21),r=f(r,n,i,a,t[12],1700485571,6),a=f(a,r,n,i,t[3],2399980690,10),i=f(i,a,r,n,t[10],4293915773,15),n=f(n,i,a,r,t[1],2240044497,21),r=f(r,n,i,a,t[8],1873313359,6),a=f(a,r,n,i,t[15],4264355552,10),i=f(i,a,r,n,t[6],2734768916,15),n=f(n,i,a,r,t[13],1309151649,21),r=f(r,n,i,a,t[4],4149444226,6),a=f(a,r,n,i,t[11],3174756917,10),i=f(i,a,r,n,t[2],718787259,15),n=f(n,i,a,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+a|0},o.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 t=a.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=o},52244(t,e,r){var n=r(61158),i=r(15037);function a(t){this.rand=t||new i.Rand}t.exports=a,a.create=function(t){return new a(t)},a.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(t)>=0);return i},a.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},a.prototype.test=function(t,e,r){var i=t.bitLength(),a=n.mont(t),s=new n(1).toRed(a);e||(e=Math.max(1,i/48|0));for(var o=t.subn(1),u=0;!o.testn(u);u++);for(var h=t.shrn(u),c=o.toRed(a);e>0;e--){var l=this._randrange(new n(2),o);r&&r(l);var f=l.toRed(a).redPow(h);if(0!==f.cmp(s)&&0!==f.cmp(c)){for(var p=1;p0;e--){var c=this._randrange(new n(2),s),l=t.gcd(c);if(0!==l.cmpn(1))return l;var f=c.toRed(i).redPow(u);if(0!==f.cmp(a)&&0!==f.cmp(h)){for(var p=1;p=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=o(t,r);return r-1>=e&&(n|=o(t,r-1)<<4),n}function h(t,e,r,n){for(var i=0,a=Math.min(t.length,r),s=e;s=49?o-49+10:o>=17?o-17+10:o}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,s=a%n,o=Math.min(a,a-s)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var c=["","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],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],s=i*a,o=67108863&s,u=s/67108864|0;r.words[0]=o;for(var h=1;h>>26,l=67108863&u,f=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);p<=f;p++){var d=h-p|0;c+=(s=(i=0|t.words[d])*(a=0|e.words[p])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,a=0,s=0;s>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?c[6-u.length]+u+r:u+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],p=f[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var s,o,u="le"===e,h=new t(a),c=this.clone();if(u){for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),h[o]=s;for(;o=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var a=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==a&&s>26,this.words[s]=67108863&e;if(0===a&&s>>13,p=0|s[1],d=8191&p,g=p>>>13,m=0|s[2],y=8191&m,A=m>>>13,v=0|s[3],b=8191&v,w=v>>>13,C=0|s[4],E=8191&C,S=C>>>13,I=0|s[5],B=8191&I,_=I>>>13,M=0|s[6],x=8191&M,T=M>>>13,R=0|s[7],F=8191&R,D=R>>>13,k=0|s[8],L=8191&k,N=k>>>13,H=0|s[9],P=8191&H,U=H>>>13,O=0|o[0],Q=8191&O,j=O>>>13,K=0|o[1],G=8191&K,V=K>>>13,q=0|o[2],W=8191&q,z=q>>>13,Y=0|o[3],J=8191&Y,X=Y>>>13,Z=0|o[4],$=8191&Z,tt=Z>>>13,et=0|o[5],rt=8191&et,nt=et>>>13,it=0|o[6],at=8191&it,st=it>>>13,ot=0|o[7],ut=8191&ot,ht=ot>>>13,ct=0|o[8],lt=8191&ct,ft=ct>>>13,pt=0|o[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(h+(n=Math.imul(l,Q))|0)+((8191&(i=(i=Math.imul(l,j))+Math.imul(f,Q)|0))<<13)|0;h=((a=Math.imul(f,j))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(d,Q),i=(i=Math.imul(d,j))+Math.imul(g,Q)|0,a=Math.imul(g,j);var yt=(h+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(f,G)|0))<<13)|0;h=((a=a+Math.imul(f,V)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,j))+Math.imul(A,Q)|0,a=Math.imul(A,j),n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(g,G)|0,a=a+Math.imul(g,V)|0;var At=(h+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,z)|0)+Math.imul(f,W)|0))<<13)|0;h=((a=a+Math.imul(f,z)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(b,Q),i=(i=Math.imul(b,j))+Math.imul(w,Q)|0,a=Math.imul(w,j),n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,V)|0)+Math.imul(A,G)|0,a=a+Math.imul(A,V)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,z)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,z)|0;var vt=(h+(n=n+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(f,J)|0))<<13)|0;h=((a=a+Math.imul(f,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,j))+Math.imul(S,Q)|0,a=Math.imul(S,j),n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,V)|0)+Math.imul(w,G)|0,a=a+Math.imul(w,V)|0,n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,z)|0)+Math.imul(A,W)|0,a=a+Math.imul(A,z)|0,n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,X)|0;var bt=(h+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(f,$)|0))<<13)|0;h=((a=a+Math.imul(f,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,j))+Math.imul(_,Q)|0,a=Math.imul(_,j),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(S,G)|0,a=a+Math.imul(S,V)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,z)|0)+Math.imul(w,W)|0,a=a+Math.imul(w,z)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(A,J)|0,a=a+Math.imul(A,X)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,$)|0,a=a+Math.imul(g,tt)|0;var wt=(h+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(f,rt)|0))<<13)|0;h=((a=a+Math.imul(f,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,j))+Math.imul(T,Q)|0,a=Math.imul(T,j),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,V)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,z)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,z)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(w,J)|0,a=a+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,a=a+Math.imul(g,nt)|0;var Ct=(h+(n=n+Math.imul(l,at)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(f,at)|0))<<13)|0;h=((a=a+Math.imul(f,st)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,j))+Math.imul(D,Q)|0,a=Math.imul(D,j),n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(T,G)|0,a=a+Math.imul(T,V)|0,n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,z)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,z)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(A,rt)|0,a=a+Math.imul(A,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,st)|0;var Et=(h+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(f,ut)|0))<<13)|0;h=((a=a+Math.imul(f,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,j))+Math.imul(N,Q)|0,a=Math.imul(N,j),n=n+Math.imul(F,G)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(D,G)|0,a=a+Math.imul(D,V)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,z)|0)+Math.imul(T,W)|0,a=a+Math.imul(T,z)|0,n=n+Math.imul(B,J)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(w,rt)|0,a=a+Math.imul(w,nt)|0,n=n+Math.imul(y,at)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(A,at)|0,a=a+Math.imul(A,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(g,ut)|0,a=a+Math.imul(g,ht)|0;var St=(h+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ft)|0)+Math.imul(f,lt)|0))<<13)|0;h=((a=a+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(P,Q),i=(i=Math.imul(P,j))+Math.imul(U,Q)|0,a=Math.imul(U,j),n=n+Math.imul(L,G)|0,i=(i=i+Math.imul(L,V)|0)+Math.imul(N,G)|0,a=a+Math.imul(N,V)|0,n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,z)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,z)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(T,J)|0,a=a+Math.imul(T,X)|0,n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(w,at)|0,a=a+Math.imul(w,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(A,ut)|0,a=a+Math.imul(A,ht)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(g,lt)|0,a=a+Math.imul(g,ft)|0;var It=(h+(n=n+Math.imul(l,dt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(f,dt)|0))<<13)|0;h=((a=a+Math.imul(f,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(P,G),i=(i=Math.imul(P,V))+Math.imul(U,G)|0,a=Math.imul(U,V),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,z)|0)+Math.imul(N,W)|0,a=a+Math.imul(N,z)|0,n=n+Math.imul(F,J)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(E,at)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,st)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(w,ut)|0,a=a+Math.imul(w,ht)|0,n=n+Math.imul(y,lt)|0,i=(i=i+Math.imul(y,ft)|0)+Math.imul(A,lt)|0,a=a+Math.imul(A,ft)|0;var Bt=(h+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;h=((a=a+Math.imul(g,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(P,W),i=(i=Math.imul(P,z))+Math.imul(U,W)|0,a=Math.imul(U,z),n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,J)|0,a=a+Math.imul(N,X)|0,n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,nt)|0,n=n+Math.imul(B,at)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(S,ut)|0,a=a+Math.imul(S,ht)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(w,lt)|0,a=a+Math.imul(w,ft)|0;var _t=(h+(n=n+Math.imul(y,dt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(A,dt)|0))<<13)|0;h=((a=a+Math.imul(A,gt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(P,J),i=(i=Math.imul(P,X))+Math.imul(U,J)|0,a=Math.imul(U,X),n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,$)|0,a=a+Math.imul(N,tt)|0,n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(D,rt)|0,a=a+Math.imul(D,nt)|0,n=n+Math.imul(x,at)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(_,ut)|0,a=a+Math.imul(_,ht)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ft)|0;var Mt=(h+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(w,dt)|0))<<13)|0;h=((a=a+Math.imul(w,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(P,$),i=(i=Math.imul(P,tt))+Math.imul(U,$)|0,a=Math.imul(U,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,a=a+Math.imul(N,nt)|0,n=n+Math.imul(F,at)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(T,ut)|0,a=a+Math.imul(T,ht)|0,n=n+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,ft)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ft)|0;var xt=(h+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(S,dt)|0))<<13)|0;h=((a=a+Math.imul(S,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(P,rt),i=(i=Math.imul(P,nt))+Math.imul(U,rt)|0,a=Math.imul(U,nt),n=n+Math.imul(L,at)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(N,at)|0,a=a+Math.imul(N,st)|0,n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ht)|0)+Math.imul(D,ut)|0,a=a+Math.imul(D,ht)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ft)|0;var Tt=(h+(n=n+Math.imul(B,dt)|0)|0)+((8191&(i=(i=i+Math.imul(B,gt)|0)+Math.imul(_,dt)|0))<<13)|0;h=((a=a+Math.imul(_,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(P,at),i=(i=Math.imul(P,st))+Math.imul(U,at)|0,a=Math.imul(U,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,ut)|0,a=a+Math.imul(N,ht)|0,n=n+Math.imul(F,lt)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(D,lt)|0,a=a+Math.imul(D,ft)|0;var Rt=(h+(n=n+Math.imul(x,dt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(T,dt)|0))<<13)|0;h=((a=a+Math.imul(T,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(P,ut),i=(i=Math.imul(P,ht))+Math.imul(U,ut)|0,a=Math.imul(U,ht),n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ft)|0)+Math.imul(N,lt)|0,a=a+Math.imul(N,ft)|0;var Ft=(h+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,gt)|0)+Math.imul(D,dt)|0))<<13)|0;h=((a=a+Math.imul(D,gt)|0)+(i>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,n=Math.imul(P,lt),i=(i=Math.imul(P,ft))+Math.imul(U,lt)|0,a=Math.imul(U,ft);var Dt=(h+(n=n+Math.imul(L,dt)|0)|0)+((8191&(i=(i=i+Math.imul(L,gt)|0)+Math.imul(N,dt)|0))<<13)|0;h=((a=a+Math.imul(N,gt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var kt=(h+(n=Math.imul(P,dt))|0)+((8191&(i=(i=Math.imul(P,gt))+Math.imul(U,dt)|0))<<13)|0;return h=((a=Math.imul(U,gt))+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,u[0]=mt,u[1]=yt,u[2]=At,u[3]=vt,u[4]=bt,u[5]=wt,u[6]=Ct,u[7]=Et,u[8]=St,u[9]=It,u[10]=Bt,u[11]=_t,u[12]=Mt,u[13]=xt,u[14]=Tt,u[15]=Rt,u[16]=Ft,u[17]=Dt,u[18]=kt,0!==h&&(u[19]=h,r.length++),r};function g(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=p),a.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?p(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,s&=67108863}r.words[a]=o,n=s,s=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):g(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},m.prototype.permute=function(t,e,r,n,i,a){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this.length=0===t?1:this.length,this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,h=0;h=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-a|l>>>a,c=l&o}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=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},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===o)return this.strip();for(n(-1===o),o=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var o,u=n.length-i.length;if("mod"!==e){(o=new a(null)).length=u+1,o.words=new Array(o.length);for(var h=0;h=0;l--){var f=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,l);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);o&&(o.words[l]=f)}return o&&o.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:o||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(i=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(i=o.div.neg()),{div:i,mod:o.mod}):0!==(this.negative&t.negative)?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),s=new a(0),o=new a(0),u=new a(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),l=e.clone();!e.isZero();){for(var f=0,p=1;0===(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0===(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(c),u.isub(l)),o.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(o),s.isub(u)):(r.isub(e),o.isub(i),u.isub(s))}return{a:o,b:u,gcd:r.iushln(h)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new a(1),o=new a(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0===(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,f=1;0===(r.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(i=0===e.cmpn(1)?s:o).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new E(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function A(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}A.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},A.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(t,e){t.iushrn(this.n,0,e)},A.prototype.imulK=function(t){return t.imul(this.k)},i(v,A),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,a=s}a>>>=22,t.words[i-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new b;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new C}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var o=new a(1).toRed(this),u=o.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(o);){for(var g=p,m=0;0!==g.cmp(o);m++)g=g.redSqr();n(m=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var l=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++o||0===n&&0===c)&&(i=this.mul(i,r[s]),o=0,s=0)):o=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new S(t)},i(S,E),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},43349(t){function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},64367(t,e){"use strict";var r=e;function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r>8,s=255&i;a?r.push(a,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}},6585(t){var e=1e3,r=60*e,n=60*r,i=24*n,a=7*i;function s(t,e,r,n){var i=e>=1.5*r;return Math.round(t/r)+" "+n+(i?"s":"")}t.exports=function(t,o){o=o||{};var u,h,c=typeof t;if("string"===c&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(s){var o=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return o*a;case"days":case"day":case"d":return o*i;case"hours":case"hour":case"hrs":case"hr":case"h":return o*n;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(t);if("number"===c&&isFinite(t))return o.long?(u=t,(h=Math.abs(u))>=i?s(u,h,i,"day"):h>=n?s(u,h,n,"hour"):h>=r?s(u,h,r,"minute"):h>=e?s(u,h,e,"second"):u+" ms"):function(t){var a=Math.abs(t);return a>=i?Math.round(t/i)+"d":a>=n?Math.round(t/n)+"h":a>=r?Math.round(t/r)+"m":a>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},92872(t,e){var r,n;r=function(){var t={};return _hash=function(){function t(t){var e,r=t.length,n=[];for(e=0;e>24&255),n.push(t[e][0]>>16&255),n.push(t[e][0]>>8&255),n.push(255&t[e][0]),n.push(t[e][1]>>24&255),n.push(t[e][1]>>16&255),n.push(t[e][1]>>8&255),n.push(255&t[e][1]);return n}function r(t,e){return[t[0]^e[0],t[1]^e[1]]}function n(t,e){return[t[0]&e[0],t[1]&e[1]]}function i(t,e){var r=0|t[0],n=0|t[1];return e>=32?[n<>>32-e,n<=32?[0,r>>>e-32]:[r>>>e,r<<32-e|n>>>e]}function s(s,o,u,h){var c,l,f,p,d,g,m,y,A,v,b,w,C,E,S;for(c=512,l=128,f=s,p=o,d=u.slice(0,64),g=d.length;d.length<64;)d.push(0);function I(t,e,s,o,u){var h;return h=[(255&A)<<24|s/Math.pow(2,32)&16777215,4294967295&s],function(t){var e,s,o,u,h=[].concat(v),c=[].concat(t);for(s=0,e=89;s>12,(4095&o)<<20|(255&g)<<12|4095&f]],e,t))}function B(r){var n,i,a,s,o=0,u=[],h=[];for(s=r.length>c?0:1;r.length<1||r.length%c>0;)r.push(0),o+=8;for(r=t(r);r.length>0;)u.push(r.slice(0,64)),r=r.slice(64);for(n=0,a=0,i=u.length;n0;)r.push(0),o+=8;for(r=t(r);r.length>0;)u.push(r.slice(0,48)),r=r.slice(48);for(n=0,a=0,i=u.length;ny?_(p):B(p)}while(p.length!==l);return function(t,e,r){var n=Math.floor((t+7)/8),i=t%8;return e=r?e.slice(e.length-n):e.slice(0,n),i>0&&(e[n-1]&=255<<8-i&255),e}(f,p,!0)}function o(t){var e,r,n=[];for(e=0;e>6|192),n.push(63&r|128)):r<=65535?(n.push(r>>12|224),n.push(r>>6&63|128),n.push(63&r|128)):(n.push(r>>18|240),n.push(r>>12&63|128),n.push(r>>6&63|128),n.push(63&r|128));return n}function u(t,e,r,n){return void 0===t&&(t=""),void 0===e&&(e=256),void 0===r&&(r=""),void 0===n&&(n=64),e<=0?e=1:e>512&&(e=512),s(e,t=o(t),r=o(r),n)}return{hex:function(t,e,r,n){var i,a=u(t,e,r,n),s="";for(i=0;i>n&1))%2;t[e]|=1&r}return t},t.exports.expandkey=function(t){var e=new n(8);return e[0]=254&t[0],e[1]=t[0]<<7&255|t[1]>>1,e[2]=t[1]<<6&255|t[2]>>2,e[3]=t[2]<<5&255|t[3]>>3,e[4]=t[3]<<4&255|t[4]>>4,e[5]=t[4]<<3&255|t[5]>>5,e[6]=t[5]<<2&255|t[6]>>6,e[7]=t[6]<<1&255,e},t.exports.bintohex=function(t){var e=n.isBuffer(e)?e:new n(t,"binary");return i(e.toString("hex").toUpperCase(),32)}},78627(t,e,r){var n=r(48287).Buffer,i=(console.log,r(91565)),a=r(59491),s=r(48770).lmhashbuf,o=r(48770).nthashbuf;function u(t,e){for(var r=new n(24),s=0;s<3;s++){var o=a.oddpar(a.expandkey(t.slice(7*s,7*s+7))),u=i.createCipheriv("DES-ECB",o,"").update(e.toString("binary"),"binary","binary");r.write(u,8*s,8*s+8,"binary")}return r}e.encodeType1=function(t,e){t=t.toUpperCase(),e=e.toUpperCase();var r=n.byteLength(t,"ascii"),i=n.byteLength(e,"ascii"),a=0,s=new n(32+r+i);s.write("NTLMSSP",a,7,"ascii"),a+=7,s.writeUInt8(0,a),a++,s.writeUInt8(1,a),a++,s.fill(0,a,a+3),a+=3,s.writeUInt16LE(45571,a),a+=2,s.fill(0,a,a+2),a+=2,s.writeUInt16LE(i,a),a+=2,s.writeUInt16LE(i,a),a+=2;var o=32+r;return s.writeUInt16LE(o,a),a+=2,s.fill(0,a,a+2),a+=2,s.writeUInt16LE(r,a),a+=2,s.writeUInt16LE(r,a),a+=2,s.writeUInt16LE(32,a),a+=2,s.fill(0,a,a+2),a+=2,s.write(t,32,r,"ascii"),s.write(e,o,i,"ascii"),s},e.decodeType2=function(t){var e=t.toString("ascii",0,7);if(0!==t[7]||"NTLMSSP"!==e)throw new Error("magic was not NTLMSSP");if(2!==t.readUInt8(8))throw new Error("message was not NTLMSSP type 0x02");return t.slice(24,32)},e.encodeType3=function(t,e,r,i,a){e=e.toUpperCase(),r=r.toUpperCase();var h=new n(21);s(a).copy(h),h.fill(0,16);var c=new n(21);o(a).copy(c),c.fill(0,16);var l=u(h,i),f=u(c,i),p=n.byteLength(t,"ucs2"),d=n.byteLength(e,"ucs2"),g=n.byteLength(r,"ucs2"),m=64+g,y=m+p,A=y+d,v=A+24,b=0,w=64+g+p+d+24+24,C=new n(w);return C.write("NTLMSSP",b,7,"ascii"),b+=7,C.writeUInt8(0,b),b++,C.writeUInt8(3,b),b++,C.fill(0,b,b+3),b+=3,C.writeUInt16LE(24,b),b+=2,C.writeUInt16LE(24,b),b+=2,C.writeUInt16LE(A,b),b+=2,C.fill(0,b,b+2),b+=2,C.writeUInt16LE(24,b),b+=2,C.writeUInt16LE(24,b),b+=2,C.writeUInt16LE(v,b),b+=2,C.fill(0,b,b+2),b+=2,C.writeUInt16LE(g,b),b+=2,C.writeUInt16LE(g,b),b+=2,C.writeUInt16LE(64,b),b+=2,C.fill(0,b,b+2),b+=2,C.writeUInt16LE(p,b),b+=2,C.writeUInt16LE(p,b),b+=2,C.writeUInt16LE(m,b),b+=2,C.fill(0,b,b+2),b+=2,C.writeUInt16LE(d,b),b+=2,C.writeUInt16LE(d,b),b+=2,C.writeUInt16LE(y,b),b+=2,C.fill(0,b,b+6),b+=6,C.writeUInt16LE(w,b),b+=2,C.fill(0,b,b+2),b+=2,C.writeUInt16LE(33281,b),b+=2,C.fill(0,b,b+2),b+=2,C.write(r,64,g,"ucs2"),C.write(t,m,p,"ucs2"),C.write(e,y,d,"ucs2"),l.copy(C,A,0,24),f.copy(C,v,0,24),C},e.challengeHeader=function(t,r){return"NTLM "+e.encodeType1(t,r).toString("base64")},e.responseHeader=function(t,i,a,s,o){var u=new n((t.headers["www-authenticate"].match(/^NTLM\s+(.+?)(,|\s+|$)/)||[])[1],"base64"),h=r(88835).parse(i).hostname;return"NTLM "+e.encodeType3(s,h,a,e.decodeType2(u),o).toString("base64")},e.smbhash=r(48770)},48770(t,e,r){var n=r(48287).Buffer,i=r(91565),a=r(59491);function s(t){var e=t.substring(0,14).toUpperCase(),r=n.byteLength(e,"ascii"),s=new n(14);s.write(e,0,r,"ascii"),s.fill(0,r);var o=[a.oddpar(a.expandkey(s.slice(0,7))),a.oddpar(a.expandkey(s.slice(7,14)))],u=new n(16),h=0;return o.forEach(function(t){var e=i.createCipheriv("DES-ECB",t,"").update("KGS!@#$%","binary","binary");u.write(e,h,h+8,"binary"),h+=8}),u}function o(t){var e=new n(t,"ucs2"),r=i.createHash("md4");return r.update(e),new n(r.digest("binary"),"binary")}t.exports.nthashbuf=o,t.exports.lmhashbuf=s,t.exports.nthash=function(t){return a.bintohex(o(t))},t.exports.lmhash=function(t){return a.bintohex(s(t))}},58859(t,e,r){var n="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=n&&i&&"function"==typeof i.get?i.get:null,s=n&&Map.prototype.forEach,o="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,h=o&&u&&"function"==typeof u.get?u.get:null,c=o&&Set.prototype.forEach,l="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,g=Object.prototype.toString,m=Function.prototype.toString,y=String.prototype.match,A=String.prototype.slice,v=String.prototype.replace,b=String.prototype.toUpperCase,w=String.prototype.toLowerCase,C=RegExp.prototype.test,E=Array.prototype.concat,S=Array.prototype.join,I=Array.prototype.slice,B=Math.floor,_="function"==typeof BigInt?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,T="function"==typeof Symbol&&"object"==typeof Symbol.iterator,R="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,F=Object.prototype.propertyIsEnumerable,D=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function k(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||C.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-B(-t):B(t);if(n!==t){var i=String(n),a=A.call(e,i.length+1);return v.call(i,r,"$&_")+"."+v.call(v.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var L=r(42634),N=L.custom,H=G(N)?N:null,P={__proto__:null,double:'"',single:"'"},U={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function O(t,e,r){var n=r.quoteStyle||e,i=P[n];return i+t+i}function Q(t){return v.call(String(t),/"/g,""")}function j(t){return!("[object Array]"!==W(t)||R&&"object"==typeof t&&R in t)}function K(t){return!("[object RegExp]"!==W(t)||R&&"object"==typeof t&&R in t)}function G(t){if(T)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!x)return!1;try{return x.call(t),!0}catch(t){}return!1}t.exports=function t(e,n,i,o){var u=n||{};if(q(u,"quoteStyle")&&!q(P,u.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(u,"maxStringLength")&&("number"==typeof u.maxStringLength?u.maxStringLength<0&&u.maxStringLength!==1/0:null!==u.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=!q(u,"customInspect")||u.customInspect;if("boolean"!=typeof g&&"symbol"!==g)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(u,"indent")&&null!==u.indent&&"\t"!==u.indent&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(u,"numericSeparator")&&"boolean"!=typeof u.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=u.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return Y(e,u);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var C=String(e);return b?k(e,C):C}if("bigint"==typeof e){var B=String(e)+"n";return b?k(e,B):B}var M=void 0===u.depth?5:u.depth;if(void 0===i&&(i=0),i>=M&&M>0&&"object"==typeof e)return j(e)?"[Array]":"[Object]";var N,U=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=S.call(Array(t.indent+1)," ")}return{base:r,prev:S.call(Array(e+1),r)}}(u,i);if(void 0===o)o=[];else if(z(o,e)>=0)return"[Circular]";function V(e,r,n){if(r&&(o=I.call(o)).push(r),n){var a={depth:u.depth};return q(u,"quoteStyle")&&(a.quoteStyle=u.quoteStyle),t(e,a,i+1,o)}return t(e,u,i+1,o)}if("function"==typeof e&&!K(e)){var J=function(t){if(t.name)return t.name;var e=y.call(m.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),rt=et(e,V);return"[Function"+(J?": "+J:" (anonymous)")+"]"+(rt.length>0?" { "+S.call(rt,", ")+" }":"")}if(G(e)){var nt=T?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):x.call(e);return"object"!=typeof e||T?nt:X(nt)}if((N=e)&&"object"==typeof N&&("undefined"!=typeof HTMLElement&&N instanceof HTMLElement||"string"==typeof N.nodeName&&"function"==typeof N.getAttribute)){for(var it="<"+w.call(String(e.nodeName)),at=e.attributes||[],st=0;st"}if(j(e)){if(0===e.length)return"[]";var ot=et(e,V);return U&&!function(t){for(var e=0;e=0)return!1;return!0}(ot)?"["+tt(ot,U)+"]":"[ "+S.call(ot,", ")+" ]"}if(function(t){return!("[object Error]"!==W(t)||R&&"object"==typeof t&&R in t)}(e)){var ut=et(e,V);return"cause"in Error.prototype||!("cause"in e)||F.call(e,"cause")?0===ut.length?"["+String(e)+"]":"{ ["+String(e)+"] "+S.call(ut,", ")+" }":"{ ["+String(e)+"] "+S.call(E.call("[cause]: "+V(e.cause),ut),", ")+" }"}if("object"==typeof e&&g){if(H&&"function"==typeof e[H]&&L)return L(e,{depth:M-i});if("symbol"!==g&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!a||!t||"object"!=typeof t)return!1;try{a.call(t);try{h.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var ht=[];return s&&s.call(e,function(t,r){ht.push(V(r,e,!0)+" => "+V(t,e))}),$("Map",a.call(e),ht,U)}if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{h.call(t);try{a.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ct=[];return c&&c.call(e,function(t){ct.push(V(t,e))}),$("Set",h.call(e),ct,U)}if(function(t){if(!l||!t||"object"!=typeof t)return!1;try{l.call(t,l);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Z("WeakMap");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{l.call(t,l)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Z("WeakSet");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{return p.call(t),!0}catch(t){}return!1}(e))return Z("WeakRef");if(function(t){return!("[object Number]"!==W(t)||R&&"object"==typeof t&&R in t)}(e))return X(V(Number(e)));if(function(t){if(!t||"object"!=typeof t||!_)return!1;try{return _.call(t),!0}catch(t){}return!1}(e))return X(V(_.call(e)));if(function(t){return!("[object Boolean]"!==W(t)||R&&"object"==typeof t&&R in t)}(e))return X(d.call(e));if(function(t){return!("[object String]"!==W(t)||R&&"object"==typeof t&&R in t)}(e))return X(V(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==r.g&&e===r.g)return"{ [object globalThis] }";if(!function(t){return!("[object Date]"!==W(t)||R&&"object"==typeof t&&R in t)}(e)&&!K(e)){var lt=et(e,V),ft=D?D(e)===Object.prototype:e instanceof Object||e.constructor===Object,pt=e instanceof Object?"":"null prototype",dt=!ft&&R&&Object(e)===e&&R in e?A.call(W(e),8,-1):pt?"Object":"",gt=(ft||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(dt||pt?"["+S.call(E.call([],dt||[],pt||[]),": ")+"] ":"");return 0===lt.length?gt+"{}":U?gt+"{"+tt(lt,U)+"}":gt+"{ "+S.call(lt,", ")+" }"}return String(e)};var V=Object.prototype.hasOwnProperty||function(t){return t in this};function q(t,e){return V.call(t,e)}function W(t){return g.call(t)}function z(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Y(A.call(t,0,e.maxStringLength),e)+n}var i=U[e.quoteStyle||"single"];return i.lastIndex=0,O(v.call(v.call(t,i,"\\$1"),/[\x00-\x1f]/g,J),"single",e)}function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+b.call(e.toString(16))}function X(t){return"Object("+t+")"}function Z(t){return t+" { ? }"}function $(t,e,r,n){return t+" ("+e+") {"+(n?tt(r,n):S.call(r,", "))+"}"}function tt(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+S.call(t,","+r)+"\n"+e.prev}function et(t,e){var r=j(t),n=[];if(r){n.length=t.length;for(var i=0;i=0&&!t[n];n--);return 0===r&&n===e?t:r>n?[]:t.slice(r,n+1)}var u=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,h=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,c={};function l(t){var e=u.exec(t),r=(e[1]||"")+(e[2]||""),n=e[3]||"",i=h.exec(n);return[r,i[1],i[2],i[3]]}function f(t){var e=u.exec(t),r=e[1]||"",n=!!r&&":"!==r[1];return{device:r,isUnc:n,isAbsolute:n||!!e[2],tail:e[3]}}function p(t){return"\\\\"+t.replace(/^[\\\/]+/,"").replace(/[\\\/]+/g,"\\")}c.resolve=function(){for(var t="",e="",r=!1,i=arguments.length-1;i>=-1;i--){var o;if(i>=0?o=arguments[i]:t?(o=n.env["="+t])&&o.substr(0,3).toLowerCase()===t.toLowerCase()+"\\"||(o=t+"\\"):o=n.cwd(),!a.isString(o))throw new TypeError("Arguments to path.resolve must be strings");if(o){var u=f(o),h=u.device,c=u.isUnc,l=u.isAbsolute,d=u.tail;if((!h||!t||h.toLowerCase()===t.toLowerCase())&&(t||(t=h),r||(e=d+"\\"+e,r=l),t&&r))break}}return c&&(t=p(t)),t+(r?"\\":"")+(e=s(e.split(/[\\\/]+/),!r).join("\\"))||"."},c.normalize=function(t){var e=f(t),r=e.device,n=e.isUnc,i=e.isAbsolute,a=e.tail,o=/[\\\/]$/.test(a);return(a=s(a.split(/[\\\/]+/),!i).join("\\"))||i||(a="."),a&&o&&(a+="\\"),n&&(r=p(r)),r+(i?"\\":"")+a},c.isAbsolute=function(t){return f(t).isAbsolute},c.join=function(){for(var t=[],e=0;e=-1&&!e;r--){var i=r>=0?arguments[r]:n.cwd();if(!a.isString(i))throw new TypeError("Arguments to path.resolve must be strings");i&&(t=i+"/"+t,e="/"===i[0])}return(e?"/":"")+(t=s(t.split("/"),!e).join("/"))||"."},g.normalize=function(t){var e=g.isAbsolute(t),r=t&&"/"===t[t.length-1];return(t=s(t.split("/"),!e).join("/"))||e||(t="."),t&&r&&(t+="/"),(e?"/":"")+t},g.isAbsolute=function(t){return"/"===t.charAt(0)},g.join=function(){for(var t="",e=0;e=6?"utf-8":"binary":"utf-8",t.exports=n},64196(t){"use strict";var e=isFinite,r=Math.pow(2,30)-1;t.exports=function(t,n){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0||!e(t))throw new TypeError("Bad iterations");if("number"!=typeof n)throw new TypeError("Key length not a number");if(n<0||n>r||n!=n)throw new TypeError("Bad key length")}},21352(t,e,r){"use strict";var n=r(20320),i=r(66011),a=r(62802),s=r(92861).Buffer,o=r(64196),u=r(2455),h=r(93382),c=s.alloc(128),l={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},f={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function p(t){return(new i).update(t).digest()}function d(t,e,r){var i=function(t){return"rmd160"===t||"ripemd160"===t?p:"md5"===t?n:function(e){return a(t).update(e).digest()}}(t),o="sha512"===t||"sha384"===t?128:64;e.length>o?e=i(e):e.length1)for(var r=1;r=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=o(t,r);return r-1>=e&&(n|=o(t,r-1)<<4),n}function h(t,e,r,n){for(var i=0,a=Math.min(t.length,r),s=e;s=49?o-49+10:o>=17?o-17+10:o}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=s<>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-o&67108863,(o+=24)>=26&&(o-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=u(t,e,n)<=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(a-=18,s+=1,this.words[s]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,s=a%n,o=Math.min(a,a-s)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var c=["","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],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],s=i*a,o=67108863&s,u=s/67108864|0;r.words[0]=o;for(var h=1;h>>26,l=67108863&u,f=Math.min(h,e.length-1),p=Math.max(0,h-t.length+1);p<=f;p++){var d=h-p|0;c+=(s=(i=0|t.words[d])*(a=0|e.words[p])+l)/67108864|0,l=67108863&s}r.words[h]=0|l,u=0|c}return 0!==u?r.words[h]=0|u:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,a=0,s=0;s>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==a||s!==this.length-1?c[6-u.length]+u+r:u+r}for(0!==a&&(r=a.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],p=f[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var s,o,u="le"===e,h=new t(a),c=this.clone();if(u){for(o=0;!c.isZero();o++)s=c.andln(255),c.iushrn(8),h[o]=s;for(;o=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var a=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==a&&s>26,this.words[s]=67108863&e;if(0===a&&s>>13,p=0|s[1],d=8191&p,g=p>>>13,m=0|s[2],y=8191&m,A=m>>>13,v=0|s[3],b=8191&v,w=v>>>13,C=0|s[4],E=8191&C,S=C>>>13,I=0|s[5],B=8191&I,_=I>>>13,M=0|s[6],x=8191&M,T=M>>>13,R=0|s[7],F=8191&R,D=R>>>13,k=0|s[8],L=8191&k,N=k>>>13,H=0|s[9],P=8191&H,U=H>>>13,O=0|o[0],Q=8191&O,j=O>>>13,K=0|o[1],G=8191&K,V=K>>>13,q=0|o[2],W=8191&q,z=q>>>13,Y=0|o[3],J=8191&Y,X=Y>>>13,Z=0|o[4],$=8191&Z,tt=Z>>>13,et=0|o[5],rt=8191&et,nt=et>>>13,it=0|o[6],at=8191&it,st=it>>>13,ot=0|o[7],ut=8191&ot,ht=ot>>>13,ct=0|o[8],lt=8191&ct,ft=ct>>>13,pt=0|o[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(h+(n=Math.imul(l,Q))|0)+((8191&(i=(i=Math.imul(l,j))+Math.imul(f,Q)|0))<<13)|0;h=((a=Math.imul(f,j))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(d,Q),i=(i=Math.imul(d,j))+Math.imul(g,Q)|0,a=Math.imul(g,j);var yt=(h+(n=n+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,V)|0)+Math.imul(f,G)|0))<<13)|0;h=((a=a+Math.imul(f,V)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,Q),i=(i=Math.imul(y,j))+Math.imul(A,Q)|0,a=Math.imul(A,j),n=n+Math.imul(d,G)|0,i=(i=i+Math.imul(d,V)|0)+Math.imul(g,G)|0,a=a+Math.imul(g,V)|0;var At=(h+(n=n+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,z)|0)+Math.imul(f,W)|0))<<13)|0;h=((a=a+Math.imul(f,z)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(b,Q),i=(i=Math.imul(b,j))+Math.imul(w,Q)|0,a=Math.imul(w,j),n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,V)|0)+Math.imul(A,G)|0,a=a+Math.imul(A,V)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,z)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,z)|0;var vt=(h+(n=n+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(f,J)|0))<<13)|0;h=((a=a+Math.imul(f,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,Q),i=(i=Math.imul(E,j))+Math.imul(S,Q)|0,a=Math.imul(S,j),n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,V)|0)+Math.imul(w,G)|0,a=a+Math.imul(w,V)|0,n=n+Math.imul(y,W)|0,i=(i=i+Math.imul(y,z)|0)+Math.imul(A,W)|0,a=a+Math.imul(A,z)|0,n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,X)|0;var bt=(h+(n=n+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(f,$)|0))<<13)|0;h=((a=a+Math.imul(f,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,j))+Math.imul(_,Q)|0,a=Math.imul(_,j),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,V)|0)+Math.imul(S,G)|0,a=a+Math.imul(S,V)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,z)|0)+Math.imul(w,W)|0,a=a+Math.imul(w,z)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(A,J)|0,a=a+Math.imul(A,X)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,$)|0,a=a+Math.imul(g,tt)|0;var wt=(h+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(f,rt)|0))<<13)|0;h=((a=a+Math.imul(f,nt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,Q),i=(i=Math.imul(x,j))+Math.imul(T,Q)|0,a=Math.imul(T,j),n=n+Math.imul(B,G)|0,i=(i=i+Math.imul(B,V)|0)+Math.imul(_,G)|0,a=a+Math.imul(_,V)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,z)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,z)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(w,J)|0,a=a+Math.imul(w,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(A,$)|0,a=a+Math.imul(A,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,a=a+Math.imul(g,nt)|0;var Ct=(h+(n=n+Math.imul(l,at)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(f,at)|0))<<13)|0;h=((a=a+Math.imul(f,st)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,j))+Math.imul(D,Q)|0,a=Math.imul(D,j),n=n+Math.imul(x,G)|0,i=(i=i+Math.imul(x,V)|0)+Math.imul(T,G)|0,a=a+Math.imul(T,V)|0,n=n+Math.imul(B,W)|0,i=(i=i+Math.imul(B,z)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,z)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(w,$)|0,a=a+Math.imul(w,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(A,rt)|0,a=a+Math.imul(A,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,st)|0;var Et=(h+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(f,ut)|0))<<13)|0;h=((a=a+Math.imul(f,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,j))+Math.imul(N,Q)|0,a=Math.imul(N,j),n=n+Math.imul(F,G)|0,i=(i=i+Math.imul(F,V)|0)+Math.imul(D,G)|0,a=a+Math.imul(D,V)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,z)|0)+Math.imul(T,W)|0,a=a+Math.imul(T,z)|0,n=n+Math.imul(B,J)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(w,rt)|0,a=a+Math.imul(w,nt)|0,n=n+Math.imul(y,at)|0,i=(i=i+Math.imul(y,st)|0)+Math.imul(A,at)|0,a=a+Math.imul(A,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(g,ut)|0,a=a+Math.imul(g,ht)|0;var St=(h+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ft)|0)+Math.imul(f,lt)|0))<<13)|0;h=((a=a+Math.imul(f,ft)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(P,Q),i=(i=Math.imul(P,j))+Math.imul(U,Q)|0,a=Math.imul(U,j),n=n+Math.imul(L,G)|0,i=(i=i+Math.imul(L,V)|0)+Math.imul(N,G)|0,a=a+Math.imul(N,V)|0,n=n+Math.imul(F,W)|0,i=(i=i+Math.imul(F,z)|0)+Math.imul(D,W)|0,a=a+Math.imul(D,z)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(T,J)|0,a=a+Math.imul(T,X)|0,n=n+Math.imul(B,$)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(w,at)|0,a=a+Math.imul(w,st)|0,n=n+Math.imul(y,ut)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(A,ut)|0,a=a+Math.imul(A,ht)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ft)|0)+Math.imul(g,lt)|0,a=a+Math.imul(g,ft)|0;var It=(h+(n=n+Math.imul(l,dt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(f,dt)|0))<<13)|0;h=((a=a+Math.imul(f,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(P,G),i=(i=Math.imul(P,V))+Math.imul(U,G)|0,a=Math.imul(U,V),n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,z)|0)+Math.imul(N,W)|0,a=a+Math.imul(N,z)|0,n=n+Math.imul(F,J)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(D,J)|0,a=a+Math.imul(D,X)|0,n=n+Math.imul(x,$)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,tt)|0,n=n+Math.imul(B,rt)|0,i=(i=i+Math.imul(B,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(E,at)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,st)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(w,ut)|0,a=a+Math.imul(w,ht)|0,n=n+Math.imul(y,lt)|0,i=(i=i+Math.imul(y,ft)|0)+Math.imul(A,lt)|0,a=a+Math.imul(A,ft)|0;var Bt=(h+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;h=((a=a+Math.imul(g,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(P,W),i=(i=Math.imul(P,z))+Math.imul(U,W)|0,a=Math.imul(U,z),n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,X)|0)+Math.imul(N,J)|0,a=a+Math.imul(N,X)|0,n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(D,$)|0,a=a+Math.imul(D,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(T,rt)|0,a=a+Math.imul(T,nt)|0,n=n+Math.imul(B,at)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ht)|0)+Math.imul(S,ut)|0,a=a+Math.imul(S,ht)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ft)|0)+Math.imul(w,lt)|0,a=a+Math.imul(w,ft)|0;var _t=(h+(n=n+Math.imul(y,dt)|0)|0)+((8191&(i=(i=i+Math.imul(y,gt)|0)+Math.imul(A,dt)|0))<<13)|0;h=((a=a+Math.imul(A,gt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(P,J),i=(i=Math.imul(P,X))+Math.imul(U,J)|0,a=Math.imul(U,X),n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,$)|0,a=a+Math.imul(N,tt)|0,n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(D,rt)|0,a=a+Math.imul(D,nt)|0,n=n+Math.imul(x,at)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(T,at)|0,a=a+Math.imul(T,st)|0,n=n+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(_,ut)|0,a=a+Math.imul(_,ht)|0,n=n+Math.imul(E,lt)|0,i=(i=i+Math.imul(E,ft)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ft)|0;var Mt=(h+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(w,dt)|0))<<13)|0;h=((a=a+Math.imul(w,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(P,$),i=(i=Math.imul(P,tt))+Math.imul(U,$)|0,a=Math.imul(U,tt),n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(N,rt)|0,a=a+Math.imul(N,nt)|0,n=n+Math.imul(F,at)|0,i=(i=i+Math.imul(F,st)|0)+Math.imul(D,at)|0,a=a+Math.imul(D,st)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(T,ut)|0,a=a+Math.imul(T,ht)|0,n=n+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,ft)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ft)|0;var xt=(h+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(S,dt)|0))<<13)|0;h=((a=a+Math.imul(S,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(P,rt),i=(i=Math.imul(P,nt))+Math.imul(U,rt)|0,a=Math.imul(U,nt),n=n+Math.imul(L,at)|0,i=(i=i+Math.imul(L,st)|0)+Math.imul(N,at)|0,a=a+Math.imul(N,st)|0,n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,ht)|0)+Math.imul(D,ut)|0,a=a+Math.imul(D,ht)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(T,lt)|0,a=a+Math.imul(T,ft)|0;var Tt=(h+(n=n+Math.imul(B,dt)|0)|0)+((8191&(i=(i=i+Math.imul(B,gt)|0)+Math.imul(_,dt)|0))<<13)|0;h=((a=a+Math.imul(_,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(P,at),i=(i=Math.imul(P,st))+Math.imul(U,at)|0,a=Math.imul(U,st),n=n+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,ut)|0,a=a+Math.imul(N,ht)|0,n=n+Math.imul(F,lt)|0,i=(i=i+Math.imul(F,ft)|0)+Math.imul(D,lt)|0,a=a+Math.imul(D,ft)|0;var Rt=(h+(n=n+Math.imul(x,dt)|0)|0)+((8191&(i=(i=i+Math.imul(x,gt)|0)+Math.imul(T,dt)|0))<<13)|0;h=((a=a+Math.imul(T,gt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(P,ut),i=(i=Math.imul(P,ht))+Math.imul(U,ut)|0,a=Math.imul(U,ht),n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ft)|0)+Math.imul(N,lt)|0,a=a+Math.imul(N,ft)|0;var Ft=(h+(n=n+Math.imul(F,dt)|0)|0)+((8191&(i=(i=i+Math.imul(F,gt)|0)+Math.imul(D,dt)|0))<<13)|0;h=((a=a+Math.imul(D,gt)|0)+(i>>>13)|0)+(Ft>>>26)|0,Ft&=67108863,n=Math.imul(P,lt),i=(i=Math.imul(P,ft))+Math.imul(U,lt)|0,a=Math.imul(U,ft);var Dt=(h+(n=n+Math.imul(L,dt)|0)|0)+((8191&(i=(i=i+Math.imul(L,gt)|0)+Math.imul(N,dt)|0))<<13)|0;h=((a=a+Math.imul(N,gt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var kt=(h+(n=Math.imul(P,dt))|0)+((8191&(i=(i=Math.imul(P,gt))+Math.imul(U,dt)|0))<<13)|0;return h=((a=Math.imul(U,gt))+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,u[0]=mt,u[1]=yt,u[2]=At,u[3]=vt,u[4]=bt,u[5]=wt,u[6]=Ct,u[7]=Et,u[8]=St,u[9]=It,u[10]=Bt,u[11]=_t,u[12]=Mt,u[13]=xt,u[14]=Tt,u[15]=Rt,u[16]=Ft,u[17]=Dt,u[18]=kt,0!==h&&(u[19]=h,r.length++),r};function g(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=p),a.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?p(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,s&=67108863}r.words[a]=o,n=s,s=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):g(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},m.prototype.permute=function(t,e,r,n,i,a){for(var s=0;s>>=1)i++;return 1<>>=13,r[2*s+1]=8191&a,a>>>=13;for(s=2*e;s>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this.length=0===t?1:this.length,this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,s=Math.min((t-a)/26,this.length),o=67108863^67108863>>>a<s)for(this.length-=s,h=0;h=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-a|l>>>a,c=l&o}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=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},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===o)return this.strip();for(n(-1===o),o=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var o,u=n.length-i.length;if("mod"!==e){(o=new a(null)).length=u+1,o.words=new Array(o.length);for(var h=0;h=0;l--){var f=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(f=Math.min(f/s|0,67108863),n._ishlnsubmul(i,f,l);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);o&&(o.words[l]=f)}return o&&o.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:o||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(i=o.div.neg()),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(i=o.div.neg()),{div:i,mod:o.mod}):0!==(this.negative&t.negative)?(o=this.neg().divmod(t.neg(),e),"div"!==e&&(s=o.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:o.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,o},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),s=new a(0),o=new a(0),u=new a(1),h=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++h;for(var c=r.clone(),l=e.clone();!e.isZero();){for(var f=0,p=1;0===(e.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(e.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0===(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(o.isOdd()||u.isOdd())&&(o.iadd(c),u.isub(l)),o.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(o),s.isub(u)):(r.isub(e),o.isub(i),u.isub(s))}return{a:o,b:u,gcd:r.iushln(h)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new a(1),o=new a(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var h=0,c=1;0===(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,f=1;0===(r.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(o)):(r.isub(e),o.isub(s))}return(i=0===e.cmpn(1)?s:o).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return!(1&this.words[0])},a.prototype.isOdd=function(){return!(1&~this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,o&=67108863,this.words[s]=o}return 0!==a&&(this.words[s]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new E(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function A(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}A.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},A.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(t,e){t.iushrn(this.n,0,e)},A.prototype.imulK=function(t){return t.imul(this.k)},i(v,A),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,a=s}a>>>=22,t.words[i-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new b;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new C}return y[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var o=new a(1).toRed(this),u=o.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),f=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(o);){for(var g=p,m=0;0!==g.cmp(o);m++)g=g.redSqr();n(m=0;n--){for(var h=e.words[n],c=u-1;c>=0;c--){var l=h>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++o||0===n&&0===c)&&(i=this.mul(i,r[s]),o=0,s=0)):o=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new S(t)},i(S,E),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},77362(t,e,r){var n=r(78170),i=r(48206),a=r(52061),s=r(82509),o=r(67332),u=r(47108),h=r(99247),c=r(92861).Buffer;t.exports=function(t,e,r){var l;l=t.padding?t.padding:r?1:4;var f,p=n(t),d=p.modulus.byteLength();if(e.length>d||new s(e).cmp(p.modulus)>=0)throw new Error("decryption error");f=r?h(new s(e),p):o(e,p);var g=c.alloc(d-f.length);if(f=c.concat([g,f],d),4===l)return function(t,e){var r=t.modulus.byteLength(),n=u("sha1").update(c.alloc(0)).digest(),s=n.length;if(0!==e[0])throw new Error("decryption error");var o=e.slice(1,s+1),h=e.slice(s+1),l=a(o,i(h,s)),f=a(h,i(l,r-s-1));if(function(t,e){t=c.from(t),e=c.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));for(var i=-1;++i=e.length){a++;break}var s=e.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&a++,s.length<8&&a++,a)throw new Error("decryption error");return e.slice(i)}(0,f,r);if(3===l)return f;throw new Error("unknown padding")}},28902(t,e,r){var n=r(78170),i=r(53209),a=r(47108),s=r(48206),o=r(52061),u=r(82509),h=r(99247),c=r(67332),l=r(92861).Buffer;t.exports=function(t,e,r){var f;f=t.padding?t.padding:r?1:4;var p,d=n(t);if(4===f)p=function(t,e){var r=t.modulus.byteLength(),n=e.length,h=a("sha1").update(l.alloc(0)).digest(),c=h.length,f=2*c;if(n>r-f-2)throw new Error("message too long");var p=l.alloc(r-n-f-2),d=r-c-1,g=i(c),m=o(l.concat([h,p,l.alloc(1,1),e],d),s(g,d)),y=o(g,s(m,c));return new u(l.concat([l.alloc(1),y,m],r))}(d,e);else if(1===f)p=function(t,e,r){var n,a=e.length,s=t.modulus.byteLength();if(a>s-11)throw new Error("message too long");return n=r?l.alloc(s-a-3,255):function(t){for(var e,r=l.allocUnsafe(t),n=0,a=i(2*t),s=0;n=0)throw new Error("data too long for modulus")}return r?c(p,d):h(p,d)}},99247(t,e,r){var n=r(82509),i=r(92861).Buffer;t.exports=function(t,e){return i.from(t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed().toArray())}},52061(t){t.exports=function(t,e){for(var r=t.length,n=-1;++n-1)return t.split(",");if(e.throwOnLimitExceeded&&r>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(1===e.arrayLimit?"":"s")+" allowed in an array.");return t},h=function(t,e,r,a){if(t){var s=function(t,e){var r=e.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t;if(e.depth<=0){if(!e.plainObjects&&i.call(Object.prototype,r)&&!e.allowPrototypes)return;return[r]}var n=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(r),s=a?r.slice(0,a.index):r,o=[];if(s){if(!e.plainObjects&&i.call(Object.prototype,s)&&!e.allowPrototypes)return;o[o.length]=s}for(var u=0;null!==(a=n.exec(r))&&u0&&"[]"===t[t.length-1]){var s=t.slice(0,-1).join("");a=Array.isArray(e)&&e[s]?e[s].length:0}for(var o=i?e:u(e,r,a),h=t.length-1;h>=0;--h){var c,l=t[h];if("[]"===l&&r.parseArrays)c=n.isOverflow(o)?o:r.allowEmptyArrays&&(""===o||r.strictNullHandling&&null===o)?[]:n.combine([],o,r.arrayLimit,r.plainObjects);else{c=r.plainObjects?{__proto__:null}:{};var f="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,p=r.decodeDotInKeys?f.replace(/%2E/g,"."):f,d=parseInt(p,10),g=!isNaN(d)&&l!==p&&String(d)===p&&d>=0&&r.parseArrays;if(r.parseArrays||""!==p)if(g&&dc)throw new RangeError("Parameter limit exceeded. Only "+c+" parameter"+(1===c?"":"s")+" allowed.");var f,p=-1,d=e.charset;if(e.charsetSentinel)for(f=0;f-1&&(m=a(m)?[m]:m),e.comma&&a(m)&&m.length>e.arrayLimit){if(e.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(1===e.arrayLimit?"":"s")+" allowed in an array.");m=n.combine([],m,e.arrayLimit,e.plainObjects)}if(null!==g){var b=i.call(r,g);b&&("combine"===e.duplicates||y.indexOf("[]=")>-1)?r[g]=n.combine(r[g],m,e.arrayLimit,e.plainObjects):b&&"last"!==e.duplicates||(r[g]=m)}}return r}(t,r):t,l=r.plainObjects?{__proto__:null}:{},f=Object.keys(c),p=0;p0?B.join(",")||null:void 0}];else if(u(m))R=m;else{var D=Object.keys(B);R=y?D.sort(y):D}var k=f?String(r).replace(/\./g,"%2E"):String(r),L=s&&u(B)&&1===B.length?k+"[]":k;if(o&&u(B)&&0===B.length)return L+"[]";for(var N=0;N0?w+b:""}},37720(t,e,r){"use strict";var n=r(74765),i=r(920),a=Object.prototype.hasOwnProperty,s=Array.isArray,o=i(),u=function(t,e){return o.set(t,e),t},h=function(t){return o.has(t)},c=function(t){return o.get(t)},l=function(t,e){o.set(t,e)},f=function(){for(var t=[],e=0;e<256;++e)t[t.length]="%"+((e<16?"0":"")+e.toString(16)).toUpperCase();return t}(),p=function(t,e){for(var r=e&&e.plainObjects?{__proto__:null}:{},n=0;nr?u(p(a,{plainObjects:n}),a.length-1):a},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],r=[],n=0;n1;){var e=t.pop(),r=e.obj[e.prop];if(s(r)){for(var n=[],i=0;i=d?s.slice(u,u+d):s,c=[],l=0;l=48&&p<=57||p>=65&&p<=90||p>=97&&p<=122||a===n.RFC1738&&(40===p||41===p)?c[c.length]=h.charAt(l):p<128?c[c.length]=f[p]:p<2048?c[c.length]=f[192|p>>6]+f[128|63&p]:p<55296||p>=57344?c[c.length]=f[224|p>>12]+f[128|p>>6&63]+f[128|63&p]:(l+=1,p=65536+((1023&p)<<10|1023&h.charCodeAt(l)),c[c.length]=f[240|p>>18]+f[128|p>>12&63]+f[128|p>>6&63]+f[128|63&p])}o+=c.join("")}return o},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isOverflow:h,isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},markOverflow:u,maybeMap:function(t,e){if(s(t)){for(var r=[],n=0;nn.arrayLimit)return u(p(e.concat(r),n),i);e[i]=r}else{if(!e||"object"!=typeof e)return[e,r];if(h(e)){var o=c(e)+1;e[o]=r,l(e,o)}else{if(n&&n.strictMerge)return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!a.call(Object.prototype,r))&&(e[r]=!0)}}return e}if(!e||"object"!=typeof e){if(h(r)){for(var f=Object.keys(r),d=n&&n.plainObjects?{__proto__:null,0:e}:{0:e},g=0;gn.arrayLimit?u(p(m,n),m.length-1):m}var y=e;return s(e)&&!s(r)&&(y=p(e,n)),s(e)&&s(r)?(r.forEach(function(r,i){if(a.call(e,i)){var s=e[i];s&&"object"==typeof s&&r&&"object"==typeof r?e[i]=t(s,r,n):e[e.length]=r}else e[i]=r}),e):Object.keys(r).reduce(function(e,i){var s=r[i];if(a.call(e,i)?e[i]=t(e[i],s,n):e[i]=s,h(r)&&!h(e)&&u(e,c(r)),h(e)){var o=parseInt(i,10);String(o)===i&&o>=0&&o>c(e)&&l(e,o)}return e},y)}}},53209(t,e,r){"use strict";var n=r(65606),i=65536,a=r(92861).Buffer,s=r.g.crypto||r.g.msCrypto;s&&s.getRandomValues?t.exports=function(t,e){if(t>4294967295)throw new RangeError("requested too many random bytes");var r=a.allocUnsafe(t);if(t>0)if(t>i)for(var o=0;oh||t<0)throw new TypeError("offset must be a uint32");if(t>o||t>e)throw new RangeError("offset out of range")}function l(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>h||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>o)throw new RangeError("buffer too small")}function f(t,e,r,i){var a=t.buffer,s=new Uint8Array(a,e,r);return u.getRandomValues(s),i?void n.nextTick(function(){i(null,t)}):t}u&&u.getRandomValues?(e.randomFill=function(t,e,n,i){if(!(s.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)i=e,e=0,n=t.length;else if("function"==typeof n)i=n,n=t.length-e;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return c(e,t.length),l(n,e,t.length),f(t,e,n,i)},e.randomFillSync=function(t,e,n){if(void 0===e&&(e=0),!(s.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return c(e,t.length),void 0===n&&(n=t.length-e),l(n,e,t.length),f(t,e,n)}):(e.randomFill=i,e.randomFillSync=i)},25382(t,e,r){"use strict";var n=r(33225),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=l;var a=Object.create(r(15622));a.inherits=r(56698);var s=r(45412),o=r(16708);a.inherits(l,s);for(var u=i(o.prototype),h=0;h0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===h.prototype||(e=function(t){return h.from(t)}(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?w(t,s,e,!1):B(t,s)):w(t,s,e,!1))):n||(s.reading=!1)),function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=C?t=C:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(I,t):I(t))}function I(t){p("emit readable"),t.emit("readable"),T(t)}function B(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(_,t,e))}function _(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;return ta.length?a.length:t;if(s===a.length?i+=a:i+=a.slice(0,t),0===(t-=s)){s===a.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=h.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var a=n.data,s=t>a.length?a.length:t;if(a.copy(r,r.length-t,0,s),0===(t-=s)){s===a.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=a.slice(s));break}++i}return e.length-=i,r}(t,e),n}(t,e.buffer,e.decoder),r);var r}function F(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(D,e,t))}function D(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function k(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?F(this):S(this),null;if(0===(t=E(t,e))&&e.ended)return 0===e.length&&F(this),null;var n,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t0?R(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&F(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(t,e){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,p("pipe count=%d opts=%j",a.pipesCount,e);var u=e&&!1===e.end||t===n.stdout||t===n.stderr?A:h;function h(){p("onend"),t.end()}a.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",function e(n,i){p("onunpipe"),n===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,p("cleanup"),t.removeListener("close",m),t.removeListener("finish",y),t.removeListener("drain",c),t.removeListener("error",g),t.removeListener("unpipe",e),r.removeListener("end",h),r.removeListener("end",A),r.removeListener("data",d),l=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||c())});var c=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,T(t))}}(r);t.on("drain",c);var l=!1,f=!1;function d(e){p("ondata"),f=!1,!1!==t.write(e)||f||((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==k(a.pipes,t))&&!l&&(p("false write response, pause",a.awaitDrain),a.awaitDrain++,f=!0),r.pause())}function g(e){p("onerror",e),A(),t.removeListener("error",g),0===o(t,"error")&&t.emit("error",e)}function m(){t.removeListener("finish",y),A()}function y(){p("onfinish"),t.removeListener("close",m),A()}function A(){p("unpipe"),r.unpipe(t)}return r.on("data",d),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",g),t.once("close",m),t.once("finish",y),t.emit("pipe",r),a.flowing||(p("pipe resume"),r.resume()),t},v.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),m.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},m.prototype._writev=null,m.prototype.end=function(t,e,r){var i=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,C(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,i,r)},Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),m.prototype.destroy=p.destroy,m.prototype._undestroy=p.undestroy,m.prototype._destroy=function(t,e){this.end(),e(t)}},83222(t,e,r){"use strict";var n=r(34106).Buffer,i=r(15340);function a(t,e,r){t.copy(e,r)}t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);for(var e=n.allocUnsafe(t>>>0),r=this.head,i=0;r;)a(r.data,e,i),i+=r.data.length,r=r.next;return e},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},75896(t,e,r){"use strict";var n=r(33225);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,t)):n.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},40345(t,e,r){t.exports=r(37007).EventEmitter},34106(t,e,r){var n=r(48287),i=n.Buffer;function a(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(a(n,e),e.Buffer=s),a(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},28399(t,e,r){(e=t.exports=r(45412)).Stream=e,e.Readable=e,e.Writable=r(16708),e.Duplex=r(25382),e.Transform=r(74610),e.PassThrough=r(63600)},66011(t,e,r){"use strict";var n=r(48287).Buffer,i=r(56698),a=r(51147),s=new Array(16),o=[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],u=[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],h=[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],c=[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],l=[0,1518500249,1859775393,2400959708,2840853838],f=[1352829926,1548603684,1836072691,2053994217,0];function p(t,e){return t<>>32-e}function d(t,e,r,n,i,a,s,o){return p(t+(e^r^n)+a+s|0,o)+i|0}function g(t,e,r,n,i,a,s,o){return p(t+(e&r|~e&n)+a+s|0,o)+i|0}function m(t,e,r,n,i,a,s,o){return p(t+((e|~r)^n)+a+s|0,o)+i|0}function y(t,e,r,n,i,a,s,o){return p(t+(e&n|r&~n)+a+s|0,o)+i|0}function A(t,e,r,n,i,a,s,o){return p(t+(e^(r|~n))+a+s|0,o)+i|0}function v(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}i(v,a),v.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,v=0|this._e,b=0|this._a,w=0|this._b,C=0|this._c,E=0|this._d,S=0|this._e,I=0;I<80;I+=1){var B,_;I<16?(B=d(r,n,i,a,v,t[o[I]],l[0],h[I]),_=A(b,w,C,E,S,t[u[I]],f[0],c[I])):I<32?(B=g(r,n,i,a,v,t[o[I]],l[1],h[I]),_=y(b,w,C,E,S,t[u[I]],f[1],c[I])):I<48?(B=m(r,n,i,a,v,t[o[I]],l[2],h[I]),_=m(b,w,C,E,S,t[u[I]],f[2],c[I])):I<64?(B=y(r,n,i,a,v,t[o[I]],l[3],h[I]),_=g(b,w,C,E,S,t[u[I]],f[3],c[I])):(B=A(r,n,i,a,v,t[o[I]],l[4],h[I]),_=d(b,w,C,E,S,t[u[I]],f[4],c[I])),r=v,v=a,a=p(i,10),i=n,n=B,b=S,S=E,E=p(C,10),C=w,w=_}var M=this._b+i+E|0;this._b=this._c+a+S|0,this._c=this._d+v+b|0,this._d=this._e+r+w|0,this._e=this._a+n+C|0,this._a=M},v.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,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 t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=v},51147(t,e,r){"use strict";var n=r(92861).Buffer,i=r(48537),a=r(28399).Transform;function s(t){a.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(56698)(s,a),s.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},s.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},s.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");for(var r=i(t,e),n=this._block,a=0;this._blockOffset+r.length-a>=this._blockSize;){for(var s=this._blockOffset;s0;++o)this._length[o]+=u,(u=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*u);return this},s.prototype._update=function(){throw new Error("_update is not implemented")},s.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},s.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=s},48537(t,e,r){"use strict";var n=r(92861).Buffer,i=r(15377),a="undefined"!=typeof Uint8Array,s=a&&"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView;t.exports=function(t,e){if("string"==typeof t||n.isBuffer(t)||a&&t instanceof Uint8Array||s&&s(t))return i(t,e);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')}},92861(t,e,r){var n=r(48287),i=n.Buffer;function a(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(a(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),a(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},71582(t,e,r){const n=r(5600);n.async=r(50727),t.exports=n},50727(t,e,r){const n=r(91565),{checkAndInit:i,smix:a}=r(50831);t.exports=async function(t,e,r,s,o,u,h,c){const{XY:l,V:f,B32:p,x:d,_X:g,B:m,tickCallback:y}=i(t,e,r,s,o,u,h);for(var A=0;A>>32-e}function u(t,e,r){let n;for(n=0;n<16;n++)e[n]=255&t[4*n+0],e[n]|=(255&t[4*n+1])<<8,e[n]|=(255&t[4*n+2])<<16,e[n]|=(255&t[4*n+3])<<24;for(c(e,0,r,0,16),n=8;n>0;n-=2)r[4]^=o(r[0]+r[12],7),r[8]^=o(r[4]+r[0],9),r[12]^=o(r[8]+r[4],13),r[0]^=o(r[12]+r[8],18),r[9]^=o(r[5]+r[1],7),r[13]^=o(r[9]+r[5],9),r[1]^=o(r[13]+r[9],13),r[5]^=o(r[1]+r[13],18),r[14]^=o(r[10]+r[6],7),r[2]^=o(r[14]+r[10],9),r[6]^=o(r[2]+r[14],13),r[10]^=o(r[6]+r[2],18),r[3]^=o(r[15]+r[11],7),r[7]^=o(r[3]+r[15],9),r[11]^=o(r[7]+r[3],13),r[15]^=o(r[11]+r[7],18),r[1]^=o(r[0]+r[3],7),r[2]^=o(r[1]+r[0],9),r[3]^=o(r[2]+r[1],13),r[0]^=o(r[3]+r[2],18),r[6]^=o(r[5]+r[4],7),r[7]^=o(r[6]+r[5],9),r[4]^=o(r[7]+r[6],13),r[5]^=o(r[4]+r[7],18),r[11]^=o(r[10]+r[9],7),r[8]^=o(r[11]+r[10],9),r[9]^=o(r[8]+r[11],13),r[10]^=o(r[9]+r[8],18),r[12]^=o(r[15]+r[14],7),r[13]^=o(r[12]+r[15],9),r[14]^=o(r[13]+r[12],13),r[15]^=o(r[14]+r[13],18);for(n=0;n<16;++n)e[n]=r[n]+e[n];for(n=0;n<16;n++){let r=4*n;t[r+0]=255&e[n],t[r+1]=e[n]>>8&255,t[r+2]=e[n]>>16&255,t[r+3]=e[n]>>24&255}}function h(t,e,r,n,i){for(let a=0;a 0 and a power of 2");if(r>a/128/s)throw Error("Parameter N is too large");if(s>a/128/o)throw Error("Parameter r is too large");let c,l=n.alloc(256*s),f=n.alloc(128*s*r),p=new Int32Array(16),d=new Int32Array(16),g=n.alloc(64),m=i.pbkdf2Sync(t,e,1,128*o*s,"sha256");if(h){let t=o*r*2,e=0;c=function(){++e,e%1e3==0&&h({current:e,total:t,percent:e/t*100})}}return{XY:l,V:f,B32:p,x:d,_X:g,B:m,tickCallback:c}},smix:async function(t,e,r,n,i,a,o,u,c,l,f){f=f||5e3;let p,d=128*r;for(t.copy(a,0,e,e+d),p=0;psetImmediate(t)),s(a,0,d,r,o,u,c),l&&l();for(p=0;psetImmediate(t)),s(a,0,d,r,o,u,c),l&&l()}a.copy(t,e,0,0+d)},smixSync:function(t,e,r,n,i,a,o,u,c,l){let f,p=128*r;for(t.copy(a,0,e,e+p),f=0;f4294967295||u(e)!==e)throw new o("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,h=!0;if("length"in t&&s){var c=s(t,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(h=!1)}return(n||h||!r)&&(a?i(t,"length",e,!0,!0):i(t,"length",e)),t}},90392(t,e,r){"use strict";var n=r(92861).Buffer,i=r(15377);function a(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}a.prototype.update=function(t,e){t=i(t,e||"utf8");for(var r=this._block,n=this._blockSize,a=t.length,s=this._len,o=0;o=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return t?a.toString(t):a},a.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=a},62802(t,e,r){"use strict";t.exports=function(e){var r=e.toLowerCase(),n=t.exports[r];if(!n)throw new Error(r+" is not supported (we accept pull requests)");return new n},t.exports.sha=r(27816),t.exports.sha1=r(63737),t.exports.sha224=r(26710),t.exports.sha256=r(24107),t.exports.sha384=r(32827),t.exports.sha512=r(82890)},27816(t,e,r){"use strict";var n=r(56698),i=r(90392),a=r(92861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function u(){this.init(),this._w=o,i.call(this,64,56)}function h(t){return t<<5|t>>>27}function c(t){return t<<30|t>>>2}function l(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,o=0|this._e,u=0;u<16;++u)e[u]=t.readInt32BE(4*u);for(;u<80;++u)e[u]=e[u-3]^e[u-8]^e[u-14]^e[u-16];for(var f=0;f<80;++f){var p=~~(f/20),d=h(r)+l(p,n,i,a)+o+e[f]+s[p]|0;o=a,a=i,i=c(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=o+this._e|0},u.prototype._hash=function(){var t=a.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},63737(t,e,r){"use strict";var n=r(56698),i=r(90392),a=r(92861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],o=new Array(80);function u(){this.init(),this._w=o,i.call(this,64,56)}function h(t){return t<<1|t>>>31}function c(t){return t<<5|t>>>27}function l(t){return t<<30|t>>>2}function f(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,o=0|this._e,u=0;u<16;++u)e[u]=t.readInt32BE(4*u);for(;u<80;++u)e[u]=h(e[u-3]^e[u-8]^e[u-14]^e[u-16]);for(var p=0;p<80;++p){var d=~~(p/20),g=c(r)+f(d,n,i,a)+o+e[p]+s[d]|0;o=a,a=i,i=l(n),n=r,r=g}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=o+this._e|0},u.prototype._hash=function(){var t=a.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},26710(t,e,r){"use strict";var n=r(56698),i=r(24107),a=r(90392),s=r(92861).Buffer,o=new Array(64);function u(){this.init(),this._w=o,a.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},24107(t,e,r){"use strict";var n=r(56698),i=r(90392),a=r(92861).Buffer,s=[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],o=new Array(64);function u(){this.init(),this._w=o,i.call(this,64,56)}function h(t,e,r){return r^t&(e^r)}function c(t,e,r){return t&e|r&(t|e)}function l(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function f(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function p(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function d(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,o=0|this._e,u=0|this._f,g=0|this._g,m=0|this._h,y=0;y<16;++y)e[y]=t.readInt32BE(4*y);for(;y<64;++y)e[y]=d(e[y-2])+e[y-7]+p(e[y-15])+e[y-16]|0;for(var A=0;A<64;++A){var v=m+f(o)+h(o,u,g)+s[A]+e[A]|0,b=l(r)+c(r,n,i)|0;m=g,g=u,u=o,o=a+v|0,a=i,i=n,n=r,r=v+b|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=o+this._e|0,this._f=u+this._f|0,this._g=g+this._g|0,this._h=m+this._h|0},u.prototype._hash=function(){var t=a.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},32827(t,e,r){"use strict";var n=r(56698),i=r(82890),a=r(90392),s=r(92861).Buffer,o=new Array(160);function u(){this.init(),this._w=o,a.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},82890(t,e,r){"use strict";var n=r(56698),i=r(90392),a=r(92861).Buffer,s=[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],o=new Array(160);function u(){this.init(),this._w=o,i.call(this,128,112)}function h(t,e,r){return r^t&(e^r)}function c(t,e,r){return t&e|r&(t|e)}function l(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function f(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function y(t,e){return t>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,a=0|this._dh,o=0|this._eh,u=0|this._fh,A=0|this._gh,v=0|this._hh,b=0|this._al,w=0|this._bl,C=0|this._cl,E=0|this._dl,S=0|this._el,I=0|this._fl,B=0|this._gl,_=0|this._hl,M=0;M<32;M+=2)e[M]=t.readInt32BE(4*M),e[M+1]=t.readInt32BE(4*M+4);for(;M<160;M+=2){var x=e[M-30],T=e[M-30+1],R=p(x,T),F=d(T,x),D=g(x=e[M-4],T=e[M-4+1]),k=m(T,x),L=e[M-14],N=e[M-14+1],H=e[M-32],P=e[M-32+1],U=F+N|0,O=R+L+y(U,F)|0;O=(O=O+D+y(U=U+k|0,k)|0)+H+y(U=U+P|0,P)|0,e[M]=O,e[M+1]=U}for(var Q=0;Q<160;Q+=2){O=e[Q],U=e[Q+1];var j=c(r,n,i),K=c(b,w,C),G=l(r,b),V=l(b,r),q=f(o,S),W=f(S,o),z=s[Q],Y=s[Q+1],J=h(o,u,A),X=h(S,I,B),Z=_+W|0,$=v+q+y(Z,_)|0;$=($=($=$+J+y(Z=Z+X|0,X)|0)+z+y(Z=Z+Y|0,Y)|0)+O+y(Z=Z+U|0,U)|0;var tt=V+K|0,et=G+j+y(tt,V)|0;v=A,_=B,A=u,B=I,u=o,I=S,o=a+$+y(S=E+Z|0,E)|0,a=i,E=C,i=n,C=w,n=r,w=b,r=$+et+y(b=Z+tt|0,Z)|0}this._al=this._al+b|0,this._bl=this._bl+w|0,this._cl=this._cl+C|0,this._dl=this._dl+E|0,this._el=this._el+S|0,this._fl=this._fl+I|0,this._gl=this._gl+B|0,this._hl=this._hl+_|0,this._ah=this._ah+r+y(this._al,b)|0,this._bh=this._bh+n+y(this._bl,w)|0,this._ch=this._ch+i+y(this._cl,C)|0,this._dh=this._dh+a+y(this._dl,E)|0,this._eh=this._eh+o+y(this._el,S)|0,this._fh=this._fh+u+y(this._fl,I)|0,this._gh=this._gh+A+y(this._gl,B)|0,this._hh=this._hh+v+y(this._hl,_)|0},u.prototype._hash=function(){var t=a.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},14803(t,e,r){"use strict";var n=r(58859),i=r(69675),a=function(t,e,r){for(var n,i=t;null!=(n=i.next);i=n)if(n.key===e)return i.next=n.next,r||(n.next=t.next,t.next=n),n};t.exports=function(){var t,e={assert:function(t){if(!e.has(t))throw new i("Side channel does not contain "+n(t))},delete:function(e){var r=t&&t.next,n=function(t,e){if(t)return a(t,e,!0)}(t,e);return n&&r&&r===n&&(t=void 0),!!n},get:function(e){return function(t,e){if(t){var r=a(t,e);return r&&r.value}}(t,e)},has:function(e){return function(t,e){return!!t&&!!a(t,e)}(t,e)},set:function(e,r){t||(t={next:void 0}),function(t,e,r){var n=a(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(t,e,r)}};return e}},80507(t,e,r){"use strict";var n=r(70453),i=r(36556),a=r(58859),s=r(69675),o=n("%Map%",!0),u=i("Map.prototype.get",!0),h=i("Map.prototype.set",!0),c=i("Map.prototype.has",!0),l=i("Map.prototype.delete",!0),f=i("Map.prototype.size",!0);t.exports=!!o&&function(){var t,e={assert:function(t){if(!e.has(t))throw new s("Side channel does not contain "+a(t))},delete:function(e){if(t){var r=l(t,e);return 0===f(t)&&(t=void 0),r}return!1},get:function(e){if(t)return u(t,e)},has:function(e){return!!t&&c(t,e)},set:function(e,r){t||(t=new o),h(t,e,r)}};return e}},72271(t,e,r){"use strict";var n=r(70453),i=r(36556),a=r(58859),s=r(80507),o=r(69675),u=n("%WeakMap%",!0),h=i("WeakMap.prototype.get",!0),c=i("WeakMap.prototype.set",!0),l=i("WeakMap.prototype.has",!0),f=i("WeakMap.prototype.delete",!0);t.exports=u?function(){var t,e,r={assert:function(t){if(!r.has(t))throw new o("Side channel does not contain "+a(t))},delete:function(r){if(u&&r&&("object"==typeof r||"function"==typeof r)){if(t)return f(t,r)}else if(s&&e)return e.delete(r);return!1},get:function(r){return u&&r&&("object"==typeof r||"function"==typeof r)&&t?h(t,r):e&&e.get(r)},has:function(r){return u&&r&&("object"==typeof r||"function"==typeof r)&&t?l(t,r):!!e&&e.has(r)},set:function(r,n){u&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new u),c(t,r,n)):s&&(e||(e=s()),e.set(r,n))}};return r}:s},920(t,e,r){"use strict";var n=r(69675),i=r(58859),a=r(14803),s=r(80507),o=r(72271)||s||a;t.exports=function(){var t,e={assert:function(t){if(!e.has(t))throw new n("Side channel does not contain "+i(t))},delete:function(e){return!!t&&t.delete(e)},get:function(e){return t&&t.get(e)},has:function(e){return!!t&&t.has(e)},set:function(e,r){t||(t=o()),t.set(e,r)}};return e}},77096(t,e,r){var n=r(48287).Buffer;!function(){var e={},r=!1;t.exports?t.exports=e:(this.ssdeep=e,r=!0);var i=671226215,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function s(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function o(t,e){return n=(i=(a=65535&(r=t))*(s=65535&16777619))>>>16,n+=((r>>16)+(a>>16))*s,n&=65535,(((65535&(n+=a*(256+(s>>16))))<<16|65535&i)^e)>>>0;var r,n,i,a,s}function u(){this.rolling_window=new Array(7),this.h1=0,this.h2=0,this.h3=0,this.n=0}function h(t,e){var r=["","",e];if(0===t.length)return r;for(var n=i,s=i,h=new u,c=0,l=t.length;c>>0,this.h1=s(this.h1,t);var r=this.rolling_window[this.n%7]||0;this.h1=s(this.h1,-r)>>>0,this.rolling_window[this.n%7]=t,this.n++,this.h3=this.h3<<5,this.h3=(this.h3^t)>>>0},u.prototype.sum=function(){return this.h1+this.h2+this.h3>>>0},e.digest=function(t){return"string"==typeof t&&(t=r?function(t){for(var e=[],r=0,n=0;n>6|192,e[r++]=63&i|128):55296==(64512&i)&&n+1>18|240,e[r++]=i>>12&63|128,e[r++]=i>>6&63|128,e[r++]=63&i|128):(e[r++]=i>>12|224,e[r++]=i>>6&63|128,e[r++]=63&i|128)}return e}(t):n.from(t).toJSON().data),function(t){for(var e,r=3;64*r3&&e[0].length<32);return e[2]+":"+e[0]+":"+e[1]}(t)},e.similarity=function(t,e){var r,n,i=a.indexOf(t.charAt(0)),s=a.indexOf(e.charAt(0));return i>s?arguments.callee(e,t):Math.abs(i-s)>1?0:(r=i===s?t.split(":")[1]:t.split(":")[2],n=e.split(":")[1],100*(1-function(t,e){if(t===e)return 0;if(0===t.length)return e.length;if(0===e.length)return t.length;var r,n,i,a,s,o=new Array(e.length+1);for(i=0;i(s=r+1)&&(n=s),n>(s=o[a+1]+1)&&(n=s),o[a]=r;o[a]=n}return n}(r,n)/Math.max(r.length,n.length)))}}()},88310(t,e,r){t.exports=i;var n=r(37007).EventEmitter;function i(){n.call(this)}r(56698)(i,n),i.Readable=r(46891),i.Writable=r(81999),i.Duplex=r(88101),i.Transform=r(59083),i.PassThrough=r(3681),i.finished=r(14257),i.pipeline=r(5267),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function a(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",a),t._isStdio||e&&!1===e.end||(r.on("end",o),r.on("close",u));var s=!1;function o(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function h(t){if(c(),0===n.listenerCount(this,"error"))throw t}function c(){r.removeListener("data",i),t.removeListener("drain",a),r.removeListener("end",o),r.removeListener("close",u),r.removeListener("error",h),t.removeListener("error",h),r.removeListener("end",c),r.removeListener("close",c),t.removeListener("close",c)}return r.on("error",h),t.on("error",h),r.on("end",c),r.on("close",c),t.on("close",c),t.emit("pipe",r),t}},12463(t){"use strict";var e={};function r(t,r,n){n||(n=Error);var i=function(t){var e,n;function i(e,n,i){return t.call(this,function(t,e,n){return"string"==typeof r?r:r(t,e,n)}(e,n,i))||this}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function n(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(t){return String(t)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(t,e,r){var i,a,s,o,u;if("string"==typeof e&&(a="not ",e.substr(0,4)===a)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-9,r)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var h=("number"!=typeof u&&(u=0),u+1>(o=t).length||-1===o.indexOf(".",u)?"argument":"property");s='The "'.concat(t,'" ').concat(h," ").concat(i," ").concat(n(e,"type"))}return s+". Received type ".concat(typeof r)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.F=e},88101(t,e,r){"use strict";var n=r(65606),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var a=r(46891),s=r(81999);r(56698)(c,a);for(var o=i(s.prototype),u=0;u0)if("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),n)o.endEmitted?C(t,new w):_(t,o,e,!0);else if(o.ended)C(t,new v);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?_(t,o,e,!1):F(t,o)):_(t,o,e,!1)}else n||(o.reading=!1,F(t,o));return!o.ended&&(o.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=M?t=M:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function T(t){var e=t._readableState;a("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(a("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(R,t))}function R(t){var e=t._readableState;a("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,H(t)}function F(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(D,t,e))}function D(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function L(t){a("readable nexttick read 0"),t.read(0)}function N(t,e){a("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),H(t),e.flowing&&!e.reading&&t.read(0)}function H(t){var e=t._readableState;for(a("flow",e.flowing);e.flowing&&null!==t.read(););}function P(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function U(t){var e=t._readableState;a("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(O,e,t))}function O(t,e){if(a("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function Q(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return a("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?U(this):T(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&U(this),null;var n,i=e.needReadable;return a("need readable",i),(0===e.length||e.length-t0?P(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&U(this)),null!==n&&this.emit("data",n),n},I.prototype._read=function(t){C(this,new b("_read()"))},I.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,a("pipe count=%d opts=%j",n.pipesCount,e);var o=e&&!1===e.end||t===i.stdout||t===i.stderr?g:u;function u(){a("onend"),t.end()}n.endEmitted?i.nextTick(o):r.once("end",o),t.on("unpipe",function e(i,s){a("onunpipe"),i===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,a("cleanup"),t.removeListener("close",p),t.removeListener("finish",d),t.removeListener("drain",h),t.removeListener("error",f),t.removeListener("unpipe",e),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",l),c=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||h())});var h=function(t){return function(){var e=t._readableState;a("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,H(t))}}(r);t.on("drain",h);var c=!1;function l(e){a("ondata");var i=t.write(e);a("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==Q(n.pipes,t))&&!c&&(a("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function f(e){a("onerror",e),g(),t.removeListener("error",f),0===s(t,"error")&&C(t,e)}function p(){t.removeListener("finish",d),g()}function d(){a("onfinish"),t.removeListener("close",p),g()}function g(){a("unpipe"),r.unpipe(t)}return r.on("data",l),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",f),t.once("close",p),t.once("finish",d),t.emit("pipe",r),n.flowing||(a("pipe resume"),r.resume()),t},I.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,a("on readable",n.length,n.reading),n.length?T(this):n.reading||i.nextTick(L,this))),r},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(t,e){var r=o.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(k,this),r},I.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(k,this),e},I.prototype.resume=function(){var t=this._readableState;return t.flowing||(a("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(N,t,e))}(this,t)),t.paused=!1,this},I.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",function(){if(a("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(i){a("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))}),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var s=0;s-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),I.prototype._write=function(t,e,r){r(new g("_write()"))},I.prototype._writev=null,I.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,R(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),I.prototype.destroy=l.destroy,I.prototype._undestroy=l.undestroy,I.prototype._destroy=function(t,e){e(t)}},65034(t,e,r){"use strict";var n,i=r(65606);function a(t,e,r){return(e=function(t){var e=function(t){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(14257),o=Symbol("lastResolve"),u=Symbol("lastReject"),h=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),p=Symbol("stream");function d(t,e){return{value:t,done:e}}function g(t){var e=t[o];if(null!==e){var r=t[p].read();null!==r&&(t[l]=null,t[o]=null,t[u]=null,e(d(r,!1)))}}function m(t){i.nextTick(g,t)}var y=Object.getPrototypeOf(function(){}),A=Object.setPrototypeOf((a(n={get stream(){return this[p]},next:function(){var t=this,e=this[h];if(null!==e)return Promise.reject(e);if(this[c])return Promise.resolve(d(void 0,!0));if(this[p].destroyed)return new Promise(function(e,r){i.nextTick(function(){t[h]?r(t[h]):e(d(void 0,!0))})});var r,n=this[l];if(n)r=new Promise(function(t,e){return function(r,n){t.then(function(){e[c]?r(d(void 0,!0)):e[f](r,n)},n)}}(n,this));else{var a=this[p].read();if(null!==a)return Promise.resolve(d(a,!1));r=new Promise(this[f])}return this[l]=r,r}},Symbol.asyncIterator,function(){return this}),a(n,"return",function(){var t=this;return new Promise(function(e,r){t[p].destroy(null,function(t){t?r(t):e(d(void 0,!0))})})}),n),y);t.exports=function(t){var e,r=Object.create(A,(a(e={},p,{value:t,writable:!0}),a(e,o,{value:null,writable:!0}),a(e,u,{value:null,writable:!0}),a(e,h,{value:null,writable:!0}),a(e,c,{value:t._readableState.endEmitted,writable:!0}),a(e,f,{value:function(t,e){var n=r[p].read();n?(r[l]=null,r[o]=null,r[u]=null,t(d(n,!1))):(r[o]=t,r[u]=e)},writable:!0}),e));return r[l]=null,s(t,function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[u];return null!==e&&(r[l]=null,r[o]=null,r[u]=null,e(t)),void(r[h]=t)}var n=r[o];null!==n&&(r[l]=null,r[o]=null,r[u]=null,n(d(void 0,!0))),r[c]=!0}),t.on("readable",m.bind(null,r)),r}},81766(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return u.alloc(0);for(var e=u.allocUnsafe(t>>>0),r=this.head,n=0;r;)l(r.data,e,n),n+=r.data.length,r=r.next;return e}},{key:"consume",value:function(t,e){var r;return ti.length?i.length:t;if(a===i.length?n+=i:n+=i.slice(0,t),0===(t-=a)){a===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=u.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0===(t-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,e}},{key:c,value:function(t,e){return h(this,i(i({},e),{},{depth:0,customInspect:!1}))}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}()},54347(t,e,r){"use strict";var n=r(65606);function i(t,e){s(t,e),a(t)}function a(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function s(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return o||u?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(s,this,t)):n.nextTick(s,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?r._writableState?r._writableState.errorEmitted?n.nextTick(a,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e?(n.nextTick(a,r),e(t)):n.nextTick(a,r)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}},14257(t,e,r){"use strict";var n=r(12463).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,a){if("function"==typeof r)return t(e,null,r);r||(r={}),a=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i0,function(t){c||(c=t),t&&f.forEach(u),a||(f.forEach(u),l(c))})});return e.reduce(h)}},66644(t,e,r){"use strict";var n=r(12463).F.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var a=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:"highWaterMark",a);return Math.floor(a)}return t.objectMode?16:16384}}},41396(t,e,r){t.exports=r(37007).EventEmitter},83141(t,e,r){"use strict";var n=r(15003).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=h,e=4;break;case"utf8":this.fillLast=o,e=4;break;case"base64":this.text=c,this.end=l,e=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function o(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function h(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function c(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.I=a,a.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(t.lastNeed=i-1),i):--n=0?(i>0&&(t.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},15003(t,e,r){var n=r(48287),i=n.Buffer;function a(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(a(n,e),e.Buffer=s),a(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},15377(t,e,r){"use strict";var n=r(92861).Buffer,i=r(92006),a=r(74372),s=ArrayBuffer.isView||function(t){try{return a(t),!0}catch(t){return!1}},o="undefined"!=typeof Uint8Array,u="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,h=u&&(n.prototype instanceof Uint8Array||n.TYPED_ARRAY_SUPPORT);t.exports=function(t,e){if(n.isBuffer(t))return t.constructor&&!("isBuffer"in t)?n.from(t):t;if("string"==typeof t)return n.from(t,e);if(u&&s(t)){if(0===t.byteLength)return n.alloc(0);if(h){var r=n.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}var a=t instanceof Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),c=n.from(a);if(c.length===t.byteLength)return c}if(o&&t instanceof Uint8Array)return n.from(t);var l=i(t);if(l)for(var f=0;f255||~~p!==p)throw new RangeError("Array items must be numbers in the range 0-255.")}if(l||n.isBuffer(t)&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return n.from(t);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}},92006(t){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},74372(t,e,r){"use strict";var n=r(69675),i=r(36556)("TypedArray.prototype.buffer",!0),a=r(35680);t.exports=i||function(t){if(!a(t))throw new n("Not a Typed Array");return t.buffer}},61270(t,e,r){var n;t=r.nmd(t),function(){e&&e.nodeType,t&&t.nodeType;var i="object"==typeof r.g&&r.g;i.global!==i&&i.window!==i&&i.self;var a,s=2147483647,o=36,u=/^xn--/,h=/[^\x20-\x7E]/,c=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,p=String.fromCharCode;function d(t){throw new RangeError(l[t])}function g(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function m(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+g((t=t.replace(c,".")).split("."),e).join(".")}function y(t){for(var e,r,n=[],i=0,a=t.length;i=55296&&e<=56319&&i65535&&(e+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+p(t)}).join("")}function v(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:o}function b(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function w(t,e,r){var n=0;for(t=r?f(t/700):t>>1,t+=f(t/e);t>455;n+=o)t=f(t/35);return f(n+36*t/(t+38))}function C(t){var e,r,n,i,a,u,h,c,l,p,g=[],m=t.length,y=0,b=128,C=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n=128&&d("not-basic"),g.push(t.charCodeAt(n));for(i=r>0?r+1:0;i=m&&d("invalid-input"),((c=v(t.charCodeAt(i++)))>=o||c>f((s-y)/u))&&d("overflow"),y+=c*u,!(c<(l=h<=C?1:h>=C+26?26:h-C));h+=o)u>f(s/(p=o-l))&&d("overflow"),u*=p;C=w(y-a,e=g.length+1,0==a),f(y/e)>s-b&&d("overflow"),b+=f(y/e),y%=e,g.splice(y++,0,b)}return A(g)}function E(t){var e,r,n,i,a,u,h,c,l,g,m,A,v,C,E,S=[];for(A=(t=y(t)).length,e=128,r=0,a=72,u=0;u=e&&mf((s-r)/(v=n+1))&&d("overflow"),r+=(h-e)*v,e=h,u=0;us&&d("overflow"),m==e){for(c=r,l=o;!(c<(g=l<=a?1:l>=a+26?26:l-a));l+=o)E=c-g,C=o-g,S.push(p(b(g+E%C,0))),c=f(E/C);S.push(p(b(c,0))),a=w(r,v,n==i),r=0,++n}++r,++e}return S.join("")}a={version:"1.4.1",ucs2:{decode:y,encode:A},decode:C,encode:E,toASCII:function(t){return m(t,function(t){return h.test(t)?"xn--"+E(t):t})},toUnicode:function(t){return m(t,function(t){return u.test(t)?C(t.slice(4).toLowerCase()):t})}},void 0===(n=function(){return a}.call(e,r,e,t))||(t.exports=n)}()},88835(t,e,r){"use strict";var n=r(61270);function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,o=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),h=["'"].concat(u),c=["%","/","?",";","#"].concat(h),l=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,d={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=r(55373);function A(t,e,r){if(t&&"object"==typeof t&&t instanceof i)return t;var n=new i;return n.parse(t,e,r),n}i.prototype.parse=function(t,e,r){if("string"!=typeof t)throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),s=-1!==i&&i127?F+="x":F+=R[D];if(!F.match(f)){var L=x.slice(0,B),N=x.slice(B+1),H=R.match(p);H&&(L.push(H[1]),N.unshift(H[2])),N.length&&(A="/"+N.join(".")+A),this.hostname=L.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),M||(this.hostname=n.toASCII(this.hostname));var P=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+P,this.href+=this.host,M&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==A[0]&&(A="/"+A))}if(!d[w])for(B=0,T=h.length;B0)&&r.host.split("@"))&&(r.auth=M.shift(),r.hostname=M.shift(),r.host=r.hostname)),r.search=t.search,r.query=t.query,null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!C.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var S=C.slice(-1)[0],I=(r.host||t.host||C.length>1)&&("."===S||".."===S)||""===S,B=0,_=C.length;_>=0;_--)"."===(S=C[_])?C.splice(_,1):".."===S?(C.splice(_,1),B++):B&&(C.splice(_,1),B--);if(!b&&!w)for(;B--;B)C.unshift("..");!b||""===C[0]||C[0]&&"/"===C[0].charAt(0)||C.unshift(""),I&&"/"!==C.join("/").substr(-1)&&C.push("");var M,x=""===C[0]||C[0]&&"/"===C[0].charAt(0);return E&&(r.hostname=x?"":C.length?C.shift():"",r.host=r.hostname,(M=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=M.shift(),r.hostname=M.shift(),r.host=r.hostname)),(b=b||r.host&&C.length)&&!x&&C.unshift(""),C.length>0?r.pathname=C.join("/"):(r.pathname=null,r.path=null),null===r.pathname&&null===r.search||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},e.parse=A,e.resolve=function(t,e){return A(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?A(t,!1,!0).resolveObject(e):e},e.format=function(t){return"string"==typeof t&&(t=A(t)),t instanceof i?t.format():i.prototype.format.call(t)},e.Url=i},90031(t,e){!function(t){var e,r,n,i=String.fromCharCode;function a(t){for(var e,r,n=[],i=0,a=t.length;i=55296&&e<=56319&&i=55296&&t<=57343)throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}function o(t,e){return i(t>>e&63|128)}function u(t){if(!(4294967168&t))return i(t);var e="";return 4294965248&t?4294901760&t?4292870144&t||(e=i(t>>18&7|240),e+=o(t,12),e+=o(t,6)):(s(t),e=i(t>>12&15|224),e+=o(t,6)):e=i(t>>6&31|192),e+i(63&t|128)}function h(){if(n>=r)throw Error("Invalid byte index");var t=255&e[n];if(n++,128==(192&t))return 63&t;throw Error("Invalid continuation byte")}function c(){var t,i;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(t=255&e[n],n++,!(128&t))return t;if(192==(224&t)){if((i=(31&t)<<6|h())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&t)){if((i=(15&t)<<12|h()<<6|h())>=2048)return s(i),i;throw Error("Invalid continuation byte")}if(240==(248&t)&&(i=(7&t)<<18|h()<<12|h()<<6|h())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}t.version="3.0.0",t.encode=function(t){for(var e=a(t),r=e.length,n=-1,i="";++n65535&&(a+=i((e-=65536)>>>10&1023|55296),e=56320|1023&e),a+=i(e);return a}(o)}}(e)},94643(t,e,r){function n(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},36622(t){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},81135(t){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},40537(t,e,r){var n=r(65606),i=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r=a)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),u=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),A(n.showHidden)&&(n.showHidden=!1),A(n.depth)&&(n.depth=2),A(n.colors)&&(n.colors=!1),A(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),c(n,t,n.depth)}function u(t,e){var r=o.styles[e];return r?"["+o.colors[r][0]+"m"+t+"["+o.colors[r][1]+"m":t}function h(t,e){return t}function c(t,r,n){if(t.customInspect&&r&&E(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var a=function(t,e){if(A(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return m(e)?t.stylize(""+e,"number"):d(e)?t.stylize(""+e,"boolean"):g(e)?t.stylize("null","null"):void 0}(t,r);if(a)return a;var s=Object.keys(r),o=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),C(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(E(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(v(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return t.stylize(Date.prototype.toString.call(r),"date");if(C(r))return l(r)}var h,b="",S=!1,I=["{","}"];return p(r)&&(S=!0,I=["[","]"]),E(r)&&(b=" [Function"+(r.name?": "+r.name:"")+"]"),v(r)&&(b=" "+RegExp.prototype.toString.call(r)),w(r)&&(b=" "+Date.prototype.toUTCString.call(r)),C(r)&&(b=" "+l(r)),0!==s.length||S&&0!=r.length?n<0?v(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),h=S?function(t,e,r,n,i){for(var a=[],s=0,o=e.length;s60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(h,b,I)):I[0]+b+I[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i,a){var s,o,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?o=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(o=t.stylize("[Setter]","special")),_(n,i)||(s="["+i+"]"),o||(t.seen.indexOf(u.value)<0?(o=g(r)?c(t,u.value,null):c(t,u.value,r-1)).indexOf("\n")>-1&&(o=a?o.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+o.split("\n").map(function(t){return" "+t}).join("\n")):o=t.stylize("[Circular]","special")),A(s)){if(a&&i.match(/^\d+$/))return o;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+o}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function m(t){return"number"==typeof t}function y(t){return"string"==typeof t}function A(t){return void 0===t}function v(t){return b(t)&&"[object RegExp]"===S(t)}function b(t){return"object"==typeof t&&null!==t}function w(t){return b(t)&&"[object Date]"===S(t)}function C(t){return b(t)&&("[object Error]"===S(t)||t instanceof Error)}function E(t){return"function"==typeof t}function S(t){return Object.prototype.toString.call(t)}function I(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(A(a)&&(a=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(a)){var r=n.pid;s[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else s[t]=function(){};return s[t]},e.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=d,e.isNull=g,e.isNullOrUndefined=function(t){return null==t},e.isNumber=m,e.isString=y,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=A,e.isRegExp=v,e.isObject=b,e.isDate=w,e.isError=C,e.isFunction=E,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(81135);var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,r;console.log("%s - %s",(r=[I((t=new Date).getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":"),[t.getDate(),B[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=r(36622),e._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}},25767(t,e,r){"use strict";var n=r(60301),i=r(39209),a=r(10487),s=r(36556),o=r(75795),u=s("Object.prototype.toString"),h=r(49092)(),c="undefined"==typeof globalThis?r.g:globalThis,l=i(),f=s("String.prototype.slice"),p=Object.getPrototypeOf,d=s("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r-1?e:"Object"===e&&function(t){var e=!1;return n(g,function(r,n){if(!e)try{r(t),e=f(n,1)}catch(t){}}),e}(t)}return o?function(t){var e=!1;return n(g,function(r,n){if(!e)try{"$"+r(t)===n&&(e=f(n,1))}catch(t){}}),e}(t):null}},42789(){},18950(){},78982(){},47790(){},73776(){},77965(){},66089(){},79368(){},64688(){},42363(){},50310(){},35208(){},42634(){},51069(){},15340(){},79838(){},63779(){},77199(){},25172(t){t.exports=function(t,e){this.v=t,this.k=e},t.exports.__esModule=!0,t.exports.default=t.exports},16993(t,e,r){var n=r(75546);function i(){var e,r,a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",o=a.toStringTag||"@@toStringTag";function u(t,i,a,s){var o=i&&i.prototype instanceof c?i:c,u=Object.create(o.prototype);return n(u,"_invoke",function(t,n,i){var a,s,o,u=0,c=i||[],l=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,r){return a=t,s=0,o=e,f.n=r,h}};function p(t,n){for(s=t,o=n,r=0;!l&&u&&!i&&r3?(i=d===n)&&(o=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=e):a[0]<=p&&((i=t<2&&pn||n>d)&&(a[4]=t,a[5]=n,f.n=d,s=0))}if(i||t>1)return h;throw l=!0,n}return function(i,c,d){if(u>1)throw TypeError("Generator is already running");for(l&&1===c&&p(c,d),s=c,o=d;(r=s<2?e:o)||!l;){a||(s?s<3?(s>1&&(f.n=-1),p(s,o)):f.n=o:f.v=o);try{if(u=2,a){if(s||(i="next"),r=a[i]){if(!(r=r.call(a,o)))throw TypeError("iterator result is not an object");if(!r.done)return r;o=r.value,s<2&&(s=0)}else 1===s&&(r=a.return)&&r.call(a),s<2&&(o=TypeError("The iterator does not provide a '"+i+"' method"),s=1);a=e}else if((r=(l=f.n<0)?o:t.call(n,f))!==h)break}catch(t){a=e,s=1,o=t}finally{u=1}}return{value:r,done:l}}}(t,a,s),!0),u}var h={};function c(){}function l(){}function f(){}r=Object.getPrototypeOf;var p=[][s]?r(r([][s]())):(n(r={},s,function(){return this}),r),d=f.prototype=c.prototype=Object.create(p);function g(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,n(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return l.prototype=f,n(d,"constructor",f),n(f,"constructor",l),l.displayName="GeneratorFunction",n(f,o,"GeneratorFunction"),n(d),n(d,o,"Generator"),n(d,s,function(){return this}),n(d,"toString",function(){return"[object Generator]"}),(t.exports=i=function(){return{w:u,m:g}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},55869(t,e,r){var n=r(887);t.exports=function(t,e,r,i,a){var s=n(t,e,r,i,a);return s.next().then(function(t){return t.done?t.value:s.next()})},t.exports.__esModule=!0,t.exports.default=t.exports},887(t,e,r){var n=r(16993),i=r(11791);t.exports=function(t,e,r,a,s){return new i(n().w(t,e,r,a),s||Promise)},t.exports.__esModule=!0,t.exports.default=t.exports},11791(t,e,r){var n=r(25172),i=r(75546);t.exports=function t(e,r){function a(t,i,s,o){try{var u=e[t](i),h=u.value;return h instanceof n?r.resolve(h.v).then(function(t){a("next",t,s,o)},function(t){a("throw",t,s,o)}):r.resolve(h).then(function(t){u.value=t,s(u)},function(t){return a("throw",t,s,o)})}catch(t){o(t)}}var s;this.next||(i(t.prototype),i(t.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(t,e,n){function i(){return new r(function(e,r){a(t,n,e,r)})}return s=s?s.then(i,i):i()},!0)},t.exports.__esModule=!0,t.exports.default=t.exports},75546(t){function e(r,n,i,a){var s=Object.defineProperty;try{s({},"",{})}catch(r){s=0}t.exports=e=function(t,r,n,i){function a(r,n){e(t,r,function(t){return this._invoke(r,n,t)})}r?s?s(t,r,{value:n,enumerable:!i,configurable:!i,writable:!i}):t[r]=n:(a("next",0),a("throw",1),a("return",2))},t.exports.__esModule=!0,t.exports.default=t.exports,e(r,n,i,a)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},4373(t){t.exports=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},t.exports.__esModule=!0,t.exports.default=t.exports},4633(t,e,r){var n=r(25172),i=r(16993),a=r(55869),s=r(887),o=r(11791),u=r(4373),h=r(30579);function c(){"use strict";var e=i(),r=e.m(c),l=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function f(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))}var p={throw:1,return:2,break:3,continue:3};function d(t){var e,r;return function(n){e||(e={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(t,e){return r(n.a,p[t],e)},delegateYield:function(t,i,a){return e.resultName=i,r(n.d,h(t),a)},finish:function(t){return r(n.f,t)}},r=function(t,r,i){n.p=e.prev,n.n=e.next;try{return t(r,i)}finally{e.next=n.n}}),e.resultName&&(e[e.resultName]=n.v,e.resultName=void 0),e.sent=n.v,e.next=n.n;try{return t.call(this,e)}finally{n.p=e.prev,n.n=e.next}}}return(t.exports=c=function(){return{wrap:function(t,r,n,i){return e.w(d(t),r,n,i&&i.reverse())},isGeneratorFunction:f,mark:e.m,awrap:function(t,e){return new n(t,e)},AsyncIterator:o,async:function(t,e,r,n,i){return(f(e)?s:a)(d(t),e,r,n,i)},keys:u,values:h}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=c,t.exports.__esModule=!0,t.exports.default=t.exports},30579(t,e,r){var n=r(73738).default;t.exports=function(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}throw new TypeError(n(t)+" is not iterable")},t.exports.__esModule=!0,t.exports.default=t.exports},73738(t){function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},54756(t,e,r){var n=r(4633)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},39209(t,e,r){"use strict";var n=r(76578),i="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{"use strict";var t={};function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}function a(t,e){for(var r=0;reo,NIL:()=>ro,parse:()=>no,stringify:()=>so,v1:()=>fo,v1ToV6:()=>po,v3:()=>_o,v4:()=>xo,v5:()=>ko,v6:()=>Lo,v6ToV1:()=>No,v7:()=>Uo,validate:()=>ee,version:()=>re});var p=r(54756),d=r.n(p);function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=";if(!t)return"";if("string"==typeof t&&(t=P.strToArrayBuffer(t)),t instanceof ArrayBuffer&&(t=new Uint8Array(t)),64!==(e=P.expandAlphRange(e).join("")).length&&65!==e.length)throw new I(`Invalid Base64 alphabet length (${e.length}): ${e}`);for(var r,n,i,a,s,o,u,h="",c=0;c>2,s=(3&r)<<4|(n=t[c++])>>4,o=(15&n)<<2|(i=t[c++])>>6,u=63&i,isNaN(n)?o=u=64:isNaN(i)&&(u=64),h+=e.charAt(a)+e.charAt(s)+e.charAt(o)+e.charAt(u);return h}function _(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string",n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!t)return"string"===r?"":[];if(e=e||"A-Za-z0-9+/=",64!==(e=P.expandAlphRange(e).join("")).length&&65!==e.length)throw new I(`Error: Base64 alphabet should be 64 characters long, or 65 with a padding character. Found ${e.length}: ${e}`);if(n){var a=new RegExp("[^"+e.replace(/[[\]\\\-^$]/g,"\\$&")+"]","g");t=t.replace(a,"")}if(i){if(t.length%4==1)throw new I(`Error: Invalid Base64 input length (${t.length}). Cannot be 4n+1, even without padding chars.`);if(65===e.length){var s=e.charAt(64),o=t.indexOf(s);if(o>=0){if(o>2,c=(3&p)<<6|d,(u=l<<2|f>>4)>=0&&u<256&&g.push(u),h>=0&&h<256&&64!==p&&g.push(h),c>=0&&c<256&&64!==d&&g.push(c)}return"string"===r?P.byteArrayToUtf8(g):g}function M(t){if(!t)return"";t instanceof ArrayBuffer&&(t=new Uint8Array(t));for(var e=[],r=0;r>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")}function x(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(r<1||Math.round(r)!==r)throw new I("Byte length must be a positive integer");if("None"!==e){var n="Auto"===e?/[^a-f\d]|0x/gi:P.regexRep(e);t=t.split(n)}else t=[t];for(var i=[],a=0;a1&&void 0!==arguments[1]?arguments[1]:"Auto";e=P.charRep(e);var r=[],n=t.split(e);""===n[n.length-1]&&(n=n.slice(0,n.length-1));for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:"Space",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8;if(r<1||Math.round(r)!==r)throw new I("Byte length must be a positive integer");var n=P.regexRep(e);t=t.replace(n,"");for(var i=[],a=0;a65535){t-=65536;var e=String.fromCharCode(t>>>10&1023|55296);return t=56320|1023&t,e+String.fromCharCode(t)}return String.fromCharCode(t)}},{key:"ord",value:function(t){if(2===t.length){var e=t.charCodeAt(0),r=t.charCodeAt(1);if(e>=55296&&e<56320&&r>=56320&&r<57344)return 1024*(e-55296)+r-56320+65536}return t.charCodeAt(0)}},{key:"padBytesRight",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=new Array(e);return n.fill(r),y(t).forEach(function(t,e){n[e]=t}),n}},{key:"truncate",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return t.length>e&&(t=t.slice(0,e-r.length)+r),t}},{key:"hex",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return(e="string"==typeof e?t.ord(e):e).toString(16).padStart(r,"0")}},{key:"bin",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return(e="string"==typeof e?t.ord(e):e).toString(2).padStart(r,"0")}},{key:"printable",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t.replace(/[^\x20-\x7e]/g,"."):(t=t.replace(/[\0-\x08\x0B-\x0C\x0E-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,"."),e||(t=t.replace(/[\x09-\x10\u2028\u2029]/g,".")),t)}},{key:"escapeWhitespace",value:function(t){return t.replace(/[\x09-\x10]/g,function(t){return String.fromCharCode(57344+t.charCodeAt(0))})}},{key:"parseEscapedChars",value:function(t){return t.replace(/\\([abfnrtv'"]|[0-3][0-7]{2}|[0-7]{1,2}|x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]{1,6}\}|\\)/g,function(t,e){switch(e[0]){case"\\":return"\\";case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":return String.fromCharCode(parseInt(e,8));case"a":return String.fromCharCode(7);case"b":return"\b";case"t":return"\t";case"n":return"\n";case"v":return"\v";case"f":return"\f";case"r":return"\r";case'"':return'"';case"'":return"'";case"x":return String.fromCharCode(parseInt(e.substr(1),16));case"u":return"{"===e[1]?String.fromCodePoint(parseInt(e.slice(2,-1),16)):String.fromCharCode(parseInt(e.substr(1),16))}})}},{key:"escapeRegex",value:function(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}},{key:"expandAlphRange",value:function(e){for(var r=[],n=0;n=0;i--)r=256*r+t[i];return r}},{key:"intToByteArray",value:function(t,e,r){var n=new Array(e);if("little"===r)for(var i=0;i>>=8;else for(var a=e-1;a>=0;a--)n[a]=255&t,t>>>=8;return n}},{key:"strToArrayBuffer",value:function(e){if(v().debug(`Converting string[${null==e?void 0:e.length}] to array buffer`),!e)return new ArrayBuffer;for(var r,n=new Uint8Array(e.length),i=e.length;i--;)if(r=e.charCodeAt(i),n[i]=r,r>255)return t.strToUtf8ArrayBuffer(e);return n.buffer}},{key:"strToUtf8ArrayBuffer",value:function(t){if(v().debug(`Converting string[${null==t?void 0:t.length}] to UTF8 array buffer`),!t)return new ArrayBuffer;var e=new TextEncoder("utf-8").encode(t);return t.length!==e.length&&(H()&&self&&"function"==typeof self.setOption?self.setOption("attemptHighlight",!1):N()&&(window.app.options.attemptHighlight=!1)),e.buffer}},{key:"strToByteArray",value:function(e){if(v().debug(`Converting string[${null==e?void 0:e.length}] to byte array`),!e)return[];for(var r,n=new Array(e.length),i=e.length;i--;)if(r=e.charCodeAt(i),n[i]=r,r>255)return t.strToUtf8ByteArray(e);return n}},{key:"strToUtf8ByteArray",value:function(e){if(v().debug(`Converting string[${null==e?void 0:e.length}] to UTF8 byte array`),!e)return[];var r=w().encode(e);return e.length!==r.length&&(H()?self.setOption("attemptHighlight",!1):N()&&(window.app.options.attemptHighlight=!1)),t.strToByteArray(r)}},{key:"strToCharcode",value:function(e){if(v().debug(`Converting string[${null==e?void 0:e.length}] to charcode`),!e)return[];for(var r=[],n=0;n=55296&&i<56320){var a=e[n+1].charCodeAt(0);a>=56320&&a<57344&&(i=t.ord(e[n]+e[++n]))}r.push(i)}return r}},{key:"byteArrayToUtf8",value:function(e){var r;if(v().debug(`Converting byte array[${null===(r=e)||void 0===r?void 0:r.length}] to UTF8`),!e||!e.length)return"";e instanceof Uint8Array||(e=new Uint8Array(e));try{var n=new TextDecoder("utf-8",{fatal:!0}).decode(e);return n.length!==e.length&&(H()?self.setOption("attemptHighlight",!1):N()&&(window.app.options.attemptHighlight=!1)),n}catch(r){return t.byteArrayToChars(e)}}},{key:"byteArrayToChars",value:function(t){if(v().debug(`Converting byte array[${null==t?void 0:t.length}] to chars`),!t||!t.length)return"";for(var e="",r=0;r1&&void 0!==arguments[1])||arguments[1];if(v().debug(`Converting array buffer[${null==e?void 0:e.byteLength}] to str`),!e||!e.byteLength)return"";var n=new Uint8Array(e);return r?t.byteArrayToUtf8(n):t.byteArrayToChars(n)}},{key:"calculateShannonEntropy",value:function(t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var e,r=[],n=new Array(256).fill(0);for(e=0;e0&&r.push(n[e]/t.length);var i,a=0;for(e=0;e1&&void 0!==arguments[1]?arguments[1]:[","],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["\n","\r"],a=!1,s=!1,o="",u=[],h=[];t.length&&"\ufeff"===t[0]&&(t=t.substr(1));for(var c=0;c=0?(u.push(o),o=""):!s&&i.indexOf(e)>=0?(u.push(o),o="",h.push(u),u=[],i.indexOf(r)>=0&&r!==e&&c++):o+=e:s=!0;return u.length&&(u.push(o),h.push(u)),h}},{key:"stripHtmlTags",value:function(t){function e(t,r){var n=r.replace(t,"");return n.length===r.length?n:e(t,n)}return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(t=e(/]*>(\s|\S)*?<\/script[^>]*>/gi,t),t=e(/]*>(\s|\S)*?<\/style[^>]*>/gi,t)),e(/<[^>]+>/g,t)}},{key:"escapeHtml",value:function(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","\0":""};return t?t.replace(/[&<>"'`\u0000]/g,function(t){return e[t]}):t}},{key:"unescapeHtml",value:function(t){var e={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/","`":"`","":"\0"};return t.replace(/(&#?x?[a-z0-9]{2,4};|\ue000)/gi,function(t){return e[t]||t})}},{key:"toTitleCase",value:function(t){return t.replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()})}},{key:"encodeURIFragment",value:function(t){var e={"%2D":"-","%2E":".","%5F":"_","%7E":"~","%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2C":",","%3B":";","%3A":":","%40":"@","%2F":"/","%3F":"?"};return(t=encodeURIComponent(t)).replace(/%[0-9A-F]{2}/g,function(t){return e[t]||t})}},{key:"generatePrettyRecipe",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="",i="",a="",s="";return t.forEach(function(t){n=t.op.replace(/ /g,"_"),i=JSON.stringify(t.args).slice(1,-1).replace(/'/g,"\\'").replace(/"((?:[^"\\]|\\.)*)"/g,"'$1'").replace(/\\"/g,'"'),a=t.disabled?"/disabled":"",s=t.breakpoint?"/breakpoint":"",r+=`${n}(${i}${a}${s})`,e&&(r+="\n")}),r}},{key:"parseRecipeConfig",value:function(t){if(0===(t=t.trim()).length)return[];if("["===t[0])return JSON.parse(t);var e,r;t=t.replace(/\n/g,"");for(var n=/([^(]+)\(((?:'[^'\\]*(?:\\.[^'\\]*)*'|[^)/'])*)(\/[^)]+)?\)/g,i=[];e=n.exec(t);){r="["+(r=e[2].replace(/"/g,'\\"').replace(/(^|,|{|:)'/g,'$1"').replace(/([^\\]|(?:\\\\)+)'(,|:|}|$)/g,'$1"$2').replace(/\\'/g,"'"))+"]";var a={op:e[1].replace(/_/g," "),args:JSON.parse(r)};e[3]&&e[3].indexOf("disabled")>0&&(a.disabled=!0),e[3]&&e[3].indexOf("breakpoint")>0&&(a.breakpoint=!0),i.push(a)}return i}},{key:"displayFilesAsHTML",value:(r=f(d().mark(function e(r){var n,i,a,s,o,u;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=function(e){return`
\n
\n
\n ${t.escapeHtml(e.name)}\n
\n
\n
`},i=function(e,r){if(r.startsWith("image")){var n="data:";return n+=r+";",""}return`
${t.escapeHtml(t.arrayBufferToStr(e.buffer))}
`},a=function(){var e=f(d().mark(function e(r,n){var a,s,o,u;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,t.readFile(r);case 1:return a=e.sent,s=new Blob([a],{type:r.type||"octet/stream"}),o=URL.createObjectURL(s),u=`
\n
\n
\n \n \n ${r.size.toLocaleString()} bytes\n \n save\n \n \n open_in_browser\n \n \n
\n
\n
\n
\n ${i(a,r.type)}\n
\n
\n
`,e.abrupt("return",u);case 2:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}(),s=`
\n ${r.length} file(s) found\n
`,o=0;case 1:if(!(o=t.size)e(i);else{var r=t.slice(a,a+s);n.readAsArrayBuffer(r)}};n.onload=function(t){i.set(new Uint8Array(n.result),a),a+=s,o()},n.onerror=function(t){r(n.error.message)},o()})}},{key:"readFileSync",value:function(t){if(!L())throw new TypeError("Browser environment cannot support readFileSync");return Uint8Array.from(t.data).buffer}},{key:"mod",value:function(t,e){return(t%e+e)%e}},{key:"gcd",value:function(e,r){return r?t.gcd(r,e%r):e}},{key:"modInv",value:function(t,e){t%=e;for(var r=1;rt?String(this):((t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),e.slice(0,t)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(t,e){return t|=0,e=String(void 0!==e?e:" "),this.length>t?String(this):((t-=this.length)>e.length&&(e+=e.repeat(t/e.length)),String(this)+e.slice(0,t))});const O=function(t){function r(){var t,n,i,a;e(this,r);for(var s=arguments.length,h=new Array(s),c=0;c0||t===e?e:e-1}function $(t){for(var e,r,n=1,i=t.length,a=t[0]+"";nh^r?1:-1;for(o=(u=i.length)<(h=a.length)?u:h,s=0;sa[s]^r?1:-1;return u==h?0:u>h^r?1:-1}function et(t,e,r,n){if(tr||t!==K(t))throw Error(G+(n||"Argument")+("number"==typeof t?tr?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function rt(t){var e=t.c.length-1;return Z(t.e/W)==e&&t.c[e]%2!=0}function nt(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function it(t,e,r){var n,i;if(e<0){for(i=r+".";++e;i+=r);t=i+t}else if(++e>(n=t.length)){for(i=r,e-=n;--e;i+=r);t+=i}else ev?f.c=f.e=null:t.e=10;u/=10,o++);return void(o>v?f.c=f.e=null:(f.e=o,f.c=[t]))}l=String(t)}else{if(!Q.test(l=String(t)))return i(f,l,h);f.s=45==l.charCodeAt(0)?(l=l.slice(1),-1):1}(o=l.indexOf("."))>-1&&(l=l.replace(".","")),(u=l.search(/e/i))>0?(o<0&&(o=u),o+=+l.slice(u+1),l=l.substring(0,u)):o<0&&(o=l.length)}else{if(et(e,2,S.length,"Base"),10==e&&I)return T(f=new B(t),d+f.e+1,g);if(l=String(t),h="number"==typeof t){if(0*t!=0)return i(f,l,h,e);if(f.s=1/t<0?(l=l.slice(1),-1):1,B.DEBUG&&l.replace(/^0\.0*|\./,"").length>15)throw Error(V+t)}else f.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1;for(r=S.slice(0,e),o=u=0,c=l.length;uo){o=c;continue}}else if(!s&&(l==l.toUpperCase()&&(l=l.toLowerCase())||l==l.toLowerCase()&&(l=l.toUpperCase()))){s=!0,u=-1,o=0;continue}return i(f,String(t),h,e)}h=!1,(o=(l=n(l,e,10,f.s)).indexOf("."))>-1?l=l.replace(".",""):o=l.length}for(u=0;48===l.charCodeAt(u);u++);for(c=l.length;48===l.charCodeAt(--c););if(l=l.slice(u,++c)){if(c-=u,h&&B.DEBUG&&c>15&&(t>z||t!==K(t)))throw Error(V+f.s*t);if((o=o-u-1)>v)f.c=f.e=null;else if(o=y)?nt(u,s):it(u,s,"0");else if(a=(t=T(new B(t),e,r)).e,o=(u=$(t.c)).length,1==n||2==n&&(e<=a||a<=m)){for(;os),u=it(u,a,"0"),a+1>o){if(--e>0)for(u+=".";e--;u+="0");}else if((e+=a-o)>0)for(a+1==o&&(u+=".");e--;u+="0");return t.s<0&&i?"-"+u:u}function M(t,e){for(var r,n,i=1,a=new B(t[0]);i=10;i/=10,n++);return(r=n+r*W-1)>v?t.c=t.e=null:r=10;o/=10,i++);if((a=e-i)<0)a+=W,s=e,u=l[h=0],c=K(u/f[i-s-1]%10);else if((h=j((a+1)/W))>=l.length){if(!n)break t;for(;l.length<=h;l.push(0));u=c=0,i=1,s=(a%=W)-W+1}else{for(u=o=l[h],i=1;o>=10;o/=10,i++);c=(s=(a%=W)-W+i)<0?0:K(u/f[i-s-1]%10)}if(n=n||e<0||null!=l[h+1]||(s<0?u:u%f[i-s-1]),n=r<4?(c||n)&&(0==r||r==(t.s<0?3:2)):c>5||5==c&&(4==r||n||6==r&&(a>0?s>0?u/f[i-s]:0:l[h-1])%10&1||r==(t.s<0?8:7)),e<1||!l[0])return l.length=0,n?(e-=t.e+1,l[0]=f[(W-e%W)%W],t.e=-e||0):l[0]=t.e=0,t;if(0==a?(l.length=h,o=1,h--):(l.length=h+1,o=f[W-a],l[h]=s>0?K(u/f[i-s]%f[s])*o:0),n)for(;;){if(0==h){for(a=1,s=l[0];s>=10;s/=10,a++);for(s=l[0]+=o,o=1;s>=10;s/=10,o++);a!=o&&(t.e++,l[0]==q&&(l[0]=1));break}if(l[h]+=o,l[h]!=q)break;l[h--]=0,o=1}for(a=l.length;0===l[--a];l.pop());}t.e>v?t.c=t.e=null:t.e=y?nt(e,r):it(e,r,"0"),t.s<0?"-"+e:e)}return B.clone=t,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(t){var e,r;if(null!=t){if("object"!=typeof t)throw Error(G+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(et(r=t[e],0,X,e),d=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(et(r=t[e],0,8,e),g=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(et(r[0],-X,0,e),et(r[1],0,X,e),m=r[0],y=r[1]):(et(r,-X,X,e),m=-(y=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)et(r[0],-X,-1,e),et(r[1],1,X,e),A=r[0],v=r[1];else{if(et(r,-X,X,e),!r)throw Error(G+e+" cannot be zero: "+r);A=-(v=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(G+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw b=!r,Error(G+"crypto unavailable");b=r}else b=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(et(r=t[e],0,9,e),w=r),t.hasOwnProperty(e="POW_PRECISION")&&(et(r=t[e],0,X,e),C=r),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(r=t[e]))throw Error(G+e+" not an object: "+r);E=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(G+e+" invalid: "+r);I="0123456789"==r.slice(0,10),S=r}}return{DECIMAL_PLACES:d,ROUNDING_MODE:g,EXPONENTIAL_AT:[m,y],RANGE:[A,v],CRYPTO:b,MODULO_MODE:w,POW_PRECISION:C,FORMAT:E,ALPHABET:S}},B.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!B.DEBUG)return!0;var e,r,n=t.c,i=t.e,a=t.s;t:if("[object Array]"=={}.toString.call(n)){if((1===a||-1===a)&&i>=-X&&i<=X&&i===K(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break t}if((e=(i+1)%W)<1&&(e+=W),String(n[0]).length==e){for(e=0;e=q||r!==K(r))break t;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(G+"Invalid BigNumber: "+t)},B.maximum=B.max=function(){return M(arguments,-1)},B.minimum=B.min=function(){return M(arguments,1)},B.random=(a=9007199254740992,s=Math.random()*a&2097151?function(){return K(Math.random()*a)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,r,n,i,a,o=0,u=[],h=new B(p);if(null==t?t=d:et(t,0,X),i=j(t/W),b)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(i*=2));o>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[o]=r[0],e[o+1]=r[1]):(u.push(a%1e14),o+=2);o=i/2}else{if(!crypto.randomBytes)throw b=!1,Error(G+"crypto unavailable");for(e=crypto.randomBytes(i*=7);o=9e15?crypto.randomBytes(7).copy(e,o):(u.push(a%1e14),o+=7);o=i/7}if(!b)for(;o=10;a/=10,o++);or-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(n,i,a,s,o){var u,h,c,l,f,p,m,y,A=n.indexOf("."),v=d,b=g;for(A>=0&&(l=C,C=0,n=n.replace(".",""),p=(y=new B(i)).pow(n.length-A),C=l,y.c=e(it($(p.c),p.e,"0"),10,a,t),y.e=y.c.length),c=l=(m=e(n,i,a,o?(u=S,t):(u=t,S))).length;0==m[--l];m.pop());if(!m[0])return u.charAt(0);if(A<0?--c:(p.c=m,p.e=c,p.s=s,m=(p=r(p,y,v,b,a)).c,f=p.r,c=p.e),A=m[h=c+v+1],l=a/2,f=f||h<0||null!=m[h+1],f=b<4?(null!=A||f)&&(0==b||b==(p.s<0?3:2)):A>l||A==l&&(4==b||f||6==b&&1&m[h-1]||b==(p.s<0?8:7)),h<1||!m[0])n=f?it(u.charAt(1),-v,u.charAt(0)):u.charAt(0);else{if(m.length=h,f)for(--a;++m[--h]>a;)m[h]=0,h||(++c,m=[1].concat(m));for(l=m.length;!m[--l];);for(A=0,n="";A<=l;n+=u.charAt(m[A++]));n=it(n,c,u.charAt(0))}return n}}(),r=function(){function t(t,e,r){var n,i,a,s,o=0,u=t.length,h=e%J,c=e/J|0;for(t=t.slice();u--;)o=((i=h*(a=t[u]%J)+(n=c*a+(s=t[u]/J|0)*h)%J*J+o)/r|0)+(n/J|0)+c*s,t[u]=i%r;return o&&(t=[o].concat(t)),t}function e(t,e,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;ie[i]?1:-1;break}return a}function r(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]1;t.splice(0,1));}return function(n,i,a,s,o){var u,h,c,l,f,p,d,g,m,y,A,v,b,w,C,E,S,I=n.s==i.s?1:-1,_=n.c,M=i.c;if(!(_&&_[0]&&M&&M[0]))return new B(n.s&&i.s&&(_?!M||_[0]!=M[0]:M)?_&&0==_[0]||!M?0*I:I/0:NaN);for(m=(g=new B(I)).c=[],I=a+(h=n.e-i.e)+1,o||(o=q,h=Z(n.e/W)-Z(i.e/W),I=I/W|0),c=0;M[c]==(_[c]||0);c++);if(M[c]>(_[c]||0)&&h--,I<0)m.push(1),l=!0;else{for(w=_.length,E=M.length,c=0,I+=2,(f=K(o/(M[0]+1)))>1&&(M=t(M,f,o),_=t(_,f,o),E=M.length,w=_.length),b=E,A=(y=_.slice(0,E)).length;A=o/2&&C++;do{if(f=0,(u=e(M,y,E,A))<0){if(v=y[0],E!=A&&(v=v*o+(y[1]||0)),(f=K(v/C))>1)for(f>=o&&(f=o-1),d=(p=t(M,f,o)).length,A=y.length;1==e(p,y,d,A);)f--,r(p,E=10;I/=10,c++);T(g,a+(g.e=c+h*W-1)+1,s,l)}else g.e=h,g.r=+l;return g}}(),o=/^(-?)0([xbo])(?=\w[\w.]*$)/i,u=/^([^.]+)\.$/,h=/^\.([^.]+)$/,c=/^-?(Infinity|NaN)$/,l=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(t,e,r,n){var i,a=r?e:e.replace(l,"");if(c.test(a))t.s=isNaN(a)?null:a<0?-1:1;else{if(!r&&(a=a.replace(o,function(t,e,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?t:e}),n&&(i=n,a=a.replace(u,"$1").replace(h,"0.$1")),e!=a))return new B(a,i);if(B.DEBUG)throw Error(G+"Not a"+(n?" base "+n:"")+" number: "+e);t.s=null}t.c=t.e=null},f.absoluteValue=f.abs=function(){var t=new B(this);return t.s<0&&(t.s=1),t},f.comparedTo=function(t,e){return tt(this,new B(t,e))},f.decimalPlaces=f.dp=function(t,e){var r,n,i,a=this;if(null!=t)return et(t,0,X),null==e?e=g:et(e,0,8),T(new B(a),t+a.e+1,e);if(!(r=a.c))return null;if(n=((i=r.length-1)-Z(this.e/W))*W,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},f.dividedBy=f.div=function(t,e){return r(this,new B(t,e),d,g)},f.dividedToIntegerBy=f.idiv=function(t,e){return r(this,new B(t,e),0,1)},f.exponentiatedBy=f.pow=function(t,e){var r,n,i,a,s,o,u,h,c=this;if((t=new B(t)).c&&!t.isInteger())throw Error(G+"Exponent not an integer: "+R(t));if(null!=e&&(e=new B(e)),s=t.e>14,!c.c||!c.c[0]||1==c.c[0]&&!c.e&&1==c.c.length||!t.c||!t.c[0])return h=new B(Math.pow(+R(c),s?t.s*(2-rt(t)):+R(t))),e?h.mod(e):h;if(o=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new B(NaN);(n=!o&&c.isInteger()&&e.isInteger())&&(c=c.mod(e))}else{if(t.e>9&&(c.e>0||c.e<-1||(0==c.e?c.c[0]>1||s&&c.c[1]>=24e7:c.c[0]<8e13||s&&c.c[0]<=9999975e7)))return a=c.s<0&&rt(t)?-0:0,c.e>-1&&(a=1/a),new B(o?1/a:a);C&&(a=j(C/W+2))}for(s?(r=new B(.5),o&&(t.s=1),u=rt(t)):u=(i=Math.abs(+R(t)))%2,h=new B(p);;){if(u){if(!(h=h.times(c)).c)break;a?h.c.length>a&&(h.c.length=a):n&&(h=h.mod(e))}if(i){if(0===(i=K(i/2)))break;u=i%2}else if(T(t=t.times(r),t.e+1,1),t.e>14)u=rt(t);else{if(0===(i=+R(t)))break;u=i%2}c=c.times(c),a?c.c&&c.c.length>a&&(c.c.length=a):n&&(c=c.mod(e))}return n?h:(o&&(h=p.div(h)),e?h.mod(e):a?T(h,C,g,void 0):h)},f.integerValue=function(t){var e=new B(this);return null==t?t=g:et(t,0,8),T(e,e.e+1,t)},f.isEqualTo=f.eq=function(t,e){return 0===tt(this,new B(t,e))},f.isFinite=function(){return!!this.c},f.isGreaterThan=f.gt=function(t,e){return tt(this,new B(t,e))>0},f.isGreaterThanOrEqualTo=f.gte=function(t,e){return 1===(e=tt(this,new B(t,e)))||0===e},f.isInteger=function(){return!!this.c&&Z(this.e/W)>this.c.length-2},f.isLessThan=f.lt=function(t,e){return tt(this,new B(t,e))<0},f.isLessThanOrEqualTo=f.lte=function(t,e){return-1===(e=tt(this,new B(t,e)))||0===e},f.isNaN=function(){return!this.s},f.isNegative=function(){return this.s<0},f.isPositive=function(){return this.s>0},f.isZero=function(){return!!this.c&&0==this.c[0]},f.minus=function(t,e){var r,n,i,a,s=this,o=s.s;if(e=(t=new B(t,e)).s,!o||!e)return new B(NaN);if(o!=e)return t.s=-e,s.plus(t);var u=s.e/W,h=t.e/W,c=s.c,l=t.c;if(!u||!h){if(!c||!l)return c?(t.s=-e,t):new B(l?s:NaN);if(!c[0]||!l[0])return l[0]?(t.s=-e,t):new B(c[0]?s:3==g?-0:0)}if(u=Z(u),h=Z(h),c=c.slice(),o=u-h){for((a=o<0)?(o=-o,i=c):(h=u,i=l),i.reverse(),e=o;e--;i.push(0));i.reverse()}else for(n=(a=(o=c.length)<(e=l.length))?o:e,o=e=0;e0)for(;e--;c[r++]=0);for(e=q-1;n>o;){if(c[--n]=0;){for(r=0,f=v[i]%m,p=v[i]/m|0,a=i+(s=u);a>i;)r=((h=f*(h=A[--s]%m)+(o=p*h+(c=A[s]/m|0)*f)%m*m+d[a]+r)/g|0)+(o/m|0)+p*c,d[a--]=h%g;d[a]=r}return r?++n:d.splice(0,1),x(t,d,n)},f.negated=function(){var t=new B(this);return t.s=-t.s||null,t},f.plus=function(t,e){var r,n=this,i=n.s;if(e=(t=new B(t,e)).s,!i||!e)return new B(NaN);if(i!=e)return t.s=-e,n.minus(t);var a=n.e/W,s=t.e/W,o=n.c,u=t.c;if(!a||!s){if(!o||!u)return new B(i/0);if(!o[0]||!u[0])return u[0]?t:new B(o[0]?n:0*i)}if(a=Z(a),s=Z(s),o=o.slice(),i=a-s){for(i>0?(s=a,r=u):(i=-i,r=o),r.reverse();i--;r.push(0));r.reverse()}for((i=o.length)-(e=u.length)<0&&(r=u,u=o,o=r,e=i),i=0;e;)i=(o[--e]=o[e]+u[e]+i)/q|0,o[e]=q===o[e]?0:o[e]%q;return i&&(o=[i].concat(o),++s),x(t,o,s)},f.precision=f.sd=function(t,e){var r,n,i,a=this;if(null!=t&&t!==!!t)return et(t,1,X),null==e?e=g:et(e,0,8),T(new B(a),t,e);if(!(r=a.c))return null;if(n=(i=r.length-1)*W+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return t&&a.e+1>n&&(n=a.e+1),n},f.shiftedBy=function(t){return et(t,-9007199254740991,z),this.times("1e"+t)},f.squareRoot=f.sqrt=function(){var t,e,n,i,a,s=this,o=s.c,u=s.s,h=s.e,c=d+4,l=new B("0.5");if(1!==u||!o||!o[0])return new B(!u||u<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(u=Math.sqrt(+R(s)))||u==1/0?(((e=$(o)).length+h)%2==0&&(e+="0"),u=Math.sqrt(+e),h=Z((h+1)/2)-(h<0||h%2),n=new B(e=u==1/0?"5e"+h:(e=u.toExponential()).slice(0,e.indexOf("e")+1)+h)):n=new B(u+""),n.c[0])for((u=(h=n.e)+c)<3&&(u=0);;)if(a=n,n=l.times(a.plus(r(s,a,c,1))),$(a.c).slice(0,u)===(e=$(n.c)).slice(0,u)){if(n.e0&&d>0){for(a=d%o||o,c=p.substr(0,a);a0&&(c+=h+p.slice(a)),f&&(c="-"+c)}n=l?c+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?l.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):c}return(r.prefix||"")+n+(r.suffix||"")},f.toFraction=function(t){var e,n,i,a,s,o,u,h,c,l,f,d,m=this,y=m.c;if(null!=t&&(!(u=new B(t)).isInteger()&&(u.c||1!==u.s)||u.lt(p)))throw Error(G+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+R(u));if(!y)return new B(m);for(e=new B(p),c=n=new B(p),i=h=new B(p),d=$(y),s=e.e=d.length-m.e-1,e.c[0]=Y[(o=s%W)<0?W+o:o],t=!t||u.comparedTo(e)>0?s>0?e:c:u,o=v,v=1/0,u=new B(d),h.c[0]=0;l=r(u,e,0,1),1!=(a=n.plus(l.times(i))).comparedTo(t);)n=i,i=a,c=h.plus(l.times(a=c)),h=a,e=u.minus(l.times(a=e)),u=a;return a=r(t.minus(n),i,0,1),h=h.plus(a.times(c)),n=n.plus(a.times(i)),h.s=c.s=m.s,f=r(c,i,s*=2,g).minus(m).abs().comparedTo(r(h,n,s,g).minus(m).abs())<1?[c,i]:[h,n],v=o,f},f.toNumber=function(){return+R(this)},f.toPrecision=function(t,e){return null!=t&&et(t,1,X),_(this,t,e,2)},f.toString=function(t){var e,r=this,i=r.s,a=r.e;return null===a?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=a<=m||a>=y?nt($(r.c),a):it($(r.c),a,"0"):10===t&&I?e=it($((r=T(new B(r),d+a+1,g)).c),r.e,"0"):(et(t,2,S.length,"Base"),e=n(it($(r.c),a,"0"),10,t,i,!0)),i<0&&r.c[0]&&(e="-"+e)),e},f.valueOf=f.toJSON=function(){return R(this)},f._isBigNumber=!0,f[Symbol.toStringTag]="BigNumber",f[Symbol.for("nodejs.util.inspect.custom")]=f.valueOf,null!=e&&B.set(e),B}();const st=at;function ot(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,s,o=[],u=!0,h=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(o.push(n.value),o.length!==e);u=!0);}catch(t){h=!0,i=t}finally{try{if(!u&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(h)throw i}}return o}}(t,e)||m(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ut=function(){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e(this,t),this.bytes=r,this.length=this.bytes.length,this.position=n,this.bitPos=i}return s(t,[{key:"clone",value:function(){return new t(this.bytes,this.position,this.bitPos)}},{key:"getBytes",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!(this.position>this.length)){var e=null!==t?this.position+t:this.length,r=this.bytes.slice(this.position,e);return this.position=e,this.bitPos=0,r}}},{key:"readString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(this.position>this.length)){-1===t&&(t=this.length-this.position);for(var e="",r=this.position;r1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var r=0;if("be"===e)for(var n=this.position;n=this.position;i--)r<<=8,r|=this.bytes[i];return this.position+=t,this.bitPos=0,r}}},{key:"readBits",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var r,n=0,i=0;for(n=this.bytes[this.position++]&(r=this.bitPos,"be"===e?(1<<8-r)-1:256-(1<>>=this.bitPos),i=8-this.bitPos,this.bitPos=0;it){var a=i-t;"be"===e?n>>>=a:n&=(1<this.length))if(this.bitPos=0,"number"!=typeof t){var e=t.length,r=t[e-1];this.position=e;for(var n,i=function(t,e){var r=new Array;return t.forEach(function(t,n){r[t]=e-n}),r}(t,e);this.position=0;a--)if(this.bytes[this.position-e+a]!==t[a]){n=!1,this.position+=i[t[a]];break}if(n){this.position-=e;break}}}else for(;++this.positionthis.length)throw new Error("Cannot move to position "+e+" in stream. Out of bounds.");this.position=e,this.bitPos=0}},{key:"moveBackwardsBy",value:function(t){var e=this.position-t;if(e<0||e>this.length)throw new Error("Cannot move to position "+e+" in stream. Out of bounds.");this.position=e,this.bitPos=0}},{key:"moveBackwardsByBits",value:function(t){if(t<=this.bitPos)this.bitPos-=t;else for(this.bitPos>0&&(t-=this.bitPos,this.bitPos=0);t>0;)this.moveBackwardsBy(1),this.bitPos=8,this.moveBackwardsByBits(t),t-=8}},{key:"moveTo",value:function(t){if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"hasMore",value:function(){return this.position0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.position;return this.bitPos>0&&e++,this.bytes.slice(t,e)}}])}();function ht(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return ct(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ct(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw a}}}}function ct(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r>4],u=i[(15&s)>>2],h=(2&s)>>1;if("free"===o||"bad"===o||"reserved"===u){r.moveBackwardsBy(1);break}var c=Math.floor(144*o/u+h);if(r.position+c>r.length){r.moveTo(r.length);break}r.moveForwardsBy(c-3)}return r.carve()}},{name:"MPEG-4 Part 14 audio",extension:"m4a",mime:"audio/m4a",description:"",signature:[{4:102,5:116,6:121,7:112,8:77,9:52,10:65},{0:77,1:52,2:65,3:32}],extractor:null},{name:"Free Lossless Audio Codec",extension:"flac",mime:"audio/x-flac",description:"",signature:{0:102,1:76,2:97,3:67},extractor:null},{name:"Adaptive Multi-Rate audio codec",extension:"amr",mime:"audio/amr",description:"",signature:{0:35,1:33,2:65,3:77,4:82,5:10},extractor:null},{name:"Audacity",extension:"au",mime:"audio/x-au",description:"",signature:{0:100,1:110,2:115,3:46,24:65,25:117,26:100,27:97,28:99,29:105,30:116,31:121,32:66,33:108,34:111,35:99,36:107,37:70,38:105,39:108,40:101},extractor:null},{name:"Audacity Block",extension:"auf",mime:"application/octet-stream",description:"",signature:{0:65,1:117,2:100,3:97,4:99,5:105,6:116,7:121,8:66,9:108,10:111,11:99,12:107,13:70,14:105,15:108,16:101},extractor:null},{name:"Audio Interchange File",extension:"aif",mime:"audio/x-aiff",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:70},extractor:null},{name:"Audio Interchange File (compressed)",extension:"aifc",mime:"audio/x-aifc",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:67},extractor:null}],Documents:[{name:"Portable Document Format",extension:"pdf",mime:"application/pdf",description:"",signature:{0:37,1:80,2:68,3:70},extractor:function(t,e){var r=new ut(t.slice(e));return r.continueUntil([37,37,69,79,70]),r.moveForwardsBy(5),r.consumeIf(13),r.consumeIf(10),r.carve()}},{name:"Portable Document Format (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:65,1:74,2:86,3:66,4:69,5:82,6:105},extractor:null},{name:"Adobe PostScript",extension:"ps,eps,ai,pfa",mime:"application/postscript",description:"",signature:{0:37,1:33,2:80,3:83,4:45,5:65,6:100,7:111,8:98,9:101},extractor:null},{name:"PostScript",extension:"ps",mime:"application/postscript",description:"",signature:{0:37,1:33},extractor:null},{name:"Encapsulated PostScript",extension:"eps,ai",mime:"application/eps",description:"",signature:{0:197,1:208,2:211,3:198},extractor:null},{name:"Rich Text Format",extension:"rtf",mime:"application/rtf",description:"",signature:{0:123,1:92,2:114,3:116},extractor:function(t,e){var r=new ut(t.slice(e)),n=0;if(123!==r.readInt(1))throw new Error("Not a valid RTF file");for(n++;n>0&&r.hasMore();)switch(r.readInt(1)){case 123:n++;break;case 125:n--;break;case 92:r.consumeIf(92),r.position++}return r.carve()}},{name:"Microsoft Office document/OLE2",extension:"ole2,doc,xls,dot,ppt,xla,ppa,pps,pot,msi,sdw,db,vsd,msg",mime:"application/msword,application/vnd.ms-excel,application/vnd.ms-powerpoint",description:"Microsoft Office documents",signature:{0:208,1:207,2:17,3:224,4:161,5:177,6:26,7:225},extractor:null},{name:"Microsoft Office document/OLE2 (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:48,1:77,2:56,3:82,4:52,5:75,6:71,7:120},extractor:null},{name:"Microsoft Office 2007+ document",extension:"docx,xlsx,pptx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.presentationml.presentation",description:"",signature:{38:95,39:84,40:121,41:112,42:101,43:115,44:93,45:46,46:120,47:109,48:108},extractor:ft},{name:"Microsoft Access database",extension:"mdb,mda,mde,mdt,fdb,psa",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:74,14:101,15:116},extractor:null},{name:"Microsoft Access 2007+ database",extension:"accdb,accde,accda,accdu",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:65,14:67,15:69,16:32},extractor:null},{name:"Microsoft OneNote document",extension:"one",mime:"application/onenote",description:"",signature:{0:228,1:82,2:92,3:123,4:140,5:216,6:167,7:77,8:174,9:177,10:83,11:120,12:208,13:41,14:150,15:211},extractor:null},{name:"Outlook Express database",extension:"dbx",mime:"application/octet-stream",description:"",signature:{0:207,1:173,2:18,3:254,4:[48,197,198,199],11:17},extractor:null},{name:"Personal Storage Table (Outlook)",extension:"pst,ost,fdb,pab",mime:"application/octet-stream",description:"",signature:{0:33,1:66,2:68,3:78},extractor:null},{name:"Microsoft Exchange Database",extension:"edb",mime:"application/octet-stream",description:"",signature:{4:239,5:205,6:171,7:137,8:[32,35],9:6,10:0,11:0,12:[0,1],13:0,14:0,15:0},extractor:null},{name:"WordPerfect document",extension:"wpd,wp,wp5,wp6,wpp,bk!,wcm",mime:"application/wordperfect",description:"",signature:{0:255,1:87,2:80,3:67,7:[0,1,2],8:1,9:10},extractor:null},{name:"EPUB e-book",extension:"epub",mime:"application/epub+zip",description:"",signature:{0:80,1:75,2:3,3:4,30:109,31:105,32:109,33:101,34:116,35:121,36:112,37:101,38:97,39:112,40:112,41:108,42:105,43:99,44:97,45:116,46:105,47:111,48:110,49:47,50:101,51:112,52:117,53:98,54:43,55:122,56:105,57:112},extractor:ft}],Applications:[{name:"Windows Portable Executable",extension:"exe,dll,drv,vxd,sys,ocx,vbx,com,fon,scr",mime:"application/vnd.microsoft.portable-executable",description:"",signature:{0:77,1:90,3:[0,1,2],5:[0,1,2]},extractor:function(t,e){var r=new ut(t.slice(e));r.moveTo(60);var n=r.readInt(4,"le");r.moveTo(n),r.moveForwardsBy(6);var i=r.readInt(2,"le");r.moveForwardsBy(16);var a=523===r.readInt(2,"le")?112:96;r.moveForwardsBy(a-2),r.moveForwardsBy(32);var s=r.readInt(4,"le"),o=r.readInt(4,"le");if(s>0)return r.moveTo(s+o),r.carve();r.moveForwardsBy(88),r.moveForwardsBy(40*(i-1)),r.moveForwardsBy(16);var u=r.readInt(4,"le"),h=r.readInt(4,"le");return r.moveTo(h+u),r.carve()}},{name:"Executable and Linkable Format",extension:"elf,bin,axf,o,prx,so",mime:"application/x-executable",description:"Executable and Linkable Format file. No standard file extension.",signature:{0:127,1:69,2:76,3:70},extractor:function(t,e){var r=new ut(t.slice(e));r.moveForwardsBy(4);var n=1===r.readInt(1),i=1===r.readInt(1)?"le":"be";r.moveForwardsBy(n?26:34);var a=n?r.readInt(4,i):r.readInt(8,i);r.moveForwardsBy(10);var s=r.readInt(2,i),o=r.readInt(2,i);return r.moveTo(a),r.moveForwardsBy(s*o),r.carve()}},{name:"MacOS Mach-O object",extension:"dylib",mime:"application/octet-stream",description:"",signature:[{0:202,1:254,2:186,3:190,4:0,5:0,6:0,7:[1,2,3]},{0:206,1:250,2:237,3:254,4:7,5:0,6:0,7:0,8:[1,2,3]}],extractor:pt},{name:"MacOS Mach-O 64-bit object",extension:"dylib",mime:"application/octet-stream",description:"",signature:{0:207,1:250,2:237,3:254},extractor:pt},{name:"Adobe Flash",extension:"swf",mime:"application/x-shockwave-flash",description:"",signature:{0:[67,70],1:87,2:83},extractor:null},{name:"Java Class",extension:"class",mime:"application/java-vm",description:"",signature:{0:202,1:254,2:186,3:190},extractor:null},{name:"Dalvik Executable",extension:"dex",mime:"application/octet-stream",description:"Dalvik Executable as used by Android",signature:{0:100,1:101,2:120,3:10,4:48,5:51,6:53,7:0},extractor:null},{name:"Google Chrome Extension",extension:"crx",mime:"application/crx",description:"Google Chrome extension or packaged app",signature:{0:67,1:114,2:50,3:52},extractor:null}],Archives:[{name:"PKZIP archive",extension:"zip",mime:"application/zip",description:"",signature:{0:80,1:75,2:[3,5,7],3:[4,6,8]},extractor:ft},{name:"PKZIP archive (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:85,1:69,2:115,3:68,4:66,5:66},extractor:null},{name:"TAR archive",extension:"tar",mime:"application/x-tar",description:"",signature:{257:117,258:115,259:116,260:97,261:114},extractor:function(t,e){for(var r=new ut(t.slice(e)),n=function(){if(r.moveForwardsBy(257),r.getBytes(5).join("")!==[117,115,116,97,114].join(""))return r.moveBackwardsBy(262),1;r.moveBackwardsBy(138);var t=0;r.getBytes(11).forEach(function(e,r){t+=(e-48).toString()}),t=512*Math.ceil(parseInt(t,8)/512),r.moveForwardsBy(t+377)};r.hasMore()&&!n(););return r.consumeWhile(0),r.carve()}},{name:"Roshal Archive",extension:"rar",mime:"application/x-rar-compressed",description:"",signature:{0:82,1:97,2:114,3:33,4:26,5:7,6:[0,1]},extractor:null},{name:"Gzip",extension:"gz",mime:"application/gzip",description:"",signature:{0:31,1:139,2:8},extractor:function(t,e){var r=new ut(t.slice(e));r.moveForwardsBy(3);var n=r.readInt(1);if(r.moveForwardsBy(4),r.readInt(1),r.moveForwardsBy(1),4&n){var i=r.readInt(2,"le");r.moveForwardsby(i)}return 8&n&&(r.continueUntil(0),r.moveForwardsBy(1)),16&n&&(r.continueUntil(0),r.moveForwardsBy(1)),2&n&&r.moveForwardsBy(2),vt(r),r.moveForwardsBy(8),r.carve()}},{name:"Bzip2",extension:"bz2",mime:"application/x-bzip2",description:"",signature:{0:66,1:90,2:104},extractor:function(t,e){for(var r=new ut(t.slice(e)),n=[[119,36,83,133,9],[238,72,167,10,18],[220,145,78,20,36],[185,34,156,40,72],[114,69,56,80,144],[187,146,41,194,132],[93,201,20,225,66],[46,228,138,112,161],[23,114,69,56,80]],i=0;i=2368&&r.moveForwardsBy(4);var o=r.readInt(1,"be");if(r.moveForwardsBy(o),64&s){var u=r.readInt(4,"be");r.moveForwardsBy(u)}for(r.moveForwardsBy(4);r.hasMore();){var h=r.readInt(4,"be");if(0===h)break;var c=r.readInt(4,"be"),l=h===c?i:i+n;r.moveForwardsBy(c+4*l)}return r.carve()}},{name:"Linux deb package",extension:"deb",mime:"application/vnd.debian.binary-package",description:"",signature:{0:33,1:60,2:97,3:114,4:99,5:104,6:62},extractor:function(t,e){var r=new ut(t.slice(e));for(r.moveForwardsBy(8);r.hasMore();){r.moveForwardsBy(48);var n,i="",a=ht(r.getBytes(10));try{for(a.s();!(n=a.n()).done;){var s=n.value;i+=String.fromCharCode(s)}}catch(t){a.e(t)}finally{a.f()}i=parseInt(i.trim(),10),r.moveForwardsBy(2),r.moveForwardsBy(i)}return r.carve()}},{name:"Apple Disk Image",extension:"dmg",mime:"application/x-apple-diskimage",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96},extractor:null}],Miscellaneous:[{name:"UTF-8 text",extension:"txt",mime:"text/plain",description:"UTF-8 encoded Unicode byte order mark, commonly but not exclusively seen in text files.",signature:{0:239,1:187,2:191},extractor:null},{name:"UTF-32 LE text",extension:"utf32le",mime:"charset/utf32le",description:"Little-endian UTF-32 encoded Unicode byte order mark.",signature:{0:255,1:254,2:0,3:0},extractor:null},{name:"UTF-16 LE text",extension:"utf16le",mime:"charset/utf16le",description:"Little-endian UTF-16 encoded Unicode byte order mark.",signature:{0:255,1:254},extractor:null},{name:"Web Open Font Format",extension:"woff",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:70,4:0,5:1,6:0,7:0},extractor:null},{name:"Web Open Font Format 2",extension:"woff2",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:50,4:0,5:1,6:0,7:0},extractor:null},{name:"Embedded OpenType font",extension:"eot",mime:"application/octet-stream",description:"",signature:[{8:2,9:0,10:1,34:76,35:80},{8:1,9:0,10:0,34:76,35:80},{8:2,9:0,10:2,34:76,35:80}],extractor:null},{name:"TrueType Font",extension:"ttf",mime:"application/font-sfnt",description:"",signature:{0:0,1:1,2:0,3:0,4:0},extractor:null},{name:"OpenType Font",extension:"otf",mime:"application/font-sfnt",description:"",signature:{0:79,1:84,2:84,3:79,4:0},extractor:null},{name:"SQLite",extension:"sqlite",mime:"application/x-sqlite3",description:"",signature:{0:83,1:81,2:76,3:105},extractor:function(t,e){var r=new ut(t.slice(e));r.moveTo(16);var n=r.readInt(2);r.moveTo(28);var i=r.readInt(4);return r.moveTo(n*i),r.carve()}},{name:"BitTorrent link",extension:"torrent",mime:"application/x-bittorrent",description:"",signature:[{0:100,1:56,2:58,3:97,4:110,5:110,6:111,7:117,8:110,9:99,10:101,11:35,12:35,13:58},{0:100,1:52,2:58,3:105,4:110,5:102,6:111,7:100,8:[52,53,54],9:58}],extractor:null},{name:"Cryptocurrency wallet",extension:"wallet",mime:"application/octet-stream",description:"",signature:{0:0,1:0,2:0,3:0,4:1,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:98,13:49,14:5,15:0},extractor:null},{name:"Registry fragment",extension:"hbin",mime:"application/octet-stream",description:"",signature:{0:104,1:98,2:105,3:110,4:0},extractor:null},{name:"Registry script",extension:"rgs",mime:"application/octet-stream",description:"",signature:{0:72,1:75,2:67,3:82,4:13,5:10,6:92,7:123},extractor:null},{name:"WinNT Registry Hive",extension:"registry",mime:"application/octet-stream",description:"",signature:{0:114,1:101,2:103,3:102},extractor:null},{name:"Windows Event Log",extension:"evt",mime:"application/octet-stream",description:"",signature:{0:48,1:0,2:0,3:0,4:76,5:102,6:76,7:101},extractor:function(t,e){var r=new ut(t.slice(e));r.moveTo(20);var n=r.readInt(4,"le");r.moveTo(n);var i=r.readInt(4,"le");return r.moveForwardsBy(i-4),r.carve()}},{name:"Windows Event Log",extension:"evtx",mime:"application/octet-stream",description:"",signature:{0:69,1:108,2:102,3:70,4:105,5:108,6:101},extractor:function(t,e){var r=new ut(t.slice(e));r.moveTo(40);var n=r.readInt(4,"le")-44;for(r.moveForwardsBy(n);r.hasMore()&&r.getBytes(7).join("")===[69,108,102,67,104,110,107].join("");)r.moveForwardsBy(65529);return r.consumeWhile(0),r.carve()}},{name:"Windows Pagedump",extension:"dmp",mime:"application/octet-stream",description:"",signature:{0:80,1:65,2:71,3:69,4:68,5:85,6:[77,54],7:[80,52]},extractor:function(t,e){var r=new ut(t.slice(e));return r.moveTo(112),r.moveTo(4096*(r.readInt(4,"le")+1)),r.carve()}},{name:"Windows Prefetch",extension:"pf",mime:"application/x-pf",description:"",signature:{0:[17,23,26],1:0,2:0,3:0,4:83,5:67,6:67,7:65},extractor:function(t,e){var r=new ut(t.slice(e));return r.moveTo(12),r.moveTo(r.readInt(4,"be")),r.carve()}},{name:"Windows Prefetch (Win 10)",extension:"pf",mime:"application/x-pf",description:"",signature:{0:77,1:65,2:77,3:4,7:0},extractor:function(t,e){var r=new ut(t.slice(e));return r.moveTo(r.readInt(4,"be")),r.carve()}},{name:"PList (XML)",extension:"plist",mime:"application/xml",description:"",signature:{39:60,40:33,41:68,42:79,43:67,44:84,45:89,46:80,47:69,48:32,49:112,50:108,51:105,52:115,53:116},extractor:function(t,e){var r=new ut(t.slice(e)),n=0;for(r.continueUntil([60,112,108,105,115,116]),r.moveForwardsBy(6),n++;n>0&&r.hasMore();)60===r.readInt(1)&&(r.getBytes(5).join("")===[112,108,105,115,116].join("")?n++:r.moveBackwardsBy(5),r.getBytes(7).join("")===[47,112,108,105,115,116,62].join("")?n--:r.moveBackwardsBy(7));return r.consumeIf(10),r.carve()}},{name:"PList (binary)",extension:"bplist,plist,ipmeta,abcdp,mdbackup,mdinfo,strings,nib,ichat,qtz,webbookmark,webhistory",mime:"application/x-plist",description:"",signature:{0:98,1:112,2:108,3:105,4:115,5:116,6:48,7:48},extractor:null},{name:"MacOS X Keychain",extension:"keychain",mime:"application/octet-stream",description:"",signature:{0:107,1:121,2:99,3:104,4:0,5:1},extractor:function(t,e){var r=new ut(t.slice(e));return r.moveTo(20),r.moveForwardsBy(r.readInt(4)),r.carve()}},{name:"TCP Packet",extension:"tcp",mime:"application/tcp",description:"",signature:{12:8,13:0,14:69,15:0,21:0,22:function(t){return t>=1&&t<=128},23:6},extractor:null},{name:"UDP Packet",extension:"udp",mime:"application/udp",description:"",signature:{12:8,13:0,14:69,15:0,16:[0,1,2,3,4,5],22:function(t){return t>=1&&t<=128},23:17},extractor:null},{name:"Compiled HTML",extension:"chm,chw,chi",mime:"application/vnd.ms-htmlhelp",description:"",signature:{0:73,1:84,2:83,3:70,4:3,5:0,6:0,7:0},extractor:null},{name:"Windows Password",extension:"pwl",mime:"application/octet-stream",description:"",signature:{0:227,1:130,2:133,3:150},extractor:null},{name:"Bitlocker recovery key",extension:"bitlocker",mime:"application/octet-stream",description:"",signature:{0:255,1:254,2:66,3:0,4:105,5:0,6:116,7:0,8:76,9:0,10:111,11:0,12:99,13:0,14:107,15:0,16:101,17:0,18:114,19:0,20:32,21:0},extractor:null},{name:"Certificate",extension:"cer,cat,p7b,p7c,p7m,p7s,swz,rsa,crl,crt,der",mime:"application/pkix-cert",description:"",signature:{0:48,1:130,4:[6,10,48]},extractor:null},{name:"Certificate",extension:"cat,swz,p7m",mime:"application/vnd.ms-pki.seccat",description:"",signature:{0:48,1:131,2:function(t){return 0!==t},5:6,6:9},extractor:null},{name:"PGP pubring",extension:"pkr,gpg",mime:"application/pgp-keys",description:"",signature:{0:153,1:1,2:[13,162],3:4},extractor:null},{name:"PGP secring",extension:"skr",mime:"application/pgp-keys",description:"",signature:[{0:149,1:1,2:207,3:4},{0:149,1:3,2:198,3:4},{0:149,1:5,2:134,3:4}],extractor:null},{name:"PGP Safe",extension:"pgd",mime:"application/pgp-keys",description:"",signature:{0:80,1:71,2:80,3:100,4:77,5:65,6:73,7:78,8:96,9:1,10:0},extractor:null},{name:"Task Scheduler",extension:"job",mime:"application/octet-stream",description:"",signature:{0:[0,1,2,3],1:[5,6],2:1,3:0,20:70,21:0},extractor:null},{name:"Windows Shortcut",extension:"lnk",mime:"application/x-ms-shortcut",description:"",signature:{0:76,1:0,2:0,3:0,4:1,5:20,6:2,7:0,8:0,9:0,10:0,11:0,12:192,13:0,14:0,15:0,16:0,17:0,18:0,19:70},extractor:function(t,e){var r=new ut(t.slice(e));return r.moveTo(52),r.moveTo(r.readInt(4,"le")),r.carve()}},{name:"Bash",extension:"bash",mime:"application/bash",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:98,8:97,9:115,10:104},extractor:null},{name:"Shell",extension:"sh",mime:"application/sh",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:115,8:104},extractor:null},{name:"Python",extension:"py,pyc,pyd,pyo,pyw,pyz",mime:"application/python",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:121,13:116,14:104,15:111,16:110,17:[50,51,10,13]},extractor:null},{name:"Ruby",extension:"rb",mime:"application/ruby",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:114,12:117,13:98,14:121},extractor:null},{name:"perl",extension:"pl,pm,t,pod",mime:"application/perl",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:101,13:114,14:108},extractor:null},{name:"php",extension:"php,phtml,php3,php4,php5,php7,phps,php-s,pht,phar",mime:"application/php",description:"",signature:{0:60,1:63,2:112,3:104,4:112},extractor:null},{name:"Smile",extension:"sml",mime:"\tapplication/x-jackson-smile",description:"",signature:{0:58,1:41,2:10},extractor:null},{name:"Lua Bytecode",extension:"luac",mime:"application/x-lua",description:"",signature:{0:27,1:76,2:117,3:97},extractor:null},{name:"WebAssembly binary",extension:"wasm",mime:"application/octet-stream",description:"",signature:{0:0,1:97,2:115,3:109},extractor:null}]};function ft(t,e){var r=new ut(t.slice(e));r.continueUntil([80,75,5,6]),r.moveForwardsBy(20);var n=r.readInt(2,"le");return r.moveForwardsBy(n),r.carve()}function pt(t,e){var r="207250237254",n=new ut(t.slice(e)),i=n.getBytes(4).join("");return n.moveTo(function(t,e,r){var n=28;e&&(n+=4),t.moveTo(16);var i=t.readInt(4,r);return function(t,e,r,n){for(var i=0,a=0;a0&&t.moveForwardsBy(1)}var bt=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],wt=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Ct(t,e,r){for(var n,i=0;(n=St(t,e))&&256!==n;){if(++i>1e4)throw new Error("Caught in probable infinite loop while parsing Huffman Block");n<256||(t.readBits(bt[n-257],"le"),n=St(t,r),t.readBits(wt[n],"le"))}}function Et(t){for(var e=Math.max.apply(Math,t),r=Math.min.apply(Math,t),n=1<>=1;for(var f=a<<16|u,p=h;p>>16;if(s>i)throw new Error(`Invalid Huffman Code length while parsing DEFLATE block at pos ${t.position}: ${s}`);return t.moveBackwardsByBits(i-s),65535&a}function It(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(t.length){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:0;for(var n in t){var i=parseInt(n,10)+r;switch(typeof t[n]){case"number":if(e[i]!==t[n])return!1;break;case"object":if(t[n].indexOf(e[i])<0)return!1;break;case"function":if(!t[n](e[i]))return!1;break;default:throw new Error(`Unrecognised signature type at offset ${n}`)}}return!0}const _t=function(){return s(function t(){e(this,t)},null,[{key:"checkForValue",value:function(t){if(void 0===t)throw new Error("only use translation methods with .bind")}},{key:"toArrayBuffer",value:function(){throw new Error("toArrayBuffer has not been implemented")}},{key:"fromArrayBuffer",value:function(){throw new Error("fromArrayBuffer has not been implemented")}}])}();function Mt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Mt=function(){return!!t})()}const xt=function(t){function r(){return e(this,r),t=this,i=arguments,n=u(n=r),o(t,Mt()?Reflect.construct(n,i||[],u(t).constructor):n.apply(t,i));var t,n,i}return c(r,t),s(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=new Uint8Array(this.value).buffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=Array.prototype.slice.call(new Uint8Array(this.value))}}])}(_t);function Tt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Tt=function(){return!!t})()}const Rt=function(t){function r(){return e(this,r),t=this,i=arguments,n=u(n=r),o(t,Tt()?Reflect.construct(n,i||[],u(t).constructor):n.apply(t,i));var t,n,i}return c(r,t),s(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=st.isBigNumber(this.value)?P.strToArrayBuffer(this.value.toFixed()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value);try{this.value=new st(P.arrayBufferToStr(this.value))}catch(t){this.value=new st(NaN)}}}])}(_t);function Ft(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ft=function(){return!!t})()}const Dt=function(t){function r(){return e(this,r),t=this,i=arguments,n=u(n=r),o(t,Ft()?Reflect.construct(n,i||[],u(t).constructor):n.apply(t,i));var t,n,i}return c(r,t),s(r,null,[{key:"toArrayBuffer",value:function(){var t=this;if(r.checkForValue(this.value),!L())return new Promise(function(e,r){P.readFile(t.value).then(function(e){return t.value=e.buffer}).then(e).catch(r)});this.value=P.readFileSync(this.value)}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=new File(this.value,"unknown")}}])}(_t);function kt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(kt=function(){return!!t})()}const Lt=function(t){function r(){return e(this,r),t=this,i=arguments,n=u(n=r),o(t,kt()?Reflect.construct(n,i||[],u(t).constructor):n.apply(t,i));var t,n,i}return c(r,t),s(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=this.value?P.strToArrayBuffer(this.value):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=this.value?P.arrayBufferToStr(this.value):""}}])}(_t);function Nt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Nt=function(){return!!t})()}const Ht=function(t){function r(){return e(this,r),t=this,i=arguments,n=u(n=r),o(t,Nt()?Reflect.construct(n,i||[],u(t).constructor):n.apply(t,i));var t,n,i}return c(r,t),s(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=this.value?P.strToArrayBuffer(P.unescapeHtml(P.stripHtmlTags(this.value,!0))):new ArrayBuffer}}])}(Lt);function Pt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Pt=function(){return!!t})()}const Ut=function(t){function r(){return e(this,r),t=this,i=arguments,n=u(n=r),o(t,Pt()?Reflect.construct(n,i||[],u(t).constructor):n.apply(t,i));var t,n,i}return c(r,t),s(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=void 0!==this.value?P.strToArrayBuffer(JSON.stringify(this.value,null,4)):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=JSON.parse(P.arrayBufferToStr(this.value))}}])}(_t);function Ot(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ot=function(){return!!t})()}const Qt=function(t){function r(){return e(this,r),t=this,i=arguments,n=u(n=r),o(t,Ot()?Reflect.construct(n,i||[],u(t).constructor):n.apply(t,i));var t,n,i}return c(r,t),s(r,null,[{key:"toArrayBuffer",value:(i=f(d().mark(function t(){return d().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r.checkForValue(this.value),!L()){t.next=1;break}this.value=this.value.map(function(t){return Uint8Array.from(t.data)}),t.next=3;break;case 1:return t.next=2,r.concatenateTypedArraysWithTypedElements.apply(r,y(this.value));case 2:this.value=t.sent;case 3:case"end":return t.stop()}},t,this)})),function(){return i.apply(this,arguments)})},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=[new File(this.value,"unknown")]}},{key:"concatenateTypedArraysWithTypedElements",value:(n=f(d().mark(function t(){var e,r,n,i,a,s,o,u,h,c,l,f,p,g=arguments;return d().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(e=0,r=g.length,n=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e(this,t),this.value=new ArrayBuffer(0),this.type=t.ARRAY_BUFFER,r&&Object.prototype.hasOwnProperty.call(r,"value")&&Object.prototype.hasOwnProperty.call(r,"type"))this.set(r.value,r.type);else if(r&&null!==n)this.set(r,n);else if(r){var i=t.typeEnum(r.constructor.name);this.set(r,i)}}return s(t,[{key:"get",value:function(e){var r=this;return"string"==typeof e&&(e=t.typeEnum(e)),this.type!==e?L()?(this._translate(e),this.value):new Promise(function(t,n){r._translate(e).then(function(){t(r.value)}).catch(n)}):this.value}},{key:"set",value:function(e,r){if("string"==typeof r&&(r=t.typeEnum(r)),v().debug("Dish type: "+t.enumLookup(r)),this.value=e,this.type=r,!this.valid()){var n=P.truncate(JSON.stringify(this.value),25);throw new O(`Data is not a valid ${t.enumLookup(r)}: ${n}`)}}},{key:"presentAs",value:function(t){return this.clone().get(t)}},{key:"detectDishType",value:function(){var t=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.keys(lt);if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),!(t&&t.length>1))return[];var r=[],n={};for(var i in lt)e.includes(i)&&(n[i]=lt[i]);for(var a in n)n[a].forEach(function(e){It(e.signature,t)&&r.push(e)});return r}(new Uint8Array(this.value.slice(0,2048)));return t.length&&t[0].mime&&"text/plain"===t[0].mime?t[0].mime:null}},{key:"getTitle",value:(r=f(d().mark(function e(r){var n,i,a,s;return d().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n="",a=this.type,e.next=a===t.FILE?1:a===t.LIST_FILE?2:a===t.JSON?3:a===t.NUMBER||a===t.BIG_NUMBER?4:a===t.ARRAY_BUFFER||a===t.BYTE_ARRAY?5:6;break;case 1:return n=this.value.name,e.abrupt("continue",9);case 2:return n=`${this.value.length} file(s)`,e.abrupt("continue",9);case 3:return n="application/json",e.abrupt("continue",9);case 4:return n=this.value.toString(),e.abrupt("continue",9);case 5:if(null===(n=this.detectDishType())){e.next=6;break}return e.abrupt("continue",9);case 6:return e.prev=6,(i=this.clone()).value=i.value.slice(0,256),e.next=7,i.get(t.STRING);case 7:n=e.sent,e.next=9;break;case 8:e.prev=8,s=e.catch(6),v().error(`${t.enumLookup(this.type)} cannot be sliced. ${s}`);case 9:return e.abrupt("return",n.slice(0,r));case 10:case"end":return e.stop()}},e,this,[[6,8]])})),function(t){return r.apply(this,arguments)})},{key:"valid",value:function(){switch(this.type){case t.BYTE_ARRAY:if(!(this.value instanceof Uint8Array||this.value instanceof Array))return!1;for(var e=0;e255)return!1;return!0;case t.STRING:case t.HTML:return"string"==typeof this.value;case t.NUMBER:return"number"==typeof this.value;case t.ARRAY_BUFFER:return this.value instanceof ArrayBuffer;case t.BIG_NUMBER:if(st.isBigNumber(this.value))return!0;if(Object.keys(this.value).sort().equals(["c","e","s"])){var r=new st;return r.c=this.value.c,r.e=this.value.e,r.s=this.value.s,this.value=r,!0}return!1;case t.JSON:return!0;case t.FILE:return this.value instanceof File;case t.LIST_FILE:return this.value instanceof Array&&this.value.reduce(function(t,e){return t&&e instanceof File},!0);default:return!1}}},{key:"size",get:function(){switch(this.type){case t.BYTE_ARRAY:case t.STRING:case t.HTML:return this.value.length;case t.NUMBER:case t.BIG_NUMBER:return this.value.toString().length;case t.ARRAY_BUFFER:return this.value.byteLength;case t.JSON:return JSON.stringify(this.value).length;case t.FILE:return this.value.size;case t.LIST_FILE:return this.value.reduce(function(t,e){return t+e.size},0);default:return-1}}},{key:"clone",value:function(){var e=new t;switch(this.type){case t.STRING:case t.HTML:case t.NUMBER:case t.BIG_NUMBER:e.set(this.value,this.type);break;case t.BYTE_ARRAY:case t.JSON:e.set(JSON.parse(JSON.stringify(this.value)),this.type);break;case t.ARRAY_BUFFER:e.set(this.value.slice(0),this.type);break;case t.FILE:e.set(new File([this.value],this.value.name,{type:this.value.type,lastModified:this.value.lastModified}),this.type);break;case t.LIST_FILE:e.set(this.value.map(function(t){return new File([t],t.name,{type:t.type,lastModified:t.lastModified})}),this.type);break;default:throw new O("Cannot clone Dish, unknown type")}return e}},{key:"_translate",value:function(e){var r=this;if(v().debug(`Translating Dish from ${t.enumLookup(this.type)} to ${t.enumLookup(e)}`),!L())return new Promise(function(n,i){r._toArrayBuffer().then(function(){return r.type=t.ARRAY_BUFFER}).then(function(){r._fromArrayBuffer(e),n()}).catch(i)});this._toArrayBuffer(),this.type=t.ARRAY_BUFFER,this._fromArrayBuffer(e)}},{key:"_toArrayBuffer",value:function(){var e=this,r={browser:{[t.STRING]:function(){return Promise.resolve(Lt.toArrayBuffer.bind(e)())},[t.NUMBER]:function(){return Promise.resolve(Kt.toArrayBuffer.bind(e)())},[t.HTML]:function(){return Promise.resolve(Ht.toArrayBuffer.bind(e)())},[t.ARRAY_BUFFER]:function(){return Promise.resolve()},[t.BIG_NUMBER]:function(){return Promise.resolve(Rt.toArrayBuffer.bind(e)())},[t.JSON]:function(){return Promise.resolve(Ut.toArrayBuffer.bind(e)())},[t.FILE]:function(){return Dt.toArrayBuffer.bind(e)()},[t.LIST_FILE]:function(){return Promise.resolve(Qt.toArrayBuffer.bind(e)())},[t.BYTE_ARRAY]:function(){return Promise.resolve(xt.toArrayBuffer.bind(e)())}},node:{[t.STRING]:function(){return Lt.toArrayBuffer.bind(e)()},[t.NUMBER]:function(){return Kt.toArrayBuffer.bind(e)()},[t.HTML]:function(){return Ht.toArrayBuffer.bind(e)()},[t.ARRAY_BUFFER]:function(){},[t.BIG_NUMBER]:function(){return Rt.toArrayBuffer.bind(e)()},[t.JSON]:function(){return Ut.toArrayBuffer.bind(e)()},[t.FILE]:function(){return Dt.toArrayBuffer.bind(e)()},[t.LIST_FILE]:function(){return Qt.toArrayBuffer.bind(e)()},[t.BYTE_ARRAY]:function(){return xt.toArrayBuffer.bind(e)()}}};try{return r[L()?"node":"browser"][this.type]()}catch(e){throw new O(`Error translating from ${t.enumLookup(this.type)} to ArrayBuffer: ${e}`)}}},{key:"_fromArrayBuffer",value:function(e){var r=this,n={[t.STRING]:function(){return Lt.fromArrayBuffer.bind(r)()},[t.NUMBER]:function(){return Kt.fromArrayBuffer.bind(r)()},[t.HTML]:function(){return Ht.fromArrayBuffer.bind(r)()},[t.ARRAY_BUFFER]:function(){},[t.BIG_NUMBER]:function(){return Rt.fromArrayBuffer.bind(r)()},[t.JSON]:function(){return Ut.fromArrayBuffer.bind(r)()},[t.FILE]:function(){return Dt.fromArrayBuffer.bind(r)()},[t.LIST_FILE]:function(){return Qt.fromArrayBuffer.bind(r)()},[t.BYTE_ARRAY]:function(){return xt.fromArrayBuffer.bind(r)()}};try{n[e](),this.type=e}catch(r){throw new O(`Error translating from ArrayBuffer to ${t.enumLookup(e)}: ${r}`)}}}],[{key:"typeEnum",value:function(e){switch(e.toLowerCase()){case"bytearray":case"byte array":return t.BYTE_ARRAY;case"string":return t.STRING;case"number":return t.NUMBER;case"html":return t.HTML;case"arraybuffer":case"array buffer":return t.ARRAY_BUFFER;case"bignumber":case"big number":return t.BIG_NUMBER;case"json":case"object":return t.JSON;case"file":return t.FILE;case"list":return t.LIST_FILE;default:throw new O("Invalid data type string. No matching enum.")}}},{key:"enumLookup",value:function(e){switch(e){case t.BYTE_ARRAY:return"byteArray";case t.STRING:return"string";case t.NUMBER:return"number";case t.HTML:return"html";case t.ARRAY_BUFFER:return"ArrayBuffer";case t.BIG_NUMBER:return"BigNumber";case t.JSON:return"JSON";case t.FILE:return"File";case t.LIST_FILE:return"List";default:throw new O("Invalid data type enum. No matching type.")}}}]);var r}();Gt.BYTE_ARRAY=0,Gt.STRING=1,Gt.NUMBER=2,Gt.HTML=3,Gt.ARRAY_BUFFER=4,Gt.BIG_NUMBER=5,Gt.JSON=6,Gt.FILE=7,Gt.LIST_FILE=8;const Vt=Gt,qt=function(){function t(r){e(this,t),this.name="",this.type="",this._value=null,this.disabled=!1,this.hint="",this.rows=0,this.toggleValues=[],this.target=null,this.defaultIndex=0,this.maxLength=null,this.min=null,this.max=null,this.step=1,r&&this._parseConfig(r)}return s(t,[{key:"_parseConfig",value:function(t){this.name=t.name,this.type=t.type,this.defaultValue=t.value,this.disabled=!!t.disabled,this.hint=t.hint||!1,this.rows=t.rows||!1,this.toggleValues=t.toggleValues,this.target=void 0!==t.target?t.target:null,this.defaultIndex=void 0!==t.defaultIndex?t.defaultIndex:0,this.maxLength=t.maxLength||null,this.min=t.min,this.max=t.max,this.step=t.step}},{key:"config",get:function(){return this._value}},{key:"value",get:function(){return this._value},set:function(e){this._value=t.prepare(e,this.type)}}],[{key:"prepare",value:function(t,e){var r;switch(e){case"binaryString":case"binaryShortString":case"editableOption":case"editableOptionShort":return P.parseEscapedChars(t);case"byteArray":return"string"==typeof t?x(t=t.replace(/\s+/g,"")):t;case"number":if(null===t)return t;if(r=parseFloat(t),isNaN(r))throw"Invalid ingredient value. Not a number: "+P.truncate(t.toString(),10);return r;default:return t}}}])}();var Wt=function(){return s(function t(){e(this,t),this._inputType=-1,this._outputType=-1,this._presentType=-1,this._breakpoint=!1,this._disabled=!1,this._flowControl=!1,this._manualBake=!1,this._ingList=[],this.name="",this.module="",this.description="",this.infoURL=null},[{key:"run",value:function(t,e){return t}},{key:"highlight",value:function(t,e){return!1}},{key:"highlightReverse",value:function(t,e){return!1}},{key:"present",value:function(t,e){return t}},{key:"inputType",get:function(){return Vt.enumLookup(this._inputType)},set:function(t){this._inputType=Vt.typeEnum(t)}},{key:"outputType",get:function(){return Vt.enumLookup(this._outputType)},set:function(t){this._outputType=Vt.typeEnum(t),this._presentType<0&&(this._presentType=this._outputType)}},{key:"presentType",get:function(){return Vt.enumLookup(this._presentType)},set:function(t){this._presentType=Vt.typeEnum(t)}},{key:"args",get:function(){return this._ingList.map(function(t){var e={name:t.name,type:t.type,value:t.defaultValue};return t.toggleValues&&(e.toggleValues=t.toggleValues),t.hint&&(e.hint=t.hint),t.rows&&(e.rows=t.rows),t.disabled&&(e.disabled=t.disabled),t.target&&(e.target=t.target),t.defaultIndex&&(e.defaultIndex=t.defaultIndex),t.maxLength&&(e.maxLength=t.maxLength),"number"==typeof t.min&&(e.min=t.min),"number"==typeof t.max&&(e.max=t.max),t.step&&(e.step=t.step),e})},set:function(t){var e=this;t.forEach(function(t){var r=new qt(t);e.addIngredient(r)})}},{key:"config",get:function(){return{op:this.name,args:this._ingList.map(function(t){return t.config})}}},{key:"addIngredient",value:function(t){this._ingList.push(t)}},{key:"ingValues",get:function(){return this._ingList.map(function(t){return t.value})},set:function(t){var e=this;t.forEach(function(t,r){e._ingList[r].value=t})}},{key:"breakpoint",get:function(){return this._breakpoint},set:function(t){this._breakpoint=!!t}},{key:"disabled",get:function(){return this._disabled},set:function(t){this._disabled=!!t}},{key:"flowControl",get:function(){return this._flowControl},set:function(t){this._flowControl=!!t}},{key:"manualBake",get:function(){return this._manualBake},set:function(t){this._manualBake=!!t}}])}();const zt=Wt;function Yt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Yt=function(){return!!t})()}var Jt=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Yt()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Adler-32 Checksum",t.module="Crypto",t.description="Adler-32 is a checksum algorithm which was invented by Mark Adler in 1995, and is a modification of the Fletcher checksum. Compared to a cyclic redundancy check of the same length, it trades reliability for speed (preferring the latter).

Adler-32 is more reliable than Fletcher-16, and slightly less reliable than Fletcher-32.",t.infoURL="https://wikipedia.org/wiki/Adler-32",t.inputType="ArrayBuffer",t.outputType="string",t.args=[],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=1,n=0;t=new Uint8Array(t);for(var i=0;i>>0,8)}}])}(zt);const Xt=Jt;function Zt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Zt=function(){return!!t})()}const $t=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Zt()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Analyse hash",t.module="Crypto",t.description="Tries to determine information about a given hash and suggests which algorithm may have been used to generate it based on its length.",t.infoURL="https://wikipedia.org/wiki/Comparison_of_cryptographic_hash_functions",t.inputType="string",t.outputType="string",t.args=[],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r="",n=[],i=(t=t.replace(/\s/g,"")).length/2,a=8*i;if(!/^[a-f0-9]+$/i.test(t))throw new I("Invalid hash");switch(r+="Hash length: "+t.length+"\nByte length: "+i+"\nBit length: "+a+"\n\nBased on the length, this hash could have been generated by one of the following hashing functions:\n",a){case 4:n=["Fletcher-4","Luhn algorithm","Verhoeff algorithm"];break;case 8:n=["Fletcher-8"];break;case 16:n=["BSD checksum","CRC-16","SYSV checksum","Fletcher-16"];break;case 32:n=["CRC-32","Fletcher-32","Adler-32"];break;case 64:n=["CRC-64","RIPEMD-64","SipHash"];break;case 128:n=["MD5","MD4","MD2","HAVAL-128","RIPEMD-128","Snefru","Tiger-128"];break;case 160:n=["SHA-1","SHA-0","FSB-160","HAS-160","HAVAL-160","RIPEMD-160","Tiger-160"];break;case 192:n=["Tiger","HAVAL-192"];break;case 224:n=["SHA-224","SHA3-224","ECOH-224","FSB-224","HAVAL-224"];break;case 256:n=["SHA-256","SHA3-256","BLAKE-256","ECOH-256","FSB-256","GOST","Grøstl-256","HAVAL-256","PANAMA","RIPEMD-256","Snefru"];break;case 320:n=["RIPEMD-320"];break;case 384:n=["SHA-384","SHA3-384","ECOH-384","FSB-384"];break;case 512:n=["SHA-512","SHA3-512","BLAKE-512","ECOH-512","FSB-512","Grøstl-512","JH","MD6","Spectral Hash","SWIFFT","Whirlpool"];break;case 1024:n=["Fowler-Noll-Vo"];break;default:n=["Unknown"]}return r+n.join("\n")}}])}(zt),te=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i,ee=function(t){return"string"==typeof t&&te.test(t)},re=function(t){if(!ee(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)};function ne(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ne=function(){return!!t})()}const ie=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,ne()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Analyse UUID",t.module="Crypto",t.description="Tries to determine information about a given UUID and suggests which version may have been used to generate it",t.infoURL="https://wikipedia.org/wiki/Universally_unique_identifier",t.inputType="string",t.outputType="string",t.args=[],t}return c(r,t),s(r,[{key:"run",value:function(t,e){try{return"UUID version: "+re(t)}catch(t){throw new I("Invalid UUID")}}}])}(zt);var ae=r(46452),se=r.n(ae);function oe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(oe=function(){return!!t})()}const ue=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,oe()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Argon2",t.module="Crypto",t.description="Argon2 is a key derivation function that was selected as the winner of the Password Hashing Competition in July 2015. It was designed by Alex Biryukov, Daniel Dinu, and Dmitry Khovratovich from the University of Luxembourg.

Enter the password in the input to generate its hash.",t.infoURL="https://wikipedia.org/wiki/Argon2",t.inputType="string",t.outputType="string",t.args=[{name:"Salt",type:"toggleString",value:"somesalt",toggleValues:["UTF8","Hex","Base64","Latin1"]},{name:"Iterations",type:"number",value:3},{name:"Memory (KiB)",type:"number",value:4096},{name:"Parallelism",type:"number",value:1},{name:"Hash length (bytes)",type:"number",value:32},{name:"Type",type:"option",value:["Argon2i","Argon2d","Argon2id"],defaultIndex:0},{name:"Output format",type:"option",value:["Encoded hash","Hex hash","Raw hash"]}],t}return c(r,t),s(r,[{key:"run",value:(n=f(d().mark(function t(e,r){var n,i,a,s,o,u,h,c,l,f,p;return d().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n={Argon2i:se().ArgonType.Argon2i,Argon2d:se().ArgonType.Argon2d,Argon2id:se().ArgonType.Argon2id},i=P.convertToByteString(r[0].string||"",r[0].option),a=r[1],s=r[2],o=r[3],u=r[4],h=n[r[5]],c=r[6],t.prev=1,t.next=2,se().hash({pass:e,salt:i,time:a,mem:s,parallelism:o,hashLen:u,type:h});case 2:l=t.sent,f=c,t.next="Hex hash"===f?3:"Raw hash"===f?4:5;break;case 3:return t.abrupt("return",l.hashHex);case 4:return t.abrupt("return",P.arrayBufferToStr(l.hash));case 5:return t.abrupt("return",l.encoded);case 6:t.next=8;break;case 7:throw t.prev=7,p=t.catch(1),new I(`Error: ${p.message}`);case 8:case"end":return t.stop()}},t,null,[[1,7]])})),function(t,e){return n.apply(this,arguments)})}]);var n}(zt);function he(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(he=function(){return!!t})()}const ce=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,he()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Argon2 compare",t.module="Crypto",t.description="Tests whether the input matches the given Argon2 hash. To test multiple possible passwords, use the 'Fork' operation.",t.infoURL="https://wikipedia.org/wiki/Argon2",t.inputType="string",t.outputType="string",t.args=[{name:"Encoded hash",type:"string",value:""}],t}return c(r,t),s(r,[{key:"run",value:(n=f(d().mark(function t(e,r){var n;return d().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=r[0],t.prev=1,t.next=2,se().verify({pass:e,encoded:n});case 2:return t.abrupt("return",`Match: ${e}`);case 3:return t.prev=3,t.catch(1),t.abrupt("return","No match");case 4:case"end":return t.stop()}},t,null,[[1,3]])})),function(t,e){return n.apply(this,arguments)})}]);var n}(zt);var le=r(17871),fe=r.n(le);function pe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(pe=function(){return!!t})()}const de=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,pe()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Bcrypt",t.module="Crypto",t.description="bcrypt is a password hashing function designed by Niels Provos and David Mazières, based on the Blowfish cipher, and presented at USENIX in 1999. Besides incorporating a salt to protect against rainbow table attacks, bcrypt is an adaptive function: over time, the iteration count (rounds) can be increased to make it slower, so it remains resistant to brute-force search attacks even with increasing computation power.

Enter the password in the input to generate its hash.",t.infoURL="https://wikipedia.org/wiki/Bcrypt",t.inputType="string",t.outputType="string",t.args=[{name:"Rounds",type:"number",value:10}],t}return c(r,t),s(r,[{key:"run",value:(n=f(d().mark(function t(e,r){var n,i;return d().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=r[0],t.next=1,fe().genSalt(n);case 1:return i=t.sent,t.next=2,fe().hash(e,i,null,function(t){H()&&self.sendStatusMessage(`Progress: ${(100*t).toFixed(0)}%`)});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t)})),function(t,e){return n.apply(this,arguments)})}]);var n}(zt);function ge(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ge=function(){return!!t})()}const me=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,ge()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Bcrypt compare",t.module="Crypto",t.description="Tests whether the input matches the given bcrypt hash. To test multiple possible passwords, use the 'Fork' operation.",t.infoURL="https://wikipedia.org/wiki/Bcrypt",t.inputType="string",t.outputType="string",t.args=[{name:"Hash",type:"string",value:""}],t}return c(r,t),s(r,[{key:"run",value:(n=f(d().mark(function t(e,r){var n,i;return d().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=r[0],t.next=1,fe().compare(e,n,null,function(t){H()&&self.sendStatusMessage(`Progress: ${(100*t).toFixed(0)}%`)});case 1:return i=t.sent,t.abrupt("return",i?"Match: "+e:"No match");case 2:case"end":return t.stop()}},t)})),function(t,e){return n.apply(this,arguments)})}]);var n}(zt);function ye(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ye=function(){return!!t})()}const Ae=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,ye()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Bcrypt parse",t.module="Crypto",t.description="Parses a bcrypt hash to determine the number of rounds used, the salt, and the password hash.",t.infoURL="https://wikipedia.org/wiki/Bcrypt",t.inputType="string",t.outputType="string",t.args=[],t}return c(r,t),s(r,[{key:"run",value:(n=f(d().mark(function t(e,r){var n;return d().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.abrupt("return",`Rounds: ${fe().getRounds(e)}\nSalt: ${fe().getSalt(e)}\nPassword hash: ${e.split(fe().getSalt(e))[1]}\nFull hash: ${e}`);case 1:throw t.prev=1,n=t.catch(0),new I("Error: "+n.toString());case 2:case"end":return t.stop()}},t,null,[[0,1]])})),function(t,e){return n.apply(this,arguments)})}]);var n}(zt);var ve=r(88802),be=r.n(ve);function we(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(we=function(){return!!t})()}var Ce=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,we()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="CMAC",t.module="Crypto",t.description="CMAC is a block-cipher based message authentication code algorithm.

RFC4493 defines AES-CMAC that uses AES encryption with a 128-bit key.
NIST SP 800-38B suggests usages of AES with other key lengths and Triple DES.",t.infoURL="https://wikipedia.org/wiki/CMAC",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","UTF8","Latin1","Base64"]},{name:"Encryption algorithm",type:"option",value:["AES","Triple DES"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=P.convertToByteString(e[0].string,e[0].option),n=e[1],i=function(){switch(n){case"AES":if(16!==r.length&&24!==r.length&&32!==r.length)throw new I("The key for AES must be either 16, 24, or 32 bytes (currently "+r.length+" bytes)");return{algorithm:"AES-ECB",key:r,blockSize:16,Rb:new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,135])};case"Triple DES":if(16!==r.length&&24!==r.length)throw new I("The key for Triple DES must be 16 or 24 bytes (currently "+r.length+" bytes)");return{algorithm:"3DES-ECB",key:16===r.length?r+r.substring(0,8):r,blockSize:8,Rb:new Uint8Array([0,0,0,0,0,0,0,27])};default:throw new I("Undefined encryption algorithm")}}(),a=function(t,e,r){r||(r=new Uint8Array(t.length));for(var n=0;n=0;n--)e[n]=t[n]<<1|r,r=t[n]>>7;return e},o=be().cipher.createCipher(i.algorithm,i.key),u=function(t,e){e||(e=new Uint8Array(t.length)),o.start(),o.update(be().util.createBuffer(t)),o.finish();for(var r=o.output.getBytes(),n=0;n
CTPH was originally based on the work of Dr. Andrew Tridgell and a spam email detector called SpamSum. This method was adapted by Jesse Kornblum and published at the DFRWS conference in 2006 in a paper 'Identifying Almost Identical Files Using Context Triggered Piecewise Hashing'.",t.infoURL="https://forensics.wiki/context_triggered_piecewise_hashing/",t.inputType="string",t.outputType="string",t.args=[],t}return c(r,t),s(r,[{key:"run",value:function(t,e){return Ie().digest(t)}}])}(zt);function Me(t,e,r,n){for(var i=new Uint8Array([].concat(y(e),y(t))),a=new Array(256).fill(0),s=0,o=0,u=[],h=0;h<256;h++)a[h]=h;for(var c=i.length,l=0;l=this.blockSizeInBytes;){this.blockUnits=[];for(var t=0;t>8&255)+String.fromCharCode(this.state.hash[r]>>16&255)+String.fromCharCode(this.state.hash[r]>>24&255);return e}},{key:"addLengthBits",value:function(){this.state.message+=String.fromCharCode(this.state.length<<3&255)+String.fromCharCode(this.state.length>>5&255)+String.fromCharCode(this.state.length>>13&255)+String.fromCharCode(this.state.length>>21&255)+String.fromCharCode(this.state.length>>29&255)+"\0\0\0"}}])}(je);const Ve=Ge;function qe(t,e){return t<>>32-e}function We(t,e){return t>>>e|t<<32-e}function ze(t,e,r){return 32===r?e:r>32?ze(e,t,r-32):4294967295&(t>>>r|e<<32-r)}function Ye(t,e,r){return 32===r?t:r>32?Ye(e,t,r-32):4294967295&(e>>>r|t<<32-r)}function Je(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Je=function(){return!!t})()}var Xe=[0,1518500249,1859775393,2400959708],Ze=[5,11,7,15,6,13,8,14,7,12,9,11,8,15,6,12,9,14,5,13],$e=[10,17,25,30],tr=[18,0,1,2,3,19,4,5,6,7,16,8,9,10,11,17,12,13,14,15,22,3,6,9,12,23,15,2,5,8,20,11,14,1,4,21,7,10,13,0,26,12,5,14,7,27,0,9,2,11,24,4,13,6,15,25,8,1,10,3,30,7,2,13,8,31,3,14,9,4,28,15,10,5,0,29,11,6,1,12],er=function(t){function r(t){var n,i,a,s;return e(this,r),i=this,s=[t],a=u(a=r),(n=o(i,Je()?Reflect.construct(a,s||[],u(i).constructor):a.apply(i,s))).options.rounds=n.options.rounds||80,n.W=new Array(32),n}return c(r,t),s(r,[{key:"reset",value:function(){var t,e,n;(t=r,e=this,"function"==typeof(n=Qe(u(1&3?t.prototype:t),"reset",e))?function(t){return n.apply(e,t)}:n)([]),this.state.hash=[1732584193,4023233417,2562383102,271733878,3285377520]}},{key:"processBlock",value:function(t){for(var e=0|this.state.hash[0],r=0|this.state.hash[1],n=0|this.state.hash[2],i=0|this.state.hash[3],a=0|this.state.hash[4],s=0;s<16;s++)this.W[s]=0|t[s];this.W[16]=this.W[0]^this.W[1]^this.W[2]^this.W[3]|0,this.W[17]=this.W[4]^this.W[5]^this.W[6]^this.W[7]|0,this.W[18]=this.W[8]^this.W[9]^this.W[10]^this.W[11]|0,this.W[19]=this.W[12]^this.W[13]^this.W[14]^this.W[15]|0,this.W[20]=this.W[3]^this.W[6]^this.W[9]^this.W[12]|0,this.W[21]=this.W[2]^this.W[5]^this.W[8]^this.W[15]|0,this.W[22]=this.W[1]^this.W[4]^this.W[11]^this.W[14]|0,this.W[23]=this.W[0]^this.W[7]^this.W[10]^this.W[13]|0,this.W[24]=this.W[5]^this.W[7]^this.W[12]^this.W[14]|0,this.W[25]=this.W[0]^this.W[2]^this.W[9]^this.W[11]|0,this.W[26]=this.W[4]^this.W[6]^this.W[13]^this.W[15]|0,this.W[27]=this.W[1]^this.W[3]^this.W[8]^this.W[10]|0,this.W[28]=this.W[2]^this.W[7]^this.W[8]^this.W[13]|0,this.W[29]=this.W[3]^this.W[4]^this.W[9]^this.W[14]|0,this.W[30]=this.W[0]^this.W[5]^this.W[10]^this.W[15]|0,this.W[31]=this.W[1]^this.W[6]^this.W[11]^this.W[12]|0;for(var o=0;o=this.blockSizeInBytes;){this.blockUnits=new Array(this.blockSizeInBytes);for(var t=0;t=this.blockSizeInBytes;){this.blockUnits=[];for(var t=0;t>24&255)+String.fromCharCode(this.state.hash[r]>>16&255)+String.fromCharCode(this.state.hash[r]>>8&255)+String.fromCharCode(255&this.state.hash[r]);return e}},{key:"addLengthBits",value:function(){this.state.message+="\0\0\0"+String.fromCharCode(this.state.length>>29&255)+String.fromCharCode(this.state.length>>21&255)+String.fromCharCode(this.state.length>>13&255)+String.fromCharCode(this.state.length>>5&255)+String.fromCharCode(this.state.length<<3&255)}}])}(je);const Tr=xr;function Rr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Rr=function(){return!!t})()}var Fr=[1518500249,1859775393,2400959708,3395469782],Dr=function(t){function r(t){var n,i,a,s;return e(this,r),i=this,s=[t],a=u(a=r),(n=o(i,Rr()?Reflect.construct(a,s||[],u(i).constructor):a.apply(i,s))).options.rounds=n.options.rounds||80,n.W=new Array(80),n}return c(r,t),s(r,[{key:"reset",value:function(){var t,e,n;(t=r,e=this,"function"==typeof(n=Qe(u(1&3?t.prototype:t),"reset",e))?function(t){return n.apply(e,t)}:n)([]),this.state.hash=[1732584193,-271733879,-1732584194,271733878,-1009589776]}},{key:"processBlock",value:function(t){for(var e=0|this.state.hash[0],r=0|this.state.hash[1],n=0|this.state.hash[2],i=0|this.state.hash[3],a=0|this.state.hash[4],s=0;s>>3)+this.W[h-7]+(We(this.W[h-2],17)^We(this.W[h-2],19)^this.W[h-2]>>>10)|0;var c=u+(We(a,6)^We(a,11)^We(a,25))+(a&s^~a&o)+Or[h]+this.W[h]|0,l=(We(e,2)^We(e,13)^We(e,22))+(e&r^e&n^r&n)|0;u=o,o=s,s=a,a=i+c|0,i=n,n=r,r=e,e=c+l|0}this.state.hash[0]=this.state.hash[0]+e|0,this.state.hash[1]=this.state.hash[1]+r|0,this.state.hash[2]=this.state.hash[2]+n|0,this.state.hash[3]=this.state.hash[3]+i|0,this.state.hash[4]=this.state.hash[4]+a|0,this.state.hash[5]=this.state.hash[5]+s|0,this.state.hash[6]=this.state.hash[6]+o|0,this.state.hash[7]=this.state.hash[7]+u|0}},{key:"finalize",value:function(){return this.addPaddingISO7816(this.state.message.length<56?56-this.state.message.length|0:120-this.state.message.length|0),this.addLengthBits(),this.process(),this.getStateHash(this.options.length/32|0)}}])}(Tr);const jr=Qr;function Kr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Kr=function(){return!!t})()}var Gr=[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],Vr=function(t){function r(t){var n,i,a,s;return e(this,r),(t=t||{}).length=t.length||512,t.rounds=t.rounds||160,i=this,s=[t],a=u(a=r),(n=o(i,Kr()?Reflect.construct(a,s||[],u(i).constructor):a.apply(i,s))).blockSize=32,n.blockSizeInBytes=n.blockSize*n.unitSize,n.W=new Array(160),n}return c(r,t),s(r,[{key:"reset",value:function(){var t,e,n;switch((t=r,e=this,"function"==typeof(n=Qe(u(1&3?t.prototype:t),"reset",e))?function(t){return n.apply(e,t)}:n)([]),this.options.length){case 384:this.state.hash=[-876896931,-1056596264,1654270250,914150663,-1856437926,812702999,355462360,-150054599,1731405415,-4191439,-1900787065,1750603025,-619958771,1694076839,1203062813,-1090891868];break;case 512:this.state.hash=[1779033703,-205731576,-1150833019,-2067093701,1013904242,-23791573,-1521486534,1595750129,1359893119,-1377402159,-1694144372,725511199,528734635,-79577749,1541459225,327033209];break;default:for(var i=new r,a=0;a<16;a++)i.state.hash[a]=2779096485^i.state.hash[a];i.update("SHA-512/"+this.options.length);var s=i.finalize();this.state.hash=[];for(var o=0;o<64;o+=4)this.state.hash.push(s.charCodeAt(o)<<24|s.charCodeAt(o+1)<<16|s.charCodeAt(o+2)<<8|s.charCodeAt(o+3))}}},{key:"processBlock",value:function(t){for(var e,r,n,i,a=this.state.hash[0],s=this.state.hash[1],o=this.state.hash[2],u=this.state.hash[3],h=this.state.hash[4],c=this.state.hash[5],l=this.state.hash[6],f=this.state.hash[7],p=this.state.hash[8],d=this.state.hash[9],g=this.state.hash[10],m=this.state.hash[11],y=this.state.hash[12],A=this.state.hash[13],v=this.state.hash[14],b=this.state.hash[15],w=0;w>>7,r=Ye(this.W[w-30],this.W[w-29],1)^Ye(this.W[w-30],this.W[w-29],8)^(this.W[w-29]>>>7|this.W[w-30]<<25),n=ze(this.W[w-4],this.W[w-3],19)^ze(this.W[w-4],this.W[w-3],61)^this.W[w-4]>>>6,i=Ye(this.W[w-4],this.W[w-3],19)^Ye(this.W[w-4],this.W[w-3],61)^(this.W[w-3]>>>6|this.W[w-4]<<26);var C=(65535&this.W[w-13])+(65535&this.W[w-31])+(65535&r)+(65535&i)|0,E=(this.W[w-13]>>>16)+(this.W[w-31]>>>16)+(r>>>16)+(i>>>16)+(C>>>16)|0,S=(65535&this.W[w-14])+(65535&this.W[w-32])+(65535&e)+(65535&n)+(E>>>16)|0,I=(this.W[w-14]>>>16)+(this.W[w-32]>>>16)+(e>>>16)+(n>>>16)+(S>>>16)|0;this.W[w]=4294967295&(I<<16|65535&S),this.W[w+1]=4294967295&(E<<16|65535&C)}e=ze(a,s,28)^ze(a,s,34)^ze(a,s,39),r=Ye(a,s,28)^Ye(a,s,34)^Ye(a,s,39),n=ze(p,d,14)^ze(p,d,18)^ze(p,d,41);var B=d&m^~d&A,_=a&o^a&h^o&h,M=s&u^s&c^u&c,x=b+(i=Ye(p,d,14)^Ye(p,d,18)^Ye(p,d,41))|0,T=v+n+(x>>>0>>0?1:0)|0;T=(T=T+(p&g^~p&y)+((x=x+B|0)>>>0>>0?1:0)|0)+Gr[w]+((x=x+Gr[w+1]|0)>>>0>>0?1:0)|0,x=x+this.W[w+1]|0;var R=r+M|0;v=y,b=A,y=g,A=m,g=p,m=d,p=l+(T=T+this.W[w]+(x>>>0>>0?1:0)|0)+((d=f+x|0)>>>0>>0?1:0)|0,l=h,f=c,h=o,c=u,o=a,u=s,a=T+(e+_+(R>>>0>>0?1:0)|0)+((s=x+R|0)>>>0>>0?1:0)|0}this.state.hash[1]=this.state.hash[1]+s|0,this.state.hash[0]=this.state.hash[0]+a+(this.state.hash[1]>>>0>>0?1:0)|0,this.state.hash[3]=this.state.hash[3]+u|0,this.state.hash[2]=this.state.hash[2]+o+(this.state.hash[3]>>>0>>0?1:0)|0,this.state.hash[5]=this.state.hash[5]+c|0,this.state.hash[4]=this.state.hash[4]+h+(this.state.hash[5]>>>0>>0?1:0)|0,this.state.hash[7]=this.state.hash[7]+f|0,this.state.hash[6]=this.state.hash[6]+l+(this.state.hash[7]>>>0>>0?1:0)|0,this.state.hash[9]=this.state.hash[9]+d|0,this.state.hash[8]=this.state.hash[8]+p+(this.state.hash[9]>>>0>>0?1:0)|0,this.state.hash[11]=this.state.hash[11]+m|0,this.state.hash[10]=this.state.hash[10]+g+(this.state.hash[11]>>>0>>0?1:0)|0,this.state.hash[13]=this.state.hash[13]+A|0,this.state.hash[12]=this.state.hash[12]+y+(this.state.hash[13]>>>0>>0?1:0)|0,this.state.hash[15]=this.state.hash[15]+b|0,this.state.hash[14]=this.state.hash[14]+v+(this.state.hash[15]>>>0>>0?1:0)|0}},{key:"finalize",value:function(){return this.addPaddingISO7816(this.state.message.length<112?112-this.state.message.length|0:240-this.state.message.length|0),this.state.message+="\0\0\0\0\0\0\0\0",this.addLengthBits(),this.process(),this.getStateHash(this.options.length/32|0)}}])}(Tr);const qr=Vr;function Wr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Wr=function(){return!!t})()}var zr=[10097,32533,76520,13586,34673,54876,80959,9117,39292,74945,37542,4805,64894,74296,24805,24037,20636,10402,822,91665,8422,68953,19645,9303,23209,2560,15953,34764,35080,33606,99019,2529,9376,70715,38311,31165,88676,74397,4436,27659,12807,99970,80157,36147,64032,36653,98951,16877,12171,76833,66065,74717,34072,76850,36697,36170,65813,39885,11199,29170,31060,10805,45571,82406,35303,42614,86799,7439,23403,9732,85269,77602,2051,65692,68665,74818,73053,85247,18623,88579,63573,32135,5325,47048,90553,57548,28468,28709,83491,25624,73796,45753,3529,64778,35808,34282,60935,20344,35273,88435,98520,17767,14905,68607,22109,40558,60970,93433,50500,73998,11805,5431,39808,27732,50725,68248,29405,24201,52775,67851,83452,99634,6288,98083,13746,70078,18475,40610,68711,77817,88685,40200,86507,58401,36766,67951,90364,76493,29609,11062,99594,67348,87517,64969,91826,8928,93785,61368,23478,34113,65481,17674,17468,50950,58047,76974,73039,57186,40218,16544,80124,35635,17727,8015,45318,22374,21115,78253,14385,53763,74350,99817,77402,77214,43236,210,45521,64237,96286,2655,69916,26803,66252,29148,36936,87203,76621,13990,94400,56418,9893,20505,14225,68514,46427,56788,96297,78822,54382,14598,91499,14523,68479,27686,46162,83554,94750,89923,37089,20048,80336,94598,26940,36858,70297,34135,53140,33340,42050,82341,44104,81949,85157,47954,32979,26575,57600,40881,22222,6413,12550,73742,11100,2040,12860,74697,96644,89439,28707,25815,63606,49329,16505,34484,40219,52563,43651,77082,7207,31790,61196,90446,26457,47774,51924,33729,65394,59593,42582,60527,15474,45266,95270,79953,59367,83848,82396,10118,33211,59466,94557,28573,67897,54387,54622,44431,91190,42592,92927,45973,42481,16213,97344,8721,16868,48767,3071,12059,25701,46670,23523,78317,73208,89837,68935,91416,26252,29663,5522,82562,4493,52494,75246,33824,45862,51025,61962,79335,65337,12472,549,97654,64051,88159,96119,63896,54692,82391,23287,29529,35963,15307,26898,9354,33351,35462,77974,50024,90103,39333,59808,8391,45427,26842,83609,49700,13021,24892,78565,20106,46058,85236,1390,92286,77281,44077,93910,83647,70617,42941,32179,597,87379,25241,5567,7007,86743,17157,85394,11838,69234,61406,20117,45204,15956,6e4,18743,92423,97118,96338,19565,41430,1758,75379,40419,21585,66674,36806,84962,85207,45155,14938,19476,7246,43667,94543,59047,90033,20826,69541,94864,31994,36168,10851,34888,81553,1540,35456,5014,51176,98086,24826,45240,28404,44999,8896,39094,73407,35441,31880,33185,16232,41941,50949,89435,48581,88695,41994,37548,73043,80951,406,96382,70774,20151,23387,25016,25298,94624,61171,79752,49140,71961,28296,69861,2591,74852,20539,387,59579,18633,32537,98145,6571,31010,24674,5455,61427,77938,91936,74029,43902,77557,32270,97790,17119,52527,58021,80814,51748,54178,45611,80993,37143,5335,12969,56127,19255,36040,90324,11664,49883,52079,84827,59381,71539,9973,33440,88461,23356,48324,77928,31249,64710,2295,36870,32307,57546,15020,9994,69074,94138,87637,91976,35584,4401,10518,21615,1848,76938,9188,20097,32825,39527,4220,86304,83389,87374,64278,58044,90045,85497,51981,50654,94938,81997,91870,76150,68476,64659,73189,50207,47677,26269,62290,64464,27124,67018,41361,82760,75768,76490,20971,87749,90429,12272,95375,5871,93823,43178,54016,44056,66281,31003,682,27398,20714,53295,7706,17813,8358,69910,78542,42785,13661,58873,4618,97553,31223,8420,28306,3264,81333,10591,40510,7893,32604,60475,94119,1840,53840,86233,81594,13628,51215,90290,28466,68795,77762,20791,91757,53741,61613,62269,50263,90212,55781,76514,83483,47055,89415,92694,397,58391,12607,17646,48949,72306,94541,37408,77513,3820,86864,29901,68414,82774,51908,13980,72893,55507,19502,37174,69979,20288,55210,29773,74287,75251,65344,67415,21818,59313,93278,81757,5686,73156,7082,85046,31853,38452,51474,66499,68107,23621,94049,91345,42836,9191,8007,45449,99559,68331,62535,24170,69777,12830,74819,78142,43860,72834,33713,48007,93584,72869,51926,64721,58303,29822,93174,93972,85274,86893,11303,22970,28834,34137,73515,90400,71148,43643,84133,89640,44035,52166,73852,70091,61222,60561,62327,18423,56732,16234,17395,96131,10123,91622,85496,57560,81604,18880,65138,56806,87648,85261,34313,65861,45875,21069,85644,47277,38001,2176,81719,11711,71602,92937,74219,64049,65584,49698,37402,96397,1304,77586,56271,10086,47324,62605,40030,37438,97125,40348,87083,31417,21815,39250,75237,62047,15501,29578,21826,41134,47143,34072,64638,85902,49139,6441,3856,54552,73135,42742,95719,9035,85794,74296,8789,88156,64691,19202,7638,77929,3061,18072,96207,44156,23821,99538,4713,66994,60528,83441,7954,19814,59175,20695,5533,52139,61212,6455,83596,35655,6958,92983,5128,9719,77433,53783,92301,50498,10850,62746,99599,10507,13499,6319,53075,71839,6410,19362,39820,98952,43622,63147,64421,80814,43800,9351,31024,73167,59580,6478,75569,78800,88835,54486,23768,6156,4111,8408,38508,7341,23793,48763,90822,97022,17719,4207,95954,49953,30692,70668,94688,16127,56196,80091,82067,63400,5462,69200,65443,95659,18288,27437,49632,24041,8337,65676,96299,90836,27267,50264,13192,72294,7477,44606,17985,48911,97341,30358,91307,6991,19072,24210,36699,53728,28825,35793,28976,66252,68434,94688,84473,13622,62126,98408,12843,82590,9815,93146,48908,15877,54745,24591,35700,4754,83824,52692,54130,55160,6913,45197,42672,78601,11883,9528,63011,98901,14974,40344,10455,16019,14210,33712,91342,37821,88325,80851,43667,70883,12883,97343,65027,61184,4285,1392,17974,15077,90712,26769,21778,30976,38807,36961,31649,42096,63281,2023,8816,47449,19523,59515,65122,59659,86283,68258,69572,13798,16435,91529,67245,52670,35583,16563,79246,86686,76463,34222,26655,90802,60584,47377,7500,37992,45134,26529,26760,83637,41326,44344,53853,41377,36066,94850,58838,73859,49364,73331,96240,43642,24637,38736,74384,89342,52623,7992,12369,18601,3742,83873,83080,12451,38992,22815,7759,51777,97377,27585,51972,37867,16444,24334,36151,99073,27493,70939,85130,32552,54846,54759,60790,18157,57178,65762,11161,78576,45819,52979,65130,4860,3991,10461,93716,16894,66083,24653,84609,58232,88618,19161,38555,95554,32886,59780,8355,60860,29735,47762,71299,23853,17546,73704,92052,46215,55121,29281,59076,7936,27954,58909,32643,52861,95819,6831,911,98936,76355,93779,80863,514,69572,68777,39510,35905,14060,40619,29549,69616,33564,60780,24122,66591,27699,6494,14845,46672,61958,77100,90899,75754,61196,30231,92962,61773,41839,55382,17267,70943,78038,70267,30532,21704,10274,12202,39685,23309,10061,68829,55986,66485,3788,97599,75867,20717,74416,53166,35208,33374,87539,8823,48228,63379,85783,47619,53152,67433,35663,52972,16818,60311,60365,94653,35075,33949,42614,29297,1918,28316,98953,73231,83799,42402,56623,34442,34994,41374,70071,14736,9958,18065,32960,7405,36409,83232,99385,41600,11133,7586,15917,6253,19322,53845,57620,52606,66497,68646,78138,66559,19640,99413,11220,94747,7399,37408,48509,23929,27482,45476,85244,35159,31751,57260,68980,5339,15470,48355,88651,22596,3152,19121,88492,99382,14454,4504,20094,98977,74843,93413,22109,78508,30934,47744,7481,83828,73788,6533,28597,20405,94205,20380,22888,48893,27499,98748,60530,45128,74022,84617,82037,10268,78212,16993,35902,91386,44372,15486,65741,14014,87481,37220,41849,84547,46850,52326,34677,58300,74910,64345,19325,81549,46352,33049,69248,93460,45305,7521,61318,31855,14413,70951,11087,96294,14013,31792,59747,67277,76503,34513,39663,77544,52701,8337,56303,87315,16520,69676,11654,99893,2181,68161,57275,36898,81304,48585,68652,27376,92852,55866,88448,3584,20857,73156,70284,24326,79375,95220,1159,63267,10622,48391,15633,84924,90415,93614,33521,26665,55823,47641,86225,31704,92694,48297,39904,2115,59589,49067,66821,41575,49767,4037,77613,19019,88152,80,20554,91409,96277,48257,50816,97616,38688,32486,45134,63545,59404,72059,43947,51680,43852,59693,25163,1889,70014,15021,41290,67312,71857,15957,68971,11403,65251,7629,37239,33295,5870,1119,92784,26340,18477,65622,36815,43625,18637,37509,82444,99005,4921,73701,14707,93997,64397,11692,5327,82162,20247,81759,45197,25332,83745,22567,4515,25624,95096,67946,48460,85558,15191,18782,16930,33361,83761,60873,43253,84145,60833,25983,1291,41349,20368,7126,14387,6345,80854,9279,43529,6318,38384,74761,41196,37480,51321,92246,80088,77074,88722,56736,66164,49431,66919,31678,72472,8,80890,18002,94813,31900,54155,83436,35352,54131,5466,55306,93128,18464,74457,90561,72848,11834,79982,68416,39528,72484,82474,25593,48545,35247,18619,13674,18611,19241,81616,18711,53342,44276,75122,11724,74627,73707,58319,15997,7586,16120,82641,22820,92904,13141,32392,19763,61199,67940,90767,4235,13574,17200,69902,63742,78464,22501,18627,90872,40188,28193,29593,88627,94972,11598,62095,36787,441,58997,34414,82157,86887,55087,19152,23,12302,80783,32624,68691,63439,75363,44989,16822,36024,867,76378,41605,65961,73488,67049,9070,93399,45547,94458,74284,5041,49807,20288,34060,79495,4146,52162,90286,54158,34243,46978,35482,59362,95938,91704,30552,4737,21031,75051,93029,47665,64382,99782,93478,94015,46874,32444,48277,59820,96163,64654,25843,41145,42820,74108,88222,88570,74015,25704,91035,1755,14750,48968,38603,62880,87873,95160,59221,22304,90314,72877,17334,39283,4149,11748,12102,80580,41867,17710,59621,6554,7850,73950,79552,17944,5600,60478,3343,25852,58905,57216,39618,49856,99326,66067,42792,95043,52680,46780,56487,9971,59481,37006,22186,54244,91030,45547,70818,59849,96169,61459,21647,87417,17198,30945,57589,31732,57260,47670,7654,46376,25366,94746,49580,69170,37403,86995,90307,94304,71803,26825,5511,12459,91314,8345,88975,35841,85771,8105,59987,87112,21476,14713,71181,27767,43584,85301,88977,29490,69714,73035,41207,74699,9310,13025,14338,54066,15243,47724,66733,47431,43905,31048,56699,80217,36292,98525,24335,24432,24896,43277,58874,11466,16082,10875,62004,90391,61105,57411,6368,53856,30743,8670,84741,54127,57326,26629,19087,24472,88779,30540,27886,61732,75454,60311,42824,37301,42678,45990,43242,17374,52003,70707,70214,49739,71484,92003,98086,76668,73209,59202,11973,2902,33250,78626,51594,16453,94614,39014,97066,83012,9832,25571,77628,66692,13986,99837,582,81232,44987,9504,96412,90193,79568,44071,28091,7362,97703,76447,42537,98524,97831,65704,9514,41468,85149,49554,17994,14924,39650,95294,556,70481,6905,94559,37559,49678,53119,70312,5682,66986,34099,74474,20740,41615,70360,64114,58660,90850,64618,80620,51790,11436,38072,50273,93113,41794,86861,24781,89683,55411,85667,77535,99892,41396,80504,90670,8289,40902,5069,95083,6783,28102,57816,25807,24260,71529,78920,72682,7385,90726,57166,98884,8583,6170,97965,88302,98041,21443,41808,68984,83620,89747,98882,60808,54444,74412,81105,1176,28838,36421,16489,18059,51061,80940,44893,10408,36222,80582,71944,92638,40333,67054,16067,19516,90120,46759,71643,13177,55292,21036,82808,77501,97427,49386,54480,23604,23554,21785,41101,91178,10174,29420,90438,6312,88940,15995,69321,47458,64809,98189,81851,29651,84215,60942,307,11897,92674,40405,68032,96717,54244,10701,41393,92329,98932,78284,46347,71209,92061,39448,93136,25722,8564,77936,63574,31384,51924,85561,29671,58137,17820,22751,36518,38101,77756,11657,13897,95889,57067,47648,13885,70669,93406,39641,69457,91339,22502,92613,89719,11947,56203,19324,20504,84054,40455,99396,63680,67667,60631,69181,96845,38525,11600,47468,3577,57649,63266,24700,71594,14004,23153,69249,5747,43321,31370,28977,23896,76479,68562,62342,7589,8899,5985,64281,61826,18555,64937,13173,33365,78851,16499,87064,13075,66847,70495,32350,2985,86716,38746,26313,77463,55387,72681,72461,33230,21529,53424,92581,2262,78438,66276,18396,73538,21032,91050,13058,16218,12470,56500,15292,76139,59526,52113,95362,67011,6651,16136,1016,857,55018,56374,35824,71708,49712,97380,10404,55452,34030,60726,75211,10271,36633,68424,58275,61764,97586,54716,50259,46345,87195,46092,26787,60939,89514,11788,68224,23417,73959,76145,30342,40277,11049,72049,15472,50669,48139,36732,46874,37088,73465,9819,58869,35220,12120,86124,51247,44302,60883,52109,21437,36786,49226,77837,19612,78430,11661,94770,77603,65669,86868,12665,30012,75989,39141,77400,28e3,64238,73258,71794,31340,26256,66453,37016,64756,80457,8747,12836,3469,50678,3274,43423,66677,82556,92901,51878,56441,22998,29718,38447,6453,25311,7565,53771,3551,90070,9483,94050,45938,18135,36908,43321,11073,51803,98884,66209,6830,53656,14663,56346,71430,4909,19818,5707,27369,86882,53473,7541,53633,70863,3748,12822,19360,49088,59066,75974,63335,20483,43514,37481,58278,26967,49325,43951,91647,93783,64169,49022,98588,9495,49829,59068,38831,4838,83605,92419,39542,7772,71568,75673,35185,89759,44901,74291,24895,88530,70774,35439,46758,70472,70207,92675,91623,61275,35720,26556,95596,20094,73750,85788,34264,1703,46833,65248,14141,53410,38649,6343,57256,61342,72709,75318,90379,37562,27416,75670,92176,72535,93119,56077,6886,18244,92344,31374,82071,7429,81007,47749,40744,56974,23336,88821,53841,10536,21445,82793,24831,93241,14199,76268,70883,68002,3829,17443,72513,76400,52225,92348,62308,98481,29744,33165,33141,61020,71479,45027,76160,57411,13780,13632,52308,77762,88874,33697,83210,51466,9088,50395,26743,5306,21706,70001,99439,80767,68749,95148,94897,78636,96750,9024,94538,91143,96693,61886,5184,75763,47075,88158,5313,53439,14908,8830,60096,21551,13651,62546,96892,25240,47511,58483,87342,78818,7855,39269,566,21220,292,24069,25072,29519,52548,54091,21282,21296,50958,17695,58072,68990,60329,95955,71586,63417,35947,67807,57621,64547,46850,37981,38527,9037,64756,3324,4986,83666,9282,25844,79139,78435,35428,43561,69799,63314,12991,93516,23394,94206,93432,37836,94919,26846,2555,74410,94915,48199,5280,37470,93622,4345,15092,19510,18094,16613,78234,50001,95491,97976,38306,32192,82639,54624,72434,92606,23191,74693,78521,104,18248,75583,90326,50785,54034,66251,35774,14692,96345,44579,85932,44053,75704,20840,86583,83944,52456,73766,77963,31151,32364,91691,47357,40338,23435,24065,8458,95366,7520,11294,23238,1748,41690,67328,54814,37777,10057,42332,38423,2309,70703,85736,46148,14258,29236,12152,5088,65825,2463,65533,21199,60555,33928,1817,7396,89215,30722,22102,15880,92261,17292,88190,61781,48898,92525,21283,88581,60098,71926,819,59144,224,30570,90194,18329,6999,26857,19238,64425,28108,16554,16016,42,83229,10333,36168,65617,94834,79782,23924,49440,30432,81077,31543,95216,64865,13658,51081,35337,74538,44553,64672,90960,41849,93865,44608,93176,34851,5249,29329,19715,94082,14738,86667,43708,66354,93692,25527,56463,99380,38793,85774,19056,13939,46062,27647,66146,63210,96296,33121,54196,34108,75814,85986,71171,15102,28992,63165,98380,36269,60014,7201,62448,46385,42175,88350,46182,49126,52567,64350,16315,53969,80395,81114,54358,64578,47269,15747,78498,90830,25955,99236,43286,91064,99969,95144,64424,77377,49553,24241,8150,89535,8703,91041,77323,81079,45127,93686,32151,7075,83155,10252,73100,88618,23891,87418,45417,20268,11314,50363,26860,27799,49416,83534,19187,8059,76677,2110,12364,71210,87052,50241,90785,97889,81399,58130,64439,5614,59467,58309,87834,57213,37510,33689,1259,62486,56320,46265,73452,17619,56421,40725,23439,41701,93223,41682,45026,47505,27635,56293,91700,4391,67317,89604,73020,69853,61517,51207,86040,2596,1655,9918,45161,222,54577,74821,47335,8582,52403,94255,26351,46527,68224,90183,85057,72310,34963,83462,49465,46581,61499,4844,94626,2963,41482,83879,44942,63915,94365,92560,12363,30246,2086,75036,88620,91088,67691,67762,34261,8769,91830,23313,18256,28850,37639,92748,57791,71328,37110,66538,39318,15626,44324,82827,8782,65960,58167,1305,83950,45424,72453,19444,68219,64733,94088,62006,89985,36936,61630,97966,76537,46467,30942,7479,67971,14558,22458,35148,1929,17165,12037,74558,16250,71750,55546,29693,94984,37782,41659,39098,23982,29899,71594,77979,54477,13764,17315,72893,32031,39608,75992,73445,1317,50525,87313,45191,30214,19769,90043,93478,58044,6949,31176,88370,50274,83987,45316,38551,79418,14322,91065,7841,36130,86602,10659,40859,964,71577,85447,61079,96910,72906,7361,84338,34114,52096,66715,51091,86219,81115,49625,48799,89485,24855,13684,68433,70595,70102,71712,88559,92476,32903,68009,58417,87962,11787,16644,72964,29776,63075,13270,84758,49560,10317,28778,23006,31036,84906,81488,17340,74154,42801,27917,89792,62604,62234,13124,76471,51667,37589,87147,24743,48023,6325,79794,35889,13255,4925,99004,70322,60832,76636,56907,56534,72615,46288,36788,93196,68656,66492,35933,52293,47953,95495,95304,50009,83464,28608,38074,74083,9337,7965,65047,36871,59015,21769,30398,44855,1020,80680,59328,8712,48190,45332,27284,31287,66011,9376,86379,74508,33579,77114,92955,23085,92824,3054,25242,16322,48498,9938,44420,13484,52319,58875,2012,88591,52500,95795,41800,95363,54142,17482,32705,60564,12505,40954,46174,64130,63026,96712,79883,39225,52653,69549,36693,59822,22684,31661,88298,15489,16030,42480,15372,38781,71995,77438,91161,10192,7839,62735,99218,25624,2547,27445,69187,55749,32322,15504,73298,51108,48717,92926,75705,89787,96114,99902,37749,96305,12829,70474,838,50385,91711,80370,56504,56857,80906,9018,76569,61072,48568,36491,22587,44363,39592,61546,90181,37348,41665,41339,62106,44203,6732,76111,79840,67999,32231,76869,58652,49983,1669,27464,79553,52855,25988,18087,38052,17529,13607,657,76173,43357,77334,24140,53860,2906,89863,44651,55715,26203,65933,51087,98234,40625,45545,63563,89148,82581,4110,66683,99001,9796,47349,65003,66524,81970,71262,14479,31300,8681,58068,44115,40064,77879,23965,69019,73985,19453,26225,97543,37044,7494,85778,35345,61115,92498,49737,64599,7158,82763,25072,38478,57782,75291,62155,52056,4786,11585,71251,25572,79771,93328,66927,54069,58752,26624,50463,77361,29991,96526,2820,91659,12818,96356,49499,1507,40223,9171,83642,21057,2677,9367,38097,16100,19355,6120,15378,56559,69167,30235,6767,66323,78294,14916,19124,88044,16673,66102,86018,29406,75415,22038,27056,26906,25867,14751,92380,30434,44114,6026,79553,55091,95385,41212,37882,46864,54717,97038,53805,64150,70915,63127,63695,41288,38192,72437,75075,18570,52065,8853,30104,79937,66913,53200,84570,78079,28970,53859,37632,80274,35240,32960,74859,7359,55176,3930,38984,35151,82576,82805,94031,12779,90879,24109,25367,77861,9541,85739,69023,64971,99321,7521,95909,43897,71724,92581,5471,64337,98949,3606,78236,78985,29212,57369,34857,67757,58019,58872,96526,28749,56592,37871,72905,70198,57319,54116,47014,18285,33692,72111,60958,96848,17893,40993,50445,14186,76877,87867,50335,9513,44346,26439,55293,6449,44301,63740,40158,72703,88321,85062,57345,66231,15409,3451,95261,43561,15673,28956,90303,62469,82517,43035,36850,15592,64098,59022,31752,4370,50486,11885,23085,41712,80692,48492,16495,99721,36912,28267,27882,16269,64483,11273,2680,1616,46138,54606,14761,5134,45144,63213,49666,27441,86989,29884,54334,6740,8368,80051,81020,17882,74973,74531,94994,24927,64894,22667,20466,82948,66831,47427,76033,31197,59817,20064,61135,28556,29695,80179,74058,18293,9963,35278,13062,83094,23373,90287,33477,48865,30348,70174,11468,25994,25343,22317,1587,30682,1,67814,59557,23362,13746,82244,42093,24671,79458,93730,45488,60234,67098,9899,25775,332,36636,57594,19958,85564,58977,12247,60774,66371,69442,20385,14486,91330,50332,46023,75768,59877,60081,92936,72302,75064,85727,52987,5750,19384,33684,78859,80458,69902,34870,88684,49762,40801,86291,18194,90366,82639,53844,96326,65728,48563,26027,52692,62406,76294,41848,63010,69841,29451,36170,21529,16525,64326,22086,24469,57407,96033,37771,31002,18311,93285,31948,14331,58335,15977,80336,81667,27286,24361,61638,57580,95270,46180,76990,53031,94366,2727,49944,19278,5756,51875,53445,33342,1965,7937,10054,97712,87693,58124,46064,39133,77385,9605,65359,70113,90563,86637,94282,12025,31926,24541,23854,58407,32131,92845,20714,27898,26917,50326,35145,50859,72119,95094,29441,42301,62460,75252,94267,38422,73047,24200,85349,72049,91723,97802,98496,12734,73432,10371,57213,53300,80847,46229,7099,72961,13767,65654,31102,82119,96946,65919,81083,3819,57888,57908,16849,77111,41429,92261,45263,1172,55926,78835,27697,48420,58865,41207,21406,8582,10785,36233,12237,7866,13706,92551,11021,63813,71512,65206,37768,94325,14721,20990,54235,71986,5345,56239,52028,1419,7215,55067,11669,21738,66605,69621,69827,8537,18638,60982,28151,98885,76431,25566,3085,23639,30849,63986,73287,26201,36174,14106,54102,57041,16141,64174,3591,90024,73332,31254,17288,59809,25061,51612,47951,16570,43330,79213,11354,55585,19646,99246,37564,32660,20632,21124,60597,69315,31312,57741,85108,21615,24365,27684,16124,33888,14966,35303,69921,15795,4020,67672,86816,63027,84470,45605,44887,26222,79888,58982,22466,98844,48353,60666,58256,31140,93507,69561,6256,88526,18655,865,75247,264,65957,98261,72706,36396,46065,85700,32121,99975,73627,78812,89638,86602,96758,65099,52777,46792,13790,55240,52002,10313,91933,71231,10053,78416,54563,96004,42215,30094,45958,48437,49591,50483,13422,69108,59952,27896,40450,79327,31962,46456,39260,51479,61882,48181,50691,64709,32902,10676,12083,35771,79656,56667,76783,3937,99859,10362,57411,40986,35045,2838,29255,64230,84418,34988,77644,39892,77327,74129,53444,35487,95803,38640,20383,55402,25793,14213,87082,42837,95030,97198,61608,97723,79390,35290,34683,81419,87133,70447,53127,97146,28299,56763,12868,1145,12147,58158,92124,60934,18414,97510,7056,54488,20719,53743,91037,44797,52110,8512,18991,20129,31441,51449,14661,71126,23180,68124,18807,70997,21913,19594,70355,73637,68266,60775,43164,52643,96363,77989,79332,39890,65379,20405,52935,43816,92740,95319,4538,60660,28982,15328,80475,34690,2293,19646,46524,96627,33159,42081,8816,74931,20674,8697,66169,46460,46326,39923,60625,28386,22919,19415,75766,43668,31626,70301,67053,3949,70082,2303,48642,38429,94053,38770,68137,68441,52928,70244,91954,17401,92693,98342,21451,84988,80487,33807,73797,49494,41878,76635,83227,76618,11946,13451,87591,78381,21407,90038,72638,69692,51599,86413,32019,64856,74730,41531,11064,1790,58817,86400,66213,92599,70905,78324,54326,43659,34206,63132,38837,40210,96346,16967,81619,96503,14881,89405,32205,49508,98425,2451,35423,56072,36810,30332,85998,49358,92748,84147,79835,94867,41224,61794,35066,82220,66684,20096,2754,41731,37068,32753,91059,13407,5607,69384,53329,95909,44968,11397,92973,50014,92997,80968,93761,57598,74703,7768,37978,73873,33475,9720,97852,98449,48722,84977,11271,11728,68318,22312,78792,87508,88466,72976,47099,84126,38595,85124,64405,90020,7492,52413,95111,34455,86311,68892,1074,60274,28136,19328,38161,57475,13771,63562,84207,94121,18901,52768,33801,82087,86091,59969,90398,56870,55756,78841,98450,54165,55106,50343,70519,14567,36780,55450,19606,83749,67562,64765,38543,16585,86841,73742,8766,39252,75678,75379,78760,37279,15280,13558,95916,89759,76686,76467,67147,63110,94008,8037,35263,53710,16667,79008,11231,29397,67136,18601,64502,90228,89109,72849,22711,65547,34542,26686,81678,87765,77654,23664,96352,14106,32938,28083,18633,80286,65507,46197,52722,75476,77816,47204,34876,45963,79262,90181,84041,3745,90041,30780,27226,92847,85572,15308,80688,5761,82638,13464,23683,81015,54214,64175,43701,86845,15569,50687,52679,87696,8285,97444,47599,94472,64150,87753,68652,60726,26213,17320,64553,81285,98126,12158,52095,64833,492,35817,55571,91300,97812,37507,4209,53515,64342,21223,16662,43265,68219,3529,43636,68417,53640,95326,93381,37113,80751,76469,96677,43054,22937,31954,13266,34140,27253,2734,99070,60077,57988,93211,92795,83795,57477,3941,39007,14619,38320,93449,31336,25279,97030,26245,47394,39475,90621,23820,29344,94859,91604,14033,41868,14816,4075,66644,87803,97815,99552,78666,3942,8175,22345,19983,76783,99044,20851,84981,59052,77178,72109,76475,21619,73017,6812,56633,50612,55289,4671,84419,94072,94446,80603,32188,93415,23464,43947,43728,74284,67177,57105,31059,10642,13803,69602,46961,66567,19359,84676,63918,40650,12923,15974,79732,20225,92525,71179,4859,91208,60430,5239,61458,24089,68852,60171,29603,42535,86365,93905,28237,45317,60718,82001,41679,20679,56304,70043,87568,21386,59049,78353,48696,77379,55309,23780,28391,5940,55583,81256,59418,97521,32846,70761,90115,45325,5490,65974,11186,15357,3568,450,96644,58976,36211,88240,92457,89200,94696,11370,91157,48487,59501,56983,89795,42789,69758,79701,29511,55968,41472,89474,84344,80517,7485,97523,17264,82840,59556,37119,30985,48866,60605,95719,70417,59083,95137,76538,44155,67286,57897,28262,4052,919,86207,79932,44236,10089,44373,65670,44285,6903,20834,49701,95735,21149,3425,17594,31427,14262,32252,68540,39427,44026,47257,45055,95091,8367,28381,57375,41562,83883,27715,10122,67745,46497,28626,87297,36568,39483,11385,63292,92305,78683,6146,81905,15038,38338,51206,65749,34119,71516,74068,51094,6665,91884,66762,11428,70908,21506,480,94183,78484,66507,75901,25728,52539,86806,69944,65036,27882,2530,4918,74351,65737,89178,8791,39342,94963,22581,56917,17541,83578,75376,65202,30935,79270,91986,99286,45236,44720,81915,70881,45886,43213,49789,97081,16075,20517,69980,25310,91953,1759,67635,88933,54558,18395,73375,62251,58871,9870,70538,48936,7757,90374,56631,88862,30487,38794,36079,32712,11130,55451,25137,38785,83558,31960,69473,45950,18225,9871,88502,75179,11551,75664,74321,67351,27703,83717,18913,42470,8816,37627,14288,62831,44047,67612,72738,26995,50933,63758,50003,43693,52661,55852,52372,59042,37595,4931,73622,68387,86478,40997,5245,75300,24902,59609,35653,15970,37681,69365,22236,86374,65550,343,98377,35354,65770,15365,41422,71356,16630,40044,19290,66449,53629,79452,71674,30260,97303,6487,62789,13005,70152,22501,49867,89294,59232,31776,54919,99851,5438,1096,72269,50486,16719,6144,82041,38332,64452,31840,99287,59928,25503,8407,46970,45907,99238,74547,19704,72035,26542,54600,79172,58779,35747,78956,11478,41195,58135,63856,33037,45753,60159,25193,71838,7526,7985,60714,88627,75790,38454,96110,39237,19792,34534,70169,24805,63215,38175,38784,38855,24826,50917,25147,17082,26997,32295,10894,21805,65245,85407,37926,69214,38579,84721,23544,88548,65626,75517,69737,55626,52175,21697,19453,16908,82841,24060,40285,19195,80281,89322,15232,70043,60691,86370,91949,19017,83846,77869,14321,95102,87073,71467,31305,64677,80358,52629,79419,22359,87867,48296,50141,46807,82184,95812,84665,74511,59914,4146,90417,58508,62875,17630,21868,9199,30322,33352,43374,25473,4119,63086,14147,14863,38020,44757,98628,57916,22199,11865,42911,62651,78290,9392,77294,63168,21043,17409,13786,27475,75979,89668,43596,74316,84489,54941,95992,45445,41059,55142,15214,42903,16799,88254,95984,48575,77822,21067,57238,35352,96779,89564,23797,99937,46379,27119,16060,30302,95327,12849,38111,97090,7598,78473,63079,18570,72803,70040,91385,96436,96263,17368,56188,85999,50026,36050,73736,13351,48321,28357,51718,65636,72903,21584,21060,39829,15564,4716,14594,22363,97639,65937,17802,31535,42767,98761,30987,57657,33398,63053,25926,20944,19306,81727,2695,97479,79172,72764,66446,78864,12698,15812,97209,38827,91016,91281,57875,45228,49211,69755,99224,43999,62879,8879,80015,74396,57146,64665,31159,6980,79069,37409,75037,69977,85919,42826,6974,61063,97640,13433,92528,91311,8440,38840,22362,93929,1836,36590,75052,89475,15437,65648,99012,70236,12307,83585,414,62851,48787,28447,21702,57033,29633,44760,34165,27548,37516,24343,63046,2081,20378,19510,42226,97134,68739,32982,56455,53129,77693,25022,55534,99375,30086,98001,7432,67126,76656,29347,28492,43108,64736,32278,84816,80440,30461,818,9136,1952,48442,91058,92590,10443,5195,34009,32141,62209,43740,54102,76895,98172,31583,4155,66492,58981,16591,11331,6838,3818,77063,12523,45570,68970,70055,77751,73743,71732,4704,61384,57343,66682,44500,89745,10436,67202,36455,42467,88801,91280,1056,27534,81619,79004,25824,66362,33280,20706,31929,57422,18730,96197,22101,47592,2180,18287,82310,60430,59627,26471,7794,60475,76713,45427,89654,14370,81674,41246,98416,8669,48883,77154,9806,94015,60347,20027,8405,33150,27368,53375,70171,59431,14534,34018,85665,77797,17944,49602,74391,48830,55029,10371,94261,16658,68400,44148,28150,40364,90913,73151,64463,50058,78191,84439,82478,62398,3113,17578,12830,6571,95934,9132,25287,78731,80683,67207,76597,42096,34934,76609,52553,47508,71561,8038,83011,72577,95790,40076,20292,32138,61197,95476,23123,26648,13611,48452,39963,85857,4855,27029,1542,72443,53688,82635,56264,7977,23090,93553,65434,12124,91087,87800,95675,99419,44659,30382,55263,82514,86800,16781,65977,65946,13033,93895,4056,75895,47878,91309,51233,81409,46773,69135,56906,84493,34530,84534,38312,54574,92933,77341,20839,36126,1143,35356,35459,7959,98335,53266,36146,78047,50607,22486,63308,8996,96056,39085,26567,6779,62663,30523,47881,41279,49864,82248,78333,29466,48151,41957,93235,53308,22682,90722,54478,7235,34306,15827,20121,96837,6283,80172,66109,92592,48238,76428,94546,45430,16288,74839,740,25553,83767,35900,5998,7493,46755,11449,88824,44906,33143,7454,56652,34755,63992,59674,65131,46358,12799,96988,51158,73176,1184,49925,63519,11785,29073,72850,47997,75172,55187,15313,40725,33225,56643,10465,38583,86440,97967,26401,17078,38765,33454,19136,57712,48446,98790,27315,71074,10157,57946,35582,49383,61324,26572,84503,3496,60449,17962,26017,65651,40400,83246,80056,75306,75147,41863,25581,87530,33193,43294,5065,99644,62771,75986,79005,44924,18703,40889,4403,5862,2571,82500,74200,36170,46836,74642,65471,26815,30937,64946,10160,15544,31962,54015,28853,66533,14573,79398,47391,73165,47805,77589,16881,13423,89452,76992,62509,9796,57540,13486,48855,25546,47589,21012,47388,78428,70196,84413,81026,87597,22445,83769,85937,38321,85485,87359,9839,67228,71179,94372,4446,62801,50775,96179,40646,44272,12417,47199,39701,30665,32775,66525,53558,78882,31939,67209,38906,34533,99914,27719,216,99225,96537,3843,90564,91110,51838,30300,9559,37795,94880,11325,44979,89696,28129,29931,89971,46292,92710,11036,74760,75307,12291,49618,16293,92408,67928,80823,32872,25460,66819,35374,4035,99087,61129,11341,39118,10891,37217,63638,75477,30068,42334,57570,6890,59353,89939,37692,15232,20033,32202,22348,2766,96791,58448,92248,5769,96684,67885,99295,47271,38655,59513,96960,31718,8974,16122,20535,52380,29769,70660,57425,50891,75044,84257,73315,38181,28673,93140,26307,82265,78382,19681,56585,8975,76764,39956,83450,84663,89963,71584,57696,30829,60527,64947,34899,28805,28397,91830,51842,99838,39839,66971,67177,74219,35637,35634,93581,81746,29991,81096,94279,2968,62561,2479,82126,25702,67953,88088,50293,83423,86206,39935,23253,43041,48941,85787,8388,6671,43574,84908,67295,33623,55060,28174,48415,2529,22009,24524,5283,30460,32399,80423,56929,40852,69969,88541,5979,91496,64730,57198,83145,39750,3568,54669,98679,4297,51047,31492,47734,31343,31180,232,19707,24823,75079,73943,17997,8446,91252,39879,58682,82972,18417,39203,36681,42895,8459,15618,17941,52594,43277,16530,40052,91100,87422,47230,95699,49794,50492,87439,86354,4546,65333,11057,77727,19748,38722,91821,18107,42125,89239,28847,54623,38783,47803,31414,38450,3697,89186,30579,44188,26532,8420,80723,48100,60748,76330,45832,8311,16051,4475,13400,48527,46073,17439,56498,94632,9021,16871,83366,14896,4219,38375,87890,90217,42370,61028,85101,76771,83715,94737,69973,74187,1958,59691,86712,86570,60984,76342,13648,85250,28323,48379,45141,36277,51845,29039,3553,5128,59866,51281,68124,17007,24729,29710,41439,40574,11774,86746,89698,56020,37810,88972,11361,95583,70786,589,74473,87513,17690,61427,72914,32517,1804,97910,6327,30246,33049,2622,41026,80875,41293,16752,84225,84414,37137,68956,8095,64981,28180,38629,76962,23840,17477,75268,48297,70340,57888,13938,38554,86836,2195,30270,55484,53364,54705,41380,56316,37723,234,21424,26664,63804,75139,36534,18579,9833,98849,72762,59767,52497,24227,83152,71794,21398,99456,89215,51632,54799,27973,68568,68465,98500,28681,18369,24279,96335,12874,82160,67202,85199,27908,67022,49810,77929,96212,81153,77884,7032,1671,53362,28119,56786,30883,28540,76029,3774,64611,19736,25589,46569,45206,48215,69523,17423,91807,90039,30393,58319,85098,66519,57571,24541,3562,14400,62731,82534,61477,89731,18421,29861,52829,838,78040,43350,74323,82892,84746,28302,13264,7595,134,12933,46831,24864,47275,20527,9110,28485,30326,99826,64005,99308,65779,42760,90066,3974,38688,39968,32604,11694,46262,73262,45405,43923,67397,88228,56405,17839,92073,57622,93328,15442,50186,7570,58001,31e3,8915,11467,14793,82691,51238,12485,51745,18192,5985,36826,89434,38669,91592,88799,65621,67237,59541,19657,93402,58705,73553,78280,69125,95591,81168,91927,25976,89077,71690,19404,64603,59752,74698,44233,67602,38615,31303,28650,53700,89819,7783,4351,77451,47350,21234,16016,41532,76508,23063,44993,43983,33356,61715,96485,22121,78004,6316,87896,99289,93981,37850,66128,92735,45064,50924,24204,58816,65290,34392,55567,66416,72353,45775,68590,85685,72683,60090,37149,85347,57414,72336,12979,5720,92754,76911,96883,74420,5220,85815,23557,80567,44365,70254,50864,36619,51479,23281,76428,18580,34240,59289,49076,18439,29522,42541,4024,84446,92434,90407,77241,19690,78143,65919,13699,91844,91241,38361,67171,90551,5709,3474,76025,97043,33834,44638,54040,82797,545,38159,16089,35870,89158,55864,98078,50563,36492,10994,85909,9018,19252,73887,67928,60045,70782,11937,4074,53814,46621,52577,94853,45968,73667,65062,73306,76045,78649,91654,53958,96537,95542,67622,54579,17279,67440,56441,20681,64011,52226,96618,32831,60664,67547,39523,2043,59748,1887,69229,94653,99271,98164,62155,9234,47367,13047,6364,35064,10073,6793,80248,29009,44969,11129,17139,79630,89772,26921,56949,23465,30036,17173,82459,96218,60768,76417,24405,18710,68887,82394,69729,82503,40873,41590,67255,30757,9657,91881,34578,9511,5417,58953,18532,10721,22029,48524,47778,881,83489,3464,57462,97459,86689,39755,39547,740,36666,7993,31671,86304,12970,73402,52849,31652,79655,11250,18463,57518,20306,25301,1374,51208,33298,87662,61849,60923,68685,69411,39266,80320,34844,89416,81569,83651,35795,40168,33501,1042,58931,3892,85188,74740,85476,23790,33842,89565,53359,25579,59049,62394,72435,12457,21904,18370,97035,57905,9581,91227,92754,37760,1411,7440,87175,88318,63242,85960,56690,12618,30493,11569,73723,7448,58830,157,65814,21118,22140,73793,57855,81830,6795,13183,12625,30635,56429,73216,12342,36722,83886,96828,82870,90954,97614,2370,42160,73370,11944,49067,59452,80495,43911,46712,17033,68037,41963,3874,44856,82985,57453,84358,16120,4454,76624,405,62369,55080,61880,51270,87807,10653,36894,70850,35660,234,14705,93418,94084,82856,25384,71555,56754,78315,18291,91656,98079,52384,43306,65205,75903,58701,99496,50048,33557,87793,90857,10143,46726,84284,43635,41213,83845,70986,91408,80220,5728,68890,46577,21152,43759,43301,93661,97252,50106,10099,13722,18572,44024,351,18173,23717,85114,85998,57782,63951,53723,86853,63851,79430,49181,46386,69666,55743,76162,71724,40028,94786,34457,16906,90040,30789,40281,94697,96584,81907,4055,53990,66397,80579,42517,78181,39251,9467,67097,95523,66568,63632,71048,15581,39904,75774,77495,75994,29911,65690,41178,47712,70355,16998,56025,5230,10093,71495,34784,70950,54680,57811,53782,39145,36829,85342,40406,35883,45668,3459,29870,78252,70088,70621,67153,5737,40933,91075,93335,86853,15860,81167,91259,16118,52401,83593,84474,2423,75608,39646,90871,70284,82100,96032,5115,63678,2225,88087,58581,44364,57468,21539,13042,64150,63754,5210,87644,54114,64013,63562,41388,32397,74152,23982,71982,71700,33026,66477,47838,46712,39848,35083,65927,97868,11067,76771,71799,43836,41014,97025,93225,8511,63096,26628,73012,12543,76269,99708,2629,49845,73677,19193,14924,57236,95564,15010,59667,73773,78515,2624,99744,13585,33746,58771,94785,62628,99585,11363,80832,59979,9444,78700,2596,85984,69438,16913,96475,93283,18625,77086,45911,39746,64722,39938,43930,54619,302,50384,2738,75714,75249,95439,80714,52555,47266,96190,78750,94973,83669,16479,53163,48071,28e3,45011,26733,67132,83362,84162,43028,8415,27236,52651,89059,64844,80910,1676,91752,57815,26264,3415,57532,29981,61200,96036,62600,20068,56530,38487,8432,89514,26883,69165,97237,22361,55276,39902,95927,82190,49269,27212,46095,37106,64254,27460,49572,51700,27679,12574,33891,3867,9925,6476,82018,45094,59014,67113,44192,75,23318,79895,70550,81717,28833,30271,15821,14999,88174,62617,57517,55256,50281,51583,96879,5225,42272,5339,20483,57596,41011,75937,22767,50120,95938,49753,63882,99616,69083,38721,73889,80236,99531,23053,71237,48861,59046,76283,60538,19732,93877,30345,64882,66660,17026,70364,45676,8039,96228,89936,59141,95585,89552,97247,59325,27848,80058,15950,61481,90906,40998,44137,16144,66300,44091,50018,81364,18211,60294,76559,20279,27414,10589,39860,23e3,31767,95618,56738,50332,16936,70342,92481,30702,76264,62619,68678,62284,83112,93032,55203,52614,36950,41796,45403,79262,2887,53596,61308,20738,34811,27099,90956,65448,3080,75795,29753,97699,80872,23830,85882,74427,99523,74904,28017,45898,57232,48525,7086,26805,74533,92470,18840,76011,93109,14344,55614,50284,15865,19458,35856,13464,53679,64603,51571,56124,79107,29596,89572,78198,57121,73649,8804,87977,87959,70859,40909,77295,87877,75158,62810,92074,23244,59516,50552,31602,41899,6347,27821,68370,48596,88577,30231,25267,84622,31449,12086,56461,22962,78213,62483,93966,60437,52239,58113,32526,38708,81607,57016,1695,90110,4649,59990,23979,3855,10297,46516,96092,82305,30760,78756,4967,82876,4773,86651,16648,53133,82439,78851,49766,24553,15273,36417,1901,33386,76979,25920,33372,2695,11982,40911,6230,91696,43907,17827,30332,89203,32215,91806,23080,49102,9174,11548,54590,75803,66108,73882,62324,26017,72716,33887,1285,31604,71039,24337,53514,58964,89901,22040,92751,12617,37007,5523,61672,62557,98540,26094,60284,19621,96230,38044,6545,9458,42988,2913,86345,67936,90174,40840,44991,24256,34989,74086,13652,68706,1363,4294,88008,78693,83068,94746,221,89299,53186,5930,61889,51341,45412,58860,72568,11381,59785,36887,10690,31347,93326,96267,86987,57565,86836,49071,90331,41248,34629,30240,27270,3864,84308,3035,61369,36902,51017,44409,17120,23823,36460,63359,8333,63173,19134,6493,303,18550,26191,19051,81502,66343,6737,90430,65478,58982,82484,16483,47704,44640,68322,44548,72787,2335,28749,39320,5436,98146,56596,812,51445,35533,35478,47573,38414,25542,38032,13442,42983,97207,77854,57806,81616,52828,79429,47389,96795,57764,19605,24767,63253,18809,65093,44449,22952,76872,30983,38948,9310,48336,87651,27110,84427,76209,56412,12760,16747,14551,82626,31224,98636,75100,84882,79479,83420,5347,6803,90063,4617,40257,79183,41766,71873,25242,12275,336,40798,42055,74066,69128,32547,76508,32530,42359,89207,49758,58984,92732,15779,7234,28884,28226,50011,35883,99606,45423,76224,75427,85747,33879,97978,57441,927,19164,74716,40702,19715,70917,60344,40236,9019,50577,15598,53136,57285,20536,7539,74832,89184,41501,39447,97422,97041,21913,40581,76081,13089,28776,54164,55736,36263,71841,34488,74988,55467,43322,9214,36746,67981,71877,81683,32461,84091,19422,88366,62054,85664,13409,8003,88276,6989,16607,33633,85349,5784,25950,97998,74110,16699,60184,92818,79705,10381,1474,18656,50434,18232,92132,66537,70141,42854,25120,39581,28249,14215,34810,19767,3409,11807,6566,66138,42997,41999,67504,87117,28961,5e3,29673,77726,73225,54753,69712,71576,92337,17713,63185,87923,91889,68351,17712,75532,93849,48280,62219,317,25290,29209,90927,92929,92762,60413,2018,31793,76290,73373,80777,60819,77375,57886,47291,99670,32605,29064,99476,80999,31217,35,91300,14892,73653,26593,25305,56797,12837,39560,27582,37253,38531,76489,49946,69108,58687,43092,73807,96282,6648,67431,87124,57694,21660,64002,6,33600,30245,60636,80164,9285,61426,4658,54130,14710,76553,1904,93668,63110,98618,5601,32199,74923,98049,49717,55539,35940,58545,43295,35810,45451,38735,42065,66769,69825,45461,83881,67372,67351,90612,79502,69460,23108,74421,82990,46821,40683,71603,55267,48192,50242,79738,96417,6664,19929,23644,41116,51056,219,45086,32747,49492,15399,24874,80825,95928,61457,45813,59037,16136,3953,83583,5910,12654,53630,92997,22168,93491,71897,74579,24022,6278,24049,71670,43044,8474,38572,77402,35800,7455,96177,41653,74493,20802,65843,73050,73349,2638,65813,96209,49196,45007,32207,14097,66059,46681,7534,71263,20582,10171,51514,52142,60961,57951,25637,37860,21683,86190,90434,94481,85697,95344,2606,74095,61133,7472,64777,94050,41482,975,23471,76052,82021,87676,91345,20196,2612,86299,44996,40312,65712,46079,88514,8610,3685,63197,9073,53105,86824,28112,99306,40706,66840,83003,51590,52755,32285,68454,85058,13645,23073,24724,52989,71880,21952,44144,74975,76715,7844,46447,86643,75579,29276,10864,83179,36721,19300,35066,29383,47478,56644,33354,31414,17643,92374,85085,88458,87191,85248,34963,76278,53230,13953,76985,70959,36663,5293,32658,56767,56997,76736,6558,64248,11907,29123,78458,17678,63805,89973,5076,39263,54404,4355,64957,74407,99838,18836,78098,6490,74888,73719,80675,86178,56283,33591,96957,38382,18772,74773,71229,2603,52673,44609,14843,58418,18060,95459,626,30914,13550,42195,44863,8871,89182,64446,78422,41140,15312,98274,48168,95651,35562,85386,56252,72136,85088,68761,78434,98143,61330,2446,64409,49406,99127,98626,55095,44808,13594,87370,89472,12833,98932,68064,58193,20225,5192,28425,23978,24542,80845,55858,4015,21454,37346,51007,17202,10242,12682,55933,96922,22280,75597,50227,70712,44236,20470,36320,49339,60536,80083,38880,93327,49522,93585,9918,55268,4671,57526,11457,48424,54610,7211,78610,9473,72923,27347,30057,76968,26177,59367,46172,88951,40229,34921,60405,88959,16779,29547,92231,61997,36002,21080,39795,77221,10012,49748,76900,15964,3803,40260,92351,92844,10288,57483,10881,70408,75688,16610,1638,93082,44282,66849,75702,69428,34047,84968,71281,72328,73143,88672,49802,50639,18129,93659,58389,49095,45971,34196,84609,59222,19332,17777,41004,47057,30688,16039,20906,41477,42915,60877,33864,75195,62294,3371,11672,1370,2486,35553,17907,90621,45136,9722,67635,12114,63055,16004,21625,24321,20491,26881,66259,94287,54751,36242,36557,5842,30687,65418,94608,24741,45887,78800,86912,42076,50287,9284,68891,76368,83094,96302,35997,30761,97081,9501,68887,32876,1705,34260,95065,45528,88241,30402,12318,52430,40139,96986,84900,72408,42027,31676,54382,73370,26184,14024,57444,57660,52173,30274,93448,63273,77681,74946,2099,69091,19372,66961,14595,58642,75760,52253,53148,26074,52293,65359,63971,4833,86492,1227,54505,19515,89889,46933,13364,33883,83389,36952,52505,67513,40071,31001,3105,87912,29610,75108,37363,28479,43546,89992,19550,54863,82633,19209,21548,35022,21960,57961,11815,95867,559,26428,69386,57453,70147,73538,49562,46806,64550,36653,25718,68792,31113,7607,48037,71020,22666,65957,11141,39227,7990,19849,65972,74528,40888,55386,95918,92088,91125,53648,66122,138,79933,71058,34826,97725,69513,22915,18246,52244,91161,40861,40374,13239,56162,4703,95851,22824,41271,28202,62852,84238,46625,20031,8524,20077,65817,21174,29279,57712,22401,67500,30980,74485,26480,21343,30031,61921,35744,57308,71196,1865,49234,62616,54021,29008,83672,85839,96836,45077,80900,66906,63526,93824,71820,11033,20183,85704,4683,63512,39144,56880,64424,95979,17709,94849,31771,5737,84286,16757,46256,24478,73180,59978,8254,78963,95437,86351,33824,32540,18357,2668,99260,21284,81351,70961,10255,6911,47394,72408,23827,59865,96395,30665,43699,3593,29165,23388,26628,92402,16731,86740,29493,9069,78653,90094,42735,33682,95041,89887,92369,57949,81585,50593,14698,4737,72551,57271,59433,156,33966,58773,59108,49578,18100,59836,73221,21110,1650,11058,47770,66141,84576,58388,40915,94507,32209,17272,65674,95552,25685,5345,36995,36302,7971,67001,62062,75939,36005,26739,56484,46885,66348,87666,78055,44485,82955,85936,9219,1847,92687,72579,45457,78252,98239,4e4,75563,92408,17175,78845,32638,26959,35406,59553,57852,7506,9,93172,77713,93880,40981,27924,9678,24538,52426,84852,83781,23712,82490,77890,22482,66668,55850,25644,44972,62275,78089,28894,98685,32998,98766,89119,34355,75127,69797,71419,62067,57990,96514,50603,79807,26135,29207,43632,32905,38513,18924,88872,20758,70232,60425,1116,24077,21369,93541,75329,78656,44251,42014,98154,42552,14575,30765,348,1134,71581,68420,78141,21105,63305,9718,54851,65867,8595,47390,39182,51174,41478,64433,59628,31945,87322,78667,95282,5622,26224,19972,97269,98376,14779,51138,49658,45345,4972,52794,15737,496,48939,63485,42780,16061,59631,37171,13483,56058,51093,62290,88227,17400,88433,67363,89507,26482,85964,71336,67799,28342,37747,61722,27180,78755,18603,42953,6606,23875,56766,1932,36113,62807,84012,21103,9685,69662,76755,13701,95168,13169,44726,15284,16702,89617,54397,52052,12835,37741,86434,22400,37947,95763,86337,35189,22756,47473,16618,42479,47405,14055,64262,66670,89692,54032,94591,44149,29854,76691,33263,62048,25116,88598,16119,62116,54517,31883,86707,18895,81790,71294,2684,15292,48107,14341,91416,75609,92564,39987,2283,89970,95855,80970,5432,89860,90293,99851,94648,5598,32171,28793,92305,64244,8277,93391,96717,34464,29838,10664,28050,60122,77934,10758,84922,92220,45071,97697,36368,17792,84792,76594,67319,51886,5665,45201,11348,9254,7510,51039,91683,84500,85338,5555,19633,3870,39576,41486,58524,54508,20707,58504,39642,22454,80069,83455,31043,90794,51934,3295,26582,16300,74990,22197,83310,69642,81113,58558,84833,17105,46659,25003,85749,44829,4103,67516,76458,52392,53546,70291,98846,67315,30686,18555,29755,5923,22732,19501,56181,85351,5023,4808,56911,16793,75336,49712,27723,96974,34321,5454,12862,71924,45928,95697,68664,58183,78104,42483,71204,99628,40642,56410,17350,13396,76724,87509,9158,83708,27298,92651,95086,38851,63558,89810,1580,32518,35795,26514,56322,78635,63731,91428,7247,66460,38671,26799,22549,47991,46064,80467,40083,17141,39152,99872,27561,75389,74778,94893,82935,99076,93419,10474,84436,47536,16719,60136,80566,28404,74525,74212,3704,65516,98197,34210,64140,22238,49939,99542,27481,21992,78181,90060,71365,66935,29578,14961,8569,9454,43308,66753,45972,93572,16382,87320,37183,25478,38164,31997,69856,60898,63968,62264,4799,17591,89937,73905,55890,88285,2448,40398,54180,65869,45155,43407,39105,339,51619,20203,21189,68245,76912,1222,76411,82679,7,66047,32043,42627,16638,27019,15248,66444,8249,18790,82150,54084,84469,3426,50226,99868,88894,43769,66384,8593,41414,2976,60053,51866,87904,74135,53842,59520,67482,16995,32328,29555,49067,2799,68851,41049,97190,53984,99755,46412,45885,64e3,21962,36438,71742,57223,66599,86071,31436,32667,98099,38399,47377,5171,2742,48803,17823,22093,9866,691,5514,25546,2114,5919,56181,96052,67211,61712,25995,3188,23833,38549,44775,55355,61548,55988,47309,23749,30667,70732,33299,16127,30842,78961,41072,9876,18903,30292,25275,61881,15939,72573,84502,92654,97226,53434,77025,63892,12421,33644,39445,30933,84218,13757,37719,84450,2697,60309,22402,80310,92771,45205,72792,95776,85945,74651,216,50842,47854,21916,61588,75405,10495,83083,60427,78495,99809,47890,22993,21508,9459,26845,98130,1184,46438,27698,40652,65654,98517,1096,6998,49133,57041,77983,58708,42176,67356,324,70063,10597,65205,25622,34336,16640,27896,26907,86760,48244,89650,44997,51609,28934,9171,97859,97213,19859,41037,64081,94781,27683,41521,52871,86935,26486,38744,25943,60617,6414,42292,46204,53262,30201,38776,88831,97253,67282,72860,18452,60927,81504,57713,30296,10896,39900,67135,42772,4631,55283,39253,25264,1809,12874,88035,88421,90491,83290,6884,15444,90113,20406,20796,40239,34431,15018,45600,17241,26611,9551,89126,65673,31708,91252,39647,63011,24193,58932,89326,33491,53217,27976,70151,37531,53576,23931,11789,73073,52171,89301,51718,15385,79487,66436,35771,34163,86540,42665,80748,77622,14679,40185,25030,42622,13162,17048,24243,59985,59807,60562,3595,10135,29199,69784,59796,38194,58432,50943,40422,63035,3208,81440,90749,88046,32218,88092,22224,2627,91576,16781,43948,57795,71073,27817,87077,82717,24473,42096,76920,88864,90537,14715,42551,45066,24316,37361,38582,21871,14672,93362,21727,57021,94313,39562,64985,94028,46094,43845,91838,79574,7597,3153,56783,18817,74711,6883,91061,31674,73729,99315,66183,57647,74484,68077,33224,397,56753,53158,71872,68153,9298,20961,49656,33407,95683,14328,44708,72952,27048,67887,28741,46752,88177,95894,40086,88534,87112,68614,83073,88794,96799,67588,75049,84603,83140,97347,87316,73087,77135,71883,98643,3808,8848,14133,60447,1366,72976,1868,51667,63279,60040,88264,79152,3474,61366,20523,21584,93712,83654,89761,90154,96345,37539,32556,74254,70603,97122,44978,78028,8943,13778,11080,34271,68276,85372,48410,94516,15427,75323,71685,70774,50342,33771,3678,42321,69788,41758,55004,30992,17402,63523,42328,87171,24751,15084,33884,83655,88345,69602,52606,57886,18034,3381,75796,35901,77480,28683,68324,66035,7223,14926,16128,13645,90370,31949,11057,98849,29499,21565,30786,83292,92392,37104,36899,49906,79368,43710,80365,88735,75275,21664,57965,19002,301,12658,94385,1717,96191,50404,80166,93965,24688,27839,10812,31715,92127,42588,93307,80834,11317,26583,25769,98227,14884,58462,29148,68662,26872,72927,79021,51622,29521,33355,45701,45996,33782,93424,16530,96086,17329,74020,11501,46660,5583,22277,77653,55430,84644,448,86828,58855,67451,95264,67386,82424,52611,60012,88620,72894,94716,22262,99813,69592,63464,33163,91857,47904,22209,78590,68615,52952,31441,41313,18550,72685,68825,4795,53971,14592,39634,23682,76630,2731,81481,86542,23727,54291,56045,61635,32186,9355,73416,63532,24340,18886,84832,30654,48543,18339,65024,91197,64624,74648,9660,27897,49771,11123,8732,49393,12911,72416,17834,18878,62754,85072,23727,56577,51257,83291,12329,16203,91681,68137,79959,43609,58987,2026,42969,59144,84349,75214,76972,22633,64104,53799,16851,99197,70476,77113,46320,88693,37711,96536,68156,7119,2104,49435,77706,18924,24957,92406,87148,70482,36491,42605,54440,7893,31618,35707,65130,30007,75706,77266,37100,9601,87681,42543,69847,81848,32034,49429,99434,62209,17125,55227,61634,52574,83649,28725,70119,62467,80676,21192,99584,21310,25292,72781,17186,10393,98390,19789,92931,36234,62627,23437,3885,58822,82941,43806,8172,23790,72295,36196,98200,2889,87619,13846,56197,27151,21238,48794,81100,62643,40001,39243,33213,78416,194,91369,79342,36404,52308,13741,24442,88610,12659,11574,70052,93039,79367,41792,61816,35435,47192,97596,28330,41145,16918,62865,9576,45857,68737,90124,16703,7071,48433,57222,34435,800,72496,16449,68187,28739,97672,86818,50768,40807,88681,64340,2224,19703,59245,90905,31239,84216,93942,97371,16842,92168,52692,16064,84686,89444,27938,98406,41365,4515,20494,18813,16242,10634,61566,18592,78057,8720,33739,78345,87693,30242,70545,55521,23687,9160,8655,38811,61768,7228,5567,5561,82071,85,50145,23113,97761,88441,14891,72188,85166,37189,75671,81377,92470,73645,93258,6610,12185,43065,26704,47922,56650,7527,18006,56948,51675,16658,66402,1047,81624,77395,62310,73262,66050,57275,32936,87641,51528,58183,21952,84098,28913,28622,18140,89796,41317,93954,67690,64667,57092,21315,4731,76115,77291,11204,8634,93034,27411,27149,13843,9817,9407,84492,28444,59901,14592,89654,66207,66232,80293,74502,36925,55515,10121,16768,4720,71502,40500,21406,571,87320,81683,42788,86367,44686,22159,67015,35892,49668,83991,72088,30210,74009,86370,97956,2132,93512,54819,26094,51409,21485,94764,85806,13393,48543,7042,76538,64224,47909,9994,23750,17351,52141,30486,60380,86546,66606,36913,58173,45709,83679,82617,23381,9603,61107,566,6572,64745,10614,86371,43244,97154,10397,50975,68006,20045,16942,25536,74031,31807,70133,78790,40341,68730,39635,39013,66841,44043,96215,21270,59427,25034,40645,84741,52083,54503,36861,27659,95463,53847,40921,70116,61536,56756,8967,31079,20097,76014,99818,16606,19713,66904,27106,24874,96701,73287,76772,6073,57343,51428,91171,28299,17520,64903,4177,36071,94952,59008,28543,11576,74547,13260,20688,41261,2780,6633,37536,8844,95774,49323,30448,14154,83379,71259,23302,68402,43750,88505,15575,44927,6584,29867,21541,65763,12154,86616,79877,73259,68626,98962,68548,86576,48046,51755,64995,3661,64585,81550,46798,49319,50206,22024,5175,12923,23427,55915,91723,55831,83784,81034,86779,34622,84570,18960,48798,42970,95789,39465,82353,68905,44234,18244,54345,5592,89361,14644,67924,66415,89349,88530,72096,44459,5258,48317,48866,56886,90458,75889,4514,37227,11302,4667,2129,80414,86289,15887,87380,50749,83220,50529,20619,11606,36531,23409,78122,19566,76564,33045,66703,30017,35347,35038,12952,13971,3922,98702,11786,38388,69556,76728,60535,59961,23634,42211,98387,34880,27755,93182,99040,96390,65989,38375,3652,59657,57431,24666,11061,64713,85185,72849,58611,31220,26657,77056,24553,24993,5210,89024,32054,46997,92652,28363,98992,22593,97710,47766,37646,93573,95502,33790,92973,27766,62671,89698,10877,73893,41004,96035,18795,48080,59666,30241,35233,87353,43647,13404,41982,19264,29229,61369,8309,39383,42305,25944,13577,51545,68990,69801,37145,79189,55897,57793,66816,21930,56771,79296,73793,21632,42301,23696,72641,56310,85576,3004,25669,69221,32996,23040,65782,23712,13414,10758,15590,97298,74246,51511,46900,36795,38292,3852,6384,84421,3446,91670,45312,27609,87034,6683,83891,88991,16533,9197,34427,60384,48525,90978,46107,21693,12956,21804,46558,37682,81207,85840,53238,35026,4835,53264,41376,17783,64756,39278,25403,33042,20954,31193,24247,45911,92453,25370,86602,48574,57865,26436,16122,76614,17028,21262,59718,77821,14036,31033,90563,45410,15158,90209,84089,38053,60780,54166,14255,33120,27171,71798,91214,80040,56699,12475,40193,59415,4769,75920,1036,2692,75862,16612,73670,61182,3305,90334,187,91659,28063,75684,50017,82643,9282,77376,85469,8164,5584,36623,82597,83859,3435,98460,70095,80257,4381,6501,8924,35514,14297,54373,71369,5172,15955,82441,4636,48215,6821,3385,17663,40107,55679,30366,42390,95895,16083,58499,17176,55993,51034,49296,4010,78974,35930,2019,96226,27167,68245,53109,59037,37843,79243,10262,58797,61490,82590,52411,54783,29447,94551,30026,97959,93939,73217,82573,62154,78291,33728,39102,11484,86210,43794,73553,87435,1110,77108,56521,78610,8254,1842,43068,70415,79195,26136,49786,47279,38471,20379,54704,86614,91138,51595,50818,80186,73087,17262,94735,4952,27935,4928,74862,51392,62388,9570,38485,30594,56278,47395,72762,94597,72279,16010,34697,54475,67874,78014,88381,4045,41494,55178,46054,24373,1824,55333,7525,97908,61178,84635,2199,35361,4803,21907,79414,66083,54782,58692,28332,41851,28198,55819,37313,67046,16147,90478,71230,34141,85002,44332,35906,429,39744,773,22909,19536,98986,90945,45209,85439,92265,25291,22775,60611,49159,95701,36113,53923,60824,84935,29656,50007,86624,61691,76150,32187,42765,60660,13859,10792,88210,29374,29563,45188,28811,19739,67649,73775,99247,48414,91067,68253,9452,90116,91737,73979,62370,69112,58791,20349,71480,56852,36919,87977,77609,68738,85159,4918,70076,46473,4122,57713,1426,50987,77910,66211,62546,77749,96462,34304,77441,12104,91805,10287,60943,49632,83116,25716,23113,22707,77770,31176,6759,46130,4739,55554,3843,31653,70834,72877,41561,36903,23010,6663,2266,16360,70118,91936,17098,77278,4880,23484,94970,41826,46733,93484,68350,38861,18134,32936,241,24803,13876,93278,5039,35873,44418,5305,28510,36115,46717,15238,78607,23464,68635,55712,55007,92411,65739,4858,67537,37041,67453,89801,45963,14800,14225,65655,80463,9716,77255,65136,11230,76323,81433,36445,86523,61058,59560,19380,40791,48073,29626,36661,87907,57369,41623,13705,3880,45088,55444,41003,27754,1450,75312,71801,99600,60719,54182,29245,63315,73758,42973,32702,10855,56363,14638,84424,27178,78195,3133,70865,48019,26117,7151,52107,85562,41347,50486,69457,86961,95482,11857,93587,45680,42145,13029,10043,5142,49213,54525,85761,42707,70754,33768,87671,85038,58900,88438,20004,63390,14815,38875,73417,82875,89481,55517,944,15773,61814,32915,27868,5510,21916,28426,89881,16680,88850,11056,51991,4230,39107,49216,40065,4523,75848,95349,56034,10724,9885,88232,42478,65702,95696,39746,66032,88082,86905,30007,75068,66629,7358,26706,90511,72843,67857,20061,98581,69682,38e3,14186,70,2290,17269,30909,69449,19997,13275,2444,84985,51290,97641,15092,69650,21920,19617,7418,49725,91090,20805,28627,80665,67192,34697,57667,99323,50101,40587,35081,14037,34414,19898,60779,83267,87499,29596,41852,15813,32419,72232,8322,39184,46525,13833,65743,94595,37363,4711,35386,96413,10627,62625,56555,12919,93218,25191,98380,51923,66181,5788,73491,1452,487,12277,45415,11884,61300,94528,9181,26616,11455,31514,63290,45035,42759,33804,85721,80979,46010,50975,72482,31231,3086,58941,46102,25773,89742,29788,96741,88523,14922,88262,76305,57676,93259,2396,69145,26074,30056,3853,75317,56639,66203,38923,48939,22813,91864,10934,6714,84099,25631,73223,95630,97552,45950,22197,42886,33764,1263,41856,82057,62349,94091,78028,62651,18911,5693,92561,97821,41994,92343,76785,22216,4203,5038,86151,23596,24338,77181,51761,97693,10955,98159,37568,58932,72128,27303,99608,31688,57557,91022,43036,93927,32869,53653,55205,33139,47271,31224,51650,36422,86857,73799,22068,43376,84760,44898,65776,42451,71480,38509,41673,44141,75918,95652,68981,83001,48815,98086,67950,27986,33175,43624,55274,71051,61124,51550,64967,31570,15748,19159,38174,51078,79811,39183,57527,96550,85168,28824,47466,56993,13151,96664,29735,70251,1079,4314,77714,11507,1440,48415,31984,99915,20282,26524,18057,4992,40521,98108,84045,91961,79256,72244,25788,5487,23595,73302,14205,8925,27625,64343,28821,37992,67156,83320,31106,10884,30735,15067,51091,15668,48777,50770,19169,76504,41165,29749,92812,8065,66782,26841,1411,95461,61134,18699,52261,60469,81373,44825,11448,73320,30151,56991,31372,6655,36472,86292,30247,30931,21029,53410,9859,37267,47514,3492,49008,94727,25234,40546,53417,36492,25723,76227,58456,15979,34876,9574,34392,3751,36933,83921,65108,63135,67572,40184,21098],Yr=new Array(16),Jr=[16,8,16,24],Xr=4,Zr=0;function $r(){return Xr<0&&(Xr=4,Zr++),zr[Zr]%Math.pow(10,Xr+1)/Math.pow(10,Xr--)|0}function tn(t,e){var r=e-t+1,n=0,i=1;do{for(n=0,i=1;i=(i/r|0)*r);return t+n%r|0}!function(){for(var t=0;t<16;t++){Yr[t]=new Array(256);for(var e=0;e<256;e++)Yr[t][e]=e|e<<8|e<<16|e<<24;for(var r=3;r>=0;r--)for(var n=0;n<255;n++){var i=255<<(r<<3),a=0|Yr[t][n],s=tn(n,255);Yr[t][n]=Yr[t][n]&~i|Yr[t][s]&i|0,Yr[t][s]=Yr[t][s]&~i|a&i|0}}}();var en=function(t){function r(t){var n,i,a,s;return e(this,r),(t=t||{}).length=t.length||128,t.rounds=t.rounds||8,i=this,s=[t],a=u(a=r),(n=o(i,Wr()?Reflect.construct(a,s||[],u(i).constructor):a.apply(i,s))).blockSize=16-n.state.hash.length,n.blockSizeInBytes=n.blockSize*n.unitSize,n.W=new Array(16),n}return c(r,t),s(r,[{key:"reset",value:function(){var t,e,n;(t=r,e=this,"function"==typeof(n=Qe(u(1&3?t.prototype:t),"reset",e))?function(t){return n.apply(e,t)}:n)([]),this.state.hash=new Array(this.options.length/32|0);for(var i=0;i>>0&15]^=s,this.W[a+1&15]^=s}for(var o=0;o<16;o++)this.W[o]=We(this.W[o],Jr[i])}for(var u=0;u0&&this.addPaddingZero(this.blockSizeInBytes-this.state.message.length|0),this.addPaddingZero(this.blockSizeInBytes-8|0),this.addLengthBits(),this.process(),this.getStateHash()}}])}(Tr);const rn=en;function nn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(nn=function(){return!!t})()}var an=new Array(256),sn=[104,208,235,43,72,157,106,228,227,163,86,129,125,241,133,158,44,142,120,202,23,169,97,213,93,11,140,60,119,81,34,66,63,84,65,128,204,134,179,24,46,87,6,98,244,54,209,107,27,101,117,16,218,73,38,249,203,102,231,186,174,80,82,171,5,240,13,115,59,4,32,254,221,245,180,95,10,181,192,160,113,165,45,96,114,147,57,8,131,33,92,135,177,224,0,195,18,145,138,2,28,230,69,194,196,253,191,68,161,76,51,197,132,35,124,176,37,21,53,105,255,148,77,112,162,175,205,214,108,183,248,9,243,103,164,234,236,182,212,210,20,30,225,36,56,198,219,75,122,58,222,94,223,149,252,170,215,206,7,15,61,88,154,152,156,242,167,17,126,139,67,3,226,220,229,178,78,199,109,233,39,64,216,55,146,143,1,29,83,62,89,193,79,50,22,250,116,251,99,159,52,26,42,90,141,201,207,246,144,40,136,155,49,14,189,74,232,150,166,12,200,121,188,190,239,110,70,151,91,237,25,217,172,153,168,41,100,31,173,85,19,187,247,111,185,71,47,238,184,123,137,48,211,127,118,130],on=[1,11,9,12,13,6,15,3,14,8,7,4,10,2,5,0],un=[7,12,11,13,14,4,9,15,6,3,8,10,2,5,1,0],hn=new Array(16),cn=[1,1,4,1,8,5,2,9],ln=[1,1,3,1,5,8,9,5],fn=new Array(512),pn=new Array(22),dn=new Array(512),gn=new Array(22),mn=new Array(512),yn=new Array(22);function An(t,e){for(var r=new Array(512),n=new Array(22),i=0;i<8;i++)r[i]=[];for(var a=0;a<256;a++){var s=new Array(10);s[1]=t[a],s[2]=s[1]<<1,s[2]>=256&&(s[2]^=285),s[3]=s[2]^s[1],s[4]=s[2]<<1,s[4]>=256&&(s[4]^=285),s[5]=s[4]^s[1],s[8]=s[4]<<1,s[8]>=256&&(s[8]^=285),s[9]=s[8]^s[1],r[0][2*a]=s[e[0]]<<24|s[e[1]]<<16|s[e[2]]<<8|s[e[3]],r[0][2*a+1]=s[e[4]]<<24|s[e[5]]<<16|s[e[6]]<<8|s[e[7]];for(var o=1;o<8;o++)r[o][2*a]=Ye(r[0][2*a+1],r[0][2*a],o<<3),r[o][2*a+1]=ze(r[0][2*a+1],r[0][2*a],o<<3)}n[0]=0,n[1]=0;for(var u=1;u<=10;u++)n[2*u]=4278190080&r[0][16*u-16]^16711680&r[1][16*u-14]^65280&r[2][16*u-12]^255&r[3][16*u-10],n[2*u+1]=4278190080&r[4][16*u-7]^16711680&r[5][16*u-5]^65280&r[6][16*u-3]^255&r[7][16*u-1];return[r,n]}!function(){!function(){for(var t=0;t<16;t++)hn[on[t]]=0|t;for(var e=0;e<256;e++){var r=on[e>>4],n=hn[15&e],i=un[r^n];an[e]=on[r^i]<<4|hn[n^i]}}();var t=An(sn,ln);dn=t[0],gn=t[1],t=An(an,ln),mn=t[0],yn=t[1],t=An(an,cn),fn=t[0],pn=t[1]}();var vn=function(t){function r(t){var n,i,a,s;switch(e(this,r),(t=t||{}).type=t.type||"",t.rounds=t.rounds||10,i=this,s=[t],a=u(a=r),(n=o(i,nn()?Reflect.construct(a,s||[],u(i).constructor):a.apply(i,s))).options.type){case"0":case 0:n.C=dn,n.RC=gn;break;case"t":n.C=mn,n.RC=yn;break;default:n.C=fn,n.RC=pn}return n}return c(r,t),s(r,[{key:"reset",value:function(){var t,e,n;(t=r,e=this,"function"==typeof(n=Qe(u(1&3?t.prototype:t),"reset",e))?function(t){return n.apply(e,t)}:n)([]),this.state.hash=new Array(16);for(var i=0;i<16;i++)this.state.hash[i]=0}},{key:"processBlock",value:function(t){for(var e=new Array(16),r=[],n=0;n<16;n++)r[n]=t[n]^(e[n]=this.state.hash[n])|0;for(var i=[],a=1;a<=this.options.rounds;a++){for(var s=0;s<8;s++){i[2*s]=0,i[2*s+1]=0;for(var o=0,u=56,h=0;o<8;o++,h=(u-=8)<32?1:0)i[2*s]^=this.C[o][2*(e[2*(s-o&7)+h]>>>u%32&255)],i[2*s+1]^=this.C[o][2*(e[2*(s-o&7)+h]>>>u%32&255)+1]}for(var c=0;c<16;c++)e[c]=i[c];e[0]^=this.RC[2*a],e[1]^=this.RC[2*a+1];for(var l=0;l<8;l++){i[2*l]=e[2*l],i[2*l+1]=e[2*l+1];for(var f=0,p=56,d=0;f<8;f++,d=(p-=8)<32?1:0)i[2*l]^=this.C[f][2*(r[2*(l-f&7)+d]>>>p%32&255)],i[2*l+1]^=this.C[f][2*(r[2*(l-f&7)+d]>>>p%32&255)+1]}for(var g=0;g<16;g++)r[g]=i[g]}for(var m=0;m<16;m++)this.state.hash[m]^=r[m]^t[m]}},{key:"finalize",value:function(){return this.addPaddingISO7816(this.state.message.length<32?56-this.state.message.length|0:120-this.state.message.length|0),this.addLengthBits(),this.process(),this.getStateHash()}}])}(Tr);const bn=vn;function wn(t){for(var e="",r=0,n=t.length;r>6),e+=String.fromCharCode(128|63&i)):i<55296||i>=57344?(e+=String.fromCharCode(224|i>>12),e+=String.fromCharCode(128|i>>6&63),e+=String.fromCharCode(128|63&i)):(r++,i=65536+((1023&i)<<10|1023&t.charCodeAt(r)),e+=String.fromCharCode(240|i>>18),e+=String.fromCharCode(128|i>>12&63),e+=String.fromCharCode(128|i>>6&63),e+=String.fromCharCode(128|63&i))}return e}function Cn(t){for(var e="",r=new Uint8Array(t),n=0;n>18)+Sn.charAt(n>>12&63)+Sn.charAt(n>>6&63)+Sn.charAt(63&n);return t.length-r===2?(n=t.charCodeAt(r)<<16|t.charCodeAt(r+1)<<8,e+=Sn.charAt(n>>18)+Sn.charAt(n>>12&63)+Sn.charAt(n>>6&63)+"="):t.length-r===1&&(n=t.charCodeAt(r)<<16,e+=Sn.charAt(n>>18)+Sn.charAt(n>>12&63)+"=="),e}var Bn=function(){return s(function t(r,n){e(this,t),r.length>n.blockSizeInBytes&&(n.update(r),r=n.finalize(),n.reset());for(var i=r.length;i255*h)throw new I("L too large (maximum length for "+e[2]+" is "+255*h+")");for(var c=function(t,e){u.reset();var r=xn.getHmac(t,u);return r.update(e),r.finalize()},l="with salt"===a?r:"\0".repeat(h),f="skip"===a?o:c(l,o),p="",d="",g=1;g<=255&&d.length>>0,4)}}])}(zt);const Gn=Kn;function Vn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Vn=function(){return!!t})()}var qn=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Vn()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Fletcher-32 Checksum",t.module="Crypto",t.description="The Fletcher checksum is an algorithm for computing a position-dependent checksum devised by John Gould Fletcher at Lawrence Livermore Labs in the late 1970s.

The objective of the Fletcher checksum was to provide error-detection properties approaching those of a cyclic redundancy check but with the lower computational effort associated with summation techniques.",t.infoURL="https://wikipedia.org/wiki/Fletcher%27s_checksum#Fletcher-32",t.inputType="ArrayBuffer",t.outputType="string",t.args=[],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=0,n=0;t=ArrayBuffer.isView(t)?new DataView(t.buffer,t.byteOffset,t.byteLength):new DataView(t);for(var i=0;i>>0,8)}}])}(zt);const Wn=qn;function zn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(zn=function(){return!!t})()}var Yn=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,zn()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Fletcher-64 Checksum",t.module="Crypto",t.description="The Fletcher checksum is an algorithm for computing a position-dependent checksum devised by John Gould Fletcher at Lawrence Livermore Labs in the late 1970s.

The objective of the Fletcher checksum was to provide error-detection properties approaching those of a cyclic redundancy check but with the lower computational effort associated with summation techniques.",t.infoURL="https://wikipedia.org/wiki/Fletcher%27s_checksum#Fletcher-64",t.inputType="ArrayBuffer",t.outputType="string",t.args=[],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=0,n=0;t=ArrayBuffer.isView(t)?new DataView(t.buffer,t.byteOffset,t.byteLength):new DataView(t);for(var i=0;i>>0,8)+P.hex(r>>>0,8)}}])}(zt);const Jn=Yn;function Xn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Xn=function(){return!!t})()}var Zn=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Xn()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Fletcher-8 Checksum",t.module="Crypto",t.description="The Fletcher checksum is an algorithm for computing a position-dependent checksum devised by John Gould Fletcher at Lawrence Livermore Labs in the late 1970s.

The objective of the Fletcher checksum was to provide error-detection properties approaching those of a cyclic redundancy check but with the lower computational effort associated with summation techniques.",t.infoURL="https://wikipedia.org/wiki/Fletcher%27s_checksum",t.inputType="ArrayBuffer",t.outputType="string",t.args=[],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=0,n=0;t=new Uint8Array(t);for(var i=0;i>>0,2)}}])}(zt);const $n=Zn;function ti(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return ei(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ei(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw a}}}}function ei(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r>=1n;return r}},{key:"calculateCrcBitPerBit",value:function(t,e,r,n,i,a,s){var o,u=1n<>=1n){var p=n&u;n=n<<1n&h,0n!==(l&f)&&(p^=u),0n!==p&&(n^=r)}}}catch(t){c.e(t)}finally{c.f()}return a&&(n=this.reflectData(n,t)),n^s}},{key:"generateTable",value:function(t,e,r,n){for(var i=new Array(256n),a=0n;a<256n;a++){for(var s=a<>t-8n;n=n<<8n&h,n^=c[p]}}catch(t){l.e(t)}finally{l.f()}return a&&(n=this.reflectData(n,t)),n^s}},{key:"crc",value:function(t,e,r,n,i,a,s){return(t<8n?this.calculateCrcBitPerBit(t,e,r,n,i,a,s):this.calculateCrcBytePerByte(t,e,r,n,i,a,s)).toString(16).padStart(Math.ceil(Number(t)/4),"0")}},{key:"custom",value:function(t,e,r,n,i,a,s){try{var o=BigInt(t.string),u=BigInt("0x"+r.string),h=BigInt("0x"+n.string),c="True"===i,l="True"===a,f=BigInt("0x"+s.string);return this.crc(o,e,u,h,c,l,f)}catch(t){throw new I("Invalid custom CRC arguments")}}},{key:"run",value:function(t,e){var r=e[0];switch(t=new Uint8Array(t),r){case"Custom":return this.custom(e[1],t,e[2],e[3],e[4],e[5],e[6]);case"CRC-3/GSM":return this.crc(3n,t,0x3n,0x0n,!1,!1,0x7n);case"CRC-3/ROHC":return this.crc(3n,t,0x3n,0x7n,!0,!0,0x0n);case"CRC-4/G-704":case"CRC-4/ITU":return this.crc(4n,t,0x3n,0x0n,!0,!0,0x0n);case"CRC-4/INTERLAKEN":return this.crc(4n,t,0x3n,0xFn,!1,!1,0xFn);case"CRC-5/EPC":case"CRC-5/EPC-C1G2":return this.crc(5n,t,0x09n,0x09n,!1,!1,0x00n);case"CRC-5/G-704":case"CRC-5/ITU":return this.crc(5n,t,0x15n,0x00n,!0,!0,0x00n);case"CRC-5/USB":return this.crc(5n,t,0x05n,0x1Fn,!0,!0,0x1Fn);case"CRC-6/CDMA2000-A":return this.crc(6n,t,0x27n,0x3Fn,!1,!1,0x00n);case"CRC-6/CDMA2000-B":return this.crc(6n,t,0x07n,0x3Fn,!1,!1,0x00n);case"CRC-6/DARC":return this.crc(6n,t,0x19n,0x00n,!0,!0,0x00n);case"CRC-6/G-704":case"CRC-6/ITU":return this.crc(6n,t,0x03n,0x00n,!0,!0,0x00n);case"CRC-6/GSM":return this.crc(6n,t,0x2Fn,0x00n,!1,!1,0x3Fn);case"CRC-7/MMC":return this.crc(7n,t,0x09n,0x00n,!1,!1,0x00n);case"CRC-7/ROHC":return this.crc(7n,t,0x4Fn,0x7Fn,!0,!0,0x00n);case"CRC-7/UMTS":return this.crc(7n,t,0x45n,0x00n,!1,!1,0x00n);case"CRC-8":case"CRC-8/SMBUS":return this.crc(8n,t,0x07n,0x00n,!1,!1,0x00n);case"CRC-8/8H2F":case"CRC-8/AUTOSAR":return this.crc(8n,t,0x2Fn,0xFFn,!1,!1,0xFFn);case"CRC-8/AES":case"CRC-8/EBU":case"CRC-8/TECH-3250":return this.crc(8n,t,0x1Dn,0xFFn,!0,!0,0x00n);case"CRC-8/BLUETOOTH":return this.crc(8n,t,0xA7n,0x00n,!0,!0,0x00n);case"CRC-8/CDMA2000":return this.crc(8n,t,0x9Bn,0xFFn,!1,!1,0x00n);case"CRC-8/DARC":return this.crc(8n,t,0x39n,0x00n,!0,!0,0x00n);case"CRC-8/DVB-S2":return this.crc(8n,t,0xD5n,0x00n,!1,!1,0x00n);case"CRC-8/GSM-A":case"CRC-8/SAE-J1850-ZERO":return this.crc(8n,t,0x1Dn,0x00n,!1,!1,0x00n);case"CRC-8/GSM-B":return this.crc(8n,t,0x49n,0x00n,!1,!1,0xFFn);case"CRC-8/HITAG":return this.crc(8n,t,0x1Dn,0xFFn,!1,!1,0x00n);case"CRC-8/I-432-1":case"CRC-8/ITU":return this.crc(8n,t,0x07n,0x00n,!1,!1,0x55n);case"CRC-8/I-CODE":return this.crc(8n,t,0x1Dn,0xFDn,!1,!1,0x00n);case"CRC-8/LTE":return this.crc(8n,t,0x9Bn,0x00n,!1,!1,0x00n);case"CRC-8/MAXIM":case"CRC-8/MAXIM-DOW":return this.crc(8n,t,0x31n,0x00n,!0,!0,0x00n);case"CRC-8/MIFARE-MAD":return this.crc(8n,t,0x1Dn,0xC7n,!1,!1,0x00n);case"CRC-8/NRSC-5":return this.crc(8n,t,0x31n,0xFFn,!1,!1,0x00n);case"CRC-8/OPENSAFETY":return this.crc(8n,t,0x2Fn,0x00n,!1,!1,0x00n);case"CRC-8/ROHC":return this.crc(8n,t,0x07n,0xFFn,!0,!0,0x00n);case"CRC-8/SAE-J1850":return this.crc(8n,t,0x1Dn,0xFFn,!1,!1,0xFFn);case"CRC-8/WCDMA":return this.crc(8n,t,0x9Bn,0x00n,!0,!0,0x00n);case"CRC-10/ATM":case"CRC-10/I-610":return this.crc(10n,t,0x233n,0x000n,!1,!1,0x000n);case"CRC-10/CDMA2000":return this.crc(10n,t,0x3D9n,0x3FFn,!1,!1,0x000n);case"CRC-10/GSM":return this.crc(10n,t,0x175n,0x000n,!1,!1,0x3FFn);case"CRC-11/FLEXRAY":return this.crc(11n,t,0x385n,0x01An,!1,!1,0x000n);case"CRC-11/UMTS":return this.crc(11n,t,0x307n,0x000n,!1,!1,0x000n);case"CRC-12/3GPP":case"CRC-12/UMTS":return this.crc(12n,t,0x80Fn,0x000n,!1,!0,0x000n);case"CRC-12/CDMA2000":return this.crc(12n,t,0xF13n,0xFFFn,!1,!1,0x000n);case"CRC-12/DECT":return this.crc(12n,t,0x80Fn,0x000n,!1,!1,0x000n);case"CRC-12/GSM":return this.crc(12n,t,0xD31n,0x000n,!1,!1,0xFFFn);case"CRC-13/BBC":return this.crc(13n,t,0x1CF5n,0x0000n,!1,!1,0x0000n);case"CRC-14/DARC":return this.crc(14n,t,0x0805n,0x0000n,!0,!0,0x0000n);case"CRC-14/GSM":return this.crc(14n,t,0x202Dn,0x0000n,!1,!1,0x3FFFn);case"CRC-15/CAN":return this.crc(15n,t,0x4599n,0x0000n,!1,!1,0x0000n);case"CRC-15/MPT1327":return this.crc(15n,t,0x6815n,0x0000n,!1,!1,0x0001n);case"CRC-16":case"CRC-16/ARC":case"CRC-16/IBM":case"CRC-16/LHA":return this.crc(16n,t,0x8005n,0x0000n,!0,!0,0x0000n);case"CRC-16/A":case"CRC-16/ISO-IEC-14443-3-A":return this.crc(16n,t,0x1021n,0xC6C6n,!0,!0,0x0000n);case"CRC-16/ACORN":case"CRC-16/CCITT-ZERO":case"CRC-16/LTE":case"CRC-16/V-41-MSB":case"CRC-16/XMODEM":case"CRC-16/ZMODEM":return this.crc(16n,t,0x1021n,0x0000n,!1,!1,0x0000n);case"CRC-16/AUG-CCITT":case"CRC-16/SPI-FUJITSU":return this.crc(16n,t,0x1021n,0x1D0Fn,!1,!1,0x0000n);case"CRC-16/AUTOSAR":case"CRC-16/CCITT-FALSE":case"CRC-16/IBM-3740":return this.crc(16n,t,0x1021n,0xFFFFn,!1,!1,0x0000n);case"CRC-16/B":case"CRC-16/IBM-SDLC":case"CRC-16/ISO-HDLC":case"CRC-16/ISO-IEC-14443-3-B":case"CRC-16/X-25":return this.crc(16n,t,0x1021n,0xFFFFn,!0,!0,0xFFFFn);case"CRC-16/BLUETOOTH":case"CRC-16/CCITT":case"CRC-16/CCITT-TRUE":case"CRC-16/KERMIT":case"CRC-16/V-41-LSB":return this.crc(16n,t,0x1021n,0x0000n,!0,!0,0x0000n);case"CRC-16/BUYPASS":case"CRC-16/UMTS":case"CRC-16/VERIFONE":return this.crc(16n,t,0x8005n,0x0000n,!1,!1,0x0000n);case"CRC-16/CDMA2000":return this.crc(16n,t,0xC867n,0xFFFFn,!1,!1,0x0000n);case"CRC-16/CMS":return this.crc(16n,t,0x8005n,0xFFFFn,!1,!1,0x0000n);case"CRC-16/DARC":case"CRC-16/EPC":case"CRC-16/EPC-C1G2":case"CRC-16/GENIBUS":case"CRC-16/I-CODE":return this.crc(16n,t,0x1021n,0xFFFFn,!1,!1,0xFFFFn);case"CRC-16/DDS-110":return this.crc(16n,t,0x8005n,0x800Dn,!1,!1,0x0000n);case"CRC-16/DECT-R":return this.crc(16n,t,0x0589n,0x0000n,!1,!1,0x0001n);case"CRC-16/DECT-X":return this.crc(16n,t,0x0589n,0x0000n,!1,!1,0x0000n);case"CRC-16/DNP":return this.crc(16n,t,0x3D65n,0x0000n,!0,!0,0xFFFFn);case"CRC-16/EN-13757":return this.crc(16n,t,0x3D65n,0x0000n,!1,!1,0xFFFFn);case"CRC-16/GSM":return this.crc(16n,t,0x1021n,0x0000n,!1,!1,0xFFFFn);case"CRC-16/IEC-61158-2":case"CRC-16/PROFIBUS":return this.crc(16n,t,0x1DCFn,0xFFFFn,!1,!1,0xFFFFn);case"CRC-16/LJ1200":return this.crc(16n,t,0x6F63n,0x0000n,!1,!1,0x0000n);case"CRC-16/M17":return this.crc(16n,t,0x5935n,0xFFFFn,!1,!1,0x0000n);case"CRC-16/MAXIM":case"CRC-16/MAXIM-DOW":return this.crc(16n,t,0x8005n,0x0000n,!0,!0,0xFFFFn);case"CRC-16/MCRF4XX":return this.crc(16n,t,0x1021n,0xFFFFn,!0,!0,0x0000n);case"CRC-16/MODBUS":return this.crc(16n,t,0x8005n,0xFFFFn,!0,!0,0x0000n);case"CRC-16/NRSC-5":return this.crc(16n,t,0x080Bn,0xFFFFn,!0,!0,0x0000n);case"CRC-16/OPENSAFETY-A":return this.crc(16n,t,0x5935n,0x0000n,!1,!1,0x0000n);case"CRC-16/OPENSAFETY-B":return this.crc(16n,t,0x755Bn,0x0000n,!1,!1,0x0000n);case"CRC-16/RIELLO":return this.crc(16n,t,0x1021n,0xB2AAn,!0,!0,0x0000n);case"CRC-16/T10-DIF":return this.crc(16n,t,0x8BB7n,0x0000n,!1,!1,0x0000n);case"CRC-16/TELEDISK":return this.crc(16n,t,0xA097n,0x0000n,!1,!1,0x0000n);case"CRC-16/TMS37157":return this.crc(16n,t,0x1021n,0x89ECn,!0,!0,0x0000n);case"CRC-16/USB":return this.crc(16n,t,0x8005n,0xFFFFn,!0,!0,0xFFFFn);case"CRC-17/CAN-FD":return this.crc(17n,t,0x1685Bn,0x00000n,!1,!1,0x00000n);case"CRC-21/CAN-FD":return this.crc(21n,t,0x102899n,0x000000n,!1,!1,0x000000n);case"CRC-24/BLE":return this.crc(24n,t,0x00065Bn,0x555555n,!0,!0,0x000000n);case"CRC-24/FLEXRAY-A":return this.crc(24n,t,0x5D6DCBn,0xFEDCBAn,!1,!1,0x000000n);case"CRC-24/FLEXRAY-B":return this.crc(24n,t,0x5D6DCBn,0xABCDEFn,!1,!1,0x000000n);case"CRC-24/INTERLAKEN":return this.crc(24n,t,0x328B63n,0xFFFFFFn,!1,!1,0xFFFFFFn);case"CRC-24/LTE-A":return this.crc(24n,t,0x864CFBn,0x000000n,!1,!1,0x000000n);case"CRC-24/LTE-B":return this.crc(24n,t,0x800063n,0x000000n,!1,!1,0x000000n);case"CRC-24/OPENPGP":return this.crc(24n,t,0x864CFBn,0xB704CEn,!1,!1,0x000000n);case"CRC-24/OS-9":return this.crc(24n,t,0x800063n,0xFFFFFFn,!1,!1,0xFFFFFFn);case"CRC-30/CDMA":return this.crc(30n,t,0x2030B9C7n,0x3FFFFFFFn,!1,!1,0x3FFFFFFFn);case"CRC-31/PHILIPS":return this.crc(31n,t,0x04C11DB7n,0x7FFFFFFFn,!1,!1,0x7FFFFFFFn);case"CRC-32":case"CRC-32/ADCCP":case"CRC-32/ISO-HDLC":case"CRC-32/PKZIP":case"CRC-32/V-42":case"CRC-32/XZ":return this.crc(32n,t,0x04C11DB7n,0xFFFFFFFFn,!0,!0,0xFFFFFFFFn);case"CRC-32/AAL5":case"CRC-32/BZIP2":case"CRC-32/DECT-B":return this.crc(32n,t,0x04C11DB7n,0xFFFFFFFFn,!1,!1,0xFFFFFFFFn);case"CRC-32/AIXM":case"CRC-32/Q":return this.crc(32n,t,0x814141ABn,0x00000000n,!1,!1,0x00000000n);case"CRC-32/AUTOSAR":return this.crc(32n,t,0xF4ACFB13n,0xFFFFFFFFn,!0,!0,0xFFFFFFFFn);case"CRC-32/BASE91-C":case"CRC-32/C":case"CRC-32/CASTAGNOLI":case"CRC-32/INTERLAKEN":case"CRC-32/ISCSI":case"CRC-32/NVME":return this.crc(32n,t,0x1EDC6F41n,0xFFFFFFFFn,!0,!0,0xFFFFFFFFn);case"CRC-32/BASE91-D":case"CRC-32/D":return this.crc(32n,t,0xA833982Bn,0xFFFFFFFFn,!0,!0,0xFFFFFFFFn);case"CRC-32/CD-ROM-EDC":return this.crc(32n,t,0x8001801Bn,0x00000000n,!0,!0,0x00000000n);case"CRC-32/CKSUM":case"CRC-32/POSIX":return this.crc(32n,t,0x04C11DB7n,0x00000000n,!1,!1,0xFFFFFFFFn);case"CRC-32/JAMCRC":return this.crc(32n,t,0x04C11DB7n,0xFFFFFFFFn,!0,!0,0x00000000n);case"CRC-32/MEF":return this.crc(32n,t,0x741B8CD7n,0xFFFFFFFFn,!0,!0,0x00000000n);case"CRC-32/MPEG-2":return this.crc(32n,t,0x04C11DB7n,0xFFFFFFFFn,!1,!1,0x00000000n);case"CRC-32/SATA":return this.crc(32n,t,0x04C11DB7n,0x52325032n,!1,!1,0x00000000n);case"CRC-32/XFER":return this.crc(32n,t,0x000000AFn,0x00000000n,!1,!1,0x00000000n);case"CRC-40/GSM":return this.crc(40n,t,0x0004820009n,0x0000000000n,!1,!1,0xFFFFFFFFFFn);case"CRC-64/ECMA-182":return this.crc(64n,t,0x42F0E1EBA9EA3693n,0x0000000000000000n,!1,!1,0x0000000000000000n);case"CRC-64/GO-ECMA":case"CRC-64/XZ":return this.crc(64n,t,0x42F0E1EBA9EA3693n,0xFFFFFFFFFFFFFFFFn,!0,!0,0xFFFFFFFFFFFFFFFFn);case"CRC-64/GO-ISO":return this.crc(64n,t,0x000000000000001Bn,0xFFFFFFFFFFFFFFFFn,!0,!0,0xFFFFFFFFFFFFFFFFn);case"CRC-64/MS":return this.crc(64n,t,0x259C84CBA6426349n,0xFFFFFFFFFFFFFFFFn,!0,!0,0x0000000000000000n);case"CRC-64/NVME":return this.crc(64n,t,0xAD93D23594C93659n,0xFFFFFFFFFFFFFFFFn,!0,!0,0xFFFFFFFFFFFFFFFFn);case"CRC-64/REDIS":return this.crc(64n,t,0xAD93D23594C935A9n,0x0000000000000000n,!0,!0,0x0000000000000000n);case"CRC-64/WE":return this.crc(64n,t,0x42F0E1EBA9EA3693n,0xFFFFFFFFFFFFFFFFn,!1,!1,0xFFFFFFFFFFFFFFFFn);case"CRC-82/DARC":return this.crc(82n,t,0x0308C0111011401440411n,0x000000000000000000000n,!0,!0,0x000000000000000000000n);default:throw new I("Unknown checksum algorithm")}}}])}(zt);const ii=ni;function ai(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ai=function(){return!!t})()}const si=function(t){function r(){var t,n,i,a;e(this,r),n=this,i=u(i=r),(t=o(n,ai()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Generate all checksums",t.module="Crypto",t.description="Generates all available checksums for the input.",t.infoURL="https://wikipedia.org/wiki/Checksum",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Length (bits)",type:"option",value:["All","3","4","5","6","7","8","10","11","12","13","14","15","16","17","21","24","30","31","32","40","64","82"]},{name:"Include names",type:"boolean",value:!0}];var s=new Xt,h=new ii,c=new $n,l=new Gn,f=new Wn,p=new Jn;return t.checksums=[{name:"CRC-3/GSM",algo:h,params:["CRC-3/GSM"]},{name:"CRC-3/ROHC",algo:h,params:["CRC-3/ROHC"]},{name:"CRC-4/G-704",algo:h,params:["CRC-4/G-704"]},{name:"CRC-4/INTERLAKEN",algo:h,params:["CRC-4/INTERLAKEN"]},{name:"CRC-4/ITU",algo:h,params:["CRC-4/ITU"]},{name:"CRC-5/EPC",algo:h,params:["CRC-5/EPC"]},{name:"CRC-5/EPC-C1G2",algo:h,params:["CRC-5/EPC-C1G2"]},{name:"CRC-5/G-704",algo:h,params:["CRC-5/G-704"]},{name:"CRC-5/ITU",algo:h,params:["CRC-5/ITU"]},{name:"CRC-5/USB",algo:h,params:["CRC-5/USB"]},{name:"CRC-6/CDMA2000-A",algo:h,params:["CRC-6/CDMA2000-A"]},{name:"CRC-6/CDMA2000-B",algo:h,params:["CRC-6/CDMA2000-B"]},{name:"CRC-6/DARC",algo:h,params:["CRC-6/DARC"]},{name:"CRC-6/G-704",algo:h,params:["CRC-6/G-704"]},{name:"CRC-6/GSM",algo:h,params:["CRC-6/GSM"]},{name:"CRC-6/ITU",algo:h,params:["CRC-6/ITU"]},{name:"CRC-7/MMC",algo:h,params:["CRC-7/MMC"]},{name:"CRC-7/ROHC",algo:h,params:["CRC-7/ROHC"]},{name:"CRC-7/UMTS",algo:h,params:["CRC-7/UMTS"]},{name:"CRC-8",algo:h,params:["CRC-8"]},{name:"CRC-8/8H2F",algo:h,params:["CRC-8/8H2F"]},{name:"CRC-8/AES",algo:h,params:["CRC-8/AES"]},{name:"CRC-8/AUTOSAR",algo:h,params:["CRC-8/AUTOSAR"]},{name:"CRC-8/BLUETOOTH",algo:h,params:["CRC-8/BLUETOOTH"]},{name:"CRC-8/CDMA2000",algo:h,params:["CRC-8/CDMA2000"]},{name:"CRC-8/DARC",algo:h,params:["CRC-8/DARC"]},{name:"CRC-8/DVB-S2",algo:h,params:["CRC-8/DVB-S2"]},{name:"CRC-8/EBU",algo:h,params:["CRC-8/EBU"]},{name:"CRC-8/GSM-A",algo:h,params:["CRC-8/GSM-A"]},{name:"CRC-8/GSM-B",algo:h,params:["CRC-8/GSM-B"]},{name:"CRC-8/HITAG",algo:h,params:["CRC-8/HITAG"]},{name:"CRC-8/I-432-1",algo:h,params:["CRC-8/I-432-1"]},{name:"CRC-8/I-CODE",algo:h,params:["CRC-8/I-CODE"]},{name:"CRC-8/ITU",algo:h,params:["CRC-8/ITU"]},{name:"CRC-8/LTE",algo:h,params:["CRC-8/LTE"]},{name:"CRC-8/MAXIM",algo:h,params:["CRC-8/MAXIM"]},{name:"CRC-8/MAXIM-DOW",algo:h,params:["CRC-8/MAXIM-DOW"]},{name:"CRC-8/MIFARE-MAD",algo:h,params:["CRC-8/MIFARE-MAD"]},{name:"CRC-8/NRSC-5",algo:h,params:["CRC-8/NRSC-5"]},{name:"CRC-8/OPENSAFETY",algo:h,params:["CRC-8/OPENSAFETY"]},{name:"CRC-8/ROHC",algo:h,params:["CRC-8/ROHC"]},{name:"CRC-8/SAE-J1850",algo:h,params:["CRC-8/SAE-J1850"]},{name:"CRC-8/SAE-J1850-ZERO",algo:h,params:["CRC-8/SAE-J1850-ZERO"]},{name:"CRC-8/SMBUS",algo:h,params:["CRC-8/SMBUS"]},{name:"CRC-8/TECH-3250",algo:h,params:["CRC-8/TECH-3250"]},{name:"CRC-8/WCDMA",algo:h,params:["CRC-8/WCDMA"]},{name:"Fletcher-8",algo:c,params:[]},{name:"CRC-10/ATM",algo:h,params:["CRC-10/ATM"]},{name:"CRC-10/CDMA2000",algo:h,params:["CRC-10/CDMA2000"]},{name:"CRC-10/GSM",algo:h,params:["CRC-10/GSM"]},{name:"CRC-10/I-610",algo:h,params:["CRC-10/I-610"]},{name:"CRC-11/FLEXRAY",algo:h,params:["CRC-11/FLEXRAY"]},{name:"CRC-11/UMTS",algo:h,params:["CRC-11/UMTS"]},{name:"CRC-12/3GPP",algo:h,params:["CRC-12/3GPP"]},{name:"CRC-12/CDMA2000",algo:h,params:["CRC-12/CDMA2000"]},{name:"CRC-12/DECT",algo:h,params:["CRC-12/DECT"]},{name:"CRC-12/GSM",algo:h,params:["CRC-12/GSM"]},{name:"CRC-12/UMTS",algo:h,params:["CRC-12/UMTS"]},{name:"CRC-13/BBC",algo:h,params:["CRC-13/BBC"]},{name:"CRC-14/DARC",algo:h,params:["CRC-14/DARC"]},{name:"CRC-14/GSM",algo:h,params:["CRC-14/GSM"]},{name:"CRC-15/CAN",algo:h,params:["CRC-15/CAN"]},{name:"CRC-15/MPT1327",algo:h,params:["CRC-15/MPT1327"]},{name:"CRC-16",algo:h,params:["CRC-16"]},{name:"CRC-16/A",algo:h,params:["CRC-16/A"]},{name:"CRC-16/ACORN",algo:h,params:["CRC-16/ACORN"]},{name:"CRC-16/ARC",algo:h,params:["CRC-16/ARC"]},{name:"CRC-16/AUG-CCITT",algo:h,params:["CRC-16/AUG-CCITT"]},{name:"CRC-16/AUTOSAR",algo:h,params:["CRC-16/AUTOSAR"]},{name:"CRC-16/B",algo:h,params:["CRC-16/B"]},{name:"CRC-16/BLUETOOTH",algo:h,params:["CRC-16/BLUETOOTH"]},{name:"CRC-16/BUYPASS",algo:h,params:["CRC-16/BUYPASS"]},{name:"CRC-16/CCITT",algo:h,params:["CRC-16/CCITT"]},{name:"CRC-16/CCITT-FALSE",algo:h,params:["CRC-16/CCITT-FALSE"]},{name:"CRC-16/CCITT-TRUE",algo:h,params:["CRC-16/CCITT-TRUE"]},{name:"CRC-16/CCITT-ZERO",algo:h,params:["CRC-16/CCITT-ZERO"]},{name:"CRC-16/CDMA2000",algo:h,params:["CRC-16/CDMA2000"]},{name:"CRC-16/CMS",algo:h,params:["CRC-16/CMS"]},{name:"CRC-16/DARC",algo:h,params:["CRC-16/DARC"]},{name:"CRC-16/DDS-110",algo:h,params:["CRC-16/DDS-110"]},{name:"CRC-16/DECT-R",algo:h,params:["CRC-16/DECT-R"]},{name:"CRC-16/DECT-X",algo:h,params:["CRC-16/DECT-X"]},{name:"CRC-16/DNP",algo:h,params:["CRC-16/DNP"]},{name:"CRC-16/EN-13757",algo:h,params:["CRC-16/EN-13757"]},{name:"CRC-16/EPC",algo:h,params:["CRC-16/EPC"]},{name:"CRC-16/EPC-C1G2",algo:h,params:["CRC-16/EPC-C1G2"]},{name:"CRC-16/GENIBUS",algo:h,params:["CRC-16/GENIBUS"]},{name:"CRC-16/GSM",algo:h,params:["CRC-16/GSM"]},{name:"CRC-16/I-CODE",algo:h,params:["CRC-16/I-CODE"]},{name:"CRC-16/IBM",algo:h,params:["CRC-16/IBM"]},{name:"CRC-16/IBM-3740",algo:h,params:["CRC-16/IBM-3740"]},{name:"CRC-16/IBM-SDLC",algo:h,params:["CRC-16/IBM-SDLC"]},{name:"CRC-16/IEC-61158-2",algo:h,params:["CRC-16/IEC-61158-2"]},{name:"CRC-16/ISO-HDLC",algo:h,params:["CRC-16/ISO-HDLC"]},{name:"CRC-16/ISO-IEC-14443-3-A",algo:h,params:["CRC-16/ISO-IEC-14443-3-A"]},{name:"CRC-16/ISO-IEC-14443-3-B",algo:h,params:["CRC-16/ISO-IEC-14443-3-B"]},{name:"CRC-16/KERMIT",algo:h,params:["CRC-16/KERMIT"]},{name:"CRC-16/LHA",algo:h,params:["CRC-16/LHA"]},{name:"CRC-16/LJ1200",algo:h,params:["CRC-16/LJ1200"]},{name:"CRC-16/LTE",algo:h,params:["CRC-16/LTE"]},{name:"CRC-16/M17",algo:h,params:["CRC-16/M17"]},{name:"CRC-16/MAXIM",algo:h,params:["CRC-16/MAXIM"]},{name:"CRC-16/MAXIM-DOW",algo:h,params:["CRC-16/MAXIM-DOW"]},{name:"CRC-16/MCRF4XX",algo:h,params:["CRC-16/MCRF4XX"]},{name:"CRC-16/MODBUS",algo:h,params:["CRC-16/MODBUS"]},{name:"CRC-16/NRSC-5",algo:h,params:["CRC-16/NRSC-5"]},{name:"CRC-16/OPENSAFETY-A",algo:h,params:["CRC-16/OPENSAFETY-A"]},{name:"CRC-16/OPENSAFETY-B",algo:h,params:["CRC-16/OPENSAFETY-B"]},{name:"CRC-16/PROFIBUS",algo:h,params:["CRC-16/PROFIBUS"]},{name:"CRC-16/RIELLO",algo:h,params:["CRC-16/RIELLO"]},{name:"CRC-16/SPI-FUJITSU",algo:h,params:["CRC-16/SPI-FUJITSU"]},{name:"CRC-16/T10-DIF",algo:h,params:["CRC-16/T10-DIF"]},{name:"CRC-16/TELEDISK",algo:h,params:["CRC-16/TELEDISK"]},{name:"CRC-16/TMS37157",algo:h,params:["CRC-16/TMS37157"]},{name:"CRC-16/UMTS",algo:h,params:["CRC-16/UMTS"]},{name:"CRC-16/USB",algo:h,params:["CRC-16/USB"]},{name:"CRC-16/V-41-LSB",algo:h,params:["CRC-16/V-41-LSB"]},{name:"CRC-16/V-41-MSB",algo:h,params:["CRC-16/V-41-MSB"]},{name:"CRC-16/VERIFONE",algo:h,params:["CRC-16/VERIFONE"]},{name:"CRC-16/X-25",algo:h,params:["CRC-16/X-25"]},{name:"CRC-16/XMODEM",algo:h,params:["CRC-16/XMODEM"]},{name:"CRC-16/ZMODEM",algo:h,params:["CRC-16/ZMODEM"]},{name:"Fletcher-16",algo:l,params:[]},{name:"CRC-17/CAN-FD",algo:h,params:["CRC-17/CAN-FD"]},{name:"CRC-21/CAN-FD",algo:h,params:["CRC-21/CAN-FD"]},{name:"CRC-24/BLE",algo:h,params:["CRC-24/BLE"]},{name:"CRC-24/FLEXRAY-A",algo:h,params:["CRC-24/FLEXRAY-A"]},{name:"CRC-24/FLEXRAY-B",algo:h,params:["CRC-24/FLEXRAY-B"]},{name:"CRC-24/INTERLAKEN",algo:h,params:["CRC-24/INTERLAKEN"]},{name:"CRC-24/LTE-A",algo:h,params:["CRC-24/LTE-A"]},{name:"CRC-24/LTE-B",algo:h,params:["CRC-24/LTE-B"]},{name:"CRC-24/OPENPGP",algo:h,params:["CRC-24/OPENPGP"]},{name:"CRC-24/OS-9",algo:h,params:["CRC-24/OS-9"]},{name:"CRC-30/CDMA",algo:h,params:["CRC-30/CDMA"]},{name:"CRC-31/PHILIPS",algo:h,params:["CRC-31/PHILIPS"]},{name:"Adler-32",algo:s,params:[]},{name:"CRC-32",algo:h,params:["CRC-32"]},{name:"CRC-32/AAL5",algo:h,params:["CRC-32/AAL5"]},{name:"CRC-32/ADCCP",algo:h,params:["CRC-32/ADCCP"]},{name:"CRC-32/AIXM",algo:h,params:["CRC-32/AIXM"]},{name:"CRC-32/AUTOSAR",algo:h,params:["CRC-32/AUTOSAR"]},{name:"CRC-32/BASE91-C",algo:h,params:["CRC-32/BASE91-C"]},{name:"CRC-32/BASE91-D",algo:h,params:["CRC-32/BASE91-D"]},{name:"CRC-32/BZIP2",algo:h,params:["CRC-32/BZIP2"]},{name:"CRC-32/C",algo:h,params:["CRC-32/C"]},{name:"CRC-32/CASTAGNOLI",algo:h,params:["CRC-32/CASTAGNOLI"]},{name:"CRC-32/CD-ROM-EDC",algo:h,params:["CRC-32/CD-ROM-EDC"]},{name:"CRC-32/CKSUM",algo:h,params:["CRC-32/CKSUM"]},{name:"CRC-32/D",algo:h,params:["CRC-32/D"]},{name:"CRC-32/DECT-B",algo:h,params:["CRC-32/DECT-B"]},{name:"CRC-32/INTERLAKEN",algo:h,params:["CRC-32/INTERLAKEN"]},{name:"CRC-32/ISCSI",algo:h,params:["CRC-32/ISCSI"]},{name:"CRC-32/ISO-HDLC",algo:h,params:["CRC-32/ISO-HDLC"]},{name:"CRC-32/JAMCRC",algo:h,params:["CRC-32/JAMCRC"]},{name:"CRC-32/MEF",algo:h,params:["CRC-32/MEF"]},{name:"CRC-32/MPEG-2",algo:h,params:["CRC-32/MPEG-2"]},{name:"CRC-32/NVME",algo:h,params:["CRC-32/NVME"]},{name:"CRC-32/PKZIP",algo:h,params:["CRC-32/PKZIP"]},{name:"CRC-32/POSIX",algo:h,params:["CRC-32/POSIX"]},{name:"CRC-32/Q",algo:h,params:["CRC-32/Q"]},{name:"CRC-32/SATA",algo:h,params:["CRC-32/SATA"]},{name:"CRC-32/V-42",algo:h,params:["CRC-32/V-42"]},{name:"CRC-32/XFER",algo:h,params:["CRC-32/XFER"]},{name:"CRC-32/XZ",algo:h,params:["CRC-32/XZ"]},{name:"Fletcher-32",algo:f,params:[]},{name:"CRC-40/GSM",algo:h,params:["CRC-40/GSM"]},{name:"CRC-64/ECMA-182",algo:h,params:["CRC-64/ECMA-182"]},{name:"CRC-64/GO-ECMA",algo:h,params:["CRC-64/GO-ECMA"]},{name:"CRC-64/GO-ISO",algo:h,params:["CRC-64/GO-ISO"]},{name:"CRC-64/MS",algo:h,params:["CRC-64/MS"]},{name:"CRC-64/NVME",algo:h,params:["CRC-64/NVME"]},{name:"CRC-64/REDIS",algo:h,params:["CRC-64/REDIS"]},{name:"CRC-64/WE",algo:h,params:["CRC-64/WE"]},{name:"CRC-64/XZ",algo:h,params:["CRC-64/XZ"]},{name:"Fletcher-64",algo:p,params:[]},{name:"CRC-82/DARC",algo:h,params:["CRC-82/DARC"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=ot(e,2),n=r[0],i=r[1],a="";return this.checksums.forEach(function(e){var r=e.name.match(new RegExp("-(\\d{1,2})(\\/|$)"))[1];if("All"===n||n===r){var s=e.algo.run(new Uint8Array(t),e.params||[]);a+=i?`${e.name}:${" ".repeat(25-e.name.length)}${s}\n`:`${s}\n`}}),a}}])}(zt);function oi(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=P.arrayBufferToStr(e,!1),i=xn.getHasher(t,r);return i.update(n),xn.encoder.toHex(i.finalize())}function ui(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ui=function(){return!!t})()}const hi=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,ui()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="MD2",t.module="Crypto",t.description="The MD2 (Message-Digest 2) algorithm is a cryptographic hash function developed by Ronald Rivest in 1989. The algorithm is optimized for 8-bit computers.

Although MD2 is no longer considered secure, even as of 2014, it remains in use in public key infrastructures as part of certificates generated with MD2 and RSA. The message digest algorithm consists, by default, of 18 rounds.",t.infoURL="https://wikipedia.org/wiki/MD2_(cryptography)",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Rounds",type:"number",value:18,min:0}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){return oi("md2",t,{rounds:e[0]})}}])}(zt);function ci(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ci=function(){return!!t})()}const li=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,ci()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="MD4",t.module="Crypto",t.description="The MD4 (Message-Digest 4) algorithm is a cryptographic hash function developed by Ronald Rivest in 1990. The digest length is 128 bits. The algorithm has influenced later designs, such as the MD5, SHA-1 and RIPEMD algorithms.

The security of MD4 has been severely compromised.",t.infoURL="https://wikipedia.org/wiki/MD4",t.inputType="ArrayBuffer",t.outputType="string",t.args=[],t}return c(r,t),s(r,[{key:"run",value:function(t,e){return oi("md4",t)}}])}(zt);function fi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(fi=function(){return!!t})()}const pi=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,fi()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="MD5",t.module="Crypto",t.description="MD5 (Message-Digest 5) is a widely used hash function. It has been used in a variety of security applications and is also commonly used to check the integrity of files.

However, MD5 is not collision resistant and it isn't suitable for applications like SSL/TLS certificates or digital signatures that rely on this property.",t.infoURL="https://wikipedia.org/wiki/MD5",t.inputType="ArrayBuffer",t.outputType="string",t.args=[],t}return c(r,t),s(r,[{key:"run",value:function(t,e){return oi("md5",t)}}])}(zt);var di=r(92872),gi=r.n(di);function mi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(mi=function(){return!!t})()}const yi=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,mi()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="MD6",t.module="Crypto",t.description="The MD6 (Message-Digest 6) algorithm is a cryptographic hash function. It uses a Merkle tree-like structure to allow for immense parallel computation of hashes for very long inputs.",t.infoURL="https://wikipedia.org/wiki/MD6",t.inputType="string",t.outputType="string",t.args=[{name:"Size",type:"number",value:256},{name:"Levels",type:"number",value:64},{name:"Key",type:"string",value:""}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=ot(e,3),n=r[0],i=r[1],a=r[2];if(n<0||n>512)throw new I("Size must be between 0 and 512");if(i<0)throw new I("Levels must be greater than 0");return gi().getHashOfText(t,n,a,i)}}])}(zt);function Ai(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ai=function(){return!!t})()}const vi=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Ai()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="SHA0",t.module="Crypto",t.description="SHA-0 is a retronym applied to the original version of the 160-bit hash function published in 1993 under the name 'SHA'. It was withdrawn shortly after publication due to an undisclosed 'significant flaw' and replaced by the slightly revised version SHA-1. The message digest algorithm consists, by default, of 80 rounds.",t.infoURL="https://wikipedia.org/wiki/SHA-1#SHA-0",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Rounds",type:"number",value:80,min:16}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){return oi("sha0",t,{rounds:e[0]})}}])}(zt);function bi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(bi=function(){return!!t})()}const wi=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,bi()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="SHA1",t.module="Crypto",t.description="The SHA (Secure Hash Algorithm) hash functions were designed by the NSA. SHA-1 is the most established of the existing SHA hash functions and it is used in a variety of security applications and protocols.

However, SHA-1's collision resistance has been weakening as new attacks are discovered or improved. The message digest algorithm consists, by default, of 80 rounds.",t.infoURL="https://wikipedia.org/wiki/SHA-1",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Rounds",type:"number",value:80,min:16}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){return oi("sha1",t,{rounds:e[0]})}}])}(zt);function Ci(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ci=function(){return!!t})()}const Ei=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Ci()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="SHA2",t.module="Crypto",t.description="The SHA-2 (Secure Hash Algorithm 2) hash functions were designed by the NSA. SHA-2 includes significant changes from its predecessor, SHA-1. The SHA-2 family consists of hash functions with digests (hash values) that are 224, 256, 384 or 512 bits: SHA224, SHA256, SHA384, SHA512.

  • SHA-512 operates on 64-bit words.
  • SHA-256 operates on 32-bit words.
  • SHA-384 is largely identical to SHA-512 but is truncated to 384 bytes.
  • SHA-224 is largely identical to SHA-256 but is truncated to 224 bytes.
  • SHA-512/224 and SHA-512/256 are truncated versions of SHA-512, but the initial values are generated using the method described in Federal Information Processing Standards (FIPS) PUB 180-4.
The message digest algorithm for SHA256 variants consists, by default, of 64 rounds, and for SHA512 variants, it is, by default, 160.",t.infoURL="https://wikipedia.org/wiki/SHA-2",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Size",type:"argSelector",value:[{name:"512",on:[2],off:[1]},{name:"384",on:[2],off:[1]},{name:"256",on:[1],off:[2]},{name:"224",on:[1],off:[2]},{name:"512/256",on:[2],off:[1]},{name:"512/224",on:[2],off:[1]}]},{name:"Rounds",type:"number",value:64,min:16},{name:"Rounds",type:"number",value:160,min:32}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=e[0];return oi("sha"+r,t,{rounds:"256"===r||"224"===r?e[1]:e[2]})}}])}(zt);var Si=r(31176),Ii=r.n(Si);function Bi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Bi=function(){return!!t})()}const _i=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Bi()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="SHA3",t.module="Crypto",t.description="The SHA-3 (Secure Hash Algorithm 3) hash functions were released by NIST on August 5, 2015. Although part of the same series of standards, SHA-3 is internally quite different from the MD5-like structure of SHA-1 and SHA-2.

SHA-3 is a subset of the broader cryptographic primitive family Keccak designed by Guido Bertoni, Joan Daemen, Michaël Peeters, and Gilles Van Assche, building upon RadioGatún.",t.infoURL="https://wikipedia.org/wiki/SHA-3",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Size",type:"option",value:["512","384","256","224"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r;switch(parseInt(e[0],10)){case 224:r=Ii().sha3_224;break;case 384:r=Ii().sha3_384;break;case 256:r=Ii().sha3_256;break;case 512:r=Ii().sha3_512;break;default:throw new I("Invalid size")}return r(t)}}])}(zt);function Mi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Mi=function(){return!!t})()}const xi=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Mi()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Keccak",t.module="Crypto",t.description="The Keccak hash algorithm was designed by Guido Bertoni, Joan Daemen, Michaël Peeters, and Gilles Van Assche, building upon RadioGatún. It was selected as the winner of the SHA-3 design competition.

This version of the algorithm is Keccak[c=2d] and differs from the SHA-3 specification.",t.infoURL="https://wikipedia.org/wiki/SHA-3",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Size",type:"option",value:["512","384","256","224"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r;switch(parseInt(e[0],10)){case 224:r=Ii().keccak224;break;case 384:r=Ii().keccak384;break;case 256:r=Ii().keccak256;break;case 512:r=Ii().keccak512;break;default:throw new I("Invalid size")}return r(t)}}])}(zt);function Ti(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ti=function(){return!!t})()}const Ri=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Ti()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Shake",t.module="Crypto",t.description="Shake is an Extendable Output Function (XOF) of the SHA-3 hash algorithm, part of the Keccak family, allowing for variable output length/size.",t.infoURL="https://wikipedia.org/wiki/SHA-3#Instances",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Capacity",type:"option",value:["256","128"]},{name:"Size",type:"number",value:512}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r,n=parseInt(e[0],10),i=e[1];if(i<0)throw new I("Size must be greater than 0");switch(n){case 128:r=Ii().shake128;break;case 256:r=Ii().shake256;break;default:throw new I("Invalid size")}return r(t,i)}}])}(zt);function Fi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Fi=function(){return!!t})()}const Di=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Fi()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="RIPEMD",t.module="Crypto",t.description="RIPEMD (RACE Integrity Primitives Evaluation Message Digest) is a family of cryptographic hash functions developed in Leuven, Belgium, by Hans Dobbertin, Antoon Bosselaers and Bart Preneel at the COSIC research group at the Katholieke Universiteit Leuven, and first published in 1996.

RIPEMD was based upon the design principles used in MD4, and is similar in performance to the more popular SHA-1.

",t.infoURL="https://wikipedia.org/wiki/RIPEMD",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Size",type:"option",value:["320","256","160","128"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){return oi("ripemd"+e[0],t)}}])}(zt);function ki(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(ki=function(){return!!t})()}const Li=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,ki()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="HAS-160",t.module="Crypto",t.description="HAS-160 is a cryptographic hash function designed for use with the Korean KCDSA digital signature algorithm. It is derived from SHA-1, with assorted changes intended to increase its security. It produces a 160-bit output.

HAS-160 is used in the same way as SHA-1. First it divides input in blocks of 512 bits each and pads the final block. A digest function updates the intermediate hash value by processing the input blocks in turn.

The message digest algorithm consists, by default, of 80 rounds.",t.infoURL="https://wikipedia.org/wiki/HAS-160",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Rounds",type:"number",value:80,min:1,max:80}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){return oi("has160",t,{rounds:e[0]})}}])}(zt);function Ni(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ni=function(){return!!t})()}var Hi=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Ni()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Whirlpool",t.module="Crypto",t.description="Whirlpool is a cryptographic hash function designed by Vincent Rijmen (co-creator of AES) and Paulo S. L. M. Barreto, who first described it in 2000.

Several variants exist:
  • Whirlpool-0 is the original version released in 2000.
  • Whirlpool-T is the first revision, released in 2001, improving the generation of the s-box.
  • Whirlpool is the latest revision, released in 2003, fixing a flaw in the diffusion matrix.
",t.infoURL="https://wikipedia.org/wiki/Whirlpool_(cryptography)",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Variant",type:"option",value:["Whirlpool","Whirlpool-T","Whirlpool-0"]},{name:"Rounds",type:"number",value:10,min:1,max:10}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){return oi(e[0].toLowerCase(),t,{rounds:e[1]})}}])}(zt);const Pi=Hi;function Ui(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ui=function(){return!!t})()}const Oi=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Ui()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="SSDEEP",t.module="Crypto",t.description="SSDEEP is a program for computing context triggered piecewise hashes (CTPH). Also called fuzzy hashes, CTPH can match inputs that have homologies. Such inputs have sequences of identical bytes in the same order, although bytes in between these sequences may be different in both content and length.

SSDEEP hashes are now widely used for simple identification purposes (e.g. the 'Basic Properties' section in VirusTotal). Although 'better' fuzzy hashes are available, SSDEEP is still one of the primary choices because of its speed and being a de facto standard.

This operation is fundamentally the same as the CTPH operation, however their outputs differ in format.",t.infoURL="https://forensics.wiki/ssdeep",t.inputType="string",t.outputType="string",t.args=[],t}return c(r,t),s(r,[{key:"run",value:function(t,e){return Pe().digest(t)}}])}(zt);var Qi=r(92493),ji=r.n(Qi);function Ki(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ki=function(){return!!t})()}const Gi=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Ki()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="BLAKE2b",t.module="Hashing",t.description="Performs BLAKE2b hashing on the input. \n

BLAKE2b is a flavour of the BLAKE cryptographic hash function that is optimized for 64-bit platforms and produces digests of any size between 1 and 64 bytes.\n

Supports the use of an optional key.",t.infoURL="https://wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE2b_algorithm",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Size",type:"option",value:["512","384","256","160","128"]},{name:"Output Encoding",type:"option",value:["Hex","Base64","Raw"]},{name:"Key",type:"toggleString",value:"",toggleValues:["UTF8","Decimal","Base64","Hex","Latin1"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=ot(e,2),n=r[0],i=r[1],a=P.convertToByteArray(e[2].string||"",e[2].option);if(0===a.length)a=null;else if(a.length>64)throw new I(["Key cannot be greater than 64 bytes","It is currently "+a.length+" bytes."].join("\n"));switch(t=new Uint8Array(t),i){case"Hex":return ji().blake2bHex(t,a,n/8);case"Base64":return B(ji().blake2b(t,a,n/8));case"Raw":return P.arrayBufferToStr(ji().blake2b(t,a,n/8).buffer);default:return new I("Unsupported Output Type")}}}])}(zt);function Vi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Vi=function(){return!!t})()}const qi=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Vi()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="BLAKE2s",t.module="Hashing",t.description="Performs BLAKE2s hashing on the input. \n

BLAKE2s is a flavour of the BLAKE cryptographic hash function that is optimized for 8- to 32-bit platforms and produces digests of any size between 1 and 32 bytes.\n

Supports the use of an optional key.",t.infoURL="https://wikipedia.org/wiki/BLAKE_(hash_function)#BLAKE2",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Size",type:"option",value:["256","160","128"]},{name:"Output Encoding",type:"option",value:["Hex","Base64","Raw"]},{name:"Key",type:"toggleString",value:"",toggleValues:["UTF8","Decimal","Base64","Hex","Latin1"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=ot(e,2),n=r[0],i=r[1],a=P.convertToByteArray(e[2].string||"",e[2].option);if(0===a.length)a=null;else if(a.length>32)throw new I(["Key cannot be greater than 32 bytes","It is currently "+a.length+" bytes."].join("\n"));switch(t=new Uint8Array(t),i){case"Hex":return ji().blake2sHex(t,a,n/8);case"Base64":return B(ji().blake2s(t,a,n/8));case"Raw":return P.arrayBufferToStr(ji().blake2s(t,a,n/8).buffer);default:return new I("Unsupported Output Type")}}}])}(zt);var Wi=Re,zi=Error,Yi=Error,Ji={seed:new Uint8Array(1024),getIndex:0,setIndex:0,set:function(t){this.setIndex>=1024&&(this.setIndex=0),this.seed[this.setIndex++]=t},get:function(){return this.getIndex>=1024&&(this.getIndex=0),this.seed[this.getIndex++]}};if("undefined"!=typeof document){try{document.addEventListener("mousemove",function(t){Ji.set(255&Date.now()^255&(t.clientX||t.pageX)^255&(t.clientY||t.pageY))},!1)}catch(t){}try{document.addEventListener("keydown",function(t){Ji.set(255&Date.now()^255&t.keyCode)},!1)}catch(t){}}function Xi(){}Xi.prototype.getRandomValues=function(t){if(!t.byteLength)throw new zi("Array is not of an integer type (Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, or Uint32Array)");if(t.byteLength>65536)throw new Yi("Byte length of array can't be greate then 65536");var e=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);if(Wi&&Wi.getRandomValues)Wi.getRandomValues(e);else for(var r=0,n=e.length;r=2147483648?t-4294967296:t}function ca(t){return t<0?t+4294967296:t}function la(t){Zi=Zi||$i.GostRandom;var e=Zi?new(Zi||$i.GostRandom):ta;if(!e.getRandomValues)throw new ia("Random generator not found");e.getRandomValues(t)}function fa(t){if(t instanceof ea)return t;if(t&&(null==t?void 0:t.buffer)instanceof ea)return 0===t.byteOffset&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(new Uint8Array(t,t.byteOffset,t.byteLength)).buffer;throw new na("CryptoOperationData required")}function pa(t){return new Uint8Array(fa(t))}function da(t){return new Uint8Array(pa(t))}function ga(t){return(255&t)<<24|(65280&t)<<8|t>>8&65280|t>>24&255}var ma=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),ya=function(){function t(t,e){var r,n,i=0;for(r=0;r<8;r++)1&e&&(i^=t),n=128&t,t=t<<1&255,n&&(t^=195),e>>=1;return 255&i}for(var e=[1,16,32,133,148,192,194,251],r=[],n=0;n<8;n++){r[n]=[];for(var i=0;i<256;i++)r[n][i]=t(e[n],i)}return r}(),Aa=[4,2,3,1,6,5,0,7,0,5,6,1,3,2,4,0];function va(t){for(var e=0,r=0;r<16;r++)e^=ya[Aa[r]][t[r]];for(r=16;r>0;--r)t[r]=t[r-1];t[0]=e}function ba(t){for(var e=t[0],r=0;r<15;r++)t[r]=t[r+1];t[15]=e;var n=0;for(r=0;r<16;r++)n^=ya[Aa[r]][t[r]];t[15]=n}var wa=[252,238,221,17,207,110,49,22,251,196,250,218,35,197,4,77,233,119,240,219,147,46,153,186,23,54,241,187,20,205,95,193,249,24,101,90,226,92,239,33,129,28,60,66,139,1,142,79,5,132,2,174,227,106,143,160,6,11,237,152,127,212,211,31,235,52,44,81,234,200,72,171,242,42,104,162,253,58,206,204,181,112,14,86,8,12,118,18,191,114,19,71,156,183,93,135,21,161,150,41,16,123,154,199,243,145,120,111,157,158,178,177,50,117,25,61,255,53,138,126,109,84,198,128,195,189,13,87,223,245,36,169,62,168,67,201,215,121,214,246,124,34,185,3,224,15,236,222,122,148,176,188,220,232,40,80,78,51,10,74,167,151,96,115,30,0,98,68,26,184,56,130,100,159,38,65,173,69,70,146,39,94,85,47,140,163,165,125,105,213,149,59,7,88,179,64,134,172,29,247,48,55,107,228,136,217,231,137,225,27,131,73,76,63,248,254,141,83,170,144,202,216,133,97,32,113,103,164,45,43,9,91,203,155,37,208,190,229,108,82,89,166,116,210,230,244,180,192,209,102,175,194,57,75,99,182],Ca=function(){for(var t=[],e=0,r=wa.length;e>4&15)]<<4,i|=t[32+(n>>8&15)]<<8,i|=t[48+(n>>12&15)]<<12,i|=t[64+(n>>16&15)]<<16,i|=t[80+(n>>20&15)]<<20,i|=t[96+(n>>24&15)]<<24,n=(i|=t[112+(n>>28&15)]<<28)<<11|i>>>21,n^=e[1],e[1]=e[0],e[0]=n}function Fa(t,e,r){r=r||e.byteOffset;for(var n=this.sBox,i=new Int32Array(e.buffer,r,2),a=0;a<32;a++)Ra(n,i,t[a]);var s=i[0];i[0]=i[1],i[1]=s}function Da(t,e,r){r=r||e.byteOffset;var n=this.sBox,i=new Int32Array(e.buffer,r,2),a=ga(i[0]);i[0]=ga(i[1]),i[1]=a;for(var s=0;s<32;s++)Ra(n,i,t[s]);i[0]=ga(i[0]),i[1]=ga(i[1])}function ka(t,e){for(var r=new Int32Array(32),n=new Int32Array(fa(t)),i=0;i<8;i++)r[i]=n[i];if(e){for(i=0;i<8;i++)r[i+8]=r[7-i];for(i=0;i<8;i++)r[i+16]=r[7-i]}else{for(i=0;i<8;i++)r[i+8]=r[i];for(i=0;i<8;i++)r[i+16]=r[i]}for(i=0;i<8;i++)r[i+24]=r[7-i];return r}function La(t,e){for(var r=new Int32Array(32),n=new Int32Array(fa(t)),i=0;i<8;i++)r[i]=ga(n[i]);if(e){for(i=0;i<8;i++)r[i+8]=r[7-i];for(i=0;i<8;i++)r[i+16]=r[7-i]}else{for(i=0;i<8;i++)r[i+8]=r[i];for(i=0;i<8;i++)r[i+16]=r[i]}for(i=0;i<8;i++)r[i+24]=r[7-i];return r}var Na,Ha=(Na=new Uint8Array([217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173]),function(t){for(var e=new Uint8Array(fa(t)),r=Math.min(e.length,128),n=this.effectiveLength,i=Math.floor((n+7)/8),a=255%Math.pow(2,8+n-8*i),s=new Uint8Array(128),o=new Uint16Array(s.buffer),u=0;u=0;--u)s[u]=Na[s[u+1]^s[u+i]];return o}),Pa=function(){var t,e,r,n=new Uint16Array(4),i=new Uint16Array([1,2,3,5]);function a(a){r?(n[a]=function(t,e){return 65535&(t>>>e|t<<16-e)}(n[a],i[a]),n[a]=n[a]-t[e]-(n[(a+3)%4]&n[(a+2)%4])-(~n[(a+3)%4]&n[(a+1)%4]),e-=1):(n[a]=n[a]+t[e]+(n[(a+3)%4]&n[(a+2)%4])+(~n[(a+3)%4]&n[(a+1)%4]),e+=1,n[a]=function(t,e){return 65535&(t<>>16-e)}(n[a],i[a]))}function s(e){n[e]=r?n[e]-t[63&n[(e+3)%4]]:n[e]+t[63&n[(e+3)%4]]}function o(t,e){e=e||1;for(var n=0;n=0;--i)t(i);else for(i=0;i<4;i++)t(i)}return function(i,u,h,c){r=c,n=new Uint16Array(u.buffer,h||u.byteOffset,4),t=i,e=c?63:0,o(a,5),o(s),o(a,6),o(s),o(a,5)}}();function Ua(t,e){for(var r=this.pad(pa(e)),n=this.blockSize,i=r.byteLength/n,a=this.keySchedule(t),s=0;s>3,u=i.length,h=u%o,c=(u-h)/o,l=this.keySchedule(t),f=0;f0)for(this.process(l,n),f=0;f>3,u=i.length,h=u%o,c=(u-h)/o,l=this.keySchedule(t),f=0;f0)for(this.process(l,n),f=0;f>3,u=new Uint8Array(o),h=i.length,c=h%o,l=(h-c)/o,f=this.keySchedule(t),p=0;p0)for(this.process(f,n),p=0;p0)for(l[0]=l[0]+16843009&4294967295,p=ca(l[1])+16843012,l[1]=ha(p<4294967296?p:p-4294967295),this.process(c,l),f=0;f>3,s=n.length,o=s%a,u=(s-o)/a,h=new Uint8Array(i),c=new Int32Array(i),l=this.keySchedule(t);h.set(r||this.iv);for(var f=0;f=0;--f){if(!(h[p]>254)){h[p]++;break}h[p]-=254}}if(o>0)for(this.process(l,h),p=0;p=0;--n){var i=t[n]>>>7;t[n]=t[n]<<1&255|e,e=i}0!==e&&(16===r?t[15]^=135:t[7]^=27)}function Xa(t,e,r){var n=this.blockSize,i=(this.sBox,pa(r)),a=new Uint8Array(n);this.process(t,a),Ja(a),r.byteLength%n!==0&&(i=vs.call(this,pa(r)),Ja(a));for(var s=0,o=i.length/n;s>3)||this.blockSize>>1;this.processMAC(n,i,e);var s=new Uint8Array(a);return s.set(new Uint8Array(i.buffer,0,a)),s.buffer}function $a(t,e,r,n){var i=new Uint8Array(Za.call(this,t,r,n)),a=pa(e);if(i.length!==a.length)return!1;for(var s=0,o=i.length;s>1);if(!this.ukm)throw new na("UKM must be defined");var a=new Uint8Array(this.ukm),s=Za.call(this,t,e,a),o=Ua.call(this,t,e),u=new Uint8Array(i);return u.set(new Uint8Array(o),0),u.set(new Uint8Array(s),n),u.buffer}function es(t,e){var r=this.blockSize,n=this.keySize,i=n+(r>>1),a=fa(e);if(a.byteLength!==i)throw new na("Wrapping key size must be "+i+" bytes");if(!this.ukm)throw new na("UKM must be defined");var s=new Uint8Array(this.ukm),o=new Uint8Array(a,0,n),u=new Uint8Array(a,n,r>>1),h=Oa.call(this,t,o);if(!$a.call(this,t,u,h,s))throw new na("Error verify MAC of wrapping key");return h}function rs(t,e){for(var r=this.blockSize,n=new Int32Array(fa(t)),i=[],a=0;a>>s&1}for(a=0;a>1);if(!this.ukm)throw new na("UKM must be defined");var a=new Uint8Array(this.ukm),s=rs.call(this,t,a),o=Za.call(this,s,e,a),u=Ua.call(this,s,e),h=new Uint8Array(i);return h.set(new Uint8Array(u),0),h.set(new Uint8Array(o),n),h.buffer}function is(t,e){var r=this.blockSize,n=this.keySize,i=n+(r>>1),a=fa(e);if(a.byteLength!==i)throw new na("Wrapping key size must be "+i+" bytes");if(!this.ukm)throw new na("UKM must be defined");var s=new Uint8Array(this.ukm),o=new Uint8Array(a,0,n),u=new Uint8Array(a,n,r>>1),h=rs.call(this,t,s),c=Oa.call(this,h,o);if(!$a.call(this,h,u,c,s))throw new na("Error verify MAC of wrapping key");return c}function as(t,e){var r=this.blockSize>>1,n=this.keySize,i=8,a=new Uint8Array(fa(t));if(a.byteLength!==n)throw new na("Wrong cleartext size "+a.byteLength+" bytes");if(e=e||this.ukm){if(!((e=new Uint8Array(fa(e))).byteLength>0&&e.byteLength%n===0))throw new na("Wrong rand size "+e.byteLength+" bytes");i=e.byteLength/n+1}else la(e=new Uint8Array((i-1)*n));var s=new Uint8Array(i*n+r+2),o=s.buffer,u=new Uint8Array(n),h=Za.call(this,a,u);s[0]=34,s[1]=i,s.set(new Uint8Array(h),2),s.set(e,n+r+2);for(var c=1;c>1,r=this.keySize,n=fa(t);if(34!==new Uint8Array(n,0,1)[0])throw new na("Invalid magic number");for(var i=new Uint8Array(n,1,1)[0],a=new Uint8Array(n,2,e),s=new Uint8Array(r),o=0;o>1,n=this.keySize,i=fa(t),a=fa(e);i.byteLength!==n&&(i=ss.call(this,i));var s=Ua.call(this,i,a),o=Za.call(this,i,a),u=new Uint8Array(r+n);return u.set(new Uint8Array(s),0),u.set(new Uint8Array(o),n),u.buffer}function us(t,e){var r=this.blockSize>>1,n=this.keySize,i=fa(t),a=fa(e);i.byteLength!==n&&(i=ss.call(this,i));var s=new Uint8Array(a,0,n),o=new Uint8Array(a,n,r),u=Oa.call(this,i,s);if(!$a.call(this,i,o,u))throw new na("Invalid key MAC");return u}function hs(){return as.call(this,za.call(this))}function cs(t,e,r,n){var i=n/4,a=new Int32Array(fa(t)),s=new Int32Array(fa(e)),o=new Int32Array(i);if(r)for(var u=0;ur)throw na("Invalid padding");var a=new Uint8Array(i);return i>0&&a.set(new Uint8Array(t.buffer,0,i)),a}function As(t){var e=t.byteLength,r=this.blockSize,n=Math.ceil(e/r)*r,i=new Uint8Array(n);i.set(t);for(var a=e;a1&&0===t[e-1];)e--;if(1!==t[e-1])throw na("Invalid padding");e--;var r=new Uint8Array(e);return e>0&&r.set(new Uint8Array(t.buffer,0,e)),r}function ws(t){var e=t.byteLength,r=this.blockSize,n=r-e%r,i=Math.ceil(e/r)*r,a=new Uint8Array(i),s=new Uint8Array(a.buffer,e,n);return a.set(t),la(s),a}const Cs=function(t){var e;if(!aa)throw new ia("Big endian platform not supported");switch(t=t||{},this.keySize=32,this.blockLength=t.length||64,this.blockSize=this.blockLength>>3,this.name=(t.name||(1===t.version?"RC2":1989===t.version?"GOST 28147":"GOST R 34.12"))+(t.version>4?"-"+(t.version||1989)%100:"")+"-"+(64===this.blockLength?"":this.blockLength+"-")+("MAC"===t.mode?"MAC-"+(t.macLength||this.blockLength>>1):"KW"===t.mode||t.keyWrapping?("NO"!==(t.keyWrapping||"NO")?t.keyWrapping:"")+"KW":(t.block||"ECB")+(("CFB"===t.block||"OFB"===t.block||"CTR"===t.block&&2015===t.version)&&(null===(e=t)||void 0===e?void 0:e.shiftBits)!==this.blockLength?"-"+t.shiftBits:"")+(t.padding?"-"+(t.padding||("CTR"===t.block||"CFB"===t.block||"OFB"===t.block?"NO":"ZERO"))+"PADDING":"")+("NO"!==(t.keyMeshing||"NO")?"-CPKEYMESHING":""))+(t.procreator?"/"+t.procreator:"")+("string"==typeof t.sBox?"/"+t.sBox:""),this.procreator=t.procreator,t.version||1989){case 1:this.process=Pa,this.keySchedule=Ha,this.blockLength=64,this.effectiveLength=t.length||32,this.keySize=8*Math.ceil(this.effectiveLength/8),this.blockSize=this.blockLength>>3;break;case 2015:if(this.version=2015,64===this.blockLength)this.process=Da,this.keySchedule=La;else{if(128!==this.blockLength)throw new na("Invalid block length");this.process=Ta,this.keySchedule=xa}this.processMAC=Xa;break;case 1989:if(this.version=1989,this.process=Fa,this.processMAC=Ya,this.keySchedule=ka,64!==this.blockLength)throw new na("Invalid block length");break;default:throw new ia("Algorithm version "+t.version+" not supported")}switch(t.mode||t.keyWrapping&&"KW"||"ES"){case"ES":switch(t.block||"ECB"){case"ECB":this.encrypt=Ua,this.decrypt=Oa;break;case"CTR":1989===this.version?(this.encrypt=Ga,this.decrypt=Ga):(this.encrypt=Va,this.decrypt=Va,this.shiftBits=t.shiftBits||this.blockLength);break;case"CBC":this.encrypt=qa,this.decrypt=Wa;break;case"CFB":this.encrypt=Qa,this.decrypt=ja,this.shiftBits=t.shiftBits||this.blockLength;break;case"OFB":this.encrypt=Ka,this.decrypt=Ka,this.shiftBits=t.shiftBits||this.blockLength;break;default:throw new ia("Block mode "+t.block+" not supported")}if("CP"===t.keyMeshing?this.keyMeshing=ps:this.keyMeshing=ds,this.encrypt===Ua||this.encrypt===qa)switch(t.padding){case"PKCS5P":this.pad=ms,this.unpad=ys;break;case"RANDOM":this.pad=ws,this.unpad=gs;break;case"BIT":this.pad=vs,this.unpad=bs;break;default:this.pad=As,this.unpad=gs}else this.pad=gs,this.unpad=gs;this.generateKey=za;break;case"MAC":this.sign=Za,this.verify=$a,this.generateKey=za,this.macLength=t.macLength||this.blockLength>>1,this.pad=gs,this.unpad=gs,this.keyMeshing=ds;break;case"KW":switch(this.pad=gs,this.unpad=gs,this.keyMeshing=ds,t.keyWrapping){case"CP":this.wrapKey=ns,this.unwrapKey=is,this.generateKey=za,this.shiftBits=t.shiftBits||this.blockLength;break;case"SC":this.wrapKey=os,this.unwrapKey=us,this.generateKey=hs;break;default:this.wrapKey=ts,this.unwrapKey=es,this.generateKey=za}break;case"MASK":this.wrapKey=ls,this.unwrapKey=fs,this.generateKey=za;break;default:throw new ia("Mode "+t.mode+" not supported")}var r,n=t.sBox;if(n){if("string"==typeof n){if(r=n.toUpperCase(),!(n=oa[r]))throw new ra("Unknown sBox name: "+t.sBox)}else if(!n.length||n.length!==oa["E-Z"].length)throw new ra("Length of sBox must be "+oa["E-Z"].length)}else n=2015===this.version?oa["E-Z"]:"SC"===this.procreator?oa["E-SC"]:oa["E-A"];if(this.sBox=n,t.iv){if(this.iv=new Uint8Array(t.iv),this.iv.byteLength!==this.blockSize&&1989===this.version)throw new ra("Length of iv must be "+this.blockLength+" bits");if(this.iv.byteLength!==this.blockSize>>1&&this.encrypt===Va)throw new ra("Length of iv must be "+this.blockLength>>"1 bits");if(this.iv.byteLength%this.blockSize!==0&&this.encrypt!==Va)throw new ra("Length of iv must be a multiple of "+this.blockLength+" bits")}else this.iv=128===this.blockLength?ma:sa;if(t.ukm&&(this.ukm=new Uint8Array(t.ukm),8*this.ukm.byteLength!==this.blockLength))throw new ra("Length of ukm must be "+this.blockLength+" bits")};var Es={},Ss=Re,Is=Error,Bs=Error;function _s(t,e,r,n,i){for(var a=0;a>2,a=new Uint8Array(i),s=0,o=0,u=0;u64&&h<91?h-65:h>96&&h<123?h-71:h>47&&h<58?h+4:43===h?62:47===h?63:0)<<18-6*r,3===r||n-u===1){for(e=0;e<3&&o>>(16>>>e&24)&255;s=0}}return a.buffer}function Ts(t){if(t instanceof ArrayBuffer)return t;if(t&&(null==t?void 0:t.buffer)instanceof ArrayBuffer)return 0===t.byteOffset&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(new Uint8Array(t,t.byteOffset,t.byteLength)).buffer;throw new Is("ArrayBuffer or ArrayBufferView required")}var Rs=function(){var t=new Int32Array(16),e=new Int32Array(16);e[0]=512;var r,n,i,a=function(){for(var t=new Int32Array(xs("B0Wm8lllgN0jTXTMNnR2BRXTYKQIKkKiAWlnkpHgfEv8xIV1jbhOcRbQRS5DdmovH3xlwIEvy+vp2soe2lsIsbebsSFwBHnmVs3L1xui3VXKpwrbwmG1XFiZ1hJrF7WaMQG1Fg9e1WGYKyMKcur+89e1cA9GneNPGi+dqYq1o2+yCroK9ZYemTHbeoZD9LbCCdtiYDc6ycGxnjWQ5A/i03t7KbEUderyix+cUl9e8QY1hD1qKPw5Cscvzius3HT1LtHjhLy+DCLxN+iToepTNL4DUpMzE7fYddYD7YIs16k/NV5orRxynX08XDN+hY5I3eRxXaDhSPnSZhXos98f71f+bHz9WBdg9WPqqX6iVnoWGicjtwD/36P1OiVHF82/vf8PgNc1njVKEIYWHxwVf2MjqWwMQT+amUdHraxr6ktufWRGekBo+jVPkDZyxXG/tsa+wmYf8gq0t5oct6b6z8aO8Jq0mn8YbKRCUfnEZi3AOTB6O8Okb9nTOh2urk+uk9QUOk1WhojzSjyiTEUXNQQFSiiDaUcGNyyCLcWrkgnJk3oZMz5H08mHv+bHxp45VAkkv/6GrFHsxaruFg7H9B7nAr/UDX+k2ahRWTXCrDYvxKXRK43RaZAGm5LLK4n0msTbTTtEtIke3jaccfi3TkFBbgwCqucDp8mTTUJbH5vbWiODUURhcmAqH8uS3DgOVJwHppqKK3uxzrLbC0QKgIQJDeC3Vdk8JEKJJRs6fTreXxbs2JpMlJsiMRZUWo837ZxFmPvHtHTDtjsV0fqYNvRSdjswbB56SzNprwJn558DYTMbiuH/H9t4iv8c50GJ8/PkskjlKjhSbwWApt6+qxst84HNpMprXdhvwEpZot6Ybkd9Hc2678q5SOrvcR2KeWaEFCGAASBhB6vru2v62JT+WmPNxgIw+4nI79CezXsg1xvxSpK8SJkbstnVF/T6UijhiKqkHeeGzJEYne+AXZufITDUEiD4dx3fvDI8pM16sUkEsIAT0roxFvFn5443")),e=new Array(12),r=0;r<12;r++)e[r]=new Int32Array(t.buffer,64*r,16);return e}(),s=new Int32Array(xs("5vh+XFtxH9Alg3eACST6FshJ4H6FLqSoW0aGoY8GwWoLMumi13tBbqvaN6RngVxm9heWqBpoZnb13AtwY5GVS0hi84235kvx/1ximmi9hcXLgn2m/NdXlWbTba9pufCJNWyfdEg9g7B8vOyxI4yZoTanAqwxxHCNnrao0C+839aLGfpR5bOuN5zPtUCKEn0LvAx4tQggj1rlM+OEIojs7c7Cx9N3wV/S7HgXtlBdD165TMLAgzaHHYwgXbTLCwStdjyFWyigiS9YjRt59v8yVz/s9p5DEZM+D8DTn4A6GMnuAQom9fOtgxDv6PRBGXmmXc2hDH3pOhBKG+4dEkjpLFO/8tshhHM5tPUMz6aiPQlftLyc2EeYzeiKLYsHHFb5f3dxaVp1apzF8C5xoLoevKZj+atCFeZyLrGeIt5fu3gNuc4PJZS6FIJSDmOXZk2ELwMeagII6phcfyFEob5r8Ho3yxzRY2Lbg+COK0sxHGTPcEebq5YOMoVrqYa53ucetUeMh3r1bOm4/kKIX2HW/RvdAVaWYjjIYiFXkj74qS78l/9CEUR2+J19NQhWRSzrTJDJsOCnElYjCFAt+8sBbC16A/qnpkhF9G6LOL/GxKu9vvj91HfeujqsTOvIB5t58JyxBeiHnQwn+moQrIpYy4lg58FAHQzqGm+BHko1aSiQxPsHc9GW/0NQGi9gnQqf96UW4MY/N5Yc5KazuNqSUhMkdSw44IqbpahkczvsFU8r8SRXVUmzP9dm2xVEDcXHp9F5455Ct5La3xUaYZl/04agNF7AJxQjONVRe22pOaRlGPB3EEADtAJ5HZClrqLdiNJniZxKXQqTD2bfCihlwk7p1CBFCbCLMlU4kWaFKSpBKQe/xTOoQrJ+K2JUTcZzbFMERWKV4Ada9AbpU1GQih8vO2vBI2Fvw3sJ3FJV5cY5Z9Ezsf5oRCmIOcfw5xHiQJuH9xlk+aLpOK3D20sHGQwLTkf5w+v0VTTVdtNriENGEKBa64sC2CDDzfWCMvJRbeGEDb7Cseeg6N4GsPodCHuFS1QNNDM7QuKaZ7zKW3/YpgiKxDfdDsY7s6nZQ+2BIXFNvV5lo7FnYe3nte6haSQx98jVc6v21R/GheGjZxpeBjzUBBDJLSg6uY8ssEACj+vAbLLy95AX1k8Rb6HTPOBzWfGpnuSqeE7WjHTNwAZuKhnVxztC2ocStBYccEXDNxWC5O2TIW2s45BBSTn2/H7F8SGGIjt8wLCUBCusFvv510U3mlJ+v3N8Py6jtoFoM+e42brSeMqpoyo0wi/+u+SBY8z+370NjllAJG6lpnBRxu9LhCrR5CK60GUnnFCM2RSIwhhgjO4xnqVJH3zaF9OU4SgTTJxgCUv0MnLV47Ob9hKlpKrXkcy72kPSb/0PNN4fPJRq0lBPW1RomV7ha9+fr2/qj3eUJkjqWHDdCSu/x+Vtcdl8Z93msv9PIdVJPCdrRjroYAORdntPr4bHH2ihPng11LmgtowRXwMMn9QUHdLJFlggAZg9j33dUySsZKpwP8wXUlTCyYmUjgK0Jj5edtafRsLeUHRvA1h9gARF2z2CknLx5WBYSgKbVgvz+65Ypz/83GKhWl5ObK1M6EupblXOH7jMCPl0eq6CslPBAhRM9/tHG58EKJjz6442BosnrfLv+3rtypf+jApevneOBRP099jPMCwlAcMri/eNkt38F1xVTfhlxX9GBS9f6vMwG6Ky9CSqaLfsu9YNhpmPDzUBBHVMAAAAAAAAAADxLjFNNNDM7HEFIr4GGCO1rygNmTDABcGX/VziXWk8ZRmkHMYzzJoVlYRBcvjHnrjcVDK3k3aEqZQ2wTokkM9YgCsT8zLI71nEQq45fO1PXPoc2O/jq42C8uWslU0pP9Fq2CPokHobfU0iSfg88EO2A8ud2Hn58z3eLS8nNtgmdCpDpB+JHuLfb5iZnRtsEzrUrUbNPfQ2+rs131AmmCXAlk/cqoE+bYXrQbBTfuWlxAVAunWLFghHpBrkO+e7RK/juMQp0GcXl4GZk7vun765rpqN0eyXVCHzVyzdkX5uMWOT19rir/jOR6IgEjfcUzijI0PeyQPuNXn8VsSompHmAbKASNxXUeASlvVk5Lfbe3X3GINRWXoS222VUr3OLjMenbsjHXQwj1INcpP90yLZ4gpEYQwwRnf+7uLStOrUJcow/e4ggAZ1YerKSkcBWhPnSv4UhyZOMCzIg7J78RmlFmTPWbP2gtyoEap8HnivWx1WJvtkjcOytz6RF99bzjTQX3zwarVvXf0lfwrNEycYV03I5nbFKp4HOaflLriqmlSGVT4PPNmjVv9IrqqSe36+dWUlrY4th30ObPn/28hBOx7MoxRQyplpE74w6YPoQK1REAmVbqccsbW2ui20NU5Eab3KTiWgBRWvUoHKD3HhdEWYy40OK/JZP5sxKqhjt++zim4ppPxja2qjoEwtSp09lesO5r8x46KRw5YVVL/VGBacju+by/URXWi8nU4oRrqHXxj6z3Qg0e38uLbiPr2wBzby8eNkroTZKc5libb+cLei9tpPclUOclPXXG1JKQTyOj1XQVmnCoBp6gssEI5J0HPFa7EaEYqrehk55P/XzQlaCw44rO/J+2A2WXn1SJK95pfWfzQix4kz4QUUvGHhwdm5dcm1StImYWDPG82AmkSS7Xj9hnGzzKsqiBqXk3LOv2Z/4dCI1tRbXZhalCfIEagFjD9V3mX1tDGWtQYZ90+WsdZwbkOFnR6Ly0PTNlqrioXM+j2E+ce/mcKV/P2iH9Wh3ktjD82z73Y7i0VtgD9Z+Hz3w4WyfHO+XzGRPJjjrGYzsEghv2FnTCa4+BgP+8mVxMEwyKqghiAQdhqYYFfzQiEBFqr2PHYMBlTMNS3bRcxmfZBCvPRalkvUA4Jo6KDD7zxvPae9ktJp/3O8KQriAgHtIoe33jTN6IWBj9kB7qfdYQWb1vonMhmgNVPVbxrodMzOyeoxJFwug/VUcDRVXaB75JnOJtKsVue+9/0WGFelBU44ag59pFJ0NtFb2Go4HN6f8sr3dWIxdwwysJqu2eJ5yNBd7xCRxgZ02xEQRqJRXlBFI1Ns5HKYAvzFDLz39bY8+nOhaIfNFx8DfSlBr9nyjb0/Xj60Wk87nYTu/jYbZ3FAPbjj0+cHYnEaOij58g/SSH68fHW0nnYndOXyk8frVlwY3PWeT0eLpAxu9E+prctSxpmBLZjax2B4iwbcbkadDvxl+Op1IexOMKX3IZ6OC1Ur7D9lvKV7a93QSWm68bdemZBM2+OU6lcUsgHR5upA9ruwwIJBKErdUPIEY7+PHf/o1/k7k8usuE2Mto5HfIbowd0bOZImjj98WqESCdYvyy89mKvbNcmuZxNpViv9X/UVweFsNs7igB1+su3485sX2pTTfbAN/gGHe8PsdguK2suEld/hU65EBaJHc7e0ELMShXt4PDKr3463cNBoElE7U2c5udLj5mVYTVficbJkaNeJx4/JhJclqTW7+n0a4QKLFTej36ZBiNDNXZvDeN56Ssgsmk2Az7dCd38bg722IHLSiDodM711XnotS6tqj0H02qtruxyV2ZBc/+f9jTG2g6pkIhGbOB/ArvuEQgIsSaD5CMZjAzrjpCivCASTiCat5Bw0GopTx65xIe535qhdxH9cSiWSnoy1OOmqVc3YYwY3eqna2OspoYroe7MnmJVu39pqNeSEFGt9nRmCUJSn1Bz6VaTobL/lyu3J6kLFnKNsNRwOb8F5UYHk3m+rv4n/8MUwGE0X1J1B6xWEBFiSHA1SUCjXOWHxeOwYDKiFapoFcQGO+BHNQJGifD7178wZrxUjn2Mp0jR0UO/5HrmQ4RtKB43Sd1m5Vh3l/GATMZEvH1otqZPAFlTctluiGRo+Ld4JimuZ64pm1x4PguP+jFGtt9VaCNdFM+UPiUH/fwLm3We9SFns4Giqul321S/CSCbj/0p1pWw5Bw2IrN34ZIZUjEaRpG/Rvr0mE1x8DLMPkwOPFTNKgtmEn8G/mmmcMguoVCD65PpSgkOv+QdnntTWz+loowi4Jf1YLESxR5t2kbxe3LO7x+phkEj+ZRYQY6YfgXryM0fVOGg0CaaTY8LOmExt7TAqn9/YbIHZHXseOwYDKmaUZmCJ6/vZ/YMKWY7mc3UgewdEmhQK/ElfLKilcbZZMjQfmG+KRbvC+zgapKBQs3LCVCOjrdgfrzoXJzwLi4a7bP6DJY3IabWiKHkCv9HJgPH1qUvWazg3r4iACnmyyroSVVBDEAg7DUzfNpQOB7nusgTRp85nkLLFYSQT//EltNwm8SuXxSwST4YII1GmLyis75NjL5k35ec1B7BSKTob5ucsMK5XCpxw01hgQa4UJeDeRXSz151MxJK6IoBAxWha8AsMpdyMJxy+Eofx9pxabvOeMX+x4NyGSV0RQCDsNC1pm0B+PxjNS9yjqdRq1RUoDR0U8nmJaSQAAAAAAAAAAFk+t1+hlsYeLk54FgsRa9htSuewWIh/juZf0BOHLj4Gem3bu9MOxOKsl/yJyq7xsQnMszweGdvhifPqxGLuGGR3cM9JqoetxlbFfsplV/bWA5U92m1s+5o2ko2IRFbgfB7rjzeVn2CNMdYXnE6qqSNvrDrX5cAmYkMEn6ZTmRRWq9NmncBSuO6vAsFTp8IKKzzLA243I8AHk8nCPZDhyizDO8ZeL27X00z/VjOXWCSeselOZDJdaqY34W01lHJCCnn45mG+Yj94UhTZBALHRBNILvH98MiWWxP2m8XsFgmpDogpKBTlkr5OGYtUKhB9cszAD8vrr+cbG0nIRCIrcD4lZBZNqEDp1SDGUT4f9PlmusMgP5EM6Kvy7dHCYcR+8IFMuUWs02Hzlf64lEo5IQVcnPAsFiLWrZcYZfP3cXjpvYe6K5vwofREQAWyWWVdCe11vkgkf7wLdZYSLhfP9Cq0SwkXhel6FZZrhU4nVdqf7uCDkkkTR5EyQypGI8ZSuahGW0etPkN0+LRfJBKxXoskF/bweGRLo/shYv5/3aURS7vMJ52kbcEBc+C90CSidiIgjFmivKCKj8SQbbg2803kuQ10OmZn6nFHteBwX0bvJ4LLKhUIsDnsBl719FsefSG1sYPP0FsQ2+czwGApXHefpzZyOUwBfs9VMhGGwxyB2HIOGg1Fp+07j5l6Pd+JWDr8ecft+ysu6aQZhkPvDs5fCc32e04tN09qa+n6NN8Etq3UcDihI/mNIk0KBX6qocliSLhcG/eo4/2XYDCaLrULKm5bo1GCDetCxOH+p1cilI1YKZodg3N/z5zIZLrUUaVbT7XUtypQCL9Tgc49eZdGptjV5C0E5dIrgPx+MIeWV7aed7VzVKA5aUQdgJfQtDMwyvvz4vDP4o533eC+jMNisS4lnElPRqbOcm+529HKQeJCwe7RTbp2Ay/0eqMPsEWyaKk6zeTMr38L6IRUnQgEg1SzwUaCY5JUNcLIDv7S7k438n/f+6cWejOSDGDxTfsSO1LqA+WESgyrU/27kAed6vY4D3iKGctI7FWPDLMqtZ3Estb+9+Dc28oi9PPsthHfWBNUmpxA4z/e31aKztOgwcgSQyLpwwela4FY+m0NdyeVebHh893ZsYt0QirABLjsLZ//q8KU9Kz4qC11kU97v2mx7ytoeMT2L69Iesfhds6AnMZ+XQxnEdiPkuTBTGJ7mdkkPe3+I0qlw9+2i1GQmx8VJi2/bU9m6gVLYry1GuLPWlKqaui+oFP70M4BSO1oCMDmYxTJQ/4WzRWoJxDNBJIxoGlw9ue8imyXzEywM3zoNfyzucBl3vJYfMeA81IhTt5BMrtQlfFeQ5D0k9+HCDliXdLg8UExPBr7i2avkXIK8FGyEbxHfUJ+1O6lcy47TO72474lgmJ4NOsLzEOcA+PdeOckyCh3MorZhn35FLUZReJDsPJXSw+I9+uX4oi2+piapJQ6GcTwaMsWhYZQ7mQJrxH6733zF9XATqukelZ8VJi0xqm2u/uAT0IYjjzCK887xc0L0EM26qo5dxPwL6wb7DMTLCUG26fw00iN1+Zda/LDGh5eubIWH/gg9YQuBlDEbg+fcWvrHZ6EMAGpM3WMqzFe1D/kFP2ieSJlJ8nxcB7wCTJzpMHKcKdxvpQYS6bnaz0OQNgp/4wUyH4PvsP6x3Z0yzYWqWNKapVyjxORGcJe+Tf1Re1NWuo/nugCSZZQujh7ZDfnvQtYLiLmVZ+J4FPiYYCtUuMFKI38bcVaI+NLmTXeFOD1GtCtCcY5BXimWYZeltdhcQlIfLHi1ss6IRVgAgHpFeV3n67RrbAhP2p33LeYgLduuaGmq12fjSSGRM+b/V5FNsVmJljxxrn+m6y9/erNY0G+mXnE76ciFwhAVXZRB3Hs2I5UPsK6UctnHwQ9CtSCrHGvWHn+eHoEXNrJNrI4rzOOBJrtvYZsyUly7iZhXabrvYECkDKV/dCLLBcR+DQEYHO/CurzCZMpdY/8QhyusT59z6k0uiMHSBGIgysk785Ch0zmXA5X1h+w6doas9G61vmbNDzAdXsciTxFgitRDbhAOpKXXHaYwfHbYUo+DQEY1eaMtNYPSI6FXLTPrpYeDfPLM9k6jlWrFKAO10IXAyhiN4nBg4tt0ZyUYpKJX+997Ts668/LuOZOSjFJBkx+ZC9lw9w9Kz4qTFpj2lvT80CpIQxHtHTRV6FhWTGsWTTaHehyZm7jZRF693ZbyG7TZxawXESbpohcIB1JxbkFOHqINGxFExByxLq53f+/SUYep1GvmdUpd7wc4FuhsPeF5GAn21JUbTC6bld4jDBa1wdlD1auyYfGgmEv8pWlq4lE9fvFcX7VKOdZ8kTKjdy7zix9uIiqFUq+Mo2xuh5hm+mT7OiLCfK9nugTtxd0AapLKF0csyGFjxQxlcruSMOBhBOY0bj8t1DTsvmIiTmoapmNHOG5H4iODORzRlp4mVaDdpeHFgLPKtfuI0G/hccTtbPxoU7/kW/hK0Vn53waAjC30QV1DJj8yF7Km6Wj5/cg2p4GrWpgMaK7sfQ4lz50lH7X0mAs9GY5GMD/ml9Qp/NoZ44kNNmDtKRJ1M1orxt1VZK1h388PQIubeobq/xfW0USH2sNcektKVU1dN/99RBtTwPYCBuoe5+MGcbbfqGjrAmBu7vKEq1mFy36eXBDZgEIKccXkyZ3e/9fnAAAAAAAAAAA6yR2pMkG1xVyTdQvBzjfb7dS7mU43bZfN/+8hj31O6OO+oT8tcFX5unrXHMnJZaqGwvavyU1xDmG4SyHKk1OIJlpoovOPgh6+vsut52cS1UFakFWttksslo65qXevqKWIqOwJqgpJYBTyFs7Nq0VgbEekAEXuHWDxR86Sj/laTDgGeHtzzYhveyBHSWR/LoYRFt9TE1SSh2o2mBp3K7wBVj1zHIwneMp1MBiWWt/9XDOIq0DOdWfmFkc2ZdHAk34i5DFqgMYe1T2Y9J/w1bQ8NhYnpE1tW7VNTCWUdPWehwS+WchzSZzLtKMHD1EGjasSSqUYWQHf2ktHXPcb19RS28KcPQNaNiKYLSzDsoerEHTZQnYM4WYfQs9l0kGMPaonszJCpbEZXeiDuLFrQGofOSatV4OcKPepEKcoYJka6Dal7RG25Yvaszth9TX9t4nKrgYXTelPEafJdzv4VvLpsGcbvn+o+tTp2SjkxvYhM4v0lkLgXwQ9FaiGm2AdDkz5XOgu3nvDQ8VXAygldweI2wsT8aU1DfkEDZN9iMFMpHdMt/Hg2xCZwMmPzKZvO9uZvjNauV7b52MNa4rW+IWWTGzwuISkPh/k70gJ7+RUANpRg6QIg0bVimeJ2+uGdMoY5KMPFOiQy9wgv746Rue0LxveSw+7UD3TEDVN9LeU9t16L+uX8KyYk2pwNKlQf0KTo//4Dz9EmQmIOSVaW+n4+Hw9Ai4qY9s0aojD92m2cLH0BCd0cYoj4p50E90h9WFRpRXm6NxC6I4QX98+oNPaB1HpNsKUAflIGya8UYKZD+hKN33NL1HEoFERwZytyMt8uCGzAIQUpMYLeWNvIkrV8qh+bD4kx37a4kkR8wuWun53RGFBCCkO0vlvraKJD7WVYQlXxnI1l07Z0BOYz+gBqaNtnZsRyof94rHmrTJfiHDU0QuEICq7JpPnblXgucUBbp7yCybMiAxpUZl+LZeT7G2Ufd1R/TUi/oNhXukZoKFqWxaoWqYu5kPrvkI63nJoV43okf0pi12hX3NXSd0HvjFC4AKGCC8vmXcsgH3orRmbRuYb5Qm50zJIb9TxOZIlUEKD5PZykIgzcyqZHuk70KaQGCJChhxDE6k9psys4vM2jYt3jVM05bcI7x8Wy+pwwm7aKqFGrPSYTGnNkjgEwIdxSlB/E2yzVrat3BL5IqneWXZhO1x5jI4b9YXNLuk6C1t1TirckVcIUfqYXe0sV2hq3DPCRzorJB/znK4vf9XyF39lyJ4qKTkTGprb5QNOFGZW08f3+RiV4zK7XG8ntmIK7DAHSwKkXudXRE8UDuiwx4RqHZDxuRjySOjmcHO9xaGxX6odtyHtKlz4JbVCa8NVn2dOlgUtAwqP1ncxvQ2AviEldEh3dPh3T2YNkhK+UXnGqRmiOV1GFR+sqWR9ZNmWHRQwB2JnqgQGGWMBltPVAgMvEYDoy0DhMZRN7893DJQeOyGHirqMKj8eVc/9yFNIDDKBQy2ZfAyK4AWwwxpvpbdGyRwh9uV7pmB4WG40fwYFNnKBfiCDtK7zA3nKWPXYFBDDxTHO8yw6KCdOg+OQHZNVz9UojnRdcHhYXe9EvWjfHNPH0urN8EvH9/CbVZIsWc5XNDxbATtFTe/QqftlxYdFDBAZX1sZ9qrcrgH7Bf6h7pO6Dzfr3nLAwT7wXM/BgVxvEY+eNYcEofpiifQfPSOd7StobnCYlNskN0m4kSbWGCAFgWPwJrX+UH8+/rYzqlL5G0Oo0PyiwYI65+bEmvQSRc0e5qSh0rnaZwiGwF8QsTmnuA6TFxyDuOSVktun14+o5naa6NT9FrYPTXn/uCQTBskJSLQCYMlh+ldhCmAwA8UMOLGs8Cghh4okwh0M6QZ1ynyNB89rdQtbG/uCj+u+7Kljkruc8SQ3TGDqrcttbGhajSpKgQGXiOP33tLNaFoa2/MaiO/bvSmlWwZHLlrhRrTUlXVmNTW3jUayWBN5fKufvMcpsKjqYHhct4vlVGtelOYMCWq/1bI9hYVUh2dHihg2VBv4xz6RQc6GJxV8StkewsBgOyarn6oWXzsi0AFDBBeI1DlGYv5QQTvitM0VcwN1wenvuFtZ3+S5eMluQ3naZdaBhWRom5jerYR7xYYIItGCfTfPrepgaseuweK6H2swLeRA4y2XiMfD9ONRXSwVmBn7fcCweqOvrpfS+CDEjjN48R3ws7+vlwNzkhsNUwb0oxds2QWwxkQJuqe0adicyQDnSmz74Ll658o/ILL8q4CqKronPBdJ4ZDGqz6J3SwKM9HH54xt6k4WBvQuOOSLsi8eBmbQAvvBpD7cce/QvhiHzvrEEYDBJloPnpHtVrY3piPQmOmldGQ2AjHKm5jhFMGJ1J7wxnXy+uwRGbXKZeu5n4MCuJljHwU0vEHsFbIgHEiwywwQAuMinrhH9Xaztug3ts46YoOdK0Qk1TcxhWmC+kaF/ZVzBmN3V/+uL2xSb/lMCiviQrt1lum9bStemp5VvCIKZcifhDoZlUys1L5DlNh39rO/jnOx/MEn8kBYf9itWFnf18ul1zPJtIlh/BR7w+GVDuvYy8eQe8Qy/KPUnImNbu5SoiujbrnM0TwTUEHadNmiP2as6uU3jS7uWaAExeSjfGqm6VkoPDFETxU8THUvr2xoRd/caLz6o71tUCHhUnI9lXDfvFOaUTwXezURmPc9VE32PKs/Q1SM0T8AAAAAAAAAABfvG5ZjvVRWhbPNC7xqoUysDa9bds5XI0TdU/m3TG3Ervfp3otbJCUiefIrDpYKzA8aw4JzfpFncSuBYnH4mUhSXNad39f1GjK/WRWHSybGNoVAgMvn8nhiGckNpQmg2k3ghQeO6+JhJy11TEkcEvp19tKbxrT0jOm+YlDKpPZv501OauKDuOwU/LKrxXH4tFuGSg8dkMPFT3r4pNjhO3EXjyCwyCL+QMzuINMuUoT/WRw3rEuaGtVNZ/RN3pTxDZhyqV5AvNZdQQ6l1KC5Zp5/X9wSCaDEpzFLukTaZzNeCi5/w59rI0dVFV0TnignUPLfYjMs1IzQUS9EhtKE8+6TUnNJf26ThE+dssgjAYILz/2J7oieKB2wolX8gT7supFPf6B5G1n45TB5pU9p2IbLINoXP9JF2TzLBGX/E3spSsk1r2SLmj2sit4RJrFET9I87bt0SF8MS6erXW+tVrWF0/YtF/ULWtO1OSWEjir+pLmtO7+vrXQRqDXMgvvgghHIDuopZEqUST3W/jmnj6W8LE4JBPPCU7+4ln7yQH3dydqcksJHNt9vfj1Ae51R19ZmzwiTeyGkW2EAY+Zwer+dJi45BzbOazgWV5xIXxbtyqkOic8UMCv9QtD7D9UO26Djj4hYnNPcMCUkttFB/9Ycr/qn9/C7mcRaIrPnM36oBqBkNhqmDa5esvZO8YVx5XHMyw6KGCAyoY0RelO6H1Q9pZqX9DW3oXprYFPltXaHHCiL7aePqPVCmn2jVgrZEC4Qo7Jwu51f2BKSeOsjfEsW4b5CwwQyyPh2bLrjwLz7ik5E5TT0iVEyOChf1zQ1qq1jMal96JurYGT+wgjjwLC1caPRlsvn4H8/5zSiP26xXcFkVfzWdxHHSYuOQf/SSv7WCIz5ZrFV92yvOJC+LZzJXe3Ykjgls9vmcSm2D2nTMEUfkHreVcB9IuvdpEqkzc+8p0kmywKGenhYyK2+GIvVTaZQEd1f3qfTVbVpHsLM4IlZ0ZqoRdMuPUFfesIL7LMSMEL9EdfUzcwiNQnXew6lo9DJRgK7RAXPSMs9wFhUa5O0J+Ub8wT/UtHQcRTmHMbWz8N2ZM3ZS/8sJZ7ZEBS4CN20gqJhAyjrjpwMpsY10GcvSM13oUm+v6/EVt8MZkDlwdPhaqbDcWK1PtINrlwvsYL4/xBBKge/zbcS3CHchMf3DPthFO2CETjPjQXZNMP8RtuqzjNOWQ1Hwp3YbhaO1aU9QnPug4whXCEuHJF0Eevs70il6488rpcL29rVUp0vcR2H09w4c/fxkRx7cRe5hB4TB3ArxZ6yinWPBE/KC3tQRd2qFmvrF8hHpmj1e7UhPlJqH7zOzzjbKWW4BPk0SDwmDqdQyxrxARk3Fl1Y2nV9eXRlWyemulfBDaYuyTJ7MjaZqTvRNaVCMilsurGxAwiNcBQO4A4wZO6jGUhAxzux11GvJ6P0zEBGTdRWtHY4uVohuylD7E3EI1XecmRcJ87aQXKQgZP61CDFoDK7+xFavMkG9I4WNZzr+GBq74kL1Tnytm/jAIR8YENzBn9kLxNuw9DxgqVGERqnaB2HaG/y/E/VwEqK95PiWHhcrUnuFOoT3MkgbCx5kPfH0thGMw4Qlw5rGjSt/fXvzfYITEDhkowFMcgFKokY3Kr+lxuYA21TrrFdDlHZXQEA6PzCcIV8Lxx5iMqWLlH6YfwRXtM3xi0d73Ylwm165Bsb+BzCDwmgGDZC/7cQA5B+QN+KElIxuRL6bhyjsroCAZb+wYzDp4XSSsaWVCFYWnnKU665PT85sQ2T8p7z5XjDnRJfX/RhqM+lsJSg2EQ2FrWkE36oQIbTNMSkTq7dYclRPrdRuy5FA8VGD1lmmsehpEUwj8sq9cZEJrXE/4GLdRoNtCmBlay+8HcIhxaed2QlJbv0m28obFJNQ537aAjXk/Jy/05W2to9rkN4OrvpvTUxAQi/x8ahTLn+Wm4Xt7WqpR/biAHrvKPPzrQYjuBqTj+ZiTui3qtoae2gujdyFZge6eMxW8oHiowx5slekX6oI1bQXTgZCsws19ji/9+rgJUS8mvnAwF+AjOWTCK+YtGro/FjanMVcOIgDSWx2dtDrHzPKrh5w3XurtiAjJuorS/1QIPhyAYccudXKdUqbcSzoQWadh96DxWimGEeF62c59CC7pssHQeK/EtW2Dqwc5Hdqw19xKDaRwsa7fZ/s7bX/zNsY9MNRqDH3nAEsMWBYLwq62uYqdMt+GlgByC7wb8Z6IYRfLLI1dRFGZfXfBNnb9A/S10J4ZYoDk9P7cxg9oFpAnRkuOwF6n7KM8LQGX5JamiKUK/PXzbdeInA0Y+ArMm4QxatdBs55aOgpWmLea5c/OzY26tQt9XHTgZwwzl7lSbcinXy8USmSr9ZeLRRvjvTpBWsChktwQeE0Aw4ovALt0q2tUJZ5MrSvSK6V0Hb+b7e8bcR4Qjmqy3VfYWZkAaS+29uAfWSF6o04mvYwWkG8IgrbSxPXU7MriXKfIRmX5YS7MyICkdaDGTztocf/9atsDJn4GOFrvV4n9n46GlnTTuJdIzzZj4roU7VKLZbfcK+ssQXnl5XS6ZubukJY5De2dEM0F4AYb2zohmgvDr8JKjuzR70rzX+mLxjR1VrdnX0BHFVx4L0+Rxsb3/3qpsL4CO6v70XuV9MfbIgKT1D6R/8ET8oBrdycNR9bWV6nZkbTNS+SIAAAAAAAAAAIWQnxb1jr6mRilFc6rxLMwKVRK/Odt9Lnjb2Fcx3SbVKc++CGwta0ghi102WDoPmxUs0q36zXisg6ORiOLHlbzDudplX3+Sap7LoBssHYnDB7X4UJ8vqep+6NbJJpQNzza2fhqvO27KhgeYWXAkJav7eEnf0xqzaUx8V8yTKlHi2WQTpg6KJ/8mPqVmxxWmcWxx/DRDdtyJSk9ZUoRjevja8xTpiyC88lcnaMFKuWaHEIjbfGguyLuIcHX5U3pqYi56RljzAsKiYZEW2+WCCE2ofd4BgybnCdzAGnecaZfo7cOcPax9UMimCjOhoHiowMGoK+RSs4uXP3Rr6hNKiOmiKMy+uv2aJ6vq2U4GjHwE9IlSsXgiflBc9Iyw+wSZWWAX4BVt5Iq9RDi08qc9NTGMUormSf9YhbUV75JN/Pt2DGYcIS6SVjS0kxlcxZp5hpzaUZoh0ZA+MpSBBbW+XC0ZSs6M1F8umEONTKI4Epzbm2+pyr7+OdSBsmAJ7wuMQd7R6/aRpY4VTm2mTZ7mSB9UsG+OzxP9iknYXh0ByeH1r8gmURwJTuP2mKMwde5nrVrHgi7sTbJDjdR8KMGZ2nWJ9oM32xzoks3ON8V8Id2jUwWX3lA8VGBqQvKqVD/3k11yen5zYhup4jKHUwdFnfFWoZ4Pwt/kd8Yd07TNnCJ95Yd/A5hqNBuUnrKkFcb07WIGEZRgKJNAY4DnWuhOEbCL53K21tDxb1CSkJHVls9t6GeV7D6e4N98+SdIK1gUMshqPhTuwm20cRnNp42swPbkAYnNEAy265KtvDoCj9/3sqAXwtLTUpwgDav40FyNazSnj5ui93c347RxnY8jHwFFvkI8L1u3wfceVf79iOVdaFMDK1nz7m5ls+nE/wc6qncqwzma5evsh4Ful/hCp1sRDi2y4EhKSzMSd8s92N7dvVEMrHnrn6U1IXlVKpH1x4qwqWhG4GptQ8foC0vwszoIybNUaxYe5TnxwjXrqZC+wb7yN2YGx7IsIJIzYUVpqusBUjtvwyialGlTq5Nazt0nKDj2PhM0DosEVeyhK6BSd6GyxJeP+KKlUSLKE+VAhiJ2E1hi0/HN243f3gi3bP5dHhLInkoXig5WgWsDlphn7l95lTMD7Vmv7XSLq3jXHW2Sny35PlPu9dio+Lp5jCr2GbFpjjnPa5Xdry90kQTi7CqcgOCIZCfOXI/YgluV6sTg2Zk6xgJxRpnDpRcwdvk9GxUfUKKfQp7VBeorx1lGNGZaz9x/S5hhsftTKSNC98chwAgOhkEwhpPNFpb9e3SHJzGScTaxS9NEbIpjoXIbZpo16KZoDkrKtljyOVCaFqTl3k70Loq5N6dDXug/CNkTTmI54mx/loJ5Gjwt9nSIP27wCoMpFjyOWn5C/etlkVyq7kx5gd21GfI0eFrx6A0lXd3j7Zi9cFCJijKpnMysKMpFGdpOZlauWYgPTLMdIg2XmPo31tsmMvlo8LT/zRqgDwlkTyWFRfo61RdeJN5y9GxUfF2yRhVxPoD7/w9+IHhDzytz0qr6vRfqNq7fYrT9ERus0W+Sz0q6p9vHLWfgs0FrXa1J+tO8oxaySRSoixXRUAaK7PkU4nwd6+Me/EBP5Ix1m+2iI37c/RQbUix4TlBw8XwmaBzmlsrBWBXzvDXSpks7tIGngAz/Kf59/fYe2frD1bqksGwmY6ke9ZnRA8EZkTRAQ0H3rU3tafIFVM2dlkm2G9aryMO95+rbE2jRMYmfsCr7ZR0Y41Lh+ufx2jkjWu98psGhu/XgqO5PepE3eAXPmgseMThxYYC/jlvZ+DrL2zzlgAJ15RXTi4l+Ry0/IfD7vMYtlG63ho6jlbo8JI0hlC4J5yI2Rb/eOYP/ZP65AuQbscl3QWMNENlXw8sXIrWNTsyieuxxnK4MO5n+y1GkjBX7FGWsgm0nMyvhvQR6116/AXn3M6+UGWDFZy7JbEGjxHXCf+umUkaE82Tv0P1144c07Z5gBAdDrhj7jimTue8UTThFPrEMYlqBaXhIB0I1XBJIz0LOFKbunhysH9YGMS3Oe4LWukeS6budFBx7H4caB1YWuA3BHEouuEnBmPIfp3d8qRgByNmlBrE0jkh+wnOtQbINHph7OkR0YKtVo8+744TmKANFdvIKG4fRbYl6YXMP4n3v5F1SWIPN5rjKPb63DCNkftAdERl6Nio+oFkjhLYfQPPxiT8QddRX0UQEcdxFWNo0I3A1uNymEWWH/CBDjZtn08mrJtArC1yI7g4lF2/nejgqtdqQJpzEctnY/jFjxB5G+qjLibervHcWQvUvfR3khS8SbzmoxrowJDOboGAFB9fO6IjIj+6Cxhogr65XokSJJteAEfyl5yg2pFjwByvOu49LTL1Je75K820koTyv6Zu3aVV9EvqevQWntanowEuqW4Nr20JzFI+sO3kFkIOEgShRwSHlV9NQbFWw/XL/mWrLTz1hPtoMjmTi3APwhoNW5rlJ6QTq1yq7Cw/8F6S1E1lncGrjyOFvBNU2f/hPMAKNr1cMGEbI/L06IjJbgSD39sqRCNRvojHs6j6mM02UdFM0ByVYQDlmworSSb7W86eanyH1aMy0g6X+li3QhXUbV+ExWv7QAj3lL9GOSw5bXyDmrd8aMy3pbrGrTKPOEPV7ZcYEEI97qNYsPNerB6OhEHPY4WsNrRKRvtVs8vNmQzUywJcuVXcmss7g1AAAAAAAAAAAywKkdt6bUCnk4y/Ui556wnNLZe4shPdeblOGvM1+EK8BtPyE58vKP8/oc1xlkF/VNhO/2g/0wuYRO4csMef26C/hi6JVBSrr6XS3LrxIoeQKvFZBuJ2Xm7RqpeYiArZuROwmsMS7/4emkDtbJ6UDx39oAZD8meZHl6hKOqcajZzdEu3hYDfqfMVUJR3dDchOiMVMfZVr4xNNkWlgSGYrXbCAcsyZCbmStd5ZYsXJfFGBuAOtGbY3ybL1l9lKgjDsCwiqxV9WXaTxMn/SAXKD1q2YkZ54815jarlRlnZ1H1Mk6SFnClN3T7n9PRwV1G1IkvZhlPvaSF9aNdxzEQFbN97T9HBUd6k9wAoOs4HNDY27iNgJxl/kNhYQSZe+rLpVIbcKyVaTsoxZ9MXiJUEYdtXbXrULIfSZVdehnPVcCW+pcka0w/hRn4VS1IeivTg1VGNdGBKXw1Ajwu/chRg78p9h+W7MDJN5U0iTo53cj+1e3wtZqgpUy6wsbRqfOJRc1667oNiqfecqv6AMCcXvKNhMxk889y+/IAP2TbFYeLOnJMffwG7J+AafMj9ogIaCzClqzVHQHJQFXiuuXMDFw2Jw4sIdYwG2O4QnIDgiGcDS8JAOhGq4JFL8byd6F0XSxpU8jOlNiw/gCfj+MJV1PmVbLHmSKE0LmEo31UNH38Tqta6/iAjipZo/0sCQzFa6nKDg//hM0DhMJZXkr63hYt9nCPSzvGMCv2IPI31U68qTQp0QHBGCYAl9T9CM3dTajC+bVy5g7O9winx/GMS0Hzow26Tf6dP/QAbxmn+w8Htfa/fdTcGe9B9tBkcycW6P+fvMhmpknTMwjI3lZ3REZIlxsPlyoCks1hpHJD9ht9jv64UR1MgnZpYctr5A0UejqrNfJfe4Et52FU5AcEQynVE9drZOVwaT80eax9L5Cqibiy5EdwechSl+uZ09haxpfjfmLfx9QMN3byWk7pOeW+BFyFDdj7Wthu1bpxH/GVLpHQvZz2FrNTfgqyVuQI/7lgf2wDECWnoLAvXhFtI8nfPYSGv7UGUMYhz/J8QIdfV9QMtx+l/TSm2qZhbaopBin181SSPshOLshHw9xQfDswJaNmgEPOIFqL+ebE2sCxn6gIvi6b67lLW5nFJ3x0+jeNm8lfA5e8zjMuUM260mJMdPzhKTMnl+Fyns6y6nCavC1rn2mVTR+F2JjL+6uFUahZp2+xfditsb6FiGNi9/tfZBP4/xNs2K0xEPpbu341wKL+7VFMxNEegwEO3Nfxq5oedd5V9C1YHu3kpVwTshtvL1U1/5ThSADMG0bRiIdh684V/bZSmROy0l6JdacYHCcYF/HOLXpVQuUsXLXFMSS/n3pr7vnCgdnnIufSHy9W7OFw2bgdyn5g6bggUctJQbHnEvYjxJ1zMh5Fz6Qvn33MuOen+Lug9gjpiDGgEPtkZHTM8NjolbI6mShVhPsnqVjMK1cgUzVENC1bjphO/zpQEtGzQCHnGMV6Ziaq50GAv/GfwG49gTEjW6nU1qfG3+ydRMF4+G7WVQZSPmoC5SiAN3LVwGIpOJiwH0/gtpHsD42r2K7YJZkUxOOuyYW2e+sQ3wgn+/lqlqaSea1Pja4eeGidzT1f8ugS4aKx+lU9H7rZDW66DKGBrFQ7I0MQ45FgT33yy5eCemJBxpURifAnU1E8zqr3xeZPKln8hMTvokfSseSJ9fWttk1xirR0xIefSnofInCkAVc9qDKpvrrjSXhnloYhxyUUg40qIwIwTwr2U3/XL2hR0GAj46a0S6Z4WIw85u3XNmqJP3zHCs/9TSTim17anfOFYyFHDqamwHw0GMDlpKgyvLsi9WNbrNBLRs0Ah42QoG7lq4DEQ7DzshH0h2yPnlCVjDiRLu3pjRSznNv4sBWTl7KSBy9Bvgh8BAkxPhaN6tJumIR8qjn04UDIScZ4W71f9VHbfz2FOgykbRXVykDc1gIMeH/jRvhLdtzxXD+1fe/aD8oSHkzkuNe2CWAS09msZCrSmKLGQIddi9EPCvFLNXxup7g3SsTWMh2JpFFjLtqWcJxxmyP/dsJLvzKLwGxmLVJpEsCPI84l7EeJKzZrl4KD9vTzm9wIyPnp1oM/1PORewnnn0N1k94G+ywIwQ1oh4QbHRS9oZsm7uMhOdsLSUh2Z12T4vglk3dxmHwFiQ6ax4PUZhdfGCfgP/bIcJlF3AqDU+uH9FFvllirW5Jj+Vc5h+sCDvuFUzC21RSDEq5qkbVCvLQWMx5BPGFgR5QI+OgYDTEaDv81FhwyVQOtBmIvm9lXDViHbZog1LjUmlUzE1VzoMi+Fo02TfkcQh9BsJ5/UKL48SsJsPJMGhLdpJzCypWT3EH1w0Vj5Xpr9U0U82qFaLgq983+BD9kGa6momhclD+Lzl3L+01+kdK7J63d55nQUga0Q8rtbmq217rpHJ9hvoRT64aKx8rlFjEce2UyLjMqTSPBSRuamS0I+1mC4DEcfKcKxkKODJ1NiJW8KWD1X8xXZCPpDsje/Xb/BQft6ecmc9z0XweozC6kqgYFSUH1yxWBD7W7De/Zxe/qHjvJrGk27dS0rcgAPrdBgI+OixDdIUXsG3KIWaIii8n3NQFylEJwoGQk69zNOXKu30Mxwr9gWZd+QKZqiGJVAwKkqBLtbdio2gpwN3R8UV+HqXDpt7MCPqqWAaxXi346o6c/utpg+2mTEequWXAAAAAAAAAAAxDvGdYgS09CKTcaZE22RVDeyvWRqWB5JcpJeLuKYklhwrGQo4dTU2QaKVtYLNYCwyedzBZCYnfcGhlKqfdkJxE52AOybf0KGuUcTUQegwFtgT+kStZd/BrAvyvEXU0hMjvmqSRsUV2UnXTQiSPc84nQUDISfQZucvf97/Xk1jx6R+KgFVJH0HmbFv8S+ov+1GYdQ5jJcqr9/Qu8ijP5VC3KeWlKUdBsuwIOu2faHnJboPBWNpbao05PGkgNX3bKfEOONOlRDq95OegSQ7ZPL8je+uRgctJc8sCPOjWG/wTtelY3WzzzpWIMlHzkDnhlBD+KPdhvGCKVaLeV6sammHgAMBHx27Il31NhLT9xReAxifddowDew8lXDbnDcgyfO7Ih5Xa3PbuHL2UkDk9TbdRDviUYiryKriH/442bNXqP1Dym7n5PEXyqNhS4mkfuz+NOcy4cZinoN0LEMbmbHUzzoWr4PC1mqq5agESZDpHCYnHXZMo71fkcS3TD9YEPl8bdBF+EGixn8a/Rn+YzFPyPlXI42YnOmnCQddUwbujlX8VAKqSPoOSPpWPJAjvrRl376rylI/dmyHfSLYvOHuzE0784XgReO+u2mzYRVzPhDqrWcg/UMots6xDnHl3Cq9zETvZzfgt1I/FY6kErCNmJx0xS22zmGb61mZK5Rd6Ios78oJd29Mo71rjVt+N4TrRz2xy12JMMP7osKbSqB0nCgYFSXOF2toMxHy0MQ45F/Tute+hLcf/G7RWuX6gJs2zbARbF7+dymRhEdSCVjIopBwuVlgRghTEg66pgzBAToMBHx01ohpaR4KxtLaSWhz20l05utHUXqDiv30BZnJWkrNM7TiH5lgRslPwDSX8OarkujRy46iM1TH9WY4VvHZPuFwr3uuTWFr0nvCKuZ8krOaEDl6g3CryLMwS46YkL+WcodjCwKyW2fWB7b8bhXQMcOXzlU/5ha6WwGwBrUlqJut5ilucMhqH1Jdd9NDW24QNXBXPfoLZg77Khf8lat2Mnqel2NL9kutnWRiRYv18YMMrtvD90jFyPVCZpEx/5UEShzcSLDLiSli3zz4uGawueII6TDBNaFPs/BhGnZ8jSYF8hwWATbWtxki/sxUnjcIlDilkH2LC12jjlgD1JxaW8yc6m88vO2uJG07c//l0rh+D94i7c5eVKuxyoGF7B3n+I/oBWG5rV4ahwE1oIwvKtvWZc7MdleAtaeC9YNYPtyKLu3kez/J2Vw1Br7nD4O+ER1sTgXupgO5CVk2dBAQPIG0gJ/eXSxptgJ9DHdKOZCA19XIeVMJ1B4WSHQGtM3WOxgmUF5f+Z3C9JsCmOic0FQKlDy2f7yoS3+JHxfFcj0ds7eN8qZ4qm5x5ztPLhQz5pmgcWcNhPIb5FRiB4KY3zMntNIPL/BJ3OLTdp5c22xgGZZW63pkh0ayB4tHgzLNI1mNy63PHqSVW/DH2oXpoUNAG51Gtf2Spdm77CG4yBOMeQ4Ljhsu4AuabXulYvhXEriTt/H86yj+2AvqlJ1WSmXrikDqTGyZiOhHSigjRTWJixIdjy2r2MAyMazL9Loukcq5hny9eWC+Pe+OJjoMEal3YC/W8MtQ4a0WyTUn6uIulANf/YkoZtEvXeLOGv8bGEGrm/OQn5M53oz+DUOWRyfIxIoL91JFAsaqrlMcm5xe86wQtBNPovpJQqsypT8WWmLlURIrx0FI2nbm49eSSEDl5GSyp9NyrkPWl4TaIztyoQXhGoakigSRSUGmOLS2hSXJ3nhl3eq6rKbPgAIKl3PCULa9iMKE/7tevTOTi6DfRyyPak4q72y3TZUcMkJ5g3IqMY1Bc/fN/784m7IHTAr5OCwCbIpqDwskOgNab9rlPF+Ikx/Gi5iWflOKw0T/WccaqOY54vzgzkOekimiDN4kedjNQBnon6LI69jp9Ea7z/OYJwxDs1M+IoTkVdgvDc2OlFBGUQZvErJs6CDnOVeva8VCbQgezlpAwW+gOxk9T8W/q3t/5mSI3xdNQg6YFO9wWATYgTeshXw518axczJE4YWoIWlcP4lvEfhn9s8GV+Pv9SQaq/J20Clj1S2jZk51uR5eAom9mBB30iiQwf199BNgjzxVN7b9k6kXqhIQfjkZouAGhtq1MJlreNqmsFWe44Juw04v91YIWodtU1ikT/9BN/xYdZWzWUisfKUJXMfV9n77FH9si3VKwL/rJquR3az5aJbvxWekkXPKmjHhHnxcM7vkQYaxMxWpDdt5O2iav+RwtKArp/ogjuR6OntzB/lRjOzVvhSjaCLu7Um5I7FE2Rdwi024s9wxYIghnydl/tOz+o/c8fJ6CZELLTH8pgmbD1LEo3jtbcxQzL9eutmBNGvVghF/ZipPlM6aUNT92d8rJbz7RSB1JmfEK2YfSfy/SSQg/HIyWd0DQ23UGMK7PB9uRRf4crORoIVjvGmvH2jUPqS67ruGtgHK0EwItWkUrJTKywmAyZhUw9hzmjc4ZCb+xcAtusrC3qnXeL4NOz4ED2ctIO65UOWw6jd7spBF8wqxNsu0JWBiAZwHNxIs++hrkwwTKC+hzBzrVC7lN0tTj9KKohs6CBthIjrYnArBNsJEdK0lFJ96I9Pp90ydBr4h9ueZaMXtz1+GgDYnjHf3BdYb61qcME0rR9FS3OCNX557/cI07Pgkd3hYPc0Y6oZ7pnxEFdWqTOGXnVppiZkAAAAAAAAAAOxk9CEzxpbxtXxVacFrEXHBx5JvRn+Ir2VNlv4PPi6XFfk21ajEDhm4pyxSqfGulalRfaoh2xncWNJxBPoY7pRZGKFI8q2HgFzdFina9lfEgnTBUWT7bPrR+xPbxuBW8n1v2RDPYJ9qtj84vdmpqk09n+f69SbAA3S7xwaHFJne32MHNLa4Uio60+0DzQrCb/reryCDwCPUwA1CI07K4buFOMuoXNdulsQCJQ5uJFjrR7w0EwJqXQWv16cfEUJypJeN94TMP2LjuW38HqFEx4Ehss85FZbIrjGOTo2VCRbzzpVWzD6S5WM4WlCb3X0QRzWBKaC156+j5vOH42NwK3ngdV1WU+lAAXvpA6X/+fQSErU8LJDoDHUzB/MVhX7E24+vuGoMYdMe2eXdgYYhOVJ3+KrSn9Yi4iW9qBQ1eHH+dXEXSo+h8MoTf+xgmF1lYTBEnsGdvH/npUDU3UH0zyzcIGrgrnrpFluRHNDi2lWosjBfkPlHEx00S/nsvVLGt10XxmXSQz7QGCJP7sBesf2eWemShEtkV5pWjr+kpd0Ho8YOaHFtpFR+LLTE16IkVoexdjBMoLy+QTrupjLzNn2ZFeNrvGdmO0DwPuo6Rl9pHC0ow+CwCK1OaCoFSh5bsQXFt2EoW9BE4b+NGltcKRXywGF6wwFMdLf16PHRHMNZY8tMSz+nRe+dGoRGnInfa+M2MIJLK/s91fR09uYO76L1jGuD+y1OGEZ25F8K3zQRIHgfdR0jobq9Ypszgap+0a4dd1MZ9xuw/tHIDaMumoRVCQg/koJRcCmsAWNVV6cOp8lpRVGDHQSOZWgmBNS6ChH2UfiIKrdJ133JbvZ5PYrvJ5n1KwQtzUju8LB6hzDJIvGi7Q1Uc5JhQvHTL9CXx0pnTShq8OLhgP18yXSMvtJxfnBnr09JmpOCkKns0duziOOykzRN0XInNBWMJQ+j1g"));function o(t,e){return t[e>>2]>>((3&e)<<3)&255}function u(t,e){for(var r,n,i=0,a=0;a<16;a++)r=(65535&t[a])+(65535&e[a])+(i||0),n=(t[a]>>>16)+(e[a]>>>16)+(r>>>16),t[a]=65535&r|n<<16,i=n>>>16}function h(t){return new Int32Array(t.buffer,t.byteOffset,16)}function c(t,e){for(var r=0;r<16;r++)t[r]=e[r]}function l(){return new Int32Array(16)}function f(t,e){for(var r=0;r<16;r++)t[r]=t[r]^e[r]}var p=l();function d(t,e){c(p,t),f(p,e);for(var r=0;r<8;r++){var n,i,a=o(p,r)<<1;n=s[a],i=s[a+1];for(var u=1;u<8;u++)a=(u<<9)+(o(p,(u<<3)+r)<<1),n^=s[a],i^=s[a+1];t[r<<1]=n,t[1+(r<<1)]=i}}var g=l(),m=l();function y(t,e,r){var n;for(c(g,t),d(g,e),c(m,g),d(g,r),n=0;n<11;n++)d(m,a[n]),d(g,m);d(m,a[11]),f(g,m),f(t,g),f(t,r)}function A(t){var a=h(t);y(i,n,a),u(n,e),u(r,a)}function v(e){var a=e.length;if(!(a>63)){var s=new Int32Array(16);s[0]=a<<3;for(var o=new Uint8Array(64),c=0;c>>8}}var c=new Uint8Array([0,255,0,255,0,255,0,255,255,0,255,0,255,0,255,0,0,255,255,0,255,0,0,255,255,0,0,0,255,255,0,255]);return function(i){e=new Uint8Array(32),r=new Uint8Array(32),n=new Uint8Array(32),t=new Array(4);for(var a=0;a<4;a++)t[a]=new Uint8Array(32);_s(c,0,t[2],0,c.length);var s=new Uint8Array(Ts(i)),o=s.length,l=o%32,f=(o-l)/32;for(a=0;a0){p=new Uint8Array(s.buffer,32*f);var d=new Uint8Array(32);_s(p,0,d,0,l),h.call(this,d),u.call(this,d,0)}for(var g=new Uint8Array(32),m=8*o,y=0;m>0;)g[y++]=255&m,m=Math.floor(m/256);u.call(this,g,0),u.call(this,n,0);var A=e.buffer;return"SC"===this.procreator&&(A=Ms(A)),A}}(),Ds=function(){var t,e=new Uint32Array(80);function r(t,e,r,n,i){return i+e+r+n+(t<<5|t>>>27)>>>0}function n(t,e,n,i,a,s){return r(t,a,s,1518500249,i^e&(n^i))}function i(t,e,n,i,a,s){return r(t,a,s,1859775393,e^n^i)}function a(t,e,n,i,a,s){return r(t,a,s,2400959708,e&n|i&(e|n))}function s(t,e,n,i,a,s){return r(t,a,s,3395469782,e^n^i)}function o(t,e){for(var r=t[0],o=t[1],u=t[2],h=t[3],c=t[4],l=n,f=0;f<80;f+=5)20===f?l=i:40===f?l=a:60===f&&(l=s),c=l(r,o,u,h,c,e[f]),h=l(c,r,o=(o<<30|o>>>2)>>>0,u,h,e[f+1]),u=l(h,c,r=(r<<30|r>>>2)>>>0,o,u,e[f+2]),o=l(u,h,c=(c<<30|c>>>2)>>>0,r,o,e[f+3]),r=l(o,u,h=(h<<30|h>>>2)>>>0,c,r,e[f+4]),u=(u<<30|u>>>2)>>>0;t[0]+=r,t[1]+=o,t[2]+=u,t[3]+=h,t[4]+=c}function u(t){return(255&t)<<24|(65280&t)<<8|t>>8&65280|t>>24&255}return function(r){var n=new Uint8Array(Ts(r)),i=n.length,a=i+9;a%64&&(a+=64-a%64),(t=new Uint32Array(5))[0]=1732584193,t[1]=4023233417,t[2]=2562383102,t[3]=271733878,t[4]=3285377520;for(var s=0;s=0&&f<4&&(c=i<<3>>>8*f&255)}h%4==0?e[h>>2]=c<<24:e[h>>2]|=c<<8*(3-h%4)}for(h=16;h<80;h++){var p=e[h-3]^e[h-8]^e[h-14]^e[h-16];e[h]=p<<1|p>>>31}o(t,e)}for(h=0;h<5;h++)t[h]=u(t[h]);return t.buffer}}();function ks(t,e){var r=this.digest===Fs?32:64,n=this.bitLength/8,i=Ts(t),a=Ts(e);if(i.byteLength===r)s=new Uint8Array(i);else{var s=new Uint8Array(r);i.byteLength>r?s.set(new Uint8Array(this.digest(i))):s.set(new Uint8Array(i))}for(var o=new Uint8Array(r+a.byteLength),u=new Uint8Array(r+n),h=0;h0)throw new Is("Length must multiple of 8");for(var r=this.bitLength/8,n=this.digest===Fs?32:64,i=e/8,a=this.iterations,s=this.diversifier,o=new Uint8Array(n),u=0;u=0;--B)I=(S=y[n*w+B]+C[B]+I)>>>8,y[n*w+B]=255&S}var _=new Uint8Array(i);return _s(v,0,_,0,i),_.buffer}function Ps(t,e){if(e%8>0)throw new Is("Length must be multiple of 8");var r,n=e/8,i=new Uint8Array(Ts(this.context)),a=this.bitLength/8,s=Math.ceil(n/a);r=this.label?new Uint8Array(Ts(this.label)):new Uint8Array([38,189,184,120]);for(var o=new Uint8Array(n),u=0;u>>8,h[h.length-1]=255&e,o.set(new Uint8Array(ks.call(this,t,h),0,u0)throw new Is("Length must be more than "+this.bitLength/2+" bits and multiple of 8");var n=this.bitLength/8,i=e/8,a=this.iterations,s=new Uint8Array(Ts(t)),o=new Uint8Array(Ts(this.salt)),u=o.byteLength,h=new Uint8Array(u+4);if(_s(o,0,h,0,u),i>137438953408)throw new Is("Invalid parameters: Length value");for(var c=Math.ceil(i/n),l=new Uint8Array(i),f=1;f<=c;f++){h[u]=f>>>24&255,h[u+1]=f>>>16&255,h[u+2]=f>>>8&255,h[u+3]=255&f;for(var p=new Uint8Array(ks.call(this,s,h)),d=p,g=1;g1){var A=i/r,v=new Uint8Array(A);return _s(l,i-A,v,0,A),v.buffer}return l.buffer}function Os(t,e){if(e>this.bitLength||e%8>0)throw new Is("Length can't be more than "+this.bitLength+" bits and multiple of 8");var r=this.digest===Fs?32:64,n=this.bitLength/8,i=!!(t&&t.byteLength>0)&&new Uint8Array(Ts(t)),a=i?i.length:0,s=this.iterations,o=new Uint8Array(Ts(this.salt)),u=o.length,h=new Uint8Array(u+a);_s(o,0,h,0,u),i&&_s(i,0,h,u,a);for(var c=new Uint8Array(this.digest(h)),l=new Uint8Array(r),f=new Uint8Array(r),p=new Uint8Array(r),d=0;d<32;d++)l[d]="DENEFH028.760246785.IUEFHWUIO.EF".charCodeAt(d);h=new Uint8Array(2*(r+n));for(var g=0;g1?"-"+(t.length||256):"")+("HASH"!==(t.mode||"HASH")?"-"+t.mode:"")+(t.procreator?"/"+t.procreator:"")+("string"==typeof t.sBox?"/"+t.sBox:""),this.procreator=t.procreator,this.bitLength=t.length||256,t.version||2012){case 1:this.digest=Ds,this.bitLength=160;break;case 1994:if(this.digest=Fs,this.sBox=(t.sBox||("SC"===t.procreator?"D-SC":"D-A")).toUpperCase(),!Cs)throw new Bs("Object GostCipher not found");this.cipher=new Cs({name:"GOST 28147",block:"ECB",sBox:this.sBox,procreator:this.procreator});break;case 2012:this.digest=Rs;break;default:throw new Bs("Algorithm version "+t.version+" not supported")}switch(this.keySize=t.keySize||(t.version<=2?this.bitLength/8:32),t.mode||"HASH"){case"HASH":break;case"HMAC":this.sign=ks,this.verify=Ls,this.generateKey=Ns;break;case"KDF":this.deriveKey=Qs,this.deriveBits=Ps,this.label=t.label,this.context=t.context;break;case"PBKDF2":this.deriveKey=Qs,this.deriveBits=Us,this.generateKey=Ns,this.salt=t.salt,this.iterations=t.iterations||2e3,this.diversifier=t.diversifier||1;break;case"PFXKDF":this.deriveKey=Qs,this.deriveBits=Hs,this.generateKey=Ns,this.salt=t.salt,this.iterations=t.iterations||2e3,this.diversifier=t.diversifier||1;break;case"CPKDF":this.deriveKey=Qs,this.deriveBits=Os,this.generateKey=Ns,this.salt=t.salt,this.iterations=t.iterations||2e3;break;default:throw new Bs("Algorithm mode "+t.mode+" not supported")}};function Ks(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Ks=function(){return!!t})()}const Gs=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Ks()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Streebog",t.module="Hashing",t.description="Streebog is a cryptographic hash function defined in the Russian national standard GOST R 34.11-2012 Information Technology – Cryptographic Information Security – Hash Function. It was created to replace an obsolete GOST hash function defined in the old standard GOST R 34.11-94, and as an asymmetric reply to SHA-3 competition by the US National Institute of Standards and Technology.",t.infoURL="https://wikipedia.org/wiki/Streebog",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Digest length",type:"option",value:["256","512"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=ot(e,1)[0],n={version:2012,mode:"HASH",length:parseInt(r,10)};try{return M(new js(n).digest(t))}catch(t){throw new I(t)}}}])}(zt);function Vs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Vs=function(){return!!t})()}const qs=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Vs()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="GOST Hash",t.module="Hashing",t.description="The GOST hash function, defined in the standards GOST R 34.11-94 and GOST 34.311-95 is a 256-bit cryptographic hash function. It was initially defined in the Russian national standard GOST R 34.11-94 Information Technology – Cryptographic Information Security – Hash Function. The equivalent standard used by other member-states of the CIS is GOST 34.311-95.

This function must not be confused with a different Streebog hash function, which is defined in the new revision of the standard GOST R 34.11-2012.

The GOST hash function is based on the GOST block cipher.",t.infoURL="https://wikipedia.org/wiki/GOST_(hash_function)",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Algorithm",type:"argSelector",value:[{name:"GOST 28147 (1994)",off:[1],on:[2]},{name:"GOST R 34.11 (Streebog, 2012)",on:[1],off:[2]}]},{name:"Digest length",type:"option",value:["256","512"]},{name:"sBox",type:"option",value:["E-TEST","E-A","E-B","E-C","E-D","E-SC","E-Z","D-TEST","D-A","D-SC"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=ot(e,3),n=r[0],i=r[1],a=r[2],s="GOST 28147 (1994)"===n?1994:2012,o={name:1994===s?"GOST 28147":"GOST R 34.10",version:s,mode:"HASH"};1994===s?o.sBox=a:o.length=parseInt(i,10);try{return M(new js(o).digest(t))}catch(t){throw new I(t)}}}])}(zt);var Ws=r(78627);function zs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(zs=function(){return!!t})()}const Ys=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,zs()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="LM Hash",t.module="Crypto",t.description="An LM Hash, or LAN Manager Hash, is a deprecated way of storing passwords on old Microsoft operating systems. It is particularly weak and can be cracked in seconds on modern hardware using rainbow tables.",t.infoURL="https://wikipedia.org/wiki/LAN_Manager#Password_hashing_algorithm",t.inputType="string",t.outputType="string",t.args=[],t}return c(r,t),s(r,[{key:"run",value:function(t,e){return Ws.smbhash.lmhash(t)}}])}(zt);function Js(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Js=function(){return!!t})()}var Xs=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Js()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="NT Hash",t.module="Crypto",t.description="An NT Hash, sometimes referred to as an NTLM hash, is a method of storing passwords on Windows systems. It works by running MD4 on UTF-16LE encoded input. NTLM hashes are considered weak because they can be brute-forced very easily with modern hardware.",t.infoURL="https://wikipedia.org/wiki/NT_LAN_Manager",t.inputType="string",t.outputType="string",t.args=[],t}return c(r,t),s(r,[{key:"run",value:function(t,e){for(var r=new ArrayBuffer(2*t.length),n=new Uint16Array(r),i=0;i2&&void 0!==arguments[2]?arguments[2]:[],n=null;switch(e){case"arrayBuffer":n=t.run(this.inputArrayBuffer,r);break;case"str":n=t.run(this.inputStr,r);break;case"byteArray":n=t.run(this.inputByteArray,r);break;default:throw new I("Unknown hash input type: "+e)}return n}},{key:"formatDigest",value:function(t,e,r,n){return"All"!==e&&4*t.length!==parseInt(e,10)?"":r?`${n}:${" ".repeat(13-n.length)}${t}\n`:t+"\n"}}])}(zt),eo="ffffffff-ffff-ffff-ffff-ffffffffffff",ro="00000000-0000-0000-0000-000000000000",no=function(t){if(!ee(t))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(t.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,255&e,(e=parseInt(t.slice(9,13),16))>>>8,255&e,(e=parseInt(t.slice(14,18),16))>>>8,255&e,(e=parseInt(t.slice(19,23),16))>>>8,255&e,(e=parseInt(t.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,255&e)},io=[];for(let t=0;t<256;++t)io.push((t+256).toString(16).slice(1));function ao(t,e=0){return(io[t[e+0]]+io[t[e+1]]+io[t[e+2]]+io[t[e+3]]+"-"+io[t[e+4]]+io[t[e+5]]+"-"+io[t[e+6]]+io[t[e+7]]+"-"+io[t[e+8]]+io[t[e+9]]+"-"+io[t[e+10]]+io[t[e+11]]+io[t[e+12]]+io[t[e+13]]+io[t[e+14]]+io[t[e+15]]).toLowerCase()}const so=function(t,e=0){const r=ao(t,e);if(!ee(r))throw TypeError("Stringified UUID is invalid");return r};let oo;const uo=new Uint8Array(16);function ho(){if(!oo){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");oo=crypto.getRandomValues.bind(crypto)}return oo(uo)}const co={};function lo(t,e,r,n,i,a,s=0){if(t.length<16)throw new Error("Random bytes length must be >= 16");if(a){if(s<0||s+16>a.length)throw new RangeError(`UUID byte range ${s}:${s+15} is out of buffer bounds`)}else a=new Uint8Array(16),s=0;e??=Date.now(),r??=0,n??=16383&(t[8]<<8|t[9]),i??=t.slice(10,16);const o=(1e4*(268435455&(e+=122192928e5))+r)%4294967296;a[s++]=o>>>24&255,a[s++]=o>>>16&255,a[s++]=o>>>8&255,a[s++]=255&o;const u=e/4294967296*1e4&268435455;a[s++]=u>>>8&255,a[s++]=255&u,a[s++]=u>>>24&15|16,a[s++]=u>>>16&255,a[s++]=n>>>8|128,a[s++]=255&n;for(let t=0;t<6;++t)a[s++]=i[t];return a}const fo=function(t,e,r){let n;const i=t?._v6??!1;if(t){const e=Object.keys(t);1===e.length&&"_v6"===e[0]&&(t=void 0)}if(t)n=lo(t.random??t.rng?.()??ho(),t.msecs,t.nsecs,t.clockseq,t.node,e,r);else{const t=Date.now(),a=ho();!function(t,e,r){t.msecs??=-1/0,t.nsecs??=0,e===t.msecs?(t.nsecs++,t.nsecs>=1e4&&(t.node=void 0,t.nsecs=0)):e>t.msecs?t.nsecs=0:e>4&15,(15&t[7])<<4|(240&t[4])>>4,(15&t[4])<<4|(240&t[5])>>4,(15&t[5])<<4|(240&t[0])>>4,(15&t[0])<<4|(240&t[1])>>4,(15&t[1])<<4|(240&t[2])>>4,96|15&t[2],t[3],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}("string"==typeof t?no(t):t);return"string"==typeof t?ao(e):e}function go(t){return 14+(t+64>>>9<<4)+1}function mo(t,e){const r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function yo(t,e,r,n,i,a){return mo((s=mo(mo(e,t),mo(n,a)))<<(o=i)|s>>>32-o,r);var s,o}function Ao(t,e,r,n,i,a,s){return yo(e&r|~e&n,t,e,i,a,s)}function vo(t,e,r,n,i,a,s){return yo(e&n|r&~n,t,e,i,a,s)}function bo(t,e,r,n,i,a,s){return yo(e^r^n,t,e,i,a,s)}function wo(t,e,r,n,i,a,s){return yo(r^(e|~n),t,e,i,a,s)}const Co=function(t){const e=function(t){if(0===t.length)return new Uint32Array;const e=new Uint32Array(go(8*t.length)).fill(0);for(let r=0;r>2]|=(255&t[r])<>5]|=128<>2]>>>r%4*8&255;return e}(r)},Eo="6ba7b810-9dad-11d1-80b4-00c04fd430c8",So="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Io(t,e,r,n,i,a){const s="string"==typeof r?function(t){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let r=0;r= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){if((r=r||0)<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[r+t]=n[t];return e}return ao(n)}(t,e,r):Mo.randomUUID()};function To(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:case 3:return e^r^n;case 2:return e&r^e&n^r&n}}function Ro(t,e){return t<>>32-e}const Fo=function(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520],n=new Uint8Array(t.length+1);n.set(t),n[t.length]=128;const i=(t=n).length/4+2,a=Math.ceil(i/16),s=new Array(a);for(let e=0;e>>0;h=u,u=o,o=Ro(a,30)>>>0,a=i,i=s}r[0]=r[0]+i>>>0,r[1]=r[1]+a>>>0,r[2]=r[2]+o>>>0,r[3]=r[3]+u>>>0,r[4]=r[4]+h>>>0}return Uint8Array.of(r[0]>>24,r[0]>>16,r[0]>>8,r[0],r[1]>>24,r[1]>>16,r[1]>>8,r[1],r[2]>>24,r[2]>>16,r[2]>>8,r[2],r[3]>>24,r[3]>>16,r[3]>>8,r[3],r[4]>>24,r[4]>>16,r[4]>>8,r[4])};function Do(t,e,r,n){return Io(80,Fo,t,e,r,n)}Do.DNS=Eo,Do.URL=So;const ko=Do,Lo=function(t,e,r){t??={},r??=0;let n=fo({...t,_v6:!0},new Uint8Array(16));if(n=po(n),e){for(let t=0;t<16;t++)e[r+t]=n[t];return e}return ao(n)};function No(t){const e=(r="string"==typeof t?no(t):t,Uint8Array.of((15&r[3])<<4|r[4]>>4&15,(15&r[4])<<4|(240&r[5])>>4,(15&r[5])<<4|15&r[6],r[7],(15&r[1])<<4|(240&r[2])>>4,(15&r[2])<<4|(240&r[3])>>4,16|(240&r[0])>>4,(15&r[0])<<4|(240&r[1])>>4,r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15]));var r;return"string"==typeof t?ao(e):e}const Ho={};function Po(t,e,r,n,i=0){if(t.length<16)throw new Error("Random bytes length must be >= 16");if(n){if(i<0||i+16>n.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`)}else n=new Uint8Array(16),i=0;return e??=Date.now(),r??=127*t[6]<<24|t[7]<<16|t[8]<<8|t[9],n[i++]=e/1099511627776&255,n[i++]=e/4294967296&255,n[i++]=e/16777216&255,n[i++]=e/65536&255,n[i++]=e/256&255,n[i++]=255&e,n[i++]=112|r>>>28&15,n[i++]=r>>>20&255,n[i++]=128|r>>>14&63,n[i++]=r>>>6&255,n[i++]=r<<2&255|3&t[10],n[i++]=t[11],n[i++]=t[12],n[i++]=t[13],n[i++]=t[14],n[i++]=t[15],n}const Uo=function(t,e,r){let n;if(t)n=Po(t.random??t.rng?.()??ho(),t.msecs,t.seq,e,r);else{const t=Date.now(),i=ho();!function(t,e,r){t.msecs??=-1/0,t.seq??=0,e>t.msecs?(t.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9],t.msecs=e):(t.seq=t.seq+1|0,0===t.seq&&t.msecs++)}(Ho,t,i),n=Po(i,Ho.msecs,Ho.seq,e,r)}return e??ao(n)};function Oo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Oo=function(){return!!t})()}const Qo=function(r){function n(){var t,r,i,a;return e(this,n),r=this,i=u(i=n),(t=o(r,Oo()?Reflect.construct(i,[],u(r).constructor):i.apply(r,a))).name="Generate UUID",t.module="Crypto",t.description="Generates an RFC 9562 (formerly RFC 4122) compliant Universally Unique Identifier (UUID), also known as a Globally Unique Identifier (GUID).

We currently support generating the following UUID versions:
  • v1: Timestamp-based
  • v3: Namespace w/ MD5
  • v4: Random (default)
  • v5: Namespace w/ SHA-1
  • v6: Timestamp, reordered
  • v7: Unix Epoch time-based
UUIDs are generated using the
uuid package.
",t.infoURL="https://wikipedia.org/wiki/Universally_unique_identifier",t.inputType="string",t.outputType="string",t.args=[{name:"Version",hint:"UUID version",type:"option",value:["v1","v3","v4","v5","v6","v7"],defaultIndex:2},{name:"Namespace",hint:"UUID namespace (UUID; valid for v3 and v5)",type:"string",value:"1b671a64-40d5-491e-99b0-da01ff1f3341"}],t}return c(n,r),s(n,[{key:"run",value:function(e,r){var n=ot(r,2),i=n[0],a=n[1];if("function"!=typeof t[i])throw new I("Invalid UUID version");if(!["v3","v5"].includes(i))return t[i]();if("string"!=typeof a||!ee(a))throw new I("Invalid UUID namespace");return t[i](e,a)}}])}(zt);function jo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(jo=function(){return!!t})()}const Ko=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,jo()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="HASSH Client Fingerprint",t.module="Crypto",t.description="Generates a HASSH fingerprint to help identify SSH clients based on hashing together values from the Client Key Exchange Init message.

Input: A hex stream of the SSH_MSG_KEXINIT packet application layer from Client to Server.",t.infoURL="https://engineering.salesforce.com/open-sourcing-hassh-abed3ae5044c",t.inputType="string",t.outputType="string",t.args=[{name:"Input format",type:"option",value:["Hex","Base64","Raw"]},{name:"Output format",type:"option",value:["Hash digest","HASSH algorithms string","Full details"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=ot(e,2),n=r[0],i=r[1];t=P.convertToByteArray(t,n);var a=new ut(new Uint8Array(t)),s=a.readInt(4);if(a.length!==s+4)throw new I("Incorrect packet length.");var o=a.readInt(1);if(20!==a.readInt(1))throw new I("Not a Key Exchange Init.");a.moveForwardsBy(16);var u=a.readInt(4),h=a.readString(u),c=a.readInt(4);a.moveForwardsBy(c);var l=a.readInt(4),f=a.readString(l),p=a.readInt(4);a.moveForwardsBy(p);var d=a.readInt(4),g=a.readString(d),m=a.readInt(4);a.moveForwardsBy(m);var y=a.readInt(4),A=a.readString(y),v=a.readInt(4);a.moveForwardsBy(v);var b=a.readInt(4);a.moveForwardsBy(b);var w=a.readInt(4);a.moveForwardsBy(w),a.moveForwardsBy(1),a.moveForwardsBy(4),a.moveForwardsBy(o);var C=[h,f,g,A].join(";"),E=oi("md5",P.strToArrayBuffer(C));switch(i){case"HASSH algorithms string":return C;case"Full details":return`Hash digest:\n${E}\n\nFull HASSH algorithms string:\n${C}\n\nKey Exchange Algorithms:\n${h}\nEncryption Algorithms Client to Server:\n${f}\nMAC Algorithms Client to Server:\n${g}\nCompression Algorithms Client to Server:\n${A}`;default:return E}}}])}(zt);function Go(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Go=function(){return!!t})()}const Vo=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Go()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="HASSH Server Fingerprint",t.module="Crypto",t.description="Generates a HASSH fingerprint to help identify SSH servers based on hashing together values from the Server Key Exchange Init message.

Input: A hex stream of the SSH_MSG_KEXINIT packet application layer from Server to Client.",t.infoURL="https://engineering.salesforce.com/open-sourcing-hassh-abed3ae5044c",t.inputType="string",t.outputType="string",t.args=[{name:"Input format",type:"option",value:["Hex","Base64","Raw"]},{name:"Output format",type:"option",value:["Hash digest","HASSH algorithms string","Full details"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=ot(e,2),n=r[0],i=r[1];t=P.convertToByteArray(t,n);var a=new ut(new Uint8Array(t)),s=a.readInt(4);if(a.length!==s+4)throw new I("Incorrect packet length.");var o=a.readInt(1);if(20!==a.readInt(1))throw new I("Not a Key Exchange Init.");a.moveForwardsBy(16);var u=a.readInt(4),h=a.readString(u),c=a.readInt(4);a.moveForwardsBy(c);var l=a.readInt(4);a.moveForwardsBy(l);var f=a.readInt(4),p=a.readString(f),d=a.readInt(4);a.moveForwardsBy(d);var g=a.readInt(4),m=a.readString(g),y=a.readInt(4);a.moveForwardsBy(y);var A=a.readInt(4),v=a.readString(A),b=a.readInt(4);a.moveForwardsBy(b);var w=a.readInt(4);a.moveForwardsBy(w),a.moveForwardsBy(1),a.moveForwardsBy(4),a.moveForwardsBy(o);var C=[h,p,m,v].join(";"),E=oi("md5",P.strToArrayBuffer(C));switch(i){case"HASSH algorithms string":return C;case"Full details":return`Hash digest:\n${E}\n\nFull HASSH algorithms string:\n${C}\n\nKey Exchange Algorithms:\n${h}\nEncryption Algorithms Server to Client:\n${p}\nMAC Algorithms Server to Client:\n${m}\nCompression Algorithms Server to Client:\n${v}`;default:return E}}}])}(zt);function qo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(qo=function(){return!!t})()}var Wo=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,qo()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="HMAC",t.module="Crypto",t.description="Keyed-Hash Message Authentication Codes (HMAC) are a mechanism for message authentication using cryptographic hash functions.",t.infoURL="https://wikipedia.org/wiki/HMAC",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Key",type:"toggleString",value:"",toggleValues:["Hex","Decimal","Base64","UTF8","Latin1"]},{name:"Hashing function",type:"option",value:["MD2","MD4","MD5","SHA0","SHA1","SHA224","SHA256","SHA384","SHA512","SHA512/224","SHA512/256","RIPEMD128","RIPEMD160","RIPEMD256","RIPEMD320","HAS160","Whirlpool","Whirlpool-0","Whirlpool-T","Snefru"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=P.convertToByteString(e[0].string||"",e[0].option),n=e[1].toLowerCase(),i=P.arrayBufferToStr(t,!1),a=xn.getHasher(n),s=xn.getHmac(r,a);return s.update(i),xn.encoder.toHex(s.finalize())}}])}(zt);const zo=Wo;function Yo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Yo=function(){return!!t})()}var Jo=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Yo()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="JA3 Fingerprint",t.module="Crypto",t.description="Generates a JA3 fingerprint to help identify TLS clients based on hashing together values from the Client Hello.

Input: A hex stream of the TLS Client Hello packet application layer.",t.infoURL="https://engineering.salesforce.com/tls-fingerprinting-with-ja3-and-ja3s-247362855967",t.inputType="string",t.outputType="string",t.args=[{name:"Input format",type:"option",value:["Hex","Base64","Raw"]},{name:"Output format",type:"option",value:["Hash digest","JA3 string","Full details"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=ot(e,2),n=r[0],i=r[1];t=P.convertToByteArray(t,n);var a=new ut(new Uint8Array(t));if(22!==a.readInt(1))throw new I("Not handshake data.");a.moveForwardsBy(2);var s=a.readInt(2);if(a.length!==s+5)throw new I("Incorrect handshake length.");if(1!==a.readInt(1))throw new I("Not a Client Hello.");var o=a.readInt(3);if(a.length!==o+9)throw new I("Not enough data in Client Hello.");var u=a.readInt(2);a.moveForwardsBy(32);var h=a.readInt(1);a.moveForwardsBy(h);var c=a.readInt(2),l=a.getBytes(c),f=Xo(new ut(l),2),p=a.readInt(1);a.moveForwardsBy(p);for(var d,g=a.readInt(2),m=a.getBytes(g),y=new ut(m),A="",v="",b=[];y.hasMore();){var w=y.readInt(2),C=y.readInt(2);switch(w){case 10:d=y.readInt(2),A=Xo(new ut(y.getBytes(d)),2);break;case 11:d=y.readInt(1),v=Xo(new ut(y.getBytes(d)),1);break;default:y.moveForwardsBy(C)}Zo.includes(w)||b.push(w)}var E=[u.toString(),f,b.join("-"),A,v].join(","),S=oi("md5",P.strToArrayBuffer(E));switch(i){case"JA3 string":return E;case"Full details":return`Hash digest:\n${S}\n\nFull JA3 string:\n${E}\n\nTLS Version:\n${u.toString()}\nCipher Suites:\n${f}\nExtensions:\n${b.join("-")}\nElliptic Curves:\n${A}\nElliptic Curve Point Formats:\n${v}`;default:return S}}}])}(zt);function Xo(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=[];t.hasMore();){var n=t.readInt(e);Zo.includes(n)||r.push(n)}return r.join("-")}var Zo=[2570,6682,10794,14906,19018,23130,27242,31354,35466,39578,43690,47802,51914,56026,60138,64250];const $o=Jo;function tu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(tu=function(){return!!t})()}const eu=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,tu()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="JA3S Fingerprint",t.module="Crypto",t.description="Generates a JA3S fingerprint to help identify TLS servers based on hashing together values from the Server Hello.

Input: A hex stream of the TLS Server Hello record application layer.",t.infoURL="https://engineering.salesforce.com/tls-fingerprinting-with-ja3-and-ja3s-247362855967",t.inputType="string",t.outputType="string",t.args=[{name:"Input format",type:"option",value:["Hex","Base64","Raw"]},{name:"Output format",type:"option",value:["Hash digest","JA3S string","Full details"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=ot(e,2),n=r[0],i=r[1];t=P.convertToByteArray(t,n);var a=new ut(new Uint8Array(t));if(22!==a.readInt(1))throw new I("Not handshake data.");a.moveForwardsBy(2);var s=a.readInt(2);if(a.length!==s+5)throw new I("Incorrect handshake length.");if(2!==a.readInt(1))throw new I("Not a Server Hello.");var o=a.readInt(3);if(a.length!==o+9)throw new I("Not enough data in Server Hello.");var u=a.readInt(2);a.moveForwardsBy(32);var h=a.readInt(1);a.moveForwardsBy(h);var c=a.readInt(2);a.moveForwardsBy(1);for(var l=a.readInt(2),f=a.getBytes(l),p=new ut(f),d=[];p.hasMore();){var g=p.readInt(2),m=p.readInt(2);p.moveForwardsBy(m),d.push(g)}var y=[u.toString(),c,d.join("-")].join(","),A=oi("md5",P.strToArrayBuffer(y));switch(i){case"JA3S string":return y;case"Full details":return`Hash digest:\n${A}\n\nFull JA3S string:\n${y}\n\nTLS Version:\n${u.toString()}\nCipher Suite:\n${c}\nExtensions:\n${d.join("-")}`;default:return A}}}])}(zt);function ru(t){var e=new ut(t),r=e.clone(),n={};if(n.contentType={description:"Content Type",length:1,data:r.getBytes(1),value:e.readInt(1)},22!==n.contentType.value)throw new I("Not handshake data.");if(n.version={description:"Protocol Version",length:2,data:r.getBytes(2),value:e.readInt(2)},n.length={description:"Record Length",length:2,data:r.getBytes(2),value:e.readInt(2)},e.length!==n.length.value+5)throw new I("Incorrect handshake length.");return n.handshake={description:"Handshake",length:n.length.value,data:r.getBytes(n.length.value),value:nu(e.getBytes(n.length.value))},n}function nu(t){var e=new ut(t),r=e.clone(),n={};if(n.handshakeType={description:"Handshake Type",length:1,data:r.getBytes(1),value:e.readInt(1)},n.handshakeLength={description:"Handshake Length",length:3,data:r.getBytes(3),value:e.readInt(3)},e.length!==n.handshakeLength.value+4)throw new I("Not enough data in Handshake message.");switch(n.handshakeType.value){case 1:n.handshakeType.description="Client Hello",function(t,e,r){r.helloVersion={description:"Client Hello Version",length:2,data:e.getBytes(2),value:t.readInt(2)},r.random={description:"Client Random",length:32,data:e.getBytes(32),value:t.getBytes(32)},r.sessionIDLength={description:"Session ID Length",length:1,data:e.getBytes(1),value:t.readInt(1)},r.sessionID={description:"Session ID",length:r.sessionIDLength.value,data:e.getBytes(r.sessionIDLength.value),value:t.getBytes(r.sessionIDLength.value)},r.cipherSuitesLength={description:"Cipher Suites Length",length:2,data:e.getBytes(2),value:t.readInt(2)},r.cipherSuites={description:"Cipher Suites",length:r.cipherSuitesLength.value,data:e.getBytes(r.cipherSuitesLength.value),value:iu(t.getBytes(r.cipherSuitesLength.value))},r.compressionMethodsLength={description:"Compression Methods Length",length:1,data:e.getBytes(1),value:t.readInt(1)},r.compressionMethods={description:"Compression Methods",length:r.compressionMethodsLength.value,data:e.getBytes(r.compressionMethodsLength.value),value:au(t.getBytes(r.compressionMethodsLength.value))},r.extensionsLength={description:"Extensions Length",length:2,data:e.getBytes(2),value:t.readInt(2)},r.extensions={description:"Extensions",length:r.extensionsLength.value,data:e.getBytes(r.extensionsLength.value),value:su(t.getBytes(r.extensionsLength.value))}}(e,r,n);break;case 2:n.handshakeType.description="Server Hello",function(t,e,r){r.helloVersion={description:"Server Hello Version",length:2,data:e.getBytes(2),value:t.readInt(2)},r.random={description:"Server Random",length:32,data:e.getBytes(32),value:t.getBytes(32)},r.sessionIDLength={description:"Session ID Length",length:1,data:e.getBytes(1),value:t.readInt(1)},r.sessionID={description:"Session ID",length:r.sessionIDLength.value,data:e.getBytes(r.sessionIDLength.value),value:t.getBytes(r.sessionIDLength.value)},r.cipherSuite={description:"Selected Cipher Suite",length:2,data:e.getBytes(2),value:uu[t.readInt(2)]||"Unknown"},r.compressionMethod={description:"Selected Compression Method",length:1,data:e.getBytes(1),value:t.readInt(1)},r.extensionsLength={description:"Extensions Length",length:2,data:e.getBytes(2),value:t.readInt(2)},r.extensions={description:"Extensions",length:r.extensionsLength.value,data:e.getBytes(r.extensionsLength.value),value:su(t.getBytes(r.extensionsLength.value))}}(e,r,n);break;default:throw new I("Not a known handshake message.")}return n}function iu(t){for(var e=new ut(t),r=e.clone(),n=[];e.hasMore();)n.push({description:"Cipher Suite",length:2,data:r.getBytes(2),value:uu[e.readInt(2)]||"Unknown"});return n}function au(t){for(var e=new ut(t),r=e.clone(),n=[];e.hasMore();)n.push({description:"Compression Method",length:1,data:r.getBytes(1),value:e.readInt(1)});return n}function su(t){for(var e=new ut(t),r=e.clone(),n=[];e.hasMore();){var i={};i.type={description:"Extension Type",length:2,data:r.getBytes(2),value:ou[e.readInt(2)]||"unknown"},i.length={description:"Extension Length",length:2,data:r.getBytes(2),value:e.readInt(2)},i.value={description:"Extension Value",length:i.length.value,data:r.getBytes(i.length.value),value:e.getBytes(i.length.value)},n.push(i)}return n}var ou={0:"server_name",1:"max_fragment_length",2:"client_certificate_url",3:"trusted_ca_keys",4:"truncated_hmac",5:"status_request",6:"user_mapping",7:"client_authz",8:"server_authz",9:"cert_type",10:"supported_groups",11:"ec_point_formats",12:"srp",13:"signature_algorithms",14:"use_srtp",15:"heartbeat",16:"application_layer_protocol_negotiation",17:"status_request_v2",18:"signed_certificate_timestamp",19:"client_certificate_type",20:"server_certificate_type",21:"padding",22:"encrypt_then_mac",23:"extended_master_secret",24:"token_binding",25:"cached_info",26:"tls_lts",27:"compress_certificate",28:"record_size_limit",29:"pwd_protect",30:"pwd_clear",31:"password_salt",32:"ticket_pinning",33:"tls_cert_with_extern_psk",34:"delegated_credential",35:"session_ticket",36:"TLMSP",37:"TLMSP_proxying",38:"TLMSP_delegate",39:"supported_ekt_ciphers",40:"Reserved",41:"pre_shared_key",42:"early_data",43:"supported_versions",44:"cookie",45:"psk_key_exchange_modes",46:"Reserved",47:"certificate_authorities",48:"oid_filters",49:"post_handshake_auth",50:"signature_algorithms_cert",51:"key_share",52:"transparency_info",53:"connection_id (deprecated)",54:"connection_id",55:"external_id_hash",56:"external_session_id",57:"quic_transport_parameters",58:"ticket_request",59:"dnssec_chain",60:"sequence_number_encryption_algorithms",61:"rrc",2570:"GREASE",6682:"GREASE",10794:"GREASE",14906:"GREASE",17513:"application_settings",19018:"GREASE",23130:"GREASE",27242:"GREASE",31354:"GREASE",35466:"GREASE",39578:"GREASE",43690:"GREASE",47802:"GREASE",51914:"GREASE",56026:"GREASE",60138:"GREASE",64250:"GREASE",64768:"ech_outer_extensions",65037:"encrypted_client_hello",65281:"renegotiation_info"},uu={0:"TLS_NULL_WITH_NULL_NULL",1:"TLS_RSA_WITH_NULL_MD5",2:"TLS_RSA_WITH_NULL_SHA",3:"TLS_RSA_EXPORT_WITH_RC4_40_MD5",4:"TLS_RSA_WITH_RC4_128_MD5",5:"TLS_RSA_WITH_RC4_128_SHA",6:"TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5",7:"TLS_RSA_WITH_IDEA_CBC_SHA",8:"TLS_RSA_EXPORT_WITH_DES40_CBC_SHA",9:"TLS_RSA_WITH_DES_CBC_SHA",10:"TLS_RSA_WITH_3DES_EDE_CBC_SHA",11:"TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA",12:"TLS_DH_DSS_WITH_DES_CBC_SHA",13:"TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA",14:"TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA",15:"TLS_DH_RSA_WITH_DES_CBC_SHA",16:"TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA",17:"TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA",18:"TLS_DHE_DSS_WITH_DES_CBC_SHA",19:"TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA",20:"TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA",21:"TLS_DHE_RSA_WITH_DES_CBC_SHA",22:"TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA",23:"TLS_DH_anon_EXPORT_WITH_RC4_40_MD5",24:"TLS_DH_anon_WITH_RC4_128_MD5",25:"TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA",26:"TLS_DH_anon_WITH_DES_CBC_SHA",27:"TLS_DH_anon_WITH_3DES_EDE_CBC_SHA",30:"TLS_KRB5_WITH_DES_CBC_SHA",31:"TLS_KRB5_WITH_3DES_EDE_CBC_SHA",32:"TLS_KRB5_WITH_RC4_128_SHA",33:"TLS_KRB5_WITH_IDEA_CBC_SHA",34:"TLS_KRB5_WITH_DES_CBC_MD5",35:"TLS_KRB5_WITH_3DES_EDE_CBC_MD5",36:"TLS_KRB5_WITH_RC4_128_MD5",37:"TLS_KRB5_WITH_IDEA_CBC_MD5",38:"TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA",39:"TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA",40:"TLS_KRB5_EXPORT_WITH_RC4_40_SHA",41:"TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5",42:"TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5",43:"TLS_KRB5_EXPORT_WITH_RC4_40_MD5",44:"TLS_PSK_WITH_NULL_SHA",45:"TLS_DHE_PSK_WITH_NULL_SHA",46:"TLS_RSA_PSK_WITH_NULL_SHA",47:"TLS_RSA_WITH_AES_128_CBC_SHA",48:"TLS_DH_DSS_WITH_AES_128_CBC_SHA",49:"TLS_DH_RSA_WITH_AES_128_CBC_SHA",50:"TLS_DHE_DSS_WITH_AES_128_CBC_SHA",51:"TLS_DHE_RSA_WITH_AES_128_CBC_SHA",52:"TLS_DH_anon_WITH_AES_128_CBC_SHA",53:"TLS_RSA_WITH_AES_256_CBC_SHA",54:"TLS_DH_DSS_WITH_AES_256_CBC_SHA",55:"TLS_DH_RSA_WITH_AES_256_CBC_SHA",56:"TLS_DHE_DSS_WITH_AES_256_CBC_SHA",57:"TLS_DHE_RSA_WITH_AES_256_CBC_SHA",58:"TLS_DH_anon_WITH_AES_256_CBC_SHA",59:"TLS_RSA_WITH_NULL_SHA256",60:"TLS_RSA_WITH_AES_128_CBC_SHA256",61:"TLS_RSA_WITH_AES_256_CBC_SHA256",62:"TLS_DH_DSS_WITH_AES_128_CBC_SHA256",63:"TLS_DH_RSA_WITH_AES_128_CBC_SHA256",64:"TLS_DHE_DSS_WITH_AES_128_CBC_SHA256",65:"TLS_RSA_WITH_CAMELLIA_128_CBC_SHA",66:"TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA",67:"TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA",68:"TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA",69:"TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA",70:"TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA",103:"TLS_DHE_RSA_WITH_AES_128_CBC_SHA256",104:"TLS_DH_DSS_WITH_AES_256_CBC_SHA256",105:"TLS_DH_RSA_WITH_AES_256_CBC_SHA256",106:"TLS_DHE_DSS_WITH_AES_256_CBC_SHA256",107:"TLS_DHE_RSA_WITH_AES_256_CBC_SHA256",108:"TLS_DH_anon_WITH_AES_128_CBC_SHA256",109:"TLS_DH_anon_WITH_AES_256_CBC_SHA256",132:"TLS_RSA_WITH_CAMELLIA_256_CBC_SHA",133:"TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA",134:"TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA",135:"TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA",136:"TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA",137:"TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA",138:"TLS_PSK_WITH_RC4_128_SHA",139:"TLS_PSK_WITH_3DES_EDE_CBC_SHA",140:"TLS_PSK_WITH_AES_128_CBC_SHA",141:"TLS_PSK_WITH_AES_256_CBC_SHA",142:"TLS_DHE_PSK_WITH_RC4_128_SHA",143:"TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA",144:"TLS_DHE_PSK_WITH_AES_128_CBC_SHA",145:"TLS_DHE_PSK_WITH_AES_256_CBC_SHA",146:"TLS_RSA_PSK_WITH_RC4_128_SHA",147:"TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA",148:"TLS_RSA_PSK_WITH_AES_128_CBC_SHA",149:"TLS_RSA_PSK_WITH_AES_256_CBC_SHA",150:"TLS_RSA_WITH_SEED_CBC_SHA",151:"TLS_DH_DSS_WITH_SEED_CBC_SHA",152:"TLS_DH_RSA_WITH_SEED_CBC_SHA",153:"TLS_DHE_DSS_WITH_SEED_CBC_SHA",154:"TLS_DHE_RSA_WITH_SEED_CBC_SHA",155:"TLS_DH_anon_WITH_SEED_CBC_SHA",156:"TLS_RSA_WITH_AES_128_GCM_SHA256",157:"TLS_RSA_WITH_AES_256_GCM_SHA384",158:"TLS_DHE_RSA_WITH_AES_128_GCM_SHA256",159:"TLS_DHE_RSA_WITH_AES_256_GCM_SHA384",160:"TLS_DH_RSA_WITH_AES_128_GCM_SHA256",161:"TLS_DH_RSA_WITH_AES_256_GCM_SHA384",162:"TLS_DHE_DSS_WITH_AES_128_GCM_SHA256",163:"TLS_DHE_DSS_WITH_AES_256_GCM_SHA384",164:"TLS_DH_DSS_WITH_AES_128_GCM_SHA256",165:"TLS_DH_DSS_WITH_AES_256_GCM_SHA384",166:"TLS_DH_anon_WITH_AES_128_GCM_SHA256",167:"TLS_DH_anon_WITH_AES_256_GCM_SHA384",168:"TLS_PSK_WITH_AES_128_GCM_SHA256",169:"TLS_PSK_WITH_AES_256_GCM_SHA384",170:"TLS_DHE_PSK_WITH_AES_128_GCM_SHA256",171:"TLS_DHE_PSK_WITH_AES_256_GCM_SHA384",172:"TLS_RSA_PSK_WITH_AES_128_GCM_SHA256",173:"TLS_RSA_PSK_WITH_AES_256_GCM_SHA384",174:"TLS_PSK_WITH_AES_128_CBC_SHA256",175:"TLS_PSK_WITH_AES_256_CBC_SHA384",176:"TLS_PSK_WITH_NULL_SHA256",177:"TLS_PSK_WITH_NULL_SHA384",178:"TLS_DHE_PSK_WITH_AES_128_CBC_SHA256",179:"TLS_DHE_PSK_WITH_AES_256_CBC_SHA384",180:"TLS_DHE_PSK_WITH_NULL_SHA256",181:"TLS_DHE_PSK_WITH_NULL_SHA384",182:"TLS_RSA_PSK_WITH_AES_128_CBC_SHA256",183:"TLS_RSA_PSK_WITH_AES_256_CBC_SHA384",184:"TLS_RSA_PSK_WITH_NULL_SHA256",185:"TLS_RSA_PSK_WITH_NULL_SHA384",186:"TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256",187:"TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256",188:"TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256",189:"TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256",190:"TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256",191:"TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256",192:"TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256",193:"TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256",194:"TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256",195:"TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256",196:"TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256",197:"TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256",198:"TLS_SM4_GCM_SM3",199:"TLS_SM4_CCM_SM3",255:"TLS_EMPTY_RENEGOTIATION_INFO_SCSV",2570:"GREASE",4865:"TLS_AES_128_GCM_SHA256",4866:"TLS_AES_256_GCM_SHA384",4867:"TLS_CHACHA20_POLY1305_SHA256",4868:"TLS_AES_128_CCM_SHA256",4869:"TLS_AES_128_CCM_8_SHA256",4870:"TLS_AEGIS_256_SHA512",4871:"TLS_AEGIS_128L_SHA256",6682:"GREASE",10794:"GREASE",14906:"GREASE",19018:"GREASE",22016:"TLS_FALLBACK_SCSV",23130:"GREASE",27242:"GREASE",31354:"GREASE",35466:"GREASE",39578:"GREASE",43690:"GREASE",47802:"GREASE",49153:"TLS_ECDH_ECDSA_WITH_NULL_SHA",49154:"TLS_ECDH_ECDSA_WITH_RC4_128_SHA",49155:"TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA",49156:"TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA",49157:"TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA",49158:"TLS_ECDHE_ECDSA_WITH_NULL_SHA",49159:"TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",49160:"TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA",49161:"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",49162:"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA",49163:"TLS_ECDH_RSA_WITH_NULL_SHA",49164:"TLS_ECDH_RSA_WITH_RC4_128_SHA",49165:"TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA",49166:"TLS_ECDH_RSA_WITH_AES_128_CBC_SHA",49167:"TLS_ECDH_RSA_WITH_AES_256_CBC_SHA",49168:"TLS_ECDHE_RSA_WITH_NULL_SHA",49169:"TLS_ECDHE_RSA_WITH_RC4_128_SHA",49170:"TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA",49171:"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",49172:"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",49173:"TLS_ECDH_anon_WITH_NULL_SHA",49174:"TLS_ECDH_anon_WITH_RC4_128_SHA",49175:"TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA",49176:"TLS_ECDH_anon_WITH_AES_128_CBC_SHA",49177:"TLS_ECDH_anon_WITH_AES_256_CBC_SHA",49178:"TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA",49179:"TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA",49180:"TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA",49181:"TLS_SRP_SHA_WITH_AES_128_CBC_SHA",49182:"TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA",49183:"TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA",49184:"TLS_SRP_SHA_WITH_AES_256_CBC_SHA",49185:"TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA",49186:"TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA",49187:"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",49188:"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384",49189:"TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256",49190:"TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384",49191:"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",49192:"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384",49193:"TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256",49194:"TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384",49195:"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",49196:"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",49197:"TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256",49198:"TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384",49199:"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",49200:"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",49201:"TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256",49202:"TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384",49203:"TLS_ECDHE_PSK_WITH_RC4_128_SHA",49204:"TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA",49205:"TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA",49206:"TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA",49207:"TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256",49208:"TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384",49209:"TLS_ECDHE_PSK_WITH_NULL_SHA",49210:"TLS_ECDHE_PSK_WITH_NULL_SHA256",49211:"TLS_ECDHE_PSK_WITH_NULL_SHA384",49212:"TLS_RSA_WITH_ARIA_128_CBC_SHA256",49213:"TLS_RSA_WITH_ARIA_256_CBC_SHA384",49214:"TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256",49215:"TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384",49216:"TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256",49217:"TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384",49218:"TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256",49219:"TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384",49220:"TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256",49221:"TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384",49222:"TLS_DH_anon_WITH_ARIA_128_CBC_SHA256",49223:"TLS_DH_anon_WITH_ARIA_256_CBC_SHA384",49224:"TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256",49225:"TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384",49226:"TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256",49227:"TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384",49228:"TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256",49229:"TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384",49230:"TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256",49231:"TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384",49232:"TLS_RSA_WITH_ARIA_128_GCM_SHA256",49233:"TLS_RSA_WITH_ARIA_256_GCM_SHA384",49234:"TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256",49235:"TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384",49236:"TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256",49237:"TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384",49238:"TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256",49239:"TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384",49240:"TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256",49241:"TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384",49242:"TLS_DH_anon_WITH_ARIA_128_GCM_SHA256",49243:"TLS_DH_anon_WITH_ARIA_256_GCM_SHA384",49244:"TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256",49245:"TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384",49246:"TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256",49247:"TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384",49248:"TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256",49249:"TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384",49250:"TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256",49251:"TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384",49252:"TLS_PSK_WITH_ARIA_128_CBC_SHA256",49253:"TLS_PSK_WITH_ARIA_256_CBC_SHA384",49254:"TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256",49255:"TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384",49256:"TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256",49257:"TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384",49258:"TLS_PSK_WITH_ARIA_128_GCM_SHA256",49259:"TLS_PSK_WITH_ARIA_256_GCM_SHA384",49260:"TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256",49261:"TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384",49262:"TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256",49263:"TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384",49264:"TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256",49265:"TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384",49266:"TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256",49267:"TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384",49268:"TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256",49269:"TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384",49270:"TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256",49271:"TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384",49272:"TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256",49273:"TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384",49274:"TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256",49275:"TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384",49276:"TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256",49277:"TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384",49278:"TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256",49279:"TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384",49280:"TLS_DHE_DSS_WITH_CAMELLIA_128_GCM_SHA256",49281:"TLS_DHE_DSS_WITH_CAMELLIA_256_GCM_SHA384",49282:"TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256",49283:"TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384",49284:"TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256",49285:"TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384",49286:"TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256",49287:"TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384",49288:"TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256",49289:"TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384",49290:"TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256",49291:"TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384",49292:"TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256",49293:"TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384",49294:"TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256",49295:"TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384",49296:"TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256",49297:"TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384",49298:"TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256",49299:"TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384",49300:"TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256",49301:"TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384",49302:"TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256",49303:"TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384",49304:"TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256",49305:"TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384",49306:"TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256",49307:"TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384",49308:"TLS_RSA_WITH_AES_128_CCM",49309:"TLS_RSA_WITH_AES_256_CCM",49310:"TLS_DHE_RSA_WITH_AES_128_CCM",49311:"TLS_DHE_RSA_WITH_AES_256_CCM",49312:"TLS_RSA_WITH_AES_128_CCM_8",49313:"TLS_RSA_WITH_AES_256_CCM_8",49314:"TLS_DHE_RSA_WITH_AES_128_CCM_8",49315:"TLS_DHE_RSA_WITH_AES_256_CCM_8",49316:"TLS_PSK_WITH_AES_128_CCM",49317:"TLS_PSK_WITH_AES_256_CCM",49318:"TLS_DHE_PSK_WITH_AES_128_CCM",49319:"TLS_DHE_PSK_WITH_AES_256_CCM",49320:"TLS_PSK_WITH_AES_128_CCM_8",49321:"TLS_PSK_WITH_AES_256_CCM_8",49322:"TLS_PSK_DHE_WITH_AES_128_CCM_8",49323:"TLS_PSK_DHE_WITH_AES_256_CCM_8",49324:"TLS_ECDHE_ECDSA_WITH_AES_128_CCM",49325:"TLS_ECDHE_ECDSA_WITH_AES_256_CCM",49326:"TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8",49327:"TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8",49328:"TLS_ECCPWD_WITH_AES_128_GCM_SHA256",49329:"TLS_ECCPWD_WITH_AES_256_GCM_SHA384",49330:"TLS_ECCPWD_WITH_AES_128_CCM_SHA256",49331:"TLS_ECCPWD_WITH_AES_256_CCM_SHA384",49332:"TLS_SHA256_SHA256",49333:"TLS_SHA384_SHA384",49408:"TLS_GOSTR341112_256_WITH_KUZNYECHIK_CTR_OMAC",49409:"TLS_GOSTR341112_256_WITH_MAGMA_CTR_OMAC",49410:"TLS_GOSTR341112_256_WITH_28147_CNT_IMIT",49411:"TLS_GOSTR341112_256_WITH_KUZNYECHIK_MGM_L",49412:"TLS_GOSTR341112_256_WITH_MAGMA_MGM_L",49413:"TLS_GOSTR341112_256_WITH_KUZNYECHIK_MGM_S",49414:"TLS_GOSTR341112_256_WITH_MAGMA_MGM_S",51914:"GREASE",52392:"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",52393:"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",52394:"TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256",52395:"TLS_PSK_WITH_CHACHA20_POLY1305_SHA256",52396:"TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256",52397:"TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256",52398:"TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256",53249:"TLS_ECDHE_PSK_WITH_AES_128_GCM_SHA256",53250:"TLS_ECDHE_PSK_WITH_AES_256_GCM_SHA384",53251:"TLS_ECDHE_PSK_WITH_AES_128_CCM_8_SHA256",53253:"TLS_ECDHE_PSK_WITH_AES_128_CCM_SHA256",56026:"GREASE",60138:"GREASE",64250:"GREASE"},hu=[2570,6682,10794,14906,19018,23130,27242,31354,35466,39578,43690,47802,51914,56026,60138,64250];function cu(t){var e=new ut(t);if(2===e.length)return e.readInt(2);for(var r=e.readInt(1),n=0;e.hasMore()&&r-- >0;){var i=e.readInt(2);hu.includes(i)||i>n&&(n=i)}return n}function lu(t){var e=new ut(t);if(e.readInt(2)<2)return null;var r=e.readInt(1);return r<1?null:e.getBytes(r)}function fu(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return pu(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pu(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw a}}}}function pu(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122}function mu(t){if(!t||0===t.length)return"00";var e=t[0],r=t[t.length-1];if(gu(e)&&gu(r))return String.fromCharCode(e)+String.fromCharCode(r);var n=e.toString(16).padStart(2,"0"),i=r.toString(16).padStart(2,"0");return n[0]+i[1]}function yu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(yu=function(){return!!t})()}const Au=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,yu()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="JA4 Fingerprint",t.module="Crypto",t.description="Generates a JA4 fingerprint to help identify TLS clients based on hashing together values from the Client Hello.

Input: A hex stream of the TLS or QUIC Client Hello packet application layer.",t.infoURL="https://medium.com/foxio/ja4-network-fingerprinting-9376fe9ca637",t.inputType="string",t.outputType="string",t.args=[{name:"Input format",type:"option",value:["Hex","Base64","Raw"]},{name:"Output format",type:"option",value:["JA4","JA4 Original Rendering","JA4 Raw","JA4 Raw Original Rendering","All"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=ot(e,2),n=r[0],i=r[1];t=P.convertToByteArray(t,n);var a=function(t){var e={};try{if(1!==(e=ru(t)).handshake.value.handshakeType.value)throw new Error}catch(t){throw new I("Data is not a valid TLS Client Hello. QUIC is not yet supported.\n"+t)}var r,n="t",i=e.handshake.value.helloVersion.value,a=fu(e.handshake.value.extensions.value);try{for(a.s();!(r=a.n()).done;){var s=r.value;if("supported_versions"===s.type.value){i=cu(s.value.data);break}}}catch(t){a.e(t)}finally{a.f()}i=du(i);var o,u="i",h=fu(e.handshake.value.extensions.value);try{for(h.s();!(o=h.n()).done;)if("server_name"===o.value.type.value){u="d";break}}catch(t){h.e(t)}finally{h.f()}var c,l=0,f=fu(e.handshake.value.cipherSuites.value);try{for(f.s();!(c=f.n()).done;)"GREASE"!==c.value.value&&l++}catch(t){f.e(t)}finally{f.f()}l=l>99?"99":l.toString().padStart(2,"0");var p,d=0,g=fu(e.handshake.value.extensions.value);try{for(g.s();!(p=g.n()).done;)"GREASE"!==p.value.type.value&&d++}catch(t){g.e(t)}finally{g.f()}d=d>99?"99":d.toString().padStart(2,"0");var m,y="00",A=fu(e.handshake.value.extensions.value);try{for(A.s();!(m=A.n()).done;){var v=m.value;if("application_layer_protocol_negotiation"===v.type.value){y=mu(lu(v.value.data));break}}}catch(t){A.e(t)}finally{A.f()}var b,w=[],C=fu(e.handshake.value.cipherSuites.value);try{for(C.s();!(b=C.n()).done;){var E=b.value;"GREASE"!==E.value&&w.push(M(E.data))}}catch(t){C.e(t)}finally{C.f()}var S,B=[].concat(w).sort().join(","),_=w.join(","),x=oi("sha256",P.strToArrayBuffer(B)).substring(0,12),T=oi("sha256",P.strToArrayBuffer(_)).substring(0,12),R=[],F="",D=fu(e.handshake.value.extensions.value);try{for(D.s();!(S=D.n()).done;){var k=S.value;"GREASE"!==k.type.value&&R.push(M(k.type.data)),"signature_algorithms"===k.type.value&&(F=(F=(F=M(k.value.data.slice(2))).replace(/(.{4})/g,"$1,")).substring(0,F.length-1))}}catch(t){D.e(t)}finally{D.f()}var L=[].concat(R).filter(function(t){return"0000"!==t&&"0010"!==t}).sort().join(",")+"_"+F,N=R.join(",")+"_"+F;return{JA4:`${n}${i}${u}${l}${d}${y}_${x}_${oi("sha256",P.strToArrayBuffer(L)).substring(0,12)}`,JA4_o:`${n}${i}${u}${l}${d}${y}_${T}_${oi("sha256",P.strToArrayBuffer(N)).substring(0,12)}`,JA4_r:`${n}${i}${u}${l}${d}${y}_${B}_${L}`,JA4_ro:`${n}${i}${u}${l}${d}${y}_${_}_${N}`}}(new Uint8Array(t));switch(i){case"JA4":return a.JA4;case"JA4 Original Rendering":return a.JA4_o;case"JA4 Raw":return a.JA4_r;case"JA4 Raw Original Rendering":return a.JA4_ro;default:return`JA4: ${a.JA4}\nJA4_o: ${a.JA4_o}\nJA4_r: ${a.JA4_r}\nJA4_ro: ${a.JA4_ro}`}}}])}(zt);function vu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(vu=function(){return!!t})()}const bu=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,vu()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="JA4Server Fingerprint",t.module="Crypto",t.description="Generates a JA4Server Fingerprint (JA4S) to help identify TLS servers or sessions based on hashing together values from the Server Hello.

Input: A hex stream of the TLS or QUIC Server Hello packet application layer.",t.infoURL="https://medium.com/foxio/ja4-network-fingerprinting-9376fe9ca637",t.inputType="string",t.outputType="string",t.args=[{name:"Input format",type:"option",value:["Hex","Base64","Raw"]},{name:"Output format",type:"option",value:["JA4S","JA4S Raw","Both"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=ot(e,2),n=r[0],i=r[1];t=P.convertToByteArray(t,n);var a=function(t){var e={};try{if(2!==(e=ru(t)).handshake.value.handshakeType.value)throw new Error}catch(t){throw new I("Data is not a valid TLS Server Hello. QUIC is not yet supported.\n"+t)}var r,n=e.handshake.value.helloVersion.value,i=fu(e.handshake.value.extensions.value);try{for(i.s();!(r=i.n()).done;){var a=r.value;if("supported_versions"===a.type.value){n=cu(a.value.data);break}}}catch(t){i.e(t)}finally{i.f()}n=du(n);var s=e.handshake.value.extensions.value.length;s=s>99?"99":s.toString().padStart(2,"0");var o,u="00",h=fu(e.handshake.value.extensions.value);try{for(h.s();!(o=h.n()).done;){var c=o.value;if("application_layer_protocol_negotiation"===c.type.value){u=mu(lu(c.value.data));break}}}catch(t){h.e(t)}finally{h.f()}var l,f=M(e.handshake.value.cipherSuite.data),p=[],d=fu(e.handshake.value.extensions.value);try{for(d.s();!(l=d.n()).done;){var g=l.value;p.push(M(g.type.data))}}catch(t){d.e(t)}finally{d.f()}var m=p.join(",");return{JA4S:`t${n}${s}${u}_${f}_${oi("sha256",P.strToArrayBuffer(m)).substring(0,12)}`,JA4S_r:`t${n}${s}${u}_${f}_${m}`}}(new Uint8Array(t));switch(i){case"JA4S":return a.JA4S;case"JA4S Raw":return a.JA4S_r;default:return`JA4S: ${a.JA4S}\nJA4S_r: ${a.JA4S_r}`}}}])}(zt);var wu=r(44040),Cu=r.n(wu);function Eu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Eu=function(){return!!t})()}const Su=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Eu()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="JWT Decode",t.module="Crypto",t.description="Decodes a JSON Web Token without checking whether the provided secret / private key is valid. Use 'JWT Verify' to check if the signature is valid as well.",t.infoURL="https://wikipedia.org/wiki/JSON_Web_Token",t.inputType="string",t.outputType="JSON",t.args=[],t.checks=[{pattern:"^ey([A-Za-z0-9_-]+)\\.ey([A-Za-z0-9_-]+)\\.([A-Za-z0-9_-]+)$",flags:"",args:[]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){try{return Cu().decode(t,{json:!0,complete:!0}).payload}catch(t){throw new I(t)}}}])}(zt);var Iu=["HS256","HS384","HS512","RS256","RS384","RS512","ES256","ES384","ES512","None"];function Bu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Bu=function(){return!!t})()}const _u=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Bu()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="JWT Sign",t.module="Crypto",t.description="Signs a JSON object as a JSON Web Token using a provided secret / private key.

The key should be either the secret for HMAC algorithms or the PEM-encoded private key for RSA and ECDSA.",t.infoURL="https://wikipedia.org/wiki/JSON_Web_Token",t.inputType="JSON",t.outputType="string",t.args=[{name:"Private/Secret Key",type:"text",value:"secret"},{name:"Signing algorithm",type:"option",value:Iu},{name:"Header",type:"text",value:"{}"}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=ot(e,3),n=r[0],i=r[1],a=r[2];try{return Cu().sign(t,n,{algorithm:"None"===i?"none":i,header:JSON.parse(a||"{}")})}catch(t){throw new I(`Error: Have you entered the key correctly? The key should be either the secret for HMAC algorithms or the PEM-encoded private key for RSA and ECDSA.\n\n${t}`)}}}])}(zt);function Mu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Mu=function(){return!!t})()}const xu=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Mu()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="JWT Verify",t.module="Crypto",t.description="Verifies that a JSON Web Token is valid and has been signed with the provided secret / private key.

The key should be either the secret for HMAC algorithms or the PEM-encoded public key for RSA and ECDSA.",t.infoURL="https://wikipedia.org/wiki/JSON_Web_Token",t.inputType="string",t.outputType="JSON",t.args=[{name:"Public/Secret Key",type:"text",value:"secret"}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=ot(e,1)[0],n=Iu;n[n.indexOf("None")]="none";try{var i=Cu().verify(t,r,{algorithms:n});if(Object.prototype.hasOwnProperty.call(i,"name")&&"JsonWebTokenError"===i.name)throw new I(i.message);return i}catch(t){throw new I(t)}}}])}(zt);function Tu(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return Ru(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ru(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw a}}}}function Ru(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r1)throw new I("Letter duplicated in the key")}}catch(t){i.e(t)}finally{i.f()}}function Ou(t,e){var r=t.indexOf(e);if(r>=0&&r<49)return[Math.floor(r/7),r%7];throw new I("Letter "+e+" is not in the key")}function Qu(t,e){return t.charAt(e[1]+7*e[0])}function ju(t,e){return[(t[0]+e[0])%7,(t[1]+e[1])%7]}function Ku(t,e){var r=t[0]-e[0],n=t[1]-e[1];return[r-7*Math.floor(r/7),n-7*Math.floor(n/7)]}function Gu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Gu=function(){return!!t})()}const Vu=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,Gu()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="LS47 Decrypt",t.module="Crypto",t.description="This is a slight improvement of the ElsieFour cipher as described by Alan Kaminsky. We use 7x7 characters instead of original (barely fitting) 6x6, to be able to encrypt some structured information. We also describe a simple key-expansion algorithm, because remembering passwords is popular. Similar security considerations as with ElsieFour hold.
The LS47 alphabet consists of following characters: _abcdefghijklmnopqrstuvwxyz.0123456789,-+*/:?!'()
An LS47 key is a permutation of the alphabet that is then represented in a 7x7 grid used for the encryption or decryption.",t.infoURL="https://github.com/exaexa/ls47",t.inputType="string",t.outputType="string",t.args=[{name:"Password",type:"string",value:""},{name:"Padding",type:"number",value:10}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){return this.paddingSize=parseInt(e[1],10),ku(),r=Pu(e[0]),n=t,i=this.paddingSize,ku(),Uu(r),function(t,e){Uu(t);var r,n=[0,0],i="",a=Tu(e);try{for(a.s();!(r=a.n()).done;){var s=r.value,o=Ou(t,s),u=Ku(o,Hu(Qu(t,n)));i+=Qu(t,u),t=Lu(t=Nu(t,u[0],1),(o=Ou(t,s))[1],1),n=ju(n,Hu(s))}}catch(t){a.e(t)}finally{a.f()}return i}(r,n).slice(i);var r,n,i}}])}(zt);function qu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(qu=function(){return!!t})()}const Wu=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,qu()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="LS47 Encrypt",t.module="Crypto",t.description="This is a slight improvement of the ElsieFour cipher as described by Alan Kaminsky. We use 7x7 characters instead of original (barely fitting) 6x6, to be able to encrypt some structured information. We also describe a simple key-expansion algorithm, because remembering passwords is popular. Similar security considerations as with ElsieFour hold.
The LS47 alphabet consists of following characters: _abcdefghijklmnopqrstuvwxyz.0123456789,-+*/:?!'()
A LS47 key is a permutation of the alphabet that is then represented in a 7x7 grid used for the encryption or decryption.",t.infoURL="https://github.com/exaexa/ls47",t.inputType="string",t.outputType="string",t.args=[{name:"Password",type:"string",value:""},{name:"Padding",type:"number",value:10},{name:"Signature",type:"string",value:""}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){return this.paddingSize=parseInt(e[1],10),ku(),function(t,e,r,n){ku(),Uu(t);for(var i="",a=0;a
Enter the password in the input to generate its hash.",t.infoURL="https://wikipedia.org/wiki/Scrypt",t.inputType="string",t.outputType="string",t.args=[{name:"Salt",type:"toggleString",value:"",toggleValues:["Hex","Base64","UTF8","Latin1"]},{name:"Iterations (N)",type:"number",value:16384},{name:"Memory factor (r)",type:"number",value:8},{name:"Parallelization factor (p)",type:"number",value:1},{name:"Key length",type:"number",value:64}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){var r=hh.from(P.convertToByteArray(e[0].string||"",e[0].option)),n=e[1],i=e[2],a=e[3],s=e[4];try{return uh()(t,r,n,i,a,s,function(t){H()&&self.sendStatusMessage(`Progress: ${t.percent.toFixed(0)}%`)}).toString("hex")}catch(t){throw new I("Error: "+t.toString())}}}])}(zt);function fh(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(fh=function(){return!!t})()}var ph=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,fh()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Snefru",t.module="Crypto",t.description="Snefru is a cryptographic hash function invented by Ralph Merkle in 1990 while working at Xerox PARC. The function supports 128-bit and 256-bit output. It was named after the Egyptian Pharaoh Sneferu, continuing the tradition of the Khufu and Khafre block ciphers.

The original design of Snefru was shown to be insecure by Eli Biham and Adi Shamir who were able to use differential cryptanalysis to find hash collisions. The design was then modified by increasing the number of iterations of the main pass of the algorithm from two to eight.",t.infoURL="https://wikipedia.org/wiki/Snefru",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Size",type:"number",value:128,min:32,max:480,step:32},{name:"Rounds",type:"option",value:["8","4","2"]}],t}return c(r,t),s(r,[{key:"run",value:function(t,e){return oi("snefru",t,{length:e[0],rounds:e[1]})}}])}(zt);const dh=ph;function gh(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(gh=function(){return!!t})()}var mh=function(t){function r(){var t,n,i,a;return e(this,r),n=this,i=u(i=r),(t=o(n,gh()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="TCP/IP Checksum",t.module="Crypto",t.description="Calculates the checksum for a TCP (Transport Control Protocol) or IP (Internet Protocol) header from an input of raw bytes.",t.infoURL="https://wikipedia.org/wiki/IPv4_header_checksum",t.inputType="ArrayBuffer",t.outputType="string",t.args=[],t}return c(r,t),s(r,[{key:"run",value:function(t,e){t=new Uint8Array(t);for(var r=0,n=0;n>16)+(65535&r),P.hex(65535-r)}}])}(zt);const yh=mh;function Ah(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==r.return||r.return()}finally{if(o)throw a}}}}(P.chunked(t,r));try{for(a.s();!(i=a.n()).done;)for(var s=i.value,o=0;o1&&void 0!==arguments[1]?arguments[1]:" ",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!t)return"";t instanceof ArrayBuffer&&(t=new Uint8Array(t));for(var a="",s="0x"===e||"\\x"===e||"%"===e,o=0;o