>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new S;else if("p192"===t)e=new k;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new E}return w[t]=e,e},A.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},A.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},A.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},A.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},A.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},A.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},A.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},A.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},A.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},A.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},A.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},A.prototype.isqr=function(t){return this.imul(t,t.clone())},A.prototype.sqr=function(t){return this.mul(t,t)},A.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);r(!n.isZero());var h=new o(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(h);){for(var m=d,v=0;0!==m.cmp(h);v++)m=m.redSqr();r(v=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;n!==i[0]&&(n=this.sqr(n)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(n=this.mul(n,i[s]),h=0,s=0)):h=0}a=26}return n},A.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},A.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},n(x,A),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=i.nmd(t),this)},9931:(t,e,i)=>{var r;function n(t){this.rand=t}if(t.exports=function(t){return r||(r=new n(null)),r.generate(t)},t.exports.Rand=n,n.prototype.generate=function(t){return this._rand(t)},n.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),i=0;i{var r=i(9509).Buffer;function n(t){r.isBuffer(t)||(t=r.from(t));for(var e=t.length/4|0,i=new Array(e),n=0;n>>24]^f[p>>>16&255]^l[m>>>8&255]^c[255&v]^e[g++],s=u[p>>>24]^f[m>>>16&255]^l[v>>>8&255]^c[255&d]^e[g++],h=u[m>>>24]^f[v>>>16&255]^l[d>>>8&255]^c[255&p]^e[g++],a=u[v>>>24]^f[d>>>16&255]^l[p>>>8&255]^c[255&m]^e[g++],d=o,p=s,m=h,v=a;return o=(r[d>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&v])^e[g++],s=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[v>>>8&255]<<8|r[255&d])^e[g++],h=(r[m>>>24]<<24|r[v>>>16&255]<<16|r[d>>>8&255]<<8|r[255&p])^e[g++],a=(r[v>>>24]<<24|r[d>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^e[g++],[o>>>=0,s>>>=0,h>>>=0,a>>>=0]}var h=[0,1,2,4,8,16,32,64,128,27,54],a=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var i=[],r=[],n=[[],[],[],[]],o=[[],[],[],[]],s=0,h=0,a=0;a<256;++a){var u=h^h<<1^h<<2^h<<3^h<<4;u=u>>>8^255&u^99,i[s]=u,r[u]=s;var f=t[s],l=t[f],c=t[l],d=257*t[u]^16843008*u;n[0][s]=d<<24|d>>>8,n[1][s]=d<<16|d>>>16,n[2][s]=d<<8|d>>>24,n[3][s]=d,d=16843009*c^65537*l^257*f^16843008*s,o[0][u]=d<<24|d>>>8,o[1][u]=d<<16|d>>>16,o[2][u]=d<<8|d>>>24,o[3][u]=d,0===s?s=h=1:(s=f^t[t[t[c^f]]],h^=t[t[h]])}return{SBOX:i,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:o}}();function u(t){this._key=n(t),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var t=this._key,e=t.length,i=e+6,r=4*(i+1),n=[],o=0;o>>24,s=a.SBOX[s>>>24]<<24|a.SBOX[s>>>16&255]<<16|a.SBOX[s>>>8&255]<<8|a.SBOX[255&s],s^=h[o/e|0]<<24):e>6&&o%e==4&&(s=a.SBOX[s>>>24]<<24|a.SBOX[s>>>16&255]<<16|a.SBOX[s>>>8&255]<<8|a.SBOX[255&s]),n[o]=n[o-e]^s}for(var u=[],f=0;f>>24]]^a.INV_SUB_MIX[1][a.SBOX[c>>>16&255]]^a.INV_SUB_MIX[2][a.SBOX[c>>>8&255]]^a.INV_SUB_MIX[3][a.SBOX[255&c]]}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(t){return s(t=n(t),this._keySchedule,a.SUB_MIX,a.SBOX,this._nRounds)},u.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),i=r.allocUnsafe(16);return i.writeUInt32BE(e[0],0),i.writeUInt32BE(e[1],4),i.writeUInt32BE(e[2],8),i.writeUInt32BE(e[3],12),i},u.prototype.decryptBlock=function(t){var e=(t=n(t))[1];t[1]=t[3],t[3]=e;var i=s(t,this._invKeySchedule,a.INV_SUB_MIX,a.INV_SBOX,this._nRounds),o=r.allocUnsafe(16);return o.writeUInt32BE(i[0],0),o.writeUInt32BE(i[3],4),o.writeUInt32BE(i[2],8),o.writeUInt32BE(i[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=u},2422:(t,e,i)=>{var r=i(4497),n=i(9509).Buffer,o=i(1027),s=i(5717),h=i(3288),a=i(7295),u=i(685);function f(t,e,i,s){o.call(this);var a=n.alloc(4,0);this._cipher=new r.AES(e);var f=this._cipher.encryptBlock(a);this._ghash=new h(f),i=function(t,e,i){if(12===e.length)return t._finID=n.concat([e,n.from([0,0,0,1])]),n.concat([e,n.from([0,0,0,2])]);var r=new h(i),o=e.length,s=o%16;r.update(e),s&&(s=16-s,r.update(n.alloc(s,0))),r.update(n.alloc(8,0));var a=8*o,f=n.alloc(8);f.writeUIntBE(a,0,8),r.update(f),t._finID=r.state;var l=n.from(t._finID);return u(l),l}(this,i,f),this._prev=n.from(i),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}s(f,o),f.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=n.alloc(e,0),this._ghash.update(e))}this._called=!0;var i=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(i),this._len+=t.length,i},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=a(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var i=0;t.length!==e.length&&i++;for(var r=Math.min(t.length,e.length),n=0;n{var r=i(1494),n=i(6193),o=i(5415);e.createCipher=e.Cipher=r.createCipher,e.createCipheriv=e.Cipheriv=r.createCipheriv,e.createDecipher=e.Decipher=n.createDecipher,e.createDecipheriv=e.Decipheriv=n.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},6193:(t,e,i)=>{var r=i(2422),n=i(9509).Buffer,o=i(45),s=i(5969),h=i(1027),a=i(4497),u=i(3048);function f(t,e,i){h.call(this),this._cache=new l,this._last=void 0,this._cipher=new a.AES(e),this._prev=n.from(i),this._mode=t,this._autopadding=!0}function l(){this.cache=n.allocUnsafe(0)}function c(t,e,i){var h=o[t.toLowerCase()];if(!h)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=n.from(i)),"GCM"!==h.mode&&i.length!==h.iv)throw new TypeError("invalid iv length "+i.length);if("string"==typeof e&&(e=n.from(e)),e.length!==h.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===h.type?new s(h.module,e,i,!0):"auth"===h.type?new r(h.module,e,i,!0):new f(h.module,e,i)}i(5717)(f,h),f.prototype._update=function(t){var e,i;this._cache.add(t);for(var r=[];e=this._cache.get(this._autopadding);)i=this._mode.decrypt(this,e),r.push(i);return n.concat(r)},f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var i=-1;++i16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var i=o[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");var r=u(e,!1,i.key,i.iv);return c(t,r.key,r.iv)},e.createDecipheriv=c},1494:(t,e,i)=>{var r=i(45),n=i(2422),o=i(9509).Buffer,s=i(5969),h=i(1027),a=i(4497),u=i(3048);function f(t,e,i){h.call(this),this._cache=new c,this._cipher=new a.AES(e),this._prev=o.from(i),this._mode=t,this._autopadding=!0}i(5717)(f,h),f.prototype._update=function(t){var e,i;this._cache.add(t);for(var r=[];e=this._cache.get();)i=this._mode.encrypt(this,e),r.push(i);return o.concat(r)};var l=o.alloc(16,16);function c(){this.cache=o.allocUnsafe(0)}function d(t,e,i){var h=r[t.toLowerCase()];if(!h)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=o.from(e)),e.length!==h.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof i&&(i=o.from(i)),"GCM"!==h.mode&&i.length!==h.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===h.type?new s(h.module,e,i):"auth"===h.type?new n(h.module,e,i):new f(h.module,e,i)}f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},c.prototype.add=function(t){this.cache=o.concat([this.cache,t])},c.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},c.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),i=-1;++i{var r=i(9509).Buffer,n=r.alloc(16,0);function o(t){var e=r.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function s(t){this.h=t,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}s.prototype.ghash=function(t){for(var e=-1;++e0;e--)r[e]=r[e]>>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,i&&(r[0]=r[0]^225<<24)}this.state=o(n)},s.prototype.update=function(t){var e;for(this.cache=r.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},s.prototype.final=function(t,e){return this.cache.length&&this.ghash(r.concat([this.cache,n],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=s},685:t=>{t.exports=function(t){for(var e,i=t.length;i--;){if(255!==(e=t.readUInt8(i))){e++,t.writeUInt8(e,i);break}t.writeUInt8(0,i)}}},5292:(t,e,i)=>{var r=i(7295);e.encrypt=function(t,e){var i=r(e,t._prev);return t._prev=t._cipher.encryptBlock(i),t._prev},e.decrypt=function(t,e){var i=t._prev;t._prev=e;var n=t._cipher.decryptBlock(e);return r(n,i)}},6311:(t,e,i)=>{var r=i(9509).Buffer,n=i(7295);function o(t,e,i){var o=e.length,s=n(e,t._cache);return t._cache=t._cache.slice(o),t._prev=r.concat([t._prev,i?e:s]),s}e.encrypt=function(t,e,i){for(var n,s=r.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=r.allocUnsafe(0)),!(t._cache.length<=e.length)){s=r.concat([s,o(t,e,i)]);break}n=t._cache.length,s=r.concat([s,o(t,e.slice(0,n),i)]),e=e.slice(n)}return s}},1510:(t,e,i)=>{var r=i(9509).Buffer;function n(t,e,i){for(var r,n,s=-1,h=0;++s<8;)r=e&1<<7-s?128:0,h+=(128&(n=t._cipher.encryptBlock(t._prev)[0]^r))>>s%8,t._prev=o(t._prev,i?r:n);return h}function o(t,e){var i=t.length,n=-1,o=r.allocUnsafe(t.length);for(t=r.concat([t,r.from([e])]);++n>7;return o}e.encrypt=function(t,e,i){for(var o=e.length,s=r.allocUnsafe(o),h=-1;++h{var r=i(9509).Buffer;function n(t,e,i){var n=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=r.concat([t._prev.slice(1),r.from([i?e:n])]),n}e.encrypt=function(t,e,i){for(var o=e.length,s=r.allocUnsafe(o),h=-1;++h{var r=i(7295),n=i(9509).Buffer,o=i(685);function s(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var i=Math.ceil(e.length/16),o=t._cache.length;t._cache=n.concat([t._cache,n.allocUnsafe(16*i)]);for(var h=0;h{e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},45:(t,e,i)=>{var r={ECB:i(1084),CBC:i(5292),CFB:i(6311),CFB8:i(1964),CFB1:i(1510),OFB:i(8861),CTR:i(6009),GCM:i(6009)},n=i(5415);for(var o in n)n[o].module=r[n[o].mode];t.exports=n},5415:t=>{"use strict";t.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},8861:(t,e,i)=>{var r=i(8764).Buffer,n=i(7295);function o(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(t,e){for(;t._cache.length{var r=i(4497),n=i(9509).Buffer,o=i(1027);function s(t,e,i,s){o.call(this),this._cipher=new r.AES(e),this._prev=n.from(i),this._cache=n.allocUnsafe(0),this._secCache=n.allocUnsafe(0),this._decrypt=s,this._mode=t}i(5717)(s,o),s.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},t.exports=s},3614:(t,e,i)=>{var r=i(7667),n=i(4696),o=i(45),s=i(9715),h=i(3048);function a(t,e,i){if(t=t.toLowerCase(),o[t])return n.createCipheriv(t,e,i);if(s[t])return new r({key:e,iv:i,mode:t});throw new TypeError("invalid suite type")}function u(t,e,i){if(t=t.toLowerCase(),o[t])return n.createDecipheriv(t,e,i);if(s[t])return new r({key:e,iv:i,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var i,r;if(t=t.toLowerCase(),o[t])i=o[t].key,r=o[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");i=8*s[t].key,r=s[t].iv}var n=h(e,!1,i,r);return a(t,n.key,n.iv)},e.createCipheriv=e.Cipheriv=a,e.createDecipher=e.Decipher=function(t,e){var i,r;if(t=t.toLowerCase(),o[t])i=o[t].key,r=o[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");i=8*s[t].key,r=s[t].iv}var n=h(e,!1,i,r);return u(t,n.key,n.iv)},e.createDecipheriv=e.Decipheriv=u,e.listCiphers=e.getCiphers=function(){return Object.keys(s).concat(n.getCiphers())}},7667:(t,e,i)=>{var r=i(1027),n=i(5251),o=i(5717),s=i(9509).Buffer,h={"des-ede3-cbc":n.CBC.instantiate(n.EDE),"des-ede3":n.EDE,"des-ede-cbc":n.CBC.instantiate(n.EDE),"des-ede":n.EDE,"des-cbc":n.CBC.instantiate(n.DES),"des-ecb":n.DES};function a(t){r.call(this);var e,i=t.mode.toLowerCase(),n=h[i];e=t.decrypt?"decrypt":"encrypt";var o=t.key;s.isBuffer(o)||(o=s.from(o)),"des-ede"!==i&&"des-ede-cbc"!==i||(o=s.concat([o,o.slice(0,8)]));var a=t.iv;s.isBuffer(a)||(a=s.from(a)),this._des=n.create({key:o,iv:a,type:e})}h.des=h["des-cbc"],h.des3=h["des-ede3-cbc"],t.exports=a,o(a,r),a.prototype._update=function(t){return s.from(this._des.update(t))},a.prototype._final=function(){return s.from(this._des.final())}},9715:(t,e)=>{e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},3663:(t,e,i)=>{var r=i(8764).Buffer,n=i(3550),o=i(1798);function s(t){var e,i=t.modulus.byteLength();do{e=new n(o(i))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function h(t,e){var i=function(t){var e=s(t);return{blinder:e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),o=e.modulus.byteLength(),h=new n(t).mul(i.blinder).umod(e.modulus),a=h.toRed(n.mont(e.prime1)),u=h.toRed(n.mont(e.prime2)),f=e.coefficient,l=e.prime1,c=e.prime2,d=a.redPow(e.exponent1).fromRed(),p=u.redPow(e.exponent2).fromRed(),m=d.isub(p).imul(f).umod(l).imul(c);return p.iadd(m).imul(i.unblinder).umod(e.modulus).toArrayLike(r,"be",o)}h.getr=s,t.exports=h},6042:(t,e,i)=>{t.exports=i(2063)},2063:t=>{"use strict";t.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},2236:t=>{"use strict";t.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},4743:(t,e,i)=>{var r=i(9509).Buffer,n=i(3482),o=i(8473),s=i(5717),h=i(2957),a=i(7753),u=i(2063);function f(t){o.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){o.Writable.call(this);var e=u[t];if(!e)throw new Error("Unknown message digest");this._hash=n(e.hash),this._tag=e.id,this._signType=e.sign}function c(t){return new f(t)}function d(t){return new l(t)}Object.keys(u).forEach((function(t){u[t].id=r.from(u[t].id,"hex"),u[t.toLowerCase()]=u[t]})),s(f,o.Writable),f.prototype._write=function(t,e,i){this._hash.update(t),i()},f.prototype.update=function(t,e){return"string"==typeof t&&(t=r.from(t,e)),this._hash.update(t),this},f.prototype.sign=function(t,e){this.end();var i=this._hash.digest(),r=h(i,t,this._hashType,this._signType,this._tag);return e?r.toString(e):r},s(l,o.Writable),l.prototype._write=function(t,e,i){this._hash.update(t),i()},l.prototype.update=function(t,e){return"string"==typeof t&&(t=r.from(t,e)),this._hash.update(t),this},l.prototype.verify=function(t,e,i){"string"==typeof e&&(e=r.from(e,i)),this.end();var n=this._hash.digest();return a(e,n,t,this._signType,this._tag)},t.exports={Sign:c,Verify:d,createSign:c,createVerify:d}},2957:(t,e,i)=>{var r=i(9509).Buffer,n=i(8355),o=i(3663),s=i(6266).ec,h=i(3550),a=i(980),u=i(2236);function f(t,e,i,o){if((t=r.from(t.toArray())).length0&&i.ishrn(r),i}function c(t,e,i){var o,s;do{for(o=r.alloc(0);8*o.length{var r=i(9509).Buffer,n=i(3550),o=i(6266).ec,s=i(980),h=i(2236);function a(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=e)throw new Error("invalid sig")}t.exports=function(t,e,i,u,f){var l=s(i);if("ec"===l.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(t,e,i){var r=h[i.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+i.data.algorithm.curve.join("."));var n=new o(r),s=i.data.subjectPrivateKey.data;return n.verify(e,t,s)}(t,e,l)}if("dsa"===l.type){if("dsa"!==u)throw new Error("wrong public key type");return function(t,e,i){var r=i.data.p,o=i.data.q,h=i.data.g,u=i.data.pub_key,f=s.signature.decode(t,"der"),l=f.s,c=f.r;a(l,o),a(c,o);var d=n.mont(r),p=l.invm(o);return 0===h.toRed(d).redPow(new n(e).mul(p).mod(o)).fromRed().mul(u.toRed(d).redPow(c.mul(p).mod(o)).fromRed()).mod(r).mod(o).cmp(c)}(t,e,l)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");e=r.concat([f,e]);for(var c=l.modulus.byteLength(),d=[1],p=0;e.length+d.length+2{var r=i(8764).Buffer;t.exports=function(t,e){for(var i=Math.min(t.length,e.length),n=new r(i),o=0;o{"use strict";const r=i(9742),n=i(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=function(t){return+t!=t&&(t=0),a.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function h(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,a.prototype),e}function a(t,e,i){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,i)}function u(t,e,i){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const i=0|m(t,e);let r=h(i);const n=r.write(t,e);return n!==i&&(r=r.slice(0,n)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(X(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return c(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(X(t,ArrayBuffer)||t&&X(t.buffer,ArrayBuffer))return d(t,e,i);if("undefined"!=typeof SharedArrayBuffer&&(X(t,SharedArrayBuffer)||t&&X(t.buffer,SharedArrayBuffer)))return d(t,e,i);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return a.from(r,e,i);const n=function(t){if(a.isBuffer(t)){const e=0|p(t.length),i=h(e);return 0===i.length||t.copy(i,0,0,e),i}return void 0!==t.length?"number"!=typeof t.length||$(t.length)?h(0):c(t):"Buffer"===t.type&&Array.isArray(t.data)?c(t.data):void 0}(t);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return f(t),h(t<0?0:0|p(t))}function c(t){const e=t.length<0?0:0|p(t.length),i=h(e);for(let r=0;r=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function m(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||X(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const i=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===i)return 0;let n=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return W(t).length;default:if(n)return r?-1:V(t).length;e=(""+e).toLowerCase(),n=!0}}function v(t,e,i){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,i);case"utf8":case"utf-8":return A(this,e,i);case"ascii":return R(this,e,i);case"latin1":case"binary":return B(this,e,i);case"base64":return E(this,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,i);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,i){const r=t[e];t[e]=t[i],t[i]=r}function b(t,e,i,r,n){if(0===t.length)return-1;if("string"==typeof i?(r=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),$(i=+i)&&(i=n?0:t.length-1),i<0&&(i=t.length+i),i>=t.length){if(n)return-1;i=t.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof e&&(e=a.from(e,r)),a.isBuffer(e))return 0===e.length?-1:y(t,e,i,r,n);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,i):Uint8Array.prototype.lastIndexOf.call(t,e,i):y(t,[e],i,r,n);throw new TypeError("val must be string, number or Buffer")}function y(t,e,i,r,n){let o,s=1,h=t.length,a=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,h/=2,a/=2,i/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){let r=-1;for(o=i;oh&&(i=h-a),o=i;o>=0;o--){let i=!0;for(let r=0;rn&&(r=n):r=n;const o=e.length;let s;for(r>o/2&&(r=o/2),s=0;s>8,n=i%256,o.push(n),o.push(r);return o}(e,t.length-i),t,i,r)}function E(t,e,i){return 0===e&&i===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,i))}function A(t,e,i){i=Math.min(t.length,i);const r=[];let n=e;for(;n239?4:e>223?3:e>191?2:1;if(n+s<=i){let i,r,h,a;switch(s){case 1:e<128&&(o=e);break;case 2:i=t[n+1],128==(192&i)&&(a=(31&e)<<6|63&i,a>127&&(o=a));break;case 3:i=t[n+1],r=t[n+2],128==(192&i)&&128==(192&r)&&(a=(15&e)<<12|(63&i)<<6|63&r,a>2047&&(a<55296||a>57343)&&(o=a));break;case 4:i=t[n+1],r=t[n+2],h=t[n+3],128==(192&i)&&128==(192&r)&&128==(192&h)&&(a=(15&e)<<18|(63&i)<<12|(63&r)<<6|63&h,a>65535&&a<1114112&&(o=a))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),n+=s}return function(t){const e=t.length;if(e<=x)return String.fromCharCode.apply(String,t);let i="",r=0;for(;rr.length?(a.isBuffer(e)||(e=a.from(e)),e.copy(r,n)):Uint8Array.prototype.set.call(r,e,n);else{if(!a.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,n)}n+=e.length}return r},a.byteLength=m,a.prototype._isBuffer=!0,a.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;ei&&(t+=" ... "),""},o&&(a.prototype[o]=a.prototype.inspect),a.prototype.compare=function(t,e,i,r,n){if(X(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===i&&(i=t?t.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),e<0||i>t.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&e>=i)return 0;if(r>=n)return-1;if(e>=i)return 1;if(this===t)return 0;let o=(n>>>=0)-(r>>>=0),s=(i>>>=0)-(e>>>=0);const h=Math.min(o,s),u=this.slice(r,n),f=t.slice(e,i);for(let t=0;t>>=0,isFinite(i)?(i>>>=0,void 0===r&&(r="utf8")):(r=i,i=void 0)}const n=this.length-e;if((void 0===i||i>n)&&(i=n),t.length>0&&(i<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return w(this,t,e,i);case"utf8":case"utf-8":return M(this,t,e,i);case"ascii":case"latin1":case"binary":return _(this,t,e,i);case"base64":return S(this,t,e,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,i);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function R(t,e,i){let r="";i=Math.min(t.length,i);for(let n=e;nr)&&(i=r);let n="";for(let r=e;ri)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,i,r,n,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||et.length)throw new RangeError("Index out of range")}function P(t,e,i,r,n){z(e,r,n,t,i,7);let o=Number(e&BigInt(4294967295));t[i++]=o,o>>=8,t[i++]=o,o>>=8,t[i++]=o,o>>=8,t[i++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[i++]=s,s>>=8,t[i++]=s,s>>=8,t[i++]=s,s>>=8,t[i++]=s,i}function O(t,e,i,r,n){z(e,r,n,t,i,7);let o=Number(e&BigInt(4294967295));t[i+7]=o,o>>=8,t[i+6]=o,o>>=8,t[i+5]=o,o>>=8,t[i+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[i+3]=s,s>>=8,t[i+2]=s,s>>=8,t[i+1]=s,s>>=8,t[i]=s,i+8}function L(t,e,i,r,n,o){if(i+r>t.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function N(t,e,i,r,o){return e=+e,i>>>=0,o||L(t,0,i,4),n.write(t,e,i,r,23,4),i+4}function q(t,e,i,r,o){return e=+e,i>>>=0,o||L(t,0,i,8),n.write(t,e,i,r,52,8),i+8}a.prototype.slice=function(t,e){const i=this.length;(t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e>>=0,e>>>=0,i||C(t,e,this.length);let r=this[t],n=1,o=0;for(;++o>>=0,e>>>=0,i||C(t,e,this.length);let r=this[t+--e],n=1;for(;e>0&&(n*=256);)r+=this[t+--e]*n;return r},a.prototype.readUint8=a.prototype.readUInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),this[t]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readBigUInt64LE=J((function(t){H(t>>>=0,"offset");const e=this[t],i=this[t+7];void 0!==e&&void 0!==i||Z(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,n=this[++t]+256*this[++t]+65536*this[++t]+i*2**24;return BigInt(r)+(BigInt(n)<>>=0,"offset");const e=this[t],i=this[t+7];void 0!==e&&void 0!==i||Z(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],n=this[++t]*2**24+65536*this[++t]+256*this[++t]+i;return(BigInt(r)<>>=0,e>>>=0,i||C(t,e,this.length);let r=this[t],n=1,o=0;for(;++o=n&&(r-=Math.pow(2,8*e)),r},a.prototype.readIntBE=function(t,e,i){t>>>=0,e>>>=0,i||C(t,e,this.length);let r=e,n=1,o=this[t+--r];for(;r>0&&(n*=256);)o+=this[t+--r]*n;return n*=128,o>=n&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||C(t,2,this.length);const i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},a.prototype.readInt16BE=function(t,e){t>>>=0,e||C(t,2,this.length);const i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readBigInt64LE=J((function(t){H(t>>>=0,"offset");const e=this[t],i=this[t+7];void 0!==e&&void 0!==i||Z(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(i<<24);return(BigInt(r)<>>=0,"offset");const e=this[t],i=this[t+7];void 0!==e&&void 0!==i||Z(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<>>=0,e||C(t,4,this.length),n.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||C(t,4,this.length),n.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||C(t,8,this.length),n.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||C(t,8,this.length),n.read(this,t,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(t,e,i,r){t=+t,e>>>=0,i>>>=0,r||T(this,t,e,i,Math.pow(2,8*i)-1,0);let n=1,o=0;for(this[e]=255&t;++o>>=0,i>>>=0,r||T(this,t,e,i,Math.pow(2,8*i)-1,0);let n=i-1,o=1;for(this[e+n]=255&t;--n>=0&&(o*=256);)this[e+n]=t/o&255;return e+i},a.prototype.writeUint8=a.prototype.writeUInt8=function(t,e,i){return t=+t,e>>>=0,i||T(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(t,e,i){return t=+t,e>>>=0,i||T(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(t,e,i){return t=+t,e>>>=0,i||T(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(t,e,i){return t=+t,e>>>=0,i||T(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(t,e,i){return t=+t,e>>>=0,i||T(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeBigUInt64LE=J((function(t,e=0){return P(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeBigUInt64BE=J((function(t,e=0){return O(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),a.prototype.writeIntLE=function(t,e,i,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*i-1);T(this,t,e,i,r-1,-r)}let n=0,o=1,s=0;for(this[e]=255&t;++n>0)-s&255;return e+i},a.prototype.writeIntBE=function(t,e,i,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*i-1);T(this,t,e,i,r-1,-r)}let n=i-1,o=1,s=0;for(this[e+n]=255&t;--n>=0&&(o*=256);)t<0&&0===s&&0!==this[e+n+1]&&(s=1),this[e+n]=(t/o>>0)-s&255;return e+i},a.prototype.writeInt8=function(t,e,i){return t=+t,e>>>=0,i||T(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,i){return t=+t,e>>>=0,i||T(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,i){return t=+t,e>>>=0,i||T(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,i){return t=+t,e>>>=0,i||T(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,i){return t=+t,e>>>=0,i||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeBigInt64LE=J((function(t,e=0){return P(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeBigInt64BE=J((function(t,e=0){return O(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),a.prototype.writeFloatLE=function(t,e,i){return N(this,t,e,!0,i)},a.prototype.writeFloatBE=function(t,e,i){return N(this,t,e,!1,i)},a.prototype.writeDoubleLE=function(t,e,i){return q(this,t,e,!0,i)},a.prototype.writeDoubleBE=function(t,e,i){return q(this,t,e,!1,i)},a.prototype.copy=function(t,e,i,r){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");if(i||(i=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e>>=0,i=void 0===i?this.length:i>>>0,t||(t=0),"number"==typeof t)for(n=e;n=r+4;i-=3)e=`_${t.slice(i-3,i)}${e}`;return`${t.slice(0,i)}${e}`}function z(t,e,i,r,n,o){if(t>i||t3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${e}${r} and <= ${i}${r}`,new F.ERR_OUT_OF_RANGE("value",n,t)}!function(t,e,i){H(e,"offset"),void 0!==t[e]&&void 0!==t[e+i]||Z(e,t.length-(i+1))}(r,n,o)}function H(t,e){if("number"!=typeof t)throw new F.ERR_INVALID_ARG_TYPE(e,"number",t)}function Z(t,e,i){if(Math.floor(t)!==t)throw H(t,i),new F.ERR_OUT_OF_RANGE(i||"offset","an integer",t);if(e<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(i||"offset",`>= ${i?1:0} and <= ${e}`,t)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(t,e,i){let r=`The value of "${t}" is out of range.`,n=i;return Number.isInteger(i)&&Math.abs(i)>2**32?n=U(String(i)):"bigint"==typeof i&&(n=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(n=U(n)),n+="n"),r+=` It must be ${e}. Received ${n}`,r}),RangeError);const K=/[^+/0-9A-Za-z-_]/g;function V(t,e){let i;e=e||1/0;const r=t.length;let n=null;const o=[];for(let s=0;s55295&&i<57344){if(!n){if(i>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}n=i;continue}if(i<56320){(e-=3)>-1&&o.push(239,191,189),n=i;continue}i=65536+(n-55296<<10|i-56320)}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,i<128){if((e-=1)<0)break;o.push(i)}else if(i<2048){if((e-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(i<65536){if((e-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function W(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,i,r){let n;for(n=0;n=e.length||n>=t.length);++n)e[n+i]=t[n];return n}function X(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function $(t){return t!=t}const Q=function(){const t="0123456789abcdef",e=new Array(256);for(let i=0;i<16;++i){const r=16*i;for(let n=0;n<16;++n)e[r+n]=t[i]+t[n]}return e}();function J(t){return"undefined"==typeof BigInt?Y:t}function Y(){throw new Error("BigInt not supported")}},1027:(t,e,i)=>{var r=i(9509).Buffer,n=i(2830).Transform,o=i(2553).s;function s(t){n.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}i(5717)(s,n),s.prototype.update=function(t,e,i){"string"==typeof t&&(t=r.from(t,e));var n=this._update(t);return this.hashMode?this:(i&&(n=this._toString(n,i)),n)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(t,e,i){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){r=t}finally{i(r)}},s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||r.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.prototype._toString=function(t,e,i){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return i&&(r+=this._decoder.end()),r},t.exports=s},6393:(t,e,i)=>{var r=i(8764).Buffer,n=i(6266),o=i(6426);t.exports=function(t){return new h(t)};var s={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function h(t){this.curveType=s[t],this.curveType||(this.curveType={name:t}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function a(t,e,i){Array.isArray(t)||(t=t.toArray());var n=new r(t);if(i&&n.length=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function a(t,e,i){var r=h(t,i);return i-1>=e&&(r|=h(t,i-1)<<4),r}function u(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s=49?h-49+10:h>=17?h-17+10:h}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)n=a(t,e,r)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,a=0,f=i;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[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(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u>>26,l=67108863&a,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}i.words[u]=0|l,a=0|f}return 0!==a?i.words[u]=0|a:i.length--,i.strip()}o.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215)||s!==this.length-1?f[6-a.length]+a+i:a+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],d=c[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);i=(p=p.idivn(d)).isZero()?m+i:f[u-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,h,a="le"===e,u=new t(o),f=this.clone();if(a){for(h=0;!f.isZero();h++)s=f.andln(255),f.iushrn(8),u[h]=s;for(;h=4096&&(i+=13,e>>>=13),e>=64&&(i+=7,e>>>=7),e>=8&&(i+=4,e>>>=4),e>=2&&(i+=2,e>>>=2),i+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,i=0;return 0==(8191&e)&&(i+=13,e>>>=13),0==(127&e)&&(i+=7,e>>>=7),0==(15&e)&&(i+=4,e>>>=4),0==(3&e)&&(i+=2,e>>>=2),0==(1&e)&&i++,i},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var i=0;it.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,i;this.length>t.length?(e=this,i=t):(e=t,i=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(i=this,r=t):(i=t,r=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var i,r,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=t):(i=t,r=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,m=d>>>13,v=0|s[2],g=8191&v,b=v>>>13,y=0|s[3],w=8191&y,M=y>>>13,_=0|s[4],S=8191&_,k=_>>>13,E=0|s[5],A=8191&E,x=E>>>13,R=0|s[6],B=8191&R,I=R>>>13,j=0|s[7],C=8191&j,T=j>>>13,P=0|s[8],O=8191&P,L=P>>>13,N=0|s[9],q=8191&N,F=N>>>13,D=0|h[0],U=8191&D,z=D>>>13,H=0|h[1],Z=8191&H,K=H>>>13,V=0|h[2],W=8191&V,G=V>>>13,X=0|h[3],$=8191&X,Q=X>>>13,J=0|h[4],Y=8191&J,tt=J>>>13,et=0|h[5],it=8191&et,rt=et>>>13,nt=0|h[6],ot=8191&nt,st=nt>>>13,ht=0|h[7],at=8191&ht,ut=ht>>>13,ft=0|h[8],lt=8191&ft,ct=ft>>>13,dt=0|h[9],pt=8191&dt,mt=dt>>>13;i.negative=t.negative^e.negative,i.length=19;var vt=(u+(r=Math.imul(l,U))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(c,U)|0))<<13)|0;u=((o=Math.imul(c,z))+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(p,U),n=(n=Math.imul(p,z))+Math.imul(m,U)|0,o=Math.imul(m,z);var gt=(u+(r=r+Math.imul(l,Z)|0)|0)+((8191&(n=(n=n+Math.imul(l,K)|0)+Math.imul(c,Z)|0))<<13)|0;u=((o=o+Math.imul(c,K)|0)+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,U),n=(n=Math.imul(g,z))+Math.imul(b,U)|0,o=Math.imul(b,z),r=r+Math.imul(p,Z)|0,n=(n=n+Math.imul(p,K)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,K)|0;var bt=(u+(r=r+Math.imul(l,W)|0)|0)+((8191&(n=(n=n+Math.imul(l,G)|0)+Math.imul(c,W)|0))<<13)|0;u=((o=o+Math.imul(c,G)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,U),n=(n=Math.imul(w,z))+Math.imul(M,U)|0,o=Math.imul(M,z),r=r+Math.imul(g,Z)|0,n=(n=n+Math.imul(g,K)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,K)|0,r=r+Math.imul(p,W)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,G)|0;var yt=(u+(r=r+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,U),n=(n=Math.imul(S,z))+Math.imul(k,U)|0,o=Math.imul(k,z),r=r+Math.imul(w,Z)|0,n=(n=n+Math.imul(w,K)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,K)|0,r=r+Math.imul(g,W)|0,n=(n=n+Math.imul(g,G)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,G)|0,r=r+Math.imul(p,$)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(r=r+Math.imul(l,Y)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,Y)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(A,U),n=(n=Math.imul(A,z))+Math.imul(x,U)|0,o=Math.imul(x,z),r=r+Math.imul(S,Z)|0,n=(n=n+Math.imul(S,K)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,K)|0,r=r+Math.imul(w,W)|0,n=(n=n+Math.imul(w,G)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(g,$)|0,n=(n=n+Math.imul(g,Q)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,Q)|0,r=r+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,tt)|0;var Mt=(u+(r=r+Math.imul(l,it)|0)|0)+((8191&(n=(n=n+Math.imul(l,rt)|0)+Math.imul(c,it)|0))<<13)|0;u=((o=o+Math.imul(c,rt)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,U),n=(n=Math.imul(B,z))+Math.imul(I,U)|0,o=Math.imul(I,z),r=r+Math.imul(A,Z)|0,n=(n=n+Math.imul(A,K)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,K)|0,r=r+Math.imul(S,W)|0,n=(n=n+Math.imul(S,G)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(w,$)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,Q)|0,r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,tt)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,it)|0,n=(n=n+Math.imul(p,rt)|0)+Math.imul(m,it)|0,o=o+Math.imul(m,rt)|0;var _t=(u+(r=r+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(C,U),n=(n=Math.imul(C,z))+Math.imul(T,U)|0,o=Math.imul(T,z),r=r+Math.imul(B,Z)|0,n=(n=n+Math.imul(B,K)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,K)|0,r=r+Math.imul(A,W)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,G)|0,r=r+Math.imul(S,$)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,Q)|0,r=r+Math.imul(w,Y)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(M,Y)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(g,it)|0,n=(n=n+Math.imul(g,rt)|0)+Math.imul(b,it)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(r=r+Math.imul(l,at)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,at)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(O,U),n=(n=Math.imul(O,z))+Math.imul(L,U)|0,o=Math.imul(L,z),r=r+Math.imul(C,Z)|0,n=(n=n+Math.imul(C,K)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,K)|0,r=r+Math.imul(B,W)|0,n=(n=n+Math.imul(B,G)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(A,$)|0,n=(n=n+Math.imul(A,Q)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(S,Y)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(w,it)|0,n=(n=n+Math.imul(w,rt)|0)+Math.imul(M,it)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(g,ot)|0,n=(n=n+Math.imul(g,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,at)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,at)|0,o=o+Math.imul(m,ut)|0;var kt=(u+(r=r+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,U),n=(n=Math.imul(q,z))+Math.imul(F,U)|0,o=Math.imul(F,z),r=r+Math.imul(O,Z)|0,n=(n=n+Math.imul(O,K)|0)+Math.imul(L,Z)|0,o=o+Math.imul(L,K)|0,r=r+Math.imul(C,W)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,G)|0,r=r+Math.imul(B,$)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,Q)|0,r=r+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(S,it)|0,n=(n=n+Math.imul(S,rt)|0)+Math.imul(k,it)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,st)|0,r=r+Math.imul(g,at)|0,n=(n=n+Math.imul(g,ut)|0)+Math.imul(b,at)|0,o=o+Math.imul(b,ut)|0,r=r+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var Et=(u+(r=r+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,Z),n=(n=Math.imul(q,K))+Math.imul(F,Z)|0,o=Math.imul(F,K),r=r+Math.imul(O,W)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,G)|0,r=r+Math.imul(C,$)|0,n=(n=n+Math.imul(C,Q)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(B,Y)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(A,it)|0,n=(n=n+Math.imul(A,rt)|0)+Math.imul(x,it)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,st)|0,r=r+Math.imul(w,at)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(M,at)|0,o=o+Math.imul(M,ut)|0,r=r+Math.imul(g,lt)|0,n=(n=n+Math.imul(g,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(r=r+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,W),n=(n=Math.imul(q,G))+Math.imul(F,W)|0,o=Math.imul(F,G),r=r+Math.imul(O,$)|0,n=(n=n+Math.imul(O,Q)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,Q)|0,r=r+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,tt)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(B,it)|0,n=(n=n+Math.imul(B,rt)|0)+Math.imul(I,it)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,r=r+Math.imul(S,at)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(k,at)|0,o=o+Math.imul(k,ut)|0,r=r+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,ct)|0;var xt=(u+(r=r+Math.imul(g,pt)|0)|0)+((8191&(n=(n=n+Math.imul(g,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(q,$),n=(n=Math.imul(q,Q))+Math.imul(F,$)|0,o=Math.imul(F,Q),r=r+Math.imul(O,Y)|0,n=(n=n+Math.imul(O,tt)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,tt)|0,r=r+Math.imul(C,it)|0,n=(n=n+Math.imul(C,rt)|0)+Math.imul(T,it)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,r=r+Math.imul(A,at)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(x,at)|0,o=o+Math.imul(x,ut)|0,r=r+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,ct)|0;var Rt=(u+(r=r+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(M,pt)|0))<<13)|0;u=((o=o+Math.imul(M,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,Y),n=(n=Math.imul(q,tt))+Math.imul(F,Y)|0,o=Math.imul(F,tt),r=r+Math.imul(O,it)|0,n=(n=n+Math.imul(O,rt)|0)+Math.imul(L,it)|0,o=o+Math.imul(L,rt)|0,r=r+Math.imul(C,ot)|0,n=(n=n+Math.imul(C,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(B,at)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(I,at)|0,o=o+Math.imul(I,ut)|0,r=r+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ct)|0;var Bt=(u+(r=r+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(k,pt)|0))<<13)|0;u=((o=o+Math.imul(k,mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,it),n=(n=Math.imul(q,rt))+Math.imul(F,it)|0,o=Math.imul(F,rt),r=r+Math.imul(O,ot)|0,n=(n=n+Math.imul(O,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,r=r+Math.imul(C,at)|0,n=(n=n+Math.imul(C,ut)|0)+Math.imul(T,at)|0,o=o+Math.imul(T,ut)|0,r=r+Math.imul(B,lt)|0,n=(n=n+Math.imul(B,ct)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,ct)|0;var It=(u+(r=r+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,ot),n=(n=Math.imul(q,st))+Math.imul(F,ot)|0,o=Math.imul(F,st),r=r+Math.imul(O,at)|0,n=(n=n+Math.imul(O,ut)|0)+Math.imul(L,at)|0,o=o+Math.imul(L,ut)|0,r=r+Math.imul(C,lt)|0,n=(n=n+Math.imul(C,ct)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,ct)|0;var jt=(u+(r=r+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(I,pt)|0))<<13)|0;u=((o=o+Math.imul(I,mt)|0)+(n>>>13)|0)+(jt>>>26)|0,jt&=67108863,r=Math.imul(q,at),n=(n=Math.imul(q,ut))+Math.imul(F,at)|0,o=Math.imul(F,ut),r=r+Math.imul(O,lt)|0,n=(n=n+Math.imul(O,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0;var Ct=(u+(r=r+Math.imul(C,pt)|0)|0)+((8191&(n=(n=n+Math.imul(C,mt)|0)+Math.imul(T,pt)|0))<<13)|0;u=((o=o+Math.imul(T,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(q,lt),n=(n=Math.imul(q,ct))+Math.imul(F,lt)|0,o=Math.imul(F,ct);var Tt=(u+(r=r+Math.imul(O,pt)|0)|0)+((8191&(n=(n=n+Math.imul(O,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863;var Pt=(u+(r=Math.imul(q,pt))|0)+((8191&(n=(n=Math.imul(q,mt))+Math.imul(F,pt)|0))<<13)|0;return u=((o=Math.imul(F,mt))+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,a[0]=vt,a[1]=gt,a[2]=bt,a[3]=yt,a[4]=wt,a[5]=Mt,a[6]=_t,a[7]=St,a[8]=kt,a[9]=Et,a[10]=At,a[11]=xt,a[12]=Rt,a[13]=Bt,a[14]=It,a[15]=jt,a[16]=Ct,a[17]=Tt,a[18]=Pt,0!==u&&(a[19]=u,i.length++),i};function m(t,e,i){return(new v).mulp(t,e,i)}function v(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var i=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):i<63?d(this,t,e):i<1024?function(t,e,i){i.negative=e.negative^t.negative,i.length=t.length+e.length;for(var r=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}i.words[o]=h,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,t,e):m(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),i=o.prototype._countBits(t)-1,r=0;r>=1;return r},v.prototype.permute=function(t,e,i,r,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),i=0;i>>n}return e}(t);if(0===e.length)return new o(1);for(var i=this,r=0;r=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),h=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&h}return a&&0!==f&&(a.words[a.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(a/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===h)return this.strip();for(r(-1===h),h=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var i=(this.length,t.length),r=this.clone(),n=t,s=0|n.words[n.length-1];0!=(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var h,a=r.length-n.length;if("mod"!==e){(h=new o(null)).length=a+1,h.words=new Array(h.length);for(var u=0;u=0;l--){var c=67108864*(0|r.words[n.length+l])+(0|r.words[n.length+l-1]);for(c=Math.min(c/s|0,67108863),r._ishlnsubmul(n,c,l);0!==r.negative;)c--,r.negative=0,r._ishlnsubmul(n,1,l),r.isZero()||(r.negative^=1);h&&(h.words[l]=c)}return h&&h.strip(),r.strip(),"div"!==e&&0!==i&&r.iushrn(i),{div:h||null,mod:r}},o.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(h=this.neg().divmod(t,e),"mod"!==e&&(n=h.div.neg()),"div"!==e&&(s=h.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:n,mod:s}):0===this.negative&&0!==t.negative?(h=this.divmod(t.neg(),e),"mod"!==e&&(n=h.div.neg()),{div:n,mod:h.mod}):0!=(this.negative&t.negative)?(h=this.neg().divmod(t.neg(),e),"div"!==e&&(s=h.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:h.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,s,h},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var i=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),n=t.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new o(1),s=new o(0),h=new o(0),a=new o(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var f=i.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(f),s.isub(l)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(h.isOdd()||a.isOdd())&&(h.iadd(f),a.isub(l)),h.iushrn(1),a.iushrn(1);e.cmp(i)>=0?(e.isub(i),n.isub(h),s.isub(a)):(i.isub(e),h.isub(n),a.isub(s))}return{a:h,b:a,gcd:i.iushln(u)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,s=new o(1),h=new o(0),a=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);for(var l=0,c=1;0==(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(a),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(h)):(i.isub(e),h.isub(s))}return(n=0===e.cmpn(1)?s:h).cmpn(0)<0&&n.iadd(t),n},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),i=t.clone();e.negative=0,i.negative=0;for(var r=0;e.isEven()&&i.isEven();r++)e.iushrn(1),i.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=e.cmp(i);if(n<0){var o=e;e=i,i=o}else if(0===n||0===i.cmpn(1))break;e.isub(i)}return i.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,h&=67108863,this.words[s]=h}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;i--){var r=0|this.words[i],n=0|t.words[i];if(r!==n){rn&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new S(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,i=t;do{this.split(i,this.tmp),e=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},n(y,b),y.prototype.split=function(t,e){for(var i=4194303,r=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,i=0;i>>=26,t.words[i]=n,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new w;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},S.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var i=t.add(e);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var i=t.iadd(e);return i.cmp(this.m)>=0&&i.isub(this.m),i},S.prototype.sub=function(t,e){this._verify2(t,e);var i=t.sub(e);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var i=t.isub(e);return i.cmpn(0)<0&&i.iadd(this.m),i},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new o(1)).iushrn(2);return this.pow(t,i)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);r(!n.isZero());var h=new o(1).toRed(this),a=h.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,u).cmp(a);)f.redIAdd(a);for(var l=this.pow(f,n),c=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=s;0!==d.cmp(h);){for(var m=d,v=0;0!==m.cmp(h);v++)m=m.redSqr();r(v=0;r--){for(var u=e.words[r],f=a-1;f>=0;f--){var l=u>>f&1;n!==i[0]&&(n=this.sqr(n)),0!==l||0!==s?(s<<=1,s|=l,(4==++h||0===r&&0===f)&&(n=this.mul(n,i[s]),h=0,s=0)):h=0}a=26}return n},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},n(k,S),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var i=t.imul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var i=t.mul(e),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=i.nmd(t),this)},1313:(t,e,i)=>{var r,n;!function(o){"use strict";void 0===(n="function"==typeof(r=function(){var t=Object.prototype.toString;return function(){for(var t=new Array(arguments.length),n=0;n{"use strict";var r=i(5717),n=i(2318),o=i(9785),s=i(9072),h=i(1027);function a(t){h.call(this,"digest"),this._hash=t}r(a,h),a.prototype._update=function(t){this._hash.update(t)},a.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new n:"rmd160"===t||"ripemd160"===t?new o:new a(s(t))}},8028:(t,e,i)=>{var r=i(2318);t.exports=function(t){return(new r).update(t).digest()}},8355:(t,e,i)=>{"use strict";var r=i(5717),n=i(1031),o=i(1027),s=i(9509).Buffer,h=i(8028),a=i(9785),u=i(9072),f=s.alloc(128);function l(t,e){o.call(this,"digest"),"string"==typeof e&&(e=s.from(e));var i="sha512"===t||"sha384"===t?128:64;this._alg=t,this._key=e,e.length>i?e=("rmd160"===t?new a:u(t)).update(e).digest():e.length{"use strict";var r=i(5717),n=i(9509).Buffer,o=i(1027),s=n.alloc(128),h=64;function a(t,e){o.call(this,"digest"),"string"==typeof e&&(e=n.from(e)),this._alg=t,this._key=e,e.length>h?e=t(e):e.length{"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=i(1798),e.createHash=e.Hash=i(3482),e.createHmac=e.Hmac=i(8355);var r=i(6042),n=Object.keys(r),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);e.getHashes=function(){return o};var s=i(5632);e.pbkdf2=s.pbkdf2,e.pbkdf2Sync=s.pbkdf2Sync;var h=i(3614);e.Cipher=h.Cipher,e.createCipher=h.createCipher,e.Cipheriv=h.Cipheriv,e.createCipheriv=h.createCipheriv,e.Decipher=h.Decipher,e.createDecipher=h.createDecipher,e.Decipheriv=h.Decipheriv,e.createDecipheriv=h.createDecipheriv,e.getCiphers=h.getCiphers,e.listCiphers=h.listCiphers;var a=i(2607);e.DiffieHellmanGroup=a.DiffieHellmanGroup,e.createDiffieHellmanGroup=a.createDiffieHellmanGroup,e.getDiffieHellman=a.getDiffieHellman,e.createDiffieHellman=a.createDiffieHellman,e.DiffieHellman=a.DiffieHellman;var u=i(4743);e.createSign=u.createSign,e.Sign=u.Sign,e.createVerify=u.createVerify,e.Verify=u.Verify,e.createECDH=i(6393);var f=i(7900);e.publicEncrypt=f.publicEncrypt,e.privateEncrypt=f.privateEncrypt,e.publicDecrypt=f.publicDecrypt,e.privateDecrypt=f.privateDecrypt;var l=i(7963);e.randomFill=l.randomFill,e.randomFillSync=l.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},5251:(t,e,i)=>{"use strict";e.utils=i(1278),e.Cipher=i(5756),e.DES=i(778),e.CBC=i(9051),e.EDE=i(651)},9051:(t,e,i)=>{"use strict";var r=i(9746),n=i(5717),o={};function s(t){r.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e{"use strict";var r=i(9746);function n(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=n,n.prototype._init=function(){},n.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},n.prototype._buffer=function(t,e){for(var i=Math.min(this.buffer.length-this.bufferOff,t.length-e),r=0;r0;r--)e+=this._buffer(t,e),i+=this._flushBuffer(n,i);return e+=this._buffer(t,e),n},n.prototype.final=function(t){var e,i;return t&&(e=this.update(t)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(i):i},n.prototype._pad=function(t,e){if(0===e)return!1;for(;e{"use strict";var r=i(9746),n=i(5717),o=i(1278),s=i(5756);function h(){this.tmp=new Array(2),this.keys=null}function a(t){s.call(this,t);var e=new h;this._desState=e,this.deriveKeys(e,t.key)}n(a,s),t.exports=a,a.create=function(t){return new a(t)};var u=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];a.prototype.deriveKeys=function(t,e){t.keys=new Array(32),r.equal(e.length,this.blockSize,"Invalid key length");var i=o.readUInt32BE(e,0),n=o.readUInt32BE(e,4);o.pc1(i,n,t.tmp,0),i=t.tmp[0],n=t.tmp[1];for(var s=0;s>>1];i=o.r28shl(i,h),n=o.r28shl(n,h),o.pc2(i,n,t.keys,s)}},a.prototype._update=function(t,e,i,r){var n=this._desState,s=o.readUInt32BE(t,e),h=o.readUInt32BE(t,e+4);o.ip(s,h,n.tmp,0),s=n.tmp[0],h=n.tmp[1],"encrypt"===this.type?this._encrypt(n,s,h,n.tmp,0):this._decrypt(n,s,h,n.tmp,0),s=n.tmp[0],h=n.tmp[1],o.writeUInt32BE(i,s,r),o.writeUInt32BE(i,h,r+4)},a.prototype._pad=function(t,e){for(var i=t.length-e,r=e;r>>0,s=c}o.rip(h,s,r,n)},a.prototype._decrypt=function(t,e,i,r,n){for(var s=i,h=e,a=t.keys.length-2;a>=0;a-=2){var u=t.keys[a],f=t.keys[a+1];o.expand(s,t.tmp,0),u^=t.tmp[0],f^=t.tmp[1];var l=o.substitute(u,f),c=s;s=(h^o.permute(l))>>>0,h=c}o.rip(s,h,r,n)}},651:(t,e,i)=>{"use strict";var r=i(9746),n=i(5717),o=i(5756),s=i(778);function h(t,e){r.equal(e.length,24,"Invalid key length");var i=e.slice(0,8),n=e.slice(8,16),o=e.slice(16,24);this.ciphers="encrypt"===t?[s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:n}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:n}),s.create({type:"decrypt",key:i})]}function a(t){o.call(this,t);var e=new h(this.type,this.options.key);this._edeState=e}n(a,o),t.exports=a,a.create=function(t){return new a(t)},a.prototype._update=function(t,e,i,r){var n=this._edeState;n.ciphers[0]._update(t,e,i,r),n.ciphers[1]._update(i,r,i,r),n.ciphers[2]._update(i,r,i,r)},a.prototype._pad=s.prototype._pad,a.prototype._unpad=s.prototype._unpad},1278:(t,e)=>{"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,i){t[0+i]=e>>>24,t[1+i]=e>>>16&255,t[2+i]=e>>>8&255,t[3+i]=255&e},e.ip=function(t,e,i,r){for(var n=0,o=0,s=6;s>=0;s-=2){for(var h=0;h<=24;h+=8)n<<=1,n|=e>>>h+s&1;for(h=0;h<=24;h+=8)n<<=1,n|=t>>>h+s&1}for(s=6;s>=0;s-=2){for(h=1;h<=25;h+=8)o<<=1,o|=e>>>h+s&1;for(h=1;h<=25;h+=8)o<<=1,o|=t>>>h+s&1}i[r+0]=n>>>0,i[r+1]=o>>>0},e.rip=function(t,e,i,r){for(var n=0,o=0,s=0;s<4;s++)for(var h=24;h>=0;h-=8)n<<=1,n|=e>>>h+s&1,n<<=1,n|=t>>>h+s&1;for(s=4;s<8;s++)for(h=24;h>=0;h-=8)o<<=1,o|=e>>>h+s&1,o<<=1,o|=t>>>h+s&1;i[r+0]=n>>>0,i[r+1]=o>>>0},e.pc1=function(t,e,i,r){for(var n=0,o=0,s=7;s>=5;s--){for(var h=0;h<=24;h+=8)n<<=1,n|=e>>h+s&1;for(h=0;h<=24;h+=8)n<<=1,n|=t>>h+s&1}for(h=0;h<=24;h+=8)n<<=1,n|=e>>h+s&1;for(s=1;s<=3;s++){for(h=0;h<=24;h+=8)o<<=1,o|=e>>h+s&1;for(h=0;h<=24;h+=8)o<<=1,o|=t>>h+s&1}for(h=0;h<=24;h+=8)o<<=1,o|=t>>h+s&1;i[r+0]=n>>>0,i[r+1]=o>>>0},e.r28shl=function(t,e){return t<>>28-e};var i=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,r,n){for(var o=0,s=0,h=i.length>>>1,a=0;a>>i[a]&1;for(a=h;a>>i[a]&1;r[n+0]=o>>>0,r[n+1]=s>>>0},e.expand=function(t,e,i){var r=0,n=0;r=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=t>>>o&63;for(o=11;o>=3;o-=4)n|=t>>>o&63,n<<=6;n|=(31&t)<<1|t>>>31,e[i+0]=r>>>0,e[i+1]=n>>>0};var r=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var i=0,n=0;n<4;n++)i<<=4,i|=r[64*n+(t>>>18-6*n&63)];for(n=0;n<4;n++)i<<=4,i|=r[256+64*n+(e>>>18-6*n&63)];return i>>>0};var n=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,i=0;i>>n[i]&1;return e>>>0},e.padSplit=function(t,e,i){for(var r=t.toString(2);r.length{var r=i(8764).Buffer,n=i(3590),o=i(1930),s=i(7426),h={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(t){var e=new r(o[t].prime,"hex"),i=new r(o[t].gen,"hex");return new s(e,i)},e.createDiffieHellman=e.DiffieHellman=function t(e,i,o,a){return r.isBuffer(i)||void 0===h[i]?t(e,"binary",i,o):(i=i||"binary",a=a||"binary",o=o||new r([2]),r.isBuffer(o)||(o=new r(o,a)),"number"==typeof e?new s(n(e,o),o,!0):(r.isBuffer(e)||(e=new r(e,i)),new s(e,o,!0)))}},7426:(t,e,i)=>{var r=i(8764).Buffer,n=i(3620),o=new(i(3047)),s=new n(24),h=new n(11),a=new n(10),u=new n(3),f=new n(7),l=i(3590),c=i(1798);function d(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this._pub=new n(t),this}function p(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this._priv=new n(t),this}t.exports=v;var m={};function v(t,e,i){this.setGenerator(e),this.__prime=new n(t),this._prime=n.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,i?(this.setPublicKey=d,this.setPrivateKey=p):this._primeCode=8}function g(t,e){var i=new r(t.toArray());return e?i.toString(e):i}Object.defineProperty(v.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var i=e.toString("hex"),r=[i,t.toString(16)].join("_");if(r in m)return m[r];var n,c=0;if(t.isEven()||!l.simpleSieve||!l.fermatTest(t)||!o.test(t))return c+=1,c+="02"===i||"05"===i?8:4,m[r]=c,c;switch(o.test(t.shrn(1))||(c+=2),i){case"02":t.mod(s).cmp(h)&&(c+=8);break;case"05":(n=t.mod(a)).cmp(u)&&n.cmp(f)&&(c+=8);break;default:c+=4}return m[r]=c,c}(this.__prime,this.__gen)),this._primeCode}}),v.prototype.generateKeys=function(){return this._priv||(this._priv=new n(c(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},v.prototype.computeSecret=function(t){var e=(t=(t=new n(t)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new r(e.toArray()),o=this.getPrime();if(i.length{var r=i(1798);t.exports=b,b.simpleSieve=v,b.fermatTest=g;var n=i(3620),o=new n(24),s=new(i(3047)),h=new n(1),a=new n(2),u=new n(5),f=(new n(16),new n(8),new n(10)),l=new n(3),c=(new n(7),new n(11)),d=new n(4),p=(new n(12),null);function m(){if(null!==p)return p;var t=[];t[0]=2;for(var e=1,i=3;i<1048576;i+=2){for(var r=Math.ceil(Math.sqrt(i)),n=0;nt;)i.ishrn(1);if(i.isEven()&&i.iadd(h),i.testn(1)||i.iadd(a),e.cmp(a)){if(!e.cmp(u))for(;i.mod(f).cmp(l);)i.iadd(d)}else for(;i.mod(o).cmp(c);)i.iadd(d);if(v(p=i.shrn(1))&&v(i)&&g(p)&&g(i)&&s.test(p)&&s.test(i))return i}}},1930:t=>{"use strict";t.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},3620:function(t,e,i){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t}function o(t,e,i){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(i=e,e=10),this._init(t||0,e||10,i||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i(7748).Buffer}catch(t){}function h(t,e){var i=t.charCodeAt(e);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function a(t,e,i){var r=h(t,i);return i-1>=e&&(r|=h(t,i-1)<<4),r}function u(t,e,i,r){for(var n=0,o=Math.min(t.length,i),s=e;s=49?h-49+10:h>=17?h-17+10:h}return n}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-h&67108863,(h+=24)>=26&&(h-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,i){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)n=a(t,e,r)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=e)r++;r--,n=n/e|0;for(var o=t.length-i,s=o%r,h=Math.min(o,o-s)+i,a=0,f=i;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],c=[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(t,e,i){i.negative=e.negative^t.negative;var r=t.length+e.length|0;i.length=r,r=r-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,h=67108863&s,a=s/67108864|0;i.words[0]=h;for(var u=1;u