mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-17 18:25:50 +00:00
27 lines
431 KiB
JavaScript
27 lines
431 KiB
JavaScript
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=63)}([function(t,e,n){"use strict";var r=n(12),i=n(1);function o(t,e){Object.keys(t||{}).forEach((function(n){e(t[n],n)}))}t.exports=function(t,e){var n=e||t,s="function"==typeof t?t:null;if(null===s)for(var a in n)if(a[0].match(/[A-Z]/)){s=n[a];break}var u=n.inherits;u&&(null===s&&(s=function(){u.apply(this,arguments)}),i(s,u),r.defaults(s,u)),null===s&&(s=function(){});var f,c=s.prototype;function h(t,e,n){c[e]=n||t}if((n.getters||[]).forEach((function(t){var e="_"+t;c[t]=function(){return this[e]}})),o(n.virtuals,(function(t,e){h(t,e,(function(){throw new Error("unimplemented")}))})),o(n.methods,h),o(n,(function(t,e){r.isFunction(t)&&t!==s&&h(t,e)})),r.assign(s,n.statics),"function"==typeof s.init&&s.init(),o(n.cached,(function(t,e){var n="_"+e;h(t,e,(function(){var e=this[n];return void 0===e&&(e=this[n]=t.call(this)),e}))})),n.mixins){var d={};(f=n.mixins,Array.isArray(f)?f:[f]).reverse().forEach((function(t){r.defaults(d,t)})),r.defaults(c,d)}return s}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},function(t,e,n){"use strict";(function(e){var r=n(67);
|
||
/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||
* @license MIT
|
||
*/function i(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0}function o(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var s=n(68),a=Object.prototype.hasOwnProperty,u=Array.prototype.slice,f="foo"===function(){}.name;function c(t){return Object.prototype.toString.call(t)}function h(t){return!o(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var d=t.exports=m,l=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(s.isFunction(t)){if(f)return t.name;var e=t.toString().match(l);return e&&e[1]}}function b(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function g(t){if(f||!s.isFunction(t))return s.inspect(t);var e=p(t);return"[Function"+(e?": "+e:"")+"]"}function v(t,e,n,r,i){throw new d.AssertionError({message:n,actual:t,expected:e,operator:r,stackStartFunction:i})}function m(t,e){t||v(t,!0,e,"==",d.ok)}function y(t,e,n,r){if(t===e)return!0;if(o(t)&&o(e))return 0===i(t,e);if(s.isDate(t)&&s.isDate(e))return t.getTime()===e.getTime();if(s.isRegExp(t)&&s.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(h(t)&&h(e)&&c(t)===c(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(o(t)!==o(e))return!1;var a=(r=r||{actual:[],expected:[]}).actual.indexOf(t);return-1!==a&&a===r.expected.indexOf(e)||(r.actual.push(t),r.expected.push(e),function(t,e,n,r){if(null==t||null==e)return!1;if(s.isPrimitive(t)||s.isPrimitive(e))return t===e;if(n&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=w(t),o=w(e);if(i&&!o||!i&&o)return!1;if(i)return t=u.call(t),e=u.call(e),y(t,e,n);var a,f,c=M(t),h=M(e);if(c.length!==h.length)return!1;for(c.sort(),h.sort(),f=c.length-1;f>=0;f--)if(c[f]!==h[f])return!1;for(f=c.length-1;f>=0;f--)if(a=c[f],!y(t[a],e[a],n,r))return!1;return!0}(t,e,n,r))}return n?t===e:t==e}function w(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function _(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function S(t,e,n,r){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&v(i,n,"Missing expected exception"+r);var o="string"==typeof r,a=!t&&i&&!n;if((!t&&s.isError(i)&&o&&_(i,n)||a)&&v(i,n,"Got unwanted exception"+r),t&&i&&n&&!_(i,n)||!t&&i)throw i}d.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return b(g(t.actual),128)+" "+t.operator+" "+b(g(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,i=p(e),o=r.indexOf("\n"+i);if(o>=0){var s=r.indexOf("\n",o+1);r=r.substring(s+1)}this.stack=r}}},s.inherits(d.AssertionError,Error),d.fail=v,d.ok=m,d.equal=function(t,e,n){t!=e&&v(t,e,n,"==",d.equal)},d.notEqual=function(t,e,n){t==e&&v(t,e,n,"!=",d.notEqual)},d.deepEqual=function(t,e,n){y(t,e,!1)||v(t,e,n,"deepEqual",d.deepEqual)},d.deepStrictEqual=function(t,e,n){y(t,e,!0)||v(t,e,n,"deepStrictEqual",d.deepStrictEqual)},d.notDeepEqual=function(t,e,n){y(t,e,!1)&&v(t,e,n,"notDeepEqual",d.notDeepEqual)},d.notDeepStrictEqual=function t(e,n,r){y(e,n,!0)&&v(e,n,r,"notDeepStrictEqual",t)},d.strictEqual=function(t,e,n){t!==e&&v(t,e,n,"===",d.strictEqual)},d.notStrictEqual=function(t,e,n){t===e&&v(t,e,n,"!==",d.notStrictEqual)},d.throws=function(t,e,n){S(!0,t,e,n)},d.doesNotThrow=function(t,e,n){S(!1,t,e,n)},d.ifError=function(t){if(t)throw t},d.strict=r((function t(e,n){e||v(e,!0,n,"==",t)}),d,{equal:d.strictEqual,deepEqual:d.deepStrictEqual,notEqual:d.notStrictEqual,notDeepEqual:d.notDeepStrictEqual}),d.strict.strict=d.strict;var M=Object.keys||function(t){var e=[];for(var n in t)a.call(t,n)&&e.push(n);return e}}).call(this,n(9))},function(t,e,n){"use strict";var r=n(2);function i(t,e){return t<e?-1:t===e?0:1}var o=function(){for(var t={},e=t.reverse=new Array(256),n=0;n<16;n++){var r=n.toString(16).toUpperCase();t[r]=n;for(var i=0;i<16;i++){var o=i.toString(16).toUpperCase(),s=(n<<4)+i,a=r+o;t[a]=s,e[s]=a}}return t}(),s=o.reverse;function a(t){var e=o[t];if(void 0===e)throw new Error("`"+t+"` is not a valid hex representation of a byte");return e}t.exports={parseBytes:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Array;if(!t||void 0===t.length)throw new Error(t+" is not a sequence");if("string"==typeof t){for(var n=t.length%2,r=new e((t.length+n)/2),i=t.length,o=r.length-1;o>=n;i-=2,o--)r[o]=a(t.slice(i-2,i));return 1===n&&(r[0]=a(t[0])),r}if(t instanceof e)return t;if(e===Uint8Array)return new e(t);for(var s=new e(t.length),u=t.length-1;u>=0;u--)s[u]=t[u];return s},bytesToHex:function(t){for(var e=Array(t.length),n=t.length-1;n>=0;n--)e[n]=s[t[n]];return e.join("")},slice:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.length,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.constructor;e<0&&(e+=t.length),n<0&&(n+=t.length);for(var i=n-e,o=new r(i),s=n-1;s>=e;s--)o[s-e]=t[s];return o},compareBytes:function(t,e){r(t.length===e.length);for(var n=0;n<t.length;n++){var o=i(t[n],e[n]);if(0!==o)return o}return 0},serializeUIntN:function(t,e){for(var n=new Uint8Array(e),r=e-1,i=0;i<e;i++)n[r-i]=t>>>8*i&255;return n}}},function(t,e,n){"use strict";var r=e,i=n(8),o=n(14),s=n(61);r.assert=o,r.toArray=s.toArray,r.zero2=s.zero2,r.toHex=s.toHex,r.encode=s.encode,r.getNAF=function(t,e,n){var r=new Array(Math.max(t.bitLength(),n)+1);r.fill(0);for(var i=1<<e+1,o=t.clone(),s=0;s<r.length;s++){var a,u=o.andln(i-1);o.isOdd()?(a=u>(i>>1)-1?(i>>1)-u:u,o.isubn(a)):a=0,r[s]=a,o.iushrn(1)}return r},r.getJSF=function(t,e){var n=[[],[]];t=t.clone(),e=e.clone();for(var r=0,i=0;t.cmpn(-r)>0||e.cmpn(-i)>0;){var o,s,a,u=t.andln(3)+r&3,f=e.andln(3)+i&3;if(3===u&&(u=-1),3===f&&(f=-1),0==(1&u))o=0;else o=3!==(a=t.andln(7)+r&7)&&5!==a||2!==f?u:-u;if(n[0].push(o),0==(1&f))s=0;else s=3!==(a=e.andln(7)+i&7)&&5!==a||2!==u?f:-f;n[1].push(s),2*r===o+1&&(r=1-r),2*i===s+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return n},r.cachedProperty=function(t,e,n){var r="_"+e;t.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(t){return"string"==typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new i(t,"hex","le")}},function(t,e,n){"use strict";(function(t){
|
||
/*!
|
||
* The buffer module from node.js, for the browser.
|
||
*
|
||
* @author Feross Aboukhadijeh <http://feross.org>
|
||
* @license MIT
|
||
*/
|
||
var r=n(64),i=n(65),o=n(41);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return f(this,t,e,n)}function f(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=d(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(e,n),i=(t=a(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(u.isBuffer(e)){var n=0|l(e.length);return 0===(t=a(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?a(t,0):d(t,e);if("Buffer"===e.type&&o(e.data))return d(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(c(e),t=a(t,e<0?0:0|l(e)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function d(t,e){var n=e.length<0?0:0|l(e.length);t=a(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function l(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(u.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 n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return C(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return D(t).length;default:if(r)return C(t).length;e=(""+e).toLowerCase(),r=!0}}function b(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,n);case"utf8":case"utf-8":return x(this,e,n);case"ascii":return I(this,e,n);case"latin1":case"binary":return T(this,e,n);case"base64":return A(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:m(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):m(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function f(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=n;o<a;o++)if(f(t,o)===f(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var h=!0,d=0;d<u;d++)if(f(t,o+d)!==f(e,d)){h=!1;break}if(h)return o}return-1}function y(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[n+s]=a}return s}function w(t,e,n,r){return q(C(e,t.length-n),t,n,r)}function _(t,e,n,r){return q(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function S(t,e,n,r){return _(t,e,n,r)}function M(t,e,n,r){return q(D(e),t,n,r)}function E(t,e,n,r){return q(function(t,e){for(var n,r,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function A(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function x(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,s,a,u,f=t[i],c=null,h=f>239?4:f>223?3:f>191?2:1;if(i+h<=n)switch(h){case 1:f<128&&(c=f);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&f)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&f)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&f)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=h}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.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=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,n){return f(null,t,e,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,n){return function(t,e,n,r){return c(e),e<=0?a(t,e):void 0!==n?"string"==typeof r?a(t,e).fill(n,r):a(t,e).fill(n):a(t,e)}(null,t,e,n)},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(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}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=u.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var s=t[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?x(this,0,t):b.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0),a=Math.min(o,s),f=this.slice(r,i),c=t.slice(e,n),h=0;h<a;++h)if(f[h]!==c[h]){o=f[h],s=c[h];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return S(this,t,e,n);case"base64":return M(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function I(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function T(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function k(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=j(t[o]);return i}function L(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function N(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,n,r,i,o){if(!u.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(n+r>t.length)throw new RangeError("Index out of range")}function O(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function B(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function z(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function P(t,e,n,r,o){return o||z(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function U(t,e,n,r,o){return o||z(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},u.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||N(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},u.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||N(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||N(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||N(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||N(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||N(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||N(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||N(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||N(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||N(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||N(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||N(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||N(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||R(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||R(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):B(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<n&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):B(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return P(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return P(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return U(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return U(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var s=u.isBuffer(t)?t:C(new u(t,r).toString()),a=s.length;for(o=0;o<n-e;++o)this[o+e]=s[o%a]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function j(t){return t<16?"0"+t.toString(16):t.toString(16)}function C(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],s=0;s<r;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function D(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(F,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(9))},function(t,e,n){var r=n(5),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){"use strict";var r=n(14),i=n(1);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)n.push(parseInt(t[i]+t[i+1],16))}else for(var r=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(i=0;i<t.length;i++)n[i]=0|t[i];return n},e.toHex=function(t){for(var e="",n=0;n<t.length;n++)e+=a(t[n].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var n="",r=0;r<t.length;r++){var i=t[r];"little"===e&&(i=s(i)),n+=u(i.toString(16))}return n},e.zero2=a,e.zero8=u,e.join32=function(t,e,n,i){var o=n-e;r(o%4==0);for(var s=new Array(o/4),a=0,u=e;a<s.length;a++,u+=4){var f;f="big"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],s[a]=f>>>0}return s},e.split32=function(t,e){for(var n=new Array(4*t.length),r=0,i=0;r<t.length;r++,i+=4){var o=t[r];"big"===e?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,r){return t+e+n+r>>>0},e.sum32_5=function(t,e,n,r,i){return t+e+n+r+i>>>0},e.sum64=function(t,e,n,r){var i=t[e],o=r+t[e+1]>>>0,s=(o<r?1:0)+n+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,n,r){return(e+r>>>0<e?1:0)+t+n>>>0},e.sum64_lo=function(t,e,n,r){return e+r>>>0},e.sum64_4_hi=function(t,e,n,r,i,o,s,a){var u=0,f=e;return u+=(f=f+r>>>0)<e?1:0,u+=(f=f+o>>>0)<o?1:0,t+n+i+s+(u+=(f=f+a>>>0)<a?1:0)>>>0},e.sum64_4_lo=function(t,e,n,r,i,o,s,a){return e+r+o+a>>>0},e.sum64_5_hi=function(t,e,n,r,i,o,s,a,u,f){var c=0,h=e;return c+=(h=h+r>>>0)<e?1:0,c+=(h=h+o>>>0)<o?1:0,c+=(h=h+a>>>0)<a?1:0,t+n+i+s+u+(c+=(h=h+f>>>0)<f?1:0)>>>0},e.sum64_5_lo=function(t,e,n,r,i,o,s,a,u,f){return e+r+o+a+f>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=n(118).Buffer}catch(t){}function a(t,e,n){for(var r=0,i=Math.min(t.length,n),o=e;o<i;o++){var s=t.charCodeAt(o)-48;r<<=4,r|=s>=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return r}function u(t,e,n,r){for(var i=0,o=Math.min(t.length,n),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}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,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===n)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===n)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=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 n=0;n<this.length;n++)this.words[n]=0;var r,i,o=0;for(n=t.length-6,r=0;n>=e;n-=6)i=a(t,n,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=a(t,e,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,s=o%r,a=Math.min(o,o-s)+n,f=0,c=n;c<a;c+=r)f=u(t,c,c+r,e),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==s){var h=1;for(f=u(t,c,t.length,e),c=0;c<s;c++)h*=e;this.imuln(h),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}},o.prototype.copy=function(t){t.words=new 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},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&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?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[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],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var f=1;f<r;f++){for(var c=u>>>26,h=67108863&u,d=Math.min(f,e.length-1),l=Math.max(0,f-t.length+1);l<=d;l++){var p=f-l|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[l])+h)/67108864|0,h=67108863&s}n.words[f]=0|h,u=0|c}return 0!==u?n.words[f]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);n=0!==(o=a>>>24-i&16777215)||s!==this.length-1?f[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var d=c[t],l=h[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(l).toString(t);n=(p=p.idivn(l)).isZero()?b+n:f[d-b.length]+b+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!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 r(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,f=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),f[a]=s;for(;a<o;a++)f[a]=0}else{for(a=0;a<o-i;a++)f[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),f[o-a-1]=s}return f},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},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;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.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]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.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 n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.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,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.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){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,n,r;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?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o<r.length;o++)e=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<n.length;o++)e=(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.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)},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 n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<n.length;s++)o=(e=(0|n.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var l=function(t,e,n){var r,i,o,s=t.words,a=e.words,u=n.words,f=0,c=0|s[0],h=8191&c,d=c>>>13,l=0|s[1],p=8191&l,b=l>>>13,g=0|s[2],v=8191&g,m=g>>>13,y=0|s[3],w=8191&y,_=y>>>13,S=0|s[4],M=8191&S,E=S>>>13,A=0|s[5],x=8191&A,I=A>>>13,T=0|s[6],k=8191&T,L=T>>>13,N=0|s[7],R=8191&N,O=N>>>13,B=0|s[8],z=8191&B,P=B>>>13,U=0|s[9],F=8191&U,j=U>>>13,C=0|a[0],D=8191&C,q=C>>>13,V=0|a[1],H=8191&V,W=V>>>13,Z=0|a[2],Y=8191&Z,J=Z>>>13,K=0|a[3],$=8191&K,X=K>>>13,G=0|a[4],Q=8191&G,tt=G>>>13,et=0|a[5],nt=8191&et,rt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ct=0|a[8],ht=8191&ct,dt=ct>>>13,lt=0|a[9],pt=8191<,bt=lt>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(f+(r=Math.imul(h,D))|0)+((8191&(i=(i=Math.imul(h,q))+Math.imul(d,D)|0))<<13)|0;f=((o=Math.imul(d,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,D),i=(i=Math.imul(p,q))+Math.imul(b,D)|0,o=Math.imul(b,q);var vt=(f+(r=r+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(d,H)|0))<<13)|0;f=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,D),i=(i=Math.imul(v,q))+Math.imul(m,D)|0,o=Math.imul(m,q),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0;var mt=(f+(r=r+Math.imul(h,Y)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(d,Y)|0))<<13)|0;f=((o=o+Math.imul(d,J)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,r=Math.imul(w,D),i=(i=Math.imul(w,q))+Math.imul(_,D)|0,o=Math.imul(_,q),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0,r=r+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,J)|0;var yt=(f+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(d,$)|0))<<13)|0;f=((o=o+Math.imul(d,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(M,D),i=(i=Math.imul(M,q))+Math.imul(E,D)|0,o=Math.imul(E,q),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,J)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,X)|0;var wt=(f+(r=r+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(d,Q)|0))<<13)|0;f=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(x,D),i=(i=Math.imul(x,q))+Math.imul(I,D)|0,o=Math.imul(I,q),r=r+Math.imul(M,H)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,W)|0,r=r+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,J)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,X)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0;var _t=(f+(r=r+Math.imul(h,nt)|0)|0)+((8191&(i=(i=i+Math.imul(h,rt)|0)+Math.imul(d,nt)|0))<<13)|0;f=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(k,D),i=(i=Math.imul(k,q))+Math.imul(L,D)|0,o=Math.imul(L,q),r=r+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,J)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,X)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(b,nt)|0,o=o+Math.imul(b,rt)|0;var St=(f+(r=r+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(d,ot)|0))<<13)|0;f=((o=o+Math.imul(d,st)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(R,D),i=(i=Math.imul(R,q))+Math.imul(O,D)|0,o=Math.imul(O,q),r=r+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,W)|0,r=r+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,J)|0,r=r+Math.imul(M,$)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,X)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0;var Mt=(f+(r=r+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(d,ut)|0))<<13)|0;f=((o=o+Math.imul(d,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(z,D),i=(i=Math.imul(z,q))+Math.imul(P,D)|0,o=Math.imul(P,q),r=r+Math.imul(R,H)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,J)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,X)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ft)|0;var Et=(f+(r=r+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,dt)|0)+Math.imul(d,ht)|0))<<13)|0;f=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(F,D),i=(i=Math.imul(F,q))+Math.imul(j,D)|0,o=Math.imul(j,q),r=r+Math.imul(z,H)|0,i=(i=i+Math.imul(z,W)|0)+Math.imul(P,H)|0,o=o+Math.imul(P,W)|0,r=r+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,J)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,J)|0,r=r+Math.imul(k,$)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,X)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0,r=r+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,dt)|0;var At=(f+(r=r+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,bt)|0)+Math.imul(d,pt)|0))<<13)|0;f=((o=o+Math.imul(d,bt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(F,H),i=(i=Math.imul(F,W))+Math.imul(j,H)|0,o=Math.imul(j,W),r=r+Math.imul(z,Y)|0,i=(i=i+Math.imul(z,J)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,J)|0,r=r+Math.imul(R,$)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,X)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ft)|0,r=r+Math.imul(v,ht)|0,i=(i=i+Math.imul(v,dt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,dt)|0;var xt=(f+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;f=((o=o+Math.imul(b,bt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(F,Y),i=(i=Math.imul(F,J))+Math.imul(j,Y)|0,o=Math.imul(j,J),r=r+Math.imul(z,$)|0,i=(i=i+Math.imul(z,X)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,X)|0,r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(k,nt)|0,i=(i=i+Math.imul(k,rt)|0)+Math.imul(L,nt)|0,o=o+Math.imul(L,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,r=r+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ft)|0,r=r+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,dt)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,dt)|0;var It=(f+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,bt)|0)+Math.imul(m,pt)|0))<<13)|0;f=((o=o+Math.imul(m,bt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(F,$),i=(i=Math.imul(F,X))+Math.imul(j,$)|0,o=Math.imul(j,X),r=r+Math.imul(z,Q)|0,i=(i=i+Math.imul(z,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(R,nt)|0,i=(i=i+Math.imul(R,rt)|0)+Math.imul(O,nt)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ft)|0,r=r+Math.imul(M,ht)|0,i=(i=i+Math.imul(M,dt)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,dt)|0;var Tt=(f+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,bt)|0)+Math.imul(_,pt)|0))<<13)|0;f=((o=o+Math.imul(_,bt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(F,Q),i=(i=Math.imul(F,tt))+Math.imul(j,Q)|0,o=Math.imul(j,tt),r=r+Math.imul(z,nt)|0,i=(i=i+Math.imul(z,rt)|0)+Math.imul(P,nt)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ft)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,ft)|0,r=r+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,dt)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,dt)|0;var kt=(f+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,bt)|0)+Math.imul(E,pt)|0))<<13)|0;f=((o=o+Math.imul(E,bt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(F,nt),i=(i=Math.imul(F,rt))+Math.imul(j,nt)|0,o=Math.imul(j,rt),r=r+Math.imul(z,ot)|0,i=(i=i+Math.imul(z,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ft)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ft)|0,r=r+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,dt)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,dt)|0;var Lt=(f+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,bt)|0)+Math.imul(I,pt)|0))<<13)|0;f=((o=o+Math.imul(I,bt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(F,ot),i=(i=Math.imul(F,st))+Math.imul(j,ot)|0,o=Math.imul(j,st),r=r+Math.imul(z,ut)|0,i=(i=i+Math.imul(z,ft)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ft)|0,r=r+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,dt)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,dt)|0;var Nt=(f+(r=r+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,bt)|0)+Math.imul(L,pt)|0))<<13)|0;f=((o=o+Math.imul(L,bt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(F,ut),i=(i=Math.imul(F,ft))+Math.imul(j,ut)|0,o=Math.imul(j,ft),r=r+Math.imul(z,ht)|0,i=(i=i+Math.imul(z,dt)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,dt)|0;var Rt=(f+(r=r+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,bt)|0)+Math.imul(O,pt)|0))<<13)|0;f=((o=o+Math.imul(O,bt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(F,ht),i=(i=Math.imul(F,dt))+Math.imul(j,ht)|0,o=Math.imul(j,dt);var Ot=(f+(r=r+Math.imul(z,pt)|0)|0)+((8191&(i=(i=i+Math.imul(z,bt)|0)+Math.imul(P,pt)|0))<<13)|0;f=((o=o+Math.imul(P,bt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var Bt=(f+(r=Math.imul(F,pt))|0)+((8191&(i=(i=Math.imul(F,bt))+Math.imul(j,pt)|0))<<13)|0;return f=((o=Math.imul(j,bt))+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,u[0]=gt,u[1]=vt,u[2]=mt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=St,u[7]=Mt,u[8]=Et,u[9]=At,u[10]=xt,u[11]=It,u[12]=Tt,u[13]=kt,u[14]=Lt,u[15]=Nt,u[16]=Rt,u[17]=Ot,u[18]=Bt,0!==f&&(u[19]=f,n.length++),n};function p(t,e,n){return(new b).mulp(t,e,n)}function b(t,e){this.x=t,this.y=e}Math.imul||(l=d),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?l(this,t,e):n<63?d(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,u=Math.min(o,e.length-1),f=Math.max(0,o-t.length+1);f<=u;f++){var c=o-f,h=(0|t.words[c])*(0|e.words[f]),d=67108863&h;a=67108863&(d=d+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},b.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},b.prototype.permute=function(t,e,n,r,i,o){for(var s=0;s<o;s++)r[s]=e[t[s]],i[s]=n[t[s]]},b.prototype.transform=function(t,e,n,r,i,o){this.permute(o,t,e,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),f=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=u,d=f,l=0;l<s;l++){var p=n[c+l],b=r[c+l],g=n[c+l+s],v=r[c+l+s],m=h*g-d*v;v=h*v+d*g,g=m,n[c+l]=p+g,r[c+l]=b+v,n[c+l+s]=p-g,r[c+l+s]=b-v,l!==a&&(m=u*h-f*d,d=u*d+f*h,h=m)}},b.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},b.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},b.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},b.prototype.convert13b=function(t,e,n,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],n[2*s]=8191&o,o>>>=13,n[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)n[s]=0;r(0===o),r(0==(-8192&o))},b.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},b.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),c=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,f,r),this.transform(s,o,a,u,r,i),this.transform(f,o,c,h,r,i);for(var l=0;l<r;l++){var p=a[l]*c[l]-u[l]*h[l];u[l]=a[l]*h[l]+u[l]*c[l],a[l]=p}return this.conjugate(a,u,r),this.transform(a,u,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),p(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=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=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=(t.words[r]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<n;this.words[e]=u|s,s=a>>>26-n}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,n){var i;r("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=n;if(i-=s,i=Math.max(0,i),u){for(var f=0;f<s;f++)u.words[f]=this.words[f];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++)this.words[f]=this.words[f+s];else this.words[0]=0,this.length=1;var c=0;for(f=this.length-1;f>=0&&(0!==c||f>=i);f--){var h=0|this.words[f];this.words[f]=c<<26-o|h>>>o,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},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){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n)&&!!(this.words[n]&i)},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[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(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,n){var i,o,s=t.length+n;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)a=(o=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,s=0|i.words[i.length-1];0!==(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,u=r.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f<a.length;f++)a.words[f]=0}var c=r.clone()._ishlnsubmul(i,1,u);0===c.negative&&(r=c,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var d=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(i,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):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);var i,s,a},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 n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);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){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++f;for(var c=n.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()||s.isOdd())&&(i.iadd(c),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,b=1;0==(n.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(a),s.isub(u)):(n.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:n.iushln(f)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var f=0,c=1;0==(e.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;0==(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(n)>=0?(e.isub(n),s.isub(a)):(n.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},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){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>i&&(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 S(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(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 m(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){S.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)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(m,v),m.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r<n;r++)e.words[r]=t.words[r];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,r=10;r<t.length;r++){var o=0|t.words[r];t.words[r-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},m.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(y,v),i(w,v),i(_,v),_.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new m;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},S.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,f).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,i),d=this.pow(t,i.addn(1).iushrn(1)),l=this.pow(t,i),p=s;0!==l.cmp(a);){for(var b=l,g=0;0!==b.cmp(a);g++)b=b.redSqr();r(g<p);var v=this.pow(h,new o(1).iushln(p-g-1));d=d.redMul(v),h=v.redSqr(),l=l.redMul(h),p=g}return d},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var f=e.words[r],c=u-1;c>=0;c--){var h=f>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===r&&0===c)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,S),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 n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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 n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(27)(t))},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=n(3),i=r.bytesToHex,o=r.slice,s=n(37).BytesList,a={toBytesSink:function(t){t.put(this._bytes)},toHex:function(){return i(this.toBytes())},toBytes:function(){if(this._bytes)return o(this._bytes);var t=new s;return this.toBytesSink(t),t.toBytes()},toJSON:function(){return this.toHex()},toString:function(){return this.toHex()}};t.exports={ensureArrayLikeIs:function(t,e){return{withChildren:function(n){if(e instanceof t)return e;for(var r=new t,i=0;i<e.length;i++)r.push(n.from(e[i]));return r}}},SerializedType:a,Comparable:{lt:function(t){return this.compareTo(t)<0},eq:function(t){return 0===this.compareTo(t)},gt:function(t){return this.compareTo(t)>0},gte:function(t){return this.compareTo(t)>-1},lte:function(t){return this.compareTo(t)<1}}}},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=n(97).Buffer}catch(t){}function a(t,e,n){for(var i=0,o=Math.min(t.length,n),s=0,a=e;a<o;a++){var u,f=t.charCodeAt(a)-48;i<<=4,i|=u=f>=49&&f<=54?f-49+10:f>=17&&f<=22?f-17+10:f,s|=u}return r(!(240&s),"Invalid character in "+t),i}function u(t,e,n,i){for(var o=0,s=0,a=Math.min(t.length,n),u=e;u<a;u++){var f=t.charCodeAt(u)-48;o*=i,s=f>=49?f-49+10:f>=17?f-17+10:f,r(f>=0&&s<i,"Invalid character"),o+=s}return o}function f(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}function c(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}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,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this._strip(),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===n)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===n)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=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 n=0;n<this.length;n++)this.words[n]=0;var r,i,o=0;for(n=t.length-6,r=0;n>=e;n-=6)i=a(t,n,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=a(t,e,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303),this._strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,s=o%r,a=Math.min(o,o-s)+n,f=0,c=n;c<a;c+=r)f=u(t,c,c+r,e),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==s){var h=1;for(f=u(t,c,t.length,e),c=0;c<s;c++)h*=e;this.imuln(h),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}},o.prototype.copy=function(t){t.words=new 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},o.prototype._move=function(t){f(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&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},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for?o.prototype[Symbol.for("nodejs.util.inspect.custom")]=c:o.prototype.inspect=c;var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[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){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);n=0!==(o=a>>>24-i&16777215)||s!==this.length-1?h[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var f=d[t],c=l[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modrn(c).toString(t);n=(p=p.idivn(c)).isZero()?b+n:h[f-b.length]+b+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function p(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var f=1;f<r;f++){for(var c=u>>>26,h=67108863&u,d=Math.min(f,e.length-1),l=Math.max(0,f-t.length+1);l<=d;l++){var p=f-l|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[l])+h)/67108864|0,h=67108863&s}n.words[f]=0|h,u=0|c}return 0!==u?n.words[f]=0|u:n.length--,n._strip()}o.prototype.toArrayLike=function(t,e,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;t[n++]=255&s,n<t.length&&(t[n++]=s>>8&255),n<t.length&&(t[n++]=s>>16&255),6===o?(n<t.length&&(t[n++]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n<t.length)for(t[n++]=r;n<t.length;)t[n++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var n=t.length-1,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;t[n--]=255&s,n>=0&&(t[n--]=s>>8&255),n>=0&&(t[n--]=s>>16&255),6===o?(n>=0&&(t[n--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n>=0)for(t[n--]=r;n>=0;)t[n--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},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;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.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]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.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 n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.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,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.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){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,n,r;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?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o<r.length;o++)e=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<n.length;o++)e=(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.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)},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 n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<n.length;s++)o=(e=(0|n.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var b=function(t,e,n){var r,i,o,s=t.words,a=e.words,u=n.words,f=0,c=0|s[0],h=8191&c,d=c>>>13,l=0|s[1],p=8191&l,b=l>>>13,g=0|s[2],v=8191&g,m=g>>>13,y=0|s[3],w=8191&y,_=y>>>13,S=0|s[4],M=8191&S,E=S>>>13,A=0|s[5],x=8191&A,I=A>>>13,T=0|s[6],k=8191&T,L=T>>>13,N=0|s[7],R=8191&N,O=N>>>13,B=0|s[8],z=8191&B,P=B>>>13,U=0|s[9],F=8191&U,j=U>>>13,C=0|a[0],D=8191&C,q=C>>>13,V=0|a[1],H=8191&V,W=V>>>13,Z=0|a[2],Y=8191&Z,J=Z>>>13,K=0|a[3],$=8191&K,X=K>>>13,G=0|a[4],Q=8191&G,tt=G>>>13,et=0|a[5],nt=8191&et,rt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ft=at>>>13,ct=0|a[8],ht=8191&ct,dt=ct>>>13,lt=0|a[9],pt=8191<,bt=lt>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(f+(r=Math.imul(h,D))|0)+((8191&(i=(i=Math.imul(h,q))+Math.imul(d,D)|0))<<13)|0;f=((o=Math.imul(d,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,D),i=(i=Math.imul(p,q))+Math.imul(b,D)|0,o=Math.imul(b,q);var vt=(f+(r=r+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(d,H)|0))<<13)|0;f=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,D),i=(i=Math.imul(v,q))+Math.imul(m,D)|0,o=Math.imul(m,q),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0;var mt=(f+(r=r+Math.imul(h,Y)|0)|0)+((8191&(i=(i=i+Math.imul(h,J)|0)+Math.imul(d,Y)|0))<<13)|0;f=((o=o+Math.imul(d,J)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,r=Math.imul(w,D),i=(i=Math.imul(w,q))+Math.imul(_,D)|0,o=Math.imul(_,q),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0,r=r+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,J)|0;var yt=(f+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,X)|0)+Math.imul(d,$)|0))<<13)|0;f=((o=o+Math.imul(d,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(M,D),i=(i=Math.imul(M,q))+Math.imul(E,D)|0,o=Math.imul(E,q),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,J)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,X)|0;var wt=(f+(r=r+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(d,Q)|0))<<13)|0;f=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(x,D),i=(i=Math.imul(x,q))+Math.imul(I,D)|0,o=Math.imul(I,q),r=r+Math.imul(M,H)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,W)|0,r=r+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,J)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,X)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0;var _t=(f+(r=r+Math.imul(h,nt)|0)|0)+((8191&(i=(i=i+Math.imul(h,rt)|0)+Math.imul(d,nt)|0))<<13)|0;f=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(k,D),i=(i=Math.imul(k,q))+Math.imul(L,D)|0,o=Math.imul(L,q),r=r+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,J)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,X)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(b,nt)|0,o=o+Math.imul(b,rt)|0;var St=(f+(r=r+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(d,ot)|0))<<13)|0;f=((o=o+Math.imul(d,st)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(R,D),i=(i=Math.imul(R,q))+Math.imul(O,D)|0,o=Math.imul(O,q),r=r+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(L,H)|0,o=o+Math.imul(L,W)|0,r=r+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,J)|0,r=r+Math.imul(M,$)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,X)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0;var Mt=(f+(r=r+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ft)|0)+Math.imul(d,ut)|0))<<13)|0;f=((o=o+Math.imul(d,ft)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(z,D),i=(i=Math.imul(z,q))+Math.imul(P,D)|0,o=Math.imul(P,q),r=r+Math.imul(R,H)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(L,Y)|0,o=o+Math.imul(L,J)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,X)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,X)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ft)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ft)|0;var Et=(f+(r=r+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,dt)|0)+Math.imul(d,ht)|0))<<13)|0;f=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(F,D),i=(i=Math.imul(F,q))+Math.imul(j,D)|0,o=Math.imul(j,q),r=r+Math.imul(z,H)|0,i=(i=i+Math.imul(z,W)|0)+Math.imul(P,H)|0,o=o+Math.imul(P,W)|0,r=r+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,J)|0)+Math.imul(O,Y)|0,o=o+Math.imul(O,J)|0,r=r+Math.imul(k,$)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,X)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ft)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ft)|0,r=r+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,dt)|0;var At=(f+(r=r+Math.imul(h,pt)|0)|0)+((8191&(i=(i=i+Math.imul(h,bt)|0)+Math.imul(d,pt)|0))<<13)|0;f=((o=o+Math.imul(d,bt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(F,H),i=(i=Math.imul(F,W))+Math.imul(j,H)|0,o=Math.imul(j,W),r=r+Math.imul(z,Y)|0,i=(i=i+Math.imul(z,J)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,J)|0,r=r+Math.imul(R,$)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,X)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ft)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ft)|0,r=r+Math.imul(v,ht)|0,i=(i=i+Math.imul(v,dt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,dt)|0;var xt=(f+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,bt)|0)+Math.imul(b,pt)|0))<<13)|0;f=((o=o+Math.imul(b,bt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(F,Y),i=(i=Math.imul(F,J))+Math.imul(j,Y)|0,o=Math.imul(j,J),r=r+Math.imul(z,$)|0,i=(i=i+Math.imul(z,X)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,X)|0,r=r+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(k,nt)|0,i=(i=i+Math.imul(k,rt)|0)+Math.imul(L,nt)|0,o=o+Math.imul(L,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,st)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,r=r+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ft)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ft)|0,r=r+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,dt)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,dt)|0;var It=(f+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,bt)|0)+Math.imul(m,pt)|0))<<13)|0;f=((o=o+Math.imul(m,bt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(F,$),i=(i=Math.imul(F,X))+Math.imul(j,$)|0,o=Math.imul(j,X),r=r+Math.imul(z,Q)|0,i=(i=i+Math.imul(z,tt)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(R,nt)|0,i=(i=i+Math.imul(R,rt)|0)+Math.imul(O,nt)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ft)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ft)|0,r=r+Math.imul(M,ht)|0,i=(i=i+Math.imul(M,dt)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,dt)|0;var Tt=(f+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,bt)|0)+Math.imul(_,pt)|0))<<13)|0;f=((o=o+Math.imul(_,bt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(F,Q),i=(i=Math.imul(F,tt))+Math.imul(j,Q)|0,o=Math.imul(j,tt),r=r+Math.imul(z,nt)|0,i=(i=i+Math.imul(z,rt)|0)+Math.imul(P,nt)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ft)|0)+Math.imul(L,ut)|0,o=o+Math.imul(L,ft)|0,r=r+Math.imul(x,ht)|0,i=(i=i+Math.imul(x,dt)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,dt)|0;var kt=(f+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,bt)|0)+Math.imul(E,pt)|0))<<13)|0;f=((o=o+Math.imul(E,bt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(F,nt),i=(i=Math.imul(F,rt))+Math.imul(j,nt)|0,o=Math.imul(j,rt),r=r+Math.imul(z,ot)|0,i=(i=i+Math.imul(z,st)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,st)|0,r=r+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ft)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ft)|0,r=r+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,dt)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,dt)|0;var Lt=(f+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,bt)|0)+Math.imul(I,pt)|0))<<13)|0;f=((o=o+Math.imul(I,bt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,r=Math.imul(F,ot),i=(i=Math.imul(F,st))+Math.imul(j,ot)|0,o=Math.imul(j,st),r=r+Math.imul(z,ut)|0,i=(i=i+Math.imul(z,ft)|0)+Math.imul(P,ut)|0,o=o+Math.imul(P,ft)|0,r=r+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,dt)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,dt)|0;var Nt=(f+(r=r+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,bt)|0)+Math.imul(L,pt)|0))<<13)|0;f=((o=o+Math.imul(L,bt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(F,ut),i=(i=Math.imul(F,ft))+Math.imul(j,ut)|0,o=Math.imul(j,ft),r=r+Math.imul(z,ht)|0,i=(i=i+Math.imul(z,dt)|0)+Math.imul(P,ht)|0,o=o+Math.imul(P,dt)|0;var Rt=(f+(r=r+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,bt)|0)+Math.imul(O,pt)|0))<<13)|0;f=((o=o+Math.imul(O,bt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(F,ht),i=(i=Math.imul(F,dt))+Math.imul(j,ht)|0,o=Math.imul(j,dt);var Ot=(f+(r=r+Math.imul(z,pt)|0)|0)+((8191&(i=(i=i+Math.imul(z,bt)|0)+Math.imul(P,pt)|0))<<13)|0;f=((o=o+Math.imul(P,bt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var Bt=(f+(r=Math.imul(F,pt))|0)+((8191&(i=(i=Math.imul(F,bt))+Math.imul(j,pt)|0))<<13)|0;return f=((o=Math.imul(j,bt))+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,u[0]=gt,u[1]=vt,u[2]=mt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=St,u[7]=Mt,u[8]=Et,u[9]=At,u[10]=xt,u[11]=It,u[12]=Tt,u[13]=kt,u[14]=Lt,u[15]=Nt,u[16]=Rt,u[17]=Ot,u[18]=Bt,0!==f&&(u[19]=f,n.length++),n};function g(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,u=Math.min(o,e.length-1),f=Math.max(0,o-t.length+1);f<=u;f++){var c=o-f,h=(0|t.words[c])*(0|e.words[f]),d=67108863&h;a=67108863&(d=d+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function v(t,e,n){return g(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(b=p),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?b(this,t,e):n<63?p(this,t,e):n<1024?g(this,t,e):v(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},m.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},m.prototype.permute=function(t,e,n,r,i,o){for(var s=0;s<o;s++)r[s]=e[t[s]],i[s]=n[t[s]]},m.prototype.transform=function(t,e,n,r,i,o){this.permute(o,t,e,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),f=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var h=u,d=f,l=0;l<s;l++){var p=n[c+l],b=r[c+l],g=n[c+l+s],v=r[c+l+s],m=h*g-d*v;v=h*v+d*g,g=m,n[c+l]=p+g,r[c+l]=b+v,n[c+l+s]=p-g,r[c+l+s]=b-v,l!==a&&(m=u*h-f*d,d=u*d+f*h,h=m)}},m.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},m.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},m.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},m.prototype.convert13b=function(t,e,n,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],n[2*s]=8191&o,o>>>=13,n[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)n[s]=0;r(0===o),r(0==(-8192&o))},m.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},m.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),u=new Array(r),f=new Array(r),c=new Array(r),h=new Array(r),d=n.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,f,r),this.transform(s,o,a,u,r,i),this.transform(f,o,c,h,r,i);for(var l=0;l<r;l++){var p=a[l]*c[l]-u[l]*h[l];u[l]=a[l]*h[l]+u[l]*c[l],a[l]=p}return this.conjugate(a,u,r),this.transform(a,u,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),v(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),r("number"==typeof t),r(t<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=s>>>26,this.words[i]=67108863&s}return 0!==n&&(this.words[i]=n,this.length++),e?this.ineg():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=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=t.words[r]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<n;this.words[e]=u|s,s=a>>>26-n}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,n){var i;r("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=n;if(i-=s,i=Math.max(0,i),u){for(var f=0;f<s;f++)u.words[f]=this.words[f];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,f=0;f<this.length;f++)this.words[f]=this.words[f+s];else this.words[0]=0,this.length=1;var c=0;for(f=this.length-1;f>=0&&(0!==c||f>=i);f--){var h=0|this.words[f];this.words[f]=c<<26-o|h>>>o,c=h&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},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){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n)&&!!(this.words[n]&i)},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[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(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,n){var i,o,s=t.length+n;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)a=(o=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&o;if(0===a)return this._strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,s=0|i.words[i.length-1];0!==(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,u=r.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var f=0;f<a.length;f++)a.words[f]=0}var c=r.clone()._ishlnsubmul(i,1,u);0===c.negative&&(r=c,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var d=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(i,d,h);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=d)}return a&&a._strip(),r._strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):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.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},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 n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/t|0,n=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),f=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++f;for(var c=n.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()||s.isOdd())&&(i.iadd(c),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,b=1;0==(n.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(a),s.isub(u)):(n.isub(e),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:n.iushln(f)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var f=0,c=1;0==(e.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(e.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,d=1;0==(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(n)>=0?(e.isub(n),s.isub(a)):(n.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},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){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>i&&(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 A(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function w(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 _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){A.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)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n._strip(),n},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(_,w),_.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r<n;r++)e.words[r]=t.words[r];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,r=10;r<t.length;r++){var o=0|t.words[r];t.words[r-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(S,w),i(M,w),i(E,w),E.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new S;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new E}return y[t]=e,e},A.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},A.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},A.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},A.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},A.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},A.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},A.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},A.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},A.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},A.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},A.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},A.prototype.isqr=function(t){return this.imul(t,t.clone())},A.prototype.sqr=function(t){return this.mul(t,t)},A.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),f=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,f).cmp(u);)c.redIAdd(u);for(var h=this.pow(c,i),d=this.pow(t,i.addn(1).iushrn(1)),l=this.pow(t,i),p=s;0!==l.cmp(a);){for(var b=l,g=0;0!==b.cmp(a);g++)b=b.redSqr();r(g<p);var v=this.pow(h,new o(1).iushln(p-g-1));d=d.redMul(v),h=v.redSqr(),l=l.redMul(h),p=g}return d},A.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},A.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var f=e.words[r],c=u-1;c>=0;c--){var h=f>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4===++a||0===r&&0===c)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}u=26}return i},A.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},A.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,A),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(27)(t))},function(t,e,n){(function(t,r){var i;
|
||
/**
|
||
* @license
|
||
* Lodash <https://lodash.com/>
|
||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
||
* Released under MIT license <https://lodash.com/license>
|
||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
||
*/(function(){var o="Expected a function",s="__lodash_placeholder__",a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],u="[object Arguments]",f="[object Array]",c="[object Boolean]",h="[object Date]",d="[object Error]",l="[object Function]",p="[object GeneratorFunction]",b="[object Map]",g="[object Number]",v="[object Object]",m="[object RegExp]",y="[object Set]",w="[object String]",_="[object Symbol]",S="[object WeakMap]",M="[object ArrayBuffer]",E="[object DataView]",A="[object Float32Array]",x="[object Float64Array]",I="[object Int8Array]",T="[object Int16Array]",k="[object Int32Array]",L="[object Uint8Array]",N="[object Uint16Array]",R="[object Uint32Array]",O=/\b__p \+= '';/g,B=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,P=/&(?:amp|lt|gt|quot|#39);/g,U=/[&<>"']/g,F=RegExp(P.source),j=RegExp(U.source),C=/<%-([\s\S]+?)%>/g,D=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,V=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,H=/^\w*$/,W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Z=/[\\^$.*+?()[\]{}|]/g,Y=RegExp(Z.source),J=/^\s+|\s+$/g,K=/^\s+/,$=/\s+$/,X=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,G=/\{\n\/\* \[wrapped with (.+)\] \*/,Q=/,? & /,tt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,et=/\\(\\)?/g,nt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rt=/\w*$/,it=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,st=/^\[object .+?Constructor\]$/,at=/^0o[0-7]+$/i,ut=/^(?:0|[1-9]\d*)$/,ft=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ct=/($^)/,ht=/['\n\r\u2028\u2029\\]/g,dt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",lt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pt="[\\ud800-\\udfff]",bt="["+lt+"]",gt="["+dt+"]",vt="\\d+",mt="[\\u2700-\\u27bf]",yt="[a-z\\xdf-\\xf6\\xf8-\\xff]",wt="[^\\ud800-\\udfff"+lt+vt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",_t="\\ud83c[\\udffb-\\udfff]",St="[^\\ud800-\\udfff]",Mt="(?:\\ud83c[\\udde6-\\uddff]){2}",Et="[\\ud800-\\udbff][\\udc00-\\udfff]",At="[A-Z\\xc0-\\xd6\\xd8-\\xde]",xt="(?:"+yt+"|"+wt+")",It="(?:"+At+"|"+wt+")",Tt="(?:"+gt+"|"+_t+")"+"?",kt="[\\ufe0e\\ufe0f]?"+Tt+("(?:\\u200d(?:"+[St,Mt,Et].join("|")+")[\\ufe0e\\ufe0f]?"+Tt+")*"),Lt="(?:"+[mt,Mt,Et].join("|")+")"+kt,Nt="(?:"+[St+gt+"?",gt,Mt,Et,pt].join("|")+")",Rt=RegExp("['’]","g"),Ot=RegExp(gt,"g"),Bt=RegExp(_t+"(?="+_t+")|"+Nt+kt,"g"),zt=RegExp([At+"?"+yt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[bt,At,"$"].join("|")+")",It+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[bt,At+xt,"$"].join("|")+")",At+"?"+xt+"+(?:['’](?:d|ll|m|re|s|t|ve))?",At+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vt,Lt].join("|"),"g"),Pt=RegExp("[\\u200d\\ud800-\\udfff"+dt+"\\ufe0e\\ufe0f]"),Ut=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ft=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],jt=-1,Ct={};Ct[A]=Ct[x]=Ct[I]=Ct[T]=Ct[k]=Ct[L]=Ct["[object Uint8ClampedArray]"]=Ct[N]=Ct[R]=!0,Ct[u]=Ct[f]=Ct[M]=Ct[c]=Ct[E]=Ct[h]=Ct[d]=Ct[l]=Ct[b]=Ct[g]=Ct[v]=Ct[m]=Ct[y]=Ct[w]=Ct[S]=!1;var Dt={};Dt[u]=Dt[f]=Dt[M]=Dt[E]=Dt[c]=Dt[h]=Dt[A]=Dt[x]=Dt[I]=Dt[T]=Dt[k]=Dt[b]=Dt[g]=Dt[v]=Dt[m]=Dt[y]=Dt[w]=Dt[_]=Dt[L]=Dt["[object Uint8ClampedArray]"]=Dt[N]=Dt[R]=!0,Dt[d]=Dt[l]=Dt[S]=!1;var qt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Vt=parseFloat,Ht=parseInt,Wt="object"==typeof t&&t&&t.Object===Object&&t,Zt="object"==typeof self&&self&&self.Object===Object&&self,Yt=Wt||Zt||Function("return this")(),Jt=e&&!e.nodeType&&e,Kt=Jt&&"object"==typeof r&&r&&!r.nodeType&&r,$t=Kt&&Kt.exports===Jt,Xt=$t&&Wt.process,Gt=function(){try{var t=Kt&&Kt.require&&Kt.require("util").types;return t||Xt&&Xt.binding&&Xt.binding("util")}catch(t){}}(),Qt=Gt&&Gt.isArrayBuffer,te=Gt&&Gt.isDate,ee=Gt&&Gt.isMap,ne=Gt&&Gt.isRegExp,re=Gt&&Gt.isSet,ie=Gt&&Gt.isTypedArray;function oe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function se(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var s=t[i];e(r,s,n(s),t)}return r}function ae(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function ue(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function fe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function ce(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function he(t,e){return!!(null==t?0:t.length)&&_e(t,e,0)>-1}function de(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function le(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function pe(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function be(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function ge(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function ve(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var me=Ae("length");function ye(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function we(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function _e(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):we(t,Me,n)}function Se(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function Me(t){return t!=t}function Ee(t,e){var n=null==t?0:t.length;return n?Te(t,e)/n:NaN}function Ae(t){return function(e){return null==e?void 0:e[t]}}function xe(t){return function(e){return null==t?void 0:t[e]}}function Ie(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function Te(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function ke(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Le(t){return function(e){return t(e)}}function Ne(t,e){return le(e,(function(e){return t[e]}))}function Re(t,e){return t.has(e)}function Oe(t,e){for(var n=-1,r=t.length;++n<r&&_e(e,t[n],0)>-1;);return n}function Be(t,e){for(var n=t.length;n--&&_e(e,t[n],0)>-1;);return n}function ze(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var Pe=xe({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Ue=xe({"&":"&","<":"<",">":">",'"':""","'":"'"});function Fe(t){return"\\"+qt[t]}function je(t){return Pt.test(t)}function Ce(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function De(t,e){return function(n){return t(e(n))}}function qe(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==s||(t[n]=s,o[i++]=n)}return o}function Ve(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function He(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function We(t){return je(t)?function(t){var e=Bt.lastIndex=0;for(;Bt.test(t);)++e;return e}(t):me(t)}function Ze(t){return je(t)?function(t){return t.match(Bt)||[]}(t):function(t){return t.split("")}(t)}var Ye=xe({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Je=function t(e){var n,r=(e=null==e?Yt:Je.defaults(Yt.Object(),e,Je.pick(Yt,Ft))).Array,i=e.Date,dt=e.Error,lt=e.Function,pt=e.Math,bt=e.Object,gt=e.RegExp,vt=e.String,mt=e.TypeError,yt=r.prototype,wt=lt.prototype,_t=bt.prototype,St=e["__core-js_shared__"],Mt=wt.toString,Et=_t.hasOwnProperty,At=0,xt=(n=/[^.]+$/.exec(St&&St.keys&&St.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",It=_t.toString,Tt=Mt.call(bt),kt=Yt._,Lt=gt("^"+Mt.call(Et).replace(Z,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Nt=$t?e.Buffer:void 0,Bt=e.Symbol,Pt=e.Uint8Array,qt=Nt?Nt.allocUnsafe:void 0,Wt=De(bt.getPrototypeOf,bt),Zt=bt.create,Jt=_t.propertyIsEnumerable,Kt=yt.splice,Xt=Bt?Bt.isConcatSpreadable:void 0,Gt=Bt?Bt.iterator:void 0,me=Bt?Bt.toStringTag:void 0,xe=function(){try{var t=Qi(bt,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ke=e.clearTimeout!==Yt.clearTimeout&&e.clearTimeout,$e=i&&i.now!==Yt.Date.now&&i.now,Xe=e.setTimeout!==Yt.setTimeout&&e.setTimeout,Ge=pt.ceil,Qe=pt.floor,tn=bt.getOwnPropertySymbols,en=Nt?Nt.isBuffer:void 0,nn=e.isFinite,rn=yt.join,on=De(bt.keys,bt),sn=pt.max,an=pt.min,un=i.now,fn=e.parseInt,cn=pt.random,hn=yt.reverse,dn=Qi(e,"DataView"),ln=Qi(e,"Map"),pn=Qi(e,"Promise"),bn=Qi(e,"Set"),gn=Qi(e,"WeakMap"),vn=Qi(bt,"create"),mn=gn&&new gn,yn={},wn=Io(dn),_n=Io(ln),Sn=Io(pn),Mn=Io(bn),En=Io(gn),An=Bt?Bt.prototype:void 0,xn=An?An.valueOf:void 0,In=An?An.toString:void 0;function Tn(t){if(Hs(t)&&!Os(t)&&!(t instanceof Rn)){if(t instanceof Nn)return t;if(Et.call(t,"__wrapped__"))return To(t)}return new Nn(t)}var kn=function(){function t(){}return function(e){if(!Vs(e))return{};if(Zt)return Zt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Ln(){}function Nn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Rn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function On(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Bn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function zn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Pn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new zn;++e<n;)this.add(t[e])}function Un(t){var e=this.__data__=new Bn(t);this.size=e.size}function Fn(t,e){var n=Os(t),r=!n&&Rs(t),i=!n&&!r&&Us(t),o=!n&&!r&&!i&&Gs(t),s=n||r||i||o,a=s?ke(t.length,vt):[],u=a.length;for(var f in t)!e&&!Et.call(t,f)||s&&("length"==f||i&&("offset"==f||"parent"==f)||o&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||so(f,u))||a.push(f);return a}function jn(t){var e=t.length;return e?t[Pr(0,e-1)]:void 0}function Cn(t,e){return Eo(vi(t),Kn(e,0,t.length))}function Dn(t){return Eo(vi(t))}function qn(t,e,n){(void 0===n||ks(t[e],n))&&(void 0!==n||e in t)||Yn(t,e,n)}function Vn(t,e,n){var r=t[e];Et.call(t,e)&&ks(r,n)&&(void 0!==n||e in t)||Yn(t,e,n)}function Hn(t,e){for(var n=t.length;n--;)if(ks(t[n][0],e))return n;return-1}function Wn(t,e,n,r){return tr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function Zn(t,e){return t&&mi(e,wa(e),t)}function Yn(t,e,n){"__proto__"==e&&xe?xe(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Jn(t,e){for(var n=-1,i=e.length,o=r(i),s=null==t;++n<i;)o[n]=s?void 0:ba(t,e[n]);return o}function Kn(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}function $n(t,e,n,r,i,o){var s,a=1&e,f=2&e,d=4&e;if(n&&(s=i?n(t,r,i,o):n(t)),void 0!==s)return s;if(!Vs(t))return t;var S=Os(t);if(S){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Et.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!a)return vi(t,s)}else{var O=no(t),B=O==l||O==p;if(Us(t))return hi(t,a);if(O==v||O==u||B&&!i){if(s=f||B?{}:io(t),!a)return f?function(t,e){return mi(t,eo(t),e)}(t,function(t,e){return t&&mi(e,_a(e),t)}(s,t)):function(t,e){return mi(t,to(t),e)}(t,Zn(s,t))}else{if(!Dt[O])return i?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case M:return di(t);case c:case h:return new r(+t);case E:return function(t,e){var n=e?di(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case A:case x:case I:case T:case k:case L:case"[object Uint8ClampedArray]":case N:case R:return li(t,n);case b:return new r;case g:case w:return new r(t);case m:return function(t){var e=new t.constructor(t.source,rt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case y:return new r;case _:return i=t,xn?bt(xn.call(i)):{}}var i}(t,O,a)}}o||(o=new Un);var z=o.get(t);if(z)return z;o.set(t,s),Ks(t)?t.forEach((function(r){s.add($n(r,e,n,r,t,o))})):Ws(t)&&t.forEach((function(r,i){s.set(i,$n(r,e,n,i,t,o))}));var P=S?void 0:(d?f?Zi:Wi:f?_a:wa)(t);return ae(P||t,(function(r,i){P&&(r=t[i=r]),Vn(s,i,$n(r,e,n,i,t,o))})),s}function Xn(t,e,n){var r=n.length;if(null==t)return!r;for(t=bt(t);r--;){var i=n[r],o=e[i],s=t[i];if(void 0===s&&!(i in t)||!o(s))return!1}return!0}function Gn(t,e,n){if("function"!=typeof t)throw new mt(o);return wo((function(){t.apply(void 0,n)}),e)}function Qn(t,e,n,r){var i=-1,o=he,s=!0,a=t.length,u=[],f=e.length;if(!a)return u;n&&(e=le(e,Le(n))),r?(o=de,s=!1):e.length>=200&&(o=Re,s=!1,e=new Pn(e));t:for(;++i<a;){var c=t[i],h=null==n?c:n(c);if(c=r||0!==c?c:0,s&&h==h){for(var d=f;d--;)if(e[d]===h)continue t;u.push(c)}else o(e,h,r)||u.push(c)}return u}Tn.templateSettings={escape:C,evaluate:D,interpolate:q,variable:"",imports:{_:Tn}},Tn.prototype=Ln.prototype,Tn.prototype.constructor=Tn,Nn.prototype=kn(Ln.prototype),Nn.prototype.constructor=Nn,Rn.prototype=kn(Ln.prototype),Rn.prototype.constructor=Rn,On.prototype.clear=function(){this.__data__=vn?vn(null):{},this.size=0},On.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},On.prototype.get=function(t){var e=this.__data__;if(vn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Et.call(e,t)?e[t]:void 0},On.prototype.has=function(t){var e=this.__data__;return vn?void 0!==e[t]:Et.call(e,t)},On.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=vn&&void 0===e?"__lodash_hash_undefined__":e,this},Bn.prototype.clear=function(){this.__data__=[],this.size=0},Bn.prototype.delete=function(t){var e=this.__data__,n=Hn(e,t);return!(n<0)&&(n==e.length-1?e.pop():Kt.call(e,n,1),--this.size,!0)},Bn.prototype.get=function(t){var e=this.__data__,n=Hn(e,t);return n<0?void 0:e[n][1]},Bn.prototype.has=function(t){return Hn(this.__data__,t)>-1},Bn.prototype.set=function(t,e){var n=this.__data__,r=Hn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},zn.prototype.clear=function(){this.size=0,this.__data__={hash:new On,map:new(ln||Bn),string:new On}},zn.prototype.delete=function(t){var e=Xi(this,t).delete(t);return this.size-=e?1:0,e},zn.prototype.get=function(t){return Xi(this,t).get(t)},zn.prototype.has=function(t){return Xi(this,t).has(t)},zn.prototype.set=function(t,e){var n=Xi(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Pn.prototype.add=Pn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Pn.prototype.has=function(t){return this.__data__.has(t)},Un.prototype.clear=function(){this.__data__=new Bn,this.size=0},Un.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Un.prototype.get=function(t){return this.__data__.get(t)},Un.prototype.has=function(t){return this.__data__.has(t)},Un.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Bn){var r=n.__data__;if(!ln||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(t,e),this.size=n.size,this};var tr=_i(ur),er=_i(fr,!0);function nr(t,e){var n=!0;return tr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function rr(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],s=e(o);if(null!=s&&(void 0===a?s==s&&!Xs(s):n(s,a)))var a=s,u=o}return u}function ir(t,e){var n=[];return tr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function or(t,e,n,r,i){var o=-1,s=t.length;for(n||(n=oo),i||(i=[]);++o<s;){var a=t[o];e>0&&n(a)?e>1?or(a,e-1,n,r,i):pe(i,a):r||(i[i.length]=a)}return i}var sr=Si(),ar=Si(!0);function ur(t,e){return t&&sr(t,e,wa)}function fr(t,e){return t&&ar(t,e,wa)}function cr(t,e){return ce(e,(function(e){return Cs(t[e])}))}function hr(t,e){for(var n=0,r=(e=ai(e,t)).length;null!=t&&n<r;)t=t[xo(e[n++])];return n&&n==r?t:void 0}function dr(t,e,n){var r=e(t);return Os(t)?r:pe(r,n(t))}function lr(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":me&&me in bt(t)?function(t){var e=Et.call(t,me),n=t[me];try{t[me]=void 0;var r=!0}catch(t){}var i=It.call(t);r&&(e?t[me]=n:delete t[me]);return i}(t):function(t){return It.call(t)}(t)}function pr(t,e){return t>e}function br(t,e){return null!=t&&Et.call(t,e)}function gr(t,e){return null!=t&&e in bt(t)}function vr(t,e,n){for(var i=n?de:he,o=t[0].length,s=t.length,a=s,u=r(s),f=1/0,c=[];a--;){var h=t[a];a&&e&&(h=le(h,Le(e))),f=an(h.length,f),u[a]=!n&&(e||o>=120&&h.length>=120)?new Pn(a&&h):void 0}h=t[0];var d=-1,l=u[0];t:for(;++d<o&&c.length<f;){var p=h[d],b=e?e(p):p;if(p=n||0!==p?p:0,!(l?Re(l,b):i(c,b,n))){for(a=s;--a;){var g=u[a];if(!(g?Re(g,b):i(t[a],b,n)))continue t}l&&l.push(b),c.push(p)}}return c}function mr(t,e,n){var r=null==(t=go(t,e=ai(e,t)))?t:t[xo(jo(e))];return null==r?void 0:oe(r,t,n)}function yr(t){return Hs(t)&&lr(t)==u}function wr(t,e,n,r,i){return t===e||(null==t||null==e||!Hs(t)&&!Hs(e)?t!=t&&e!=e:function(t,e,n,r,i,o){var s=Os(t),a=Os(e),l=s?f:no(t),p=a?f:no(e),S=(l=l==u?v:l)==v,A=(p=p==u?v:p)==v,x=l==p;if(x&&Us(t)){if(!Us(e))return!1;s=!0,S=!1}if(x&&!S)return o||(o=new Un),s||Gs(t)?Vi(t,e,n,r,i,o):function(t,e,n,r,i,o,s){switch(n){case E:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case M:return!(t.byteLength!=e.byteLength||!o(new Pt(t),new Pt(e)));case c:case h:case g:return ks(+t,+e);case d:return t.name==e.name&&t.message==e.message;case m:case w:return t==e+"";case b:var a=Ce;case y:var u=1&r;if(a||(a=Ve),t.size!=e.size&&!u)return!1;var f=s.get(t);if(f)return f==e;r|=2,s.set(t,e);var l=Vi(a(t),a(e),r,i,o,s);return s.delete(t),l;case _:if(xn)return xn.call(t)==xn.call(e)}return!1}(t,e,l,n,r,i,o);if(!(1&n)){var I=S&&Et.call(t,"__wrapped__"),T=A&&Et.call(e,"__wrapped__");if(I||T){var k=I?t.value():t,L=T?e.value():e;return o||(o=new Un),i(k,L,n,r,o)}}if(!x)return!1;return o||(o=new Un),function(t,e,n,r,i,o){var s=1&n,a=Wi(t),u=a.length,f=Wi(e).length;if(u!=f&&!s)return!1;var c=u;for(;c--;){var h=a[c];if(!(s?h in e:Et.call(e,h)))return!1}var d=o.get(t);if(d&&o.get(e))return d==e;var l=!0;o.set(t,e),o.set(e,t);var p=s;for(;++c<u;){h=a[c];var b=t[h],g=e[h];if(r)var v=s?r(g,b,h,e,t,o):r(b,g,h,t,e,o);if(!(void 0===v?b===g||i(b,g,n,r,o):v)){l=!1;break}p||(p="constructor"==h)}if(l&&!p){var m=t.constructor,y=e.constructor;m!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y)&&(l=!1)}return o.delete(t),o.delete(e),l}(t,e,n,r,i,o)}(t,e,n,r,wr,i))}function _r(t,e,n,r){var i=n.length,o=i,s=!r;if(null==t)return!o;for(t=bt(t);i--;){var a=n[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){var u=(a=n[i])[0],f=t[u],c=a[1];if(s&&a[2]){if(void 0===f&&!(u in t))return!1}else{var h=new Un;if(r)var d=r(f,c,u,t,e,h);if(!(void 0===d?wr(c,f,3,r,h):d))return!1}}return!0}function Sr(t){return!(!Vs(t)||(e=t,xt&&xt in e))&&(Cs(t)?Lt:st).test(Io(t));var e}function Mr(t){return"function"==typeof t?t:null==t?Za:"object"==typeof t?Os(t)?kr(t[0],t[1]):Tr(t):eu(t)}function Er(t){if(!ho(t))return on(t);var e=[];for(var n in bt(t))Et.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Ar(t){if(!Vs(t))return function(t){var e=[];if(null!=t)for(var n in bt(t))e.push(n);return e}(t);var e=ho(t),n=[];for(var r in t)("constructor"!=r||!e&&Et.call(t,r))&&n.push(r);return n}function xr(t,e){return t<e}function Ir(t,e){var n=-1,i=zs(t)?r(t.length):[];return tr(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}function Tr(t){var e=Gi(t);return 1==e.length&&e[0][2]?po(e[0][0],e[0][1]):function(n){return n===t||_r(n,t,e)}}function kr(t,e){return uo(t)&&lo(e)?po(xo(t),e):function(n){var r=ba(n,t);return void 0===r&&r===e?ga(n,t):wr(e,r,3)}}function Lr(t,e,n,r,i){t!==e&&sr(e,(function(o,s){if(i||(i=new Un),Vs(o))!function(t,e,n,r,i,o,s){var a=mo(t,n),u=mo(e,n),f=s.get(u);if(f)return void qn(t,n,f);var c=o?o(a,u,n+"",t,e,s):void 0,h=void 0===c;if(h){var d=Os(u),l=!d&&Us(u),p=!d&&!l&&Gs(u);c=u,d||l||p?Os(a)?c=a:Ps(a)?c=vi(a):l?(h=!1,c=hi(u,!0)):p?(h=!1,c=li(u,!0)):c=[]:Ys(u)||Rs(u)?(c=a,Rs(a)?c=sa(a):Vs(a)&&!Cs(a)||(c=io(u))):h=!1}h&&(s.set(u,c),i(c,u,r,o,s),s.delete(u));qn(t,n,c)}(t,e,s,n,Lr,r,i);else{var a=r?r(mo(t,s),o,s+"",t,e,i):void 0;void 0===a&&(a=o),qn(t,s,a)}}),_a)}function Nr(t,e){var n=t.length;if(n)return so(e+=e<0?n:0,n)?t[e]:void 0}function Rr(t,e,n){var r=-1;return e=le(e.length?e:[Za],Le($i())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(Ir(t,(function(t,n,i){return{criteria:le(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,s=i.length,a=n.length;for(;++r<s;){var u=pi(i[r],o[r]);if(u){if(r>=a)return u;var f=n[r];return u*("desc"==f?-1:1)}}return t.index-e.index}(t,e,n)}))}function Or(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var s=e[r],a=hr(t,s);n(a,s)&&Dr(o,ai(s,t),a)}return o}function Br(t,e,n,r){var i=r?Se:_e,o=-1,s=e.length,a=t;for(t===e&&(e=vi(e)),n&&(a=le(t,Le(n)));++o<s;)for(var u=0,f=e[o],c=n?n(f):f;(u=i(a,c,u,r))>-1;)a!==t&&Kt.call(a,u,1),Kt.call(t,u,1);return t}function zr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;so(i)?Kt.call(t,i,1):Qr(t,i)}}return t}function Pr(t,e){return t+Qe(cn()*(e-t+1))}function Ur(t,e){var n="";if(!t||e<1||e>9007199254740991)return n;do{e%2&&(n+=t),(e=Qe(e/2))&&(t+=t)}while(e);return n}function Fr(t,e){return _o(bo(t,e,Za),t+"")}function jr(t){return jn(ka(t))}function Cr(t,e){var n=ka(t);return Eo(n,Kn(e,0,n.length))}function Dr(t,e,n,r){if(!Vs(t))return t;for(var i=-1,o=(e=ai(e,t)).length,s=o-1,a=t;null!=a&&++i<o;){var u=xo(e[i]),f=n;if(i!=s){var c=a[u];void 0===(f=r?r(c,u,a):void 0)&&(f=Vs(c)?c:so(e[i+1])?[]:{})}Vn(a,u,f),a=a[u]}return t}var qr=mn?function(t,e){return mn.set(t,e),t}:Za,Vr=xe?function(t,e){return xe(t,"toString",{configurable:!0,enumerable:!1,value:Va(e),writable:!0})}:Za;function Hr(t){return Eo(ka(t))}function Wr(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var s=r(o);++i<o;)s[i]=t[i+e];return s}function Zr(t,e){var n;return tr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function Yr(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=t[o];null!==s&&!Xs(s)&&(n?s<=e:s<e)?r=o+1:i=o}return i}return Jr(t,e,Za,n)}function Jr(t,e,n,r){e=n(e);for(var i=0,o=null==t?0:t.length,s=e!=e,a=null===e,u=Xs(e),f=void 0===e;i<o;){var c=Qe((i+o)/2),h=n(t[c]),d=void 0!==h,l=null===h,p=h==h,b=Xs(h);if(s)var g=r||p;else g=f?p&&(r||d):a?p&&d&&(r||!l):u?p&&d&&!l&&(r||!b):!l&&!b&&(r?h<=e:h<e);g?i=c+1:o=c}return an(o,4294967294)}function Kr(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n],a=e?e(s):s;if(!n||!ks(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function $r(t){return"number"==typeof t?t:Xs(t)?NaN:+t}function Xr(t){if("string"==typeof t)return t;if(Os(t))return le(t,Xr)+"";if(Xs(t))return In?In.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Gr(t,e,n){var r=-1,i=he,o=t.length,s=!0,a=[],u=a;if(n)s=!1,i=de;else if(o>=200){var f=e?null:Ui(t);if(f)return Ve(f);s=!1,i=Re,u=new Pn}else u=e?[]:a;t:for(;++r<o;){var c=t[r],h=e?e(c):c;if(c=n||0!==c?c:0,s&&h==h){for(var d=u.length;d--;)if(u[d]===h)continue t;e&&u.push(h),a.push(c)}else i(u,h,n)||(u!==a&&u.push(h),a.push(c))}return a}function Qr(t,e){return null==(t=go(t,e=ai(e,t)))||delete t[xo(jo(e))]}function ti(t,e,n,r){return Dr(t,e,n(hr(t,e)),r)}function ei(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Wr(t,r?0:o,r?o+1:i):Wr(t,r?o+1:0,r?i:o)}function ni(t,e){var n=t;return n instanceof Rn&&(n=n.value()),be(e,(function(t,e){return e.func.apply(e.thisArg,pe([t],e.args))}),n)}function ri(t,e,n){var i=t.length;if(i<2)return i?Gr(t[0]):[];for(var o=-1,s=r(i);++o<i;)for(var a=t[o],u=-1;++u<i;)u!=o&&(s[o]=Qn(s[o]||a,t[u],e,n));return Gr(or(s,1),e,n)}function ii(t,e,n){for(var r=-1,i=t.length,o=e.length,s={};++r<i;){var a=r<o?e[r]:void 0;n(s,t[r],a)}return s}function oi(t){return Ps(t)?t:[]}function si(t){return"function"==typeof t?t:Za}function ai(t,e){return Os(t)?t:uo(t,e)?[t]:Ao(aa(t))}var ui=Fr;function fi(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:Wr(t,e,n)}var ci=Ke||function(t){return Yt.clearTimeout(t)};function hi(t,e){if(e)return t.slice();var n=t.length,r=qt?qt(n):new t.constructor(n);return t.copy(r),r}function di(t){var e=new t.constructor(t.byteLength);return new Pt(e).set(new Pt(t)),e}function li(t,e){var n=e?di(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function pi(t,e){if(t!==e){var n=void 0!==t,r=null===t,i=t==t,o=Xs(t),s=void 0!==e,a=null===e,u=e==e,f=Xs(e);if(!a&&!f&&!o&&t>e||o&&s&&u&&!a&&!f||r&&s&&u||!n&&u||!i)return 1;if(!r&&!o&&!f&&t<e||f&&n&&i&&!r&&!o||a&&n&&i||!s&&i||!u)return-1}return 0}function bi(t,e,n,i){for(var o=-1,s=t.length,a=n.length,u=-1,f=e.length,c=sn(s-a,0),h=r(f+c),d=!i;++u<f;)h[u]=e[u];for(;++o<a;)(d||o<s)&&(h[n[o]]=t[o]);for(;c--;)h[u++]=t[o++];return h}function gi(t,e,n,i){for(var o=-1,s=t.length,a=-1,u=n.length,f=-1,c=e.length,h=sn(s-u,0),d=r(h+c),l=!i;++o<h;)d[o]=t[o];for(var p=o;++f<c;)d[p+f]=e[f];for(;++a<u;)(l||o<s)&&(d[p+n[a]]=t[o++]);return d}function vi(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function mi(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],u=r?r(n[a],t[a],a,n,t):void 0;void 0===u&&(u=t[a]),i?Yn(n,a,u):Vn(n,a,u)}return n}function yi(t,e){return function(n,r){var i=Os(n)?se:Wn,o=e?e():{};return i(n,t,$i(r,2),o)}}function wi(t){return Fr((function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,s&&ao(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),e=bt(e);++r<i;){var a=n[r];a&&t(e,a,r,o)}return e}))}function _i(t,e){return function(n,r){if(null==n)return n;if(!zs(n))return t(n,r);for(var i=n.length,o=e?i:-1,s=bt(n);(e?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function Si(t){return function(e,n,r){for(var i=-1,o=bt(e),s=r(e),a=s.length;a--;){var u=s[t?a:++i];if(!1===n(o[u],u,o))break}return e}}function Mi(t){return function(e){var n=je(e=aa(e))?Ze(e):void 0,r=n?n[0]:e.charAt(0),i=n?fi(n,1).join(""):e.slice(1);return r[t]()+i}}function Ei(t){return function(e){return be(Ca(Ra(e).replace(Rt,"")),t,"")}}function Ai(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=kn(t.prototype),r=t.apply(n,e);return Vs(r)?r:n}}function xi(t){return function(e,n,r){var i=bt(e);if(!zs(e)){var o=$i(n,3);e=wa(e),n=function(t){return o(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[o?e[s]:s]:void 0}}function Ii(t){return Hi((function(e){var n=e.length,r=n,i=Nn.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new mt(o);if(i&&!a&&"wrapper"==Ji(s))var a=new Nn([],!0)}for(r=a?r:n;++r<n;){var u=Ji(s=e[r]),f="wrapper"==u?Yi(s):void 0;a=f&&fo(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?a[Ji(f[0])].apply(a,f[3]):1==s.length&&fo(s)?a[u]():a.thru(s)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&Os(r))return a.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function Ti(t,e,n,i,o,s,a,u,f,c){var h=128&e,d=1&e,l=2&e,p=24&e,b=512&e,g=l?void 0:Ai(t);return function v(){for(var m=arguments.length,y=r(m),w=m;w--;)y[w]=arguments[w];if(p)var _=Ki(v),S=ze(y,_);if(i&&(y=bi(y,i,o,p)),s&&(y=gi(y,s,a,p)),m-=S,p&&m<c){var M=qe(y,_);return zi(t,e,Ti,v.placeholder,n,y,M,u,f,c-m)}var E=d?n:this,A=l?E[t]:t;return m=y.length,u?y=vo(y,u):b&&m>1&&y.reverse(),h&&f<m&&(y.length=f),this&&this!==Yt&&this instanceof v&&(A=g||Ai(A)),A.apply(E,y)}}function ki(t,e){return function(n,r){return function(t,e,n,r){return ur(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Li(t,e){return function(n,r){var i;if(void 0===n&&void 0===r)return e;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Xr(n),r=Xr(r)):(n=$r(n),r=$r(r)),i=t(n,r)}return i}}function Ni(t){return Hi((function(e){return e=le(e,Le($i())),Fr((function(n){var r=this;return t(e,(function(t){return oe(t,r,n)}))}))}))}function Ri(t,e){var n=(e=void 0===e?" ":Xr(e)).length;if(n<2)return n?Ur(e,t):e;var r=Ur(e,Ge(t/We(e)));return je(e)?fi(Ze(r),0,t).join(""):r.slice(0,t)}function Oi(t){return function(e,n,i){return i&&"number"!=typeof i&&ao(e,n,i)&&(n=i=void 0),e=na(e),void 0===n?(n=e,e=0):n=na(n),function(t,e,n,i){for(var o=-1,s=sn(Ge((e-t)/(n||1)),0),a=r(s);s--;)a[i?s:++o]=t,t+=n;return a}(e,n,i=void 0===i?e<n?1:-1:na(i),t)}}function Bi(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=oa(e),n=oa(n)),t(e,n)}}function zi(t,e,n,r,i,o,s,a,u,f){var c=8&e;e|=c?32:64,4&(e&=~(c?64:32))||(e&=-4);var h=[t,e,i,c?o:void 0,c?s:void 0,c?void 0:o,c?void 0:s,a,u,f],d=n.apply(void 0,h);return fo(t)&&yo(d,h),d.placeholder=r,So(d,t,e)}function Pi(t){var e=pt[t];return function(t,n){if(t=oa(t),(n=null==n?0:an(ra(n),292))&&nn(t)){var r=(aa(t)+"e").split("e");return+((r=(aa(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ui=bn&&1/Ve(new bn([,-0]))[1]==1/0?function(t){return new bn(t)}:Xa;function Fi(t){return function(e){var n=no(e);return n==b?Ce(e):n==y?He(e):function(t,e){return le(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function ji(t,e,n,i,a,u,f,c){var h=2&e;if(!h&&"function"!=typeof t)throw new mt(o);var d=i?i.length:0;if(d||(e&=-97,i=a=void 0),f=void 0===f?f:sn(ra(f),0),c=void 0===c?c:ra(c),d-=a?a.length:0,64&e){var l=i,p=a;i=a=void 0}var b=h?void 0:Yi(t),g=[t,e,n,i,a,l,p,u,f,c];if(b&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,a=128==r&&8==n||128==r&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!a)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var u=e[3];if(u){var f=t[3];t[3]=f?bi(f,u,e[4]):u,t[4]=f?qe(t[3],s):e[4]}(u=e[5])&&(f=t[5],t[5]=f?gi(f,u,e[6]):u,t[6]=f?qe(t[5],s):e[6]);(u=e[7])&&(t[7]=u);128&r&&(t[8]=null==t[8]?e[8]:an(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(g,b),t=g[0],e=g[1],n=g[2],i=g[3],a=g[4],!(c=g[9]=void 0===g[9]?h?0:t.length:sn(g[9]-d,0))&&24&e&&(e&=-25),e&&1!=e)v=8==e||16==e?function(t,e,n){var i=Ai(t);return function o(){for(var s=arguments.length,a=r(s),u=s,f=Ki(o);u--;)a[u]=arguments[u];var c=s<3&&a[0]!==f&&a[s-1]!==f?[]:qe(a,f);if((s-=c.length)<n)return zi(t,e,Ti,o.placeholder,void 0,a,c,void 0,void 0,n-s);var h=this&&this!==Yt&&this instanceof o?i:t;return oe(h,this,a)}}(t,e,c):32!=e&&33!=e||a.length?Ti.apply(void 0,g):function(t,e,n,i){var o=1&e,s=Ai(t);return function e(){for(var a=-1,u=arguments.length,f=-1,c=i.length,h=r(c+u),d=this&&this!==Yt&&this instanceof e?s:t;++f<c;)h[f]=i[f];for(;u--;)h[f++]=arguments[++a];return oe(d,o?n:this,h)}}(t,e,n,i);else var v=function(t,e,n){var r=1&e,i=Ai(t);return function e(){var o=this&&this!==Yt&&this instanceof e?i:t;return o.apply(r?n:this,arguments)}}(t,e,n);return So((b?qr:yo)(v,g),t,e)}function Ci(t,e,n,r){return void 0===t||ks(t,_t[n])&&!Et.call(r,n)?e:t}function Di(t,e,n,r,i,o){return Vs(t)&&Vs(e)&&(o.set(e,t),Lr(t,e,void 0,Di,o),o.delete(e)),t}function qi(t){return Ys(t)?void 0:t}function Vi(t,e,n,r,i,o){var s=1&n,a=t.length,u=e.length;if(a!=u&&!(s&&u>a))return!1;var f=o.get(t);if(f&&o.get(e))return f==e;var c=-1,h=!0,d=2&n?new Pn:void 0;for(o.set(t,e),o.set(e,t);++c<a;){var l=t[c],p=e[c];if(r)var b=s?r(p,l,c,e,t,o):r(l,p,c,t,e,o);if(void 0!==b){if(b)continue;h=!1;break}if(d){if(!ve(e,(function(t,e){if(!Re(d,e)&&(l===t||i(l,t,n,r,o)))return d.push(e)}))){h=!1;break}}else if(l!==p&&!i(l,p,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function Hi(t){return _o(bo(t,void 0,Bo),t+"")}function Wi(t){return dr(t,wa,to)}function Zi(t){return dr(t,_a,eo)}var Yi=mn?function(t){return mn.get(t)}:Xa;function Ji(t){for(var e=t.name+"",n=yn[e],r=Et.call(yn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Ki(t){return(Et.call(Tn,"placeholder")?Tn:t).placeholder}function $i(){var t=Tn.iteratee||Ya;return t=t===Ya?Mr:t,arguments.length?t(arguments[0],arguments[1]):t}function Xi(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Gi(t){for(var e=wa(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,lo(i)]}return e}function Qi(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Sr(n)?n:void 0}var to=tn?function(t){return null==t?[]:(t=bt(t),ce(tn(t),(function(e){return Jt.call(t,e)})))}:iu,eo=tn?function(t){for(var e=[];t;)pe(e,to(t)),t=Wt(t);return e}:iu,no=lr;function ro(t,e,n){for(var r=-1,i=(e=ai(e,t)).length,o=!1;++r<i;){var s=xo(e[r]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&qs(i)&&so(s,i)&&(Os(t)||Rs(t))}function io(t){return"function"!=typeof t.constructor||ho(t)?{}:kn(Wt(t))}function oo(t){return Os(t)||Rs(t)||!!(Xt&&t&&t[Xt])}function so(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&ut.test(t))&&t>-1&&t%1==0&&t<e}function ao(t,e,n){if(!Vs(n))return!1;var r=typeof e;return!!("number"==r?zs(n)&&so(e,n.length):"string"==r&&e in n)&&ks(n[e],t)}function uo(t,e){if(Os(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Xs(t))||(H.test(t)||!V.test(t)||null!=e&&t in bt(e))}function fo(t){var e=Ji(t),n=Tn[e];if("function"!=typeof n||!(e in Rn.prototype))return!1;if(t===n)return!0;var r=Yi(n);return!!r&&t===r[0]}(dn&&no(new dn(new ArrayBuffer(1)))!=E||ln&&no(new ln)!=b||pn&&"[object Promise]"!=no(pn.resolve())||bn&&no(new bn)!=y||gn&&no(new gn)!=S)&&(no=function(t){var e=lr(t),n=e==v?t.constructor:void 0,r=n?Io(n):"";if(r)switch(r){case wn:return E;case _n:return b;case Sn:return"[object Promise]";case Mn:return y;case En:return S}return e});var co=St?Cs:ou;function ho(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||_t)}function lo(t){return t==t&&!Vs(t)}function po(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in bt(n)))}}function bo(t,e,n){return e=sn(void 0===e?t.length-1:e,0),function(){for(var i=arguments,o=-1,s=sn(i.length-e,0),a=r(s);++o<s;)a[o]=i[e+o];o=-1;for(var u=r(e+1);++o<e;)u[o]=i[o];return u[e]=n(a),oe(t,this,u)}}function go(t,e){return e.length<2?t:hr(t,Wr(e,0,-1))}function vo(t,e){for(var n=t.length,r=an(e.length,n),i=vi(t);r--;){var o=e[r];t[r]=so(o,n)?i[o]:void 0}return t}function mo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var yo=Mo(qr),wo=Xe||function(t,e){return Yt.setTimeout(t,e)},_o=Mo(Vr);function So(t,e,n){var r=e+"";return _o(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(X,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return ae(a,(function(n){var r="_."+n[0];e&n[1]&&!he(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(G);return e?e[1].split(Q):[]}(r),n)))}function Mo(t){var e=0,n=0;return function(){var r=un(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Eo(t,e){var n=-1,r=t.length,i=r-1;for(e=void 0===e?r:e;++n<e;){var o=Pr(n,i),s=t[o];t[o]=t[n],t[n]=s}return t.length=e,t}var Ao=function(t){var e=Ms(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(W,(function(t,n,r,i){e.push(r?i.replace(et,"$1"):n||t)})),e}));function xo(t){if("string"==typeof t||Xs(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Io(t){if(null!=t){try{return Mt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function To(t){if(t instanceof Rn)return t.clone();var e=new Nn(t.__wrapped__,t.__chain__);return e.__actions__=vi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var ko=Fr((function(t,e){return Ps(t)?Qn(t,or(e,1,Ps,!0)):[]})),Lo=Fr((function(t,e){var n=jo(e);return Ps(n)&&(n=void 0),Ps(t)?Qn(t,or(e,1,Ps,!0),$i(n,2)):[]})),No=Fr((function(t,e){var n=jo(e);return Ps(n)&&(n=void 0),Ps(t)?Qn(t,or(e,1,Ps,!0),void 0,n):[]}));function Ro(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ra(n);return i<0&&(i=sn(r+i,0)),we(t,$i(e,3),i)}function Oo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=ra(n),i=n<0?sn(r+i,0):an(i,r-1)),we(t,$i(e,3),i,!0)}function Bo(t){return(null==t?0:t.length)?or(t,1):[]}function zo(t){return t&&t.length?t[0]:void 0}var Po=Fr((function(t){var e=le(t,oi);return e.length&&e[0]===t[0]?vr(e):[]})),Uo=Fr((function(t){var e=jo(t),n=le(t,oi);return e===jo(n)?e=void 0:n.pop(),n.length&&n[0]===t[0]?vr(n,$i(e,2)):[]})),Fo=Fr((function(t){var e=jo(t),n=le(t,oi);return(e="function"==typeof e?e:void 0)&&n.pop(),n.length&&n[0]===t[0]?vr(n,void 0,e):[]}));function jo(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var Co=Fr(Do);function Do(t,e){return t&&t.length&&e&&e.length?Br(t,e):t}var qo=Hi((function(t,e){var n=null==t?0:t.length,r=Jn(t,e);return zr(t,le(e,(function(t){return so(t,n)?+t:t})).sort(pi)),r}));function Vo(t){return null==t?t:hn.call(t)}var Ho=Fr((function(t){return Gr(or(t,1,Ps,!0))})),Wo=Fr((function(t){var e=jo(t);return Ps(e)&&(e=void 0),Gr(or(t,1,Ps,!0),$i(e,2))})),Zo=Fr((function(t){var e=jo(t);return e="function"==typeof e?e:void 0,Gr(or(t,1,Ps,!0),void 0,e)}));function Yo(t){if(!t||!t.length)return[];var e=0;return t=ce(t,(function(t){if(Ps(t))return e=sn(t.length,e),!0})),ke(e,(function(e){return le(t,Ae(e))}))}function Jo(t,e){if(!t||!t.length)return[];var n=Yo(t);return null==e?n:le(n,(function(t){return oe(e,void 0,t)}))}var Ko=Fr((function(t,e){return Ps(t)?Qn(t,e):[]})),$o=Fr((function(t){return ri(ce(t,Ps))})),Xo=Fr((function(t){var e=jo(t);return Ps(e)&&(e=void 0),ri(ce(t,Ps),$i(e,2))})),Go=Fr((function(t){var e=jo(t);return e="function"==typeof e?e:void 0,ri(ce(t,Ps),void 0,e)})),Qo=Fr(Yo);var ts=Fr((function(t){var e=t.length,n=e>1?t[e-1]:void 0;return n="function"==typeof n?(t.pop(),n):void 0,Jo(t,n)}));function es(t){var e=Tn(t);return e.__chain__=!0,e}function ns(t,e){return e(t)}var rs=Hi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return Jn(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Rn&&so(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:ns,args:[i],thisArg:void 0}),new Nn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(i)}));var is=yi((function(t,e,n){Et.call(t,n)?++t[n]:Yn(t,n,1)}));var os=xi(Ro),ss=xi(Oo);function as(t,e){return(Os(t)?ae:tr)(t,$i(e,3))}function us(t,e){return(Os(t)?ue:er)(t,$i(e,3))}var fs=yi((function(t,e,n){Et.call(t,n)?t[n].push(e):Yn(t,n,[e])}));var cs=Fr((function(t,e,n){var i=-1,o="function"==typeof e,s=zs(t)?r(t.length):[];return tr(t,(function(t){s[++i]=o?oe(e,t,n):mr(t,e,n)})),s})),hs=yi((function(t,e,n){Yn(t,n,e)}));function ds(t,e){return(Os(t)?le:Ir)(t,$i(e,3))}var ls=yi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var ps=Fr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&ao(t,e[0],e[1])?e=[]:n>2&&ao(e[0],e[1],e[2])&&(e=[e[0]]),Rr(t,or(e,1),[])})),bs=$e||function(){return Yt.Date.now()};function gs(t,e,n){return e=n?void 0:e,ji(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function vs(t,e){var n;if("function"!=typeof e)throw new mt(o);return t=ra(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var ms=Fr((function(t,e,n){var r=1;if(n.length){var i=qe(n,Ki(ms));r|=32}return ji(t,r,e,n,i)})),ys=Fr((function(t,e,n){var r=3;if(n.length){var i=qe(n,Ki(ys));r|=32}return ji(e,r,t,n,i)}));function ws(t,e,n){var r,i,s,a,u,f,c=0,h=!1,d=!1,l=!0;if("function"!=typeof t)throw new mt(o);function p(e){var n=r,o=i;return r=i=void 0,c=e,a=t.apply(o,n)}function b(t){return c=t,u=wo(v,e),h?p(t):a}function g(t){var n=t-f;return void 0===f||n>=e||n<0||d&&t-c>=s}function v(){var t=bs();if(g(t))return m(t);u=wo(v,function(t){var n=e-(t-f);return d?an(n,s-(t-c)):n}(t))}function m(t){return u=void 0,l&&r?p(t):(r=i=void 0,a)}function y(){var t=bs(),n=g(t);if(r=arguments,i=this,f=t,n){if(void 0===u)return b(f);if(d)return ci(u),u=wo(v,e),p(f)}return void 0===u&&(u=wo(v,e)),a}return e=oa(e)||0,Vs(n)&&(h=!!n.leading,s=(d="maxWait"in n)?sn(oa(n.maxWait)||0,e):s,l="trailing"in n?!!n.trailing:l),y.cancel=function(){void 0!==u&&ci(u),c=0,r=f=i=u=void 0},y.flush=function(){return void 0===u?a:m(bs())},y}var _s=Fr((function(t,e){return Gn(t,1,e)})),Ss=Fr((function(t,e,n){return Gn(t,oa(e)||0,n)}));function Ms(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new mt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Ms.Cache||zn),n}function Es(t){if("function"!=typeof t)throw new mt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ms.Cache=zn;var As=ui((function(t,e){var n=(e=1==e.length&&Os(e[0])?le(e[0],Le($i())):le(or(e,1),Le($i()))).length;return Fr((function(r){for(var i=-1,o=an(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return oe(t,this,r)}))})),xs=Fr((function(t,e){return ji(t,32,void 0,e,qe(e,Ki(xs)))})),Is=Fr((function(t,e){return ji(t,64,void 0,e,qe(e,Ki(Is)))})),Ts=Hi((function(t,e){return ji(t,256,void 0,void 0,void 0,e)}));function ks(t,e){return t===e||t!=t&&e!=e}var Ls=Bi(pr),Ns=Bi((function(t,e){return t>=e})),Rs=yr(function(){return arguments}())?yr:function(t){return Hs(t)&&Et.call(t,"callee")&&!Jt.call(t,"callee")},Os=r.isArray,Bs=Qt?Le(Qt):function(t){return Hs(t)&&lr(t)==M};function zs(t){return null!=t&&qs(t.length)&&!Cs(t)}function Ps(t){return Hs(t)&&zs(t)}var Us=en||ou,Fs=te?Le(te):function(t){return Hs(t)&&lr(t)==h};function js(t){if(!Hs(t))return!1;var e=lr(t);return e==d||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Ys(t)}function Cs(t){if(!Vs(t))return!1;var e=lr(t);return e==l||e==p||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ds(t){return"number"==typeof t&&t==ra(t)}function qs(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Vs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Hs(t){return null!=t&&"object"==typeof t}var Ws=ee?Le(ee):function(t){return Hs(t)&&no(t)==b};function Zs(t){return"number"==typeof t||Hs(t)&&lr(t)==g}function Ys(t){if(!Hs(t)||lr(t)!=v)return!1;var e=Wt(t);if(null===e)return!0;var n=Et.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Mt.call(n)==Tt}var Js=ne?Le(ne):function(t){return Hs(t)&&lr(t)==m};var Ks=re?Le(re):function(t){return Hs(t)&&no(t)==y};function $s(t){return"string"==typeof t||!Os(t)&&Hs(t)&&lr(t)==w}function Xs(t){return"symbol"==typeof t||Hs(t)&&lr(t)==_}var Gs=ie?Le(ie):function(t){return Hs(t)&&qs(t.length)&&!!Ct[lr(t)]};var Qs=Bi(xr),ta=Bi((function(t,e){return t<=e}));function ea(t){if(!t)return[];if(zs(t))return $s(t)?Ze(t):vi(t);if(Gt&&t[Gt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Gt]());var e=no(t);return(e==b?Ce:e==y?Ve:ka)(t)}function na(t){return t?(t=oa(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ra(t){var e=na(t),n=e%1;return e==e?n?e-n:e:0}function ia(t){return t?Kn(ra(t),0,4294967295):0}function oa(t){if("number"==typeof t)return t;if(Xs(t))return NaN;if(Vs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Vs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(J,"");var n=ot.test(t);return n||at.test(t)?Ht(t.slice(2),n?2:8):it.test(t)?NaN:+t}function sa(t){return mi(t,_a(t))}function aa(t){return null==t?"":Xr(t)}var ua=wi((function(t,e){if(ho(e)||zs(e))mi(e,wa(e),t);else for(var n in e)Et.call(e,n)&&Vn(t,n,e[n])})),fa=wi((function(t,e){mi(e,_a(e),t)})),ca=wi((function(t,e,n,r){mi(e,_a(e),t,r)})),ha=wi((function(t,e,n,r){mi(e,wa(e),t,r)})),da=Hi(Jn);var la=Fr((function(t,e){t=bt(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&ao(e[0],e[1],i)&&(r=1);++n<r;)for(var o=e[n],s=_a(o),a=-1,u=s.length;++a<u;){var f=s[a],c=t[f];(void 0===c||ks(c,_t[f])&&!Et.call(t,f))&&(t[f]=o[f])}return t})),pa=Fr((function(t){return t.push(void 0,Di),oe(Ma,void 0,t)}));function ba(t,e,n){var r=null==t?void 0:hr(t,e);return void 0===r?n:r}function ga(t,e){return null!=t&&ro(t,e,gr)}var va=ki((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=It.call(e)),t[e]=n}),Va(Za)),ma=ki((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=It.call(e)),Et.call(t,e)?t[e].push(n):t[e]=[n]}),$i),ya=Fr(mr);function wa(t){return zs(t)?Fn(t):Er(t)}function _a(t){return zs(t)?Fn(t,!0):Ar(t)}var Sa=wi((function(t,e,n){Lr(t,e,n)})),Ma=wi((function(t,e,n,r){Lr(t,e,n,r)})),Ea=Hi((function(t,e){var n={};if(null==t)return n;var r=!1;e=le(e,(function(e){return e=ai(e,t),r||(r=e.length>1),e})),mi(t,Zi(t),n),r&&(n=$n(n,7,qi));for(var i=e.length;i--;)Qr(n,e[i]);return n}));var Aa=Hi((function(t,e){return null==t?{}:function(t,e){return Or(t,e,(function(e,n){return ga(t,n)}))}(t,e)}));function xa(t,e){if(null==t)return{};var n=le(Zi(t),(function(t){return[t]}));return e=$i(e),Or(t,n,(function(t,n){return e(t,n[0])}))}var Ia=Fi(wa),Ta=Fi(_a);function ka(t){return null==t?[]:Ne(t,wa(t))}var La=Ei((function(t,e,n){return e=e.toLowerCase(),t+(n?Na(e):e)}));function Na(t){return ja(aa(t).toLowerCase())}function Ra(t){return(t=aa(t))&&t.replace(ft,Pe).replace(Ot,"")}var Oa=Ei((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ba=Ei((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),za=Mi("toLowerCase");var Pa=Ei((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Ua=Ei((function(t,e,n){return t+(n?" ":"")+ja(e)}));var Fa=Ei((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),ja=Mi("toUpperCase");function Ca(t,e,n){return t=aa(t),void 0===(e=n?void 0:e)?function(t){return Ut.test(t)}(t)?function(t){return t.match(zt)||[]}(t):function(t){return t.match(tt)||[]}(t):t.match(e)||[]}var Da=Fr((function(t,e){try{return oe(t,void 0,e)}catch(t){return js(t)?t:new dt(t)}})),qa=Hi((function(t,e){return ae(e,(function(e){e=xo(e),Yn(t,e,ms(t[e],t))})),t}));function Va(t){return function(){return t}}var Ha=Ii(),Wa=Ii(!0);function Za(t){return t}function Ya(t){return Mr("function"==typeof t?t:$n(t,1))}var Ja=Fr((function(t,e){return function(n){return mr(n,t,e)}})),Ka=Fr((function(t,e){return function(n){return mr(t,n,e)}}));function $a(t,e,n){var r=wa(e),i=cr(e,r);null!=n||Vs(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=cr(e,wa(e)));var o=!(Vs(n)&&"chain"in n&&!n.chain),s=Cs(t);return ae(i,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=vi(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,pe([this.value()],arguments))})})),t}function Xa(){}var Ga=Ni(le),Qa=Ni(fe),tu=Ni(ve);function eu(t){return uo(t)?Ae(xo(t)):function(t){return function(e){return hr(e,t)}}(t)}var nu=Oi(),ru=Oi(!0);function iu(){return[]}function ou(){return!1}var su=Li((function(t,e){return t+e}),0),au=Pi("ceil"),uu=Li((function(t,e){return t/e}),1),fu=Pi("floor");var cu,hu=Li((function(t,e){return t*e}),1),du=Pi("round"),lu=Li((function(t,e){return t-e}),0);return Tn.after=function(t,e){if("function"!=typeof e)throw new mt(o);return t=ra(t),function(){if(--t<1)return e.apply(this,arguments)}},Tn.ary=gs,Tn.assign=ua,Tn.assignIn=fa,Tn.assignInWith=ca,Tn.assignWith=ha,Tn.at=da,Tn.before=vs,Tn.bind=ms,Tn.bindAll=qa,Tn.bindKey=ys,Tn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Os(t)?t:[t]},Tn.chain=es,Tn.chunk=function(t,e,n){e=(n?ao(t,e,n):void 0===e)?1:sn(ra(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,s=0,a=r(Ge(i/e));o<i;)a[s++]=Wr(t,o,o+=e);return a},Tn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},Tn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return pe(Os(n)?vi(n):[n],or(e,1))},Tn.cond=function(t){var e=null==t?0:t.length,n=$i();return t=e?le(t,(function(t){if("function"!=typeof t[1])throw new mt(o);return[n(t[0]),t[1]]})):[],Fr((function(n){for(var r=-1;++r<e;){var i=t[r];if(oe(i[0],this,n))return oe(i[1],this,n)}}))},Tn.conforms=function(t){return function(t){var e=wa(t);return function(n){return Xn(n,t,e)}}($n(t,1))},Tn.constant=Va,Tn.countBy=is,Tn.create=function(t,e){var n=kn(t);return null==e?n:Zn(n,e)},Tn.curry=function t(e,n,r){var i=ji(e,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=t.placeholder,i},Tn.curryRight=function t(e,n,r){var i=ji(e,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=t.placeholder,i},Tn.debounce=ws,Tn.defaults=la,Tn.defaultsDeep=pa,Tn.defer=_s,Tn.delay=Ss,Tn.difference=ko,Tn.differenceBy=Lo,Tn.differenceWith=No,Tn.drop=function(t,e,n){var r=null==t?0:t.length;return r?Wr(t,(e=n||void 0===e?1:ra(e))<0?0:e,r):[]},Tn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Wr(t,0,(e=r-(e=n||void 0===e?1:ra(e)))<0?0:e):[]},Tn.dropRightWhile=function(t,e){return t&&t.length?ei(t,$i(e,3),!0,!0):[]},Tn.dropWhile=function(t,e){return t&&t.length?ei(t,$i(e,3),!0):[]},Tn.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&ao(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ra(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:ra(r))<0&&(r+=i),r=n>r?0:ia(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Tn.filter=function(t,e){return(Os(t)?ce:ir)(t,$i(e,3))},Tn.flatMap=function(t,e){return or(ds(t,e),1)},Tn.flatMapDeep=function(t,e){return or(ds(t,e),1/0)},Tn.flatMapDepth=function(t,e,n){return n=void 0===n?1:ra(n),or(ds(t,e),n)},Tn.flatten=Bo,Tn.flattenDeep=function(t){return(null==t?0:t.length)?or(t,1/0):[]},Tn.flattenDepth=function(t,e){return(null==t?0:t.length)?or(t,e=void 0===e?1:ra(e)):[]},Tn.flip=function(t){return ji(t,512)},Tn.flow=Ha,Tn.flowRight=Wa,Tn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},Tn.functions=function(t){return null==t?[]:cr(t,wa(t))},Tn.functionsIn=function(t){return null==t?[]:cr(t,_a(t))},Tn.groupBy=fs,Tn.initial=function(t){return(null==t?0:t.length)?Wr(t,0,-1):[]},Tn.intersection=Po,Tn.intersectionBy=Uo,Tn.intersectionWith=Fo,Tn.invert=va,Tn.invertBy=ma,Tn.invokeMap=cs,Tn.iteratee=Ya,Tn.keyBy=hs,Tn.keys=wa,Tn.keysIn=_a,Tn.map=ds,Tn.mapKeys=function(t,e){var n={};return e=$i(e,3),ur(t,(function(t,r,i){Yn(n,e(t,r,i),t)})),n},Tn.mapValues=function(t,e){var n={};return e=$i(e,3),ur(t,(function(t,r,i){Yn(n,r,e(t,r,i))})),n},Tn.matches=function(t){return Tr($n(t,1))},Tn.matchesProperty=function(t,e){return kr(t,$n(e,1))},Tn.memoize=Ms,Tn.merge=Sa,Tn.mergeWith=Ma,Tn.method=Ja,Tn.methodOf=Ka,Tn.mixin=$a,Tn.negate=Es,Tn.nthArg=function(t){return t=ra(t),Fr((function(e){return Nr(e,t)}))},Tn.omit=Ea,Tn.omitBy=function(t,e){return xa(t,Es($i(e)))},Tn.once=function(t){return vs(2,t)},Tn.orderBy=function(t,e,n,r){return null==t?[]:(Os(e)||(e=null==e?[]:[e]),Os(n=r?void 0:n)||(n=null==n?[]:[n]),Rr(t,e,n))},Tn.over=Ga,Tn.overArgs=As,Tn.overEvery=Qa,Tn.overSome=tu,Tn.partial=xs,Tn.partialRight=Is,Tn.partition=ls,Tn.pick=Aa,Tn.pickBy=xa,Tn.property=eu,Tn.propertyOf=function(t){return function(e){return null==t?void 0:hr(t,e)}},Tn.pull=Co,Tn.pullAll=Do,Tn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Br(t,e,$i(n,2)):t},Tn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Br(t,e,void 0,n):t},Tn.pullAt=qo,Tn.range=nu,Tn.rangeRight=ru,Tn.rearg=Ts,Tn.reject=function(t,e){return(Os(t)?ce:ir)(t,Es($i(e,3)))},Tn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=$i(e,3);++r<o;){var s=t[r];e(s,r,t)&&(n.push(s),i.push(r))}return zr(t,i),n},Tn.rest=function(t,e){if("function"!=typeof t)throw new mt(o);return Fr(t,e=void 0===e?e:ra(e))},Tn.reverse=Vo,Tn.sampleSize=function(t,e,n){return e=(n?ao(t,e,n):void 0===e)?1:ra(e),(Os(t)?Cn:Cr)(t,e)},Tn.set=function(t,e,n){return null==t?t:Dr(t,e,n)},Tn.setWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:Dr(t,e,n,r)},Tn.shuffle=function(t){return(Os(t)?Dn:Hr)(t)},Tn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&ao(t,e,n)?(e=0,n=r):(e=null==e?0:ra(e),n=void 0===n?r:ra(n)),Wr(t,e,n)):[]},Tn.sortBy=ps,Tn.sortedUniq=function(t){return t&&t.length?Kr(t):[]},Tn.sortedUniqBy=function(t,e){return t&&t.length?Kr(t,$i(e,2)):[]},Tn.split=function(t,e,n){return n&&"number"!=typeof n&&ao(t,e,n)&&(e=n=void 0),(n=void 0===n?4294967295:n>>>0)?(t=aa(t))&&("string"==typeof e||null!=e&&!Js(e))&&!(e=Xr(e))&&je(t)?fi(Ze(t),0,n):t.split(e,n):[]},Tn.spread=function(t,e){if("function"!=typeof t)throw new mt(o);return e=null==e?0:sn(ra(e),0),Fr((function(n){var r=n[e],i=fi(n,0,e);return r&&pe(i,r),oe(t,this,i)}))},Tn.tail=function(t){var e=null==t?0:t.length;return e?Wr(t,1,e):[]},Tn.take=function(t,e,n){return t&&t.length?Wr(t,0,(e=n||void 0===e?1:ra(e))<0?0:e):[]},Tn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Wr(t,(e=r-(e=n||void 0===e?1:ra(e)))<0?0:e,r):[]},Tn.takeRightWhile=function(t,e){return t&&t.length?ei(t,$i(e,3),!1,!0):[]},Tn.takeWhile=function(t,e){return t&&t.length?ei(t,$i(e,3)):[]},Tn.tap=function(t,e){return e(t),t},Tn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new mt(o);return Vs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ws(t,e,{leading:r,maxWait:e,trailing:i})},Tn.thru=ns,Tn.toArray=ea,Tn.toPairs=Ia,Tn.toPairsIn=Ta,Tn.toPath=function(t){return Os(t)?le(t,xo):Xs(t)?[t]:vi(Ao(aa(t)))},Tn.toPlainObject=sa,Tn.transform=function(t,e,n){var r=Os(t),i=r||Us(t)||Gs(t);if(e=$i(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Vs(t)&&Cs(o)?kn(Wt(t)):{}}return(i?ae:ur)(t,(function(t,r,i){return e(n,t,r,i)})),n},Tn.unary=function(t){return gs(t,1)},Tn.union=Ho,Tn.unionBy=Wo,Tn.unionWith=Zo,Tn.uniq=function(t){return t&&t.length?Gr(t):[]},Tn.uniqBy=function(t,e){return t&&t.length?Gr(t,$i(e,2)):[]},Tn.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Gr(t,void 0,e):[]},Tn.unset=function(t,e){return null==t||Qr(t,e)},Tn.unzip=Yo,Tn.unzipWith=Jo,Tn.update=function(t,e,n){return null==t?t:ti(t,e,si(n))},Tn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:ti(t,e,si(n),r)},Tn.values=ka,Tn.valuesIn=function(t){return null==t?[]:Ne(t,_a(t))},Tn.without=Ko,Tn.words=Ca,Tn.wrap=function(t,e){return xs(si(e),t)},Tn.xor=$o,Tn.xorBy=Xo,Tn.xorWith=Go,Tn.zip=Qo,Tn.zipObject=function(t,e){return ii(t||[],e||[],Vn)},Tn.zipObjectDeep=function(t,e){return ii(t||[],e||[],Dr)},Tn.zipWith=ts,Tn.entries=Ia,Tn.entriesIn=Ta,Tn.extend=fa,Tn.extendWith=ca,$a(Tn,Tn),Tn.add=su,Tn.attempt=Da,Tn.camelCase=La,Tn.capitalize=Na,Tn.ceil=au,Tn.clamp=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=oa(n))==n?n:0),void 0!==e&&(e=(e=oa(e))==e?e:0),Kn(oa(t),e,n)},Tn.clone=function(t){return $n(t,4)},Tn.cloneDeep=function(t){return $n(t,5)},Tn.cloneDeepWith=function(t,e){return $n(t,5,e="function"==typeof e?e:void 0)},Tn.cloneWith=function(t,e){return $n(t,4,e="function"==typeof e?e:void 0)},Tn.conformsTo=function(t,e){return null==e||Xn(t,e,wa(e))},Tn.deburr=Ra,Tn.defaultTo=function(t,e){return null==t||t!=t?e:t},Tn.divide=uu,Tn.endsWith=function(t,e,n){t=aa(t),e=Xr(e);var r=t.length,i=n=void 0===n?r:Kn(ra(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},Tn.eq=ks,Tn.escape=function(t){return(t=aa(t))&&j.test(t)?t.replace(U,Ue):t},Tn.escapeRegExp=function(t){return(t=aa(t))&&Y.test(t)?t.replace(Z,"\\$&"):t},Tn.every=function(t,e,n){var r=Os(t)?fe:nr;return n&&ao(t,e,n)&&(e=void 0),r(t,$i(e,3))},Tn.find=os,Tn.findIndex=Ro,Tn.findKey=function(t,e){return ye(t,$i(e,3),ur)},Tn.findLast=ss,Tn.findLastIndex=Oo,Tn.findLastKey=function(t,e){return ye(t,$i(e,3),fr)},Tn.floor=fu,Tn.forEach=as,Tn.forEachRight=us,Tn.forIn=function(t,e){return null==t?t:sr(t,$i(e,3),_a)},Tn.forInRight=function(t,e){return null==t?t:ar(t,$i(e,3),_a)},Tn.forOwn=function(t,e){return t&&ur(t,$i(e,3))},Tn.forOwnRight=function(t,e){return t&&fr(t,$i(e,3))},Tn.get=ba,Tn.gt=Ls,Tn.gte=Ns,Tn.has=function(t,e){return null!=t&&ro(t,e,br)},Tn.hasIn=ga,Tn.head=zo,Tn.identity=Za,Tn.includes=function(t,e,n,r){t=zs(t)?t:ka(t),n=n&&!r?ra(n):0;var i=t.length;return n<0&&(n=sn(i+n,0)),$s(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&_e(t,e,n)>-1},Tn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ra(n);return i<0&&(i=sn(r+i,0)),_e(t,e,i)},Tn.inRange=function(t,e,n){return e=na(e),void 0===n?(n=e,e=0):n=na(n),function(t,e,n){return t>=an(e,n)&&t<sn(e,n)}(t=oa(t),e,n)},Tn.invoke=ya,Tn.isArguments=Rs,Tn.isArray=Os,Tn.isArrayBuffer=Bs,Tn.isArrayLike=zs,Tn.isArrayLikeObject=Ps,Tn.isBoolean=function(t){return!0===t||!1===t||Hs(t)&&lr(t)==c},Tn.isBuffer=Us,Tn.isDate=Fs,Tn.isElement=function(t){return Hs(t)&&1===t.nodeType&&!Ys(t)},Tn.isEmpty=function(t){if(null==t)return!0;if(zs(t)&&(Os(t)||"string"==typeof t||"function"==typeof t.splice||Us(t)||Gs(t)||Rs(t)))return!t.length;var e=no(t);if(e==b||e==y)return!t.size;if(ho(t))return!Er(t).length;for(var n in t)if(Et.call(t,n))return!1;return!0},Tn.isEqual=function(t,e){return wr(t,e)},Tn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:void 0)?n(t,e):void 0;return void 0===r?wr(t,e,void 0,n):!!r},Tn.isError=js,Tn.isFinite=function(t){return"number"==typeof t&&nn(t)},Tn.isFunction=Cs,Tn.isInteger=Ds,Tn.isLength=qs,Tn.isMap=Ws,Tn.isMatch=function(t,e){return t===e||_r(t,e,Gi(e))},Tn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:void 0,_r(t,e,Gi(e),n)},Tn.isNaN=function(t){return Zs(t)&&t!=+t},Tn.isNative=function(t){if(co(t))throw new dt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Sr(t)},Tn.isNil=function(t){return null==t},Tn.isNull=function(t){return null===t},Tn.isNumber=Zs,Tn.isObject=Vs,Tn.isObjectLike=Hs,Tn.isPlainObject=Ys,Tn.isRegExp=Js,Tn.isSafeInteger=function(t){return Ds(t)&&t>=-9007199254740991&&t<=9007199254740991},Tn.isSet=Ks,Tn.isString=$s,Tn.isSymbol=Xs,Tn.isTypedArray=Gs,Tn.isUndefined=function(t){return void 0===t},Tn.isWeakMap=function(t){return Hs(t)&&no(t)==S},Tn.isWeakSet=function(t){return Hs(t)&&"[object WeakSet]"==lr(t)},Tn.join=function(t,e){return null==t?"":rn.call(t,e)},Tn.kebabCase=Oa,Tn.last=jo,Tn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=ra(n))<0?sn(r+i,0):an(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):we(t,Me,i,!0)},Tn.lowerCase=Ba,Tn.lowerFirst=za,Tn.lt=Qs,Tn.lte=ta,Tn.max=function(t){return t&&t.length?rr(t,Za,pr):void 0},Tn.maxBy=function(t,e){return t&&t.length?rr(t,$i(e,2),pr):void 0},Tn.mean=function(t){return Ee(t,Za)},Tn.meanBy=function(t,e){return Ee(t,$i(e,2))},Tn.min=function(t){return t&&t.length?rr(t,Za,xr):void 0},Tn.minBy=function(t,e){return t&&t.length?rr(t,$i(e,2),xr):void 0},Tn.stubArray=iu,Tn.stubFalse=ou,Tn.stubObject=function(){return{}},Tn.stubString=function(){return""},Tn.stubTrue=function(){return!0},Tn.multiply=hu,Tn.nth=function(t,e){return t&&t.length?Nr(t,ra(e)):void 0},Tn.noConflict=function(){return Yt._===this&&(Yt._=kt),this},Tn.noop=Xa,Tn.now=bs,Tn.pad=function(t,e,n){t=aa(t);var r=(e=ra(e))?We(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Ri(Qe(i),n)+t+Ri(Ge(i),n)},Tn.padEnd=function(t,e,n){t=aa(t);var r=(e=ra(e))?We(t):0;return e&&r<e?t+Ri(e-r,n):t},Tn.padStart=function(t,e,n){t=aa(t);var r=(e=ra(e))?We(t):0;return e&&r<e?Ri(e-r,n)+t:t},Tn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),fn(aa(t).replace(K,""),e||0)},Tn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&ao(t,e,n)&&(e=n=void 0),void 0===n&&("boolean"==typeof e?(n=e,e=void 0):"boolean"==typeof t&&(n=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=na(t),void 0===e?(e=t,t=0):e=na(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=cn();return an(t+i*(e-t+Vt("1e-"+((i+"").length-1))),e)}return Pr(t,e)},Tn.reduce=function(t,e,n){var r=Os(t)?be:Ie,i=arguments.length<3;return r(t,$i(e,4),n,i,tr)},Tn.reduceRight=function(t,e,n){var r=Os(t)?ge:Ie,i=arguments.length<3;return r(t,$i(e,4),n,i,er)},Tn.repeat=function(t,e,n){return e=(n?ao(t,e,n):void 0===e)?1:ra(e),Ur(aa(t),e)},Tn.replace=function(){var t=arguments,e=aa(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Tn.result=function(t,e,n){var r=-1,i=(e=ai(e,t)).length;for(i||(i=1,t=void 0);++r<i;){var o=null==t?void 0:t[xo(e[r])];void 0===o&&(r=i,o=n),t=Cs(o)?o.call(t):o}return t},Tn.round=du,Tn.runInContext=t,Tn.sample=function(t){return(Os(t)?jn:jr)(t)},Tn.size=function(t){if(null==t)return 0;if(zs(t))return $s(t)?We(t):t.length;var e=no(t);return e==b||e==y?t.size:Er(t).length},Tn.snakeCase=Pa,Tn.some=function(t,e,n){var r=Os(t)?ve:Zr;return n&&ao(t,e,n)&&(e=void 0),r(t,$i(e,3))},Tn.sortedIndex=function(t,e){return Yr(t,e)},Tn.sortedIndexBy=function(t,e,n){return Jr(t,e,$i(n,2))},Tn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Yr(t,e);if(r<n&&ks(t[r],e))return r}return-1},Tn.sortedLastIndex=function(t,e){return Yr(t,e,!0)},Tn.sortedLastIndexBy=function(t,e,n){return Jr(t,e,$i(n,2),!0)},Tn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=Yr(t,e,!0)-1;if(ks(t[n],e))return n}return-1},Tn.startCase=Ua,Tn.startsWith=function(t,e,n){return t=aa(t),n=null==n?0:Kn(ra(n),0,t.length),e=Xr(e),t.slice(n,n+e.length)==e},Tn.subtract=lu,Tn.sum=function(t){return t&&t.length?Te(t,Za):0},Tn.sumBy=function(t,e){return t&&t.length?Te(t,$i(e,2)):0},Tn.template=function(t,e,n){var r=Tn.templateSettings;n&&ao(t,e,n)&&(e=void 0),t=aa(t),e=ca({},e,r,Ci);var i,o,s=ca({},e.imports,r.imports,Ci),a=wa(s),u=Ne(s,a),f=0,c=e.interpolate||ct,h="__p += '",d=gt((e.escape||ct).source+"|"+c.source+"|"+(c===q?nt:ct).source+"|"+(e.evaluate||ct).source+"|$","g"),l="//# sourceURL="+(Et.call(e,"sourceURL")?(e.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++jt+"]")+"\n";t.replace(d,(function(e,n,r,s,a,u){return r||(r=s),h+=t.slice(f,u).replace(ht,Fe),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=u+e.length,e})),h+="';\n";var p=Et.call(e,"variable")&&e.variable;p||(h="with (obj) {\n"+h+"\n}\n"),h=(o?h.replace(O,""):h).replace(B,"$1").replace(z,"$1;"),h="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var b=Da((function(){return lt(a,l+"return "+h).apply(void 0,u)}));if(b.source=h,js(b))throw b;return b},Tn.times=function(t,e){if((t=ra(t))<1||t>9007199254740991)return[];var n=4294967295,r=an(t,4294967295);t-=4294967295;for(var i=ke(r,e=$i(e));++n<t;)e(n);return i},Tn.toFinite=na,Tn.toInteger=ra,Tn.toLength=ia,Tn.toLower=function(t){return aa(t).toLowerCase()},Tn.toNumber=oa,Tn.toSafeInteger=function(t){return t?Kn(ra(t),-9007199254740991,9007199254740991):0===t?t:0},Tn.toString=aa,Tn.toUpper=function(t){return aa(t).toUpperCase()},Tn.trim=function(t,e,n){if((t=aa(t))&&(n||void 0===e))return t.replace(J,"");if(!t||!(e=Xr(e)))return t;var r=Ze(t),i=Ze(e);return fi(r,Oe(r,i),Be(r,i)+1).join("")},Tn.trimEnd=function(t,e,n){if((t=aa(t))&&(n||void 0===e))return t.replace($,"");if(!t||!(e=Xr(e)))return t;var r=Ze(t);return fi(r,0,Be(r,Ze(e))+1).join("")},Tn.trimStart=function(t,e,n){if((t=aa(t))&&(n||void 0===e))return t.replace(K,"");if(!t||!(e=Xr(e)))return t;var r=Ze(t);return fi(r,Oe(r,Ze(e))).join("")},Tn.truncate=function(t,e){var n=30,r="...";if(Vs(e)){var i="separator"in e?e.separator:i;n="length"in e?ra(e.length):n,r="omission"in e?Xr(e.omission):r}var o=(t=aa(t)).length;if(je(t)){var s=Ze(t);o=s.length}if(n>=o)return t;var a=n-We(r);if(a<1)return r;var u=s?fi(s,0,a).join(""):t.slice(0,a);if(void 0===i)return u+r;if(s&&(a+=u.length-a),Js(i)){if(t.slice(a).search(i)){var f,c=u;for(i.global||(i=gt(i.source,aa(rt.exec(i))+"g")),i.lastIndex=0;f=i.exec(c);)var h=f.index;u=u.slice(0,void 0===h?a:h)}}else if(t.indexOf(Xr(i),a)!=a){var d=u.lastIndexOf(i);d>-1&&(u=u.slice(0,d))}return u+r},Tn.unescape=function(t){return(t=aa(t))&&F.test(t)?t.replace(P,Ye):t},Tn.uniqueId=function(t){var e=++At;return aa(t)+e},Tn.upperCase=Fa,Tn.upperFirst=ja,Tn.each=as,Tn.eachRight=us,Tn.first=zo,$a(Tn,(cu={},ur(Tn,(function(t,e){Et.call(Tn.prototype,e)||(cu[e]=t)})),cu),{chain:!1}),Tn.VERSION="4.17.15",ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Tn[t].placeholder=Tn})),ae(["drop","take"],(function(t,e){Rn.prototype[t]=function(n){n=void 0===n?1:sn(ra(n),0);var r=this.__filtered__&&!e?new Rn(this):this.clone();return r.__filtered__?r.__takeCount__=an(n,r.__takeCount__):r.__views__.push({size:an(n,4294967295),type:t+(r.__dir__<0?"Right":"")}),r},Rn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),ae(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Rn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:$i(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),ae(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Rn.prototype[t]=function(){return this[n](1).value()[0]}})),ae(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Rn.prototype[t]=function(){return this.__filtered__?new Rn(this):this[n](1)}})),Rn.prototype.compact=function(){return this.filter(Za)},Rn.prototype.find=function(t){return this.filter(t).head()},Rn.prototype.findLast=function(t){return this.reverse().find(t)},Rn.prototype.invokeMap=Fr((function(t,e){return"function"==typeof t?new Rn(this):this.map((function(n){return mr(n,t,e)}))})),Rn.prototype.reject=function(t){return this.filter(Es($i(t)))},Rn.prototype.slice=function(t,e){t=ra(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Rn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=ra(e))<0?n.dropRight(-e):n.take(e-t)),n)},Rn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Rn.prototype.toArray=function(){return this.take(4294967295)},ur(Rn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Tn[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);i&&(Tn.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,a=e instanceof Rn,u=s[0],f=a||Os(e),c=function(t){var e=i.apply(Tn,pe([t],s));return r&&h?e[0]:e};f&&n&&"function"==typeof u&&1!=u.length&&(a=f=!1);var h=this.__chain__,d=!!this.__actions__.length,l=o&&!h,p=a&&!d;if(!o&&f){e=p?e:new Rn(this);var b=t.apply(e,s);return b.__actions__.push({func:ns,args:[c],thisArg:void 0}),new Nn(b,h)}return l&&p?t.apply(this,s):(b=this.thru(c),l?r?b.value()[0]:b.value():b)})})),ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=yt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Tn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Os(i)?i:[],t)}return this[n]((function(n){return e.apply(Os(n)?n:[],t)}))}})),ur(Rn.prototype,(function(t,e){var n=Tn[e];if(n){var r=n.name+"";Et.call(yn,r)||(yn[r]=[]),yn[r].push({name:e,func:n})}})),yn[Ti(void 0,2).name]=[{name:"wrapper",func:void 0}],Rn.prototype.clone=function(){var t=new Rn(this.__wrapped__);return t.__actions__=vi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=vi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=vi(this.__views__),t},Rn.prototype.reverse=function(){if(this.__filtered__){var t=new Rn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Rn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Os(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=an(e,t+s);break;case"takeRight":t=sn(t,e-s)}}return{start:t,end:e}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,f=r?a:s-1,c=this.__iteratees__,h=c.length,d=0,l=an(u,this.__takeCount__);if(!n||!r&&i==u&&l==u)return ni(t,this.__actions__);var p=[];t:for(;u--&&d<l;){for(var b=-1,g=t[f+=e];++b<h;){var v=c[b],m=v.iteratee,y=v.type,w=m(g);if(2==y)g=w;else if(!w){if(1==y)continue t;break t}}p[d++]=g}return p},Tn.prototype.at=rs,Tn.prototype.chain=function(){return es(this)},Tn.prototype.commit=function(){return new Nn(this.value(),this.__chain__)},Tn.prototype.next=function(){void 0===this.__values__&&(this.__values__=ea(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},Tn.prototype.plant=function(t){for(var e,n=this;n instanceof Ln;){var r=To(n);r.__index__=0,r.__values__=void 0,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},Tn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Rn){var e=t;return this.__actions__.length&&(e=new Rn(this)),(e=e.reverse()).__actions__.push({func:ns,args:[Vo],thisArg:void 0}),new Nn(e,this.__chain__)}return this.thru(Vo)},Tn.prototype.toJSON=Tn.prototype.valueOf=Tn.prototype.value=function(){return ni(this.__wrapped__,this.__actions__)},Tn.prototype.first=Tn.prototype.head,Gt&&(Tn.prototype[Gt]=function(){return this}),Tn}();Yt._=Je,void 0===(i=function(){return Je}.call(e,n,e,r))||(r.exports=i)}).call(this)}).call(this,n(9),n(27)(t))},function(t,e,n){"use strict";var r=n(23),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=h;var o=Object.create(n(20));o.inherits=n(1);var s=n(45),a=n(33);o.inherits(h,s);for(var u=i(a.prototype),f=0;f<u.length;f++){var c=u[f];h.prototype[c]||(h.prototype[c]=a.prototype[c])}function h(t){if(!(this instanceof h))return new h(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",d)}function d(){this.allowHalfOpen||this._writableState.ended||r.nextTick(l,this)}function l(t){t.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),h.prototype._destroy=function(t,e){this.push(null),this.end(),r.nextTick(e,t)}},function(t,e){function n(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=n,n.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},function(t,e,n){"use strict";var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(i)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=n(2),o=n(12),s=n(3),a=s.parseBytes,u=s.serializeUIntN,f=n(0),c=n(72);var h=f({EnumType:function(t){o.assign(this,t),i(this.bytes instanceof Uint8Array),i("number"==typeof this.ordinal),i("string"==typeof this.name)},toString:function(){return this.name},toJSON:function(){return this.name},toBytesSink:function(t){t.put(this.bytes)},statics:{ordinalByteWidth:1,fromParser:function(t){return this.from(t.readUIntN(this.ordinalByteWidth))},from:function(t){var e=t instanceof this?t:this[t];if(!e)throw new Error(t+" is not a valid name or ordinal for "+this.enumName);return e},valuesByName:function(){var t=this;return o.transform(this.initVals,(function(e,n,r){var i=u(n,t.ordinalByteWidth),o=new t({name:r,ordinal:n,bytes:i});e[r]=o}))},init:function(){var t,e,n=this.valuesByName();return o.assign(this,(t=n,e="ordinal",o.transform(t,(function(t,n,r){t[r]=n,t[n[e]]=n})))),this.values=o.values(n),this}}});var d,l,p=(d=function(t,e,n){t[n]=function(t,e){return f({inherits:h,statics:o.assign(e,{enumName:t})})}(n,e)},l={Type:{initVals:c.TYPES},LedgerEntryType:{initVals:c.LEDGER_ENTRY_TYPES,ordinalByteWidth:2},TransactionType:{initVals:c.TRANSACTION_TYPES,ordinalByteWidth:2},TransactionResult:{initVals:c.TRANSACTION_RESULTS,ordinalByteWidth:1}},o.transform(l,d));p.Field=f({inherits:h,statics:{enumName:"Field",initVals:c.FIELDS,valuesByName:function(){var t=this,e=o.map(this.initVals,(function(e){var n=r(e,2),i=n[0],s=n[1],a=p.Type[s.type],u=t.header(a.ordinal,s.nth),f={ordinal:a.ordinal<<16|s.nth,name:i,type:a,bytes:u};return new t(o.assign(s,f))}));return o.keyBy(e,"name")},header:function(t,e){var n=e,r=[],i=r.push.bind(r);return t<16?n<16?i(t<<4|n):i(t<<4,n):n<16?i(n,t):i(0,t,n),a(r,Uint8Array)}}}),t.exports=p},function(t,e,n){"use strict";var r=n(15),i=r.Field,o=n(28).AccountID,s=n(96).Amount,a=n(98).Blob,u=n(38).Currency,f=n(99).Hash128,c=n(35).Hash160,h=n(53).Hash256,d=n(100).PathSet,l=n(101).STArray,p=n(54).STObject,b=n(102).UInt16,g=n(103).UInt32,v=n(52).UInt64,m={AccountID:o,Amount:s,Blob:a,Currency:u,Hash128:f,Hash160:c,Hash256:h,PathSet:d,STArray:l,STObject:p,UInt8:n(104).UInt8,UInt16:b,UInt32:g,UInt64:v,Vector256:n(105).Vector256};i.values.forEach((function(t){t.associatedType=m[t.type]})),i.TransactionType.associatedType=r.TransactionType,i.TransactionResult.associatedType=r.TransactionResult,i.LedgerEntryType.associatedType=r.LedgerEntryType,t.exports=m},function(t,e,n){var r=n(6).Buffer;function i(t,e){this._block=r.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=r.from(t,e));for(var n=this._block,i=this._blockSize,o=t.length,s=this._len,a=0;a<o;){for(var u=s%i,f=Math.min(o-a,i-u),c=0;c<f;c++)n[u+c]=t[a+c];a+=f,(s+=f)%i==0&&this._update(n)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,n){var r=e;r.utils=n(7),r.common=n(22),r.sha=n(111),r.ripemd=n(115),r.hmac=n(116),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var u,f=[],c=!1,h=-1;function d(){c&&u&&(c=!1,u.length?f=u.concat(f):h=-1,f.length&&l())}function l(){if(!c){var t=a(d);c=!0;for(var e=f.length;e;){for(u=f,f=[];++h<e;)u&&u[h].run();h=-1,e=f.length}u=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function b(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];f.push(new p(t,e)),1!==f.length||c||a(l)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=b,i.addListener=b,i.once=b,i.off=b,i.removeListener=b,i.removeAllListeners=b,i.emit=b,i.prependListener=b,i.prependOnceListener=b,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(this,n(5).Buffer)},function(t,e,n){"use strict";var r=n(3).serializeUIntN;function i(t){return r(t,4)}var o={transactionID:i(1415073280),transaction:i(1397638144),accountStateEntry:i(1296846336),innerNode:i(1296649728),ledgerHeader:i(1280791040),transactionSig:i(1398036480),transactionMultiSig:i(1397576704),validation:i(1447119872),proposal:i(1347571712),paymentChannelClaim:i(1129073920)};t.exports={HashPrefix:o}},function(t,e,n){"use strict";var r=n(7),i=n(14);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=r.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-n,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,n=e-(t+this.padLength)%e,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=t>>>24&255,r[i++]=t>>>16&255,r[i++]=t>>>8&255,r[i++]=255&t}else for(r[i++]=255&t,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},function(t,e,n){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this,n(19))},function(t,e,n){"use strict";var r=n(2),i=n(11),o=n(0),s=n(10),a=s.Comparable,u=s.SerializedType,f=n(3).serializeUIntN,c=[0,255,65535,16777215,4294967295];var h=o({mixins:[a,u],UInt:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=c[this.constructor.width];if(t<0||!(t<=e))throw new Error(t+" not in range 0 <= $val <= "+e);this.val=t},statics:{width:0,fromParser:function(t){return new this(this.width>4?t.read(this.width):t.readUIntN(this.width))},from:function(t){return t instanceof this?t:new this(t)}},toJSON:function(){return this.val},valueOf:function(){return this.val},compareTo:function(t){var e,n,o=this.valueOf(),s=t.valueOf();return o instanceof i?s instanceof i?o.cmp(s):o.cmpn(s):s instanceof i?-t.compareTo(this):(r("number"==typeof s),(e=o)<(n=s)?-1:e===n?0:1)},toBytesSink:function(t){t.put(this.toBytes())},toBytes:function(){return f(this.val,this.constructor.width)}});t.exports={UInt:h}},function(t,e,n){"use strict";(function(e){var r=n(0),i=n(21).HashPrefix,o=n(16).Hash256,s=n(3).parseBytes,a=n(42),u=r({Sha512Half:function(){this.hash=a("sha512")},statics:{put:function(t){return(new this).put(t)}},put:function(t){return this.hash.update(s(t,e)),this},finish256:function(){return this.hash.digest().slice(0,32)},finish:function(){return new o(this.finish256())}});function f(){for(var t=new u,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach((function(e){return t.put(e)})),s(t.finish256(),Uint8Array)}t.exports={Sha512Half:u,sha512Half:f,transactionID:function(t){return new o(f(i.transactionID,t))}}}).call(this,n(5).Buffer)},function(t,e,n){"use strict";var r=n(8),i=n(4),o=i.getNAF,s=i.getJSF,a=i.assert;function u(t,e){this.type=t,this.p=new r(e.p,16),this.red=e.prime?r.red(e.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=e.n&&new r(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){a(t.precomputed);var n=t._getDoubles(),r=o(e,1,this._bitLength),i=(1<<n.step+1)-(n.step%2==0?2:1);i/=3;for(var s=[],u=0;u<r.length;u+=n.step){var f=0;for(e=u+n.step-1;e>=u;e--)f=(f<<1)+r[e];s.push(f)}for(var c=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=i;d>0;d--){for(u=0;u<s.length;u++){(f=s[u])===d?h=h.mixedAdd(n.points[u]):f===-d&&(h=h.mixedAdd(n.points[u].neg()))}c=c.add(h)}return c.toP()},u.prototype._wnafMul=function(t,e){var n=4,r=t._getNAFPoints(n);n=r.wnd;for(var i=r.points,s=o(e,n,this._bitLength),u=this.jpoint(null,null,null),f=s.length-1;f>=0;f--){for(e=0;f>=0&&0===s[f];f--)e++;if(f>=0&&e++,u=u.dblp(e),f<0)break;var c=s[f];a(0!==c),u="affine"===t.type?c>0?u.mixedAdd(i[c-1>>1]):u.mixedAdd(i[-c-1>>1].neg()):c>0?u.add(i[c-1>>1]):u.add(i[-c-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,n,r,i){for(var a=this._wnafT1,u=this._wnafT2,f=this._wnafT3,c=0,h=0;h<r;h++){var d=(A=e[h])._getNAFPoints(t);a[h]=d.wnd,u[h]=d.points}for(h=r-1;h>=1;h-=2){var l=h-1,p=h;if(1===a[l]&&1===a[p]){var b=[e[l],null,null,e[p]];0===e[l].y.cmp(e[p].y)?(b[1]=e[l].add(e[p]),b[2]=e[l].toJ().mixedAdd(e[p].neg())):0===e[l].y.cmp(e[p].y.redNeg())?(b[1]=e[l].toJ().mixedAdd(e[p]),b[2]=e[l].add(e[p].neg())):(b[1]=e[l].toJ().mixedAdd(e[p]),b[2]=e[l].toJ().mixedAdd(e[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=s(n[l],n[p]);c=Math.max(v[0].length,c),f[l]=new Array(c),f[p]=new Array(c);for(var m=0;m<c;m++){var y=0|v[0][m],w=0|v[1][m];f[l][m]=g[3*(y+1)+(w+1)],f[p][m]=0,u[l]=b}}else f[l]=o(n[l],a[l],this._bitLength),f[p]=o(n[p],a[p],this._bitLength),c=Math.max(f[l].length,c),c=Math.max(f[p].length,c)}var _=this.jpoint(null,null,null),S=this._wnafT4;for(h=c;h>=0;h--){for(var M=0;h>=0;){var E=!0;for(m=0;m<r;m++)S[m]=0|f[m][h],0!==S[m]&&(E=!1);if(!E)break;M++,h--}if(h>=0&&M++,_=_.dblp(M),h<0)break;for(m=0;m<r;m++){var A,x=S[m];0!==x&&(x>0?A=u[m][x-1>>1]:x<0&&(A=u[m][-x-1>>1].neg()),_="affine"===A.type?_.mixedAdd(A):_.add(A))}}for(h=0;h<r;h++)u[h]=null;return i?_:_.toP()},u.BasePoint=f,f.prototype.eq=function(){throw new Error("Not implemented")},f.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var n=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*n)return 6===t[0]?a(t[t.length-1]%2==0):7===t[0]&&a(t[t.length-1]%2==1),this.point(t.slice(1,1+n),t.slice(1+n,1+2*n));if((2===t[0]||3===t[0])&&t.length-1===n)return this.pointFromX(t.slice(1,1+n),3===t[0]);throw new Error("Unknown point format")},f.prototype.encodeCompressed=function(t){return this.encode(t,!0)},f.prototype._encode=function(t){var e=this.curve.p.byteLength(),n=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",e))},f.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},f.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},f.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},f.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)r=r.dbl();n.push(r)}return{step:t,points:n}},f.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],n=(1<<t)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)e[i]=e[i-1].add(r);return{wnd:t,points:e}},f.prototype._getBeta=function(){return null},f.prototype.dblp=function(t){for(var e=this,n=0;n<t;n++)e=e.dbl();return e}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";var r=n(0),i=n(29),o=i.decodeAccountID,s=i.encodeAccountID,a=n(35).Hash160,u=r({AccountID:function(t){a.call(this,t)},inherits:a,statics:{from:function(t){return t instanceof this?t:/^r/.test(t)?this.fromBase58(t):new this(t)},cache:{},fromCache:function(t){var e=this.cache[t];return e||(e=this.cache[t]=this.fromBase58(t)),e},fromBase58:function(t){var e=new this(o(t));return e._toBase58=t,e}},toJSON:function(){return this.toBase58()},cached:{toBase58:function(){return s(this._bytes)}}});t.exports={AccountID:u}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});const r=n(73);e.codec=r.codec,e.encodeSeed=r.encodeSeed,e.decodeSeed=r.decodeSeed,e.encodeAccountID=r.encodeAccountID,e.decodeAccountID=r.decodeAccountID,e.encodeNodePublic=r.encodeNodePublic,e.decodeNodePublic=r.decodeNodePublic,e.encodeAccountPublic=r.encodeAccountPublic,e.decodeAccountPublic=r.decodeAccountPublic,e.isValidClassicAddress=r.isValidClassicAddress;const i=n(2),o={MAIN:t.from([5,68]),TEST:t.from([4,147])};function s(e,n,i){if(20!==e.length)throw new Error("Account ID must be 20 bytes");const s=!1===n?0:n<=4294967295?1:2;if(2===s)throw new Error("Invalid tag");!1===n&&(n=0);const a=t.concat([i?o.TEST:o.MAIN,e,t.from([s,255&n,n>>8&255,n>>16&255,n>>24&255,0,0,0,0])]);return r.codec.encodeChecked(a)}function a(e){const n=r.codec.decodeChecked(e),s=function(t){const e=t.slice(0,2);if(o.MAIN.equals(e))return!1;if(o.TEST.equals(e))return!0;throw new Error("Invalid X-address: bad prefix")}(n);return{accountId:n.slice(2,22),tag:function(e){const n=e[22];if(n>=2)throw new Error("Unsupported X-address");if(1===n)return e[23]+256*e[24]+65536*e[25]+16777216*e[26];return i.strictEqual(n,0,"flag must be zero to indicate no tag"),i.ok(t.from("0000000000000000","hex").equals(e.slice(23,31)),"remaining bytes must be zero"),!1}(n),test:s}}e.classicAddressToXAddress=function(t,e,n){return s(r.decodeAccountID(t),e,n)},e.encodeXAddress=s,e.xAddressToClassicAddress=function(t){const{accountId:e,tag:n,test:i}=a(t);return{classicAddress:r.encodeAccountID(e),tag:n,test:i}},e.decodeXAddress=a,e.isValidXAddress=function(t){try{a(t)}catch(t){return!1}return!0}}).call(this,n(5).Buffer)},function(t,e,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function f(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function h(t,e,n,r){var i,o,s,a;if(f(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),s=o[e]),void 0===s)s=o[e]=n,++t._eventsCount;else if("function"==typeof s?s=o[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=c(t))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return t}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function p(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):g(i,i.length)}function b(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function g(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");u=t}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)o(u,this,e);else{var f=u.length,c=g(u,f);for(n=0;n<f;++n)o(c[n],this,e)}return!0},a.prototype.addListener=function(t,e){return h(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return h(this,t,e,!0)},a.prototype.once=function(t,e){return f(e),this.on(t,l(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return f(e),this.prependListener(t,l(this,t,e)),this},a.prototype.removeListener=function(t,e){var n,r,i,o,s;if(f(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},a.prototype.listeners=function(t){return p(this,t,!0)},a.prototype.rawListeners=function(t){return p(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):b.call(t,e)},a.prototype.listenerCount=b,a.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){(e=t.exports=n(45)).Stream=e,e.Readable=e,e.Writable=n(33),e.Duplex=n(13),e.Transform=n(48),e.PassThrough=n(84)},function(t,e,n){var r=n(5),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=s),o(i,s),s.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){"use strict";(function(e,r,i){var o=n(23);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=m;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:o.nextTick;m.WritableState=v;var f=Object.create(n(20));f.inherits=n(1);var c={deprecate:n(82)},h=n(46),d=n(32).Buffer,l=i.Uint8Array||function(){};var p,b=n(47);function g(){}function v(t,e){a=a||n(13),t=t||{};var r=e instanceof a;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,f=t.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(f||0===f)?f:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(o.nextTick(i,r),o.nextTick(E,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),E(t,e))}(t,n,r,e,i);else{var s=S(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||_(t,n),r?u(w,t,n,s,i):w(t,n,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function m(t){if(a=a||n(13),!(p.call(m,this)||this instanceof a))return new m(t);this._writableState=new v(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function y(t,e,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),E(t,e)}function _(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.next,a+=1;i.allBuffers=u,y(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;n;){var f=n.chunk,c=n.encoding,h=n.callback;if(y(t,e,!1,e.objectMode?1:f.length,f,c,h),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function S(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function M(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),E(t,e)}))}function E(t,e){var n=S(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(M,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}f.inherits(m,h),v.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(m,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===m&&(t&&t._writableState instanceof v)}})):p=function(t){return t instanceof this},m.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},m.prototype.write=function(t,e,n){var r,i=this._writableState,s=!1,a=!i.objectMode&&(r=t,d.isBuffer(r)||r instanceof l);return a&&!d.isBuffer(t)&&(t=function(t){return d.from(t)}(t)),"function"==typeof e&&(n=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof n&&(n=g),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),o.nextTick(e,n)}(this,n):(a||function(t,e,n,r){var i=!0,s=!1;return null===n?s=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(r,s),i=!1),i}(this,i,t,n))&&(i.pendingcb++,s=function(t,e,n,r,i,o){if(!n){var s=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=d.from(e,n));return e}(e,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=e.objectMode?1:r.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else y(t,e,!1,a,r,i,o);return u}(this,i,a,t,e,n)),s},m.prototype.cork=function(){this._writableState.corked++},m.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||_(this,t))},m.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),m.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},m.prototype._writev=null,m.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,E(t,e),n&&(e.finished?o.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),m.prototype.destroy=b.destroy,m.prototype._undestroy=b.undestroy,m.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(19),n(80).setImmediate,n(9))},function(t,e,n){"use strict";var r=n(83).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=f,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=c,this.end=h,e=3;break;default:return this.write=d,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"<22>";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"<22>";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"<22>"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function f(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function c(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function l(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"<22>":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=s(e[r]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=s(e[r]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=s(e[r]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){"use strict";var r=n(0)({inherits:n(36).Hash,statics:{width:20}});t.exports={Hash160:r}},function(t,e,n){"use strict";var r=n(2),i=n(0),o=n(10),s=o.Comparable,a=o.SerializedType,u=n(3),f=u.compareBytes,c=u.parseBytes,h=i({Hash:function(t){var e=this.constructor.width;this._bytes=t?c(t,Uint8Array):new Uint8Array(e),r.equal(this._bytes.length,e)},mixins:[s,a],statics:{width:NaN,from:function(t){return t instanceof this?t:new this(c(t))},fromParser:function(t,e){return new this(t.read(e||this.width))}},compareTo:function(t){return f(this._bytes,this.constructor.from(t)._bytes)},toString:function(){return this.toHex()},nibblet:function(t){var e=t>0?t/2|0:0,n=this._bytes[e];return t%2==0?n=(240&n)>>>4:n&=15,n}});t.exports={Hash:h}},function(t,e,n){"use strict";var r=n(2),i=n(3),o=i.parseBytes,s=i.bytesToHex,a=n(0),u=n(15),f=u.Type,c=u.Field,h=a({implementing:{put:function(){}},BytesList:function(){this.arrays=[],this.length=0},put:function(t){var e=o(t,Uint8Array);return this.length+=e.length,this.arrays.push(e),this},toBytesSink:function(t){this.arrays.forEach((function(e){t.put(e)}))},toBytes:function(){var t=new Uint8Array(this.length),e=0;return this.arrays.forEach((function(n){t.set(n,e),e+=n.length})),t},toHex:function(){return s(this.toBytes())}}),d=a({BinarySerializer:function(t){this.sink=t},write:function(t){t.toBytesSink(this.sink)},put:function(t){this.sink.put(t)},writeType:function(t,e){this.write(t.from(e))},writeBytesList:function(t){t.toBytesSink(this.sink)},encodeVL:function(t){var e=t,n=new Uint8Array(4);if(e<=192)return n[0]=e,n.subarray(0,1);if(e<=12480)return e-=193,n[0]=193+(e>>>8),n[1]=255&e,n.subarray(0,2);if(e<=918744)return e-=12481,n[0]=241+(e>>>16),n[1]=e>>8&255,n[2]=255&e,n.subarray(0,3);throw new Error("Overflow error")},writeFieldAndValue:function(t,e){var n=this.sink,i=t.associatedType.from(e);r(i.toBytesSink,t),n.put(t.bytes),t.isVLEncoded?this.writeLengthEncoded(i):(i.toBytesSink(n),t.type===f.STObject?n.put(c.ObjectEndMarker.bytes):t.type===f.STArray&&n.put(c.ArrayEndMarker.bytes))},writeLengthEncoded:function(t){var e=new h;t.toBytesSink(e),this.put(this.encodeVL(e.length)),this.writeBytesList(e)}});t.exports={BytesList:h,BinarySerializer:d}},function(t,e,n){"use strict";var r=n(12),i=n(0),o=n(3).slice,s=n(35).Hash160,a=/^[A-Z0-9]{3}$/,u=/^[A-F0-9]{40}$/;function f(t){return r.isString(t)&&(function(t){return 3===t.length}(t)||function(t){return u.test(t)}(t))}function c(t){if(function(t){return f(t)||function(t){return 20===t.length}(t)}(t))return 3===t.length?function(t){var e=new Uint8Array(20);if("XRP"!==t){var n=t.split("").map((function(t){return t.charCodeAt(0)}));e.set(n,12)}return e}(t):t;throw new Error("Unsupported Currency repr: "+t)}var h=s.prototype,d=i({inherits:s,getters:["isNative","iso"],statics:{init:function(){this.XRP=new this(new Uint8Array(20))},from:function(t){return t instanceof this?t:new this(c(t))}},Currency:function(t){s.call(this,t),this.classify()},classify:function(){for(var t=!0,e=this._bytes,n=o(this._bytes,12,15,Array),i=n.map((function(t){return String.fromCharCode(t)})).join(""),s=e.length-1;s>=0;s--)if(0!==e[s]&&12!==s&&13!==s&&14!==s){t=!1;break}var u=t&&"XRP"!==i&&a.test(i);this._isNative=t&&r.isEqual(n,[0,0,0]),this._iso=this._isNative?"XRP":u?i:null},toJSON:function(){return this.iso()?this.iso():h.toJSON.call(this)}});t.exports={Currency:d}},function(t,e,n){var r;function i(t){this.rand=t}if(t.exports=function(t){return r||(r=new i(null)),r.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),n=0;n<e.length;n++)e[n]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=n(110);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(t){}},function(t,e,n){"use strict";var r,i=e,o=n(18),s=n(62),a=n(4).assert;function u(t){"short"===t.type?this.curve=new s.short(t):"edwards"===t.type?this.curve=new s.edwards(t):this.curve=new s.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var n=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=u,f("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),f("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),f("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(122)}catch(t){r=void 0}f("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";var r=n(1),i=n(76),o=n(89),s=n(90),a=n(95);function u(t){a.call(this,"digest"),this._hash=t}r(u,a),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new u(s(t))}},function(t,e,n){"use strict";var r=n(6).Buffer,i=n(44).Transform;function o(t){i.call(this),this._block=r.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(1)(o,i),o.prototype._transform=function(t,e,n){var r=null;try{this.update(t,e)}catch(t){r=t}n(r)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!r.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(t)||(t=r.from(t,e));for(var n=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)n[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)n[this._blockOffset++]=t[i++];for(var s=0,a=8*t.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,n){t.exports=i;var r=n(30).EventEmitter;function i(){r.call(this)}n(1)(i,r),i.Readable=n(31),i.Writable=n(85),i.Duplex=n(86),i.Transform=n(87),i.PassThrough=n(88),i.Stream=i,i.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(n.on("end",a),n.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){if(c(),0===r.listenerCount(this,"error"))throw t}function c(){n.removeListener("data",i),t.removeListener("drain",o),n.removeListener("end",a),n.removeListener("close",u),n.removeListener("error",f),t.removeListener("error",f),n.removeListener("end",c),n.removeListener("close",c),t.removeListener("close",c)}return n.on("error",f),t.on("error",f),n.on("end",c),n.on("close",c),t.on("close",c),t.emit("pipe",n),t}},function(t,e,n){"use strict";(function(e,r){var i=n(23);t.exports=y;var o,s=n(41);y.ReadableState=m;n(30).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=n(46),f=n(32).Buffer,c=e.Uint8Array||function(){};var h=Object.create(n(20));h.inherits=n(1);var d=n(77),l=void 0;l=d&&d.debuglog?d.debuglog("stream"):function(){};var p,b=n(78),g=n(47);h.inherits(y,u);var v=["error","close","destroy","pause","resume"];function m(t,e){t=t||{};var r=e instanceof(o=o||n(13));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new b,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=n(34).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function y(t){if(o=o||n(13),!(this instanceof y))return new y(t);this._readableState=new m(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,n,r,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,M(t)}(t,s)):(i||(o=function(t,e){var n;r=e,f.isBuffer(r)||r instanceof c||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===f.prototype||(e=function(t){return f.from(t)}(e)),r?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(e=s.decoder.write(e),s.objectMode||0!==e.length?_(t,s,e,!1):A(t,s)):_(t,s,e,!1))):r||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function _(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&M(t)),A(t,e)}Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(t,e){this.push(null),e(t)},y.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=f.from(t,e),e=""),n=!0),w(this,t,e,!1,n)},y.prototype.unshift=function(t){return w(this,t,null,!0,!1)},y.prototype.isPaused=function(){return!1===this._readableState.flowing},y.prototype.setEncoding=function(t){return p||(p=n(34).StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};function S(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function M(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(l("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(E,t):E(t))}function E(t){l("emit readable"),t.emit("readable"),k(t)}function A(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(x,t,e))}function x(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(l("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function I(t){l("readable nexttick read 0"),t.read(0)}function T(t,e){e.reading||(l("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),k(t),e.flowing&&!e.reading&&t.read(0)}function k(t){var e=t._readableState;for(l("flow",e.flowing);e.flowing&&null!==t.read(););}function L(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?function(t,e){var n=e.head,r=1,i=n.data;t-=i.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=f.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,s),0===(t-=s)){s===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function N(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(R,e,t))}function R(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function O(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}y.prototype.read=function(t){l("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return l("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?N(this):M(this),null;if(0===(t=S(t,e))&&e.ended)return 0===e.length&&N(this),null;var r,i=e.needReadable;return l("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&l("length less than watermark",i=!0),e.ended||e.reading?l("reading or ended",i=!1):i&&(l("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=S(n,e))),null===(r=t>0?L(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&N(this)),null!==r&&this.emit("data",r),r},y.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,l("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?c:y;function f(e,r){l("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,l("cleanup"),t.removeListener("close",v),t.removeListener("finish",m),t.removeListener("drain",h),t.removeListener("error",g),t.removeListener("unpipe",f),n.removeListener("end",c),n.removeListener("end",y),n.removeListener("data",b),d=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function c(){l("onend"),t.end()}o.endEmitted?i.nextTick(u):n.once("end",u),t.on("unpipe",f);var h=function(t){return function(){var e=t._readableState;l("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,k(t))}}(n);t.on("drain",h);var d=!1;var p=!1;function b(e){l("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==O(o.pipes,t))&&!d&&(l("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function g(e){l("onerror",e),y(),t.removeListener("error",g),0===a(t,"error")&&t.emit("error",e)}function v(){t.removeListener("finish",m),y()}function m(){l("onfinish"),t.removeListener("close",v),y()}function y(){l("unpipe"),n.unpipe(t)}return n.on("data",b),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",g),t.once("close",v),t.once("finish",m),t.emit("pipe",n),o.flowing||(l("pipe resume"),n.resume()),t},y.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=O(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},y.prototype.on=function(t,e){var n=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&M(this):i.nextTick(I,this))}return n},y.prototype.addListener=y.prototype.on,y.prototype.resume=function(){var t=this._readableState;return t.flowing||(l("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(T,t,e))}(this,t)),this},y.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this},y.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(l("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(l("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<v.length;o++)t.on(v[o],this.emit.bind(this,v[o]));return this._read=function(e){l("wrapped _read",e),r&&(r=!1,t.resume())},this},Object.defineProperty(y.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),y._fromList=L}).call(this,n(9),n(19))},function(t,e,n){t.exports=n(30).EventEmitter},function(t,e,n){"use strict";var r=n(23);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(r.nextTick(i,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,n){"use strict";t.exports=s;var r=n(13),i=Object.create(n(20));function o(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);r.call(this,t),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"==typeof this._flush?this._flush((function(e,n){u(t,e,n)})):u(this,null,null)}function u(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=n(1),i.inherits(s,r),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")},s.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var n=this;r.prototype._destroy.call(this,t,(function(t){e(t),n.emit("close")}))}},function(t,e,n){var r=n(1),i=n(17),o=n(6).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(t,e,n){return n^t&(e^n)}function c(t,e,n){return t&e|n&(t|e)}function h(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function d(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function l(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function p(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}r(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e=this._w,n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,u=0|this._f,b=0|this._g,g=0|this._h,v=0;v<16;++v)e[v]=t.readInt32BE(4*v);for(;v<64;++v)e[v]=p(e[v-2])+e[v-7]+l(e[v-15])+e[v-16]|0;for(var m=0;m<64;++m){var y=g+d(a)+f(a,u,b)+s[m]+e[m]|0,w=h(n)+c(n,r,i)|0;g=b,b=u,u=a,a=o+y|0,o=i,i=r,r=n,n=y+w|0}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=u+this._f|0,this._g=b+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,n){var r=n(1),i=n(17),o=n(6).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}function f(t,e,n){return n^t&(e^n)}function c(t,e,n){return t&e|n&(t|e)}function h(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function d(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function l(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function b(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function v(t,e){return t>>>0<e>>>0?1:0}r(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,m=0|this._gh,y=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,M=0|this._dl,E=0|this._el,A=0|this._fl,x=0|this._gl,I=0|this._hl,T=0;T<32;T+=2)e[T]=t.readInt32BE(4*T),e[T+1]=t.readInt32BE(4*T+4);for(;T<160;T+=2){var k=e[T-30],L=e[T-30+1],N=l(k,L),R=p(L,k),O=b(k=e[T-4],L=e[T-4+1]),B=g(L,k),z=e[T-14],P=e[T-14+1],U=e[T-32],F=e[T-32+1],j=R+P|0,C=N+z+v(j,R)|0;C=(C=C+O+v(j=j+B|0,B)|0)+U+v(j=j+F|0,F)|0,e[T]=C,e[T+1]=j}for(var D=0;D<160;D+=2){C=e[D],j=e[D+1];var q=c(n,r,i),V=c(w,_,S),H=h(n,w),W=h(w,n),Z=d(a,E),Y=d(E,a),J=s[D],K=s[D+1],$=f(a,u,m),X=f(E,A,x),G=I+Y|0,Q=y+Z+v(G,I)|0;Q=(Q=(Q=Q+$+v(G=G+X|0,X)|0)+J+v(G=G+K|0,K)|0)+C+v(G=G+j|0,j)|0;var tt=W+V|0,et=H+q+v(tt,W)|0;y=m,I=x,m=u,x=A,u=a,A=E,a=o+Q+v(E=M+G|0,M)|0,o=i,M=S,i=r,S=_,r=n,_=w,n=Q+et+v(w=G+tt|0,G)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+M|0,this._el=this._el+E|0,this._fl=this._fl+A|0,this._gl=this._gl+x|0,this._hl=this._hl+I|0,this._ah=this._ah+n+v(this._al,w)|0,this._bh=this._bh+r+v(this._bl,_)|0,this._ch=this._ch+i+v(this._cl,S)|0,this._dh=this._dh+o+v(this._dl,M)|0,this._eh=this._eh+a+v(this._el,E)|0,this._fh=this._fh+u+v(this._fl,A)|0,this._gh=this._gh+m+v(this._gl,x)|0,this._hh=this._hh+y+v(this._hl,I)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,n){var r;!function(i){"use strict";var o,s,a,u="0123456789abcdef",f="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",c="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",h={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-9e15,maxE:9e15,crypto:!1},d=!0,l="[DecimalError] Invalid argument: ",p=Math.floor,b=Math.pow,g=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,v=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,m=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,y=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,w=f.length-1,_=c.length-1,S={name:"[object Decimal]"};function M(t){var e,n,r,i=t.length-1,o="",s=t[0];if(i>0){for(o+=s,e=1;e<i;e++)(n=7-(r=t[e]+"").length)&&(o+=B(n)),o+=r;(n=7-(r=(s=t[e])+"").length)&&(o+=B(n))}else if(0===s)return"0";for(;s%10==0;)s/=10;return o+s}function E(t,e,n){if(t!==~~t||t<e||t>n)throw Error(l+t)}function A(t,e,n,r){var i,o,s,a;for(o=t[0];o>=10;o/=10)--e;return--e<0?(e+=7,i=0):(i=Math.ceil((e+1)/7),e%=7),o=b(10,7-e),a=t[i]%o|0,null==r?e<3?(0==e?a=a/100|0:1==e&&(a=a/10|0),s=n<4&&99999==a||n>3&&49999==a||5e4==a||0==a):s=(n<4&&a+1==o||n>3&&a+1==o/2)&&(t[i+1]/o/100|0)==b(10,e-2)-1||(a==o/2||0==a)&&0==(t[i+1]/o/100|0):e<4?(0==e?a=a/1e3|0:1==e?a=a/100|0:2==e&&(a=a/10|0),s=(r||n<4)&&9999==a||!r&&n>3&&4999==a):s=((r||n<4)&&a+1==o||!r&&n>3&&a+1==o/2)&&(t[i+1]/o/1e3|0)==b(10,e-3)-1,s}function x(t,e,n){for(var r,i,o=[0],s=0,a=t.length;s<a;){for(i=o.length;i--;)o[i]*=e;for(o[0]+=u.indexOf(t.charAt(s++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}S.absoluteValue=S.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),T(t)},S.ceil=function(){return T(new this.constructor(this),this.e+1,2)},S.comparedTo=S.cmp=function(t){var e,n,r,i,o=this,s=o.d,a=(t=new o.constructor(t)).d,u=o.s,f=t.s;if(!s||!a)return u&&f?u!==f?u:s===a?0:!s^u<0?1:-1:NaN;if(!s[0]||!a[0])return s[0]?u:a[0]?-f:0;if(u!==f)return u;if(o.e!==t.e)return o.e>t.e^u<0?1:-1;for(e=0,n=(r=s.length)<(i=a.length)?r:i;e<n;++e)if(s[e]!==a[e])return s[e]>a[e]^u<0?1:-1;return r===i?0:r>i^u<0?1:-1},S.cosine=S.cos=function(){var t,e,n=this,r=n.constructor;return n.d?n.d[0]?(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(t,e){var n,r,i=e.d.length;i<32?(n=Math.ceil(i/3),r=(1/H(4,n)).toString()):(n=16,r="2.3283064365386962890625e-10");t.precision+=n,e=V(t,1,e.times(r),new t(1));for(var o=n;o--;){var s=e.times(e);e=s.times(s).minus(s).times(8).plus(1)}return t.precision-=n,e}(r,W(r,n)),r.precision=t,r.rounding=e,T(2==a||3==a?n.neg():n,t,e,!0)):new r(1):new r(NaN)},S.cubeRoot=S.cbrt=function(){var t,e,n,r,i,o,s,a,u,f,c=this,h=c.constructor;if(!c.isFinite()||c.isZero())return new h(c);for(d=!1,(o=c.s*b(c.s*c,1/3))&&Math.abs(o)!=1/0?r=new h(o.toString()):(n=M(c.d),(o=((t=c.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=b(n,1/3),t=p((t+1)/3)-(t%3==(t<0?-1:2)),(r=new h(n=o==1/0?"5e"+t:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+t)).s=c.s),s=(t=h.precision)+3;;)if(f=(u=(a=r).times(a).times(a)).plus(c),r=I(f.plus(c).times(a),f.plus(u),s+2,1),M(a.d).slice(0,s)===(n=M(r.d)).slice(0,s)){if("9999"!=(n=n.slice(s-3,s+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(T(r,t+1,1),e=!r.times(r).times(r).eq(c));break}if(!i&&(T(a,t+1,0),a.times(a).times(a).eq(c))){r=a;break}s+=4,i=1}return d=!0,T(r,t,h.rounding,e)},S.decimalPlaces=S.dp=function(){var t,e=this.d,n=NaN;if(e){if(n=7*((t=e.length-1)-p(this.e/7)),t=e[t])for(;t%10==0;t/=10)n--;n<0&&(n=0)}return n},S.dividedBy=S.div=function(t){return I(this,new this.constructor(t))},S.dividedToIntegerBy=S.divToInt=function(t){var e=this.constructor;return T(I(this,new e(t),0,1,1),e.precision,e.rounding)},S.equals=S.eq=function(t){return 0===this.cmp(t)},S.floor=function(){return T(new this.constructor(this),this.e+1,3)},S.greaterThan=S.gt=function(t){return this.cmp(t)>0},S.greaterThanOrEqualTo=S.gte=function(t){var e=this.cmp(t);return 1==e||0===e},S.hyperbolicCosine=S.cosh=function(){var t,e,n,r,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;n=s.precision,r=s.rounding,s.precision=n+Math.max(o.e,o.sd())+4,s.rounding=1,(i=o.d.length)<32?e=(1/H(4,t=Math.ceil(i/3))).toString():(t=16,e="2.3283064365386962890625e-10"),o=V(s,1,o.times(e),new s(1),!0);for(var u,f=t,c=new s(8);f--;)u=o.times(o),o=a.minus(u.times(c.minus(u.times(c))));return T(o,s.precision=n,s.rounding=r,!0)},S.hyperbolicSine=S.sinh=function(){var t,e,n,r,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(e=o.precision,n=o.rounding,o.precision=e+Math.max(i.e,i.sd())+4,o.rounding=1,(r=i.d.length)<3)i=V(o,2,i,i,!0);else{t=(t=1.4*Math.sqrt(r))>16?16:0|t,i=V(o,2,i=i.times(1/H(5,t)),i,!0);for(var s,a=new o(5),u=new o(16),f=new o(20);t--;)s=i.times(i),i=i.times(a.plus(s.times(u.times(s).plus(f))))}return o.precision=e,o.rounding=n,T(i,e,n,!0)},S.hyperbolicTangent=S.tanh=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+7,r.rounding=1,I(n.sinh(),n.cosh(),r.precision=t,r.rounding=e)):new r(n.s)},S.inverseCosine=S.acos=function(){var t,e=this,n=e.constructor,r=e.abs().cmp(1),i=n.precision,o=n.rounding;return-1!==r?0===r?e.isNeg()?R(n,i,o):new n(0):new n(NaN):e.isZero()?R(n,i+4,o).times(.5):(n.precision=i+6,n.rounding=1,e=e.asin(),t=R(n,i+4,o).times(.5),n.precision=i,n.rounding=o,t.minus(e))},S.inverseHyperbolicCosine=S.acosh=function(){var t,e,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(t=r.precision,e=r.rounding,r.precision=t+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,d=!1,n=n.times(n).minus(1).sqrt().plus(n),d=!0,r.precision=t,r.rounding=e,n.ln()):new r(n)},S.inverseHyperbolicSine=S.asinh=function(){var t,e,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,d=!1,n=n.times(n).plus(1).sqrt().plus(n),d=!0,r.precision=t,r.rounding=e,n.ln())},S.inverseHyperbolicTangent=S.atanh=function(){var t,e,n,r,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=o.precision,e=o.rounding,r=i.sd(),Math.max(r,t)<2*-i.e-1?T(new o(i),t,e,!0):(o.precision=n=r-i.e,i=I(i.plus(1),new o(1).minus(i),n+t,1),o.precision=t+4,o.rounding=1,i=i.ln(),o.precision=t,o.rounding=e,i.times(.5))):new o(NaN)},S.inverseSine=S.asin=function(){var t,e,n,r,i=this,o=i.constructor;return i.isZero()?new o(i):(e=i.abs().cmp(1),n=o.precision,r=o.rounding,-1!==e?0===e?((t=R(o,n+4,r).times(.5)).s=i.s,t):new o(NaN):(o.precision=n+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,i.times(2)))},S.inverseTangent=S.atan=function(){var t,e,n,r,i,o,s,a,u,f=this,c=f.constructor,h=c.precision,l=c.rounding;if(f.isFinite()){if(f.isZero())return new c(f);if(f.abs().eq(1)&&h+4<=_)return(s=R(c,h+4,l).times(.25)).s=f.s,s}else{if(!f.s)return new c(NaN);if(h+4<=_)return(s=R(c,h+4,l).times(.5)).s=f.s,s}for(c.precision=a=h+10,c.rounding=1,t=n=Math.min(28,a/7+2|0);t;--t)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(d=!1,e=Math.ceil(a/7),r=1,u=f.times(f),s=new c(f),i=f;-1!==t;)if(i=i.times(u),o=s.minus(i.div(r+=2)),i=i.times(u),void 0!==(s=o.plus(i.div(r+=2))).d[e])for(t=e;s.d[t]===o.d[t]&&t--;);return n&&(s=s.times(2<<n-1)),d=!0,T(s,c.precision=h,c.rounding=l,!0)},S.isFinite=function(){return!!this.d},S.isInteger=S.isInt=function(){return!!this.d&&p(this.e/7)>this.d.length-2},S.isNaN=function(){return!this.s},S.isNegative=S.isNeg=function(){return this.s<0},S.isPositive=S.isPos=function(){return this.s>0},S.isZero=function(){return!!this.d&&0===this.d[0]},S.lessThan=S.lt=function(t){return this.cmp(t)<0},S.lessThanOrEqualTo=S.lte=function(t){return this.cmp(t)<1},S.logarithm=S.log=function(t){var e,n,r,i,o,s,a,u,f=this.constructor,c=f.precision,h=f.rounding;if(null==t)t=new f(10),e=!0;else{if(n=(t=new f(t)).d,t.s<0||!n||!n[0]||t.eq(1))return new f(NaN);e=t.eq(10)}if(n=this.d,this.s<0||!n||!n[0]||this.eq(1))return new f(n&&!n[0]?-1/0:1!=this.s?NaN:n?0:1/0);if(e)if(n.length>1)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(d=!1,s=j(this,a=c+5),r=e?N(f,a+10):j(t,a),A((u=I(s,r,a,1)).d,i=c,h))do{if(s=j(this,a+=10),r=e?N(f,a+10):j(t,a),u=I(s,r,a,1),!o){+M(u.d).slice(i+1,i+15)+1==1e14&&(u=T(u,c+1,0));break}}while(A(u.d,i+=10,h));return d=!0,T(u,c,h)},S.minus=S.sub=function(t){var e,n,r,i,o,s,a,u,f,c,h,l,b=this,g=b.constructor;if(t=new g(t),!b.d||!t.d)return b.s&&t.s?b.d?t.s=-t.s:t=new g(t.d||b.s!==t.s?b:NaN):t=new g(NaN),t;if(b.s!=t.s)return t.s=-t.s,b.plus(t);if(f=b.d,l=t.d,a=g.precision,u=g.rounding,!f[0]||!l[0]){if(l[0])t.s=-t.s;else{if(!f[0])return new g(3===u?-0:0);t=new g(b)}return d?T(t,a,u):t}if(n=p(t.e/7),c=p(b.e/7),f=f.slice(),o=c-n){for((h=o<0)?(e=f,o=-o,s=l.length):(e=l,n=c,s=f.length),o>(r=Math.max(Math.ceil(a/7),s)+2)&&(o=r,e.length=1),e.reverse(),r=o;r--;)e.push(0);e.reverse()}else{for((h=(r=f.length)<(s=l.length))&&(s=r),r=0;r<s;r++)if(f[r]!=l[r]){h=f[r]<l[r];break}o=0}for(h&&(e=f,f=l,l=e,t.s=-t.s),s=f.length,r=l.length-s;r>0;--r)f[s++]=0;for(r=l.length;r>o;){if(f[--r]<l[r]){for(i=r;i&&0===f[--i];)f[i]=1e7-1;--f[i],f[r]+=1e7}f[r]-=l[r]}for(;0===f[--s];)f.pop();for(;0===f[0];f.shift())--n;return f[0]?(t.d=f,t.e=L(f,n),d?T(t,a,u):t):new g(3===u?-0:0)},S.modulo=S.mod=function(t){var e,n=this,r=n.constructor;return t=new r(t),!n.d||!t.s||t.d&&!t.d[0]?new r(NaN):!t.d||n.d&&!n.d[0]?T(new r(n),r.precision,r.rounding):(d=!1,9==r.modulo?(e=I(n,t.abs(),0,3,1)).s*=t.s:e=I(n,t,0,r.modulo,1),e=e.times(t),d=!0,n.minus(e))},S.naturalExponential=S.exp=function(){return F(this)},S.naturalLogarithm=S.ln=function(){return j(this)},S.negated=S.neg=function(){var t=new this.constructor(this);return t.s=-t.s,T(t)},S.plus=S.add=function(t){var e,n,r,i,o,s,a,u,f,c,h=this,l=h.constructor;if(t=new l(t),!h.d||!t.d)return h.s&&t.s?h.d||(t=new l(t.d||h.s===t.s?h:NaN)):t=new l(NaN),t;if(h.s!=t.s)return t.s=-t.s,h.minus(t);if(f=h.d,c=t.d,a=l.precision,u=l.rounding,!f[0]||!c[0])return c[0]||(t=new l(h)),d?T(t,a,u):t;if(o=p(h.e/7),r=p(t.e/7),f=f.slice(),i=o-r){for(i<0?(n=f,i=-i,s=c.length):(n=c,r=o,s=f.length),i>(s=(o=Math.ceil(a/7))>s?o+1:s+1)&&(i=s,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((s=f.length)-(i=c.length)<0&&(i=s,n=c,c=f,f=n),e=0;i;)e=(f[--i]=f[i]+c[i]+e)/1e7|0,f[i]%=1e7;for(e&&(f.unshift(e),++r),s=f.length;0==f[--s];)f.pop();return t.d=f,t.e=L(f,r),d?T(t,a,u):t},S.precision=S.sd=function(t){var e,n=this;if(void 0!==t&&t!==!!t&&1!==t&&0!==t)throw Error(l+t);return n.d?(e=O(n.d),t&&n.e+1>e&&(e=n.e+1)):e=NaN,e},S.round=function(){var t=this,e=t.constructor;return T(new e(t),t.e+1,e.rounding)},S.sine=S.sin=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(t,e){var n,r=e.d.length;if(r<3)return V(t,2,e,e);n=(n=1.4*Math.sqrt(r))>16?16:0|n,e=e.times(1/H(5,n)),e=V(t,2,e,e);for(var i,o=new t(5),s=new t(16),a=new t(20);n--;)i=e.times(e),e=e.times(o.plus(i.times(s.times(i).minus(a))));return e}(r,W(r,n)),r.precision=t,r.rounding=e,T(a>2?n.neg():n,t,e,!0)):new r(NaN)},S.squareRoot=S.sqrt=function(){var t,e,n,r,i,o,s=this,a=s.d,u=s.e,f=s.s,c=s.constructor;if(1!==f||!a||!a[0])return new c(!f||f<0&&(!a||a[0])?NaN:a?s:1/0);for(d=!1,0==(f=Math.sqrt(+s))||f==1/0?(((e=M(a)).length+u)%2==0&&(e+="0"),f=Math.sqrt(e),u=p((u+1)/2)-(u<0||u%2),r=new c(e=f==1/0?"1e"+u:(e=f.toExponential()).slice(0,e.indexOf("e")+1)+u)):r=new c(f.toString()),n=(u=c.precision)+3;;)if(r=(o=r).plus(I(s,o,n+2,1)).times(.5),M(o.d).slice(0,n)===(e=M(r.d)).slice(0,n)){if("9999"!=(e=e.slice(n-3,n+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(T(r,u+1,1),t=!r.times(r).eq(s));break}if(!i&&(T(o,u+1,0),o.times(o).eq(s))){r=o;break}n+=4,i=1}return d=!0,T(r,u,c.rounding,t)},S.tangent=S.tan=function(){var t,e,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(t=r.precision,e=r.rounding,r.precision=t+10,r.rounding=1,(n=n.sin()).s=1,n=I(n,new r(1).minus(n.times(n)).sqrt(),t+10,0),r.precision=t,r.rounding=e,T(2==a||4==a?n.neg():n,t,e,!0)):new r(NaN)},S.times=S.mul=function(t){var e,n,r,i,o,s,a,u,f,c=this,h=c.constructor,l=c.d,b=(t=new h(t)).d;if(t.s*=c.s,!(l&&l[0]&&b&&b[0]))return new h(!t.s||l&&!l[0]&&!b||b&&!b[0]&&!l?NaN:l&&b?0*t.s:t.s/0);for(n=p(c.e/7)+p(t.e/7),(u=l.length)<(f=b.length)&&(o=l,l=b,b=o,s=u,u=f,f=s),o=[],r=s=u+f;r--;)o.push(0);for(r=f;--r>=0;){for(e=0,i=u+r;i>r;)a=o[i]+b[r]*l[i-r-1]+e,o[i--]=a%1e7|0,e=a/1e7|0;o[i]=(o[i]+e)%1e7|0}for(;!o[--s];)o.pop();return e?++n:o.shift(),t.d=o,t.e=L(o,n),d?T(t,h.precision,h.rounding):t},S.toBinary=function(t,e){return Z(this,2,t,e)},S.toDecimalPlaces=S.toDP=function(t,e){var n=this,r=n.constructor;return n=new r(n),void 0===t?n:(E(t,0,1e9),void 0===e?e=r.rounding:E(e,0,8),T(n,t+n.e+1,e))},S.toExponential=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=k(r,!0):(E(t,0,1e9),void 0===e?e=i.rounding:E(e,0,8),n=k(r=T(new i(r),t+1,e),!0,t+1)),r.isNeg()&&!r.isZero()?"-"+n:n},S.toFixed=function(t,e){var n,r,i=this,o=i.constructor;return void 0===t?n=k(i):(E(t,0,1e9),void 0===e?e=o.rounding:E(e,0,8),n=k(r=T(new o(i),t+i.e+1,e),!1,t+r.e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},S.toFraction=function(t){var e,n,r,i,o,s,a,u,f,c,h,p,g=this,v=g.d,m=g.constructor;if(!v)return new m(g);if(f=n=new m(1),r=u=new m(0),s=(o=(e=new m(r)).e=O(v)-g.e-1)%7,e.d[0]=b(10,s<0?7+s:s),null==t)t=o>0?e:f;else{if(!(a=new m(t)).isInt()||a.lt(f))throw Error(l+a);t=a.gt(e)?o>0?e:f:a}for(d=!1,a=new m(M(v)),c=m.precision,m.precision=o=7*v.length*2;h=I(a,e,0,1,1),1!=(i=n.plus(h.times(r))).cmp(t);)n=r,r=i,i=f,f=u.plus(h.times(i)),u=i,i=e,e=a.minus(h.times(i)),a=i;return i=I(t.minus(n),r,0,1,1),u=u.plus(i.times(f)),n=n.plus(i.times(r)),u.s=f.s=g.s,p=I(f,r,o,1).minus(g).abs().cmp(I(u,n,o,1).minus(g).abs())<1?[f,r]:[u,n],m.precision=c,d=!0,p},S.toHexadecimal=S.toHex=function(t,e){return Z(this,16,t,e)},S.toNearest=function(t,e){var n=this,r=n.constructor;if(n=new r(n),null==t){if(!n.d)return n;t=new r(1),e=r.rounding}else{if(t=new r(t),void 0===e?e=r.rounding:E(e,0,8),!n.d)return t.s?n:t;if(!t.d)return t.s&&(t.s=n.s),t}return t.d[0]?(d=!1,n=I(n,t,0,e,1).times(t),d=!0,T(n)):(t.s=n.s,n=t),n},S.toNumber=function(){return+this},S.toOctal=function(t,e){return Z(this,8,t,e)},S.toPower=S.pow=function(t){var e,n,r,i,o,s,a=this,u=a.constructor,f=+(t=new u(t));if(!(a.d&&t.d&&a.d[0]&&t.d[0]))return new u(b(+a,f));if((a=new u(a)).eq(1))return a;if(r=u.precision,o=u.rounding,t.eq(1))return T(a,r,o);if((e=p(t.e/7))>=t.d.length-1&&(n=f<0?-f:f)<=9007199254740991)return i=z(u,a,n,r),t.s<0?new u(1).div(i):T(i,r,o);if((s=a.s)<0){if(e<t.d.length-1)return new u(NaN);if(0==(1&t.d[e])&&(s=1),0==a.e&&1==a.d[0]&&1==a.d.length)return a.s=s,a}return(e=0!=(n=b(+a,f))&&isFinite(n)?new u(n+"").e:p(f*(Math.log("0."+M(a.d))/Math.LN10+a.e+1)))>u.maxE+1||e<u.minE-1?new u(e>0?s/0:0):(d=!1,u.rounding=a.s=1,n=Math.min(12,(e+"").length),(i=F(t.times(j(a,r+n)),r)).d&&A((i=T(i,r+5,1)).d,r,o)&&(e=r+10,+M((i=T(F(t.times(j(a,e+n)),e),e+5,1)).d).slice(r+1,r+15)+1==1e14&&(i=T(i,r+1,0))),i.s=s,d=!0,u.rounding=o,T(i,r,o))},S.toPrecision=function(t,e){var n,r=this,i=r.constructor;return void 0===t?n=k(r,r.e<=i.toExpNeg||r.e>=i.toExpPos):(E(t,1,1e9),void 0===e?e=i.rounding:E(e,0,8),n=k(r=T(new i(r),t,e),t<=r.e||r.e<=i.toExpNeg,t)),r.isNeg()&&!r.isZero()?"-"+n:n},S.toSignificantDigits=S.toSD=function(t,e){var n=this.constructor;return void 0===t?(t=n.precision,e=n.rounding):(E(t,1,1e9),void 0===e?e=n.rounding:E(e,0,8)),T(new n(this),t,e)},S.toString=function(){var t=this,e=t.constructor,n=k(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+n:n},S.truncated=S.trunc=function(){return T(new this.constructor(this),this.e+1,1)},S.valueOf=S.toJSON=function(){var t=this,e=t.constructor,n=k(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+n:n};var I=function(){function t(t,e,n){var r,i=0,o=t.length;for(t=t.slice();o--;)r=t[o]*e+i,t[o]=r%n|0,i=r/n|0;return i&&t.unshift(i),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;i<n;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]<e[n]?1:0,t[n]=i*r+t[n]-e[n];for(;!t[0]&&t.length>1;)t.shift()}return function(r,i,o,a,u,f){var c,h,d,l,b,g,v,m,y,w,_,S,M,E,A,x,I,k,L,N,R=r.constructor,O=r.s==i.s?1:-1,B=r.d,z=i.d;if(!(B&&B[0]&&z&&z[0]))return new R(r.s&&i.s&&(B?!z||B[0]!=z[0]:z)?B&&0==B[0]||!z?0*O:O/0:NaN);for(f?(b=1,h=r.e-i.e):(f=1e7,b=7,h=p(r.e/b)-p(i.e/b)),L=z.length,I=B.length,w=(y=new R(O)).d=[],d=0;z[d]==(B[d]||0);d++);if(z[d]>(B[d]||0)&&h--,null==o?(E=o=R.precision,a=R.rounding):E=u?o+(r.e-i.e)+1:o,E<0)w.push(1),g=!0;else{if(E=E/b+2|0,d=0,1==L){for(l=0,z=z[0],E++;(d<I||l)&&E--;d++)A=l*f+(B[d]||0),w[d]=A/z|0,l=A%z|0;g=l||d<I}else{for((l=f/(z[0]+1)|0)>1&&(z=t(z,l,f),B=t(B,l,f),L=z.length,I=B.length),x=L,S=(_=B.slice(0,L)).length;S<L;)_[S++]=0;(N=z.slice()).unshift(0),k=z[0],z[1]>=f/2&&++k;do{l=0,(c=e(z,_,L,S))<0?(M=_[0],L!=S&&(M=M*f+(_[1]||0)),(l=M/k|0)>1?(l>=f&&(l=f-1),1==(c=e(v=t(z,l,f),_,m=v.length,S=_.length))&&(l--,n(v,L<m?N:z,m,f))):(0==l&&(c=l=1),v=z.slice()),(m=v.length)<S&&v.unshift(0),n(_,v,S,f),-1==c&&(c=e(z,_,L,S=_.length))<1&&(l++,n(_,L<S?N:z,S,f)),S=_.length):0===c&&(l++,_=[0]),w[d++]=l,c&&_[0]?_[S++]=B[x]||0:(_=[B[x]],S=1)}while((x++<I||void 0!==_[0])&&E--);g=void 0!==_[0]}w[0]||w.shift()}if(1==b)y.e=h,s=g;else{for(d=1,l=w[0];l>=10;l/=10)d++;y.e=d+h*b-1,T(y,u?o+y.e+1:o,a,g)}return y}}();function T(t,e,n,r){var i,o,s,a,u,f,c,h,l,p=t.constructor;t:if(null!=e){if(!(h=t.d))return t;for(i=1,a=h[0];a>=10;a/=10)i++;if((o=e-i)<0)o+=7,s=e,u=(c=h[l=0])/b(10,i-s-1)%10|0;else if((l=Math.ceil((o+1)/7))>=(a=h.length)){if(!r)break t;for(;a++<=l;)h.push(0);c=u=0,i=1,s=(o%=7)-7+1}else{for(c=a=h[l],i=1;a>=10;a/=10)i++;u=(s=(o%=7)-7+i)<0?0:c/b(10,i-s-1)%10|0}if(r=r||e<0||void 0!==h[l+1]||(s<0?c:c%b(10,i-s-1)),f=n<4?(u||r)&&(0==n||n==(t.s<0?3:2)):u>5||5==u&&(4==n||r||6==n&&(o>0?s>0?c/b(10,i-s):0:h[l-1])%10&1||n==(t.s<0?8:7)),e<1||!h[0])return h.length=0,f?(e-=t.e+1,h[0]=b(10,(7-e%7)%7),t.e=-e||0):h[0]=t.e=0,t;if(0==o?(h.length=l,a=1,l--):(h.length=l+1,a=b(10,7-o),h[l]=s>0?(c/b(10,i-s)%b(10,s)|0)*a:0),f)for(;;){if(0==l){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(t.e++,1e7==h[0]&&(h[0]=1));break}if(h[l]+=a,1e7!=h[l])break;h[l--]=0,a=1}for(o=h.length;0===h[--o];)h.pop()}return d&&(t.e>p.maxE?(t.d=null,t.e=NaN):t.e<p.minE&&(t.e=0,t.d=[0])),t}function k(t,e,n){if(!t.isFinite())return C(t);var r,i=t.e,o=M(t.d),s=o.length;return e?(n&&(r=n-s)>0?o=o.charAt(0)+"."+o.slice(1)+B(r):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):i<0?(o="0."+B(-i-1)+o,n&&(r=n-s)>0&&(o+=B(r))):i>=s?(o+=B(i+1-s),n&&(r=n-i-1)>0&&(o=o+"."+B(r))):((r=i+1)<s&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-s)>0&&(i+1===s&&(o+="."),o+=B(r))),o}function L(t,e){var n=t[0];for(e*=7;n>=10;n/=10)e++;return e}function N(t,e,n){if(e>w)throw d=!0,n&&(t.precision=n),Error("[DecimalError] Precision limit exceeded");return T(new t(f),e,1,!0)}function R(t,e,n){if(e>_)throw Error("[DecimalError] Precision limit exceeded");return T(new t(c),e,n,!0)}function O(t){var e=t.length-1,n=7*e+1;if(e=t[e]){for(;e%10==0;e/=10)n--;for(e=t[0];e>=10;e/=10)n++}return n}function B(t){for(var e="";t--;)e+="0";return e}function z(t,e,n,r){var i,o=new t(1),s=Math.ceil(r/7+4);for(d=!1;;){if(n%2&&Y((o=o.times(e)).d,s)&&(i=!0),0===(n=p(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}Y((e=e.times(e)).d,s)}return d=!0,o}function P(t){return 1&t.d[t.d.length-1]}function U(t,e,n){for(var r,i=new t(e[0]),o=0;++o<e.length;){if(!(r=new t(e[o])).s){i=r;break}i[n](r)&&(i=r)}return i}function F(t,e){var n,r,i,o,s,a,u,f=0,c=0,h=0,l=t.constructor,p=l.rounding,g=l.precision;if(!t.d||!t.d[0]||t.e>17)return new l(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(null==e?(d=!1,u=g):u=e,a=new l(.03125);t.e>-2;)t=t.times(a),h+=5;for(u+=r=Math.log(b(2,h))/Math.LN10*2+5|0,n=o=s=new l(1),l.precision=u;;){if(o=T(o.times(t),u,1),n=n.times(++c),M((a=s.plus(I(o,n,u,1))).d).slice(0,u)===M(s.d).slice(0,u)){for(i=h;i--;)s=T(s.times(s),u,1);if(null!=e)return l.precision=g,s;if(!(f<3&&A(s.d,u-r,p,f)))return T(s,l.precision=g,p,d=!0);l.precision=u+=10,n=o=a=new l(1),c=0,f++}s=a}}function j(t,e){var n,r,i,o,s,a,u,f,c,h,l,p=1,b=t,g=b.d,v=b.constructor,m=v.rounding,y=v.precision;if(b.s<0||!g||!g[0]||!b.e&&1==g[0]&&1==g.length)return new v(g&&!g[0]?-1/0:1!=b.s?NaN:g?0:b);if(null==e?(d=!1,c=y):c=e,v.precision=c+=10,r=(n=M(g)).charAt(0),!(Math.abs(o=b.e)<15e14))return f=N(v,c+2,y).times(o+""),b=j(new v(r+"."+n.slice(1)),c-10).plus(f),v.precision=y,null==e?T(b,y,m,d=!0):b;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=M((b=b.times(t)).d)).charAt(0),p++;for(o=b.e,r>1?(b=new v("0."+n),o++):b=new v(r+"."+n.slice(1)),h=b,u=s=b=I(b.minus(1),b.plus(1),c,1),l=T(b.times(b),c,1),i=3;;){if(s=T(s.times(l),c,1),M((f=u.plus(I(s,new v(i),c,1))).d).slice(0,c)===M(u.d).slice(0,c)){if(u=u.times(2),0!==o&&(u=u.plus(N(v,c+2,y).times(o+""))),u=I(u,new v(p),c,1),null!=e)return v.precision=y,u;if(!A(u.d,c-10,m,a))return T(u,v.precision=y,m,d=!0);v.precision=c+=10,f=s=b=I(h.minus(1),h.plus(1),c,1),l=T(b.times(b),c,1),i=a=1}u=f,i+=2}}function C(t){return String(t.s*t.s/0)}function D(t,e){var n,r,i;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;48===e.charCodeAt(r);r++);for(i=e.length;48===e.charCodeAt(i-1);--i);if(e=e.slice(r,i)){if(i-=r,t.e=n=n-r-1,t.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&t.d.push(+e.slice(0,r)),i-=7;r<i;)t.d.push(+e.slice(r,r+=7));r=7-(e=e.slice(r)).length}else r-=i;for(;r--;)e+="0";t.d.push(+e),d&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function q(t,e){var n,r,i,s,a,u,f,c,h;if("Infinity"===e||"NaN"===e)return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(v.test(e))n=16,e=e.toLowerCase();else if(g.test(e))n=2;else{if(!m.test(e))throw Error(l+e);n=8}for((s=e.search(/p/i))>0?(f=+e.slice(s+1),e=e.substring(2,s)):e=e.slice(2),a=(s=e.indexOf("."))>=0,r=t.constructor,a&&(s=(u=(e=e.replace(".","")).length)-s,i=z(r,new r(n),s,2*s)),s=h=(c=x(e,n,1e7)).length-1;0===c[s];--s)c.pop();return s<0?new r(0*t.s):(t.e=L(c,h),t.d=c,d=!1,a&&(t=I(t,i,4*u)),f&&(t=t.times(Math.abs(f)<54?b(2,f):o.pow(2,f))),d=!0,t)}function V(t,e,n,r,i){var o,s,a,u,f=t.precision,c=Math.ceil(f/7);for(d=!1,u=n.times(n),a=new t(r);;){if(s=I(a.times(u),new t(e++*e++),f,1),a=i?r.plus(s):r.minus(s),r=I(s.times(u),new t(e++*e++),f,1),void 0!==(s=a.plus(r)).d[c]){for(o=c;s.d[o]===a.d[o]&&o--;);if(-1==o)break}o=a,a=r,r=s,s=o}return d=!0,s.d.length=c+1,s}function H(t,e){for(var n=t;--e;)n*=t;return n}function W(t,e){var n,r=e.s<0,i=R(t,t.precision,1),o=i.times(.5);if((e=e.abs()).lte(o))return a=r?4:1,e;if((n=e.divToInt(i)).isZero())a=r?3:2;else{if((e=e.minus(n.times(i))).lte(o))return a=P(n)?r?2:3:r?4:1,e;a=P(n)?r?1:4:r?3:2}return e.minus(i).abs()}function Z(t,e,n,r){var i,o,a,f,c,h,d,l,p,b=t.constructor,g=void 0!==n;if(g?(E(n,1,1e9),void 0===r?r=b.rounding:E(r,0,8)):(n=b.precision,r=b.rounding),t.isFinite()){for(g?(i=2,16==e?n=4*n-3:8==e&&(n=3*n-2)):i=e,(a=(d=k(t)).indexOf("."))>=0&&(d=d.replace(".",""),(p=new b(1)).e=d.length-a,p.d=x(k(p),10,i),p.e=p.d.length),o=c=(l=x(d,10,i)).length;0==l[--c];)l.pop();if(l[0]){if(a<0?o--:((t=new b(t)).d=l,t.e=o,l=(t=I(t,p,n,r,0,i)).d,o=t.e,h=s),a=l[n],f=i/2,h=h||void 0!==l[n+1],h=r<4?(void 0!==a||h)&&(0===r||r===(t.s<0?3:2)):a>f||a===f&&(4===r||h||6===r&&1&l[n-1]||r===(t.s<0?8:7)),l.length=n,h)for(;++l[--n]>i-1;)l[n]=0,n||(++o,l.unshift(1));for(c=l.length;!l[c-1];--c);for(a=0,d="";a<c;a++)d+=u.charAt(l[a]);if(g){if(c>1)if(16==e||8==e){for(a=16==e?4:3,--c;c%a;c++)d+="0";for(c=(l=x(d,i,e)).length;!l[c-1];--c);for(a=1,d="1.";a<c;a++)d+=u.charAt(l[a])}else d=d.charAt(0)+"."+d.slice(1);d=d+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)d="0"+d;d="0."+d}else if(++o>c)for(o-=c;o--;)d+="0";else o<c&&(d=d.slice(0,o)+"."+d.slice(o))}else d=g?"0p+0":"0";d=(16==e?"0x":2==e?"0b":8==e?"0o":"")+d}else d=C(t);return t.s<0?"-"+d:d}function Y(t,e){if(t.length>e)return t.length=e,!0}function J(t){return new this(t).abs()}function K(t){return new this(t).acos()}function $(t){return new this(t).acosh()}function X(t,e){return new this(t).plus(e)}function G(t){return new this(t).asin()}function Q(t){return new this(t).asinh()}function tt(t){return new this(t).atan()}function et(t){return new this(t).atanh()}function nt(t,e){t=new this(t),e=new this(e);var n,r=this.precision,i=this.rounding,o=r+4;return t.s&&e.s?t.d||e.d?!e.d||t.isZero()?(n=e.s<0?R(this,r,i):new this(0)).s=t.s:!t.d||e.isZero()?(n=R(this,o,1).times(.5)).s=t.s:e.s<0?(this.precision=o,this.rounding=1,n=this.atan(I(t,e,o,1)),e=R(this,o,1),this.precision=r,this.rounding=i,n=t.s<0?n.minus(e):n.plus(e)):n=this.atan(I(t,e,o,1)):(n=R(this,o,1).times(e.s>0?.25:.75)).s=t.s:n=new this(NaN),n}function rt(t){return new this(t).cbrt()}function it(t){return T(t=new this(t),t.e+1,2)}function ot(t){if(!t||"object"!=typeof t)throw Error("[DecimalError] Object expected");var e,n,r,i=!0===t.defaults,o=["precision",1,1e9,"rounding",0,8,"toExpNeg",-9e15,0,"toExpPos",0,9e15,"maxE",0,9e15,"minE",-9e15,0,"modulo",0,9];for(e=0;e<o.length;e+=3)if(n=o[e],i&&(this[n]=h[n]),void 0!==(r=t[n])){if(!(p(r)===r&&r>=o[e+1]&&r<=o[e+2]))throw Error(l+n+": "+r);this[n]=r}if(n="crypto",i&&(this[n]=h[n]),void 0!==(r=t[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(l+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");this[n]=!0}else this[n]=!1}return this}function st(t){return new this(t).cos()}function at(t){return new this(t).cosh()}function ut(t,e){return new this(t).div(e)}function ft(t){return new this(t).exp()}function ct(t){return T(t=new this(t),t.e+1,3)}function ht(){var t,e,n=new this(0);for(d=!1,t=0;t<arguments.length;)if((e=new this(arguments[t++])).d)n.d&&(n=n.plus(e.times(e)));else{if(e.s)return d=!0,new this(1/0);n=e}return d=!0,n.sqrt()}function dt(t){return t instanceof o||t&&"[object Decimal]"===t.name||!1}function lt(t){return new this(t).ln()}function pt(t,e){return new this(t).log(e)}function bt(t){return new this(t).log(2)}function gt(t){return new this(t).log(10)}function vt(){return U(this,arguments,"lt")}function mt(){return U(this,arguments,"gt")}function yt(t,e){return new this(t).mod(e)}function wt(t,e){return new this(t).mul(e)}function _t(t,e){return new this(t).pow(e)}function St(t){var e,n,r,i,o=0,s=new this(1),a=[];if(void 0===t?t=this.precision:E(t,1,1e9),r=Math.ceil(t/7),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(r));o<r;)(i=e[o])>=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");for(e=crypto.randomBytes(r*=4);o<r;)(i=e[o]+(e[o+1]<<8)+(e[o+2]<<16)+((127&e[o+3])<<24))>=214e7?crypto.randomBytes(4).copy(e,o):(a.push(i%1e7),o+=4);o=r/4}else for(;o<r;)a[o++]=1e7*Math.random()|0;for(t%=7,(r=a[--o])&&t&&(i=b(10,7-t),a[o]=(r/i|0)*i);0===a[o];o--)a.pop();if(o<0)n=0,a=[0];else{for(n=-1;0===a[0];n-=7)a.shift();for(r=1,i=a[0];i>=10;i/=10)r++;r<7&&(n-=7-r)}return s.e=n,s.d=a,s}function Mt(t){return T(t=new this(t),t.e+1,this.rounding)}function Et(t){return(t=new this(t)).d?t.d[0]?t.s:0*t.s:t.s||NaN}function At(t){return new this(t).sin()}function xt(t){return new this(t).sinh()}function It(t){return new this(t).sqrt()}function Tt(t,e){return new this(t).sub(e)}function kt(t){return new this(t).tan()}function Lt(t){return new this(t).tanh()}function Nt(t){return T(t=new this(t),t.e+1,1)}(o=function t(e){var n,r,i;function o(t){var e,n,r,i=this;if(!(i instanceof o))return new o(t);if(i.constructor=o,t instanceof o)return i.s=t.s,void(d?!t.d||t.e>o.maxE?(i.e=NaN,i.d=null):t.e<o.minE?(i.e=0,i.d=[0]):(i.e=t.e,i.d=t.d.slice()):(i.e=t.e,i.d=t.d?t.d.slice():t.d));if("number"===(r=typeof t)){if(0===t)return i.s=1/t<0?-1:1,i.e=0,void(i.d=[0]);if(t<0?(t=-t,i.s=-1):i.s=1,t===~~t&&t<1e7){for(e=0,n=t;n>=10;n/=10)e++;return void(d?e>o.maxE?(i.e=NaN,i.d=null):e<o.minE?(i.e=0,i.d=[0]):(i.e=e,i.d=[t]):(i.e=e,i.d=[t]))}return 0*t!=0?(t||(i.s=NaN),i.e=NaN,void(i.d=null)):D(i,t.toString())}if("string"!==r)throw Error(l+t);return 45===(n=t.charCodeAt(0))?(t=t.slice(1),i.s=-1):(43===n&&(t=t.slice(1)),i.s=1),y.test(t)?D(i,t):q(i,t)}if(o.prototype=S,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.EUCLID=9,o.config=o.set=ot,o.clone=t,o.isDecimal=dt,o.abs=J,o.acos=K,o.acosh=$,o.add=X,o.asin=G,o.asinh=Q,o.atan=tt,o.atanh=et,o.atan2=nt,o.cbrt=rt,o.ceil=it,o.cos=st,o.cosh=at,o.div=ut,o.exp=ft,o.floor=ct,o.hypot=ht,o.ln=lt,o.log=pt,o.log10=gt,o.log2=bt,o.max=vt,o.min=mt,o.mod=yt,o.mul=wt,o.pow=_t,o.random=St,o.round=Mt,o.sign=Et,o.sin=At,o.sinh=xt,o.sqrt=It,o.sub=Tt,o.tan=kt,o.tanh=Lt,o.trunc=Nt,void 0===e&&(e={}),e&&!0!==e.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<i.length;)e.hasOwnProperty(r=i[n++])||(e[r]=this[r]);return o.config(e),o}(h)).default=o.Decimal=o,f=new o(f),c=new o(c),void 0===(r=function(){return o}.call(e,n,e,t))||(t.exports=r)}()},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(2),o=n(11),s=n(0),a=n(3),u=a.bytesToHex,f=a.parseBytes,c=a.serializeUIntN,h=n(24).UInt,d=/^[A-F0-9]{16}$/,l=s({inherits:h,statics:{width:8},UInt64:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=void 0===t?"undefined":r(t);if("number"===e)i(t>=0),this._bytes=new Uint8Array(8),this._bytes.set(c(t,4),4);else if(t instanceof o)this._bytes=f(t.toArray("be",8),Uint8Array),this._toBN=t;else{if("string"===e&&!d.test(t))throw new Error(t+" is not a valid UInt64 hex string");this._bytes=f(t,Uint8Array)}i(8===this._bytes.length)},toJSON:function(){return u(this._bytes)},valueOf:function(){return this.toBN()},cached:{toBN:function(){return new o(this._bytes)}},toBytes:function(){return this._bytes}});t.exports={UInt64:l}},function(t,e,n){"use strict";var r=n(0)({inherits:n(36).Hash,statics:{width:32,init:function(){this.ZERO_256=new this(new Uint8Array(this.width))}}});t.exports={Hash256:r}},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(12),o=n(0),s=n(15).Field,a=n(37).BinarySerializer,u=s.ObjectEndMarker,f=o({mixins:n(10).SerializedType,statics:{fromParser:function(t,e){for(var n="number"==typeof e?t.pos()+e:null,r=new this;!t.end(n);){var i=t.readField();if(i===u)break;r[i]=t.readFieldValue(i)}return r},from:function(t){if(t instanceof this)return t;if("object"===(void 0===t?"undefined":r(t)))return i.transform(t,(function(t,e,n){var r=s[n];r?t[r]=r.associatedType.from(e):t[n]=e}),new this);throw new Error(t+" is unsupported")}},fieldKeys:function(){return Object.keys(this).map((function(t){return s[t]})).filter(Boolean)},toJSON:function(){return i.transform(this,(function(t,e,n){t[n]=e&&e.toJSON?e.toJSON():e}),{})},toBytesSink:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},r=new a(t),o=this.fieldKeys(),s=i.sortBy(o,"ordinal");s.filter(n).forEach((function(t){var n=e[t];t.isSerialized&&r.writeFieldAndValue(t,n)}))}});t.exports={STObject:f}},function(t,e,n){"use strict";var r=n(11),i=n(16),o=n(21).HashPrefix,s=n(106).BinaryParser,a=n(37),u=a.BinarySerializer,f=a.BytesList,c=n(3),h=c.bytesToHex,d=c.slice,l=c.parseBytes,p=n(25),b=p.sha512Half,g=p.transactionID,v=function(t){return new s(t)},m=function(t){return t.readType(i.STObject).toJSON()};function y(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.prefix,r=e.suffix,o=e.signingFieldsOnly,s=void 0!==o&&o,a=new f;n&&a.put(n);var u=s?function(t){return t.isSigningField}:void 0;return i.STObject.from(t).toBytesSink(a,u),r&&a.put(r),a.toBytes()}t.exports={BinaryParser:s,BinarySerializer:u,BytesList:f,makeParser:v,serializeObject:y,readJSON:m,bytesToHex:h,parseBytes:l,multiSigningData:function(t,e){return y(t,{prefix:o.transactionMultiSig,suffix:i.AccountID.from(e).toBytes(),signingFieldsOnly:!0})},signingData:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.transactionSig;return y(t,{prefix:e,signingFieldsOnly:!0})},signingClaimData:function(t){var e=o.paymentChannelClaim,n=i.Hash256.from(t.channel).toBytes(),s=new i.UInt64(new r(t.amount)).toBytes(),a=new f;return a.put(e),a.put(n),a.put(s),a.toBytes()},binaryToJSON:function(t){return m(v(t))},sha512Half:b,transactionID:g,slice:d}},function(t,e,n){"use strict";var r=n(2),i=n(0),o=n(16).Hash256,s=n(21).HashPrefix,a=n(25).Sha512Half,u=i({virtuals:{hashPrefix:function(){},isLeaf:function(){},isInner:function(){}},cached:{hash:function(){var t=a.put(this.hashPrefix());return this.toBytesSink(t),t.finish()}}}),f=i({inherits:u,ShaMapLeaf:function(t,e){u.call(this),this.index=t,this.item=e},isLeaf:function(){return!0},isInner:function(){return!1},hashPrefix:function(){return this.item.hashPrefix()},toBytesSink:function(t){this.item.toBytesSink(t),this.index.toBytesSink(t)}}),c=u.prototype,h=i({inherits:u,ShaMapInner:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;u.call(this),this.depth=t,this.slotBits=0,this.branches=Array(16)},isInner:function(){return!0},isLeaf:function(){return!1},hashPrefix:function(){return s.innerNode},setBranch:function(t,e){this.slotBits=this.slotBits|1<<t,this.branches[t]=e},empty:function(){return 0===this.slotBits},hash:function(){return this.empty()?o.ZERO_256:c.hash.call(this)},toBytesSink:function(t){for(var e=0;e<this.branches.length;e++){var n=this.branches[e];(n?n.hash():o.ZERO_256).toBytesSink(t)}},addItem:function(t,e,n){r(t instanceof o);var i=t.nibblet(this.depth),s=this.branches[i];if(s)if(s.isLeaf()){var a=new h(this.depth+1);a.addItem(s.index,null,s),a.addItem(t,e,n),this.setBranch(i,a)}else s.isInner()?s.addItem(t,e,n):r(!1);else this.setBranch(i,n||new f(t,e))}}),d=i({inherits:h});t.exports={ShaMap:d}},function(t,e,n){"use strict";var r=n(7).rotr32;function i(t,e,n){return t&e^~t&n}function o(t,e,n){return t&e^t&n^e&n}function s(t,e,n){return t^e^n}e.ft_1=function(t,e,n,r){return 0===t?i(e,n,r):1===t||3===t?s(e,n,r):2===t?o(e,n,r):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},function(t,e,n){"use strict";var r=n(7),i=n(22),o=n(57),s=n(14),a=r.sum32,u=r.sum32_4,f=r.sum32_5,c=o.ch32,h=o.maj32,d=o.s0_256,l=o.s1_256,p=o.g0_256,b=o.g1_256,g=i.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function m(){if(!(this instanceof m))return new m;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}r.inherits(m,g),t.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=u(b(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],g=this.h[2],v=this.h[3],m=this.h[4],y=this.h[5],w=this.h[6],_=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var S=f(_,l(m),c(m,y,w),this.k[r],n[r]),M=a(d(i),h(i,o,g));_=w,w=y,y=m,m=a(v,S),v=g,g=o,o=i,i=a(S,M)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],v),this.h[4]=a(this.h[4],m),this.h[5]=a(this.h[5],y),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],_)},m.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(t,e,n){"use strict";var r=n(7),i=n(22),o=n(14),s=r.rotr64_hi,a=r.rotr64_lo,u=r.shr64_hi,f=r.shr64_lo,c=r.sum64,h=r.sum64_hi,d=r.sum64_lo,l=r.sum64_4_hi,p=r.sum64_4_lo,b=r.sum64_5_hi,g=r.sum64_5_lo,v=i.BlockHash,m=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function y(){if(!(this instanceof y))return new y;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=m,this.W=new Array(160)}function w(t,e,n,r,i){var o=t&n^~t&i;return o<0&&(o+=4294967296),o}function _(t,e,n,r,i,o){var s=e&r^~e&o;return s<0&&(s+=4294967296),s}function S(t,e,n,r,i){var o=t&n^t&i^n&i;return o<0&&(o+=4294967296),o}function M(t,e,n,r,i,o){var s=e&r^e&o^r&o;return s<0&&(s+=4294967296),s}function E(t,e){var n=s(t,e,28)^s(e,t,2)^s(e,t,7);return n<0&&(n+=4294967296),n}function A(t,e){var n=a(t,e,28)^a(e,t,2)^a(e,t,7);return n<0&&(n+=4294967296),n}function x(t,e){var n=s(t,e,14)^s(t,e,18)^s(e,t,9);return n<0&&(n+=4294967296),n}function I(t,e){var n=a(t,e,14)^a(t,e,18)^a(e,t,9);return n<0&&(n+=4294967296),n}function T(t,e){var n=s(t,e,1)^s(t,e,8)^u(t,e,7);return n<0&&(n+=4294967296),n}function k(t,e){var n=a(t,e,1)^a(t,e,8)^f(t,e,7);return n<0&&(n+=4294967296),n}function L(t,e){var n=s(t,e,19)^s(e,t,29)^u(t,e,6);return n<0&&(n+=4294967296),n}function N(t,e){var n=a(t,e,19)^a(e,t,29)^f(t,e,6);return n<0&&(n+=4294967296),n}r.inherits(y,v),t.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(t,e){for(var n=this.W,r=0;r<32;r++)n[r]=t[e+r];for(;r<n.length;r+=2){var i=L(n[r-4],n[r-3]),o=N(n[r-4],n[r-3]),s=n[r-14],a=n[r-13],u=T(n[r-30],n[r-29]),f=k(n[r-30],n[r-29]),c=n[r-32],h=n[r-31];n[r]=l(i,o,s,a,u,f,c,h),n[r+1]=p(i,o,s,a,u,f,c,h)}},y.prototype._update=function(t,e){this._prepareBlock(t,e);var n=this.W,r=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],u=this.h[4],f=this.h[5],l=this.h[6],p=this.h[7],v=this.h[8],m=this.h[9],y=this.h[10],T=this.h[11],k=this.h[12],L=this.h[13],N=this.h[14],R=this.h[15];o(this.k.length===n.length);for(var O=0;O<n.length;O+=2){var B=N,z=R,P=x(v,m),U=I(v,m),F=w(v,m,y,T,k),j=_(v,m,y,T,k,L),C=this.k[O],D=this.k[O+1],q=n[O],V=n[O+1],H=b(B,z,P,U,F,j,C,D,q,V),W=g(B,z,P,U,F,j,C,D,q,V);B=E(r,i),z=A(r,i),P=S(r,i,s,a,u),U=M(r,i,s,a,u,f);var Z=h(B,z,P,U),Y=d(B,z,P,U);N=k,R=L,k=y,L=T,y=v,T=m,v=h(l,p,H,W),m=d(p,p,H,W),l=u,p=f,u=s,f=a,s=r,a=i,r=h(H,W,Z,Y),i=d(H,W,Z,Y)}c(this.h,0,r,i),c(this.h,2,s,a),c(this.h,4,u,f),c(this.h,6,l,p),c(this.h,8,v,m),c(this.h,10,y,T),c(this.h,12,k,L),c(this.h,14,N,R)},y.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(t,e,n){"use strict";var r=e;r.version=n(117).version,r.utils=n(4),r.rand=n(39),r.curve=n(62),r.curves=n(40),r.ec=n(123),r.eddsa=n(127)},function(t,e,n){"use strict";var r=e;function i(t){return 1===t.length?"0"+t:t}function o(t){for(var e="",n=0;n<t.length;n++)e+=i(t[n].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"!=typeof t){for(var r=0;r<t.length;r++)n[r]=0|t[r];return n}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(r=0;r<t.length;r+=2)n.push(parseInt(t[r]+t[r+1],16))}else for(r=0;r<t.length;r++){var i=t.charCodeAt(r),o=i>>8,s=255&i;o?n.push(o,s):n.push(s)}return n},r.zero2=i,r.toHex=o,r.encode=function(t,e){return"hex"===e?o(t):t}},function(t,e,n){"use strict";var r=e;r.base=n(26),r.short=n(119),r.mont=n(120),r.edwards=n(121)},function(t,e,n){(function(t){const e=n(66),r=n(29),o=n(109),s="badge badge-danger";var a=0;function u(t,e){let n;return n=e?$("<li></li>").appendTo("#log").append(t):$("<li></li>").text(t+" ").appendTo("#log"),n.resolve=function(t){return $("<span></span>").html(t).appendTo(n)},n}function f(t){for(x in t)log=u(x+": "+t[x])}function c(){const n=$("#manifest").val().toUpperCase();try{var c=e.decode(n)}catch(t){return void u("Error decoding manifest").resolve(t).addClass(s)}let d=c.Sequence,l=c.PublicKey,p=new t(l,"hex").toJSON().data,b=r.encodeNodePublic(p),g=c.SigningPubKey,v=new t(g,"hex").toJSON().data,m=r.encodeNodePublic(v);try{var y=function(t){for(var e=t.toString(),n="",r=0;r<e.length;r+=2)n+=String.fromCharCode(parseInt(e.substr(r,2),16));return n}(c.Domain)}catch{return u("Domain not found in manifest").addClass(s),void f({Sequence:d,"Master Public Key":b,"Ephemeral Public Key":m})}f({Sequence:d,Domain:y,"Master Public Key":b,"Ephemeral Public Key":m});let w="[domain-attestation-blob:"+y+":"+b+"]";const _="https://"+y+"/.well-known/xrp-ledger.toml?v="+a++,S=u("Checking "+_+"...");$.ajax({url:_,dataType:"text",success:function(t){S.resolve("FOUND").addClass("badge badge-success"),async function(t,e,n,r){let a,f=u("Parsing TOML data...");try{a=TOML(t),f.resolve("SUCCESS").addClass("badge badge-success")}catch(t){return void f.resolve(t).addClass(s)}console.log(a);let c=a.VALIDATORS;if(c)if(Array.isArray(c)){let t=!1;for(i=0;i<c.length;i++){if(c[i].public_key==n){t=!0;try{var d=c[i].attestation}catch{u("Attestation Not found").addClass(s)}try{var l=o.verify(h(r),d,e)}catch(t){u("Domain Verification Failed").resolve(t).addClass(s)}l?u("Domain Verification Succeeded").addClass("badge badge-success"):u("Domain Verification Failed").addClass(s)}}t||u("The validator key for this manifest was not found in the TOML file").addClass(s)}else u("Validators:").resolve("Wrong type - should be table-array").addClass(s);else u("No Validators Found").resolve("Failure").addClass(s)}(t,l,b,w)},error:function(t,e,n){switch(e){case"timeout":err="TIMEOUT";break;case"abort":err="ABORTED";break;case"error":err="ERROR";break;default:err="UNKNOWN"}S.resolve(err).addClass(s).after('<p>Check if the xrp-ledger.toml file is actually hosted in the /.well-known/ location at the domain in your manifest. Check your server\'s HTTPS settings and certificate, and make sure your server provides the required <a href="xrp-ledger-toml.html#cors-setup">CORS header.</a></p>')}})}function h(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=Number(t.charCodeAt(n)).toString(16);e.push(i)}return e.join("")}function d(t){t.preventDefault(),$(".result-title").show(),$("#result").show(),$("#log").empty(),c()}$(document).ready(()=>{$("#manifest-entry").submit(d)})}).call(this,n(5).Buffer)},function(t,e,n){"use strict";e.byteLength=function(t){var e=f(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=f(t),s=r[0],a=r[1],u=new o(function(t,e,n){return 3*(e+n)/4-n}(0,s,a)),c=0,h=a>0?s-4:s;for(n=0;n<h;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],u[c++]=e>>16&255,u[c++]=e>>8&255,u[c++]=255&e;2===a&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[c++]=255&e);1===a&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(c(t,s,s+16383>a?a:s+16383));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function f(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,n){for(var i,o,s=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,f=u>>1,c=-7,h=n?i-1:0,d=n?-1:1,l=t[e+h];for(h+=d,o=l&(1<<-c)-1,l>>=-c,c+=a;c>0;o=256*o+t[e+h],h+=d,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+t[e+h],h+=d,c-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:1/0*(l?-1:1);s+=Math.pow(2,r),o-=f}return(l?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,f=8*o-i-1,c=(1<<f)-1,h=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=r?0:o-1,p=r?1:-1,b=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?d/u:d*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[n+l]=255&a,l+=p,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;t[n+l]=255&s,l+=p,s/=256,f-=8);t[n+l-p]|=128*b}},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(2),o=n(71),s=o.quality,a=o.binary,u=a.bytesToHex,f=a.signingData,c=a.signingClaimData,h=a.multiSigningData,d=a.binaryToJSON,l=a.serializeObject,p=a.BinaryParser;t.exports={decode:function(t){return i("string"==typeof t,"binary must be a hex string"),d(t)},encode:function(t){return i("object"===(void 0===t?"undefined":r(t))),u(l(t))},encodeForSigning:function(t){return i("object"===(void 0===t?"undefined":r(t))),u(f(t))},encodeForSigningClaim:function(t){return i("object"===(void 0===t?"undefined":r(t))),u(c(t))},encodeForMultisigning:function(t,e){return i("object"===(void 0===t?"undefined":r(t))),i.equal(t.SigningPubKey,""),u(h(t,e))},encodeQuality:function(t){return i("string"==typeof t),u(s.encode(t))},decodeQuality:function(t){return i("string"==typeof t),s.decode(t).toString()},decodeLedgerData:function(t){i("string"==typeof t,"binary must be a hex string");var e=new p(t);return{ledger_index:e.readUInt32(),total_coins:e.readType(o.UInt64).valueOf().toString(),parent_hash:e.readType(o.Hash256).toHex(),transaction_hash:e.readType(o.Hash256).toHex(),account_hash:e.readType(o.Hash256).toHex(),parent_close_time:e.readUInt32(),close_time:e.readUInt32(),close_time_resolution:e.readUInt8(),close_flags:e.readUInt8()}}}},function(t,e,n){"use strict";
|
||
/*
|
||
object-assign
|
||
(c) Sindre Sorhus
|
||
@license MIT
|
||
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function s(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,u=s(t),f=1;f<arguments.length;f++){for(var c in n=Object(arguments[f]))i.call(n,c)&&(u[c]=n[c]);if(r){a=r(n);for(var h=0;h<a.length;h++)o.call(n,a[h])&&(u[a[h]]=n[a[h]])}}return u}},function(t,e,n){(function(t){var r=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++)n[e[r]]=Object.getOwnPropertyDescriptor(t,e[r]);return n},i=/%[sdj%]/g;e.format=function(t){if(!v(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(a(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,o=r.length,s=String(t).replace(i,(function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}})),u=r[n];n<o;u=r[++n])b(u)||!w(u)?s+=" "+u:s+=" "+a(u);return s},e.deprecate=function(n,r){if(void 0!==t&&!0===t.noDeprecation)return n;if(void 0===t)return function(){return e.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(r);t.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var o,s={};function a(t,n){var r={seen:[],stylize:f};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(n)?r.showHidden=n:n&&e._extend(r,n),m(r.showHidden)&&(r.showHidden=!1),m(r.depth)&&(r.depth=2),m(r.colors)&&(r.colors=!1),m(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),c(r,t,r.depth)}function u(t,e){var n=a.styles[e];return n?"["+a.colors[n][0]+"m"+t+"["+a.colors[n][1]+"m":t}function f(t,e){return t}function c(t,n,r){if(t.customInspect&&n&&M(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return v(i)||(i=c(t,i,r)),i}var o=function(t,e){if(m(e))return t.stylize("undefined","undefined");if(v(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(g(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(b(e))return t.stylize("null","null")}(t,n);if(o)return o;var s=Object.keys(n),a=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(n)),S(n)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(n);if(0===s.length){if(M(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(y(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(_(n))return t.stylize(Date.prototype.toString.call(n),"date");if(S(n))return h(n)}var f,w="",E=!1,A=["{","}"];(l(n)&&(E=!0,A=["[","]"]),M(n))&&(w=" [Function"+(n.name?": "+n.name:"")+"]");return y(n)&&(w=" "+RegExp.prototype.toString.call(n)),_(n)&&(w=" "+Date.prototype.toUTCString.call(n)),S(n)&&(w=" "+h(n)),0!==s.length||E&&0!=n.length?r<0?y(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),f=E?function(t,e,n,r,i){for(var o=[],s=0,a=e.length;s<a;++s)T(e,String(s))?o.push(d(t,e,n,r,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(d(t,e,n,r,i,!0))})),o}(t,n,r,a,s):s.map((function(e){return d(t,n,r,a,e,E)})),t.seen.pop(),function(t,e,n){if(t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(f,w,A)):A[0]+w+A[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,n,r,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),T(r,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=b(n)?c(t,u.value,null):c(t,u.value,n-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),m(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function l(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function b(t){return null===t}function g(t){return"number"==typeof t}function v(t){return"string"==typeof t}function m(t){return void 0===t}function y(t){return w(t)&&"[object RegExp]"===E(t)}function w(t){return"object"==typeof t&&null!==t}function _(t){return w(t)&&"[object Date]"===E(t)}function S(t){return w(t)&&("[object Error]"===E(t)||t instanceof Error)}function M(t){return"function"==typeof t}function E(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(m(o)&&(o=t.env.NODE_DEBUG||""),n=n.toUpperCase(),!s[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=t.pid;s[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else s[n]=function(){};return s[n]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=l,e.isBoolean=p,e.isNull=b,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=v,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=m,e.isRegExp=y,e.isObject=w,e.isDate=_,e.isError=S,e.isFunction=M,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(69);var x=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(){var t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":");return[t.getDate(),x[t.getMonth()],e].join(" ")}function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",I(),e.format.apply(e,arguments))},e.inherits=n(70),e._extend=function(t,e){if(!e||!w(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var k="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function L(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(k&&t[k]){var e;if("function"!=typeof(e=t[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,k,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise((function(t,r){e=t,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,r){t?n(t):e(r)}));try{t.apply(this,i)}catch(t){n(t)}return r}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),k&&Object.defineProperty(e,k,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,r(t))},e.promisify.custom=k,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};e.apply(this,n).then((function(e){t.nextTick(s,null,e)}),(function(e){t.nextTick(L,e,s)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,r(e)),n}}).call(this,n(19))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){"use strict";var r=n(12),i=n(15),o=i.Field,s=n(16),a=n(55),u=n(56).ShaMap,f=n(107),c=n(25),h=n(108),d=n(21).HashPrefix;t.exports=r.assign({hashes:r.assign({},c,f),binary:a,enums:i,quality:h,Field:o,HashPrefix:d,ShaMap:u},s)},function(t){t.exports=JSON.parse('{"TYPES":{"Validation":10003,"Done":-1,"Hash128":4,"Blob":7,"AccountID":8,"Amount":6,"Hash256":5,"UInt8":16,"Vector256":19,"STObject":14,"Unknown":-2,"Transaction":10001,"Hash160":17,"PathSet":18,"LedgerEntry":10002,"UInt16":1,"NotPresent":0,"UInt64":3,"UInt32":2,"STArray":15},"LEDGER_ENTRY_TYPES":{"Any":-3,"Child":-2,"Invalid":-1,"AccountRoot":97,"DirectoryNode":100,"RippleState":114,"Ticket":84,"SignerList":83,"Offer":111,"LedgerHashes":104,"Amendments":102,"FeeSettings":115,"Escrow":117,"PayChannel":120,"DepositPreauth":112,"Check":67,"Nickname":110,"Contract":99,"GeneratorMap":103},"FIELDS":[["Generic",{"nth":0,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Unknown"}],["Invalid",{"nth":-1,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Unknown"}],["LedgerEntryType",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["TransactionType",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["SignerWeight",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt16"}],["Flags",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SourceTag",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Sequence",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["PreviousTxnLgrSeq",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LedgerSequence",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["CloseTime",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ParentCloseTime",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SigningTime",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Expiration",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TransferRate",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["WalletSize",{"nth":12,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OwnerCount",{"nth":13,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["DestinationTag",{"nth":14,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HighQualityIn",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["HighQualityOut",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LowQualityIn",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LowQualityOut",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["QualityIn",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["QualityOut",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["StampEscrow",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["BondAmount",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LoadFee",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OfferSequence",{"nth":25,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FirstLedgerSequence",{"nth":26,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["LastLedgerSequence",{"nth":27,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["TransactionIndex",{"nth":28,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["OperationLimit",{"nth":29,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReferenceFeeUnits",{"nth":30,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReserveBase",{"nth":31,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ReserveIncrement",{"nth":32,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SetFlag",{"nth":33,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["ClearFlag",{"nth":34,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SignerQuorum",{"nth":35,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["CancelAfter",{"nth":36,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["FinishAfter",{"nth":37,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["IndexNext",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["IndexPrevious",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["BookNode",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["OwnerNode",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["BaseFee",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["ExchangeRate",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["LowNode",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["HighNode",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}],["EmailHash",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash128"}],["LedgerHash",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ParentHash",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["TransactionHash",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AccountHash",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["PreviousTxnID",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["LedgerIndex",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["WalletLocator",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["RootIndex",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["AccountTxnID",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["BookDirectory",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["InvoiceID",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Nickname",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Amendment",{"nth":19,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["TicketID",{"nth":20,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["Digest",{"nth":21,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["hash",{"nth":257,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Hash256"}],["index",{"nth":258,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Hash256"}],["Amount",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Balance",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LimitAmount",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["TakerPays",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["TakerGets",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["LowLimit",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["HighLimit",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["Fee",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["SendMax",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["DeliverMin",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["MinimumOffer",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["RippleEscrow",{"nth":17,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["DeliveredAmount",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Amount"}],["taker_gets_funded",{"nth":258,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Amount"}],["taker_pays_funded",{"nth":259,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Amount"}],["PublicKey",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MessageKey",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["SigningPubKey",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["TxnSignature",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["Generator",{"nth":5,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Signature",{"nth":6,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["Domain",{"nth":7,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["FundCode",{"nth":8,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["RemoveCode",{"nth":9,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["ExpireCode",{"nth":10,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["CreateCode",{"nth":11,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoType",{"nth":12,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoData",{"nth":13,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MemoFormat",{"nth":14,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Fulfillment",{"nth":16,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["Condition",{"nth":17,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Blob"}],["MasterSignature",{"nth":18,"isVLEncoded":true,"isSerialized":true,"isSigningField":false,"type":"Blob"}],["Account",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Owner",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Destination",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Issuer",{"nth":4,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Authorize",{"nth":5,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Unauthorize",{"nth":6,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["Target",{"nth":7,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["RegularKey",{"nth":8,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"AccountID"}],["ObjectEndMarker",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["TransactionMetaData",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["CreatedNode",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["DeletedNode",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["ModifiedNode",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["PreviousFields",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["FinalFields",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["NewFields",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["TemplateEntry",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Memo",{"nth":10,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["SignerEntry",{"nth":11,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Signer",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["Majority",{"nth":18,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STObject"}],["ArrayEndMarker",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Signers",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":false,"type":"STArray"}],["SignerEntries",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Template",{"nth":5,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Necessary",{"nth":6,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Sufficient",{"nth":7,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["AffectedNodes",{"nth":8,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Memos",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["Majorities",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"STArray"}],["CloseResolution",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["Method",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["TransactionResult",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["TakerPaysCurrency",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerPaysIssuer",{"nth":2,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerGetsCurrency",{"nth":3,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["TakerGetsIssuer",{"nth":4,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash160"}],["Paths",{"nth":1,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"PathSet"}],["Indexes",{"nth":1,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Hashes",{"nth":2,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Amendments",{"nth":3,"isVLEncoded":true,"isSerialized":true,"isSigningField":true,"type":"Vector256"}],["Transaction",{"nth":1,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Transaction"}],["LedgerEntry",{"nth":1,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"LedgerEntry"}],["Validation",{"nth":1,"isVLEncoded":false,"isSerialized":false,"isSigningField":false,"type":"Validation"}],["SignerListID",{"nth":38,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["SettleDelay",{"nth":39,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt32"}],["Channel",{"nth":22,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["ConsensusHash",{"nth":23,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["CheckID",{"nth":24,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"Hash256"}],["TickSize",{"nth":16,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt8"}],["DestinationNode",{"nth":9,"isVLEncoded":false,"isSerialized":true,"isSigningField":true,"type":"UInt64"}]],"TRANSACTION_RESULTS":{"telLOCAL_ERROR":-399,"telBAD_DOMAIN":-398,"telBAD_PATH_COUNT":-397,"telBAD_PUBLIC_KEY":-396,"telFAILED_PROCESSING":-395,"telINSUF_FEE_P":-394,"telNO_DST_PARTIAL":-393,"telCAN_NOT_QUEUE":-392,"telCAN_NOT_QUEUE_BALANCE":-391,"telCAN_NOT_QUEUE_BLOCKS":-390,"telCAN_NOT_QUEUE_BLOCKED":-389,"telCAN_NOT_QUEUE_FEE":-388,"telCAN_NOT_QUEUE_FULL":-387,"temMALFORMED":-299,"temBAD_AMOUNT":-298,"temBAD_CURRENCY":-297,"temBAD_EXPIRATION":-296,"temBAD_FEE":-295,"temBAD_ISSUER":-294,"temBAD_LIMIT":-293,"temBAD_OFFER":-292,"temBAD_PATH":-291,"temBAD_PATH_LOOP":-290,"temBAD_REGKEY":-289,"temBAD_SEND_XRP_LIMIT":-288,"temBAD_SEND_XRP_MAX":-287,"temBAD_SEND_XRP_NO_DIRECT":-286,"temBAD_SEND_XRP_PARTIAL":-285,"temBAD_SEND_XRP_PATHS":-284,"temBAD_SEQUENCE":-283,"temBAD_SIGNATURE":-282,"temBAD_SRC_ACCOUNT":-281,"temBAD_TRANSFER_RATE":-280,"temDST_IS_SRC":-279,"temDST_NEEDED":-278,"temINVALID":-277,"temINVALID_FLAG":-276,"temREDUNDANT":-275,"temRIPPLE_EMPTY":-274,"temDISABLED":-273,"temBAD_SIGNER":-272,"temBAD_QUORUM":-271,"temBAD_WEIGHT":-270,"temBAD_TICK_SIZE":-269,"temINVALID_ACCOUNT_ID":-268,"temCANNOT_PREAUTH_SELF":-267,"temUNCERTAIN":-266,"temUNKNOWN":-265,"tefFAILURE":-199,"tefALREADY":-198,"tefBAD_ADD_AUTH":-197,"tefBAD_AUTH":-196,"tefBAD_LEDGER":-195,"tefCREATED":-194,"tefEXCEPTION":-193,"tefINTERNAL":-192,"tefNO_AUTH_REQUIRED":-191,"tefPAST_SEQ":-190,"tefWRONG_PRIOR":-189,"tefMASTER_DISABLED":-188,"tefMAX_LEDGER":-187,"tefBAD_SIGNATURE":-186,"tefBAD_QUORUM":-185,"tefNOT_MULTI_SIGNING":-184,"tefBAD_AUTH_MASTER":-183,"tefINVARIANT_FAILED":-182,"tefTOO_BIG":-181,"terRETRY":-99,"terFUNDS_SPENT":-98,"terINSUF_FEE_B":-97,"terNO_ACCOUNT":-96,"terNO_AUTH":-95,"terNO_LINE":-94,"terOWNERS":-93,"terPRE_SEQ":-92,"terLAST":-91,"terNO_RIPPLE":-90,"terQUEUED":-89,"tesSUCCESS":0,"tecCLAIM":100,"tecPATH_PARTIAL":101,"tecUNFUNDED_ADD":102,"tecUNFUNDED_OFFER":103,"tecUNFUNDED_PAYMENT":104,"tecFAILED_PROCESSING":105,"tecDIR_FULL":121,"tecINSUF_RESERVE_LINE":122,"tecINSUF_RESERVE_OFFER":123,"tecNO_DST":124,"tecNO_DST_INSUF_XRP":125,"tecNO_LINE_INSUF_RESERVE":126,"tecNO_LINE_REDUNDANT":127,"tecPATH_DRY":128,"tecUNFUNDED":129,"tecNO_ALTERNATIVE_KEY":130,"tecNO_REGULAR_KEY":131,"tecOWNERS":132,"tecNO_ISSUER":133,"tecNO_AUTH":134,"tecNO_LINE":135,"tecINSUFF_FEE":136,"tecFROZEN":137,"tecNO_TARGET":138,"tecNO_PERMISSION":139,"tecNO_ENTRY":140,"tecINSUFFICIENT_RESERVE":141,"tecNEED_MASTER_KEY":142,"tecDST_TAG_NEEDED":143,"tecINTERNAL":144,"tecOVERSIZE":145,"tecCRYPTOCONDITION_ERROR":146,"tecINVARIANT_FAILED":147,"tecEXPIRED":148,"tecDUPLICATE":149,"tecKILLED":150,"tecHAS_OBLIGATIONS":151,"tecTOO_SOON":152},"TRANSACTION_TYPES":{"Invalid":-1,"Payment":0,"EscrowCreate":1,"EscrowFinish":2,"AccountSet":3,"EscrowCancel":4,"SetRegularKey":5,"NickNameSet":6,"OfferCreate":7,"OfferCancel":8,"Contract":9,"TicketCreate":10,"TicketCancel":11,"SignerListSet":12,"PaymentChannelCreate":13,"PaymentChannelFund":14,"PaymentChannelClaim":15,"CheckCreate":16,"CheckCash":17,"CheckCancel":18,"DepositPreauth":19,"TrustSet":20,"AccountDelete":21,"EnableAmendment":100,"SetFee":101}}')},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});const r=n(74),i=n(75);const o=n(42),s=[1,225,75],a=new class{constructor(t){this.sha256=t.sha256,this.alphabet=t.alphabet,this.codec=r(this.alphabet),this.base=this.alphabet.length}encode(t,e){const n=e.versions;return this.encodeVersioned(t,n,e.expectedLength)}encodeVersioned(e,n,r){if(r&&e.length!==r)throw new Error("unexpected_payload_length: bytes.length does not match expectedLength. Ensure that the bytes are a Buffer.");return this.encodeChecked(t.from(i.concatArgs(n,e)))}encodeChecked(e){const n=this.sha256(this.sha256(e)).slice(0,4);return this.encodeRaw(t.from(i.concatArgs(e,n)))}encodeRaw(t){return this.codec.encode(t)}decode(t,e){const n=e.versions,r=e.versionTypes,o=this.decodeChecked(t);if(n.length>1&&!e.expectedLength)throw new Error("expectedLength is required because there are >= 2 possible versions");const s="number"==typeof n[0]?1:n[0].length,a=e.expectedLength||o.length-s,u=o.slice(0,-a),f=o.slice(-a);for(let t=0;t<n.length;t++){const e=Array.isArray(n[t])?n[t]:[n[t]];if(i.seqEqual(u,e))return{version:e,bytes:f,type:r?r[t]:null}}throw new Error("version_invalid: version bytes do not match any of the provided version(s)")}decodeChecked(t){const e=this.decodeRaw(t);if(e.length<5)throw new Error("invalid_input_size: decoded data must have length >= 5");if(!this.verifyCheckSum(e))throw new Error("checksum_invalid");return e.slice(0,-4)}decodeRaw(t){return this.codec.decode(t)}verifyCheckSum(t){const e=this.sha256(this.sha256(t.slice(0,-4))).slice(0,4),n=t.slice(-4);return i.seqEqual(e,n)}}({sha256:function(e){return o("sha256").update(t.from(e)).digest()},alphabet:"rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"});function u(t){const e={versions:[0],expectedLength:20};return a.encode(t,e)}function f(t){const e={versions:[0],expectedLength:20};return a.decode(t,e).bytes}e.codec=a,e.encodeSeed=function(t,e){if(16!==t.length)throw new Error("entropy must have length 16");const n={expectedLength:16,versions:"ed25519"===e?s:[33]};return a.encode(t,n)},e.decodeSeed=function(t,e={versionTypes:["ed25519","secp256k1"],versions:[s,33],expectedLength:16}){return a.decode(t,e)},e.encodeAccountID=u,e.encodeAddress=u,e.decodeAccountID=f,e.decodeAddress=f,e.decodeNodePublic=function(t){const e={versions:[28],expectedLength:33};return a.decode(t,e).bytes},e.encodeNodePublic=function(t){const e={versions:[28],expectedLength:33};return a.encode(t,e)},e.encodeAccountPublic=function(t){const e={versions:[35],expectedLength:33};return a.encode(t,e)},e.decodeAccountPublic=function(t){const e={versions:[35],expectedLength:33};return a.decode(t,e).bytes},e.isValidClassicAddress=function(t){try{f(t)}catch(t){return!1}return!0}}).call(this,n(5).Buffer)},function(t,e,n){"use strict";var r=n(6).Buffer;t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");var e=new Uint8Array(256);e.fill(255);for(var n=0;n<t.length;n++){var i=t.charAt(n),o=i.charCodeAt(0);if(255!==e[o])throw new TypeError(i+" is ambiguous");e[o]=n}var s=t.length,a=t.charAt(0),u=Math.log(s)/Math.log(256),f=Math.log(256)/Math.log(s);function c(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return r.alloc(0);var n=0;if(" "!==t[n]){for(var i=0,o=0;t[n]===a;)i++,n++;for(var f=(t.length-n)*u+1>>>0,c=new Uint8Array(f);t[n];){var h=e[t.charCodeAt(n)];if(255===h)return;for(var d=0,l=f-1;(0!==h||d<o)&&-1!==l;l--,d++)h+=s*c[l]>>>0,c[l]=h%256>>>0,h=h/256>>>0;if(0!==h)throw new Error("Non-zero carry");o=d,n++}if(" "!==t[n]){for(var p=f-o;p!==f&&0===c[p];)p++;var b=r.allocUnsafe(i+(f-p));b.fill(0,0,i);for(var g=i;p!==f;)b[g++]=c[p++];return b}}}return{encode:function(e){if(!r.isBuffer(e))throw new TypeError("Expected Buffer");if(0===e.length)return"";for(var n=0,i=0,o=0,u=e.length;o!==u&&0===e[o];)o++,n++;for(var c=(u-o)*f+1>>>0,h=new Uint8Array(c);o!==u;){for(var d=e[o],l=0,p=c-1;(0!==d||l<i)&&-1!==p;p--,l++)d+=256*h[p]>>>0,h[p]=d%s>>>0,d=d/s>>>0;if(0!==d)throw new Error("Non-zero carry");i=l,o++}for(var b=c-i;b!==c&&0===h[b];)b++;for(var g=a.repeat(n);b<c;++b)g+=t.charAt(h[b]);return g},decodeUnsafe:c,decode:function(t){var e=c(t);if(e)return e;throw new Error("Non-base"+s+" character")}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.seqEqual=function(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0},e.concatArgs=function(...t){const e=[];return t.forEach((function(t){if(void 0!==t.length)for(let n=0;n<t.length;n++)e.push(t[n]);else e.push(t)})),e}},function(t,e,n){"use strict";var r=n(1),i=n(43),o=n(6).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<<e|t>>>32-e}function f(t,e,n,r,i,o,s){return u(t+(e&n|~e&r)+i+o|0,s)+e|0}function c(t,e,n,r,i,o,s){return u(t+(e&r|n&~r)+i+o|0,s)+e|0}function h(t,e,n,r,i,o,s){return u(t+(e^n^r)+i+o|0,s)+e|0}function d(t,e,n,r,i,o,s){return u(t+(n^(e|~r))+i+o|0,s)+e|0}r(a,i),a.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var n=this._a,r=this._b,i=this._c,o=this._d;n=f(n,r,i,o,t[0],3614090360,7),o=f(o,n,r,i,t[1],3905402710,12),i=f(i,o,n,r,t[2],606105819,17),r=f(r,i,o,n,t[3],3250441966,22),n=f(n,r,i,o,t[4],4118548399,7),o=f(o,n,r,i,t[5],1200080426,12),i=f(i,o,n,r,t[6],2821735955,17),r=f(r,i,o,n,t[7],4249261313,22),n=f(n,r,i,o,t[8],1770035416,7),o=f(o,n,r,i,t[9],2336552879,12),i=f(i,o,n,r,t[10],4294925233,17),r=f(r,i,o,n,t[11],2304563134,22),n=f(n,r,i,o,t[12],1804603682,7),o=f(o,n,r,i,t[13],4254626195,12),i=f(i,o,n,r,t[14],2792965006,17),n=c(n,r=f(r,i,o,n,t[15],1236535329,22),i,o,t[1],4129170786,5),o=c(o,n,r,i,t[6],3225465664,9),i=c(i,o,n,r,t[11],643717713,14),r=c(r,i,o,n,t[0],3921069994,20),n=c(n,r,i,o,t[5],3593408605,5),o=c(o,n,r,i,t[10],38016083,9),i=c(i,o,n,r,t[15],3634488961,14),r=c(r,i,o,n,t[4],3889429448,20),n=c(n,r,i,o,t[9],568446438,5),o=c(o,n,r,i,t[14],3275163606,9),i=c(i,o,n,r,t[3],4107603335,14),r=c(r,i,o,n,t[8],1163531501,20),n=c(n,r,i,o,t[13],2850285829,5),o=c(o,n,r,i,t[2],4243563512,9),i=c(i,o,n,r,t[7],1735328473,14),n=h(n,r=c(r,i,o,n,t[12],2368359562,20),i,o,t[5],4294588738,4),o=h(o,n,r,i,t[8],2272392833,11),i=h(i,o,n,r,t[11],1839030562,16),r=h(r,i,o,n,t[14],4259657740,23),n=h(n,r,i,o,t[1],2763975236,4),o=h(o,n,r,i,t[4],1272893353,11),i=h(i,o,n,r,t[7],4139469664,16),r=h(r,i,o,n,t[10],3200236656,23),n=h(n,r,i,o,t[13],681279174,4),o=h(o,n,r,i,t[0],3936430074,11),i=h(i,o,n,r,t[3],3572445317,16),r=h(r,i,o,n,t[6],76029189,23),n=h(n,r,i,o,t[9],3654602809,4),o=h(o,n,r,i,t[12],3873151461,11),i=h(i,o,n,r,t[15],530742520,16),n=d(n,r=h(r,i,o,n,t[2],3299628645,23),i,o,t[0],4096336452,6),o=d(o,n,r,i,t[7],1126891415,10),i=d(i,o,n,r,t[14],2878612391,15),r=d(r,i,o,n,t[5],4237533241,21),n=d(n,r,i,o,t[12],1700485571,6),o=d(o,n,r,i,t[3],2399980690,10),i=d(i,o,n,r,t[10],4293915773,15),r=d(r,i,o,n,t[1],2240044497,21),n=d(n,r,i,o,t[8],1873313359,6),o=d(o,n,r,i,t[15],4264355552,10),i=d(i,o,n,r,t[6],2734768916,15),r=d(r,i,o,n,t[13],1309151649,21),n=d(n,r,i,o,t[4],4149444226,6),o=d(o,n,r,i,t[11],3174756917,10),i=d(i,o,n,r,t[2],718787259,15),r=d(r,i,o,n,t[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=a},function(t,e){},function(t,e,n){"use strict";var r=n(32).Buffer,i=n(79);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var e,n,i,o=r.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,n=o,i=a,e.copy(n,i),a+=s.data.length,s=s.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,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))},n(81),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(9))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,s,a,u=1,f={},c=!1,h=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},r=function(t){o.port2.postMessage(t)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,r=function(t){var e=h.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(p,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&p(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),r=function(e){t.postMessage(s+e,"*")}),d.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return f[u]=i,r(u),u++},d.clearImmediate=l}function l(t){delete f[t]}function p(t){if(c)setTimeout(p,0,t);else{var e=f[t];if(e){c=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{l(t),c=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(9),n(19))},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,n(9))},function(t,e,n){var r=n(5),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=s),o(i,s),s.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){"use strict";t.exports=o;var r=n(48),i=Object.create(n(20));function o(t){if(!(this instanceof o))return new o(t);r.call(this,t)}i.inherits=n(1),i.inherits(o,r),o.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){t.exports=n(33)},function(t,e,n){t.exports=n(13)},function(t,e,n){t.exports=n(31).Transform},function(t,e,n){t.exports=n(31).PassThrough},function(t,e,n){"use strict";var r=n(5).Buffer,i=n(1),o=n(43),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],c=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function l(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<<e|t>>>32-e}function b(t,e,n,r,i,o,s,a){return p(t+(e^n^r)+o+s|0,a)+i|0}function g(t,e,n,r,i,o,s,a){return p(t+(e&n|~e&r)+o+s|0,a)+i|0}function v(t,e,n,r,i,o,s,a){return p(t+((e|~n)^r)+o+s|0,a)+i|0}function m(t,e,n,r,i,o,s,a){return p(t+(e&r|n&~r)+o+s|0,a)+i|0}function y(t,e,n,r,i,o,s,a){return p(t+(e^(n|~r))+o+s|0,a)+i|0}i(l,o),l.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,l=0|this._e,w=0|this._a,_=0|this._b,S=0|this._c,M=0|this._d,E=0|this._e,A=0;A<80;A+=1){var x,I;A<16?(x=b(n,r,i,o,l,t[a[A]],h[0],f[A]),I=y(w,_,S,M,E,t[u[A]],d[0],c[A])):A<32?(x=g(n,r,i,o,l,t[a[A]],h[1],f[A]),I=m(w,_,S,M,E,t[u[A]],d[1],c[A])):A<48?(x=v(n,r,i,o,l,t[a[A]],h[2],f[A]),I=v(w,_,S,M,E,t[u[A]],d[2],c[A])):A<64?(x=m(n,r,i,o,l,t[a[A]],h[3],f[A]),I=g(w,_,S,M,E,t[u[A]],d[3],c[A])):(x=y(n,r,i,o,l,t[a[A]],h[4],f[A]),I=b(w,_,S,M,E,t[u[A]],d[4],c[A])),n=l,l=o,o=p(i,10),i=r,r=x,w=E,E=M,M=p(S,10),S=_,_=I}var T=this._b+i+M|0;this._b=this._c+o+E|0,this._c=this._d+l+w|0,this._d=this._e+n+_|0,this._e=this._a+r+S|0,this._a=T},l.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=r.alloc?r.alloc(20):new r(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=l},function(t,e,n){(e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n}).sha=n(91),e.sha1=n(92),e.sha224=n(93),e.sha256=n(49),e.sha384=n(94),e.sha512=n(50)},function(t,e,n){var r=n(1),i=n(17),o=n(6).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(t){return t<<30|t>>>2}function c(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,h=0;h<16;++h)n[h]=t.readInt32BE(4*h);for(;h<80;++h)n[h]=n[h-3]^n[h-8]^n[h-14]^n[h-16];for(var d=0;d<80;++d){var l=~~(d/20),p=0|((e=r)<<5|e>>>27)+c(l,i,o,a)+u+n[d]+s[l];u=a,a=o,o=f(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,n){var r=n(1),i=n(17),o=n(6).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function f(t){return t<<5|t>>>27}function c(t){return t<<30|t>>>2}function h(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,d=0;d<16;++d)n[d]=t.readInt32BE(4*d);for(;d<80;++d)n[d]=(e=n[d-3]^n[d-8]^n[d-14]^n[d-16])<<1|e>>>31;for(var l=0;l<80;++l){var p=~~(l/20),b=f(r)+h(p,i,o,a)+u+n[l]+s[p]|0;u=a,a=o,o=c(i),i=r,r=b}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},function(t,e,n){var r=n(1),i=n(49),o=n(17),s=n(6).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}r(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},function(t,e,n){var r=n(1),i=n(50),o=n(17),s=n(6).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}r(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},function(t,e,n){var r=n(6).Buffer,i=n(44).Transform,o=n(34).StringDecoder;function s(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(1)(s,i),s.prototype.update=function(t,e,n){"string"==typeof t&&(t=r.from(t,e));var i=this._update(t);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(t,e,n){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){r=t}finally{n(r)}},s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||r.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.prototype._toString=function(t,e,n){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return n&&(r+=this._decoder.end()),r},t.exports=s},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var i=n(12),o=n(2),s=n(11),a=n(51),u=n(0),f=n(10).SerializedType,c=n(3).bytesToHex,h=n(38).Currency,d=n(28).AccountID,l=n(52).UInt64,p=new a("9999999999999999e80"),b=new a("1000000000000000e-96"),g=new a("1e6"),v=new a("1e17"),m=new a("1e-6"),y=v.dividedBy(g);a.config({toExpPos:96,toExpNeg:-112});var w="\nNative values must be described in drops, a million of which equal one XRP.\nThis must be an integer number, with the absolute value not exceeding "+v+"\n\nIOU values must have a maximum precision of 16 significant digits. They are serialized as\na canonicalised mantissa and exponent.\n\nThe valid range for a mantissa is between 1000000000000000 and 9999999999999999\nThe exponent must be >= "+-96+" and <= 80\n\nThus the largest serializable IOU value is:\n"+p.toString()+"\n\nAnd the smallest:\n"+b.toString()+"\n";function _(t){return!i.isUndefined(t)}function S(t){throw new Error(t.toString()+" is an illegal amount\n"+w)}var M={string:function(t){return t.match(/^\d+$/)||S(t),[new a(t).dividedBy(g),h.XRP]},object:function(t){return o(_(t.currency),"currency must be defined"),o(_(t.issuer),"issuer must be defined"),[new a(t.value),h.from(t.currency),d.from(t.issuer)]}},E=u({Amount:function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this.value=t||new a("0"),this.currency=e||h.XRP,this.issuer=n||null,r&&this.assertValueIsValid()},mixins:f,statics:{from:function(t){if(t instanceof this)return t;var e=M[void 0===t?"undefined":r(t)];if(e)return new(Function.prototype.bind.apply(this,[null].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(e(t)))));throw new Error("unsupported value: "+t)},fromParser:function(t){var e=t.read(8),n=e[0],r=e[1],i=64&n?"":"-";if(128&n){e[0]=0;var o=t.readType(h),s=t.readType(d),u=((63&n)<<2)+((255&r)>>6)-97;return e[1]&=63,new this(new a(i+"0x"+c(e)).times("1e"+u),o,s,!1)}return e[0]&=63,new this(new a(i+"0x"+c(e)).dividedBy(g),h.XRP,null,!1)}},assertValueIsValid:function(){if(!this.isZero())if(this.isNative()){var t=this.value.abs();(t.lt(m)||t.gt(y))&&S(this.value.times(g)),this.verifyNoDecimal(this.value)}else{var e=this.value.precision(),n=this.exponent();(e>16||n>80||n<-96)&&S(this.value)}},isNative:function(){return this.currency.isNative()},mantissa:function(){var t=this.verifyNoDecimal();return new l(new s(t))},verifyNoDecimal:function(){var t=this.value.times("1e"+-this.exponent()).abs().toString();return-1!==t.indexOf(".")&&S(t),t},isZero:function(){return this.value.isZero()},exponent:function(){return this.isNative()?-6:this.value.e-15},valueString:function(){return(this.isNative()?this.value.times(g):this.value).toString()},toBytesSink:function(t){var e=this.isNative(),n=!this.value.isNegative(),r=this.mantissa().toBytes();if(e)r[0]|=n?64:0,t.put(r);else{if(r[0]|=128,!this.isZero()){n&&(r[0]|=64);var i=97+(this.value.e-15);r[0]|=i>>>2,r[1]|=(3&i)<<6}t.put(r),this.currency.toBytesSink(t),this.issuer.toBytesSink(t)}},toJSON:function(){var t=this.valueString();return this.isNative()?t:{value:t,currency:this.currency.toJSON(),issuer:this.issuer.toJSON()}}});t.exports={Amount:E}},function(t,e){},function(t,e,n){"use strict";var r=n(0),i=n(3).parseBytes,o=r({mixins:n(10).SerializedType,Blob:function(t){this._bytes=t?i(t,Uint8Array):new Uint8Array(0)},statics:{fromParser:function(t,e){return new this(t.read(e))},from:function(t){return t instanceof this?t:new this(t)}}});t.exports={Blob:o}},function(t,e,n){"use strict";var r=n(0)({inherits:n(36).Hash,statics:{width:16}});t.exports={Hash128:r}},function(t,e,n){"use strict";var r=n(0),i=n(10),o=i.SerializedType,s=i.ensureArrayLikeIs,a=n(38).Currency,u=n(28).AccountID,f=r({statics:{from:function(t){if(t instanceof this)return t;var e=new f;return t.issuer&&(e.issuer=u.from(t.issuer)),t.account&&(e.account=u.from(t.account)),t.currency&&(e.currency=a.from(t.currency)),e},parse:function(t,e){var n=new f;return 1&e&&(n.account=u.fromParser(t)),16&e&&(n.currency=a.fromParser(t)),32&e&&(n.issuer=u.fromParser(t)),n}},toJSON:function(){var t=this.type(),e={};return 1&t&&(e.account=this.account.toJSON()),32&t&&(e.issuer=this.issuer.toJSON()),16&t&&(e.currency=this.currency.toJSON()),e},type:function(){var t=0;return this.issuer&&(t+=32),this.account&&(t+=1),this.currency&&(t+=16),t}}),c=r({inherits:Array,statics:{from:function(t){return s(c,t).withChildren(f)}},toJSON:function(){return this.map((function(t){return t.toJSON()}))}}),h=r({mixins:o,inherits:Array,statics:{from:function(t){return s(h,t).withChildren(c)},fromParser:function(t){for(var e=new this,n=void 0;!t.end();){var r=t.readUInt8();if(0===r)break;255!==r?(n||(n=new c,e.push(n)),n.push(f.parse(t,r))):n=null}return e}},toJSON:function(){return this.map((function(t){return t.toJSON()}))},toBytesSink:function(t){var e=0;this.forEach((function(n){0!=e++&&t.put([255]),n.forEach((function(e){t.put([e.type()]),e.account&&e.account.toBytesSink(t),e.currency&&e.currency.toBytesSink(t),e.issuer&&e.issuer.toBytesSink(t)}))})),t.put([0])}});t.exports={PathSet:h}},function(t,e,n){"use strict";var r=n(0),i=n(10),o=i.ensureArrayLikeIs,s=i.SerializedType,a=n(15).Field,u=n(54).STObject,f=a.ArrayEndMarker,c=r({mixins:s,inherits:Array,statics:{fromParser:function(t){for(var e=new c;!t.end();){var n=t.readField();if(n===f)break;var r=new u;r[n]=t.readFieldValue(n),e.push(r)}return e},from:function(t){return o(c,t).withChildren(u)}},toJSON:function(){return this.map((function(t){return t.toJSON()}))},toBytesSink:function(t){this.forEach((function(e){return e.toBytesSink(t)}))}});t.exports={STArray:c}},function(t,e,n){"use strict";var r=n(0)({inherits:n(24).UInt,statics:{width:2}});t.exports={UInt16:r}},function(t,e,n){"use strict";var r=n(0)({inherits:n(24).UInt,statics:{width:4}});t.exports={UInt32:r}},function(t,e,n){"use strict";var r=n(0)({inherits:n(24).UInt,statics:{width:1}});t.exports={UInt8:r}},function(t,e,n){"use strict";var r=n(0),i=n(53).Hash256,o=n(10),s=o.ensureArrayLikeIs,a=r({mixins:o.SerializedType,inherits:Array,statics:{fromParser:function(t,e){for(var n=new this,r=(null!==e?e:t.size()-t.pos())/32,o=0;o<r;o++)n.push(i.fromParser(t));return n},from:function(t){return s(a,t).withChildren(i)}},toBytesSink:function(t){this.forEach((function(e){return e.toBytesSink(t)}))},toJSON:function(){return this.map((function(t){return t.toJSON()}))}});t.exports={Vector256:a}},function(t,e,n){"use strict";var r=n(2),i=n(0),o=n(15).Field,s=n(3),a=s.slice,u=s.parseBytes,f=i({BinaryParser:function(t){this._buf=u(t,Uint8Array),this._length=this._buf.length,this._cursor=0},skip:function(t){this._cursor+=t},read:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uint8Array,n=this._cursor,i=this._cursor+t;return r(i<=this._buf.length),this._cursor=i,a(this._buf,n,i,e)},readUIntN:function(t){return this.read(t,Array).reduce((function(t,e){return t<<8|e}))>>>0},readUInt8:function(){return this._buf[this._cursor++]},readUInt16:function(){return this.readUIntN(2)},readUInt32:function(){return this.readUIntN(4)},pos:function(){return this._cursor},size:function(){return this._buf.length},end:function(t){var e=this.pos();return e>=this._length||null!==t&&e>=t},readVL:function(){return this.read(this.readVLLength())},readVLLength:function(){var t=this.readUInt8();if(t<=192)return t;if(t<=240)return 193+256*(t-193)+this.readUInt8();if(t<=254)return 12481+65536*(t-241)+256*this.readUInt8()+this.readUInt8();throw new Error("Invalid varint length indicator")},readFieldOrdinal:function(){var t=this.readUInt8();return((240&t)>>>4||this.readUInt8())<<16|(15&t||this.readUInt8())},readField:function(){return o.from(this.readFieldOrdinal())},readType:function(t){return t.fromParser(this)},typeForField:function(t){return t.associatedType},readFieldValue:function(t){var e=this.typeForField(t);if(!e)throw new Error("unsupported: ("+t.name+", "+t.type.name+")");var n=t.isVLEncoded?this.readVLLength():null,r=e.fromParser(this,n);if(void 0===r)throw new Error("fromParser for ("+t.name+", "+t.type.name+") -> undefined ");return r},readFieldAndValue:function(){var t=this.readField();return[t,this.readFieldValue(t)]}});t.exports={BinaryParser:f}},function(t,e,n){"use strict";var r=n(12),i=n(11),o=n(2),s=n(16),a=s.STObject,u=s.Hash256,f=n(56).ShaMap,c=n(21).HashPrefix,h=n(25).Sha512Half,d=n(55),l=d.BinarySerializer,p=d.serializeObject;function b(t,e){var n=new f;return e.forEach((function(e){return n.addItem.apply(n,function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(t(e)))})),n.hash()}var g=r.partial(b,(function(t){return o(t.hash),[u.from(t.hash),{hashPrefix:function(){return c.transaction},toBytesSink:function(e){var n=new l(e);n.writeLengthEncoded(a.from(t)),n.writeLengthEncoded(a.from(t.metaData))}}]})),v=r.partial(b,(function(t){var e=u.from(t.index),n=p(t);return[e,{hashPrefix:function(){return c.accountStateEntry},toBytesSink:function(t){t.put(n)}}]}));t.exports={accountStateHash:v,transactionTreeHash:g,ledgerHash:function(t){var e=new h;return e.put(c.ledgerHeader),o(void 0!==t.parent_close_time),o(void 0!==t.close_flags),s.UInt32.from(t.ledger_index).toBytesSink(e),s.UInt64.from(new i(t.total_coins)).toBytesSink(e),s.Hash256.from(t.parent_hash).toBytesSink(e),s.Hash256.from(t.transaction_hash).toBytesSink(e),s.Hash256.from(t.account_hash).toBytesSink(e),s.UInt32.from(t.parent_close_time).toBytesSink(e),s.UInt32.from(t.close_time).toBytesSink(e),s.UInt8.from(t.close_time_resolution).toBytesSink(e),s.UInt8.from(t.close_flags).toBytesSink(e),e.finish()}}},function(t,e,n){"use strict";var r=n(51),i=n(3),o=i.bytesToHex,s=i.slice,a=i.parseBytes,u=n(16).UInt64,f=n(11);t.exports={encode:function(t){var e=t instanceof r?t:new r(t),n=e.e-15,i=e.times("1e"+-n).abs().toString(),o=new u(new f(i)).toBytes();return o[0]=n+100,o},decode:function(t){var e=s(a(t),-8),n=e[0]-100;return new r("0x"+o(s(e,1))).times("1e"+n)}}},function(t,e,n){"use strict";(function(e){const r=n(2),i=n(39),o=n(18),s=n(60),a=n(29),u=n(130),f=n(132),c=s.eddsa("ed25519"),h=s.ec("secp256k1"),{hexToBytes:d}=f,{bytesToHex:l}=f;function p(t){return o.sha512().update(t).digest().slice(0,32)}const b={deriveKeypair(t,e){const n="00"+u.derivePrivateKey(t,e).toString(16,64).toUpperCase(),r=l(h.keyFromPrivate(n.slice(2)).getPublic().encodeCompressed());return{privateKey:n,publicKey:r}},sign:(t,e)=>l(h.sign(p(t),d(e),{canonical:!0}).toDER()),verify:(t,e,n)=>h.verify(p(t),e,d(n))},g={deriveKeypair(t){const e=p(t);return{privateKey:"ED"+l(e),publicKey:"ED"+l(c.keyFromSecret(e).pubBytes())}},sign:(t,e)=>(r(Array.isArray(t),"message must be array of octets"),l(c.sign(t,d(e).slice(1)).toBytes())),verify:(t,e,n)=>c.verify(t,d(e),d(n).slice(1))};function v(t){return{"ecdsa-secp256k1":b,ed25519:g}[t]}function m(t){const e=d(t);return 33===e.length&&237===e[0]?"ed25519":"ecdsa-secp256k1"}function y(t){return a.encodeAccountID(f.computePublicKeyHash(t))}const{decodeSeed:w}=a;t.exports={generateSeed:function(t={}){r(!t.entropy||t.entropy.length>=16,"entropy too short");const e=t.entropy?t.entropy.slice(0,16):i(16),n="ed25519"===t.algorithm?"ed25519":"secp256k1";return a.encodeSeed(e,n)},deriveKeypair:function(t,e){const n=a.decodeSeed(t),r=v("ed25519"===n.type?"ed25519":"ecdsa-secp256k1"),i=r.deriveKeypair(n.bytes,e),o=p("This test message should verify."),s=r.sign(o,i.privateKey);if(!0!==r.verify(o,s,i.publicKey))throw new Error("derived keypair did not generate verifiable signature");return i},sign:function(t,e){return v(m(e)).sign(d(t),e)},verify:function(t,e,n){return v(m(n)).verify(d(t),e,n)},deriveAddress:function(t){return y(e.from(d(t)))},deriveNodeAddress:function(t){const e=a.decodeNodePublic(t);return y(u.accountPublicFromPublicGenerator(e))},decodeSeed:w}}).call(this,n(5).Buffer)},function(t,e){},function(t,e,n){"use strict";e.sha1=n(112),e.sha224=n(113),e.sha256=n(58),e.sha384=n(114),e.sha512=n(59)},function(t,e,n){"use strict";var r=n(7),i=n(22),o=n(57),s=r.rotl32,a=r.sum32,u=r.sum32_5,f=o.ft_1,c=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(d,c),t.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=s(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],o=this.h[1],c=this.h[2],d=this.h[3],l=this.h[4];for(r=0;r<n.length;r++){var p=~~(r/20),b=u(s(i,5),f(p,o,c,d),l,n[r],h[p]);l=d,d=c,c=s(o,30),o=i,i=b}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],c),this.h[3]=a(this.h[3],d),this.h[4]=a(this.h[4],l)},d.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(t,e,n){"use strict";var r=n(7),i=n(58);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},function(t,e,n){"use strict";var r=n(7),i=n(59);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},function(t,e,n){"use strict";var r=n(7),i=n(22),o=r.rotl32,s=r.sum32,a=r.sum32_3,u=r.sum32_4,f=i.BlockHash;function c(){if(!(this instanceof c))return new c;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(t,e,n,r){return t<=15?e^n^r:t<=31?e&n|~e&r:t<=47?(e|~n)^r:t<=63?e&r|n&~r:e^(n|~r)}function d(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function l(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}r.inherits(c,f),e.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(t,e){for(var n=this.h[0],r=this.h[1],i=this.h[2],f=this.h[3],c=this.h[4],m=n,y=r,w=i,_=f,S=c,M=0;M<80;M++){var E=s(o(u(n,h(M,r,i,f),t[p[M]+e],d(M)),g[M]),c);n=c,c=f,f=o(i,10),i=r,r=E,E=s(o(u(m,h(79-M,y,w,_),t[b[M]+e],l(M)),v[M]),S),m=S,S=_,_=o(w,10),w=y,y=E}E=a(this.h[1],i,_),this.h[1]=a(this.h[2],f,S),this.h[2]=a(this.h[3],c,m),this.h[3]=a(this.h[4],n,y),this.h[4]=a(this.h[0],r,w),this.h[0]=E},c.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],b=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(t,e,n){"use strict";var r=n(7),i=n(14);function o(t,e,n){if(!(this instanceof o))return new o(t,e,n);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(e,n))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t){t.exports=JSON.parse('{"_from":"elliptic@^6.5.2","_id":"elliptic@6.5.2","_inBundle":false,"_integrity":"sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==","_location":"/elliptic","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"elliptic@^6.5.2","name":"elliptic","escapedName":"elliptic","rawSpec":"^6.5.2","saveSpec":null,"fetchSpec":"^6.5.2"},"_requiredBy":["/ripple-keypairs"],"_resolved":"https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz","_shasum":"05c5678d7173c049d8ca433552224a495d0e3762","_spec":"elliptic@^6.5.2","_where":"/Users/mbhandary/node_modules/ripple-keypairs","author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"bugs":{"url":"https://github.com/indutny/elliptic/issues"},"bundleDependencies":false,"dependencies":{"bn.js":"^4.4.0","brorand":"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0","inherits":"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},"deprecated":false,"description":"EC cryptography","devDependencies":{"brfs":"^1.4.3","coveralls":"^3.0.8","grunt":"^1.0.4","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.2","jscs":"^3.0.7","jshint":"^2.10.3","mocha":"^6.2.2"},"files":["lib"],"homepage":"https://github.com/indutny/elliptic","keywords":["EC","Elliptic","curve","Cryptography"],"license":"MIT","main":"lib/elliptic.js","name":"elliptic","repository":{"type":"git","url":"git+ssh://git@github.com/indutny/elliptic.git"},"scripts":{"jscs":"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js","jshint":"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js","lint":"npm run jscs && npm run jshint","test":"npm run lint && npm run unit","unit":"istanbul test _mocha --reporter=spec test/index.js","version":"grunt dist && git add dist/"},"version":"6.5.2"}')},function(t,e){},function(t,e,n){"use strict";var r=n(4),i=n(8),o=n(1),s=n(26),a=r.assert;function u(t){s.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(t,e,n,r){s.BasePoint.call(this,t,"affine"),null===e&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function c(t,e,n,r){s.BasePoint.call(this,t,"jacobian"),null===e&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(n,16),this.z=new i(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,s),t.exports=u,u.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,n;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);e=(e=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(t.lambda)n=new i(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?n=o[0]:(n=o[1],a(0===this.g.mul(n).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:n,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(n)}}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),n=new i(2).toRed(e).redInvm(),r=n.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(n);return[r.redAdd(o).fromRed(),r.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,n,r,o,s,a,u,f,c,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=t,l=this.n.clone(),p=new i(1),b=new i(0),g=new i(0),v=new i(1),m=0;0!==d.cmpn(0);){var y=l.div(d);f=l.sub(y.mul(d)),c=g.sub(y.mul(p));var w=v.sub(y.mul(b));if(!r&&f.cmp(h)<0)e=u.neg(),n=p,r=f.neg(),o=c;else if(r&&2==++m)break;u=f,l=d,d=f,g=p,p=c,v=b,b=w}s=f.neg(),a=c;var _=r.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=e,a=n),r.negative&&(r=r.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:r,b:o},{a:s,b:a}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,n=e[0],r=e[1],i=r.b.mul(t).divRound(this.n),o=n.b.neg().mul(t).divRound(this.n),s=i.mul(n.a),a=o.mul(r.a),u=i.mul(n.b),f=o.mul(r.b);return{k1:t.sub(s).sub(a),k2:u.add(f).neg()}},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var o=r.fromRed().isOdd();return(e&&!o||!e&&o)&&(r=r.redNeg()),this.point(t,r)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,n=t.y,r=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(e[o]),a=t[o],u=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),r[2*o]=a,r[2*o+1]=u,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var f=this._wnafMulAdd(1,r,i,2*o,n),c=0;c<2*o;c++)r[c]=null,i[c]=null;return f},o(f,s.BasePoint),u.prototype.point=function(t,e,n){return new f(this,t,e,n)},u.prototype.pointFromJSON=function(t,e){return f.fromJSON(this,t,e)},f.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var n=this.curve,r=function(t){return n.point(t.x.redMul(n.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(r)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(r)}}}return e}},f.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},f.fromJSON=function(t,e,n){"string"==typeof e&&(e=JSON.parse(e));var r=t.point(e[0],e[1],n);if(!e[2])return r;function i(e){return t.point(e[0],e[1],n)}var o=e[2];return r.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[r].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[r].concat(o.naf.points.map(i))}},r},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var n=e.redSqr().redISub(this.x).redISub(t.x),r=e.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},f.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,n=this.x.redSqr(),r=t.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(e).redMul(r),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},f.prototype.mulAdd=function(t,e,n){var r=[this,e],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},f.prototype.jmulAdd=function(t,e,n){var r=[this,e],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},f.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},f.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var n=this.precomputed,r=function(t){return t.neg()};e.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return e},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(c,s.BasePoint),u.prototype.jpoint=function(t,e,n){return new c(this,t,e,n)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),n=this.x.redMul(e),r=this.y.redMul(e).redMul(t);return this.curve.point(n,r)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(e),i=t.x.redMul(n),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(n.redMul(this.z)),a=r.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=a.redSqr(),c=f.redMul(a),h=r.redMul(f),d=u.redSqr().redIAdd(c).redISub(h).redISub(h),l=u.redMul(h.redISub(d)).redISub(o.redMul(c)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(d,l,p)},c.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),n=this.x,r=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=n.redSub(r),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),f=u.redMul(s),c=n.redMul(u),h=a.redSqr().redIAdd(f).redISub(c).redISub(c),d=a.redMul(c.redISub(h)).redISub(i.redMul(f)),l=this.z.redMul(s);return this.curve.jpoint(h,d,l)},c.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,n=0;n<t;n++)e=e.dbl();return e}var r=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,u=a.redSqr().redSqr(),f=s.redAdd(s);for(n=0;n<t;n++){var c=o.redSqr(),h=f.redSqr(),d=h.redSqr(),l=c.redAdd(c).redIAdd(c).redIAdd(r.redMul(u)),p=o.redMul(h),b=l.redSqr().redISub(p.redAdd(p)),g=p.redISub(b),v=l.redMul(g);v=v.redIAdd(v).redISub(d);var m=f.redMul(a);n+1<t&&(u=u.redMul(d)),o=b,a=m,f=v}return this.curve.jpoint(o,f.redMul(i),a)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},c.prototype._zeroDbl=function(){var t,e,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var a=r.redAdd(r).redIAdd(r),u=a.redSqr().redISub(s).redISub(s),f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),t=u,e=a.redMul(s.redISub(u)).redISub(f),n=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),h=this.y.redSqr(),d=h.redSqr(),l=this.x.redAdd(h).redSqr().redISub(c).redISub(d);l=l.redIAdd(l);var p=c.redAdd(c).redIAdd(c),b=p.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),t=b.redISub(l).redISub(l),e=p.redMul(l.redISub(t)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(t,e,n)},c.prototype._threeDbl=function(){var t,e,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var a=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),u=a.redSqr().redISub(s).redISub(s);t=u;var f=o.redIAdd(o);f=(f=f.redIAdd(f)).redIAdd(f),e=a.redMul(s.redISub(u)).redISub(f),n=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),h=this.y.redSqr(),d=this.x.redMul(h),l=this.x.redSub(c).redMul(this.x.redAdd(c));l=l.redAdd(l).redIAdd(l);var p=d.redIAdd(d),b=(p=p.redIAdd(p)).redAdd(p);t=l.redSqr().redISub(b),n=this.y.redAdd(this.z).redSqr().redISub(h).redISub(c);var g=h.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=l.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,n)},c.prototype._dbl=function(){var t=this.curve.a,e=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),o=e.redSqr(),s=n.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),u=e.redAdd(e),f=(u=u.redIAdd(u)).redMul(s),c=a.redSqr().redISub(f.redAdd(f)),h=f.redISub(c),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var l=a.redMul(h).redISub(d),p=n.redAdd(n).redMul(r);return this.curve.jpoint(c,l,p)},c.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),n=this.z.redSqr(),r=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(r),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),u=r.redIAdd(r);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var f=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(u),c=e.redMul(f);c=(c=c.redIAdd(c)).redIAdd(c);var h=this.x.redMul(a).redISub(c);h=(h=h.redIAdd(h)).redIAdd(h);var d=this.y.redMul(f.redMul(u.redISub(f)).redISub(s.redMul(a)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var l=this.z.redAdd(s).redSqr().redISub(n).redISub(a);return this.curve.jpoint(h,d,l)},c.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},c.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),n=t.z.redSqr();if(0!==this.x.redMul(n).redISub(t.x.redMul(e)).cmpn(0))return!1;var r=e.redMul(this.z),i=n.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(r)).cmpn(0)},c.prototype.eqXToP=function(t){var e=this.z.redSqr(),n=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(n))return!0;for(var r=t.clone(),i=this.curve.redN.redMul(e);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},c.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,n){"use strict";var r=n(8),i=n(1),o=n(26),s=n(4);function a(t){o.call(this,"mont",t),this.a=new r(t.a,16).toRed(this.red),this.b=new r(t.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,n){o.BasePoint.call(this,t,"projective"),null===e&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(e,16),this.z=new r(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),t.exports=a,a.prototype.validate=function(t){var e=t.normalize().x,n=e.redSqr(),r=n.redMul(e).redAdd(n.redMul(this.a)).redAdd(e);return 0===r.redSqrt().redSqr().cmp(r)},i(u,o.BasePoint),a.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},a.prototype.point=function(t,e){return new u(this,t,e)},a.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),n=t.redSub(e),r=t.redMul(e),i=n.redMul(e.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(t,e){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(n),s=i.redMul(r),a=e.z.redMul(o.redAdd(s).redSqr()),u=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,u)},u.prototype.mul=function(t){for(var e=t.clone(),n=this,r=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(t,e,n){"use strict";var r=n(4),i=n(8),o=n(1),s=n(26),a=r.assert;function u(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,s.call(this,"edwards",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function f(t,e,n,r,o){s.BasePoint.call(this,t,"projective"),null===e&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(e,16),this.y=new i(n,16),this.z=r?new i(r,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,s),t.exports=u,u.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},u.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},u.prototype.jpoint=function(t,e,n,r){return this.point(t,e,n,r)},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr(),r=this.c2.redSub(this.a.redMul(n)),o=this.one.redSub(this.c2.redMul(this.d).redMul(n)),s=r.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var u=a.fromRed().isOdd();return(e&&!u||!e&&u)&&(a=a.redNeg()),this.point(t,a)},u.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr(),r=n.redSub(this.c2),o=n.redMul(this.d).redMul(this.c2).redSub(this.a),s=r.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==e&&(a=a.redNeg()),this.point(a,t)},u.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),n=t.y.redSqr(),r=e.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(n)));return 0===r.cmp(i)},o(f,s.BasePoint),u.prototype.pointFromJSON=function(t){return f.fromJSON(this,t)},u.prototype.point=function(t,e,n,r){return new f(this,t,e,n,r)},f.fromJSON=function(t,e){return new f(t,e[0],e[1],e[2])},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=r.redAdd(e),s=o.redSub(n),a=r.redSub(e),u=i.redMul(s),f=o.redMul(a),c=i.redMul(a),h=s.redMul(o);return this.curve.point(u,f,h,c)},f.prototype._projDbl=function(){var t,e,n,r=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var s=(f=this.curve._mulA(i)).redAdd(o);if(this.zOne)t=r.redSub(i).redSub(o).redMul(s.redSub(this.curve.two)),e=s.redMul(f.redSub(o)),n=s.redSqr().redSub(s).redSub(s);else{var a=this.z.redSqr(),u=s.redSub(a).redISub(a);t=r.redSub(i).redISub(o).redMul(u),e=s.redMul(f.redSub(o)),n=s.redMul(u)}}else{var f=i.redAdd(o);a=this.curve._mulC(this.z).redSqr(),u=f.redSub(a).redSub(a);t=this.curve._mulC(r.redISub(f)).redMul(u),e=this.curve._mulC(f).redMul(i.redISub(o)),n=f.redMul(u)}return this.curve.point(t,e,n)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),n=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),r=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=n.redSub(e),s=i.redSub(r),a=i.redAdd(r),u=n.redAdd(e),f=o.redMul(s),c=a.redMul(u),h=o.redMul(u),d=s.redMul(a);return this.curve.point(f,c,d,h)},f.prototype._projAdd=function(t){var e,n,r=this.z.redMul(t.z),i=r.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(s),u=i.redSub(a),f=i.redAdd(a),c=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),h=r.redMul(u).redMul(c);return this.curve.twisted?(e=r.redMul(f).redMul(s.redSub(this.curve._mulA(o))),n=u.redMul(f)):(e=r.redMul(f).redMul(s.redSub(o)),n=this.curve._mulC(u).redMul(f)),this.curve.point(h,e,n)},f.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},f.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},f.prototype.mulAdd=function(t,e,n){return this.curve._wnafMulAdd(1,[this,e],[t,n],2,!1)},f.prototype.jmulAdd=function(t,e,n){return this.curve._wnafMulAdd(1,[this,e],[t,n],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},f.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var n=t.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(r),0===this.x.cmp(e))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},function(t,e){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(t,e,n){"use strict";var r=n(8),i=n(124),o=n(4),s=n(40),a=n(39),u=o.assert,f=n(125),c=n(126);function h(t){if(!(this instanceof h))return new h(t);"string"==typeof t&&(u(s.hasOwnProperty(t),"Unknown curve "+t),t=s[t]),t instanceof s.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=h,h.prototype.keyPair=function(t){return new f(this,t)},h.prototype.keyFromPrivate=function(t,e){return f.fromPrivate(this,t,e)},h.prototype.keyFromPublic=function(t,e){return f.fromPublic(this,t,e)},h.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||a(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),o=this.n.sub(new r(2));;){var s=new r(e.generate(n));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},h.prototype._truncateToN=function(t,e){var n=8*t.byteLength()-this.n.bitLength();return n>0&&(t=t.ushrn(n)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},h.prototype.sign=function(t,e,n,o){"object"==typeof n&&(o=n,n=null),o||(o={}),e=this.keyFromPrivate(e,n),t=this._truncateToN(new r(t,16));for(var s=this.n.byteLength(),a=e.getPrivate().toArray("be",s),u=t.toArray("be",s),f=new i({hash:this.hash,entropy:a,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),h=this.n.sub(new r(1)),d=0;;d++){var l=o.k?o.k(d):new r(f.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(h)>=0)){var p=this.g.mul(l);if(!p.isInfinity()){var b=p.getX(),g=b.umod(this.n);if(0!==g.cmpn(0)){var v=l.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t));if(0!==(v=v.umod(this.n)).cmpn(0)){var m=(p.getY().isOdd()?1:0)|(0!==b.cmp(g)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),m^=1),new c({r:g,s:v,recoveryParam:m})}}}}}},h.prototype.verify=function(t,e,n,i){t=this._truncateToN(new r(t,16)),n=this.keyFromPublic(n,i);var o=(e=new c(e,"hex")).r,s=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),f=u.mul(t).umod(this.n),h=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(f,n.getPublic(),h)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(f,n.getPublic(),h)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},h.prototype.recoverPubKey=function(t,e,n,i){u((3&n)===n,"The recovery param is more than two bits"),e=new c(e,i);var o=this.n,s=new r(t),a=e.r,f=e.s,h=1&n,d=n>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),h):this.curve.pointFromX(a,h);var l=e.r.invm(o),p=o.sub(s).mul(l).umod(o),b=f.mul(l).umod(o);return this.g.mulAdd(p,a,b)},h.prototype.getKeyRecoveryParam=function(t,e,n,r){if(null!==(e=new c(e,r)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(n))return i}throw new Error("Unable to find valid recovery factor")}},function(t,e,n){"use strict";var r=n(18),i=n(61),o=n(14);function s(t){if(!(this instanceof s))return new s(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),n=i.toArray(t.nonce,t.nonceEnc||"hex"),r=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,n,r)}t.exports=s,s.prototype._init=function(t,e,n){var r=t.concat(e).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new r.hmac(this.hash,this.K)},s.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(t,e,n,r){"string"!=typeof e&&(r=n,n=e,e=null),t=i.toArray(t,e),n=i.toArray(n,r),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(n||[])),this._reseed=1},s.prototype.generate=function(t,e,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(r=n,n=e,e=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,t);return this._update(n),this._reseed++,i.encode(s,e)}},function(t,e,n){"use strict";var r=n(8),i=n(4).assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,n){return e instanceof o?e:new o(t,{pub:e,pubEnc:n})},o.fromPrivate=function(t,e,n){return e instanceof o?e:new o(t,{priv:e,privEnc:n})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new r(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.mul(this.priv).getX()},o.prototype.sign=function(t,e,n){return this.ec.sign(t,this,e,n)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(t,e,n){"use strict";var r=n(8),i=n(4),o=i.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new r(t.r,16),this.s=new r(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function u(t,e){var n=t[e.place++];if(!(128&n))return n;for(var r=15&n,i=0,o=0,s=e.place;o<r;o++,s++)i<<=8,i|=t[s];return e.place=s,i}function f(t){for(var e=0,n=t.length-1;!t[e]&&!(128&t[e+1])&&e<n;)e++;return 0===e?t:t.slice(e)}function c(t,e){if(e<128)t.push(e);else{var n=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|n);--n;)t.push(e>>>(n<<3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=i.toArray(t,e);var n=new a;if(48!==t[n.place++])return!1;if(u(t,n)+n.place!==t.length)return!1;if(2!==t[n.place++])return!1;var o=u(t,n),s=t.slice(n.place,o+n.place);if(n.place+=o,2!==t[n.place++])return!1;var f=u(t,n);if(t.length!==f+n.place)return!1;var c=t.slice(n.place,f+n.place);return 0===s[0]&&128&s[1]&&(s=s.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new r(s),this.s=new r(c),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),n=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&n[0]&&(n=[0].concat(n)),e=f(e),n=f(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];c(r,e.length),(r=r.concat(e)).push(2),c(r,n.length);var o=r.concat(n),s=[48];return c(s,o.length),s=s.concat(o),i.encode(s,t)}},function(t,e,n){"use strict";var r=n(18),i=n(40),o=n(4),s=o.assert,a=o.parseBytes,u=n(128),f=n(129);function c(t){if(s("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof c))return new c(t);t=i[t].curve;this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=r.sha512}t.exports=c,c.prototype.sign=function(t,e){t=a(t);var n=this.keyFromSecret(e),r=this.hashInt(n.messagePrefix(),t),i=this.g.mul(r),o=this.encodePoint(i),s=this.hashInt(o,n.pubBytes(),t).mul(n.priv()),u=r.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},c.prototype.verify=function(t,e,n){t=a(t),e=this.makeSignature(e);var r=this.keyFromPublic(n),i=this.hashInt(e.Rencoded(),r.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(r.pub().mul(i)).eq(o)},c.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},c.prototype.keyFromPublic=function(t){return u.fromPublic(this,t)},c.prototype.keyFromSecret=function(t){return u.fromSecret(this,t)},c.prototype.makeSignature=function(t){return t instanceof f?t:new f(this,t)},c.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},c.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,n=t.slice(0,e).concat(-129&t[e]),r=0!=(128&t[e]),i=o.intFromLE(n);return this.curve.pointFromY(i,r)},c.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},c.prototype.decodeInt=function(t){return o.intFromLE(t)},c.prototype.isPoint=function(t){return t instanceof this.pointClass}},function(t,e,n){"use strict";var r=n(4),i=r.assert,o=r.parseBytes,s=r.cachedProperty;function a(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}a.fromPublic=function(t,e){return e instanceof a?e:new a(t,{pub:e})},a.fromSecret=function(t,e){return e instanceof a?e:new a(t,{secret:e})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,"privBytes",(function(){var t=this.eddsa,e=this.hash(),n=t.encodingLength-1,r=e.slice(0,t.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},a.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},a.prototype.getSecret=function(t){return i(this._secret,"KeyPair is public only"),r.encode(this.secret(),t)},a.prototype.getPublic=function(t){return r.encode(this.pubBytes(),t)},t.exports=a},function(t,e,n){"use strict";var r=n(8),i=n(4),o=i.assert,s=i.cachedProperty,a=i.parseBytes;function u(t,e){this.eddsa=t,"object"!=typeof e&&(e=a(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof r&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}s(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},t.exports=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(60),i=n(131),o=r.ec("secp256k1");function s(t,e){const n=o.curve.n;for(let r=0;r<=4294967295;r++){const o=(new i.default).add(t);void 0!==e&&o.addU32(e),o.addU32(r);const s=o.first256BN();if(s.cmpn(0)>0&&s.cmp(n)<0)return s}throw new Error("impossible unicorn ;)")}e.derivePrivateKey=function(t,e={}){const n=e.validator,r=o.curve.n,i=s(t);if(n)return i;const a=o.g.mul(i),u=e.accountIndex||0;return s(a.encodeCompressed(),u).add(i).mod(r)},e.accountPublicFromPublicGenerator=function(t){const e=o.curve.decodePoint(t),n=s(t,0),r=o.g.mul(n);return e.add(r).encodeCompressed()}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(18),i=n(11);e.default=class{constructor(){this.hash=r.sha512()}add(t){return this.hash.update(t),this}addU32(t){return this.add([t>>>24&255,t>>>16&255,t>>>8&255,255&t])}finish(){return this.hash.digest()}first256(){return this.finish().slice(0,32)}first256BN(){return new i(this.first256())}}},function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0});const r=n(2),i=n(18),o=n(11);e.bytesToHex=function(t){return t.map(t=>{const e=t.toString(16).toUpperCase();return e.length>1?e:`0${e}`}).join("")},e.hexToBytes=function(t){return r(t.length%2==0),new o(t,16).toArray(null,t.length/2)},e.computePublicKeyHash=function(e){const n=i.sha256().update(e).digest(),r=i.ripemd160().update(n).digest();return t.from(r)}}).call(this,n(5).Buffer)}]); |