wehelpjs
Version:
wehelpjs is the JavaScript API Library for the WeYouMe blockchain
1 lines • 614 kB
JavaScript
!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={};e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var i in t)e.d(n,i,function(e){return t[e]}.bind(null,i));return 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=131)}([function(t){t.exports="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){function n(t,e){for(var r in t)e[r]=t[r]}function i(t,e,r){return s(t,e,r)}var o=r(2),s=o.Buffer;s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=o:(n(o,e),e.Buffer=i),n(s,i),i.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return s(t,e,r)},i.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=s(t);return void 0===e?n.fill(0):"string"==typeof r?n.fill(e,r):n.fill(e),n},i.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return s(t)},i.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return o.SlowBuffer(t)}},function(t,e,r){"use strict";var n=Math.floor,i=Math.pow,o=String.fromCharCode,s=Math.min;(function(t){function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function f(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=c.prototype:(null===t&&(t=new c(e)),t.length=e),t}function c(t,e,r){if(!(c.TYPED_ARRAY_SUPPORT||this instanceof c))return new c(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return d(this,t)}return u(this,t,e,r)}function u(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,0>r||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),c.TYPED_ARRAY_SUPPORT?(t=e).__proto__=c.prototype:t=l(t,e),t}(t,e,r,n):"string"==typeof e?function(t,e,r){if(("string"!=typeof r||""===r)&&(r="utf8"),!c.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|b(e,r),i=(t=f(t,n)).write(e,r);return i!==n&&(t=t.slice(0,i)),t}(t,e,r):function(t,e){if(c.isBuffer(e)){var r=0|p(e.length);return 0===(t=f(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?f(t,0):l(t,e);if("Buffer"===e.type&&V(e.data))return l(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(0>t)throw new RangeError('"size" argument must not be negative')}function d(t,e){if(h(e),t=f(t,0>e?0:0|p(e)),!c.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function l(t,e){var r=0>e.length?0:0|p(e.length);t=f(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function b(t,e){if(c.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 M(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return N(t).length;default:if(n)return M(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:-2147483648>r&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),0>r&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(0>r){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,i);if("number"==typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,i){function o(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var s,a=1,f=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=(n+"").toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(2>t.length||2>e.length)return-1;a=2,f/=2,c/=2,r/=2}if(i){var u=-1;for(s=r;s<f;s++)if(o(t,s)!==o(e,-1==u?0:s-u))-1!=u&&(s-=s-u),u=-1;else if(-1==u&&(u=s),s-u+1===c)return u*a}else for(r+c>f&&(r=f-c),s=r;0<=s;s--){for(var h=!0,d=0;d<c;d++)if(o(t,s+d)!==o(e,d)){h=!1;break}if(h)return s}return-1}function m(t,e,r,n){r=+r||0;var i=t.length-r;n?(n=+n)>i&&(n=i):n=i;var o=e.length;if(0!=o%2)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s,a=0;a<n;++a){if(s=parseInt(e.substr(2*a,2),16),isNaN(s))return a;t[r+a]=s}return a}function _(t,e,r,n){return z(M(e,t.length-r),t,r,n)}function w(t,e,r,n){return z(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return w(t,e,r,n)}function S(t,e,r,n){return z(N(e),t,r,n)}function x(t,e,r,n){return z(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!(0>(e-=2));++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function k(t,e,r){return 0===e&&r===t.length?H.fromByteArray(t):H.fromByteArray(t.slice(e,r))}function A(t,e,r){r=s(t.length,r);for(var n=[],i=e;i<r;){var o,a,f,c,u=t[i],h=null,d=239<u?4:223<u?3:191<u?2:1;if(i+d<=r)1==d?128>u&&(h=u):2==d?128==(192&(o=t[i+1]))&&(127<(c=(31&u)<<6|63&o)&&(h=c)):3==d?(o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(2047<(c=(15&u)<<12|(63&o)<<6|63&a)&&(55296>c||57343<c)&&(h=c))):4==d&&(o=t[i+1],a=t[i+2],f=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&f)&&(65535<(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&f)&&1114112>c&&(h=c)));null===h?(h=65533,d=1):65535<h&&(h-=65536,n.push(55296|1023&h>>>10),h=56320|1023&h),n.push(h),i+=d}return B(n)}function B(t){var e=t.length;if(e<=$)return o.apply(String,t);for(var r="",n=0;n<e;)r+=o.apply(String,t.slice(n,n+=$));return r}function T(t,e,r){var n="";r=s(t.length,r);for(var i=e;i<r;++i)n+=o(127&t[i]);return n}function I(t,e,r){var n="";r=s(t.length,r);for(var i=e;i<r;++i)n+=o(t[i]);return n}function j(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=U(t[o]);return i}function R(t,e,r){for(var n=t.slice(e,r),i="",s=0;s<n.length;s+=2)i+=o(n[s]+256*n[s+1]);return i}function C(t,e,r){if(0!=t%1||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function P(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=s(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function L(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=s(t.length-r,4);i<o;++i)t[r+i]=255&e>>>8*(n?i:3-i)}function D(t,e,r,n){if(r+n>t.length)throw new RangeError("Index out of range");if(0>r)throw new RangeError("Index out of range")}function F(t,e,r,n,i){return i||D(t,0,r,4),K.write(t,e,r,n,23,4),r+4}function q(t,e,r,n,i){return i||D(t,0,r,8),K.write(t,e,r,n,52,8),r+8}function U(t){return 16>t?"0"+t.toString(16):t.toString(16)}function M(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;s<n;++s){if(55295<(r=t.charCodeAt(s))&&57344>r){if(!i){if(56319<r){-1<(e-=3)&&o.push(239,191,189);continue}if(s+1===n){-1<(e-=3)&&o.push(239,191,189);continue}i=r;continue}if(56320>r){-1<(e-=3)&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&-1<(e-=3)&&o.push(239,191,189);if(i=null,128>r){if(0>(e-=1))break;o.push(r)}else if(2048>r){if(0>(e-=2))break;o.push(192|r>>6,128|63&r)}else if(65536>r){if(0>(e-=3))break;o.push(224|r>>12,128|63&r>>6,128|63&r)}else{if(!(1114112>r))throw new Error("Invalid code point");if(0>(e-=4))break;o.push(240|r>>18,128|63&r>>12,128|63&r>>6,128|63&r)}}return o}function N(t){return H.toByteArray(function(t){if(2>(t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(W,"")).length)return"";for(;0!=t.length%4;)t+="=";return t}(t))}function z(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}var H=r(166),K=r(167),V=r(75);e.Buffer=c,e.SlowBuffer=function(t){return+t!=t&&(t=0),c.alloc(+t)},e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0===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}}():t.TYPED_ARRAY_SUPPORT,e.kMaxLength=a(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,r){return u(null,t,e,r)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,r){return function(t,e,r,n){return h(e),0>=e?f(t,e):void 0===r?f(t,e):"string"==typeof n?f(t,e).fill(r,n):f(t,e).fill(r)}(null,t,e,r)},c.allocUnsafe=function(t){return d(null,t)},c.allocUnsafeSlow=function(t){return d(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=s(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch((t+"").toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!V(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=c.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},c.byteLength=b,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var t=this.length;if(0!=t%2)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},c.prototype.swap32=function(){var t=this.length;if(0!=t%4)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},c.prototype.swap64=function(){var t=this.length;if(0!=t%8)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},c.prototype.toString=function(){var t=0|this.length;return 0==t?"":0===arguments.length?A(this,0,t):function(t,e,r){var n=!1;if((void 0===e||0>e)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),0>=r)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return j(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return T(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return 0<this.length&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},c.prototype.compare=function(t,e,r,n,i){if(!c.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),0>e||r>t.length||0>n||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 o=i-n,a=r-e,f=s(o,a),u=this.slice(n,i),h=t.slice(e,r),d=0;d<f;++d)if(u[d]!==h[d]){o=u[d],a=h[d];break}return o<a?-1:a<o?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return v(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return v(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),0<t.length&&(0>r||0>e)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return E(this,t,e,r);case"base64":return S(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}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;c.prototype.slice=function(t,e){var r,n=this.length;if(t=~~t,e=void 0===e?n:~~e,0>t?0>(t+=n)&&(t=0):t>n&&(t=n),0>e?0>(e+=n)&&(e=0):e>n&&(e=n),e<t&&(e=t),c.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=c.prototype;else{var i=e-t;r=new c(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},c.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},c.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t+--e],i=1;0<e&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUInt8=function(t,e){return e||C(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||C(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||C(t,2,this.length),this[t]<<8|this[t+1]},c.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]},c.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])},c.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t],o=1,s=0;++s<e&&(o*=256);)n+=this[t+s]*o;return n>=(o*=128)&&(n-=i(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=e,o=1,s=this[t+--n];0<n&&(o*=256);)s+=this[t+--n]*o;return s>=(o*=128)&&(s-=i(2,8*e)),s},c.prototype.readInt8=function(t,e){return e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.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},c.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},c.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},c.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]},c.prototype.readFloatLE=function(t,e){return e||C(t,4,this.length),K.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||C(t,4,this.length),K.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||C(t,8,this.length),K.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||C(t,8,this.length),K.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||O(this,t,e,r,i(2,8*r)-1,0);var o=1,s=0;for(this[e]=255&t;++s<r&&(o*=256);)this[e+s]=255&t/o;return e+r},c.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||O(this,t,e,r,i(2,8*r)-1,0);var o=r-1,s=1;for(this[e+o]=255&t;0<=--o&&(s*=256);)this[e+o]=255&t/s;return e+r},c.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=n(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,4294967295,0),c.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},c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,4294967295,0),c.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},c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=i(2,8*r-1);O(this,t,e,r,o-1,-o)}var s=0,a=1,f=0;for(this[e]=255&t;++s<r&&(a*=256);)0>t&&0==f&&0!==this[e+s-1]&&(f=1),this[e+s]=255&(t/a>>0)-f;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=i(2,8*r-1);O(this,t,e,r,o-1,-o)}var s=r-1,a=1,f=0;for(this[e+s]=255&t;0<=--s&&(a*=256);)0>t&&0==f&&0!==this[e+s+1]&&(f=1),this[e+s]=255&(t/a>>0)-f;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=n(t)),0>t&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):P(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):P(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,2147483647,-2147483648),c.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},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||O(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),c.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},c.prototype.writeFloatLE=function(t,e,r){return F(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return F(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return q(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return q(this,t,e,!1,r)},c.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),0<n&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>n)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;0<=i;--i)t[i+e]=this[i+r];else if(1e3>o||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);256>i&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(0>e||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=c.isBuffer(t)?t:M(new c(t,n).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var W=/[^+\/0-9A-Za-z-_]/g}).call(this,r(4))},function(t,e,r){var n=Math.round,i=Math.max,o=Math.ceil,s=Math.min;(function(t){!function(t,e){"use strict";function a(t,e){if(!t)throw new Error(e||"Assertion failed")}function f(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function c(t,e,r){return c.isBN(t)?t:(this.negative=0,this.words=null,this.length=0,this.red=null,void(null!==t&&(("le"===e||"be"===e)&&(r=e,e=10),this._init(t||0,e||10,r||"be"))))}function u(t,e,r){for(var n,i=0,o=s(t.length,r),a=e;a<o;a++)i<<=4,i|=49<=(n=t.charCodeAt(a)-48)&&54>=n?n-49+10:17<=n&&22>=n?n-17+10:15&n;return i}function h(t,e,r,n){for(var i,o=0,a=s(t.length,r),f=e;f<a;f++)o*=n,o+=49<=(i=t.charCodeAt(f)-48)?i-49+10:17<=i?i-17+10:i;return o}function d(t,e,r){r.negative=e.negative^t.negative;var n=0|t.length+e.length;r.length=n,n=0|n-1;var o=0|t.words[0],a=0|e.words[0],f=o*a,c=67108863&f,u=0|f/67108864;r.words[0]=c;for(var h=1;h<n;h++){for(var d,l=u>>>26,p=67108863&u,b=s(h,e.length-1),y=i(0,h-t.length+1);y<=b;y++)d=0|h-y,l+=0|(f=(o=0|t.words[d])*(a=0|e.words[y])+p)/67108864,p=67108863&f;r.words[h]=0|p,u=0|l}return 0==u?r.length--:r.words[h]=0|u,r.strip()}function l(t,e,r){return(new p).mulp(t,e,r)}function p(t,e){this.x=t,this.y=e}function b(t,e){this.name=t,this.p=new c(e,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function m(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(t){if("string"==typeof t){var e=c._prime(t);this.m=e.p,this.prime=e}else a(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function w(t){_.call(this,t),this.shift=this.m.bitLength(),0!=this.shift%26&&(this.shift+=26-this.shift%26),this.r=new c(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)}var E,S=Math.imul,x=Math.clz32;"object"==typeof t?t.exports=c:e.BN=c,c.BN=c,c.wordSize=26;try{E=r(220).Buffer}catch(e){}c.isBN=function(t){return!!(t instanceof c)||null!==t&&"object"==typeof t&&t.constructor.wordSize===c.wordSize&&Array.isArray(t.words)},c.max=function(t,e){return 0<t.cmp(e)?t:e},c.min=function(t,e){return 0>t.cmp(e)?t:e},c.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),a(e===(0|e)&&2<=e&&36>=e);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&n++,16===e?this._parseHex(t,n):this._parseBase(t,e,n),"-"===t[0]&&(this.negative=1),this.strip(),"le"!==r||this._initArray(this.toArray(),e,r)},c.prototype._initNumber=function(t,e,r){0>t&&(this.negative=1,t=-t),67108864>t?(this.words=[67108863&t],this.length=1):4503599627370496>t?(this.words=[67108863&t,67108863&t/67108864],this.length=2):(a(9007199254740992>t),this.words=[67108863&t,67108863&t/67108864,1],this.length=3),"le"!==r||this._initArray(this.toArray(),e,r)},c.prototype._initArray=function(t,e,r){if(a("number"==typeof t.length),0>=t.length)return this.words=[0],this.length=1,this;this.length=o(t.length/3),this.words=Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,s,f=0;if("be"===r)for(n=t.length-1,i=0;0<=n;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[i]|=67108863&s<<f,this.words[i+1]=67108863&s>>>26-f,26<=(f+=24)&&(f-=26,i++);else if("le"===r)for(n=0,i=0;n<t.length;n+=3)s=t[n]|t[n+1]<<8|t[n+2]<<16,this.words[i]|=67108863&s<<f,this.words[i+1]=67108863&s>>>26-f,26<=(f+=24)&&(f-=26,i++);return this.strip()},c.prototype._parseHex=function(t,e){this.length=o((t.length-e)/6),this.words=Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,s=0;for(r=t.length-6,n=0;r>=e;r-=6)i=u(t,r,r+6),this.words[n]|=67108863&i<<s,this.words[n+1]|=4194303&i>>>26-s,26<=(s+=24)&&(s-=26,n++);r+6!==e&&(i=u(t,e,r+6),this.words[n]|=67108863&i<<s,this.words[n+1]|=4194303&i>>>26-s),this.strip()},c.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;67108863>=i;i*=e)n++;n--,i=0|i/e;for(var o=t.length-r,a=o%n,f=s(o,o-a)+r,c=0,u=r;u<f;u+=n)c=h(t,u,u+n,e),this.imuln(i),67108864>this.words[0]+c?this.words[0]+=c:this._iaddn(c);if(0!=a){var d=1;for(c=h(t,u,t.length,e),u=0;u<a;u++)d*=e;this.imuln(d),67108864>this.words[0]+c?this.words[0]+=c:this._iaddn(c)}},c.prototype.copy=function(t){t.words=Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},c.prototype.clone=function(){var t=new c(null);return this.copy(t),t},c.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},c.prototype.strip=function(){for(;1<this.length&&0===this.words[this.length-1];)this.length--;return this._normSign()},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},c.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var k=["","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"],A=[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],B=[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];c.prototype.toString=function(t,e){var r;if(t=t||10,e=0|e||1,16===t||"hex"===t){r="";for(var n=0,i=0,o=0;o<this.length;o++){var s=this.words[o],f=(16777215&(s<<n|i)).toString(16);r=0!=(i=16777215&s>>>24-n)||o!==this.length-1?k[6-f.length]+f+r:f+r,26<=(n+=2)&&(n-=26,o--)}for(0!=i&&(r=i.toString(16)+r);0!=r.length%e;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&2<=t&&36>=t){var c=A[t],u=B[t];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var d=h.modn(u).toString(t);r=(h=h.idivn(u)).isZero()?d+r:k[c-d.length]+d+r}for(this.isZero()&&(r="0"+r);0!=r.length%e;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}a(!1,"Base should be between 2 and 36")},c.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]:2<this.length&&a(!1,"Number can only safely store up to 53 bits"),0===this.negative?t:-t},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(t,e){return a(void 0!==E),this.toArrayLike(E,t,e)},c.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},c.prototype.toArrayLike=function(t,e,r){var n=this.byteLength(),o=r||i(1,n);a(n<=o,"byte array longer than desired length"),a(0<o,"Requested array length <= 0"),this.strip();var s,f,c=new t(o),u=this.clone();if("le"!==e){for(f=0;f<o-n;f++)c[f]=0;for(f=0;!u.isZero();f++)s=u.andln(255),u.iushrn(8),c[o-f-1]=s}else{for(f=0;!u.isZero();f++)s=u.andln(255),u.iushrn(8),c[f]=s;for(;f<o;f++)c[f]=0}return c},c.prototype._countBits=x?function(t){return 32-x(t)}:function(t){var e=t,r=0;return 4096<=e&&(r+=13,e>>>=13),64<=e&&(r+=7,e>>>=7),8<=e&&(r+=4,e>>>=4),2<=e&&(r+=2,e>>>=2),r+e},c.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},c.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t,e=0,r=0;r<this.length&&(e+=t=this._zeroBits(this.words[r]),26===t);r++);return e},c.prototype.byteLength=function(){return o(this.bitLength()/8)},c.prototype.toTwos=function(t){return 0===this.negative?this.clone():this.abs().inotn(t).iaddn(1)},c.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},c.prototype.isNeg=function(){return 0!==this.negative},c.prototype.neg=function(){return this.clone().ineg()},c.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},c.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]|=t.words[e];return this.strip()},c.prototype.ior=function(t){return a(0==(this.negative|t.negative)),this.iuor(t)},c.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},c.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},c.prototype.iuand=function(t){for(var e=this.length>t.length?t:this,r=0;r<e.length;r++)this.words[r]&=t.words[r];return this.length=e.length,this.strip()},c.prototype.iand=function(t){return a(0==(this.negative|t.negative)),this.iuand(t)},c.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},c.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},c.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},c.prototype.ixor=function(t){return a(0==(this.negative|t.negative)),this.iuxor(t)},c.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},c.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},c.prototype.inotn=function(t){a("number"==typeof t&&0<=t);var e=0|o(t/26),r=t%26;this._expand(e),0<r&&e--;for(var n=0;n<e;n++)this.words[n]=67108863&~this.words[n];return 0<r&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},c.prototype.notn=function(t){return this.clone().inotn(t)},c.prototype.setn=function(t,e){a("number"==typeof t&&0<=t);var r=0|t/26,n=t%26;return this._expand(r+1),e?this.words[r]|=1<<n:this.words[r]&=~(1<<n),this.strip()},c.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!=i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!=i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},c.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},c.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,n,o=this.cmp(t);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;0<o?(r=this,n=t):(r=t,n=this);for(var s=0,a=0;a<n.length;a++)s=(e=(0|r.words[a])-(0|n.words[a])+s)>>26,this.words[a]=67108863&e;for(;0!=s&&a<r.length;a++)s=(e=(0|r.words[a])+s)>>26,this.words[a]=67108863&e;if(0==s&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=i(this.length,a),r!==this&&(this.negative=1),this.strip()},c.prototype.sub=function(t){return this.clone().isub(t)};var T=function(t,e,r){var n,i,o,s=t.words,a=e.words,f=r.words,c=0,u=0|s[0],h=8191&u,d=u>>>13,l=0|s[1],p=8191&l,b=l>>>13,y=0|s[2],v=8191&y,g=y>>>13,m=0|s[3],_=8191&m,w=m>>>13,E=0|s[4],x=8191&E,k=E>>>13,A=0|s[5],B=8191&A,T=A>>>13,I=0|s[6],j=8191&I,R=I>>>13,C=0|s[7],O=8191&C,P=C>>>13,L=0|s[8],D=8191&L,F=L>>>13,q=0|s[9],U=8191&q,M=q>>>13,N=0|a[0],z=8191&N,H=N>>>13,K=0|a[1],V=8191&K,$=K>>>13,W=0|a[2],Y=8191&W,G=W>>>13,X=0|a[3],Z=8191&X,J=X>>>13,Q=0|a[4],tt=8191&Q,et=Q>>>13,rt=0|a[5],nt=8191&rt,it=rt>>>13,ot=0|a[6],st=8191&ot,at=ot>>>13,ft=0|a[7],ct=8191&ft,ut=ft>>>13,ht=0|a[8],dt=8191&ht,lt=ht>>>13,pt=0|a[9],bt=8191&pt,yt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var vt=0|(0|c+(n=S(h,z)))+((8191&(i=0|(i=S(h,H))+S(d,z)))<<13);c=0|(0|(o=S(d,H))+(i>>>13))+(vt>>>26),vt&=67108863,n=S(p,z),i=0|(i=S(p,H))+S(b,z),o=S(b,H);var gt=0|(0|c+(n=0|n+S(h,V)))+((8191&(i=0|(i=0|i+S(h,$))+S(d,V)))<<13);c=0|(0|(o=0|o+S(d,$))+(i>>>13))+(gt>>>26),gt&=67108863,n=S(v,z),i=0|(i=S(v,H))+S(g,z),o=S(g,H),n=0|n+S(p,V),i=0|(i=0|i+S(p,$))+S(b,V),o=0|o+S(b,$);var mt=0|(0|c+(n=0|n+S(h,Y)))+((8191&(i=0|(i=0|i+S(h,G))+S(d,Y)))<<13);c=0|(0|(o=0|o+S(d,G))+(i>>>13))+(mt>>>26),mt&=67108863,n=S(_,z),i=0|(i=S(_,H))+S(w,z),o=S(w,H),n=0|n+S(v,V),i=0|(i=0|i+S(v,$))+S(g,V),o=0|o+S(g,$),n=0|n+S(p,Y),i=0|(i=0|i+S(p,G))+S(b,Y),o=0|o+S(b,G);var _t=0|(0|c+(n=0|n+S(h,Z)))+((8191&(i=0|(i=0|i+S(h,J))+S(d,Z)))<<13);c=0|(0|(o=0|o+S(d,J))+(i>>>13))+(_t>>>26),_t&=67108863,n=S(x,z),i=0|(i=S(x,H))+S(k,z),o=S(k,H),n=0|n+S(_,V),i=0|(i=0|i+S(_,$))+S(w,V),o=0|o+S(w,$),n=0|n+S(v,Y),i=0|(i=0|i+S(v,G))+S(g,Y),o=0|o+S(g,G),n=0|n+S(p,Z),i=0|(i=0|i+S(p,J))+S(b,Z),o=0|o+S(b,J);var wt=0|(0|c+(n=0|n+S(h,tt)))+((8191&(i=0|(i=0|i+S(h,et))+S(d,tt)))<<13);c=0|(0|(o=0|o+S(d,et))+(i>>>13))+(wt>>>26),wt&=67108863,n=S(B,z),i=0|(i=S(B,H))+S(T,z),o=S(T,H),n=0|n+S(x,V),i=0|(i=0|i+S(x,$))+S(k,V),o=0|o+S(k,$),n=0|n+S(_,Y),i=0|(i=0|i+S(_,G))+S(w,Y),o=0|o+S(w,G),n=0|n+S(v,Z),i=0|(i=0|i+S(v,J))+S(g,Z),o=0|o+S(g,J),n=0|n+S(p,tt),i=0|(i=0|i+S(p,et))+S(b,tt),o=0|o+S(b,et);var Et=0|(0|c+(n=0|n+S(h,nt)))+((8191&(i=0|(i=0|i+S(h,it))+S(d,nt)))<<13);c=0|(0|(o=0|o+S(d,it))+(i>>>13))+(Et>>>26),Et&=67108863,n=S(j,z),i=0|(i=S(j,H))+S(R,z),o=S(R,H),n=0|n+S(B,V),i=0|(i=0|i+S(B,$))+S(T,V),o=0|o+S(T,$),n=0|n+S(x,Y),i=0|(i=0|i+S(x,G))+S(k,Y),o=0|o+S(k,G),n=0|n+S(_,Z),i=0|(i=0|i+S(_,J))+S(w,Z),o=0|o+S(w,J),n=0|n+S(v,tt),i=0|(i=0|i+S(v,et))+S(g,tt),o=0|o+S(g,et),n=0|n+S(p,nt),i=0|(i=0|i+S(p,it))+S(b,nt),o=0|o+S(b,it);var St=0|(0|c+(n=0|n+S(h,st)))+((8191&(i=0|(i=0|i+S(h,at))+S(d,st)))<<13);c=0|(0|(o=0|o+S(d,at))+(i>>>13))+(St>>>26),St&=67108863,n=S(O,z),i=0|(i=S(O,H))+S(P,z),o=S(P,H),n=0|n+S(j,V),i=0|(i=0|i+S(j,$))+S(R,V),o=0|o+S(R,$),n=0|n+S(B,Y),i=0|(i=0|i+S(B,G))+S(T,Y),o=0|o+S(T,G),n=0|n+S(x,Z),i=0|(i=0|i+S(x,J))+S(k,Z),o=0|o+S(k,J),n=0|n+S(_,tt),i=0|(i=0|i+S(_,et))+S(w,tt),o=0|o+S(w,et),n=0|n+S(v,nt),i=0|(i=0|i+S(v,it))+S(g,nt),o=0|o+S(g,it),n=0|n+S(p,st),i=0|(i=0|i+S(p,at))+S(b,st),o=0|o+S(b,at);var xt=0|(0|c+(n=0|n+S(h,ct)))+((8191&(i=0|(i=0|i+S(h,ut))+S(d,ct)))<<13);c=0|(0|(o=0|o+S(d,ut))+(i>>>13))+(xt>>>26),xt&=67108863,n=S(D,z),i=0|(i=S(D,H))+S(F,z),o=S(F,H),n=0|n+S(O,V),i=0|(i=0|i+S(O,$))+S(P,V),o=0|o+S(P,$),n=0|n+S(j,Y),i=0|(i=0|i+S(j,G))+S(R,Y),o=0|o+S(R,G),n=0|n+S(B,Z),i=0|(i=0|i+S(B,J))+S(T,Z),o=0|o+S(T,J),n=0|n+S(x,tt),i=0|(i=0|i+S(x,et))+S(k,tt),o=0|o+S(k,et),n=0|n+S(_,nt),i=0|(i=0|i+S(_,it))+S(w,nt),o=0|o+S(w,it),n=0|n+S(v,st),i=0|(i=0|i+S(v,at))+S(g,st),o=0|o+S(g,at),n=0|n+S(p,ct),i=0|(i=0|i+S(p,ut))+S(b,ct),o=0|o+S(b,ut);var kt=0|(0|c+(n=0|n+S(h,dt)))+((8191&(i=0|(i=0|i+S(h,lt))+S(d,dt)))<<13);c=0|(0|(o=0|o+S(d,lt))+(i>>>13))+(kt>>>26),kt&=67108863,n=S(U,z),i=0|(i=S(U,H))+S(M,z),o=S(M,H),n=0|n+S(D,V),i=0|(i=0|i+S(D,$))+S(F,V),o=0|o+S(F,$),n=0|n+S(O,Y),i=0|(i=0|i+S(O,G))+S(P,Y),o=0|o+S(P,G),n=0|n+S(j,Z),i=0|(i=0|i+S(j,J))+S(R,Z),o=0|o+S(R,J),n=0|n+S(B,tt),i=0|(i=0|i+S(B,et))+S(T,tt),o=0|o+S(T,et),n=0|n+S(x,nt),i=0|(i=0|i+S(x,it))+S(k,nt),o=0|o+S(k,it),n=0|n+S(_,st),i=0|(i=0|i+S(_,at))+S(w,st),o=0|o+S(w,at),n=0|n+S(v,ct),i=0|(i=0|i+S(v,ut))+S(g,ct),o=0|o+S(g,ut),n=0|n+S(p,dt),i=0|(i=0|i+S(p,lt))+S(b,dt),o=0|o+S(b,lt);var At=0|(0|c+(n=0|n+S(h,bt)))+((8191&(i=0|(i=0|i+S(h,yt))+S(d,bt)))<<13);c=0|(0|(o=0|o+S(d,yt))+(i>>>13))+(At>>>26),At&=67108863,n=S(U,V),i=0|(i=S(U,$))+S(M,V),o=S(M,$),n=0|n+S(D,Y),i=0|(i=0|i+S(D,G))+S(F,Y),o=0|o+S(F,G),n=0|n+S(O,Z),i=0|(i=0|i+S(O,J))+S(P,Z),o=0|o+S(P,J),n=0|n+S(j,tt),i=0|(i=0|i+S(j,et))+S(R,tt),o=0|o+S(R,et),n=0|n+S(B,nt),i=0|(i=0|i+S(B,it))+S(T,nt),o=0|o+S(T,it),n=0|n+S(x,st),i=0|(i=0|i+S(x,at))+S(k,st),o=0|o+S(k,at),n=0|n+S(_,ct),i=0|(i=0|i+S(_,ut))+S(w,ct),o=0|o+S(w,ut),n=0|n+S(v,dt),i=0|(i=0|i+S(v,lt))+S(g,dt),o=0|o+S(g,lt);var Bt=0|(0|c+(n=0|n+S(p,bt)))+((8191&(i=0|(i=0|i+S(p,yt))+S(b,bt)))<<13);c=0|(0|(o=0|o+S(b,yt))+(i>>>13))+(Bt>>>26),Bt&=67108863,n=S(U,Y),i=0|(i=S(U,G))+S(M,Y),o=S(M,G),n=0|n+S(D,Z),i=0|(i=0|i+S(D,J))+S(F,Z),o=0|o+S(F,J),n=0|n+S(O,tt),i=0|(i=0|i+S(O,et))+S(P,tt),o=0|o+S(P,et),n=0|n+S(j,nt),i=0|(i=0|i+S(j,it))+S(R,nt),o=0|o+S(R,it),n=0|n+S(B,st),i=0|(i=0|i+S(B,at))+S(T,st),o=0|o+S(T,at),n=0|n+S(x,ct),i=0|(i=0|i+S(x,ut))+S(k,ct),o=0|o+S(k,ut),n=0|n+S(_,dt),i=0|(i=0|i+S(_,lt))+S(w,dt),o=0|o+S(w,lt);var Tt=0|(0|c+(n=0|n+S(v,bt)))+((8191&(i=0|(i=0|i+S(v,yt))+S(g,bt)))<<13);c=0|(0|(o=0|o+S(g,yt))+(i>>>13))+(Tt>>>26),Tt&=67108863,n=S(U,Z),i=0|(i=S(U,J))+S(M,Z),o=S(M,J),n=0|n+S(D,tt),i=0|(i=0|i+S(D,et))+S(F,tt),o=0|o+S(F,et),n=0|n+S(O,nt),i=0|(i=0|i+S(O,it))+S(P,nt),o=0|o+S(P,it),n=0|n+S(j,st),i=0|(i=0|i+S(j,at))+S(R,st),o=0|o+S(R,at),n=0|n+S(B,ct),i=0|(i=0|i+S(B,ut))+S(T,ct),o=0|o+S(T,ut),n=0|n+S(x,dt),i=0|(i=0|i+S(x,lt))+S(k,dt),o=0|o+S(k,lt);var It=0|(0|c+(n=0|n+S(_,bt)))+((8191&(i=0|(i=0|i+S(_,yt))+S(w,bt)))<<13);c=0|(0|(o=0|o+S(w,yt))+(i>>>13))+(It>>>26),It&=67108863,n=S(U,tt),i=0|(i=S(U,et))+S(M,tt),o=S(M,et),n=0|n+S(D,nt),i=0|(i=0|i+S(D,it))+S(F,nt),o=0|o+S(F,it),n=0|n+S(O,st),i=0|(i=0|i+S(O,at))+S(P,st),o=0|o+S(P,at),n=0|n+S(j,ct),i=0|(i=0|i+S(j,ut))+S(R,ct),o=0|o+S(R,ut),n=0|n+S(B,dt),i=0|(i=0|i+S(B,lt))+S(T,dt),o=0|o+S(T,lt);var jt=0|(0|c+(n=0|n+S(x,bt)))+((8191&(i=0|(i=0|i+S(x,yt))+S(k,bt)))<<13);c=0|(0|(o=0|o+S(k,yt))+(i>>>13))+(jt>>>26),jt&=67108863,n=S(U,nt),i=0|(i=S(U,it))+S(M,nt),o=S(M,it),n=0|n+S(D,st),i=0|(i=0|i+S(D,at))+S(F,st),o=0|o+S(F,at),n=0|n+S(O,ct),i=0|(i=0|i+S(O,ut))+S(P,ct),o=0|o+S(P,ut),n=0|n+S(j,dt),i=0|(i=0|i+S(j,lt))+S(R,dt),o=0|o+S(R,lt);var Rt=0|(0|c+(n=0|n+S(B,bt)))+((8191&(i=0|(i=0|i+S(B,yt))+S(T,bt)))<<13);c=0|(0|(o=0|o+S(T,yt))+(i>>>13))+(Rt>>>26),Rt&=67108863,n=S(U,st),i=0|(i=S(U,at))+S(M,st),o=S(M,at),n=0|n+S(D,ct),i=0|(i=0|i+S(D,ut))+S(F,ct),o=0|o+S(F,ut),n=0|n+S(O,dt),i=0|(i=0|i+S(O,lt))+S(P,dt),o=0|o+S(P,lt);var Ct=0|(0|c+(n=0|n+S(j,bt)))+((8191&(i=0|(i=0|i+S(j,yt))+S(R,bt)))<<13);c=0|(0|(o=0|o+S(R,yt))+(i>>>13))+(Ct>>>26),Ct&=67108863,n=S(U,ct),i=0|(i=S(U,ut))+S(M,ct),o=S(M,ut),n=0|n+S(D,dt),i=0|(i=0|i+S(D,lt))+S(F,dt),o=0|o+S(F,lt);var Ot=0|(0|c+(n=0|n+S(O,bt)))+((8191&(i=0|(i=0|i+S(O,yt))+S(P,bt)))<<13);c=0|(0|(o=0|o+S(P,yt))+(i>>>13))+(Ot>>>26),Ot&=67108863,n=S(U,dt),i=0|(i=S(U,lt))+S(M,dt),o=S(M,lt);var Pt=0|(0|c+(n=0|n+S(D,bt)))+((8191&(i=0|(i=0|i+S(D,yt))+S(F,bt)))<<13);c=0|(0|(o=0|o+S(F,yt))+(i>>>13))+(Pt>>>26),Pt&=67108863;var Lt=0|(0|c+(n=S(U,bt)))+((8191&(i=0|(i=S(U,yt))+S(M,bt)))<<13);return c=0|(0|(o=S(M,yt))+(i>>>13))+(Lt>>>26),Lt&=67108863,f[0]=vt,f[1]=gt,f[2]=mt,f[3]=_t,f[4]=wt,f[5]=Et,f[6]=St,f[7]=xt,f[8]=kt,f[9]=At,f[10]=Bt,f[11]=Tt,f[12]=It,f[13]=jt,f[14]=Rt,f[15]=Ct,f[16]=Ot,f[17]=Pt,f[18]=Lt,0!=c&&(f[19]=c,r.length++),r};S||(T=d),c.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?T(this,t,e):63>r?d(this,t,e):1024>r?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n,o=0,a=0,f=0;f<r.length-1;f++){n=a,a=0;for(var c=67108863&o,u=s(f,e.length-1),h=i(0,f-t.length+1);h<=u;h++){var d=f-h,l=(0|t.words[d])*(0|e.words[h]),p=67108863&l;c=67108863&(p=0|p+c),a+=(n=0|(n=0|n+(0|l/67108864))+(p>>>26))>>>26,n&=67108863}r.words[f]=c,o=n,n=a}return 0==o?r.length--:r.words[f]=o,r.strip()}(this,t,e):l(this,t,e)},p.prototype.makeRBT=function(t){for(var e=Array(t),r=c.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},p.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},p.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},p.prototype.transform=function(t,e,r,n,i,o){var s=Math.PI;this.permute(o,t,e,r,n,i);for(var a=1;a<i;a<<=1)for(var f=a<<1,c=Math.cos(2*s/f),u=Math.sin(2*s/f),h=0;h<i;h+=f)for(var d=c,l=u,p=0;p<a;p++){var b=r[h+p],y=n[h+p],v=r[h+p+a],g=n[h+p+a],m=d*v-l*g;g=d*g+l*v,v=m,r[h+p]=b+v,n[h+p]=y+g,r[h+p+a]=b-v,n[h+p+a]=y-g,p!==f&&(m=c*d-u*l,l=c*l+u*d,d=m)}},p.prototype.guessLen13b=function(t,e){var r=1|i(e,t),n=1&r,o=0;for(r=0|r/2;r;r>>>=1)o++;return 1<<o+1+n},p.prototype.conjugate=function(t,e,r){if(!(1>=r))for(var n,i=0;i<r/2;i++)n=t[i],t[i]=t[r-i-1],t[r-i-1]=n,n=e[i],e[i]=-e[r-i-1],e[r-i-1]=-n},p.prototype.normalize13b=function(t,e){for(var r,i=0,o=0;o<e/2;o++)r=8192*n(t[2*o+1]/e)+n(t[2*o]/e)+i,t[o]=67108863&r,i=67108864>r?0:0|r/67108864;return t},p.prototype.convert13b=function(t,e,r,n){for(var i=0,o=0;o<e;o++)i+=0|t[o],r[2*o]=8191&i,i>>>=13,r[2*o+1]=8191&i,i>>>=13;for(o=2*e;o<n;++o)r[o]=0;a(0==i),a(0==(-8192&i))},p.prototype.stub=function(t){for(var e=Array(t),r=0;r<t;r++)e[r]=0;return e},p.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=Array(n),a=Array(n),f=Array(n),c=Array(n),u=Array(n),h=Array(n),d=r.words;d.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,c,n),this.transform(s,o,a,f,n,i),this.transform(c,o,u,h,n,i);for(var l,p=0;p<n;p++)l=a[p]*u[p]-f[p]*h[p],f[p]=a[p]*h[p]+f[p]*u[p],a[p]=l;return this.conjugate(a,f,n),this.transform(a,f,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},c.prototype.mul=function(t){var e=new c(null);return e.words=Array(this.length+t.length),this.mulTo(t,e)},c.prototype.mulf=function(t){var e=new c(null);return e.words=Array(this.length+t.length),l(this,t,e)},c.prototype.imul=function(t){return this.clone().mulTo(t,this)},c.prototype.imuln=function(t){a("number"==typeof t),a(67108864>t);for(var e=0,r=0;r<this.length;r++){var n=(0|this.words[r])*t,i=(67108863&n)+(67108863&e);e>>=26,e+=0|n/67108864,e+=i>>>26,this.words[r]=67108863&i}return 0!=e&&(this.words[r]=e,this.length++),this},c.prototype.muln=function(t){return this.clone().imuln(t)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(t){var e=function(t){for(var e=Array(t.bitLength()),r=0;r<e.length;r++){var n=0|r/26,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new c(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},c.prototype.iushln=function(t){a("number"==typeof t&&0<=t);var e,r=t%26,n=(t-r)/26;if(0!=r){var i=0;for(e=0;e<this.length;e++){var o=this.words[e]&67108863>>>26-r<<26-r,s=(0|this.words[e])-o<<r;this.words[e]=s|i,i=o>>>26-r}i&&(this.words[e]=i,this.length++)}if(0!=n){for(e=this.length-1;0<=e;e--)this.words[e+n]=this.words[e];for(e=0;e<n;e++)this.words[e]=0;this.length+=n}return this.strip()},c.prototype.ishln=function(t){return a(0===this.negative),this.iushln(t)},c.prototype.iushrn=function(t,e,r){a("number"==typeof t&&0<=t);var n=e?(e-e%26)/26:0,o=t%26,f=s((t-o)/26,this.length),c=r;if(n=i(0,n-=f),c){for(var u=0;u<f;u++)c.words[u]=this.words[u];c.length=f}if(0===f);else if(this.length>f)for(this.length-=f,u=0;u<this.length;u++)this.words[u]=this.words[u+f];else this.words[0]=0,this.length=1;var h=0;for(u=this.length-1;0<=u&&(0!=h||u>=n);u--){var d=0|this.words[u];this.words[u]=h<<26-o|d>>>o,h=d&(67108863^67108863>>>o<<o)}return c&&0!=h&&(c.words[c.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(t,e,r){return a(0===this.negative),this.iushrn(t,e,r)},c.prototype.shln=function(t){return this.clone().ishln(t)},c.prototype.ushln=function(t){return this.clone().iushln(t)},c.prototype.shrn=function(t){return this.clone().ishrn(t)},c.prototype.ushrn=function(t){return this.clone().iushrn(t)},c.prototype.testn=function(t){a("number"==typeof t&&0<=t);var e=t%26,r=(t-e)/26;return!(this.length<=r)&&!!(this.words[r]&1<<e)},c.prototype.imaskn=function(t){a("number"==typeof t&&0<=t);var e=t%26,r=(t-e)/26;return a(0===this.negative,"imaskn works only with positive numbers"),this.length<=r?this:(0!=e&&r++,this.length=s(r,this.length),0!=e&&(this.words[this.length-1]&=67108863^67108863>>>e<<e),this.strip())},c.prototype.maskn=function(t){return this.clone().imaskn(t)},c.prototype.iaddn=function(t){return a("number"==typeof t),a(67108864>t),0>t?this.isubn(-t):0===this.negative?this._iaddn(t):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)},c.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&67108864<=this.words[e];e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=i(this.length,e+1),this},c.prototype.isubn=function(t){if(a("number"==typeof t),a(67108864>t),0>t)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&&0>this.words[0])this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&0>this.words[e];e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},c.prototype.addn=function(t){return this.clone().iaddn(t)},c.prototype.subn=function(t){return this.clone().isubn(t)},c.prototype.iabs=function(){return this.negative=0,this},c.prototype.abs=function(){return this.clone().iabs()},c.prototype._ishlnsubmul=function(t,e,r){var n,i=t.length+r;this._expand(i);var o,s=0;for(n=0;n<t.length;n++){o=(0|this.words[n+r])+s;var f=(0|t.words[n])*e;s=((o-=67108863&f)>>26)-(0|f/67108864),this.words[n+r]=67108863&o}for(;n<this.length-r;n++)s=(o=(0|this.words[n+r])+s)>>26,this.words[n+r]=67108863&o;if(0==s)return this.strip();for(a(-1==s),s=0,n=0;n<this.length;n++)s=(o=-(0|this.words[n])+s)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},c.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var a,f=n.length-i.length;if("mod"!==e){(a=new c(null)).length=f+1,a.words=Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var h=n.clone()._ishlnsubmul(i,1,f);0===h.negative&&(n=h,a&&(a.words[f]=1));for(var d,l=f-1;0<=l;l--){for(d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]),d=s(0|d/o,67108863),n._ishlnsubmul(i,d,l);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=d)}return a&&a.strip(),n.strip(),"div"!==e&&0!=r&&n.iushrn(r),{div:a||null,mod:n}},c.prototype.divmod=function(t,e,r){return a(!t.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===t.negative?(o=this.neg().divmod(t,e),"mod"!==e&&(n=o.div.neg()),"div"!==e&&(i=o.mod.neg(),r&&0!==i.negative&&i.iadd(t)),{div:n,mod:i}):0===this.negative&&0!==t.negative?(o=this.divmod(t.neg(),e),"mod"!==e&&(n=o.div.neg()),{div:n,mod:o.mod}):0==(this.negative&t.negative)?t.length>this.length||0>this.cmp(t)?{div:new c(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new c(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new c(this.modn(t.words[0]))}:this._wordDiv(t,e):(o=this.neg().divmod(t.neg(),e),"div"!==e&&(i=o.mod.neg(),r&&0!==i.negative&&i.isub(t)),{div:o.div,mod:i});var n,i,o},c.prototype.div=function(t){return this.divmod(t,"div",!1).div},c.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},c.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},c.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0===e.div.negative?e.mod:e.mod.isub(t),n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return 0>o||1===i&&0===o?e.div:0===e.div.negative?e.div.iaddn(1):e.div.isubn(1)},c.prot