From b5137ac4190e3c873c69fe4d634121be01dc2b4b Mon Sep 17 00:00:00 2001 From: Jernej Pregelj Date: Thu, 16 Nov 2017 13:50:54 +0100 Subject: [PATCH] Release 0.1.8 --- .gitignore | 1 - dist/browser/bigchaindb-orm.amd.min.js | 2 + dist/browser/bigchaindb-orm.amd.min.js.map | 1 + dist/browser/bigchaindb-orm.cjs.min.js | 2 + dist/browser/bigchaindb-orm.cjs.min.js.map | 1 + dist/browser/bigchaindb-orm.cjs2.min.js | 2 + dist/browser/bigchaindb-orm.cjs2.min.js.map | 1 + dist/browser/bigchaindb-orm.umd.min.js | 2 + dist/browser/bigchaindb-orm.umd.min.js.map | 1 + dist/browser/bigchaindb-orm.window.min.js | 2 + dist/browser/bigchaindb-orm.window.min.js.map | 1 + dist/node/connection.js | 180 ++++++++++++++++++ dist/node/index.js | 43 +++++ dist/node/ormobject.js | 113 +++++++++++ package.json | 22 +-- 15 files changed, 362 insertions(+), 12 deletions(-) create mode 100644 dist/browser/bigchaindb-orm.amd.min.js create mode 100644 dist/browser/bigchaindb-orm.amd.min.js.map create mode 100644 dist/browser/bigchaindb-orm.cjs.min.js create mode 100644 dist/browser/bigchaindb-orm.cjs.min.js.map create mode 100644 dist/browser/bigchaindb-orm.cjs2.min.js create mode 100644 dist/browser/bigchaindb-orm.cjs2.min.js.map create mode 100644 dist/browser/bigchaindb-orm.umd.min.js create mode 100644 dist/browser/bigchaindb-orm.umd.min.js.map create mode 100644 dist/browser/bigchaindb-orm.window.min.js create mode 100644 dist/browser/bigchaindb-orm.window.min.js.map create mode 100644 dist/node/connection.js create mode 100644 dist/node/index.js create mode 100644 dist/node/ormobject.js diff --git a/.gitignore b/.gitignore index f88e5ad..d210845 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ package-lock.json # production /build -dist # misc .DS_Store diff --git a/dist/browser/bigchaindb-orm.amd.min.js b/dist/browser/bigchaindb-orm.amd.min.js new file mode 100644 index 0000000..177d053 --- /dev/null +++ b/dist/browser/bigchaindb-orm.amd.min.js @@ -0,0 +1,2 @@ +define("bigchaindb-orm",[],function(){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=2)}([function(t,e,r){function n(t,e){this._id=t,this._clearFn=e}var i=Function.prototype.apply;e.setTimeout=function(){return new n(i.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new n(i.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},n.prototype.unref=n.prototype.ref=function(){},n.prototype.close=function(){this._clearFn.call(window,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r(6),e.setImmediate=setImmediate,e.clearImmediate=clearImmediate},function(t,e){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){t.exports=r(3)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};n(this,t),this.path=e,this.headers=o({},r),this.conn=new s.Connection(e,r)}return a(t,[{key:"getAssetId",value:function(t){return"CREATE"===t.operation?t.id:t.asset.id}},{key:"getTransaction",value:function(t){return this.conn.getTransaction(t)}},{key:"listTransactions",value:function(t,e){return this.conn.listTransactions(t,e)}},{key:"listOutputs",value:function(t,e){return this.conn.listOutputs(t,e)}},{key:"getBlock",value:function(t){return this.conn.getBlock(t)}},{key:"listBlocks",value:function(t){var e=this;return this.conn.listBlocks(t).then(function(t){return Promise.all(t.map(function(t){return e.conn.getBlock(t)}))})}},{key:"listVotes",value:function(t){return this.conn.listVotes(t)}},{key:"searchAssets",value:function(t){return this.conn.searchAssets(t)}},{key:"createTransaction",value:function(t,e,r,n){var i=this;try{var o=s.Transaction.makeCreateTransaction(r,n,[s.Transaction.makeOutput(s.Transaction.makeEd25519Condition(t))],t),a=s.Transaction.signTransaction(o,e);return this.conn.postTransaction(a).then(function(){return i.conn.pollStatusAndFetchTransaction(a.id)}).then(function(){return a})}catch(t){return Promise.reject(t)}}},{key:"transferTransaction",value:function(t,e,r,n,i){var o=this;try{var a=s.Transaction.makeTransferTransaction(t,i,[s.Transaction.makeOutput(s.Transaction.makeEd25519Condition(n))],0),f=s.Transaction.signTransaction(a,r);return this.conn.postTransaction(f).then(function(){return o.conn.pollStatusAndFetchTransaction(f.id)}).then(function(){return f})}catch(t){return Promise.reject(t)}}},{key:"getSortedTransactions",value:function(t){return this.conn.listTransactions(t).then(function(t){if(t.length<=1)return t;var e=[];t.forEach(function(t){return t.inputs.forEach(function(t){t.fulfills&&e.push(t.fulfills.transaction_id)})});var r=t.filter(function(t){return-1===e.indexOf(t.id)});if(r.length){var n=function(){for(var e=r[0],n=e.inputs[0].fulfills.transaction_id,i=[];;){i.push(e);try{n=e.inputs[0].fulfills.transaction_id}catch(t){break}if(!n)break;e=t.filter(function(t){return t.id===n})[0]}return{v:i.reverse()}}();if("object"===(void 0===n?"undefined":i(n)))return n.v}else console.error("something went wrong while sorting transactions",t,e);return t})}}]),t}();e.default=u},function(module,exports,__webpack_require__){(function(setImmediate,clearImmediate){module.exports=function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=22)}([function(t,e,r){"use strict";(function(t){function n(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t,e){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|t}function b(t){return+t!=t&&(t=0),o.alloc(+t)}function y(t,e){if(o.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(t).length;default:if(n)return K(t).length;e=(""+e).toLowerCase(),n=!0}}function v(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return P(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=o.from(e,n)),o.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return e&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){function o(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,f=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,f/=2,s/=2,r/=2}var u;if(i){var c=-1;for(u=r;uf&&(r=f-s),u=r;u>=0;u--){for(var h=!0,d=0;di&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+f<=r){var s,u,c,h;switch(f){case 1:o<128&&(a=o);break;case 2:128==(192&(s=t[i+1]))&&(h=(31&o)<<6|63&s)>127&&(a=h);break;case 3:s=t[i+1],u=t[i+2],128==(192&s)&&128==(192&u)&&(h=(15&o)<<12|(63&s)<<6|63&u)>2047&&(h<55296||h>57343)&&(a=h);break;case 4:s=t[i+1],u=t[i+2],c=t[i+3],128==(192&s)&&128==(192&u)&&128==(192&c)&&(h=(15&o)<<18|(63&s)<<12|(63&u)<<6|63&c)>65535&&h<1114112&&(a=h)}}null===a?(a=65533,f=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=f}return O(n)}function O(t){var e=t.length;if(e<=Q)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,r,n,i,a){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function N(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function L(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function U(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(t,e,r,n,i){return i||U(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,i){return i||U(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(t,e,r,n,52,8),r+8}function z(t){if(t=q(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function q(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Y(t){return t<16?"0"+t.toString(16):t.toString(16)}function K(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(t){for(var e=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function V(t){return X.toByteArray(z(t))}function W(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function J(t){return t!==t}var X=r(27),Z=r(28),$=r(29);e.Buffer=o,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=n(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,e,r){return a(null,t,e,r)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,e,r){return s(null,t,e,r)},o.allocUnsafe=function(t){return u(null,t)},o.allocUnsafeSlow=function(t){return u(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},o.prototype.compare=function(t,e,r,n,i){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var a=i-n,f=r-e,s=Math.min(a,f),u=this.slice(n,i),c=t.slice(e,r),h=0;hi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return S(this,t,e,r);case"ascii":return E(this,t,e,r);case"latin1":case"binary":return A(this,t,e,r);case"base64":return M(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)n+=this[t+--e]*i;return n},o.prototype.readUInt8=function(t,e){return e||C(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||C(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||C(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o=i&&(n-=Math.pow(2,8*e)),n},o.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||C(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(t,e){e||C(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(t,e){return e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||C(t,4,this.length),Z.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||C(t,4,this.length),Z.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||C(t,8,this.length),Z.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||C(t,8,this.length),Z.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,r,n){t=+t,e|=0,r|=0,n||j(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},o.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);j(this,t,e,r,i-1,-i)}var o=0,a=1,f=0;for(this[e]=255&t;++o>0)-f&255;return e+r},o.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);j(this,t,e,r,i-1,-i)}var o=r-1,a=1,f=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===f&&0!==this[e+o+1]&&(f=1),this[e+o]=(t/a>>0)-f&255;return e+r},o.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,r){return D(this,t,e,!0,r)},o.prototype.writeFloatBE=function(t,e,r){return D(this,t,e,!1,r)},o.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},o.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},o.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var a;if("number"==typeof t)for(a=e;a=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|t}function b(t){return+t!=t&&(t=0),o.alloc(+t)}function y(t,e){if(o.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(t).length;default:if(n)return K(t).length;e=(""+e).toLowerCase(),n=!0}}function v(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,e>>>=0,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return P(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=o.from(e,n)),o.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return e&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){function o(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,f=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,f/=2,s/=2,r/=2}var u;if(i){var c=-1;for(u=r;uf&&(r=f-s),u=r;u>=0;u--){for(var h=!0,d=0;di&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+f<=r){var s,u,c,h;switch(f){case 1:o<128&&(a=o);break;case 2:128==(192&(s=t[i+1]))&&(h=(31&o)<<6|63&s)>127&&(a=h);break;case 3:s=t[i+1],u=t[i+2],128==(192&s)&&128==(192&u)&&(h=(15&o)<<12|(63&s)<<6|63&u)>2047&&(h<55296||h>57343)&&(a=h);break;case 4:s=t[i+1],u=t[i+2],c=t[i+3],128==(192&s)&&128==(192&u)&&128==(192&c)&&(h=(15&o)<<18|(63&s)<<12|(63&u)<<6|63&c)>65535&&h<1114112&&(a=h)}}null===a?(a=65533,f=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=f}return O(n)}function O(t){var e=t.length;if(e<=Q)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,r,n,i,a){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function N(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function L(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function U(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(t,e,r,n,i){return i||U(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,i){return i||U(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(t,e,r,n,52,8),r+8}function z(t){if(t=q(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function q(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Y(t){return t<16?"0"+t.toString(16):t.toString(16)}function K(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(t){for(var e=[],r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function V(t){return X.toByteArray(z(t))}function W(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function J(t){return t!==t}var X=r(211),Z=r(432),$=r(178);e.Buffer=o,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=n(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,e,r){return a(null,t,e,r)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,e,r){return s(null,t,e,r)},o.allocUnsafe=function(t){return u(null,t)},o.allocUnsafeSlow=function(t){return u(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,e){if(!o.isBuffer(t)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},o.prototype.compare=function(t,e,r,n,i){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var a=i-n,f=r-e,s=Math.min(a,f),u=this.slice(n,i),c=t.slice(e,r),h=0;hi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return _(this,t,e,r);case"utf8":case"utf-8":return S(this,t,e,r);case"ascii":return E(this,t,e,r);case"latin1":case"binary":return A(this,t,e,r);case"base64":return M(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)n+=this[t+--e]*i;return n},o.prototype.readUInt8=function(t,e){return e||C(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,e){return e||C(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,e){return e||C(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,e){return e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,e){return e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o=i&&(n-=Math.pow(2,8*e)),n},o.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},o.prototype.readInt8=function(t,e){return e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},o.prototype.readInt16LE=function(t,e){e||C(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(t,e){e||C(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(t,e){return e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,e){return e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,e){return e||C(t,4,this.length),Z.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,e){return e||C(t,4,this.length),Z.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,e){return e||C(t,8,this.length),Z.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,e){return e||C(t,8,this.length),Z.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,e,r,n){t=+t,e|=0,r|=0,n||j(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},o.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},o.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},o.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},o.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},o.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},o.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);j(this,t,e,r,i-1,-i)}var o=0,a=1,f=0;for(this[e]=255&t;++o>0)-f&255;return e+r},o.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);j(this,t,e,r,i-1,-i)}var o=r-1,a=1,f=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===f&&0!==this[e+o+1]&&(f=1),this[e+o]=(t/a>>0)-f&255;return e+r},o.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},o.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},o.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},o.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},o.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},o.prototype.writeFloatLE=function(t,e,r){return D(this,t,e,!0,r)},o.prototype.writeFloatBE=function(t,e,r){return D(this,t,e,!1,r)},o.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},o.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},o.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var a;if("number"==typeof t)for(a=e;a=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function f(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?f-49+10:f>=17?f-17+10:f}return i}function s(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}function u(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,f=67108863&a,s=a/67108864|0;r.words[0]=f;for(var u=1;u>>26,h=67108863&s,d=Math.min(u,e.length-1),l=Math.max(0,u-t.length+1);l<=d;l++){var p=u-l|0;i=0|t.words[p],o=0|e.words[l],a=i*o+h,c+=a/67108864|0,h=67108863&a}r.words[u]=0|h,s=0|c}return 0!==s?r.words[u]=0|s:r.length--,r.strip()}function c(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0,i+=a>>>26,a&=67108863}r.words[o]=f,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}function h(t,e,r){return(new d).mulp(t,e,r)}function d(t,e){this.x=t,this.y=e}function l(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function p(){l.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){l.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function y(){l.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function v(){l.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function g(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function m(t){g.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;var w;try{w=r(1).Buffer}catch(t){}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36),t=t.toString().replace(/\s+/g,"");var i=0;"-"===t[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("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 i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-f&67108863,(f+=24)>=26&&(f-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-f&67108863,(f+=24)>=26&&(f-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=a(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=a(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var _=["","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"],S=[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],E=[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];o.prototype.toString=function(t,e){t=t||10,e=0|e||1;var r;if(16===t||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215,r=0!==o||a!==this.length-1?_[6-s.length]+s+r:s+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=S[t],c=E[t];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var d=h.modn(c).toString(t);h=h.idivn(c),r=h.isZero()?d+r:_[u-d.length]+d+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==w),this.toArrayLike(w,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,f,s="le"===e,u=new t(o),c=this.clone();if(s){for(f=0;!c.isZero();f++)a=c.andln(255),c.iushrn(8),u[f]=a;for(;f=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r=this.cmp(t);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=t):(n=t,i=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,l=0|a[1],p=8191&l,b=l>>>13,y=0|a[2],v=8191&y,g=y>>>13,m=0|a[3],w=8191&m,_=m>>>13,S=0|a[4],E=8191&S,A=S>>>13,M=0|a[5],x=8191&M,k=M>>>13,T=0|a[6],O=8191&T,I=T>>>13,P=0|a[7],R=8191&P,B=P>>>13,C=0|a[8],j=8191&C,N=C>>>13,L=0|a[9],U=8191&L,D=L>>>13,F=0|f[0],z=8191&F,q=F>>>13,Y=0|f[1],K=8191&Y,G=Y>>>13,H=0|f[2],V=8191&H,W=H>>>13,J=0|f[3],X=8191&J,Z=J>>>13,$=0|f[4],Q=8191&$,tt=$>>>13,et=0|f[5],rt=8191&et,nt=et>>>13,it=0|f[6],ot=8191&it,at=it>>>13,ft=0|f[7],st=8191&ft,ut=ft>>>13,ct=0|f[8],ht=8191&ct,dt=ct>>>13,lt=0|f[9],pt=8191<,bt=lt>>>13;r.negative=t.negative^e.negative,r.length=19,n=Math.imul(h,z),i=Math.imul(h,q),i=i+Math.imul(d,z)|0,o=Math.imul(d,q);var yt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(p,z),i=Math.imul(p,q),i=i+Math.imul(b,z)|0,o=Math.imul(b,q),n=n+Math.imul(h,K)|0,i=i+Math.imul(h,G)|0,i=i+Math.imul(d,K)|0,o=o+Math.imul(d,G)|0;var vt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,z),i=Math.imul(v,q),i=i+Math.imul(g,z)|0,o=Math.imul(g,q),n=n+Math.imul(p,K)|0,i=i+Math.imul(p,G)|0,i=i+Math.imul(b,K)|0,o=o+Math.imul(b,G)|0,n=n+Math.imul(h,V)|0,i=i+Math.imul(h,W)|0,i=i+Math.imul(d,V)|0,o=o+Math.imul(d,W)|0;var gt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(w,z),i=Math.imul(w,q),i=i+Math.imul(_,z)|0,o=Math.imul(_,q),n=n+Math.imul(v,K)|0,i=i+Math.imul(v,G)|0,i=i+Math.imul(g,K)|0,o=o+Math.imul(g,G)|0,n=n+Math.imul(p,V)|0,i=i+Math.imul(p,W)|0,i=i+Math.imul(b,V)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(h,X)|0,i=i+Math.imul(h,Z)|0,i=i+Math.imul(d,X)|0,o=o+Math.imul(d,Z)|0;var mt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(E,z),i=Math.imul(E,q),i=i+Math.imul(A,z)|0,o=Math.imul(A,q),n=n+Math.imul(w,K)|0,i=i+Math.imul(w,G)|0,i=i+Math.imul(_,K)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,V)|0,i=i+Math.imul(v,W)|0,i=i+Math.imul(g,V)|0,o=o+Math.imul(g,W)|0,n=n+Math.imul(p,X)|0,i=i+Math.imul(p,Z)|0,i=i+Math.imul(b,X)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(h,Q)|0,i=i+Math.imul(h,tt)|0,i=i+Math.imul(d,Q)|0,o=o+Math.imul(d,tt)|0;var wt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(x,z),i=Math.imul(x,q),i=i+Math.imul(k,z)|0,o=Math.imul(k,q),n=n+Math.imul(E,K)|0,i=i+Math.imul(E,G)|0,i=i+Math.imul(A,K)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(w,V)|0,i=i+Math.imul(w,W)|0,i=i+Math.imul(_,V)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(v,X)|0,i=i+Math.imul(v,Z)|0,i=i+Math.imul(g,X)|0,o=o+Math.imul(g,Z)|0,n=n+Math.imul(p,Q)|0,i=i+Math.imul(p,tt)|0,i=i+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(h,rt)|0,i=i+Math.imul(h,nt)|0,i=i+Math.imul(d,rt)|0,o=o+Math.imul(d,nt)|0;var _t=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,z),i=Math.imul(O,q),i=i+Math.imul(I,z)|0,o=Math.imul(I,q),n=n+Math.imul(x,K)|0,i=i+Math.imul(x,G)|0,i=i+Math.imul(k,K)|0,o=o+Math.imul(k,G)|0,n=n+Math.imul(E,V)|0,i=i+Math.imul(E,W)|0,i=i+Math.imul(A,V)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(w,X)|0,i=i+Math.imul(w,Z)|0,i=i+Math.imul(_,X)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(v,Q)|0,i=i+Math.imul(v,tt)|0,i=i+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0,n=n+Math.imul(p,rt)|0,i=i+Math.imul(p,nt)|0,i=i+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(h,ot)|0,i=i+Math.imul(h,at)|0,i=i+Math.imul(d,ot)|0,o=o+Math.imul(d,at)|0;var St=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(R,z),i=Math.imul(R,q),i=i+Math.imul(B,z)|0,o=Math.imul(B,q),n=n+Math.imul(O,K)|0,i=i+Math.imul(O,G)|0,i=i+Math.imul(I,K)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(x,V)|0,i=i+Math.imul(x,W)|0,i=i+Math.imul(k,V)|0,o=o+Math.imul(k,W)|0,n=n+Math.imul(E,X)|0,i=i+Math.imul(E,Z)|0,i=i+Math.imul(A,X)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(w,Q)|0,i=i+Math.imul(w,tt)|0,i=i+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=i+Math.imul(v,nt)|0,i=i+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0,n=n+Math.imul(p,ot)|0,i=i+Math.imul(p,at)|0,i=i+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(h,st)|0,i=i+Math.imul(h,ut)|0,i=i+Math.imul(d,st)|0,o=o+Math.imul(d,ut)|0;var Et=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(j,z),i=Math.imul(j,q),i=i+Math.imul(N,z)|0,o=Math.imul(N,q),n=n+Math.imul(R,K)|0,i=i+Math.imul(R,G)|0,i=i+Math.imul(B,K)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(O,V)|0,i=i+Math.imul(O,W)|0,i=i+Math.imul(I,V)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(x,X)|0,i=i+Math.imul(x,Z)|0,i=i+Math.imul(k,X)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(E,Q)|0,i=i+Math.imul(E,tt)|0,i=i+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(w,rt)|0,i=i+Math.imul(w,nt)|0,i=i+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=i+Math.imul(v,at)|0,i=i+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0,n=n+Math.imul(p,st)|0,i=i+Math.imul(p,ut)|0,i=i+Math.imul(b,st)|0,o=o+Math.imul(b,ut)|0,n=n+Math.imul(h,ht)|0,i=i+Math.imul(h,dt)|0,i=i+Math.imul(d,ht)|0,o=o+Math.imul(d,dt)|0;var At=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(U,z),i=Math.imul(U,q),i=i+Math.imul(D,z)|0,o=Math.imul(D,q),n=n+Math.imul(j,K)|0,i=i+Math.imul(j,G)|0,i=i+Math.imul(N,K)|0,o=o+Math.imul(N,G)|0,n=n+Math.imul(R,V)|0,i=i+Math.imul(R,W)|0,i=i+Math.imul(B,V)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(O,X)|0,i=i+Math.imul(O,Z)|0,i=i+Math.imul(I,X)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(x,Q)|0,i=i+Math.imul(x,tt)|0,i=i+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,n=n+Math.imul(E,rt)|0,i=i+Math.imul(E,nt)|0,i=i+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(w,ot)|0,i=i+Math.imul(w,at)|0,i=i+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(v,st)|0,i=i+Math.imul(v,ut)|0,i=i+Math.imul(g,st)|0,o=o+Math.imul(g,ut)|0,n=n+Math.imul(p,ht)|0,i=i+Math.imul(p,dt)|0,i=i+Math.imul(b,ht)|0,o=o+Math.imul(b,dt)|0,n=n+Math.imul(h,pt)|0,i=i+Math.imul(h,bt)|0,i=i+Math.imul(d,pt)|0,o=o+Math.imul(d,bt)|0;var Mt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(U,K),i=Math.imul(U,G),i=i+Math.imul(D,K)|0,o=Math.imul(D,G),n=n+Math.imul(j,V)|0,i=i+Math.imul(j,W)|0,i=i+Math.imul(N,V)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(R,X)|0,i=i+Math.imul(R,Z)|0,i=i+Math.imul(B,X)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(O,Q)|0,i=i+Math.imul(O,tt)|0,i=i+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(x,rt)|0,i=i+Math.imul(x,nt)|0,i=i+Math.imul(k,rt)|0,o=o+Math.imul(k,nt)|0,n=n+Math.imul(E,ot)|0,i=i+Math.imul(E,at)|0,i=i+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(w,st)|0,i=i+Math.imul(w,ut)|0,i=i+Math.imul(_,st)|0,o=o+Math.imul(_,ut)|0,n=n+Math.imul(v,ht)|0,i=i+Math.imul(v,dt)|0,i=i+Math.imul(g,ht)|0,o=o+Math.imul(g,dt)|0,n=n+Math.imul(p,pt)|0,i=i+Math.imul(p,bt)|0,i=i+Math.imul(b,pt)|0,o=o+Math.imul(b,bt)|0;var xt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(U,V),i=Math.imul(U,W),i=i+Math.imul(D,V)|0,o=Math.imul(D,W),n=n+Math.imul(j,X)|0,i=i+Math.imul(j,Z)|0,i=i+Math.imul(N,X)|0,o=o+Math.imul(N,Z)|0,n=n+Math.imul(R,Q)|0,i=i+Math.imul(R,tt)|0,i=i+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(O,rt)|0,i=i+Math.imul(O,nt)|0,i=i+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(x,ot)|0,i=i+Math.imul(x,at)|0,i=i+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,n=n+Math.imul(E,st)|0,i=i+Math.imul(E,ut)|0,i=i+Math.imul(A,st)|0,o=o+Math.imul(A,ut)|0,n=n+Math.imul(w,ht)|0,i=i+Math.imul(w,dt)|0,i=i+Math.imul(_,ht)|0,o=o+Math.imul(_,dt)|0,n=n+Math.imul(v,pt)|0,i=i+Math.imul(v,bt)|0,i=i+Math.imul(g,pt)|0,o=o+Math.imul(g,bt)|0;var kt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(U,X),i=Math.imul(U,Z),i=i+Math.imul(D,X)|0,o=Math.imul(D,Z),n=n+Math.imul(j,Q)|0,i=i+Math.imul(j,tt)|0,i=i+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(R,rt)|0,i=i+Math.imul(R,nt)|0,i=i+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(O,ot)|0,i=i+Math.imul(O,at)|0,i=i+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(x,st)|0,i=i+Math.imul(x,ut)|0,i=i+Math.imul(k,st)|0,o=o+Math.imul(k,ut)|0,n=n+Math.imul(E,ht)|0,i=i+Math.imul(E,dt)|0,i=i+Math.imul(A,ht)|0,o=o+Math.imul(A,dt)|0,n=n+Math.imul(w,pt)|0,i=i+Math.imul(w,bt)|0,i=i+Math.imul(_,pt)|0,o=o+Math.imul(_,bt)|0;var Tt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(U,Q),i=Math.imul(U,tt),i=i+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(j,rt)|0,i=i+Math.imul(j,nt)|0,i=i+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(R,ot)|0,i=i+Math.imul(R,at)|0,i=i+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(O,st)|0,i=i+Math.imul(O,ut)|0,i=i+Math.imul(I,st)|0,o=o+Math.imul(I,ut)|0,n=n+Math.imul(x,ht)|0,i=i+Math.imul(x,dt)|0,i=i+Math.imul(k,ht)|0,o=o+Math.imul(k,dt)|0,n=n+Math.imul(E,pt)|0,i=i+Math.imul(E,bt)|0,i=i+Math.imul(A,pt)|0,o=o+Math.imul(A,bt)|0;var Ot=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(U,rt),i=Math.imul(U,nt),i=i+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(j,ot)|0,i=i+Math.imul(j,at)|0,i=i+Math.imul(N,ot)|0,o=o+Math.imul(N,at)|0,n=n+Math.imul(R,st)|0,i=i+Math.imul(R,ut)|0,i=i+Math.imul(B,st)|0,o=o+Math.imul(B,ut)|0,n=n+Math.imul(O,ht)|0,i=i+Math.imul(O,dt)|0,i=i+Math.imul(I,ht)|0,o=o+Math.imul(I,dt)|0,n=n+Math.imul(x,pt)|0,i=i+Math.imul(x,bt)|0,i=i+Math.imul(k,pt)|0,o=o+Math.imul(k,bt)|0;var It=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(U,ot),i=Math.imul(U,at),i=i+Math.imul(D,ot)|0,o=Math.imul(D,at),n=n+Math.imul(j,st)|0,i=i+Math.imul(j,ut)|0,i=i+Math.imul(N,st)|0,o=o+Math.imul(N,ut)|0,n=n+Math.imul(R,ht)|0,i=i+Math.imul(R,dt)|0,i=i+Math.imul(B,ht)|0,o=o+Math.imul(B,dt)|0,n=n+Math.imul(O,pt)|0,i=i+Math.imul(O,bt)|0,i=i+Math.imul(I,pt)|0,o=o+Math.imul(I,bt)|0;var Pt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(U,st),i=Math.imul(U,ut),i=i+Math.imul(D,st)|0,o=Math.imul(D,ut),n=n+Math.imul(j,ht)|0,i=i+Math.imul(j,dt)|0,i=i+Math.imul(N,ht)|0,o=o+Math.imul(N,dt)|0,n=n+Math.imul(R,pt)|0,i=i+Math.imul(R,bt)|0,i=i+Math.imul(B,pt)|0,o=o+Math.imul(B,bt)|0;var Rt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(U,ht),i=Math.imul(U,dt),i=i+Math.imul(D,ht)|0,o=Math.imul(D,dt),n=n+Math.imul(j,pt)|0,i=i+Math.imul(j,bt)|0,i=i+Math.imul(N,pt)|0,o=o+Math.imul(N,bt)|0;var Bt=(u+n|0)+((8191&i)<<13)|0;u=(o+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(U,pt),i=Math.imul(U,bt),i=i+Math.imul(D,pt)|0,o=Math.imul(D,bt);var Ct=(u+n|0)+((8191&i)<<13)|0;return u=(o+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,s[0]=yt,s[1]=vt,s[2]=gt,s[3]=mt,s[4]=wt,s[5]=_t,s[6]=St,s[7]=Et,s[8]=At,s[9]=Mt,s[10]=xt,s[11]=kt,s[12]=Tt,s[13]=Ot,s[14]=It,s[15]=Pt,s[16]=Rt,s[17]=Bt,s[18]=Ct,0!==u&&(s[19]=u,r.length++),r};Math.imul||(A=u),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?A(this,t,e):r<63?u(this,t,e):r<1024?c(this,t,e):h(this,t,e)},d.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},d.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=s(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0);var i;i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),f=67108863^67108863>>>o<a)for(this.length-=a,u=0;u=0&&(0!==c||u>=i);u--){var h=0|this.words[u];this.words[u]=c<<26-o|h>>>o,c=h&f}return s&&0!==c&&(s.words[s.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(s/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===f)return this.strip();for(n(-1===f),f=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=this.length-t.length,n=this.clone(),i=t,a=0|i.words[i.length-1];0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var f,s=n.length-i.length;if("mod"!==e){f=new o(null),f.length=s+1,f.words=new Array(f.length);for(var u=0;u=0;h--){var d=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(i,d,h);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);f&&(f.words[h]=d)}return f&&f.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:f||null,mod:n}},o.prototype.divmod=function(t,e,r){if(n(!t.isZero()),this.isZero())return{div:new o(0),mod:new o(0)};var i,a,f;return 0!==this.negative&&0===t.negative?(f=this.neg().divmod(t,e),"mod"!==e&&(i=f.div.neg()),"div"!==e&&(a=f.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(f=this.divmod(t.neg(),e),"mod"!==e&&(i=f.div.neg()),{div:i,mod:f.mod}):0!=(this.negative&t.negative)?(f=this.neg().divmod(t.neg(),e),"div"!==e&&(a=f.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:f.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e)},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),f=new o(0),s=new o(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),h=e.clone();!e.isZero();){for(var d=0,l=1;0==(e.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(h)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(r.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(f.isOdd()||s.isOdd())&&(f.iadd(c),s.isub(h)),f.iushrn(1),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(f),a.isub(s)):(r.isub(e),f.isub(i),s.isub(a))}return{a:f,b:s,gcd:r.iushln(u)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),f=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var s=0,u=1;0==(e.words[0]&u)&&s<26;++s,u<<=1);if(s>0)for(e.iushrn(s);s-- >0;)i.isOdd()&&i.iadd(f),i.iushrn(1);for(var c=0,h=1;0==(r.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(r.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(f),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a)):(r.isub(e),a.isub(i))}var d;return d=0===e.cmpn(1)?i:a,d.cmpn(0)<0&&d.iadd(t),d},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,f&=67108863,this.words[a]=f}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e=t<0;if(0!==this.negative&&!e)return-1;if(0===this.negative&&e)return 1;this.strip();var r;if(this.length>1)r=1;else{e&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];r=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new g(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var M={k256:null,p224:null,p192:null,p25519:null};l.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},l.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),e=r.bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},l.prototype.split=function(t,e){t.iushrn(this.n,0,e)},l.prototype.imulK=function(t){return t.imul(this.k)},i(p,l),p.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},p.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(M[t])return M[t];var e;if("k256"===t)e=new p;else if("p224"===t)e=new b;else if("p192"===t)e=new y;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new v}return M[t]=e,e},g.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},g.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},g.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},g.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},g.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},g.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},g.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},g.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},g.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},g.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},g.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},g.prototype.isqr=function(t){return this.imul(t,t.clone())},g.prototype.sqr=function(t){return this.mul(t,t)},g.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var f=new o(1).toRed(this),s=f.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,u).cmp(s);)c.redIAdd(s);for(var h=this.pow(c,i),d=this.pow(t,i.addn(1).iushrn(1)),l=this.pow(t,i),p=a;0!==l.cmp(f);){for(var b=l,y=0;0!==b.cmp(f);y++)b=b.redSqr();n(y=0;n--){for(var u=e.words[n],c=s-1;c>=0;c--){var h=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==a?(a<<=1,a|=h,(4==++f||0===n&&0===c)&&(i=this.mul(i,r[a]),f=0,a=0)):f=0}s=26}return i},g.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},g.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new m(t)},i(m,g),m.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},m.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},m.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},m.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},m.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)}).call(e,r(467)(t))},function(t,e,r){var n=r(36),i=Math.min;t.exports=function(t){return t>0?i(n(t),9007199254740991):0}},function(t,e,r){var n=r(23);t.exports=function(t){return Object(n(t))}},function(t,e,r){"use strict";var n=e;n.version=r(436).version,n.utils=r(426),n.rand=r(137),n.hmacDRBG=r(424),n.curve=r(87),n.curves=r(417),n.ec=r(418),n.eddsa=r(421)},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,r){var n=r(9),i=r(35);t.exports=r(8)?function(t,e,r){return n.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){var n=r(4),i=r(16),o=r(14),a=r(45)("src"),f="toString",s=Function[f],u=(""+s).split(f);r(29).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,r,f){var s="function"==typeof r;s&&(o(r,"name")||i(r,"name",e)),t[e]!==r&&(s&&(o(r,a)||i(r,a,t[e]?""+t[e]:u.join(String(e)))),t===n?t[e]=r:f?t[e]?t[e]=r:i(t,e,r):(delete t[e],i(t,e,r)))})(Function.prototype,f,function(){return"function"==typeof this&&this[a]||s.call(this)})},function(t,e,r){var n=r(0),i=r(5),o=r(23),a=/"/g,f=function(t,e,r,n){var i=String(o(t)),f="<"+e;return""!==r&&(f+=" "+r+'="'+String(n).replace(a,""")+'"'),f+">"+i+""};t.exports=function(t,e){var r={};r[t]=e(f),n(n.P+n.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",r)}},function(t,e,r){var n=r(64),i=r(23);t.exports=function(t){return n(i(t))}},function(t,e,r){var n=r(65),i=r(35),o=r(19),a=r(27),f=r(14),s=r(156),u=Object.getOwnPropertyDescriptor;e.f=r(8)?u:function(t,e){if(t=o(t),e=a(e,!0),s)try{return u(t,e)}catch(t){}if(f(t,e))return i(!n.f.call(t,e),t[e])}},function(t,e,r){var n=r(14),i=r(12),o=r(113)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),n(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var n=r(5);t.exports=function(t,e){return!!t&&n(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,r){var n=r(30),i=r(64),o=r(12),a=r(11),f=r(224);t.exports=function(t,e){var r=1==t,s=2==t,u=3==t,c=4==t,h=6==t,d=5==t||h,l=e||f;return function(e,f,p){for(var b,y,v=o(e),g=i(v),m=n(f,p,3),w=a(g.length),_=0,S=r?l(e,w):s?l(e,0):void 0;w>_;_++)if((d||_ in g)&&(b=g[_],y=m(b,_,v),t))if(r)S[_]=y;else if(y)switch(t){case 3:return!0;case 5:return b;case 6:return _;case 2:S.push(b)}else if(c)return!1;return h?-1:u||c?c:S}}},function(t,e,r){var n=r(0),i=r(29),o=r(5);t.exports=function(t,e){var r=(i.Object||{})[t]||Object[t],a={};a[t]=e(r),n(n.S+n.F*o(function(){r(1)}),"Object",a)}},function(t,e,r){var n=r(6);t.exports=function(t,e){if(!n(t))return t;var r,i;if(e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;if("function"==typeof(r=t.valueOf)&&!n(i=r.call(t)))return i;if(!e&&"function"==typeof(r=t.toString)&&!n(i=r.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(c===setTimeout)return setTimeout(t,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===n||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function a(){b&&l&&(b=!1,l.length?p=l.concat(p):y=-1,p.length&&f())}function f(){if(!b){var t=i(a);b=!0;for(var e=p.length;e;){for(l=p,p=[];++y1)for(var r=1;rr;)i[r]=e[r++];return i},jt=function(t,e,r){z(t,e,{get:function(){return this._d[r]}})},Nt=function(t){var e,r,n,i,o,a,f=S(t),s=arguments.length,c=s>1?arguments[1]:void 0,h=void 0!==c,d=k(f);if(void 0!=d&&!E(d)){for(a=d.call(f),n=[],e=0;!(o=a.next()).done;e++)n.push(o.value);f=n}for(h&&s>2&&(c=u(c,arguments[2],2)),e=0,r=b(f.length),i=Rt(this,r);r>e;e++)i[e]=h?c(f[e],e):f[e];return i},Lt=function(){for(var t=0,e=arguments.length,r=Rt(this,e);e>t;)r[t]=arguments[t++];return r},Ut=!!G&&o(function(){vt.call(new G(1))}),Dt=function(){return vt.apply(Ut?bt.call(Pt(this)):Pt(this),arguments)},Ft={copyWithin:function(t,e){return U.call(Pt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return rt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return L.apply(Pt(this),arguments)},filter:function(t){return Bt(this,tt(Pt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return nt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return it(Pt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Q(Pt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return at(Pt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return ot(Pt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return lt.apply(Pt(this),arguments)},lastIndexOf:function(t){return ct.apply(Pt(this),arguments)},map:function(t){return xt(Pt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ht.apply(Pt(this),arguments)},reduceRight:function(t){return dt.apply(Pt(this),arguments)},reverse:function(){for(var t,e=this,r=Pt(e).length,n=Math.floor(r/2),i=0;i1?arguments[1]:void 0)},sort:function(t){return pt.call(Pt(this),t)},subarray:function(t,e){var r=Pt(this),n=r.length,i=y(t,n);return new(R(r,r[_t]))(r.buffer,r.byteOffset+i*r.BYTES_PER_ELEMENT,b((void 0===e?n:y(e,n))-i))}},zt=function(t,e){return Bt(this,bt.call(Pt(this),t,e))},qt=function(t){Pt(this);var e=It(arguments[1],1),r=this.length,n=S(t),i=b(n.length),o=0;if(i+e>r)throw Y(Mt);for(;o255?255:255&n),i.v[p](r*e+i.o,n,kt)},O=function(t,e){z(t,e,{get:function(){return k(this,e)},set:function(t){return T(this,e,t)},enumerable:!0})};m?(y=r(function(t,r,n,i){c(t,y,u,"_d");var o,a,f,s,h=0,l=0;if(_(r)){if(!(r instanceof Z||(s=w(r))==H||s==V))return Et in r?Ct(y,r):Nt.call(y,r);o=r,l=It(n,e);var p=r.byteLength;if(void 0===i){if(p%e)throw Y(Mt);if((a=p-l)<0)throw Y(Mt)}else if((a=b(i)*e)+l>p)throw Y(Mt);f=a/e}else f=Ot(r,!0),a=f*e,o=new Z(a);for(d(t,"_d",{b:o,o:l,l:a,e:f,v:new $(o)});h0?n:r)(t)}},function(t,e){t.exports=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t}},function(t,e){t.exports=!1},function(t,e,r){var n=r(2),i=r(162),o=r(101),a=r(113)("IE_PROTO"),f=function(){},s="prototype",u=function(){var t,e=r(100)("iframe"),n=o.length;for(e.style.display="none",r(103).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("