@dodoex/wallet-web3 0.0.25 → 0.0.27

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.
Files changed (64) hide show
  1. package/dist/__node-resolve_empty-8e0ed40a.js +1 -0
  2. package/dist/__tslib-9e4c81a8.js +1 -0
  3. package/dist/{blocto-4a1e9263.js → blocto-3a53f8b6.js} +1 -1
  4. package/dist/{bn-adaa4e36.js → bn-1f7a5082.js} +1 -1
  5. package/dist/{browser-ponyfill-dddc085e.js → browser-ponyfill-d91311ee.js} +1 -1
  6. package/dist/cjs/{__node-resolve_empty-49c0af6e.cjs → __node-resolve_empty-84114e7b.cjs} +1 -1
  7. package/dist/cjs/__tslib-b883b382.cjs +1 -0
  8. package/dist/cjs/{blocto-deb38e52.cjs → blocto-d4f99c6d.cjs} +1 -1
  9. package/dist/cjs/{bn-2b933a98.cjs → bn-31ad209b.cjs} +1 -1
  10. package/dist/cjs/{browser-ponyfill-1726d0df.cjs → browser-ponyfill-ea8a92bd.cjs} +1 -1
  11. package/dist/cjs/{ethers-b15b78af.cjs → ethers-2ad08a48.cjs} +1 -1
  12. package/dist/cjs/{id-8ee21e65.cjs → id-27a0776c.cjs} +1 -1
  13. package/dist/cjs/{index-d8ce743a.cjs → index-4b51d39a.cjs} +1 -1
  14. package/dist/cjs/{index-a5e70b92.cjs → index-5c0c4d5d.cjs} +1 -1
  15. package/dist/cjs/{index-6102e681.cjs → index-72b1ed27.cjs} +1 -1
  16. package/dist/cjs/{index-d176fe96.cjs → index-8a4a2019.cjs} +1 -1
  17. package/dist/cjs/{index-f7e0957d.cjs → index-8f67d094.cjs} +1 -1
  18. package/dist/cjs/index-92b3babd.cjs +1 -0
  19. package/dist/cjs/index-994ce66c.cjs +1 -0
  20. package/dist/cjs/{index-4a4f9fb0.cjs → index-a144299f.cjs} +1 -1
  21. package/dist/cjs/{index-e138e4bd.cjs → index-efbb0a83.cjs} +1 -1
  22. package/dist/cjs/{index-a3094029.cjs → index-f847962b.cjs} +1 -1
  23. package/dist/cjs/index.cjs +1 -1
  24. package/dist/cjs/{index.es-6960d4a9.cjs → index.es-a9be6641.cjs} +1 -1
  25. package/dist/cjs/{interface-999fee7d.cjs → interface-10ee35a7.cjs} +1 -1
  26. package/dist/cjs/{portis-d03f025d.cjs → portis-1c8363c4.cjs} +1 -1
  27. package/dist/cjs/{provider-455dd9b1.cjs → provider-e71b1986.cjs} +1 -1
  28. package/dist/cjs/{rainbow-d05c27f9.cjs → rainbow-e74ecaa9.cjs} +1 -1
  29. package/dist/cjs/{typed-data-f657627b.cjs → typed-data-4c3f6987.cjs} +1 -1
  30. package/dist/cjs/{uAuth-7d31e1b1.cjs → uAuth-4a2585a7.cjs} +1 -1
  31. package/dist/cjs/{walletConnect-40c43a59.cjs → walletConnect-431070d9.cjs} +1 -1
  32. package/dist/cjs/walletLink-8a04136d.cjs +1 -0
  33. package/dist/{ethers-3699e497.js → ethers-3dc4d121.js} +1 -1
  34. package/dist/{id-3a9db3a4.js → id-d835cd8d.js} +1 -1
  35. package/dist/{index-39ab0219.js → index-50fd6ea1.js} +1 -1
  36. package/dist/index-5622e13e.js +1 -0
  37. package/dist/{index-08792dc3.js → index-73e4b446.js} +1 -1
  38. package/dist/{index-6ca7c907.js → index-75567b09.js} +1 -1
  39. package/dist/{index-a5df01df.js → index-82bd77e7.js} +1 -1
  40. package/dist/{index-8e1d08b5.js → index-8bcde1e4.js} +1 -1
  41. package/dist/{index-42239632.js → index-bcd40588.js} +1 -1
  42. package/dist/{index-01d9066d.js → index-d4a898ca.js} +1 -1
  43. package/dist/{index-034d865e.js → index-f5531a89.js} +1 -1
  44. package/dist/{index-c07e3ffe.js → index-f635a726.js} +1 -1
  45. package/dist/{index.es-852c4086.js → index.es-774ccd76.js} +1 -1
  46. package/dist/index.js +1 -1
  47. package/dist/{interface-794f4d58.js → interface-a3bdda06.js} +1 -1
  48. package/dist/{portis-4973bf4d.js → portis-2f37651e.js} +1 -1
  49. package/dist/{provider-e3fb88f2.js → provider-65f4d865.js} +1 -1
  50. package/dist/{rainbow-63383448.js → rainbow-a520fee4.js} +1 -1
  51. package/dist/{typed-data-987b06fa.js → typed-data-16658009.js} +1 -1
  52. package/dist/{uAuth-6aeb1a27.js → uAuth-721a98eb.js} +1 -1
  53. package/dist/walletConnect-39fed90e.js +1 -0
  54. package/dist/walletLink-19cd4475.js +1 -0
  55. package/package.json +1 -1
  56. package/dist/__node-resolve_empty-6899d137.js +0 -1
  57. package/dist/__tslib-6931b0df.js +0 -1
  58. package/dist/cjs/__tslib-4266d6e2.cjs +0 -1
  59. package/dist/cjs/index-0b32b93b.cjs +0 -1
  60. package/dist/cjs/index-33676cb5.cjs +0 -1
  61. package/dist/cjs/walletLink-7a3a1449.cjs +0 -1
  62. package/dist/index-037efcb0.js +0 -1
  63. package/dist/walletConnect-0d5f67a2.js +0 -1
  64. package/dist/walletLink-ab6f46dd.js +0 -1
@@ -1 +1 @@
1
- "use strict";var t,i=require("./index-d8ce743a.cjs"),r=require("./_commonjs-dynamic-modules-f09a98c7.cjs"),n=require("./__node-resolve_empty-49c0af6e.cjs"),e={exports:{}};function h(){return t||(t=1,h=e,i.commonjsGlobal,h.exports=(o=o||function(t,e){var h;if("undefined"!=typeof window&&window.crypto&&(h=window.crypto),"undefined"!=typeof self&&self.crypto&&(h=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(h=globalThis.crypto),!h&&"undefined"!=typeof window&&window.msCrypto&&(h=window.msCrypto),!h&&void 0!==i.commonjsGlobal&&i.commonjsGlobal.crypto&&(h=i.commonjsGlobal.crypto),!h&&"function"==typeof r.commonjsRequire)try{h=n.require$$0}catch(t){}var o=function(){if(h){if("function"==typeof h.getRandomValues)try{return h.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof h.randomBytes)try{return h.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function t(){}return function(i){var r;return t.prototype=i,r=new t,t.prototype=null,r}}(),u={},a=u.lib={},l=a.Base={extend:function(t){var i=s(this);return t&&i.mixIn(t),i.hasOwnProperty("init")&&this.init!==i.init||(i.init=function(){i.$super.init.apply(this,arguments)}),i.init.prototype=i,i.$super=this,i},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var i in t)t.hasOwnProperty(i)&&(this[i]=t[i]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},f=a.WordArray=l.extend({init:function(t,i){t=this.words=t||[],this.sigBytes=i!=e?i:4*t.length},toString:function(t){return(t||d).stringify(this)},concat:function(t){var i=this.words,r=t.words,n=this.sigBytes,e=t.sigBytes;if(this.clamp(),n%4)for(var h=0;h<e;h++){var o=r[h>>>2]>>>24-h%4*8&255;i[n+h>>>2]|=o<<24-(n+h)%4*8}else for(var s=0;s<e;s+=4)i[n+s>>>2]=r[s>>>2];return this.sigBytes+=e,this},clamp:function(){var i=this.words,r=this.sigBytes;i[r>>>2]&=4294967295<<32-r%4*8,i.length=t.ceil(r/4)},clone:function(){var t=l.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var i=[],r=0;r<t;r+=4)i.push(o());return new f.init(i,t)}}),m=u.enc={},d=m.Hex={stringify:function(t){for(var i=t.words,r=t.sigBytes,n=[],e=0;e<r;e++){var h=i[e>>>2]>>>24-e%4*8&255;n.push((h>>>4).toString(16)),n.push((15&h).toString(16))}return n.join("")},parse:function(t){for(var i=t.length,r=[],n=0;n<i;n+=2)r[n>>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new f.init(r,i/2)}},p=m.Latin1={stringify:function(t){for(var i=t.words,r=t.sigBytes,n=[],e=0;e<r;e++){var h=i[e>>>2]>>>24-e%4*8&255;n.push(String.fromCharCode(h))}return n.join("")},parse:function(t){for(var i=t.length,r=[],n=0;n<i;n++)r[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new f.init(r,i)}},c=m.Utf8={stringify:function(t){try{return decodeURIComponent(escape(p.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return p.parse(unescape(encodeURIComponent(t)))}},M=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(i){var r,n=this._data,e=n.words,h=n.sigBytes,o=this.blockSize,s=h/(4*o),u=(s=i?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*o,a=t.min(4*u,h);if(u){for(var l=0;l<u;l+=o)this._doProcessBlock(e,l);r=e.splice(0,u),n.sigBytes-=a}return new f.init(r,a)},clone:function(){var t=l.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});a.Hasher=M.extend({cfg:l.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){M.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(i,r){return new t.init(r).finalize(i)}},_createHmacHelper:function(t){return function(i,r){return new v.HMAC.init(t,r).finalize(i)}}});var v=u.algo={};return u}(Math),o)),e.exports;var h,o}var o,s,u={exports:{}};o=u,i.commonjsGlobal,o.exports=(s=h(),function(t){var i=s,r=i.lib,n=r.WordArray,e=r.Hasher,h=i.algo,o=[],u=[];!function(){function i(i){for(var r=t.sqrt(i),n=2;n<=r;n++)if(!(i%n))return!1;return!0}function r(t){return 4294967296*(t-(0|t))|0}for(var n=2,e=0;e<64;)i(n)&&(e<8&&(o[e]=r(t.pow(n,.5))),u[e]=r(t.pow(n,1/3)),e++),n++}();var a=[],l=h.SHA256=e.extend({_doReset:function(){this._hash=new n.init(o.slice(0))},_doProcessBlock:function(t,i){for(var r=this._hash.words,n=r[0],e=r[1],h=r[2],o=r[3],s=r[4],l=r[5],f=r[6],m=r[7],d=0;d<64;d++){if(d<16)a[d]=0|t[i+d];else{var p=a[d-15],c=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,M=a[d-2],v=(M<<15|M>>>17)^(M<<13|M>>>19)^M>>>10;a[d]=c+a[d-7]+v+a[d-16]}var g=n&e^n&h^e&h,w=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),y=m+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&f)+u[d]+a[d];m=f,f=l,l=s,s=o+y|0,o=h,h=e,e=n,n=y+(w+g)|0}r[0]=r[0]+n|0,r[1]=r[1]+e|0,r[2]=r[2]+h|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+m|0},_doFinalize:function(){var i=this._data,r=i.words,n=8*this._nDataBytes,e=8*i.sigBytes;return r[e>>>5]|=128<<24-e%32,r[14+(e+64>>>9<<4)]=t.floor(n/4294967296),r[15+(e+64>>>9<<4)]=n,i.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t}});i.SHA256=e._createHelper(l),i.HmacSHA256=e._createHmacHelper(l)}(Math),s.SHA256);var a={exports:{}};!function(t,i){function r(t,i){if(!t)throw new Error(i||"Assertion failed")}function e(t,i){t.super_=i;var r=function(){};r.prototype=i.prototype,t.prototype=new r,t.prototype.constructor=t}function h(t,i,r){if(h.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=h:i.BN=h,h.BN=h,h.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n.require$$0.Buffer}catch(t){}function s(t,i){var r=t.charCodeAt(i);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,i,r){var n=s(t,r);return r-1>=i&&(n|=s(t,r-1)<<4),n}function a(t,i,r,n){for(var e=0,h=Math.min(t.length,r),o=i;o<h;o++){var s=t.charCodeAt(o)-48;e*=n,e+=s>=49?s-49+10:s>=17?s-17+10:s}return e}h.isBN=function(t){return t instanceof h||null!==t&&"object"==typeof t&&t.constructor.wordSize===h.wordSize&&Array.isArray(t.words)},h.max=function(t,i){return t.cmp(i)>0?t:i},h.min=function(t,i){return t.cmp(i)<0?t:i},h.prototype._init=function(t,i,n){if("number"==typeof t)return this._initNumber(t,i,n);if("object"==typeof t)return this._initArray(t,i,n);"hex"===i&&(i=16),r(i===(0|i)&&i>=2&&i<=36);var e=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(e++,this.negative=1),e<t.length&&(16===i?this._parseHex(t,e,n):(this._parseBase(t,i,e),"le"===n&&this._initArray(this.toArray(),i,n)))},h.prototype._initNumber=function(t,i,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),i,n)},h.prototype._initArray=function(t,i,n){if(r("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 e=0;e<this.length;e++)this.words[e]=0;var h,o,s=0;if("be"===n)for(e=t.length-1,h=0;e>=0;e-=3)o=t[e]|t[e-1]<<8|t[e-2]<<16,this.words[h]|=o<<s&67108863,this.words[h+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,h++);else if("le"===n)for(e=0,h=0;e<t.length;e+=3)o=t[e]|t[e+1]<<8|t[e+2]<<16,this.words[h]|=o<<s&67108863,this.words[h+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,h++);return this.strip()},h.prototype._parseHex=function(t,i,r){this.length=Math.ceil((t.length-i)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var e,h=0,o=0;if("be"===r)for(n=t.length-1;n>=i;n-=2)e=u(t,i,n)<<h,this.words[o]|=67108863&e,h>=18?(h-=18,o+=1,this.words[o]|=e>>>26):h+=8;else for(n=(t.length-i)%2==0?i+1:i;n<t.length;n+=2)e=u(t,i,n)<<h,this.words[o]|=67108863&e,h>=18?(h-=18,o+=1,this.words[o]|=e>>>26):h+=8;this.strip()},h.prototype._parseBase=function(t,i,r){this.words=[0],this.length=1;for(var n=0,e=1;e<=67108863;e*=i)n++;n--,e=e/i|0;for(var h=t.length-r,o=h%n,s=Math.min(h,h-o)+r,u=0,l=r;l<s;l+=n)u=a(t,l,l+n,i),this.imuln(e),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==o){var f=1;for(u=a(t,l,t.length,i),l=0;l<o;l++)f*=i;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},h.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},h.prototype.clone=function(){var t=new h(null);return this.copy(t),t},h.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},h.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},h.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},h.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[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],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,i,r){r.negative=i.negative^t.negative;var n=t.length+i.length|0;r.length=n,n=n-1|0;var e=0|t.words[0],h=0|i.words[0],o=e*h,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var a=1;a<n;a++){for(var l=u>>>26,f=67108863&u,m=Math.min(a,i.length-1),d=Math.max(0,a-t.length+1);d<=m;d++){var p=a-d|0;l+=(o=(e=0|t.words[p])*(h=0|i.words[d])+f)/67108864|0,f=67108863&o}r.words[a]=0|f,u=0|l}return 0!==u?r.words[a]=0|u:r.length--,r.strip()}h.prototype.toString=function(t,i){var n;if(i=0|i||1,16===(t=t||10)||"hex"===t){n="";for(var e=0,h=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<e|h)).toString(16);n=0!=(h=s>>>24-e&16777215)||o!==this.length-1?l[6-u.length]+u+n:u+n,(e+=2)>=26&&(e-=26,o--)}for(0!==h&&(n=h.toString(16)+n);n.length%i!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var a=f[t],d=m[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var c=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?c+n:l[a-c.length]+c+n}for(this.isZero()&&(n="0"+n);n.length%i!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},h.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},h.prototype.toJSON=function(){return this.toString(16)},h.prototype.toBuffer=function(t,i){return r(void 0!==o),this.toArrayLike(o,t,i)},h.prototype.toArray=function(t,i){return this.toArrayLike(Array,t,i)},h.prototype.toArrayLike=function(t,i,n){var e=this.byteLength(),h=n||Math.max(1,e);r(e<=h,"byte array longer than desired length"),r(h>0,"Requested array length <= 0"),this.strip();var o,s,u="le"===i,a=new t(h),l=this.clone();if(u){for(s=0;!l.isZero();s++)o=l.andln(255),l.iushrn(8),a[s]=o;for(;s<h;s++)a[s]=0}else{for(s=0;s<h-e;s++)a[s]=0;for(s=0;!l.isZero();s++)o=l.andln(255),l.iushrn(8),a[h-s-1]=o}return a},Math.clz32?h.prototype._countBits=function(t){return 32-Math.clz32(t)}:h.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},h.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},h.prototype.bitLength=function(){var t=this.words[this.length-1],i=this._countBits(t);return 26*(this.length-1)+i},h.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},h.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},h.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},h.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},h.prototype.isNeg=function(){return 0!==this.negative},h.prototype.neg=function(){return this.clone().ineg()},h.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},h.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()},h.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},h.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},h.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},h.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()},h.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},h.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},h.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},h.prototype.iuxor=function(t){var i,r;this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=i.words[n]^r.words[n];if(this!==i)for(;n<i.length;n++)this.words[n]=i.words[n];return this.length=i.length,this.strip()},h.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},h.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},h.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},h.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var i=0|Math.ceil(t/26),n=t%26;this._expand(i),n>0&&i--;for(var e=0;e<i;e++)this.words[e]=67108863&~this.words[e];return n>0&&(this.words[e]=~this.words[e]&67108863>>26-n),this.strip()},h.prototype.notn=function(t){return this.clone().inotn(t)},h.prototype.setn=function(t,i){r("number"==typeof t&&t>=0);var n=t/26|0,e=t%26;return this._expand(n+1),this.words[n]=i?this.words[n]|1<<e:this.words[n]&~(1<<e),this.strip()},h.prototype.iadd=function(t){var i,r,n;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,n=t):(r=t,n=this);for(var e=0,h=0;h<n.length;h++)i=(0|r.words[h])+(0|n.words[h])+e,this.words[h]=67108863&i,e=i>>>26;for(;0!==e&&h<r.length;h++)i=(0|r.words[h])+e,this.words[h]=67108863&i,e=i>>>26;if(this.length=r.length,0!==e)this.words[this.length]=e,this.length++;else if(r!==this)for(;h<r.length;h++)this.words[h]=r.words[h];return this},h.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)},h.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,n,e=this.cmp(t);if(0===e)return this.negative=0,this.length=1,this.words[0]=0,this;e>0?(r=this,n=t):(r=t,n=this);for(var h=0,o=0;o<n.length;o++)h=(i=(0|r.words[o])-(0|n.words[o])+h)>>26,this.words[o]=67108863&i;for(;0!==h&&o<r.length;o++)h=(i=(0|r.words[o])+h)>>26,this.words[o]=67108863&i;if(0===h&&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()},h.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,i,r){var n,e,h,o=t.words,s=i.words,u=r.words,a=0,l=0|o[0],f=8191&l,m=l>>>13,d=0|o[1],p=8191&d,c=d>>>13,M=0|o[2],v=8191&M,g=M>>>13,w=0|o[3],y=8191&w,b=w>>>13,_=0|o[4],x=8191&_,A=_>>>13,B=0|o[5],k=8191&B,S=B>>>13,q=0|o[6],R=8191&q,Z=q>>>13,j=0|o[7],z=8191&j,N=j>>>13,I=0|o[8],H=8191&I,L=I>>>13,T=0|o[9],E=8191&T,O=T>>>13,C=0|s[0],P=8191&C,F=C>>>13,G=0|s[1],U=8191&G,$=G>>>13,D=0|s[2],K=8191&D,V=D>>>13,W=0|s[3],J=8191&W,Q=W>>>13,X=0|s[4],Y=8191&X,tt=X>>>13,it=0|s[5],rt=8191&it,nt=it>>>13,et=0|s[6],ht=8191&et,ot=et>>>13,st=0|s[7],ut=8191&st,at=st>>>13,lt=0|s[8],ft=8191&lt,mt=lt>>>13,dt=0|s[9],pt=8191&dt,ct=dt>>>13;r.negative=t.negative^i.negative,r.length=19;var Mt=(a+(n=Math.imul(f,P))|0)+((8191&(e=(e=Math.imul(f,F))+Math.imul(m,P)|0))<<13)|0;a=((h=Math.imul(m,F))+(e>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(p,P),e=(e=Math.imul(p,F))+Math.imul(c,P)|0,h=Math.imul(c,F);var vt=(a+(n=n+Math.imul(f,U)|0)|0)+((8191&(e=(e=e+Math.imul(f,$)|0)+Math.imul(m,U)|0))<<13)|0;a=((h=h+Math.imul(m,$)|0)+(e>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,P),e=(e=Math.imul(v,F))+Math.imul(g,P)|0,h=Math.imul(g,F),n=n+Math.imul(p,U)|0,e=(e=e+Math.imul(p,$)|0)+Math.imul(c,U)|0,h=h+Math.imul(c,$)|0;var gt=(a+(n=n+Math.imul(f,K)|0)|0)+((8191&(e=(e=e+Math.imul(f,V)|0)+Math.imul(m,K)|0))<<13)|0;a=((h=h+Math.imul(m,V)|0)+(e>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(y,P),e=(e=Math.imul(y,F))+Math.imul(b,P)|0,h=Math.imul(b,F),n=n+Math.imul(v,U)|0,e=(e=e+Math.imul(v,$)|0)+Math.imul(g,U)|0,h=h+Math.imul(g,$)|0,n=n+Math.imul(p,K)|0,e=(e=e+Math.imul(p,V)|0)+Math.imul(c,K)|0,h=h+Math.imul(c,V)|0;var wt=(a+(n=n+Math.imul(f,J)|0)|0)+((8191&(e=(e=e+Math.imul(f,Q)|0)+Math.imul(m,J)|0))<<13)|0;a=((h=h+Math.imul(m,Q)|0)+(e>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,P),e=(e=Math.imul(x,F))+Math.imul(A,P)|0,h=Math.imul(A,F),n=n+Math.imul(y,U)|0,e=(e=e+Math.imul(y,$)|0)+Math.imul(b,U)|0,h=h+Math.imul(b,$)|0,n=n+Math.imul(v,K)|0,e=(e=e+Math.imul(v,V)|0)+Math.imul(g,K)|0,h=h+Math.imul(g,V)|0,n=n+Math.imul(p,J)|0,e=(e=e+Math.imul(p,Q)|0)+Math.imul(c,J)|0,h=h+Math.imul(c,Q)|0;var yt=(a+(n=n+Math.imul(f,Y)|0)|0)+((8191&(e=(e=e+Math.imul(f,tt)|0)+Math.imul(m,Y)|0))<<13)|0;a=((h=h+Math.imul(m,tt)|0)+(e>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(k,P),e=(e=Math.imul(k,F))+Math.imul(S,P)|0,h=Math.imul(S,F),n=n+Math.imul(x,U)|0,e=(e=e+Math.imul(x,$)|0)+Math.imul(A,U)|0,h=h+Math.imul(A,$)|0,n=n+Math.imul(y,K)|0,e=(e=e+Math.imul(y,V)|0)+Math.imul(b,K)|0,h=h+Math.imul(b,V)|0,n=n+Math.imul(v,J)|0,e=(e=e+Math.imul(v,Q)|0)+Math.imul(g,J)|0,h=h+Math.imul(g,Q)|0,n=n+Math.imul(p,Y)|0,e=(e=e+Math.imul(p,tt)|0)+Math.imul(c,Y)|0,h=h+Math.imul(c,tt)|0;var bt=(a+(n=n+Math.imul(f,rt)|0)|0)+((8191&(e=(e=e+Math.imul(f,nt)|0)+Math.imul(m,rt)|0))<<13)|0;a=((h=h+Math.imul(m,nt)|0)+(e>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(R,P),e=(e=Math.imul(R,F))+Math.imul(Z,P)|0,h=Math.imul(Z,F),n=n+Math.imul(k,U)|0,e=(e=e+Math.imul(k,$)|0)+Math.imul(S,U)|0,h=h+Math.imul(S,$)|0,n=n+Math.imul(x,K)|0,e=(e=e+Math.imul(x,V)|0)+Math.imul(A,K)|0,h=h+Math.imul(A,V)|0,n=n+Math.imul(y,J)|0,e=(e=e+Math.imul(y,Q)|0)+Math.imul(b,J)|0,h=h+Math.imul(b,Q)|0,n=n+Math.imul(v,Y)|0,e=(e=e+Math.imul(v,tt)|0)+Math.imul(g,Y)|0,h=h+Math.imul(g,tt)|0,n=n+Math.imul(p,rt)|0,e=(e=e+Math.imul(p,nt)|0)+Math.imul(c,rt)|0,h=h+Math.imul(c,nt)|0;var _t=(a+(n=n+Math.imul(f,ht)|0)|0)+((8191&(e=(e=e+Math.imul(f,ot)|0)+Math.imul(m,ht)|0))<<13)|0;a=((h=h+Math.imul(m,ot)|0)+(e>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(z,P),e=(e=Math.imul(z,F))+Math.imul(N,P)|0,h=Math.imul(N,F),n=n+Math.imul(R,U)|0,e=(e=e+Math.imul(R,$)|0)+Math.imul(Z,U)|0,h=h+Math.imul(Z,$)|0,n=n+Math.imul(k,K)|0,e=(e=e+Math.imul(k,V)|0)+Math.imul(S,K)|0,h=h+Math.imul(S,V)|0,n=n+Math.imul(x,J)|0,e=(e=e+Math.imul(x,Q)|0)+Math.imul(A,J)|0,h=h+Math.imul(A,Q)|0,n=n+Math.imul(y,Y)|0,e=(e=e+Math.imul(y,tt)|0)+Math.imul(b,Y)|0,h=h+Math.imul(b,tt)|0,n=n+Math.imul(v,rt)|0,e=(e=e+Math.imul(v,nt)|0)+Math.imul(g,rt)|0,h=h+Math.imul(g,nt)|0,n=n+Math.imul(p,ht)|0,e=(e=e+Math.imul(p,ot)|0)+Math.imul(c,ht)|0,h=h+Math.imul(c,ot)|0;var xt=(a+(n=n+Math.imul(f,ut)|0)|0)+((8191&(e=(e=e+Math.imul(f,at)|0)+Math.imul(m,ut)|0))<<13)|0;a=((h=h+Math.imul(m,at)|0)+(e>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(H,P),e=(e=Math.imul(H,F))+Math.imul(L,P)|0,h=Math.imul(L,F),n=n+Math.imul(z,U)|0,e=(e=e+Math.imul(z,$)|0)+Math.imul(N,U)|0,h=h+Math.imul(N,$)|0,n=n+Math.imul(R,K)|0,e=(e=e+Math.imul(R,V)|0)+Math.imul(Z,K)|0,h=h+Math.imul(Z,V)|0,n=n+Math.imul(k,J)|0,e=(e=e+Math.imul(k,Q)|0)+Math.imul(S,J)|0,h=h+Math.imul(S,Q)|0,n=n+Math.imul(x,Y)|0,e=(e=e+Math.imul(x,tt)|0)+Math.imul(A,Y)|0,h=h+Math.imul(A,tt)|0,n=n+Math.imul(y,rt)|0,e=(e=e+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,h=h+Math.imul(b,nt)|0,n=n+Math.imul(v,ht)|0,e=(e=e+Math.imul(v,ot)|0)+Math.imul(g,ht)|0,h=h+Math.imul(g,ot)|0,n=n+Math.imul(p,ut)|0,e=(e=e+Math.imul(p,at)|0)+Math.imul(c,ut)|0,h=h+Math.imul(c,at)|0;var At=(a+(n=n+Math.imul(f,ft)|0)|0)+((8191&(e=(e=e+Math.imul(f,mt)|0)+Math.imul(m,ft)|0))<<13)|0;a=((h=h+Math.imul(m,mt)|0)+(e>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(E,P),e=(e=Math.imul(E,F))+Math.imul(O,P)|0,h=Math.imul(O,F),n=n+Math.imul(H,U)|0,e=(e=e+Math.imul(H,$)|0)+Math.imul(L,U)|0,h=h+Math.imul(L,$)|0,n=n+Math.imul(z,K)|0,e=(e=e+Math.imul(z,V)|0)+Math.imul(N,K)|0,h=h+Math.imul(N,V)|0,n=n+Math.imul(R,J)|0,e=(e=e+Math.imul(R,Q)|0)+Math.imul(Z,J)|0,h=h+Math.imul(Z,Q)|0,n=n+Math.imul(k,Y)|0,e=(e=e+Math.imul(k,tt)|0)+Math.imul(S,Y)|0,h=h+Math.imul(S,tt)|0,n=n+Math.imul(x,rt)|0,e=(e=e+Math.imul(x,nt)|0)+Math.imul(A,rt)|0,h=h+Math.imul(A,nt)|0,n=n+Math.imul(y,ht)|0,e=(e=e+Math.imul(y,ot)|0)+Math.imul(b,ht)|0,h=h+Math.imul(b,ot)|0,n=n+Math.imul(v,ut)|0,e=(e=e+Math.imul(v,at)|0)+Math.imul(g,ut)|0,h=h+Math.imul(g,at)|0,n=n+Math.imul(p,ft)|0,e=(e=e+Math.imul(p,mt)|0)+Math.imul(c,ft)|0,h=h+Math.imul(c,mt)|0;var Bt=(a+(n=n+Math.imul(f,pt)|0)|0)+((8191&(e=(e=e+Math.imul(f,ct)|0)+Math.imul(m,pt)|0))<<13)|0;a=((h=h+Math.imul(m,ct)|0)+(e>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(E,U),e=(e=Math.imul(E,$))+Math.imul(O,U)|0,h=Math.imul(O,$),n=n+Math.imul(H,K)|0,e=(e=e+Math.imul(H,V)|0)+Math.imul(L,K)|0,h=h+Math.imul(L,V)|0,n=n+Math.imul(z,J)|0,e=(e=e+Math.imul(z,Q)|0)+Math.imul(N,J)|0,h=h+Math.imul(N,Q)|0,n=n+Math.imul(R,Y)|0,e=(e=e+Math.imul(R,tt)|0)+Math.imul(Z,Y)|0,h=h+Math.imul(Z,tt)|0,n=n+Math.imul(k,rt)|0,e=(e=e+Math.imul(k,nt)|0)+Math.imul(S,rt)|0,h=h+Math.imul(S,nt)|0,n=n+Math.imul(x,ht)|0,e=(e=e+Math.imul(x,ot)|0)+Math.imul(A,ht)|0,h=h+Math.imul(A,ot)|0,n=n+Math.imul(y,ut)|0,e=(e=e+Math.imul(y,at)|0)+Math.imul(b,ut)|0,h=h+Math.imul(b,at)|0,n=n+Math.imul(v,ft)|0,e=(e=e+Math.imul(v,mt)|0)+Math.imul(g,ft)|0,h=h+Math.imul(g,mt)|0;var kt=(a+(n=n+Math.imul(p,pt)|0)|0)+((8191&(e=(e=e+Math.imul(p,ct)|0)+Math.imul(c,pt)|0))<<13)|0;a=((h=h+Math.imul(c,ct)|0)+(e>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(E,K),e=(e=Math.imul(E,V))+Math.imul(O,K)|0,h=Math.imul(O,V),n=n+Math.imul(H,J)|0,e=(e=e+Math.imul(H,Q)|0)+Math.imul(L,J)|0,h=h+Math.imul(L,Q)|0,n=n+Math.imul(z,Y)|0,e=(e=e+Math.imul(z,tt)|0)+Math.imul(N,Y)|0,h=h+Math.imul(N,tt)|0,n=n+Math.imul(R,rt)|0,e=(e=e+Math.imul(R,nt)|0)+Math.imul(Z,rt)|0,h=h+Math.imul(Z,nt)|0,n=n+Math.imul(k,ht)|0,e=(e=e+Math.imul(k,ot)|0)+Math.imul(S,ht)|0,h=h+Math.imul(S,ot)|0,n=n+Math.imul(x,ut)|0,e=(e=e+Math.imul(x,at)|0)+Math.imul(A,ut)|0,h=h+Math.imul(A,at)|0,n=n+Math.imul(y,ft)|0,e=(e=e+Math.imul(y,mt)|0)+Math.imul(b,ft)|0,h=h+Math.imul(b,mt)|0;var St=(a+(n=n+Math.imul(v,pt)|0)|0)+((8191&(e=(e=e+Math.imul(v,ct)|0)+Math.imul(g,pt)|0))<<13)|0;a=((h=h+Math.imul(g,ct)|0)+(e>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(E,J),e=(e=Math.imul(E,Q))+Math.imul(O,J)|0,h=Math.imul(O,Q),n=n+Math.imul(H,Y)|0,e=(e=e+Math.imul(H,tt)|0)+Math.imul(L,Y)|0,h=h+Math.imul(L,tt)|0,n=n+Math.imul(z,rt)|0,e=(e=e+Math.imul(z,nt)|0)+Math.imul(N,rt)|0,h=h+Math.imul(N,nt)|0,n=n+Math.imul(R,ht)|0,e=(e=e+Math.imul(R,ot)|0)+Math.imul(Z,ht)|0,h=h+Math.imul(Z,ot)|0,n=n+Math.imul(k,ut)|0,e=(e=e+Math.imul(k,at)|0)+Math.imul(S,ut)|0,h=h+Math.imul(S,at)|0,n=n+Math.imul(x,ft)|0,e=(e=e+Math.imul(x,mt)|0)+Math.imul(A,ft)|0,h=h+Math.imul(A,mt)|0;var qt=(a+(n=n+Math.imul(y,pt)|0)|0)+((8191&(e=(e=e+Math.imul(y,ct)|0)+Math.imul(b,pt)|0))<<13)|0;a=((h=h+Math.imul(b,ct)|0)+(e>>>13)|0)+(qt>>>26)|0,qt&=67108863,n=Math.imul(E,Y),e=(e=Math.imul(E,tt))+Math.imul(O,Y)|0,h=Math.imul(O,tt),n=n+Math.imul(H,rt)|0,e=(e=e+Math.imul(H,nt)|0)+Math.imul(L,rt)|0,h=h+Math.imul(L,nt)|0,n=n+Math.imul(z,ht)|0,e=(e=e+Math.imul(z,ot)|0)+Math.imul(N,ht)|0,h=h+Math.imul(N,ot)|0,n=n+Math.imul(R,ut)|0,e=(e=e+Math.imul(R,at)|0)+Math.imul(Z,ut)|0,h=h+Math.imul(Z,at)|0,n=n+Math.imul(k,ft)|0,e=(e=e+Math.imul(k,mt)|0)+Math.imul(S,ft)|0,h=h+Math.imul(S,mt)|0;var Rt=(a+(n=n+Math.imul(x,pt)|0)|0)+((8191&(e=(e=e+Math.imul(x,ct)|0)+Math.imul(A,pt)|0))<<13)|0;a=((h=h+Math.imul(A,ct)|0)+(e>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(E,rt),e=(e=Math.imul(E,nt))+Math.imul(O,rt)|0,h=Math.imul(O,nt),n=n+Math.imul(H,ht)|0,e=(e=e+Math.imul(H,ot)|0)+Math.imul(L,ht)|0,h=h+Math.imul(L,ot)|0,n=n+Math.imul(z,ut)|0,e=(e=e+Math.imul(z,at)|0)+Math.imul(N,ut)|0,h=h+Math.imul(N,at)|0,n=n+Math.imul(R,ft)|0,e=(e=e+Math.imul(R,mt)|0)+Math.imul(Z,ft)|0,h=h+Math.imul(Z,mt)|0;var Zt=(a+(n=n+Math.imul(k,pt)|0)|0)+((8191&(e=(e=e+Math.imul(k,ct)|0)+Math.imul(S,pt)|0))<<13)|0;a=((h=h+Math.imul(S,ct)|0)+(e>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,n=Math.imul(E,ht),e=(e=Math.imul(E,ot))+Math.imul(O,ht)|0,h=Math.imul(O,ot),n=n+Math.imul(H,ut)|0,e=(e=e+Math.imul(H,at)|0)+Math.imul(L,ut)|0,h=h+Math.imul(L,at)|0,n=n+Math.imul(z,ft)|0,e=(e=e+Math.imul(z,mt)|0)+Math.imul(N,ft)|0,h=h+Math.imul(N,mt)|0;var jt=(a+(n=n+Math.imul(R,pt)|0)|0)+((8191&(e=(e=e+Math.imul(R,ct)|0)+Math.imul(Z,pt)|0))<<13)|0;a=((h=h+Math.imul(Z,ct)|0)+(e>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(E,ut),e=(e=Math.imul(E,at))+Math.imul(O,ut)|0,h=Math.imul(O,at),n=n+Math.imul(H,ft)|0,e=(e=e+Math.imul(H,mt)|0)+Math.imul(L,ft)|0,h=h+Math.imul(L,mt)|0;var zt=(a+(n=n+Math.imul(z,pt)|0)|0)+((8191&(e=(e=e+Math.imul(z,ct)|0)+Math.imul(N,pt)|0))<<13)|0;a=((h=h+Math.imul(N,ct)|0)+(e>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(E,ft),e=(e=Math.imul(E,mt))+Math.imul(O,ft)|0,h=Math.imul(O,mt);var Nt=(a+(n=n+Math.imul(H,pt)|0)|0)+((8191&(e=(e=e+Math.imul(H,ct)|0)+Math.imul(L,pt)|0))<<13)|0;a=((h=h+Math.imul(L,ct)|0)+(e>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var It=(a+(n=Math.imul(E,pt))|0)+((8191&(e=(e=Math.imul(E,ct))+Math.imul(O,pt)|0))<<13)|0;return a=((h=Math.imul(O,ct))+(e>>>13)|0)+(It>>>26)|0,It&=67108863,u[0]=Mt,u[1]=vt,u[2]=gt,u[3]=wt,u[4]=yt,u[5]=bt,u[6]=_t,u[7]=xt,u[8]=At,u[9]=Bt,u[10]=kt,u[11]=St,u[12]=qt,u[13]=Rt,u[14]=Zt,u[15]=jt,u[16]=zt,u[17]=Nt,u[18]=It,0!==a&&(u[19]=a,r.length++),r};function c(t,i,r){return(new M).mulp(t,i,r)}function M(t,i){this.x=t,this.y=i}Math.imul||(p=d),h.prototype.mulTo=function(t,i){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,i):n<63?d(this,t,i):n<1024?function(t,i,r){r.negative=i.negative^t.negative,r.length=t.length+i.length;for(var n=0,e=0,h=0;h<r.length-1;h++){var o=e;e=0;for(var s=67108863&n,u=Math.min(h,i.length-1),a=Math.max(0,h-t.length+1);a<=u;a++){var l=h-a,f=(0|t.words[l])*(0|i.words[a]),m=67108863&f;s=67108863&(m=m+s|0),e+=(o=(o=o+(f/67108864|0)|0)+(m>>>26)|0)>>>26,o&=67108863}r.words[h]=s,n=o,o=e}return 0!==n?r.words[h]=n:r.length--,r.strip()}(this,t,i):c(this,t,i),r},M.prototype.makeRBT=function(t){for(var i=new Array(t),r=h.prototype._countBits(t)-1,n=0;n<t;n++)i[n]=this.revBin(n,r,t);return i},M.prototype.revBin=function(t,i,r){if(0===t||t===r-1)return t;for(var n=0,e=0;e<i;e++)n|=(1&t)<<i-e-1,t>>=1;return n},M.prototype.permute=function(t,i,r,n,e,h){for(var o=0;o<h;o++)n[o]=i[t[o]],e[o]=r[t[o]]},M.prototype.transform=function(t,i,r,n,e,h){this.permute(h,t,i,r,n,e);for(var o=1;o<e;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),a=Math.sin(2*Math.PI/s),l=0;l<e;l+=s)for(var f=u,m=a,d=0;d<o;d++){var p=r[l+d],c=n[l+d],M=r[l+d+o],v=n[l+d+o],g=f*M-m*v;v=f*v+m*M,M=g,r[l+d]=p+M,n[l+d]=c+v,r[l+d+o]=p-M,n[l+d+o]=c-v,d!==s&&(g=u*f-a*m,m=u*m+a*f,f=g)}},M.prototype.guessLen13b=function(t,i){var r=1|Math.max(i,t),n=1&r,e=0;for(r=r/2|0;r;r>>>=1)e++;return 1<<e+1+n},M.prototype.conjugate=function(t,i,r){if(!(r<=1))for(var n=0;n<r/2;n++){var e=t[n];t[n]=t[r-n-1],t[r-n-1]=e,e=i[n],i[n]=-i[r-n-1],i[r-n-1]=-e}},M.prototype.normalize13b=function(t,i){for(var r=0,n=0;n<i/2;n++){var e=8192*Math.round(t[2*n+1]/i)+Math.round(t[2*n]/i)+r;t[n]=67108863&e,r=e<67108864?0:e/67108864|0}return t},M.prototype.convert13b=function(t,i,n,e){for(var h=0,o=0;o<i;o++)h+=0|t[o],n[2*o]=8191&h,h>>>=13,n[2*o+1]=8191&h,h>>>=13;for(o=2*i;o<e;++o)n[o]=0;r(0===h),r(0==(-8192&h))},M.prototype.stub=function(t){for(var i=new Array(t),r=0;r<t;r++)i[r]=0;return i},M.prototype.mulp=function(t,i,r){var n=2*this.guessLen13b(t.length,i.length),e=this.makeRBT(n),h=this.stub(n),o=new Array(n),s=new Array(n),u=new Array(n),a=new Array(n),l=new Array(n),f=new Array(n),m=r.words;m.length=n,this.convert13b(t.words,t.length,o,n),this.convert13b(i.words,i.length,a,n),this.transform(o,h,s,u,n,e),this.transform(a,h,l,f,n,e);for(var d=0;d<n;d++){var p=s[d]*l[d]-u[d]*f[d];u[d]=s[d]*f[d]+u[d]*l[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,m,h,n,e),this.conjugate(m,h,n),this.normalize13b(m,n),r.negative=t.negative^i.negative,r.length=t.length+i.length,r.strip()},h.prototype.mul=function(t){var i=new h(null);return i.words=new Array(this.length+t.length),this.mulTo(t,i)},h.prototype.mulf=function(t){var i=new h(null);return i.words=new Array(this.length+t.length),c(this,t,i)},h.prototype.imul=function(t){return this.clone().mulTo(t,this)},h.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var i=0,n=0;n<this.length;n++){var e=(0|this.words[n])*t,h=(67108863&e)+(67108863&i);i>>=26,i+=e/67108864|0,i+=h>>>26,this.words[n]=67108863&h}return 0!==i&&(this.words[n]=i,this.length++),this},h.prototype.muln=function(t){return this.clone().imuln(t)},h.prototype.sqr=function(){return this.mul(this)},h.prototype.isqr=function(){return this.imul(this.clone())},h.prototype.pow=function(t){var i=function(t){for(var i=new Array(t.bitLength()),r=0;r<i.length;r++){var n=r/26|0,e=r%26;i[r]=(t.words[n]&1<<e)>>>e}return i}(t);if(0===i.length)return new h(1);for(var r=this,n=0;n<i.length&&0===i[n];n++,r=r.sqr());if(++n<i.length)for(var e=r.sqr();n<i.length;n++,e=e.sqr())0!==i[n]&&(r=r.mul(e));return r},h.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var i,n=t%26,e=(t-n)/26,h=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(i=0;i<this.length;i++){var s=this.words[i]&h,u=(0|this.words[i])-s<<n;this.words[i]=u|o,o=s>>>26-n}o&&(this.words[i]=o,this.length++)}if(0!==e){for(i=this.length-1;i>=0;i--)this.words[i+e]=this.words[i];for(i=0;i<e;i++)this.words[i]=0;this.length+=e}return this.strip()},h.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},h.prototype.iushrn=function(t,i,n){var e;r("number"==typeof t&&t>=0),e=i?(i-i%26)/26:0;var h=t%26,o=Math.min((t-h)/26,this.length),s=67108863^67108863>>>h<<h,u=n;if(e-=o,e=Math.max(0,e),u){for(var a=0;a<o;a++)u.words[a]=this.words[a];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,a=0;a<this.length;a++)this.words[a]=this.words[a+o];else this.words[0]=0,this.length=1;var l=0;for(a=this.length-1;a>=0&&(0!==l||a>=e);a--){var f=0|this.words[a];this.words[a]=l<<26-h|f>>>h,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},h.prototype.ishrn=function(t,i,n){return r(0===this.negative),this.iushrn(t,i,n)},h.prototype.shln=function(t){return this.clone().ishln(t)},h.prototype.ushln=function(t){return this.clone().iushln(t)},h.prototype.shrn=function(t){return this.clone().ishrn(t)},h.prototype.ushrn=function(t){return this.clone().iushrn(t)},h.prototype.testn=function(t){r("number"==typeof t&&t>=0);var i=t%26,n=(t-i)/26,e=1<<i;return!(this.length<=n||!(this.words[n]&e))},h.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var i=t%26,n=(t-i)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==i&&n++,this.length=Math.min(n,this.length),0!==i){var e=67108863^67108863>>>i<<i;this.words[this.length-1]&=e}return this.strip()},h.prototype.maskn=function(t){return this.clone().imaskn(t)},h.prototype.iaddn=function(t){return r("number"==typeof t),r(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)},h.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},h.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},h.prototype.addn=function(t){return this.clone().iaddn(t)},h.prototype.subn=function(t){return this.clone().isubn(t)},h.prototype.iabs=function(){return this.negative=0,this},h.prototype.abs=function(){return this.clone().iabs()},h.prototype._ishlnsubmul=function(t,i,n){var e,h,o=t.length+n;this._expand(o);var s=0;for(e=0;e<t.length;e++){h=(0|this.words[e+n])+s;var u=(0|t.words[e])*i;s=((h-=67108863&u)>>26)-(u/67108864|0),this.words[e+n]=67108863&h}for(;e<this.length-n;e++)s=(h=(0|this.words[e+n])+s)>>26,this.words[e+n]=67108863&h;if(0===s)return this.strip();for(r(-1===s),s=0,e=0;e<this.length;e++)s=(h=-(0|this.words[e])+s)>>26,this.words[e]=67108863&h;return this.negative=1,this.strip()},h.prototype._wordDiv=function(t,i){var r=(this.length,t.length),n=this.clone(),e=t,o=0|e.words[e.length-1];0!=(r=26-this._countBits(o))&&(e=e.ushln(r),n.iushln(r),o=0|e.words[e.length-1]);var s,u=n.length-e.length;if("mod"!==i){(s=new h(null)).length=u+1,s.words=new Array(s.length);for(var a=0;a<s.length;a++)s.words[a]=0}var l=n.clone()._ishlnsubmul(e,1,u);0===l.negative&&(n=l,s&&(s.words[u]=1));for(var f=u-1;f>=0;f--){var m=67108864*(0|n.words[e.length+f])+(0|n.words[e.length+f-1]);for(m=Math.min(m/o|0,67108863),n._ishlnsubmul(e,m,f);0!==n.negative;)m--,n.negative=0,n._ishlnsubmul(e,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=m)}return s&&s.strip(),n.strip(),"div"!==i&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},h.prototype.divmod=function(t,i,n){return r(!t.isZero()),this.isZero()?{div:new h(0),mod:new h(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,i),"mod"!==i&&(e=s.div.neg()),"div"!==i&&(o=s.mod.neg(),n&&0!==o.negative&&o.iadd(t)),{div:e,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),i),"mod"!==i&&(e=s.div.neg()),{div:e,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),i),"div"!==i&&(o=s.mod.neg(),n&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new h(0),mod:this}:1===t.length?"div"===i?{div:this.divn(t.words[0]),mod:null}:"mod"===i?{div:null,mod:new h(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new h(this.modn(t.words[0]))}:this._wordDiv(t,i);var e,o,s},h.prototype.div=function(t){return this.divmod(t,"div",!1).div},h.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},h.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},h.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,n=t.ushrn(1),e=t.andln(1),h=r.cmp(n);return h<0||1===e&&0===h?i.div:0!==i.div.negative?i.div.isubn(1):i.div.iaddn(1)},h.prototype.modn=function(t){r(t<=67108863);for(var i=(1<<26)%t,n=0,e=this.length-1;e>=0;e--)n=(i*n+(0|this.words[e]))%t;return n},h.prototype.idivn=function(t){r(t<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var e=(0|this.words[n])+67108864*i;this.words[n]=e/t|0,i=e%t}return this.strip()},h.prototype.divn=function(t){return this.clone().idivn(t)},h.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var i=this,n=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var e=new h(1),o=new h(0),s=new h(0),u=new h(1),a=0;i.isEven()&&n.isEven();)i.iushrn(1),n.iushrn(1),++a;for(var l=n.clone(),f=i.clone();!i.isZero();){for(var m=0,d=1;0==(i.words[0]&d)&&m<26;++m,d<<=1);if(m>0)for(i.iushrn(m);m-- >0;)(e.isOdd()||o.isOdd())&&(e.iadd(l),o.isub(f)),e.iushrn(1),o.iushrn(1);for(var p=0,c=1;0==(n.words[0]&c)&&p<26;++p,c<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);i.cmp(n)>=0?(i.isub(n),e.isub(s),o.isub(u)):(n.isub(i),s.isub(e),u.isub(o))}return{a:s,b:u,gcd:n.iushln(a)}},h.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var i=this,n=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var e,o=new h(1),s=new h(0),u=n.clone();i.cmpn(1)>0&&n.cmpn(1)>0;){for(var a=0,l=1;0==(i.words[0]&l)&&a<26;++a,l<<=1);if(a>0)for(i.iushrn(a);a-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);i.cmp(n)>=0?(i.isub(n),o.isub(s)):(n.isub(i),s.isub(o))}return(e=0===i.cmpn(1)?o:s).cmpn(0)<0&&e.iadd(t),e},h.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 n=0;i.isEven()&&r.isEven();n++)i.iushrn(1),r.iushrn(1);for(;;){for(;i.isEven();)i.iushrn(1);for(;r.isEven();)r.iushrn(1);var e=i.cmp(r);if(e<0){var h=i;i=r,r=h}else if(0===e||0===r.cmpn(1))break;i.isub(r)}return r.iushln(n)},h.prototype.invm=function(t){return this.egcd(t).a.umod(t)},h.prototype.isEven=function(){return 0==(1&this.words[0])},h.prototype.isOdd=function(){return 1==(1&this.words[0])},h.prototype.andln=function(t){return this.words[0]&t},h.prototype.bincn=function(t){r("number"==typeof t);var i=t%26,n=(t-i)/26,e=1<<i;if(this.length<=n)return this._expand(n+1),this.words[n]|=e,this;for(var h=e,o=n;0!==h&&o<this.length;o++){var s=0|this.words[o];h=(s+=h)>>>26,s&=67108863,this.words[o]=s}return 0!==h&&(this.words[o]=h,this.length++),this},h.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},h.prototype.cmpn=function(t){var i,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)i=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var e=0|this.words[0];i=e===t?0:e<t?-1:1}return 0!==this.negative?0|-i:i},h.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},h.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 n=0|this.words[r],e=0|t.words[r];if(n!==e){n<e?i=-1:n>e&&(i=1);break}}return i},h.prototype.gtn=function(t){return 1===this.cmpn(t)},h.prototype.gt=function(t){return 1===this.cmp(t)},h.prototype.gten=function(t){return this.cmpn(t)>=0},h.prototype.gte=function(t){return this.cmp(t)>=0},h.prototype.ltn=function(t){return-1===this.cmpn(t)},h.prototype.lt=function(t){return-1===this.cmp(t)},h.prototype.lten=function(t){return this.cmpn(t)<=0},h.prototype.lte=function(t){return this.cmp(t)<=0},h.prototype.eqn=function(t){return 0===this.cmpn(t)},h.prototype.eq=function(t){return 0===this.cmp(t)},h.red=function(t){return new x(t)},h.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},h.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},h.prototype._forceRed=function(t){return this.red=t,this},h.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},h.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},h.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},h.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},h.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},h.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},h.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},h.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},h.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},h.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},h.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},h.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},h.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},h.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function g(t,i){this.name=t,this.p=new h(i,16),this.n=this.p.bitLength(),this.k=new h(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"==typeof t){var i=h._prime(t);this.m=i.p,this.prime=i}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new h(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)}g.prototype._tmp=function(){var t=new h(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.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 n=i<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(t,i){t.iushrn(this.n,0,i)},g.prototype.imulK=function(t){return t.imul(this.k)},e(w,g),w.prototype.split=function(t,i){for(var r=4194303,n=Math.min(t.length,9),e=0;e<n;e++)i.words[e]=t.words[e];if(i.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var h=t.words[9];for(i.words[i.length++]=h&r,e=10;e<t.length;e++){var o=0|t.words[e];t.words[e-10]=(o&r)<<4|h>>>22,h=o}h>>>=22,t.words[e-10]=h,0===h&&t.length>10?t.length-=10:t.length-=9},w.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 n=0|t.words[r];i+=977*n,t.words[r]=67108863&i,i=64*n+(i/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},e(y,g),e(b,g),e(_,g),_.prototype.imulK=function(t){for(var i=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+i,e=67108863&n;n>>>=26,t.words[r]=e,i=n}return 0!==i&&(t.words[t.length++]=i),t},h._prime=function(t){if(v[t])return v[t];var i;if("k256"===t)i=new w;else if("p224"===t)i=new y;else if("p192"===t)i=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);i=new _}return v[t]=i,i},x.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,i){r(0==(t.negative|i.negative),"red works only with positives"),r(t.red&&t.red===i.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.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)},x.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},x.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)},x.prototype.isub=function(t,i){this._verify2(t,i);var r=t.isub(i);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,i){return this._verify1(t),this.imod(t.ushln(i))},x.prototype.imul=function(t,i){return this._verify2(t,i),this.imod(t.imul(i))},x.prototype.mul=function(t,i){return this._verify2(t,i),this.imod(t.mul(i))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var i=this.m.andln(3);if(r(i%2==1),3===i){var n=this.m.add(new h(1)).iushrn(2);return this.pow(t,n)}for(var e=this.m.subn(1),o=0;!e.isZero()&&0===e.andln(1);)o++,e.iushrn(1);r(!e.isZero());var s=new h(1).toRed(this),u=s.redNeg(),a=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new h(2*l*l).toRed(this);0!==this.pow(l,a).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,e),m=this.pow(t,e.addn(1).iushrn(1)),d=this.pow(t,e),p=o;0!==d.cmp(s);){for(var c=d,M=0;0!==c.cmp(s);M++)c=c.redSqr();r(M<p);var v=this.pow(f,new h(1).iushln(p-M-1));m=m.redMul(v),f=v.redSqr(),d=d.redMul(f),p=M}return m},x.prototype.invm=function(t){var i=t._invmp(this.m);return 0!==i.negative?(i.negative=0,this.imod(i).redNeg()):this.imod(i)},x.prototype.pow=function(t,i){if(i.isZero())return new h(1).toRed(this);if(0===i.cmpn(1))return t.clone();var r=new Array(16);r[0]=new h(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var e=r[0],o=0,s=0,u=i.bitLength()%26;for(0===u&&(u=26),n=i.length-1;n>=0;n--){for(var a=i.words[n],l=u-1;l>=0;l--){var f=a>>l&1;e!==r[0]&&(e=this.sqr(e)),0!==f||0!==o?(o<<=1,o|=f,(4==++s||0===n&&0===l)&&(e=this.mul(e,r[o]),s=0,o=0)):s=0}u=26}return e},x.prototype.convertTo=function(t){var i=t.umod(this.m);return i===t?i.clone():i},x.prototype.convertFrom=function(t){var i=t.clone();return i.red=null,i},h.mont=function(t){return new A(t)},e(A,x),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var i=this.imod(t.mul(this.rinv));return i.red=null,i},A.prototype.imul=function(t,i){if(t.isZero()||i.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(i),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=r.isub(n).iushrn(this.shift),h=e;return e.cmp(this.m)>=0?h=e.isub(this.m):e.cmpn(0)<0&&(h=e.iadd(this.m)),h._forceRed(this)},A.prototype.mul=function(t,i){if(t.isZero()||i.isZero())return new h(0)._forceRed(this);var r=t.mul(i),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=r.isub(n).iushrn(this.shift),o=e;return e.cmp(this.m)>=0?o=e.isub(this.m):e.cmpn(0)<0&&(o=e.iadd(this.m)),o._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(a,i.commonjsGlobal),exports.bn=a,exports.requireCore=h,exports.sha256=u;
1
+ "use strict";var t,i=require("./index-4b51d39a.cjs"),r=require("./_commonjs-dynamic-modules-f09a98c7.cjs"),n=require("./__node-resolve_empty-84114e7b.cjs"),e={exports:{}};function h(){return t||(t=1,h=e,i.commonjsGlobal,h.exports=(o=o||function(t,e){var h;if("undefined"!=typeof window&&window.crypto&&(h=window.crypto),"undefined"!=typeof self&&self.crypto&&(h=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(h=globalThis.crypto),!h&&"undefined"!=typeof window&&window.msCrypto&&(h=window.msCrypto),!h&&void 0!==i.commonjsGlobal&&i.commonjsGlobal.crypto&&(h=i.commonjsGlobal.crypto),!h&&"function"==typeof r.commonjsRequire)try{h=n.require$$0}catch(t){}var o=function(){if(h){if("function"==typeof h.getRandomValues)try{return h.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof h.randomBytes)try{return h.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function t(){}return function(i){var r;return t.prototype=i,r=new t,t.prototype=null,r}}(),u={},a=u.lib={},l=a.Base={extend:function(t){var i=s(this);return t&&i.mixIn(t),i.hasOwnProperty("init")&&this.init!==i.init||(i.init=function(){i.$super.init.apply(this,arguments)}),i.init.prototype=i,i.$super=this,i},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var i in t)t.hasOwnProperty(i)&&(this[i]=t[i]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},f=a.WordArray=l.extend({init:function(t,i){t=this.words=t||[],this.sigBytes=i!=e?i:4*t.length},toString:function(t){return(t||d).stringify(this)},concat:function(t){var i=this.words,r=t.words,n=this.sigBytes,e=t.sigBytes;if(this.clamp(),n%4)for(var h=0;h<e;h++){var o=r[h>>>2]>>>24-h%4*8&255;i[n+h>>>2]|=o<<24-(n+h)%4*8}else for(var s=0;s<e;s+=4)i[n+s>>>2]=r[s>>>2];return this.sigBytes+=e,this},clamp:function(){var i=this.words,r=this.sigBytes;i[r>>>2]&=4294967295<<32-r%4*8,i.length=t.ceil(r/4)},clone:function(){var t=l.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var i=[],r=0;r<t;r+=4)i.push(o());return new f.init(i,t)}}),m=u.enc={},d=m.Hex={stringify:function(t){for(var i=t.words,r=t.sigBytes,n=[],e=0;e<r;e++){var h=i[e>>>2]>>>24-e%4*8&255;n.push((h>>>4).toString(16)),n.push((15&h).toString(16))}return n.join("")},parse:function(t){for(var i=t.length,r=[],n=0;n<i;n+=2)r[n>>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new f.init(r,i/2)}},p=m.Latin1={stringify:function(t){for(var i=t.words,r=t.sigBytes,n=[],e=0;e<r;e++){var h=i[e>>>2]>>>24-e%4*8&255;n.push(String.fromCharCode(h))}return n.join("")},parse:function(t){for(var i=t.length,r=[],n=0;n<i;n++)r[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new f.init(r,i)}},c=m.Utf8={stringify:function(t){try{return decodeURIComponent(escape(p.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return p.parse(unescape(encodeURIComponent(t)))}},M=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(i){var r,n=this._data,e=n.words,h=n.sigBytes,o=this.blockSize,s=h/(4*o),u=(s=i?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*o,a=t.min(4*u,h);if(u){for(var l=0;l<u;l+=o)this._doProcessBlock(e,l);r=e.splice(0,u),n.sigBytes-=a}return new f.init(r,a)},clone:function(){var t=l.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0});a.Hasher=M.extend({cfg:l.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){M.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(i,r){return new t.init(r).finalize(i)}},_createHmacHelper:function(t){return function(i,r){return new v.HMAC.init(t,r).finalize(i)}}});var v=u.algo={};return u}(Math),o)),e.exports;var h,o}var o,s,u={exports:{}};o=u,i.commonjsGlobal,o.exports=(s=h(),function(t){var i=s,r=i.lib,n=r.WordArray,e=r.Hasher,h=i.algo,o=[],u=[];!function(){function i(i){for(var r=t.sqrt(i),n=2;n<=r;n++)if(!(i%n))return!1;return!0}function r(t){return 4294967296*(t-(0|t))|0}for(var n=2,e=0;e<64;)i(n)&&(e<8&&(o[e]=r(t.pow(n,.5))),u[e]=r(t.pow(n,1/3)),e++),n++}();var a=[],l=h.SHA256=e.extend({_doReset:function(){this._hash=new n.init(o.slice(0))},_doProcessBlock:function(t,i){for(var r=this._hash.words,n=r[0],e=r[1],h=r[2],o=r[3],s=r[4],l=r[5],f=r[6],m=r[7],d=0;d<64;d++){if(d<16)a[d]=0|t[i+d];else{var p=a[d-15],c=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,M=a[d-2],v=(M<<15|M>>>17)^(M<<13|M>>>19)^M>>>10;a[d]=c+a[d-7]+v+a[d-16]}var g=n&e^n&h^e&h,w=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),y=m+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&f)+u[d]+a[d];m=f,f=l,l=s,s=o+y|0,o=h,h=e,e=n,n=y+(w+g)|0}r[0]=r[0]+n|0,r[1]=r[1]+e|0,r[2]=r[2]+h|0,r[3]=r[3]+o|0,r[4]=r[4]+s|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+m|0},_doFinalize:function(){var i=this._data,r=i.words,n=8*this._nDataBytes,e=8*i.sigBytes;return r[e>>>5]|=128<<24-e%32,r[14+(e+64>>>9<<4)]=t.floor(n/4294967296),r[15+(e+64>>>9<<4)]=n,i.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t}});i.SHA256=e._createHelper(l),i.HmacSHA256=e._createHmacHelper(l)}(Math),s.SHA256);var a={exports:{}};!function(t,i){function r(t,i){if(!t)throw new Error(i||"Assertion failed")}function e(t,i){t.super_=i;var r=function(){};r.prototype=i.prototype,t.prototype=new r,t.prototype.constructor=t}function h(t,i,r){if(h.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=h:i.BN=h,h.BN=h,h.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n.require$$0.Buffer}catch(t){}function s(t,i){var r=t.charCodeAt(i);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,i,r){var n=s(t,r);return r-1>=i&&(n|=s(t,r-1)<<4),n}function a(t,i,r,n){for(var e=0,h=Math.min(t.length,r),o=i;o<h;o++){var s=t.charCodeAt(o)-48;e*=n,e+=s>=49?s-49+10:s>=17?s-17+10:s}return e}h.isBN=function(t){return t instanceof h||null!==t&&"object"==typeof t&&t.constructor.wordSize===h.wordSize&&Array.isArray(t.words)},h.max=function(t,i){return t.cmp(i)>0?t:i},h.min=function(t,i){return t.cmp(i)<0?t:i},h.prototype._init=function(t,i,n){if("number"==typeof t)return this._initNumber(t,i,n);if("object"==typeof t)return this._initArray(t,i,n);"hex"===i&&(i=16),r(i===(0|i)&&i>=2&&i<=36);var e=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(e++,this.negative=1),e<t.length&&(16===i?this._parseHex(t,e,n):(this._parseBase(t,i,e),"le"===n&&this._initArray(this.toArray(),i,n)))},h.prototype._initNumber=function(t,i,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),i,n)},h.prototype._initArray=function(t,i,n){if(r("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 e=0;e<this.length;e++)this.words[e]=0;var h,o,s=0;if("be"===n)for(e=t.length-1,h=0;e>=0;e-=3)o=t[e]|t[e-1]<<8|t[e-2]<<16,this.words[h]|=o<<s&67108863,this.words[h+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,h++);else if("le"===n)for(e=0,h=0;e<t.length;e+=3)o=t[e]|t[e+1]<<8|t[e+2]<<16,this.words[h]|=o<<s&67108863,this.words[h+1]=o>>>26-s&67108863,(s+=24)>=26&&(s-=26,h++);return this.strip()},h.prototype._parseHex=function(t,i,r){this.length=Math.ceil((t.length-i)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var e,h=0,o=0;if("be"===r)for(n=t.length-1;n>=i;n-=2)e=u(t,i,n)<<h,this.words[o]|=67108863&e,h>=18?(h-=18,o+=1,this.words[o]|=e>>>26):h+=8;else for(n=(t.length-i)%2==0?i+1:i;n<t.length;n+=2)e=u(t,i,n)<<h,this.words[o]|=67108863&e,h>=18?(h-=18,o+=1,this.words[o]|=e>>>26):h+=8;this.strip()},h.prototype._parseBase=function(t,i,r){this.words=[0],this.length=1;for(var n=0,e=1;e<=67108863;e*=i)n++;n--,e=e/i|0;for(var h=t.length-r,o=h%n,s=Math.min(h,h-o)+r,u=0,l=r;l<s;l+=n)u=a(t,l,l+n,i),this.imuln(e),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==o){var f=1;for(u=a(t,l,t.length,i),l=0;l<o;l++)f*=i;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},h.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},h.prototype.clone=function(){var t=new h(null);return this.copy(t),t},h.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},h.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},h.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},h.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[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],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,i,r){r.negative=i.negative^t.negative;var n=t.length+i.length|0;r.length=n,n=n-1|0;var e=0|t.words[0],h=0|i.words[0],o=e*h,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var a=1;a<n;a++){for(var l=u>>>26,f=67108863&u,m=Math.min(a,i.length-1),d=Math.max(0,a-t.length+1);d<=m;d++){var p=a-d|0;l+=(o=(e=0|t.words[p])*(h=0|i.words[d])+f)/67108864|0,f=67108863&o}r.words[a]=0|f,u=0|l}return 0!==u?r.words[a]=0|u:r.length--,r.strip()}h.prototype.toString=function(t,i){var n;if(i=0|i||1,16===(t=t||10)||"hex"===t){n="";for(var e=0,h=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<e|h)).toString(16);n=0!=(h=s>>>24-e&16777215)||o!==this.length-1?l[6-u.length]+u+n:u+n,(e+=2)>=26&&(e-=26,o--)}for(0!==h&&(n=h.toString(16)+n);n.length%i!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var a=f[t],d=m[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var c=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?c+n:l[a-c.length]+c+n}for(this.isZero()&&(n="0"+n);n.length%i!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},h.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},h.prototype.toJSON=function(){return this.toString(16)},h.prototype.toBuffer=function(t,i){return r(void 0!==o),this.toArrayLike(o,t,i)},h.prototype.toArray=function(t,i){return this.toArrayLike(Array,t,i)},h.prototype.toArrayLike=function(t,i,n){var e=this.byteLength(),h=n||Math.max(1,e);r(e<=h,"byte array longer than desired length"),r(h>0,"Requested array length <= 0"),this.strip();var o,s,u="le"===i,a=new t(h),l=this.clone();if(u){for(s=0;!l.isZero();s++)o=l.andln(255),l.iushrn(8),a[s]=o;for(;s<h;s++)a[s]=0}else{for(s=0;s<h-e;s++)a[s]=0;for(s=0;!l.isZero();s++)o=l.andln(255),l.iushrn(8),a[h-s-1]=o}return a},Math.clz32?h.prototype._countBits=function(t){return 32-Math.clz32(t)}:h.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},h.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},h.prototype.bitLength=function(){var t=this.words[this.length-1],i=this._countBits(t);return 26*(this.length-1)+i},h.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},h.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},h.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},h.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},h.prototype.isNeg=function(){return 0!==this.negative},h.prototype.neg=function(){return this.clone().ineg()},h.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},h.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()},h.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},h.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},h.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},h.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()},h.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},h.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},h.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},h.prototype.iuxor=function(t){var i,r;this.length>t.length?(i=this,r=t):(i=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=i.words[n]^r.words[n];if(this!==i)for(;n<i.length;n++)this.words[n]=i.words[n];return this.length=i.length,this.strip()},h.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},h.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},h.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},h.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var i=0|Math.ceil(t/26),n=t%26;this._expand(i),n>0&&i--;for(var e=0;e<i;e++)this.words[e]=67108863&~this.words[e];return n>0&&(this.words[e]=~this.words[e]&67108863>>26-n),this.strip()},h.prototype.notn=function(t){return this.clone().inotn(t)},h.prototype.setn=function(t,i){r("number"==typeof t&&t>=0);var n=t/26|0,e=t%26;return this._expand(n+1),this.words[n]=i?this.words[n]|1<<e:this.words[n]&~(1<<e),this.strip()},h.prototype.iadd=function(t){var i,r,n;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,n=t):(r=t,n=this);for(var e=0,h=0;h<n.length;h++)i=(0|r.words[h])+(0|n.words[h])+e,this.words[h]=67108863&i,e=i>>>26;for(;0!==e&&h<r.length;h++)i=(0|r.words[h])+e,this.words[h]=67108863&i,e=i>>>26;if(this.length=r.length,0!==e)this.words[this.length]=e,this.length++;else if(r!==this)for(;h<r.length;h++)this.words[h]=r.words[h];return this},h.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)},h.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,n,e=this.cmp(t);if(0===e)return this.negative=0,this.length=1,this.words[0]=0,this;e>0?(r=this,n=t):(r=t,n=this);for(var h=0,o=0;o<n.length;o++)h=(i=(0|r.words[o])-(0|n.words[o])+h)>>26,this.words[o]=67108863&i;for(;0!==h&&o<r.length;o++)h=(i=(0|r.words[o])+h)>>26,this.words[o]=67108863&i;if(0===h&&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()},h.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,i,r){var n,e,h,o=t.words,s=i.words,u=r.words,a=0,l=0|o[0],f=8191&l,m=l>>>13,d=0|o[1],p=8191&d,c=d>>>13,M=0|o[2],v=8191&M,g=M>>>13,w=0|o[3],y=8191&w,b=w>>>13,_=0|o[4],x=8191&_,A=_>>>13,B=0|o[5],k=8191&B,S=B>>>13,q=0|o[6],R=8191&q,Z=q>>>13,j=0|o[7],z=8191&j,N=j>>>13,I=0|o[8],H=8191&I,L=I>>>13,T=0|o[9],E=8191&T,O=T>>>13,C=0|s[0],P=8191&C,F=C>>>13,G=0|s[1],U=8191&G,$=G>>>13,D=0|s[2],K=8191&D,V=D>>>13,W=0|s[3],J=8191&W,Q=W>>>13,X=0|s[4],Y=8191&X,tt=X>>>13,it=0|s[5],rt=8191&it,nt=it>>>13,et=0|s[6],ht=8191&et,ot=et>>>13,st=0|s[7],ut=8191&st,at=st>>>13,lt=0|s[8],ft=8191&lt,mt=lt>>>13,dt=0|s[9],pt=8191&dt,ct=dt>>>13;r.negative=t.negative^i.negative,r.length=19;var Mt=(a+(n=Math.imul(f,P))|0)+((8191&(e=(e=Math.imul(f,F))+Math.imul(m,P)|0))<<13)|0;a=((h=Math.imul(m,F))+(e>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(p,P),e=(e=Math.imul(p,F))+Math.imul(c,P)|0,h=Math.imul(c,F);var vt=(a+(n=n+Math.imul(f,U)|0)|0)+((8191&(e=(e=e+Math.imul(f,$)|0)+Math.imul(m,U)|0))<<13)|0;a=((h=h+Math.imul(m,$)|0)+(e>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,P),e=(e=Math.imul(v,F))+Math.imul(g,P)|0,h=Math.imul(g,F),n=n+Math.imul(p,U)|0,e=(e=e+Math.imul(p,$)|0)+Math.imul(c,U)|0,h=h+Math.imul(c,$)|0;var gt=(a+(n=n+Math.imul(f,K)|0)|0)+((8191&(e=(e=e+Math.imul(f,V)|0)+Math.imul(m,K)|0))<<13)|0;a=((h=h+Math.imul(m,V)|0)+(e>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(y,P),e=(e=Math.imul(y,F))+Math.imul(b,P)|0,h=Math.imul(b,F),n=n+Math.imul(v,U)|0,e=(e=e+Math.imul(v,$)|0)+Math.imul(g,U)|0,h=h+Math.imul(g,$)|0,n=n+Math.imul(p,K)|0,e=(e=e+Math.imul(p,V)|0)+Math.imul(c,K)|0,h=h+Math.imul(c,V)|0;var wt=(a+(n=n+Math.imul(f,J)|0)|0)+((8191&(e=(e=e+Math.imul(f,Q)|0)+Math.imul(m,J)|0))<<13)|0;a=((h=h+Math.imul(m,Q)|0)+(e>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,P),e=(e=Math.imul(x,F))+Math.imul(A,P)|0,h=Math.imul(A,F),n=n+Math.imul(y,U)|0,e=(e=e+Math.imul(y,$)|0)+Math.imul(b,U)|0,h=h+Math.imul(b,$)|0,n=n+Math.imul(v,K)|0,e=(e=e+Math.imul(v,V)|0)+Math.imul(g,K)|0,h=h+Math.imul(g,V)|0,n=n+Math.imul(p,J)|0,e=(e=e+Math.imul(p,Q)|0)+Math.imul(c,J)|0,h=h+Math.imul(c,Q)|0;var yt=(a+(n=n+Math.imul(f,Y)|0)|0)+((8191&(e=(e=e+Math.imul(f,tt)|0)+Math.imul(m,Y)|0))<<13)|0;a=((h=h+Math.imul(m,tt)|0)+(e>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(k,P),e=(e=Math.imul(k,F))+Math.imul(S,P)|0,h=Math.imul(S,F),n=n+Math.imul(x,U)|0,e=(e=e+Math.imul(x,$)|0)+Math.imul(A,U)|0,h=h+Math.imul(A,$)|0,n=n+Math.imul(y,K)|0,e=(e=e+Math.imul(y,V)|0)+Math.imul(b,K)|0,h=h+Math.imul(b,V)|0,n=n+Math.imul(v,J)|0,e=(e=e+Math.imul(v,Q)|0)+Math.imul(g,J)|0,h=h+Math.imul(g,Q)|0,n=n+Math.imul(p,Y)|0,e=(e=e+Math.imul(p,tt)|0)+Math.imul(c,Y)|0,h=h+Math.imul(c,tt)|0;var bt=(a+(n=n+Math.imul(f,rt)|0)|0)+((8191&(e=(e=e+Math.imul(f,nt)|0)+Math.imul(m,rt)|0))<<13)|0;a=((h=h+Math.imul(m,nt)|0)+(e>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(R,P),e=(e=Math.imul(R,F))+Math.imul(Z,P)|0,h=Math.imul(Z,F),n=n+Math.imul(k,U)|0,e=(e=e+Math.imul(k,$)|0)+Math.imul(S,U)|0,h=h+Math.imul(S,$)|0,n=n+Math.imul(x,K)|0,e=(e=e+Math.imul(x,V)|0)+Math.imul(A,K)|0,h=h+Math.imul(A,V)|0,n=n+Math.imul(y,J)|0,e=(e=e+Math.imul(y,Q)|0)+Math.imul(b,J)|0,h=h+Math.imul(b,Q)|0,n=n+Math.imul(v,Y)|0,e=(e=e+Math.imul(v,tt)|0)+Math.imul(g,Y)|0,h=h+Math.imul(g,tt)|0,n=n+Math.imul(p,rt)|0,e=(e=e+Math.imul(p,nt)|0)+Math.imul(c,rt)|0,h=h+Math.imul(c,nt)|0;var _t=(a+(n=n+Math.imul(f,ht)|0)|0)+((8191&(e=(e=e+Math.imul(f,ot)|0)+Math.imul(m,ht)|0))<<13)|0;a=((h=h+Math.imul(m,ot)|0)+(e>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(z,P),e=(e=Math.imul(z,F))+Math.imul(N,P)|0,h=Math.imul(N,F),n=n+Math.imul(R,U)|0,e=(e=e+Math.imul(R,$)|0)+Math.imul(Z,U)|0,h=h+Math.imul(Z,$)|0,n=n+Math.imul(k,K)|0,e=(e=e+Math.imul(k,V)|0)+Math.imul(S,K)|0,h=h+Math.imul(S,V)|0,n=n+Math.imul(x,J)|0,e=(e=e+Math.imul(x,Q)|0)+Math.imul(A,J)|0,h=h+Math.imul(A,Q)|0,n=n+Math.imul(y,Y)|0,e=(e=e+Math.imul(y,tt)|0)+Math.imul(b,Y)|0,h=h+Math.imul(b,tt)|0,n=n+Math.imul(v,rt)|0,e=(e=e+Math.imul(v,nt)|0)+Math.imul(g,rt)|0,h=h+Math.imul(g,nt)|0,n=n+Math.imul(p,ht)|0,e=(e=e+Math.imul(p,ot)|0)+Math.imul(c,ht)|0,h=h+Math.imul(c,ot)|0;var xt=(a+(n=n+Math.imul(f,ut)|0)|0)+((8191&(e=(e=e+Math.imul(f,at)|0)+Math.imul(m,ut)|0))<<13)|0;a=((h=h+Math.imul(m,at)|0)+(e>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(H,P),e=(e=Math.imul(H,F))+Math.imul(L,P)|0,h=Math.imul(L,F),n=n+Math.imul(z,U)|0,e=(e=e+Math.imul(z,$)|0)+Math.imul(N,U)|0,h=h+Math.imul(N,$)|0,n=n+Math.imul(R,K)|0,e=(e=e+Math.imul(R,V)|0)+Math.imul(Z,K)|0,h=h+Math.imul(Z,V)|0,n=n+Math.imul(k,J)|0,e=(e=e+Math.imul(k,Q)|0)+Math.imul(S,J)|0,h=h+Math.imul(S,Q)|0,n=n+Math.imul(x,Y)|0,e=(e=e+Math.imul(x,tt)|0)+Math.imul(A,Y)|0,h=h+Math.imul(A,tt)|0,n=n+Math.imul(y,rt)|0,e=(e=e+Math.imul(y,nt)|0)+Math.imul(b,rt)|0,h=h+Math.imul(b,nt)|0,n=n+Math.imul(v,ht)|0,e=(e=e+Math.imul(v,ot)|0)+Math.imul(g,ht)|0,h=h+Math.imul(g,ot)|0,n=n+Math.imul(p,ut)|0,e=(e=e+Math.imul(p,at)|0)+Math.imul(c,ut)|0,h=h+Math.imul(c,at)|0;var At=(a+(n=n+Math.imul(f,ft)|0)|0)+((8191&(e=(e=e+Math.imul(f,mt)|0)+Math.imul(m,ft)|0))<<13)|0;a=((h=h+Math.imul(m,mt)|0)+(e>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(E,P),e=(e=Math.imul(E,F))+Math.imul(O,P)|0,h=Math.imul(O,F),n=n+Math.imul(H,U)|0,e=(e=e+Math.imul(H,$)|0)+Math.imul(L,U)|0,h=h+Math.imul(L,$)|0,n=n+Math.imul(z,K)|0,e=(e=e+Math.imul(z,V)|0)+Math.imul(N,K)|0,h=h+Math.imul(N,V)|0,n=n+Math.imul(R,J)|0,e=(e=e+Math.imul(R,Q)|0)+Math.imul(Z,J)|0,h=h+Math.imul(Z,Q)|0,n=n+Math.imul(k,Y)|0,e=(e=e+Math.imul(k,tt)|0)+Math.imul(S,Y)|0,h=h+Math.imul(S,tt)|0,n=n+Math.imul(x,rt)|0,e=(e=e+Math.imul(x,nt)|0)+Math.imul(A,rt)|0,h=h+Math.imul(A,nt)|0,n=n+Math.imul(y,ht)|0,e=(e=e+Math.imul(y,ot)|0)+Math.imul(b,ht)|0,h=h+Math.imul(b,ot)|0,n=n+Math.imul(v,ut)|0,e=(e=e+Math.imul(v,at)|0)+Math.imul(g,ut)|0,h=h+Math.imul(g,at)|0,n=n+Math.imul(p,ft)|0,e=(e=e+Math.imul(p,mt)|0)+Math.imul(c,ft)|0,h=h+Math.imul(c,mt)|0;var Bt=(a+(n=n+Math.imul(f,pt)|0)|0)+((8191&(e=(e=e+Math.imul(f,ct)|0)+Math.imul(m,pt)|0))<<13)|0;a=((h=h+Math.imul(m,ct)|0)+(e>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(E,U),e=(e=Math.imul(E,$))+Math.imul(O,U)|0,h=Math.imul(O,$),n=n+Math.imul(H,K)|0,e=(e=e+Math.imul(H,V)|0)+Math.imul(L,K)|0,h=h+Math.imul(L,V)|0,n=n+Math.imul(z,J)|0,e=(e=e+Math.imul(z,Q)|0)+Math.imul(N,J)|0,h=h+Math.imul(N,Q)|0,n=n+Math.imul(R,Y)|0,e=(e=e+Math.imul(R,tt)|0)+Math.imul(Z,Y)|0,h=h+Math.imul(Z,tt)|0,n=n+Math.imul(k,rt)|0,e=(e=e+Math.imul(k,nt)|0)+Math.imul(S,rt)|0,h=h+Math.imul(S,nt)|0,n=n+Math.imul(x,ht)|0,e=(e=e+Math.imul(x,ot)|0)+Math.imul(A,ht)|0,h=h+Math.imul(A,ot)|0,n=n+Math.imul(y,ut)|0,e=(e=e+Math.imul(y,at)|0)+Math.imul(b,ut)|0,h=h+Math.imul(b,at)|0,n=n+Math.imul(v,ft)|0,e=(e=e+Math.imul(v,mt)|0)+Math.imul(g,ft)|0,h=h+Math.imul(g,mt)|0;var kt=(a+(n=n+Math.imul(p,pt)|0)|0)+((8191&(e=(e=e+Math.imul(p,ct)|0)+Math.imul(c,pt)|0))<<13)|0;a=((h=h+Math.imul(c,ct)|0)+(e>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(E,K),e=(e=Math.imul(E,V))+Math.imul(O,K)|0,h=Math.imul(O,V),n=n+Math.imul(H,J)|0,e=(e=e+Math.imul(H,Q)|0)+Math.imul(L,J)|0,h=h+Math.imul(L,Q)|0,n=n+Math.imul(z,Y)|0,e=(e=e+Math.imul(z,tt)|0)+Math.imul(N,Y)|0,h=h+Math.imul(N,tt)|0,n=n+Math.imul(R,rt)|0,e=(e=e+Math.imul(R,nt)|0)+Math.imul(Z,rt)|0,h=h+Math.imul(Z,nt)|0,n=n+Math.imul(k,ht)|0,e=(e=e+Math.imul(k,ot)|0)+Math.imul(S,ht)|0,h=h+Math.imul(S,ot)|0,n=n+Math.imul(x,ut)|0,e=(e=e+Math.imul(x,at)|0)+Math.imul(A,ut)|0,h=h+Math.imul(A,at)|0,n=n+Math.imul(y,ft)|0,e=(e=e+Math.imul(y,mt)|0)+Math.imul(b,ft)|0,h=h+Math.imul(b,mt)|0;var St=(a+(n=n+Math.imul(v,pt)|0)|0)+((8191&(e=(e=e+Math.imul(v,ct)|0)+Math.imul(g,pt)|0))<<13)|0;a=((h=h+Math.imul(g,ct)|0)+(e>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(E,J),e=(e=Math.imul(E,Q))+Math.imul(O,J)|0,h=Math.imul(O,Q),n=n+Math.imul(H,Y)|0,e=(e=e+Math.imul(H,tt)|0)+Math.imul(L,Y)|0,h=h+Math.imul(L,tt)|0,n=n+Math.imul(z,rt)|0,e=(e=e+Math.imul(z,nt)|0)+Math.imul(N,rt)|0,h=h+Math.imul(N,nt)|0,n=n+Math.imul(R,ht)|0,e=(e=e+Math.imul(R,ot)|0)+Math.imul(Z,ht)|0,h=h+Math.imul(Z,ot)|0,n=n+Math.imul(k,ut)|0,e=(e=e+Math.imul(k,at)|0)+Math.imul(S,ut)|0,h=h+Math.imul(S,at)|0,n=n+Math.imul(x,ft)|0,e=(e=e+Math.imul(x,mt)|0)+Math.imul(A,ft)|0,h=h+Math.imul(A,mt)|0;var qt=(a+(n=n+Math.imul(y,pt)|0)|0)+((8191&(e=(e=e+Math.imul(y,ct)|0)+Math.imul(b,pt)|0))<<13)|0;a=((h=h+Math.imul(b,ct)|0)+(e>>>13)|0)+(qt>>>26)|0,qt&=67108863,n=Math.imul(E,Y),e=(e=Math.imul(E,tt))+Math.imul(O,Y)|0,h=Math.imul(O,tt),n=n+Math.imul(H,rt)|0,e=(e=e+Math.imul(H,nt)|0)+Math.imul(L,rt)|0,h=h+Math.imul(L,nt)|0,n=n+Math.imul(z,ht)|0,e=(e=e+Math.imul(z,ot)|0)+Math.imul(N,ht)|0,h=h+Math.imul(N,ot)|0,n=n+Math.imul(R,ut)|0,e=(e=e+Math.imul(R,at)|0)+Math.imul(Z,ut)|0,h=h+Math.imul(Z,at)|0,n=n+Math.imul(k,ft)|0,e=(e=e+Math.imul(k,mt)|0)+Math.imul(S,ft)|0,h=h+Math.imul(S,mt)|0;var Rt=(a+(n=n+Math.imul(x,pt)|0)|0)+((8191&(e=(e=e+Math.imul(x,ct)|0)+Math.imul(A,pt)|0))<<13)|0;a=((h=h+Math.imul(A,ct)|0)+(e>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(E,rt),e=(e=Math.imul(E,nt))+Math.imul(O,rt)|0,h=Math.imul(O,nt),n=n+Math.imul(H,ht)|0,e=(e=e+Math.imul(H,ot)|0)+Math.imul(L,ht)|0,h=h+Math.imul(L,ot)|0,n=n+Math.imul(z,ut)|0,e=(e=e+Math.imul(z,at)|0)+Math.imul(N,ut)|0,h=h+Math.imul(N,at)|0,n=n+Math.imul(R,ft)|0,e=(e=e+Math.imul(R,mt)|0)+Math.imul(Z,ft)|0,h=h+Math.imul(Z,mt)|0;var Zt=(a+(n=n+Math.imul(k,pt)|0)|0)+((8191&(e=(e=e+Math.imul(k,ct)|0)+Math.imul(S,pt)|0))<<13)|0;a=((h=h+Math.imul(S,ct)|0)+(e>>>13)|0)+(Zt>>>26)|0,Zt&=67108863,n=Math.imul(E,ht),e=(e=Math.imul(E,ot))+Math.imul(O,ht)|0,h=Math.imul(O,ot),n=n+Math.imul(H,ut)|0,e=(e=e+Math.imul(H,at)|0)+Math.imul(L,ut)|0,h=h+Math.imul(L,at)|0,n=n+Math.imul(z,ft)|0,e=(e=e+Math.imul(z,mt)|0)+Math.imul(N,ft)|0,h=h+Math.imul(N,mt)|0;var jt=(a+(n=n+Math.imul(R,pt)|0)|0)+((8191&(e=(e=e+Math.imul(R,ct)|0)+Math.imul(Z,pt)|0))<<13)|0;a=((h=h+Math.imul(Z,ct)|0)+(e>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(E,ut),e=(e=Math.imul(E,at))+Math.imul(O,ut)|0,h=Math.imul(O,at),n=n+Math.imul(H,ft)|0,e=(e=e+Math.imul(H,mt)|0)+Math.imul(L,ft)|0,h=h+Math.imul(L,mt)|0;var zt=(a+(n=n+Math.imul(z,pt)|0)|0)+((8191&(e=(e=e+Math.imul(z,ct)|0)+Math.imul(N,pt)|0))<<13)|0;a=((h=h+Math.imul(N,ct)|0)+(e>>>13)|0)+(zt>>>26)|0,zt&=67108863,n=Math.imul(E,ft),e=(e=Math.imul(E,mt))+Math.imul(O,ft)|0,h=Math.imul(O,mt);var Nt=(a+(n=n+Math.imul(H,pt)|0)|0)+((8191&(e=(e=e+Math.imul(H,ct)|0)+Math.imul(L,pt)|0))<<13)|0;a=((h=h+Math.imul(L,ct)|0)+(e>>>13)|0)+(Nt>>>26)|0,Nt&=67108863;var It=(a+(n=Math.imul(E,pt))|0)+((8191&(e=(e=Math.imul(E,ct))+Math.imul(O,pt)|0))<<13)|0;return a=((h=Math.imul(O,ct))+(e>>>13)|0)+(It>>>26)|0,It&=67108863,u[0]=Mt,u[1]=vt,u[2]=gt,u[3]=wt,u[4]=yt,u[5]=bt,u[6]=_t,u[7]=xt,u[8]=At,u[9]=Bt,u[10]=kt,u[11]=St,u[12]=qt,u[13]=Rt,u[14]=Zt,u[15]=jt,u[16]=zt,u[17]=Nt,u[18]=It,0!==a&&(u[19]=a,r.length++),r};function c(t,i,r){return(new M).mulp(t,i,r)}function M(t,i){this.x=t,this.y=i}Math.imul||(p=d),h.prototype.mulTo=function(t,i){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,i):n<63?d(this,t,i):n<1024?function(t,i,r){r.negative=i.negative^t.negative,r.length=t.length+i.length;for(var n=0,e=0,h=0;h<r.length-1;h++){var o=e;e=0;for(var s=67108863&n,u=Math.min(h,i.length-1),a=Math.max(0,h-t.length+1);a<=u;a++){var l=h-a,f=(0|t.words[l])*(0|i.words[a]),m=67108863&f;s=67108863&(m=m+s|0),e+=(o=(o=o+(f/67108864|0)|0)+(m>>>26)|0)>>>26,o&=67108863}r.words[h]=s,n=o,o=e}return 0!==n?r.words[h]=n:r.length--,r.strip()}(this,t,i):c(this,t,i),r},M.prototype.makeRBT=function(t){for(var i=new Array(t),r=h.prototype._countBits(t)-1,n=0;n<t;n++)i[n]=this.revBin(n,r,t);return i},M.prototype.revBin=function(t,i,r){if(0===t||t===r-1)return t;for(var n=0,e=0;e<i;e++)n|=(1&t)<<i-e-1,t>>=1;return n},M.prototype.permute=function(t,i,r,n,e,h){for(var o=0;o<h;o++)n[o]=i[t[o]],e[o]=r[t[o]]},M.prototype.transform=function(t,i,r,n,e,h){this.permute(h,t,i,r,n,e);for(var o=1;o<e;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),a=Math.sin(2*Math.PI/s),l=0;l<e;l+=s)for(var f=u,m=a,d=0;d<o;d++){var p=r[l+d],c=n[l+d],M=r[l+d+o],v=n[l+d+o],g=f*M-m*v;v=f*v+m*M,M=g,r[l+d]=p+M,n[l+d]=c+v,r[l+d+o]=p-M,n[l+d+o]=c-v,d!==s&&(g=u*f-a*m,m=u*m+a*f,f=g)}},M.prototype.guessLen13b=function(t,i){var r=1|Math.max(i,t),n=1&r,e=0;for(r=r/2|0;r;r>>>=1)e++;return 1<<e+1+n},M.prototype.conjugate=function(t,i,r){if(!(r<=1))for(var n=0;n<r/2;n++){var e=t[n];t[n]=t[r-n-1],t[r-n-1]=e,e=i[n],i[n]=-i[r-n-1],i[r-n-1]=-e}},M.prototype.normalize13b=function(t,i){for(var r=0,n=0;n<i/2;n++){var e=8192*Math.round(t[2*n+1]/i)+Math.round(t[2*n]/i)+r;t[n]=67108863&e,r=e<67108864?0:e/67108864|0}return t},M.prototype.convert13b=function(t,i,n,e){for(var h=0,o=0;o<i;o++)h+=0|t[o],n[2*o]=8191&h,h>>>=13,n[2*o+1]=8191&h,h>>>=13;for(o=2*i;o<e;++o)n[o]=0;r(0===h),r(0==(-8192&h))},M.prototype.stub=function(t){for(var i=new Array(t),r=0;r<t;r++)i[r]=0;return i},M.prototype.mulp=function(t,i,r){var n=2*this.guessLen13b(t.length,i.length),e=this.makeRBT(n),h=this.stub(n),o=new Array(n),s=new Array(n),u=new Array(n),a=new Array(n),l=new Array(n),f=new Array(n),m=r.words;m.length=n,this.convert13b(t.words,t.length,o,n),this.convert13b(i.words,i.length,a,n),this.transform(o,h,s,u,n,e),this.transform(a,h,l,f,n,e);for(var d=0;d<n;d++){var p=s[d]*l[d]-u[d]*f[d];u[d]=s[d]*f[d]+u[d]*l[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,m,h,n,e),this.conjugate(m,h,n),this.normalize13b(m,n),r.negative=t.negative^i.negative,r.length=t.length+i.length,r.strip()},h.prototype.mul=function(t){var i=new h(null);return i.words=new Array(this.length+t.length),this.mulTo(t,i)},h.prototype.mulf=function(t){var i=new h(null);return i.words=new Array(this.length+t.length),c(this,t,i)},h.prototype.imul=function(t){return this.clone().mulTo(t,this)},h.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var i=0,n=0;n<this.length;n++){var e=(0|this.words[n])*t,h=(67108863&e)+(67108863&i);i>>=26,i+=e/67108864|0,i+=h>>>26,this.words[n]=67108863&h}return 0!==i&&(this.words[n]=i,this.length++),this},h.prototype.muln=function(t){return this.clone().imuln(t)},h.prototype.sqr=function(){return this.mul(this)},h.prototype.isqr=function(){return this.imul(this.clone())},h.prototype.pow=function(t){var i=function(t){for(var i=new Array(t.bitLength()),r=0;r<i.length;r++){var n=r/26|0,e=r%26;i[r]=(t.words[n]&1<<e)>>>e}return i}(t);if(0===i.length)return new h(1);for(var r=this,n=0;n<i.length&&0===i[n];n++,r=r.sqr());if(++n<i.length)for(var e=r.sqr();n<i.length;n++,e=e.sqr())0!==i[n]&&(r=r.mul(e));return r},h.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var i,n=t%26,e=(t-n)/26,h=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(i=0;i<this.length;i++){var s=this.words[i]&h,u=(0|this.words[i])-s<<n;this.words[i]=u|o,o=s>>>26-n}o&&(this.words[i]=o,this.length++)}if(0!==e){for(i=this.length-1;i>=0;i--)this.words[i+e]=this.words[i];for(i=0;i<e;i++)this.words[i]=0;this.length+=e}return this.strip()},h.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},h.prototype.iushrn=function(t,i,n){var e;r("number"==typeof t&&t>=0),e=i?(i-i%26)/26:0;var h=t%26,o=Math.min((t-h)/26,this.length),s=67108863^67108863>>>h<<h,u=n;if(e-=o,e=Math.max(0,e),u){for(var a=0;a<o;a++)u.words[a]=this.words[a];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,a=0;a<this.length;a++)this.words[a]=this.words[a+o];else this.words[0]=0,this.length=1;var l=0;for(a=this.length-1;a>=0&&(0!==l||a>=e);a--){var f=0|this.words[a];this.words[a]=l<<26-h|f>>>h,l=f&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},h.prototype.ishrn=function(t,i,n){return r(0===this.negative),this.iushrn(t,i,n)},h.prototype.shln=function(t){return this.clone().ishln(t)},h.prototype.ushln=function(t){return this.clone().iushln(t)},h.prototype.shrn=function(t){return this.clone().ishrn(t)},h.prototype.ushrn=function(t){return this.clone().iushrn(t)},h.prototype.testn=function(t){r("number"==typeof t&&t>=0);var i=t%26,n=(t-i)/26,e=1<<i;return!(this.length<=n||!(this.words[n]&e))},h.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var i=t%26,n=(t-i)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==i&&n++,this.length=Math.min(n,this.length),0!==i){var e=67108863^67108863>>>i<<i;this.words[this.length-1]&=e}return this.strip()},h.prototype.maskn=function(t){return this.clone().imaskn(t)},h.prototype.iaddn=function(t){return r("number"==typeof t),r(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)},h.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},h.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},h.prototype.addn=function(t){return this.clone().iaddn(t)},h.prototype.subn=function(t){return this.clone().isubn(t)},h.prototype.iabs=function(){return this.negative=0,this},h.prototype.abs=function(){return this.clone().iabs()},h.prototype._ishlnsubmul=function(t,i,n){var e,h,o=t.length+n;this._expand(o);var s=0;for(e=0;e<t.length;e++){h=(0|this.words[e+n])+s;var u=(0|t.words[e])*i;s=((h-=67108863&u)>>26)-(u/67108864|0),this.words[e+n]=67108863&h}for(;e<this.length-n;e++)s=(h=(0|this.words[e+n])+s)>>26,this.words[e+n]=67108863&h;if(0===s)return this.strip();for(r(-1===s),s=0,e=0;e<this.length;e++)s=(h=-(0|this.words[e])+s)>>26,this.words[e]=67108863&h;return this.negative=1,this.strip()},h.prototype._wordDiv=function(t,i){var r=(this.length,t.length),n=this.clone(),e=t,o=0|e.words[e.length-1];0!=(r=26-this._countBits(o))&&(e=e.ushln(r),n.iushln(r),o=0|e.words[e.length-1]);var s,u=n.length-e.length;if("mod"!==i){(s=new h(null)).length=u+1,s.words=new Array(s.length);for(var a=0;a<s.length;a++)s.words[a]=0}var l=n.clone()._ishlnsubmul(e,1,u);0===l.negative&&(n=l,s&&(s.words[u]=1));for(var f=u-1;f>=0;f--){var m=67108864*(0|n.words[e.length+f])+(0|n.words[e.length+f-1]);for(m=Math.min(m/o|0,67108863),n._ishlnsubmul(e,m,f);0!==n.negative;)m--,n.negative=0,n._ishlnsubmul(e,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=m)}return s&&s.strip(),n.strip(),"div"!==i&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},h.prototype.divmod=function(t,i,n){return r(!t.isZero()),this.isZero()?{div:new h(0),mod:new h(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,i),"mod"!==i&&(e=s.div.neg()),"div"!==i&&(o=s.mod.neg(),n&&0!==o.negative&&o.iadd(t)),{div:e,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),i),"mod"!==i&&(e=s.div.neg()),{div:e,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),i),"div"!==i&&(o=s.mod.neg(),n&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new h(0),mod:this}:1===t.length?"div"===i?{div:this.divn(t.words[0]),mod:null}:"mod"===i?{div:null,mod:new h(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new h(this.modn(t.words[0]))}:this._wordDiv(t,i);var e,o,s},h.prototype.div=function(t){return this.divmod(t,"div",!1).div},h.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},h.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},h.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,n=t.ushrn(1),e=t.andln(1),h=r.cmp(n);return h<0||1===e&&0===h?i.div:0!==i.div.negative?i.div.isubn(1):i.div.iaddn(1)},h.prototype.modn=function(t){r(t<=67108863);for(var i=(1<<26)%t,n=0,e=this.length-1;e>=0;e--)n=(i*n+(0|this.words[e]))%t;return n},h.prototype.idivn=function(t){r(t<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var e=(0|this.words[n])+67108864*i;this.words[n]=e/t|0,i=e%t}return this.strip()},h.prototype.divn=function(t){return this.clone().idivn(t)},h.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var i=this,n=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var e=new h(1),o=new h(0),s=new h(0),u=new h(1),a=0;i.isEven()&&n.isEven();)i.iushrn(1),n.iushrn(1),++a;for(var l=n.clone(),f=i.clone();!i.isZero();){for(var m=0,d=1;0==(i.words[0]&d)&&m<26;++m,d<<=1);if(m>0)for(i.iushrn(m);m-- >0;)(e.isOdd()||o.isOdd())&&(e.iadd(l),o.isub(f)),e.iushrn(1),o.iushrn(1);for(var p=0,c=1;0==(n.words[0]&c)&&p<26;++p,c<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(l),u.isub(f)),s.iushrn(1),u.iushrn(1);i.cmp(n)>=0?(i.isub(n),e.isub(s),o.isub(u)):(n.isub(i),s.isub(e),u.isub(o))}return{a:s,b:u,gcd:n.iushln(a)}},h.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var i=this,n=t.clone();i=0!==i.negative?i.umod(t):i.clone();for(var e,o=new h(1),s=new h(0),u=n.clone();i.cmpn(1)>0&&n.cmpn(1)>0;){for(var a=0,l=1;0==(i.words[0]&l)&&a<26;++a,l<<=1);if(a>0)for(i.iushrn(a);a-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var f=0,m=1;0==(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);i.cmp(n)>=0?(i.isub(n),o.isub(s)):(n.isub(i),s.isub(o))}return(e=0===i.cmpn(1)?o:s).cmpn(0)<0&&e.iadd(t),e},h.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 n=0;i.isEven()&&r.isEven();n++)i.iushrn(1),r.iushrn(1);for(;;){for(;i.isEven();)i.iushrn(1);for(;r.isEven();)r.iushrn(1);var e=i.cmp(r);if(e<0){var h=i;i=r,r=h}else if(0===e||0===r.cmpn(1))break;i.isub(r)}return r.iushln(n)},h.prototype.invm=function(t){return this.egcd(t).a.umod(t)},h.prototype.isEven=function(){return 0==(1&this.words[0])},h.prototype.isOdd=function(){return 1==(1&this.words[0])},h.prototype.andln=function(t){return this.words[0]&t},h.prototype.bincn=function(t){r("number"==typeof t);var i=t%26,n=(t-i)/26,e=1<<i;if(this.length<=n)return this._expand(n+1),this.words[n]|=e,this;for(var h=e,o=n;0!==h&&o<this.length;o++){var s=0|this.words[o];h=(s+=h)>>>26,s&=67108863,this.words[o]=s}return 0!==h&&(this.words[o]=h,this.length++),this},h.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},h.prototype.cmpn=function(t){var i,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)i=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var e=0|this.words[0];i=e===t?0:e<t?-1:1}return 0!==this.negative?0|-i:i},h.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},h.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 n=0|this.words[r],e=0|t.words[r];if(n!==e){n<e?i=-1:n>e&&(i=1);break}}return i},h.prototype.gtn=function(t){return 1===this.cmpn(t)},h.prototype.gt=function(t){return 1===this.cmp(t)},h.prototype.gten=function(t){return this.cmpn(t)>=0},h.prototype.gte=function(t){return this.cmp(t)>=0},h.prototype.ltn=function(t){return-1===this.cmpn(t)},h.prototype.lt=function(t){return-1===this.cmp(t)},h.prototype.lten=function(t){return this.cmpn(t)<=0},h.prototype.lte=function(t){return this.cmp(t)<=0},h.prototype.eqn=function(t){return 0===this.cmpn(t)},h.prototype.eq=function(t){return 0===this.cmp(t)},h.red=function(t){return new x(t)},h.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},h.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},h.prototype._forceRed=function(t){return this.red=t,this},h.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},h.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},h.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},h.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},h.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},h.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},h.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},h.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},h.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},h.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},h.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},h.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},h.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},h.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function g(t,i){this.name=t,this.p=new h(i,16),this.n=this.p.bitLength(),this.k=new h(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"==typeof t){var i=h._prime(t);this.m=i.p,this.prime=i}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function A(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new h(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)}g.prototype._tmp=function(){var t=new h(null);return t.words=new Array(Math.ceil(this.n/13)),t},g.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 n=i<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},g.prototype.split=function(t,i){t.iushrn(this.n,0,i)},g.prototype.imulK=function(t){return t.imul(this.k)},e(w,g),w.prototype.split=function(t,i){for(var r=4194303,n=Math.min(t.length,9),e=0;e<n;e++)i.words[e]=t.words[e];if(i.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var h=t.words[9];for(i.words[i.length++]=h&r,e=10;e<t.length;e++){var o=0|t.words[e];t.words[e-10]=(o&r)<<4|h>>>22,h=o}h>>>=22,t.words[e-10]=h,0===h&&t.length>10?t.length-=10:t.length-=9},w.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 n=0|t.words[r];i+=977*n,t.words[r]=67108863&i,i=64*n+(i/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},e(y,g),e(b,g),e(_,g),_.prototype.imulK=function(t){for(var i=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+i,e=67108863&n;n>>>=26,t.words[r]=e,i=n}return 0!==i&&(t.words[t.length++]=i),t},h._prime=function(t){if(v[t])return v[t];var i;if("k256"===t)i=new w;else if("p224"===t)i=new y;else if("p192"===t)i=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);i=new _}return v[t]=i,i},x.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,i){r(0==(t.negative|i.negative),"red works only with positives"),r(t.red&&t.red===i.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.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)},x.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},x.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)},x.prototype.isub=function(t,i){this._verify2(t,i);var r=t.isub(i);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,i){return this._verify1(t),this.imod(t.ushln(i))},x.prototype.imul=function(t,i){return this._verify2(t,i),this.imod(t.imul(i))},x.prototype.mul=function(t,i){return this._verify2(t,i),this.imod(t.mul(i))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var i=this.m.andln(3);if(r(i%2==1),3===i){var n=this.m.add(new h(1)).iushrn(2);return this.pow(t,n)}for(var e=this.m.subn(1),o=0;!e.isZero()&&0===e.andln(1);)o++,e.iushrn(1);r(!e.isZero());var s=new h(1).toRed(this),u=s.redNeg(),a=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new h(2*l*l).toRed(this);0!==this.pow(l,a).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,e),m=this.pow(t,e.addn(1).iushrn(1)),d=this.pow(t,e),p=o;0!==d.cmp(s);){for(var c=d,M=0;0!==c.cmp(s);M++)c=c.redSqr();r(M<p);var v=this.pow(f,new h(1).iushln(p-M-1));m=m.redMul(v),f=v.redSqr(),d=d.redMul(f),p=M}return m},x.prototype.invm=function(t){var i=t._invmp(this.m);return 0!==i.negative?(i.negative=0,this.imod(i).redNeg()):this.imod(i)},x.prototype.pow=function(t,i){if(i.isZero())return new h(1).toRed(this);if(0===i.cmpn(1))return t.clone();var r=new Array(16);r[0]=new h(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var e=r[0],o=0,s=0,u=i.bitLength()%26;for(0===u&&(u=26),n=i.length-1;n>=0;n--){for(var a=i.words[n],l=u-1;l>=0;l--){var f=a>>l&1;e!==r[0]&&(e=this.sqr(e)),0!==f||0!==o?(o<<=1,o|=f,(4==++s||0===n&&0===l)&&(e=this.mul(e,r[o]),s=0,o=0)):s=0}u=26}return e},x.prototype.convertTo=function(t){var i=t.umod(this.m);return i===t?i.clone():i},x.prototype.convertFrom=function(t){var i=t.clone();return i.red=null,i},h.mont=function(t){return new A(t)},e(A,x),A.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},A.prototype.convertFrom=function(t){var i=this.imod(t.mul(this.rinv));return i.red=null,i},A.prototype.imul=function(t,i){if(t.isZero()||i.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(i),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=r.isub(n).iushrn(this.shift),h=e;return e.cmp(this.m)>=0?h=e.isub(this.m):e.cmpn(0)<0&&(h=e.iadd(this.m)),h._forceRed(this)},A.prototype.mul=function(t,i){if(t.isZero()||i.isZero())return new h(0)._forceRed(this);var r=t.mul(i),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=r.isub(n).iushrn(this.shift),o=e;return e.cmp(this.m)>=0?o=e.isub(this.m):e.cmpn(0)<0&&(o=e.iadd(this.m)),o._forceRed(this)},A.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(a,i.commonjsGlobal),exports.bn=a,exports.requireCore=h,exports.sha256=u;
@@ -1 +1 @@
1
- "use strict";var t=require("./index-d8ce743a.cjs"),e={exports:{}};!function(e,r){var o="undefined"!=typeof self?self:t.commonjsGlobal,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}(e,e.exports);var r=t.getDefaultExportFromCjs(e.exports);exports.browserPonyfill=e,exports.c=r;
1
+ "use strict";var t=require("./index-4b51d39a.cjs"),e={exports:{}};!function(e,r){var o="undefined"!=typeof self?self:t.commonjsGlobal,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}(e,e.exports);var r=t.getDefaultExportFromCjs(e.exports);exports.browserPonyfill=e,exports.c=r;