@dodoex/wallet-web3 0.0.41-1 → 0.0.41-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DefaultJsonRpcProvider-ae4e010b.js → DefaultJsonRpcProvider-583987df.js} +1 -1
- package/dist/__node-resolve_empty-0b485399.js +1 -0
- package/dist/__tslib-ced6fd51.js +1 -0
- package/dist/{blocto-6012bcee.js → blocto-f42a61b6.js} +1 -1
- package/dist/{bn-f63668bd.js → bn-d8f0262c.js} +1 -1
- package/dist/{browser-ponyfill-6a7a565b.js → browser-ponyfill-635ba813.js} +1 -1
- package/dist/cjs/{DefaultJsonRpcProvider-2894e1a2.cjs → DefaultJsonRpcProvider-9f539cb7.cjs} +1 -1
- package/dist/cjs/{__node-resolve_empty-f57ca5f8.cjs → __node-resolve_empty-8f743760.cjs} +1 -1
- package/dist/cjs/__tslib-86b51b1b.cjs +1 -0
- package/dist/cjs/{blocto-14265f1b.cjs → blocto-71a53312.cjs} +1 -1
- package/dist/cjs/{bn-002a9654.cjs → bn-f94d2173.cjs} +1 -1
- package/dist/cjs/{browser-ponyfill-f8923c78.cjs → browser-ponyfill-e352d0ba.cjs} +1 -1
- package/dist/cjs/{draggabilly-7288c192.cjs → draggabilly-218423e5.cjs} +1 -1
- package/dist/cjs/{ethers-747d32a6.cjs → ethers-3b1d7d09.cjs} +1 -1
- package/dist/cjs/{id-ef87d991.cjs → id-d2547ab8.cjs} +1 -1
- package/dist/cjs/{index-fdec095f.cjs → index-15ff0303.cjs} +1 -1
- package/dist/cjs/{index-7e3602c5.cjs → index-16586b6f.cjs} +1 -1
- package/dist/cjs/{index-bec3f245.cjs → index-3b9b0297.cjs} +1 -1
- package/dist/cjs/{index-7de08e81.cjs → index-4957886b.cjs} +1 -1
- package/dist/cjs/{index-e368a1ec.cjs → index-66442a21.cjs} +1 -1
- package/dist/cjs/{index-4b9cc9db.cjs → index-9fa73ad5.cjs} +2 -2
- package/dist/cjs/index-d400c95d.cjs +1 -0
- package/dist/cjs/{index-8e7ec75f.cjs → index-e6510853.cjs} +1 -1
- package/dist/cjs/{index-d291a707.cjs → index-f1d55466.cjs} +1 -1
- package/dist/cjs/{index-475b4539.cjs → index-f9b3e693.cjs} +2 -2
- package/dist/cjs/{index-f107e2df.cjs → index-fece914f.cjs} +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{index.es-8a10cab5.cjs → index.es-24601ae9.cjs} +1 -1
- package/dist/cjs/{interface-c5af1d39.cjs → interface-b141cac1.cjs} +1 -1
- package/dist/cjs/{lib-typedarrays-18eafa57.cjs → lib-typedarrays-16b8679e.cjs} +1 -1
- package/dist/cjs/{portis-3e53aa74.cjs → portis-8a542a71.cjs} +1 -1
- package/dist/cjs/{provider-0765a0c4.cjs → provider-97d6accc.cjs} +1 -1
- package/dist/cjs/{rainbow-f0553261.cjs → rainbow-e2f8e93b.cjs} +1 -1
- package/dist/cjs/{sha224-f39873dc.cjs → sha224-677fefaf.cjs} +1 -1
- package/dist/cjs/{sha256-0f1577ad.cjs → sha256-722ffe23.cjs} +1 -1
- package/dist/cjs/{uAuth-9f12e987.cjs → uAuth-ad6cc7bb.cjs} +1 -1
- package/dist/cjs/{walletConnect-08310517.cjs → walletConnect-38298739.cjs} +1 -1
- package/dist/cjs/{walletLink-695f93b6.cjs → walletLink-31aaa2a8.cjs} +1 -1
- package/dist/{draggabilly-be876492.js → draggabilly-ce8c12b6.js} +1 -1
- package/dist/{ethers-a71b41f1.js → ethers-7b46939e.js} +1 -1
- package/dist/{id-aa7002c2.js → id-854c92f2.js} +1 -1
- package/dist/{index-0c189400.js → index-0cd3036e.js} +1 -1
- package/dist/{index-a7fd26b2.js → index-34ca0120.js} +1 -1
- package/dist/{index-c8b61e1c.js → index-546ca9d4.js} +1 -1
- package/dist/{index-2ff19703.js → index-6b1cae41.js} +1 -1
- package/dist/index-75bd164d.js +1 -0
- package/dist/{index-9d6a1b0f.js → index-7c400140.js} +2 -2
- package/dist/{index-f9177065.js → index-c57b0448.js} +1 -1
- package/dist/{index-cae05be8.js → index-cb13f500.js} +1 -1
- package/dist/{index-3a56ad18.js → index-cdfcca5b.js} +1 -1
- package/dist/{index-f19f4eef.js → index-dd28f95d.js} +1 -1
- package/dist/{index-1fa84282.js → index-e7c8df7f.js} +1 -1
- package/dist/{index.es-59cd195e.js → index.es-5adf8ffb.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{interface-9c07cadd.js → interface-9f8f54a0.js} +1 -1
- package/dist/{lib-typedarrays-fcec28ff.js → lib-typedarrays-509620fd.js} +1 -1
- package/dist/{portis-6134280d.js → portis-cd3a3d3c.js} +1 -1
- package/dist/{provider-b7f8b65b.js → provider-0d0e4055.js} +1 -1
- package/dist/{rainbow-9e32f732.js → rainbow-0c05f6fc.js} +1 -1
- package/dist/sha224-a8f71aae.js +1 -0
- package/dist/{sha256-3dad34ed.js → sha256-46b03365.js} +1 -1
- package/dist/{uAuth-fac6fff4.js → uAuth-1a8670b8.js} +1 -1
- package/dist/{walletConnect-62201bb8.js → walletConnect-fa40acff.js} +1 -1
- package/dist/{walletLink-82cc3eeb.js → walletLink-cb34aa54.js} +1 -1
- package/package.json +1 -1
- package/dist/__node-resolve_empty-adff7651.js +0 -1
- package/dist/__tslib-b3416fbd.js +0 -1
- package/dist/cjs/__tslib-47f6b6a1.cjs +0 -1
- package/dist/cjs/index-b30f5999.cjs +0 -1
- package/dist/index-466c44f8.js +0 -1
- package/dist/sha224-849f74bf.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t}from"./index-0c189400.js";import{r as i}from"./__node-resolve_empty-adff7651.js";var r={exports:{}};!function(t,r){function h(t,i){if(!t)throw new Error(i||"Assertion failed")}function n(t,i){t.super_=i;var r=function(){};r.prototype=i.prototype,t.prototype=new r,t.prototype.constructor=t}function e(t,i,r){if(e.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==i&&"be"!==i||(r=i,i=10),this._init(t||0,i||10,r||"be"))}var o;"object"==typeof t?t.exports=e:r.BN=e,e.BN=e,e.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i.Buffer}catch(t){}function s(t,i){var r=t.charCodeAt(i);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void h(!1,"Invalid character in "+t)}function u(t,i,r){var h=s(t,r);return r-1>=i&&(h|=s(t,r-1)<<4),h}function l(t,i,r,n){for(var e=0,o=0,s=Math.min(t.length,r),u=i;u<s;u++){var l=t.charCodeAt(u)-48;e*=n,o=l>=49?l-49+10:l>=17?l-17+10:l,h(l>=0&&o<n,"Invalid character"),e+=o}return e}function a(t,i){t.words=i.words,t.length=i.length,t.negative=i.negative,t.red=i.red}if(e.isBN=function(t){return t instanceof e||null!==t&&"object"==typeof t&&t.constructor.wordSize===e.wordSize&&Array.isArray(t.words)},e.max=function(t,i){return t.cmp(i)>0?t:i},e.min=function(t,i){return t.cmp(i)<0?t:i},e.prototype._init=function(t,i,r){if("number"==typeof t)return this._initNumber(t,i,r);if("object"==typeof t)return this._initArray(t,i,r);"hex"===i&&(i=16),h(i===(0|i)&&i>=2&&i<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===i?this._parseHex(t,n,r):(this._parseBase(t,i,n),"le"===r&&this._initArray(this.toArray(),i,r)))},e.prototype._initNumber=function(t,i,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(h(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),i,r)},e.prototype._initArray=function(t,i,r){if(h("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var e,o,s=0;if("be"===r)for(n=t.length-1,e=0;n>=0;n-=3)o=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[e]|=o<<s&67108863,this.words[e+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,e++);else if("le"===r)for(n=0,e=0;n<t.length;n+=3)o=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[e]|=o<<s&67108863,this.words[e+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,e++);return this._strip()},e.prototype._parseHex=function(t,i,r){this.length=Math.ceil((t.length-i)/6),this.words=new Array(this.length);for(var h=0;h<this.length;h++)this.words[h]=0;var n,e=0,o=0;if("be"===r)for(h=t.length-1;h>=i;h-=2)n=u(t,i,h)<<e,this.words[o]|=67108863&n,e>=18?(e-=18,o+=1,this.words[o]|=n>>>26):e+=8;else for(h=(t.length-i)%2==0?i+1:i;h<t.length;h+=2)n=u(t,i,h)<<e,this.words[o]|=67108863&n,e>=18?(e-=18,o+=1,this.words[o]|=n>>>26):e+=8;this._strip()},e.prototype._parseBase=function(t,i,r){this.words=[0],this.length=1;for(var h=0,n=1;n<=67108863;n*=i)h++;h--,n=n/i|0;for(var e=t.length-r,o=e%h,s=Math.min(e,e-o)+r,u=0,a=r;a<s;a+=h)u=l(t,a,a+h,i),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==o){var m=1;for(u=l(t,a,t.length,i),a=0;a<o;a++)m*=i;this.imuln(m),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},e.prototype.copy=function(t){t.words=new Array(this.length);for(var i=0;i<this.length;i++)t.words[i]=this.words[i];t.length=this.length,t.negative=this.negative,t.red=this.red},e.prototype._move=function(t){a(t,this)},e.prototype.clone=function(){var t=new e(null);return this.copy(t),t},e.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},e.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},e.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{e.prototype[Symbol.for("nodejs.util.inspect.custom")]=m}catch(t){e.prototype.inspect=m}else e.prototype.inspect=m;function m(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}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"],d=[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],p=[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 M(t,i,r){r.negative=i.negative^t.negative;var h=t.length+i.length|0;r.length=h,h=h-1|0;var n=0|t.words[0],e=0|i.words[0],o=n*e,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var l=1;l<h;l++){for(var a=u>>>26,m=67108863&u,f=Math.min(l,i.length-1),d=Math.max(0,l-t.length+1);d<=f;d++){var p=l-d|0;a+=(o=(n=0|t.words[p])*(e=0|i.words[d])+m)/67108864|0,m=67108863&o}r.words[l]=0|m,u=0|a}return 0!==u?r.words[l]=0|u:r.length--,r._strip()}e.prototype.toString=function(t,i){var r;if(i=0|i||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,e=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<n|e)).toString(16);e=s>>>24-n&16777215,(n+=2)>=26&&(n-=26,o--),r=0!==e||o!==this.length-1?f[6-u.length]+u+r:u+r}for(0!==e&&(r=e.toString(16)+r);r.length%i!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=d[t],a=p[t];r="";var m=this.clone();for(m.negative=0;!m.isZero();){var M=m.modrn(a).toString(t);r=(m=m.idivn(a)).isZero()?M+r:f[l-M.length]+M+r}for(this.isZero()&&(r="0"+r);r.length%i!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}h(!1,"Base should be between 2 and 36")},e.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&&h(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},e.prototype.toJSON=function(){return this.toString(16,2)},o&&(e.prototype.toBuffer=function(t,i){return this.toArrayLike(o,t,i)}),e.prototype.toArray=function(t,i){return this.toArrayLike(Array,t,i)},e.prototype.toArrayLike=function(t,i,r){this._strip();var n=this.byteLength(),e=r||Math.max(1,n);h(n<=e,"byte array longer than desired length"),h(e>0,"Requested array length <= 0");var o=function(t,i){return t.allocUnsafe?t.allocUnsafe(i):new t(i)}(t,e);return this["_toArrayLike"+("le"===i?"LE":"BE")](o,n),o},e.prototype._toArrayLikeLE=function(t,i){for(var r=0,h=0,n=0,e=0;n<this.length;n++){var o=this.words[n]<<e|h;t[r++]=255&o,r<t.length&&(t[r++]=o>>8&255),r<t.length&&(t[r++]=o>>16&255),6===e?(r<t.length&&(t[r++]=o>>24&255),h=0,e=0):(h=o>>>24,e+=2)}if(r<t.length)for(t[r++]=h;r<t.length;)t[r++]=0},e.prototype._toArrayLikeBE=function(t,i){for(var r=t.length-1,h=0,n=0,e=0;n<this.length;n++){var o=this.words[n]<<e|h;t[r--]=255&o,r>=0&&(t[r--]=o>>8&255),r>=0&&(t[r--]=o>>16&255),6===e?(r>=0&&(t[r--]=o>>24&255),h=0,e=0):(h=o>>>24,e+=2)}if(r>=0)for(t[r--]=h;r>=0;)t[r--]=0},Math.clz32?e.prototype._countBits=function(t){return 32-Math.clz32(t)}:e.prototype._countBits=function(t){var i=t,r=0;return i>=4096&&(r+=13,i>>>=13),i>=64&&(r+=7,i>>>=7),i>=8&&(r+=4,i>>>=4),i>=2&&(r+=2,i>>>=2),r+i},e.prototype._zeroBits=function(t){if(0===t)return 26;var i=t,r=0;return 0==(8191&i)&&(r+=13,i>>>=13),0==(127&i)&&(r+=7,i>>>=7),0==(15&i)&&(r+=4,i>>>=4),0==(3&i)&&(r+=2,i>>>=2),0==(1&i)&&r++,r},e.prototype.bitLength=function(){var t=this.words[this.length-1],i=this._countBits(t);return 26*(this.length-1)+i},e.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,i=0;i<this.length;i++){var r=this._zeroBits(this.words[i]);if(t+=r,26!==r)break}return t},e.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},e.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},e.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},e.prototype.isNeg=function(){return 0!==this.negative},e.prototype.neg=function(){return this.clone().ineg()},e.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},e.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]|t.words[i];return this._strip()},e.prototype.ior=function(t){return h(0==(this.negative|t.negative)),this.iuor(t)},e.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},e.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},e.prototype.iuand=function(t){var i;i=this.length>t.length?t:this;for(var r=0;r<i.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=i.length,this._strip()},e.prototype.iand=function(t){return h(0==(this.negative|t.negative)),this.iuand(t)},e.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},e.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},e.prototype.iuxor=function(t){var i,r;this.length>t.length?(i=this,r=t):(i=t,r=this);for(var h=0;h<r.length;h++)this.words[h]=i.words[h]^r.words[h];if(this!==i)for(;h<i.length;h++)this.words[h]=i.words[h];return this.length=i.length,this._strip()},e.prototype.ixor=function(t){return h(0==(this.negative|t.negative)),this.iuxor(t)},e.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},e.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},e.prototype.inotn=function(t){h("number"==typeof t&&t>=0);var i=0|Math.ceil(t/26),r=t%26;this._expand(i),r>0&&i--;for(var n=0;n<i;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},e.prototype.notn=function(t){return this.clone().inotn(t)},e.prototype.setn=function(t,i){h("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=i?this.words[r]|1<<n:this.words[r]&~(1<<n),this._strip()},e.prototype.iadd=function(t){var i,r,h;if(0!==this.negative&&0===t.negative)return this.negative=0,i=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,i=this.isub(t),t.negative=1,i._normSign();this.length>t.length?(r=this,h=t):(r=t,h=this);for(var n=0,e=0;e<h.length;e++)i=(0|r.words[e])+(0|h.words[e])+n,this.words[e]=67108863&i,n=i>>>26;for(;0!==n&&e<r.length;e++)i=(0|r.words[e])+n,this.words[e]=67108863&i,n=i>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;e<r.length;e++)this.words[e]=r.words[e];return this},e.prototype.add=function(t){var i;return 0!==t.negative&&0===this.negative?(t.negative=0,i=this.sub(t),t.negative^=1,i):0===t.negative&&0!==this.negative?(this.negative=0,i=t.sub(this),this.negative=1,i):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},e.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var i=this.iadd(t);return t.negative=1,i._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,h,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,h=t):(r=t,h=this);for(var e=0,o=0;o<h.length;o++)e=(i=(0|r.words[o])-(0|h.words[o])+e)>>26,this.words[o]=67108863&i;for(;0!==e&&o<r.length;o++)e=(i=(0|r.words[o])+e)>>26,this.words[o]=67108863&i;if(0===e&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this._strip()},e.prototype.sub=function(t){return this.clone().isub(t)};var v=function(t,i,r){var h,n,e,o=t.words,s=i.words,u=r.words,l=0,a=0|o[0],m=8191&a,f=a>>>13,d=0|o[1],p=8191&d,M=d>>>13,v=0|o[2],g=8191&v,c=v>>>13,w=0|o[3],y=8191&w,b=w>>>13,_=0|o[4],k=8191&_,A=_>>>13,S=0|o[5],x=8191&S,q=S>>>13,Z=0|o[6],B=8191&Z,R=Z>>>13,L=0|o[7],N=8191&L,E=L>>>13,I=0|o[8],z=8191&I,O=I>>>13,T=0|o[9],j=8191&T,K=T>>>13,F=0|s[0],U=8191&F,C=F>>>13,D=0|s[1],H=8191&D,P=D>>>13,J=0|s[2],G=8191&J,Q=J>>>13,V=0|s[3],W=8191&V,X=V>>>13,Y=0|s[4],$=8191&Y,tt=Y>>>13,it=0|s[5],rt=8191&it,ht=it>>>13,nt=0|s[6],et=8191&nt,ot=nt>>>13,st=0|s[7],ut=8191&st,lt=st>>>13,at=0|s[8],mt=8191&at,ft=at>>>13,dt=0|s[9],pt=8191&dt,Mt=dt>>>13;r.negative=t.negative^i.negative,r.length=19;var vt=(l+(h=Math.imul(m,U))|0)+((8191&(n=(n=Math.imul(m,C))+Math.imul(f,U)|0))<<13)|0;l=((e=Math.imul(f,C))+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,h=Math.imul(p,U),n=(n=Math.imul(p,C))+Math.imul(M,U)|0,e=Math.imul(M,C);var gt=(l+(h=h+Math.imul(m,H)|0)|0)+((8191&(n=(n=n+Math.imul(m,P)|0)+Math.imul(f,H)|0))<<13)|0;l=((e=e+Math.imul(f,P)|0)+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,h=Math.imul(g,U),n=(n=Math.imul(g,C))+Math.imul(c,U)|0,e=Math.imul(c,C),h=h+Math.imul(p,H)|0,n=(n=n+Math.imul(p,P)|0)+Math.imul(M,H)|0,e=e+Math.imul(M,P)|0;var ct=(l+(h=h+Math.imul(m,G)|0)|0)+((8191&(n=(n=n+Math.imul(m,Q)|0)+Math.imul(f,G)|0))<<13)|0;l=((e=e+Math.imul(f,Q)|0)+(n>>>13)|0)+(ct>>>26)|0,ct&=67108863,h=Math.imul(y,U),n=(n=Math.imul(y,C))+Math.imul(b,U)|0,e=Math.imul(b,C),h=h+Math.imul(g,H)|0,n=(n=n+Math.imul(g,P)|0)+Math.imul(c,H)|0,e=e+Math.imul(c,P)|0,h=h+Math.imul(p,G)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(M,G)|0,e=e+Math.imul(M,Q)|0;var wt=(l+(h=h+Math.imul(m,W)|0)|0)+((8191&(n=(n=n+Math.imul(m,X)|0)+Math.imul(f,W)|0))<<13)|0;l=((e=e+Math.imul(f,X)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,h=Math.imul(k,U),n=(n=Math.imul(k,C))+Math.imul(A,U)|0,e=Math.imul(A,C),h=h+Math.imul(y,H)|0,n=(n=n+Math.imul(y,P)|0)+Math.imul(b,H)|0,e=e+Math.imul(b,P)|0,h=h+Math.imul(g,G)|0,n=(n=n+Math.imul(g,Q)|0)+Math.imul(c,G)|0,e=e+Math.imul(c,Q)|0,h=h+Math.imul(p,W)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(M,W)|0,e=e+Math.imul(M,X)|0;var yt=(l+(h=h+Math.imul(m,$)|0)|0)+((8191&(n=(n=n+Math.imul(m,tt)|0)+Math.imul(f,$)|0))<<13)|0;l=((e=e+Math.imul(f,tt)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,h=Math.imul(x,U),n=(n=Math.imul(x,C))+Math.imul(q,U)|0,e=Math.imul(q,C),h=h+Math.imul(k,H)|0,n=(n=n+Math.imul(k,P)|0)+Math.imul(A,H)|0,e=e+Math.imul(A,P)|0,h=h+Math.imul(y,G)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,G)|0,e=e+Math.imul(b,Q)|0,h=h+Math.imul(g,W)|0,n=(n=n+Math.imul(g,X)|0)+Math.imul(c,W)|0,e=e+Math.imul(c,X)|0,h=h+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(M,$)|0,e=e+Math.imul(M,tt)|0;var bt=(l+(h=h+Math.imul(m,rt)|0)|0)+((8191&(n=(n=n+Math.imul(m,ht)|0)+Math.imul(f,rt)|0))<<13)|0;l=((e=e+Math.imul(f,ht)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,h=Math.imul(B,U),n=(n=Math.imul(B,C))+Math.imul(R,U)|0,e=Math.imul(R,C),h=h+Math.imul(x,H)|0,n=(n=n+Math.imul(x,P)|0)+Math.imul(q,H)|0,e=e+Math.imul(q,P)|0,h=h+Math.imul(k,G)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(A,G)|0,e=e+Math.imul(A,Q)|0,h=h+Math.imul(y,W)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(b,W)|0,e=e+Math.imul(b,X)|0,h=h+Math.imul(g,$)|0,n=(n=n+Math.imul(g,tt)|0)+Math.imul(c,$)|0,e=e+Math.imul(c,tt)|0,h=h+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,ht)|0)+Math.imul(M,rt)|0,e=e+Math.imul(M,ht)|0;var _t=(l+(h=h+Math.imul(m,et)|0)|0)+((8191&(n=(n=n+Math.imul(m,ot)|0)+Math.imul(f,et)|0))<<13)|0;l=((e=e+Math.imul(f,ot)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,h=Math.imul(N,U),n=(n=Math.imul(N,C))+Math.imul(E,U)|0,e=Math.imul(E,C),h=h+Math.imul(B,H)|0,n=(n=n+Math.imul(B,P)|0)+Math.imul(R,H)|0,e=e+Math.imul(R,P)|0,h=h+Math.imul(x,G)|0,n=(n=n+Math.imul(x,Q)|0)+Math.imul(q,G)|0,e=e+Math.imul(q,Q)|0,h=h+Math.imul(k,W)|0,n=(n=n+Math.imul(k,X)|0)+Math.imul(A,W)|0,e=e+Math.imul(A,X)|0,h=h+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,e=e+Math.imul(b,tt)|0,h=h+Math.imul(g,rt)|0,n=(n=n+Math.imul(g,ht)|0)+Math.imul(c,rt)|0,e=e+Math.imul(c,ht)|0,h=h+Math.imul(p,et)|0,n=(n=n+Math.imul(p,ot)|0)+Math.imul(M,et)|0,e=e+Math.imul(M,ot)|0;var kt=(l+(h=h+Math.imul(m,ut)|0)|0)+((8191&(n=(n=n+Math.imul(m,lt)|0)+Math.imul(f,ut)|0))<<13)|0;l=((e=e+Math.imul(f,lt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,h=Math.imul(z,U),n=(n=Math.imul(z,C))+Math.imul(O,U)|0,e=Math.imul(O,C),h=h+Math.imul(N,H)|0,n=(n=n+Math.imul(N,P)|0)+Math.imul(E,H)|0,e=e+Math.imul(E,P)|0,h=h+Math.imul(B,G)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(R,G)|0,e=e+Math.imul(R,Q)|0,h=h+Math.imul(x,W)|0,n=(n=n+Math.imul(x,X)|0)+Math.imul(q,W)|0,e=e+Math.imul(q,X)|0,h=h+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(A,$)|0,e=e+Math.imul(A,tt)|0,h=h+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,ht)|0)+Math.imul(b,rt)|0,e=e+Math.imul(b,ht)|0,h=h+Math.imul(g,et)|0,n=(n=n+Math.imul(g,ot)|0)+Math.imul(c,et)|0,e=e+Math.imul(c,ot)|0,h=h+Math.imul(p,ut)|0,n=(n=n+Math.imul(p,lt)|0)+Math.imul(M,ut)|0,e=e+Math.imul(M,lt)|0;var At=(l+(h=h+Math.imul(m,mt)|0)|0)+((8191&(n=(n=n+Math.imul(m,ft)|0)+Math.imul(f,mt)|0))<<13)|0;l=((e=e+Math.imul(f,ft)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,h=Math.imul(j,U),n=(n=Math.imul(j,C))+Math.imul(K,U)|0,e=Math.imul(K,C),h=h+Math.imul(z,H)|0,n=(n=n+Math.imul(z,P)|0)+Math.imul(O,H)|0,e=e+Math.imul(O,P)|0,h=h+Math.imul(N,G)|0,n=(n=n+Math.imul(N,Q)|0)+Math.imul(E,G)|0,e=e+Math.imul(E,Q)|0,h=h+Math.imul(B,W)|0,n=(n=n+Math.imul(B,X)|0)+Math.imul(R,W)|0,e=e+Math.imul(R,X)|0,h=h+Math.imul(x,$)|0,n=(n=n+Math.imul(x,tt)|0)+Math.imul(q,$)|0,e=e+Math.imul(q,tt)|0,h=h+Math.imul(k,rt)|0,n=(n=n+Math.imul(k,ht)|0)+Math.imul(A,rt)|0,e=e+Math.imul(A,ht)|0,h=h+Math.imul(y,et)|0,n=(n=n+Math.imul(y,ot)|0)+Math.imul(b,et)|0,e=e+Math.imul(b,ot)|0,h=h+Math.imul(g,ut)|0,n=(n=n+Math.imul(g,lt)|0)+Math.imul(c,ut)|0,e=e+Math.imul(c,lt)|0,h=h+Math.imul(p,mt)|0,n=(n=n+Math.imul(p,ft)|0)+Math.imul(M,mt)|0,e=e+Math.imul(M,ft)|0;var St=(l+(h=h+Math.imul(m,pt)|0)|0)+((8191&(n=(n=n+Math.imul(m,Mt)|0)+Math.imul(f,pt)|0))<<13)|0;l=((e=e+Math.imul(f,Mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,h=Math.imul(j,H),n=(n=Math.imul(j,P))+Math.imul(K,H)|0,e=Math.imul(K,P),h=h+Math.imul(z,G)|0,n=(n=n+Math.imul(z,Q)|0)+Math.imul(O,G)|0,e=e+Math.imul(O,Q)|0,h=h+Math.imul(N,W)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(E,W)|0,e=e+Math.imul(E,X)|0,h=h+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(R,$)|0,e=e+Math.imul(R,tt)|0,h=h+Math.imul(x,rt)|0,n=(n=n+Math.imul(x,ht)|0)+Math.imul(q,rt)|0,e=e+Math.imul(q,ht)|0,h=h+Math.imul(k,et)|0,n=(n=n+Math.imul(k,ot)|0)+Math.imul(A,et)|0,e=e+Math.imul(A,ot)|0,h=h+Math.imul(y,ut)|0,n=(n=n+Math.imul(y,lt)|0)+Math.imul(b,ut)|0,e=e+Math.imul(b,lt)|0,h=h+Math.imul(g,mt)|0,n=(n=n+Math.imul(g,ft)|0)+Math.imul(c,mt)|0,e=e+Math.imul(c,ft)|0;var xt=(l+(h=h+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,Mt)|0)+Math.imul(M,pt)|0))<<13)|0;l=((e=e+Math.imul(M,Mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h=Math.imul(j,G),n=(n=Math.imul(j,Q))+Math.imul(K,G)|0,e=Math.imul(K,Q),h=h+Math.imul(z,W)|0,n=(n=n+Math.imul(z,X)|0)+Math.imul(O,W)|0,e=e+Math.imul(O,X)|0,h=h+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(E,$)|0,e=e+Math.imul(E,tt)|0,h=h+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,ht)|0)+Math.imul(R,rt)|0,e=e+Math.imul(R,ht)|0,h=h+Math.imul(x,et)|0,n=(n=n+Math.imul(x,ot)|0)+Math.imul(q,et)|0,e=e+Math.imul(q,ot)|0,h=h+Math.imul(k,ut)|0,n=(n=n+Math.imul(k,lt)|0)+Math.imul(A,ut)|0,e=e+Math.imul(A,lt)|0,h=h+Math.imul(y,mt)|0,n=(n=n+Math.imul(y,ft)|0)+Math.imul(b,mt)|0,e=e+Math.imul(b,ft)|0;var qt=(l+(h=h+Math.imul(g,pt)|0)|0)+((8191&(n=(n=n+Math.imul(g,Mt)|0)+Math.imul(c,pt)|0))<<13)|0;l=((e=e+Math.imul(c,Mt)|0)+(n>>>13)|0)+(qt>>>26)|0,qt&=67108863,h=Math.imul(j,W),n=(n=Math.imul(j,X))+Math.imul(K,W)|0,e=Math.imul(K,X),h=h+Math.imul(z,$)|0,n=(n=n+Math.imul(z,tt)|0)+Math.imul(O,$)|0,e=e+Math.imul(O,tt)|0,h=h+Math.imul(N,rt)|0,n=(n=n+Math.imul(N,ht)|0)+Math.imul(E,rt)|0,e=e+Math.imul(E,ht)|0,h=h+Math.imul(B,et)|0,n=(n=n+Math.imul(B,ot)|0)+Math.imul(R,et)|0,e=e+Math.imul(R,ot)|0,h=h+Math.imul(x,ut)|0,n=(n=n+Math.imul(x,lt)|0)+Math.imul(q,ut)|0,e=e+Math.imul(q,lt)|0,h=h+Math.imul(k,mt)|0,n=(n=n+Math.imul(k,ft)|0)+Math.imul(A,mt)|0,e=e+Math.imul(A,ft)|0;var Zt=(l+(h=h+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,Mt)|0)+Math.imul(b,pt)|0))<<13)|0;l=((e=e+Math.imul(b,Mt)|0)+(n>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,h=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(K,$)|0,e=Math.imul(K,tt),h=h+Math.imul(z,rt)|0,n=(n=n+Math.imul(z,ht)|0)+Math.imul(O,rt)|0,e=e+Math.imul(O,ht)|0,h=h+Math.imul(N,et)|0,n=(n=n+Math.imul(N,ot)|0)+Math.imul(E,et)|0,e=e+Math.imul(E,ot)|0,h=h+Math.imul(B,ut)|0,n=(n=n+Math.imul(B,lt)|0)+Math.imul(R,ut)|0,e=e+Math.imul(R,lt)|0,h=h+Math.imul(x,mt)|0,n=(n=n+Math.imul(x,ft)|0)+Math.imul(q,mt)|0,e=e+Math.imul(q,ft)|0;var Bt=(l+(h=h+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,Mt)|0)+Math.imul(A,pt)|0))<<13)|0;l=((e=e+Math.imul(A,Mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,h=Math.imul(j,rt),n=(n=Math.imul(j,ht))+Math.imul(K,rt)|0,e=Math.imul(K,ht),h=h+Math.imul(z,et)|0,n=(n=n+Math.imul(z,ot)|0)+Math.imul(O,et)|0,e=e+Math.imul(O,ot)|0,h=h+Math.imul(N,ut)|0,n=(n=n+Math.imul(N,lt)|0)+Math.imul(E,ut)|0,e=e+Math.imul(E,lt)|0,h=h+Math.imul(B,mt)|0,n=(n=n+Math.imul(B,ft)|0)+Math.imul(R,mt)|0,e=e+Math.imul(R,ft)|0;var Rt=(l+(h=h+Math.imul(x,pt)|0)|0)+((8191&(n=(n=n+Math.imul(x,Mt)|0)+Math.imul(q,pt)|0))<<13)|0;l=((e=e+Math.imul(q,Mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,h=Math.imul(j,et),n=(n=Math.imul(j,ot))+Math.imul(K,et)|0,e=Math.imul(K,ot),h=h+Math.imul(z,ut)|0,n=(n=n+Math.imul(z,lt)|0)+Math.imul(O,ut)|0,e=e+Math.imul(O,lt)|0,h=h+Math.imul(N,mt)|0,n=(n=n+Math.imul(N,ft)|0)+Math.imul(E,mt)|0,e=e+Math.imul(E,ft)|0;var Lt=(l+(h=h+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,Mt)|0)+Math.imul(R,pt)|0))<<13)|0;l=((e=e+Math.imul(R,Mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,h=Math.imul(j,ut),n=(n=Math.imul(j,lt))+Math.imul(K,ut)|0,e=Math.imul(K,lt),h=h+Math.imul(z,mt)|0,n=(n=n+Math.imul(z,ft)|0)+Math.imul(O,mt)|0,e=e+Math.imul(O,ft)|0;var Nt=(l+(h=h+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,Mt)|0)+Math.imul(E,pt)|0))<<13)|0;l=((e=e+Math.imul(E,Mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h=Math.imul(j,mt),n=(n=Math.imul(j,ft))+Math.imul(K,mt)|0,e=Math.imul(K,ft);var Et=(l+(h=h+Math.imul(z,pt)|0)|0)+((8191&(n=(n=n+Math.imul(z,Mt)|0)+Math.imul(O,pt)|0))<<13)|0;l=((e=e+Math.imul(O,Mt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863;var It=(l+(h=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,Mt))+Math.imul(K,pt)|0))<<13)|0;return l=((e=Math.imul(K,Mt))+(n>>>13)|0)+(It>>>26)|0,It&=67108863,u[0]=vt,u[1]=gt,u[2]=ct,u[3]=wt,u[4]=yt,u[5]=bt,u[6]=_t,u[7]=kt,u[8]=At,u[9]=St,u[10]=xt,u[11]=qt,u[12]=Zt,u[13]=Bt,u[14]=Rt,u[15]=Lt,u[16]=Nt,u[17]=Et,u[18]=It,0!==l&&(u[19]=l,r.length++),r};function g(t,i,r){r.negative=i.negative^t.negative,r.length=t.length+i.length;for(var h=0,n=0,e=0;e<r.length-1;e++){var o=n;n=0;for(var s=67108863&h,u=Math.min(e,i.length-1),l=Math.max(0,e-t.length+1);l<=u;l++){var a=e-l,m=(0|t.words[a])*(0|i.words[l]),f=67108863&m;s=67108863&(f=f+s|0),n+=(o=(o=o+(m/67108864|0)|0)+(f>>>26)|0)>>>26,o&=67108863}r.words[e]=s,h=o,o=n}return 0!==h?r.words[e]=h:r.length--,r._strip()}function c(t,i,r){return g(t,i,r)}Math.imul||(v=M),e.prototype.mulTo=function(t,i){var r=this.length+t.length;return 10===this.length&&10===t.length?v(this,t,i):r<63?M(this,t,i):r<1024?g(this,t,i):c(this,t,i)},e.prototype.mul=function(t){var i=new e(null);return i.words=new Array(this.length+t.length),this.mulTo(t,i)},e.prototype.mulf=function(t){var i=new e(null);return i.words=new Array(this.length+t.length),c(this,t,i)},e.prototype.imul=function(t){return this.clone().mulTo(t,this)},e.prototype.imuln=function(t){var i=t<0;i&&(t=-t),h("number"==typeof t),h(t<67108864);for(var r=0,n=0;n<this.length;n++){var e=(0|this.words[n])*t,o=(67108863&e)+(67108863&r);r>>=26,r+=e/67108864|0,r+=o>>>26,this.words[n]=67108863&o}return 0!==r&&(this.words[n]=r,this.length++),i?this.ineg():this},e.prototype.muln=function(t){return this.clone().imuln(t)},e.prototype.sqr=function(){return this.mul(this)},e.prototype.isqr=function(){return this.imul(this.clone())},e.prototype.pow=function(t){var i=function(t){for(var i=new Array(t.bitLength()),r=0;r<i.length;r++){var h=r/26|0,n=r%26;i[r]=t.words[h]>>>n&1}return i}(t);if(0===i.length)return new e(1);for(var r=this,h=0;h<i.length&&0===i[h];h++,r=r.sqr());if(++h<i.length)for(var n=r.sqr();h<i.length;h++,n=n.sqr())0!==i[h]&&(r=r.mul(n));return r},e.prototype.iushln=function(t){h("number"==typeof t&&t>=0);var i,r=t%26,n=(t-r)/26,e=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(i=0;i<this.length;i++){var s=this.words[i]&e,u=(0|this.words[i])-s<<r;this.words[i]=u|o,o=s>>>26-r}o&&(this.words[i]=o,this.length++)}if(0!==n){for(i=this.length-1;i>=0;i--)this.words[i+n]=this.words[i];for(i=0;i<n;i++)this.words[i]=0;this.length+=n}return this._strip()},e.prototype.ishln=function(t){return h(0===this.negative),this.iushln(t)},e.prototype.iushrn=function(t,i,r){var n;h("number"==typeof t&&t>=0),n=i?(i-i%26)/26:0;var e=t%26,o=Math.min((t-e)/26,this.length),s=67108863^67108863>>>e<<e,u=r;if(n-=o,n=Math.max(0,n),u){for(var l=0;l<o;l++)u.words[l]=this.words[l];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,l=0;l<this.length;l++)this.words[l]=this.words[l+o];else this.words[0]=0,this.length=1;var a=0;for(l=this.length-1;l>=0&&(0!==a||l>=n);l--){var m=0|this.words[l];this.words[l]=a<<26-e|m>>>e,a=m&s}return u&&0!==a&&(u.words[u.length++]=a),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},e.prototype.ishrn=function(t,i,r){return h(0===this.negative),this.iushrn(t,i,r)},e.prototype.shln=function(t){return this.clone().ishln(t)},e.prototype.ushln=function(t){return this.clone().iushln(t)},e.prototype.shrn=function(t){return this.clone().ishrn(t)},e.prototype.ushrn=function(t){return this.clone().iushrn(t)},e.prototype.testn=function(t){h("number"==typeof t&&t>=0);var i=t%26,r=(t-i)/26,n=1<<i;return!(this.length<=r||!(this.words[r]&n))},e.prototype.imaskn=function(t){h("number"==typeof t&&t>=0);var i=t%26,r=(t-i)/26;if(h(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==i&&r++,this.length=Math.min(r,this.length),0!==i){var n=67108863^67108863>>>i<<i;this.words[this.length-1]&=n}return this._strip()},e.prototype.maskn=function(t){return this.clone().imaskn(t)},e.prototype.iaddn=function(t){return h("number"==typeof t),h(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},e.prototype._iaddn=function(t){this.words[0]+=t;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},e.prototype.isubn=function(t){if(h("number"==typeof t),h(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 i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this._strip()},e.prototype.addn=function(t){return this.clone().iaddn(t)},e.prototype.subn=function(t){return this.clone().isubn(t)},e.prototype.iabs=function(){return this.negative=0,this},e.prototype.abs=function(){return this.clone().iabs()},e.prototype._ishlnsubmul=function(t,i,r){var n,e,o=t.length+r;this._expand(o);var s=0;for(n=0;n<t.length;n++){e=(0|this.words[n+r])+s;var u=(0|t.words[n])*i;s=((e-=67108863&u)>>26)-(u/67108864|0),this.words[n+r]=67108863&e}for(;n<this.length-r;n++)s=(e=(0|this.words[n+r])+s)>>26,this.words[n+r]=67108863&e;if(0===s)return this._strip();for(h(-1===s),s=0,n=0;n<this.length;n++)s=(e=-(0|this.words[n])+s)>>26,this.words[n]=67108863&e;return this.negative=1,this._strip()},e.prototype._wordDiv=function(t,i){var r=(this.length,t.length),h=this.clone(),n=t,o=0|n.words[n.length-1];0!=(r=26-this._countBits(o))&&(n=n.ushln(r),h.iushln(r),o=0|n.words[n.length-1]);var s,u=h.length-n.length;if("mod"!==i){(s=new e(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l<s.length;l++)s.words[l]=0}var a=h.clone()._ishlnsubmul(n,1,u);0===a.negative&&(h=a,s&&(s.words[u]=1));for(var m=u-1;m>=0;m--){var f=67108864*(0|h.words[n.length+m])+(0|h.words[n.length+m-1]);for(f=Math.min(f/o|0,67108863),h._ishlnsubmul(n,f,m);0!==h.negative;)f--,h.negative=0,h._ishlnsubmul(n,1,m),h.isZero()||(h.negative^=1);s&&(s.words[m]=f)}return s&&s._strip(),h._strip(),"div"!==i&&0!==r&&h.iushrn(r),{div:s||null,mod:h}},e.prototype.divmod=function(t,i,r){return h(!t.isZero()),this.isZero()?{div:new e(0),mod:new e(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,i),"mod"!==i&&(n=s.div.neg()),"div"!==i&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:n,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),i),"mod"!==i&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),i),"div"!==i&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new e(0),mod:this}:1===t.length?"div"===i?{div:this.divn(t.words[0]),mod:null}:"mod"===i?{div:null,mod:new e(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new e(this.modrn(t.words[0]))}:this._wordDiv(t,i);var n,o,s},e.prototype.div=function(t){return this.divmod(t,"div",!1).div},e.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},e.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},e.prototype.divRound=function(t){var i=this.divmod(t);if(i.mod.isZero())return i.div;var r=0!==i.div.negative?i.mod.isub(t):i.mod,h=t.ushrn(1),n=t.andln(1),e=r.cmp(h);return e<0||1===n&&0===e?i.div:0!==i.div.negative?i.div.isubn(1):i.div.iaddn(1)},e.prototype.modrn=function(t){var i=t<0;i&&(t=-t),h(t<=67108863);for(var r=(1<<26)%t,n=0,e=this.length-1;e>=0;e--)n=(r*n+(0|this.words[e]))%t;return i?-n:n},e.prototype.modn=function(t){return this.modrn(t)},e.prototype.idivn=function(t){var i=t<0;i&&(t=-t),h(t<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var e=(0|this.words[n])+67108864*r;this.words[n]=e/t|0,r=e%t}return this._strip(),i?this.ineg():this},e.prototype.divn=function(t){return this.clone().idivn(t)},e.prototype.egcd=function(t){h(0===t.negative),h(!t.isZero());var i=this,r=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var n=new e(1),o=new e(0),s=new e(0),u=new e(1),l=0;i.isEven()&&r.isEven();)i.iushrn(1),r.iushrn(1),++l;for(var a=r.clone(),m=i.clone();!i.isZero();){for(var f=0,d=1;0==(i.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(i.iushrn(f);f-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(a),o.isub(m)),n.iushrn(1),o.iushrn(1);for(var p=0,M=1;0==(r.words[0]&M)&&p<26;++p,M<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(a),u.isub(m)),s.iushrn(1),u.iushrn(1);i.cmp(r)>=0?(i.isub(r),n.isub(s),o.isub(u)):(r.isub(i),s.isub(n),u.isub(o))}return{a:s,b:u,gcd:r.iushln(l)}},e.prototype._invmp=function(t){h(0===t.negative),h(!t.isZero());var i=this,r=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var n,o=new e(1),s=new e(0),u=r.clone();i.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,a=1;0==(i.words[0]&a)&&l<26;++l,a<<=1);if(l>0)for(i.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var m=0,f=1;0==(r.words[0]&f)&&m<26;++m,f<<=1);if(m>0)for(r.iushrn(m);m-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);i.cmp(r)>=0?(i.isub(r),o.isub(s)):(r.isub(i),s.isub(o))}return(n=0===i.cmpn(1)?o:s).cmpn(0)<0&&n.iadd(t),n},e.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var i=this.clone(),r=t.clone();i.negative=0,r.negative=0;for(var h=0;i.isEven()&&r.isEven();h++)i.iushrn(1),r.iushrn(1);for(;;){for(;i.isEven();)i.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=i.cmp(r);if(n<0){var e=i;i=r,r=e}else if(0===n||0===r.cmpn(1))break;i.isub(r)}return r.iushln(h)},e.prototype.invm=function(t){return this.egcd(t).a.umod(t)},e.prototype.isEven=function(){return 0==(1&this.words[0])},e.prototype.isOdd=function(){return 1==(1&this.words[0])},e.prototype.andln=function(t){return this.words[0]&t},e.prototype.bincn=function(t){h("number"==typeof t);var i=t%26,r=(t-i)/26,n=1<<i;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var e=n,o=r;0!==e&&o<this.length;o++){var s=0|this.words[o];e=(s+=e)>>>26,s&=67108863,this.words[o]=s}return 0!==e&&(this.words[o]=e,this.length++),this},e.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},e.prototype.cmpn=function(t){var i,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)i=1;else{r&&(t=-t),h(t<=67108863,"Number is too big");var n=0|this.words[0];i=n===t?0:n<t?-1:1}return 0!==this.negative?0|-i:i},e.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var i=this.ucmp(t);return 0!==this.negative?0|-i:i},e.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var i=0,r=this.length-1;r>=0;r--){var h=0|this.words[r],n=0|t.words[r];if(h!==n){h<n?i=-1:h>n&&(i=1);break}}return i},e.prototype.gtn=function(t){return 1===this.cmpn(t)},e.prototype.gt=function(t){return 1===this.cmp(t)},e.prototype.gten=function(t){return this.cmpn(t)>=0},e.prototype.gte=function(t){return this.cmp(t)>=0},e.prototype.ltn=function(t){return-1===this.cmpn(t)},e.prototype.lt=function(t){return-1===this.cmp(t)},e.prototype.lten=function(t){return this.cmpn(t)<=0},e.prototype.lte=function(t){return this.cmp(t)<=0},e.prototype.eqn=function(t){return 0===this.cmpn(t)},e.prototype.eq=function(t){return 0===this.cmp(t)},e.red=function(t){return new S(t)},e.prototype.toRed=function(t){return h(!this.red,"Already a number in reduction context"),h(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},e.prototype.fromRed=function(){return h(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},e.prototype._forceRed=function(t){return this.red=t,this},e.prototype.forceRed=function(t){return h(!this.red,"Already a number in reduction context"),this._forceRed(t)},e.prototype.redAdd=function(t){return h(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},e.prototype.redIAdd=function(t){return h(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},e.prototype.redSub=function(t){return h(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},e.prototype.redISub=function(t){return h(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},e.prototype.redShl=function(t){return h(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},e.prototype.redMul=function(t){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},e.prototype.redIMul=function(t){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},e.prototype.redSqr=function(){return h(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},e.prototype.redISqr=function(){return h(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},e.prototype.redSqrt=function(){return h(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},e.prototype.redInvm=function(){return h(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},e.prototype.redNeg=function(){return h(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},e.prototype.redPow=function(t){return h(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function y(t,i){this.name=t,this.p=new e(i,16),this.n=this.p.bitLength(),this.k=new e(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var i=e._prime(t);this.m=i.p,this.prime=i}else h(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new e(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)}y.prototype._tmp=function(){var t=new e(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var i,r=t;do{this.split(r,this.tmp),i=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(i>this.n);var h=i<this.n?-1:r.ucmp(this.p);return 0===h?(r.words[0]=0,r.length=1):h>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,i){t.iushrn(this.n,0,i)},y.prototype.imulK=function(t){return t.imul(this.k)},n(b,y),b.prototype.split=function(t,i){for(var r=4194303,h=Math.min(t.length,9),n=0;n<h;n++)i.words[n]=t.words[n];if(i.length=h,t.length<=9)return t.words[0]=0,void(t.length=1);var e=t.words[9];for(i.words[i.length++]=e&r,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(o&r)<<4|e>>>22,e=o}e>>>=22,t.words[n-10]=e,0===e&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var i=0,r=0;r<t.length;r++){var h=0|t.words[r];i+=977*h,t.words[r]=67108863&i,i=64*h+(i/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(_,y),n(k,y),n(A,y),A.prototype.imulK=function(t){for(var i=0,r=0;r<t.length;r++){var h=19*(0|t.words[r])+i,n=67108863&h;h>>>=26,t.words[r]=n,i=h}return 0!==i&&(t.words[t.length++]=i),t},e._prime=function(t){if(w[t])return w[t];var i;if("k256"===t)i=new b;else if("p224"===t)i=new _;else if("p192"===t)i=new k;else{if("p25519"!==t)throw new Error("Unknown prime "+t);i=new A}return w[t]=i,i},S.prototype._verify1=function(t){h(0===t.negative,"red works only with positives"),h(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,i){h(0==(t.negative|i.negative),"red works only with positives"),h(t.red&&t.red===i.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(a(t,t.umod(this.m)._forceRed(this)),t)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,i){this._verify2(t,i);var r=t.add(i);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,i){this._verify2(t,i);var r=t.iadd(i);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,i){this._verify2(t,i);var r=t.sub(i);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,i){this._verify2(t,i);var r=t.isub(i);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,i){return this._verify1(t),this.imod(t.ushln(i))},S.prototype.imul=function(t,i){return this._verify2(t,i),this.imod(t.imul(i))},S.prototype.mul=function(t,i){return this._verify2(t,i),this.imod(t.mul(i))},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 i=this.m.andln(3);if(h(i%2==1),3===i){var r=this.m.add(new e(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);h(!n.isZero());var s=new e(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new e(2*a*a).toRed(this);0!==this.pow(a,l).cmp(u);)a.redIAdd(u);for(var m=this.pow(a,n),f=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=o;0!==d.cmp(s);){for(var M=d,v=0;0!==M.cmp(s);v++)M=M.redSqr();h(v<p);var g=this.pow(m,new e(1).iushln(p-v-1));f=f.redMul(g),m=g.redSqr(),d=d.redMul(m),p=v}return f},S.prototype.invm=function(t){var i=t._invmp(this.m);return 0!==i.negative?(i.negative=0,this.imod(i).redNeg()):this.imod(i)},S.prototype.pow=function(t,i){if(i.isZero())return new e(1).toRed(this);if(0===i.cmpn(1))return t.clone();var r=new Array(16);r[0]=new e(1).toRed(this),r[1]=t;for(var h=2;h<r.length;h++)r[h]=this.mul(r[h-1],t);var n=r[0],o=0,s=0,u=i.bitLength()%26;for(0===u&&(u=26),h=i.length-1;h>=0;h--){for(var l=i.words[h],a=u-1;a>=0;a--){var m=l>>a&1;n!==r[0]&&(n=this.sqr(n)),0!==m||0!==o?(o<<=1,o|=m,(4==++s||0===h&&0===a)&&(n=this.mul(n,r[o]),s=0,o=0)):s=0}u=26}return n},S.prototype.convertTo=function(t){var i=t.umod(this.m);return i===t?i.clone():i},S.prototype.convertFrom=function(t){var i=t.clone();return i.red=null,i},e.mont=function(t){return new x(t)},n(x,S),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var i=this.imod(t.mul(this.rinv));return i.red=null,i},x.prototype.imul=function(t,i){if(t.isZero()||i.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(i),h=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(h).iushrn(this.shift),e=n;return n.cmp(this.m)>=0?e=n.isub(this.m):n.cmpn(0)<0&&(e=n.iadd(this.m)),e._forceRed(this)},x.prototype.mul=function(t,i){if(t.isZero()||i.isZero())return new e(0)._forceRed(this);var r=t.mul(i),h=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(h).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.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(r,t);var h=r.exports;export{h as B,r as b};
|
|
1
|
+
import{c as t}from"./index-0cd3036e.js";import{r as i}from"./__node-resolve_empty-0b485399.js";var r={exports:{}};!function(t,r){function h(t,i){if(!t)throw new Error(i||"Assertion failed")}function n(t,i){t.super_=i;var r=function(){};r.prototype=i.prototype,t.prototype=new r,t.prototype.constructor=t}function e(t,i,r){if(e.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==i&&"be"!==i||(r=i,i=10),this._init(t||0,i||10,r||"be"))}var o;"object"==typeof t?t.exports=e:r.BN=e,e.BN=e,e.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i.Buffer}catch(t){}function s(t,i){var r=t.charCodeAt(i);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void h(!1,"Invalid character in "+t)}function u(t,i,r){var h=s(t,r);return r-1>=i&&(h|=s(t,r-1)<<4),h}function l(t,i,r,n){for(var e=0,o=0,s=Math.min(t.length,r),u=i;u<s;u++){var l=t.charCodeAt(u)-48;e*=n,o=l>=49?l-49+10:l>=17?l-17+10:l,h(l>=0&&o<n,"Invalid character"),e+=o}return e}function a(t,i){t.words=i.words,t.length=i.length,t.negative=i.negative,t.red=i.red}if(e.isBN=function(t){return t instanceof e||null!==t&&"object"==typeof t&&t.constructor.wordSize===e.wordSize&&Array.isArray(t.words)},e.max=function(t,i){return t.cmp(i)>0?t:i},e.min=function(t,i){return t.cmp(i)<0?t:i},e.prototype._init=function(t,i,r){if("number"==typeof t)return this._initNumber(t,i,r);if("object"==typeof t)return this._initArray(t,i,r);"hex"===i&&(i=16),h(i===(0|i)&&i>=2&&i<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<t.length&&(16===i?this._parseHex(t,n,r):(this._parseBase(t,i,n),"le"===r&&this._initArray(this.toArray(),i,r)))},e.prototype._initNumber=function(t,i,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(h(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),i,r)},e.prototype._initArray=function(t,i,r){if(h("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var e,o,s=0;if("be"===r)for(n=t.length-1,e=0;n>=0;n-=3)o=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[e]|=o<<s&67108863,this.words[e+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,e++);else if("le"===r)for(n=0,e=0;n<t.length;n+=3)o=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[e]|=o<<s&67108863,this.words[e+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,e++);return this._strip()},e.prototype._parseHex=function(t,i,r){this.length=Math.ceil((t.length-i)/6),this.words=new Array(this.length);for(var h=0;h<this.length;h++)this.words[h]=0;var n,e=0,o=0;if("be"===r)for(h=t.length-1;h>=i;h-=2)n=u(t,i,h)<<e,this.words[o]|=67108863&n,e>=18?(e-=18,o+=1,this.words[o]|=n>>>26):e+=8;else for(h=(t.length-i)%2==0?i+1:i;h<t.length;h+=2)n=u(t,i,h)<<e,this.words[o]|=67108863&n,e>=18?(e-=18,o+=1,this.words[o]|=n>>>26):e+=8;this._strip()},e.prototype._parseBase=function(t,i,r){this.words=[0],this.length=1;for(var h=0,n=1;n<=67108863;n*=i)h++;h--,n=n/i|0;for(var e=t.length-r,o=e%h,s=Math.min(e,e-o)+r,u=0,a=r;a<s;a+=h)u=l(t,a,a+h,i),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==o){var m=1;for(u=l(t,a,t.length,i),a=0;a<o;a++)m*=i;this.imuln(m),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},e.prototype.copy=function(t){t.words=new Array(this.length);for(var i=0;i<this.length;i++)t.words[i]=this.words[i];t.length=this.length,t.negative=this.negative,t.red=this.red},e.prototype._move=function(t){a(t,this)},e.prototype.clone=function(){var t=new e(null);return this.copy(t),t},e.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},e.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},e.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{e.prototype[Symbol.for("nodejs.util.inspect.custom")]=m}catch(t){e.prototype.inspect=m}else e.prototype.inspect=m;function m(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}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"],d=[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],p=[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 M(t,i,r){r.negative=i.negative^t.negative;var h=t.length+i.length|0;r.length=h,h=h-1|0;var n=0|t.words[0],e=0|i.words[0],o=n*e,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var l=1;l<h;l++){for(var a=u>>>26,m=67108863&u,f=Math.min(l,i.length-1),d=Math.max(0,l-t.length+1);d<=f;d++){var p=l-d|0;a+=(o=(n=0|t.words[p])*(e=0|i.words[d])+m)/67108864|0,m=67108863&o}r.words[l]=0|m,u=0|a}return 0!==u?r.words[l]=0|u:r.length--,r._strip()}e.prototype.toString=function(t,i){var r;if(i=0|i||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,e=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<n|e)).toString(16);e=s>>>24-n&16777215,(n+=2)>=26&&(n-=26,o--),r=0!==e||o!==this.length-1?f[6-u.length]+u+r:u+r}for(0!==e&&(r=e.toString(16)+r);r.length%i!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=d[t],a=p[t];r="";var m=this.clone();for(m.negative=0;!m.isZero();){var M=m.modrn(a).toString(t);r=(m=m.idivn(a)).isZero()?M+r:f[l-M.length]+M+r}for(this.isZero()&&(r="0"+r);r.length%i!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}h(!1,"Base should be between 2 and 36")},e.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&&h(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},e.prototype.toJSON=function(){return this.toString(16,2)},o&&(e.prototype.toBuffer=function(t,i){return this.toArrayLike(o,t,i)}),e.prototype.toArray=function(t,i){return this.toArrayLike(Array,t,i)},e.prototype.toArrayLike=function(t,i,r){this._strip();var n=this.byteLength(),e=r||Math.max(1,n);h(n<=e,"byte array longer than desired length"),h(e>0,"Requested array length <= 0");var o=function(t,i){return t.allocUnsafe?t.allocUnsafe(i):new t(i)}(t,e);return this["_toArrayLike"+("le"===i?"LE":"BE")](o,n),o},e.prototype._toArrayLikeLE=function(t,i){for(var r=0,h=0,n=0,e=0;n<this.length;n++){var o=this.words[n]<<e|h;t[r++]=255&o,r<t.length&&(t[r++]=o>>8&255),r<t.length&&(t[r++]=o>>16&255),6===e?(r<t.length&&(t[r++]=o>>24&255),h=0,e=0):(h=o>>>24,e+=2)}if(r<t.length)for(t[r++]=h;r<t.length;)t[r++]=0},e.prototype._toArrayLikeBE=function(t,i){for(var r=t.length-1,h=0,n=0,e=0;n<this.length;n++){var o=this.words[n]<<e|h;t[r--]=255&o,r>=0&&(t[r--]=o>>8&255),r>=0&&(t[r--]=o>>16&255),6===e?(r>=0&&(t[r--]=o>>24&255),h=0,e=0):(h=o>>>24,e+=2)}if(r>=0)for(t[r--]=h;r>=0;)t[r--]=0},Math.clz32?e.prototype._countBits=function(t){return 32-Math.clz32(t)}:e.prototype._countBits=function(t){var i=t,r=0;return i>=4096&&(r+=13,i>>>=13),i>=64&&(r+=7,i>>>=7),i>=8&&(r+=4,i>>>=4),i>=2&&(r+=2,i>>>=2),r+i},e.prototype._zeroBits=function(t){if(0===t)return 26;var i=t,r=0;return 0==(8191&i)&&(r+=13,i>>>=13),0==(127&i)&&(r+=7,i>>>=7),0==(15&i)&&(r+=4,i>>>=4),0==(3&i)&&(r+=2,i>>>=2),0==(1&i)&&r++,r},e.prototype.bitLength=function(){var t=this.words[this.length-1],i=this._countBits(t);return 26*(this.length-1)+i},e.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,i=0;i<this.length;i++){var r=this._zeroBits(this.words[i]);if(t+=r,26!==r)break}return t},e.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},e.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},e.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},e.prototype.isNeg=function(){return 0!==this.negative},e.prototype.neg=function(){return this.clone().ineg()},e.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},e.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]|t.words[i];return this._strip()},e.prototype.ior=function(t){return h(0==(this.negative|t.negative)),this.iuor(t)},e.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},e.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},e.prototype.iuand=function(t){var i;i=this.length>t.length?t:this;for(var r=0;r<i.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=i.length,this._strip()},e.prototype.iand=function(t){return h(0==(this.negative|t.negative)),this.iuand(t)},e.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},e.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},e.prototype.iuxor=function(t){var i,r;this.length>t.length?(i=this,r=t):(i=t,r=this);for(var h=0;h<r.length;h++)this.words[h]=i.words[h]^r.words[h];if(this!==i)for(;h<i.length;h++)this.words[h]=i.words[h];return this.length=i.length,this._strip()},e.prototype.ixor=function(t){return h(0==(this.negative|t.negative)),this.iuxor(t)},e.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},e.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},e.prototype.inotn=function(t){h("number"==typeof t&&t>=0);var i=0|Math.ceil(t/26),r=t%26;this._expand(i),r>0&&i--;for(var n=0;n<i;n++)this.words[n]=67108863&~this.words[n];return r>0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},e.prototype.notn=function(t){return this.clone().inotn(t)},e.prototype.setn=function(t,i){h("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=i?this.words[r]|1<<n:this.words[r]&~(1<<n),this._strip()},e.prototype.iadd=function(t){var i,r,h;if(0!==this.negative&&0===t.negative)return this.negative=0,i=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,i=this.isub(t),t.negative=1,i._normSign();this.length>t.length?(r=this,h=t):(r=t,h=this);for(var n=0,e=0;e<h.length;e++)i=(0|r.words[e])+(0|h.words[e])+n,this.words[e]=67108863&i,n=i>>>26;for(;0!==n&&e<r.length;e++)i=(0|r.words[e])+n,this.words[e]=67108863&i,n=i>>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;e<r.length;e++)this.words[e]=r.words[e];return this},e.prototype.add=function(t){var i;return 0!==t.negative&&0===this.negative?(t.negative=0,i=this.sub(t),t.negative^=1,i):0===t.negative&&0!==this.negative?(this.negative=0,i=t.sub(this),this.negative=1,i):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},e.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var i=this.iadd(t);return t.negative=1,i._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,h,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,h=t):(r=t,h=this);for(var e=0,o=0;o<h.length;o++)e=(i=(0|r.words[o])-(0|h.words[o])+e)>>26,this.words[o]=67108863&i;for(;0!==e&&o<r.length;o++)e=(i=(0|r.words[o])+e)>>26,this.words[o]=67108863&i;if(0===e&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this._strip()},e.prototype.sub=function(t){return this.clone().isub(t)};var v=function(t,i,r){var h,n,e,o=t.words,s=i.words,u=r.words,l=0,a=0|o[0],m=8191&a,f=a>>>13,d=0|o[1],p=8191&d,M=d>>>13,v=0|o[2],g=8191&v,c=v>>>13,w=0|o[3],y=8191&w,b=w>>>13,_=0|o[4],k=8191&_,A=_>>>13,S=0|o[5],x=8191&S,q=S>>>13,Z=0|o[6],B=8191&Z,R=Z>>>13,L=0|o[7],N=8191&L,E=L>>>13,I=0|o[8],z=8191&I,O=I>>>13,T=0|o[9],j=8191&T,K=T>>>13,F=0|s[0],U=8191&F,C=F>>>13,D=0|s[1],H=8191&D,P=D>>>13,J=0|s[2],G=8191&J,Q=J>>>13,V=0|s[3],W=8191&V,X=V>>>13,Y=0|s[4],$=8191&Y,tt=Y>>>13,it=0|s[5],rt=8191&it,ht=it>>>13,nt=0|s[6],et=8191&nt,ot=nt>>>13,st=0|s[7],ut=8191&st,lt=st>>>13,at=0|s[8],mt=8191&at,ft=at>>>13,dt=0|s[9],pt=8191&dt,Mt=dt>>>13;r.negative=t.negative^i.negative,r.length=19;var vt=(l+(h=Math.imul(m,U))|0)+((8191&(n=(n=Math.imul(m,C))+Math.imul(f,U)|0))<<13)|0;l=((e=Math.imul(f,C))+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,h=Math.imul(p,U),n=(n=Math.imul(p,C))+Math.imul(M,U)|0,e=Math.imul(M,C);var gt=(l+(h=h+Math.imul(m,H)|0)|0)+((8191&(n=(n=n+Math.imul(m,P)|0)+Math.imul(f,H)|0))<<13)|0;l=((e=e+Math.imul(f,P)|0)+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,h=Math.imul(g,U),n=(n=Math.imul(g,C))+Math.imul(c,U)|0,e=Math.imul(c,C),h=h+Math.imul(p,H)|0,n=(n=n+Math.imul(p,P)|0)+Math.imul(M,H)|0,e=e+Math.imul(M,P)|0;var ct=(l+(h=h+Math.imul(m,G)|0)|0)+((8191&(n=(n=n+Math.imul(m,Q)|0)+Math.imul(f,G)|0))<<13)|0;l=((e=e+Math.imul(f,Q)|0)+(n>>>13)|0)+(ct>>>26)|0,ct&=67108863,h=Math.imul(y,U),n=(n=Math.imul(y,C))+Math.imul(b,U)|0,e=Math.imul(b,C),h=h+Math.imul(g,H)|0,n=(n=n+Math.imul(g,P)|0)+Math.imul(c,H)|0,e=e+Math.imul(c,P)|0,h=h+Math.imul(p,G)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(M,G)|0,e=e+Math.imul(M,Q)|0;var wt=(l+(h=h+Math.imul(m,W)|0)|0)+((8191&(n=(n=n+Math.imul(m,X)|0)+Math.imul(f,W)|0))<<13)|0;l=((e=e+Math.imul(f,X)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,h=Math.imul(k,U),n=(n=Math.imul(k,C))+Math.imul(A,U)|0,e=Math.imul(A,C),h=h+Math.imul(y,H)|0,n=(n=n+Math.imul(y,P)|0)+Math.imul(b,H)|0,e=e+Math.imul(b,P)|0,h=h+Math.imul(g,G)|0,n=(n=n+Math.imul(g,Q)|0)+Math.imul(c,G)|0,e=e+Math.imul(c,Q)|0,h=h+Math.imul(p,W)|0,n=(n=n+Math.imul(p,X)|0)+Math.imul(M,W)|0,e=e+Math.imul(M,X)|0;var yt=(l+(h=h+Math.imul(m,$)|0)|0)+((8191&(n=(n=n+Math.imul(m,tt)|0)+Math.imul(f,$)|0))<<13)|0;l=((e=e+Math.imul(f,tt)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,h=Math.imul(x,U),n=(n=Math.imul(x,C))+Math.imul(q,U)|0,e=Math.imul(q,C),h=h+Math.imul(k,H)|0,n=(n=n+Math.imul(k,P)|0)+Math.imul(A,H)|0,e=e+Math.imul(A,P)|0,h=h+Math.imul(y,G)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,G)|0,e=e+Math.imul(b,Q)|0,h=h+Math.imul(g,W)|0,n=(n=n+Math.imul(g,X)|0)+Math.imul(c,W)|0,e=e+Math.imul(c,X)|0,h=h+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(M,$)|0,e=e+Math.imul(M,tt)|0;var bt=(l+(h=h+Math.imul(m,rt)|0)|0)+((8191&(n=(n=n+Math.imul(m,ht)|0)+Math.imul(f,rt)|0))<<13)|0;l=((e=e+Math.imul(f,ht)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,h=Math.imul(B,U),n=(n=Math.imul(B,C))+Math.imul(R,U)|0,e=Math.imul(R,C),h=h+Math.imul(x,H)|0,n=(n=n+Math.imul(x,P)|0)+Math.imul(q,H)|0,e=e+Math.imul(q,P)|0,h=h+Math.imul(k,G)|0,n=(n=n+Math.imul(k,Q)|0)+Math.imul(A,G)|0,e=e+Math.imul(A,Q)|0,h=h+Math.imul(y,W)|0,n=(n=n+Math.imul(y,X)|0)+Math.imul(b,W)|0,e=e+Math.imul(b,X)|0,h=h+Math.imul(g,$)|0,n=(n=n+Math.imul(g,tt)|0)+Math.imul(c,$)|0,e=e+Math.imul(c,tt)|0,h=h+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,ht)|0)+Math.imul(M,rt)|0,e=e+Math.imul(M,ht)|0;var _t=(l+(h=h+Math.imul(m,et)|0)|0)+((8191&(n=(n=n+Math.imul(m,ot)|0)+Math.imul(f,et)|0))<<13)|0;l=((e=e+Math.imul(f,ot)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,h=Math.imul(N,U),n=(n=Math.imul(N,C))+Math.imul(E,U)|0,e=Math.imul(E,C),h=h+Math.imul(B,H)|0,n=(n=n+Math.imul(B,P)|0)+Math.imul(R,H)|0,e=e+Math.imul(R,P)|0,h=h+Math.imul(x,G)|0,n=(n=n+Math.imul(x,Q)|0)+Math.imul(q,G)|0,e=e+Math.imul(q,Q)|0,h=h+Math.imul(k,W)|0,n=(n=n+Math.imul(k,X)|0)+Math.imul(A,W)|0,e=e+Math.imul(A,X)|0,h=h+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,e=e+Math.imul(b,tt)|0,h=h+Math.imul(g,rt)|0,n=(n=n+Math.imul(g,ht)|0)+Math.imul(c,rt)|0,e=e+Math.imul(c,ht)|0,h=h+Math.imul(p,et)|0,n=(n=n+Math.imul(p,ot)|0)+Math.imul(M,et)|0,e=e+Math.imul(M,ot)|0;var kt=(l+(h=h+Math.imul(m,ut)|0)|0)+((8191&(n=(n=n+Math.imul(m,lt)|0)+Math.imul(f,ut)|0))<<13)|0;l=((e=e+Math.imul(f,lt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,h=Math.imul(z,U),n=(n=Math.imul(z,C))+Math.imul(O,U)|0,e=Math.imul(O,C),h=h+Math.imul(N,H)|0,n=(n=n+Math.imul(N,P)|0)+Math.imul(E,H)|0,e=e+Math.imul(E,P)|0,h=h+Math.imul(B,G)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(R,G)|0,e=e+Math.imul(R,Q)|0,h=h+Math.imul(x,W)|0,n=(n=n+Math.imul(x,X)|0)+Math.imul(q,W)|0,e=e+Math.imul(q,X)|0,h=h+Math.imul(k,$)|0,n=(n=n+Math.imul(k,tt)|0)+Math.imul(A,$)|0,e=e+Math.imul(A,tt)|0,h=h+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,ht)|0)+Math.imul(b,rt)|0,e=e+Math.imul(b,ht)|0,h=h+Math.imul(g,et)|0,n=(n=n+Math.imul(g,ot)|0)+Math.imul(c,et)|0,e=e+Math.imul(c,ot)|0,h=h+Math.imul(p,ut)|0,n=(n=n+Math.imul(p,lt)|0)+Math.imul(M,ut)|0,e=e+Math.imul(M,lt)|0;var At=(l+(h=h+Math.imul(m,mt)|0)|0)+((8191&(n=(n=n+Math.imul(m,ft)|0)+Math.imul(f,mt)|0))<<13)|0;l=((e=e+Math.imul(f,ft)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,h=Math.imul(j,U),n=(n=Math.imul(j,C))+Math.imul(K,U)|0,e=Math.imul(K,C),h=h+Math.imul(z,H)|0,n=(n=n+Math.imul(z,P)|0)+Math.imul(O,H)|0,e=e+Math.imul(O,P)|0,h=h+Math.imul(N,G)|0,n=(n=n+Math.imul(N,Q)|0)+Math.imul(E,G)|0,e=e+Math.imul(E,Q)|0,h=h+Math.imul(B,W)|0,n=(n=n+Math.imul(B,X)|0)+Math.imul(R,W)|0,e=e+Math.imul(R,X)|0,h=h+Math.imul(x,$)|0,n=(n=n+Math.imul(x,tt)|0)+Math.imul(q,$)|0,e=e+Math.imul(q,tt)|0,h=h+Math.imul(k,rt)|0,n=(n=n+Math.imul(k,ht)|0)+Math.imul(A,rt)|0,e=e+Math.imul(A,ht)|0,h=h+Math.imul(y,et)|0,n=(n=n+Math.imul(y,ot)|0)+Math.imul(b,et)|0,e=e+Math.imul(b,ot)|0,h=h+Math.imul(g,ut)|0,n=(n=n+Math.imul(g,lt)|0)+Math.imul(c,ut)|0,e=e+Math.imul(c,lt)|0,h=h+Math.imul(p,mt)|0,n=(n=n+Math.imul(p,ft)|0)+Math.imul(M,mt)|0,e=e+Math.imul(M,ft)|0;var St=(l+(h=h+Math.imul(m,pt)|0)|0)+((8191&(n=(n=n+Math.imul(m,Mt)|0)+Math.imul(f,pt)|0))<<13)|0;l=((e=e+Math.imul(f,Mt)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,h=Math.imul(j,H),n=(n=Math.imul(j,P))+Math.imul(K,H)|0,e=Math.imul(K,P),h=h+Math.imul(z,G)|0,n=(n=n+Math.imul(z,Q)|0)+Math.imul(O,G)|0,e=e+Math.imul(O,Q)|0,h=h+Math.imul(N,W)|0,n=(n=n+Math.imul(N,X)|0)+Math.imul(E,W)|0,e=e+Math.imul(E,X)|0,h=h+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(R,$)|0,e=e+Math.imul(R,tt)|0,h=h+Math.imul(x,rt)|0,n=(n=n+Math.imul(x,ht)|0)+Math.imul(q,rt)|0,e=e+Math.imul(q,ht)|0,h=h+Math.imul(k,et)|0,n=(n=n+Math.imul(k,ot)|0)+Math.imul(A,et)|0,e=e+Math.imul(A,ot)|0,h=h+Math.imul(y,ut)|0,n=(n=n+Math.imul(y,lt)|0)+Math.imul(b,ut)|0,e=e+Math.imul(b,lt)|0,h=h+Math.imul(g,mt)|0,n=(n=n+Math.imul(g,ft)|0)+Math.imul(c,mt)|0,e=e+Math.imul(c,ft)|0;var xt=(l+(h=h+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,Mt)|0)+Math.imul(M,pt)|0))<<13)|0;l=((e=e+Math.imul(M,Mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863,h=Math.imul(j,G),n=(n=Math.imul(j,Q))+Math.imul(K,G)|0,e=Math.imul(K,Q),h=h+Math.imul(z,W)|0,n=(n=n+Math.imul(z,X)|0)+Math.imul(O,W)|0,e=e+Math.imul(O,X)|0,h=h+Math.imul(N,$)|0,n=(n=n+Math.imul(N,tt)|0)+Math.imul(E,$)|0,e=e+Math.imul(E,tt)|0,h=h+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,ht)|0)+Math.imul(R,rt)|0,e=e+Math.imul(R,ht)|0,h=h+Math.imul(x,et)|0,n=(n=n+Math.imul(x,ot)|0)+Math.imul(q,et)|0,e=e+Math.imul(q,ot)|0,h=h+Math.imul(k,ut)|0,n=(n=n+Math.imul(k,lt)|0)+Math.imul(A,ut)|0,e=e+Math.imul(A,lt)|0,h=h+Math.imul(y,mt)|0,n=(n=n+Math.imul(y,ft)|0)+Math.imul(b,mt)|0,e=e+Math.imul(b,ft)|0;var qt=(l+(h=h+Math.imul(g,pt)|0)|0)+((8191&(n=(n=n+Math.imul(g,Mt)|0)+Math.imul(c,pt)|0))<<13)|0;l=((e=e+Math.imul(c,Mt)|0)+(n>>>13)|0)+(qt>>>26)|0,qt&=67108863,h=Math.imul(j,W),n=(n=Math.imul(j,X))+Math.imul(K,W)|0,e=Math.imul(K,X),h=h+Math.imul(z,$)|0,n=(n=n+Math.imul(z,tt)|0)+Math.imul(O,$)|0,e=e+Math.imul(O,tt)|0,h=h+Math.imul(N,rt)|0,n=(n=n+Math.imul(N,ht)|0)+Math.imul(E,rt)|0,e=e+Math.imul(E,ht)|0,h=h+Math.imul(B,et)|0,n=(n=n+Math.imul(B,ot)|0)+Math.imul(R,et)|0,e=e+Math.imul(R,ot)|0,h=h+Math.imul(x,ut)|0,n=(n=n+Math.imul(x,lt)|0)+Math.imul(q,ut)|0,e=e+Math.imul(q,lt)|0,h=h+Math.imul(k,mt)|0,n=(n=n+Math.imul(k,ft)|0)+Math.imul(A,mt)|0,e=e+Math.imul(A,ft)|0;var Zt=(l+(h=h+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,Mt)|0)+Math.imul(b,pt)|0))<<13)|0;l=((e=e+Math.imul(b,Mt)|0)+(n>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,h=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(K,$)|0,e=Math.imul(K,tt),h=h+Math.imul(z,rt)|0,n=(n=n+Math.imul(z,ht)|0)+Math.imul(O,rt)|0,e=e+Math.imul(O,ht)|0,h=h+Math.imul(N,et)|0,n=(n=n+Math.imul(N,ot)|0)+Math.imul(E,et)|0,e=e+Math.imul(E,ot)|0,h=h+Math.imul(B,ut)|0,n=(n=n+Math.imul(B,lt)|0)+Math.imul(R,ut)|0,e=e+Math.imul(R,lt)|0,h=h+Math.imul(x,mt)|0,n=(n=n+Math.imul(x,ft)|0)+Math.imul(q,mt)|0,e=e+Math.imul(q,ft)|0;var Bt=(l+(h=h+Math.imul(k,pt)|0)|0)+((8191&(n=(n=n+Math.imul(k,Mt)|0)+Math.imul(A,pt)|0))<<13)|0;l=((e=e+Math.imul(A,Mt)|0)+(n>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,h=Math.imul(j,rt),n=(n=Math.imul(j,ht))+Math.imul(K,rt)|0,e=Math.imul(K,ht),h=h+Math.imul(z,et)|0,n=(n=n+Math.imul(z,ot)|0)+Math.imul(O,et)|0,e=e+Math.imul(O,ot)|0,h=h+Math.imul(N,ut)|0,n=(n=n+Math.imul(N,lt)|0)+Math.imul(E,ut)|0,e=e+Math.imul(E,lt)|0,h=h+Math.imul(B,mt)|0,n=(n=n+Math.imul(B,ft)|0)+Math.imul(R,mt)|0,e=e+Math.imul(R,ft)|0;var Rt=(l+(h=h+Math.imul(x,pt)|0)|0)+((8191&(n=(n=n+Math.imul(x,Mt)|0)+Math.imul(q,pt)|0))<<13)|0;l=((e=e+Math.imul(q,Mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,h=Math.imul(j,et),n=(n=Math.imul(j,ot))+Math.imul(K,et)|0,e=Math.imul(K,ot),h=h+Math.imul(z,ut)|0,n=(n=n+Math.imul(z,lt)|0)+Math.imul(O,ut)|0,e=e+Math.imul(O,lt)|0,h=h+Math.imul(N,mt)|0,n=(n=n+Math.imul(N,ft)|0)+Math.imul(E,mt)|0,e=e+Math.imul(E,ft)|0;var Lt=(l+(h=h+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,Mt)|0)+Math.imul(R,pt)|0))<<13)|0;l=((e=e+Math.imul(R,Mt)|0)+(n>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,h=Math.imul(j,ut),n=(n=Math.imul(j,lt))+Math.imul(K,ut)|0,e=Math.imul(K,lt),h=h+Math.imul(z,mt)|0,n=(n=n+Math.imul(z,ft)|0)+Math.imul(O,mt)|0,e=e+Math.imul(O,ft)|0;var Nt=(l+(h=h+Math.imul(N,pt)|0)|0)+((8191&(n=(n=n+Math.imul(N,Mt)|0)+Math.imul(E,pt)|0))<<13)|0;l=((e=e+Math.imul(E,Mt)|0)+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h=Math.imul(j,mt),n=(n=Math.imul(j,ft))+Math.imul(K,mt)|0,e=Math.imul(K,ft);var Et=(l+(h=h+Math.imul(z,pt)|0)|0)+((8191&(n=(n=n+Math.imul(z,Mt)|0)+Math.imul(O,pt)|0))<<13)|0;l=((e=e+Math.imul(O,Mt)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863;var It=(l+(h=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,Mt))+Math.imul(K,pt)|0))<<13)|0;return l=((e=Math.imul(K,Mt))+(n>>>13)|0)+(It>>>26)|0,It&=67108863,u[0]=vt,u[1]=gt,u[2]=ct,u[3]=wt,u[4]=yt,u[5]=bt,u[6]=_t,u[7]=kt,u[8]=At,u[9]=St,u[10]=xt,u[11]=qt,u[12]=Zt,u[13]=Bt,u[14]=Rt,u[15]=Lt,u[16]=Nt,u[17]=Et,u[18]=It,0!==l&&(u[19]=l,r.length++),r};function g(t,i,r){r.negative=i.negative^t.negative,r.length=t.length+i.length;for(var h=0,n=0,e=0;e<r.length-1;e++){var o=n;n=0;for(var s=67108863&h,u=Math.min(e,i.length-1),l=Math.max(0,e-t.length+1);l<=u;l++){var a=e-l,m=(0|t.words[a])*(0|i.words[l]),f=67108863&m;s=67108863&(f=f+s|0),n+=(o=(o=o+(m/67108864|0)|0)+(f>>>26)|0)>>>26,o&=67108863}r.words[e]=s,h=o,o=n}return 0!==h?r.words[e]=h:r.length--,r._strip()}function c(t,i,r){return g(t,i,r)}Math.imul||(v=M),e.prototype.mulTo=function(t,i){var r=this.length+t.length;return 10===this.length&&10===t.length?v(this,t,i):r<63?M(this,t,i):r<1024?g(this,t,i):c(this,t,i)},e.prototype.mul=function(t){var i=new e(null);return i.words=new Array(this.length+t.length),this.mulTo(t,i)},e.prototype.mulf=function(t){var i=new e(null);return i.words=new Array(this.length+t.length),c(this,t,i)},e.prototype.imul=function(t){return this.clone().mulTo(t,this)},e.prototype.imuln=function(t){var i=t<0;i&&(t=-t),h("number"==typeof t),h(t<67108864);for(var r=0,n=0;n<this.length;n++){var e=(0|this.words[n])*t,o=(67108863&e)+(67108863&r);r>>=26,r+=e/67108864|0,r+=o>>>26,this.words[n]=67108863&o}return 0!==r&&(this.words[n]=r,this.length++),i?this.ineg():this},e.prototype.muln=function(t){return this.clone().imuln(t)},e.prototype.sqr=function(){return this.mul(this)},e.prototype.isqr=function(){return this.imul(this.clone())},e.prototype.pow=function(t){var i=function(t){for(var i=new Array(t.bitLength()),r=0;r<i.length;r++){var h=r/26|0,n=r%26;i[r]=t.words[h]>>>n&1}return i}(t);if(0===i.length)return new e(1);for(var r=this,h=0;h<i.length&&0===i[h];h++,r=r.sqr());if(++h<i.length)for(var n=r.sqr();h<i.length;h++,n=n.sqr())0!==i[h]&&(r=r.mul(n));return r},e.prototype.iushln=function(t){h("number"==typeof t&&t>=0);var i,r=t%26,n=(t-r)/26,e=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(i=0;i<this.length;i++){var s=this.words[i]&e,u=(0|this.words[i])-s<<r;this.words[i]=u|o,o=s>>>26-r}o&&(this.words[i]=o,this.length++)}if(0!==n){for(i=this.length-1;i>=0;i--)this.words[i+n]=this.words[i];for(i=0;i<n;i++)this.words[i]=0;this.length+=n}return this._strip()},e.prototype.ishln=function(t){return h(0===this.negative),this.iushln(t)},e.prototype.iushrn=function(t,i,r){var n;h("number"==typeof t&&t>=0),n=i?(i-i%26)/26:0;var e=t%26,o=Math.min((t-e)/26,this.length),s=67108863^67108863>>>e<<e,u=r;if(n-=o,n=Math.max(0,n),u){for(var l=0;l<o;l++)u.words[l]=this.words[l];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,l=0;l<this.length;l++)this.words[l]=this.words[l+o];else this.words[0]=0,this.length=1;var a=0;for(l=this.length-1;l>=0&&(0!==a||l>=n);l--){var m=0|this.words[l];this.words[l]=a<<26-e|m>>>e,a=m&s}return u&&0!==a&&(u.words[u.length++]=a),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},e.prototype.ishrn=function(t,i,r){return h(0===this.negative),this.iushrn(t,i,r)},e.prototype.shln=function(t){return this.clone().ishln(t)},e.prototype.ushln=function(t){return this.clone().iushln(t)},e.prototype.shrn=function(t){return this.clone().ishrn(t)},e.prototype.ushrn=function(t){return this.clone().iushrn(t)},e.prototype.testn=function(t){h("number"==typeof t&&t>=0);var i=t%26,r=(t-i)/26,n=1<<i;return!(this.length<=r||!(this.words[r]&n))},e.prototype.imaskn=function(t){h("number"==typeof t&&t>=0);var i=t%26,r=(t-i)/26;if(h(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==i&&r++,this.length=Math.min(r,this.length),0!==i){var n=67108863^67108863>>>i<<i;this.words[this.length-1]&=n}return this._strip()},e.prototype.maskn=function(t){return this.clone().imaskn(t)},e.prototype.iaddn=function(t){return h("number"==typeof t),h(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},e.prototype._iaddn=function(t){this.words[0]+=t;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},e.prototype.isubn=function(t){if(h("number"==typeof t),h(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 i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this._strip()},e.prototype.addn=function(t){return this.clone().iaddn(t)},e.prototype.subn=function(t){return this.clone().isubn(t)},e.prototype.iabs=function(){return this.negative=0,this},e.prototype.abs=function(){return this.clone().iabs()},e.prototype._ishlnsubmul=function(t,i,r){var n,e,o=t.length+r;this._expand(o);var s=0;for(n=0;n<t.length;n++){e=(0|this.words[n+r])+s;var u=(0|t.words[n])*i;s=((e-=67108863&u)>>26)-(u/67108864|0),this.words[n+r]=67108863&e}for(;n<this.length-r;n++)s=(e=(0|this.words[n+r])+s)>>26,this.words[n+r]=67108863&e;if(0===s)return this._strip();for(h(-1===s),s=0,n=0;n<this.length;n++)s=(e=-(0|this.words[n])+s)>>26,this.words[n]=67108863&e;return this.negative=1,this._strip()},e.prototype._wordDiv=function(t,i){var r=(this.length,t.length),h=this.clone(),n=t,o=0|n.words[n.length-1];0!=(r=26-this._countBits(o))&&(n=n.ushln(r),h.iushln(r),o=0|n.words[n.length-1]);var s,u=h.length-n.length;if("mod"!==i){(s=new e(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l<s.length;l++)s.words[l]=0}var a=h.clone()._ishlnsubmul(n,1,u);0===a.negative&&(h=a,s&&(s.words[u]=1));for(var m=u-1;m>=0;m--){var f=67108864*(0|h.words[n.length+m])+(0|h.words[n.length+m-1]);for(f=Math.min(f/o|0,67108863),h._ishlnsubmul(n,f,m);0!==h.negative;)f--,h.negative=0,h._ishlnsubmul(n,1,m),h.isZero()||(h.negative^=1);s&&(s.words[m]=f)}return s&&s._strip(),h._strip(),"div"!==i&&0!==r&&h.iushrn(r),{div:s||null,mod:h}},e.prototype.divmod=function(t,i,r){return h(!t.isZero()),this.isZero()?{div:new e(0),mod:new e(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,i),"mod"!==i&&(n=s.div.neg()),"div"!==i&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:n,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),i),"mod"!==i&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),i),"div"!==i&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new e(0),mod:this}:1===t.length?"div"===i?{div:this.divn(t.words[0]),mod:null}:"mod"===i?{div:null,mod:new e(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new e(this.modrn(t.words[0]))}:this._wordDiv(t,i);var n,o,s},e.prototype.div=function(t){return this.divmod(t,"div",!1).div},e.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},e.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},e.prototype.divRound=function(t){var i=this.divmod(t);if(i.mod.isZero())return i.div;var r=0!==i.div.negative?i.mod.isub(t):i.mod,h=t.ushrn(1),n=t.andln(1),e=r.cmp(h);return e<0||1===n&&0===e?i.div:0!==i.div.negative?i.div.isubn(1):i.div.iaddn(1)},e.prototype.modrn=function(t){var i=t<0;i&&(t=-t),h(t<=67108863);for(var r=(1<<26)%t,n=0,e=this.length-1;e>=0;e--)n=(r*n+(0|this.words[e]))%t;return i?-n:n},e.prototype.modn=function(t){return this.modrn(t)},e.prototype.idivn=function(t){var i=t<0;i&&(t=-t),h(t<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var e=(0|this.words[n])+67108864*r;this.words[n]=e/t|0,r=e%t}return this._strip(),i?this.ineg():this},e.prototype.divn=function(t){return this.clone().idivn(t)},e.prototype.egcd=function(t){h(0===t.negative),h(!t.isZero());var i=this,r=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var n=new e(1),o=new e(0),s=new e(0),u=new e(1),l=0;i.isEven()&&r.isEven();)i.iushrn(1),r.iushrn(1),++l;for(var a=r.clone(),m=i.clone();!i.isZero();){for(var f=0,d=1;0==(i.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(i.iushrn(f);f-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(a),o.isub(m)),n.iushrn(1),o.iushrn(1);for(var p=0,M=1;0==(r.words[0]&M)&&p<26;++p,M<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(a),u.isub(m)),s.iushrn(1),u.iushrn(1);i.cmp(r)>=0?(i.isub(r),n.isub(s),o.isub(u)):(r.isub(i),s.isub(n),u.isub(o))}return{a:s,b:u,gcd:r.iushln(l)}},e.prototype._invmp=function(t){h(0===t.negative),h(!t.isZero());var i=this,r=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var n,o=new e(1),s=new e(0),u=r.clone();i.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,a=1;0==(i.words[0]&a)&&l<26;++l,a<<=1);if(l>0)for(i.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var m=0,f=1;0==(r.words[0]&f)&&m<26;++m,f<<=1);if(m>0)for(r.iushrn(m);m-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);i.cmp(r)>=0?(i.isub(r),o.isub(s)):(r.isub(i),s.isub(o))}return(n=0===i.cmpn(1)?o:s).cmpn(0)<0&&n.iadd(t),n},e.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var i=this.clone(),r=t.clone();i.negative=0,r.negative=0;for(var h=0;i.isEven()&&r.isEven();h++)i.iushrn(1),r.iushrn(1);for(;;){for(;i.isEven();)i.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=i.cmp(r);if(n<0){var e=i;i=r,r=e}else if(0===n||0===r.cmpn(1))break;i.isub(r)}return r.iushln(h)},e.prototype.invm=function(t){return this.egcd(t).a.umod(t)},e.prototype.isEven=function(){return 0==(1&this.words[0])},e.prototype.isOdd=function(){return 1==(1&this.words[0])},e.prototype.andln=function(t){return this.words[0]&t},e.prototype.bincn=function(t){h("number"==typeof t);var i=t%26,r=(t-i)/26,n=1<<i;if(this.length<=r)return this._expand(r+1),this.words[r]|=n,this;for(var e=n,o=r;0!==e&&o<this.length;o++){var s=0|this.words[o];e=(s+=e)>>>26,s&=67108863,this.words[o]=s}return 0!==e&&(this.words[o]=e,this.length++),this},e.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},e.prototype.cmpn=function(t){var i,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)i=1;else{r&&(t=-t),h(t<=67108863,"Number is too big");var n=0|this.words[0];i=n===t?0:n<t?-1:1}return 0!==this.negative?0|-i:i},e.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var i=this.ucmp(t);return 0!==this.negative?0|-i:i},e.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var i=0,r=this.length-1;r>=0;r--){var h=0|this.words[r],n=0|t.words[r];if(h!==n){h<n?i=-1:h>n&&(i=1);break}}return i},e.prototype.gtn=function(t){return 1===this.cmpn(t)},e.prototype.gt=function(t){return 1===this.cmp(t)},e.prototype.gten=function(t){return this.cmpn(t)>=0},e.prototype.gte=function(t){return this.cmp(t)>=0},e.prototype.ltn=function(t){return-1===this.cmpn(t)},e.prototype.lt=function(t){return-1===this.cmp(t)},e.prototype.lten=function(t){return this.cmpn(t)<=0},e.prototype.lte=function(t){return this.cmp(t)<=0},e.prototype.eqn=function(t){return 0===this.cmpn(t)},e.prototype.eq=function(t){return 0===this.cmp(t)},e.red=function(t){return new S(t)},e.prototype.toRed=function(t){return h(!this.red,"Already a number in reduction context"),h(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},e.prototype.fromRed=function(){return h(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},e.prototype._forceRed=function(t){return this.red=t,this},e.prototype.forceRed=function(t){return h(!this.red,"Already a number in reduction context"),this._forceRed(t)},e.prototype.redAdd=function(t){return h(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},e.prototype.redIAdd=function(t){return h(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},e.prototype.redSub=function(t){return h(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},e.prototype.redISub=function(t){return h(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},e.prototype.redShl=function(t){return h(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},e.prototype.redMul=function(t){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},e.prototype.redIMul=function(t){return h(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},e.prototype.redSqr=function(){return h(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},e.prototype.redISqr=function(){return h(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},e.prototype.redSqrt=function(){return h(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},e.prototype.redInvm=function(){return h(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},e.prototype.redNeg=function(){return h(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},e.prototype.redPow=function(t){return h(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function y(t,i){this.name=t,this.p=new e(i,16),this.n=this.p.bitLength(),this.k=new e(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var i=e._prime(t);this.m=i.p,this.prime=i}else h(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new e(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)}y.prototype._tmp=function(){var t=new e(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var i,r=t;do{this.split(r,this.tmp),i=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(i>this.n);var h=i<this.n?-1:r.ucmp(this.p);return 0===h?(r.words[0]=0,r.length=1):h>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,i){t.iushrn(this.n,0,i)},y.prototype.imulK=function(t){return t.imul(this.k)},n(b,y),b.prototype.split=function(t,i){for(var r=4194303,h=Math.min(t.length,9),n=0;n<h;n++)i.words[n]=t.words[n];if(i.length=h,t.length<=9)return t.words[0]=0,void(t.length=1);var e=t.words[9];for(i.words[i.length++]=e&r,n=10;n<t.length;n++){var o=0|t.words[n];t.words[n-10]=(o&r)<<4|e>>>22,e=o}e>>>=22,t.words[n-10]=e,0===e&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var i=0,r=0;r<t.length;r++){var h=0|t.words[r];i+=977*h,t.words[r]=67108863&i,i=64*h+(i/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},n(_,y),n(k,y),n(A,y),A.prototype.imulK=function(t){for(var i=0,r=0;r<t.length;r++){var h=19*(0|t.words[r])+i,n=67108863&h;h>>>=26,t.words[r]=n,i=h}return 0!==i&&(t.words[t.length++]=i),t},e._prime=function(t){if(w[t])return w[t];var i;if("k256"===t)i=new b;else if("p224"===t)i=new _;else if("p192"===t)i=new k;else{if("p25519"!==t)throw new Error("Unknown prime "+t);i=new A}return w[t]=i,i},S.prototype._verify1=function(t){h(0===t.negative,"red works only with positives"),h(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,i){h(0==(t.negative|i.negative),"red works only with positives"),h(t.red&&t.red===i.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(a(t,t.umod(this.m)._forceRed(this)),t)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,i){this._verify2(t,i);var r=t.add(i);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,i){this._verify2(t,i);var r=t.iadd(i);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,i){this._verify2(t,i);var r=t.sub(i);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,i){this._verify2(t,i);var r=t.isub(i);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,i){return this._verify1(t),this.imod(t.ushln(i))},S.prototype.imul=function(t,i){return this._verify2(t,i),this.imod(t.imul(i))},S.prototype.mul=function(t,i){return this._verify2(t,i),this.imod(t.mul(i))},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 i=this.m.andln(3);if(h(i%2==1),3===i){var r=this.m.add(new e(1)).iushrn(2);return this.pow(t,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);h(!n.isZero());var s=new e(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new e(2*a*a).toRed(this);0!==this.pow(a,l).cmp(u);)a.redIAdd(u);for(var m=this.pow(a,n),f=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,n),p=o;0!==d.cmp(s);){for(var M=d,v=0;0!==M.cmp(s);v++)M=M.redSqr();h(v<p);var g=this.pow(m,new e(1).iushln(p-v-1));f=f.redMul(g),m=g.redSqr(),d=d.redMul(m),p=v}return f},S.prototype.invm=function(t){var i=t._invmp(this.m);return 0!==i.negative?(i.negative=0,this.imod(i).redNeg()):this.imod(i)},S.prototype.pow=function(t,i){if(i.isZero())return new e(1).toRed(this);if(0===i.cmpn(1))return t.clone();var r=new Array(16);r[0]=new e(1).toRed(this),r[1]=t;for(var h=2;h<r.length;h++)r[h]=this.mul(r[h-1],t);var n=r[0],o=0,s=0,u=i.bitLength()%26;for(0===u&&(u=26),h=i.length-1;h>=0;h--){for(var l=i.words[h],a=u-1;a>=0;a--){var m=l>>a&1;n!==r[0]&&(n=this.sqr(n)),0!==m||0!==o?(o<<=1,o|=m,(4==++s||0===h&&0===a)&&(n=this.mul(n,r[o]),s=0,o=0)):s=0}u=26}return n},S.prototype.convertTo=function(t){var i=t.umod(this.m);return i===t?i.clone():i},S.prototype.convertFrom=function(t){var i=t.clone();return i.red=null,i},e.mont=function(t){return new x(t)},n(x,S),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var i=this.imod(t.mul(this.rinv));return i.red=null,i},x.prototype.imul=function(t,i){if(t.isZero()||i.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(i),h=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(h).iushrn(this.shift),e=n;return n.cmp(this.m)>=0?e=n.isub(this.m):n.cmpn(0)<0&&(e=n.iadd(this.m)),e._forceRed(this)},x.prototype.mul=function(t,i){if(t.isZero()||i.isZero())return new e(0)._forceRed(this);var r=t.mul(i),h=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(h).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.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(r,t);var h=r.exports;export{h as B,r as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t,b as e}from"./index-
|
|
1
|
+
import{c as t,b as e}from"./index-0cd3036e.js";var r={exports:{}};!function(e,r){var o="undefined"!=typeof self?self:t,n=function(){function t(){this.fetch=!1,this.DOMException=o.DOMException}return t.prototype=o,new t}();!function(t){!function(e){var r={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(r.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],n=ArrayBuffer.isView||function(t){return t&&o.indexOf(Object.prototype.toString.call(t))>-1};function i(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function s(t){return"string"!=typeof t&&(t=String(t)),t}function a(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r.iterable&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function u(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function c(t){var e=new FileReader,r=f(e);return e.readAsArrayBuffer(t),r}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:r.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:r.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():r.arrayBuffer&&r.blob&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):r.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||n(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r.blob&&(this.blob=function(){var t=u(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?u(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(c)}),this.text=function(){var t,e,r,o=u(this);if(o)return o;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=f(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),o=0;o<e.length;o++)r[o]=String.fromCharCode(e[o]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r.formData&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,e){t=i(t),e=s(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},h.prototype.delete=function(t){delete this.map[i(t)]},h.prototype.get=function(t){return t=i(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(i(t))},h.prototype.set=function(t,e){this.map[i(t)]=s(e)},h.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},h.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),a(t)},h.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),a(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),a(t)},r.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function l(t,e){var r,o,n=(e=e||{}).body;if(t instanceof l){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=(r=e.method||this.method||"GET",o=r.toUpperCase(),y.indexOf(o)>-1?o:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function b(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(n))}})),e}function m(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}l.prototype.clone=function(){return new l(this,{body:this._bodyInit})},p.call(l.prototype),p.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},m.error=function(){var t=new m(null,{status:0,statusText:""});return t.type="error",t};var w=[301,302,303,307,308];m.redirect=function(t,e){if(-1===w.indexOf(e))throw new RangeError("Invalid status code");return new m(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function v(t,o){return new Promise((function(n,i){var s=new l(t,o);if(s.signal&&s.signal.aborted)return i(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var t,e,r={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var r=t.split(":"),o=r.shift().trim();if(o){var n=r.join(":").trim();e.append(o,n)}})),e)};r.url="responseURL"in a?a.responseURL:r.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new m(o,r))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.onabort=function(){i(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&r.blob&&(a.responseType="blob"),s.headers.forEach((function(t,e){a.setRequestHeader(e,t)})),s.signal&&(s.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",u)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}v.polyfill=!0,t.fetch||(t.fetch=v,t.Headers=h,t.Request=l,t.Response=m),e.Headers=h,e.Request=l,e.Response=m,e.fetch=v,Object.defineProperty(e,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(r=i.fetch).default=i.fetch,r.fetch=i.fetch,r.Headers=i.Headers,r.Request=i.Request,r.Response=i.Response,e.exports=r}(r,r.exports);var o=e(r.exports);export{r as b,o as c};
|
package/dist/cjs/{DefaultJsonRpcProvider-2894e1a2.cjs → DefaultJsonRpcProvider-9f539cb7.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@ethersproject/providers"),r=require("./index-
|
|
1
|
+
"use strict";var e=require("@ethersproject/providers"),r=require("./index-66442a21.cjs"),t=require("@ethersproject/properties");function s(e){if(e.error){const r=new Error(e.error.message);throw r.code=e.error.code,r.data=e.error.data,r}return e.result}class o extends e.StaticJsonRpcProvider{getNetwork(){return"object"==typeof this.network&&"number"==typeof this.network.chainId?Promise.resolve(this.network):"number"==typeof this.network&&this.network?Promise.resolve({chainId:this.network,name:"unknown"}):super.getNetwork()}send(e,o){var i;const n={method:e,params:o,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:t.deepCopy(n),provider:this});const c=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(c&&this._cache[e])return this._cache[e];const h=r.fetchJson(Object.assign(Object.assign({},this.connection),{url:this.rpcUrl||(null===(i=this.connection)||void 0===i?void 0:i.url)}),JSON.stringify(n),s).then((e=>(this.emit("debug",{action:"response",request:n,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",error:e,request:n,provider:this}),e}));return c&&(this._cache[e]=h,setTimeout((()=>{this._cache[e]=null}),0)),h}}exports.DefaultJsonRpcProvider=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./index-
|
|
1
|
+
"use strict";var e=require("./index-3b9b0297.cjs"),r=Object.freeze({__proto__:null,default:{}}),t=e.getAugmentedNamespace(r);exports.require$$1=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./index-3b9b0297.cjs"),r=e.getAugmentedNamespace(e._tslib);exports.require$$0=r;
|