this.length||0>this.cmp(a)?{div:new f(0),mod:this}:1===a.length?"div"===b?{div:this.divn(a.words[0]),mod:null}:"mod"===b?{div:null,mod:new f(this.modn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new f(this.modn(a.words[0]))}:this._wordDiv(a,b)};f.prototype.div=function(a){return this.divmod(a,"div",!1).div};f.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod};f.prototype.umod=function(a){return this.divmod(a,"mod",
!0).mod};f.prototype.divRound=function(a){var b=this.divmod(a);if(b.mod.isZero())return b.div;var c=0!==b.div.negative?b.mod.isub(a):b.mod,d=a.ushrn(1);a=a.andln(1);c=c.cmp(d);return 0>c||1===a&&0===c?b.div:0!==b.div.negative?b.div.isubn(1):b.div.iaddn(1)};f.prototype.modn=function(a){c(67108863>=a);for(var b=67108864%a,d=0,f=this.length-1;0<=f;f--)d=(b*d+(this.words[f]|0))%a;return d};f.prototype.idivn=function(a){c(67108863>=a);for(var b=0,d=this.length-1;0<=d;d--)b=(this.words[d]|0)+67108864*b,
-this.words[d]=b/a|0,b%=a;return this.strip()};f.prototype.divn=function(a){return this.clone().idivn(a)};f.prototype.egcd=function(a){c(0===a.negative);c(!a.isZero());var b=this,d=a.clone(),b=0!==b.negative?b.umod(a):b.clone();a=new f(1);for(var e=new f(0),g=new f(0),k=new f(1),l=0;b.isEven()&&d.isEven();)b.iushrn(1),d.iushrn(1),++l;for(var h=d.clone(),m=b.clone();!b.isZero();){for(var p=0,n=1;0===(b.words[0]&n)&&26>p;++p,n<<=1);if(0p;++p,n<<=1);if(0
n;++n,p<<=1);if(0n;++n,p<<=1);if(0l;++l,h<<=1);if(0l;++l,h<<=1);if(0b.cmpn(0)&&b.iadd(a);return b};f.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var b=this.clone();a=a.clone();b.negative=0;for(var c=a.negative=0;b.isEven()&&a.isEven();c++)b.iushrn(1),
a.iushrn(1);do{for(;b.isEven();)b.iushrn(1);for(;a.isEven();)a.iushrn(1);var d=b.cmp(a);if(0>d)d=b,b=a,a=d;else if(0===d||0===a.cmpn(1))break;b.isub(a)}while(1);return a.iushln(c)};f.prototype.invm=function(a){return this.egcd(a).a.umod(a)};f.prototype.isEven=function(){return 0===(this.words[0]&1)};f.prototype.isOdd=function(){return 1===(this.words[0]&1)};f.prototype.andln=function(a){return this.words[0]&a};f.prototype.bincn=function(a){c("number"===typeof a);var b=a%26;a=(a-b)/26;b=1<>>26,d=d&67108863;this.words[a]=d}0!==b&&(this.words[a]=b,this.length++);return this};f.prototype.isZero=function(){return 1===this.length&&0===this.words[0]};f.prototype.cmpn=function(a){var b=0>a;if(0!==this.negative&&!b)return-1;if(0===this.negative&&b)return 1;this.strip();1=a,"Number is too big"),b=this.words[0]|0,a=b===a?0:bthis.n);b=bthis.n);b=b=a.length)a.words[0]=0,a.length=1;else{c=a.words[9];b.words[b.length++]=c&4194303;for(d=10;d>>22,c=b;c>>>=22;a.words[d-10]=c;a.length=0===c&&10>>26;a.words[c]=d}0!==b&&(a.words[a.length++]=b);return a};f._prime=function(a){if(F[a])return F[a];var b;if("k256"===a)b=new r;else if("p224"===a)b=new u;else if("p192"===a)b=new w;else if("p25519"===a)b=new B;else throw Error("Unknown prime "+a);return F[a]=b};q.prototype._verify1=function(a){c(0===a.negative,"red works only with positives");c(a.red,
+1]&&a.length--);return a};e(u,p);e(w,p);e(B,p);B.prototype.imulK=function(a){for(var b=0,c=0;c>>26;a.words[c]=d}0!==b&&(a.words[a.length++]=b);return a};f._prime=function(a){if(F[a])return F[a];var b;if("k256"===a)b=new r;else if("p224"===a)b=new u;else if("p192"===a)b=new w;else if("p25519"===a)b=new B;else throw Error("Unknown prime "+a);return F[a]=b};q.prototype._verify1=function(a){c(0===a.negative,"red works only with positives");c(a.red,
"red works only with red numbers")};q.prototype._verify2=function(a,b){c(0===(a.negative|b.negative),"red works only with positives");c(a.red&&a.red===b.red,"red works only with red numbers")};q.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)};q.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)};q.prototype.add=function(a,b){this._verify2(a,b);a=a.add(b);0<=a.cmp(this.m)&&a.isub(this.m);return a._forceRed(this)};
q.prototype.iadd=function(a,b){this._verify2(a,b);a=a.iadd(b);0<=a.cmp(this.m)&&a.isub(this.m);return a};q.prototype.sub=function(a,b){this._verify2(a,b);a=a.sub(b);0>a.cmpn(0)&&a.iadd(this.m);return a._forceRed(this)};q.prototype.isub=function(a,b){this._verify2(a,b);a=a.isub(b);0>a.cmpn(0)&&a.iadd(this.m);return a};q.prototype.shl=function(a,b){this._verify1(a);return this.imod(a.ushln(b))};q.prototype.imul=function(a,b){this._verify2(a,b);return this.imod(a.imul(b))};q.prototype.mul=function(a,
b){this._verify2(a,b);return this.imod(a.mul(b))};q.prototype.isqr=function(a){return this.imul(a,a.clone())};q.prototype.sqr=function(a){return this.mul(a,a)};q.prototype.sqrt=function(a){if(a.isZero())return a.clone();var b=this.m.andln(3);c(1===b%2);if(3===b)return b=this.m.add(new f(1)).iushrn(2),this.pow(a,b);for(var d=this.m.subn(1),e=0;!d.isZero()&&0===d.andln(1);)e++,d.iushrn(1);c(!d.isZero());for(var b=(new f(1)).toRed(this),g=b.redNeg(),k=this.m.subn(1).iushrn(1),l=this.m.bitLength(),l=
(new f(2*l*l)).toRed(this);0!==this.pow(l,k).cmp(g);)l.redIAdd(g);k=this.pow(l,d);g=this.pow(a,d.addn(1).iushrn(1));a=this.pow(a,d);for(d=e;0!==a.cmp(b);){l=a;for(e=0;0!==l.cmp(b);e++)l=l.redSqr();c(e>k&1;a!==c[0]&&(a=this.sqr(a));if(0===h&&0===e)g=0;else if(e<<=1,e|=h,g++,4===g||0===d&&0===k)a=this.mul(a,c[e]),e=g=0}k=26}return a};q.prototype.convertTo=function(a){var b=a.umod(this.m);return b===a?b.clone():b};q.prototype.convertFrom=function(a){a=a.clone();a.red=null;return a};
-f.mont=function(a){return new A(a)};e(A,q);A.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))};A.prototype.convertFrom=function(a){a=this.imod(a.mul(this.rinv));a.red=null;return a};A.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;a=a.imul(b);b=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);b=a=a.isub(b).iushrn(this.shift);0<=a.cmp(this.m)?b=a.isub(this.m):0>a.cmpn(0)&&(b=a.iadd(this.m));return b._forceRed(this)};A.prototype.mul=
-function(a,b){if(a.isZero()||b.isZero())return(new f(0))._forceRed(this);a=a.mul(b);b=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);b=a=a.isub(b).iushrn(this.shift);0<=a.cmp(this.m)?b=a.isub(this.m):0>a.cmpn(0)&&(b=a.iadd(this.m));return b._forceRed(this)};A.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}})("undefined"===typeof a||a,this)},{buffer:36}],35:[function(h,a,b){function c(a){this.rand=a}var e;a.exports=function(a){e||(e=new c(null));
+f.mont=function(a){return new z(a)};e(z,q);z.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))};z.prototype.convertFrom=function(a){a=this.imod(a.mul(this.rinv));a.red=null;return a};z.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;a=a.imul(b);b=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);b=a=a.isub(b).iushrn(this.shift);0<=a.cmp(this.m)?b=a.isub(this.m):0>a.cmpn(0)&&(b=a.iadd(this.m));return b._forceRed(this)};z.prototype.mul=
+function(a,b){if(a.isZero()||b.isZero())return(new f(0))._forceRed(this);a=a.mul(b);b=a.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);b=a=a.isub(b).iushrn(this.shift);0<=a.cmp(this.m)?b=a.isub(this.m):0>a.cmpn(0)&&(b=a.iadd(this.m));return b._forceRed(this)};z.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}})("undefined"===typeof a||a,this)},{buffer:36}],35:[function(h,a,b){function c(a){this.rand=a}var e;a.exports=function(a){e||(e=new c(null));
return e.generate(a)};a.exports.Rand=c;c.prototype.generate=function(a){return this._rand(a)};c.prototype._rand=function(a){if(this.rand.getBytes)return this.rand.getBytes(a);a=new Uint8Array(a);for(var b=0;b>>24]^g[h>>>16&255]^k[m>>>8&255]^c[p&255]^b[u++],n=d[h>>>24]^g[m>>>16&255]^k[p>>>8&255]^c[l&255]^b[u++],r=d[m>>>24]^g[p>>>16&255]^k[l>>>8&255]^c[h&255]^b[u++],p=d[p>>>24]^g[l>>>16&255]^k[h>>>8&255]^c[m&255]^b[u++],l=a,h=n,m=r;a=(f[l>>>24]<<24|f[h>>>16&255]<<16|f[m>>>8&255]<<8|f[p&255])^b[u++];n=(f[h>>>24]<<24|f[m>>>16&255]<<16|f[p>>>8&255]<<8|f[l&255])^b[u++];r=
-(f[m>>>24]<<24|f[p>>>16&255]<<16|f[l>>>8&255]<<8|f[h&255])^b[u++];p=(f[p>>>24]<<24|f[l>>>16&255]<<16|f[h>>>8&255]<<8|f[m&255])^b[u++];return[a>>>0,n>>>0,r>>>0,p>>>0]}function k(a){this._key=c(a);this._reset()}var f=h("safe-buffer").Buffer,m=[0,1,2,4,8,16,32,64,128,27,54],p=function(){for(var a=Array(256),b=0;256>b;b++)a[b]=128>b?b<<1:b<<1^283;for(var b=[],c=[],f=[[],[],[],[]],e=[[],[],[],[]],g=0,k=0,h=0;256>h;++h){var m=k^k<<1^k<<2^k<<3^k<<4,m=m>>>8^m&255^99;b[g]=m;c[m]=g;var p=a[g],x=a[p],v=a[x],
-y=257*a[m]^16843008*m;f[0][g]=y<<24|y>>>8;f[1][g]=y<<16|y>>>16;f[2][g]=y<<8|y>>>24;f[3][g]=y;y=16843009*v^65537*x^257*p^16843008*g;e[0][m]=y<<24|y>>>8;e[1][m]=y<<16|y>>>16;e[2][m]=y<<8|y>>>24;e[3][m]=y;0===g?g=k=1:(g=p^a[a[a[v^p]]],k^=a[a[k]])}return{SBOX:b,INV_SBOX:c,SUB_MIX:f,INV_SUB_MIX:e}}();k.blockSize=16;k.keySize=32;k.prototype.blockSize=k.blockSize;k.prototype.keySize=k.keySize;k.prototype._reset=function(){for(var a=this._key,b=a.length,c=b+6,f=4*(c+1),e=[],g=0;g>>24,a=p.SBOX[a>>>24]<<24|p.SBOX[a>>>16&255]<<16|p.SBOX[a>>>8&255]<<8|p.SBOX[a&255],a^=m[g/b|0]<<24):6>>24]<<24|p.SBOX[a>>>16&255]<<16|p.SBOX[a>>>8&255]<<8|p.SBOX[a&255]),e[g]=e[g-b]^a;b=[];for(g=0;gg||4>=a?k:p.INV_SUB_MIX[0][p.SBOX[k>>>24]]^p.INV_SUB_MIX[1][p.SBOX[k>>>16&255]]^p.INV_SUB_MIX[2][p.SBOX[k>>>8&255]]^p.INV_SUB_MIX[3][p.SBOX[k&255]]}this._nRounds=c;this._keySchedule=e;this._invKeySchedule=
-b};k.prototype.encryptBlockRaw=function(a){a=c(a);return g(a,this._keySchedule,p.SUB_MIX,p.SBOX,this._nRounds)};k.prototype.encryptBlock=function(a){a=this.encryptBlockRaw(a);var b=f.allocUnsafe(16);b.writeUInt32BE(a[0],0);b.writeUInt32BE(a[1],4);b.writeUInt32BE(a[2],8);b.writeUInt32BE(a[3],12);return b};k.prototype.decryptBlock=function(a){a=c(a);var b=a[1];a[1]=a[3];a[3]=b;a=g(a,this._invKeySchedule,p.INV_SUB_MIX,p.INV_SBOX,this._nRounds);b=f.allocUnsafe(16);b.writeUInt32BE(a[0],0);b.writeUInt32BE(a[3],
+0}function g(a,b,c,f,e){var d=c[0],g=c[1],k=c[2];c=c[3];for(var l=a[0]^b[0],h=a[1]^b[1],m=a[2]^b[2],n=a[3]^b[3],p,r,u=4,C=1;C>>24]^g[h>>>16&255]^k[m>>>8&255]^c[n&255]^b[u++],p=d[h>>>24]^g[m>>>16&255]^k[n>>>8&255]^c[l&255]^b[u++],r=d[m>>>24]^g[n>>>16&255]^k[l>>>8&255]^c[h&255]^b[u++],n=d[n>>>24]^g[l>>>16&255]^k[h>>>8&255]^c[m&255]^b[u++],l=a,h=p,m=r;a=(f[l>>>24]<<24|f[h>>>16&255]<<16|f[m>>>8&255]<<8|f[n&255])^b[u++];p=(f[h>>>24]<<24|f[m>>>16&255]<<16|f[n>>>8&255]<<8|f[l&255])^b[u++];r=
+(f[m>>>24]<<24|f[n>>>16&255]<<16|f[l>>>8&255]<<8|f[h&255])^b[u++];n=(f[n>>>24]<<24|f[l>>>16&255]<<16|f[h>>>8&255]<<8|f[m&255])^b[u++];return[a>>>0,p>>>0,r>>>0,n>>>0]}function k(a){this._key=c(a);this._reset()}var f=h("safe-buffer").Buffer,m=[0,1,2,4,8,16,32,64,128,27,54],n=function(){for(var a=Array(256),b=0;256>b;b++)a[b]=128>b?b<<1:b<<1^283;for(var b=[],c=[],f=[[],[],[],[]],e=[[],[],[],[]],g=0,k=0,h=0;256>h;++h){var m=k^k<<1^k<<2^k<<3^k<<4,m=m>>>8^m&255^99;b[g]=m;c[m]=g;var n=a[g],x=a[n],v=a[x],
+y=257*a[m]^16843008*m;f[0][g]=y<<24|y>>>8;f[1][g]=y<<16|y>>>16;f[2][g]=y<<8|y>>>24;f[3][g]=y;y=16843009*v^65537*x^257*n^16843008*g;e[0][m]=y<<24|y>>>8;e[1][m]=y<<16|y>>>16;e[2][m]=y<<8|y>>>24;e[3][m]=y;0===g?g=k=1:(g=n^a[a[a[v^n]]],k^=a[a[k]])}return{SBOX:b,INV_SBOX:c,SUB_MIX:f,INV_SUB_MIX:e}}();k.blockSize=16;k.keySize=32;k.prototype.blockSize=k.blockSize;k.prototype.keySize=k.keySize;k.prototype._reset=function(){for(var a=this._key,b=a.length,c=b+6,f=4*(c+1),e=[],g=0;g>>24,a=n.SBOX[a>>>24]<<24|n.SBOX[a>>>16&255]<<16|n.SBOX[a>>>8&255]<<8|n.SBOX[a&255],a^=m[g/b|0]<<24):6>>24]<<24|n.SBOX[a>>>16&255]<<16|n.SBOX[a>>>8&255]<<8|n.SBOX[a&255]),e[g]=e[g-b]^a;b=[];for(g=0;gg||4>=a?k:n.INV_SUB_MIX[0][n.SBOX[k>>>24]]^n.INV_SUB_MIX[1][n.SBOX[k>>>16&255]]^n.INV_SUB_MIX[2][n.SBOX[k>>>8&255]]^n.INV_SUB_MIX[3][n.SBOX[k&255]]}this._nRounds=c;this._keySchedule=e;this._invKeySchedule=
+b};k.prototype.encryptBlockRaw=function(a){a=c(a);return g(a,this._keySchedule,n.SUB_MIX,n.SBOX,this._nRounds)};k.prototype.encryptBlock=function(a){a=this.encryptBlockRaw(a);var b=f.allocUnsafe(16);b.writeUInt32BE(a[0],0);b.writeUInt32BE(a[1],4);b.writeUInt32BE(a[2],8);b.writeUInt32BE(a[3],12);return b};k.prototype.decryptBlock=function(a){a=c(a);var b=a[1];a[1]=a[3];a[3]=b;a=g(a,this._invKeySchedule,n.INV_SUB_MIX,n.INV_SBOX,this._nRounds);b=f.allocUnsafe(16);b.writeUInt32BE(a[0],0);b.writeUInt32BE(a[3],
4);b.writeUInt32BE(a[2],8);b.writeUInt32BE(a[1],12);return b};k.prototype.scrub=function(){e(this._keySchedule);e(this._invKeySchedule);e(this._key)};a.exports.AES=k},{"safe-buffer":160}],38:[function(h,a,b){function c(a,b,c,h){k.call(this);var d=g.alloc(4,0);this._cipher=new e.AES(b);d=this._cipher.encryptBlock(d);this._ghash=new f(d);b=c;if(12===b.length)this._finID=g.concat([b,g.from([0,0,0,1])]),c=g.concat([b,g.from([0,0,0,2])]);else{c=new f(d);var d=b.length,l=d%16;c.update(b);l&&c.update(g.alloc(16-
-l,0));c.update(g.alloc(8,0));b=8*d;d=g.alloc(8);d.writeUIntBE(b,0,8);c.update(d);this._finID=c.state;c=g.from(this._finID);p(c)}this._prev=g.from(c);this._cache=g.allocUnsafe(0);this._secCache=g.allocUnsafe(0);this._decrypt=h;this._len=this._alen=0;this._mode=a;this._authTag=null;this._called=!1}var e=h("./aes"),g=h("safe-buffer").Buffer,k=h("cipher-base");b=h("inherits");var f=h("./ghash"),m=h("buffer-xor"),p=h("./incr32");b(c,k);c.prototype._update=function(a){if(!this._called&&this._alen){var b=
+l,0));c.update(g.alloc(8,0));b=8*d;d=g.alloc(8);d.writeUIntBE(b,0,8);c.update(d);this._finID=c.state;c=g.from(this._finID);n(c)}this._prev=g.from(c);this._cache=g.allocUnsafe(0);this._secCache=g.allocUnsafe(0);this._decrypt=h;this._len=this._alen=0;this._mode=a;this._authTag=null;this._called=!1}var e=h("./aes"),g=h("safe-buffer").Buffer,k=h("cipher-base");b=h("inherits");var f=h("./ghash"),m=h("buffer-xor"),n=h("./incr32");b(c,k);c.prototype._update=function(a){if(!this._called&&this._alen){var b=
16-this._alen%16;16>b&&(b=g.alloc(b,0),this._ghash.update(b))}this._called=!0;b=this._mode.encrypt(this,a);this._decrypt?this._ghash.update(a):this._ghash.update(b);this._len+=a.length;return b};c.prototype._final=function(){if(this._decrypt&&!this._authTag)throw Error("Unsupported state or unable to authenticate data");var a=m(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID)),b;if(b=this._decrypt){b=this._authTag;var c=0;a.length!==b.length&&c++;for(var f=Math.min(a.length,
b.length),e=0;e>>0,0);b.writeUInt32BE(a[1]>>>0,4);b.writeUInt32BE(a[2]>>>0,8);b.writeUInt32BE(a[3]>>>0,
+c);return m.concat([this.cache,b])};b.createCipheriv=g;b.createCipher=function(a,b){var c=k[a.toLowerCase()];if(!c)throw new TypeError("invalid suite type");b=p(b,!1,c.key,c.iv);return g(a,b.key,b.iv)}},{"./aes":37,"./authCipher":38,"./modes":50,"./streamCipher":53,"cipher-base":66,evp_bytestokey:102,inherits:119,"safe-buffer":160}],42:[function(h,a,b){function c(a){var b=g.allocUnsafe(16);b.writeUInt32BE(a[0]>>>0,0);b.writeUInt32BE(a[1]>>>0,4);b.writeUInt32BE(a[2]>>>0,8);b.writeUInt32BE(a[3]>>>0,
12);return b}function e(a){this.h=a;this.state=g.alloc(16,0);this.cache=g.allocUnsafe(0)}var g=h("safe-buffer").Buffer,k=g.alloc(16,0);e.prototype.ghash=function(a){for(var b=-1;++b++g;){if(e=0!==(this.state[~~(g/8)]&1<<7-g%8))b[0]^=a[0],b[1]^=a[1],b[2]^=a[2],b[3]^=a[3];d=0!==(a[3]&1);for(e=3;0<
e;e--)a[e]=a[e]>>>1|(a[e-1]&1)<<31;a[0]>>>=1;d&&(a[0]^=-520093696)}this.state=c(b)};e.prototype.update=function(a){for(this.cache=g.concat([this.cache,a]);16<=this.cache.length;)a=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(a)};e.prototype.final=function(a,b){this.cache.length&&this.ghash(g.concat([this.cache,k],16));this.ghash(c([0,a,0,b]));return this.state};a.exports=e},{"safe-buffer":160}],43:[function(h,a,b){a.exports=function(a){for(var b=a.length,c;b--;)if(c=a.readUInt8(b),
255===c)a.writeUInt8(0,b);else{c++;a.writeUInt8(c,b);break}}},{}],44:[function(h,a,b){var c=h("buffer-xor");b.encrypt=function(a,b){b=c(b,a._prev);a._prev=a._cipher.encryptBlock(b);return a._prev};b.decrypt=function(a,b){var e=a._prev;a._prev=b;a=a._cipher.decryptBlock(b);return c(a,e)}},{"buffer-xor":64}],45:[function(h,a,b){function c(a,b,c){var f=b.length,d=g(b,a._cache);a._cache=a._cache.slice(f);a._prev=e.concat([a._prev,c?b:d]);return d}var e=h("safe-buffer").Buffer,g=h("buffer-xor");b.encrypt=
-function(a,b,g){for(var f=e.allocUnsafe(0),d;b.length;)if(0===a._cache.length&&(a._cache=a._cipher.encryptBlock(a._prev),a._prev=e.allocUnsafe(0)),a._cache.length<=b.length)d=a._cache.length,f=e.concat([f,c(a,b.slice(0,d),g)]),b=b.slice(d);else{f=e.concat([f,c(a,b,g)]);break}return f}},{"buffer-xor":64,"safe-buffer":160}],46:[function(h,a,b){var c=h("safe-buffer").Buffer;b.encrypt=function(a,b,k){for(var f=b.length,e=c.allocUnsafe(f),g=-1;++g++w;){u=
-l._cipher.encryptBlock(l._prev);q=h&1<<7-w?128:0;A=u[0]^q;B+=(A&128)>>w%8;u=l;var D=l._prev;q=r?q:A;A=D.length;for(var x=-1,v=c.allocUnsafe(D.length),D=c.concat([D,c.from([q])]);++x>7;u._prev=v}e[d]=B}return e}},{"safe-buffer":160}],47:[function(h,a,b){(function(a){b.encrypt=function(b,c,k){for(var f=c.length,e=a.allocUnsafe(f),g=-1;++g++w;){u=
+l._cipher.encryptBlock(l._prev);q=h&1<<7-w?128:0;z=u[0]^q;B+=(z&128)>>w%8;u=l;var D=l._prev;q=r?q:z;z=D.length;for(var x=-1,v=c.allocUnsafe(D.length),D=c.concat([D,c.from([q])]);++x>7;u._prev=v}e[d]=B}return e}},{"safe-buffer":160}],47:[function(h,a,b){(function(a){b.encrypt=function(b,c,k){for(var f=c.length,e=a.allocUnsafe(f),g=-1;++g=a.cmpn(0))throw Error("invalid sig");if(a.cmp(b)>=b)throw Error("invalid sig");}var g=h("bn.js"),k=h("elliptic").ec,f=h("parse-asn1"),m=h("./curves.json");a.exports=function(a,d,e,h,r){e=f(e);
-if("ec"===e.type){if("ecdsa"!==h&&"ecdsa/rsa"!==h)throw Error("wrong public key type");h=m[e.data.algorithm.curve.join(".")];if(!h)throw Error("unknown curve "+e.data.algorithm.curve.join("."));return(new k(h)).verify(d,a,e.data.subjectPrivateKey.data)}if("dsa"===e.type){if("dsa"!==h)throw Error("wrong public key type");h=e.data.p;r=e.data.q;var l=e.data.g;e=e.data.pub_key;var p=f.signature.decode(a,"der");a=p.s;p=p.r;c(a,r);c(p,r);var n=g.mont(h);a=a.invm(r);return 0===l.toRed(n).redPow((new g(d)).mul(a).mod(r)).fromRed().mul(e.toRed(n).redPow(p.mul(a).mod(r)).fromRed()).mod(h).mod(r).cmp(p)}if("rsa"!==
-h&&"ecdsa/rsa"!==h)throw Error("wrong public key type");d=b.concat([r,d]);r=e.modulus.byteLength();h=[1];for(l=0;d.length+h.length+2l?1:0;r=Math.min(a.length,h.length);a.length!==h.length&&(e=1);for(p=-1;++pl?1:0;r=Math.min(a.length,h.length);a.length!==h.length&&(e=1);for(n=-1;++nt)throw new RangeError("Invalid typed array length");a=new Uint8Array(a);a.__proto__=e.prototype;return a}function e(a,b,c){if("number"===typeof a){if("string"===typeof b)throw Error("If encoding is specified then the first argument must be a string");
return f(a)}return g(a,b,c)}function g(a,b,d){if("number"===typeof a)throw new TypeError('"value" argument must not be a number');if(G(a)){if(0>b||a.byteLength