Protein Alphabet

/** * Skipped minification because the original files appears to be already minified. * Original file: /npm/molstar@4.18.0/build/viewer/molstar.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ /*! For license information please see molstar.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.molstar=t():e.molstar=t()}(self,(()=>(()=>{var e={20:(e,t,A)=>{"use strict";var n=A(8223).Buffer,r=A(7108),i=A(6737),o=A(6698),a=A(5359),s=A(4847),c=A(2951);function l(e){i.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=r(t.hash),this._tag=t.id,this._signType=t.sign}function u(e){i.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=r(t.hash),this._tag=t.id,this._signType=t.sign}function g(e){return new l(e)}function d(e){return new u(e)}Object.keys(c).forEach((function(e){c[e].id=n.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),o(l,i.Writable),l.prototype._write=function(e,t,A){this._hash.update(e),A()},l.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},l.prototype.sign=function(e,t){this.end();var A=this._hash.digest(),n=a(A,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},o(u,i.Writable),u.prototype._write=function(e,t,A){this._hash.update(e),A()},u.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},u.prototype.verify=function(e,t,A){var r="string"==typeof t?n.from(t,A):t;this.end();var i=this._hash.digest();return s(r,i,e,this._signType,this._tag)},e.exports={Sign:g,Verify:d,createSign:g,createVerify:d}},82:(e,t,A)=>{var n=A(6698),r=A(1541).Buffer,i=A(7568),o=i.base,a=i.constants.der;function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.Node.call(this,"der",e)}function l(e){return e<10?"0"+e:e}e.exports=s,s.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(c,o.Node),c.prototype._encodeComposite=function(e,t,A,n){var i,o=function(e,t,A,n){var r;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))r=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);r=e}return r>=31?n.error("Multi-octet tag encoding unsupported"):(t||(r|=32),r|=a.tagClassByName[A||"universal"]<<6)}(e,t,A,this.reporter);if(n.length<128)return(i=new r(2))[0]=o,i[1]=n.length,this._createEncoderBuffer([i,n]);for(var s=1,c=n.length;c>=256;c>>=8)s++;(i=new r(2+s))[0]=o,i[1]=128|s,c=1+s;for(var l=n.length;l>0;c--,l>>=8)i[c]=255&l;return this._createEncoderBuffer([i,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var A=new r(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var i=0;for(n=0;n=128;o>>=7)i++}var a=new r(i),s=a.length-1;for(n=e.length-1;n>=0;n--)for(o=e[n],a[s--]=127&o;(o>>=7)>0;)a[s--]=128|127&o;return this._createEncoderBuffer(a)},c.prototype._encodeTime=function(e,t){var A,n=new Date(e);return"gentime"===t?A=[l(n.getFullYear()),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?A=[l(n.getFullYear()%100),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(A,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!r.isBuffer(e)){var A=e.toArray();!e.sign&&128&A[0]&&A.unshift(0),e=new r(A)}if(r.isBuffer(e)){var n=e.length;0===e.length&&n++;var i=new r(n);return e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var o=e;o>=256;o>>=8)n++;for(o=(i=new Array(n)).length-1;o>=0;o--)i[o]=255&e,e>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(new r(i))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,A){var n,r=this._baseState;if(null===r.default)return!1;var i=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,A).join()),i.length!==r.defaultBuffer.length)return!1;for(n=0;n{var n=A(4050),r=A(1241),i=A(530),o=A(2438),a=A(8078);function s(e,t,A){if(e=e.toLowerCase(),i[e])return r.createCipheriv(e,t,A);if(o[e])return new n({key:t,iv:A,mode:e});throw new TypeError("invalid suite type")}function c(e,t,A){if(e=e.toLowerCase(),i[e])return r.createDecipheriv(e,t,A);if(o[e])return new n({key:t,iv:A,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var A,n;if(e=e.toLowerCase(),i[e])A=i[e].key,n=i[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");A=8*o[e].key,n=o[e].iv}var r=a(t,!1,A,n);return s(e,r.key,r.iv)},t.createCipheriv=t.Cipheriv=s,t.createDecipher=t.Decipher=function(e,t){var A,n;if(e=e.toLowerCase(),i[e])A=i[e].key,n=i[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");A=8*o[e].key,n=o[e].iv}var r=a(t,!1,A,n);return c(e,r.key,r.iv)},t.createDecipheriv=t.Decipheriv=c,t.listCiphers=t.getCiphers=function(){return Object.keys(o).concat(r.getCiphers())}},206:(e,t,A)=>{"use strict";var n=A(3225);e.exports=p;var r,i=A(2240);p.ReadableState=Q,A(7007).EventEmitter;var o=function(e,t){return e.listeners(t).length},a=A(5567),s=A(4116).Buffer,c=(void 0!==A.g?A.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=Object.create(A(5622));l.inherits=A(6698);var u=A(2668),g=void 0;g=u&&u.debuglog?u.debuglog("stream"):function(){};var d,B=A(672),h=A(6278);l.inherits(p,a);var I=["error","close","destroy","pause","resume"];function Q(e,t){e=e||{};var n=t instanceof(r=r||A(6248));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new B,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=A(6427).I),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function p(e){if(r=r||A(6248),!(this instanceof p))return new p(e);this._readableState=new Q(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function f(e,t,A,n,r){var i,o=e._readableState;return null===t?(o.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var A=t.decoder.end();A&&A.length&&(t.buffer.push(A),t.length+=t.objectMode?1:A.length)}t.ended=!0,y(e)}}(e,o)):(r||(i=function(e,t){var A,n;return n=t,s.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(A=new TypeError("Invalid non-string/buffer chunk")),A}(o,t)),i?e.emit("error",i):o.objectMode||t&&t.length>0?("string"==typeof t||o.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!A?(t=o.decoder.write(t),o.objectMode||0!==t.length?E(e,o,t,!1):b(e,o)):E(e,o,t,!1))):n||(o.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=m?e=m:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function y(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?n.nextTick(v,e):v(e))}function v(e){g("emit readable"),e.emit("readable"),F(e)}function b(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(w,e,t))}function w(e,t){for(var A=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(A=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):A=function(e,t,A){var n;return ei.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0===(e-=o)){o===i.length?(++n,A.next?t.head=A.next:t.head=t.tail=null):(t.head=A,A.data=i.slice(o));break}++n}return t.length-=n,r}(e,t):function(e,t){var A=s.allocUnsafe(e),n=t.head,r=1;for(n.data.copy(A),e-=n.data.length;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(A,A.length-e,0,o),0===(e-=o)){o===i.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=i.slice(o));break}++r}return t.length-=r,A}(e,t),n}(e,t.buffer,t.decoder),A);var A}function U(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,n.nextTick(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function R(e,t){for(var A=0,n=e.length;A=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?U(this):y(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&U(this),null;var n,r=t.needReadable;return g("need readable",r),(0===t.length||t.length-e0?x(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),A!==e&&t.ended&&U(this)),null!==n&&this.emit("data",n),n},p.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},p.prototype.pipe=function(e,t){var A=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,g("pipe count=%d opts=%j",r.pipesCount,t);var a=t&&!1===t.end||e===process.stdout||e===process.stderr?Q:s;function s(){g("onend"),e.end()}r.endEmitted?n.nextTick(a):A.once("end",a),e.on("unpipe",(function t(n,i){g("onunpipe"),n===A&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,g("cleanup"),e.removeListener("close",h),e.removeListener("finish",I),e.removeListener("drain",c),e.removeListener("error",B),e.removeListener("unpipe",t),A.removeListener("end",s),A.removeListener("end",Q),A.removeListener("data",d),l=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var c=function(e){return function(){var t=e._readableState;g("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,F(e))}}(A);e.on("drain",c);var l=!1,u=!1;function d(t){g("ondata"),u=!1,!1!==e.write(t)||u||((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==R(r.pipes,e))&&!l&&(g("false write response, pause",r.awaitDrain),r.awaitDrain++,u=!0),A.pause())}function B(t){g("onerror",t),Q(),e.removeListener("error",B),0===o(e,"error")&&e.emit("error",t)}function h(){e.removeListener("finish",I),Q()}function I(){g("onfinish"),e.removeListener("close",h),Q()}function Q(){g("unpipe"),A.unpipe(e)}return A.on("data",d),function(e,t,A){if("function"==typeof e.prependListener)return e.prependListener(t,A);e._events&&e._events[t]?i(e._events[t])?e._events[t].unshift(A):e._events[t]=[A,e._events[t]]:e.on(t,A)}(e,"error",B),e.once("close",h),e.once("finish",I),e.emit("pipe",A),r.flowing||(g("pipe resume"),A.resume()),e},p.prototype.unpipe=function(e){var t=this._readableState,A={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,A)),this;if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i{"use strict";var n=A(8490),r=A(7011),i=r.assert,o=r.cachedProperty,a=r.parseBytes;function s(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(i(t.length===2*e.encodingLength,"Signature has invalid size"),t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),i(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(s,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),o(s,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),o(s,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),o(s,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return r.encode(this.toBytes(),"hex").toUpperCase()},e.exports=s},295:e=>{e.exports=function(e,t){for(var A=Math.min(e.length,t.length),n=new Buffer(A),r=0;r{var n=A(8276);e.exports=function(e){return(new n).update(e).digest()}},345:(e,t,A)=>{e.exports=A(7007).EventEmitter},370:(e,t,A)=>{"use strict";var n=A(8490),r=A(6698),i=A(6677),o=A(7011);function a(e){i.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.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 s(e,t,A){i.BasePoint.call(this,e,"projective"),null===t&&null===A?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(A,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}r(a,i),e.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,A=t.redSqr(),n=A.redMul(t).redAdd(A.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},r(s,i.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(o.toArray(e,t),1)},a.prototype.point=function(e,t){return new s(this,e,t)},a.prototype.pointFromJSON=function(e){return s.fromJSON(this,e)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(e,t){return new s(e,t[0],t[1]||e.one)},s.prototype.inspect=function(){return this.isInfinity()?"":""},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},s.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),A=e.redSub(t),n=e.redMul(t),r=A.redMul(t.redAdd(this.curve.a24.redMul(A)));return this.curve.point(n,r)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(e,t){var A=this.x.redAdd(this.z),n=this.x.redSub(this.z),r=e.x.redAdd(e.z),i=e.x.redSub(e.z).redMul(A),o=r.redMul(n),a=t.z.redMul(i.redAdd(o).redSqr()),s=t.x.redMul(i.redISub(o).redSqr());return this.curve.point(a,s)},s.prototype.mul=function(e){for(var t=e.clone(),A=this,n=this.curve.point(null,null),r=[];0!==t.cmpn(0);t.iushrn(1))r.push(t.andln(1));for(var i=r.length-1;i>=0;i--)0===r[i]?(A=A.diffAdd(n,this),n=n.dbl()):(n=A.diffAdd(n,this),A=A.dbl());return n},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},373:()=>{},392:(e,t,A)=>{var n=A(2861).Buffer;function r(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}r.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var A=this._block,r=this._blockSize,i=e.length,o=this._len,a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var A=8*this._len;if(A<=4294967295)this._block.writeUInt32BE(A,this._blockSize-4);else{var n=(4294967295&A)>>>0,r=(A-n)/4294967296;this._block.writeUInt32BE(r,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=r},445:()=>{},462:(e,t,A)=>{var n=A(2861).Buffer;function r(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,A=new Array(t),r=0;r>>24]^l[B>>>16&255]^u[h>>>8&255]^g[255&I]^t[Q++],o=c[B>>>24]^l[h>>>16&255]^u[I>>>8&255]^g[255&d]^t[Q++],a=c[h>>>24]^l[I>>>16&255]^u[d>>>8&255]^g[255&B]^t[Q++],s=c[I>>>24]^l[d>>>16&255]^u[B>>>8&255]^g[255&h]^t[Q++],d=i,B=o,h=a,I=s;return i=(n[d>>>24]<<24|n[B>>>16&255]<<16|n[h>>>8&255]<<8|n[255&I])^t[Q++],o=(n[B>>>24]<<24|n[h>>>16&255]<<16|n[I>>>8&255]<<8|n[255&d])^t[Q++],a=(n[h>>>24]<<24|n[I>>>16&255]<<16|n[d>>>8&255]<<8|n[255&B])^t[Q++],s=(n[I>>>24]<<24|n[d>>>16&255]<<16|n[B>>>8&255]<<8|n[255&h])^t[Q++],[i>>>=0,o>>>=0,a>>>=0,s>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],s=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var A=[],n=[],r=[[],[],[],[]],i=[[],[],[],[]],o=0,a=0,s=0;s<256;++s){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,A[o]=c,n[c]=o;var l=e[o],u=e[l],g=e[u],d=257*e[c]^16843008*c;r[0][o]=d<<24|d>>>8,r[1][o]=d<<16|d>>>16,r[2][o]=d<<8|d>>>24,r[3][o]=d,d=16843009*g^65537*u^257*l^16843008*o,i[0][c]=d<<24|d>>>8,i[1][c]=d<<16|d>>>16,i[2][c]=d<<8|d>>>24,i[3][c]=d,0===o?o=a=1:(o=l^e[e[e[g^l]]],a^=e[e[a]])}return{SBOX:A,INV_SBOX:n,SUB_MIX:r,INV_SUB_MIX:i}}();function c(e){this._key=r(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,A=t+6,n=4*(A+1),r=[],i=0;i>>24,o=s.SBOX[o>>>24]<<24|s.SBOX[o>>>16&255]<<16|s.SBOX[o>>>8&255]<<8|s.SBOX[255&o],o^=a[i/t|0]<<24):t>6&&i%t===4&&(o=s.SBOX[o>>>24]<<24|s.SBOX[o>>>16&255]<<16|s.SBOX[o>>>8&255]<<8|s.SBOX[255&o]),r[i]=r[i-t]^o}for(var c=[],l=0;l>>24]]^s.INV_SUB_MIX[1][s.SBOX[g>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[g>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[255&g]]}this._nRounds=A,this._keySchedule=r,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return o(e=r(e),this._keySchedule,s.SUB_MIX,s.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),A=n.allocUnsafe(16);return A.writeUInt32BE(t[0],0),A.writeUInt32BE(t[1],4),A.writeUInt32BE(t[2],8),A.writeUInt32BE(t[3],12),A},c.prototype.decryptBlock=function(e){var t=(e=r(e))[1];e[1]=e[3],e[3]=t;var A=o(e,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX,this._nRounds),i=n.allocUnsafe(16);return i.writeUInt32BE(A[0],0),i.writeUInt32BE(A[3],4),i.writeUInt32BE(A[2],8),i.writeUInt32BE(A[1],12),i},c.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},e.exports.AES=c},480:(e,t,A)=>{"use strict";var n,r=t,i=A(7952),o=A(894),a=A(7011).assert;function s(e){"short"===e.type?this.curve=new o.short(e):"edwards"===e.type?this.curve=new o.edwards(e):this.curve=new o.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var A=new s(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:A}),A}})}r.PresetCurve=s,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:i.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:i.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:i.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:i.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:i.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:i.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=A(4011)}catch(e){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:i.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},530:(e,t,A)=>{var n={ECB:A(2632),CBC:A(2884),CFB:A(6383),CFB8:A(6975),CFB1:A(5264),OFB:A(6843),CTR:A(3053),GCM:A(3053)},r=A(3219);for(var i in r)r[i].module=n[r[i].mode];e.exports=r},650:(e,t,A)=>{var n=A(462),r=A(2861).Buffer,i=A(6168);function o(e,t,A,o){i.call(this),this._cipher=new n.AES(t),this._prev=r.from(A),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=o,this._mode=e}A(6698)(o,i),o.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},e.exports=o},672:(e,t,A)=>{"use strict";var n=A(4116).Buffer,r=A(1638);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,A=""+t.data;t=t.next;)A+=e+t.data;return A},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);for(var t,A,r=n.allocUnsafe(e>>>0),i=this.head,o=0;i;)t=r,A=o,i.data.copy(t,A),o+=i.data.length,i=i.next;return r},e}(),r&&r.inspect&&r.inspect.custom&&(e.exports.prototype[r.inspect.custom]=function(){var e=r.inspect({length:this.length});return this.constructor.name+" "+e})},735:(e,t,A)=>{var n=A(6698),r=A(82);function i(e){r.call(this,e),this.enc="pem"}n(i,r),e.exports=i,i.prototype.encode=function(e,t){for(var A=r.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"],i=0;i{"use strict";var n=t;n.base=A(6677),n.short=A(9188),n.mont=A(370),n.edwards=A(1298)},961:(e,t,A)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=A(2551)},993:(e,t,A)=>{var n=A(9673).Reporter,r=A(9673).EncoderBuffer,i=A(9673).DecoderBuffer,o=A(3349),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],s=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function c(e,t){var A={};this._baseState=A,A.enc=e,A.parent=t||null,A.children=null,A.tag=null,A.args=null,A.reverseArgs=null,A.choice=null,A.optional=!1,A.any=!1,A.obj=!1,A.use=null,A.useDecoder=null,A.key=null,A.default=null,A.explicit=null,A.implicit=null,A.contains=null,A.parent||(A.children=[],this._wrap())}e.exports=c;var l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var e=this._baseState,t={};l.forEach((function(A){t[A]=e[A]}));var A=new this.constructor(t.parent);return A._baseState=t,A},c.prototype._wrap=function(){var e=this._baseState;s.forEach((function(t){this[t]=function(){var A=new this.constructor(this);return e.children.push(A),A[t].apply(A,arguments)}}),this)},c.prototype._init=function(e){var t=this._baseState;o(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),o.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){var t=this._baseState,A=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==A.length&&(o(null===t.children),t.children=A,A.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(o(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(A){A==(0|A)&&(A|=0);var n=e[A];t[n]=A})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),a.forEach((function(e){c.prototype[e]=function(){var t=this._baseState,A=Array.prototype.slice.call(arguments);return o(null===t.tag),t.tag=e,this._useArgs(A),this}})),c.prototype.use=function(e){o(e);var t=this._baseState;return o(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){var t=this._baseState;return o(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){var t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){var t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){var t=this._baseState;return o(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){var t=this._baseState;return o(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){var t=this._baseState;return o(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){var A=this._baseState;if(null===A.parent)return e.wrapResult(A.children[0]._decode(e,t));var n,r=A.default,o=!0,a=null;if(null!==A.key&&(a=e.enterKey(A.key)),A.optional){var s=null;if(null!==A.explicit?s=A.explicit:null!==A.implicit?s=A.implicit:null!==A.tag&&(s=A.tag),null!==s||A.any){if(o=this._peekTag(e,s,A.any),e.isError(o))return o}else{var c=e.save();try{null===A.choice?this._decodeGeneric(A.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(c)}}if(A.obj&&o&&(n=e.enterObject()),o){if(null!==A.explicit){var l=this._decodeTag(e,A.explicit);if(e.isError(l))return l;e=l}var u=e.offset;if(null===A.use&&null===A.choice){A.any&&(c=e.save());var g=this._decodeTag(e,null!==A.implicit?A.implicit:A.tag,A.any);if(e.isError(g))return g;A.any?r=e.raw(c):e=g}if(t&&t.track&&null!==A.tag&&t.track(e.path(),u,e.length,"tagged"),t&&t.track&&null!==A.tag&&t.track(e.path(),e.offset,e.length,"content"),A.any||(r=null===A.choice?this._decodeGeneric(A.tag,e,t):this._decodeChoice(e,t)),e.isError(r))return r;if(A.any||null!==A.choice||null===A.children||A.children.forEach((function(A){A._decode(e,t)})),A.contains&&("octstr"===A.tag||"bitstr"===A.tag)){var d=new i(r);r=this._getUse(A.contains,e._reporterState.obj)._decode(d,t)}}return A.obj&&o&&(r=e.leaveObject(n)),null===A.key||null===r&&!0!==o?null!==a&&e.exitKey(a):e.leaveKey(a,A.key,r),r},c.prototype._decodeGeneric=function(e,t,A){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],A):/str$/.test(e)?this._decodeStr(t,e,A):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],A):"objid"===e?this._decodeObjid(t,null,null,A):"gentime"===e||"utctime"===e?this._decodeTime(t,e,A):"null_"===e?this._decodeNull(t,A):"bool"===e?this._decodeBool(t,A):"objDesc"===e?this._decodeStr(t,e,A):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],A):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,A):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){var A=this._baseState;return A.useDecoder=this._use(e,t),o(null===A.useDecoder._baseState.parent),A.useDecoder=A.useDecoder._baseState.children[0],A.implicit!==A.useDecoder._baseState.implicit&&(A.useDecoder=A.useDecoder.clone(),A.useDecoder._baseState.implicit=A.implicit),A.useDecoder},c.prototype._decodeChoice=function(e,t){var A=this._baseState,n=null,r=!1;return Object.keys(A.choice).some((function(i){var o=e.save(),a=A.choice[i];try{var s=a._decode(e,t);if(e.isError(s))return!1;n={type:i,value:s},r=!0}catch(t){return e.restore(o),!1}return!0}),this),r?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new r(e,this.reporter)},c.prototype._encode=function(e,t,A){var n=this._baseState;if(null===n.default||n.default!==e){var r=this._encodeValue(e,t,A);if(void 0!==r&&!this._skipDefault(r,t,A))return r}},c.prototype._encodeValue=function(e,t,A){var r=this._baseState;if(null===r.parent)return r.children[0]._encode(e,t||new n);var i=null;if(this.reporter=t,r.optional&&void 0===e){if(null===r.default)return;e=r.default}var o=null,a=!1;if(r.any)i=this._createEncoderBuffer(e);else if(r.choice)i=this._encodeChoice(e,t);else if(r.contains)o=this._getUse(r.contains,A)._encode(e,t),a=!0;else if(r.children)o=r.children.map((function(A){if("null_"===A._baseState.tag)return A._encode(null,t,e);if(null===A._baseState.key)return t.error("Child should have a key");var n=t.enterKey(A._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var r=A._encode(e[A._baseState.key],t,e);return t.leaveKey(n),r}),this).filter((function(e){return e})),o=this._createEncoderBuffer(o);else if("seqof"===r.tag||"setof"===r.tag){if(!r.args||1!==r.args.length)return t.error("Too many args for : "+r.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var s=this.clone();s._baseState.implicit=null,o=this._createEncoderBuffer(e.map((function(A){var n=this._baseState;return this._getUse(n.args[0],e)._encode(A,t)}),s))}else null!==r.use?i=this._getUse(r.use,A)._encode(e,t):(o=this._encodePrimitive(r.tag,e),a=!0);if(!r.any&&null===r.choice){var c=null!==r.implicit?r.implicit:r.tag,l=null===r.implicit?"universal":"context";null===c?null===r.use&&t.error("Tag could be omitted only for .use()"):null===r.use&&(i=this._encodeComposite(c,a,l,o))}return null!==r.explicit&&(i=this._encodeComposite(r.explicit,!1,"context",i)),i},c.prototype._encodeChoice=function(e,t){var A=this._baseState,n=A.choice[e.type];return n||o(!1,e.type+" not found in "+JSON.stringify(Object.keys(A.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){var A=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&A.args)return this._encodeObjid(t,A.reverseArgs[0],A.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,A.args&&A.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},1020:(e,t,A)=>{"use strict";var n=A(6540),r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,a=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,A){var n,i={},c=null,l=null;for(n in void 0!==A&&(c=""+A),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(l=t.ref),t)o.call(t,n)&&!s.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:r,type:e,key:c,ref:l,props:i,_owner:a.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},1069:()=>{},1137:(e,t,A)=>{"use strict";var n=A(7568);t.certificate=A(6413);var r=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=r;var i=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=i;var o=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}));t.PublicKey=a;var s=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(o),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=s;var c=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=c;var l=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=l,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var u=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})),g=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(u),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=g,t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},1155:()=>{},1158:function(e,t,A){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var A=function(){};A.prototype=t.prototype,e.prototype=new A,e.prototype.constructor=e}function i(e,t,A){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(A=t,t=10),this._init(e||0,t||10,A||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:A(4688).Buffer}catch(e){}function a(e,t){var A=e.charCodeAt(t);return A>=65&&A<=70?A-55:A>=97&&A<=102?A-87:A-48&15}function s(e,t,A){var n=a(e,A);return A-1>=t&&(n|=a(e,A-1)<<4),n}function c(e,t,A,n){for(var r=0,i=Math.min(e.length,A),o=t;o=49?a-49+10:a>=17?a-17+10:a}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,A){if("number"==typeof e)return this._initNumber(e,t,A);if("object"==typeof e)return this._initArray(e,t,A);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===A)for(r=0,i=0;r>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,A){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,A){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-A,o=i%n,a=Math.min(i,i-o)+A,s=0,l=A;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[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 d(e,t,A){A.negative=t.negative^e.negative;var n=e.length+t.length|0;A.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,a=67108863&o,s=o/67108864|0;A.words[0]=a;for(var c=1;c>>26,u=67108863&s,g=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=g;d++){var B=c-d|0;l+=(o=(r=0|e.words[B])*(i=0|t.words[d])+u)/67108864|0,u=67108863&o}A.words[c]=0|u,s=0|l}return 0!==s?A.words[c]=0|s:A.length--,A.strip()}i.prototype.toString=function(e,t){var A;if(t=0|t||1,16===(e=e||10)||"hex"===e){A="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?l[6-s.length]+s+A:s+A,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(A=i.toString(16)+A);A.length%t!==0;)A="0"+A;return 0!==this.negative&&(A="-"+A),A}if(e===(0|e)&&e>=2&&e<=36){var c=u[e],d=g[e];A="";var B=this.clone();for(B.negative=0;!B.isZero();){var h=B.modn(d).toString(e);A=(B=B.idivn(d)).isZero()?h+A:l[c-h.length]+h+A}for(this.isZero()&&(A="0"+A);A.length%t!==0;)A="0"+A;return 0!==this.negative&&(A="-"+A),A}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,A){var r=this.byteLength(),i=A||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,a,s="le"===t,c=new e(i),l=this.clone();if(s){for(a=0;!l.isZero();a++)o=l.andln(255),l.iushrn(8),c[a]=o;for(;a=4096&&(A+=13,t>>>=13),t>=64&&(A+=7,t>>>=7),t>=8&&(A+=4,t>>>=4),t>=2&&(A+=2,t>>>=2),A+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,A=0;return 8191&t||(A+=13,t>>>=13),127&t||(A+=7,t>>>=7),15&t||(A+=4,t>>>=4),3&t||(A+=2,t>>>=2),1&t||A++,A},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var A=0;Ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,A;this.length>e.length?(t=this,A=e):(t=e,A=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),A=e%26;this._expand(t),A>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-A),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var A=e/26|0,r=e%26;return this._expand(A+1),this.words[A]=t?this.words[A]|1<e.length?(A=this,n=e):(A=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=A.length,0!==r)this.words[this.length]=r,this.length++;else if(A!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var A,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(A=this,n=e):(A=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,d=0|o[1],B=8191&d,h=d>>>13,I=0|o[2],Q=8191&I,p=I>>>13,f=0|o[3],E=8191&f,m=f>>>13,C=0|o[4],y=8191&C,v=C>>>13,b=0|o[5],w=8191&b,D=b>>>13,S=0|o[6],F=8191&S,x=S>>>13,U=0|o[7],N=8191&U,R=U>>>13,M=0|o[8],L=8191&M,k=M>>>13,G=0|o[9],H=8191&G,_=G>>>13,Y=0|a[0],T=8191&Y,V=Y>>>13,P=0|a[1],O=8191&P,K=P>>>13,J=0|a[2],j=8191&J,z=J>>>13,q=0|a[3],Z=8191&q,W=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],Ae=8191&te,ne=te>>>13,re=0|a[6],ie=8191&re,oe=re>>>13,ae=0|a[7],se=8191&ae,ce=ae>>>13,le=0|a[8],ue=8191&le,ge=le>>>13,de=0|a[9],Be=8191&de,he=de>>>13;A.negative=e.negative^t.negative,A.length=19;var Ie=(c+(n=Math.imul(u,T))|0)+((8191&(r=(r=Math.imul(u,V))+Math.imul(g,T)|0))<<13)|0;c=((i=Math.imul(g,V))+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(B,T),r=(r=Math.imul(B,V))+Math.imul(h,T)|0,i=Math.imul(h,V);var Qe=(c+(n=n+Math.imul(u,O)|0)|0)+((8191&(r=(r=r+Math.imul(u,K)|0)+Math.imul(g,O)|0))<<13)|0;c=((i=i+Math.imul(g,K)|0)+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,n=Math.imul(Q,T),r=(r=Math.imul(Q,V))+Math.imul(p,T)|0,i=Math.imul(p,V),n=n+Math.imul(B,O)|0,r=(r=r+Math.imul(B,K)|0)+Math.imul(h,O)|0,i=i+Math.imul(h,K)|0;var pe=(c+(n=n+Math.imul(u,j)|0)|0)+((8191&(r=(r=r+Math.imul(u,z)|0)+Math.imul(g,j)|0))<<13)|0;c=((i=i+Math.imul(g,z)|0)+(r>>>13)|0)+(pe>>>26)|0,pe&=67108863,n=Math.imul(E,T),r=(r=Math.imul(E,V))+Math.imul(m,T)|0,i=Math.imul(m,V),n=n+Math.imul(Q,O)|0,r=(r=r+Math.imul(Q,K)|0)+Math.imul(p,O)|0,i=i+Math.imul(p,K)|0,n=n+Math.imul(B,j)|0,r=(r=r+Math.imul(B,z)|0)+Math.imul(h,j)|0,i=i+Math.imul(h,z)|0;var fe=(c+(n=n+Math.imul(u,Z)|0)|0)+((8191&(r=(r=r+Math.imul(u,W)|0)+Math.imul(g,Z)|0))<<13)|0;c=((i=i+Math.imul(g,W)|0)+(r>>>13)|0)+(fe>>>26)|0,fe&=67108863,n=Math.imul(y,T),r=(r=Math.imul(y,V))+Math.imul(v,T)|0,i=Math.imul(v,V),n=n+Math.imul(E,O)|0,r=(r=r+Math.imul(E,K)|0)+Math.imul(m,O)|0,i=i+Math.imul(m,K)|0,n=n+Math.imul(Q,j)|0,r=(r=r+Math.imul(Q,z)|0)+Math.imul(p,j)|0,i=i+Math.imul(p,z)|0,n=n+Math.imul(B,Z)|0,r=(r=r+Math.imul(B,W)|0)+Math.imul(h,Z)|0,i=i+Math.imul(h,W)|0;var Ee=(c+(n=n+Math.imul(u,$)|0)|0)+((8191&(r=(r=r+Math.imul(u,ee)|0)+Math.imul(g,$)|0))<<13)|0;c=((i=i+Math.imul(g,ee)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(w,T),r=(r=Math.imul(w,V))+Math.imul(D,T)|0,i=Math.imul(D,V),n=n+Math.imul(y,O)|0,r=(r=r+Math.imul(y,K)|0)+Math.imul(v,O)|0,i=i+Math.imul(v,K)|0,n=n+Math.imul(E,j)|0,r=(r=r+Math.imul(E,z)|0)+Math.imul(m,j)|0,i=i+Math.imul(m,z)|0,n=n+Math.imul(Q,Z)|0,r=(r=r+Math.imul(Q,W)|0)+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(B,$)|0,r=(r=r+Math.imul(B,ee)|0)+Math.imul(h,$)|0,i=i+Math.imul(h,ee)|0;var me=(c+(n=n+Math.imul(u,Ae)|0)|0)+((8191&(r=(r=r+Math.imul(u,ne)|0)+Math.imul(g,Ae)|0))<<13)|0;c=((i=i+Math.imul(g,ne)|0)+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(F,T),r=(r=Math.imul(F,V))+Math.imul(x,T)|0,i=Math.imul(x,V),n=n+Math.imul(w,O)|0,r=(r=r+Math.imul(w,K)|0)+Math.imul(D,O)|0,i=i+Math.imul(D,K)|0,n=n+Math.imul(y,j)|0,r=(r=r+Math.imul(y,z)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,z)|0,n=n+Math.imul(E,Z)|0,r=(r=r+Math.imul(E,W)|0)+Math.imul(m,Z)|0,i=i+Math.imul(m,W)|0,n=n+Math.imul(Q,$)|0,r=(r=r+Math.imul(Q,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(B,Ae)|0,r=(r=r+Math.imul(B,ne)|0)+Math.imul(h,Ae)|0,i=i+Math.imul(h,ne)|0;var Ce=(c+(n=n+Math.imul(u,ie)|0)|0)+((8191&(r=(r=r+Math.imul(u,oe)|0)+Math.imul(g,ie)|0))<<13)|0;c=((i=i+Math.imul(g,oe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(N,T),r=(r=Math.imul(N,V))+Math.imul(R,T)|0,i=Math.imul(R,V),n=n+Math.imul(F,O)|0,r=(r=r+Math.imul(F,K)|0)+Math.imul(x,O)|0,i=i+Math.imul(x,K)|0,n=n+Math.imul(w,j)|0,r=(r=r+Math.imul(w,z)|0)+Math.imul(D,j)|0,i=i+Math.imul(D,z)|0,n=n+Math.imul(y,Z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(E,$)|0,r=(r=r+Math.imul(E,ee)|0)+Math.imul(m,$)|0,i=i+Math.imul(m,ee)|0,n=n+Math.imul(Q,Ae)|0,r=(r=r+Math.imul(Q,ne)|0)+Math.imul(p,Ae)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(B,ie)|0,r=(r=r+Math.imul(B,oe)|0)+Math.imul(h,ie)|0,i=i+Math.imul(h,oe)|0;var ye=(c+(n=n+Math.imul(u,se)|0)|0)+((8191&(r=(r=r+Math.imul(u,ce)|0)+Math.imul(g,se)|0))<<13)|0;c=((i=i+Math.imul(g,ce)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(L,T),r=(r=Math.imul(L,V))+Math.imul(k,T)|0,i=Math.imul(k,V),n=n+Math.imul(N,O)|0,r=(r=r+Math.imul(N,K)|0)+Math.imul(R,O)|0,i=i+Math.imul(R,K)|0,n=n+Math.imul(F,j)|0,r=(r=r+Math.imul(F,z)|0)+Math.imul(x,j)|0,i=i+Math.imul(x,z)|0,n=n+Math.imul(w,Z)|0,r=(r=r+Math.imul(w,W)|0)+Math.imul(D,Z)|0,i=i+Math.imul(D,W)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(E,Ae)|0,r=(r=r+Math.imul(E,ne)|0)+Math.imul(m,Ae)|0,i=i+Math.imul(m,ne)|0,n=n+Math.imul(Q,ie)|0,r=(r=r+Math.imul(Q,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0,n=n+Math.imul(B,se)|0,r=(r=r+Math.imul(B,ce)|0)+Math.imul(h,se)|0,i=i+Math.imul(h,ce)|0;var ve=(c+(n=n+Math.imul(u,ue)|0)|0)+((8191&(r=(r=r+Math.imul(u,ge)|0)+Math.imul(g,ue)|0))<<13)|0;c=((i=i+Math.imul(g,ge)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(H,T),r=(r=Math.imul(H,V))+Math.imul(_,T)|0,i=Math.imul(_,V),n=n+Math.imul(L,O)|0,r=(r=r+Math.imul(L,K)|0)+Math.imul(k,O)|0,i=i+Math.imul(k,K)|0,n=n+Math.imul(N,j)|0,r=(r=r+Math.imul(N,z)|0)+Math.imul(R,j)|0,i=i+Math.imul(R,z)|0,n=n+Math.imul(F,Z)|0,r=(r=r+Math.imul(F,W)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,W)|0,n=n+Math.imul(w,$)|0,r=(r=r+Math.imul(w,ee)|0)+Math.imul(D,$)|0,i=i+Math.imul(D,ee)|0,n=n+Math.imul(y,Ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(v,Ae)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(E,ie)|0,r=(r=r+Math.imul(E,oe)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,oe)|0,n=n+Math.imul(Q,se)|0,r=(r=r+Math.imul(Q,ce)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(B,ue)|0,r=(r=r+Math.imul(B,ge)|0)+Math.imul(h,ue)|0,i=i+Math.imul(h,ge)|0;var be=(c+(n=n+Math.imul(u,Be)|0)|0)+((8191&(r=(r=r+Math.imul(u,he)|0)+Math.imul(g,Be)|0))<<13)|0;c=((i=i+Math.imul(g,he)|0)+(r>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(H,O),r=(r=Math.imul(H,K))+Math.imul(_,O)|0,i=Math.imul(_,K),n=n+Math.imul(L,j)|0,r=(r=r+Math.imul(L,z)|0)+Math.imul(k,j)|0,i=i+Math.imul(k,z)|0,n=n+Math.imul(N,Z)|0,r=(r=r+Math.imul(N,W)|0)+Math.imul(R,Z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(F,$)|0,r=(r=r+Math.imul(F,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,n=n+Math.imul(w,Ae)|0,r=(r=r+Math.imul(w,ne)|0)+Math.imul(D,Ae)|0,i=i+Math.imul(D,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(E,se)|0,r=(r=r+Math.imul(E,ce)|0)+Math.imul(m,se)|0,i=i+Math.imul(m,ce)|0,n=n+Math.imul(Q,ue)|0,r=(r=r+Math.imul(Q,ge)|0)+Math.imul(p,ue)|0,i=i+Math.imul(p,ge)|0;var we=(c+(n=n+Math.imul(B,Be)|0)|0)+((8191&(r=(r=r+Math.imul(B,he)|0)+Math.imul(h,Be)|0))<<13)|0;c=((i=i+Math.imul(h,he)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(H,j),r=(r=Math.imul(H,z))+Math.imul(_,j)|0,i=Math.imul(_,z),n=n+Math.imul(L,Z)|0,r=(r=r+Math.imul(L,W)|0)+Math.imul(k,Z)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(N,$)|0,r=(r=r+Math.imul(N,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(F,Ae)|0,r=(r=r+Math.imul(F,ne)|0)+Math.imul(x,Ae)|0,i=i+Math.imul(x,ne)|0,n=n+Math.imul(w,ie)|0,r=(r=r+Math.imul(w,oe)|0)+Math.imul(D,ie)|0,i=i+Math.imul(D,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,ce)|0)+Math.imul(v,se)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(E,ue)|0,r=(r=r+Math.imul(E,ge)|0)+Math.imul(m,ue)|0,i=i+Math.imul(m,ge)|0;var De=(c+(n=n+Math.imul(Q,Be)|0)|0)+((8191&(r=(r=r+Math.imul(Q,he)|0)+Math.imul(p,Be)|0))<<13)|0;c=((i=i+Math.imul(p,he)|0)+(r>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(H,Z),r=(r=Math.imul(H,W))+Math.imul(_,Z)|0,i=Math.imul(_,W),n=n+Math.imul(L,$)|0,r=(r=r+Math.imul(L,ee)|0)+Math.imul(k,$)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(N,Ae)|0,r=(r=r+Math.imul(N,ne)|0)+Math.imul(R,Ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(F,ie)|0,r=(r=r+Math.imul(F,oe)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,oe)|0,n=n+Math.imul(w,se)|0,r=(r=r+Math.imul(w,ce)|0)+Math.imul(D,se)|0,i=i+Math.imul(D,ce)|0,n=n+Math.imul(y,ue)|0,r=(r=r+Math.imul(y,ge)|0)+Math.imul(v,ue)|0,i=i+Math.imul(v,ge)|0;var Se=(c+(n=n+Math.imul(E,Be)|0)|0)+((8191&(r=(r=r+Math.imul(E,he)|0)+Math.imul(m,Be)|0))<<13)|0;c=((i=i+Math.imul(m,he)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(H,$),r=(r=Math.imul(H,ee))+Math.imul(_,$)|0,i=Math.imul(_,ee),n=n+Math.imul(L,Ae)|0,r=(r=r+Math.imul(L,ne)|0)+Math.imul(k,Ae)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(N,ie)|0,r=(r=r+Math.imul(N,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(F,se)|0,r=(r=r+Math.imul(F,ce)|0)+Math.imul(x,se)|0,i=i+Math.imul(x,ce)|0,n=n+Math.imul(w,ue)|0,r=(r=r+Math.imul(w,ge)|0)+Math.imul(D,ue)|0,i=i+Math.imul(D,ge)|0;var Fe=(c+(n=n+Math.imul(y,Be)|0)|0)+((8191&(r=(r=r+Math.imul(y,he)|0)+Math.imul(v,Be)|0))<<13)|0;c=((i=i+Math.imul(v,he)|0)+(r>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(H,Ae),r=(r=Math.imul(H,ne))+Math.imul(_,Ae)|0,i=Math.imul(_,ne),n=n+Math.imul(L,ie)|0,r=(r=r+Math.imul(L,oe)|0)+Math.imul(k,ie)|0,i=i+Math.imul(k,oe)|0,n=n+Math.imul(N,se)|0,r=(r=r+Math.imul(N,ce)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,ce)|0,n=n+Math.imul(F,ue)|0,r=(r=r+Math.imul(F,ge)|0)+Math.imul(x,ue)|0,i=i+Math.imul(x,ge)|0;var xe=(c+(n=n+Math.imul(w,Be)|0)|0)+((8191&(r=(r=r+Math.imul(w,he)|0)+Math.imul(D,Be)|0))<<13)|0;c=((i=i+Math.imul(D,he)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(H,ie),r=(r=Math.imul(H,oe))+Math.imul(_,ie)|0,i=Math.imul(_,oe),n=n+Math.imul(L,se)|0,r=(r=r+Math.imul(L,ce)|0)+Math.imul(k,se)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(N,ue)|0,r=(r=r+Math.imul(N,ge)|0)+Math.imul(R,ue)|0,i=i+Math.imul(R,ge)|0;var Ue=(c+(n=n+Math.imul(F,Be)|0)|0)+((8191&(r=(r=r+Math.imul(F,he)|0)+Math.imul(x,Be)|0))<<13)|0;c=((i=i+Math.imul(x,he)|0)+(r>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,n=Math.imul(H,se),r=(r=Math.imul(H,ce))+Math.imul(_,se)|0,i=Math.imul(_,ce),n=n+Math.imul(L,ue)|0,r=(r=r+Math.imul(L,ge)|0)+Math.imul(k,ue)|0,i=i+Math.imul(k,ge)|0;var Ne=(c+(n=n+Math.imul(N,Be)|0)|0)+((8191&(r=(r=r+Math.imul(N,he)|0)+Math.imul(R,Be)|0))<<13)|0;c=((i=i+Math.imul(R,he)|0)+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(H,ue),r=(r=Math.imul(H,ge))+Math.imul(_,ue)|0,i=Math.imul(_,ge);var Re=(c+(n=n+Math.imul(L,Be)|0)|0)+((8191&(r=(r=r+Math.imul(L,he)|0)+Math.imul(k,Be)|0))<<13)|0;c=((i=i+Math.imul(k,he)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Me=(c+(n=Math.imul(H,Be))|0)+((8191&(r=(r=Math.imul(H,he))+Math.imul(_,Be)|0))<<13)|0;return c=((i=Math.imul(_,he))+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,s[0]=Ie,s[1]=Qe,s[2]=pe,s[3]=fe,s[4]=Ee,s[5]=me,s[6]=Ce,s[7]=ye,s[8]=ve,s[9]=be,s[10]=we,s[11]=De,s[12]=Se,s[13]=Fe,s[14]=xe,s[15]=Ue,s[16]=Ne,s[17]=Re,s[18]=Me,0!==c&&(s[19]=c,A.length++),A};function h(e,t,A){return(new I).mulp(e,t,A)}function I(e,t){this.x=e,this.y=t}Math.imul||(B=d),i.prototype.mulTo=function(e,t){var A,n=this.length+e.length;return A=10===this.length&&10===e.length?B(this,e,t):n<63?d(this,e,t):n<1024?function(e,t,A){A.negative=t.negative^e.negative,A.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}A.words[i]=a,n=o,o=r}return 0!==n?A.words[i]=n:A.length--,A.strip()}(this,e,t):h(this,e,t),A},I.prototype.makeRBT=function(e){for(var t=new Array(e),A=i.prototype._countBits(e)-1,n=0;n>=1;return n},I.prototype.permute=function(e,t,A,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,A[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[A]=67108863&i}return 0!==t&&(this.words[A]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),A=0;A>>r}return t}(e);if(0===t.length)return new i(1);for(var A=this,n=0;n=0);var t,A=e%26,r=(e-A)/26,i=67108863>>>26-A<<26-A;if(0!==A){var o=0;for(t=0;t>>26-A}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),a=67108863^67108863>>>i<o)for(this.length-=o,c=0;c=0&&(0!==l||c>=r);c--){var u=0|this.words[c];this.words[c]=l<<26-i|u>>>i,l=u&a}return s&&0!==l&&(s.words[s.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,A){return n(0===this.negative),this.iushrn(e,t,A)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,A=(e-t)/26,r=1<=0);var t=e%26,A=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=A)return this;if(0!==t&&A++,this.length=Math.min(A,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+A]=67108863&i}for(;r>26,this.words[r+A]=67108863&i;if(0===a)return this.strip();for(n(-1===a),a=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var A=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(A=26-this._countBits(o))&&(r=r.ushln(A),n.iushln(A),o=0|r.words[r.length-1]);var a,s=n.length-r.length;if("mod"!==t){(a=new i(null)).length=s+1,a.words=new Array(a.length);for(var c=0;c=0;u--){var g=67108864*(0|n.words[r.length+u])+(0|n.words[r.length+u-1]);for(g=Math.min(g/o|0,67108863),n._ishlnsubmul(r,g,u);0!==n.negative;)g--,n.negative=0,n._ishlnsubmul(r,1,u),n.isZero()||(n.negative^=1);a&&(a.words[u]=g)}return a&&a.strip(),n.strip(),"div"!==t&&0!==A&&n.iushrn(A),{div:a||null,mod:n}},i.prototype.divmod=function(e,t,A){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(r=a.div.neg()),"div"!==t&&(o=a.mod.neg(),A&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(r=a.div.neg()),{div:r,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),A&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,a},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var A=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=A.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,A=0,r=this.length-1;r>=0;r--)A=(t*A+(0|this.words[r]))%e;return A},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,A=this.length-1;A>=0;A--){var r=(0|this.words[A])+67108864*t;this.words[A]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,A=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),a=new i(0),s=new i(1),c=0;t.isEven()&&A.isEven();)t.iushrn(1),A.iushrn(1),++c;for(var l=A.clone(),u=t.clone();!t.isZero();){for(var g=0,d=1;0===(t.words[0]&d)&&g<26;++g,d<<=1);if(g>0)for(t.iushrn(g);g-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(l),o.isub(u)),r.iushrn(1),o.iushrn(1);for(var B=0,h=1;0===(A.words[0]&h)&&B<26;++B,h<<=1);if(B>0)for(A.iushrn(B);B-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(l),s.isub(u)),a.iushrn(1),s.iushrn(1);t.cmp(A)>=0?(t.isub(A),r.isub(a),o.isub(s)):(A.isub(t),a.isub(r),s.isub(o))}return{a,b:s,gcd:A.iushln(c)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,A=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),a=new i(0),s=A.clone();t.cmpn(1)>0&&A.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var u=0,g=1;0===(A.words[0]&g)&&u<26;++u,g<<=1);if(u>0)for(A.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);t.cmp(A)>=0?(t.isub(A),o.isub(a)):(A.isub(t),a.isub(o))}return(r=0===t.cmpn(1)?o:a).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),A=e.clone();t.negative=0,A.negative=0;for(var n=0;t.isEven()&&A.isEven();n++)t.iushrn(1),A.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;A.isEven();)A.iushrn(1);var r=t.cmp(A);if(r<0){var i=t;t=A,A=i}else if(0===r||0===A.cmpn(1))break;t.isub(A)}return A.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,A=(e-t)/26,r=1<>>26,a&=67108863,this.words[o]=a}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,A=e<0;if(0!==this.negative&&!A)return-1;if(0===this.negative&&A)return 1;if(this.strip(),this.length>1)t=1;else{A&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;A--){var n=0|this.words[A],r=0|e.words[A];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new y(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var Q={k256:null,p224:null,p192:null,p25519:null};function p(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function f(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function m(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function v(e){y.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}p.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},p.prototype.ireduce=function(e){var t,A=e;do{this.split(A,this.tmp),t=(A=(A=this.imulK(A)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?A.isub(this.p):void 0!==A.strip?A.strip():A._strip(),A},p.prototype.split=function(e,t){e.iushrn(this.n,0,t)},p.prototype.imulK=function(e){return e.imul(this.k)},r(f,p),f.prototype.split=function(e,t){for(var A=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},f.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,A=0;A>>=26,e.words[A]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(Q[e])return Q[e];var t;if("k256"===e)t=new f;else if("p224"===e)t=new E;else if("p192"===e)t=new m;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return Q[e]=t,t},y.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},y.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},y.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},y.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},y.prototype.add=function(e,t){this._verify2(e,t);var A=e.add(t);return A.cmp(this.m)>=0&&A.isub(this.m),A._forceRed(this)},y.prototype.iadd=function(e,t){this._verify2(e,t);var A=e.iadd(t);return A.cmp(this.m)>=0&&A.isub(this.m),A},y.prototype.sub=function(e,t){this._verify2(e,t);var A=e.sub(t);return A.cmpn(0)<0&&A.iadd(this.m),A._forceRed(this)},y.prototype.isub=function(e,t){this._verify2(e,t);var A=e.isub(t);return A.cmpn(0)<0&&A.iadd(this.m),A},y.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},y.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},y.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},y.prototype.isqr=function(e){return this.imul(e,e.clone())},y.prototype.sqr=function(e){return this.mul(e,e)},y.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var A=this.m.add(new i(1)).iushrn(2);return this.pow(e,A)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var a=new i(1).toRed(this),s=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,c).cmp(s);)l.redIAdd(s);for(var u=this.pow(l,r),g=this.pow(e,r.addn(1).iushrn(1)),d=this.pow(e,r),B=o;0!==d.cmp(a);){for(var h=d,I=0;0!==h.cmp(a);I++)h=h.redSqr();n(I=0;n--){for(var c=t.words[n],l=s-1;l>=0;l--){var u=c>>l&1;r!==A[0]&&(r=this.sqr(r)),0!==u||0!==o?(o<<=1,o|=u,(4===++a||0===n&&0===l)&&(r=this.mul(r,A[o]),a=0,o=0)):a=0}s=26}return r},y.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},y.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new v(e)},r(v,y),v.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},v.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},v.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var A=e.imul(t),n=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=A.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var A=e.mul(t),n=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=A.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},v.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=A.nmd(e),this)},1200:(e,t,A)=>{"use strict";var n=A(8490),r=A(7011).assert;function i(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=i,i.fromPublic=function(e,t,A){return t instanceof i?t:new i(e,{pub:t,pubEnc:A})},i.fromPrivate=function(e,t,A){return t instanceof i?t:new i(e,{priv:t,privEnc:A})},i.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},i.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},i.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?r(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||r(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},i.prototype.derive=function(e){return e.validate()||r(e.validate(),"public point not validated"),e.mul(this.priv).getX()},i.prototype.sign=function(e,t,A){return this.ec.sign(e,this,t,A)},i.prototype.verify=function(e,t,A){return this.ec.verify(e,t,this,void 0,A)},i.prototype.inspect=function(){return""}},1241:(e,t,A)=>{var n=A(5799),r=A(6171),i=A(3219);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=r.createDecipher,t.createDecipheriv=t.Decipheriv=r.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(i)}},1298:(e,t,A)=>{"use strict";var n=A(7011),r=A(8490),i=A(6698),o=A(6677),a=n.assert;function s(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,o.call(this,"edwards",e),this.a=new r(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new r(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new r(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,A,n,i){o.BasePoint.call(this,e,"projective"),null===t&&null===A&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new r(t,16),this.y=new r(A,16),this.z=n?new r(n,16):this.curve.one,this.t=i&&new r(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}i(s,o),e.exports=s,s.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},s.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},s.prototype.jpoint=function(e,t,A,n){return this.point(e,t,A,n)},s.prototype.pointFromX=function(e,t){(e=new r(e,16)).red||(e=e.toRed(this.red));var A=e.redSqr(),n=this.c2.redSub(this.a.redMul(A)),i=this.one.redSub(this.c2.redMul(this.d).redMul(A)),o=n.redMul(i.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var s=a.fromRed().isOdd();return(t&&!s||!t&&s)&&(a=a.redNeg()),this.point(e,a)},s.prototype.pointFromY=function(e,t){(e=new r(e,16)).red||(e=e.toRed(this.red));var A=e.redSqr(),n=A.redSub(this.c2),i=A.redMul(this.d).redMul(this.c2).redSub(this.a),o=n.redMul(i.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},s.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),A=e.y.redSqr(),n=t.redMul(this.a).redAdd(A),r=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(A)));return 0===n.cmp(r)},i(c,o.BasePoint),s.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},s.prototype.point=function(e,t,A,n){return new c(this,e,t,A,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),A=this.z.redSqr();A=A.redIAdd(A);var n=this.curve._mulA(e),r=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),i=n.redAdd(t),o=i.redSub(A),a=n.redSub(t),s=r.redMul(o),c=i.redMul(a),l=r.redMul(a),u=o.redMul(i);return this.curve.point(s,c,u,l)},c.prototype._projDbl=function(){var e,t,A,n,r,i,o=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),s=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(a)).redAdd(s);this.zOne?(e=o.redSub(a).redSub(s).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(s)),A=c.redSqr().redSub(c).redSub(c)):(r=this.z.redSqr(),i=c.redSub(r).redISub(r),e=o.redSub(a).redISub(s).redMul(i),t=c.redMul(n.redSub(s)),A=c.redMul(i))}else n=a.redAdd(s),r=this.curve._mulC(this.z).redSqr(),i=n.redSub(r).redSub(r),e=this.curve._mulC(o.redISub(n)).redMul(i),t=this.curve._mulC(n).redMul(a.redISub(s)),A=n.redMul(i);return this.curve.point(e,t,A)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),A=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),r=this.z.redMul(e.z.redAdd(e.z)),i=A.redSub(t),o=r.redSub(n),a=r.redAdd(n),s=A.redAdd(t),c=i.redMul(o),l=a.redMul(s),u=i.redMul(s),g=o.redMul(a);return this.curve.point(c,l,g,u)},c.prototype._projAdd=function(e){var t,A,n=this.z.redMul(e.z),r=n.redSqr(),i=this.x.redMul(e.x),o=this.y.redMul(e.y),a=this.curve.d.redMul(i).redMul(o),s=r.redSub(a),c=r.redAdd(a),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(o),u=n.redMul(s).redMul(l);return this.curve.twisted?(t=n.redMul(c).redMul(o.redSub(this.curve._mulA(i))),A=s.redMul(c)):(t=n.redMul(c).redMul(o.redSub(i)),A=this.curve._mulC(s).redMul(c)),this.curve.point(u,t,A)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,A){return this.curve._wnafMulAdd(1,[this,t],[e,A],2,!1)},c.prototype.jmulAdd=function(e,t,A){return this.curve._wnafMulAdd(1,[this,t],[e,A],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var A=e.clone(),n=this.curve.redN.redMul(this.z);;){if(A.iadd(this.curve.n),A.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},1324:(e,t,A)=>{var n=A(6729),r=A(2801);e.exports=function(e){return new o(e)};var i={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function o(e){this.curveType=i[e],this.curveType||(this.curveType={name:e}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function a(e,t,A){Array.isArray(e)||(e=e.toArray());var n=new Buffer(e);if(A&&n.length{var n=A(320),r=A(6011),i=A(2802),o=A(2861).Buffer,a=A(4196),s=A(2455),c=A(7353),l=o.alloc(128),u={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function g(e,t,A){var a=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new r).update(e).digest()}:"md5"===e?n:function(t){return i(e).update(t).digest()}}(e),s="sha512"===e||"sha384"===e?128:64;t.length>s?t=a(t):t.length{},1565:(e,t,A)=>{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=A(3209),t.createHash=t.Hash=A(7108),t.createHmac=t.Hmac=A(3507);var n=A(5715),r=Object.keys(n),i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(r);t.getHashes=function(){return i};var o=A(8396);t.pbkdf2=o.pbkdf2,t.pbkdf2Sync=o.pbkdf2Sync;var a=A(125);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var s=A(5380);t.DiffieHellmanGroup=s.DiffieHellmanGroup,t.createDiffieHellmanGroup=s.createDiffieHellmanGroup,t.getDiffieHellman=s.getDiffieHellman,t.createDiffieHellman=s.createDiffieHellman,t.DiffieHellman=s.DiffieHellman;var c=A(20);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=A(1324);var l=A(7168);t.publicEncrypt=l.publicEncrypt,t.privateEncrypt=l.privateEncrypt,t.publicDecrypt=l.publicDecrypt,t.privateDecrypt=l.privateDecrypt;var u=A(6983);t.randomFill=u.randomFill,t.randomFillSync=u.randomFillSync,t.createCredentials=function(){throw new Error("sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/browserify/crypto-browserify")},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},1636:e=>{"use strict";e.exports={rE:"6.6.1"}},1638:()=>{},1800:(e,t,A)=>{"use strict";var n=A(6698),r=A(2861).Buffer,i=A(6168),o=r.alloc(128),a=64;function s(e,t){i.call(this,"digest"),"string"==typeof t&&(t=r.from(t)),this._alg=e,this._key=t,t.length>a?t=e(t):t.length{"use strict";e.exports=o;var n=A(6248),r=Object.create(A(5622));function i(e,t){var A=this._transformState;A.transforming=!1;var n=A.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));A.writechunk=null,A.writecb=null,null!=t&&this.push(t),n(e);var r=this._readableState;r.reading=!1,(r.needReadable||r.length{"use strict";var n=A(7426),r=A(7766);function i(){if(!(this instanceof i))return new i;r.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(i,r),e.exports=i,i.blockSize=1024,i.outSize=384,i.hmacStrength=192,i.padLength=128,i.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},2008:()=>{},2010:(e,t,A)=>{var n=A(6698),r=A(7568),i=r.base,o=r.bignum,a=r.constants.der;function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){i.Node.call(this,"der",e)}function l(e,t){var A=e.readUInt8(t);if(e.isError(A))return A;var n=a.tagClass[A>>6],r=!(32&A);if(31&~A)A&=31;else{var i=A;for(A=0;!(128&~i);){if(i=e.readUInt8(t),e.isError(i))return i;A<<=7,A|=127&i}}return{cls:n,primitive:r,tag:A,tagStr:a.tag[A]}}function u(e,t,A){var n=e.readUInt8(A);if(e.isError(n))return n;if(!t&&128===n)return null;if(!(128&n))return n;var r=127&n;if(r>4)return e.error("length octect is too long");n=0;for(var i=0;i{"use strict";"undefined"!=typeof window&&function(){window.console=window.console||{};const e=window.console;let t,A;const n={},r=function(){},i="memory".split(","),o="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");for(;t=i.pop();)e[t]||(e[t]=n);for(;A=o.pop();)e[A]||(e[A]=r)}(),void 0===window.HTMLCanvasElement||window.HTMLCanvasElement.prototype.toBlob||Object.defineProperty(window.HTMLCanvasElement.prototype,"toBlob",{value:function(e,t,A){const n=window.atob(this.toDataURL(t,A).split(",")[1]),r=n.length,i=r>>2,o=new Uint8Array(r),a=new Uint32Array(o.buffer,0,i);let s=0;for(let e=0;e0?1:-1}),Number.isInteger||(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&e>-9007199254740992&&e<9007199254740992&&Math.floor(e)===e}),Number.isNaN||(Number.isNaN=function(e){return e!=e}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(null==e)throw new TypeError("Cannot convert first argument to object");const t=Object(e);let A,n=!1;for(let e=1;e1?arguments[1]:void 0;let a=o?Number(o):0;Number.isNaN(a)&&(a=0);const s=Math.min(Math.max(a,0),n);if(i+s>n)return!1;let c=-1;for(;++cA.length)&&(t=A.length),t-=e.length;const n=A.indexOf(e,t);return-1!==n&&n===t}),String.prototype.repeat||(String.prototype.repeat=function(e){if(null===this)throw new TypeError("can't convert "+this+" to object");let t=""+this;if(e=+e,Number.isNaN(e)&&(e=0),e<0)throw new RangeError("repeat count must be non-negative");if(e===1/0)throw new RangeError("repeat count must be less than infinity");if(e=Math.floor(e),0===t.length||0===e)return"";if(t.length*e>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");let A="";for(;1&~e||(A+=t),0!=(e>>>=1);)t+=t;return A}),String.prototype.includes||(String.prototype.includes=function(e,t){return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),Array.prototype.includes||(Array.prototype.includes=function(e){if(null==this)throw new TypeError("Array.prototype.includes called on null or undefined");const t=Object(this),A=parseInt(t.length,10)||0;if(0===A)return!1;const n=parseInt(arguments[1],10)||0;let r,i;for(n>=0?r=n:(r=A+n,r<0&&(r=0));r1?arguments[1]:void 0;let i;if(void 0!==r){if(!t(r))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(i=arguments[2])}const o=function(e){const t=function(e){const t=Number(e);return isNaN(t)?0:0!==t&&isFinite(t)?(t>0?1:-1)*Math.floor(Math.abs(t)):t}(e);return Math.min(Math.max(t,0),A)}(n.length),a=t(this)?Object(new this(o)):new Array(o);let s,c=0;for(;c>>0;if("function"!=typeof e)throw TypeError("predicate must be a function");const n=arguments[1];let r=0;for(;r>>0,n=0|arguments[1];let r=n<0?Math.max(A+n,0):Math.min(n,A);const i=arguments[2],o=void 0===i?A:0|i,a=o<0?Math.max(A+o,0):Math.min(o,A);for(;r>>0,r=0|e;let i=r<0?Math.max(n+r,0):Math.min(r,n);const o=0|t;let a=o<0?Math.max(n+o,0):Math.min(o,n);const s=arguments[2],c=void 0===s?n:0|s,l=c<0?Math.max(n+c,0):Math.min(c,n);let u=Math.min(l-a,n-i),g=1;for(a0;)a in A?A[i]=A[a]:delete A[i],a+=g,i+=g,u--;return A},configurable:!0,writable:!0}),Int8Array.prototype.copyWithin||Object.defineProperty(Int8Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Int16Array.prototype.copyWithin||Object.defineProperty(Int16Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Int32Array.prototype.copyWithin||Object.defineProperty(Int32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint8Array.prototype.copyWithin||Object.defineProperty(Uint8Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint16Array.prototype.copyWithin||Object.defineProperty(Uint16Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Uint32Array.prototype.copyWithin||Object.defineProperty(Uint32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Float32Array.prototype.copyWithin||Object.defineProperty(Float32Array.prototype,"copyWithin",{value:Array.prototype.copyWithin}),Float64Array.prototype.copyWithin||Object.defineProperty(Float64Array.prototype,"copyWithin",{value:Array.prototype.copyWithin})},2061:e=>{e.exports=function(e,t){for(var A=e.length,n=-1;++n{var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach((function(A){(0|A)==A&&(A|=0);var n=e[A];t[n]=A})),t},n.der=A(4598)},2211:(e,t,A)=>{"use strict";var n=A(3349),r=A(6698),i=A(7626),o=A(2808);function a(){this.tmp=new Array(2),this.keys=null}function s(e){o.call(this,e);var t=new a;this._desState=t,this.deriveKeys(t,e.key)}r(s,o),e.exports=s,s.create=function(e){return new s(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];s.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var A=i.readUInt32BE(t,0),r=i.readUInt32BE(t,4);i.pc1(A,r,e.tmp,0),A=e.tmp[0],r=e.tmp[1];for(var o=0;o>>1];A=i.r28shl(A,a),r=i.r28shl(r,a),i.pc2(A,r,e.keys,o)}},s.prototype._update=function(e,t,A,n){var r=this._desState,o=i.readUInt32BE(e,t),a=i.readUInt32BE(e,t+4);i.ip(o,a,r.tmp,0),o=r.tmp[0],a=r.tmp[1],"encrypt"===this.type?this._encrypt(r,o,a,r.tmp,0):this._decrypt(r,o,a,r.tmp,0),o=r.tmp[0],a=r.tmp[1],i.writeUInt32BE(A,o,n),i.writeUInt32BE(A,a,n+4)},s.prototype._pad=function(e,t){if(!1===this.padding)return!1;for(var A=e.length-t,n=t;n>>0,o=g}i.rip(a,o,n,r)},s.prototype._decrypt=function(e,t,A,n,r){for(var o=A,a=t,s=e.keys.length-2;s>=0;s-=2){var c=e.keys[s],l=e.keys[s+1];i.expand(o,e.tmp,0),c^=e.tmp[0],l^=e.tmp[1];var u=i.substitute(c,l),g=o;o=(a^i.permute(u))>>>0,a=g}i.rip(o,a,n,r)}},2240:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},2244:(e,t,A)=>{var n=A(1158),r=A(5037);function i(e){this.rand=e||new r.Rand}e.exports=i,i.create=function(e){return new i(e)},i.prototype._randbelow=function(e){var t=e.bitLength(),A=Math.ceil(t/8);do{var r=new n(this.rand.generate(A))}while(r.cmp(e)>=0);return r},i.prototype._randrange=function(e,t){var A=t.sub(e);return e.add(this._randbelow(A))},i.prototype.test=function(e,t,A){var r=e.bitLength(),i=n.mont(e),o=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var a=e.subn(1),s=0;!a.testn(s);s++);for(var c=e.shrn(s),l=a.toRed(i);t>0;t--){var u=this._randrange(new n(2),a);A&&A(u);var g=u.toRed(i).redPow(c);if(0!==g.cmp(o)&&0!==g.cmp(l)){for(var d=1;d0;t--){var l=this._randrange(new n(2),o),u=e.gcd(l);if(0!==u.cmpn(1))return u;var g=l.toRed(r).redPow(s);if(0!==g.cmp(i)&&0!==g.cmp(c)){for(var d=1;d{"use strict";var n=A(7426),r=A(6166),i=A(6225),o=A(3349),a=n.sum32,s=n.sum32_4,c=n.sum32_5,l=i.ch32,u=i.maj32,g=i.s0_256,d=i.s1_256,B=i.g0_256,h=i.g1_256,I=r.BlockHash,Q=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function p(){if(!(this instanceof p))return new p;I.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Q,this.W=new Array(64)}n.inherits(p,I),e.exports=p,p.blockSize=512,p.outSize=256,p.hmacStrength=192,p.padLength=64,p.prototype._update=function(e,t){for(var A=this.W,n=0;n<16;n++)A[n]=e[t+n];for(;n=65&&A<=70?A-55:A>=97&&A<=102?A-87:A-48&15}function s(e,t,A){var n=a(e,A);return A-1>=t&&(n|=a(e,A-1)<<4),n}function c(e,t,A,n){for(var r=0,i=Math.min(e.length,A),o=t;o=49?a-49+10:a>=17?a-17+10:a}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,A){if("number"==typeof e)return this._initNumber(e,t,A);if("object"==typeof e)return this._initArray(e,t,A);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===A)for(r=0,i=0;r>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,A){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,A){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-A,o=i%n,a=Math.min(i,i-o)+A,s=0,l=A;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[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 d(e,t,A){A.negative=t.negative^e.negative;var n=e.length+t.length|0;A.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,a=67108863&o,s=o/67108864|0;A.words[0]=a;for(var c=1;c>>26,u=67108863&s,g=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=g;d++){var B=c-d|0;l+=(o=(r=0|e.words[B])*(i=0|t.words[d])+u)/67108864|0,u=67108863&o}A.words[c]=0|u,s=0|l}return 0!==s?A.words[c]=0|s:A.length--,A.strip()}i.prototype.toString=function(e,t){var A;if(t=0|t||1,16===(e=e||10)||"hex"===e){A="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?l[6-s.length]+s+A:s+A,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(A=i.toString(16)+A);A.length%t!==0;)A="0"+A;return 0!==this.negative&&(A="-"+A),A}if(e===(0|e)&&e>=2&&e<=36){var c=u[e],d=g[e];A="";var B=this.clone();for(B.negative=0;!B.isZero();){var h=B.modn(d).toString(e);A=(B=B.idivn(d)).isZero()?h+A:l[c-h.length]+h+A}for(this.isZero()&&(A="0"+A);A.length%t!==0;)A="0"+A;return 0!==this.negative&&(A="-"+A),A}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,A){var r=this.byteLength(),i=A||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,a,s="le"===t,c=new e(i),l=this.clone();if(s){for(a=0;!l.isZero();a++)o=l.andln(255),l.iushrn(8),c[a]=o;for(;a=4096&&(A+=13,t>>>=13),t>=64&&(A+=7,t>>>=7),t>=8&&(A+=4,t>>>=4),t>=2&&(A+=2,t>>>=2),A+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,A=0;return 8191&t||(A+=13,t>>>=13),127&t||(A+=7,t>>>=7),15&t||(A+=4,t>>>=4),3&t||(A+=2,t>>>=2),1&t||A++,A},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var A=0;Ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,A;this.length>e.length?(t=this,A=e):(t=e,A=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),A=e%26;this._expand(t),A>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-A),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var A=e/26|0,r=e%26;return this._expand(A+1),this.words[A]=t?this.words[A]|1<e.length?(A=this,n=e):(A=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=A.length,0!==r)this.words[this.length]=r,this.length++;else if(A!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var A,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(A=this,n=e):(A=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,d=0|o[1],B=8191&d,h=d>>>13,I=0|o[2],Q=8191&I,p=I>>>13,f=0|o[3],E=8191&f,m=f>>>13,C=0|o[4],y=8191&C,v=C>>>13,b=0|o[5],w=8191&b,D=b>>>13,S=0|o[6],F=8191&S,x=S>>>13,U=0|o[7],N=8191&U,R=U>>>13,M=0|o[8],L=8191&M,k=M>>>13,G=0|o[9],H=8191&G,_=G>>>13,Y=0|a[0],T=8191&Y,V=Y>>>13,P=0|a[1],O=8191&P,K=P>>>13,J=0|a[2],j=8191&J,z=J>>>13,q=0|a[3],Z=8191&q,W=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],Ae=8191&te,ne=te>>>13,re=0|a[6],ie=8191&re,oe=re>>>13,ae=0|a[7],se=8191&ae,ce=ae>>>13,le=0|a[8],ue=8191&le,ge=le>>>13,de=0|a[9],Be=8191&de,he=de>>>13;A.negative=e.negative^t.negative,A.length=19;var Ie=(c+(n=Math.imul(u,T))|0)+((8191&(r=(r=Math.imul(u,V))+Math.imul(g,T)|0))<<13)|0;c=((i=Math.imul(g,V))+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(B,T),r=(r=Math.imul(B,V))+Math.imul(h,T)|0,i=Math.imul(h,V);var Qe=(c+(n=n+Math.imul(u,O)|0)|0)+((8191&(r=(r=r+Math.imul(u,K)|0)+Math.imul(g,O)|0))<<13)|0;c=((i=i+Math.imul(g,K)|0)+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,n=Math.imul(Q,T),r=(r=Math.imul(Q,V))+Math.imul(p,T)|0,i=Math.imul(p,V),n=n+Math.imul(B,O)|0,r=(r=r+Math.imul(B,K)|0)+Math.imul(h,O)|0,i=i+Math.imul(h,K)|0;var pe=(c+(n=n+Math.imul(u,j)|0)|0)+((8191&(r=(r=r+Math.imul(u,z)|0)+Math.imul(g,j)|0))<<13)|0;c=((i=i+Math.imul(g,z)|0)+(r>>>13)|0)+(pe>>>26)|0,pe&=67108863,n=Math.imul(E,T),r=(r=Math.imul(E,V))+Math.imul(m,T)|0,i=Math.imul(m,V),n=n+Math.imul(Q,O)|0,r=(r=r+Math.imul(Q,K)|0)+Math.imul(p,O)|0,i=i+Math.imul(p,K)|0,n=n+Math.imul(B,j)|0,r=(r=r+Math.imul(B,z)|0)+Math.imul(h,j)|0,i=i+Math.imul(h,z)|0;var fe=(c+(n=n+Math.imul(u,Z)|0)|0)+((8191&(r=(r=r+Math.imul(u,W)|0)+Math.imul(g,Z)|0))<<13)|0;c=((i=i+Math.imul(g,W)|0)+(r>>>13)|0)+(fe>>>26)|0,fe&=67108863,n=Math.imul(y,T),r=(r=Math.imul(y,V))+Math.imul(v,T)|0,i=Math.imul(v,V),n=n+Math.imul(E,O)|0,r=(r=r+Math.imul(E,K)|0)+Math.imul(m,O)|0,i=i+Math.imul(m,K)|0,n=n+Math.imul(Q,j)|0,r=(r=r+Math.imul(Q,z)|0)+Math.imul(p,j)|0,i=i+Math.imul(p,z)|0,n=n+Math.imul(B,Z)|0,r=(r=r+Math.imul(B,W)|0)+Math.imul(h,Z)|0,i=i+Math.imul(h,W)|0;var Ee=(c+(n=n+Math.imul(u,$)|0)|0)+((8191&(r=(r=r+Math.imul(u,ee)|0)+Math.imul(g,$)|0))<<13)|0;c=((i=i+Math.imul(g,ee)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(w,T),r=(r=Math.imul(w,V))+Math.imul(D,T)|0,i=Math.imul(D,V),n=n+Math.imul(y,O)|0,r=(r=r+Math.imul(y,K)|0)+Math.imul(v,O)|0,i=i+Math.imul(v,K)|0,n=n+Math.imul(E,j)|0,r=(r=r+Math.imul(E,z)|0)+Math.imul(m,j)|0,i=i+Math.imul(m,z)|0,n=n+Math.imul(Q,Z)|0,r=(r=r+Math.imul(Q,W)|0)+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(B,$)|0,r=(r=r+Math.imul(B,ee)|0)+Math.imul(h,$)|0,i=i+Math.imul(h,ee)|0;var me=(c+(n=n+Math.imul(u,Ae)|0)|0)+((8191&(r=(r=r+Math.imul(u,ne)|0)+Math.imul(g,Ae)|0))<<13)|0;c=((i=i+Math.imul(g,ne)|0)+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(F,T),r=(r=Math.imul(F,V))+Math.imul(x,T)|0,i=Math.imul(x,V),n=n+Math.imul(w,O)|0,r=(r=r+Math.imul(w,K)|0)+Math.imul(D,O)|0,i=i+Math.imul(D,K)|0,n=n+Math.imul(y,j)|0,r=(r=r+Math.imul(y,z)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,z)|0,n=n+Math.imul(E,Z)|0,r=(r=r+Math.imul(E,W)|0)+Math.imul(m,Z)|0,i=i+Math.imul(m,W)|0,n=n+Math.imul(Q,$)|0,r=(r=r+Math.imul(Q,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(B,Ae)|0,r=(r=r+Math.imul(B,ne)|0)+Math.imul(h,Ae)|0,i=i+Math.imul(h,ne)|0;var Ce=(c+(n=n+Math.imul(u,ie)|0)|0)+((8191&(r=(r=r+Math.imul(u,oe)|0)+Math.imul(g,ie)|0))<<13)|0;c=((i=i+Math.imul(g,oe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(N,T),r=(r=Math.imul(N,V))+Math.imul(R,T)|0,i=Math.imul(R,V),n=n+Math.imul(F,O)|0,r=(r=r+Math.imul(F,K)|0)+Math.imul(x,O)|0,i=i+Math.imul(x,K)|0,n=n+Math.imul(w,j)|0,r=(r=r+Math.imul(w,z)|0)+Math.imul(D,j)|0,i=i+Math.imul(D,z)|0,n=n+Math.imul(y,Z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(E,$)|0,r=(r=r+Math.imul(E,ee)|0)+Math.imul(m,$)|0,i=i+Math.imul(m,ee)|0,n=n+Math.imul(Q,Ae)|0,r=(r=r+Math.imul(Q,ne)|0)+Math.imul(p,Ae)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(B,ie)|0,r=(r=r+Math.imul(B,oe)|0)+Math.imul(h,ie)|0,i=i+Math.imul(h,oe)|0;var ye=(c+(n=n+Math.imul(u,se)|0)|0)+((8191&(r=(r=r+Math.imul(u,ce)|0)+Math.imul(g,se)|0))<<13)|0;c=((i=i+Math.imul(g,ce)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(L,T),r=(r=Math.imul(L,V))+Math.imul(k,T)|0,i=Math.imul(k,V),n=n+Math.imul(N,O)|0,r=(r=r+Math.imul(N,K)|0)+Math.imul(R,O)|0,i=i+Math.imul(R,K)|0,n=n+Math.imul(F,j)|0,r=(r=r+Math.imul(F,z)|0)+Math.imul(x,j)|0,i=i+Math.imul(x,z)|0,n=n+Math.imul(w,Z)|0,r=(r=r+Math.imul(w,W)|0)+Math.imul(D,Z)|0,i=i+Math.imul(D,W)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(E,Ae)|0,r=(r=r+Math.imul(E,ne)|0)+Math.imul(m,Ae)|0,i=i+Math.imul(m,ne)|0,n=n+Math.imul(Q,ie)|0,r=(r=r+Math.imul(Q,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0,n=n+Math.imul(B,se)|0,r=(r=r+Math.imul(B,ce)|0)+Math.imul(h,se)|0,i=i+Math.imul(h,ce)|0;var ve=(c+(n=n+Math.imul(u,ue)|0)|0)+((8191&(r=(r=r+Math.imul(u,ge)|0)+Math.imul(g,ue)|0))<<13)|0;c=((i=i+Math.imul(g,ge)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(H,T),r=(r=Math.imul(H,V))+Math.imul(_,T)|0,i=Math.imul(_,V),n=n+Math.imul(L,O)|0,r=(r=r+Math.imul(L,K)|0)+Math.imul(k,O)|0,i=i+Math.imul(k,K)|0,n=n+Math.imul(N,j)|0,r=(r=r+Math.imul(N,z)|0)+Math.imul(R,j)|0,i=i+Math.imul(R,z)|0,n=n+Math.imul(F,Z)|0,r=(r=r+Math.imul(F,W)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,W)|0,n=n+Math.imul(w,$)|0,r=(r=r+Math.imul(w,ee)|0)+Math.imul(D,$)|0,i=i+Math.imul(D,ee)|0,n=n+Math.imul(y,Ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(v,Ae)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(E,ie)|0,r=(r=r+Math.imul(E,oe)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,oe)|0,n=n+Math.imul(Q,se)|0,r=(r=r+Math.imul(Q,ce)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(B,ue)|0,r=(r=r+Math.imul(B,ge)|0)+Math.imul(h,ue)|0,i=i+Math.imul(h,ge)|0;var be=(c+(n=n+Math.imul(u,Be)|0)|0)+((8191&(r=(r=r+Math.imul(u,he)|0)+Math.imul(g,Be)|0))<<13)|0;c=((i=i+Math.imul(g,he)|0)+(r>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(H,O),r=(r=Math.imul(H,K))+Math.imul(_,O)|0,i=Math.imul(_,K),n=n+Math.imul(L,j)|0,r=(r=r+Math.imul(L,z)|0)+Math.imul(k,j)|0,i=i+Math.imul(k,z)|0,n=n+Math.imul(N,Z)|0,r=(r=r+Math.imul(N,W)|0)+Math.imul(R,Z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(F,$)|0,r=(r=r+Math.imul(F,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,n=n+Math.imul(w,Ae)|0,r=(r=r+Math.imul(w,ne)|0)+Math.imul(D,Ae)|0,i=i+Math.imul(D,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(E,se)|0,r=(r=r+Math.imul(E,ce)|0)+Math.imul(m,se)|0,i=i+Math.imul(m,ce)|0,n=n+Math.imul(Q,ue)|0,r=(r=r+Math.imul(Q,ge)|0)+Math.imul(p,ue)|0,i=i+Math.imul(p,ge)|0;var we=(c+(n=n+Math.imul(B,Be)|0)|0)+((8191&(r=(r=r+Math.imul(B,he)|0)+Math.imul(h,Be)|0))<<13)|0;c=((i=i+Math.imul(h,he)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(H,j),r=(r=Math.imul(H,z))+Math.imul(_,j)|0,i=Math.imul(_,z),n=n+Math.imul(L,Z)|0,r=(r=r+Math.imul(L,W)|0)+Math.imul(k,Z)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(N,$)|0,r=(r=r+Math.imul(N,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(F,Ae)|0,r=(r=r+Math.imul(F,ne)|0)+Math.imul(x,Ae)|0,i=i+Math.imul(x,ne)|0,n=n+Math.imul(w,ie)|0,r=(r=r+Math.imul(w,oe)|0)+Math.imul(D,ie)|0,i=i+Math.imul(D,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,ce)|0)+Math.imul(v,se)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(E,ue)|0,r=(r=r+Math.imul(E,ge)|0)+Math.imul(m,ue)|0,i=i+Math.imul(m,ge)|0;var De=(c+(n=n+Math.imul(Q,Be)|0)|0)+((8191&(r=(r=r+Math.imul(Q,he)|0)+Math.imul(p,Be)|0))<<13)|0;c=((i=i+Math.imul(p,he)|0)+(r>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(H,Z),r=(r=Math.imul(H,W))+Math.imul(_,Z)|0,i=Math.imul(_,W),n=n+Math.imul(L,$)|0,r=(r=r+Math.imul(L,ee)|0)+Math.imul(k,$)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(N,Ae)|0,r=(r=r+Math.imul(N,ne)|0)+Math.imul(R,Ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(F,ie)|0,r=(r=r+Math.imul(F,oe)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,oe)|0,n=n+Math.imul(w,se)|0,r=(r=r+Math.imul(w,ce)|0)+Math.imul(D,se)|0,i=i+Math.imul(D,ce)|0,n=n+Math.imul(y,ue)|0,r=(r=r+Math.imul(y,ge)|0)+Math.imul(v,ue)|0,i=i+Math.imul(v,ge)|0;var Se=(c+(n=n+Math.imul(E,Be)|0)|0)+((8191&(r=(r=r+Math.imul(E,he)|0)+Math.imul(m,Be)|0))<<13)|0;c=((i=i+Math.imul(m,he)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(H,$),r=(r=Math.imul(H,ee))+Math.imul(_,$)|0,i=Math.imul(_,ee),n=n+Math.imul(L,Ae)|0,r=(r=r+Math.imul(L,ne)|0)+Math.imul(k,Ae)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(N,ie)|0,r=(r=r+Math.imul(N,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(F,se)|0,r=(r=r+Math.imul(F,ce)|0)+Math.imul(x,se)|0,i=i+Math.imul(x,ce)|0,n=n+Math.imul(w,ue)|0,r=(r=r+Math.imul(w,ge)|0)+Math.imul(D,ue)|0,i=i+Math.imul(D,ge)|0;var Fe=(c+(n=n+Math.imul(y,Be)|0)|0)+((8191&(r=(r=r+Math.imul(y,he)|0)+Math.imul(v,Be)|0))<<13)|0;c=((i=i+Math.imul(v,he)|0)+(r>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(H,Ae),r=(r=Math.imul(H,ne))+Math.imul(_,Ae)|0,i=Math.imul(_,ne),n=n+Math.imul(L,ie)|0,r=(r=r+Math.imul(L,oe)|0)+Math.imul(k,ie)|0,i=i+Math.imul(k,oe)|0,n=n+Math.imul(N,se)|0,r=(r=r+Math.imul(N,ce)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,ce)|0,n=n+Math.imul(F,ue)|0,r=(r=r+Math.imul(F,ge)|0)+Math.imul(x,ue)|0,i=i+Math.imul(x,ge)|0;var xe=(c+(n=n+Math.imul(w,Be)|0)|0)+((8191&(r=(r=r+Math.imul(w,he)|0)+Math.imul(D,Be)|0))<<13)|0;c=((i=i+Math.imul(D,he)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(H,ie),r=(r=Math.imul(H,oe))+Math.imul(_,ie)|0,i=Math.imul(_,oe),n=n+Math.imul(L,se)|0,r=(r=r+Math.imul(L,ce)|0)+Math.imul(k,se)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(N,ue)|0,r=(r=r+Math.imul(N,ge)|0)+Math.imul(R,ue)|0,i=i+Math.imul(R,ge)|0;var Ue=(c+(n=n+Math.imul(F,Be)|0)|0)+((8191&(r=(r=r+Math.imul(F,he)|0)+Math.imul(x,Be)|0))<<13)|0;c=((i=i+Math.imul(x,he)|0)+(r>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,n=Math.imul(H,se),r=(r=Math.imul(H,ce))+Math.imul(_,se)|0,i=Math.imul(_,ce),n=n+Math.imul(L,ue)|0,r=(r=r+Math.imul(L,ge)|0)+Math.imul(k,ue)|0,i=i+Math.imul(k,ge)|0;var Ne=(c+(n=n+Math.imul(N,Be)|0)|0)+((8191&(r=(r=r+Math.imul(N,he)|0)+Math.imul(R,Be)|0))<<13)|0;c=((i=i+Math.imul(R,he)|0)+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(H,ue),r=(r=Math.imul(H,ge))+Math.imul(_,ue)|0,i=Math.imul(_,ge);var Re=(c+(n=n+Math.imul(L,Be)|0)|0)+((8191&(r=(r=r+Math.imul(L,he)|0)+Math.imul(k,Be)|0))<<13)|0;c=((i=i+Math.imul(k,he)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Me=(c+(n=Math.imul(H,Be))|0)+((8191&(r=(r=Math.imul(H,he))+Math.imul(_,Be)|0))<<13)|0;return c=((i=Math.imul(_,he))+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,s[0]=Ie,s[1]=Qe,s[2]=pe,s[3]=fe,s[4]=Ee,s[5]=me,s[6]=Ce,s[7]=ye,s[8]=ve,s[9]=be,s[10]=we,s[11]=De,s[12]=Se,s[13]=Fe,s[14]=xe,s[15]=Ue,s[16]=Ne,s[17]=Re,s[18]=Me,0!==c&&(s[19]=c,A.length++),A};function h(e,t,A){return(new I).mulp(e,t,A)}function I(e,t){this.x=e,this.y=t}Math.imul||(B=d),i.prototype.mulTo=function(e,t){var A,n=this.length+e.length;return A=10===this.length&&10===e.length?B(this,e,t):n<63?d(this,e,t):n<1024?function(e,t,A){A.negative=t.negative^e.negative,A.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}A.words[i]=a,n=o,o=r}return 0!==n?A.words[i]=n:A.length--,A.strip()}(this,e,t):h(this,e,t),A},I.prototype.makeRBT=function(e){for(var t=new Array(e),A=i.prototype._countBits(e)-1,n=0;n>=1;return n},I.prototype.permute=function(e,t,A,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,A[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[A]=67108863&i}return 0!==t&&(this.words[A]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),A=0;A>>r}return t}(e);if(0===t.length)return new i(1);for(var A=this,n=0;n=0);var t,A=e%26,r=(e-A)/26,i=67108863>>>26-A<<26-A;if(0!==A){var o=0;for(t=0;t>>26-A}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),a=67108863^67108863>>>i<o)for(this.length-=o,c=0;c=0&&(0!==l||c>=r);c--){var u=0|this.words[c];this.words[c]=l<<26-i|u>>>i,l=u&a}return s&&0!==l&&(s.words[s.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,A){return n(0===this.negative),this.iushrn(e,t,A)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,A=(e-t)/26,r=1<=0);var t=e%26,A=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=A)return this;if(0!==t&&A++,this.length=Math.min(A,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+A]=67108863&i}for(;r>26,this.words[r+A]=67108863&i;if(0===a)return this.strip();for(n(-1===a),a=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var A=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(A=26-this._countBits(o))&&(r=r.ushln(A),n.iushln(A),o=0|r.words[r.length-1]);var a,s=n.length-r.length;if("mod"!==t){(a=new i(null)).length=s+1,a.words=new Array(a.length);for(var c=0;c=0;u--){var g=67108864*(0|n.words[r.length+u])+(0|n.words[r.length+u-1]);for(g=Math.min(g/o|0,67108863),n._ishlnsubmul(r,g,u);0!==n.negative;)g--,n.negative=0,n._ishlnsubmul(r,1,u),n.isZero()||(n.negative^=1);a&&(a.words[u]=g)}return a&&a.strip(),n.strip(),"div"!==t&&0!==A&&n.iushrn(A),{div:a||null,mod:n}},i.prototype.divmod=function(e,t,A){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(r=a.div.neg()),"div"!==t&&(o=a.mod.neg(),A&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(r=a.div.neg()),{div:r,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),A&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,a},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var A=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=A.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,A=0,r=this.length-1;r>=0;r--)A=(t*A+(0|this.words[r]))%e;return A},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,A=this.length-1;A>=0;A--){var r=(0|this.words[A])+67108864*t;this.words[A]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,A=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),a=new i(0),s=new i(1),c=0;t.isEven()&&A.isEven();)t.iushrn(1),A.iushrn(1),++c;for(var l=A.clone(),u=t.clone();!t.isZero();){for(var g=0,d=1;0===(t.words[0]&d)&&g<26;++g,d<<=1);if(g>0)for(t.iushrn(g);g-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(l),o.isub(u)),r.iushrn(1),o.iushrn(1);for(var B=0,h=1;0===(A.words[0]&h)&&B<26;++B,h<<=1);if(B>0)for(A.iushrn(B);B-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(l),s.isub(u)),a.iushrn(1),s.iushrn(1);t.cmp(A)>=0?(t.isub(A),r.isub(a),o.isub(s)):(A.isub(t),a.isub(r),s.isub(o))}return{a,b:s,gcd:A.iushln(c)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,A=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),a=new i(0),s=A.clone();t.cmpn(1)>0&&A.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var u=0,g=1;0===(A.words[0]&g)&&u<26;++u,g<<=1);if(u>0)for(A.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);t.cmp(A)>=0?(t.isub(A),o.isub(a)):(A.isub(t),a.isub(o))}return(r=0===t.cmpn(1)?o:a).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),A=e.clone();t.negative=0,A.negative=0;for(var n=0;t.isEven()&&A.isEven();n++)t.iushrn(1),A.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;A.isEven();)A.iushrn(1);var r=t.cmp(A);if(r<0){var i=t;t=A,A=i}else if(0===r||0===A.cmpn(1))break;t.isub(A)}return A.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,A=(e-t)/26,r=1<>>26,a&=67108863,this.words[o]=a}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,A=e<0;if(0!==this.negative&&!A)return-1;if(0===this.negative&&A)return 1;if(this.strip(),this.length>1)t=1;else{A&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;A--){var n=0|this.words[A],r=0|e.words[A];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new y(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var Q={k256:null,p224:null,p192:null,p25519:null};function p(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function f(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function m(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function v(e){y.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}p.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},p.prototype.ireduce=function(e){var t,A=e;do{this.split(A,this.tmp),t=(A=(A=this.imulK(A)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?A.isub(this.p):void 0!==A.strip?A.strip():A._strip(),A},p.prototype.split=function(e,t){e.iushrn(this.n,0,t)},p.prototype.imulK=function(e){return e.imul(this.k)},r(f,p),f.prototype.split=function(e,t){for(var A=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},f.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,A=0;A>>=26,e.words[A]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(Q[e])return Q[e];var t;if("k256"===e)t=new f;else if("p224"===e)t=new E;else if("p192"===e)t=new m;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return Q[e]=t,t},y.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},y.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},y.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},y.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},y.prototype.add=function(e,t){this._verify2(e,t);var A=e.add(t);return A.cmp(this.m)>=0&&A.isub(this.m),A._forceRed(this)},y.prototype.iadd=function(e,t){this._verify2(e,t);var A=e.iadd(t);return A.cmp(this.m)>=0&&A.isub(this.m),A},y.prototype.sub=function(e,t){this._verify2(e,t);var A=e.sub(t);return A.cmpn(0)<0&&A.iadd(this.m),A._forceRed(this)},y.prototype.isub=function(e,t){this._verify2(e,t);var A=e.isub(t);return A.cmpn(0)<0&&A.iadd(this.m),A},y.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},y.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},y.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},y.prototype.isqr=function(e){return this.imul(e,e.clone())},y.prototype.sqr=function(e){return this.mul(e,e)},y.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var A=this.m.add(new i(1)).iushrn(2);return this.pow(e,A)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var a=new i(1).toRed(this),s=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,c).cmp(s);)l.redIAdd(s);for(var u=this.pow(l,r),g=this.pow(e,r.addn(1).iushrn(1)),d=this.pow(e,r),B=o;0!==d.cmp(a);){for(var h=d,I=0;0!==h.cmp(a);I++)h=h.redSqr();n(I=0;n--){for(var c=t.words[n],l=s-1;l>=0;l--){var u=c>>l&1;r!==A[0]&&(r=this.sqr(r)),0!==u||0!==o?(o<<=1,o|=u,(4===++a||0===n&&0===l)&&(r=this.mul(r,A[o]),a=0,o=0)):a=0}s=26}return r},y.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},y.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new v(e)},r(v,y),v.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},v.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},v.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var A=e.imul(t),n=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=A.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var A=e.mul(t),n=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=A.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},v.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=A.nmd(e),this)},2356:(e,t,A)=>{var n=A(462),r=A(2861).Buffer,i=A(6168),o=A(6698),a=A(5892),s=A(295),c=A(5122);function l(e,t,A,o){i.call(this);var s=r.alloc(4,0);this._cipher=new n.AES(t);var l=this._cipher.encryptBlock(s);this._ghash=new a(l),A=function(e,t,A){if(12===t.length)return e._finID=r.concat([t,r.from([0,0,0,1])]),r.concat([t,r.from([0,0,0,2])]);var n=new a(A),i=t.length,o=i%16;n.update(t),o&&(o=16-o,n.update(r.alloc(o,0))),n.update(r.alloc(8,0));var s=8*i,l=r.alloc(8);l.writeUIntBE(s,0,8),n.update(l),e._finID=n.state;var u=r.from(e._finID);return c(u),u}(this,A,l),this._prev=r.from(A),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=o,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}o(l,i),l.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=r.alloc(t,0),this._ghash.update(t))}this._called=!0;var A=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(A),this._len+=e.length,A},l.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=s(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var A=0;e.length!==t.length&&A++;for(var n=Math.min(e.length,t.length),r=0;r{t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},2455:(e,t,A)=>{var n;n=A.g.process&&A.g.process.browser?"utf-8":A.g.process&&A.g.process.version?parseInt(process.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",e.exports=n},2509:function(e,t,A){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var A=function(){};A.prototype=t.prototype,e.prototype=new A,e.prototype.constructor=e}function i(e,t,A){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(A=t,t=10),this._init(e||0,t||10,A||"be"))}var o;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:A(1069).Buffer}catch(e){}function a(e,t){var A=e.charCodeAt(t);return A>=65&&A<=70?A-55:A>=97&&A<=102?A-87:A-48&15}function s(e,t,A){var n=a(e,A);return A-1>=t&&(n|=a(e,A-1)<<4),n}function c(e,t,A,n){for(var r=0,i=Math.min(e.length,A),o=t;o=49?a-49+10:a>=17?a-17+10:a}return r}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,A){if("number"==typeof e)return this._initNumber(e,t,A);if("object"==typeof e)return this._initArray(e,t,A);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var r=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(r++,this.negative=1),r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=o<>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===A)for(r=0,i=0;r>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,A){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)r=s(e,t,n)<=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,o+=1,this.words[o]|=r>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,A){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=t)n++;n--,r=r/t|0;for(var i=e.length-A,o=i%n,a=Math.min(i,i-o)+A,s=0,l=A;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],g=[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 d(e,t,A){A.negative=t.negative^e.negative;var n=e.length+t.length|0;A.length=n,n=n-1|0;var r=0|e.words[0],i=0|t.words[0],o=r*i,a=67108863&o,s=o/67108864|0;A.words[0]=a;for(var c=1;c>>26,u=67108863&s,g=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=g;d++){var B=c-d|0;l+=(o=(r=0|e.words[B])*(i=0|t.words[d])+u)/67108864|0,u=67108863&o}A.words[c]=0|u,s=0|l}return 0!==s?A.words[c]=0|s:A.length--,A.strip()}i.prototype.toString=function(e,t){var A;if(t=0|t||1,16===(e=e||10)||"hex"===e){A="";for(var r=0,i=0,o=0;o>>24-r&16777215)||o!==this.length-1?l[6-s.length]+s+A:s+A,(r+=2)>=26&&(r-=26,o--)}for(0!==i&&(A=i.toString(16)+A);A.length%t!==0;)A="0"+A;return 0!==this.negative&&(A="-"+A),A}if(e===(0|e)&&e>=2&&e<=36){var c=u[e],d=g[e];A="";var B=this.clone();for(B.negative=0;!B.isZero();){var h=B.modn(d).toString(e);A=(B=B.idivn(d)).isZero()?h+A:l[c-h.length]+h+A}for(this.isZero()&&(A="0"+A);A.length%t!==0;)A="0"+A;return 0!==this.negative&&(A="-"+A),A}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,A){var r=this.byteLength(),i=A||Math.max(1,r);n(r<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var o,a,s="le"===t,c=new e(i),l=this.clone();if(s){for(a=0;!l.isZero();a++)o=l.andln(255),l.iushrn(8),c[a]=o;for(;a=4096&&(A+=13,t>>>=13),t>=64&&(A+=7,t>>>=7),t>=8&&(A+=4,t>>>=4),t>=2&&(A+=2,t>>>=2),A+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,A=0;return 8191&t||(A+=13,t>>>=13),127&t||(A+=7,t>>>=7),15&t||(A+=4,t>>>=4),3&t||(A+=2,t>>>=2),1&t||A++,A},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var A=0;Ae.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,A;this.length>e.length?(t=this,A=e):(t=e,A=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),A=e%26;this._expand(t),A>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-A),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var A=e/26|0,r=e%26;return this._expand(A+1),this.words[A]=t?this.words[A]|1<e.length?(A=this,n=e):(A=e,n=this);for(var r=0,i=0;i>>26;for(;0!==r&&i>>26;if(this.length=A.length,0!==r)this.words[this.length]=r,this.length++;else if(A!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var A,n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;r>0?(A=this,n=e):(A=e,n=this);for(var i=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==i&&o>26,this.words[o]=67108863&t;if(0===i&&o>>13,d=0|o[1],B=8191&d,h=d>>>13,I=0|o[2],Q=8191&I,p=I>>>13,f=0|o[3],E=8191&f,m=f>>>13,C=0|o[4],y=8191&C,v=C>>>13,b=0|o[5],w=8191&b,D=b>>>13,S=0|o[6],F=8191&S,x=S>>>13,U=0|o[7],N=8191&U,R=U>>>13,M=0|o[8],L=8191&M,k=M>>>13,G=0|o[9],H=8191&G,_=G>>>13,Y=0|a[0],T=8191&Y,V=Y>>>13,P=0|a[1],O=8191&P,K=P>>>13,J=0|a[2],j=8191&J,z=J>>>13,q=0|a[3],Z=8191&q,W=q>>>13,X=0|a[4],$=8191&X,ee=X>>>13,te=0|a[5],Ae=8191&te,ne=te>>>13,re=0|a[6],ie=8191&re,oe=re>>>13,ae=0|a[7],se=8191&ae,ce=ae>>>13,le=0|a[8],ue=8191&le,ge=le>>>13,de=0|a[9],Be=8191&de,he=de>>>13;A.negative=e.negative^t.negative,A.length=19;var Ie=(c+(n=Math.imul(u,T))|0)+((8191&(r=(r=Math.imul(u,V))+Math.imul(g,T)|0))<<13)|0;c=((i=Math.imul(g,V))+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(B,T),r=(r=Math.imul(B,V))+Math.imul(h,T)|0,i=Math.imul(h,V);var Qe=(c+(n=n+Math.imul(u,O)|0)|0)+((8191&(r=(r=r+Math.imul(u,K)|0)+Math.imul(g,O)|0))<<13)|0;c=((i=i+Math.imul(g,K)|0)+(r>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,n=Math.imul(Q,T),r=(r=Math.imul(Q,V))+Math.imul(p,T)|0,i=Math.imul(p,V),n=n+Math.imul(B,O)|0,r=(r=r+Math.imul(B,K)|0)+Math.imul(h,O)|0,i=i+Math.imul(h,K)|0;var pe=(c+(n=n+Math.imul(u,j)|0)|0)+((8191&(r=(r=r+Math.imul(u,z)|0)+Math.imul(g,j)|0))<<13)|0;c=((i=i+Math.imul(g,z)|0)+(r>>>13)|0)+(pe>>>26)|0,pe&=67108863,n=Math.imul(E,T),r=(r=Math.imul(E,V))+Math.imul(m,T)|0,i=Math.imul(m,V),n=n+Math.imul(Q,O)|0,r=(r=r+Math.imul(Q,K)|0)+Math.imul(p,O)|0,i=i+Math.imul(p,K)|0,n=n+Math.imul(B,j)|0,r=(r=r+Math.imul(B,z)|0)+Math.imul(h,j)|0,i=i+Math.imul(h,z)|0;var fe=(c+(n=n+Math.imul(u,Z)|0)|0)+((8191&(r=(r=r+Math.imul(u,W)|0)+Math.imul(g,Z)|0))<<13)|0;c=((i=i+Math.imul(g,W)|0)+(r>>>13)|0)+(fe>>>26)|0,fe&=67108863,n=Math.imul(y,T),r=(r=Math.imul(y,V))+Math.imul(v,T)|0,i=Math.imul(v,V),n=n+Math.imul(E,O)|0,r=(r=r+Math.imul(E,K)|0)+Math.imul(m,O)|0,i=i+Math.imul(m,K)|0,n=n+Math.imul(Q,j)|0,r=(r=r+Math.imul(Q,z)|0)+Math.imul(p,j)|0,i=i+Math.imul(p,z)|0,n=n+Math.imul(B,Z)|0,r=(r=r+Math.imul(B,W)|0)+Math.imul(h,Z)|0,i=i+Math.imul(h,W)|0;var Ee=(c+(n=n+Math.imul(u,$)|0)|0)+((8191&(r=(r=r+Math.imul(u,ee)|0)+Math.imul(g,$)|0))<<13)|0;c=((i=i+Math.imul(g,ee)|0)+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(w,T),r=(r=Math.imul(w,V))+Math.imul(D,T)|0,i=Math.imul(D,V),n=n+Math.imul(y,O)|0,r=(r=r+Math.imul(y,K)|0)+Math.imul(v,O)|0,i=i+Math.imul(v,K)|0,n=n+Math.imul(E,j)|0,r=(r=r+Math.imul(E,z)|0)+Math.imul(m,j)|0,i=i+Math.imul(m,z)|0,n=n+Math.imul(Q,Z)|0,r=(r=r+Math.imul(Q,W)|0)+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,n=n+Math.imul(B,$)|0,r=(r=r+Math.imul(B,ee)|0)+Math.imul(h,$)|0,i=i+Math.imul(h,ee)|0;var me=(c+(n=n+Math.imul(u,Ae)|0)|0)+((8191&(r=(r=r+Math.imul(u,ne)|0)+Math.imul(g,Ae)|0))<<13)|0;c=((i=i+Math.imul(g,ne)|0)+(r>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(F,T),r=(r=Math.imul(F,V))+Math.imul(x,T)|0,i=Math.imul(x,V),n=n+Math.imul(w,O)|0,r=(r=r+Math.imul(w,K)|0)+Math.imul(D,O)|0,i=i+Math.imul(D,K)|0,n=n+Math.imul(y,j)|0,r=(r=r+Math.imul(y,z)|0)+Math.imul(v,j)|0,i=i+Math.imul(v,z)|0,n=n+Math.imul(E,Z)|0,r=(r=r+Math.imul(E,W)|0)+Math.imul(m,Z)|0,i=i+Math.imul(m,W)|0,n=n+Math.imul(Q,$)|0,r=(r=r+Math.imul(Q,ee)|0)+Math.imul(p,$)|0,i=i+Math.imul(p,ee)|0,n=n+Math.imul(B,Ae)|0,r=(r=r+Math.imul(B,ne)|0)+Math.imul(h,Ae)|0,i=i+Math.imul(h,ne)|0;var Ce=(c+(n=n+Math.imul(u,ie)|0)|0)+((8191&(r=(r=r+Math.imul(u,oe)|0)+Math.imul(g,ie)|0))<<13)|0;c=((i=i+Math.imul(g,oe)|0)+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(N,T),r=(r=Math.imul(N,V))+Math.imul(R,T)|0,i=Math.imul(R,V),n=n+Math.imul(F,O)|0,r=(r=r+Math.imul(F,K)|0)+Math.imul(x,O)|0,i=i+Math.imul(x,K)|0,n=n+Math.imul(w,j)|0,r=(r=r+Math.imul(w,z)|0)+Math.imul(D,j)|0,i=i+Math.imul(D,z)|0,n=n+Math.imul(y,Z)|0,r=(r=r+Math.imul(y,W)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,n=n+Math.imul(E,$)|0,r=(r=r+Math.imul(E,ee)|0)+Math.imul(m,$)|0,i=i+Math.imul(m,ee)|0,n=n+Math.imul(Q,Ae)|0,r=(r=r+Math.imul(Q,ne)|0)+Math.imul(p,Ae)|0,i=i+Math.imul(p,ne)|0,n=n+Math.imul(B,ie)|0,r=(r=r+Math.imul(B,oe)|0)+Math.imul(h,ie)|0,i=i+Math.imul(h,oe)|0;var ye=(c+(n=n+Math.imul(u,se)|0)|0)+((8191&(r=(r=r+Math.imul(u,ce)|0)+Math.imul(g,se)|0))<<13)|0;c=((i=i+Math.imul(g,ce)|0)+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(L,T),r=(r=Math.imul(L,V))+Math.imul(k,T)|0,i=Math.imul(k,V),n=n+Math.imul(N,O)|0,r=(r=r+Math.imul(N,K)|0)+Math.imul(R,O)|0,i=i+Math.imul(R,K)|0,n=n+Math.imul(F,j)|0,r=(r=r+Math.imul(F,z)|0)+Math.imul(x,j)|0,i=i+Math.imul(x,z)|0,n=n+Math.imul(w,Z)|0,r=(r=r+Math.imul(w,W)|0)+Math.imul(D,Z)|0,i=i+Math.imul(D,W)|0,n=n+Math.imul(y,$)|0,r=(r=r+Math.imul(y,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(E,Ae)|0,r=(r=r+Math.imul(E,ne)|0)+Math.imul(m,Ae)|0,i=i+Math.imul(m,ne)|0,n=n+Math.imul(Q,ie)|0,r=(r=r+Math.imul(Q,oe)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,oe)|0,n=n+Math.imul(B,se)|0,r=(r=r+Math.imul(B,ce)|0)+Math.imul(h,se)|0,i=i+Math.imul(h,ce)|0;var ve=(c+(n=n+Math.imul(u,ue)|0)|0)+((8191&(r=(r=r+Math.imul(u,ge)|0)+Math.imul(g,ue)|0))<<13)|0;c=((i=i+Math.imul(g,ge)|0)+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(H,T),r=(r=Math.imul(H,V))+Math.imul(_,T)|0,i=Math.imul(_,V),n=n+Math.imul(L,O)|0,r=(r=r+Math.imul(L,K)|0)+Math.imul(k,O)|0,i=i+Math.imul(k,K)|0,n=n+Math.imul(N,j)|0,r=(r=r+Math.imul(N,z)|0)+Math.imul(R,j)|0,i=i+Math.imul(R,z)|0,n=n+Math.imul(F,Z)|0,r=(r=r+Math.imul(F,W)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,W)|0,n=n+Math.imul(w,$)|0,r=(r=r+Math.imul(w,ee)|0)+Math.imul(D,$)|0,i=i+Math.imul(D,ee)|0,n=n+Math.imul(y,Ae)|0,r=(r=r+Math.imul(y,ne)|0)+Math.imul(v,Ae)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(E,ie)|0,r=(r=r+Math.imul(E,oe)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,oe)|0,n=n+Math.imul(Q,se)|0,r=(r=r+Math.imul(Q,ce)|0)+Math.imul(p,se)|0,i=i+Math.imul(p,ce)|0,n=n+Math.imul(B,ue)|0,r=(r=r+Math.imul(B,ge)|0)+Math.imul(h,ue)|0,i=i+Math.imul(h,ge)|0;var be=(c+(n=n+Math.imul(u,Be)|0)|0)+((8191&(r=(r=r+Math.imul(u,he)|0)+Math.imul(g,Be)|0))<<13)|0;c=((i=i+Math.imul(g,he)|0)+(r>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(H,O),r=(r=Math.imul(H,K))+Math.imul(_,O)|0,i=Math.imul(_,K),n=n+Math.imul(L,j)|0,r=(r=r+Math.imul(L,z)|0)+Math.imul(k,j)|0,i=i+Math.imul(k,z)|0,n=n+Math.imul(N,Z)|0,r=(r=r+Math.imul(N,W)|0)+Math.imul(R,Z)|0,i=i+Math.imul(R,W)|0,n=n+Math.imul(F,$)|0,r=(r=r+Math.imul(F,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,n=n+Math.imul(w,Ae)|0,r=(r=r+Math.imul(w,ne)|0)+Math.imul(D,Ae)|0,i=i+Math.imul(D,ne)|0,n=n+Math.imul(y,ie)|0,r=(r=r+Math.imul(y,oe)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(E,se)|0,r=(r=r+Math.imul(E,ce)|0)+Math.imul(m,se)|0,i=i+Math.imul(m,ce)|0,n=n+Math.imul(Q,ue)|0,r=(r=r+Math.imul(Q,ge)|0)+Math.imul(p,ue)|0,i=i+Math.imul(p,ge)|0;var we=(c+(n=n+Math.imul(B,Be)|0)|0)+((8191&(r=(r=r+Math.imul(B,he)|0)+Math.imul(h,Be)|0))<<13)|0;c=((i=i+Math.imul(h,he)|0)+(r>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(H,j),r=(r=Math.imul(H,z))+Math.imul(_,j)|0,i=Math.imul(_,z),n=n+Math.imul(L,Z)|0,r=(r=r+Math.imul(L,W)|0)+Math.imul(k,Z)|0,i=i+Math.imul(k,W)|0,n=n+Math.imul(N,$)|0,r=(r=r+Math.imul(N,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(F,Ae)|0,r=(r=r+Math.imul(F,ne)|0)+Math.imul(x,Ae)|0,i=i+Math.imul(x,ne)|0,n=n+Math.imul(w,ie)|0,r=(r=r+Math.imul(w,oe)|0)+Math.imul(D,ie)|0,i=i+Math.imul(D,oe)|0,n=n+Math.imul(y,se)|0,r=(r=r+Math.imul(y,ce)|0)+Math.imul(v,se)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(E,ue)|0,r=(r=r+Math.imul(E,ge)|0)+Math.imul(m,ue)|0,i=i+Math.imul(m,ge)|0;var De=(c+(n=n+Math.imul(Q,Be)|0)|0)+((8191&(r=(r=r+Math.imul(Q,he)|0)+Math.imul(p,Be)|0))<<13)|0;c=((i=i+Math.imul(p,he)|0)+(r>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(H,Z),r=(r=Math.imul(H,W))+Math.imul(_,Z)|0,i=Math.imul(_,W),n=n+Math.imul(L,$)|0,r=(r=r+Math.imul(L,ee)|0)+Math.imul(k,$)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(N,Ae)|0,r=(r=r+Math.imul(N,ne)|0)+Math.imul(R,Ae)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(F,ie)|0,r=(r=r+Math.imul(F,oe)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,oe)|0,n=n+Math.imul(w,se)|0,r=(r=r+Math.imul(w,ce)|0)+Math.imul(D,se)|0,i=i+Math.imul(D,ce)|0,n=n+Math.imul(y,ue)|0,r=(r=r+Math.imul(y,ge)|0)+Math.imul(v,ue)|0,i=i+Math.imul(v,ge)|0;var Se=(c+(n=n+Math.imul(E,Be)|0)|0)+((8191&(r=(r=r+Math.imul(E,he)|0)+Math.imul(m,Be)|0))<<13)|0;c=((i=i+Math.imul(m,he)|0)+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(H,$),r=(r=Math.imul(H,ee))+Math.imul(_,$)|0,i=Math.imul(_,ee),n=n+Math.imul(L,Ae)|0,r=(r=r+Math.imul(L,ne)|0)+Math.imul(k,Ae)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(N,ie)|0,r=(r=r+Math.imul(N,oe)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(F,se)|0,r=(r=r+Math.imul(F,ce)|0)+Math.imul(x,se)|0,i=i+Math.imul(x,ce)|0,n=n+Math.imul(w,ue)|0,r=(r=r+Math.imul(w,ge)|0)+Math.imul(D,ue)|0,i=i+Math.imul(D,ge)|0;var Fe=(c+(n=n+Math.imul(y,Be)|0)|0)+((8191&(r=(r=r+Math.imul(y,he)|0)+Math.imul(v,Be)|0))<<13)|0;c=((i=i+Math.imul(v,he)|0)+(r>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(H,Ae),r=(r=Math.imul(H,ne))+Math.imul(_,Ae)|0,i=Math.imul(_,ne),n=n+Math.imul(L,ie)|0,r=(r=r+Math.imul(L,oe)|0)+Math.imul(k,ie)|0,i=i+Math.imul(k,oe)|0,n=n+Math.imul(N,se)|0,r=(r=r+Math.imul(N,ce)|0)+Math.imul(R,se)|0,i=i+Math.imul(R,ce)|0,n=n+Math.imul(F,ue)|0,r=(r=r+Math.imul(F,ge)|0)+Math.imul(x,ue)|0,i=i+Math.imul(x,ge)|0;var xe=(c+(n=n+Math.imul(w,Be)|0)|0)+((8191&(r=(r=r+Math.imul(w,he)|0)+Math.imul(D,Be)|0))<<13)|0;c=((i=i+Math.imul(D,he)|0)+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(H,ie),r=(r=Math.imul(H,oe))+Math.imul(_,ie)|0,i=Math.imul(_,oe),n=n+Math.imul(L,se)|0,r=(r=r+Math.imul(L,ce)|0)+Math.imul(k,se)|0,i=i+Math.imul(k,ce)|0,n=n+Math.imul(N,ue)|0,r=(r=r+Math.imul(N,ge)|0)+Math.imul(R,ue)|0,i=i+Math.imul(R,ge)|0;var Ue=(c+(n=n+Math.imul(F,Be)|0)|0)+((8191&(r=(r=r+Math.imul(F,he)|0)+Math.imul(x,Be)|0))<<13)|0;c=((i=i+Math.imul(x,he)|0)+(r>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,n=Math.imul(H,se),r=(r=Math.imul(H,ce))+Math.imul(_,se)|0,i=Math.imul(_,ce),n=n+Math.imul(L,ue)|0,r=(r=r+Math.imul(L,ge)|0)+Math.imul(k,ue)|0,i=i+Math.imul(k,ge)|0;var Ne=(c+(n=n+Math.imul(N,Be)|0)|0)+((8191&(r=(r=r+Math.imul(N,he)|0)+Math.imul(R,Be)|0))<<13)|0;c=((i=i+Math.imul(R,he)|0)+(r>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(H,ue),r=(r=Math.imul(H,ge))+Math.imul(_,ue)|0,i=Math.imul(_,ge);var Re=(c+(n=n+Math.imul(L,Be)|0)|0)+((8191&(r=(r=r+Math.imul(L,he)|0)+Math.imul(k,Be)|0))<<13)|0;c=((i=i+Math.imul(k,he)|0)+(r>>>13)|0)+(Re>>>26)|0,Re&=67108863;var Me=(c+(n=Math.imul(H,Be))|0)+((8191&(r=(r=Math.imul(H,he))+Math.imul(_,Be)|0))<<13)|0;return c=((i=Math.imul(_,he))+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,s[0]=Ie,s[1]=Qe,s[2]=pe,s[3]=fe,s[4]=Ee,s[5]=me,s[6]=Ce,s[7]=ye,s[8]=ve,s[9]=be,s[10]=we,s[11]=De,s[12]=Se,s[13]=Fe,s[14]=xe,s[15]=Ue,s[16]=Ne,s[17]=Re,s[18]=Me,0!==c&&(s[19]=c,A.length++),A};function h(e,t,A){return(new I).mulp(e,t,A)}function I(e,t){this.x=e,this.y=t}Math.imul||(B=d),i.prototype.mulTo=function(e,t){var A,n=this.length+e.length;return A=10===this.length&&10===e.length?B(this,e,t):n<63?d(this,e,t):n<1024?function(e,t,A){A.negative=t.negative^e.negative,A.length=e.length+t.length;for(var n=0,r=0,i=0;i>>26)|0)>>>26,o&=67108863}A.words[i]=a,n=o,o=r}return 0!==n?A.words[i]=n:A.length--,A.strip()}(this,e,t):h(this,e,t),A},I.prototype.makeRBT=function(e){for(var t=new Array(e),A=i.prototype._countBits(e)-1,n=0;n>=1;return n},I.prototype.permute=function(e,t,A,n,r,i){for(var o=0;o>>=1)r++;return 1<>>=13,A[2*o+1]=8191&i,i>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=i>>>26,this.words[A]=67108863&i}return 0!==t&&(this.words[A]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),A=0;A>>r}return t}(e);if(0===t.length)return new i(1);for(var A=this,n=0;n=0);var t,A=e%26,r=(e-A)/26,i=67108863>>>26-A<<26-A;if(0!==A){var o=0;for(t=0;t>>26-A}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0),r=t?(t-t%26)/26:0;var i=e%26,o=Math.min((e-i)/26,this.length),a=67108863^67108863>>>i<o)for(this.length-=o,c=0;c=0&&(0!==l||c>=r);c--){var u=0|this.words[c];this.words[c]=l<<26-i|u>>>i,l=u&a}return s&&0!==l&&(s.words[s.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,A){return n(0===this.negative),this.iushrn(e,t,A)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,A=(e-t)/26,r=1<=0);var t=e%26,A=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=A)return this;if(0!==t&&A++,this.length=Math.min(A,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(s/67108864|0),this.words[r+A]=67108863&i}for(;r>26,this.words[r+A]=67108863&i;if(0===a)return this.strip();for(n(-1===a),a=0,r=0;r>26,this.words[r]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var A=(this.length,e.length),n=this.clone(),r=e,o=0|r.words[r.length-1];0!=(A=26-this._countBits(o))&&(r=r.ushln(A),n.iushln(A),o=0|r.words[r.length-1]);var a,s=n.length-r.length;if("mod"!==t){(a=new i(null)).length=s+1,a.words=new Array(a.length);for(var c=0;c=0;u--){var g=67108864*(0|n.words[r.length+u])+(0|n.words[r.length+u-1]);for(g=Math.min(g/o|0,67108863),n._ishlnsubmul(r,g,u);0!==n.negative;)g--,n.negative=0,n._ishlnsubmul(r,1,u),n.isZero()||(n.negative^=1);a&&(a.words[u]=g)}return a&&a.strip(),n.strip(),"div"!==t&&0!==A&&n.iushrn(A),{div:a||null,mod:n}},i.prototype.divmod=function(e,t,A){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(r=a.div.neg()),"div"!==t&&(o=a.mod.neg(),A&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(r=a.div.neg()),{div:r,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(o=a.mod.neg(),A&&0!==o.negative&&o.isub(e)),{div:a.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,o,a},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var A=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),r=e.andln(1),i=A.cmp(n);return i<0||1===r&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,A=0,r=this.length-1;r>=0;r--)A=(t*A+(0|this.words[r]))%e;return A},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,A=this.length-1;A>=0;A--){var r=(0|this.words[A])+67108864*t;this.words[A]=r/e|0,t=r%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,A=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new i(1),o=new i(0),a=new i(0),s=new i(1),c=0;t.isEven()&&A.isEven();)t.iushrn(1),A.iushrn(1),++c;for(var l=A.clone(),u=t.clone();!t.isZero();){for(var g=0,d=1;0===(t.words[0]&d)&&g<26;++g,d<<=1);if(g>0)for(t.iushrn(g);g-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(l),o.isub(u)),r.iushrn(1),o.iushrn(1);for(var B=0,h=1;0===(A.words[0]&h)&&B<26;++B,h<<=1);if(B>0)for(A.iushrn(B);B-- >0;)(a.isOdd()||s.isOdd())&&(a.iadd(l),s.isub(u)),a.iushrn(1),s.iushrn(1);t.cmp(A)>=0?(t.isub(A),r.isub(a),o.isub(s)):(A.isub(t),a.isub(r),s.isub(o))}return{a,b:s,gcd:A.iushln(c)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,A=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r,o=new i(1),a=new i(0),s=A.clone();t.cmpn(1)>0&&A.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);for(var u=0,g=1;0===(A.words[0]&g)&&u<26;++u,g<<=1);if(u>0)for(A.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);t.cmp(A)>=0?(t.isub(A),o.isub(a)):(A.isub(t),a.isub(o))}return(r=0===t.cmpn(1)?o:a).cmpn(0)<0&&r.iadd(e),r},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),A=e.clone();t.negative=0,A.negative=0;for(var n=0;t.isEven()&&A.isEven();n++)t.iushrn(1),A.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;A.isEven();)A.iushrn(1);var r=t.cmp(A);if(r<0){var i=t;t=A,A=i}else if(0===r||0===A.cmpn(1))break;t.isub(A)}return A.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,A=(e-t)/26,r=1<>>26,a&=67108863,this.words[o]=a}return 0!==i&&(this.words[o]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,A=e<0;if(0!==this.negative&&!A)return-1;if(0===this.negative&&A)return 1;if(this.strip(),this.length>1)t=1;else{A&&(e=-e),n(e<=67108863,"Number is too big");var r=0|this.words[0];t=r===e?0:re.length)return 1;if(this.length=0;A--){var n=0|this.words[A],r=0|e.words[A];if(n!==r){nr&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new y(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var Q={k256:null,p224:null,p192:null,p25519:null};function p(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function f(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function m(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function C(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function y(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function v(e){y.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}p.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},p.prototype.ireduce=function(e){var t,A=e;do{this.split(A,this.tmp),t=(A=(A=this.imulK(A)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?A.isub(this.p):void 0!==A.strip?A.strip():A._strip(),A},p.prototype.split=function(e,t){e.iushrn(this.n,0,t)},p.prototype.imulK=function(e){return e.imul(this.k)},r(f,p),f.prototype.split=function(e,t){for(var A=4194303,n=Math.min(e.length,9),r=0;r>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},f.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,A=0;A>>=26,e.words[A]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(Q[e])return Q[e];var t;if("k256"===e)t=new f;else if("p224"===e)t=new E;else if("p192"===e)t=new m;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new C}return Q[e]=t,t},y.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},y.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},y.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},y.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},y.prototype.add=function(e,t){this._verify2(e,t);var A=e.add(t);return A.cmp(this.m)>=0&&A.isub(this.m),A._forceRed(this)},y.prototype.iadd=function(e,t){this._verify2(e,t);var A=e.iadd(t);return A.cmp(this.m)>=0&&A.isub(this.m),A},y.prototype.sub=function(e,t){this._verify2(e,t);var A=e.sub(t);return A.cmpn(0)<0&&A.iadd(this.m),A._forceRed(this)},y.prototype.isub=function(e,t){this._verify2(e,t);var A=e.isub(t);return A.cmpn(0)<0&&A.iadd(this.m),A},y.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},y.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},y.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},y.prototype.isqr=function(e){return this.imul(e,e.clone())},y.prototype.sqr=function(e){return this.mul(e,e)},y.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var A=this.m.add(new i(1)).iushrn(2);return this.pow(e,A)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);n(!r.isZero());var a=new i(1).toRed(this),s=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new i(2*l*l).toRed(this);0!==this.pow(l,c).cmp(s);)l.redIAdd(s);for(var u=this.pow(l,r),g=this.pow(e,r.addn(1).iushrn(1)),d=this.pow(e,r),B=o;0!==d.cmp(a);){for(var h=d,I=0;0!==h.cmp(a);I++)h=h.redSqr();n(I=0;n--){for(var c=t.words[n],l=s-1;l>=0;l--){var u=c>>l&1;r!==A[0]&&(r=this.sqr(r)),0!==u||0!==o?(o<<=1,o|=u,(4===++a||0===n&&0===l)&&(r=this.mul(r,A[o]),a=0,o=0)):a=0}s=26}return r},y.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},y.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new v(e)},r(v,y),v.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},v.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},v.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var A=e.imul(t),n=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=A.isub(n).iushrn(this.shift),i=r;return r.cmp(this.m)>=0?i=r.isub(this.m):r.cmpn(0)<0&&(i=r.iadd(this.m)),i._forceRed(this)},v.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var A=e.mul(t),n=A.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=A.isub(n).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},v.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=A.nmd(e),this)},2551:(e,t,A)=>{"use strict";var n=A(6540),r=A(9982);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,A=1;A

Proteins are molecules that play important roles in virtually every activity in the body. They form hair and fingernails, carry oxygen in the blood, enable muscle movement, and much more. This activity explores the importance of proteins and provides customized, colorful visuals of names using the 3D protein alphabet. To learn more about protein shapes, please visit the NIGMS-funded Protein Data Bank (PDB). Simply enter your name below to see the proteins corresponding to each letter. If you click on a letter, a pop-up box will allow you to rotate the 3D image to view it from all sides.

The protein alphabet letters were curated from the PDB by Mark Howarth, Department of Biochemistry, Oxford University, Oxford, UK, Nature Structural & Molecular Biology [PDF] , May 2015.




(Max 14 characters)
(Max 14 characters)
X
This page last updated on 09/09/2025 2:06 PM