text: var ripple=function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";e.exports={RippleAPI:r(1).RippleAPI,RippleAPIBroadcast:r(615).RippleAPIBroadcast,createHTTPServer:r(616).createHTTPServer}},function(e,t,r){(function(t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),a=function H(e,t,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var i=Object.getPrototypeOf(e);return null===i?void 0:H(i,t,r)}if("value"in n)return n.value;var o=n.get;if(void 0!==o)return o.call(r)};t._babelPolyfill||r(2);var _=r(192),c=r(193).EventEmitter,u=r(194),f=r(438),h=f.connect,d=f.disconnect,l=f.getServerInfo,p=f.getFee,g=f.isConnected,m=f.getLedgerVersion,v=r(439),y=r(460),b=r(586),w=r(588),S=r(589),x=r(590),E=r(592),A=r(595),P=r(597),T=r(598),I=r(599),O=r(601),R=r(602),k=r(603),L=r(604),N=r(605),j=r(606),F=r(607),M=r(608),B=r(609),C=r(610),q=r(194).errors,z=r(611).generateAddressAPI,D=r(612),U=r(613),V=function(e){function t(){return n(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return o(t,e),s(t,[{key:"request",value:function(e,r){var n=e.ledger_index;return void 0!==n&&"validated"!==n&&(!_.isNumber(n)||n>this._ledgerVersion)?Promise.reject(new q.LedgerVersionError("ledgerVersion "+n+" is greater than server's most recent validated ledger: "+this._ledgerVersion)):a(Object.getPrototypeOf(t.prototype),"request",this).call(this,e,r)}}]),t}(u.Connection),$=function(e){function t(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];n(this,t),u.validate.apiOptions(e);var r=i(this,Object.getPrototypeOf(t).call(this));r._feeCushion=e.feeCushion||1.2;var o=e.server;return void 0!==o?(r.connection=new V(o,e),r.connection.on("ledgerClosed",function(e){r.emit("ledger",f.formatLedgerClose(e))}),r.connection.on("error",function(e,t,n){r.emit("error",e,t,n)}),r.connection.on("connected",function(){r.emit("connected")}),r.connection.on("disconnected",function(e){r.emit("disconnected",e)})):r.connection=new V(null,e),r}return o(t,e),t}(c);_.assign($.prototype,{connect:h,disconnect:d,isConnected:g,getServerInfo:l,getFee:p,getLedgerVersion:m,getTransaction:v,getTransactions:y,getTrustlines:b,getBalances:w,getBalanceSheet:S,getPaths:x,getOrders:E,getOrderbook:A,getSettings:P,getAccountInfo:T,getLedger:U,preparePayment:I,prepareTrustline:O,prepareOrder:R,prepareOrderCancellation:k,prepareSuspendedPaymentCreation:L,prepareSuspendedPaymentExecution:N,prepareSuspendedPaymentCancellation:j,prepareSettings:F,sign:M,combine:B,submit:C,generateAddress:z,computeLedgerHash:D,errors:q}),$._PRIVATE={validate:u.validate,RangeSet:r(276).RangeSet,ledgerUtils:r(440),schemaValidator:r(313)},e.exports={RippleAPI:$}}).call(t,function(){return this}())},function(e,t,r){(function(e){"use strict";if(r(3),r(190),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0}).call(t,function(){return this}())},function(e,t,r){r(4),r(37),r(43),r(45),r(47),r(49),r(51),r(53),r(54),r(55),r(56),r(57),r(58),r(59),r(60),r(61),r(62),r(63),r(64),r(67),r(68),r(69),r(71),r(72),r(73),r(74),r(75),r(76),r(77),r(79),r(80),r(81),r(83),r(84),r(85),r(87),r(88),r(89),r(90),r(91),r(92),r(93),r(94),r(95),r(96),r(97),r(98),r(99),r(100),r(105),r(106),r(110),r(111),r(113),r(114),r(119),r(120),r(123),r(125),r(127),r(129),r(130),r(131),r(133),r(134),r(136),r(137),r(138),r(139),r(146),r(149),r(150),r(152),r(153),r(154),r(155),r(156),r(157),r(158),r(159),r(160),r(161),r(162),r(163),r(165),r(166),r(167),r(168),r(169),r(170),r(172),r(173),r(174),r(175),r(177),r(178),r(180),r(181),r(183),r(184),r(185),r(188),r(189),e.exports=r(8)},function(e,t,r){"use strict";var n,i=r(5),o=r(6),s=r(11),a=r(10),c=r(17),u=r(18),f=r(20),h=r(21),d=r(22),l=r(12),p=r(23),g=r(16),m=r(19),v=r(24),y=r(26),b=r(28),w=r(29),S=r(30),x=r(27),E=r(14)("__proto__"),A=r(31),P=r(36)(!1),T=Object.prototype,I=Array.prototype,O=I.slice,R=I.join,k=i.setDesc,L=i.getDesc,N=i.setDescs,j={};s||(n=!l(function(){return 7!=k(u("div"),"a",{get:function(){return 7}}).a}),i.setDesc=function(e,t,r){if(n)try{return k(e,t,r)}catch(i){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(p(e)[t]=r.value),e},i.getDesc=function(e,t){if(n)try{return L(e,t)}catch(r){}return f(e,t)?a(!T.propertyIsEnumerable.call(e,t),e[t]):void 0},i.setDescs=N=function(e,t){p(e);for(var r,n=i.getKeys(t),o=n.length,s=0;o>s;)i.setDesc(e,r=n[s++],t[r]);return e}),o(o.S+o.F*!s,"Object",{getOwnPropertyDescriptor:i.getDesc,defineProperty:i.setDesc,defineProperties:N});var F="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),M=F.concat("length","prototype"),B=F.length,C=function(){var e,t=u("iframe"),r=B,n=">";for(t.style.display="none",c.appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object</script"+n),e.close(),C=e.F;r--;)delete C.prototype[F[r]];return C()},q=function(e,t){return function(r){var n,i=y(r),o=0,s=[];for(n in i)n!=E&&f(i,n)&&s.push(n);for(;t>o;)f(i,n=e[o++])&&(~P(s,n)||s.push(n));return s}},z=function(){};o(o.S,"Object",{getPrototypeOf:i.getProto=i.getProto||function(e){return e=v(e),f(e,E)?e[E]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?T:null},getOwnPropertyNames:i.getNames=i.getNames||q(M,M.length,!0),create:i.create=i.create||function(e,t){var r;return null!==e?(z.prototype=p(e),r=new z,z.prototype=null,r[E]=e):r=C(),void 0===t?r:N(r,t)},keys:i.getKeys=i.getKeys||q(F,B,!1)});var D=function(e,t,r){if(!(t in j)){for(var n=[],i=0;t>i;i++)n[i]="a["+i+"]";j[t]=Function("F,a","return new F("+n.join(",")+")")}return j[t](e,r)};o(o.P,"Function",{bind:function(e){var t=g(this),r=O.call(arguments,1),n=function(){var i=r.concat(O.call(arguments));return this instanceof n?D(t,i.length,i):d(t,i,e)};return m(t.prototype)&&(n.prototype=t.prototype),n}}),o(o.P+o.F*l(function(){c&&O.call(c)}),"Array",{slice:function(e,t){var r=S(this.length),n=h(this);if(t=void 0===t?r:t,"Array"==n)return O.call(this,e,t);for(var i=w(e,r),o=w(t,r),s=S(o-i),a=Array(s),c=0;s>c;c++)a[c]="String"==n?this.charAt(i+c):this[i+c];return a}}),o(o.P+o.F*(x!=Object),"Array",{join:function(e){return R.call(x(this),void 0===e?",":e)}}),o(o.S,"Array",{isArray:r(33)});var U=function(e){return function(t,r){g(t);var n=x(this),i=S(n.length),o=e?i-1:0,s=e?-1:1;if(arguments.length<2)for(;;){if(o in n){r=n[o],o+=s;break}if(o+=s,e?0>o:o>=i)throw TypeError("Reduce of empty array with no initial value")}for(;e?o>=0:i>o;o+=s)o in n&&(r=t(r,n[o],o,this));return r}},V=function(e){return function(t){return e(this,t,arguments[1])}};o(o.P,"Array",{forEach:i.each=i.each||V(A(0)),map:V(A(1)),filter:V(A(2)),some:V(A(3)),every:V(A(4)),reduce:U(!1),reduceRight:U(!0),indexOf:V(P),lastIndexOf:function(e,t){var r=y(this),n=S(r.length),i=n-1;for(arguments.length>1&&(i=Math.min(i,b(t))),0>i&&(i=S(n+i));i>=0;i--)if(i in r&&r[i]===e)return i;return-1}}),o(o.S,"Date",{now:function(){return+new Date}});var $=function(e){return e>9?e:"0"+e};o(o.P+o.F*(l(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!l(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(this))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),r=e.getUTCMilliseconds(),n=0>t?"-":t>9999?"+":"";return n+("00000"+Math.abs(t)).slice(n?-6:-4)+"-"+$(e.getUTCMonth()+1)+"-"+$(e.getUTCDate())+"T"+$(e.getUTCHours())+":"+$(e.getUTCMinutes())+":"+$(e.getUTCSeconds())+"."+(r>99?r:"0"+$(r))+"Z"}})},function(e,t){var r=Object;e.exports={create:r.create,getProto:r.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:r.getOwnPropertyDescriptor,setDesc:r.defineProperty,setDescs:r.defineProperties,getKeys:r.keys,getNames:r.getOwnPropertyNames,getSymbols:r.getOwnPropertySymbols,each:[].forEach}},function(e,t,r){var n=r(7),i=r(8),o=r(9),s=r(13),a=r(15),c="prototype",u=function(e,t,r){var f,h,d,l,p=e&u.F,g=e&u.G,m=e&u.S,v=e&u.P,y=e&u.B,b=g?n:m?n[t]||(n[t]={}):(n[t]||{})[c],w=g?i:i[t]||(i[t]={}),S=w[c]||(w[c]={});g&&(r=t);for(f in r)h=!p&&b&&f in b,d=(h?b:r)[f],l=y&&h?a(d,n):v&&"function"==typeof d?a(Function.call,d):d,b&&!h&&s(b,f,d),w[f]!=d&&o(w,f,l),v&&S[f]!=d&&(S[f]=d)};n.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,e.exports=u},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t){var r=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=r)},function(e,t,r){var n=r(5),i=r(10);e.exports=r(11)?function(e,t,r){return n.setDesc(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){e.exports=!r(12)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,r){var n=r(7),i=r(9),o=r(14)("src"),s="toString",a=Function[s],c=(""+a).split(s);r(8).inspectSource=function(e){return a.call(e)},(e.exports=function(e,t,r,s){"function"==typeof r&&(r.hasOwnProperty(o)||i(r,o,e[t]?""+e[t]:c.join(String(t))),r.hasOwnProperty("name")||i(r,"name",t)),e===n?e[t]=r:(s||delete e[t],i(e,t,r))})(Function.prototype,s,function(){return"function"==typeof this&&this[o]||a.call(this)})},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t,r){var n=r(16);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,r){e.exports=r(7).document&&document.documentElement},function(e,t,r){var n=r(19),i=r(7).document,o=n(i)&&n(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t){e.exports=function(e,t,r){var n=void 0===r;switch(t.length){case 0:return n?e():e.call(r);case 1:return n?e(t[0]):e.call(r,t[0]);case 2:return n?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)}},function(e,t,r){var n=r(19);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){var n=r(25);e.exports=function(e){return Object(n(e))}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},function(e,t,r){var n=r(27),i=r(25);e.exports=function(e){return n(i(e))}},function(e,t,r){var n=r(21);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(28),i=Math.max,o=Math.min;e.exports=function(e,t){return e=n(e),0>e?i(e+t,0):o(e,t)}},function(e,t,r){var n=r(28),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t,r){var n=r(15),i=r(27),o=r(24),s=r(30),a=r(32);e.exports=function(e){var t=1==e,r=2==e,c=3==e,u=4==e,f=6==e,h=5==e||f;return function(d,l,p){for(var g,m,v=o(d),y=i(v),b=n(l,p,3),w=s(y.length),S=0,x=t?a(d,w):r?a(d,0):void 0;w>S;S++)if((h||S in y)&&(g=y[S],m=b(g,S,v),e))if(t)x[S]=m;else if(m)switch(e){case 3:return!0;case 5:return g;case 6:return S;case 2:x.push(g)}else if(u)return!1;return f?-1:c||u?u:x}}},function(e,t,r){var n=r(19),i=r(33),o=r(34)("species");e.exports=function(e,t){var r;return i(e)&&(r=e.constructor,"function"!=typeof r||r!==Array&&!i(r.prototype)||(r=void 0),n(r)&&(r=r[o],null===r&&(r=void 0))),new(void 0===r?Array:r)(t)}},function(e,t,r){var n=r(21);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,r){var n=r(35)("wks"),i=r(14),o=r(7).Symbol;e.exports=function(e){return n[e]||(n[e]=o&&o[e]||(o||i)("Symbol."+e))}},function(e,t,r){var n=r(7),i="__core-js_shared__",o=n[i]||(n[i]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t,r){var n=r(26),i=r(30),o=r(29);e.exports=function(e){return function(t,r,s){var a,c=n(t),u=i(c.length),f=o(s,u);if(e&&r!=r){for(;u>f;)if(a=c[f++],a!=a)return!0}else for(;u>f;f++)if((e||f in c)&&c[f]===r)return e||f;return!e&&-1}}},function(e,t,r){"use strict";var n=r(5),i=r(7),o=r(20),s=r(11),a=r(6),c=r(13),u=r(12),f=r(35),h=r(38),d=r(14),l=r(34),p=r(39),g=r(40),m=r(41),v=r(33),y=r(23),b=r(26),w=r(10),S=n.getDesc,x=n.setDesc,E=n.create,A=g.get,P=i.Symbol,T=i.JSON,I=T&&T.stringify,O=!1,R=l("_hidden"),k=n.isEnum,L=f("symbol-registry"),N=f("symbols"),j="function"==typeof P,F=Object.prototype,M=s&&u(function(){return 7!=E(x({},"a",{get:function(){return x(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=S(F,t);n&&delete F[t],x(e,t,r),n&&e!==F&&x(F,t,n)}:x,B=function(e){var t=N[e]=E(P.prototype);return t._k=e,s&&O&&M(F,e,{configurable:!0,set:function(t){o(this,R)&&o(this[R],e)&&(this[R][e]=!1),M(this,e,w(1,t))}}),t},C=function(e){return"symbol"==typeof e},q=function(e,t,r){return r&&o(N,t)?(r.enumerable?(o(e,R)&&e[R][t]&&(e[R][t]=!1),r=E(r,{enumerable:w(0,!1)})):(o(e,R)||x(e,R,w(1,{})),e[R][t]=!0),M(e,t,r)):x(e,t,r)},z=function(e,t){y(e);for(var r,n=m(t=b(t)),i=0,o=n.length;o>i;)q(e,r=n[i++],t[r]);return e},D=function(e,t){return void 0===t?E(e):z(E(e),t)},U=function(e){var t=k.call(this,e);return t||!o(this,e)||!o(N,e)||o(this,R)&&this[R][e]?t:!0},V=function(e,t){var r=S(e=b(e),t);return!r||!o(N,t)||o(e,R)&&e[R][t]||(r.enumerable=!0),r},$=function(e){for(var t,r=A(b(e)),n=[],i=0;r.length>i;)o(N,t=r[i++])||t==R||n.push(t);return n},H=function(e){for(var t,r=A(b(e)),n=[],i=0;r.length>i;)o(N,t=r[i++])&&n.push(N[t]);return n},X=function(e){if(void 0!==e&&!C(e)){for(var t,r,n=[e],i=1,o=arguments;o.length>i;)n.push(o[i++]);return t=n[1],"function"==typeof t&&(r=t),!r&&v(t)||(t=function(e,t){return r&&(t=r.call(this,e,t)),C(t)?void 0:t}),n[1]=t,I.apply(T,n)}},K=u(function(){var e=P();return"[null]"!=I([e])||"{}"!=I({a:e})||"{}"!=I(Object(e))});j||(P=function(){if(C(this))throw TypeError("Symbol is not a constructor");return B(d(arguments.length>0?arguments[0]:void 0))},c(P.prototype,"toString",function(){return this._k}),C=function(e){return e instanceof P},n.create=D,n.isEnum=U,n.getDesc=V,n.setDesc=q,n.setDescs=z,n.getNames=g.get=$,n.getSymbols=H,s&&!r(42)&&c(F,"propertyIsEnumerable",U,!0));var J={"for":function(e){return o(L,e+="")?L[e]:L[e]=P(e)},keyFor:function(e){return p(L,e)},useSetter:function(){O=!0},useSimple:function(){O=!1}};n.each.call("hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),function(e){var t=l(e);J[e]=j?t:B(t)}),O=!0,a(a.G+a.W,{Symbol:P}),a(a.S,"Symbol",J),a(a.S+a.F*!j,"Object",{create:D,defineProperty:q,defineProperties:z,getOwnPropertyDescriptor:V,getOwnPropertyNames:$,getOwnPropertySymbols:H}),T&&a(a.S+a.F*(!j||K),"JSON",{stringify:X}),h(P,"Symbol"),h(Math,"Math",!0),h(i.JSON,"JSON",!0)},function(e,t,r){var n=r(5).setDesc,i=r(20),o=r(34)("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},function(e,t,r){var n=r(5),i=r(26);e.exports=function(e,t){for(var r,o=i(e),s=n.getKeys(o),a=s.length,c=0;a>c;)if(o[r=s[c++]]===t)return r}},function(e,t,r){var n=r(26),i=r(5).getNames,o={}.toString,s="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(e){try{return i(e)}catch(t){return s.slice()}};e.exports.get=function(e){return s&&"[object Window]"==o.call(e)?a(e):i(n(e))}},function(e,t,r){var n=r(5);e.exports=function(e){var t=n.getKeys(e),r=n.getSymbols;if(r)for(var i,o=r(e),s=n.isEnum,a=0;o.length>a;)s.call(e,i=o[a++])&&t.push(i);return t}},function(e,t){e.exports=!1},function(e,t,r){var n=r(6);n(n.S+n.F,"Object",{assign:r(44)})},function(e,t,r){var n=r(5),i=r(24),o=r(27);e.exports=r(12)(function(){var e=Object.assign,t={},r={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(e){r[e]=e}),7!=e({},t)[n]||Object.keys(e({},r)).join("")!=i})?function(e,t){for(var r=i(e),s=arguments,a=s.length,c=1,u=n.getKeys,f=n.getSymbols,h=n.isEnum;a>c;)for(var d,l=o(s[c++]),p=f?u(l).concat(f(l)):u(l),g=p.length,m=0;g>m;)h.call(l,d=p[m++])&&(r[d]=l[d]);return r}:Object.assign},function(e,t,r){var n=r(6);n(n.S,"Object",{is:r(46)})},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,r){var n=r(6);n(n.S,"Object",{setPrototypeOf:r(48).set})},function(e,t,r){var n=r(5).getDesc,i=r(19),o=r(23),s=function(e,t){if(o(e),!i(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,i){try{i=r(15)(Function.call,n(Object.prototype,"__proto__").set,2),i(e,[]),t=!(e instanceof Array)}catch(o){t=!0}return function(e,r){return s(e,r),t?e.__proto__=r:i(e,r),e}}({},!1):void 0),check:s}},function(e,t,r){"use strict";var n=r(50),i={};i[r(34)("toStringTag")]="z",i+""!="[object z]"&&r(13)(Object.prototype,"toString",function(){return"[object "+n(this)+"]"},!0)},function(e,t,r){var n=r(21),i=r(34)("toStringTag"),o="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,r,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=(t=Object(e))[i])?r:o?n(t):"Object"==(s=n(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,r){var n=r(19);r(52)("freeze",function(e){return function(t){return e&&n(t)?e(t):t}})},function(e,t,r){var n=r(6),i=r(8),o=r(12);e.exports=function(e,t){var r=(i.Object||{})[e]||Object[e],s={};s[e]=t(r),n(n.S+n.F*o(function(){r(1)}),"Object",s)}},function(e,t,r){var n=r(19);r(52)("seal",function(e){return function(t){return e&&n(t)?e(t):t}})},function(e,t,r){var n=r(19);r(52)("preventExtensions",function(e){return function(t){return e&&n(t)?e(t):t}})},function(e,t,r){var n=r(19);r(52)("isFrozen",function(e){return function(t){return n(t)?e?e(t):!1:!0}})},function(e,t,r){var n=r(19);r(52)("isSealed",function(e){return function(t){return n(t)?e?e(t):!1:!0}})},function(e,t,r){var n=r(19);r(52)("isExtensible",function(e){return function(t){return n(t)?e?e(t):!0:!1}})},function(e,t,r){var n=r(26);r(52)("getOwnPropertyDescriptor",function(e){return function(t,r){return e(n(t),r)}})},function(e,t,r){var n=r(24);r(52)("getPrototypeOf",function(e){return function(t){return e(n(t))}})},function(e,t,r){var n=r(24);r(52)("keys",function(e){return function(t){return e(n(t))}})},function(e,t,r){r(52)("getOwnPropertyNames",function(){return r(40).get})},function(e,t,r){var n=r(5).setDesc,i=r(10),o=r(20),s=Function.prototype,a=/^\s*function ([^ (]*)/,c="name";c in s||r(11)&&n(s,c,{configurable:!0,get:function(){var e=(""+this).match(a),t=e?e[1]:"";return o(this,c)||n(this,c,i(5,t)),t}})},function(e,t,r){"use strict";var n=r(5),i=r(19),o=r(34)("hasInstance"),s=Function.prototype;o in s||n.setDesc(s,o,{value:function(e){if("function"!=typeof this||!i(e))return!1;if(!i(this.prototype))return e instanceof this;for(;e=n.getProto(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,r){"use strict";var n=r(5),i=r(7),o=r(20),s=r(21),a=r(65),c=r(12),u=r(66).trim,f="Number",h=i[f],d=h,l=h.prototype,p=s(n.create(l))==f,g="trim"in String.prototype,m=function(e){var t=a(e,!1);if("string"==typeof t&&t.length>2){t=g?t.trim():u(t,3);var r,n,i,o=t.charCodeAt(0);if(43===o||45===o){if(r=t.charCodeAt(2),88===r||120===r)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+t}for(var s,c=t.slice(2),f=0,h=c.length;h>f;f++)if(s=c.charCodeAt(f),48>s||s>i)return NaN;return parseInt(c,n)}}return+t};h(" 0o1")&&h("0b1")&&!h("+0x1")||(h=function(e){var t=arguments.length<1?0:e,r=this;return r instanceof h&&(p?c(function(){l.valueOf.call(r)}):s(r)!=f)?new d(m(t)):m(t)},n.each.call(r(11)?n.getNames(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),function(e){o(d,e)&&!o(h,e)&&n.setDesc(h,e,n.getDesc(d,e))}),h.prototype=l,l.constructor=h,r(13)(i,f,h))},function(e,t,r){var n=r(19);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,r){var n=r(6),i=r(25),o=r(12),s="	\n\x0B\f\r   ᠎             　\u2028\u2029\ufeff",a="["+s+"]",c="​",u=RegExp("^"+a+a+"*"),f=RegExp(a+a+"*$"),h=function(e,t){var r={};r[e]=t(d),n(n.P+n.F*o(function(){return!!s[e]()||c[e]()!=c}),"String",r)},d=h.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(u,"")),2&t&&(e=e.replace(f,"")),e};e.exports=h},function(e,t,r){var n=r(6);n(n.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,r){var n=r(6),i=r(7).isFinite;n(n.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,r){var n=r(6);n(n.S,"Number",{isInteger:r(70)})},function(e,t,r){var n=r(19),i=Math.floor;e.exports=function(e){return!n(e)&&isFinite(e)&&i(e)===e}},function(e,t,r){var n=r(6);n(n.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,r){var n=r(6),i=r(70),o=Math.abs;n(n.S,"Number",{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},function(e,t,r){var n=r(6);n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,r){var n=r(6);n(n.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,r){var n=r(6);n(n.S,"Number",{parseFloat:parseFloat})},function(e,t,r){var n=r(6);n(n.S,"Number",{parseInt:parseInt})},function(e,t,r){var n=r(6),i=r(78),o=Math.sqrt,s=Math.acosh;n(n.S+n.F*!(s&&710==Math.floor(s(Number.MAX_VALUE))),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+o(e-1)*o(e+1))}})},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&1e-8>e?e-e*e/2:Math.log(1+e)}},function(e,t,r){function n(e){return isFinite(e=+e)&&0!=e?0>e?-n(-e):Math.log(e+Math.sqrt(e*e+1)):e}var i=r(6);i(i.S,"Math",{asinh:n})},function(e,t,r){var n=r(6);n(n.S,"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,r){var n=r(6),i=r(82);n(n.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:0>e?-1:1}},function(e,t,r){var n=r(6);n(n.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,r){var n=r(6),i=Math.exp;n(n.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,r){var n=r(6);n(n.S,"Math",{expm1:r(86)})},function(e,t){e.exports=Math.expm1||function(e){return 0==(e=+e)?e:e>-1e-6&&1e-6>e?e+e*e/2:Math.exp(e)-1}},function(e,t,r){var n=r(6),i=r(82),o=Math.pow,s=o(2,-52),a=o(2,-23),c=o(2,127)*(2-a),u=o(2,-126),f=function(e){return e+1/s-1/s};n(n.S,"Math",{fround:function(e){var t,r,n=Math.abs(e),o=i(e);return u>n?o*f(n/u/a)*u*a:(t=(1+a/s)*n,r=t-(t-n),r>c||r!=r?o*(1/0):o*r)}})},function(e,t,r){var n=r(6),i=Math.abs;n(n.S,"Math",{hypot:function(e,t){for(var r,n,o=0,s=0,a=arguments,c=a.length,u=0;c>s;)r=i(a[s++]),r>u?(n=u/r,o=o*n*n+1,u=r):r>0?(n=r/u,o+=n*n):o+=r;return u===1/0?1/0:u*Math.sqrt(o)}})},function(e,t,r){var n=r(6),i=Math.imul;n(n.S+n.F*r(12)(function(){return-5!=i(4294967295,5)||2!=i.length}),"Math",{imul:function(e,t){var r=65535,n=+e,i=+t,o=r&n,s=r&i;return 0|o*s+((r&n>>>16)*s+o*(r&i>>>16)<<16>>>0)}})},function(e,t,r){var n=r(6);n(n.S,"Math",{log10:function(e){return Math.log(e)/Math.LN10}})},function(e,t,r){var n=r(6);n(n.S,"Math",{log1p:r(78)})},function(e,t,r){var n=r(6);n(n.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,r){var n=r(6);n(n.S,"Math",{sign:r(82)})},function(e,t,r){var n=r(6),i=r(86),o=Math.exp;n(n.S+n.F*r(12)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(o(e-1)-o(-e-1))*(Math.E/2)}})},function(e,t,r){var n=r(6),i=r(86),o=Math.exp;n(n.S,"Math",{tanh:function(e){var t=i(e=+e),r=i(-e);return t==1/0?1:r==1/0?-1:(t-r)/(o(e)+o(-e))}})},function(e,t,r){var n=r(6);n(n.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,r){var n=r(6),i=r(29),o=String.fromCharCode,s=String.fromCodePoint;n(n.S+n.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(e){for(var t,r=[],n=arguments,s=n.length,a=0;s>a;){if(t=+n[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");r.push(65536>t?o(t):o(((t-=65536)>>10)+55296,t%1024+56320))}return r.join("")}})},function(e,t,r){var n=r(6),i=r(26),o=r(30);n(n.S,"String",{raw:function(e){for(var t=i(e.raw),r=o(t.length),n=arguments,s=n.length,a=[],c=0;r>c;)a.push(String(t[c++])),s>c&&a.push(String(n[c]));return a.join("")}})},function(e,t,r){"use strict";r(66)("trim",function(e){return function(){return e(this,3)}})},function(e,t,r){"use strict";var n=r(101)(!0);r(102)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},function(e,t,r){var n=r(28),i=r(25);e.exports=function(e){return function(t,r){var o,s,a=String(i(t)),c=n(r),u=a.length;return 0>c||c>=u?e?"":void 0:(o=a.charCodeAt(c),55296>o||o>56319||c+1===u||(s=a.charCodeAt(c+1))<56320||s>57343?e?a.charAt(c):o:e?a.slice(c,c+2):(o-55296<<10)+(s-56320)+65536)}}},function(e,t,r){"use strict";var n=r(42),i=r(6),o=r(13),s=r(9),a=r(20),c=r(103),u=r(104),f=r(38),h=r(5).getProto,d=r(34)("iterator"),l=!([].keys&&"next"in[].keys()),p="@@iterator",g="keys",m="values",v=function(){return this};e.exports=function(e,t,r,y,b,w,S){u(r,t,y);var x,E,A=function(e){if(!l&&e in O)return O[e];switch(e){case g:return function(){return new r(this,e)};case m:return function(){return new r(this,e)}}return function(){return new r(this,e)}},P=t+" Iterator",T=b==m,I=!1,O=e.prototype,R=O[d]||O[p]||b&&O[b],k=R||A(b);if(R){var L=h(k.call(new e));f(L,P,!0),!n&&a(O,p)&&s(L,d,v),T&&R.name!==m&&(I=!0,k=function(){return R.call(this)})}if(n&&!S||!l&&!I&&O[d]||s(O,d,k),c[t]=k,c[P]=v,b)if(x={values:T?k:A(m),keys:w?k:A(g),entries:T?A("entries"):k},S)for(E in x)E in O||o(O,E,x[E]);else i(i.P+i.F*(l||I),t,x);return x}},function(e,t){e.exports={}},function(e,t,r){"use strict";var n=r(5),i=r(10),o=r(38),s={};r(9)(s,r(34)("iterator"),function(){return this}),e.exports=function(e,t,r){e.prototype=n.create(s,{next:i(1,r)}),o(e,t+" Iterator")}},function(e,t,r){"use strict";var n=r(6),i=r(101)(!1);n(n.P,"String",{codePointAt:function(e){return i(this,e)}})},function(e,t,r){"use strict";var n=r(6),i=r(30),o=r(107),s="endsWith",a=""[s];n(n.P+n.F*r(109)(s),"String",{endsWith:function(e){var t=o(this,e,s),r=arguments,n=r.length>1?r[1]:void 0,c=i(t.length),u=void 0===n?c:Math.min(i(n),c),f=String(e);return a?a.call(t,f,u):t.slice(u-f.length,u)===f}})},function(e,t,r){var n=r(108),i=r(25);e.exports=function(e,t,r){if(n(t))throw TypeError("String#"+r+" doesn't accept regex!");return String(i(e))}},function(e,t,r){var n=r(19),i=r(21),o=r(34)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,r){var n=r(34)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[n]=!1,!"/./"[e](t)}catch(i){}}return!0}},function(e,t,r){"use strict";var n=r(6),i=r(107),o="includes";n(n.P+n.F*r(109)(o),"String",{includes:function(e){return!!~i(this,e,o).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){var n=r(6);n(n.P,"String",{repeat:r(112)})},function(e,t,r){"use strict";var n=r(28),i=r(25);e.exports=function(e){var t=String(i(this)),r="",o=n(e);if(0>o||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(r+=t);return r}},function(e,t,r){"use strict";var n=r(6),i=r(30),o=r(107),s="startsWith",a=""[s];n(n.P+n.F*r(109)(s),"String",{startsWith:function(e){var t=o(this,e,s),r=arguments,n=i(Math.min(r.length>1?r[1]:void 0,t.length)),c=String(e);return a?a.call(t,c,n):t.slice(n,n+c.length)===c}})},function(e,t,r){"use strict";var n=r(15),i=r(6),o=r(24),s=r(115),a=r(116),c=r(30),u=r(117);i(i.S+i.F*!r(118)(function(e){Array.from(e)}),"Array",{from:function(e){var t,r,i,f,h=o(e),d="function"==typeof this?this:Array,l=arguments,p=l.length,g=p>1?l[1]:void 0,m=void 0!==g,v=0,y=u(h);if(m&&(g=n(g,p>2?l[2]:void 0,2)),void 0==y||d==Array&&a(y))for(t=c(h.length),r=new d(t);t>v;v++)r[v]=m?g(h[v],v):h[v];else for(f=y.call(h),r=new d;!(i=f.next()).done;v++)r[v]=m?s(f,g,[i.value,v],!0):i.value;return r.length=v,r}})},function(e,t,r){var n=r(23);e.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(o){var s=e["return"];throw void 0!==s&&n(s.call(e)),o}}},function(e,t,r){var n=r(103),i=r(34)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||o[i]===e)}},function(e,t,r){var n=r(50),i=r(34)("iterator"),o=r(103);e.exports=r(8).getIteratorMethod=function(e){return void 0!=e?e[i]||e["@@iterator"]||o[n(e)]:void 0}},function(e,t,r){var n=r(34)("iterator"),i=!1;try{var o=[7][n]();o["return"]=function(){i=!0},Array.from(o,function(){throw 2})}catch(s){}e.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var o=[7],s=o[n]();s.next=function(){r=!0},o[n]=function(){return s},e(o)}catch(a){}return r}},function(e,t,r){"use strict";var n=r(6);n(n.S+n.F*r(12)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments,r=t.length,n=new("function"==typeof this?this:Array)(r);r>e;)n[e]=t[e++];return n.length=r,n}})},function(e,t,r){"use strict";var n=r(121),i=r(122),o=r(103),s=r(26);e.exports=r(102)(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,r):"values"==t?i(0,e[r]):i(0,[r,e[r]])},"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},function(e,t,r){var n=r(34)("unscopables"),i=Array.prototype;void 0==i[n]&&r(9)(i,n,{}),e.exports=function(e){i[n][e]=!0}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){r(124)("Array")},function(e,t,r){"use strict";var n=r(7),i=r(5),o=r(11),s=r(34)("species");e.exports=function(e){var t=n[e];o&&t&&!t[s]&&i.setDesc(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,r){var n=r(6);n(n.P,"Array",{copyWithin:r(126)}),r(121)("copyWithin")},function(e,t,r){"use strict";
  var n=r(24),i=r(29),o=r(30);e.exports=[].copyWithin||function(e,t){var r=n(this),s=o(r.length),a=i(e,s),c=i(t,s),u=arguments,f=u.length>2?u[2]:void 0,h=Math.min((void 0===f?s:i(f,s))-c,s-a),d=1;for(a>c&&c+h>a&&(d=-1,c+=h-1,a+=h-1);h-- >0;)c in r?r[a]=r[c]:delete r[a],a+=d,c+=d;return r}},function(e,t,r){var n=r(6);n(n.P,"Array",{fill:r(128)}),r(121)("fill")},function(e,t,r){"use strict";var n=r(24),i=r(29),o=r(30);e.exports=[].fill||function(e){for(var t=n(this),r=o(t.length),s=arguments,a=s.length,c=i(a>1?s[1]:void 0,r),u=a>2?s[2]:void 0,f=void 0===u?r:i(u,r);f>c;)t[c++]=e;return t}},function(e,t,r){"use strict";var n=r(6),i=r(31)(5),o="find",s=!0;o in[]&&Array(1)[o](function(){s=!1}),n(n.P+n.F*s,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),r(121)(o)},function(e,t,r){"use strict";var n=r(6),i=r(31)(6),o="findIndex",s=!0;o in[]&&Array(1)[o](function(){s=!1}),n(n.P+n.F*s,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),r(121)(o)},function(e,t,r){var n=r(5),i=r(7),o=r(108),s=r(132),a=i.RegExp,c=a,u=a.prototype,f=/a/g,h=/a/g,d=new a(f)!==f;!r(11)||d&&!r(12)(function(){return h[r(34)("match")]=!1,a(f)!=f||a(h)==h||"/a/i"!=a(f,"i")})||(a=function(e,t){var r=o(e),n=void 0===t;return this instanceof a||!r||e.constructor!==a||!n?d?new c(r&&!n?e.source:e,t):c((r=e instanceof a)?e.source:e,r&&n?s.call(e):t):e},n.each.call(n.getNames(c),function(e){e in a||n.setDesc(a,e,{configurable:!0,get:function(){return c[e]},set:function(t){c[e]=t}})}),u.constructor=a,a.prototype=u,r(13)(i,"RegExp",a)),r(124)("RegExp")},function(e,t,r){"use strict";var n=r(23);e.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,r){var n=r(5);r(11)&&"g"!=/./g.flags&&n.setDesc(RegExp.prototype,"flags",{configurable:!0,get:r(132)})},function(e,t,r){r(135)("match",1,function(e,t){return function(r){"use strict";var n=e(this),i=void 0==r?void 0:r[t];return void 0!==i?i.call(r,n):new RegExp(r)[t](String(n))}})},function(e,t,r){"use strict";var n=r(9),i=r(13),o=r(12),s=r(25),a=r(34);e.exports=function(e,t,r){var c=a(e),u=""[e];o(function(){var t={};return t[c]=function(){return 7},7!=""[e](t)})&&(i(String.prototype,e,r(s,c,u)),n(RegExp.prototype,c,2==t?function(e,t){return u.call(e,this,t)}:function(e){return u.call(e,this)}))}},function(e,t,r){r(135)("replace",2,function(e,t,r){return function(n,i){"use strict";var o=e(this),s=void 0==n?void 0:n[t];return void 0!==s?s.call(n,o,i):r.call(String(o),n,i)}})},function(e,t,r){r(135)("search",1,function(e,t){return function(r){"use strict";var n=e(this),i=void 0==r?void 0:r[t];return void 0!==i?i.call(r,n):new RegExp(r)[t](String(n))}})},function(e,t,r){r(135)("split",2,function(e,t,r){return function(n,i){"use strict";var o=e(this),s=void 0==n?void 0:n[t];return void 0!==s?s.call(n,o,i):r.call(String(o),n,i)}})},function(e,t,r){"use strict";var n,i=r(5),o=r(42),s=r(7),a=r(15),c=r(50),u=r(6),f=r(19),h=r(23),d=r(16),l=r(140),p=r(141),g=r(48).set,m=r(46),v=r(34)("species"),y=r(142),b=r(143),w="Promise",S=s.process,x="process"==c(S),E=s[w],A=function(e){var t=new E(function(){});return e&&(t.constructor=Object),E.resolve(t)===t},P=function(){function e(t){var r=new E(t);return g(r,e.prototype),r}var t=!1;try{if(t=E&&E.resolve&&A(),g(e,E),e.prototype=i.create(E.prototype,{constructor:{value:e}}),e.resolve(5).then(function(){})instanceof e||(t=!1),t&&r(11)){var n=!1;E.resolve(i.setDesc({},"then",{get:function(){n=!0}})),t=n}}catch(o){t=!1}return t}(),T=function(e,t){return o&&e===E&&t===n?!0:m(e,t)},I=function(e){var t=h(e)[v];return void 0!=t?t:e},O=function(e){var t;return f(e)&&"function"==typeof(t=e.then)?t:!1},R=function(e){var t,r;this.promise=new e(function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n}),this.resolve=d(t),this.reject=d(r)},k=function(e){try{e()}catch(t){return{error:t}}},L=function(e,t){if(!e.n){e.n=!0;var r=e.c;b(function(){for(var n=e.v,i=1==e.s,o=0,a=function(t){var r,o,s=i?t.ok:t.fail,a=t.resolve,c=t.reject;try{s?(i||(e.h=!0),r=s===!0?n:s(n),r===t.promise?c(TypeError("Promise-chain cycle")):(o=O(r))?o.call(r,a,c):a(r)):c(n)}catch(u){c(u)}};r.length>o;)a(r[o++]);r.length=0,e.n=!1,t&&setTimeout(function(){var t,r,i=e.p;N(i)&&(x?S.emit("unhandledRejection",n,i):(t=s.onunhandledrejection)?t({promise:i,reason:n}):(r=s.console)&&r.error&&r.error("Unhandled promise rejection",n)),e.a=void 0},1)})}},N=function(e){var t,r=e._d,n=r.a||r.c,i=0;if(r.h)return!1;for(;n.length>i;)if(t=n[i++],t.fail||!N(t.promise))return!1;return!0},j=function(e){var t=this;t.d||(t.d=!0,t=t.r||t,t.v=e,t.s=2,t.a=t.c.slice(),L(t,!0))},F=function(e){var t,r=this;if(!r.d){r.d=!0,r=r.r||r;try{if(r.p===e)throw TypeError("Promise can't be resolved itself");(t=O(e))?b(function(){var n={r:r,d:!1};try{t.call(e,a(F,n,1),a(j,n,1))}catch(i){j.call(n,i)}}):(r.v=e,r.s=1,L(r,!1))}catch(n){j.call({r:r,d:!1},n)}}};P||(E=function(e){d(e);var t=this._d={p:l(this,E,w),c:[],a:void 0,s:0,d:!1,v:void 0,h:!1,n:!1};try{e(a(F,t,1),a(j,t,1))}catch(r){j.call(t,r)}},r(145)(E.prototype,{then:function(e,t){var r=new R(y(this,E)),n=r.promise,i=this._d;return r.ok="function"==typeof e?e:!0,r.fail="function"==typeof t&&t,i.c.push(r),i.a&&i.a.push(r),i.s&&L(i,!1),n},"catch":function(e){return this.then(void 0,e)}})),u(u.G+u.W+u.F*!P,{Promise:E}),r(38)(E,w),r(124)(w),n=r(8)[w],u(u.S+u.F*!P,w,{reject:function(e){var t=new R(this),r=t.reject;return r(e),t.promise}}),u(u.S+u.F*(!P||A(!0)),w,{resolve:function(e){if(e instanceof E&&T(e.constructor,this))return e;var t=new R(this),r=t.resolve;return r(e),t.promise}}),u(u.S+u.F*!(P&&r(118)(function(e){E.all(e)["catch"](function(){})})),w,{all:function(e){var t=I(this),r=new R(t),n=r.resolve,o=r.reject,s=[],a=k(function(){p(e,!1,s.push,s);var r=s.length,a=Array(r);r?i.each.call(s,function(e,i){var s=!1;t.resolve(e).then(function(e){s||(s=!0,a[i]=e,--r||n(a))},o)}):n(a)});return a&&o(a.error),r.promise},race:function(e){var t=I(this),r=new R(t),n=r.reject,i=k(function(){p(e,!1,function(e){t.resolve(e).then(r.resolve,n)})});return i&&n(i.error),r.promise}})},function(e,t){e.exports=function(e,t,r){if(!(e instanceof t))throw TypeError(r+": use the 'new' operator!");return e}},function(e,t,r){var n=r(15),i=r(115),o=r(116),s=r(23),a=r(30),c=r(117);e.exports=function(e,t,r,u){var f,h,d,l=c(e),p=n(r,u,t?2:1),g=0;if("function"!=typeof l)throw TypeError(e+" is not iterable!");if(o(l))for(f=a(e.length);f>g;g++)t?p(s(h=e[g])[0],h[1]):p(e[g]);else for(d=l.call(e);!(h=d.next()).done;)i(d,p,h.value,t)}},function(e,t,r){var n=r(23),i=r(16),o=r(34)("species");e.exports=function(e,t){var r,s=n(e).constructor;return void 0===s||void 0==(r=n(s)[o])?t:i(r)}},function(e,t,r){var n,i,o,s=r(7),a=r(144).set,c=s.MutationObserver||s.WebKitMutationObserver,u=s.process,f=s.Promise,h="process"==r(21)(u),d=function(){var e,t,r;for(h&&(e=u.domain)&&(u.domain=null,e.exit());n;)t=n.domain,r=n.fn,t&&t.enter(),r(),t&&t.exit(),n=n.next;i=void 0,e&&e.enter()};if(h)o=function(){u.nextTick(d)};else if(c){var l=1,p=document.createTextNode("");new c(d).observe(p,{characterData:!0}),o=function(){p.data=l=-l}}else o=f&&f.resolve?function(){f.resolve().then(d)}:function(){a.call(s,d)};e.exports=function(e){var t={fn:e,next:void 0,domain:h&&u.domain};i&&(i.next=t),n||(n=t,o()),i=t}},function(e,t,r){var n,i,o,s=r(15),a=r(22),c=r(17),u=r(18),f=r(7),h=f.process,d=f.setImmediate,l=f.clearImmediate,p=f.MessageChannel,g=0,m={},v="onreadystatechange",y=function(){var e=+this;if(m.hasOwnProperty(e)){var t=m[e];delete m[e],t()}},b=function(e){y.call(e.data)};d&&l||(d=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return m[++g]=function(){a("function"==typeof e?e:Function(e),t)},n(g),g},l=function(e){delete m[e]},"process"==r(21)(h)?n=function(e){h.nextTick(s(y,e,1))}:p?(i=new p,o=i.port2,i.port1.onmessage=b,n=s(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(n=function(e){f.postMessage(e+"","*")},f.addEventListener("message",b,!1)):n=v in u("script")?function(e){c.appendChild(u("script"))[v]=function(){c.removeChild(this),y.call(e)}}:function(e){setTimeout(s(y,e,1),0)}),e.exports={set:d,clear:l}},function(e,t,r){var n=r(13);e.exports=function(e,t){for(var r in t)n(e,r,t[r]);return e}},function(e,t,r){"use strict";var n=r(147);r(148)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=n.getEntry(this,e);return t&&t.v},set:function(e,t){return n.def(this,0===e?0:e,t)}},n,!0)},function(e,t,r){"use strict";var n=r(5),i=r(9),o=r(145),s=r(15),a=r(140),c=r(25),u=r(141),f=r(102),h=r(122),d=r(14)("id"),l=r(20),p=r(19),g=r(124),m=r(11),v=Object.isExtensible||p,y=m?"_s":"size",b=0,w=function(e,t){if(!p(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!l(e,d)){if(!v(e))return"F";if(!t)return"E";i(e,d,++b)}return"O"+e[d]},S=function(e,t){var r,n=w(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};e.exports={getConstructor:function(e,t,r,i){var f=e(function(e,o){a(e,f,t),e._i=n.create(null),e._f=void 0,e._l=void 0,e[y]=0,void 0!=o&&u(o,r,e[i],e)});return o(f.prototype,{clear:function(){for(var e=this,t=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete t[r.i];e._f=e._l=void 0,e[y]=0},"delete":function(e){var t=this,r=S(t,e);if(r){var n=r.n,i=r.p;delete t._i[r.i],r.r=!0,i&&(i.n=n),n&&(n.p=i),t._f==r&&(t._f=n),t._l==r&&(t._l=i),t[y]--}return!!r},forEach:function(e){for(var t,r=s(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(r(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!S(this,e)}}),m&&n.setDesc(f.prototype,"size",{get:function(){return c(this[y])}}),f},def:function(e,t,r){var n,i,o=S(e,t);return o?o.v=r:(e._l=o={i:i=w(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=o),n&&(n.n=o),e[y]++,"F"!==i&&(e._i[i]=o)),e},getEntry:S,setStrong:function(e,t,r){f(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,r=e._l;r&&r.r;)r=r.p;return e._t&&(e._l=r=r?r.n:e._t._f)?"keys"==t?h(0,r.k):"values"==t?h(0,r.v):h(0,[r.k,r.v]):(e._t=void 0,h(1))},r?"entries":"values",!r,!0),g(t)}}},function(e,t,r){"use strict";var n=r(7),i=r(6),o=r(13),s=r(145),a=r(141),c=r(140),u=r(19),f=r(12),h=r(118),d=r(38);e.exports=function(e,t,r,l,p,g){var m=n[e],v=m,y=p?"set":"add",b=v&&v.prototype,w={},S=function(e){var t=b[e];o(b,e,"delete"==e?function(e){return g&&!u(e)?!1:t.call(this,0===e?0:e)}:"has"==e?function(e){return g&&!u(e)?!1:t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!u(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,r){return t.call(this,0===e?0:e,r),this})};if("function"==typeof v&&(g||b.forEach&&!f(function(){(new v).entries().next()}))){var x,E=new v,A=E[y](g?{}:-0,1)!=E,P=f(function(){E.has(1)}),T=h(function(e){new v(e)});T||(v=t(function(t,r){c(t,v,e);var n=new m;return void 0!=r&&a(r,p,n[y],n),n}),v.prototype=b,b.constructor=v),g||E.forEach(function(e,t){x=1/t===-(1/0)}),(P||x)&&(S("delete"),S("has"),p&&S("get")),(x||A)&&S(y),g&&b.clear&&delete b.clear}else v=l.getConstructor(t,e,p,y),s(v.prototype,r);return d(v,e),w[e]=v,i(i.G+i.W+i.F*(v!=m),w),g||l.setStrong(v,e,p),v}},function(e,t,r){"use strict";var n=r(147);r(148)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(this,e=0===e?0:e,e)}},n)},function(e,t,r){"use strict";var n=r(5),i=r(13),o=r(151),s=r(19),a=r(20),c=o.frozenStore,u=o.WEAK,f=Object.isExtensible||s,h={},d=r(148)("WeakMap",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){if(s(e)){if(!f(e))return c(this).get(e);if(a(e,u))return e[u][this._i]}},set:function(e,t){return o.def(this,e,t)}},o,!0,!0);7!=(new d).set((Object.freeze||Object)(h),7).get(h)&&n.each.call(["delete","has","get","set"],function(e){var t=d.prototype,r=t[e];i(t,e,function(t,n){if(s(t)&&!f(t)){var i=c(this)[e](t,n);return"set"==e?this:i}return r.call(this,t,n)})})},function(e,t,r){"use strict";var n=r(9),i=r(145),o=r(23),s=r(19),a=r(140),c=r(141),u=r(31),f=r(20),h=r(14)("weak"),d=Object.isExtensible||s,l=u(5),p=u(6),g=0,m=function(e){return e._l||(e._l=new v)},v=function(){this.a=[]},y=function(e,t){return l(e.a,function(e){return e[0]===t})};v.prototype={get:function(e){var t=y(this,e);return t?t[1]:void 0},has:function(e){return!!y(this,e)},set:function(e,t){var r=y(this,e);r?r[1]=t:this.a.push([e,t])},"delete":function(e){var t=p(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,r,n){var o=e(function(e,i){a(e,o,t),e._i=g++,e._l=void 0,void 0!=i&&c(i,r,e[n],e)});return i(o.prototype,{"delete":function(e){return s(e)?d(e)?f(e,h)&&f(e[h],this._i)&&delete e[h][this._i]:m(this)["delete"](e):!1},has:function(e){return s(e)?d(e)?f(e,h)&&f(e[h],this._i):m(this).has(e):!1}}),o},def:function(e,t,r){return d(o(t))?(f(t,h)||n(t,h,{}),t[h][e._i]=r):m(e).set(t,r),e},frozenStore:m,WEAK:h}},function(e,t,r){"use strict";var n=r(151);r(148)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(this,e,!0)}},n,!1,!0)},function(e,t,r){var n=r(6),i=Function.apply;n(n.S,"Reflect",{apply:function(e,t,r){return i.call(e,t,r)}})},function(e,t,r){var n=r(5),i=r(6),o=r(16),s=r(23),a=r(19),c=Function.bind||r(8).Function.prototype.bind;i(i.S+i.F*r(12)(function(){function e(){}return!(Reflect.construct(function(){},[],e)instanceof e)}),"Reflect",{construct:function(e,t){o(e);var r=arguments.length<3?e:o(arguments[2]);if(e==r){if(void 0!=t)switch(s(t).length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var i=[null];return i.push.apply(i,t),new(c.apply(e,i))}var u=r.prototype,f=n.create(a(u)?u:Object.prototype),h=Function.apply.call(e,f,t);return a(h)?h:f}})},function(e,t,r){var n=r(5),i=r(6),o=r(23);i(i.S+i.F*r(12)(function(){Reflect.defineProperty(n.setDesc({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(e,t,r){o(e);try{return n.setDesc(e,t,r),!0}catch(i){return!1}}})},function(e,t,r){var n=r(6),i=r(5).getDesc,o=r(23);n(n.S,"Reflect",{deleteProperty:function(e,t){var r=i(o(e),t);return r&&!r.configurable?!1:delete e[t]}})},function(e,t,r){"use strict";var n=r(6),i=r(23),o=function(e){this._t=i(e),this._i=0;var t,r=this._k=[];for(t in e)r.push(t)};r(104)(o,"Object",function(){var e,t=this,r=t._k;do if(t._i>=r.length)return{value:void 0,done:!0};while(!((e=r[t._i++])in t._t));return{value:e,done:!1}}),n(n.S,"Reflect",{enumerate:function(e){return new o(e)}})},function(e,t,r){function n(e,t){var r,s,u=arguments.length<3?e:arguments[2];return c(e)===u?e[t]:(r=i.getDesc(e,t))?o(r,"value")?r.value:void 0!==r.get?r.get.call(u):void 0:a(s=i.getProto(e))?n(s,t,u):void 0}var i=r(5),o=r(20),s=r(6),a=r(19),c=r(23);s(s.S,"Reflect",{get:n})},function(e,t,r){var n=r(5),i=r(6),o=r(23);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return n.getDesc(o(e),t)}})},function(e,t,r){var n=r(6),i=r(5).getProto,o=r(23);n(n.S,"Reflect",{getPrototypeOf:function(e){return i(o(e))}})},function(e,t,r){var n=r(6);n(n.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,r){var n=r(6),i=r(23),o=Object.isExtensible;n(n.S,"Reflect",{isExtensible:function(e){return i(e),o?o(e):!0}})},function(e,t,r){var n=r(6);n(n.S,"Reflect",{ownKeys:r(164)})},function(e,t,r){var n=r(5),i=r(23),o=r(7).Reflect;e.exports=o&&o.ownKeys||function(e){var t=n.getNames(i(e)),r=n.getSymbols;return r?t.concat(r(e)):t}},function(e,t,r){var n=r(6),i=r(23),o=Object.preventExtensions;n(n.S,"Reflect",{preventExtensions:function(e){i(e);try{return o&&o(e),!0}catch(t){return!1}}})},function(e,t,r){function n(e,t,r){var s,f,h=arguments.length<4?e:arguments[3],d=i.getDesc(c(e),t);if(!d){if(u(f=i.getProto(e)))return n(f,t,r,h);d=a(0)}return o(d,"value")?d.writable!==!1&&u(h)?(s=i.getDesc(h,t)||a(0),s.value=r,i.setDesc(h,t,s),!0):!1:void 0===d.set?!1:(d.set.call(h,r),!0)}var i=r(5),o=r(20),s=r(6),a=r(10),c=r(23),u=r(19);s(s.S,"Reflect",{set:n})},function(e,t,r){var n=r(6),i=r(48);i&&n(n.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(r){return!1}}})},function(e,t,r){"use strict";var n=r(6),i=r(36)(!0);n(n.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),r(121)("includes")},function(e,t,r){"use strict";var n=r(6),i=r(101)(!0);n(n.P,"String",{at:function(e){return i(this,e)}})},function(e,t,r){"use strict";var n=r(6),i=r(171);n(n.P,"String",{padLeft:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,r){var n=r(30),i=r(112),o=r(25);e.exports=function(e,t,r,s){var a=String(o(e)),c=a.length,u=void 0===r?" ":String(r),f=n(t);if(c>=f)return a;""==u&&(u=" ");var h=f-c,d=i.call(u,Math.ceil(h/u.length));return d.length>h&&(d=d.slice(0,h)),s?d+a:a+d}},function(e,t,r){"use strict";var n=r(6),i=r(171);n(n.P,"String",{padRight:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,r){"use strict";r(66)("trimLeft",function(e){return function(){return e(this,1)}})},function(e,t,r){"use strict";r(66)("trimRight",function(e){return function(){return e(this,2)}})},function(e,t,r){var n=r(6),i=r(176)(/[\\^$*+?.()|[\]{}]/g,"\\$&");n(n.S,"RegExp",{escape:function(e){return i(e)}})},function(e,t){e.exports=function(e,t){var r=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,r)}}},function(e,t,r){var n=r(5),i=r(6),o=r(164),s=r(26),a=r(10);i(i.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,r,i=s(e),c=n.setDesc,u=n.getDesc,f=o(i),h={},d=0;f.length>d;)r=u(i,t=f[d++]),t in h?c(h,t,a(0,r)):h[t]=r;return h}})},function(e,t,r){var n=r(6),i=r(179)(!1);n(n.S,"Object",{values:function(e){return i(e)}})},function(e,t,r){var n=r(5),i=r(26),o=n.isEnum;e.exports=function(e){return function(t){for(var r,s=i(t),a=n.getKeys(s),c=a.length,u=0,f=[];c>u;)o.call(s,r=a[u++])&&f.push(e?[r,s[r]]:s[r]);return f}}},function(e,t,r){var n=r(6),i=r(179)(!0);n(n.S,"Object",{entries:function(e){return i(e)}})},function(e,t,r){var n=r(6);n(n.P,"Map",{toJSON:r(182)("Map")})},function(e,t,r){var n=r(141),i=r(50);e.exports=function(e){return function(){if(i(this)!=e)throw TypeError(e+"#toJSON isn't generic");var t=[];return n(this,!1,t.push,t),t}}},function(e,t,r){var n=r(6);n(n.P,"Set",{toJSON:r(182)("Set")})},function(e,t,r){var n=r(5),i=r(6),o=r(15),s=r(8).Array||Array,a={},c=function(e,t){n.each.call(e.split(","),function(e){void 0==t&&e in s?a[e]=s[e]:e in[]&&(a[e]=o(Function.call,[][e],t))})};c("pop,reverse,shift,keys,values,entries",1),c("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),c("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill"),i(i.S,"Array",a)},function(e,t,r){var n=r(7),i=r(6),o=r(22),s=r(186),a=n.navigator,c=!!a&&/MSIE .\./.test(a.userAgent),u=function(e){return c?function(t,r){return e(o(s,[].slice.call(arguments,2),"function"==typeof t?t:Function(t)),r)}:e};i(i.G+i.B+i.F*c,{setTimeout:u(n.setTimeout),setInterval:u(n.setInterval)})},function(e,t,r){"use strict";var n=r(187),i=r(22),o=r(16);e.exports=function(){for(var e=o(this),t=arguments.length,r=Array(t),s=0,_=n._,a=!1;t>s;)(r[s]=arguments[s++])===_&&(a=!0);return function(){var n,o=this,s=arguments,c=s.length,u=0,f=0;if(!a&&!c)return i(e,r,o);if(n=r.slice(),a)for(;t>u;u++)n[u]===_&&(n[u]=s[f++]);for(;c>f;)n.push(s[f++]);return i(e,n,o)}}},function(e,t,r){e.exports=r(7)},function(e,t,r){var n=r(6),i=r(144);n(n.G+n.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,r){r(120);var n=r(7),i=r(9),o=r(103),s=r(34)("iterator"),a=n.NodeList,c=n.HTMLCollection,u=a&&a.prototype,f=c&&c.prototype,h=o.NodeList=o.HTMLCollection=o.Array;u&&!u[s]&&i(u,s,h),f&&!f[s]&&i(f,s,h)},function(e,t,r){(function(t,r){!function(t){"use strict";function n(e,t,r,n){var i=Object.create((t||o).prototype),s=new p(n||[]);return i._invoke=h(e,r,s),i}function i(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(n){return{type:"throw",arg:n}}}function o(){}function s(){}function a(){}function c(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function u(e){this.arg=e}function f(e){function t(t,r){var n=e[t](r),i=n.value;return i instanceof u?Promise.resolve(i.arg).then(o,s):Promise.resolve(i).then(function(e){return n.value=e,n})}function n(e,r){function n(){return t(e,r)}return i=i?i.then(n,n):new Promise(function(e){e(n())})}"object"==typeof r&&r.domain&&(t=r.domain.bind(t));var i,o=t.bind(e,"next"),s=t.bind(e,"throw");t.bind(e,"return");this._invoke=n}function h(e,t,r){var n=x;return function(o,s){if(n===A)throw new Error("Generator is already running");if(n===P){if("throw"===o)throw s;return m()}for(;;){var a=r.delegate;if(a){if("return"===o||"throw"===o&&a.iterator[o]===v){r.delegate=null;var c=a.iterator["return"];if(c){var u=i(c,a.iterator,s);if("throw"===u.type){o="throw",s=u.arg;continue}}if("return"===o)continue}var u=i(a.iterator[o],a.iterator,s);if("throw"===u.type){r.delegate=null,o="throw",s=u.arg;continue}o="next",s=v;var f=u.arg;if(!f.done)return n=E,f;r[a.resultName]=f.value,r.next=a.nextLoc,r.delegate=null}if("next"===o)r._sent=s,n===E?r.sent=s:r.sent=v;else if("throw"===o){if(n===x)throw n=P,s;r.dispatchException(s)&&(o="next",s=v)}else"return"===o&&r.abrupt("return",s);n=A;var u=i(e,t,r);if("normal"===u.type){n=r.done?P:E;var f={value:u.arg,done:r.done};if(u.arg!==T)return f;r.delegate&&"next"===o&&(s=v)}else"throw"===u.type&&(n=P,o="throw",s=u.arg)}}}function d(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function l(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function p(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(d,this),this.reset(!0)}function g(e){if(e){var t=e[b];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function i(){for(;++r<e.length;)if(y.call(e,r))return i.value=e[r],i.done=!1,i;return i.value=v,i.done=!0,i};return n.next=n}}return{next:m}}function m(){return{value:v,done:!0}}var v,y=Object.prototype.hasOwnProperty,b="function"==typeof Symbol&&Symbol.iterator||"@@iterator",w="object"==typeof e,S=t.regeneratorRuntime;if(S)return void(w&&(e.exports=S));S=t.regeneratorRuntime=w?e.exports:{},S.wrap=n;var x="suspendedStart",E="suspendedYield",A="executing",P="completed",T={},I=a.prototype=o.prototype;s.prototype=I.constructor=a,a.constructor=s,s.displayName="GeneratorFunction",S.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return t?t===s||"GeneratorFunction"===(t.displayName||t.name):!1},S.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,a):e.__proto__=a,e.prototype=Object.create(I),e},S.awrap=function(e){return new u(e)},c(f.prototype),S.async=function(e,t,r,i){var o=new f(n(e,t,r,i));return S.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},c(I),I[b]=function(){return this},I.toString=function(){return"[object Generator]"},S.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},S.values=g,p.prototype={constructor:p,reset:function(e){if(this.prev=0,this.next=0,this.sent=v,this.done=!1,this.delegate=null,this.tryEntries.forEach(l),!e)for(var t in this)"t"===t.charAt(0)&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=v)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,n){return o.type="throw",o.arg=e,r.next=t,!!n}if(this.done)throw e;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var s=y.call(i,"catchLoc"),a=y.call(i,"finallyLoc");if(s&&a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&y.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?this.next=i.finallyLoc:this.complete(o),T},complete:function(e,t){if("throw"===e.type)throw e.arg;"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=e.arg,this.next="end"):"normal"===e.type&&t&&(this.next=t)},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),l(r),T}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;l(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:g(e),resultName:t,nextLoc:r},T}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(t,function(){return this}(),r(191))},function(e,t){function r(){u=!1,s.length?c=s.concat(c):f=-1,c.length&&n()}function n(){if(!u){var e=setTimeout(r);u=!0;for(var t=c.length;t;){for(s=c,c=[];++f<t;)s&&s[f].run();f=-1,t=c.length}s=null,u=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function o(){}var s,a=e.exports={},c=[],u=!1,f=-1;a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new i(e,t)),1!==c.length||u||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t){e.exports=_},function(e,t){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}e.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,r,i,a,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[e],s(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(o(r))for(a=Array.prototype.slice.call(arguments,1),u=r.slice(),i=u.length,c=0;i>c;c++)u[c].apply(this,a);return!0},r.prototype.addListener=function(e,t){var i;if(!n(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(i=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function r(){this.removeListener(e,r),i||(i=!0,t.apply(this,arguments))}if(!n(t))throw TypeError("listener must be a function");var i=!1;return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var r,i,s,a;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],s=r.length,i=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(a=s;a-- >0;)if(r[a]===t||r[a].listener&&r[a].listener===t){i=a;break}if(0>i)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],n(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,r){"use strict";var n=r(195);e.exports={Connection:r(269),constants:r(310),errors:r(277),validate:r(312),txFlags:r(311).txFlags,serverInfo:r(437),dropsToXrp:n.dropsToXrp,xrpToDrops:n.xrpToDrops,toRippledAmount:n.toRippledAmount,generateAddress:n.generateAddress,generateAddressAPI:n.generateAddressAPI,removeUndefined:n.removeUndefined,convertKeysFromSnakeCaseToCamelCase:n.convertKeysFromSnakeCaseToCamelCase,iso8601ToRippleTime:n.iso8601ToRippleTime,rippleTimeToISO8601:n.rippleTimeToISO8601,isValidSecret:n.isValidSecret}},function(e,t,r){"use strict";function n(e){try{return m(e),!0}catch(t){return!1}}function i(e){return new p(e).dividedBy(1e6).toString()}function o(e){return new p(e).times(1e6).floor().toString()}function s(e){return"XRP"===e.currency?o(e.value):{currency:e.currency,issuer:e.counterparty?e.counterparty:e.issuer?e.issuer:void 0,value:e.value}}function a(e){if("object"===("undefined"==typeof e?"undefined":l(e))){var t=function(){var t=void 0;return{v:_.reduce(e,function(e,r,n){t=n;var i=/([a-zA-Z]_[a-zA-Z])/g;return i.test(n)&&(t=n.replace(i,function(e){return e[0]+e[2].toUpperCase()})),e[t]=a(r),e},{})}}();if("object"===("undefined"==typeof t?"undefined":l(t)))return t.v}return e}function c(e){return _.omit(e,_.isUndefined)}function u(e){return 1e3*(e+946684800)}function f(e){return Math.round(e/1e3)-946684800}function h(e){return new Date(u(e)).toISOString()}function d(e){return f(Date.parse(e))}var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},_=r(192),p=r(196),g=r(197),m=g.deriveKeypair;e.exports={dropsToXrp:i,xrpToDrops:o,toRippledAmount:s,convertKeysFromSnakeCaseToCamelCase:a,removeUndefined:c,rippleTimeToISO8601:h,iso8601ToRippleTime:d,isValidSecret:n}},function(e,t,r){var n;!function(i){
  "use strict";function o(e){function t(e,n){var i,o,s,a,c,u,f=this;if(!(f instanceof t))return H&&N(26,"constructor call without new",e),new t(e,n);if(null!=n&&X(n,2,64,M,"base")){if(n=0|n,u=e+"",10==n)return f=new t(e instanceof t?e:u),j(f,q+f.e+1,z);if((a="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(i="["+A.slice(0,n)+"]+")+"(?:\\."+i+")?$",37>n?"i":"").test(u))return m(f,u,a,n);a?(f.s=0>1/e?(u=u.slice(1),-1):1,H&&u.replace(/^0\.0*|\./,"").length>15&&N(M,E,e),a=!1):f.s=45===u.charCodeAt(0)?(u=u.slice(1),-1):1,u=r(u,10,n,f.s)}else{if(e instanceof t)return f.s=e.s,f.e=e.e,f.c=(e=e.c)?e.slice():e,void(M=0);if((a="number"==typeof e)&&0*e==0){if(f.s=0>1/e?(e=-e,-1):1,e===~~e){for(o=0,s=e;s>=10;s/=10,o++);return f.e=o,f.c=[e],void(M=0)}u=e+""}else{if(!y.test(u=e+""))return m(f,u,a);f.s=45===u.charCodeAt(0)?(u=u.slice(1),-1):1}}for((o=u.indexOf("."))>-1&&(u=u.replace(".","")),(s=u.search(/e/i))>0?(0>o&&(o=s),o+=+u.slice(s+1),u=u.substring(0,s)):0>o&&(o=u.length),s=0;48===u.charCodeAt(s);s++);for(c=u.length;48===u.charCodeAt(--c););if(u=u.slice(s,c+1))if(c=u.length,a&&H&&c>15&&N(M,E,f.s*e),o=o-s-1,o>$)f.c=f.e=null;else if(V>o)f.c=[f.e=0];else{if(f.e=o,f.c=[],s=(o+1)%T,0>o&&(s+=T),c>s){for(s&&f.c.push(+u.slice(0,s)),c-=T;c>s;)f.c.push(+u.slice(s,s+=T));u=u.slice(s),s=T-u.length}else s-=c;for(;s--;u+="0");f.c.push(+u)}else f.c=[f.e=0];M=0}function r(e,r,n,i){var o,s,c,u,f,d,p,g=e.indexOf("."),m=q,v=z;for(37>n&&(e=e.toLowerCase()),g>=0&&(c=G,G=0,e=e.replace(".",""),p=new t(n),f=p.pow(e.length-g),G=c,p.c=h(l(a(f.c),f.e),10,r),p.e=p.c.length),d=h(e,n,r),s=c=d.length;0==d[--c];d.pop());if(!d[0])return"0";if(0>g?--s:(f.c=d,f.e=s,f.s=i,f=F(f,p,m,v,r),d=f.c,u=f.r,s=f.e),o=s+m+1,g=d[o],c=r/2,u=u||0>o||null!=d[o+1],u=4>v?(null!=g||u)&&(0==v||v==(f.s<0?3:2)):g>c||g==c&&(4==v||u||6==v&&1&d[o-1]||v==(f.s<0?8:7)),1>o||!d[0])e=u?l("1",-m):"0";else{if(d.length=o,u)for(--r;++d[--o]>r;)d[o]=0,o||(++s,d.unshift(1));for(c=d.length;!d[--c];);for(g=0,e="";c>=g;e+=A.charAt(d[g++]));e=l(e,s)}return e}function n(e,r,n,i){var o,s,c,u,f;if(n=null!=n&&X(n,0,8,i,x)?0|n:z,!e.c)return e.toString();if(o=e.c[0],c=e.e,null==r)f=a(e.c),f=19==i||24==i&&D>=c?d(f,c):l(f,c);else if(e=j(new t(e),r,n),s=e.e,f=a(e.c),u=f.length,19==i||24==i&&(s>=r||D>=s)){for(;r>u;f+="0",u++);f=d(f,s)}else if(r-=c,f=l(f,s),s+1>u){if(--r>0)for(f+=".";r--;f+="0");}else if(r+=s-u,r>0)for(s+1==u&&(f+=".");r--;f+="0");return e.s<0&&o?"-"+f:f}function i(e,r){var n,i,o=0;for(f(e[0])&&(e=e[0]),n=new t(e[0]);++o<e.length;){if(i=new t(e[o]),!i.s){n=i;break}r.call(n,i)&&(n=i)}return n}function g(e,t,r,n,i){return(t>e||e>r||e!=p(e))&&N(n,(i||"decimal places")+(t>e||e>r?" out of range":" not an integer"),e),!0}function L(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*T-1)>$?e.c=e.e=null:V>r?e.c=[e.e=0]:(e.e=r,e.c=t),e}function N(e,t,r){var n=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][e]+"() "+t+": "+r);throw n.name="BigNumber Error",M=0,n}function j(e,t,r,n){var i,o,s,a,c,u,f,h=e.c,d=O;if(h){e:{for(i=1,a=h[0];a>=10;a/=10,i++);if(o=t-i,0>o)o+=T,s=t,c=h[u=0],f=c/d[i-s-1]%10|0;else if(u=b((o+1)/T),u>=h.length){if(!n)break e;for(;h.length<=u;h.push(0));c=f=0,i=1,o%=T,s=o-T+1}else{for(c=a=h[u],i=1;a>=10;a/=10,i++);o%=T,s=o-T+i,f=0>s?0:c/d[i-s-1]%10|0}if(n=n||0>t||null!=h[u+1]||(0>s?c:c%d[i-s-1]),n=4>r?(f||n)&&(0==r||r==(e.s<0?3:2)):f>5||5==f&&(4==r||n||6==r&&(o>0?s>0?c/d[i-s]:0:h[u-1])%10&1||r==(e.s<0?8:7)),1>t||!h[0])return h.length=0,n?(t-=e.e+1,h[0]=d[(T-t%T)%T],e.e=-t||0):h[0]=e.e=0,e;if(0==o?(h.length=u,a=1,u--):(h.length=u+1,a=d[T-o],h[u]=s>0?w(c/d[i-s]%d[s])*a:0),n)for(;;){if(0==u){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&&(e.e++,h[0]==P&&(h[0]=1));break}if(h[u]+=a,h[u]!=P)break;h[u--]=0,a=1}for(o=h.length;0===h[--o];h.pop());}e.e>$?e.c=e.e=null:e.e<V&&(e.c=[e.e=0])}return e}var F,M=0,B=t.prototype,C=new t(1),q=20,z=4,D=-7,U=21,V=-1e7,$=1e7,H=!0,X=g,K=!1,J=1,G=100,W={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0};return t.another=o,t.ROUND_UP=0,t.ROUND_DOWN=1,t.ROUND_CEIL=2,t.ROUND_FLOOR=3,t.ROUND_HALF_UP=4,t.ROUND_HALF_DOWN=5,t.ROUND_HALF_EVEN=6,t.ROUND_HALF_CEIL=7,t.ROUND_HALF_FLOOR=8,t.EUCLID=9,t.config=function(){var e,t,r=0,n={},i=arguments,o=i[0],s=o&&"object"==typeof o?function(){return o.hasOwnProperty(t)?null!=(e=o[t]):void 0}:function(){return i.length>r?null!=(e=i[r++]):void 0};return s(t="DECIMAL_PLACES")&&X(e,0,k,2,t)&&(q=0|e),n[t]=q,s(t="ROUNDING_MODE")&&X(e,0,8,2,t)&&(z=0|e),n[t]=z,s(t="EXPONENTIAL_AT")&&(f(e)?X(e[0],-k,0,2,t)&&X(e[1],0,k,2,t)&&(D=0|e[0],U=0|e[1]):X(e,-k,k,2,t)&&(D=-(U=0|(0>e?-e:e)))),n[t]=[D,U],s(t="RANGE")&&(f(e)?X(e[0],-k,-1,2,t)&&X(e[1],1,k,2,t)&&(V=0|e[0],$=0|e[1]):X(e,-k,k,2,t)&&(0|e?V=-($=0|(0>e?-e:e)):H&&N(2,t+" cannot be zero",e))),n[t]=[V,$],s(t="ERRORS")&&(e===!!e||1===e||0===e?(M=0,X=(H=!!e)?g:u):H&&N(2,t+S,e)),n[t]=H,s(t="CRYPTO")&&(e===!!e||1===e||0===e?(K=!(!e||!v||"object"!=typeof v),e&&!K&&H&&N(2,"crypto unavailable",v)):H&&N(2,t+S,e)),n[t]=K,s(t="MODULO_MODE")&&X(e,0,9,2,t)&&(J=0|e),n[t]=J,s(t="POW_PRECISION")&&X(e,0,k,2,t)&&(G=0|e),n[t]=G,s(t="FORMAT")&&("object"==typeof e?W=e:H&&N(2,t+" not an object",e)),n[t]=W,n},t.max=function(){return i(arguments,B.lt)},t.min=function(){return i(arguments,B.gt)},t.random=function(){var e=9007199254740992,r=Math.random()*e&2097151?function(){return w(Math.random()*e)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(e){var n,i,o,s,a,c=0,u=[],f=new t(C);if(e=null!=e&&X(e,0,k,14)?0|e:q,s=b(e/T),K)if(v&&v.getRandomValues){for(n=v.getRandomValues(new Uint32Array(s*=2));s>c;)a=131072*n[c]+(n[c+1]>>>11),a>=9e15?(i=v.getRandomValues(new Uint32Array(2)),n[c]=i[0],n[c+1]=i[1]):(u.push(a%1e14),c+=2);c=s/2}else if(v&&v.randomBytes){for(n=v.randomBytes(s*=7);s>c;)a=281474976710656*(31&n[c])+1099511627776*n[c+1]+4294967296*n[c+2]+16777216*n[c+3]+(n[c+4]<<16)+(n[c+5]<<8)+n[c+6],a>=9e15?v.randomBytes(7).copy(n,c):(u.push(a%1e14),c+=7);c=s/7}else H&&N(14,"crypto unavailable",v);if(!c)for(;s>c;)a=r(),9e15>a&&(u[c++]=a%1e14);for(s=u[--c],e%=T,s&&e&&(a=O[T-e],u[c]=w(s/a)*a);0===u[c];u.pop(),c--);if(0>c)u=[o=0];else{for(o=-1;0===u[0];u.shift(),o-=T);for(c=1,a=u[0];a>=10;a/=10,c++);T>c&&(o-=T-c)}return f.e=o,f.c=u,f}}(),F=function(){function e(e,t,r){var n,i,o,s,a=0,c=e.length,u=t%R,f=t/R|0;for(e=e.slice();c--;)o=e[c]%R,s=e[c]/R|0,n=f*o+s*u,i=u*o+n%R*R+a,a=(i/r|0)+(n/R|0)+f*s,e[c]=i%r;return a&&e.unshift(a),e}function r(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;r>i;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function n(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.shift());}return function(i,o,a,c,u){var f,h,d,l,p,g,m,v,y,b,S,x,E,A,I,O,R,k=i.s==o.s?1:-1,L=i.c,N=o.c;if(!(L&&L[0]&&N&&N[0]))return new t(i.s&&o.s&&(L?!N||L[0]!=N[0]:N)?L&&0==L[0]||!N?0*k:k/0:NaN);for(v=new t(k),y=v.c=[],h=i.e-o.e,k=a+h+1,u||(u=P,h=s(i.e/T)-s(o.e/T),k=k/T|0),d=0;N[d]==(L[d]||0);d++);if(N[d]>(L[d]||0)&&h--,0>k)y.push(1),l=!0;else{for(A=L.length,O=N.length,d=0,k+=2,p=w(u/(N[0]+1)),p>1&&(N=e(N,p,u),L=e(L,p,u),O=N.length,A=L.length),E=O,b=L.slice(0,O),S=b.length;O>S;b[S++]=0);R=N.slice(),R.unshift(0),I=N[0],N[1]>=u/2&&I++;do{if(p=0,f=r(N,b,O,S),0>f){if(x=b[0],O!=S&&(x=x*u+(b[1]||0)),p=w(x/I),p>1)for(p>=u&&(p=u-1),g=e(N,p,u),m=g.length,S=b.length;1==r(g,b,m,S);)p--,n(g,m>O?R:N,m,u),m=g.length,f=1;else 0==p&&(f=p=1),g=N.slice(),m=g.length;if(S>m&&g.unshift(0),n(b,g,S,u),S=b.length,-1==f)for(;r(N,b,O,S)<1;)p++,n(b,S>O?R:N,S,u),S=b.length}else 0===f&&(p++,b=[0]);y[d++]=p,b[0]?b[S++]=L[E]||0:(b=[L[E]],S=1)}while((E++<A||null!=b[0])&&k--);l=null!=b[0],y[0]||y.shift()}if(u==P){for(d=1,k=y[0];k>=10;k/=10,d++);j(v,a+(v.e=d+h*T-1)+1,c,l)}else v.e=h,v.r=+l;return v}}(),m=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,r=/^([^.]+)\.$/,n=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,o=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(s,a,c,u){var f,h=c?a:a.replace(o,"");if(i.test(h))s.s=isNaN(h)?null:0>h?-1:1;else{if(!c&&(h=h.replace(e,function(e,t,r){return f="x"==(r=r.toLowerCase())?16:"b"==r?2:8,u&&u!=f?e:t}),u&&(f=u,h=h.replace(r,"$1").replace(n,"0.$1")),a!=h))return new t(h,f);H&&N(M,"not a"+(u?" base "+u:"")+" number",a),s.s=null}s.c=s.e=null,M=0}}(),B.absoluteValue=B.abs=function(){var e=new t(this);return e.s<0&&(e.s=1),e},B.ceil=function(){return j(new t(this),this.e+1,2)},B.comparedTo=B.cmp=function(e,r){return M=1,c(this,new t(e,r))},B.decimalPlaces=B.dp=function(){var e,t,r=this.c;if(!r)return null;if(e=((t=r.length-1)-s(this.e/T))*T,t=r[t])for(;t%10==0;t/=10,e--);return 0>e&&(e=0),e},B.dividedBy=B.div=function(e,r){return M=3,F(this,new t(e,r),q,z)},B.dividedToIntegerBy=B.divToInt=function(e,r){return M=4,F(this,new t(e,r),0,1)},B.equals=B.eq=function(e,r){return M=5,0===c(this,new t(e,r))},B.floor=function(){return j(new t(this),this.e+1,3)},B.greaterThan=B.gt=function(e,r){return M=6,c(this,new t(e,r))>0},B.greaterThanOrEqualTo=B.gte=function(e,r){return M=7,1===(r=c(this,new t(e,r)))||0===r},B.isFinite=function(){return!!this.c},B.isInteger=B.isInt=function(){return!!this.c&&s(this.e/T)>this.c.length-2},B.isNaN=function(){return!this.s},B.isNegative=B.isNeg=function(){return this.s<0},B.isZero=function(){return!!this.c&&0==this.c[0]},B.lessThan=B.lt=function(e,r){return M=8,c(this,new t(e,r))<0},B.lessThanOrEqualTo=B.lte=function(e,r){return M=9,-1===(r=c(this,new t(e,r)))||0===r},B.minus=B.sub=function(e,r){var n,i,o,a,c=this,u=c.s;if(M=10,e=new t(e,r),r=e.s,!u||!r)return new t(NaN);if(u!=r)return e.s=-r,c.plus(e);var f=c.e/T,h=e.e/T,d=c.c,l=e.c;if(!f||!h){if(!d||!l)return d?(e.s=-r,e):new t(l?c:NaN);if(!d[0]||!l[0])return l[0]?(e.s=-r,e):new t(d[0]?c:3==z?-0:0)}if(f=s(f),h=s(h),d=d.slice(),u=f-h){for((a=0>u)?(u=-u,o=d):(h=f,o=l),o.reverse(),r=u;r--;o.push(0));o.reverse()}else for(i=(a=(u=d.length)<(r=l.length))?u:r,u=r=0;i>r;r++)if(d[r]!=l[r]){a=d[r]<l[r];break}if(a&&(o=d,d=l,l=o,e.s=-e.s),r=(i=l.length)-(n=d.length),r>0)for(;r--;d[n++]=0);for(r=P-1;i>u;){if(d[--i]<l[i]){for(n=i;n&&!d[--n];d[n]=r);--d[n],d[i]+=P}d[i]-=l[i]}for(;0==d[0];d.shift(),--h);return d[0]?L(e,d,h):(e.s=3==z?-1:1,e.c=[e.e=0],e)},B.modulo=B.mod=function(e,r){var n,i,o=this;return M=11,e=new t(e,r),!o.c||!e.s||e.c&&!e.c[0]?new t(NaN):!e.c||o.c&&!o.c[0]?new t(o):(9==J?(i=e.s,e.s=1,n=F(o,e,0,3),e.s=i,n.s*=i):n=F(o,e,0,J),o.minus(n.times(e)))},B.negated=B.neg=function(){var e=new t(this);return e.s=-e.s||null,e},B.plus=B.add=function(e,r){var n,i=this,o=i.s;if(M=12,e=new t(e,r),r=e.s,!o||!r)return new t(NaN);if(o!=r)return e.s=-r,i.minus(e);var a=i.e/T,c=e.e/T,u=i.c,f=e.c;if(!a||!c){if(!u||!f)return new t(o/0);if(!u[0]||!f[0])return f[0]?e:new t(u[0]?i:0*o)}if(a=s(a),c=s(c),u=u.slice(),o=a-c){for(o>0?(c=a,n=f):(o=-o,n=u),n.reverse();o--;n.push(0));n.reverse()}for(o=u.length,r=f.length,0>o-r&&(n=f,f=u,u=n,r=o),o=0;r;)o=(u[--r]=u[r]+f[r]+o)/P|0,u[r]%=P;return o&&(u.unshift(o),++c),L(e,u,c)},B.precision=B.sd=function(e){var t,r,n=this,i=n.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(H&&N(13,"argument"+S,e),e!=!!e&&(e=null)),!i)return null;if(r=i.length-1,t=r*T+1,r=i[r]){for(;r%10==0;r/=10,t--);for(r=i[0];r>=10;r/=10,t++);}return e&&n.e+1>t&&(t=n.e+1),t},B.round=function(e,r){var n=new t(this);return(null==e||X(e,0,k,15))&&j(n,~~e+this.e+1,null!=r&&X(r,0,8,15,x)?0|r:z),n},B.shift=function(e){var r=this;return X(e,-I,I,16,"argument")?r.times("1e"+p(e)):new t(r.c&&r.c[0]&&(-I>e||e>I)?r.s*(0>e?0:1/0):r)},B.squareRoot=B.sqrt=function(){var e,r,n,i,o,c=this,u=c.c,f=c.s,h=c.e,d=q+4,l=new t("0.5");if(1!==f||!u||!u[0])return new t(!f||0>f&&(!u||u[0])?NaN:u?c:1/0);if(f=Math.sqrt(+c),0==f||f==1/0?(r=a(u),(r.length+h)%2==0&&(r+="0"),f=Math.sqrt(r),h=s((h+1)/2)-(0>h||h%2),f==1/0?r="1e"+h:(r=f.toExponential(),r=r.slice(0,r.indexOf("e")+1)+h),n=new t(r)):n=new t(f+""),n.c[0])for(h=n.e,f=h+d,3>f&&(f=0);;)if(o=n,n=l.times(o.plus(F(c,o,d,1))),a(o.c).slice(0,f)===(r=a(n.c)).slice(0,f)){if(n.e<h&&--f,r=r.slice(f-3,f+1),"9999"!=r&&(i||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(j(n,n.e+q+2,1),e=!n.times(n).eq(c));break}if(!i&&(j(o,o.e+q+2,0),o.times(o).eq(c))){n=o;break}d+=4,f+=4,i=1}return j(n,n.e+q+1,z,e)},B.times=B.mul=function(e,r){var n,i,o,a,c,u,f,h,d,l,p,g,m,v,y,b=this,w=b.c,S=(M=17,e=new t(e,r)).c;if(!(w&&S&&w[0]&&S[0]))return!b.s||!e.s||w&&!w[0]&&!S||S&&!S[0]&&!w?e.c=e.e=e.s=null:(e.s*=b.s,w&&S?(e.c=[0],e.e=0):e.c=e.e=null),e;for(i=s(b.e/T)+s(e.e/T),e.s*=b.s,f=w.length,l=S.length,l>f&&(m=w,w=S,S=m,o=f,f=l,l=o),o=f+l,m=[];o--;m.push(0));for(v=P,y=R,o=l;--o>=0;){for(n=0,p=S[o]%y,g=S[o]/y|0,c=f,a=o+c;a>o;)h=w[--c]%y,d=w[c]/y|0,u=g*h+d*p,h=p*h+u%y*y+m[a]+n,n=(h/v|0)+(u/y|0)+g*d,m[a--]=h%v;m[a]=n}return n?++i:m.shift(),L(e,m,i)},B.toDigits=function(e,r){var n=new t(this);return e=null!=e&&X(e,1,k,18,"precision")?0|e:null,r=null!=r&&X(r,0,8,18,x)?0|r:z,e?j(n,e,r):n},B.toExponential=function(e,t){return n(this,null!=e&&X(e,0,k,19)?~~e+1:null,t,19)},B.toFixed=function(e,t){return n(this,null!=e&&X(e,0,k,20)?~~e+this.e+1:null,t,20)},B.toFormat=function(e,t){var r=n(this,null!=e&&X(e,0,k,21)?~~e+this.e+1:null,t,21);if(this.c){var i,o=r.split("."),s=+W.groupSize,a=+W.secondaryGroupSize,c=W.groupSeparator,u=o[0],f=o[1],h=this.s<0,d=h?u.slice(1):u,l=d.length;if(a&&(i=s,s=a,a=i,l-=i),s>0&&l>0){for(i=l%s||s,u=d.substr(0,i);l>i;i+=s)u+=c+d.substr(i,s);a>0&&(u+=c+d.slice(i)),h&&(u="-"+u)}r=f?u+W.decimalSeparator+((a=+W.fractionGroupSize)?f.replace(new RegExp("\\d{"+a+"}\\B","g"),"$&"+W.fractionGroupSeparator):f):u}return r},B.toFraction=function(e){var r,n,i,o,s,c,u,f,h,d=H,l=this,p=l.c,g=new t(C),m=n=new t(C),v=u=new t(C);if(null!=e&&(H=!1,c=new t(e),H=d,(d=c.isInt())&&!c.lt(C)||(H&&N(22,"max denominator "+(d?"out of range":"not an integer"),e),e=!d&&c.c&&j(c,c.e+1,1).gte(C)?c:null)),!p)return l.toString();for(h=a(p),o=g.e=h.length-l.e-1,g.c[0]=O[(s=o%T)<0?T+s:s],e=!e||c.cmp(g)>0?o>0?g:m:c,s=$,$=1/0,c=new t(h),u.c[0]=0;f=F(c,g,0,1),i=n.plus(f.times(v)),1!=i.cmp(e);)n=v,v=i,m=u.plus(f.times(i=m)),u=i,g=c.minus(f.times(i=g)),c=i;return i=F(e.minus(n),v,0,1),u=u.plus(i.times(m)),n=n.plus(i.times(v)),u.s=m.s=l.s,o*=2,r=F(m,v,o,z).minus(l).abs().cmp(F(u,n,o,z).minus(l).abs())<1?[m.toString(),v.toString()]:[u.toString(),n.toString()],$=s,r},B.toNumber=function(){return+this},B.toPower=B.pow=function(e){var r,n,i=w(0>e?-e:+e),o=this;if(!X(e,-I,I,23,"exponent")&&(!isFinite(e)||i>I&&(e/=0)||parseFloat(e)!=e&&!(e=NaN)))return new t(Math.pow(+o,e));for(r=G?b(G/T+2):0,n=new t(C);;){if(i%2){if(n=n.times(o),!n.c)break;r&&n.c.length>r&&(n.c.length=r)}if(i=w(i/2),!i)break;o=o.times(o),r&&o.c&&o.c.length>r&&(o.c.length=r)}return 0>e&&(n=C.div(n)),r?j(n,G,z):n},B.toPrecision=function(e,t){return n(this,null!=e&&X(e,1,k,24,"precision")?0|e:null,t,24)},B.toString=function(e){var t,n=this,i=n.s,o=n.e;return null===o?i?(t="Infinity",0>i&&(t="-"+t)):t="NaN":(t=a(n.c),t=null!=e&&X(e,2,64,25,"base")?r(l(t,o),0|e,10,i):D>=o||o>=U?d(t,o):l(t,o),0>i&&n.c[0]&&(t="-"+t)),t},B.truncated=B.trunc=function(){return j(new t(this),this.e+1,1)},B.valueOf=B.toJSON=function(){var e,t=this,r=t.e;return null===r?t.toString():(e=a(t.c),e=D>=r||r>=U?d(e,r):l(e,r),t.s<0?"-"+e:e)},null!=e&&t.config(e),t}function s(e){var t=0|e;return e>0||e===t?t:t-1}function a(e){for(var t,r,n=1,i=e.length,o=e[0]+"";i>n;){for(t=e[n++]+"",r=T-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function c(e,t){var r,n,i=e.c,o=t.c,s=e.s,a=t.s,c=e.e,u=t.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=0>s,n=c==u,!i||!o)return n?0:!i^r?1:-1;if(!n)return c>u^r?1:-1;for(a=(c=i.length)<(u=o.length)?c:u,s=0;a>s;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return c==u?0:c>u^r?1:-1}function u(e,t,r){return(e=p(e))>=t&&r>=e}function f(e){return"[object Array]"==Object.prototype.toString.call(e)}function h(e,t,r){for(var n,i,o=[0],s=0,a=e.length;a>s;){for(i=o.length;i--;o[i]*=t);for(o[n=0]+=A.indexOf(e.charAt(s++));n<o.length;n++)o[n]>r-1&&(null==o[n+1]&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}function d(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(0>t?"e":"e+")+t}function l(e,t){var r,n;if(0>t){for(n="0.";++t;n+="0");e=n+e}else if(r=e.length,++t>r){for(n="0",t-=r;--t;n+="0");e+=n}else r>t&&(e=e.slice(0,t)+"."+e.slice(t));return e}function p(e){return e=parseFloat(e),0>e?b(e):w(e)}var g,m,v=i.crypto,y=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,b=Math.ceil,w=Math.floor,S=" not a boolean or binary digit",x="rounding mode",E="number type has more than 15 significant digits",A="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",P=1e14,T=14,I=9007199254740991,O=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],R=1e7,k=1e9;g=o(),n=function(){return g}.call(t,r,t,e),!(void 0!==n&&(e.exports=n))}(this)},function(e,t,r){"use strict";function n(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];l(!e.entropy||e.entropy.length>=16,"entropy too short");var t=e.entropy?e.entropy.slice(0,16):p(16),r="ed25519"===e.algorithm?"ed25519":"secp256k1";return b.encodeSeed(t,r)}function i(e){return g.sha512().update(e).digest().slice(0,32)}function o(e){var t={"ecdsa-secp256k1":P,ed25519:T};return t[e]}function s(e,t){var r=b.decodeSeed(e),n="ed25519"===r.type?"ed25519":"ecdsa-secp256k1";return o(n).deriveKeypair(r.bytes,t)}function a(e){var t=E(e);return 33===t.length&&237===t[0]?"ed25519":"ecdsa-secp256k1"}function c(e,t){var r=a(t);return o(r).sign(E(e),t)}function u(e,t,r){var n=a(r);return o(n).verify(E(e),t,r)}function f(e){return b.encodeAccountID(x.computePublicKeyHash(e))}function h(e){return f(E(e))}function d(e){var t=b.decodeNodePublic(e),r=S(t);return f(r)}var l=r(198),p=r(202),g=r(222),m=r(229),v=m.eddsa("ed25519"),y=m.ec("secp256k1"),b=r(249),w=r(261).derivePrivateKey,S=r(261).accountPublicFromPublicGenerator,x=r(268),E=x.hexToBytes,A=x.bytesToHex,P={deriveKeypair:function(e,t){var r="00",n=r+w(e,t).toString(16,64).toUpperCase(),i=A(y.keyFromPrivate(n.slice(2)).getPublic().encodeCompressed());return{privateKey:n,publicKey:i}},sign:function(e,t){return A(y.sign(i(e),E(t),{canonical:!0}).toDER())},verify:function(e,t,r){return y.verify(i(e),t,E(r))}},T={deriveKeypair:function(e){var t="ED",r=i(e),n=t+A(r),o=t+A(v.keyFromSecret(r).pubBytes());return{privateKey:n,publicKey:o}},sign:function(e,t){return l(Array.isArray(e),"message must be array of octets"),A(v.sign(e,E(t).slice(1)).toBytes())},verify:function(e,t,r){return v.verify(e,E(t),E(r).slice(1))}};e.exports={generateSeed:n,deriveKeypair:s,sign:c,verify:u,deriveAddress:h,deriveNodeAddress:d}},function(e,t,r){function n(e,t){return l.isUndefined(t)?""+t:l.isNumber(t)&&!isFinite(t)?t.toString():l.isFunction(t)||l.isRegExp(t)?t.toString():t}function i(e,t){return l.isString(e)?e.length<t?e:e.slice(0,t):e}function o(e){return i(JSON.stringify(e.actual,n),128)+" "+e.operator+" "+i(JSON.stringify(e.expected,n),128)}function s(e,t,r,n,i){throw new m.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function a(e,t){e||s(e,!0,t,"==",m.ok)}function c(e,t){if(e===t)return!0;if(l.isBuffer(e)&&l.isBuffer(t)){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return l.isDate(e)&&l.isDate(t)?e.getTime()===t.getTime():l.isRegExp(e)&&l.isRegExp(t)?e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase:l.isObject(e)||l.isObject(t)?f(e,t):e==t}function u(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function f(e,t){if(l.isNullOrUndefined(e)||l.isNullOrUndefined(t))return!1;if(e.prototype!==t.prototype)return!1;if(l.isPrimitive(e)||l.isPrimitive(t))return e===t;var r=u(e),n=u(t);if(r&&!n||!r&&n)return!1;if(r)return e=p.call(e),t=p.call(t),c(e,t);var i,o,s=v(e),a=v(t);if(s.length!=a.length)return!1;for(s.sort(),a.sort(),o=s.length-1;o>=0;o--)if(s[o]!=a[o])return!1;for(o=s.length-1;o>=0;o--)if(i=s[o],!c(e[i],t[i]))return!1;return!0}function h(e,t){return e&&t?"[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t?!0:t.call({},e)===!0:!1}function d(e,t,r,n){var i;l.isString(r)&&(n=r,r=null);try{t()}catch(o){i=o}if(n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&s(i,r,"Missing expected exception"+n),!e&&h(i,r)&&s(i,r,"Got unwanted exception"+n),e&&i&&r&&!h(i,r)||!e&&i)throw i}var l=r(199),p=Array.prototype.slice,g=Object.prototype.hasOwnProperty,m=e.exports=a;m.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=o(this),this.generatedMessage=!0);var t=e.stackStartFunction||s;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=t.name,a=n.indexOf("\n"+i);if(a>=0){var c=n.indexOf("\n",a+1);n=n.substring(c+1)}this.stack=n}}},l.inherits(m.AssertionError,Error),m.fail=s,m.ok=a,m.equal=function(e,t,r){e!=t&&s(e,t,r,"==",m.equal)},m.notEqual=function(e,t,r){e==t&&s(e,t,r,"!=",m.notEqual)},m.deepEqual=function(e,t,r){c(e,t)||s(e,t,r,"deepEqual",m.deepEqual)},m.notDeepEqual=function(e,t,r){c(e,t)&&s(e,t,r,"notDeepEqual",m.notDeepEqual)},m.strictEqual=function(e,t,r){e!==t&&s(e,t,r,"===",m.strictEqual)},m.notStrictEqual=function(e,t,r){e===t&&s(e,t,r,"!==",m.notStrictEqual)},m["throws"]=function(e,t,r){d.apply(this,[!0].concat(p.call(arguments)))},m.doesNotThrow=function(e,t){d.apply(this,[!1].concat(p.call(arguments)))},m.ifError=function(e){if(e)throw e};var v=Object.keys||function(e){var t=[];for(var r in e)g.call(e,r)&&t.push(r);return t}},function(e,t,r){(function(e,n){function i(e,r){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),S(n.showHidden)&&(n.showHidden=!1),S(n.depth)&&(n.depth=2),S(n.colors)&&(n.colors=!1),S(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),c(n,e,n.depth)}function o(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function s(e,t){return e}function a(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function c(e,r,n){if(e.customInspect&&r&&T(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return b(i)||(i=c(e,i,n)),i}var o=u(e,r);if(o)return o;var s=Object.keys(r),g=a(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),P(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return f(r);if(0===s.length){if(T(r)){var m=r.name?": "+r.name:"";return e.stylize("[Function"+m+"]","special")}if(x(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(A(r))return e.stylize(Date.prototype.toString.call(r),"date");if(P(r))return f(r)}var v="",y=!1,w=["{","}"];if(p(r)&&(y=!0,w=["[","]"]),T(r)){var S=r.name?": "+r.name:"";v=" [Function"+S+"]"}if(x(r)&&(v=" "+RegExp.prototype.toString.call(r)),A(r)&&(v=" "+Date.prototype.toUTCString.call(r)),P(r)&&(v=" "+f(r)),0===s.length&&(!y||0==r.length))return w[0]+v+w[1];if(0>n)return x(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var E;return E=y?h(e,r,n,g,s):s.map(function(t){return d(e,r,n,g,t,y)}),e.seen.pop(),l(E,v,w)}function u(e,t){if(S(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return y(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i){for(var o=[],s=0,a=t.length;a>s;++s)L(t,String(s))?o.push(d(e,t,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(d(e,t,r,n,i,!0))}),o}function d(e,t,r,n,i,o){var s,a,u;if(u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},u.get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),L(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=m(r)?c(e,u.value,null):c(e,u.value,r-1),a.indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return"  "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return"   "+e}).join("\n"))):a=e.stylize("[Circular]","special")),S(s)){if(o&&i.match(/^\d+$/))return a;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function l(e,t,r){var n=0,i=e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n  ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function p(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function m(e){return null===e}function v(e){return null==e}function y(e){return"number"==typeof e}function b(e){return"string"==typeof e}function w(e){return"symbol"==typeof e}function S(e){return void 0===e}function x(e){return E(e)&&"[object RegExp]"===O(e)}function E(e){return"object"==typeof e&&null!==e}function A(e){return E(e)&&"[object Date]"===O(e)}function P(e){return E(e)&&("[object Error]"===O(e)||e instanceof Error)}function T(e){return"function"==typeof e}function I(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function O(e){return Object.prototype.toString.call(e)}function R(e){return 10>e?"0"+e.toString(10):e.toString(10)}function k(){var e=new Date,t=[R(e.getHours()),R(e.getMinutes()),R(e.getSeconds())].join(":");return[e.getDate(),M[e.getMonth()],t].join(" ")}function L(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var N=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(i(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,o=n.length,s=String(e).replace(N,function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(_){return"[Circular]"}default:return e}}),a=n[r];o>r;a=n[++r])s+=m(a)||!E(a)?" "+a:" "+i(a);return s},t.deprecate=function(r,i){function o(){if(!s){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),s=!0}return r.apply(this,arguments)}if(S(e.process))return function(){return t.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var s=!1;return o};var j,F={};t.debuglog=function(e){if(S(j)&&(j=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!F[e])if(new RegExp("\\b"+e+"\\b","i").test(j)){var r=n.pid;F[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else F[e]=function(){};return F[e]},t.inspect=i,i.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]},i.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=p,t.isBoolean=g,t.isNull=m,t.isNullOrUndefined=v,t.isNumber=y,t.isString=b,t.isSymbol=w,t.isUndefined=S,t.isRegExp=x,t.isObject=E,t.isDate=A,t.isError=P,t.isFunction=T,t.isPrimitive=I,t.isBuffer=r(200);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];t.log=function(){console.log("%s - %s",k(),t.format.apply(t,arguments))},t.inherits=r(201),t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(t,function(){return this}(),r(191))},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){function n(e){this.rand=e}var i;if(e.exports=function(e){return i||(i=new n(null)),i.generate(e)},e.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e)},"object"==typeof window)window.crypto&&window.crypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return window.crypto.getRandomValues(t),t}:window.msCrypto&&window.msCrypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return window.msCrypto.getRandomValues(t),t}:n.prototype._rand=function(){throw new Error("Not implemented yet")};else try{var o=r(203);n.prototype._rand=function(e){return o.randomBytes(e)}}catch(s){n.prototype._rand=function(e){for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t}}},function(e,t,r){(function(e){function n(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function i(e,t){for(var r in e)t(e[r],r)}var o=r(208);t.createHash=r(210),t.createHmac=r(219),t.randomBytes=function(t,r){if(!r||!r.call)return new e(o(t));try{r.call(this,void 0,new e(o(t)))}catch(n){r(n)}},t.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var s=r(220)(t);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync,i(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman"],function(e){t[e]=function(){n("sorry,",e,"is not implemented yet")}})}).call(t,r(204).Buffer)},function(e,t,r){(function(e,n){"use strict";function i(){function e(){}try{var t=new Uint8Array(1);return t.foo=function(){return 42},t.constructor=e,42===t.foo()&&t.constructor===e&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(r){return!1}}function o(){return e.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function e(t){return this instanceof e?(e.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof t?s(this,t):"string"==typeof t?a(this,t,arguments.length>1?arguments[1]:"utf8"):c(this,t)):arguments.length>1?new e(t,arguments[1]):new e(t)}function s(t,r){if(t=g(t,0>r?0:0|m(r)),!e.TYPED_ARRAY_SUPPORT)for(var n=0;r>n;n++)t[n]=0;return t}function a(e,t,r){"string"==typeof r&&""!==r||(r="utf8");var n=0|y(t,r);return e=g(e,n),e.write(t,r),e}function c(t,r){if(e.isBuffer(r))return u(t,r);if(Y(r))return f(t,r);if(null==r)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(r.buffer instanceof ArrayBuffer)return h(t,r);if(r instanceof ArrayBuffer)return d(t,r)}return r.length?l(t,r):p(t,r)}function u(e,t){var r=0|m(t.length);return e=g(e,r),t.copy(e,0,0,r),e}function f(e,t){var r=0|m(t.length);e=g(e,r);for(var n=0;r>n;n+=1)e[n]=255&t[n];return e}function h(e,t){var r=0|m(t.length);e=g(e,r);for(var n=0;r>n;n+=1)e[n]=255&t[n];return e}function d(t,r){return e.TYPED_ARRAY_SUPPORT?(r.byteLength,t=e._augment(new Uint8Array(r))):t=h(t,new Uint8Array(r)),t}function l(e,t){var r=0|m(t.length);e=g(e,r);for(var n=0;r>n;n+=1)e[n]=255&t[n];return e}function p(e,t){var r,n=0;"Buffer"===t.type&&Y(t.data)&&(r=t.data,n=0|m(r.length)),e=g(e,n);for(var i=0;n>i;i+=1)e[i]=255&r[i];return e}function g(t,r){e.TYPED_ARRAY_SUPPORT?(t=e._augment(new Uint8Array(r)),t.__proto__=e.prototype):(t.length=r,t._isBuffer=!0);var n=0!==r&&r<=e.poolSize>>>1;return n&&(t.parent=Q),t}function m(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");
  return 0|e}function v(t,r){if(!(this instanceof v))return new v(t,r);var n=new e(t,r);return delete n.parent,n}function y(e,t){"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(n)return $(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if(t=0|t,r=void 0===r||r===1/0?this.length:0|r,e||(e="utf8"),0>t&&(t=0),r>this.length&&(r=this.length),t>=r)return"";for(;;)switch(e){case"hex":return L(this,t,r);case"utf8":case"utf-8":return I(this,t,r);case"ascii":return R(this,t,r);case"binary":return k(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function w(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");e[r+s]=a}return s}function S(e,t,r,n){return J($(t,e.length-r),e,r,n)}function x(e,t,r,n){return J(H(t),e,r,n)}function E(e,t,r,n){return x(e,t,r,n)}function A(e,t,r,n){return J(K(t),e,r,n)}function P(e,t,r,n){return J(X(t,e.length-r),e,r,n)}function T(e,t,r){return 0===t&&r===e.length?G.fromByteArray(e):G.fromByteArray(e.slice(t,r))}function I(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;r>i;){var o=e[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r>=i+a){var c,u,f,h;switch(a){case 1:128>o&&(s=o);break;case 2:c=e[i+1],128===(192&c)&&(h=(31&o)<<6|63&c,h>127&&(s=h));break;case 3:c=e[i+1],u=e[i+2],128===(192&c)&&128===(192&u)&&(h=(15&o)<<12|(63&c)<<6|63&u,h>2047&&(55296>h||h>57343)&&(s=h));break;case 4:c=e[i+1],u=e[i+2],f=e[i+3],128===(192&c)&&128===(192&u)&&128===(192&f)&&(h=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&f,h>65535&&1114112>h&&(s=h))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=a}return O(n)}function O(e){var t=e.length;if(Z>=t)return String.fromCharCode.apply(String,e);for(var r="",n=0;t>n;)r+=String.fromCharCode.apply(String,e.slice(n,n+=Z));return r}function R(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;r>i;i++)n+=String.fromCharCode(127&e[i]);return n}function k(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;r>i;i++)n+=String.fromCharCode(e[i]);return n}function L(e,t,r){var n=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=t;r>o;o++)i+=V(e[o]);return i}function N(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function j(e,t,r){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function F(t,r,n,i,o,s){if(!e.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(r>o||s>r)throw new RangeError("value is out of bounds");if(n+i>t.length)throw new RangeError("index out of range")}function M(e,t,r,n){0>t&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);o>i;i++)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function B(e,t,r,n){0>t&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);o>i;i++)e[r+i]=t>>>8*(n?i:3-i)&255}function C(e,t,r,n,i,o){if(t>i||o>t)throw new RangeError("value is out of bounds");if(r+n>e.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function q(e,t,r,n,i){return i||C(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),W.write(e,t,r,n,23,4),r+4}function z(e,t,r,n,i){return i||C(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),W.write(e,t,r,n,52,8),r+8}function D(e){if(e=U(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function U(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function V(e){return 16>e?"0"+e.toString(16):e.toString(16)}function $(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],s=0;n>s;s++){if(r=e.charCodeAt(s),r>55295&&57344>r){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(56320>r){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,128>r){if((t-=1)<0)break;o.push(r)}else if(2048>r){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function H(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t}function X(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);s++)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function K(e){return G.toByteArray(D(e))}function J(e,t,r,n){for(var i=0;n>i&&!(i+r>=t.length||i>=e.length);i++)t[i+r]=e[i];return i}var G=r(205),W=r(206),Y=r(207);t.Buffer=e,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,e.poolSize=8192;var Q={};e.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),e.TYPED_ARRAY_SUPPORT?(e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array):(e.prototype.length=void 0,e.prototype.parent=void 0),e.isBuffer=function(e){return!(null==e||!e._isBuffer)},e.compare=function(t,r){if(!e.isBuffer(t)||!e.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var n=t.length,i=r.length,o=0,s=Math.min(n,i);s>o&&t[o]===r[o];)++o;return o!==s&&(n=t[o],i=r[o]),i>n?-1:n>i?1:0},e.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(t,r){if(!Y(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new e(0);var n;if(void 0===r)for(r=0,n=0;n<t.length;n++)r+=t[n].length;var i=new e(r),o=0;for(n=0;n<t.length;n++){var s=t[n];s.copy(i,o),o+=s.length}return i},e.byteLength=y,e.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?I(this,0,e):b.apply(this,arguments)},e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===e.compare(this,t)},e.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},e.prototype.compare=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:e.compare(this,t)},e.prototype.indexOf=function(t,r){function n(e,t,r){for(var n=-1,i=0;r+i<e.length;i++)if(e[r+i]===t[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===t.length)return r+n}else n=-1;return-1}if(r>2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,r);if(e.isBuffer(t))return n(this,t,r);if("number"==typeof t)return e.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,r):n(this,[t],r);throw new TypeError("val must be string, number or Buffer")},e.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},e.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},e.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t=0|t,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=t,t=0|r,r=i}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(0>r||0>t)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return S(this,e,t,r);case"ascii":return x(this,e,t,r);case"binary":return E(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;e.prototype.slice=function(t,r){var n=this.length;t=~~t,r=void 0===r?n:~~r,0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),t>r&&(r=t);var i;if(e.TYPED_ARRAY_SUPPORT)i=e._augment(this.subarray(t,r));else{var o=r-t;i=new e(o,void 0);for(var s=0;o>s;s++)i[s]=this[s+t]}return i.length&&(i.parent=this.parent||this),i},e.prototype.readUIntLE=function(e,t,r){e=0|e,t=0|t,r||j(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},e.prototype.readUIntBE=function(e,t,r){e=0|e,t=0|t,r||j(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},e.prototype.readUInt8=function(e,t){return t||j(e,1,this.length),this[e]},e.prototype.readUInt16LE=function(e,t){return t||j(e,2,this.length),this[e]|this[e+1]<<8},e.prototype.readUInt16BE=function(e,t){return t||j(e,2,this.length),this[e]<<8|this[e+1]},e.prototype.readUInt32LE=function(e,t){return t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},e.prototype.readUInt32BE=function(e,t){return t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},e.prototype.readIntLE=function(e,t,r){e=0|e,t=0|t,r||j(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},e.prototype.readIntBE=function(e,t,r){e=0|e,t=0|t,r||j(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},e.prototype.readInt8=function(e,t){return t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},e.prototype.readInt16LE=function(e,t){t||j(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(e,t){t||j(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(e,t){return t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},e.prototype.readInt32BE=function(e,t){return t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},e.prototype.readFloatLE=function(e,t){return t||j(e,4,this.length),W.read(this,e,!0,23,4)},e.prototype.readFloatBE=function(e,t){return t||j(e,4,this.length),W.read(this,e,!1,23,4)},e.prototype.readDoubleLE=function(e,t){return t||j(e,8,this.length),W.read(this,e,!0,52,8)},e.prototype.readDoubleBE=function(e,t){return t||j(e,8,this.length),W.read(this,e,!1,52,8)},e.prototype.writeUIntLE=function(e,t,r,n){e=+e,t=0|t,r=0|r,n||F(this,e,t,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},e.prototype.writeUIntBE=function(e,t,r,n){e=+e,t=0|t,r=0|r,n||F(this,e,t,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},e.prototype.writeUInt8=function(t,r,n){return t=+t,r=0|r,n||F(this,t,r,1,255,0),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},e.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=0|r,n||F(this,t,r,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):M(this,t,r,!0),r+2},e.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=0|r,n||F(this,t,r,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):M(this,t,r,!1),r+2},e.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=0|r,n||F(this,t,r,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):B(this,t,r,!0),r+4},e.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=0|r,n||F(this,t,r,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):B(this,t,r,!1),r+4},e.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=0|t,!n){var i=Math.pow(2,8*r-1);F(this,e,t,r,i-1,-i)}var o=0,s=1,a=0>e?1:0;for(this[t]=255&e;++o<r&&(s*=256);)this[t+o]=(e/s>>0)-a&255;return t+r},e.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=0|t,!n){var i=Math.pow(2,8*r-1);F(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0>e?1:0;for(this[t+o]=255&e;--o>=0&&(s*=256);)this[t+o]=(e/s>>0)-a&255;return t+r},e.prototype.writeInt8=function(t,r,n){return t=+t,r=0|r,n||F(this,t,r,1,127,-128),e.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[r]=255&t,r+1},e.prototype.writeInt16LE=function(t,r,n){return t=+t,r=0|r,n||F(this,t,r,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):M(this,t,r,!0),r+2},e.prototype.writeInt16BE=function(t,r,n){return t=+t,r=0|r,n||F(this,t,r,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):M(this,t,r,!1),r+2},e.prototype.writeInt32LE=function(t,r,n){return t=+t,r=0|r,n||F(this,t,r,4,2147483647,-2147483648),e.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):B(this,t,r,!0),r+4},e.prototype.writeInt32BE=function(t,r,n){return t=+t,r=0|r,n||F(this,t,r,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),e.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):B(this,t,r,!1),r+4},e.prototype.writeFloatLE=function(e,t,r){return q(this,e,t,!0,r)},e.prototype.writeFloatBE=function(e,t,r){return q(this,e,t,!1,r)},e.prototype.writeDoubleLE=function(e,t,r){return z(this,e,t,!0,r)},e.prototype.writeDoubleBE=function(e,t,r){return z(this,e,t,!1,r)},e.prototype.copy=function(t,r,n,i){if(n||(n=0),i||0===i||(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&n>i&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r<i-n&&(i=t.length-r+n);var o,s=i-n;if(this===t&&r>n&&i>r)for(o=s-1;o>=0;o--)t[o+r]=this[o+n];else if(1e3>s||!e.TYPED_ARRAY_SUPPORT)for(o=0;s>o;o++)t[o+r]=this[o+n];else t._set(this.subarray(n,n+s),r);return s},e.prototype.fill=function(e,t,r){if(e||(e=0),t||(t=0),r||(r=this.length),t>r)throw new RangeError("end < start");if(r!==t&&0!==this.length){if(0>t||t>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof e)for(n=t;r>n;n++)this[n]=e;else{var i=$(e.toString()),o=i.length;for(n=t;r>n;n++)this[n]=i[n%o]}return this}},e.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(e.TYPED_ARRAY_SUPPORT)return new e(this).buffer;for(var t=new Uint8Array(this.length),r=0,n=t.length;n>r;r+=1)t[r]=this[r];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var ee=e.prototype;e._augment=function(t){return t.constructor=e,t._isBuffer=!0,t._set=t.set,t.get=ee.get,t.set=ee.set,t.write=ee.write,t.toString=ee.toString,t.toLocaleString=ee.toString,t.toJSON=ee.toJSON,t.equals=ee.equals,t.compare=ee.compare,t.indexOf=ee.indexOf,t.copy=ee.copy,t.slice=ee.slice,t.readUIntLE=ee.readUIntLE,t.readUIntBE=ee.readUIntBE,t.readUInt8=ee.readUInt8,t.readUInt16LE=ee.readUInt16LE,t.readUInt16BE=ee.readUInt16BE,t.readUInt32LE=ee.readUInt32LE,t.readUInt32BE=ee.readUInt32BE,t.readIntLE=ee.readIntLE,t.readIntBE=ee.readIntBE,t.readInt8=ee.readInt8,t.readInt16LE=ee.readInt16LE,t.readInt16BE=ee.readInt16BE,t.readInt32LE=ee.readInt32LE,t.readInt32BE=ee.readInt32BE,t.readFloatLE=ee.readFloatLE,t.readFloatBE=ee.readFloatBE,t.readDoubleLE=ee.readDoubleLE,t.readDoubleBE=ee.readDoubleBE,t.writeUInt8=ee.writeUInt8,t.writeUIntLE=ee.writeUIntLE,t.writeUIntBE=ee.writeUIntBE,t.writeUInt16LE=ee.writeUInt16LE,t.writeUInt16BE=ee.writeUInt16BE,t.writeUInt32LE=ee.writeUInt32LE,t.writeUInt32BE=ee.writeUInt32BE,t.writeIntLE=ee.writeIntLE,t.writeIntBE=ee.writeIntBE,t.writeInt8=ee.writeInt8,t.writeInt16LE=ee.writeInt16LE,t.writeInt16BE=ee.writeInt16BE,t.writeInt32LE=ee.writeInt32LE,t.writeInt32BE=ee.writeInt32BE,t.writeFloatLE=ee.writeFloatLE,t.writeFloatBE=ee.writeFloatBE,t.writeDoubleLE=ee.writeDoubleLE,t.writeDoubleBE=ee.writeDoubleBE,t.fill=ee.fill,t.inspect=ee.inspect,t.toArrayBuffer=ee.toArrayBuffer,t};var te=/[^+\/0-9A-Za-z-_]/g}).call(t,r(204).Buffer,function(){return this}())},function(e,t,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===s||t===h?62:t===a||t===d?63:c>t?-1:c+10>t?t-c+26+26:f+26>t?t-f:u+26>t?t-u+26:void 0}function r(e){function r(e){u[h++]=e}var n,i,s,a,c,u;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=e.length;c="="===e.charAt(f-2)?2:"="===e.charAt(f-1)?1:0,u=new o(3*e.length/4-c),s=c>0?e.length-4:e.length;var h=0;for(n=0,i=0;s>n;n+=4,i+=3)a=t(e.charAt(n))<<18|t(e.charAt(n+1))<<12|t(e.charAt(n+2))<<6|t(e.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===c?(a=t(e.charAt(n))<<2|t(e.charAt(n+1))>>4,r(255&a)):1===c&&(a=t(e.charAt(n))<<10|t(e.charAt(n+1))<<4|t(e.charAt(n+2))>>2,r(a>>8&255),r(255&a)),u}function i(e){function t(e){return n.charAt(e)}function r(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var i,o,s,a=e.length%3,c="";for(i=0,s=e.length-a;s>i;i+=3)o=(e[i]<<16)+(e[i+1]<<8)+e[i+2],c+=r(o);switch(a){case 1:o=e[e.length-1],c+=t(o>>2),c+=t(o<<4&63),c+="==";break;case 2:o=(e[e.length-2]<<8)+e[e.length-1],c+=t(o>>10),c+=t(o>>4&63),c+=t(o<<2&63),c+="="}return c}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),c="0".charCodeAt(0),u="a".charCodeAt(0),f="A".charCodeAt(0),h="-".charCodeAt(0),d="_".charCodeAt(0);e.toByteArray=r,e.fromByteArray=i}(t)},function(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,f=-7,h=r?i-1:0,d=r?-1:1,l=e[t+h];for(h+=d,o=l&(1<<-f)-1,l>>=-f,f+=a;f>0;o=256*o+e[t+h],h+=d,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+e[t+h],h+=d,f-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:(l?-1:1)*(1/0);s+=Math.pow(2,n),o-=u}return(l?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,c,u=8*o-i-1,f=(1<<u)-1,h=f>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?0:o-1,p=n?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),t+=s+h>=1?d/c:d*Math.pow(2,1-h),t*c>=2&&(s++,c/=2),s+h>=f?(a=0,s=f):s+h>=1?(a=(t*c-1)*Math.pow(2,i),s+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;e[r+l]=255&a,l+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;e[r+l]=255&s,l+=p,s/=256,u-=8);e[r+l-p]|=128*g}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){(function(t,n){!function(){var i=("undefined"==typeof window?t:window)||{};_crypto=i.crypto||i.msCrypto||r(209),e.exports=function(e){if(_crypto.getRandomValues){var t=new n(e);return _crypto.getRandomValues(t),t}if(_crypto.randomBytes)return _crypto.randomBytes(e);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(t,function(){return this}(),r(204).Buffer)},function(e,t){},function(e,t,r){(function(t){function n(e){return function(){var r=[],n={update:function(e,n){return t.isBuffer(e)||(e=new t(e,n)),r.push(e),this},digest:function(n){var i=t.concat(r),o=e(i);return r=null,n?o.toString(n):o}};return n}}var i=r(211),o=n(r(216)),s=n(r(218));e.exports=function(e){return"md5"===e?new o:"rmd160"===e?new s:i(e)}}).call(t,r(204).Buffer)},function(e,t,r){var t=e.exports=function(e){var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r},n=r(204).Buffer,i=r(212)(n);t.sha1=r(213)(n,i),t.sha256=r(214)(n,i),t.sha512=r(215)(n,i)},function(e,t){e.exports=function(e){function t(t,r){this._block=new e(t),this._finalSize=r,this._blockSize=t,this._len=0,this._s=0}return t.prototype.init=function(){this._s=0,this._len=0},t.prototype.update=function(t,r){"string"==typeof t&&(r=r||"utf8",t=new e(t,r));for(var n=this._len+=t.length,i=this._s=this._s||0,o=0,s=this._block;n>i;){for(var a=Math.min(t.length,o+this._blockSize-i%this._blockSize),c=a-o,u=0;c>u;u++)s[i%this._blockSize+u]=t[u+o];i+=c,o+=c,i%this._blockSize===0&&this._update(s)}return this._s=i,this},t.prototype.digest=function(e){var t=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),t%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(t,this._blockSize-4);var r=this._update(this._block)||this._hash();return e?r.toString(e):r},t.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t}},function(e,t,r){var n=r(199).inherits;e.exports=function(e,t){function r(){return p.length?p.pop().init():this instanceof r?(this._w=l,t.call(this,64,56),this._h=null,void this.init()):new r}function i(e,t,r,n){return 20>e?t&r|~t&n:40>e?t^r^n:60>e?t&r|t&n|r&n:t^r^n}function o(e){return 20>e?1518500249:40>e?1859775393:60>e?-1894007588:-899497514}function s(e,t){return e+t|0}function a(e,t){return e<<t|e>>>32-t}var c=0,u=4,f=8,h=12,d=16,l=new("undefined"==typeof Int32Array?Array:Int32Array)(80),p=[];return n(r,t),r.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,t.prototype.init.call(this),this},r.prototype._POOL=p,r.prototype._update=function(e){var t,r,n,c,u,f,h,d,l,p;t=f=this._a,r=h=this._b,n=d=this._c,c=l=this._d,u=p=this._e;for(var g=this._w,m=0;80>m;m++){var v=g[m]=16>m?e.readInt32BE(4*m):a(g[m-3]^g[m-8]^g[m-14]^g[m-16],1),y=s(s(a(t,5),i(m,r,n,c)),s(s(u,v),o(m)));u=c,c=n,n=a(r,30),r=t,t=y}this._a=s(t,f),this._b=s(r,h),this._c=s(n,d),this._d=s(c,l),this._e=s(u,p)},r.prototype._hash=function(){p.length<100&&p.push(this);var t=new e(20);return t.writeInt32BE(0|this._a,c),t.writeInt32BE(0|this._b,u),t.writeInt32BE(0|this._c,f),t.writeInt32BE(0|this._d,h),t.writeInt32BE(0|this._e,d),t},r}},function(e,t,r){var n=r(199).inherits;e.exports=function(e,t){function r(){this.init(),this._w=l,t.call(this,64,56)}function i(e,t){return e>>>t|e<<32-t}function o(e,t){return e>>>t}function s(e,t,r){return e&t^~e&r}function a(e,t,r){return e&t^e&r^t&r}function c(e){return i(e,2)^i(e,13)^i(e,22)}function u(e){return i(e,6)^i(e,11)^i(e,25)}function f(e){return i(e,7)^i(e,18)^o(e,3)}function h(e){return i(e,17)^i(e,19)^o(e,10)}var d=[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],l=new Array(64);return n(r,t),r.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},r.prototype._update=function(e){var t,r,n,i,o,l,p,g,m,v,y=this._w;t=0|this._a,r=0|this._b,n=0|this._c,i=0|this._d,o=0|this._e,l=0|this._f,p=0|this._g,g=0|this._h;for(var b=0;64>b;b++){var w=y[b]=16>b?e.readInt32BE(4*b):h(y[b-2])+y[b-7]+f(y[b-15])+y[b-16];m=g+u(o)+s(o,l,p)+d[b]+w,v=c(t)+a(t,r,n),g=p,p=l,l=o,o=i+m,i=n,n=r,r=t,t=m+v}this._a=t+this._a|0,this._b=r+this._b|0,this._c=n+this._c|0,this._d=i+this._d|0,this._e=o+this._e|0,this._f=l+this._f|0,this._g=p+this._g|0,this._h=g+this._h|0},r.prototype._hash=function(){var t=new e(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},r}},function(e,t,r){var n=r(199).inherits;e.exports=function(e,t){function r(){this.init(),this._w=c,t.call(this,128,112)}function i(e,t,r){return e>>>r|t<<32-r}function o(e,t,r){return e&t^~e&r}function s(e,t,r){return e&t^e&r^t&r}var a=[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],c=new Array(160);return n(r,t),r.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},r.prototype._update=function(e){var t,r,n,c,u,f,h,d,l,p,g,m,v,y,b,w,S=this._w;t=0|this._a,r=0|this._b,n=0|this._c,c=0|this._d,u=0|this._e,f=0|this._f,h=0|this._g,d=0|this._h,l=0|this._al,p=0|this._bl,g=0|this._cl,m=0|this._dl,v=0|this._el,y=0|this._fl,b=0|this._gl,w=0|this._hl;for(var x=0;80>x;x++){var E,A,P=2*x;if(16>x)E=S[P]=e.readInt32BE(4*P),A=S[P+1]=e.readInt32BE(4*P+4);else{var T=S[P-30],I=S[P-30+1],O=i(T,I,1)^i(T,I,8)^T>>>7,R=i(I,T,1)^i(I,T,8)^i(I,T,7);T=S[P-4],I=S[P-4+1];var k=i(T,I,19)^i(I,T,29)^T>>>6,L=i(I,T,19)^i(T,I,29)^i(I,T,6),N=S[P-14],j=S[P-14+1],F=S[P-32],M=S[P-32+1];A=R+j,E=O+N+(R>>>0>A>>>0?1:0),A+=L,E=E+k+(L>>>0>A>>>0?1:0),A+=M,E=E+F+(M>>>0>A>>>0?1:0),S[P]=E,S[P+1]=A}var B=s(t,r,n),C=s(l,p,g),q=i(t,l,28)^i(l,t,2)^i(l,t,7),z=i(l,t,28)^i(t,l,2)^i(t,l,7),D=i(u,v,14)^i(u,v,18)^i(v,u,9),U=i(v,u,14)^i(v,u,18)^i(u,v,9),V=a[P],$=a[P+1],H=o(u,f,h),X=o(v,y,b),K=w+U,J=d+D+(w>>>0>K>>>0?1:0);K+=X,J=J+H+(X>>>0>K>>>0?1:0),K+=$,J=J+V+($>>>0>K>>>0?1:0),K+=A,J=J+E+(A>>>0>K>>>0?1:0);var G=z+C,W=q+B+(z>>>0>G>>>0?1:0);d=h,w=b,h=f,b=y,f=u,y=v,v=m+K|0,u=c+J+(m>>>0>v>>>0?1:0)|0,c=n,m=g,n=r,g=p,r=t,p=l,l=K+G|0,t=J+W+(K>>>0>l>>>0?1:0)|0}this._al=this._al+l|0,this._bl=this._bl+p|0,this._cl=this._cl+g|0,this._dl=this._dl+m|0,this._el=this._el+v|0,this._fl=this._fl+y|0,this._gl=this._gl+b|0,this._hl=this._hl+w|0,this._a=this._a+t+(this._al>>>0<l>>>0?1:0)|0,this._b=this._b+r+(this._bl>>>0<p>>>0?1:0)|0,this._c=this._c+n+(this._cl>>>0<g>>>0?1:0)|0,this._d=this._d+c+(this._dl>>>0<m>>>0?1:0)|0,this._e=this._e+u+(this._el>>>0<v>>>0?1:0)|0,this._f=this._f+f+(this._fl>>>0<y>>>0?1:0)|0,this._g=this._g+h+(this._gl>>>0<b>>>0?1:0)|0,this._h=this._h+d+(this._hl>>>0<w>>>0?1:0)|0},r.prototype._hash=function(){function t(e,t,n){r.writeInt32BE(e,n),r.writeInt32BE(t,n+4)}var r=new e(64);return t(this._a,this._al,0),t(this._b,this._bl,8),t(this._c,this._cl,16),t(this._d,this._dl,24),t(this._e,this._el,32),t(this._f,this._fl,40),t(this._g,this._gl,48),t(this._h,this._hl,56),r},r}},function(e,t,r){function n(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;for(var r=1732584193,n=-271733879,i=-1732584194,f=271733878,h=0;h<e.length;h+=16){var d=r,l=n,p=i,g=f;r=o(r,n,i,f,e[h+0],7,-680876936),f=o(f,r,n,i,e[h+1],12,-389564586),i=o(i,f,r,n,e[h+2],17,606105819),n=o(n,i,f,r,e[h+3],22,-1044525330),r=o(r,n,i,f,e[h+4],7,-176418897),f=o(f,r,n,i,e[h+5],12,1200080426),i=o(i,f,r,n,e[h+6],17,-1473231341),n=o(n,i,f,r,e[h+7],22,-45705983),r=o(r,n,i,f,e[h+8],7,1770035416),f=o(f,r,n,i,e[h+9],12,-1958414417),i=o(i,f,r,n,e[h+10],17,-42063),n=o(n,i,f,r,e[h+11],22,-1990404162),r=o(r,n,i,f,e[h+12],7,1804603682),f=o(f,r,n,i,e[h+13],12,-40341101),i=o(i,f,r,n,e[h+14],17,-1502002290),n=o(n,i,f,r,e[h+15],22,1236535329),r=s(r,n,i,f,e[h+1],5,-165796510),f=s(f,r,n,i,e[h+6],9,-1069501632),i=s(i,f,r,n,e[h+11],14,643717713),n=s(n,i,f,r,e[h+0],20,-373897302),r=s(r,n,i,f,e[h+5],5,-701558691),f=s(f,r,n,i,e[h+10],9,38016083),i=s(i,f,r,n,e[h+15],14,-660478335),n=s(n,i,f,r,e[h+4],20,-405537848),r=s(r,n,i,f,e[h+9],5,568446438),f=s(f,r,n,i,e[h+14],9,-1019803690),i=s(i,f,r,n,e[h+3],14,-187363961),n=s(n,i,f,r,e[h+8],20,1163531501),r=s(r,n,i,f,e[h+13],5,-1444681467),f=s(f,r,n,i,e[h+2],9,-51403784),i=s(i,f,r,n,e[h+7],14,1735328473),n=s(n,i,f,r,e[h+12],20,-1926607734),r=a(r,n,i,f,e[h+5],4,-378558),f=a(f,r,n,i,e[h+8],11,-2022574463),i=a(i,f,r,n,e[h+11],16,1839030562),n=a(n,i,f,r,e[h+14],23,-35309556),r=a(r,n,i,f,e[h+1],4,-1530992060),f=a(f,r,n,i,e[h+4],11,1272893353),i=a(i,f,r,n,e[h+7],16,-155497632),n=a(n,i,f,r,e[h+10],23,-1094730640),r=a(r,n,i,f,e[h+13],4,681279174),f=a(f,r,n,i,e[h+0],11,-358537222),i=a(i,f,r,n,e[h+3],16,-722521979),n=a(n,i,f,r,e[h+6],23,76029189),r=a(r,n,i,f,e[h+9],4,-640364487),f=a(f,r,n,i,e[h+12],11,-421815835),i=a(i,f,r,n,e[h+15],16,530742520),n=a(n,i,f,r,e[h+2],23,-995338651),r=c(r,n,i,f,e[h+0],6,-198630844),f=c(f,r,n,i,e[h+7],10,1126891415),i=c(i,f,r,n,e[h+14],15,-1416354905),n=c(n,i,f,r,e[h+5],21,-57434055),r=c(r,n,i,f,e[h+12],6,1700485571),f=c(f,r,n,i,e[h+3],10,-1894986606),i=c(i,f,r,n,e[h+10],15,-1051523),n=c(n,i,f,r,e[h+1],21,-2054922799),r=c(r,n,i,f,e[h+8],6,1873313359),f=c(f,r,n,i,e[h+15],10,-30611744),i=c(i,f,r,n,e[h+6],15,-1560198380),n=c(n,i,f,r,e[h+13],21,1309151649),r=c(r,n,i,f,e[h+4],6,-145523070),f=c(f,r,n,i,e[h+11],10,-1120210379),i=c(i,f,r,n,e[h+2],15,718787259),n=c(n,i,f,r,e[h+9],21,-343485551),r=u(r,d),n=u(n,l),i=u(i,p),f=u(f,g)}return Array(r,n,i,f)}function i(e,t,r,n,i,o){return u(f(u(u(t,e),u(n,o)),i),r)}function o(e,t,r,n,o,s,a){return i(t&r|~t&n,e,t,o,s,a)}function s(e,t,r,n,o,s,a){return i(t&n|r&~n,e,t,o,s,a)}function a(e,t,r,n,o,s,a){return i(t^r^n,e,t,o,s,a)}function c(e,t,r,n,o,s,a){return i(r^(t|~n),e,t,o,s,a)}function u(e,t){var r=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(r>>16);return n<<16|65535&r}function f(e,t){return e<<t|e>>>32-t}var h=r(217);e.exports=function(e){return h.hash(e,n,16)}},function(e,t,r){(function(t){function r(e,r){if(e.length%o!==0){var n=e.length+(o-e.length%o);e=t.concat([e,s],n)}for(var i=[],a=r?e.readInt32BE:e.readInt32LE,c=0;c<e.length;c+=o)i.push(a.call(e,c));return i}function n(e,r,n){for(var i=new t(r),o=n?i.writeInt32BE:i.writeInt32LE,s=0;s<e.length;s++)o.call(i,e[s],4*s,!0);
  return i}function i(e,i,o,s){t.isBuffer(e)||(e=new t(e));var c=i(r(e,s),e.length*a);return n(c,o,s)}var o=4,s=new t(o);s.fill(0);var a=8;e.exports={hash:i}}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function r(e,t,r){return e^t^r}function n(e,t,r){return e&t|~e&r}function i(e,t,r){return(e|~t)^r}function o(e,t,r){return e&r|t&~r}function s(e,t,r){return e^(t|~r)}function a(e,t){return e<<t|e>>>32-t}function c(e){var r=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof e&&(e=new t(e,"utf8"));var n=g(e),i=8*e.length,o=8*e.length;n[i>>>5]|=128<<24-i%32,n[(i+64>>>9<<4)+14]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);for(var s=0;s<n.length;s+=16)v(r,n,s);for(var s=0;5>s;s++){var a=r[s];r[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var c=m(r);return new t(c)}e.exports=c;var u=[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],f=[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],h=[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],d=[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],l=[0,1518500249,1859775393,2400959708,2840853838],p=[1352829926,1548603684,1836072691,2053994217,0],g=function(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t},m=function(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t},v=function(e,t,c){for(var g=0;16>g;g++){var m=c+g,v=t[m];t[m]=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8)}var y,b,w,S,x,E,A,P,T,I;E=y=e[0],A=b=e[1],P=w=e[2],T=S=e[3],I=x=e[4];for(var O,g=0;80>g;g+=1)O=y+t[c+u[g]]|0,O+=16>g?r(b,w,S)+l[0]:32>g?n(b,w,S)+l[1]:48>g?i(b,w,S)+l[2]:64>g?o(b,w,S)+l[3]:s(b,w,S)+l[4],O=0|O,O=a(O,h[g]),O=O+x|0,y=x,x=S,S=a(w,10),w=b,b=O,O=E+t[c+f[g]]|0,O+=16>g?s(A,P,T)+p[0]:32>g?o(A,P,T)+p[1]:48>g?i(A,P,T)+p[2]:64>g?n(A,P,T)+p[3]:r(A,P,T)+p[4],O=0|O,O=a(O,d[g]),O=O+I|0,E=I,I=T,T=a(P,10),P=A,A=O;O=e[1]+w+T|0,e[1]=e[2]+S+I|0,e[2]=e[3]+x+E|0,e[3]=e[4]+y+A|0,e[4]=e[0]+b+P|0,e[0]=O}}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function n(e,r){if(!(this instanceof n))return new n(e,r);this._opad=c,this._alg=e;var s="sha512"===e?128:64;r=this._key=t.isBuffer(r)?r:new t(r),r.length>s?r=i(e).update(r).digest():r.length<s&&(r=t.concat([r,o],s));for(var a=this._ipad=new t(s),c=this._opad=new t(s),u=0;s>u;u++)a[u]=54^r[u],c[u]=92^r[u];this._hash=i(e).update(a)}var i=r(210),o=new t(128);o.fill(0),e.exports=n,n.prototype.update=function(e,t){return this._hash.update(e,t),this},n.prototype.digest=function(e){var t=this._hash.digest();return i(this._alg).update(this._opad).update(t).digest(e)}}).call(t,r(204).Buffer)},function(e,t,r){var n=r(221);e.exports=function(e,t){t=t||{};var r=n(e);return t.pbkdf2=r.pbkdf2,t.pbkdf2Sync=r.pbkdf2Sync,t}},function(e,t,r){(function(t){e.exports=function(e){function r(e,t,r,i,o,s){if("function"==typeof o&&(s=o,o=void 0),"function"!=typeof s)throw new Error("No callback provided to pbkdf2");setTimeout(function(){var a;try{a=n(e,t,r,i,o)}catch(c){return s(c)}s(void 0,a)})}function n(r,n,i,o,s){if("number"!=typeof i)throw new TypeError("Iterations not a number");if(0>i)throw new TypeError("Bad iterations");if("number"!=typeof o)throw new TypeError("Key length not a number");if(0>o)throw new TypeError("Bad key length");s=s||"sha1",t.isBuffer(r)||(r=new t(r)),t.isBuffer(n)||(n=new t(n));var a,c,u,f=1,h=new t(o),d=new t(n.length+4);n.copy(d,0,0,n.length);for(var l=1;f>=l;l++){d.writeUInt32BE(l,n.length);var p=e.createHmac(s,r).update(d).digest();if(!a&&(a=p.length,u=new t(a),f=Math.ceil(o/a),c=o-(f-1)*a,o>(Math.pow(2,32)-1)*a))throw new TypeError("keylen exceeds maximum length");p.copy(u,0,0,a);for(var g=1;i>g;g++){p=e.createHmac(s,r).update(p).digest();for(var m=0;a>m;m++)u[m]^=p[m]}var v=(l-1)*a,y=l==f?c:a;u.copy(h,v,0,y)}return h}return{pbkdf2:r,pbkdf2Sync:n}}}).call(t,r(204).Buffer)},function(e,t,r){var n=t;n.utils=r(223),n.common=r(225),n.sha=r(226),n.ripemd=r(227),n.hmac=r(228),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){function n(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t){e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!==0&&(e="0"+e);for(var n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}}else for(var n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}else for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}function i(e){for(var t="",r=0;r<e.length;r++)t+=a(e[r].toString(16));return t}function o(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24;return t>>>0}function s(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=o(i)),r+=c(i.toString(16))}return r}function a(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}function u(e,t,r,n){var i=r-t;v(i%4===0);for(var o=new Array(i/4),s=0,a=t;s<o.length;s++,a+=4){var c;c="big"===n?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],o[s]=c>>>0}return o}function f(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r}function h(e,t){return e>>>t|e<<32-t}function d(e,t){return e<<t|e>>>32-t}function l(e,t){return e+t>>>0}function p(e,t,r){return e+t+r>>>0}function g(e,t,r,n){return e+t+r+n>>>0}function m(e,t,r,n,i){return e+t+r+n+i>>>0}function v(e,t){if(!e)throw new Error(t||"Assertion failed")}function y(e,t,r,n){var i=e[t],o=e[t+1],s=n+o>>>0,a=(n>s?1:0)+r+i;e[t]=a>>>0,e[t+1]=s}function b(e,t,r,n){var i=t+n>>>0,o=(t>i?1:0)+e+r;return o>>>0}function w(e,t,r,n){var i=t+n;return i>>>0}function S(e,t,r,n,i,o,s,a){var c=0,u=t;u=u+n>>>0,c+=t>u?1:0,u=u+o>>>0,c+=o>u?1:0,u=u+a>>>0,c+=a>u?1:0;var f=e+r+i+s+c;return f>>>0}function x(e,t,r,n,i,o,s,a){var c=t+n+o+a;return c>>>0}function E(e,t,r,n,i,o,s,a,c,u){var f=0,h=t;h=h+n>>>0,f+=t>h?1:0,h=h+o>>>0,f+=o>h?1:0,h=h+a>>>0,f+=a>h?1:0,h=h+u>>>0,f+=u>h?1:0;var d=e+r+i+s+c+f;return d>>>0}function A(e,t,r,n,i,o,s,a,c,u){var f=t+n+o+a+u;return f>>>0}function P(e,t,r){var n=t<<32-r|e>>>r;return n>>>0}function T(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}function I(e,t,r){return e>>>r}function O(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}var R=t,k=r(224);R.toArray=n,R.toHex=i,R.htonl=o,R.toHex32=s,R.zero2=a,R.zero8=c,R.join32=u,R.split32=f,R.rotr32=h,R.rotl32=d,R.sum32=l,R.sum32_3=p,R.sum32_4=g,R.sum32_5=m,R.assert=v,R.inherits=k,t.sum64=y,t.sum64_hi=b,t.sum64_lo=w,t.sum64_4_hi=S,t.sum64_4_lo=x,t.sum64_5_hi=E,t.sum64_5_lo=A,t.rotr64_hi=P,t.rotr64_lo=T,t.shr64_hi=I,t.shr64_lo=O},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){function n(){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}var i=r(222),o=i.utils,s=o.assert;t.BlockHash=n,n.prototype.update=function(e,t){if(e=o.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=o.join32(e,0,e.length-r,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this},n.prototype.digest=function(e){return this.update(this._pad()),s(null===this.pending),this._digest(e)},n.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;r>i;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else{n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0;for(var o=8;o<this.padLength;o++)n[i++]=0}return n}},function(e,t,r){function n(){return this instanceof n?(J.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=G,void(this.W=new Array(64))):new n}function i(){return this instanceof i?(n.call(this),void(this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])):new i}function o(){return this instanceof o?(J.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=W,void(this.W=new Array(160))):new o}function s(){return this instanceof s?(o.call(this),void(this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428])):new s}function a(){return this instanceof a?(J.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],void(this.W=new Array(80))):new a}function c(e,t,r){return e&t^~e&r}function u(e,t,r){return e&t^e&r^t&r}function f(e,t,r){return e^t^r}function h(e){return L(e,2)^L(e,13)^L(e,22)}function d(e){return L(e,6)^L(e,11)^L(e,25)}function l(e){return L(e,7)^L(e,18)^e>>>3}function p(e){return L(e,17)^L(e,19)^e>>>10}function g(e,t,r,n){return 0===e?c(t,r,n):1===e||3===e?f(t,r,n):2===e?u(t,r,n):void 0}function m(e,t,r,n,i,o){var s=e&r^~e&i;return 0>s&&(s+=4294967296),s}function v(e,t,r,n,i,o){var s=t&n^~t&o;return 0>s&&(s+=4294967296),s}function y(e,t,r,n,i,o){var s=e&r^e&i^r&i;return 0>s&&(s+=4294967296),s}function b(e,t,r,n,i,o){var s=t&n^t&o^n&o;return 0>s&&(s+=4294967296),s}function w(e,t){var r=B(e,t,28),n=B(t,e,2),i=B(t,e,7),o=r^n^i;return 0>o&&(o+=4294967296),o}function S(e,t){var r=C(e,t,28),n=C(t,e,2),i=C(t,e,7),o=r^n^i;return 0>o&&(o+=4294967296),o}function x(e,t){var r=B(e,t,14),n=B(e,t,18),i=B(t,e,9),o=r^n^i;return 0>o&&(o+=4294967296),o}function E(e,t){var r=C(e,t,14),n=C(e,t,18),i=C(t,e,9),o=r^n^i;return 0>o&&(o+=4294967296),o}function A(e,t){var r=B(e,t,1),n=B(e,t,8),i=q(e,t,7),o=r^n^i;return 0>o&&(o+=4294967296),o}function P(e,t){var r=C(e,t,1),n=C(e,t,8),i=z(e,t,7),o=r^n^i;return 0>o&&(o+=4294967296),o}function T(e,t){var r=B(e,t,19),n=B(t,e,29),i=q(e,t,6),o=r^n^i;return 0>o&&(o+=4294967296),o}function I(e,t){var r=C(e,t,19),n=C(t,e,29),i=z(e,t,6),o=r^n^i;return 0>o&&(o+=4294967296),o}var O=r(222),R=O.utils,k=R.assert,L=R.rotr32,N=R.rotl32,j=R.sum32,F=R.sum32_4,M=R.sum32_5,B=R.rotr64_hi,C=R.rotr64_lo,q=R.shr64_hi,z=R.shr64_lo,D=R.sum64,U=R.sum64_hi,V=R.sum64_lo,$=R.sum64_4_hi,H=R.sum64_4_lo,X=R.sum64_5_hi,K=R.sum64_5_lo,J=O.common.BlockHash,G=[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],W=[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],Y=[1518500249,1859775393,2400959708,3395469782];R.inherits(n,J),t.sha256=n,n.blockSize=512,n.outSize=256,n.hmacStrength=192,n.padLength=64,n.prototype._update=function(e,t){for(var r=this.W,n=0;16>n;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=F(p(r[n-2]),r[n-7],l(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],s=this.h[2],a=this.h[3],f=this.h[4],g=this.h[5],m=this.h[6],v=this.h[7];k(this.k.length===r.length);for(var n=0;n<r.length;n++){var y=M(v,d(f),c(f,g,m),this.k[n],r[n]),b=j(h(i),u(i,o,s));v=m,m=g,g=f,f=j(a,y),a=s,s=o,o=i,i=j(y,b)}this.h[0]=j(this.h[0],i),this.h[1]=j(this.h[1],o),this.h[2]=j(this.h[2],s),this.h[3]=j(this.h[3],a),this.h[4]=j(this.h[4],f),this.h[5]=j(this.h[5],g),this.h[6]=j(this.h[6],m),this.h[7]=j(this.h[7],v)},n.prototype._digest=function(e){return"hex"===e?R.toHex32(this.h,"big"):R.split32(this.h,"big")},R.inherits(i,n),t.sha224=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(e){return"hex"===e?R.toHex32(this.h.slice(0,7),"big"):R.split32(this.h.slice(0,7),"big")},R.inherits(o,J),t.sha512=o,o.blockSize=1024,o.outSize=512,o.hmacStrength=192,o.padLength=128,o.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;32>n;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=T(r[n-4],r[n-3]),o=I(r[n-4],r[n-3]),s=r[n-14],a=r[n-13],c=A(r[n-30],r[n-29]),u=P(r[n-30],r[n-29]),f=r[n-32],h=r[n-31];r[n]=$(i,o,s,a,c,u,f,h),r[n+1]=H(i,o,s,a,c,u,f,h)}},o.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],o=this.h[2],s=this.h[3],a=this.h[4],c=this.h[5],u=this.h[6],f=this.h[7],h=this.h[8],d=this.h[9],l=this.h[10],p=this.h[11],g=this.h[12],A=this.h[13],P=this.h[14],T=this.h[15];k(this.k.length===r.length);for(var I=0;I<r.length;I+=2){var O=P,R=T,L=x(h,d),N=E(h,d),j=m(h,d,l,p,g,A),F=v(h,d,l,p,g,A),M=this.k[I],B=this.k[I+1],C=r[I],q=r[I+1],z=X(O,R,L,N,j,F,M,B,C,q),$=K(O,R,L,N,j,F,M,B,C,q),O=w(n,i),R=S(n,i),L=y(n,i,o,s,a,c),N=b(n,i,o,s,a,c),H=U(O,R,L,N),J=V(O,R,L,N);P=g,T=A,g=l,A=p,l=h,p=d,h=U(u,f,z,$),d=V(f,f,z,$),u=a,f=c,a=o,c=s,o=n,s=i,n=U(z,$,H,J),i=V(z,$,H,J)}D(this.h,0,n,i),D(this.h,2,o,s),D(this.h,4,a,c),D(this.h,6,u,f),D(this.h,8,h,d),D(this.h,10,l,p),D(this.h,12,g,A),D(this.h,14,P,T)},o.prototype._digest=function(e){return"hex"===e?R.toHex32(this.h,"big"):R.split32(this.h,"big")},R.inherits(s,o),t.sha384=s,s.blockSize=1024,s.outSize=384,s.hmacStrength=192,s.padLength=128,s.prototype._digest=function(e){return"hex"===e?R.toHex32(this.h.slice(0,12),"big"):R.split32(this.h.slice(0,12),"big")},R.inherits(a,J),t.sha1=a,a.blockSize=512,a.outSize=160,a.hmacStrength=80,a.padLength=64,a.prototype._update=function(e,t){for(var r=this.W,n=0;16>n;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=N(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);for(var i=this.h[0],o=this.h[1],s=this.h[2],a=this.h[3],c=this.h[4],n=0;n<r.length;n++){var u=~~(n/20),f=M(N(i,5),g(u,o,s,a),c,r[n],Y[u]);c=a,a=s,s=N(o,30),o=i,i=f}this.h[0]=j(this.h[0],i),this.h[1]=j(this.h[1],o),this.h[2]=j(this.h[2],s),this.h[3]=j(this.h[3],a),this.h[4]=j(this.h[4],c)},a.prototype._digest=function(e){return"hex"===e?R.toHex32(this.h,"big"):R.split32(this.h,"big")}},function(e,t,r){function n(){return this instanceof n?(l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],void(this.endian="little")):new n}function i(e,t,r,n){return 15>=e?t^r^n:31>=e?t&r|~t&n:47>=e?(t|~r)^n:63>=e?t&n|r&~n:t^(r|~n)}function o(e){return 15>=e?0:31>=e?1518500249:47>=e?1859775393:63>=e?2400959708:2840853838}function s(e){return 15>=e?1352829926:31>=e?1548603684:47>=e?1836072691:63>=e?2053994217:0}var a=r(222),c=a.utils,u=c.rotl32,f=c.sum32,h=c.sum32_3,d=c.sum32_4,l=a.common.BlockHash;c.inherits(n,l),t.ripemd160=n,n.blockSize=512,n.outSize=160,n.hmacStrength=192,n.padLength=64,n.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],a=this.h[2],c=this.h[3],l=this.h[4],y=r,b=n,w=a,S=c,x=l,E=0;80>E;E++){var A=f(u(d(r,i(E,n,a,c),e[p[E]+t],o(E)),m[E]),l);r=l,l=c,c=u(a,10),a=n,n=A,A=f(u(d(y,i(79-E,b,w,S),e[g[E]+t],s(E)),v[E]),x),y=x,x=S,S=u(w,10),w=b,b=A}A=h(this.h[1],a,S),this.h[1]=h(this.h[2],c,x),this.h[2]=h(this.h[3],l,y),this.h[3]=h(this.h[4],r,b),this.h[4]=h(this.h[0],n,w),this.h[0]=A},n.prototype._digest=function(e){return"hex"===e?c.toHex32(this.h,"little"):c.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],g=[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],m=[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(e,t,r){function n(e,t,r){return this instanceof n?(this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,void this._init(o.toArray(t,r))):new n(e,t,r)}var i=r(222),o=i.utils,s=o.assert;e.exports=n,n.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),s(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(var t=0;t<e.length;t++)e[t]^=54;this.inner=(new this.Hash).update(e);for(var t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},n.prototype.update=function(e,t){return this.inner.update(e,t),this},n.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},function(e,t,r){"use strict";var n=t;n.version=r(230).version,n.utils=r(231),n.rand=r(202),n.hmacDRBG=r(234),n.curve=r(235),n.curves=r(241),n.ec=r(243),n.eddsa=r(246)},function(e,t){e.exports={name:"elliptic",version:"5.2.1",description:"EC cryptography",main:"lib/elliptic.js",scripts:{test:"make lint && istanbul test _mocha --reporter=spec test/*-test.js",coveralls:"cat ./coverage/lcov.info | coveralls"},repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},keywords:["EC","Elliptic","curve","Cryptography"],author:{name:"Fedor Indutny",email:"fedor@indutny.com"},license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{browserify:"^3.44.2",coveralls:"^2.11.3",istanbul:"^0.3.17",jscs:"^1.11.3",jshint:"^2.6.0",mocha:"^2.1.0","uglify-js":"^2.4.13"},dependencies:{"bn.js":"^3.1.1",brorand:"^1.0.1","hash.js":"^1.0.0",inherits:"^2.0.1"},readme:"# Elliptic [![Build Status](https://secure.travis-ci.org/indutny/elliptic.png)](http://travis-ci.org/indutny/elliptic) [![Coverage Status](https://coveralls.io/repos/indutny/elliptic/badge.svg?branch=master&service=github)](https://coveralls.io/github/indutny/elliptic?branch=master)\n\nFast elliptic-curve cryptography in a plain javascript implementation.\n\nNOTE: Please take a look at http://safecurves.cr.yp.to/ before choosing a curve\nfor your cryptography operations.\n\n## Incentive\n\nECC is much slower than regular RSA cryptography, the JS implementations are\neven more slower.\n\n## Benchmarks\n\n```bash\n$ node benchmarks/index.js\nBenchmarking: sign\nelliptic#sign x 262 ops/sec ±0.51% (177 runs sampled)\neccjs#sign x 55.91 ops/sec ±0.90% (144 runs sampled)\n------------------------\nFastest is elliptic#sign\n========================\nBenchmarking: verify\nelliptic#verify x 113 ops/sec ±0.50% (166 runs sampled)\neccjs#verify x 48.56 ops/sec ±0.36% (125 runs sampled)\n------------------------\nFastest is elliptic#verify\n========================\nBenchmarking: gen\nelliptic#gen x 294 ops/sec ±0.43% (176 runs sampled)\neccjs#gen x 62.25 ops/sec ±0.63% (129 runs sampled)\n------------------------\nFastest is elliptic#gen\n========================\nBenchmarking: ecdh\nelliptic#ecdh x 136 ops/sec ±0.85% (156 runs sampled)\n------------------------\nFastest is elliptic#ecdh\n========================\n```\n\n## API\n\n### ECDSA\n\n```javascript\nvar EC = require('elliptic').ec;\n\n// Create and initialize EC context\n// (better do it once and reuse it)\nvar ec = new EC('secp256k1');\n\n// Generate keys\nvar key = ec.genKeyPair();\n\n// Sign message (must be an array, or it'll be treated as a hex sequence)\nvar msg = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];\nvar signature = key.sign(msg);\n\n// Export DER encoded signature in Array\nvar derSign = signature.toDER();\n\n// Verify signature\nconsole.log(key.verify(msg, derSign));\n```\n\n### ECDH\n\n```javascript\n// Generate keys\nvar key1 = ec.genKeyPair();\nvar key2 = ec.genKeyPair();\n\nvar shared1 = key1.derive(key2.getPublic());\nvar shared2 = key2.derive(key1.getPublic());\n\nconsole.log('Both shared secrets are BN instances');\nconsole.log(shared1.toString(16));\nconsole.log(shared2.toString(16));\n```\n\nNOTE: `.derive()` returns a [BN][1] instance.\n\n## Supported curves\n\nElliptic.js support following curve types:\n\n* Short Weierstrass\n* Montgomery\n* Edwards\n* Twisted Edwards\n\nFollowing curve 'presets' are embedded into the library:\n\n* `secp256k1`\n* `p192`\n* `p224`\n* `p256`\n* `curve25519`\n* `ed25519`\n\nNOTE: That `curve25519` could not be used for ECDSA, use `ed25519` instead.\n\n### Implementation details\n\nECDSA is using deterministic `k` value generation as per [RFC6979][0]. Most of\nthe curve operations are performed on non-affine coordinates (either projective\nor extended), various windowing techniques are used for different cases.\n\nAll operations are performed in reduction context using [bn.js][1], hashing is\nprovided by [hash.js][2]\n\n### Related projects\n\n* [eccrypto][3]: isomorphic implementation of ECDSA, ECDH and ECIES for both\n  browserify and node (uses `elliptic` for browser and [secp256k1-node][4] for\n  node)\n\n#### LICENSE\n\nThis software is licensed under the MIT License.\n\nCopyright Fedor Indutny, 2014.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to permit\npersons to whom the Software is furnished to do so, subject to the\nfollowing conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\nNO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\nUSE OR OTHER DEALINGS IN THE SOFTWARE.\n\n[0]: http://tools.ietf.org/html/rfc6979\n[1]: https://github.com/indutny/bn.js\n[2]: https://github.com/indutny/hash.js\n[3]: https://github.com/bitchan/eccrypto\n[4]: https://github.com/wanderer/secp256k1-node\n",readmeFilename:"README.md",_id:"elliptic@5.2.1",_shasum:"fa294b6563c6ddbc9ba3dc8594687ae840858f10",_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-5.2.1.tgz",_from:"https://registry.npmjs.org/elliptic/-/elliptic-5.2.1.tgz"}},function(e,t,r){"use strict";function n(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if(t){if("hex"===t){e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!==0&&(e="0"+e);for(var n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}}else for(var n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r}function i(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r<e.length;r++)t+=i(e[r].toString(16));return t}function s(e,t){for(var r=[],n=1<<t+1,i=e.clone();i.cmpn(1)>=0;){var o;if(i.isOdd()){var s=i.andln(n-1);o=s>(n>>1)-1?(n>>1)-s:s,i.isubn(o)}else o=0;r.push(o);for(var a=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,c=1;a>c;c++)r.push(0);i.iushrn(a)}return r}function a(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n=0,i=0;e.cmpn(-n)>0||t.cmpn(-i)>0;){var o=e.andln(3)+n&3,s=t.andln(3)+i&3;3===o&&(o=-1),3===s&&(s=-1);var a;if(0===(1&o))a=0;else{var c=e.andln(7)+n&7;a=3!==c&&5!==c||2!==s?o:-o}r[0].push(a);var u;if(0===(1&s))u=0;else{var c=t.andln(7)+i&7;u=3!==c&&5!==c||2!==o?s:-s}r[1].push(u),2*n===a+1&&(n=1-n),2*i===u+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r}function c(e,t){var r=t.name,n="_"+r;e.prototype[r]=function(){return void 0!==this[n]?this[n]:this[n]=t.call(this)}}function u(e){return"string"==typeof e?h.toArray(e,"hex"):e}function f(e){return new d(e,"hex","le")}var h=t,d=r(232);h.assert=function(e,t){if(!e)throw new Error(t||"Assertion failed")},h.toArray=n,h.zero2=i,h.toHex=o,h.encode=function(e,t){return"hex"===t?o(e):e},h.getNAF=s,h.getJSF=a,h.cachedProperty=c,h.parseBytes=u,h.intFromLE=f},function(e,t,r){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){return null!==e&&"object"==typeof e&&Array.isArray(e.words)?e:(this.sign=!1,this.words=null,this.length=0,this.red=null,"le"!==t&&"be"!==t||(r=t,t=10),void(null!==e&&this._init(e||0,t||10,r||"be")))}function o(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;i>o;o++){var s=e.charCodeAt(o)-48;n<<=4,n|=s>=49&&54>=s?s-49+10:s>=17&&22>=s?s-17+10:15&s}return n}function s(e,t,r,n){for(var i=0,o=Math.min(e.length,r),s=t;o>s;s++){var a=e.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}function a(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}function c(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function u(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function f(){c.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function h(){c.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function d(){c.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function l(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else this.m=e,this.prime=null}function p(e){l.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26,i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&36>=t),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.sign=!0),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initNumber=function(e,t,n){0>e&&(this.sign=!0,e=-e),67108864>e?(this.words=[67108863&e],this.length=1):4503599627370496>e?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(9007199254740992>e),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o=0;if("be"===n)for(var i=e.length-1,s=0;i>=0;i-=3){var a=e[i]|e[i-1]<<8|e[i-2]<<16;this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,o+=24,o>=26&&(o-=26,s++)}else if("le"===n)for(var i=0,s=0;i<e.length;i+=3){var a=e[i]|e[i+1]<<8|e[i+2]<<16;this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,o+=24,o>=26&&(o-=26,s++)}return this.strip()},i.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;for(var n=0,r=e.length-6,i=0;r>=t;r-=6){var s=o(e,r,r+6);this.words[i]|=s<<n&67108863,this.words[i+1]|=s>>>26-n&4194303,n+=24,n>=26&&(n-=26,i++)}if(r+6!==t){var s=o(e,t,r+6);this.words[i]|=s<<n&67108863,this.words[i+1]|=s>>>26-n&4194303}this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;67108863>=i;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,c=Math.min(o,o-a)+r,u=0,f=r;c>f;f+=n)u=s(e,f,f+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){for(var h=1,u=s(e,f,e.length,t),f=0;a>f;f++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.sign=this.sign,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.sign=!1),
  this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var g=["","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"],m=[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],v=[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];i.prototype.toString=function(e,t){e=e||10;var t=0|t||1;if(16===e||"hex"===e){for(var n="",i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],c=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,n=0!==o||s!==this.length-1?g[6-c.length]+c+n:c+n,i+=2,i>=26&&(i-=26,s--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return this.sign&&(n="-"+n),n}if(e===(0|e)&&e>=2&&36>=e){var u=m[e],f=v[e],n="",h=this.clone();for(h.sign=!1;0!==h.cmpn(0);){var d=h.modn(f).toString(e);h=h.idivn(f),n=0!==h.cmpn(0)?g[u-d.length]+d+n:d+n}for(0===this.cmpn(0)&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.sign&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toArray=function(e,t){this.strip();var n="le"===e,i=new Array(this.byteLength());i[0]=0;var o=this.clone();if(n)for(var s=0;0!==o.cmpn(0);s++){var a=o.andln(255);o.iushrn(8),i[s]=a}else for(var s=0;0!==o.cmpn(0);s++){var a=o.andln(255);o.iushrn(8),i[i.length-s-1]=a}if(t)for(r(i.length<=t,"byte array longer than desired length");i.length<t;)n?i.push(0):i.unshift(0);return i},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=0,t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(0===this.cmpn(0))return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.neg=function(){if(0===this.cmpn(0))return this.clone();var e=this.clone();return e.sign=!this.sign,e},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return r(!this.sign&&!e.sign),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return r(!this.sign&&!e.sign),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return r(!this.sign&&!e.sign),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);for(var n=e/26|0,i=e%26;this.length<=n;)this.words[this.length++]=0;return t?this.words[n]=this.words[n]|1<<i:this.words[n]=this.words[n]&~(1<<i),this.strip()},i.prototype.iadd=function(e){if(this.sign&&!e.sign){this.sign=!1;var t=this.isub(e);return this.sign=!this.sign,this._normSign()}if(!this.sign&&e.sign){e.sign=!1;var t=this.isub(e);return e.sign=!0,t._normSign()}var r,n;this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++){var t=r.words[o]+n.words[o]+i;this.words[o]=67108863&t,i=t>>>26}for(;0!==i&&o<r.length;o++){var t=r.words[o]+i;this.words[o]=67108863&t,i=t>>>26}if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},i.prototype.add=function(e){if(e.sign&&!this.sign){e.sign=!1;var t=this.sub(e);return e.sign=!0,t}if(!e.sign&&this.sign){this.sign=!1;var t=e.sub(this);return this.sign=!0,t}return this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(e.sign){e.sign=!1;var t=this.iadd(e);return e.sign=!0,t._normSign()}if(this.sign)return this.sign=!1,this.iadd(e),this.sign=!0,this._normSign();var r=this.cmp(e);if(0===r)return this.sign=!1,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=e):(n=e,i=this);for(var o=0,s=0;s<i.length;s++){var t=n.words[s]-i.words[s]+o;o=t>>26,this.words[s]=67108863&t}for(;0!==o&&s<n.length;s++){var t=n.words[s]+o;o=t>>26,this.words[s]=67108863&t}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.sign=!0),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)},i.prototype._smallMulTo=function(e,t){t.sign=e.sign!==this.sign,t.length=this.length+e.length;for(var r=0,n=0;n<t.length-1;n++){for(var i=r>>>26,o=67108863&r,s=Math.min(n,e.length-1),a=Math.max(0,n-this.length+1);s>=a;a++){var c=n-a,u=0|this.words[c],f=0|e.words[a],h=u*f,d=67108863&h;i=i+(h/67108864|0)|0,d=d+o|0,o=67108863&d,i=i+(d>>>26)|0}t.words[n]=o,r=i}return 0!==r?t.words[n]=r:t.length--,t.strip()},i.prototype._bigMulTo=function(e,t){t.sign=e.sign!==this.sign,t.length=this.length+e.length;for(var r=0,n=0,i=0;i<t.length-1;i++){var o=n;n=0;for(var s=67108863&r,a=Math.min(i,e.length-1),c=Math.max(0,i-this.length+1);a>=c;c++){var u=i-c,f=0|this.words[u],h=0|e.words[c],d=f*h,l=67108863&d;o=o+(d/67108864|0)|0,l=l+s|0,s=67108863&l,o=o+(l>>>26)|0,n+=o>>>26,o&=67108863}t.words[i]=s,r=o,o=n}return 0!==r?t.words[i]=r:t.length--,t.strip()},i.prototype.mulTo=function(e,t){var r;return r=this.length+e.length<63?this._smallMulTo(e,t):this._bigMulTo(e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.imul=function(e){if(0===this.cmpn(0)||0===e.cmpn(0))return this.words[0]=0,this.length=1,this;var t=this.length,r=e.length;this.sign=e.sign!==this.sign,this.length=this.length+e.length,this.words[this.length-1]=0;for(var n=this.length-2;n>=0;n--){for(var i=0,o=0,s=Math.min(n,r-1),a=Math.max(0,n-t+1);s>=a;a++){var c=n-a,u=this.words[c],f=e.words[a],h=u*f,d=67108863&h;i+=h/67108864|0,d+=o,o=67108863&d,i+=d>>>26}this.words[n]=o,this.words[n+1]+=i,i=0}for(var i=0,c=1;c<this.length;c++){var l=this.words[c]+i;this.words[c]=67108863&l,i=l>>>26}return this.strip()},i.prototype.imuln=function(e){r("number"==typeof e);for(var t=0,n=0;n<this.length;n++){var i=this.words[n]*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.mul(this)},i.prototype.pow=function(e){var t=a(e);if(0===t.length)return new i(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var o=r.sqr();n<t.length;n++,o=o.sqr())0!==t[n]&&(r=r.mul(o));return r},i.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){for(var o=0,s=0;s<this.length;s++){var a=this.words[s]&i,c=this.words[s]-a<<t;this.words[s]=c|o,o=a>>>26-t}o&&(this.words[s]=o,this.length++)}if(0!==n){for(var s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(var s=0;n>s;s++)this.words[s]=0;this.length+=n}return this.strip()},i.prototype.ishln=function(e){return r(!this.sign),this.iushln(e)},i.prototype.iushrn=function(e,t,n){r("number"==typeof e&&e>=0);var i;i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,c=n;if(i-=s,i=Math.max(0,i),c){for(var u=0;s>u;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s){this.length-=s;for(var u=0;u<this.length;u++)this.words[u]=this.words[u+s]}else this.words[0]=0,this.length=1;for(var f=0,u=this.length-1;u>=0&&(0!==f||u>=i);u--){var h=this.words[u];this.words[u]=f<<26-o|h>>>o,f=h&a}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip(),this},i.prototype.ishrn=function(e,t,n){return r(!this.sign),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return!1;var o=this.words[n];return!!(o&i)},i.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(!this.sign,"imaskn works only with positive numbers"),0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return r("number"==typeof e),0>e?this.isubn(-e):this.sign?1===this.length&&this.words[0]<e?(this.words[0]=e-this.words[0],this.sign=!1,this):(this.sign=!1,this.isubn(e),this.sign=!0,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),0>e)return this.iaddn(-e);if(this.sign)return this.sign=!1,this.iaddn(e),this.sign=!0,this;this.words[0]-=e;for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.sign=!1,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,n){var i,o=e.length+n;if(this.words.length<o){for(var s=new Array(o),i=0;i<this.length;i++)s[i]=this.words[i];this.words=s}else i=this.length;for(this.length=Math.max(this.length,o);i<this.length;i++)this.words[i]=0;for(var a=0,i=0;i<e.length;i++){var c=this.words[i+n]+a,u=e.words[i]*t;c-=67108863&u,a=(c>>26)-(u/67108864|0),this.words[i+n]=67108863&c}for(;i<this.length-n;i++){var c=this.words[i+n]+a;a=c>>26,this.words[i+n]=67108863&c}if(0===a)return this.strip();r(-1===a),a=0;for(var i=0;i<this.length;i++){var c=-this.words[i]+a;a=c>>26,this.words[i]=67108863&c}return this.sign=!0,this.strip()},i.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),o=e,s=o.words[o.length-1],a=this._countBits(s);r=26-a,0!==r&&(o=o.ushln(r),n.iushln(r),s=o.words[o.length-1]);var c,u=n.length-o.length;if("mod"!==t){c=new i(null),c.length=u+1,c.words=new Array(c.length);for(var f=0;f<c.length;f++)c.words[f]=0}var h=n.clone()._ishlnsubmul(o,1,u);h.sign||(n=h,c&&(c.words[u]=1));for(var d=u-1;d>=0;d--){var l=67108864*n.words[o.length+d]+n.words[o.length+d-1];for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(o,l,d);n.sign;)l--,n.sign=!1,n._ishlnsubmul(o,1,d),0!==n.cmpn(0)&&(n.sign=!n.sign);c&&(c.words[d]=l)}return c&&c.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:c?c:null,mod:n}},i.prototype.divmod=function(e,t,n){if(r(0!==e.cmpn(0)),this.sign&&!e.sign){var o,s,a=this.neg().divmod(e,t);return"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&s.neg&&(s=s.add(e))),{div:o,mod:s}}if(!this.sign&&e.sign){var o,a=this.divmod(e.neg(),t);return"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}}if(this.sign&&e.sign){var s,a=this.neg().divmod(e.neg(),t);return"div"!==t&&(s=a.mod.neg(),n&&s.neg&&(s=s.isub(e))),{div:a.div,mod:s}}return e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t)},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(0===t.mod.cmpn(0))return t.div;var r=t.div.sign?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return 0>o||1===i&&0===o?t.div:t.div.sign?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){r(67108863>=e);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+this.words[i])%e;return n},i.prototype.idivn=function(e){r(67108863>=e);for(var t=0,n=this.length-1;n>=0;n--){var i=this.words[n]+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(!e.sign),r(0!==e.cmpn(0));var t=this,n=e.clone();t=t.sign?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=new i(0),c=new i(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var f=n.clone(),h=t.clone();0!==t.cmpn(0);){for(;t.isEven();)t.iushrn(1),o.isEven()&&s.isEven()?(o.iushrn(1),s.iushrn(1)):(o.iadd(f).iushrn(1),s.isub(h).iushrn(1));for(;n.isEven();)n.iushrn(1),a.isEven()&&c.isEven()?(a.iushrn(1),c.iushrn(1)):(a.iadd(f).iushrn(1),c.isub(h).iushrn(1));t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(c)):(n.isub(t),a.isub(o),c.isub(s))}return{a:a,b:c,gcd:n.iushln(u)}},i.prototype._invmp=function(e){r(!e.sign),r(0!==e.cmpn(0));var t=this,n=e.clone();t=t.sign?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(;t.isEven();)t.iushrn(1),o.isEven()?o.iushrn(1):o.iadd(a).iushrn(1);for(;n.isEven();)n.iushrn(1),s.isEven()?s.iushrn(1):s.iadd(a).iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s)):(n.isub(t),s.isub(o))}var c;return c=0===t.cmpn(1)?o:s,c.cmpn(0)<0&&c.iadd(e),c},i.prototype.gcd=function(e){if(0===this.cmpn(0))return e.clone();if(0===e.cmpn(0))return this.clone();var t=this.clone(),r=e.clone();t.sign=!1,r.sign=!1;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(0>i){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n){for(var o=this.length;n+1>o;o++)this.words[o]=0;return this.words[n]|=i,this.length=n+1,this}for(var s=i,o=n;0!==s&&o<this.length;o++){var a=this.words[o];a+=s,s=a>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},i.prototype.cmpn=function(e){var t=0>e;if(t&&(e=-e),this.sign&&!t)return-1;if(!this.sign&&t)return 1;e&=67108863,this.strip();var r;if(this.length>1)r=1;else{var n=this.words[0];r=n===e?0:e>n?-1:1}return this.sign&&(r=-r),r},i.prototype.cmp=function(e){if(this.sign&&!e.sign)return-1;if(!this.sign&&e.sign)return 1;var t=this.ucmp(e);return this.sign?-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=this.words[r],i=e.words[r];if(n!==i){i>n?t=-1:n>i&&(t=1);break}}return t},i.red=function(e){return new l(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(!this.sign,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.ushl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};c.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},c.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength();while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},c.prototype.split=function(e,t){e.iushrn(this.n,0,t)},c.prototype.imulK=function(e){return e.imul(this.k)},n(u,c),u.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;n>i;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];t.words[t.length++]=o&r;for(var i=10;i<e.length;i++){var s=e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}e.words[i-10]=o>>>22,e.length-=9},u.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t,r=0,n=0;n<e.length;n++){var i=e.words[n];t=64*i,r+=977*i,t+=r/67108864|0,r&=67108863,e.words[n]=r,r=t}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(f,c),n(h,c),n(d,c),d.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*e.words[r]+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function b(e){if(y[e])return y[e];var b;if("k256"===e)b=new u;else if("p224"===e)b=new f;else if("p192"===e)b=new h;else{if("p25519"!==e)throw new Error("Unknown prime "+e);b=new d}return y[e]=b,b},l.prototype._verify1=function(e){r(!e.sign,"red works only with positives"),r(e.red,"red works only with red numbers")},l.prototype._verify2=function(e,t){r(!e.sign&&!t.sign,"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},l.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},l.prototype.neg=function(e){var t=e.clone();return t.sign=!t.sign,t.iadd(this.m)._forceRed(this)},l.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},l.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},l.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},l.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},l.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},l.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},l.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},l.prototype.isqr=function(e){return this.imul(e,e)},l.prototype.sqr=function(e){return this.mul(e,e)},l.prototype.sqrt=function(e){if(0===e.cmpn(0))return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new i(1)).iushrn(2),o=this.pow(e,n);return o}for(var s=this.m.subn(1),a=0;0!==s.cmpn(0)&&0===s.andln(1);)a++,s.iushrn(1);r(0!==s.cmpn(0));var c=new i(1).toRed(this),u=c.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new i(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var d=this.pow(h,s),o=this.pow(e,s.addn(1).iushrn(1)),l=this.pow(e,s),p=a;0!==l.cmp(c);){for(var g=l,m=0;0!==g.cmp(c);m++)g=g.redSqr();r(p>m);var v=this.pow(d,new i(1).iushln(p-m-1));o=o.redMul(v),d=v.redSqr(),l=l.redMul(d),p=m}return o},l.prototype.invm=function(e){var t=e._invmp(this.m);return t.sign?(t.sign=!1,this.imod(t).redNeg()):this.imod(t)},l.prototype.pow=function(e,t){var r=a(t);if(0===r.length)return new i(1);for(var n=e,o=0;o<r.length&&0===r[o];o++,n=this.sqr(n));if(++o<r.length)for(var s=this.sqr(n);o<r.length;o++,s=this.sqr(s))0!==r[o]&&(n=this.mul(n,s));return n},l.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},l.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new p(e)},n(p,l),p.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},p.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},p.prototype.imul=function(e,t){if(0===e.cmpn(0)||0===t.cmpn(0))return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},p.prototype.mul=function(e,t){if(0===e.cmpn(0)||0===t.cmpn(0))return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},p.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}("undefined"==typeof e||e,this)}).call(t,r(233)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this.reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=s.toArray(e.entropy,e.entropyEnc),r=s.toArray(e.nonce,e.nonceEnc),i=s.toArray(e.pers,e.persEnc);a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,i)}var i=r(222),o=r(229),s=o.utils,a=s.assert;e.exports=n,n.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);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(n),this.reseed=1,this.reseedInterval=281474976710656},n.prototype._hmac=function(){return new i.hmac(this.hash,this.K)},n.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},n.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=s.toBuffer(e,t),r=s.toBuffer(r,n),a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this.reseed=1},n.prototype.generate=function(e,t,r,n){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=s.toArray(r,n),this._update(r));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,e);return this._update(r),this.reseed++,s.encode(o,t)}},function(e,t,r){"use strict";var n=t;n.base=r(236),n["short"]=r(237),n.mont=r(239),n.edwards=r(240)},function(e,t,r){"use strict";function n(e,t){this.type=e,this.p=new o(t.p,16),this.red=t.prime?o.red(t.prime):o.mont(this.p),this.zero=new o(0).toRed(this.red),this.one=new o(1).toRed(this.red),this.two=new o(2).toRed(this.red),this.n=t.n&&new o(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4)}function i(e,t){this.curve=e,this.type=t,this.precomputed=null}var o=r(232),s=r(229),a=s.utils,c=a.getNAF,u=a.getJSF,f=a.assert;e.exports=n,n.prototype.point=function(){throw new Error("Not implemented")},n.prototype.validate=function(){throw new Error("Not implemented")},n.prototype._fixedNafMul=function(e,t){f(e.precomputed);var r=e._getDoubles(),n=c(t,1),i=(1<<r.step+1)-(r.step%2===0?2:1);i/=3;for(var o=[],s=0;s<n.length;s+=r.step){for(var a=0,t=s+r.step-1;t>=s;t--)a=(a<<1)+n[t];o.push(a)}for(var u=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=i;d>0;d--){for(var s=0;s<o.length;s++){var a=o[s];a===d?h=h.mixedAdd(r.points[s]):a===-d&&(h=h.mixedAdd(r.points[s].neg()))}u=u.add(h)}return u.toP()},n.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,o=c(t,r),s=this.jpoint(null,null,null),a=o.length-1;a>=0;a--){for(var t=0;a>=0&&0===o[a];a--)t++;if(a>=0&&t++,s=s.dblp(t),0>a)break;var u=o[a];f(0!==u),s="affine"===e.type?u>0?s.mixedAdd(i[u-1>>1]):s.mixedAdd(i[-u-1>>1].neg()):u>0?s.add(i[u-1>>1]):s.add(i[-u-1>>1].neg())}return"affine"===e.type?s.toP():s},n.prototype._wnafMulAdd=function(e,t,r,n){for(var i=this._wnafT1,o=this._wnafT2,s=this._wnafT3,a=0,f=0;n>f;f++){var h=t[f],d=h._getNAFPoints(e);i[f]=d.wnd,o[f]=d.points}for(var f=n-1;f>=1;f-=2){var l=f-1,p=f;if(1===i[l]&&1===i[p]){var g=[t[l],null,null,t[p]];0===t[l].y.cmp(t[p].y)?(g[1]=t[l].add(t[p]),g[2]=t[l].toJ().mixedAdd(t[p].neg())):0===t[l].y.cmp(t[p].y.redNeg())?(g[1]=t[l].toJ().mixedAdd(t[p]),g[2]=t[l].add(t[p].neg())):(g[1]=t[l].toJ().mixedAdd(t[p]),g[2]=t[l].toJ().mixedAdd(t[p].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],v=u(r[l],r[p]);a=Math.max(v[0].length,a),s[l]=new Array(a),s[p]=new Array(a);for(var y=0;a>y;y++){var b=0|v[0][y],w=0|v[1][y];s[l][y]=m[3*(b+1)+(w+1)],s[p][y]=0,o[l]=g}}else s[l]=c(r[l],i[l]),s[p]=c(r[p],i[p]),a=Math.max(s[l].length,a),a=Math.max(s[p].length,a)}for(var S=this.jpoint(null,null,null),x=this._wnafT4,f=a;f>=0;f--){for(var E=0;f>=0;){for(var A=!0,y=0;n>y;y++)x[y]=0|s[y][f],0!==x[y]&&(A=!1);if(!A)break;E++,f--}if(f>=0&&E++,S=S.dblp(E),0>f)break;for(var y=0;n>y;y++){var h,P=x[y];0!==P&&(P>0?h=o[y][P-1>>1]:0>P&&(h=o[y][-P-1>>1].neg()),S="affine"===h.type?S.mixedAdd(h):S.add(h))}}for(var f=0;n>f;f++)o[f]=null;return S.toP()},n.BasePoint=i,i.prototype.eq=function(){throw new Error("Not implemented")},i.prototype.validate=function(){return this.curve.validate(this)},n.prototype.decodePoint=function(e,t){e=a.toArray(e,t);var r=this.p.byteLength();if(4===e[0]&&e.length-1===2*r)return this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},i.prototype.encodeCompressed=function(e){return this.encode(e,!0)},i.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},i.prototype.encode=function(e,t){return a.encode(this._encode(t),e)},i.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},i.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return t?t.points.length>=Math.ceil((e.bitLength()+1)/t.step):!1},i.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;t>i;i+=e){for(var o=0;e>o;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},i.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;r>i;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},i.prototype._getBeta=function(){return null},i.prototype.dblp=function(e){for(var t=this,r=0;e>r;r++)t=t.dbl();return t}},function(e,t,r){"use strict";function n(e){f.call(this,"short",e),this.a=new c(e.a,16).toRed(this.red),this.b=new c(e.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(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function i(e,t,r,n){f.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new c(t,16),this.y=new c(r,16),n&&(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 o(e,t,r,n){f.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new c(0)):(this.x=new c(t,16),this.y=new c(r,16),this.z=new c(n,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}var s=r(235),a=r(229),c=r(232),u=r(238),f=s.base,h=a.utils.assert;u(n,f),e.exports=n,n.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new c(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=n[0].cmp(n[1])<0?n[0]:n[1],t=t.toRed(this.red)}if(e.lambda)r=new c(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],h(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}var o;return o=e.basis?e.basis.map(function(e){return{a:new c(e.a,16),b:new c(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:o}}},n.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:c.mont(e),r=new c(2).toRed(t).redInvm(),n=r.redNeg(),i=new c(3).toRed(t).redNeg().redSqrt().redMul(r),o=n.redAdd(i).fromRed(),s=n.redSub(i).fromRed();return[o,s]},n.prototype._getEndoBasis=function(e){for(var t,r,n,i,o,s,a,u,f,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,l=this.n.clone(),p=new c(1),g=new c(0),m=new c(0),v=new c(1),y=0;0!==d.cmpn(0);){
  var b=l.div(d);u=l.sub(b.mul(d)),f=m.sub(b.mul(p));var w=v.sub(b.mul(g));if(!n&&u.cmp(h)<0)t=a.neg(),r=p,n=u.neg(),i=f;else if(n&&2===++y)break;a=u,l=d,d=u,m=p,p=f,v=g,g=w}o=u.neg(),s=f;var S=n.sqr().add(i.sqr()),x=o.sqr().add(s.sqr());return x.cmp(S)>=0&&(o=t,s=r),n.sign&&(n=n.neg(),i=i.neg()),o.sign&&(o=o.neg(),s=s.neg()),[{a:n,b:i},{a:o,b:s}]},n.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),c=i.mul(r.b),u=o.mul(n.b),f=e.sub(s).sub(a),h=c.add(u).neg();return{k1:f,k2:h}},n.prototype.pointFromX=function(e,t){e=new c(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt(),i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},n.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},n.prototype._endoWnafMulAdd=function(e,t){for(var r=this._endoWnafT1,n=this._endoWnafT2,i=0;i<e.length;i++){var o=this._endoSplit(t[i]),s=e[i],a=s._getBeta();o.k1.sign&&(o.k1.sign=!o.k1.sign,s=s.neg(!0)),o.k2.sign&&(o.k2.sign=!o.k2.sign,a=a.neg(!0)),r[2*i]=s,r[2*i+1]=a,n[2*i]=o.k1,n[2*i+1]=o.k2}for(var c=this._wnafMulAdd(1,r,n,2*i),u=0;2*i>u;u++)r[u]=null,n[u]=null;return c},u(i,f.BasePoint),n.prototype.point=function(e,t,r){return new i(this,e,t,r)},n.prototype.pointFromJSON=function(e,t){return i.fromJSON(this,e,t)},i.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},i.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]},i.fromJSON=function(e,t,r){function n(t){return e.point(t[0],t[1],r)}"string"==typeof t&&(t=JSON.parse(t));var i=e.point(t[0],t[1],r);if(!t[2])return i;var o=t[2];return i.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[i].concat(o.doubles.points.map(n))},naf:o.naf&&{wnd:o.naf.wnd,points:[i].concat(o.naf.points.map(n))}},i},i.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)+">"},i.prototype.isInfinity=function(){return this.inf},i.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},i.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),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)},i.prototype.getX=function(){return this.x.fromRed()},i.prototype.getY=function(){return this.y.fromRed()},i.prototype.mul=function(e){return e=new c(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},i.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},i.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},i.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},i.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e},u(o,f.BasePoint),n.prototype.jpoint=function(e,t,r){return new o(this,e,t,r)},o.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},o.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},o.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=n.redSub(i),c=o.redSub(s);if(0===a.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),f=u.redMul(a),h=n.redMul(u),d=c.redSqr().redIAdd(f).redISub(h).redISub(h),l=c.redMul(h.redISub(d)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,l,p)},o.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),f=r.redMul(c),h=a.redSqr().redIAdd(u).redISub(f).redISub(f),d=a.redMul(f.redISub(h)).redISub(i.redMul(u)),l=this.z.redMul(s);return this.curve.jpoint(h,d,l)},o.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;e>r;r++)t=t.dbl();return t}for(var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,c=a.redSqr().redSqr(),u=s.redAdd(s),r=0;e>r;r++){var f=o.redSqr(),h=u.redSqr(),d=h.redSqr(),l=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(c)),p=o.redMul(h),g=l.redSqr().redISub(p.redAdd(p)),m=p.redISub(g),v=l.redMul(m);v=v.redIAdd(v).redISub(d);var y=u.redMul(a);e>r+1&&(c=c.redMul(d)),o=g,a=y,u=v}return this.curve.jpoint(o,u.redMul(i),a)},o.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},o.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),c=a.redSqr().redISub(s).redISub(s),u=o.redIAdd(o);u=u.redIAdd(u),u=u.redIAdd(u),e=c,t=a.redMul(s.redISub(c)).redISub(u),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),h=this.y.redSqr(),d=h.redSqr(),l=this.x.redAdd(h).redSqr().redISub(f).redISub(d);l=l.redIAdd(l);var p=f.redAdd(f).redIAdd(f),g=p.redSqr(),m=d.redIAdd(d);m=m.redIAdd(m),m=m.redIAdd(m),e=g.redISub(l).redISub(l),t=p.redMul(l.redISub(e)).redISub(m),r=this.y.redMul(this.z),r=r.redIAdd(r)}return this.curve.jpoint(e,t,r)},o.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),c=a.redSqr().redISub(s).redISub(s);e=c;var u=o.redIAdd(o);u=u.redIAdd(u),u=u.redIAdd(u),t=a.redMul(s.redISub(c)).redISub(u),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),h=this.y.redSqr(),d=this.x.redMul(h),l=this.x.redSub(f).redMul(this.x.redAdd(f));l=l.redAdd(l).redIAdd(l);var p=d.redIAdd(d);p=p.redIAdd(p);var g=p.redAdd(p);e=l.redSqr().redISub(g),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(f);var m=h.redSqr();m=m.redIAdd(m),m=m.redIAdd(m),m=m.redIAdd(m),t=l.redMul(p.redISub(e)).redISub(m)}return this.curve.jpoint(e,t,r)},o.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),c=t.redAdd(t);c=c.redIAdd(c);var u=c.redMul(s),f=a.redSqr().redISub(u.redAdd(u)),h=u.redISub(f),d=s.redSqr();d=d.redIAdd(d),d=d.redIAdd(d),d=d.redIAdd(d);var l=a.redMul(h).redISub(d),p=r.redAdd(r).redMul(n);return this.curve.jpoint(f,l,p)},o.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(n);s=s.redIAdd(s),s=s.redAdd(s).redIAdd(s),s=s.redISub(o);var a=s.redSqr(),c=n.redIAdd(n);c=c.redIAdd(c),c=c.redIAdd(c),c=c.redIAdd(c);var u=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(c),f=t.redMul(u);f=f.redIAdd(f),f=f.redIAdd(f);var h=this.x.redMul(a).redISub(f);h=h.redIAdd(h),h=h.redIAdd(h);var d=this.y.redMul(u.redMul(c.redISub(u)).redISub(s.redMul(a)));d=d.redIAdd(d),d=d.redIAdd(d),d=d.redIAdd(d);var l=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(h,d,l)},o.prototype.mul=function(e,t){return e=new c(e,t),this.curve._wnafMul(this,e)},o.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},o.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)+">"},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){"use strict";function n(e){c.call(this,"mont",e),this.a=new s(e.a,16).toRed(this.red),this.b=new s(e.b,16).toRed(this.red),this.i4=new s(4).toRed(this.red).redInvm(),this.two=new s(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function i(e,t,r){c.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new s(t,16),this.z=new s(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var o=r(235),s=r(232),a=r(238),c=o.base,u=r(229),f=u.utils;a(n,c),e.exports=n,n.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t),i=n.redSqrt();return 0===i.redSqr().cmp(n)},a(i,c.BasePoint),n.prototype.decodePoint=function(e,t){return this.point(f.toArray(e,t),1)},n.prototype.point=function(e,t){return new i(this,e,t)},n.prototype.pointFromJSON=function(e){return i.fromJSON(this,e)},i.prototype.precompute=function(){},i.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},i.fromJSON=function(e,t){return new i(e,t[0],t[1]||e.one)},i.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)+">"},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},i.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),n=r.redSqr(),i=t.redSub(n),o=t.redMul(n),s=i.redMul(n.redAdd(this.curve.a24.redMul(i)));return this.curve.point(o,s)},i.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z),s=o.redMul(r),a=i.redMul(n),c=t.z.redMul(s.redAdd(a).redSqr()),u=t.x.redMul(s.redISub(a).redSqr());return this.curve.point(c,u)},i.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=this,o=[];0!==t.cmpn(0);t.iushrn(1))o.push(t.andln(1));for(var s=o.length-1;s>=0;s--)0===o[s]?(r=r.diffAdd(n,i),n=n.dbl()):(n=r.diffAdd(n,i),r=r.dbl());return n},i.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},i.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,r){"use strict";function n(e){this.twisted=1!==(0|e.a),this.mOneA=this.twisted&&-1===(0|e.a),this.extended=this.mOneA,u.call(this,"edwards",e),this.a=new a(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new a(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new a(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),f(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1===(0|e.c)}function i(e,t,r,n,i){u.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(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 a(t,16),this.y=new a(r,16),this.z=n?new a(n,16):this.curve.one,this.t=i&&new a(i,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()))))}var o=r(235),s=r(229),a=r(232),c=r(238),u=o.base,f=s.utils.assert;c(n,u),e.exports=n,n.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},n.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},n.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},n.prototype.pointFromX=function(e,t){e=new a(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=n.redMul(i.redInvm()).redSqrt(),s=o.fromRed().isOdd();return(t&&!s||!t&&s)&&(o=o.redNeg()),this.point(e,o)},n.prototype.pointFromY=function(e,t){e=new a(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.one),i=r.redMul(this.d).redAdd(this.one),o=n.redMul(i.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return s.isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},n.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},c(i,u.BasePoint),n.prototype.pointFromJSON=function(e){return i.fromJSON(this,e)},n.prototype.point=function(e,t,r,n){return new i(this,e,t,r,n)},i.fromJSON=function(e,t){return new i(e,t[0],t[1],t[2])},i.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)+">"},i.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},i.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),s=o.redSub(r),a=n.redSub(t),c=i.redMul(s),u=o.redMul(a),f=i.redMul(a),h=s.redMul(o);return this.curve.point(c,u,h,f)},i.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var s=this.curve._mulA(i),a=s.redAdd(o);if(this.zOne)e=n.redSub(i).redSub(o).redMul(a.redSub(this.curve.two)),t=a.redMul(s.redSub(o)),r=a.redSqr().redSub(a).redSub(a);else{var c=this.z.redSqr(),u=a.redSub(c).redISub(c);e=n.redSub(i).redISub(o).redMul(u),t=a.redMul(s.redSub(o)),r=a.redMul(u)}}else{var s=i.redAdd(o),c=this.curve._mulC(this.c.redMul(this.z)).redSqr(),u=s.redSub(c).redSub(c);e=this.curve._mulC(n.redISub(s)).redMul(u),t=this.curve._mulC(s).redMul(i.redISub(o)),r=s.redMul(u)}return this.curve.point(e,t,r)},i.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},i.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),s=i.redSub(n),a=i.redAdd(n),c=r.redAdd(t),u=o.redMul(s),f=a.redMul(c),h=o.redMul(c),d=s.redMul(a);return this.curve.point(u,f,d,h)},i.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(s),c=i.redSub(a),u=i.redAdd(a),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(s),h=n.redMul(c).redMul(f);return this.curve.twisted?(t=n.redMul(u).redMul(s.redSub(this.curve._mulA(o))),r=c.redMul(u)):(t=n.redMul(u).redMul(s.redSub(o)),r=this.curve._mulC(c).redMul(u)),this.curve.point(h,t,r)},i.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},i.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},i.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2)},i.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},i.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()},i.prototype.getY=function(){return this.normalize(),this.y.fromRed()},i.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},i.prototype.toP=i.prototype.normalize,i.prototype.mixedAdd=i.prototype.add},function(e,t,r){"use strict";function n(e){"short"===e.type?this.curve=new a.curve["short"](e):"edwards"===e.type?this.curve=new a.curve.edwards(e):this.curve=new a.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,c(this.g.validate(),"Invalid curve"),c(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function i(e,t){Object.defineProperty(o,e,{configurable:!0,enumerable:!0,get:function(){var r=new n(t);return Object.defineProperty(o,e,{configurable:!0,enumerable:!0,value:r}),r}})}var o=t,s=r(222),a=r(229),c=a.utils.assert;o.PresetCurve=n,i("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:s.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("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:s.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("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:s.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("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:s.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"]}),i("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:s.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"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"0",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s.sha256,gRed:!1,g:["9"]}),i("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:s.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var u;try{u=r(242)}catch(f){u=void 0}i("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:s.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",u]})},function(e,t){e.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(e,t,r){"use strict";function n(e){return this instanceof n?("string"==typeof e&&(a(o.curves.hasOwnProperty(e),"Unknown curve "+e),e=o.curves[e]),e instanceof o.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),void(this.hash=e.hash||e.curve.hash)):new n(e)}var i=r(232),o=r(229),s=o.utils,a=s.assert,c=r(244),u=r(245);e.exports=n,n.prototype.keyPair=function(e){return new c(this,e)},n.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},n.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},n.prototype.genKeyPair=function(e){e||(e={});for(var t=new o.hmacDRBG({hash:this.hash,pers:e.pers,entropy:e.entropy||o.rand(this.hash.hmacStrength),nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i(2));;){var s=new i(t.generate(r));if(!(s.cmp(n)>0))return s.iaddn(1),this.keyFromPrivate(s)}},n.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},n.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i(e,16));for(var s=this.n.byteLength(),a=t.getPrivate().toArray(),c=a.length;s>c;c++)a.unshift(0);for(var f=e.toArray(),c=f.length;s>c;c++)f.unshift(0);for(var h=new o.hmacDRBG({hash:this.hash,entropy:a,nonce:f}),d=this.n.sub(new i(1));;){var l=new i(h.generate(this.n.byteLength()));if(l=this._truncateToN(l,!0),!(l.cmpn(1)<=0||l.cmp(d)>=0)){var p=this.g.mul(l);if(!p.isInfinity()){var g=p.getX(),m=g.umod(this.n);if(0!==m.cmpn(0)){var v=l.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(v=v.umod(this.n),0!==v.cmpn(0)){n.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v));var y=(p.getY().isOdd()?1:0)|(0!==g.cmp(m)?2:0);return new u({r:m,s:v,recoveryParam:y})}}}}}},n.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n),t=new u(t,"hex");var o=t.r,s=t.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=s.invm(this.n),c=a.mul(e).umod(this.n),f=a.mul(o).umod(this.n),h=this.g.mulAdd(c,r.getPublic(),f);return h.isInfinity()?!1:0===h.getX().umod(this.n).cmp(o)},n.prototype.recoverPubKey=function(e,t,r,n){a((3&r)===r,"The recovery param is more than two bits"),t=new u(t,n);var o=this.n,s=new i(e),c=t.r,f=t.s,h=1&r,d=r>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");c=this.curve.pointFromX(c,h);var l=s.neg().umod(o),p=t.r.invm(o);return c.mul(f).add(this.g.mul(l)).mul(p)},n.prototype.getKeyRecoveryParam=function(e,t,r,n){if(t=new u(t,n),null!==t.recoveryParam)return t.recoveryParam;for(var i=0;4>i;i++){var o=this.recoverPubKey(e,t,i);if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,r){"use strict";function n(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var i=r(232);e.exports=n,n.fromPublic=function(e,t,r){return t instanceof n?t:new n(e,{pub:t,pubEnc:r})},n.fromPrivate=function(e,t,r){return t instanceof n?t:new n(e,{priv:t,privEnc:r})},n.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.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"}},n.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},n.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},n.prototype._importPrivate=function(e,t){this.priv=new i(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},n.prototype._importPublic=function(e,t){return e.x||e.y?void(this.pub=this.ec.curve.point(e.x,e.y)):void(this.pub=this.ec.curve.decodePoint(e,t))},n.prototype.derive=function(e){return e.mul(this.priv).getX()},n.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},n.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},n.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,r){"use strict";function n(e,t){return e instanceof n?e:void(this._importDER(e,t)||(h(e.r&&e.s,"Signature without r or s"),this.r=new c(e.r,16),this.s=new c(e.s,16),null!==e.recoveryParam?this.recoveryParam=e.recoveryParam:this.recoveryParam=null))}function i(){this.place=0}function o(e,t){var r=e[t.place++];if(!(128&r))return r;for(var n=15&r,i=0,o=0,s=t.place;n>o;o++,s++)i<<=8,i|=e[s];return t.place=s,i}function s(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&r>t;)t++;return 0===t?e:e.slice(t)}function a(e,t){if(128>t)return void e.push(t);var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}var c=r(232),u=r(229),f=u.utils,h=f.assert;e.exports=n,n.prototype._importDER=function(e,t){e=f.toArray(e,t);var r=new i;if(48!==e[r.place++])return!1;var n=o(e,r);if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var s=o(e,r),a=e.slice(r.place,s+r.place);if(r.place+=s,2!==e[r.place++])return!1;var u=o(e,r);if(e.length!==u+r.place)return!1;var h=e.slice(r.place,u+r.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===h[0]&&128&h[1]&&(h=h.slice(1)),this.r=new c(a),this.s=new c(h),this.recoveryParam=null,!0},n.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=s(t),r=s(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];a(n,t.length),n=n.concat(t),n.push(2),a(n,r.length);var i=n.concat(r),o=[48];return a(o,i.length),o=o.concat(i),f.encode(o,e)}},function(e,t,r){"use strict";function n(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof n))return new n(e);var e=o.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=i.sha512}var i=r(222),o=r(229),s=o.utils,a=s.assert,c=s.parseBytes,u=r(247),f=r(248);e.exports=n,n.prototype.sign=function(e,t){e=c(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),a=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:a,Rencoded:o})},n.prototype.verify=function(e,t,r){e=c(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S()),s=t.R().add(n.pub().mul(i));return s.eq(o)},n.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return s.intFromLE(e.digest()).umod(this.curve.n)},n.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},n.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},n.prototype.makeSignature=function(e){return e instanceof f?e:new f(this,e)},n.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},n.prototype.decodePoint=function(e){e=s.parseBytes(e);var t=e.length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!==(128&e[t]),i=s.intFromLE(r);return this.curve.pointFromY(i,n)},n.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},n.prototype.decodeInt=function(e){return s.intFromLE(e)},n.prototype.isPoint=function(e){return e instanceof this.pointClass}},function(e,t,r){"use strict";function n(e,t){this.eddsa=e,this._secret=a(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=a(t.pub)}var i=r(229),o=i.utils,s=o.assert,a=o.parseBytes,c=o.cachedProperty;n.fromPublic=function(e,t){return t instanceof n?t:new n(e,{pub:t})},n.fromSecret=function(e,t){return t instanceof n?t:new n(e,{secret:t})},n.prototype.secret=function(){return this._secret},c(n,function(){return this.eddsa.encodePoint(this.pub())}),c(n,function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),c(n,function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n}),c(n,function(){return this.eddsa.decodeInt(this.privBytes())}),c(n,function(){return this.eddsa.hash().update(this.secret()).digest()}),c(n,function(){return this.hash().slice(this.eddsa.encodingLength)}),n.prototype.sign=function(e){return s(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},n.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},n.prototype.getSecret=function(e){return s(this._secret,"KeyPair is public only"),o.encode(this.secret(),e)},n.prototype.getPublic=function(e){return o.encode(this.pubBytes(),e)},e.exports=n},function(e,t,r){"use strict";function n(e,t){this.eddsa=e,"object"!=typeof t&&(t=u(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof i&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}var i=r(232),o=r(229),s=o.utils,a=s.assert,c=s.cachedProperty,u=s.parseBytes;c(n,function(){return this.eddsa.decodeInt(this.Sencoded())}),c(n,function(){return this.eddsa.decodePoint(this.Rencoded())}),c(n,function(){return this.eddsa.encodePoint(this.R())}),c(n,function(){return this.eddsa.encodeInt(this.S())}),n.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},n.prototype.toHex=function(){return s.encode(this.toBytes(),"hex").toUpperCase()},e.exports=n},function(e,t,r){"use strict";var n=r(250),i=r(257),o=28,s=32,a=0,c=33,u=[1,225,75];e.exports=i({sha256:function(e){return n.sha256().update(e).digest()},defaultAlphabet:"ripple",codecMethods:{EdSeed:{expectedLength:16,version:u},Seed:{versionTypes:["ed25519","secp256k1"],versions:[u,c],expectedLength:16},AccountID:{version:a,expectedLength:20},Address:{version:a,expectedLength:20},NodePublic:{version:o,expectedLength:33},NodePrivate:{version:s,expectedLength:32},K256Seed:{version:c,expectedLength:16}}})},function(e,t,r){var n=t;n.utils=r(251),n.common=r(253),n.sha=r(254),n.ripemd=r(255),n.hmac=r(256),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(e,t,r){function n(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t){e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!==0&&(e="0"+e);for(var n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}}else for(var n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}else for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}function i(e){for(var t="",r=0;r<e.length;r++)t+=a(e[r].toString(16));return t}function o(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24;return t>>>0}function s(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=o(i)),r+=c(i.toString(16))}return r}function a(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}function u(e,t,r,n){var i=r-t;v(i%4===0);for(var o=new Array(i/4),s=0,a=t;s<o.length;s++,a+=4){var c;c="big"===n?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],o[s]=c>>>0}return o}function f(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r}function h(e,t){return e>>>t|e<<32-t}function d(e,t){return e<<t|e>>>32-t}function l(e,t){return e+t>>>0}function p(e,t,r){return e+t+r>>>0}function g(e,t,r,n){return e+t+r+n>>>0}function m(e,t,r,n,i){return e+t+r+n+i>>>0}function v(e,t){if(!e)throw new Error(t||"Assertion failed")}function y(e,t,r,n){var i=e[t],o=e[t+1],s=n+o>>>0,a=(n>s?1:0)+r+i;e[t]=a>>>0,e[t+1]=s}function b(e,t,r,n){var i=t+n>>>0,o=(t>i?1:0)+e+r;return o>>>0}function w(e,t,r,n){var i=t+n;return i>>>0}function S(e,t,r,n,i,o,s,a){var c=0,u=t;u=u+n>>>0,c+=t>u?1:0,u=u+o>>>0,c+=o>u?1:0,u=u+a>>>0,c+=a>u?1:0;var f=e+r+i+s+c;return f>>>0}function x(e,t,r,n,i,o,s,a){var c=t+n+o+a;return c>>>0}function E(e,t,r,n,i,o,s,a,c,u){var f=0,h=t;h=h+n>>>0,f+=t>h?1:0,h=h+o>>>0,f+=o>h?1:0,h=h+a>>>0,f+=a>h?1:0,h=h+u>>>0,f+=u>h?1:0;var d=e+r+i+s+c+f;return d>>>0}function A(e,t,r,n,i,o,s,a,c,u){var f=t+n+o+a+u;return f>>>0}function P(e,t,r){var n=t<<32-r|e>>>r;return n>>>0}function T(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}function I(e,t,r){return e>>>r}function O(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}var R=t,k=r(252);R.toArray=n,R.toHex=i,R.htonl=o,R.toHex32=s,R.zero2=a,R.zero8=c,R.join32=u,R.split32=f,R.rotr32=h,R.rotl32=d,R.sum32=l,R.sum32_3=p,R.sum32_4=g,R.sum32_5=m,R.assert=v,R.inherits=k,t.sum64=y,t.sum64_hi=b,t.sum64_lo=w,t.sum64_4_hi=S,t.sum64_4_lo=x,t.sum64_5_hi=E,t.sum64_5_lo=A,t.rotr64_hi=P,t.rotr64_lo=T,t.shr64_hi=I,t.shr64_lo=O},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){function n(){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}var i=r(250),o=i.utils,s=o.assert;t.BlockHash=n,n.prototype.update=function(e,t){if(e=o.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=o.join32(e,0,e.length-r,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this},n.prototype.digest=function(e){return this.update(this._pad()),s(null===this.pending),this._digest(e)},n.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;r>i;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,
  n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else{n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0;for(var o=8;o<this.padLength;o++)n[i++]=0}return n}},function(e,t,r){function n(){return this instanceof n?(J.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=G,void(this.W=new Array(64))):new n}function i(){return this instanceof i?(n.call(this),void(this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])):new i}function o(){return this instanceof o?(J.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=W,void(this.W=new Array(160))):new o}function s(){return this instanceof s?(o.call(this),void(this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428])):new s}function a(){return this instanceof a?(J.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],void(this.W=new Array(80))):new a}function c(e,t,r){return e&t^~e&r}function u(e,t,r){return e&t^e&r^t&r}function f(e,t,r){return e^t^r}function h(e){return L(e,2)^L(e,13)^L(e,22)}function d(e){return L(e,6)^L(e,11)^L(e,25)}function l(e){return L(e,7)^L(e,18)^e>>>3}function p(e){return L(e,17)^L(e,19)^e>>>10}function g(e,t,r,n){return 0===e?c(t,r,n):1===e||3===e?f(t,r,n):2===e?u(t,r,n):void 0}function m(e,t,r,n,i,o){var s=e&r^~e&i;return 0>s&&(s+=4294967296),s}function v(e,t,r,n,i,o){var s=t&n^~t&o;return 0>s&&(s+=4294967296),s}function y(e,t,r,n,i,o){var s=e&r^e&i^r&i;return 0>s&&(s+=4294967296),s}function b(e,t,r,n,i,o){var s=t&n^t&o^n&o;return 0>s&&(s+=4294967296),s}function w(e,t){var r=B(e,t,28),n=B(t,e,2),i=B(t,e,7),o=r^n^i;return 0>o&&(o+=4294967296),o}function S(e,t){var r=C(e,t,28),n=C(t,e,2),i=C(t,e,7),o=r^n^i;return 0>o&&(o+=4294967296),o}function x(e,t){var r=B(e,t,14),n=B(e,t,18),i=B(t,e,9),o=r^n^i;return 0>o&&(o+=4294967296),o}function E(e,t){var r=C(e,t,14),n=C(e,t,18),i=C(t,e,9),o=r^n^i;return 0>o&&(o+=4294967296),o}function A(e,t){var r=B(e,t,1),n=B(e,t,8),i=q(e,t,7),o=r^n^i;return 0>o&&(o+=4294967296),o}function P(e,t){var r=C(e,t,1),n=C(e,t,8),i=z(e,t,7),o=r^n^i;return 0>o&&(o+=4294967296),o}function T(e,t){var r=B(e,t,19),n=B(t,e,29),i=q(e,t,6),o=r^n^i;return 0>o&&(o+=4294967296),o}function I(e,t){var r=C(e,t,19),n=C(t,e,29),i=z(e,t,6),o=r^n^i;return 0>o&&(o+=4294967296),o}var O=r(250),R=O.utils,k=R.assert,L=R.rotr32,N=R.rotl32,j=R.sum32,F=R.sum32_4,M=R.sum32_5,B=R.rotr64_hi,C=R.rotr64_lo,q=R.shr64_hi,z=R.shr64_lo,D=R.sum64,U=R.sum64_hi,V=R.sum64_lo,$=R.sum64_4_hi,H=R.sum64_4_lo,X=R.sum64_5_hi,K=R.sum64_5_lo,J=O.common.BlockHash,G=[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],W=[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],Y=[1518500249,1859775393,2400959708,3395469782];R.inherits(n,J),t.sha256=n,n.blockSize=512,n.outSize=256,n.hmacStrength=192,n.padLength=64,n.prototype._update=function(e,t){for(var r=this.W,n=0;16>n;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=F(p(r[n-2]),r[n-7],l(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],s=this.h[2],a=this.h[3],f=this.h[4],g=this.h[5],m=this.h[6],v=this.h[7];k(this.k.length===r.length);for(var n=0;n<r.length;n++){var y=M(v,d(f),c(f,g,m),this.k[n],r[n]),b=j(h(i),u(i,o,s));v=m,m=g,g=f,f=j(a,y),a=s,s=o,o=i,i=j(y,b)}this.h[0]=j(this.h[0],i),this.h[1]=j(this.h[1],o),this.h[2]=j(this.h[2],s),this.h[3]=j(this.h[3],a),this.h[4]=j(this.h[4],f),this.h[5]=j(this.h[5],g),this.h[6]=j(this.h[6],m),this.h[7]=j(this.h[7],v)},n.prototype._digest=function(e){return"hex"===e?R.toHex32(this.h,"big"):R.split32(this.h,"big")},R.inherits(i,n),t.sha224=i,i.blockSize=512,i.outSize=224,i.hmacStrength=192,i.padLength=64,i.prototype._digest=function(e){return"hex"===e?R.toHex32(this.h.slice(0,7),"big"):R.split32(this.h.slice(0,7),"big")},R.inherits(o,J),t.sha512=o,o.blockSize=1024,o.outSize=512,o.hmacStrength=192,o.padLength=128,o.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;32>n;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=T(r[n-4],r[n-3]),o=I(r[n-4],r[n-3]),s=r[n-14],a=r[n-13],c=A(r[n-30],r[n-29]),u=P(r[n-30],r[n-29]),f=r[n-32],h=r[n-31];r[n]=$(i,o,s,a,c,u,f,h),r[n+1]=H(i,o,s,a,c,u,f,h)}},o.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],o=this.h[2],s=this.h[3],a=this.h[4],c=this.h[5],u=this.h[6],f=this.h[7],h=this.h[8],d=this.h[9],l=this.h[10],p=this.h[11],g=this.h[12],A=this.h[13],P=this.h[14],T=this.h[15];k(this.k.length===r.length);for(var I=0;I<r.length;I+=2){var O=P,R=T,L=x(h,d),N=E(h,d),j=m(h,d,l,p,g,A),F=v(h,d,l,p,g,A),M=this.k[I],B=this.k[I+1],C=r[I],q=r[I+1],z=X(O,R,L,N,j,F,M,B,C,q),$=K(O,R,L,N,j,F,M,B,C,q),O=w(n,i),R=S(n,i),L=y(n,i,o,s,a,c),N=b(n,i,o,s,a,c),H=U(O,R,L,N),J=V(O,R,L,N);P=g,T=A,g=l,A=p,l=h,p=d,h=U(u,f,z,$),d=V(f,f,z,$),u=a,f=c,a=o,c=s,o=n,s=i,n=U(z,$,H,J),i=V(z,$,H,J)}D(this.h,0,n,i),D(this.h,2,o,s),D(this.h,4,a,c),D(this.h,6,u,f),D(this.h,8,h,d),D(this.h,10,l,p),D(this.h,12,g,A),D(this.h,14,P,T)},o.prototype._digest=function(e){return"hex"===e?R.toHex32(this.h,"big"):R.split32(this.h,"big")},R.inherits(s,o),t.sha384=s,s.blockSize=1024,s.outSize=384,s.hmacStrength=192,s.padLength=128,s.prototype._digest=function(e){return"hex"===e?R.toHex32(this.h.slice(0,12),"big"):R.split32(this.h.slice(0,12),"big")},R.inherits(a,J),t.sha1=a,a.blockSize=512,a.outSize=160,a.hmacStrength=80,a.padLength=64,a.prototype._update=function(e,t){for(var r=this.W,n=0;16>n;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=N(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);for(var i=this.h[0],o=this.h[1],s=this.h[2],a=this.h[3],c=this.h[4],n=0;n<r.length;n++){var u=~~(n/20),f=M(N(i,5),g(u,o,s,a),c,r[n],Y[u]);c=a,a=s,s=N(o,30),o=i,i=f}this.h[0]=j(this.h[0],i),this.h[1]=j(this.h[1],o),this.h[2]=j(this.h[2],s),this.h[3]=j(this.h[3],a),this.h[4]=j(this.h[4],c)},a.prototype._digest=function(e){return"hex"===e?R.toHex32(this.h,"big"):R.split32(this.h,"big")}},function(e,t,r){function n(){return this instanceof n?(l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],void(this.endian="little")):new n}function i(e,t,r,n){return 15>=e?t^r^n:31>=e?t&r|~t&n:47>=e?(t|~r)^n:63>=e?t&n|r&~n:t^(r|~n)}function o(e){return 15>=e?0:31>=e?1518500249:47>=e?1859775393:63>=e?2400959708:2840853838}function s(e){return 15>=e?1352829926:31>=e?1548603684:47>=e?1836072691:63>=e?2053994217:0}var a=r(250),c=a.utils,u=c.rotl32,f=c.sum32,h=c.sum32_3,d=c.sum32_4,l=a.common.BlockHash;c.inherits(n,l),t.ripemd160=n,n.blockSize=512,n.outSize=160,n.hmacStrength=192,n.padLength=64,n.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],a=this.h[2],c=this.h[3],l=this.h[4],y=r,b=n,w=a,S=c,x=l,E=0;80>E;E++){var A=f(u(d(r,i(E,n,a,c),e[p[E]+t],o(E)),m[E]),l);r=l,l=c,c=u(a,10),a=n,n=A,A=f(u(d(y,i(79-E,b,w,S),e[g[E]+t],s(E)),v[E]),x),y=x,x=S,S=u(w,10),w=b,b=A}A=h(this.h[1],a,S),this.h[1]=h(this.h[2],c,x),this.h[2]=h(this.h[3],l,y),this.h[3]=h(this.h[4],r,b),this.h[4]=h(this.h[0],n,w),this.h[0]=A},n.prototype._digest=function(e){return"hex"===e?c.toHex32(this.h,"little"):c.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],g=[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],m=[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(e,t,r){function n(e,t,r){return this instanceof n?(this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,void this._init(o.toArray(t,r))):new n(e,t,r)}var i=r(250),o=i.utils,s=o.assert;e.exports=n,n.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),s(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(var t=0;t<e.length;t++)e[t]^=54;this.inner=(new this.Hash).update(e);for(var t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},n.prototype.update=function(e,t){return this.inner.update(e,t),this},n.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},function(e,t,r){"use strict";function n(e,t){function r(e,r){function n(n){var i="encode"===n,o=t[n+e]=function(e,o){var s=r;return o&&i&&(s={expectedLength:r.expectedLength,version:r.versions[r.versionTypes.indexOf(o)]}),t[n](e,s)};return o}var i=n("decode");n("encode"),t["isValid"+e]=function(e){try{i(e)}catch(t){return!1}return!0}}for(var n in e)r(n,e[n]);return t}function i(e,t){var r={};for(var n in a)r[n]=new t(a[n]);if(e!==a)for(var i in e)r[i]=new t(e[i]);return r}function o(e){var t=e.alphabets,r=void 0===t?a:t,o=e.codecMethods,c=void 0===o?{}:o,u=e.defaultAlphabet,f=void 0===u?Object.keys(r)[0]:u,h=s(e),d=i(r,h);return n(c,{Codec:h,codecs:d,decode:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=t.alphabet,n=void 0===r?f:r;return d[n].decode(e,t)},encode:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=t.alphabet,n=void 0===r?f:r;return d[n].encode(e,t)}})}var s=r(258),a={bitcoin:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",ripple:"rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz",tipple:"RPShNAF39wBUDnEGHJKLM4pQrsT7VWXYZ2bcdeCg65jkm8ofqi1tuvaxyz",stellar:"gsphnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCr65jkm8oFqi1tuvAxyz"};e.exports=o},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){var t=e.sha256,r=function(){function e(t){n(this,e),this.alphabet=t,this.codec=s(t),this.base=t.length}return o(e,[{key:"encode",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=t.version;return f(r)?this.encodeVersioned(e,r,t.expectedLength):t.checked?this.encodeChecked(e):this.encodeRaw(e)}},{key:"decode",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=t.version,n=t.versions;return f(n)?this.decodeMultiVersioned(e,n,t.expectedLength,t.versionTypes):f(r)?this.decodeVersioned(e,r,t.expectedLength):t.checked?this.decodeChecked(e):this.decodeRaw(e)}},{key:"encodeRaw",value:function(e){return this.codec.encode(e)}},{key:"decodeRaw",value:function(e){return this.codec.decode(e)}},{key:"encodeChecked",value:function(e){var r=t(t(e)).slice(0,4);return this.encodeRaw(u(e,r))}},{key:"decodeChecked",value:function(e){var t=this.decodeRaw(e);if(t.length<5)throw new Error("invalid_input_size");if(!this.verifyCheckSum(t))throw new Error("checksum_invalid");return t.slice(0,-4)}},{key:"encodeVersioned",value:function(e,t,r){if(r&&e.length!==r)throw new Error("unexpected_payload_length");return this.encodeChecked(u(t,e))}},{key:"decodeVersioned",value:function(e,t,r){return this.decodeMultiVersioned(e,[t],r).bytes}},{key:"decodeMultiVersioned",value:function(e,t,r,n){var i=this.decodeChecked(e),o={version:null,bytes:null};if(t.length>1&&!r)throw new Error("must pass expectedLengthgth > 1 possibleVersions");var s=t[0].length||1,a=r||i.length-s,u=i.slice(0,-a),f=i.slice(-a),h=t.some(function(e,t){var r=Array.isArray(e)?e:[e];return c(u,r)?(o.version=e,o.bytes=f,n&&(o.type=n[t]),!0):void 0});if(!h)throw new Error("version_invalid");if(r&&o.bytes.length!==r)throw new Error("unexpected_payload_length");return o}},{key:"verifyCheckSum",value:function(e){var r=t(t(e.slice(0,-4))).slice(0,4),n=e.slice(-4);return c(r,n)}},{key:"findPrefix",value:function(e,t){if(58!==this.base)throw new Error("Only works for base58");var r=t+4,n=Math.log(Math.pow(256,r))/Math.log(this.base),i=Math.ceil(n+.2),o=this.alphabet[Math.floor(this.alphabet.length/2)-1],s=e+new Array(i+1).join(o),a=this.decodeRaw(s),c=a.slice(0,-r);return c}}]),e}();return r}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(259),a=r(260),c=a.seqEqual,u=a.concatArgs,f=a.isSet;e.exports=i},function(e,t){e.exports=function(e){function t(t){if(0===t.length)return"";var r,n,o=[0];for(r=0;r<t.length;r++){for(n=0;n<o.length;n++)o[n]<<=8;o[0]+=t[r];var s=0;for(n=0;n<o.length;++n)o[n]+=s,s=o[n]/i|0,o[n]%=i;for(;s;)o.push(s%i),s=s/i|0}for(r=0;0===t[r]&&r<t.length-1;r++)o.push(0);return o.reverse().map(function(t){return e[t]}).join("")}function r(e){if(0===e.length)return[];var t,r,s=[0];for(t=0;t<e.length;t++){var a=e[t];if(!(a in n))throw new Error("Non-base"+i+" character");for(r=0;r<s.length;r++)s[r]*=i;s[0]+=n[a];var c=0;for(r=0;r<s.length;++r)s[r]+=c,c=s[r]>>8,s[r]&=255;for(;c;)s.push(255&c),c>>=8}for(t=0;e[t]===o&&t<e.length-1;t++)s.push(0);return s.reverse()}for(var n={},i=e.length,o=e.charAt(0),s=0;s<e.length;s++)n[e.charAt(s)]=s;return{encode:t,decode:r}}},function(e,t){"use strict";function r(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function n(e){return void 0!==e.length}function i(){for(var e=[],t=arguments.length,r=Array(t),i=0;t>i;i++)r[i]=arguments[i];return r.forEach(function(t){if(n(t))for(var r=0;r<t.length;r++)e.push(t[r]);else e.push(t)}),e}function o(e){return null!==e&&void 0!==e}e.exports={seqEqual:r,concatArgs:i,isSet:o}},function(e,t,r){"use strict";function n(e,t){for(var r=a.curve.n,n=0;4294967295>=n;n++){var i=(new c).add(e);void 0!==t&&i.addU32(t),i.addU32(n);var o=i.first256BN();if(o.cmpn(0)>0&&o.cmp(r)<0)return o}throw new Error("impossible unicorn ;)")}function i(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=t.validator,i=a.curve.n,o=n(e);if(r)return o;var s=a.g.mul(o),c=t.accountIndex||0;return n(s.encodeCompressed(),c).add(o).mod(i)}function o(e){var t=a.curve.decodePoint(e),r=n(e,0),i=a.g.mul(r),o=t.add(i);return o.encodeCompressed()}var s=r(229),a=s.ec("secp256k1"),c=r(262);e.exports={derivePrivateKey:i,accountPublicFromPublicGenerator:o}},function(e,t,r){"use strict";var n=r(263)["default"],i=r(267)["default"],o=r(222),s=r(232);e.exports=function(){function e(){i(this,e),this.hash=o.sha512()}return n(e,[{key:"add",value:function(e){return this.hash.update(e),this}},{key:"addU32",value:function(e){return this.add([e>>>24&255,e>>>16&255,e>>>8&255,255&e])}},{key:"finish",value:function(){return this.hash.digest()}},{key:"first256",value:function(){return this.finish().slice(0,32)}},{key:"first256BN",value:function(){return new s(this.first256())}}]),e}()},function(e,t,r){"use strict";var n=r(264)["default"];t["default"]=function(){function e(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),n(e,i.key,i)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),t.__esModule=!0},function(e,t,r){e.exports={"default":r(265),__esModule:!0}},function(e,t,r){var n=r(266);e.exports=function(e,t,r){return n.setDesc(e,t,r)}},function(e,t){var r=Object;e.exports={create:r.create,getProto:r.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:r.getOwnPropertyDescriptor,setDesc:r.defineProperty,setDescs:r.defineProperties,getKeys:r.keys,getNames:r.getOwnPropertyNames,getSymbols:r.getOwnPropertySymbols,each:[].forEach}},function(e,t){"use strict";t["default"]=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},t.__esModule=!0},function(e,t,r){"use strict";function n(e){return e.map(function(e){var t=e.toString(16).toUpperCase();return t.length>1?t:"0"+t}).join("")}function i(e){return a(e.length%2===0),new u(e,16).toArray(null,e.length/2)}function o(e){var t=c.sha256().update(e).digest(),r=c.ripemd160().update(t).digest();return r}function s(e){return c.sha512().update(e).digest().slice(0,16)}var a=r(198),c=r(222),u=r(232);e.exports={bytesToHex:n,hexToBytes:i,computePublicKeyHash:o,seedFromPhrase:s}},function(e,t,r){(function(t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){return"ledgerClosed"===e||"transaction"===e||"path_find"===e}var u=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_=r(192),f=r(193),h=f.EventEmitter,d=r(270),l=r(271).parse,p=r(276).RangeSet,g=r(277),RippledError=g.RippledError,DisconnectedError=g.DisconnectedError,NotConnectedError=g.NotConnectedError,TimeoutError=g.TimeoutError,ResponseFormatError=g.ResponseFormatError,ConnectionError=g.ConnectionError,m=g.RippledNotInitializedError,v=function(e){function f(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];o(this,f);var r=s(this,Object.getPrototypeOf(f).call(this));return r.setMaxListeners(1/0),r._url=e,r._trace=t.trace,r._trace&&(r._console=console),r._proxyURL=t.proxy,r._proxyAuthorization=t.proxyAuthorization,r._authorization=t.authorization,r._trustedCertificates=t.trustedCertificates,r._key=t.key,r._passphrase=t.passphrase,r._certificate=t.certificate,r._timeout=t.timeout||2e4,r._isReady=!1,r._ws=null,r._ledgerVersion=null,r._availableLedgerVersions=new p,r._nextRequestID=1,r._retry=0,r._retryTimer=null,r._onOpenErrorBound=null,r._onUnexpectedCloseBound=null,r}return a(f,e),u(f,[{key:"_updateLedgerVersions",value:function(e){this._ledgerVersion=Number(e.ledger_index),e.validated_ledgers?(this._availableLedgerVersions.reset(),this._availableLedgerVersions.parseAndAddRanges(e.validated_ledgers)):this._availableLedgerVersions.addValue(this._ledgerVersion)}},{key:"_parseMessage",value:function(e){var t=JSON.parse(e);if("response"===t.type){if(!(Number.isInteger(t.id)&&t.id>=0))throw new ResponseFormatError("valid id not found in response");return[t.id.toString(),t]}if(c(t.type))return"ledgerClosed"===t.type&&this._updateLedgerVersions(t),[t.type,t];if(void 0===t.type&&t.error)return["error",t.error,t.error_message,t];throw new ResponseFormatError("unrecognized message type: "+t.type)}},{key:"_onMessage",value:function(e){var t=void 0;this._trace&&this._console.log(e);try{t=this._parseMessage(e)}catch(r){return void this.emit("error","badMessage",r.message,e)}this.emit.apply(this,i(t))}},{key:"isConnected",value:function(){return this._state===d.OPEN&&this._isReady}},{key:"_onUnexpectedClose",value:function(e,t,r,n){this._onOpenErrorBound&&(this._ws.removeListener("error",this._onOpenErrorBound),this._onOpenErrorBound=null),this._ws.removeAllListeners("open"),this._ws=null,this._isReady=!1,e?this.connect().then(t,r):(this.emit("disconnected",n||1006),this._retryConnect())}},{key:"_calculateTimeout",value:function(e){return 40>e?50:100>e?1e3:160>e?1e4:3e4}},{key:"_retryConnect",value:function(){var e=this;this._retry+=1;var t=this._calculateTimeout(this._retry);this._retryTimer=setTimeout(function(){e.emit("reconnecting",e._retry),e.connect()["catch"](e._retryConnect.bind(e))},t)}},{key:"_clearReconnectTimer",value:function(){clearTimeout(this._retryTimer),this._retryTimer=null}},{key:"_onOpen",value:function(){var e=this;if(!this._ws)return Promise.reject(new DisconnectedError);this._onOpenErrorBound&&(this._ws.removeListener("error",this._onOpenErrorBound),this._onOpenErrorBound=null);var r={command:"subscribe",streams:["ledger"]};return this.request(r).then(function(r){return _.isEmpty(r)||!r.ledger_index?e._disconnect(!1).then(function(){throw new m("Rippled not initialized")}):(e._updateLedgerVersions(r),e._rebindOnUnxpectedClose(),e._retry=0,e._ws.on("error",function(r){t.browser&&r&&"error"===r.type||e.emit("error","websocket",r.message,r)}),e._isReady=!0,void e.emit("connected"))})}},{key:"_rebindOnUnxpectedClose",value:function(){this._onUnexpectedCloseBound&&this._ws.removeListener("close",this._onUnexpectedCloseBound),this._onUnexpectedCloseBound=this._onUnexpectedClose.bind(this,!1,null,null),this._ws.once("close",this._onUnexpectedCloseBound)}},{key:"_unbindOnUnxpectedClose",value:function(){this._onUnexpectedCloseBound&&this._ws.removeListener("close",this._onUnexpectedCloseBound),this._onUnexpectedCloseBound=null}},{key:"_onOpenError",value:function(e,t){this._onOpenErrorBound=null,this._unbindOnUnxpectedClose(),e(new NotConnectedError(t&&t.message))}},{key:"_createWebSocket",value:function(){var e={};if(void 0!==this._proxyURL){var t=l(this._url),i=l(this._proxyURL),o=_.omit({secureEndpoint:"wss:"===t.protocol,secureProxy:"https:"===i.protocol,auth:this._proxyAuthorization,ca:this._trustedCertificates,key:this._key,passphrase:this._passphrase,cert:this._certificate},_.isUndefined),s=_.assign({},i,o),a=void 0;try{a=r(279)}catch(c){throw new Error('"proxy" option is not supported in the browser')}e.agent=new a(s)}if(void 0!==this._authorization){var u=new n(this._authorization).toString("base64");e.headers={Authorization:"Basic "+u}}var f=_.omit({ca:this._trustedCertificates,key:this._key,passphrase:this._passphrase,cert:this._certificate},_.isUndefined),h=_.assign({},e,f),p=new d(this._url,null,h);return"function"==typeof p.setMaxListeners&&p.setMaxListeners(1/0),p}},{key:"connect",value:function(){var e=this;return this._clearReconnectTimer(),new Promise(function(t,r){e._url||r(new ConnectionError("Cannot connect because no server was specified")),e._state===d.OPEN?t():e._state===d.CONNECTING?e._ws.once("open",t):(e._ws=e._createWebSocket(),e._onOpenErrorBound=e._onOpenError.bind(e,r),e._ws.once("error",e._onOpenErrorBound),e._ws.on("message",e._onMessage.bind(e)),e._onUnexpectedCloseBound=e._onUnexpectedClose.bind(e,!0,t,r),e._ws.once("close",e._onUnexpectedCloseBound),e._ws.once("open",function(){return e._onOpen().then(t,r)}))})}},{key:"disconnect",value:function(){return this._disconnect(!0)}},{key:"_disconnect",value:function(e){var t=this;return e&&(this._clearReconnectTimer(),this._retry=0),new Promise(function(r){t._state===d.CLOSED?r():t._state===d.CLOSING?t._ws.once("close",r):(t._onUnexpectedCloseBound&&(t._ws.removeListener("close",t._onUnexpectedCloseBound),t._onUnexpectedCloseBound=null),t._ws.once("close",function(n){t._ws=null,t._isReady=!1,e&&t.emit("disconnected",n||1e3),r()}),t._ws.close())})}},{key:"reconnect",value:function(){var e=this;return this.disconnect().then(function(){return e.connect()})}},{key:"_whenReady",value:function(e){var t=this;return new Promise(function(r,n){t._shouldBeConnected?t._state===d.OPEN&&t._isReady?e.then(r,n):t.once("connected",function(){return e.then(r,n)}):n(new NotConnectedError)})}},{key:"getLedgerVersion",value:function(){return this._whenReady(Promise.resolve(this._ledgerVersion))}},{key:"hasLedgerVersions",value:function(e,t){return this._whenReady(Promise.resolve(this._availableLedgerVersions.containsRange(e,t||this._ledgerVersion)))}},{key:"hasLedgerVersion",value:function(e){return this.hasLedgerVersions(e,e)}},{key:"_send",value:function(e){var t=this;return this._trace&&this._console.log(e),new Promise(function(r,n){t._ws.send(e,void 0,function(e,t){e?n(new DisconnectedError(e.message)):r(t)})})}},{key:"request",value:function(e,t){var r=this;return new Promise(function(n,i){function o(){clearTimeout(u),f.removeAllListeners(d),i(new DisconnectedError)}function s(){clearTimeout(u),f.removeAllListeners(d),null!==f._ws&&f._ws.removeListener("close",o)}function a(e){s(),n(e)}function c(e){s(),i(e)}r._shouldBeConnected||i(new NotConnectedError);var u=null,f=r,h=r._nextRequestID;r._nextRequestID+=1;var d=h.toString();r.once(d,function(e){"error"===e.status?c(new RippledError(e.error)):"success"===e.status?a(e.result):c(new ResponseFormatError("unrecognized status: "+e.status))}),r._ws.once("close",o);var l=JSON.stringify(Object.assign({},e,{id:h}));r._whenReady(r._send(l)).then(function(){var e=t||r._timeout;u=setTimeout(function(){return c(new TimeoutError)},e)})["catch"](c)})}},{key:"_state",get:function(){return this._ws?this._ws.readyState:d.CLOSED}},{key:"_shouldBeConnected",get:function(){return null!==this._ws}}]),f}(h);e.exports=v}).call(t,r(191),r(204).Buffer)},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(){}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),c=r(193),u=c.EventEmitter,f=function(e){function t(e){var r=arguments.length<=1||void 0===arguments[1]?null:arguments[1],o=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];n(this,t);var a=i(this,Object.getPrototypeOf(t).call(this));return s(r),s(o),a.setMaxListeners(1/0),a._ws=new WebSocket(e),a._ws.onclose=function(){a.emit("close")},a._ws.onopen=function(){a.emit("open")},a._ws.onerror=function(e){a.emit("error",e)},a._ws.onmessage=function(e){a.emit("message",e.data)},a}return o(t,e),a(t,[{key:"close",value:function(){1===this.readyState&&this._ws.close()}},{key:"send",value:function(e){this._ws.send(e)}},{key:"readyState",get:function(){return this._ws.readyState}}]),t}(u);f.CONNECTING=0,f.OPEN=1,f.CLOSING=2,f.CLOSED=3,e.exports=f},function(e,t,r){function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,r){if(e&&u(e)&&e instanceof n)return e;var i=new n;return i.parse(e,t,r),i}function o(e){return c(e)&&(e=i(e)),e instanceof n?e.format():n.prototype.format.call(e)}function s(e,t){return i(e,!1,!0).resolve(t)}function a(e,t){return e?i(e,!1,!0).resolveObject(t):t}function c(e){return"string"==typeof e}function u(e){return"object"==typeof e&&null!==e}function f(e){return null===e}function h(e){return null==e}var d=r(272);t.parse=i,t.resolve=s,t.resolveObject=a,t.format=o,t.Url=n;var l=/^([a-z0-9.+-]+:)/i,p=/:[0-9]*$/,g=["<",">",'"',"`"," ","\r","\n","	"],m=["{","}","|","\\","^","`"].concat(g),v=["'"].concat(m),y=["%","/","?",";","#"].concat(v),b=["/","?","#"],w=255,S=/^[a-z0-9A-Z_-]{0,63}$/,x=/^([a-z0-9A-Z_-]{0,63})(.*)$/,E={javascript:!0,"javascript:":!0},A={javascript:!0,"javascript:":!0},P={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},T=r(273);n.prototype.parse=function(e,t,r){if(!c(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e;n=n.trim();var i=l.exec(n);if(i){i=i[0];var o=i.toLowerCase();this.protocol=o,n=n.substr(i.length)}if(r||i||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===n.substr(0,2);!s||i&&A[i]||(n=n.substr(2),this.slashes=!0)}if(!A[i]&&(s||i&&!P[i])){for(var a=-1,u=0;u<b.length;u++){var f=n.indexOf(b[u]);-1!==f&&(-1===a||a>f)&&(a=f)}var h,p;p=-1===a?n.lastIndexOf("@"):n.lastIndexOf("@",a),-1!==p&&(h=n.slice(0,p),n=n.slice(p+1),this.auth=decodeURIComponent(h)),a=-1;for(var u=0;u<y.length;u++){var f=n.indexOf(y[u]);-1!==f&&(-1===a||a>f)&&(a=f)}-1===a&&(a=n.length),this.host=n.slice(0,a),n=n.slice(a),this.parseHost(),this.hostname=this.hostname||"";var g="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!g)for(var m=this.hostname.split(/\./),u=0,I=m.length;I>u;u++){var O=m[u];if(O&&!O.match(S)){for(var R="",k=0,L=O.length;L>k;k++)R+=O.charCodeAt(k)>127?"x":O[k];if(!R.match(S)){var N=m.slice(0,u),j=m.slice(u+1),F=O.match(x);F&&(N.push(F[1]),j.unshift(F[2])),j.length&&(n="/"+j.join(".")+n),this.hostname=N.join(".");break}}}if(this.hostname.length>w?this.hostname="":this.hostname=this.hostname.toLowerCase(),!g){for(var M=this.hostname.split("."),B=[],u=0;u<M.length;++u){var C=M[u];B.push(C.match(/[^A-Za-z0-9_-]/)?"xn--"+d.encode(C):C)}this.hostname=B.join(".")}var q=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+q,this.href+=this.host,g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!E[o])for(var u=0,I=v.length;I>u;u++){
  var D=v[u],U=encodeURIComponent(D);U===D&&(U=escape(D)),n=n.split(D).join(U)}var V=n.indexOf("#");-1!==V&&(this.hash=n.substr(V),n=n.slice(0,V));var $=n.indexOf("?");if(-1!==$?(this.search=n.substr($),this.query=n.substr($+1),t&&(this.query=T.parse(this.query)),n=n.slice(0,$)):t&&(this.search="",this.query={}),n&&(this.pathname=n),P[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var q=this.pathname||"",C=this.search||"";this.path=q+C}return this.href=this.format(),this},n.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&u(this.query)&&Object.keys(this.query).length&&(o=T.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||P[t])&&i!==!1?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),r=r.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),s=s.replace("#","%23"),t+i+r+s+n},n.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},n.prototype.resolveObject=function(e){if(c(e)){var t=new n;t.parse(e,!1,!0),e=t}var r=new n;if(Object.keys(this).forEach(function(e){r[e]=this[e]},this),r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(r[t]=e[t])}),P[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(e.protocol&&e.protocol!==r.protocol){if(!P[e.protocol])return Object.keys(e).forEach(function(t){r[t]=e[t]}),r.href=r.format(),r;if(r.protocol=e.protocol,e.host||A[e.protocol])r.pathname=e.pathname;else{for(var i=(e.pathname||"").split("/");i.length&&!(e.host=i.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==i[0]&&i.unshift(""),i.length<2&&i.unshift(""),r.pathname=i.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var o=r.pathname||"",s=r.search||"";r.path=o+s}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var a=r.pathname&&"/"===r.pathname.charAt(0),u=e.host||e.pathname&&"/"===e.pathname.charAt(0),d=u||a||r.host&&e.pathname,l=d,p=r.pathname&&r.pathname.split("/")||[],i=e.pathname&&e.pathname.split("/")||[],g=r.protocol&&!P[r.protocol];if(g&&(r.hostname="",r.port=null,r.host&&(""===p[0]?p[0]=r.host:p.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===i[0]?i[0]=e.host:i.unshift(e.host)),e.host=null),d=d&&(""===i[0]||""===p[0])),u)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,p=i;else if(i.length)p||(p=[]),p.pop(),p=p.concat(i),r.search=e.search,r.query=e.query;else if(!h(e.search)){if(g){r.hostname=r.host=p.shift();var m=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;m&&(r.auth=m.shift(),r.host=r.hostname=m.shift())}return r.search=e.search,r.query=e.query,f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!p.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var v=p.slice(-1)[0],y=(r.host||e.host)&&("."===v||".."===v)||""===v,b=0,w=p.length;w>=0;w--)v=p[w],"."==v?p.splice(w,1):".."===v?(p.splice(w,1),b++):b&&(p.splice(w,1),b--);if(!d&&!l)for(;b--;b)p.unshift("..");!d||""===p[0]||p[0]&&"/"===p[0].charAt(0)||p.unshift(""),y&&"/"!==p.join("/").substr(-1)&&p.push("");var S=""===p[0]||p[0]&&"/"===p[0].charAt(0);if(g){r.hostname=r.host=S?"":p.length?p.shift():"";var m=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;m&&(r.auth=m.shift(),r.host=r.hostname=m.shift())}return d=d||r.host&&p.length,d&&!S&&p.unshift(""),p.length?r.pathname=p.join("/"):(r.pathname=null,r.path=null),f(r.pathname)&&f(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=p.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,r){var n;(function(e,i){!function(o){function s(e){throw RangeError(N[e])}function a(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function c(e,t){var r=e.split("@"),n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(L,".");var i=e.split("."),o=a(i,t).join(".");return n+o}function u(e){for(var t,r,n=[],i=0,o=e.length;o>i;)t=e.charCodeAt(i++),t>=55296&&56319>=t&&o>i?(r=e.charCodeAt(i++),56320==(64512&r)?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--)):n.push(t);return n}function f(e){return a(e,function(e){var t="";return e>65535&&(e-=65536,t+=M(e>>>10&1023|55296),e=56320|1023&e),t+=M(e)}).join("")}function h(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:S}function d(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function l(e,t,r){var n=0;for(e=r?F(e/P):e>>1,e+=F(e/t);e>j*E>>1;n+=S)e=F(e/j);return F(n+(j+1)*e/(e+A))}function p(e){var t,r,n,i,o,a,c,u,d,p,g=[],m=e.length,v=0,y=I,b=T;for(r=e.lastIndexOf(O),0>r&&(r=0),n=0;r>n;++n)e.charCodeAt(n)>=128&&s("not-basic"),g.push(e.charCodeAt(n));for(i=r>0?r+1:0;m>i;){for(o=v,a=1,c=S;i>=m&&s("invalid-input"),u=h(e.charCodeAt(i++)),(u>=S||u>F((w-v)/a))&&s("overflow"),v+=u*a,d=b>=c?x:c>=b+E?E:c-b,!(d>u);c+=S)p=S-d,a>F(w/p)&&s("overflow"),a*=p;t=g.length+1,b=l(v-o,t,0==o),F(v/t)>w-y&&s("overflow"),y+=F(v/t),v%=t,g.splice(v++,0,y)}return f(g)}function g(e){var t,r,n,i,o,a,c,f,h,p,g,m,v,y,b,A=[];for(e=u(e),m=e.length,t=I,r=0,o=T,a=0;m>a;++a)g=e[a],128>g&&A.push(M(g));for(n=i=A.length,i&&A.push(O);m>n;){for(c=w,a=0;m>a;++a)g=e[a],g>=t&&c>g&&(c=g);for(v=n+1,c-t>F((w-r)/v)&&s("overflow"),r+=(c-t)*v,t=c,a=0;m>a;++a)if(g=e[a],t>g&&++r>w&&s("overflow"),g==t){for(f=r,h=S;p=o>=h?x:h>=o+E?E:h-o,!(p>f);h+=S)b=f-p,y=S-p,A.push(M(d(p+b%y,0))),f=F(b/y);A.push(M(d(f,0))),o=l(r,v,n==i),r=0,++n}++r,++t}return A.join("")}function m(e){return c(e,function(e){return R.test(e)?p(e.slice(4).toLowerCase()):e})}function v(e){return c(e,function(e){return k.test(e)?"xn--"+g(e):e})}var y=("object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof i&&i);y.global!==y&&y.window!==y&&y.self!==y||(o=y);var b,w=2147483647,S=36,x=1,E=26,A=38,P=700,T=72,I=128,O="-",R=/^xn--/,k=/[^\x20-\x7E]/,L=/[\x2E\u3002\uFF0E\uFF61]/g,N={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=S-x,F=Math.floor,M=String.fromCharCode;b={version:"1.3.2",ucs2:{decode:u,encode:f},decode:p,encode:g,toASCII:v,toUnicode:m},n=function(){return b}.call(t,r,t,e),!(void 0!==n&&(e.exports=n))}(this)}).call(t,r(233)(e),function(){return this}())},function(e,t,r){"use strict";t.decode=t.parse=r(274),t.encode=t.stringify=r(275)},function(e,t){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,i){t=t||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var c=e.length;a>0&&c>a&&(c=a);for(var u=0;c>u;++u){var f,h,d,l,p=e[u].replace(s,"%20"),g=p.indexOf(n);g>=0?(f=p.substr(0,g),h=p.substr(g+1)):(f=p,h=""),d=decodeURIComponent(f),l=decodeURIComponent(h),r(o,d)?Array.isArray(o[d])?o[d].push(l):o[d]=[o[d],l]:o[d]=l}return o}},function(e,t){"use strict";var r=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,i){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var o=encodeURIComponent(r(i))+n;return Array.isArray(e[i])?e[i].map(function(e){return o+encodeURIComponent(r(e))}).join(t):o+encodeURIComponent(r(e[i]))}).join(t):i?encodeURIComponent(r(i))+n+encodeURIComponent(r(e)):""}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){var t=[[-(1/0),-(1/0)]];return _.forEach(_.sortBy(e,function(e){return e[0]}),function(e){var r=t.pop();e[0]<=r[1]+1?t.push([r[0],Math.max(e[1],r[1])]):(t.push(r),t.push(e))}),t.slice(1)}var o=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_=r(192),s=r(198),a=Symbol(),c=function(){function e(){n(this,e),this.reset()}return o(e,[{key:"reset",value:function(){this[a]=[]}},{key:"serialize",value:function(){return this[a].map(function(e){return e[0].toString()+"-"+e[1].toString()}).join(",")}},{key:"addRange",value:function(e,t){s(t>=e,"invalid range"),this[a]=i(this[a].concat([[e,t]]))}},{key:"addValue",value:function(e){this.addRange(e,e)}},{key:"parseAndAddRanges",value:function(e){var t=this,r=e.split(",");_.forEach(r,function(e){var r=e.split("-").map(Number);t.addRange(r[0],1===r.length?r[0]:r[1])})}},{key:"containsRange",value:function(e,t){return _.some(this[a],function(r){return r[0]<=e&&r[1]>=t})}},{key:"containsValue",value:function(e){return this.containsRange(e,e)}}]),e}();e.exports.RangeSet=c},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e){function t(){e.apply(this,arguments)}return t.prototype=Object.create(e.prototype),u.setPrototypeOf(t,e),t}var a=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),c=r(199),u=r(278),RippleError=function(e){function RippleError(e,t){n(this,RippleError);var r=i(this,Object.getPrototypeOf(RippleError).call(this,e));return r.name=u.getConstructorName(r),r.message=e,r.data=t,Error.captureStackTrace&&Error.captureStackTrace(r,r.constructor.name),r}return o(RippleError,e),a(RippleError,[{key:"toString",value:function(){var e="["+this.name+"("+this.message;return this.data&&(e+=", "+c.inspect(this.data)),e+=")]"}},{key:"inspect",value:function(){return this.toString()}}]),RippleError}(s(Error)),RippledError=function(e){function RippledError(){return n(this,RippledError),i(this,Object.getPrototypeOf(RippledError).apply(this,arguments))}return o(RippledError,e),RippledError}(RippleError),UnexpectedError=function(e){function UnexpectedError(){return n(this,UnexpectedError),i(this,Object.getPrototypeOf(UnexpectedError).apply(this,arguments))}return o(UnexpectedError,e),UnexpectedError}(RippleError),LedgerVersionError=function(e){function LedgerVersionError(){return n(this,LedgerVersionError),i(this,Object.getPrototypeOf(LedgerVersionError).apply(this,arguments))}return o(LedgerVersionError,e),LedgerVersionError}(RippleError),ConnectionError=function(e){function ConnectionError(){return n(this,ConnectionError),i(this,Object.getPrototypeOf(ConnectionError).apply(this,arguments))}return o(ConnectionError,e),ConnectionError}(RippleError),NotConnectedError=function(e){function NotConnectedError(){return n(this,NotConnectedError),i(this,Object.getPrototypeOf(NotConnectedError).apply(this,arguments))}return o(NotConnectedError,e),NotConnectedError}(ConnectionError),DisconnectedError=function(e){function DisconnectedError(){return n(this,DisconnectedError),i(this,Object.getPrototypeOf(DisconnectedError).apply(this,arguments))}return o(DisconnectedError,e),DisconnectedError}(ConnectionError),f=function(e){function t(){return n(this,t),i(this,Object.getPrototypeOf(t).apply(this,arguments))}return o(t,e),t}(ConnectionError),TimeoutError=function(e){function TimeoutError(){return n(this,TimeoutError),i(this,Object.getPrototypeOf(TimeoutError).apply(this,arguments))}return o(TimeoutError,e),TimeoutError}(ConnectionError),ResponseFormatError=function(e){function ResponseFormatError(){return n(this,ResponseFormatError),i(this,Object.getPrototypeOf(ResponseFormatError).apply(this,arguments))}return o(ResponseFormatError,e),ResponseFormatError}(ConnectionError),ValidationError=function(e){function ValidationError(){return n(this,ValidationError),i(this,Object.getPrototypeOf(ValidationError).apply(this,arguments))}return o(ValidationError,e),ValidationError}(RippleError),NotFoundError=function(e){function NotFoundError(e){return n(this,NotFoundError),i(this,Object.getPrototypeOf(NotFoundError).call(this,e||"Not found"))}return o(NotFoundError,e),NotFoundError}(RippleError),MissingLedgerHistoryError=function(e){function MissingLedgerHistoryError(e){return n(this,MissingLedgerHistoryError),i(this,Object.getPrototypeOf(MissingLedgerHistoryError).call(this,e||"Server is missing ledger history in the specified range"))}return o(MissingLedgerHistoryError,e),MissingLedgerHistoryError}(RippleError),PendingLedgerVersionError=function(e){function PendingLedgerVersionError(e){return n(this,PendingLedgerVersionError),i(this,Object.getPrototypeOf(PendingLedgerVersionError).call(this,e||"maxLedgerVersion is greater than server's most recent validated ledger"))}return o(PendingLedgerVersionError,e),PendingLedgerVersionError}(RippleError);e.exports={RippleError:RippleError,UnexpectedError:UnexpectedError,ConnectionError:ConnectionError,RippledError:RippledError,NotConnectedError:NotConnectedError,DisconnectedError:DisconnectedError,RippledNotInitializedError:f,TimeoutError:TimeoutError,ResponseFormatError:ResponseFormatError,ValidationError:ValidationError,NotFoundError:NotFoundError,PendingLedgerVersionError:PendingLedgerVersionError,MissingLedgerHistoryError:MissingLedgerHistoryError,LedgerVersionError:LedgerVersionError}},function(e,t,r){(function(t){"use strict";function r(e,t){Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t}function n(e){return t.browser?e.constructor.toString().match(/^function\s+([^(]*)/)[1]:e.constructor.name}e.exports={getConstructorName:n,setPrototypeOf:r}}).call(t,r(191))},function(e,t,r){(function(t){function n(e){if(!(this instanceof n))return new n(e);if("string"==typeof e&&(e=a.parse(e)),!e)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");h("creating new HttpsProxyAgent instance: %o",e),u.call(this,i);var t=c({},e);this.secureProxy=t.protocol?/^https:?$/i.test(t.protocol):!1,t.host=t.hostname||t.host,t.port=+t.port||(this.secureProxy?443:80),t.host&&t.path&&(delete t.path,delete t.pathname),this.proxy=t}function i(e,r,n){function i(){var e=p.read();e?d(e):p.once("readable",i)}function a(){p.removeListener("data",d),p.removeListener("end",u),p.removeListener("error",f),p.removeListener("close",c),p.removeListener("readable",i)}function c(e){h("onclose had error %o",e)}function u(){h("onend")}function f(e){a(),n(e)}function d(o){m.push(o),v+=o.length;var c=t.concat(m,v),u=c.toString("ascii");if(!~u.indexOf("\r\n\r\n"))return h("have not received end of HTTP headers yet..."),void(p.read?i():p.once("data",d));var f=u.substring(0,u.indexOf("\r\n")),g=+f.split(" ")[1];if(h("got proxy server response: %o",f),200==g){var y=p;m=c=null,r.secureEndpoint&&(h("upgrading proxy-connected socket to TLS connection: %o",r.host),r.socket=p,r.servername=r.host,r.host=null,r.hostname=null,r.port=null,y=s.connect(r)),a(),n(null,y)}else a(),m=c,e.once("socket",l),n(null,p)}function l(e){if("function"==typeof e.ondata)e.ondata(m,0,m.length);else{if(!(e.listeners("data").length>0))throw new Error("should not happen...");e.emit("data",m)}m=null}var p,g=this.proxy;p=this.secureProxy?s.connect(g):o.connect(g);var m=[],v=0;p.on("error",f),p.on("close",c),p.on("end",u),p.read?i():p.once("data",d);var y=r.host+":"+r.port,b="CONNECT "+y+" HTTP/1.1\r\n",w=g.auth;w&&(b+="Proxy-Authorization: Basic "+new t(w).toString("base64")+"\r\n"),b+="Host: "+y+"\r\nConnection: close\r\n\r\n",p.write(b)}var o=r(!function(){var e=new Error('Cannot find module "net"');throw e.code="MODULE_NOT_FOUND",e}()),s=r(!function(){var e=new Error('Cannot find module "tls"');throw e.code="MODULE_NOT_FOUND",e}()),a=r(271),c=r(280),u=r(281),f=r(199).inherits,h=r(307)("https-proxy-agent");e.exports=n,f(n,u)}).call(t,r(204).Buffer)},function(e,t){"use strict";var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},o=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var t=r.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&r.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!t&&!i)return!1;var o;for(o in e);return"undefined"==typeof o||r.call(e,o)};e.exports=function s(){var e,t,r,n,a,c,u=arguments[0],f=1,h=arguments.length,d=!1;for("boolean"==typeof u?(d=u,u=arguments[1]||{},f=2):("object"!=typeof u&&"function"!=typeof u||null==u)&&(u={});h>f;++f)if(e=arguments[f],null!=e)for(t in e)r=u[t],n=e[t],u!==n&&(d&&n&&(o(n)||(a=i(n)))?(a?(a=!1,c=r&&i(r)?r:[]):c=r&&o(r)?r:{},u[t]=s(d,c,n)):"undefined"!=typeof n&&(u[t]=n));return u}},function(e,t,r){(function(t){function n(e){if(!(this instanceof n))return new n(e);if("function"!=typeof e)throw new Error('Must pass a "callback function"');s.call(this),this.callback=e}r(282);var i=r(280),o=r(199).inherits,s=r(193).EventEmitter;e.exports=n,o(n,s),n.prototype.addRequest=function(e,r,n,o){var s;"object"==typeof r?s=i({},e._options,r):(s=i({},e._options,{host:r,port:n}),null!=o&&(s.localAddress=o)),s.host&&s.path&&delete s.path,null==s.port&&(s.port=s.secureEndpoint?443:80),delete s.agent,delete s.hostname,delete s._defaultAgent,delete s.defaultPort,delete s.createConnection,e._last=!0,e.shouldKeepAlive=!1,e._options=null;var a=!0;this.callback(e,s,function(r,n){function i(){e.emit("error",r),e._hadError=!0}r?a?t.nextTick(i):i():e.onSocket(n)}),a=!1}}).call(t,r(191))},function(e,t,r){(function(e){var t=r(271),n=r(283),i=r(305),o=r(306),s=r(199).inherits;o.lt(e.version,"0.11.8")&&(n.ClientRequest=function(e){function t(t,r){this._options=t,e.call(this,t,r)}return s(t,e),t}(n.ClientRequest),n.request=function(e){return function(e,r){if("string"==typeof e&&(e=t.parse(e)),e.protocol&&"http:"!==e.protocol)throw new Error("Protocol:"+e.protocol+" not supported.");return new n.ClientRequest(e,r)}}(n.request)),i.request=function(e){return function(r,n){return"string"==typeof r&&(r=t.parse(r)),null==r.port&&(r.port=443),r.secureEndpoint=!0,e.call(i,r,n)}}(i.request)}).call(t,r(191))},function(e,t,r){var n=e.exports,i=(r(193).EventEmitter,r(284)),o=r(271);n.request=function(e,t){"string"==typeof e&&(e=o.parse(e)),e||(e={}),e.host||e.port||(e.port=parseInt(window.location.port,10)),!e.host&&e.hostname&&(e.host=e.hostname),e.protocol||(e.scheme?e.protocol=e.scheme+":":e.protocol=window.location.protocol),e.host||(e.host=window.location.hostname||window.location.host),/:/.test(e.host)&&(e.port||(e.port=e.host.split(":")[1]),e.host=e.host.split(":")[0]),e.port||(e.port="https:"==e.protocol?443:80);var r=new i(new s,e);return t&&r.on("response",t),r},n.get=function(e,t){e.method="GET";var r=n.request(e,t);return r.end(),r},n.Agent=function(){},n.Agent.defaultMaxSockets=4;var s=function(){if("undefined"==typeof window)throw new Error("no window object present");if(window.XMLHttpRequest)return window.XMLHttpRequest;if(window.ActiveXObject){for(var e=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Microsoft.XMLHTTP"],t=0;t<e.length;t++)try{var r=new window.ActiveXObject(e[t]);return function(){if(r){var n=r;return r=null,n}return new window.ActiveXObject(e[t])}}catch(n){}throw new Error("ajax not supported in this browser")}throw new Error("ajax not supported in this browser")}();n.STATUS_CODES={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(e,t,r){var n=r(285),i=r(302),o=r(303),s=r(304),a=e.exports=function(e,t){var r=this;r.writable=!0,r.xhr=e,r.body=[],r.uri=(t.protocol||"http:")+"//"+t.host+(t.port?":"+t.port:"")+(t.path||"/"),"undefined"==typeof t.withCredentials&&(t.withCredentials=!0);try{e.withCredentials=t.withCredentials}catch(n){}if(t.responseType)try{e.responseType=t.responseType}catch(n){}if(e.open(t.method||"GET",r.uri,!0),e.onerror=function(e){r.emit("error",new Error("Network error"))},r._headers={},t.headers)for(var s=c(t.headers),a=0;a<s.length;a++){var u=s[a];if(r.isSafeRequestHeader(u)){var f=t.headers[u];r.setHeader(u,f)}}t.auth&&this.setHeader("Authorization","Basic "+o.btoa(t.auth));var h=new i;h.on("close",function(){r.emit("close")}),h.on("ready",function(){r.emit("response",h)}),h.on("error",function(e){r.emit("error",e)}),e.onreadystatechange=function(){e.__aborted||h.handle(e)}};s(a,n),a.prototype.setHeader=function(e,t){this._headers[e.toLowerCase()]=t},a.prototype.getHeader=function(e){return this._headers[e.toLowerCase()]},a.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},a.prototype.write=function(e){this.body.push(e)},a.prototype.destroy=function(e){this.xhr.__aborted=!0,this.xhr.abort(),this.emit("close")},a.prototype.end=function(e){void 0!==e&&this.body.push(e);for(var t=c(this._headers),r=0;r<t.length;r++){var n=t[r],i=this._headers[n];if(u(i))for(var o=0;o<i.length;o++)this.xhr.setRequestHeader(n,i[o]);else this.xhr.setRequestHeader(n,i)}if(0===this.body.length)this.xhr.send("");else if("string"==typeof this.body[0])this.xhr.send(this.body.join(""));else if(u(this.body[0])){for(var s=[],r=0;r<this.body.length;r++)s.push.apply(s,this.body[r]);this.xhr.send(s)}else if(/Array/.test(Object.prototype.toString.call(this.body[0]))){for(var a=0,r=0;r<this.body.length;r++)a+=this.body[r].length;for(var s=new this.body[0].constructor(a),f=0,r=0;r<this.body.length;r++)for(var d=this.body[r],o=0;o<d.length;o++)s[f++]=d[o];this.xhr.send(s)}else if(h(this.body[0]))this.xhr.send(this.body[0]);else{for(var s="",r=0;r<this.body.length;r++)s+=this.body[r].toString();this.xhr.send(s)}},a.unsafeHeaders=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","content-transfer-encoding","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"],a.prototype.isSafeRequestHeader=function(e){return e?-1===f(a.unsafeHeaders,e.toLowerCase()):!1};var c=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},f=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;r<e.length;r++)if(e[r]===t)return r;return-1},h=function(e){return"undefined"!=typeof Blob&&e instanceof Blob?!0:"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?!0:"undefined"!=typeof FormData&&e instanceof FormData?!0:void 0}},function(e,t,r){function n(){i.call(this)}e.exports=n;var i=r(193).EventEmitter,o=r(286);o(n,i),n.Readable=r(287),n.Writable=r(298),n.Duplex=r(299),n.Transform=r(300),n.PassThrough=r(301),n.Stream=n,n.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function o(){f||(f=!0,e.end())}function s(){f||(f=!0,"function"==typeof e.destroy&&e.destroy())}function a(e){if(c(),0===i.listenerCount(this,"error"))throw e}function c(){u.removeListener("data",r),e.removeListener("drain",n),u.removeListener("end",o),u.removeListener("close",s),u.removeListener("error",a),e.removeListener("error",a),u.removeListener("end",c),u.removeListener("close",c),e.removeListener("close",c)}var u=this;u.on("data",r),e.on("drain",n),e._isStdio||t&&t.end===!1||(u.on("end",o),u.on("close",s));var f=!1;return u.on("error",a),e.on("error",a),u.on("end",c),u.on("close",c),e.on("close",c),e.emit("pipe",u),e}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){(function(n){t=e.exports=r(288),t.Stream=r(285),t.Readable=t,t.Writable=r(294),t.Duplex=r(293),t.Transform=r(296),t.PassThrough=r(297),n.browser||"disable"!==n.env.READABLE_STREAM||(e.exports=r(285))}).call(t,r(191))},function(e,t,r){(function(t){function n(e,t){var n=r(293);e=e||{};var i=e.highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],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.objectMode=!!e.objectMode,t instanceof n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(O||(O=r(295).StringDecoder),this.decoder=new O(e.encoding),this.encoding=e.encoding)}function i(e){r(293);return this instanceof i?(this._readableState=new n(e,this),this.readable=!0,void T.call(this)):new i(e)}function o(e,t,r,n,i){var o=u(t,r);if(o)e.emit("error",o);else if(I.isNullOrUndefined(r))t.reading=!1,t.ended||f(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var a=new Error("stream.unshift() after end event");e.emit("error",a)}else!t.decoder||i||n||(r=t.decoder.write(r)),i||(t.reading=!1),t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&h(e)),l(e,t);else i||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function a(e){if(e>=k)e=k;else{e--;for(var t=1;32>t;t<<=1)e|=e>>t;e++}return e}function c(e,t){return 0===t.length&&t.ended?0:t.objectMode?0===e?0:1:isNaN(e)||I.isNull(e)?t.flowing&&t.buffer.length?t.buffer[0].length:t.length:0>=e?0:(e>t.highWaterMark&&(t.highWaterMark=a(e)),e>t.length?t.ended?t.length:(t.needReadable=!0,0):e)}function u(e,t){var r=null;return I.isBuffer(t)||I.isString(t)||I.isNullOrUndefined(t)||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function f(e,t){if(t.decoder&&!t.ended){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,h(e)}function h(e){var r=e._readableState;r.needReadable=!1,r.emittedReadable||(R("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?t.nextTick(function(){d(e)}):d(e))}function d(e){R("emit readable"),e.emit("readable"),y(e)}function l(e,r){r.readingMore||(r.readingMore=!0,t.nextTick(function(){p(e,r)}))}function p(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(R("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function g(e){return function(){var t=e._readableState;R("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&P.listenerCount(e,"data")&&(t.flowing=!0,y(e))}}function m(e,r){r.resumeScheduled||(r.resumeScheduled=!0,t.nextTick(function(){v(e,r)}))}function v(e,t){t.resumeScheduled=!1,e.emit("resume"),y(e),t.flowing&&!t.reading&&e.read(0)}function y(e){var t=e._readableState;if(R("flow",t.flowing),t.flowing)do var r=e.read();while(null!==r&&t.flowing)}function b(e,t){var r,n=t.buffer,i=t.length,o=!!t.decoder,s=!!t.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!e||e>=i)r=o?n.join(""):A.concat(n,i),n.length=0;else if(e<n[0].length){var a=n[0];r=a.slice(0,e),n[0]=a.slice(e)}else if(e===n[0].length)r=n.shift();else{r=o?"":new A(e);for(var c=0,u=0,f=n.length;f>u&&e>c;u++){var a=n[0],h=Math.min(e-c,a.length);o?r+=a.slice(0,h):a.copy(r,c,0,h),h<a.length?n[0]=a.slice(h):n.shift(),c+=h}}return r}function w(e){var r=e._readableState;if(r.length>0)throw new Error("endReadable called on non-empty stream");r.endEmitted||(r.ended=!0,t.nextTick(function(){r.endEmitted||0!==r.length||(r.endEmitted=!0,e.readable=!1,e.emit("end"))}))}function S(e,t){for(var r=0,n=e.length;n>r;r++)t(e[r],r)}function x(e,t){for(var r=0,n=e.length;n>r;r++)if(e[r]===t)return r;return-1}e.exports=i;var E=r(289),A=r(204).Buffer;i.ReadableState=n;var P=r(193).EventEmitter;P.listenerCount||(P.listenerCount=function(e,t){return e.listeners(t).length});var T=r(285),I=r(290);I.inherits=r(291);var O,R=r(292);R=R&&R.debuglog?R.debuglog("stream"):function(){},I.inherits(i,T),i.prototype.push=function(e,t){var r=this._readableState;return I.isString(e)&&!r.objectMode&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=new A(e,t),t="")),o(this,r,e,t,!1)},i.prototype.unshift=function(e){var t=this._readableState;return o(this,t,e,"",!0)},i.prototype.setEncoding=function(e){return O||(O=r(295).StringDecoder),this._readableState.decoder=new O(e),this._readableState.encoding=e,this};var k=8388608;i.prototype.read=function(e){R("read",e);var t=this._readableState,r=e;if((!I.isNumber(e)||e>0)&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return R("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?w(this):h(this),null;if(e=c(e,t),0===e&&t.ended)return 0===t.length&&w(this),null;var n=t.needReadable;R("need readable",n),(0===t.length||t.length-e<t.highWaterMark)&&(n=!0,R("length less than watermark",n)),(t.ended||t.reading)&&(n=!1,R("reading or ended",n)),n&&(R("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1),n&&!t.reading&&(e=c(r,t));var i;return i=e>0?b(e,t):null,I.isNull(i)&&(t.needReadable=!0,e=0),t.length-=e,0!==t.length||t.ended||(t.needReadable=!0),r!==e&&t.ended&&0===t.length&&w(this),I.isNull(i)||this.emit("data",i),i},i.prototype._read=function(e){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(e,r){function n(e){R("onunpipe"),e===h&&o()}function i(){R("onend"),e.end()}function o(){R("cleanup"),
  e.removeListener("close",c),e.removeListener("finish",u),e.removeListener("drain",m),e.removeListener("error",a),e.removeListener("unpipe",n),h.removeListener("end",i),h.removeListener("end",o),h.removeListener("data",s),!d.awaitDrain||e._writableState&&!e._writableState.needDrain||m()}function s(t){R("ondata");var r=e.write(t);!1===r&&(R("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function a(t){R("onerror",t),f(),e.removeListener("error",a),0===P.listenerCount(e,"error")&&e.emit("error",t)}function c(){e.removeListener("finish",u),f()}function u(){R("onfinish"),e.removeListener("close",c),f()}function f(){R("unpipe"),h.unpipe(e)}var h=this,d=this._readableState;switch(d.pipesCount){case 0:d.pipes=e;break;case 1:d.pipes=[d.pipes,e];break;default:d.pipes.push(e)}d.pipesCount+=1,R("pipe count=%d opts=%j",d.pipesCount,r);var l=(!r||r.end!==!1)&&e!==t.stdout&&e!==t.stderr,p=l?i:o;d.endEmitted?t.nextTick(p):h.once("end",p),e.on("unpipe",n);var m=g(h);return e.on("drain",m),h.on("data",s),e._events&&e._events.error?E(e._events.error)?e._events.error.unshift(a):e._events.error=[a,e._events.error]:e.on("error",a),e.once("close",c),e.once("finish",u),e.emit("pipe",h),d.flowing||(R("pipe resume"),h.resume()),e},i.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;n>i;i++)r[i].emit("unpipe",this);return this}var i=x(t.pipes,e);return-1===i?this:(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this),this)},i.prototype.on=function(e,r){var n=T.prototype.on.call(this,e,r);if("data"===e&&!1!==this._readableState.flowing&&this.resume(),"readable"===e&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&h(this,i);else{var o=this;t.nextTick(function(){R("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var e=this._readableState;return e.flowing||(R("resume"),e.flowing=!0,e.reading||(R("resume read 0"),this.read(0)),m(this,e)),this},i.prototype.pause=function(){return R("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(R("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;e.on("end",function(){if(R("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),e.on("data",function(i){if(R("wrapped data"),t.decoder&&(i=t.decoder.write(i)),i&&(t.objectMode||i.length)){var o=n.push(i);o||(r=!0,e.pause())}});for(var i in e)I.isFunction(e[i])&&I.isUndefined(this[i])&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return S(o,function(t){e.on(t,n.emit.bind(n,t))}),n._read=function(t){R("wrapped _read",t),r&&(r=!1,e.resume())},n},i._fromList=b}).call(t,r(191))},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t,r){(function(e){function r(e){return Array.isArray?Array.isArray(e):"[object Array]"===m(e)}function n(e){return"boolean"==typeof e}function i(e){return null===e}function o(e){return null==e}function s(e){return"number"==typeof e}function a(e){return"string"==typeof e}function c(e){return"symbol"==typeof e}function u(e){return void 0===e}function f(e){return"[object RegExp]"===m(e)}function h(e){return"object"==typeof e&&null!==e}function d(e){return"[object Date]"===m(e)}function l(e){return"[object Error]"===m(e)||e instanceof Error}function p(e){return"function"==typeof e}function g(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function m(e){return Object.prototype.toString.call(e)}t.isArray=r,t.isBoolean=n,t.isNull=i,t.isNullOrUndefined=o,t.isNumber=s,t.isString=a,t.isSymbol=c,t.isUndefined=u,t.isRegExp=f,t.isObject=h,t.isDate=d,t.isError=l,t.isFunction=p,t.isPrimitive=g,t.isBuffer=e.isBuffer}).call(t,r(204).Buffer)},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t){},function(e,t,r){(function(t){function n(e){return this instanceof n?(c.call(this,e),u.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new n(e)}function i(){this.allowHalfOpen||this._writableState.ended||t.nextTick(this.end.bind(this))}function o(e,t){for(var r=0,n=e.length;n>r;r++)t(e[r],r)}e.exports=n;var s=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t},a=r(290);a.inherits=r(291);var c=r(288),u=r(294);a.inherits(n,c),o(s(u.prototype),function(e){n.prototype[e]||(n.prototype[e]=u.prototype[e])})}).call(t,r(191))},function(e,t,r){(function(t){function n(e,t,r){this.chunk=e,this.encoding=t,this.callback=r}function i(e,t){var n=r(293);e=e||{};var i=e.highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!e.objectMode,t instanceof n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=e.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){l(t,e)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(e){var t=r(293);return this instanceof o||this instanceof t?(this._writableState=new i(e,this),this.writable=!0,void E.call(this)):new o(e)}function s(e,r,n){var i=new Error("write after end");e.emit("error",i),t.nextTick(function(){n(i)})}function a(e,r,n,i){var o=!0;if(!(x.isBuffer(n)||x.isString(n)||x.isNullOrUndefined(n)||r.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");e.emit("error",s),t.nextTick(function(){i(s)}),o=!1}return o}function c(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&x.isString(t)&&(t=new S(t,r)),t}function u(e,t,r,i,o){r=c(t,r,i),x.isBuffer(r)&&(i="buffer");var s=t.objectMode?1:r.length;t.length+=s;var a=t.length<t.highWaterMark;return a||(t.needDrain=!0),t.writing||t.corked?t.buffer.push(new n(r,i,o)):f(e,t,!1,s,r,i,o),a}function f(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function h(e,r,n,i,o){n?t.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),e._writableState.errorEmitted=!0,e.emit("error",i)}function d(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function l(e,r){var n=e._writableState,i=n.sync,o=n.writecb;if(d(n),r)h(e,n,i,r,o);else{var s=v(e,n);s||n.corked||n.bufferProcessing||!n.buffer.length||m(e,n),i?t.nextTick(function(){p(e,n,s,o)}):p(e,n,s,o)}}function p(e,t,r,n){r||g(e,t),t.pendingcb--,n(),b(e,t)}function g(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function m(e,t){if(t.bufferProcessing=!0,e._writev&&t.buffer.length>1){for(var r=[],n=0;n<t.buffer.length;n++)r.push(t.buffer[n].callback);t.pendingcb++,f(e,t,!0,t.length,t.buffer,"",function(e){for(var n=0;n<r.length;n++)t.pendingcb--,r[n](e)}),t.buffer=[]}else{for(var n=0;n<t.buffer.length;n++){var i=t.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,c=t.objectMode?1:o.length;if(f(e,t,!1,c,o,s,a),t.writing){n++;break}}n<t.buffer.length?t.buffer=t.buffer.slice(n):t.buffer.length=0}t.bufferProcessing=!1}function v(e,t){return t.ending&&0===t.length&&!t.finished&&!t.writing}function y(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function b(e,t){var r=v(e,t);return r&&(0===t.pendingcb?(y(e,t),t.finished=!0,e.emit("finish")):y(e,t)),r}function w(e,r,n){r.ending=!0,b(e,r),n&&(r.finished?t.nextTick(n):e.once("finish",n)),r.ended=!0}e.exports=o;var S=r(204).Buffer;o.WritableState=i;var x=r(290);x.inherits=r(291);var E=r(285);x.inherits(o,E),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(e,t,r){var n=this._writableState,i=!1;return x.isFunction(t)&&(r=t,t=null),x.isBuffer(e)?t="buffer":t||(t=n.defaultEncoding),x.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,e,r)&&(n.pendingcb++,i=u(this,n,e,t,r)),i},o.prototype.cork=function(){var e=this._writableState;e.corked++},o.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.buffer.length||m(this,e))},o.prototype._write=function(e,t,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(e,t,r){var n=this._writableState;x.isFunction(e)?(r=e,e=null,t=null):x.isFunction(t)&&(r=t,t=null),x.isNullOrUndefined(e)||this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||w(this,n,r)}}).call(t,r(191))},function(e,t,r){function n(e){if(e&&!c(e))throw new Error("Unknown encoding: "+e)}function i(e){return e.toString(this.encoding)}function o(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function s(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var a=r(204).Buffer,c=a.isEncoding||function(e){switch(e&&e.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}},u=t.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),n(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";e=e.slice(r,e.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=t.charCodeAt(t.length-1);if(!(n>=55296&&56319>=n)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,n=t.charCodeAt(i);if(n>=55296&&56319>=n){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},u.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(2>=t&&r>>4==14){this.charLength=3;break}if(3>=t&&r>>3==30){this.charLength=4;break}}this.charReceived=t},u.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},function(e,t,r){function n(e,t){this.afterTransform=function(e,r){return i(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,c.isNullOrUndefined(r)||e.push(r),i&&i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);a.call(this,e),this._transformState=new n(e,this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){c.isFunction(this._flush)?this._flush(function(e){s(t,e)}):s(t)})}function s(e,t){if(t)return e.emit("error",t);var r=e._writableState,n=e._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return e.push(null)}e.exports=o;var a=r(293),c=r(290);c.inherits=r(291),c.inherits(o,a),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,a.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,r){throw new Error("not implemented")},o.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;c.isNull(t.writechunk)||!t.writecb||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))}},function(e,t,r){function n(e){return this instanceof n?void i.call(this,e):new n(e)}e.exports=n;var i=r(296),o=r(290);o.inherits=r(291),o.inherits(n,i),n.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){e.exports=r(294)},function(e,t,r){e.exports=r(293)},function(e,t,r){e.exports=r(296)},function(e,t,r){e.exports=r(297)},function(e,t,r){function n(e){for(var t=e.getAllResponseHeaders().split(/\r?\n/),r={},n=0;n<t.length;n++){var i=t[n];if(""!==i){var o=i.match(/^([^:]+):\s*(.*)/);if(o){var s=o[1].toLowerCase(),a=o[2];void 0!==r[s]?c(r[s])?r[s].push(a):r[s]=[r[s],a]:r[s]=a}else r[i]=!0}}return r}var i=r(285),o=r(199),s=e.exports=function(e){this.offset=0,this.readable=!0};o.inherits(s,i);var a={streaming:!0,status2:!0};s.prototype.getResponse=function(e){var t=String(e.responseType).toLowerCase();return"blob"===t?e.responseBlob||e.response:"arraybuffer"===t?e.response:e.responseText},s.prototype.getHeader=function(e){return this.headers[e.toLowerCase()]},s.prototype.handle=function(e){if(2===e.readyState&&a.status2){try{this.statusCode=e.status,this.headers=n(e)}catch(t){a.status2=!1}a.status2&&this.emit("ready")}else if(a.streaming&&3===e.readyState){try{this.statusCode||(this.statusCode=e.status,this.headers=n(e),this.emit("ready"))}catch(t){}try{this._emitData(e)}catch(t){a.streaming=!1}}else 4===e.readyState&&(this.statusCode||(this.statusCode=e.status,this.emit("ready")),this._emitData(e),e.error?this.emit("error",this.getResponse(e)):this.emit("end"),this.emit("close"))},s.prototype._emitData=function(e){var t=this.getResponse(e);return t.toString().match(/ArrayBuffer/)?(this.emit("data",new Uint8Array(t,this.offset)),void(this.offset=t.byteLength)):void(t.length>this.offset&&(this.emit("data",t.slice(this.offset)),this.offset=t.length))};var c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,r){!function(){function e(e){this.message=e}var r=t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.prototype=new Error,e.prototype.name="InvalidCharacterError",r.btoa||(r.btoa=function(t){for(var r,i,o=0,s=n,a="";t.charAt(0|o)||(s="=",o%1);a+=s.charAt(63&r>>8-o%1*8)){if(i=t.charCodeAt(o+=.75),i>255)throw new e("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|i}return a}),r.atob||(r.atob=function(t){if(t=t.replace(/=+$/,""),t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,o=0,s=0,a="";i=t.charAt(s++);~i&&(r=o%4?64*r+i:i,o++%4)?a+=String.fromCharCode(255&r>>(-2*o&6)):0)i=n.indexOf(i);return a})}()},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){var n=r(283),i=e.exports;for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);i.request=function(e,t){return e||(e={}),e.scheme="https",n.request.call(this,e,t)}},function(e,t,r){(function(r){function n(e,t){if(e instanceof s)return e;if("string"!=typeof e)return null;if(e.length>J)return null;var r=t?W[le]:W[fe];if(!r.test(e))return null;try{return new s(e,t)}catch(n){return null}}function i(e,t){var r=n(e,t);return r?r.version:null}function o(e,t){var r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}function s(e,t){if(e instanceof s){if(e.loose===t)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>J)throw new TypeError("version is longer than "+J+" characters");if(!(this instanceof s))return new s(e,t);K("SemVer",e,t),this.loose=t;var r=e.trim().match(t?W[le]:W[fe]);if(!r)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>G||this.major<0)throw new TypeError("Invalid major version");if(this.minor>G||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>G||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&G>t)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}function a(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new s(e,r).inc(t,n).version}catch(i){return null}}function c(e,t){if(S(e,t))return null;var r=n(e),i=n(t);if(r.prerelease.length||i.prerelease.length){for(var o in r)if(("major"===o||"minor"===o||"patch"===o)&&r[o]!==i[o])return"pre"+o;return"prerelease"}for(var o in r)if(("major"===o||"minor"===o||"patch"===o)&&r[o]!==i[o])return o}function u(e,t){var r=qe.test(e),n=qe.test(t);return r&&n&&(e=+e,t=+t),r&&!n?-1:n&&!r?1:t>e?-1:e>t?1:0}function f(e,t){return u(t,e)}function h(e,t){return new s(e,t).major}function d(e,t){return new s(e,t).minor}function l(e,t){return new s(e,t).patch}function p(e,t,r){return new s(e,r).compare(t)}function g(e,t){return p(e,t,!0)}function m(e,t,r){return p(t,e,r)}function v(e,r){return e.sort(function(e,n){return t.compare(e,n,r)})}function y(e,r){return e.sort(function(e,n){return t.rcompare(e,n,r)})}function b(e,t,r){return p(e,t,r)>0}function w(e,t,r){return p(e,t,r)<0}function S(e,t,r){return 0===p(e,t,r)}function x(e,t,r){return 0!==p(e,t,r)}function E(e,t,r){return p(e,t,r)>=0}function A(e,t,r){return p(e,t,r)<=0}function P(e,t,r,n){var i;switch(t){case"===":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e===r;break;case"!==":"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),i=e!==r;break;case"":case"=":case"==":i=S(e,r,n);break;case"!=":i=x(e,r,n);break;case">":i=b(e,r,n);break;case">=":i=E(e,r,n);break;case"<":i=w(e,r,n);break;case"<=":i=A(e,r,n);break;default:throw new TypeError("Invalid operator: "+t)}return i}function T(e,t){if(e instanceof T){if(e.loose===t)return e;e=e.value}return this instanceof T?(K("comparator",e,t),this.loose=t,this.parse(e),this.semver===ze?this.value="":this.value=this.operator+this.semver.version,void K("comp",this)):new T(e,t)}function I(e,t){if(e instanceof I&&e.loose===t)return e;if(!(this instanceof I))return new I(e,t);if(this.loose=t,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function O(e,t){return new I(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function R(e,t){return K("comp",e),e=j(e,t),K("caret",e),e=L(e,t),K("tildes",e),e=M(e,t),K("xrange",e),e=C(e,t),K("stars",e),e}function k(e){return!e||"x"===e.toLowerCase()||"*"===e}function L(e,t){return e.trim().split(/\s+/).map(function(e){return N(e,t)}).join(" ")}function N(e,t){var r=t?W[Ae]:W[Ee];return e.replace(r,function(_,t,r,n,i){K("tilde",e,_,t,r,n,i);var o;return k(t)?o="":k(r)?o=">="+t+".0.0 <"+(+t+1)+".0.0":k(n)?o=">="+t+"."+r+".0 <"+t+"."+(+r+1)+".0":i?(K("replaceTilde pr",i),"-"!==i.charAt(0)&&(i="-"+i),o=">="+t+"."+r+"."+n+i+" <"+t+"."+(+r+1)+".0"):o=">="+t+"."+r+"."+n+" <"+t+"."+(+r+1)+".0",K("tilde return",o),o})}function j(e,t){return e.trim().split(/\s+/).map(function(e){return F(e,t)}).join(" ")}function F(e,t){K("caret",e,t);var r=t?W[Re]:W[Oe];return e.replace(r,function(_,t,r,n,i){K("caret",e,_,t,r,n,i);var o;return k(t)?o="":k(r)?o=">="+t+".0.0 <"+(+t+1)+".0.0":k(n)?o="0"===t?">="+t+"."+r+".0 <"+t+"."+(+r+1)+".0":">="+t+"."+r+".0 <"+(+t+1)+".0.0":i?(K("replaceCaret pr",i),"-"!==i.charAt(0)&&(i="-"+i),o="0"===t?"0"===r?">="+t+"."+r+"."+n+i+" <"+t+"."+r+"."+(+n+1):">="+t+"."+r+"."+n+i+" <"+t+"."+(+r+1)+".0":">="+t+"."+r+"."+n+i+" <"+(+t+1)+".0.0"):(K("no pr"),o="0"===t?"0"===r?">="+t+"."+r+"."+n+" <"+t+"."+r+"."+(+n+1):">="+t+"."+r+"."+n+" <"+t+"."+(+r+1)+".0":">="+t+"."+r+"."+n+" <"+(+t+1)+".0.0"),K("caret return",o),o})}function M(e,t){return K("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return B(e,t)}).join(" ")}function B(e,t){e=e.trim();var r=t?W[we]:W[be];return e.replace(r,function(t,r,n,i,o,s){K("xRange",e,t,r,n,i,o,s);var a=k(n),c=a||k(i),u=c||k(o),f=u;return"="===r&&f&&(r=""),a?t=">"===r||"<"===r?"<0.0.0":"*":r&&f?(c&&(i=0),u&&(o=0),">"===r?(r=">=",c?(n=+n+1,i=0,o=0):u&&(i=+i+1,o=0)):"<="===r&&(r="<",c?n=+n+1:i=+i+1),t=r+n+"."+i+"."+o):c?t=">="+n+".0.0 <"+(+n+1)+".0.0":u&&(t=">="+n+"."+i+".0 <"+n+"."+(+i+1)+".0"),K("xRange return",t),t})}function C(e,t){return K("replaceStars",e,t),e.trim().replace(W[Be],"")}function q(e,t,r,n,i,o,s,a,c,u,f,h,d){return t=k(r)?"":k(n)?">="+r+".0.0":k(i)?">="+r+"."+n+".0":">="+t,a=k(c)?"":k(u)?"<"+(+c+1)+".0.0":k(f)?"<"+c+"."+(+u+1)+".0":h?"<="+c+"."+u+"."+f+"-"+h:"<="+a,(t+" "+a).trim()}function z(e,t){for(var r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length){for(var r=0;r<e.length;r++)if(K(e[r].semver),e[r].semver!==ze&&e[r].semver.prerelease.length>0){var n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}function D(e,t,r){try{t=new I(t,r)}catch(n){return!1}return t.test(e)}function U(e,t,r){return e.filter(function(e){return D(e,t,r)}).sort(function(e,t){return m(e,t,r)})[0]||null}function V(e,t){try{return new I(e,t).range||"*"}catch(r){return null}}function $(e,t,r){return X(e,t,"<",r)}function H(e,t,r){return X(e,t,">",r)}function X(e,t,r,n){e=new s(e,n),t=new I(t,n);var i,o,a,c,u;switch(r){case">":i=b,o=A,a=w,c=">",u=">=";break;case"<":i=w,o=E,a=b,c="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(D(e,t,n))return!1;for(var f=0;f<t.set.length;++f){var h=t.set[f],d=null,l=null;if(h.forEach(function(e){e.semver===ze&&(e=new T(">=0.0.0")),d=d||e,l=l||e,i(e.semver,d.semver,n)?d=e:a(e.semver,l.semver,n)&&(l=e)}),d.operator===c||d.operator===u)return!1;if((!l.operator||l.operator===c)&&o(e,l.semver))return!1;if(l.operator===u&&a(e,l.semver))return!1}return!0}t=e.exports=s;var K;K="object"==typeof r&&r.env&&r.env.NODE_DEBUG&&/\bsemver\b/i.test(r.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var J=256,G=Number.MAX_SAFE_INTEGER||9007199254740991,W=t.re=[],Y=t.src=[],Q=0,Z=Q++;Y[Z]="0|[1-9]\\d*";var ee=Q++;Y[ee]="[0-9]+";var te=Q++;Y[te]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var re=Q++;Y[re]="("+Y[Z]+")\\.("+Y[Z]+")\\.("+Y[Z]+")";var ne=Q++;Y[ne]="("+Y[ee]+")\\.("+Y[ee]+")\\.("+Y[ee]+")";var ie=Q++;Y[ie]="(?:"+Y[Z]+"|"+Y[te]+")";var oe=Q++;Y[oe]="(?:"+Y[ee]+"|"+Y[te]+")";var se=Q++;Y[se]="(?:-("+Y[ie]+"(?:\\."+Y[ie]+")*))";var ae=Q++;Y[ae]="(?:-?("+Y[oe]+"(?:\\."+Y[oe]+")*))";var ce=Q++;Y[ce]="[0-9A-Za-z-]+";var ue=Q++;Y[ue]="(?:\\+("+Y[ce]+"(?:\\."+Y[ce]+")*))";var fe=Q++,he="v?"+Y[re]+Y[se]+"?"+Y[ue]+"?";Y[fe]="^"+he+"$";var de="[v=\\s]*"+Y[ne]+Y[ae]+"?"+Y[ue]+"?",le=Q++;Y[le]="^"+de+"$";var pe=Q++;Y[pe]="((?:<|>)?=?)";var ge=Q++;Y[ge]=Y[ee]+"|x|X|\\*";var me=Q++;Y[me]=Y[Z]+"|x|X|\\*";var ve=Q++;Y[ve]="[v=\\s]*("+Y[me]+")(?:\\.("+Y[me]+")(?:\\.("+Y[me]+")(?:"+Y[se]+")?"+Y[ue]+"?)?)?";var ye=Q++;Y[ye]="[v=\\s]*("+Y[ge]+")(?:\\.("+Y[ge]+")(?:\\.("+Y[ge]+")(?:"+Y[ae]+")?"+Y[ue]+"?)?)?";var be=Q++;Y[be]="^"+Y[pe]+"\\s*"+Y[ve]+"$";var we=Q++;Y[we]="^"+Y[pe]+"\\s*"+Y[ye]+"$";var _e=Q++;Y[_e]="(?:~>?)";var Se=Q++;Y[Se]="(\\s*)"+Y[_e]+"\\s+",W[Se]=new RegExp(Y[Se],"g");var xe="$1~",Ee=Q++;Y[Ee]="^"+Y[_e]+Y[ve]+"$";var Ae=Q++;Y[Ae]="^"+Y[_e]+Y[ye]+"$";var Pe=Q++;Y[Pe]="(?:\\^)";var Te=Q++;Y[Te]="(\\s*)"+Y[Pe]+"\\s+",W[Te]=new RegExp(Y[Te],"g");var Ie="$1^",Oe=Q++;Y[Oe]="^"+Y[Pe]+Y[ve]+"$";var Re=Q++;Y[Re]="^"+Y[Pe]+Y[ye]+"$";var ke=Q++;Y[ke]="^"+Y[pe]+"\\s*("+de+")$|^$";var Le=Q++;Y[Le]="^"+Y[pe]+"\\s*("+he+")$|^$";var Ne=Q++;Y[Ne]="(\\s*)"+Y[pe]+"\\s*("+de+"|"+Y[ve]+")",W[Ne]=new RegExp(Y[Ne],"g");var je="$1$2$3",Fe=Q++;Y[Fe]="^\\s*("+Y[ve]+")\\s+-\\s+("+Y[ve]+")\\s*$";var Me=Q++;Y[Me]="^\\s*("+Y[ye]+")\\s+-\\s+("+Y[ye]+")\\s*$";var Be=Q++;Y[Be]="(<|>)?=?\\s*\\*";for(var Ce=0;Q>Ce;Ce++)K(Ce,Y[Ce]),W[Ce]||(W[Ce]=new RegExp(Y[Ce]));t.parse=n,t.valid=i,t.clean=o,t.SemVer=s,s.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},s.prototype.inspect=function(){return'<SemVer "'+this+'">'},s.prototype.toString=function(){return this.version},s.prototype.compare=function(e){return K("SemVer.compare",this.version,this.loose,e),e instanceof s||(e=new s(e,this.loose)),this.compareMain(e)||this.comparePre(e)},s.prototype.compareMain=function(e){return e instanceof s||(e=new s(e,this.loose)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)},s.prototype.comparePre=function(e){if(e instanceof s||(e=new s(e,this.loose)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],n=e.prerelease[t];if(K("prerelease compare",t,r,n),void 0===r&&void 0===n)return 0;if(void 0===n)return 1;if(void 0===r)return-1;if(r!==n)return u(r,n)}while(++t)},s.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=a,t.diff=c,t.compareIdentifiers=u;var qe=/^[0-9]+$/;t.rcompareIdentifiers=f,t.major=h,t.minor=d,t.patch=l,t.compare=p,t.compareLoose=g,t.rcompare=m,t.sort=v,t.rsort=y,t.gt=b,t.lt=w,t.eq=S,t.neq=x,t.gte=E,t.lte=A,t.cmp=P,t.Comparator=T;var ze={};T.prototype.parse=function(e){var t=this.loose?W[ke]:W[Le],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new s(r[2],this.loose):this.semver=ze},T.prototype.inspect=function(){return'<SemVer Comparator "'+this+'">'},T.prototype.toString=function(){return this.value},T.prototype.test=function(e){return K("Comparator.test",e,this.loose),this.semver===ze?!0:("string"==typeof e&&(e=new s(e,this.loose)),P(e,this.operator,this.semver,this.loose))},t.Range=I,I.prototype.inspect=function(){return'<SemVer Range "'+this.range+'">'},I.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},I.prototype.toString=function(){return this.range},I.prototype.parseRange=function(e){var t=this.loose;e=e.trim(),K("range",e,t);var r=t?W[Me]:W[Fe];e=e.replace(r,q),K("hyphen replace",e),e=e.replace(W[Ne],je),K("comparator trim",e,W[Ne]),e=e.replace(W[Se],xe),e=e.replace(W[Te],Ie),e=e.split(/\s+/).join(" ");var n=t?W[ke]:W[Le],i=e.split(" ").map(function(e){return R(e,t)}).join(" ").split(/\s+/);return this.loose&&(i=i.filter(function(e){return!!e.match(n)})),i=i.map(function(e){return new T(e,t)})},t.toComparators=O,I.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new s(e,this.loose));for(var t=0;t<this.set.length;t++)if(z(this.set[t],e))return!0;return!1},t.satisfies=D,t.maxSatisfying=U,t.validRange=V,t.ltr=$,t.gtr=H,t.outside=X}).call(t,r(191))},function(e,t,r){function n(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function i(){var e=arguments,r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),!r)return e;var n="color: "+this.color;e=[e[0],n,"color: inherit"].concat(Array.prototype.slice.call(e,1));var i=0,o=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,n),e}function o(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(r){}}function a(){var e;try{e=t.storage.debug}catch(r){}return e}function c(){try{return window.localStorage}catch(e){}}t=e.exports=r(308),t.log=o,t.formatArgs=i,t.save=s,t.load=a,t.useColors=n,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){return JSON.stringify(e)},t.enable(a())},function(e,t,r){function n(){return t.colors[f++%t.colors.length]}function i(e){function r(){}function i(){var e=i,r=+new Date,o=r-(u||r);e.diff=o,e.prev=u,e.curr=r,u=r,null==e.useColors&&(e.useColors=t.useColors()),null==e.color&&e.useColors&&(e.color=n());var s=Array.prototype.slice.call(arguments);s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(r,n){if("%%"===r)return r;a++;var i=t.formatters[n];if("function"==typeof i){var o=s[a];r=i.call(e,o),s.splice(a,1),a--}return r}),"function"==typeof t.formatArgs&&(s=t.formatArgs.apply(e,s));var c=i.log||t.log||console.log.bind(console);c.apply(e,s)}r.enabled=!1,i.enabled=!0;var o=t.enabled(e)?i:r;return o.namespace=e,o}function o(e){t.save(e);for(var r=(e||"").split(/[\s,]+/),n=r.length,i=0;n>i;i++)r[i]&&(e=r[i].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function s(){t.enable("")}function a(e){var r,n;for(r=0,n=t.skips.length;n>r;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;n>r;r++)if(t.names[r].test(e))return!0;
  return!1}function c(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=i,t.coerce=c,t.disable=s,t.enable=o,t.enabled=a,t.humanize=r(309),t.names=[],t.skips=[],t.formatters={};var u,f=0},function(e,t){function r(e){if(e=""+e,!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*f;case"days":case"day":case"d":return r*u;case"hours":case"hour":case"hrs":case"hr":case"h":return r*c;case"minutes":case"minute":case"mins":case"min":case"m":return r*a;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r}}}}function n(e){return e>=u?Math.round(e/u)+"d":e>=c?Math.round(e/c)+"h":e>=a?Math.round(e/a)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function i(e){return o(e,u,"day")||o(e,c,"hour")||o(e,a,"minute")||o(e,s,"second")||e+" ms"}function o(e,t,r){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var s=1e3,a=60*s,c=60*a,u=24*c,f=365.25*u;e.exports=function(e,t){return t=t||{},"string"==typeof e?r(e):t["long"]?i(e):n(e)}},function(e,t,r){"use strict";var n=r(311).txFlagIndices.AccountSet,i={PasswordSpent:65536,RequireDestTag:131072,RequireAuth:262144,DisallowXRP:524288,DisableMaster:1048576,NoFreeze:2097152,GlobalFreeze:4194304,DefaultRipple:8388608},o={passwordSpent:i.PasswordSpent,requireDestinationTag:i.RequireDestTag,requireAuthorization:i.RequireAuth,disallowIncomingXRP:i.DisallowXRP,disableMasterKey:i.DisableMaster,noFreeze:i.NoFreeze,globalFreeze:i.GlobalFreeze,defaultRipple:i.DefaultRipple},s={requireDestinationTag:n.asfRequireDest,requireAuthorization:n.asfRequireAuth,disallowIncomingXRP:n.asfDisallowXRP,disableMasterKey:n.asfDisableMaster,enableTransactionIDTracking:n.asfAccountTxnID,noFreeze:n.asfNoFreeze,globalFreeze:n.asfGlobalFreeze,defaultRipple:n.asfDefaultRipple},a={EmailHash:{name:"emailHash",encoding:"hex",length:32,defaults:"0"},MessageKey:{name:"messageKey"},Domain:{name:"domain",encoding:"hex"},TransferRate:{name:"transferRate",defaults:0,shift:9}};e.exports={AccountFields:a,AccountFlagIndices:s,AccountFlags:o}},function(e,t){"use strict";var r={Universal:{FullyCanonicalSig:2147483648},AccountSet:{RequireDestTag:65536,OptionalDestTag:131072,RequireAuth:262144,OptionalAuth:524288,DisallowXRP:1048576,AllowXRP:2097152},TrustSet:{SetAuth:65536,NoRipple:131072,SetNoRipple:131072,ClearNoRipple:262144,SetFreeze:1048576,ClearFreeze:2097152},OfferCreate:{Passive:65536,ImmediateOrCancel:131072,FillOrKill:262144,Sell:524288},Payment:{NoRippleDirect:65536,PartialPayment:131072,LimitQuality:262144}},n={AccountSet:{asfRequireDest:1,asfRequireAuth:2,asfDisallowXRP:3,asfDisableMaster:4,asfAccountTxnID:5,asfNoFreeze:6,asfGlobalFreeze:7,asfDefaultRipple:8}};e.exports={txFlags:r,txFlagIndices:n}},function(e,t,r){"use strict";function n(e){return new ValidationError(e)}function i(e){if(!_.isUndefined(e)&&!_.isUndefined(e.minLedgerVersion)&&!_.isUndefined(e.maxLedgerVersion)&&Number(e.minLedgerVersion)>Number(e.maxLedgerVersion))throw n("minLedgerVersion must not be greater than maxLedgerVersion")}function o(e,t){s(e,t),i(t.options)}var _=r(192),ValidationError=r(277).ValidationError,s=r(313).schemaValidate;e.exports={getPaths:_.partial(s,"getPathsParameters"),getTransactions:_.partial(o,"getTransactionsParameters"),getSettings:_.partial(o,"getSettingsParameters"),getAccountInfo:_.partial(o,"getAccountInfoParameters"),getTrustlines:_.partial(o,"getTrustlinesParameters"),getBalances:_.partial(o,"getBalancesParameters"),getBalanceSheet:_.partial(o,"getBalanceSheetParameters"),getOrders:_.partial(o,"getOrdersParameters"),getOrderbook:_.partial(o,"getOrderbookParameters"),getTransaction:_.partial(o,"getTransactionParameters"),getLedger:_.partial(o,"getLedgerParameters"),preparePayment:_.partial(s,"preparePaymentParameters"),prepareOrder:_.partial(s,"prepareOrderParameters"),prepareOrderCancellation:_.partial(s,"prepareOrderCancellationParameters"),prepareTrustline:_.partial(s,"prepareTrustlineParameters"),prepareSettings:_.partial(s,"prepareSettingsParameters"),prepareSuspendedPaymentCreation:_.partial(s,"prepareSuspendedPaymentCreationParameters"),prepareSuspendedPaymentCancellation:_.partial(s,"prepareSuspendedPaymentCancellationParameters"),prepareSuspendedPaymentExecution:_.partial(s,"prepareSuspendedPaymentExecutionParameters"),sign:_.partial(s,"signParameters"),combine:_.partial(s,"combineParameters"),submit:_.partial(s,"submitParameters"),computeLedgerHash:_.partial(s,"computeLedgerHashParameters"),generateAddress:_.partial(s,"generateAddressParameters"),apiOptions:_.partial(s,"api-options"),instructions:_.partial(s,"instructions")}},function(e,t,r){"use strict";function n(){var e=[r(352),r(353),r(354),r(355),r(356),r(357),r(358),r(359),r(360),r(361),r(362),r(363),r(364),r(365),r(366),r(367),r(368),r(369),r(370),r(371),r(372),r(373),r(374),r(375),r(376),r(377),r(378),r(379),r(380),r(381),r(382),r(383),r(384),r(385),r(386),r(387),r(388),r(389),r(390),r(391),r(392),r(393),r(394),r(395),r(396),r(397),r(398),r(399),r(400),r(401),r(402),r(403),r(404),r(405),r(406),r(407),r(408),r(409),r(410),r(411),r(412),r(413),r(414),r(415),r(416),r(417),r(418),r(419),r(420),r(421),r(422),r(423),r(424),r(425),r(426),r(427),r(428),r(429),r(430),r(431),r(432),r(433),r(434),r(435),r(436)],t=_.map(e,function(e){return e.title}),n=_.keys(_.pick(_.countBy(t),function(e){return e>1}));o(0===n.length,"Duplicate schemas for: "+n);var i=new s;return _.forEach(e,function(e){return i.addSchema(e,e.title)}),i.addFormat("address",c),i.addFormat("secret",f),i}function i(e,t){var r=h.validate(e,t);if(!r)throw new ValidationError(h.errorsText())}var _=r(192),o=r(198),s=r(314),ValidationError=r(277).ValidationError,a=r(249),c=a.isValidAddress,u=r(195),f=u.isValidSecret,h=n();e.exports={schemaValidate:i,isValidSecret:f}},function(e,t,r){"use strict";function n(e){return d.test(e)}function i(e){function t(e,t){var r;if("string"==typeof e){if(r=b(e),!r)throw new Error('no schema with key or ref "'+e+'"')}else{var n=x(e);r=n.validate||E(n)}var i=r(t);return R.errors=r.errors,i}function l(e){var t=x(e);return t.validate||E(t)}function p(e,t){var r;try{r=x(e)}catch(n){return void setTimeout(function(){t(n)})}if(r.validate)setTimeout(function(){t(null,r.validate)});else{if("function"!=typeof R.opts.loadSchema)throw new Error("options.loadSchema should be a function");g(e,t,!0)}}function g(e,t,r){function n(r){function n(r,n){if(r)t(r);else{if(!R._refs[i]&&!R._schemas[i])try{m(n,i)}catch(o){return void t(o)}g(e,t)}}var i=r.missingSchema;if(R._refs[i]||R._schemas[i])return t(new Error("Schema "+i+" is loaded but"+r.missingRef+"cannot be resolved"));var o=R._loadingSchemas[i];o?"function"==typeof o?R._loadingSchemas[i]=[o,n]:o[o.length]=n:(R._loadingSchemas[i]=n,R.opts.loadSchema(i,function(e,t){var r=R._loadingSchemas[i];if(delete R._loadingSchemas[i],"function"==typeof r)r(e,t);else for(var n=0;n<r.length;n++)r[n](e,t)}))}function i(e,n){r?setTimeout(function(){t(e,n)}):t(e,n)}var o;try{o=l(e)}catch(s){return void(s.missingSchema?n(s):i(s))}i(null,o)}function m(e,t,r,n){if(Array.isArray(e))for(var i=0;i<e.length;i++)m(e[i]);else{t=s.normalizeId(t||e.id),O(t);var o=R._schemas[t]=x(e,r);o.meta=n}}function v(e,t,r){m(e,t,r,!0)}function y(e){var r=e.$schema||h,i=R._formats.uri;R._formats.uri="function"==typeof i?n:d;var o=t(r,e);return R._formats.uri=i,o}function b(e){var t=w(e);switch(typeof t){case"object":return t.validate||E(t);case"string":return b(t)}}function w(e){return e=s.normalizeId(e),R._schemas[e]||R._refs[e]}function S(e){switch(typeof e){case"string":var t=w(e);R._cache.del(t.jsonStr),delete R._schemas[e],delete R._refs[e];break;case"object":var r=u(e);R._cache.del(r);var n=e.id;n&&(n=s.normalizeId(n),delete R._refs[n])}}function x(e,t){if("object"!=typeof e)throw new Error("schema should be object");var r=u(e),n=R._cache.get(r);if(n)return n;var i=s.normalizeId(e.id);i&&O(i);var o=t||R.opts.validateSchema===!1||y(e);if(!o){var a="schema is invalid:"+A();if("log"!=R.opts.validateSchema)throw new Error(a);console.error(a)}var f=s.ids.call(R,e),h=new c({id:i,schema:e,localRefs:f,jsonStr:r});return"#"!=i[0]&&(R._refs[i]=h),R._cache.put(r,h),h}function E(e,t){function r(){var t=e.validate,n=t.apply(null,arguments);return r.errors=t.errors,n}if(e.compiling)return e.validate=r,r.schema=e.schema,r.errors=null,r.root=t?t:r,r;e.compiling=!0;var n=R.opts.removeAdditional;n&&e.meta&&(R.opts.removeAdditional=!1);var i;try{i=o.call(R,e.schema,t,e.localRefs)}finally{e.compiling=!1,n&&(R.opts.removeAdditional=n)}return e.validate=i,e.refs=i.refs,e.refVal=i.refVal,e.root=i.root,i}function A(e,t){if(e=e||R.errors,!e)return"No errors";t=t||{};var r=t.separator||", ",n=t.dataVar||"data",i=e.reduce(function(e,t){return t?e+n+t.dataPath+" "+t.message+r:e},"");return i.slice(0,-r.length)}function P(e,t){"string"==typeof t&&(t=new RegExp(t)),R._formats[e]=t}function T(){if(R.opts.meta!==!1){var e=r(351);v(e,h,!0),R._refs["http://json-schema.org/schema"]=h}var t=R.opts.schemas;if(t)if(Array.isArray(t))m(t);else for(var n in t)m(t[n],n)}function I(){for(var e in R.opts.formats){var t=R.opts.formats[e];P(e,t)}}function O(e){if(R._schemas[e]||R._refs[e])throw new Error('schema with key or id "'+e+'" already exists')}if(!(this instanceof i))return new i(e);var R=this;this.opts=e||{},this._schemas={},this._refs={},this._formats=f(this.opts.format),this._cache=this.opts.cache||new a,this._loadingSchemas={},this.validate=t,this.compile=l,this.compileAsync=p,this.addSchema=m,this.addMetaSchema=v,this.validateSchema=y,this.getSchema=b,this.removeSchema=S,this.addFormat=P,this.errorsText=A,this._compile=E,T(),this.opts.formats&&I()}var o=r(315),s=r(316),a=r(349),c=r(323),u=r(319),f=r(350);e.exports=i;var h="http://json-schema.org/draft-04/schema",d=/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i},function(module,exports,__webpack_require__){"use strict";function compile(schema,root,localRefs,baseId){function localCompile(_schema,_root,localRefs,baseId){var isRoot=!_root||_root&&_root.schema==_schema;if(_root.schema!=root.schema)return compile.call(self,_schema,_root,localRefs,baseId);var validateCode=validateGenerator({isTop:!0,schema:_schema,isRoot:isRoot,baseId:baseId,root:_root,schemaPath:"",errorPath:'""',RULES:RULES,validate:validateGenerator,util:util,resolve:resolve,resolveRef:resolveRef,usePattern:usePattern,opts:self.opts,formats:formats});if(validateCode=refsCode(refVal)+patternsCode(patterns)+validateCode,self.opts.beautify){var opts=self.opts.beautify===!0?{indent_size:2}:self.opts.beautify;beautify?validateCode=beautify(validateCode,opts):console.error('"npm install js-beautify" to use beautify option')}var validate;return eval(validateCode),refVal[0]=validate,validate.schema=_schema,validate.errors=null,validate.refs=refs,validate.refVal=refVal,validate.root=isRoot?validate:_root,validate}function resolveRef(e,t,r){t=resolve.url(e,t);var n,i,o=refs[t];if(void 0!==o)return n=refVal[o],i="refVal["+o+"]",resolvedRef(n,i);if(!r){var s=root.refs[t];if(void 0!==s)return n=root.refVal[s],i=addLocalRef(t,n),resolvedRef(n,i)}i=addLocalRef(t);var a=resolve.call(self,localCompile,root,t);if(!a){var c=localRefs&&localRefs[t];c&&(a=resolve.inlineRef(c,self.opts.inlineRefs)?c:compile.call(self,c,root,localRefs,e))}return a?(replaceLocalRef(t,a),resolvedRef(a,i)):void 0}function addLocalRef(e,t){var r=refVal.length;return refVal[r]=t,refs[e]=r,"refVal"+r}function replaceLocalRef(e,t){var r=refs[e];refVal[r]=t}function resolvedRef(e,t){return"object"==typeof e?{schema:e,code:t}:t}function usePattern(e){var t=patternsHash[e];return void 0===t&&(t=patternsHash[e]=patterns.length,patterns[t]=e),"pattern"+t}var self=this,refVal=[void 0],refs={},patterns=[],patternsHash={};root=root||{schema:schema,refVal:refVal,refs:refs};var formats=this._formats;return localCompile(schema,root,localRefs,baseId)}function patternsCode(e){return _arrCode(e,patternCode)}function patternCode(e,t){return"var pattern"+e+" = new RegExp("+util.toQuotedString(t[e])+");"}function refsCode(e){return _arrCode(e,refCode)}function refCode(e,t){return t[e]?"var refVal"+e+" = refVal["+e+"];":""}function _arrCode(e,t){if(!e.length)return"";for(var r="",n=0;n<e.length;n++)r+=t(n,e);return r}var resolve=__webpack_require__(316),util=__webpack_require__(318),equal=__webpack_require__(317);try{var beautify=__webpack_require__(!function(){var e=new Error('Cannot find module "js-beautify"');throw e.code="MODULE_NOT_FOUND",e}()).js_beautify}catch(e){}var RULES=__webpack_require__(324),validateGenerator=__webpack_require__(348);module.exports=compile;var ucs2length=util.ucs2length},function(e,t,r){"use strict";function n(e,t,r){var o=this._refs[r];if("string"==typeof o){if(!this._refs[o])return n.call(this,e,t,o);o=this._refs[o]}if(o=o||this._schemas[r],o instanceof w)return a(o.schema,this.opts.inlineRefs)?o.schema:o.validate||this._compile(o);var s,c,u,f=i.call(this,t,r);return f&&(s=f.schema,t=f.root,u=f.baseId),s instanceof w?c=s.validate||e.call(this,s.schema,t,void 0,u):s&&(c=a(s,this.opts.inlineRefs)?s:e.call(this,s,t,void 0,u)),c}function i(e,t){var r=v.parse(t,!1,!0),n=l(r),i=d(e.schema.id);if(n!==i){var a=p(n),c=this._refs[a];if("string"==typeof c)return o.call(this,e,c,r);if(c instanceof w)c.validate||this._compile(c),e=c;else if(c=this._schemas[a],c instanceof w){if(c.validate||this._compile(c),a==p(t))return{schema:c,root:e,baseId:i};e=c}if(!e.schema)return;i=d(e.schema.id)}return s.call(this,r,i,e.schema,e)}function o(e,t,r){var n=i.call(this,e,t);if(n){var o=n.schema,a=n.baseId;return e=n.root,o.id&&(a=g(a,o.id)),s.call(this,r,a,o,e)}}function s(e,t,r,n){if(e.hash=e.hash||"","#/"==e.hash.slice(0,2)){for(var o=e.hash.split("/"),s=1;s<o.length;s++){var a=o[s];if(a){if(a=f(a),r=r[a],!r)break;if(r.id&&!S[a]&&(t=g(t,r.id)),r.$ref){var c=g(t,r.$ref),u=i.call(this,n,c);u&&(r=u.schema,n=u.root,t=u.baseId)}}}return r&&r!=n.schema?{schema:r,root:n,baseId:t}:void 0}}function a(e,t){return void 0===t?c(e):t?u(e)<=t:void 0}function c(e){var t;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if(t=e[r],"object"==typeof t&&!c(t))return!1}else for(var n in e){if("$ref"==n)return!1;if(t=e[n],"object"==typeof t&&!c(t))return!1}return!0}function u(e){var t,r=0;if(Array.isArray(e)){for(var n=0;n<e.length;n++)if(t=e[n],"object"==typeof t&&(r+=u(t)),r==1/0)return 1/0}else for(var i in e){if("$ref"==i)return 1/0;if(x[i])r++;else if(t=e[i],"object"==typeof t&&(r+=u(t)+1),r==1/0)return 1/0}return r}function f(e){return decodeURIComponent(e).replace(/~1/g,"/").replace(/~0/g,"~")}function h(e){return e=e.replace(/~/g,"~0").replace(/\//g,"~1"),encodeURIComponent(e)}function d(e,t){t!==!1&&(e=p(e));var r=v.parse(e,!1,!0);return l(r)}function l(e){return(e.protocol||"")+(e.protocol?"//":"")+(e.host||"")+(e.path||"")+"#"}function p(e){return e?e.replace(E,""):""}function g(e,t){return t=p(t),v.resolve(e,t)}function m(e){function t(e,r,i){if(Array.isArray(e))for(var o=0;o<e.length;o++)t.call(this,e[o],r+"/"+o,i);else if(e&&"object"==typeof e){if("string"==typeof e.id){var s=i=i?v.resolve(i,e.id):p(e.id),a=this._refs[s];if("string"==typeof a&&(a=this._refs[a]),a&&a.schema){if(!y(e,a.schema))throw new Error('id "'+s+'" resolves to more than one schema')}else if(s!=p(r))if("#"==s[0]){if(n[s]&&!y(e,n[s]))throw new Error('id "'+s+'" resolves to more than one schema');n[s]=e}else this._refs[s]=r}for(var c in e)t.call(this,e[c],r+"/"+h(c),i)}}var r=p(e.id),n={};return t.call(this,e,d(r,!1),r),n}var v=r(271),y=r(317),b=r(318),w=r(323);e.exports=n,n.normalizeId=p,n.fullPath=d,n.url=g,n.ids=m,n.inlineRef=a;var S=b.toHash(["properties","patternProperties","enum"]),x=b.toHash(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum"]),E=/#\/?$/},function(e,t){"use strict";e.exports=function r(e,t){if(e===t)return!0;var n,i=Array.isArray(e),o=Array.isArray(t);if(i&&o){if(e.length!=t.length)return!1;for(n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1;return!0}if(i!=o)return!1;if(e&&t&&"object"==typeof e&&"object"==typeof t){var s=Object.keys(e);if(s.length!==Object.keys(t).length)return!1;for(n=0;n<s.length;n++)if(void 0===t[s[n]])return!1;for(n=0;n<s.length;n++)if(!r(e[s[n]],t[s[n]]))return!1;return!0}return!1}},function(e,t,r){"use strict";function n(e,t){t=t||{};for(var r in e)t[r]=e[r];return t}function i(e,t,r){var n=r?" !== ":" === ",i=r?" || ":" && ",o=r?"!":"",s=r?"":"!";switch(e){case"null":return t+n+"null";case"array":return o+"Array.isArray("+t+")";case"object":return"("+o+t+i+"typeof "+t+n+'"object"'+i+s+"Array.isArray("+t+"))";case"integer":return"(typeof "+t+n+'"number"'+i+s+"("+t+" % 1))";default:return"typeof "+t+n+'"'+e+'"'}}function o(e,t){switch(e.length){case 1:return i(e[0],t,!0);default:var r="",n=s(e);n.array&&n.object&&(r=n["null"]?"(":"(!"+t+" || ",r+="typeof "+t+' !== "object")',delete n["null"],delete n.array,delete n.object),n.number&&delete n.integer;for(var o in n)r+=(r?" && ":"")+i(o,t,!0);return r}}function s(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!0;return t}function a(e){return b.test(e)?"."+e:"['"+e.replace(w,"\\$&")+"']"}function c(e){return e.replace(w,"\\$&")}function u(e){for(var t,r=0,n=e.length,i=0;n>i;)r++,t=e.charCodeAt(i++),t>=55296&&56319>=t&&n>i&&(t=e.charCodeAt(i),56320==(64512&t)&&i++);return r}function f(e,t){t+="[^0-9]";var r=e.match(new RegExp(t,"g"));return r?r.length:0}function h(e,t,r){return t+="([^0-9])",e.replace(new RegExp(t,"g"),r+"$1")}function d(e){return e.replace(S,"").replace(x,"").replace(E,"if (!($1))")}function l(e){var t=e.match(A);return t&&2===t.length?e.replace(P,"").replace(T,I):e}function p(e,t){for(var r in e)if(t[r])return!0}function g(e){return"'"+c(e)+"'"}function m(e,t,r,n){var i=r?"'/' + "+t+(n?"":".replace(/~/g, '~0').replace(/\\//g, '~1')"):n?"'[' + "+t+" + ']'":"'[\\'' + "+t+" + '\\']'";return y(e,i)}function v(e,t,r){var n=g(r?"/"+t.replace(/~/g,"~0").replace(/\//g,"~1"):a(t));return y(e,n)}function y(e,t){return'""'==e?t:(e+" + "+t).replace(/' \+ '/g,"")}e.exports={copy:n,checkDataType:i,checkDataTypes:o,toHash:s,getProperty:a,escapeQuotes:c,ucs2length:u,varOccurences:f,varReplace:h,cleanUpCode:d,cleanUpVarErrors:l,schemaHasRules:p,stableStringify:r(319),toQuotedString:g,getPathExpr:m,getPath:v};var b=/^[a-z$_][a-z$_0-9]*$/i,w=/'|\\/g,S=/else\s*{\s*}/g,x=/if\s*\([^)]+\)\s*\{\s*\}(?!\s*else)/g,E=/if\s*\(([^)]+)\)\s*\{\s*\}\s*else(?!\s*if)/g,A=/[^v\.]errors/g,P=/var errors = 0;|var vErrors = null;|validate.errors = vErrors;/g,T="return errors === 0;",I="validate.errors = null; return true;"},function(e,t,r){var n="undefined"!=typeof JSON?JSON:r(320);e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r=t.space||"";"number"==typeof r&&(r=Array(r+1).join(" "));var s="boolean"==typeof t.cycles?t.cycles:!1,a=t.replacer||function(e,t){return t},c=t.cmp&&function(e){return function(t){return function(r,n){var i={key:r,value:t[r]},o={key:n,value:t[n]};return e(i,o)}}}(t.cmp),u=[];return function f(e,t,h,d){var l=r?"\n"+new Array(d+1).join(r):"",p=r?": ":":";if(h&&h.toJSON&&"function"==typeof h.toJSON&&(h=h.toJSON()),h=a.call(e,t,h),void 0!==h){if("object"!=typeof h||null===h)return n.stringify(h);if(i(h)){for(var g=[],m=0;m<h.length;m++){var v=f(h,m,h[m],d+1)||n.stringify(null);g.push(l+r+v)}return"["+g.join(",")+l+"]"}if(-1!==u.indexOf(h)){if(s)return n.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}u.push(h);for(var y=o(h).sort(c&&c(h)),g=[],m=0;m<y.length;m++){var t=y[m],b=f(h,t,h[t],d+1);if(b){var w=n.stringify(t)+p+b;g.push(l+r+w)}}return"{"+g.join(",")+l+"}"}}({"":e},"",e,0)};var i=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},o=Object.keys||function(e){var t=Object.prototype.hasOwnProperty||function(){return!0},r=[];for(var n in e)t.call(e,n)&&r.push(n);return r}},function(e,t,r){t.parse=r(321),t.stringify=r(322)},function(e,t){var r,n,i,o,s={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"	"},a=function(e){throw{name:"SyntaxError",message:e,at:r,text:i}},c=function(e){return e&&e!==n&&a("Expected '"+e+"' instead of '"+n+"'"),n=i.charAt(r),r+=1,n},u=function(){var e,t="";for("-"===n&&(t="-",c("-"));n>="0"&&"9">=n;)t+=n,c();if("."===n)for(t+=".";c()&&n>="0"&&"9">=n;)t+=n;if("e"===n||"E"===n)for(t+=n,c(),"-"!==n&&"+"!==n||(t+=n,c());n>="0"&&"9">=n;)t+=n,c();return e=+t,isFinite(e)?e:void a("Bad number")},f=function(){var e,t,r,i="";if('"'===n)for(;c();){if('"'===n)return c(),i;if("\\"===n)if(c(),"u"===n){for(r=0,t=0;4>t&&(e=parseInt(c(),16),isFinite(e));t+=1)r=16*r+e;i+=String.fromCharCode(r)}else{if("string"!=typeof s[n])break;i+=s[n]}else i+=n}a("Bad string")},h=function(){for(;n&&" ">=n;)c()},d=function(){switch(n){case"t":return c("t"),c("r"),c("u"),c("e"),!0;case"f":return c("f"),c("a"),c("l"),c("s"),c("e"),!1;case"n":return c("n"),c("u"),c("l"),c("l"),null}a("Unexpected '"+n+"'")},l=function(){var e=[];if("["===n){if(c("["),h(),"]"===n)return c("]"),e;for(;n;){if(e.push(o()),h(),"]"===n)return c("]"),e;c(","),h()}}a("Bad array")},p=function(){var e,t={};if("{"===n){if(c("{"),h(),"}"===n)return c("}"),t;for(;n;){if(e=f(),h(),c(":"),Object.hasOwnProperty.call(t,e)&&a('Duplicate key "'+e+'"'),t[e]=o(),h(),"}"===n)return c("}"),t;c(","),h()}}a("Bad object")};o=function(){switch(h(),n){case"{":return p();case"[":return l();case'"':return f();case"-":return u();default:return n>="0"&&"9">=n?u():d()}},e.exports=function(e,t){var s;return i=e,r=0,n=" ",s=o(),h(),n&&a("Syntax error"),"function"==typeof t?function c(e,r){var n,i,o=e[r];if(o&&"object"==typeof o)for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(i=c(o,n),void 0!==i?o[n]=i:delete o[n]);return t.call(e,r,o)}({"":s},""):s}},function(e,t){function r(e){return a.lastIndex=0,a.test(e)?'"'+e.replace(a,function(e){var t=c[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function n(e,t){var a,c,u,f,h,d=i,l=t[e];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(e)),"function"==typeof s&&(l=s.call(t,e,l)),typeof l){case"string":return r(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(i+=o,h=[],"[object Array]"===Object.prototype.toString.apply(l)){for(f=l.length,a=0;f>a;a+=1)h[a]=n(a,l)||"null";return u=0===h.length?"[]":i?"[\n"+i+h.join(",\n"+i)+"\n"+d+"]":"["+h.join(",")+"]",i=d,u}if(s&&"object"==typeof s)for(f=s.length,a=0;f>a;a+=1)c=s[a],"string"==typeof c&&(u=n(c,l),u&&h.push(r(c)+(i?": ":":")+u));else for(c in l)Object.prototype.hasOwnProperty.call(l,c)&&(u=n(c,l),u&&h.push(r(c)+(i?": ":":")+u));return u=0===h.length?"{}":i?"{\n"+i+h.join(",\n"+i)+"\n"+d+"}":"{"+h.join(",")+"}",i=d,u}}var i,o,s,a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,c={"\b":"\\b","	":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};e.exports=function(e,t,r){var a;if(i="",o="","number"==typeof r)for(a=0;r>a;a+=1)o+=" ";else"string"==typeof r&&(o=r);if(s=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return n("",{"":e})}},function(e,t,r){"use strict";function n(e){i.copy(e,this)}var i=r(318);e.exports=n},function(e,t,r){"use strict";var n=r(325),i=r(318),o=e.exports=[{type:"number",rules:["maximum","minimum","multipleOf"]},{type:"string",rules:["maxLength","minLength","pattern","format"]},{type:"array",rules:["maxItems","minItems","uniqueItems","items"]},{type:"object",rules:["maxProperties","minProperties","required","dependencies","properties"]},{rules:["$ref","enum","not","anyOf","oneOf","allOf"]}];o.all=["type","additionalProperties","patternProperties"],o.forEach(function(e){e.rules=e.rules.map(function(e){return o.all.push(e),{keyword:e,code:n[e]}})}),o.all=i.toHash(o.all)},function(e,t,r){"use strict";e.exports={$ref:r(326),anyOf:r(327),format:r(328),maxLength:r(329),minItems:r(330),minimum:r(331),oneOf:r(332),required:r(333),dependencies:r(334),items:r(335),maxProperties:r(336),minLength:r(337),multipleOf:r(338),pattern:r(339),uniqueItems:r(340),allOf:r(341),"enum":r(342),maxItems:r(343),maximum:r(344),minProperties:r(345),not:r(346),properties:r(347),validate:r(348)}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=(e.level,e.dataLevel),n=e.schema.$ref,i=(e.schemaPath+".$ref",!e.opts.allErrors),o="data"+(r||"");if("#"==n||"#/"==n)e.isRoot?(t+="  if (! validate("+o+", (dataPath || '')",'""'!=e.errorPath&&(t+=" + "+e.errorPath),t+=") ) { if (vErrors === null) vErrors = validate.errors; else vErrors = vErrors.concat(validate.errors); errors = vErrors.length; } ",i&&(t+=" else { ")):(t+="  if (! root.refVal[0]("+o+", (dataPath || '')",'""'!=e.errorPath&&(t+=" + "+e.errorPath),t+=") ) { if (vErrors === null) vErrors = root.refVal[0].errors; else vErrors = vErrors.concat(root.refVal[0].errors); errors = vErrors.length; } ",i&&(t+=" else { "));else{var s=e.resolveRef(e.baseId,n,e.isRoot);if(void 0===s){var a="can't resolve reference "+n+" from id "+e.baseId;if("fail"==e.opts.missingRefs)console.log(a),!e.compositeRule&&i?(t+=" validate.errors = [ { keyword: '$ref', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(n)+"' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+e.util.toQuotedString(n)+" "),e.opts.verbose&&(t+=" , data: "+o+" "),e.opts.i18n&&(t+=", params: { escaped: '"+e.util.escapeQuotes(n)+"' }"),t+=" }]; return false; "):(t+="  var err =   { keyword: '$ref', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(n)+"' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+e.util.toQuotedString(n)+" "),e.opts.verbose&&(t+=" , data: "+o+" "),e.opts.i18n&&(t+=", params: { escaped: '"+e.util.escapeQuotes(n)+"' }"),t+=" }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),i&&(t+=" if (false) { ");else{if("ignore"!=e.opts.missingRefs){var c=new Error(a);throw c.missingRef=e.resolve.url(e.baseId,n),c.missingSchema=e.resolve.normalizeId(e.resolve.fullPath(c.missingRef)),c}console.log(a),i&&(t+=" if (true) { ")}}else if("string"==typeof s)t+="  if (! "+s+"("+o+", (dataPath || '')",'""'!=e.errorPath&&(t+=" + "+e.errorPath),t+=") ) { if (vErrors === null) vErrors = "+s+".errors; else vErrors = vErrors.concat("+s+".errors); errors = vErrors.length; } ",i&&(t+=" else { ");else{var u=e.util.copy(e);u.level++,u.schema=s.schema,u.schemaPath="";var f=e.validate(u);t+=/validate\.schema/.test(f)?" var rootSchema"+u.level+" = validate.schema; validate.schema = "+s.code+"; "+f+" validate.schema = rootSchema"+u.level+"; ":" "+f+" ",i&&(t+=" if (valid"+u.level+") { ")}}return t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=e.level,n=e.dataLevel,i=e.schema.anyOf,o=e.schemaPath+".anyOf",s=!e.opts.allErrors,a="data"+(n||""),c="valid"+r,u="errs"+r,f=e.util.copy(e),h="";f.level++;var d=i.every(function(t){return e.util.schemaHasRules(t,e.RULES.all)});if(d){t+=" var "+u+" = errors; var "+c+" = false;  ";var l=e.compositeRule;e.compositeRule=f.compositeRule=!0;var p=i;if(p)for(var g,m=-1,v=p.length-1;v>m;)g=p[m+=1],f.schema=g,f.schemaPath=o+"["+m+"]",t+=" "+e.validate(f)+" "+c+" = "+c+" || valid"+f.level+"; if (!"+c+") { ",h+="}";e.compositeRule=f.compositeRule=l,t+=" "+h+" if (!"+c+") {  var err =   { keyword: 'anyOf', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should match some schema in anyOf' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+o+" "),e.opts.verbose&&(t+=" , data: "+a+" "),t+="  }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } ",e.opts.allErrors&&(t+=" } "),t=e.util.cleanUpCode(t)}else s&&(t+=" if (true) { ");return t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=(e.level,e.dataLevel),n=e.schema.format,i=(e.schemaPath+".format",!e.opts.allErrors),o="data"+(r||""),s=e.formats[n];return e.opts.format!==!1&&s?(t+=" if (!   ",t+="function"==typeof s?" formats"+e.util.getProperty(n)+" ("+o+") ":" formats"+e.util.getProperty(n)+" .test("+o+") ",t+=") {  ",!e.compositeRule&&i?(t+=" validate.errors = [ { keyword: 'format', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should match format "+e.util.escapeQuotes(n)+"' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+e.util.toQuotedString(n)+" "),e.opts.verbose&&(t+=" , data: "+o+" "),e.opts.i18n&&(t+=", params: { escaped: '"+e.util.escapeQuotes(n)+"' }"),t+=" }]; return false; "):(t+="  var err =   { keyword: 'format', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should match format "+e.util.escapeQuotes(n)+"' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+e.util.toQuotedString(n)+" "),e.opts.verbose&&(t+=" , data: "+o+" "),e.opts.i18n&&(t+=", params: { escaped: '"+e.util.escapeQuotes(n)+"' }"),t+=" }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+=" } ",i&&(t+=" else { ")):i&&(t+=" if (true) { "),t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=(e.level,e.dataLevel),n=e.schema.maxLength,i=(e.schemaPath+".maxLength",!e.opts.allErrors),o="data"+(r||"");return t+="if ( ",t+=e.opts.unicode===!1?" "+o+".length ":" ucs2length("+o+") ",t+=" > "+n+") {  ",!e.compositeRule&&i?(t+=" validate.errors = [ { keyword: 'maxLength', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT be longer than "+n+" characters' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+n+" "),e.opts.verbose&&(t+=" , data: "+o+" "),t+="  }]; return false; "):(t+="  var err =   { keyword: 'maxLength', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT be longer than "+n+" characters' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+n+" "),e.opts.verbose&&(t+=" , data: "+o+" "),t+="  }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+="} ",i&&(t+=" else { "),t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=(e.level,e.dataLevel),n=e.schema.minItems,i=(e.schemaPath+".minItems",!e.opts.allErrors),o="data"+(r||"");return t+="if ("+o+".length < "+n+") {  ",!e.compositeRule&&i?(t+=" validate.errors = [ { keyword: 'minItems', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT have less than "+n+" items' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+n+" "),e.opts.verbose&&(t+=" , data: "+o+" "),t+="  }]; return false; "):(t+="  var err =   { keyword: 'minItems', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT have less than "+n+" items' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+n+" "),e.opts.verbose&&(t+=" , data: "+o+" "),t+="  }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+="} ",i&&(t+=" else { "),t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=(e.level,e.dataLevel),n=e.schema.minimum,i=(e.schemaPath+".minimum",!e.opts.allErrors),o="data"+(r||""),s=e.schema.exclusiveMinimum===!0,a=s?">":">=",c=s?"<=":"<";return t+="if ("+o+" "+c+" "+n+") {  ",!e.compositeRule&&i?(t+=" validate.errors = [ { keyword: 'minimum', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should be "+a+" "+n+"' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+n+" "),e.opts.verbose&&(t+=" , data: "+o+" "),e.opts.i18n&&(t+=", params: { condition: '"+a+" "+n+"' }"),
  t+=" }]; return false; "):(t+="  var err =   { keyword: 'minimum', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should be "+a+" "+n+"' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+n+" "),e.opts.verbose&&(t+=" , data: "+o+" "),e.opts.i18n&&(t+=", params: { condition: '"+a+" "+n+"' }"),t+=" }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+="} ",i&&(t+=" else { "),t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=e.level,n=e.dataLevel,i=e.schema.oneOf,o=e.schemaPath+".oneOf",s=!e.opts.allErrors,a="data"+(n||""),c="valid"+r,u="errs"+r,f=e.util.copy(e),h="";f.level++,t+="var "+u+" = errors;var prevValid"+r+" = false;var "+c+" = false; ";var d=e.compositeRule;e.compositeRule=f.compositeRule=!0;var l=i;if(l)for(var p,g=-1,m=l.length-1;m>g;)p=l[g+=1],e.util.schemaHasRules(p,e.RULES.all)?(f.schema=p,f.schemaPath=o+"["+g+"]",t+=" "+e.validate(f)+" "):t+=" var valid"+f.level+" = true; ",g&&(t+=" if (valid"+f.level+" && prevValid"+r+") "+c+" = false; else { ",h+="}"),t+=" if (valid"+f.level+") "+c+" = prevValid"+r+" = true;";return e.compositeRule=f.compositeRule=d,t+=""+h+"if (!"+c+") {  ",!e.compositeRule&&s?(t+=" validate.errors = [ { keyword: 'oneOf', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should match exactly one schema in oneOf' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+o+" "),e.opts.verbose&&(t+=" , data: "+a+" "),t+="  }]; return false; "):(t+="  var err =   { keyword: 'oneOf', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should match exactly one schema in oneOf' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+o+" "),e.opts.verbose&&(t+=" , data: "+a+" "),t+="  }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+="} else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; }",e.opts.allErrors&&(t+=" } "),t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=e.level,n=e.dataLevel,i=e.schema.required,o=e.schemaPath+".required",s=!e.opts.allErrors,a="data"+(n||""),c="valid"+r;if(e.schema.properties&&Object.keys(e.schema.properties).length){var u=[],f=i;if(f)for(var h,d=-1,l=f.length-1;l>d;){h=f[d+=1];var p=e.schema.properties[h];p&&e.util.schemaHasRules(p,e.RULES.all)||(u[u.length]=h)}}else var u=i;if(u.length){var g=e.errorPath;if(s)if(t+=" var missing"+r+"; ",u.length<=20){t+=" if ( ";var m=u;if(m)for(var h,v=-1,y=m.length-1;y>v;){h=m[v+=1],v&&(t+=" || ");var b=e.util.getProperty(h);t+=" ( "+a+b+" === undefined && (missing"+r+" = "+e.util.toQuotedString(e.opts.jsonPointers?h:b)+") ) "}t+=") { ";var w="missing"+r,S="' + "+w+" + '";e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(g,w,!0):g+" + "+w,!e.compositeRule&&s?(t+=" validate.errors = [ { keyword: 'required', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'is a required property' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+o+" "),e.opts.verbose&&(t+=" , data: "+a+" "),e.opts.i18n&&(t+=", params: { missingProperty: '"+S+"' }"),t+=" }]; return false; "):(t+="  var err =   { keyword: 'required', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'is a required property' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+o+" "),e.opts.verbose&&(t+=" , data: "+a+" "),e.opts.i18n&&(t+=", params: { missingProperty: '"+S+"' }"),t+=" }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+=" } else { "}else{t+="  var schema"+r+" = validate.schema"+o+"; ";var v="i"+r,w="schema"+r+"["+v+"]",S="' + \"'\" + "+w+" + \"'\" + '";e.errorPath=e.util.getPathExpr(g,w,e.opts.jsonPointers),t+=" for (var "+v+" = 0; "+v+" < schema"+r+".length; "+v+"++) { var "+c+" = "+a+"[schema"+r+"["+v+"]] !== undefined; if (!"+c+") break; }  if (!"+c+") {  ",!e.compositeRule&&s?(t+=" validate.errors = [ { keyword: 'required', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'is a required property' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+o+" "),e.opts.verbose&&(t+=" , data: "+a+" "),e.opts.i18n&&(t+=", params: { missingProperty: '"+S+"' }"),t+=" }]; return false; "):(t+="  var err =   { keyword: 'required', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'is a required property' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+o+" "),e.opts.verbose&&(t+=" , data: "+a+" "),e.opts.i18n&&(t+=", params: { missingProperty: '"+S+"' }"),t+=" }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+=" } else { "}else if(u.length<=20){var x=u;if(x)for(var h,v=-1,E=x.length-1;E>v;){h=x[v+=1];var b=e.util.getProperty(h),S=e.util.escapeQuotes(b);e.errorPath=e.util.getPath(g,h,e.opts.jsonPointers),t+=" if ("+a+b+" === undefined) {  var err =   { keyword: 'required', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'is a required property' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+o+" "),e.opts.verbose&&(t+=" , data: "+a+" "),e.opts.i18n&&(t+=", params: { missingProperty: '"+S+"' }"),t+=" }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } "}}else{t+="  var schema"+r+" = validate.schema"+o+"; ";var v="i"+r,w="schema"+r+"["+v+"]",S="' + \"'\" + "+w+" + \"'\" + '";e.errorPath=e.util.getPathExpr(g,w,e.opts.jsonPointers),t+=" for (var "+v+" = 0; "+v+" < schema"+r+".length; "+v+"++) { if ("+a+"[schema"+r+"["+v+"]] === undefined) {  var err =   { keyword: 'required', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'is a required property' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+o+" "),e.opts.verbose&&(t+=" , data: "+a+" "),e.opts.i18n&&(t+=", params: { missingProperty: '"+S+"' }"),t+=" }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } "}e.errorPath=g}else s&&(t+=" if (true) {");return t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=e.level,n=e.dataLevel,i=e.schema.dependencies,o=e.schemaPath+".dependencies",s=!e.opts.allErrors,a="data"+(n||""),c="errs"+r,u=e.util.copy(e),f="";u.level++;var h={},d={};for(g in i){var l=i[g],p=Array.isArray(l)?d:h;p[g]=l}t+="var "+c+" = errors;";for(var g in d){t+=" if ("+a+e.util.getProperty(g)+" !== undefined) { ",p=d[g],t+=" if ( ";var m=p;if(m)for(var v,y=-1,b=m.length-1;b>y;)v=m[y+=1],y&&(t+=" || "),t+=" "+a+e.util.getProperty(v)+" === undefined ";t+=") {  ",!e.compositeRule&&s?(t+=" validate.errors = [ { keyword: 'dependencies', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should have ",t+=1==p.length?"property "+e.util.escapeQuotes(p[0]):"properties "+e.util.escapeQuotes(p.join(", ")),t+=" when property "+e.util.escapeQuotes(g)+" is present' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+o+" "),e.opts.verbose&&(t+=" , data: "+a+" "),e.opts.i18n&&(t+=", params: { n: "+p.length+", deps: '",t+=1==p.length?""+e.util.escapeQuotes(p[0]):""+e.util.escapeQuotes(p.join(", ")),t+="', property: '"+e.util.escapeQuotes(g)+"' }"),t+=" }]; return false; "):(t+="  var err =   { keyword: 'dependencies', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should have ",t+=1==p.length?"property "+e.util.escapeQuotes(p[0]):"properties "+e.util.escapeQuotes(p.join(", ")),t+=" when property "+e.util.escapeQuotes(g)+" is present' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+o+" "),e.opts.verbose&&(t+=" , data: "+a+" "),e.opts.i18n&&(t+=", params: { n: "+p.length+", deps: '",t+=1==p.length?""+e.util.escapeQuotes(p[0]):""+e.util.escapeQuotes(p.join(", ")),t+="', property: '"+e.util.escapeQuotes(g)+"' }"),t+=" }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+=" }   ",s&&(f+="}",t+=" else { "),t+=" }"}for(var g in h){var l=h[g];e.util.schemaHasRules(l,e.RULES.all)&&(t+=" valid"+u.level+" = true; if ("+a+"['"+g+"'] !== undefined) { ",u.schema=l,u.schemaPath=o+e.util.getProperty(g),t+=" "+e.validate(u)+" }  ",s&&(t+=" if (valid"+u.level+") { ",f+="}"))}return s&&(t+="   "+f+" if ("+c+" == errors) {"),t=e.util.cleanUpCode(t)}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=e.level,n=e.dataLevel,i=e.schema.items,o=e.schemaPath+".items",s=!e.opts.allErrors,a="data"+(n||""),c="valid"+r,u="errs"+r,f=e.util.copy(e),h="";f.level++;var d=f.dataLevel=e.dataLevel+1,l="data"+d;if(t+="var "+u+" = errors;var "+c+";",Array.isArray(i)){var p=e.schema.additionalItems;p===!1&&(t+=" "+c+" = "+a+".length <= "+i.length+";  if (!"+c+") {  ",!e.compositeRule&&s?(t+=" validate.errors = [ { keyword: 'additionalItems', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT have more than "+i.length+" items' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: false "),e.opts.verbose&&(t+=" , data: "+a+" "),t+="  }]; return false; "):(t+="  var err =   { keyword: 'additionalItems', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT have more than "+i.length+" items' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: false "),e.opts.verbose&&(t+=" , data: "+a+" "),t+="  }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+=" }  ",s&&(h+="}",t+=" else { "));var g=i;if(g)for(var m,v=-1,y=g.length-1;y>v;)if(m=g[v+=1],e.util.schemaHasRules(m,e.RULES.all)){t+=" valid"+f.level+" = true; if ("+a+".length > "+v+") { ",f.schema=m,f.schemaPath=o+"["+v+"]",f.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);var b=a+"["+v+"]",w=e.validate(f);t+=e.util.varOccurences(w,l)<2?" "+e.util.varReplace(w,l,b)+" ":" var "+l+" = "+b+"; "+w+" ",t+=" }  ",s&&(t+=" if (valid"+f.level+") { ",h+="}")}if("object"==typeof p&&e.util.schemaHasRules(p,e.RULES.all)){f.schema=p,f.schemaPath=e.schemaPath+".additionalItems",t+=" valid"+f.level+" = true; if ("+a+".length > "+i.length+") {  for (var i"+r+" = "+i.length+"; i"+r+" < "+a+".length; i"+r+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,"i"+r,e.opts.jsonPointers,!0);var b=a+"[i"+r+"]",w=e.validate(f);t+=e.util.varOccurences(w,l)<2?" "+e.util.varReplace(w,l,b)+" ":" var "+l+" = "+b+"; "+w+" ",s&&(t+=" if (!valid"+f.level+") break; "),t+=" } }  ",s&&(t+=" if (valid"+f.level+") { ",h+="}")}}else if(e.util.schemaHasRules(i,e.RULES.all)){f.schema=i,f.schemaPath=o,t+="  for (var i"+r+" = 0; i"+r+" < "+a+".length; i"+r+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,"i"+r,e.opts.jsonPointers,!0);var b=a+"[i"+r+"]",w=e.validate(f);t+=e.util.varOccurences(w,l)<2?" "+e.util.varReplace(w,l,b)+" ":" var "+l+" = "+b+"; "+w+" ",s&&(t+=" if (!valid"+f.level+") break; "),t+=" }  ",s&&(t+=" if (valid"+f.level+") { ",h+="}")}return s&&(t+=" "+h+" if ("+u+" == errors) {"),t=e.util.cleanUpCode(t)}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=(e.level,e.dataLevel),n=e.schema.maxProperties,i=(e.schemaPath+".maxProperties",!e.opts.allErrors),o="data"+(r||"");return t+="if (Object.keys("+o+").length > "+n+") {  ",!e.compositeRule&&i?(t+=" validate.errors = [ { keyword: 'maxProperties', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT have more than "+n+" properties' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+n+" "),e.opts.verbose&&(t+=" , data: "+o+" "),t+="  }]; return false; "):(t+="  var err =   { keyword: 'maxProperties', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT have more than "+n+" properties' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+n+" "),e.opts.verbose&&(t+=" , data: "+o+" "),t+="  }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+="} ",i&&(t+=" else { "),t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=(e.level,e.dataLevel),n=e.schema.minLength,i=(e.schemaPath+".minLength",!e.opts.allErrors),o="data"+(r||"");return t+="if ( ",t+=e.opts.unicode===!1?" "+o+".length ":" ucs2length("+o+") ",t+=" < "+n+") {  ",!e.compositeRule&&i?(t+=" validate.errors = [ { keyword: 'minLength', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT be shorter than "+n+" characters' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+n+" "),e.opts.verbose&&(t+=" , data: "+o+" "),t+="  }]; return false; "):(t+="  var err =   { keyword: 'minLength', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT be shorter than "+n+" characters' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+n+" "),e.opts.verbose&&(t+=" , data: "+o+" "),t+="  }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+="} ",i&&(t+=" else { "),t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=e.level,n=e.dataLevel,i=e.schema.multipleOf,o=(e.schemaPath+".multipleOf",!e.opts.allErrors),s="data"+(n||"");return t+="var division"+r+" = "+s+" / "+i+";if ("+s+" / "+i+" !== parseInt(division"+r+")) {  ",!e.compositeRule&&o?(t+=" validate.errors = [ { keyword: 'multipleOf', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should be multiple of "+i+"' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+i+" "),e.opts.verbose&&(t+=" , data: "+s+" "),t+="  }]; return false; "):(t+="  var err =   { keyword: 'multipleOf', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should be multiple of "+i+"' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+i+" "),e.opts.verbose&&(t+=" , data: "+s+" "),t+="  }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+="} ",o&&(t+=" else { "),t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=(e.level,e.dataLevel),n=e.schema.pattern,i=(e.schemaPath+".pattern",!e.opts.allErrors),o="data"+(r||"");return new RegExp(n),t+="if (! "+e.usePattern(n)+".test("+o+") ) {  ",!e.compositeRule&&i?(t+=" validate.errors = [ { keyword: 'pattern', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should match pattern \""+e.util.escapeQuotes(n)+"\"' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+e.util.toQuotedString(n)+" "),e.opts.verbose&&(t+=" , data: "+o+" "),e.opts.i18n&&(t+=", params: { escaped: '"+e.util.escapeQuotes(n)+"' }"),t+=" }]; return false; "):(t+="  var err =   { keyword: 'pattern', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should match pattern \""+e.util.escapeQuotes(n)+"\"' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+e.util.toQuotedString(n)+" "),e.opts.verbose&&(t+=" , data: "+o+" "),e.opts.i18n&&(t+=", params: { escaped: '"+e.util.escapeQuotes(n)+"' }"),t+=" }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+="} ",i&&(t+=" else { "),t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=e.level,n=e.dataLevel,i=e.schema.uniqueItems,o=(e.schemaPath+".uniqueItems",!e.opts.allErrors),s="data"+(n||""),a="valid"+r;return i&&e.opts.uniqueItems!==!1?(t+=" var "+a+" = true; if ("+s+".length > 1) { var i = "+s+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+s+"[i], "+s+"[j])) { "+a+" = false; break outer; } } } } if (!"+a+") {  ",!e.compositeRule&&o?(t+=" validate.errors = [ { keyword: 'uniqueItems', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+i+" "),e.opts.verbose&&(t+=" , data: "+s+" "),e.opts.i18n&&(t+=", params: { i: i, j: j }"),t+=" }]; return false; "):(t+="  var err =   { keyword: 'uniqueItems', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+i+" "),e.opts.verbose&&(t+=" , data: "+s+" "),e.opts.i18n&&(t+=", params: { i: i, j: j }"),t+=" }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+=" } ",o&&(t+=" else { ")):o&&(t+=" if (true) { "),t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=(e.level,e.dataLevel,e.schema.allOf),n=e.schemaPath+".allOf",i=!e.opts.allErrors,o=e.util.copy(e),s="";o.level++;var a=r;if(a)for(var c,u=-1,f=a.length-1;f>u;)c=a[u+=1],e.util.schemaHasRules(c,e.RULES.all)&&(o.schema=c,o.schemaPath=n+"["+u+"]",t+=" "+e.validate(o)+" ",i&&(t+=" if (valid"+o.level+") { ",s+="}"));return i&&(t+=" "+s.slice(0,-1)),t=e.util.cleanUpCode(t)}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=e.level,n=e.dataLevel,i=(e.schema["enum"],e.schemaPath+".enum"),o=!e.opts.allErrors,s="data"+(n||""),a="valid"+r,c="i"+r;return t+="var enumSchema"+r+" = validate.schema"+i+" , "+a+" = false;for (var "+c+"=0; "+c+"<enumSchema"+r+".length; "+c+"++) if (equal("+s+", enumSchema"+r+"["+c+"])) { "+a+" = true; break; } if (!"+a+") {  ",!e.compositeRule&&o?(t+=" validate.errors = [ { keyword: 'enum', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should be equal to one of values' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+i+" "),e.opts.verbose&&(t+=" , data: "+s+" "),t+="  }]; return false; "):(t+="  var err =   { keyword: 'enum', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should be equal to one of values' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+i+" "),e.opts.verbose&&(t+=" , data: "+s+" "),t+="  }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+=" }",o&&(t+=" else { "),t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=(e.level,e.dataLevel),n=e.schema.maxItems,i=(e.schemaPath+".maxItems",!e.opts.allErrors),o="data"+(r||"");return t+="if ("+o+".length > "+n+") {  ",!e.compositeRule&&i?(t+=" validate.errors = [ { keyword: 'maxItems', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT have more than "+n+" items' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+n+" "),e.opts.verbose&&(t+=" , data: "+o+" "),t+="  }]; return false; "):(t+="  var err =   { keyword: 'maxItems', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT have more than "+n+" items' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+n+" "),e.opts.verbose&&(t+=" , data: "+o+" "),t+="  }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+="} ",i&&(t+=" else { "),t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=(e.level,e.dataLevel),n=e.schema.maximum,i=(e.schemaPath+".maximum",!e.opts.allErrors),o="data"+(r||""),s=e.schema.exclusiveMaximum===!0,a=s?"<":"<=",c=s?">=":">";return t+="if ("+o+" "+c+" "+n+") {  ",!e.compositeRule&&i?(t+=" validate.errors = [ { keyword: 'maximum', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should be "+a+" "+n+"' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+n+" "),e.opts.verbose&&(t+=" , data: "+o+" "),e.opts.i18n&&(t+=", params: { condition: '"+a+" "+n+"' }"),t+=" }]; return false; "):(t+="  var err =   { keyword: 'maximum', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should be "+a+" "+n+"' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+n+" "),e.opts.verbose&&(t+=" , data: "+o+" "),e.opts.i18n&&(t+=", params: { condition: '"+a+" "+n+"' }"),t+=" }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+="} ",i&&(t+=" else { "),t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=(e.level,e.dataLevel),n=e.schema.minProperties,i=(e.schemaPath+".minProperties",!e.opts.allErrors),o="data"+(r||"");return t+="if (Object.keys("+o+").length < "+n+") {  ",!e.compositeRule&&i?(t+=" validate.errors = [ { keyword: 'minProperties', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT have less than "+n+" properties' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+n+" "),e.opts.verbose&&(t+=" , data: "+o+" "),t+="  }]; return false; "):(t+="  var err =   { keyword: 'minProperties', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT have less than "+n+" properties' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: "+n+" "),e.opts.verbose&&(t+=" , data: "+o+" "),t+="  }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+="} ",i&&(t+=" else { "),t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=e.level,n=e.dataLevel,i=e.schema.not,o=e.schemaPath+".not",s=!e.opts.allErrors,a="data"+(n||""),c="errs"+r,u=e.util.copy(e);if(u.level++,e.util.schemaHasRules(i,e.RULES.all)){u.schema=i,u.schemaPath=o,t+=" var "+c+" = errors;  ";var f=e.compositeRule;e.compositeRule=u.compositeRule=!0,t+=" "+e.validate(u)+"  ",e.compositeRule=u.compositeRule=f,t+=" if (valid"+u.level+") {  ",!e.compositeRule&&s?(t+=" validate.errors = [ { keyword: 'not', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT be valid' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+o+" "),e.opts.verbose&&(t+=" , data: "+a+" "),t+="  }]; return false; "):(t+="  var err =   { keyword: 'not', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT be valid' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+o+" "),e.opts.verbose&&(t+=" , data: "+a+" "),t+="  }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),t+=" } else { errors = "+c+"; if (vErrors !== null) { if ("+c+") vErrors.length = "+c+"; else vErrors = null; } ",e.opts.allErrors&&(t+=" } ")}else t+="  var err =   { keyword: 'not', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT be valid' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+o+" "),e.opts.verbose&&(t+=" , data: "+a+" "),t+="  }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s&&(t+=" if (false) { ");return t}},function(e,t){"use strict";e.exports=function(e){var t=" ",r=e.level,n=e.dataLevel,i=e.schema.properties,o=e.schemaPath+".properties",s=!e.opts.allErrors,a="data"+(n||""),c="errs"+r,u=e.util.copy(e),f="";u.level++;var h=u.dataLevel=e.dataLevel+1,d="data"+h,l=Object.keys(i||{}),p=e.schema.patternProperties||{},g=Object.keys(p),m=e.schema.additionalProperties,v=l.length||g.length,y=m===!1,b="object"==typeof m&&Object.keys(m).length,w=e.opts.removeAdditional,S=y||b||w,x=e.util.toHash(e.schema.required||[]);if(t+="var "+c+" = errors;var valid"+u.level+" = true;",S){if(t+=" for (var key"+r+" in "+a+") { ",v){if(t+=" var isAdditional"+r+" = !(false ",l.length)if(l.length>5)t+=" || validate.schema"+o+"[key"+r+"] ";else{var E=l;if(E)for(var A,P=-1,T=E.length-1;T>P;)A=E[P+=1],t+=" || key"+r+" == "+e.util.toQuotedString(A)+" "}if(g.length){var I=g;if(I)for(var O,R=-1,k=I.length-1;k>R;)O=I[R+=1],t+=" || "+e.usePattern(O)+".test(key"+r+") "}t+=" ); if (isAdditional"+r+") { "}if("all"==w)t+=" delete "+a+"[key"+r+"]; ";else{var L=e.errorPath;if(e.errorPath=e.util.getPathExpr(e.errorPath,"key"+r,e.opts.jsonPointers),y)w?t+=" delete "+a+"[key"+r+"]; ":(t+=" valid"+u.level+" = false;  ",!e.compositeRule&&s?(t+=" validate.errors = [ { keyword: 'additionalProperties', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT have additional properties' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: false "),e.opts.verbose&&(t+=" , data: "+a+" "),t+="  }]; return false; "):(t+="  var err =   { keyword: 'additionalProperties', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'should NOT have additional properties' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: false "),e.opts.verbose&&(t+=" , data: "+a+" "),t+="  }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),s&&(t+=" break; "));else if(b)if("failing"==w){t+=" var "+c+" = errors;  ";var N=e.compositeRule;e.compositeRule=u.compositeRule=!0,u.schema=m,u.schemaPath=e.schemaPath+".additionalProperties",u.errorPath=e.errorPath;var j=a+"[key"+r+"]",F=e.validate(u);t+=e.util.varOccurences(F,d)<2?" "+e.util.varReplace(F,d,j)+" ":" var "+d+" = "+j+"; "+F+" ",t+=" if (!valid"+u.level+") { errors = "+c+"; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete "+a+"[key"+r+"]; }  ",e.compositeRule=u.compositeRule=N}else{u.schema=m,u.schemaPath=e.schemaPath+".additionalProperties",u.errorPath=e.errorPath;var j=a+"[key"+r+"]",F=e.validate(u);t+=e.util.varOccurences(F,d)<2?" "+e.util.varReplace(F,d,j)+" ":" var "+d+" = "+j+"; "+F+" ",s&&(t+=" if (!valid"+u.level+") break; ")}e.errorPath=L}v&&(t+=" } "),t+=" }  ",s&&(t+=" if (valid"+u.level+") { ",f+="}")}if(l.length){var M=l;if(M)for(var A,B=-1,C=M.length-1;C>B;){A=M[B+=1];var q=i[A];if(e.util.schemaHasRules(q,e.RULES.all)){u.schema=q;var z=e.util.getProperty(A),j=a+z;u.schemaPath=o+z,u.errorPath=e.util.getPath(e.errorPath,A,e.opts.jsonPointers);var F=e.validate(u);if(e.util.varOccurences(F,d)<2){F=e.util.varReplace(F,d,j);var D=j}else{var D=d;t+=" var "+d+" = "+j+"; "}if(x[A]){t+=" if ("+D+" === undefined) { valid"+u.level+" = false; ";var L=e.errorPath,U=e.util.escapeQuotes(A);e.errorPath=e.util.getPath(L,A,e.opts.jsonPointers),!e.compositeRule&&s?(t+=" validate.errors = [ { keyword: 'required', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'is a required property' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+o+" "),e.opts.verbose&&(t+=" , data: "+a+" "),e.opts.i18n&&(t+=", params: { missingProperty: '"+U+"' }"),t+=" }]; return false; "):(t+="  var err =   { keyword: 'required', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(t+=" , message: 'is a required property' "),(e.opts.verbose||e.opts.i18n)&&(t+=" , schema: validate.schema"+o+" "),e.opts.verbose&&(t+=" , data: "+a+" "),e.opts.i18n&&(t+=", params: { missingProperty: '"+U+"' }"),t+=" }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),e.errorPath=L,t+=" } else { "}else t+=s?" if ("+D+" === undefined) { valid"+u.level+" = true; } else { ":" if ("+D+" !== undefined) { ";t+=" "+F+" } "}s&&(t+=" if (valid"+u.level+") { ",f+="}")}}var V=g;if(V)for(var O,$=-1,H=V.length-1;H>$;){O=V[$+=1];var q=p[O];if(e.util.schemaHasRules(q,e.RULES.all)){u.schema=q,u.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(O),t+=" for (var key"+r+" in "+a+") { if ("+e.usePattern(O)+".test(key"+r+")) { ",u.errorPath=e.util.getPathExpr(e.errorPath,"key"+r,e.opts.jsonPointers);var j=a+"[key"+r+"]",F=e.validate(u);t+=e.util.varOccurences(F,d)<2?" "+e.util.varReplace(F,d,j)+" ":" var "+d+" = "+j+"; "+F+" ",s&&(t+=" if (!valid"+u.level+") break; "),t+=" } ",s&&(t+=" else valid"+u.level+" = true; "),t+=" }  ",s&&(t+=" if (valid"+u.level+") { ",f+="}")}}return s&&(t+=" "+f+" if ("+c+" == errors) {"),t=e.util.cleanUpCode(t)}},function(e,t){"use strict";e.exports=function(e){function t(e){for(var t=0;t<e.rules.length;t++)if(r(e.rules[t]))return!0}function r(t){return void 0!==e.schema[t.keyword]||"properties"==t.keyword&&(e.schema.additionalProperties===!1||"object"==typeof e.schema.additionalProperties||e.schema.patternProperties&&Object.keys(e.schema.patternProperties).length)}var n="";if(e.isTop){var i=e.isTop,o=e.level=0,s=e.dataLevel=0,a="data";e.rootId=e.resolve.fullPath(e.root.schema.id),e.baseId=e.baseId||e.rootId,delete e.isTop,n+=" validate = function (data, dataPath) { 'use strict'; var vErrors = null; ",n+=" var errors = 0;     "}else{var o=e.level,s=e.dataLevel,a="data"+(s||"");e.schema.id&&(e.baseId=e.resolve.url(e.baseId,e.schema.id)),n+=" var errs_"+o+" = errors;"}var c="valid"+o,u=!e.opts.allErrors,f="",h="",d=e.schema.type,l=e.RULES;if(l)for(var p,g=-1,m=l.length-1;m>g;)if(p=l[g+=1],t(p)){p.type&&(n+=" if ("+e.util.checkDataType(p.type,a)+") { ");var v=p.rules;if(v)for(var y,b=-1,w=v.length-1;w>b;)y=v[b+=1],r(y)&&(n+=" "+y.code(e)+" ",u&&(f+="}"));if(u&&(n+=" "+f+" ",f=""),p.type&&(n+=" } ",d&&d===p.type)){var S=!0;n+=" else {  ",!e.compositeRule&&u?(n+=" validate.errors = [ { keyword: 'type', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(n+=" , message: 'should be ",n+=x?""+d.join(","):""+d,n+="' "),(e.opts.verbose||e.opts.i18n)&&(n+=" , schema: ",n+=x?"['"+d.join("','")+"']":"'"+d+"'"),e.opts.verbose&&(n+=" , data: "+a+" "),e.opts.i18n&&(n+=", params: { type: '",n+=x?""+d.join(","):""+d,n+="' }"),n+=" }]; return false; "):(n+="  var err =   { keyword: 'type', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(n+=" , message: 'should be ",n+=x?""+d.join(","):""+d,n+="' "),(e.opts.verbose||e.opts.i18n)&&(n+=" , schema: ",n+=x?"['"+d.join("','")+"']":"'"+d+"'"),e.opts.verbose&&(n+=" , data: "+a+" "),e.opts.i18n&&(n+=", params: { type: '",n+=x?""+d.join(","):""+d,n+="' }"),n+=" }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),n+=" } "}u&&(n+=" if (errors === ",n+=i?"0":"errs_"+o,n+=") { ",h+="}")}if(d&&!S){var x=(e.schemaPath+".type",Array.isArray(d)),E=x?"checkDataTypes":"checkDataType";n+=" if ("+e.util[E](d,a,!0)+") {  ",!e.compositeRule&&u?(n+=" validate.errors = [ { keyword: 'type', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(n+=" , message: 'should be ",n+=x?""+d.join(","):""+d,n+="' "),(e.opts.verbose||e.opts.i18n)&&(n+=" , schema: ",n+=x?"['"+d.join("','")+"']":"'"+d+"'"),e.opts.verbose&&(n+=" , data: "+a+" "),e.opts.i18n&&(n+=", params: { type: '",n+=x?""+d.join(","):""+d,n+="' }"),n+=" }]; return false; "):(n+="  var err =   { keyword: 'type', dataPath: (dataPath || '') + "+e.errorPath+" ",e.opts.messages!==!1&&(n+=" , message: 'should be ",n+=x?""+d.join(","):""+d,n+="' "),(e.opts.verbose||e.opts.i18n)&&(n+=" , schema: ",n+=x?"['"+d.join("','")+"']":"'"+d+"'"),e.opts.verbose&&(n+=" , data: "+a+" "),e.opts.i18n&&(n+=", params: { type: '",n+=x?""+d.join(","):""+d,n+="' }"),n+=" }; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "),n+=" }"}return u&&(n+=" "+h+" "),i?(n+=" validate.errors = vErrors; ",n+=" return errors === 0;       ",n+=" }"):n+=" var "+c+" = errors === errs_"+o+";",n=e.util.cleanUpCode(n),i&&u&&(n=e.util.cleanUpVarErrors(n)),n}},function(e,t){"use strict";var r=e.exports=function(){this._cache={}};r.prototype.put=function(e,t){this._cache[e]=t},r.prototype.get=function(e){return this._cache[e]},r.prototype.del=function(e){delete this._cache[e]}},function(e,t,r){"use strict";function n(e){return e="full"==e?"full":"fast",u.copy(n[e])}function i(e){var t=e.match(f);if(!t)return!1;var r=+t[1],n=+t[2];return r>=1&&12>=r&&n>=1&&n<=h[r]}function o(e){var t=e.toLowerCase().split("t");if(!i(t[0]))return!1;var r=t[1].match(d);if(!r)return!1;var n=r[1],o=r[2],s=r[3];return 23>=n&&59>=o&&59>=s}function s(e){return e.length<=255&&l.test(e)}function a(e){return g.test(e)&&p.test(e)}function c(e){try{return new RegExp(e),!0}catch(t){return!1}}var u=r(318),f=/^\d\d\d\d-(\d\d)-(\d\d)$/,h=[0,31,29,31,30,31,30,31,31,30,31,30,31],d=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/,l=/^[a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?(\.[a-z](?:(?:[-0-9a-z]{0,61})?[0-9a-z])?)*$/i,p=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'()*+,;=:@\/?]|%[0-9a-f]{2})*)?$/i;
  e.exports=n,n.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t ][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*)?(?:\:|\/)\/?[^\s]*$/i,email:/^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:l,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:c},n.full={date:i,"date-time":o,uri:a,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:s,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:c};var g=/\/|\:/},function(e,t){e.exports={id:"http://json-schema.org/draft-04/schema#",$schema:"http://json-schema.org/draft-04/schema#",description:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{"default":0}]},simpleTypes:{"enum":["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},"default":{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean","default":!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean","default":!1},maxLength:{$ref:"#/definitions/positiveInteger"},minLength:{$ref:"#/definitions/positiveIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],"default":{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],"default":{}},maxItems:{$ref:"#/definitions/positiveInteger"},minItems:{$ref:"#/definitions/positiveIntegerDefault0"},uniqueItems:{type:"boolean","default":!1},maxProperties:{$ref:"#/definitions/positiveInteger"},minProperties:{$ref:"#/definitions/positiveIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],"default":{}},definitions:{type:"object",additionalProperties:{$ref:"#"},"default":{}},properties:{type:"object",additionalProperties:{$ref:"#"},"default":{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},"default":{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},"enum":{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},"default":{}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"tx",link:"https://ripple.com/build/transactions/",description:"An object in rippled txJSON format",type:"object",properties:{Account:{$ref:"address"}},required:["Account"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"transactionType",link:"transaction-types",description:"The type of the transaction.",type:"string","enum":["payment","order","orderCancellation","trustline","settings","suspendedPaymentCreation","suspendedPaymentCancellation","suspendedPaymentExecution"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"hash128",description:"The hexadecimal representation of a 128-bit hash",type:"string",pattern:"^[A-F0-9]{32}$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"hash256",description:"The hexadecimal representation of a 256-bit hash",type:"string",pattern:"^[A-F0-9]{64}$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"sequence",link:"account-sequence-number",description:"An account transaction sequence number",type:"integer",minimum:1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"issue",description:"A currency-counterparty pair, or just currency if it's XRP",allOf:[{$ref:"amountbase"},{not:{required:["value"]}}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"ledgerVersion",description:"A ledger version number",type:"integer",minimum:1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"maxAdjustment",type:"object",properties:{address:{$ref:"address",description:"The address to send from."},maxAmount:{$ref:"laxAmount",description:"The maximum amount to send. (This field is exclusive with source.amount)"},tag:{$ref:"tag"}},required:["address","maxAmount"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"memo",description:"Memo objects represent arbitrary data that can be included in a transaction",type:"object",properties:{type:{pattern:"^[A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=%]*$",description:"Conventionally, a unique relation (according to [RFC 5988](http://tools.ietf.org/html/rfc5988#section-4)) that defines the format of this memo. Only characters allowed in URLs are permitted."},format:{pattern:"^[A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=%]*$",description:"Conventionally containing information on how the memo is encoded, for example as a [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml). Only characters allowed in URLs are permitted."},data:{type:"string",description:"Arbitrary string, conventionally containing the content of the memo."}},additionalProperties:!1,anyOf:[{required:["data"]},{required:["type"]}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"memos",link:"transaction-memos",description:"Array of memos to attach to the transaction.",type:"array",items:{$ref:"memo"}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"uint32",description:"A 32-bit unsigned integer",type:"integer",minimum:0,maximum:4294967295}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"value",link:"value",description:"A string representation of a non-negative floating point number",type:"string",pattern:"^[0-9]*[.]?[0-9]+([eE][-+]?[0-9]+)?$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"sourceAdjustment",type:"object",oneOf:[{$ref:"sourceExactAdjustment"},{$ref:"maxAdjustment"}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"destinationAdjustment",type:"object",oneOf:[{$ref:"destinationExactAdjustment"},{$ref:"minAdjustment"}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"tag",description:"An arbitrary unsigned 32-bit integer that identifies a reason for payment or a non-Ripple account.",type:"integer",$ref:"uint32"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"laxAmount",description:"Amount where counterparty is optional",link:"amount",type:"object",properties:{currency:{$ref:"currency"},counterparty:{$ref:"address"},value:{$ref:"value"}},required:["currency","value"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"laxLaxAmount",description:"Amount where counterparty and value are optional",link:"amount",type:"object",properties:{currency:{$ref:"currency"},counterparty:{$ref:"address"},value:{$ref:"value"}},required:["currency"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"minAdjustment",type:"object",properties:{address:{$ref:"address",description:"The address to send to."},minAmount:{$ref:"laxAmount",description:"The minimum amount to be delivered. (This field is exclusive with destination.amount)"},tag:{$ref:"tag"}},required:["address","minAmount"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"sourceExactAdjustment",type:"object",properties:{address:{$ref:"address",description:"The address to send from."},amount:{$ref:"laxAmount",description:"An exact amount to send. If the counterparty is not specified, amounts with any counterparty may be used. (This field is exclusive with source.maxAmount)"},tag:{$ref:"tag"}},required:["address","amount"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"destinationExactAdjustment",type:"object",properties:{address:{$ref:"address",description:"The address to receive at."},amount:{$ref:"laxAmount",description:"An exact amount to deliver to the recipient. If the counterparty is not specified, amounts with any counterparty may be used. (This field is exclusive with destination.minAmount)."},tag:{$ref:"tag"}},required:["address","amount"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"id",link:"transaction-id",description:"A hash of a transaction used to identify the transaction, represented in hexadecimal.",type:"string",pattern:"^[A-F0-9]{64}$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"address",description:"A Ripple account address",type:"string",format:"address",link:"ripple-address",pattern:"^r[1-9A-HJ-NP-Za-km-z]{25,34}$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"adjustment",type:"object",properties:{address:{$ref:"address"},amount:{$ref:"amount"},tag:{$ref:"tag"}},required:["address","amount"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"quality",description:"Ratio for incoming/outgoing transit fees.",type:"number",minimum:1e-9,maximum:4.294967295}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"amount",link:"amount",description:"An Amount on the Ripple Protocol",allOf:[{$ref:"amountbase"},{required:["value"]}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"amountbase",description:"Base class for amount and issue",type:"object",properties:{value:{description:"The quantity of the currency, denoted as a string to retain floating point precision",$ref:"value"},currency:{description:"The three-character code or hexadecimal string used to denote currencies",$ref:"currency"},counterparty:{description:'The Ripple address of the account that owes or is owed the funds (omitted if `currency` is "XRP")',$ref:"address"}},additionalProperties:!1,required:["currency"],oneOf:[{properties:{currency:{not:{"enum":["XRP"]}}},required:["counterparty"]},{properties:{currency:{"enum":["XRP"]}},not:{required:["counterparty"]}}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"balance",description:"Balance amount",link:"amount",type:"object",properties:{value:{description:"The balance on the trustline",$ref:"signedValue"},currency:{description:"The three-character code or hexadecimal string used to denote currencies",$ref:"currency"},counterparty:{description:"The Ripple address of the account that owes or is owed the funds.",$ref:"address"}},additionalProperties:!1,required:["currency","value"],oneOf:[{properties:{currency:{not:{"enum":["XRP"]}}},required:["counterparty"]},{properties:{currency:{"enum":["XRP"]}},not:{required:["counterparty"]}}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"blob",description:"An uppercase hexadecimal string representation of a transaction",type:"string",minLength:1,pattern:"^[0-9A-F]*$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"currency",description:"The three-character code or hexadecimal string used to denote currencies",type:"string",link:"currency",pattern:"^([a-zA-Z0-9<>(){}[\\]|?!@#$%^&*]{3}|[A-F0-9]{40})$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"signedValue",description:"A string representation of a floating point number",type:"string",link:"value",pattern:"^[-]?[0-9]*[.]?[0-9]+([eE][-+]?[0-9]+)?$"}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"orderbook",type:"object",properties:{base:{$ref:"issue"},counter:{$ref:"issue"}},required:["base","counter"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"instructions",link:"transaction-instructions",description:"Instructions for executing the transaction",type:"object",properties:{sequence:{description:"The initiating account's sequence number for this transaction.",$ref:"sequence"},fee:{description:"An exact fee to pay for the transaction. See [Transaction Fees](#transaction-fees) for more information.",$ref:"value"},maxFee:{description:"The maximum fee to pay for the transaction. See [Transaction Fees](#transaction-fees) for more information.",$ref:"value"},maxLedgerVersion:{description:"The highest ledger version that the transaction can be included in. If this option and `maxLedgerVersionOffset` are both omitted, the `maxLedgerVersion` option will default to 3 greater than the current validated ledger version (equivalent to `maxLedgerVersionOffset=3`). Use `null` to not set a maximum ledger version.",oneOf:[{$ref:"ledgerVersion"},{type:"null"}]},maxLedgerVersionOffset:{description:"Offset from current validated legder version to highest ledger version that the transaction can be included in.",type:"integer",minimum:0},signersCount:{description:"Number of signers that will be signing this transaction.",type:"integer",minimum:1}},additionalProperties:!1,not:{anyOf:[{description:"fee and maxFee are mutually exclusive",required:["fee","maxFee"]},{description:"maxLedgerVersion and maxLedgerVersionOffset are mutually exclusive",required:["maxLedgerVersion","maxLedgerVersionOffset"]}]}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"settingsPlusMemos",type:"object",properties:{passwordSpent:{type:"boolean",description:"Indicates that the account has used its free SetRegularKey transaction."},requireDestinationTag:{type:"boolean",description:"Requires incoming payments to specify a destination tag."},requireAuthorization:{type:"boolean",description:"If set, this account must individually approve other users in order for those users to hold this account’s issuances."},disallowIncomingXRP:{type:"boolean",description:"Indicates that client applications should not send XRP to this account. Not enforced by rippled."},disableMasterKey:{type:"boolean",description:"Disallows use of the master key to sign transactions for this account."},enableTransactionIDTracking:{type:"boolean",description:"Track the ID of this account’s most recent transaction."},noFreeze:{type:"boolean",description:"Permanently give up the ability to freeze individual trust lines. This flag can never be disabled after being enabled."},globalFreeze:{type:"boolean",description:"Freeze all assets issued by this account."},defaultRipple:{type:"boolean",description:"Enable [rippling](https://ripple.com/knowledge_center/understanding-the-noripple-flag/) on this account’s trust lines by default. (New in [rippled 0.27.3](https://github.com/ripple/rippled/releases/tag/0.27.3))"},emailHash:{description:"Hash of an email address to be used for generating an avatar image. Conventionally, clients use Gravatar to display this image. Use `null` to clear.",oneOf:[{type:"null"},{$ref:"hash128"}]},messageKey:{type:"string",description:"Public key for sending encrypted messages to this account. Conventionally, it should be a secp256k1 key, the same encryption that is used by the rest of Ripple."},domain:{type:"string",description:" The domain that owns this account, as a hexadecimal string representing the ASCII for the domain in lowercase."},transferRate:{description:" The fee to charge when users transfer this account’s issuances, represented as billionths of a unit. Use `null` to set no fee.",oneOf:[{type:"null"},{type:"number",minimum:1,maximum:4.294967295}]},regularKey:{oneOf:[{$ref:"address"},{type:"null"}],description:"The public key of a new keypair, to use as the regular key to this account, as a base-58-encoded string in the same format as an account address. Use `null` to remove the regular key."},signers:{type:"object",description:"Settings that determine what sets of accounts can be used to sign a transaction on behalf of this account using multisigning.",properties:{threshold:{$ref:"uint32",description:"A target number for the signer weights. A multi-signature from this list is valid only if the sum weights of the signatures provided is equal or greater than this value. To delete the signers setting, use the value `0`."},weights:{type:"array",description:"Weights of signatures for each signer.",items:{type:"object",description:"An association of an address and a weight.",properties:{address:{$ref:"address"},weight:{$ref:"uint32",description:"The weight that the signature of this account counts as towards the threshold."}},required:["address","weight"],additionalProperties:!1},minItems:1,maxItems:8}}},memos:{$ref:"memos"}},additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"settings",link:"settings",$ref:"settingsPlusMemos",oneOf:[{required:["memos"],minProperties:2,maxProperties:2},{not:{required:["memos"]},minProperties:1,maxProperties:1}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"payment",link:"payment",type:"object",properties:{source:{$ref:"sourceAdjustment",description:"The source of the funds to be sent."},destination:{$ref:"destinationAdjustment",description:"The destination of the funds to be sent."},paths:{type:"string",description:"The paths of trustlines and orders to use in executing the payment."},memos:{$ref:"memos"},invoiceID:{description:"A 256-bit hash that can be used to identify a particular payment.",$ref:"hash256"},allowPartialPayment:{description:"A boolean that, if set to true, indicates that this payment should go through even if the whole amount cannot be delivered because of a lack of liquidity or funds in the source account account",type:"boolean"},noDirectRipple:{description:"A boolean that can be set to true if paths are specified and the sender would like the Ripple Network to disregard any direct paths from the source account to the destination account. This may be used to take advantage of an arbitrage opportunity or by gateways wishing to issue balances from a hot wallet to a user who has mistakenly set a trustline directly to the hot wallet",type:"boolean"},limitQuality:{description:"Only take paths where all the conversions have an input:output ratio that is equal or better than the ratio of destination.amount:source.maxAmount.",type:"boolean"}},required:["source","destination"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"suspendedPaymentCancellation",link:"suspended-payment-cancellation",type:"object",properties:{memos:{$ref:"memos"},owner:{$ref:"address",description:"The address of the owner of the suspended payment to cancel."},suspensionSequence:{$ref:"sequence",description:"The [account sequence number](#account-sequence-number) of the [Suspended Payment Creation](#suspended-payment-creation) transaction for the suspended payment to cancel."}},required:["owner","suspensionSequence"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"orderCancellation",link:"order-cancellation",type:"object",properties:{orderSequence:{$ref:"sequence",description:"The [account sequence number](#account-sequence-number) of the order to cancel."},memos:{$ref:"memos"}},required:["orderSequence"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"order",link:"order",type:"object",properties:{direction:{type:"string","enum":["buy","sell"],description:'Equal to "buy" for buy orders and "sell" for sell orders.'},quantity:{$ref:"amount",description:"The amount of currency to buy or sell."},totalPrice:{$ref:"amount",description:"The total price to be paid for the `quantity` to be bought or sold."},immediateOrCancel:{type:"boolean",description:"Treat the offer as an [Immediate or Cancel order](http://en.wikipedia.org/wiki/Immediate_or_cancel). If enabled, the offer will never become a ledger node: it only attempts to match existing offers in the ledger."},fillOrKill:{type:"boolean",description:"Treat the offer as a [Fill or Kill order](http://en.wikipedia.org/wiki/Fill_or_kill). Only attempt to match existing offers in the ledger, and only do so if the entire quantity can be exchanged."},passive:{description:"If enabled, the offer will not consume offers that exactly match it, and instead becomes an Offer node in the ledger. It will still consume offers that cross it.",type:"boolean"},expirationTime:{type:"string",format:"date-time",description:"Time after which the offer is no longer active, as an [ISO 8601 date-time](https://en.wikipedia.org/wiki/ISO_8601)."},memos:{$ref:"memos"}},required:["direction","quantity","totalPrice"],additionalProperties:!1,not:{description:"immediateOrCancel and fillOrKill are mutually exclusive",required:["immediateOrCancel","fillOrKill"]}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"suspendedPaymentExecution",link:"suspended-payment-execution",type:"object",properties:{memos:{$ref:"memos"},owner:{$ref:"address",description:"The address of the owner of the suspended payment to execute."},suspensionSequence:{$ref:"sequence",description:"The [account sequence number](#account-sequence-number) of the [Suspended Payment Creation](#suspended-payment-creation) transaction for the suspended payment to execute."},method:{type:"integer",minimum:0,maximum:255,description:"The method for verifying the proof; only method `1` is supported."},digest:{$ref:"hash256",description:"The original `digest` from the suspended payment creation transaction. This is sha256 hash of `proof` string. It is replicated here so that the relatively expensive hashing operation can be delegated to a server without ledger history and the server with ledger history only has to do a quick comparison of the old digest with the new digest."},proof:{type:"string",description:"A value that produces the digest when hashed. It must be 32 charaters long and contain only 8-bit characters.",pattern:"^[\\x00-\\xFF]{32}$"}},required:["owner","suspensionSequence"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"suspendedPaymentCreation",link:"suspended-payment-creation",type:"object",properties:{source:{$ref:"maxAdjustment",description:"Fields pertaining to the source of the payment."},destination:{$ref:"destinationExactAdjustment",description:"Fields pertaining to the destination of the payment."},memos:{$ref:"memos"},digest:{$ref:"hash256",description:"If present, proof is required upon execution."},allowCancelAfter:{type:"string",format:"date-time",description:"If present, the suspended payment may be cancelled after this time."},allowExecuteAfter:{type:"string",format:"date-time",description:"If present, the suspended payment can not be executed before this time."}},required:["source","destination"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"trustline",link:"trustline",type:"object",properties:{currency:{$ref:"currency",description:"The currency this trustline applies to."},counterparty:{$ref:"address",description:"The address of the account this trustline extends trust to."},limit:{$ref:"value",description:"The maximum amount that the owner of the trustline can be owed through the trustline."},qualityIn:{$ref:"quality",description:"Incoming balances on this trustline are valued at this ratio."},qualityOut:{$ref:"quality",description:"Outgoing balances on this trustline are valued at this ratio."},ripplingDisabled:{type:"boolean",description:"If true, payments cannot ripple through this trustline."},authorized:{type:"boolean",description:"If true, authorize the counterparty to hold issuances from this account."},frozen:{type:"boolean",description:"If true, the trustline is frozen, which means that funds can only be sent to the owner."},memos:{$ref:"memos"}},required:["currency","counterparty","limit"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"sign",type:"object",properties:{signedTransaction:{type:"string",pattern:"^[A-F0-9]+$",description:"The signed transaction represented as an uppercase hexadecimal string."},id:{$ref:"id",description:"The [Transaction ID](#transaction-id) of the signed transaction."}},required:["signedTransaction","id"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"submit",type:"object",properties:{resultCode:{type:"string",description:"The result code returned by rippled. [List of transaction responses](https://ripple.com/build/transactions/#full-transaction-response-list)"},resultMessage:{type:"string",description:"Human-readable explanation of the status of the transaction."}},required:["resultCode","resultMessage"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getAccountInfo",type:"object",properties:{sequence:{$ref:"sequence",description:"The next (smallest unused) sequence number for this account."},xrpBalance:{$ref:"value",description:"The XRP balance owned by the account."},ownerCount:{type:"integer",minimum:0,description:"Number of other ledger entries (specifically, trust lines and offers) attributed to this account. This is used to calculate the total reserve required to use the account."},previousInitiatedTransactionID:{$ref:"hash256",description:"Hash value representing the most recent transaction that was initiated by this account."},previousAffectingTransactionID:{$ref:"hash256",description:"Hash value representing the most recent transaction that affected this account node directly. **Note:** This does not include changes to the account’s trust lines and offers."},previousAffectingTransactionLedgerVersion:{$ref:"ledgerVersion",description:"The ledger version that the transaction identified by the `previousAffectingTransactionID` was validated in."}},required:["sequence","xrpBalance","ownerCount","previousAffectingTransactionID","previousAffectingTransactionLedgerVersion"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getBalances",type:"array",items:{$ref:"balance"}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getBalanceSheet",description:"getBalanceSheet response",type:"object",properties:{balances:{type:"array",items:{$ref:"amount"},description:"Amounts issued to the hotwallet accounts from the request. The keys are hot wallet addresses and the values are arrays of currency amounts they hold. The issuer (omitted from the currency amounts) is the account from the request."},assets:{type:"array",items:{$ref:"amount"},description:"Total amounts held that are issued by others. For the recommended gateway configuration, there should be none."},obligations:{type:"array",items:{type:"object",required:["currency","value"],additionalProperties:!1,properties:{currency:{$ref:"currency"},value:{$ref:"value"}},description:"An amount that is owed."},description:"Total amounts issued to accounts that are not hot wallets, as a map of currencies to the total value issued."}},additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getLedger",type:"object",properties:{stateHash:{$ref:"hash256",description:"Hash of all state information in this ledger."},closeTime:{type:"string",format:"date-time",description:"The time at which this ledger was closed."},closeTimeResolution:{type:"integer",minimum:1,description:"Approximate number of seconds between closing one ledger version and closing the next one."},closeFlags:{type:"integer",minimum:0,description:'A bit-map of flags relating to the closing of this ledger. Currently, the ledger has only one flag defined for `closeFlags`: **sLCF_NoConsensusTime** (value 1). If this flag is enabled, it means that validators were in conflict regarding the correct close time for the ledger, but built otherwise the same ledger, so they declared consensus while "agreeing to disagree" on the close time. In this case, the consensus ledger contains a `closeTime` value that is 1 second after that of the previous ledger. (In this case, there is no official close time, but the actual real-world close time is probably 3-6 seconds later than the specified `closeTime`.)'},ledgerHash:{$ref:"hash256",description:"Unique identifying hash of the entire ledger."},ledgerVersion:{$ref:"ledgerVersion",description:"The ledger version of this ledger."},parentLedgerHash:{$ref:"hash256",description:"Unique identifying hash of the ledger that came immediately before this one."},parentCloseTime:{type:"string",format:"date-time",description:"The time at which the previous ledger was closed."},totalDrops:{$ref:"value",description:"Total number of drops (1/1,000,000th of an XRP) in the network, as a quoted integer. (This decreases as transaction fees cause XRP to be destroyed.)"
  },transactionHash:{$ref:"hash256",description:"Hash of the transaction information included in this ledger."},transactions:{description:"Array of all transactions that were validated in this ledger. Transactions are represented in the same format as the return value of [getTransaction](#gettransaction).",type:"array",items:{$ref:"getTransaction",description:"A transaction in the same format as the return value of [getTransaction](#gettransaction)."}},rawTransactions:{type:"string",description:"A JSON string containing rippled format transaction JSON for all transactions that were validated in this ledger."},transactionHashes:{description:"An array of hashes of all transactions that were validated in this ledger.",type:"array",items:{$ref:"id"}},rawState:{type:"string",description:"A JSON string containing all state data for this ledger in rippled JSON format."},stateHashes:{description:"An array of hashes of all state data in this ledger.",type:"array",items:{$ref:"hash256"}}},required:["stateHash","closeTime","closeTimeResolution","closeFlags","ledgerHash","ledgerVersion","parentLedgerHash","parentCloseTime","totalDrops","transactionHash"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getOrderbook",type:"object",properties:{bids:{$ref:"orderbookOrders",description:"The buy orders in the order book."},asks:{$ref:"orderbookOrders",description:"The sell orders in the order book."}},required:["bids","asks"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getOrders",type:"array",items:{type:"object",properties:{specification:{$ref:"order",description:"An order specification that would create an order equivalent to the current state of this order."},properties:{description:"Properties of the order not in the specification.",type:"object",properties:{maker:{$ref:"address",description:"The address of the account that submitted the order."},sequence:{$ref:"sequence",description:"The account sequence number of the transaction that created this order."},makerExchangeRate:{$ref:"value",description:'The exchange rate from the point of view of the account that submitted the order (also known as "quality").'}},required:["maker","sequence","makerExchangeRate"],addtionalProperties:!1}},required:["specification","properties"],additionalProperties:!1}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"orderChange",type:"object",description:"A change to an order.",properties:{direction:{type:"string","enum":["buy","sell"],description:'Equal to "buy" for buy orders and "sell" for sell orders.'},quantity:{$ref:"amount",description:"The amount to be bought or sold by the maker."},totalPrice:{$ref:"amount",description:"The total amount to be paid or received by the taker."},makerExchangeRate:{$ref:"value",description:"The exchange rate between the `quantity` currency and the `totalPrice` currency from the point of view of the maker."},sequence:{$ref:"sequence",description:"The order sequence number, used to identify the order for cancellation"},status:{"enum":["created","filled","partially-filled","cancelled"],description:'The status of the order. One of "created", "filled", "partially-filled", "cancelled".'},expirationTime:{type:"string",format:"date-time",description:"The time after which the order expires, if any."}},required:["direction","quantity","totalPrice","sequence","status"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"prepare",description:"Result of prepare function",type:"object",properties:{txJSON:{type:"string",description:"The prepared transaction in rippled JSON format."},instructions:{description:"The instructions for how to execute the transaction after adding automatic defaults.",type:"object",properties:{fee:{$ref:"value",description:"An exact fee to pay for the transaction. See [Transaction Fees](#transaction-fees) for more information."},sequence:{$ref:"sequence",description:"The initiating account's sequence number for this transaction."},maxLedgerVersion:{oneOf:[{$ref:"ledgerVersion"},{type:"null"}],description:"The highest ledger version that the transaction can be included in. Set to `null` if there is no maximum."}},additionalProperties:!1,required:["fee","sequence","maxLedgerVersion"]}},additionalProperties:!1,required:["txJSON","instructions"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"ledgerEvent",description:"A ledger event message",type:"object",properties:{baseFeeXRP:{$ref:"value",description:"Base fee, in XRP."},ledgerHash:{$ref:"hash256",description:"Unique hash of the ledger that was closed, as hex."},ledgerVersion:{$ref:"ledgerVersion",description:"Ledger version of the ledger that closed."},ledgerTimestamp:{type:"string",format:"date-time",description:"The time at which this ledger closed."},reserveBaseXRP:{$ref:"value",description:"The minimum reserve, in XRP, that is required for an account."},reserveIncrementXRP:{$ref:"value",description:"The increase in account reserve that is added for each item the account owns, such as offers or trust lines."},transactionCount:{type:"integer",minimum:0,description:"Number of new transactions included in this ledger."},validatedLedgerVersions:{type:"string",description:"Range of ledgers that the server has available. This may be discontiguous."}},addtionalProperties:!1,required:["baseFeeXRP","ledgerHash","ledgerTimestamp","reserveBaseXRP","reserveIncrementXRP","transactionCount","ledgerVersion","validatedLedgerVersions"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getPaths",type:"array",items:{type:"object",properties:{source:{$ref:"sourceAdjustment",description:"Properties of the source of the payment."},destination:{$ref:"destinationAdjustment",description:"Properties of the destination of the payment."},paths:{type:"string",description:"The paths of trustlines and orders to use in executing the payment."}},required:["source","destination","paths"],additionalProperties:!1}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getServerInfo",type:"object",properties:{buildVersion:{type:"string",description:"The version number of the running rippled version."},completeLedgers:{type:"string",pattern:"[0-9,-]+",description:"Range expression indicating the sequence numbers of the ledger versions the local rippled has in its database. It is possible to be a disjoint sequence, e.g. “2500-5000,32570-7695432”."},hostID:{type:"string",description:"On an admin request, returns the hostname of the server running the rippled instance; otherwise, returns a unique four letter word."},ioLatencyMs:{type:"number",description:"Amount of time spent waiting for I/O operations to be performed, in milliseconds. If this number is not very, very low, then the rippled server is probably having serious load issues."},load:{type:"object",description:"*(Admin only)* Detailed information about the current load state of the server.",properties:{jobTypes:{type:"array",description:"*(Admin only)* Information about the rate of different types of jobs being performed by the server and how much time it spends on each.",items:{type:"object"}},threads:{type:"number",description:"*(Admin only)* The number of threads in the server’s main job pool, performing various Ripple Network operations."}},required:["jobTypes","threads"]},lastClose:{type:"object",description:"Information about the last time the server closed a ledger.",properties:{convergeTimeS:{type:"number",description:"The time it took to reach a consensus for the last ledger closing, in seconds."},proposers:{type:"integer",minimum:0,description:"Number of trusted validators participating in the ledger closing."}},required:["convergeTimeS","proposers"]},loadFactor:{type:"number",description:"The load factor the server is currently enforcing, as a multiplier on the base transaction fee. The load factor is determined by the highest of the individual server’s load factor, cluster’s load factor, and the overall network’s load factor."},peers:{type:"integer",minimum:0,description:"How many other rippled servers the node is currently connected to."},pubkeyNode:{type:"string",description:"Public key used to verify this node for internal communications; this key is automatically generated by the server the first time it starts up. (If deleted, the node can just create a new pair of keys.)"},pubkeyValidator:{type:"string",description:"*(Admin only)* Public key used by this node to sign ledger validations."},serverState:{type:"string",description:"A string indicating to what extent the server is participating in the network. See [Possible Server States](https://ripple.com/build/rippled-apis/#possible-server-states) for more details.","enum":["disconnected","connected","syncing","tracking","full","validating","proposing"]},validatedLedger:{type:"object",description:"Information about the fully-validated ledger with the highest sequence number (the most recent).",properties:{age:{type:"integer",minimum:0,description:"The time since the ledger was closed, in seconds."},baseFeeXRP:{$ref:"value",description:"Base fee, in XRP. This may be represented in scientific notation such as 1e-05 for 0.00005."},hash:{$ref:"hash256",description:"Unique hash for the ledger, as an uppercase hexadecimal string."},reserveBaseXRP:{$ref:"value",description:"Minimum amount of XRP necessary for every account to keep in reserve."},reserveIncrementXRP:{$ref:"value",description:"Amount of XRP added to the account reserve for each object an account is responsible for in the ledger."},ledgerVersion:{type:"integer",minimum:0,description:"Identifying sequence number of this ledger version."}},additionalProperties:!1,required:["age","baseFeeXRP","hash","reserveBaseXRP","reserveIncrementXRP","ledgerVersion"]},validationQuorum:{type:"number",description:"Minimum number of trusted validations required in order to validate a ledger version. Some circumstances may cause the server to require more validations."}},required:["buildVersion","completeLedgers","hostID","ioLatencyMs","lastClose","loadFactor","peers","pubkeyNode","serverState","validatedLedger","validationQuorum"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getSettings",$ref:"settingsPlusMemos",not:{required:["memos"]}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"orderbookOrders",type:"array",items:{description:"An order in the order book.",type:"object",properties:{specification:{$ref:"order",description:"An order specification that would create an order equivalent to the current state of this order."},properties:{description:"Properties of the order not in the specification.",type:"object",properties:{maker:{$ref:"address",description:"The address of the account that submitted the order."},sequence:{$ref:"sequence",description:"The account sequence number of the transaction that created this order."},makerExchangeRate:{$ref:"value",description:'The exchange rate from the point of view of the account that submitted the order (also known as "quality").'}},required:["maker","sequence","makerExchangeRate"],addtionalProperties:!1},state:{description:"The state of the order.",type:"object",properties:{fundedAmount:{$ref:"amount",description:"How much of the amount the maker would have to pay that the maker currently holds."},priceOfFundedAmount:{$ref:"amount",description:"How much the `fundedAmount` would convert to through the exchange rate of this order."}},required:["fundedAmount","priceOfFundedAmount"],additionalProperties:!1}},required:["specification","properties"],additionalProperties:!1}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"outcome",type:"object",description:"The outcome of the transaction (what effects it had).",properties:{result:{type:"string",description:"Result code returned by rippled. See [Transaction Results](https://ripple.com/build/transactions/#full-transaction-response-list) for a complete list."},timestamp:{type:"string",format:"date-time",description:"The timestamp when the transaction was validated. (May be missing when requesting transactions in binary mode.)"},fee:{$ref:"value",description:"The XRP fee that was charged for the transaction."},deliveredAmount:{$ref:"amount",description:"For payment transactions, it is impossible to reliably compute the actual delivered amount from the balanceChanges due to fixed precision. If the payment is not a partial payment and the transaction succeeded, the deliveredAmount should always be considered to be the amount specified in the transaction."},balanceChanges:{type:"object",additionalProperties:{type:"array",description:"Key is the ripple address; value is an array of signed amounts representing changes of balances for that address.",items:{$ref:"balance"}}},orderbookChanges:{type:"object",additionalProperties:{type:"array",description:"Key is the maker's ripple address; value is an array of changes",items:{$ref:"orderChange"}}},ledgerVersion:{$ref:"ledgerVersion",description:"The ledger version that the transaction was validated in."},indexInLedger:{type:"integer",minimum:0,description:"The ordering index of the transaction in the ledger."}},required:["result","fee","balanceChanges","orderbookChanges","ledgerVersion","indexInLedger"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getTransaction",link:"gettransaction",properties:{type:{$ref:"transactionType"},specification:{description:"A specification that would produce the same outcome as this transaction. The structure of the specification depends on the value of the `type` field (see [Transaction Types](#transaction-types) for details). *Note:* This is **not** necessarily the same as the original specification."},outcome:{$ref:"outcome",description:"The outcome of the transaction (what effects it had)."},id:{$ref:"id",description:"A hash of the transaction that can be used to identify it."},address:{$ref:"address",description:"The address of the account that initiated the transaction."},sequence:{$ref:"sequence",description:"The account sequence number of the transaction for the account that initiated it."}},required:["id","address","sequence","type","specification","outcome"],additionalProperties:!1,oneOf:[{properties:{type:{"enum":["payment"]},specification:{$ref:"payment"}}},{properties:{type:{"enum":["order"]},specification:{$ref:"order"}}},{properties:{type:{"enum":["orderCancellation"]},specification:{$ref:"orderCancellation"}}},{properties:{type:{"enum":["trustline"]},specification:{$ref:"trustline"}}},{properties:{type:{"enum":["settings"]},specification:{$ref:"getSettings"}}},{properties:{type:{"enum":["suspendedPaymentCreation"]},specification:{$ref:"suspendedPaymentCreation"}}},{properties:{type:{"enum":["suspendedPaymentCancellation"]},specification:{$ref:"suspendedPaymentCancellation"}}},{properties:{type:{"enum":["suspendedPaymentExecution"]},specification:{$ref:"suspendedPaymentExecution"}}}]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getTransactions",type:"array",items:{$ref:"getTransaction"}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getTrustlines",type:"array",items:{properties:{specification:{$ref:"trustline",description:"A trustline specification that would produce this trustline in its current state."},counterparty:{properties:{limit:{$ref:"value",description:"The maximum amount that the counterparty can be owed through the trustline."},ripplingDisabled:{type:"boolean",description:"If true, payments cannot ripple through this trustline."},frozen:{type:"boolean",description:"If true, the trustline is frozen, which means that funds can only be sent to the counterparty."},authorized:{type:"boolean",description:"If true, the counterparty authorizes this party to hold issuances from the counterparty."}},description:"Properties of the trustline from the perspective of the counterparty.",required:["limit"],additionalProperties:!1},state:{properties:{balance:{$ref:"signedValue",description:"The balance on the trustline, representing which party owes the other and by how much."}},description:"Properties of the trustline regarding it's current state that are not part of the specification.",required:["balance"],additionalProperties:!1}},required:["specification","counterparty","state"],additionalProperties:!1}}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getBalancesParameters",description:"Parameters for getBalances",type:"object",properties:{address:{$ref:"address",description:"The address of the account to get balances for."},options:{description:"Options to filter and determine which balances to return.",properties:{counterparty:{$ref:"address",description:"Only return balances with this counterparty."},currency:{$ref:"currency",description:"Only return balances for this currency."},limit:{type:"integer",minimum:1,description:"Return at most this many balances."},ledgerVersion:{$ref:"ledgerVersion",description:"Return balances as they were in this historical ledger version."}},additionalProperties:!1}},additionalProperties:!1,required:["address"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getBalanceSheetParameters",description:"Parameters for getBalanceSheet",type:"object",properties:{address:{$ref:"address",description:"The Ripple address of the account to get the balance sheet of."},options:{properties:{excludeAddresses:{type:"array",items:{$ref:"address"},uniqueItems:!0,description:"Addresses to exclude from the balance totals."},ledgerVersion:{$ref:"ledgerVersion",description:"Get the balance sheet as of this historical ledger version."}},description:"Options to determine how the balances will be calculated.",additionalProperties:!1}},additionalProperties:!1,required:["address"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getLedgerParameters",description:"Parameters for getLedger",type:"object",properties:{options:{description:"Options affecting what ledger and how much data to return.",properties:{ledgerVersion:{$ref:"ledgerVersion",description:"Get ledger data for this historical ledger version."},includeAllData:{type:"boolean",description:"Include full transactions and/or state information if `includeTransactions` and/or `includeState` is set."},includeTransactions:{type:"boolean",description:"Return an array of hashes for each transaction or an array of all transactions that were validated in this ledger version, depending on whether `includeAllData` is set."},includeState:{type:"boolean",description:"Return an array of hashes for all state data or an array of all state data in this ledger version, depending on whether `includeAllData` is set."}},additionalProperties:!1}},additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getOrdersParameters",description:"Parameters for getOrders",type:"object",properties:{address:{$ref:"address",description:"The Ripple address of the account to get open orders for."},options:{description:"Options that determine what orders will be returned.",properties:{limit:{type:"integer",minimum:1,description:"At most this many orders will be returned."},ledgerVersion:{$ref:"ledgerVersion",description:"Return orders as of this historical ledger version."}},additionalProperties:!1}},required:["address"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getOrderbookParameters",description:"Parameters for getOrderbook",type:"object",properties:{address:{$ref:"address",description:"Address of an account to use as point-of-view. (This affects which unfunded offers are returned.)"},orderbook:{$ref:"orderbook",description:"The order book to get."},options:{description:"Options to determine what to return.",properties:{limit:{type:"integer",minimum:1,description:"Return at most this many orders from the order book."},ledgerVersion:{$ref:"ledgerVersion",description:"Return the order book as of this historical ledger version."}},additionalProperties:!1}},required:["address","orderbook"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getPathsParameters",type:"object",properties:{pathfind:{description:"Specification of a pathfind request.",properties:{source:{description:"Properties of the source of funds.",type:"object",properties:{address:{$ref:"address",description:"The Ripple address of the account where funds will come from."},amount:{$ref:"laxAmount",description:"The amount of funds to send."},currencies:{description:"An array of currencies (with optional counterparty) that may be used in the payment paths.",type:"array",items:{description:"A currency with optional counterparty.",type:"object",properties:{currency:{$ref:"currency"},counterparty:{$ref:"address",description:"The counterparty for the currency; if omitted any counterparty may be used."}},required:["currency"],additionalProperties:!1},uniqueItems:!0}},not:{required:["amount","currencies"]},additionalProperties:!1,required:["address"]},destination:{description:"Properties of the destination of funds.",type:"object",properties:{address:{$ref:"address",description:"The address to send to."},amount:{$ref:"laxLaxAmount",description:"The amount to be received by the receiver (`value` may be ommitted if a source amount is specified)."}},required:["address","amount"],additionalProperties:!1}},required:["source","destination"],additionalProperties:!1}},additionalProperties:!1,required:["pathfind"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"api-options",type:"object",properties:{trace:{type:"boolean",description:"If true, log rippled requests and responses to stdout."},feeCushion:{type:"number",minimum:1,description:"Factor to multiply estimated fee by to provide a cushion in case the required fee rises during submission of a transaction. Defaults to `1.2`."},server:{type:"string",description:"URI for rippled websocket port to connect to. Must start with `wss://` or `ws://`.",format:"uri",pattern:"^wss?://"},proxy:{format:"uri",description:"URI for HTTP/HTTPS proxy to use to connect to the rippled server."},timeout:{type:"integer",description:"Timeout in milliseconds before considering a request to have failed.",minimum:1},proxyAuthorization:{type:"string",description:"Username and password for HTTP basic authentication to the proxy in the format **username:password**."},authorization:{type:"string",description:"Username and password for HTTP basic authentication to the rippled server in the format **username:password**."},trustedCertificates:{type:"array",description:"Array of PEM-formatted SSL certificates to trust when connecting to a proxy. This is useful if you want to use a self-signed certificate on the proxy server. Note: Each element must contain a single certificate; concatenated certificates are not valid.",items:{type:"string",description:"A PEM-formatted SSL certificate to trust when connecting to a proxy."}},key:{type:"string",description:"A string containing the private key of the client in PEM format. (Can be an array of keys)."},passphrase:{type:"string",description:"The passphrase for the private key of the client."},certificate:{type:"string",description:"A string containing the certificate key of the client in PEM format. (Can be an array of certificates)."}},additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getSettingsParameters",description:"Parameters for getSettings",type:"object",properties:{address:{$ref:"address",description:"The address of the account to get the settings of."},options:{description:"Options that affect what to return.",properties:{ledgerVersion:{$ref:"ledgerVersion",description:"Get the settings as of this historical ledger version."}},additionalProperties:!1}},required:["address"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getAccountInfoParameters",description:"Parameters for getAccountInfo",type:"object",properties:{address:{$ref:"address",description:"The address of the account to get the account info of."},options:{description:"Options that affect what to return.",properties:{ledgerVersion:{$ref:"ledgerVersion",description:"Get the account info as of this historical ledger version."}},additionalProperties:!1}},required:["address"],additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getTransactionParameters",description:"Parameters for getTransaction",type:"object",properties:{id:{$ref:"id"},options:{description:"Options to limit the ledger versions to search.",properties:{minLedgerVersion:{$ref:"ledgerVersion",description:"The lowest ledger version to search."},maxLedgerVersion:{$ref:"ledgerVersion",description:"The highest ledger version to search"}},additionalProperties:!1}},additionalProperties:!1,required:["id"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getTransactionsParameters",description:"Parameters for getTransactions",type:"object",properties:{address:{$ref:"address",description:"The address of the account to get transactions for."},options:{description:"Options to filter the resulting transactions.",properties:{start:{$ref:"hash256",description:"If specified, this transaction will be the first transaction in the result."},limit:{type:"integer",minimum:1,description:"If specified, return at most this many transactions."},minLedgerVersion:{$ref:"ledgerVersion",description:"Return only transactions in this ledger verion or higher."},maxLedgerVersion:{$ref:"ledgerVersion",description:"Return only transactions in this ledger version or lower."},earliestFirst:{type:"boolean",description:"If true, sort transactions so that the earliest ones come first. By default, the newest transactions will come first."},excludeFailures:{type:"boolean",description:"If true, the result will omit transactions that did not succeed."},initiated:{type:"boolean",description:"If true, return only transactions initiated by the account specified by `address`. If false, return only transactions not initiated by the account specified by `address`."},counterparty:{$ref:"address",description:"If provided, only return transactions with this account as a counterparty to the transaction."},types:{type:"array",items:{$ref:"transactionType"},description:"Only return transactions of the specified [Transaction Types](#transaction-types)."},binary:{type:"boolean",description:"If true, the transactions will be sent from the server in a condensed binary format rather than JSON."}},additionalProperties:!1,not:{anyOf:[{required:["start","minLedgerVersion"]},{required:["start","maxLedgerVersion"]}]}}},additionalProperties:!1,required:["address"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"getTrustlinesParameters",description:"Parameters for getTrustlines",type:"object",properties:{address:{$ref:"address",description:"The address of the account to get trustlines for."},options:{description:"Options to filter and determine which trustlines to return.",properties:{counterparty:{$ref:"address",description:"Only return trustlines with this counterparty."},currency:{$ref:"currency",description:"Only return trustlines for this currency."},limit:{type:"integer",minimum:1,description:"Return at most this many trustlines."},ledgerVersion:{$ref:"ledgerVersion",description:"Return trustlines as they were in this historical ledger version."}},additionalProperties:!1}},additionalProperties:!1,required:["address"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"preparePaymentParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},payment:{$ref:"payment",description:"The specification of the payment to prepare."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","payment"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"prepareOrderParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},order:{$ref:"order",description:"The specification of the order to prepare."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","order"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"prepareTrustlineParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},trustline:{$ref:"trustline",description:"The specification of the trustline to prepare."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","trustline"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"prepareOrderCancellationParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},orderCancellation:{$ref:"orderCancellation",description:"The specification of the order cancellation to prepare."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","orderCancellation"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"prepareSettingsParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},settings:{$ref:"settings",description:"The specification of the settings to prepare."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","settings"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"prepareSuspendedPaymentCreationParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},suspendedPaymentCreation:{$ref:"suspendedPaymentCreation",description:"The specification of the suspended payment creation to prepare."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","suspendedPaymentCreation"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"prepareSuspendedPaymentCancellationParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},suspendedPaymentCancellation:{$ref:"suspendedPaymentCancellation",description:"The specification of the suspended payment cancellation to prepare."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","suspendedPaymentCancellation"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"prepareSuspendedPaymentExecutionParameters",type:"object",properties:{address:{$ref:"address",description:"The address of the account that is creating the transaction."},suspendedPaymentExecution:{$ref:"suspendedPaymentExecution",description:"The specification of the suspended payment execution to prepare."},instructions:{$ref:"instructions"}},additionalProperties:!1,required:["address","suspendedPaymentExecution"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"computeLedgerHashParameters",type:"object",properties:{ledger:{$ref:"getLedger",description:"The ledger header to hash."}},additionalProperties:!1,required:["ledger"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",
  title:"signParameters",type:"object",properties:{txJSON:{type:"string",description:"Transaction represented as a JSON string in rippled format."},secret:{type:"string",format:"secret",description:"The secret of the account that is initiating the transaction."},options:{type:"object",description:"Options that control the type of signature that will be generated.",properties:{signAs:{$ref:"address",description:"The account that the signature should count for in multisigning."}},additionalProperties:!1}},additionalProperties:!1,required:["txJSON","secret"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"submitParameters",type:"object",properties:{signedTransaction:{$ref:"blob",description:"A signed transaction as returned by [sign](#sign)."}},additionalProperties:!1,required:["signedTransaction"]}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"generateAddressParameters",type:"object",properties:{options:{type:"object",description:"Options to control how the address and secret are generated.",properties:{entropy:{type:"array",items:{type:"integer",minimum:0,maximum:255},description:"The entropy to use to generate the seed."},algorithm:{type:"string","enum":["ecdsa-secp256k1","ed25519"],description:"The digital signature algorithm to generate an address for. Can be `ecdsa-secp256k1` (default) or `ed25519`."}},additionalProperties:!1}},additionalProperties:!1}},function(e,t){e.exports={$schema:"http://json-schema.org/draft-04/schema#",title:"combineParameters",type:"object",properties:{signedTransactions:{type:"array",description:"An array of signed transactions (from the output of [sign](#sign)) to combine.",items:{type:"string",pattern:"^[A-F0-9]+$",description:"A single-signed transaction represented as an uppercase hexadecimal string (from the output of [sign](#sign))"},minLength:1}},additionalProperties:!1,required:["signedTransactions"]}},function(e,t,r){"use strict";function n(e,t){_.forEach(t,function(t,r){e[t]=e[r],delete e[r]})}function i(e){return e.request({command:"server_info"}).then(function(e){var t=c(e.info);return n(t,{hostid:"hostID"}),t.validatedLedger&&(n(t.validatedLedger,{baseFeeXrp:"baseFeeXRP",reserveBaseXrp:"reserveBaseXRP",reserveIncXrp:"reserveIncrementXRP",seq:"ledgerVersion"}),t.validatedLedger.baseFeeXRP=t.validatedLedger.baseFeeXRP.toString(),t.validatedLedger.reserveBaseXRP=t.validatedLedger.reserveBaseXRP.toString(),t.validatedLedger.reserveIncrementXRP=t.validatedLedger.reserveIncrementXRP.toString()),t})}function o(e,t){return(Number(t.validatedLedger.baseFeeXRP)*Number(t.loadFactor)*e).toString()}function s(e,t){return i(e).then(_.partial(o,t))}var _=r(192),a=r(195),c=a.convertKeysFromSnakeCaseToCamelCase;e.exports={getServerInfo:i,getFee:s}},function(e,t,r){"use strict";function n(){return this.connection.isConnected()}function i(){return this.connection.getLedgerVersion()}function o(){return this.connection.connect()}function s(){return this.connection.disconnect()}function a(){return f.serverInfo.getServerInfo(this.connection)}function c(){var e=this._feeCushion||1.2;return f.serverInfo.getFee(this.connection,e)}function u(e){return{baseFeeXRP:f.dropsToXrp(e.fee_base),ledgerHash:e.ledger_hash,ledgerVersion:e.ledger_index,ledgerTimestamp:f.rippleTimeToISO8601(e.ledger_time),reserveBaseXRP:f.dropsToXrp(e.reserve_base),reserveIncrementXRP:f.dropsToXrp(e.reserve_inc),transactionCount:e.txn_count,validatedLedgerVersions:e.validated_ledgers}}var f=r(194);e.exports={connect:o,disconnect:s,isConnected:n,getServerInfo:a,getFee:c,getLedgerVersion:i,formatLedgerClose:u}},function(e,t,r){"use strict";function n(e,t){if(t.date)return Promise.resolve(t);var r=t.ledger_index||t.LedgerSequence;if(!r)return new Promise(function(){throw new d.NotFoundError("ledger_index and LedgerSequence not found in tx")});var n={command:"ledger",ledger_index:r};return e.request(n).then(function(e){if("number"==typeof e.ledger.close_time)return _.assign({date:e.ledger.close_time},t);throw new d.UnexpectedError("Ledger missing close_time")})["catch"](function(e){if(e instanceof d.UnexpectedError)throw e;throw new d.NotFoundError("Transaction ledger not found")})}function i(e,t){return(!t.minLedgerVersion||e.ledger_index>=t.minLedgerVersion)&&(!t.maxLedgerVersion||e.ledger_index<=t.maxLedgerVersion)}function o(e,t,r){var n="txnNotFound"===r.message?new d.NotFoundError("Transaction not found"):r;return n instanceof d.NotFoundError?c.hasCompleteLedgerRange(e,t.minLedgerVersion,t.maxLedgerVersion).then(function(r){return r?n:c.isPendingLedgerVersion(e,t.maxLedgerVersion).then(function(e){return e?new d.PendingLedgerVersionError:new d.MissingLedgerHistoryError})}):Promise.resolve(n)}function s(e,t){if(t.validated!==!0||!i(t,e))throw new d.NotFoundError("Transaction not found");return u(t)}function a(e){var t=this,r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];h.getTransaction({id:e,options:r});var i={command:"tx",transaction:e,binary:!1};return c.ensureLedgerVersion.call(this,r).then(function(e){return t.connection.request(i).then(function(e){return n(t.connection,e)}).then(_.partial(s,e))["catch"](function(r){return o(t.connection,e,r).then(function(e){throw e})})})}var _=r(192),c=r(440),u=r(441),f=c.common,h=f.validate,d=f.errors;e.exports=a},function(e,t,r){"use strict";function n(e,t,r){return p(r>=t,"Illegal clamp bounds"),Math.min(Math.max(e,t),r)}function i(e,t,r){var n={command:"account_info",account:t,ledger_index:r};return e.request(n).then(function(e){return m(e.account_data.Balance)})}function o(e,t,r){return e(t,r).then(function(t){var n=r-t.results.length;return n>0&&void 0!==t.marker?o(e,t.marker,n).then(function(e){return t.results.concat(e)}):t.results.slice(0,r)})}function s(e,t){return o(e,void 0,t||1/0)}function a(e){if(void 0!==e){var t=void 0===e.counterparty?void 0!==e.issuer?e.issuer:void 0:e.counterparty,r=_.assign({},e,{issuer:t});return _.omit(r,"counterparty")}}function c(e){var t=a(e.taker_gets),r=a(e.taker_pays),n={taker_gets:t,taker_pays:r};return _.assign({},e,_.omit(n,_.isUndefined))}function u(e){return 0===e?0:e>0?1:-1}function f(e,t){return e.outcome&&t.outcome?e.outcome.ledgerVersion===t.outcome.ledgerVersion?u(e.outcome.indexInLedger-t.outcome.indexInLedger):e.outcome.ledgerVersion<t.outcome.ledgerVersion?-1:1:0}function h(e,t,r){var n=32570;return e.hasLedgerVersions(t||n,r)}function d(e,t){return e.getLedgerVersion().then(function(e){return(t||0)>e})}function l(e){return Boolean(e)&&void 0!==e.ledgerVersion&&null!==e.ledgerVersion?Promise.resolve(e):this.getLedgerVersion().then(function(t){return _.assign({},e,{ledgerVersion:t})})}var _=r(192),p=r(198),g=r(194),m=g.dropsToXrp;e.exports={getXRPBalance:i,ensureLedgerVersion:l,compareTransactions:f,renameCounterpartyToIssuerInOrder:c,getRecursive:s,hasCompleteLedgerRange:h,isPendingLedgerVersion:d,clamp:n,common:g}},function(e,t,r){"use strict";function n(e){var t={Payment:"payment",TrustSet:"trustline",OfferCreate:"order",OfferCancel:"orderCancellation",AccountSet:"settings",SetRegularKey:"settings",SuspendedPaymentCreate:"suspendedPaymentCreation",SuspendedPaymentFinish:"suspendedPaymentExecution",SuspendedPaymentCancel:"suspendedPaymentCancellation",SignerListSet:"settings",SetFee:"feeUpdate",EnableAmendment:"amendment"};return t[e]||null}function i(e){var t=n(e.TransactionType),r={payment:a,trustline:c,order:u,orderCancellation:f,settings:h,suspendedPaymentCreation:d,suspendedPaymentExecution:l,suspendedPaymentCancellation:p,feeUpdate:g,amendment:m},i=r[t];o(void 0!==i,"Unrecognized transaction type");var v=i(e),y=s.parseOutcome(e);return s.removeUndefined({type:t,address:e.Account,sequence:e.Sequence,id:e.hash,specification:s.removeUndefined(v),outcome:y?s.removeUndefined(y):void 0})}var o=r(198),s=r(442),a=r(449),c=r(450),u=r(451),f=r(452),h=r(453),d=r(455),l=r(456),p=r(457),g=r(458),m=r(459);e.exports=i},function(e,t,r){(function(t){"use strict";function n(e,t,r){var n="XRP"===r?-6:0,i="XRP"===t?-6:0,o=n-i;return 0===o?e:new m(e).shift(o).toString()}function i(e){return"number"==typeof e?new m(e).shift(-9).toNumber():void 0}function o(e){return e?g.common.rippleTimeToISO8601(e):void 0}function s(e){""===e.counterparty&&delete e.counterparty}function a(e){_.forEach(e,function(e){_.forEach(e,s)})}function c(e){_.forEach(e,function(e){_.forEach(e,function(e){_.forEach(e,s)})})}function u(e){return 0!==(e.Flags&g.common.txFlags.Payment.PartialPayment)}function f(e){var t=void 0;return"Payment"===e.TransactionType&&(e.meta.delivered_amount?t=v(e.meta.delivered_amount):e.Amount&&!u(e)&&(t=v(e.Amount))),t}function h(e){var t=e.meta||e.metaData;if(t){var r=p.parseBalanceChanges(t),n=p.parseOrderbookChanges(t);return a(r),c(n),g.common.removeUndefined({result:e.meta.TransactionResult,timestamp:o(e.date),fee:g.common.dropsToXrp(e.Fee),balanceChanges:r,orderbookChanges:n,ledgerVersion:e.ledger_index,indexInLedger:e.meta.TransactionIndex,deliveredAmount:f(e)})}}function d(e){return e?new t(e,"hex").toString("utf-8"):void 0}function l(e){return Array.isArray(e.Memos)&&0!==e.Memos.length?e.Memos.map(function(e){return g.common.removeUndefined({type:e.Memo.parsed_memo_type||d(e.Memo.MemoType),format:e.Memo.parsed_memo_format||d(e.Memo.MemoFormat),data:e.Memo.parsed_memo_data||d(e.Memo.MemoData)})}):void 0}var _=r(192),p=r(443),g=r(440),m=r(196),v=r(448);e.exports={parseQuality:i,parseOutcome:h,parseMemos:l,hexToString:d,parseTimestamp:o,adjustQualityForXRP:n,isPartialPayment:u,dropsToXrp:g.common.dropsToXrp,constants:g.common.constants,txFlags:g.common.txFlags,removeUndefined:g.common.removeUndefined,rippleTimeToISO8601:g.common.rippleTimeToISO8601}}).call(t,r(204).Buffer)},function(e,t,r){e.exports.parseBalanceChanges=r(444).parseBalanceChanges,e.exports.parseOrderbookChanges=r(446).parseOrderbookChanges,e.exports.getAffectedAccounts=r(445).getAffectedAccounts},function(e,t,r){function n(e){return new f(e.value||e)}function i(e){return e.newFields.Balance?n(e.newFields.Balance):e.previousFields.Balance&&e.finalFields.Balance?n(e.finalFields.Balance).minus(n(e.previousFields.Balance)):new f(0)}function o(e){var t=i(e);return t.isZero()?null:{address:e.finalFields.Account||e.newFields.Account,balance_change:{counterparty:"",currency:"XRP",value:d(t).toString()}}}function s(e){var t=new f(e.balance_change.value).negated();return{address:e.balance_change.counterparty,balance_change:{counterparty:e.address,currency:e.balance_change.currency,value:t.toString()}}}function a(e){var t=i(e);if(t.isZero())return null;var r=_.isEmpty(e.newFields)?e.finalFields:e.newFields,n={address:r.LowLimit.issuer,balance_change:{counterparty:r.HighLimit.issuer,currency:r.Balance.currency,value:t.toString()}};return[n,s(n)]}function c(e){var t=_.groupBy(e,function(e){return e.address});return _.mapValues(t,function(e){return _.map(e,function(e){return e.balance_change})})}function u(e){var t=h(e).map(function(e){return"AccountRoot"===e.entryType?[o(e)]:"RippleState"===e.entryType?a(e):[]});return c(_.compact(_.flatten(t)))}var _=r(192),f=r(196),h=r(445).normalizeNodes,d=r(445).dropsToXRP;e.exports.parseBalanceChanges=u},function(e,t,r){"use strict";function n(e){return e.dividedBy(1e6)}function i(e){var t=Object.keys(e)[0],r=e[t];return{diffType:t,entryType:r.LedgerEntryType,ledgerIndex:r.LedgerIndex,newFields:r.NewFields||{},finalFields:r.FinalFields||{},previousFields:r.PreviousFields||{}}}function o(e){return e.AffectedNodes?e.AffectedNodes.map(i):[]}function s(e){return void 0!==e?"string"==typeof e?{currency:"XRP",value:n(new f(e)).toString()}:{currency:e.currency,counterparty:e.issuer,value:e.value}:void 0}function a(e){var t=["Account","Owner","Destination","Issuer","Target"];return _.includes(t,e)}function c(e){var t=["LowLimit","HighLimit","TakerPays","TakerGets"];return _.includes(t,e)}function u(e){var t=[];return _.forEach(o(e),function(e){var r="CreatedNode"===e.diffType?e.newFields:e.finalFields;_.forEach(r,function(e,r){a(r)?t.push(e):c(r)&&e.issuer&&t.push(e.issuer)})}),_.uniq(t)}var _=r(192),f=r(196);e.exports={dropsToXRP:n,normalizeNodes:o,parseCurrencyAmount:s,getAffectedAccounts:u}},function(e,t,r){"use strict";function n(e){return _.omit(e,_.isUndefined)}function i(e){var t=e.taker_gets,r=e.taker_pays,i=e.sell?"sell":"buy",o="buy"===i?r:t,s="buy"===i?t:r;return n({direction:i,quantity:o,totalPrice:s,sequence:e.sequence,status:e.status,makerExchangeRate:e.quality,expirationTime:e.expiration})}function o(e){return 1e3*(e+946684800)}function s(e){var t=e.finalFields.Expiration||e.newFields.Expiration;if(void 0!==t)return new Date(o(t)).toISOString()}function a(e){var t=e.finalFields.TakerGets||e.newFields.TakerGets,r=e.finalFields.TakerPays||e.newFields.TakerPays,n=t.currency||"XRP",i=r.currency||"XRP",o=e.finalFields.BookDirectory||e.newFields.BookDirectory,s=o.substring(o.length-16);return m(s,n,i)}function c(e){return"CreatedNode"===e.diffType?"created":"ModifiedNode"===e.diffType?"partially-filled":"DeletedNode"===e.diffType?e.previousFields.hasOwnProperty("TakerPays")?"filled":"cancelled":void 0}function u(e,t){if(t){var r=new g(e.value),n=new g(t.value);return r.minus(n).abs().toString()}return"0"}function f(e,t){var r=c(e);if("cancelled"===r)return l.parseCurrencyAmount(e.finalFields[t]);if("created"===r)return l.parseCurrencyAmount(e.newFields[t]);var n=l.parseCurrencyAmount(e.finalFields[t]),i=l.parseCurrencyAmount(e.previousFields[t]),o=u(n,i);return _.assign({},n,{value:o})}function h(e){var t=i({taker_pays:f(e,"TakerPays"),taker_gets:f(e,"TakerGets"),sell:0!==(e.finalFields.Flags&v),sequence:e.finalFields.Sequence||e.newFields.Sequence,status:c(e),quality:a(e),expiration:s(e)});return Object.defineProperty(t,"account",{value:e.finalFields.Account||e.newFields.Account}),t}function d(e){return _.groupBy(e,function(e){return e.account})}var _=r(192),l=r(445),p=r(196),g=p.another({DECIMAL_PLACES:40}),m=r(447),v=131072;t.parseOrderbookChanges=function(e){var t=l.normalizeNodes(e),r=_.map(_.filter(t,function(e){return"Offer"===e.entryType}),h);return d(r)}},function(e,t,r){"use strict";function n(e,t,r){var n="XRP"===r?-6:0,i="XRP"===t?-6:0,o=n-i;return 0===o?new s(e).toString():new s(e).shift(o).toString()}function i(e,t,r){o(16===e.length);var i=new s(e.substring(2),16),a=parseInt(e.substring(0,2),16)-100,c=i.toString()+"e"+a.toString();return n(c,t,r)}var o=r(198),s=r(196);e.exports=i},function(e,t,r){"use strict";function n(e){return"string"==typeof e?{currency:"XRP",value:i.common.dropsToXrp(e)}:{currency:e.currency,value:e.value,counterparty:e.issuer}}var i=r(440);e.exports=n},function(e,t,r){"use strict";function n(e){return 0!==(e.Flags&f.Payment.NoRippleDirect)}function i(e){return 0!==(e.Flags&f.Payment.LimitQuality)}function o(e,t){return e.counterparty===t?_.omit(e,"counterparty"):e}function s(e){a("Payment"===e.TransactionType);var t={address:e.Account,maxAmount:o(u(e.SendMax||e.Amount),e.Account),tag:e.SourceTag},r={address:e.Destination,amount:o(u(e.Amount),e.Destination),tag:e.DestinationTag};return c.removeUndefined({source:c.removeUndefined(t),destination:c.removeUndefined(r),memos:c.parseMemos(e),invoiceID:e.InvoiceID,paths:e.Paths?JSON.stringify(e.Paths):void 0,allowPartialPayment:c.isPartialPayment(e)||void 0,noDirectRipple:n(e)||void 0,limitQuality:i(e)||void 0})}var _=r(192),a=r(198),c=r(442),u=r(448),f=c.txFlags;e.exports=s},function(e,t,r){"use strict";function n(e,t,r){return e&t?!0:e&r?!1:void 0}function i(e){return o("TrustSet"===e.TransactionType),s.removeUndefined({limit:e.LimitAmount.value,currency:e.LimitAmount.currency,counterparty:e.LimitAmount.issuer,qualityIn:s.parseQuality(e.QualityIn),qualityOut:s.parseQuality(e.QualityOut),ripplingDisabled:n(e.Flags,a.SetNoRipple,a.ClearNoRipple),frozen:n(e.Flags,a.SetFreeze,a.ClearFreeze),authorized:n(e.Flags,a.SetAuth,0)})}var o=r(198),s=r(442),a=s.txFlags.TrustSet;e.exports=i},function(e,t,r){"use strict";function n(e){i("OfferCreate"===e.TransactionType);var t=0===(e.Flags&a.Sell)?"buy":"sell",r=s(e.TakerGets),n=s(e.TakerPays),c="buy"===t?n:r,u="buy"===t?r:n;return o.removeUndefined({direction:t,quantity:c,totalPrice:u,passive:0!==(e.Flags&a.Passive)||void 0,immediateOrCancel:0!==(e.Flags&a.ImmediateOrCancel)||void 0,fillOrKill:0!==(e.Flags&a.FillOrKill)||void 0,expirationTime:o.parseTimestamp(e.Expiration)})}var i=r(198),o=r(442),s=r(448),a=o.txFlags.OfferCreate;e.exports=n},function(e,t,r){"use strict";function n(e){return i("OfferCancel"===e.TransactionType),{orderSequence:e.OfferSequence}}var i=r(198);e.exports=n},function(e,t,r){"use strict";function n(e){var t=e.meta.AffectedNodes.filter(function(e){return"AccountRoot"===e.ModifiedNode.LedgerEntryType});return s(1===t.length),t[0].ModifiedNode}function i(e){var t={};if("AccountSet"!==e.TransactionType)return t;var r=n(e),i=_.get(r.PreviousFields,"Flags"),o=_.get(r.FinalFields,"Flags");void 0!==i&&void 0!==o&&!function(){var e=i^o,r=o&e,n=i&e;_.forEach(a,function(e,i){r&e?t[i]=!0:n&e&&(t[i]=!1)})}();var s=_.get(r.PreviousFields,"AccountTxnID"),c=_.get(r.FinalFields,"AccountTxnID");return c&&!s?t.enableTransactionIDTracking=!0:s&&!c&&(t.enableTransactionIDTracking=!1),t}function o(e){var t=e.TransactionType;return s("AccountSet"===t||"SetRegularKey"===t||"SignerListSet"===t),_.assign({},i(e),c(e))}var _=r(192),s=r(198),a=r(442).constants.AccountFlags,c=r(454);e.exports=o},function(e,t,r){(function(t){"use strict";function n(e,r){return"hex"!==e.encoding||e.length?e.shift?new o(r).shift(-e.shift).toNumber():r:new t(r,"hex").toString("ascii")}function i(e){var t={};for(var r in s){var i=e[r];if(void 0!==i){var o=s[r];t[o.name]=n(o,i)}}return e.RegularKey&&(t.regularKey=e.RegularKey),(e.SignerQuorum||e.SignerEntries)&&(t.signers={},e.SignerQuorum&&(t.signers.threshold=e.SignerQuorum),e.SignerEntries&&(t.signers.weights=_.map(e.SignerEntries,function(e){return{address:e.SignerEntry.Account,weight:e.SignerEntry.SignerWeight}}))),t}var _=r(192),o=r(196),s=r(442).constants.AccountFields;e.exports=i}).call(t,r(204).Buffer)},function(e,t,r){"use strict";function n(e,t){return e.counterparty===t?_.omit(e,"counterparty"):e}function i(e){o("SuspendedPaymentCreate"===e.TransactionType);var t={address:e.Account,maxAmount:n(a(e.SendMax||e.Amount),e.Account),tag:e.SourceTag},r={address:e.Destination,amount:n(a(e.Amount),e.Destination),tag:e.DestinationTag};return s.removeUndefined({source:s.removeUndefined(t),destination:s.removeUndefined(r),memos:s.parseMemos(e),digest:e.Digest,allowCancelAfter:s.parseTimestamp(e.CancelAfter),allowExecuteAfter:s.parseTimestamp(e.FinishAfter)})}var _=r(192),o=r(198),s=r(442),a=r(448);e.exports=i},function(e,t,r){"use strict";function n(e){return i("SuspendedPaymentFinish"===e.TransactionType),o.removeUndefined({memos:o.parseMemos(e),owner:e.Owner,suspensionSequence:e.OfferSequence,method:e.Method,digest:e.Digest,proof:e.Proof?o.hexToString(e.Proof):void 0})}var i=r(198),o=r(442);e.exports=n},function(e,t,r){"use strict";function n(e){return i("SuspendedPaymentCancel"===e.TransactionType),o.removeUndefined({memos:o.parseMemos(e),owner:e.Owner,suspensionSequence:e.OfferSequence})}var i=r(198),o=r(442);e.exports=n},function(e,t,r){"use strict";function n(e){var t=new i(e.BaseFee,16).toString();return{baseFeeXRP:s(t),referenceFeeUnits:e.ReferenceFeeUnits,reserveBaseXRP:s(e.ReserveBase),reserveIncrementXRP:s(e.ReserveIncrement)}}var i=r(196),o=r(442),s=o.dropsToXrp;e.exports=n},function(e,t){"use strict";function r(e){return{amendment:e.Amendment}}e.exports=r},function(e,t,r){"use strict";function n(e){var t=p.decode(e.tx_blob);return t.hash=m(t),t.ledger_index=e.ledger_index,{tx:t,meta:p.decode(e.meta),validated:e.validated}}function i(e){var t=e.tx_blob?n(e):e;return y(_.assign({},t.tx,{meta:t.meta,validated:t.validated}))}function o(e,t){return!!(t.address===e.counterparty||t.specification&&(t.specification.destination&&t.specification.destination.address===e.counterparty||t.specification.counterparty===e.counterparty))}function s(e,t,r){return t.excludeFailures&&"tesSUCCESS"!==r.outcome.result?!1:t.types&&!_.includes(t.types,r.type)?!1:t.initiated===!0&&r.address!==e?!1:t.initiated===!1&&r.address===e?!1:!t.counterparty||o(t,r)}function a(e,t){return!e.startTx||(e.earliestFirst?v.compareTransactions(t,e.startTx)>0:v.compareTransactions(t,e.startTx)<0)}function c(e,t,r){return{marker:r.marker,results:r.transactions.filter(function(e){return e.validated}).map(i).filter(_.partial(s,e,t)).filter(_.partial(a,t))}}function u(e,t,r,n,i){var o={command:"account_tx",account:t,ledger_index_min:r.minLedgerVersion||-1,ledger_index_max:r.maxLedgerVersion||-1,forward:r.earliestFirst,binary:r.binary,limit:v.clamp(i,10,400),marker:n};return e.request(o).then(function(e){return c(t,r,e)})}function f(e,t,r){var n=t.minLedgerVersion,i=t.maxLedgerVersion;return t.limit&&r.length===t.limit&&(t.earliestFirst?i=_.last(r).outcome.ledgerVersion:n=_.last(r).outcome.ledgerVersion),v.hasCompleteLedgerRange(e,n,i).then(function(e){if(!e)throw new v.common.errors.MissingLedgerHistoryError})}function h(e,t,r){var n=t.earliestFirst?v.compareTransactions:_.rearg(v.compareTransactions,1,0),i=r.sort(n);return f(e,t,i).then(function(){return i})}function d(e,t,r){var n=_.partial(u,e,t,r),i=_.partial(h,e,r);return v.getRecursive(n,r.limit).then(i)}function l(e){var t=this,r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];w.getTransactions({address:e,options:r});var n={maxLedgerVersion:-1};if(r.start)return b.call(this,r.start).then(function(i){var o=i.outcome.ledgerVersion,s=r.earliestFirst?{minLedgerVersion:o}:{maxLedgerVersion:o},a=_.assign({},n,r,{startTx:i},s);return d(t.connection,e,a)});var i=_.assign({},n,r);return d(this.connection,e,i)}var _=r(192),p=r(461),g=r(567),m=g.computeTransactionHash,v=r(440),y=r(441),b=r(439),w=v.common.validate;e.exports=l},function(e,t,r){"use strict";function n(e){return u("string"==typeof e,"binary must be a hex string"),m(e)}function i(e){return u("object"==typeof e),l(v(e))}function o(e){return u("object"==typeof e),l(p(e))}function s(e,t){return u("object"==typeof e),u.equal(e.SigningPubKey,""),l(g(e,t))}function a(e){return u("string"==typeof e),l(h.encode(e))}function c(e){return u("string"==typeof e),h.decode(e).toString()}var u=r(198),f=r(462),h=f.quality,d=f.binary,l=d.bytesToHex,p=d.signingData,g=d.multiSigningData,m=d.binaryToJSON,v=d.serializeObject;e.exports={decode:n,encode:i,encodeForSigning:o,encodeForMultisigning:s,encodeQuality:a,decodeQuality:c}},function(e,t,r){"use strict";var _=r(192),n=r(463),i=n.Field,o=r(515),s=r(546),a=r(563),c=a.ShaMap,u=r(564),f=r(549),h=r(565),d=r(566),l=r(547),p=l.HashPrefix;e.exports=_.assign({hashes:_.assign({},f,u),binary:s,enums:n,signing:d,quality:h,Field:i,HashPrefix:p,ShaMap:c},o)},function(e,t,r){"use strict";function n(e,t){return _.transform(t,e)}function i(e,t){return _.transform(e,function(e,r,n){e[n]=r,e[r[t]]=r})}function o(e,t){return d({inherits:p,statics:_.assign(t,{enumName:e})})}function s(e,t,r){e[r]=o(r,t)}var a=r(464)["default"],c=r(198),_=r(192),u=r(506),f=u.parseBytes,h=u.serializeUIntN,d=r(507),l=r(514),p=d({EnumType:function(e){_.assign(this,e),c(this.bytes instanceof Uint8Array),c("number"==typeof this.ordinal),c("string"==typeof this.name)},toString:function(){return this.name},toJSON:function(){return this.name},toBytesSink:function(e){e.put(this.bytes)},statics:{ordinalByteWidth:1,fromParser:function(e){return this.from(e.readUIntN(this.ordinalByteWidth))},from:function(e){var t=e instanceof this?e:this[e];if(!t)throw new Error(e+" is not a valid name or ordinal for "+this.enumName);return t},valuesByName:function(){var e=this;return _.transform(this.initVals,function(t,r,n){var i=h(r,e.ordinalByteWidth),o=new e({name:n,ordinal:r,bytes:i});t[n]=o})},init:function(){var e=this.valuesByName();return _.assign(this,i(e,"ordinal")),this.values=_.values(e),this}}}),g=n(s,{Type:{initVals:l.TYPES},LedgerEntryType:{initVals:l.LEDGER_ENTRY_TYPES,ordinalByteWidth:2},TransactionType:{initVals:l.TRANSACTION_TYPES,ordinalByteWidth:2},TransactionResult:{initVals:l.TRANSACTION_RESULTS,ordinalByteWidth:1}});g.Field=d({inherits:p,statics:{enumName:"Field",initVals:l.FIELDS,valuesByName:function(){var e=this,t=_.map(this.initVals,function(t){var r=a(t,2),n=r[0],i=r[1],o=g.Type[i.type],s=e.header(o.ordinal,i.nth),c=o.ordinal<<16|i.nth,u={ordinal:c,name:n,type:o,bytes:s};return new e(_.assign(i,u))});return _.indexBy(t,"name")},header:function m(e,t){var r=t,m=[],n=m.push.bind(m);return 16>e?16>r?n(e<<4|r):n(e<<4,r):16>r?n(r,e):n(0,e,r),f(m,Uint8Array)}}}),e.exports=g},function(e,t,r){"use strict";var n=r(465)["default"],i=r(503)["default"];t["default"]=function(){function e(e,t){var r=[],i=!0,o=!1,s=void 0;try{for(var a,c=n(e);!(i=(a=c.next()).done)&&(r.push(a.value),!t||r.length!==t);i=!0);}catch(u){o=!0,s=u}finally{try{!i&&c["return"]&&c["return"]()}finally{if(o)throw s}}return r}return function(t,r){if(Array.isArray(t))return t;if(i(Object(t)))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),t.__esModule=!0},function(e,t,r){e.exports={"default":r(466),__esModule:!0}},function(e,t,r){r(467),r(495),e.exports=r(498)},function(e,t,r){r(468);var n=r(471);n.NodeList=n.HTMLCollection=n.Array},function(e,t,r){"use strict";var n=r(469),i=r(470),o=r(471),s=r(472);e.exports=r(476)(Array,"Array",function(e,t){this._t=s(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,r):"values"==t?i(0,e[r]):i(0,[r,e[r]])},"values"),o.Arguments=o.Array,n("keys"),n("values"),n("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t){e.exports={}},function(e,t,r){var n=r(473),i=r(475);e.exports=function(e){return n(i(e))}},function(e,t,r){var n=r(474);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},function(e,t,r){"use strict";var n=r(477),i=r(478),o=r(483),s=r(484),a=r(489),c=r(471),u=r(490),f=r(491),h=r(485).getProto,d=r(492)("iterator"),l=!([].keys&&"next"in[].keys()),p="@@iterator",g="keys",m="values",v=function(){return this};e.exports=function(e,t,r,y,b,w,S){u(r,t,y);var x,E,A=function(e){if(!l&&e in O)return O[e];switch(e){case g:return function(){return new r(this,e)};case m:return function(){return new r(this,e)}}return function(){return new r(this,e)}},P=t+" Iterator",T=b==m,I=!1,O=e.prototype,R=O[d]||O[p]||b&&O[b],k=R||A(b);if(R){var L=h(k.call(new e));f(L,P,!0),!n&&a(O,p)&&s(L,d,v),T&&R.name!==m&&(I=!0,k=function(){return R.call(this)})}if(n&&!S||!l&&!I&&O[d]||s(O,d,k),c[t]=k,c[P]=v,b)if(x={values:T?k:A(m),keys:w?k:A(g),entries:T?A("entries"):k},S)for(E in x)E in O||o(O,E,x[E]);else i(i.P+i.F*(l||I),t,x);return x}},function(e,t){e.exports=!0},function(e,t,r){var n=r(479),i=r(480),o=r(481),s="prototype",a=function(e,t,r){var c,u,f,h=e&a.F,d=e&a.G,l=e&a.S,p=e&a.P,g=e&a.B,m=e&a.W,v=d?i:i[t]||(i[t]={}),y=d?n:l?n[t]:(n[t]||{})[s];d&&(r=t);for(c in r)u=!h&&y&&c in y,u&&c in v||(f=u?y[c]:r[c],v[c]=d&&"function"!=typeof y[c]?r[c]:g&&u?o(f,n):m&&y[c]==f?function(e){var t=function(t){return this instanceof e?new e(t):e(t)};return t[s]=e[s],t}(f):p&&"function"==typeof f?o(Function.call,f):f,p&&((v[s]||(v[s]={}))[c]=f))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,e.exports=a},function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(e,t){var r=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=r)},function(e,t,r){var n=r(482);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,r){e.exports=r(484)},function(e,t,r){var n=r(485),i=r(486);e.exports=r(487)?function(e,t,r){return n.setDesc(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t){var r=Object;e.exports={create:r.create,getProto:r.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:r.getOwnPropertyDescriptor,setDesc:r.defineProperty,setDescs:r.defineProperties,getKeys:r.keys,getNames:r.getOwnPropertyNames,getSymbols:r.getOwnPropertySymbols,each:[].forEach}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){e.exports=!r(488)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},function(e,t,r){"use strict";var n=r(485),i=r(486),o=r(491),s={};r(484)(s,r(492)("iterator"),function(){return this}),e.exports=function(e,t,r){e.prototype=n.create(s,{next:i(1,r)}),o(e,t+" Iterator")}},function(e,t,r){var n=r(485).setDesc,i=r(489),o=r(492)("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,o)&&n(e,o,{configurable:!0,value:t})}},function(e,t,r){var n=r(493)("wks"),i=r(494),o=r(479).Symbol;e.exports=function(e){return n[e]||(n[e]=o&&o[e]||(o||i)("Symbol."+e))}},function(e,t,r){var n=r(479),i="__core-js_shared__",o=n[i]||(n[i]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+n).toString(36))}},function(e,t,r){"use strict";var n=r(496)(!0);r(476)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},function(e,t,r){var n=r(497),i=r(475);e.exports=function(e){return function(t,r){var o,s,a=String(i(t)),c=n(r),u=a.length;return 0>c||c>=u?e?"":void 0:(o=a.charCodeAt(c),55296>o||o>56319||c+1===u||(s=a.charCodeAt(c+1))<56320||s>57343?e?a.charAt(c):o:e?a.slice(c,c+2):(o-55296<<10)+(s-56320)+65536)}}},function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},function(e,t,r){var n=r(499),i=r(501);e.exports=r(480).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},function(e,t,r){var n=r(500);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,r){var n=r(502),i=r(492)("iterator"),o=r(471);e.exports=r(480).getIteratorMethod=function(e){return void 0!=e?e[i]||e["@@iterator"]||o[n(e)]:void 0}},function(e,t,r){var n=r(474),i=r(492)("toStringTag"),o="Arguments"==n(function(){return arguments}());e.exports=function(e){var t,r,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=(t=Object(e))[i])?r:o?n(t):"Object"==(s=n(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,r){e.exports={"default":r(504),__esModule:!0}},function(e,t,r){r(467),r(495),e.exports=r(505)},function(e,t,r){var n=r(502),i=r(492)("iterator"),o=r(471);e.exports=r(480).isIterable=function(e){var t=Object(e);return void 0!==t[i]||"@@iterator"in t||o.hasOwnProperty(n(t))}},function(e,t,r){"use strict";function n(e,t){return t>e?-1:e===t?0:1}function i(e){for(var t=Array(e.length),r=e.length-1;r>=0;r--)t[r]=d[e[r]];return t.join("")}function o(e){var t=h[e];if(void 0===t)throw new Error("`"+e+"` is not a valid hex representation of a byte");return t}function s(e){var t=arguments.length<=1||void 0===arguments[1]?Array:arguments[1];if(!e||void 0===e.length)throw new Error(e+" is not a sequence");
  if("string"==typeof e){for(var r=e.length%2,n=new t((e.length+r)/2),i=e.length,s=n.length-1;s>=r;i-=2,s--)n[s]=o(e.slice(i-2,i));return 1===r&&(n[0]=o(e[0])),n}if(e instanceof t)return e;if(t===Uint8Array)return new t(e);for(var a=new t(e.length),i=e.length-1;i>=0;i--)a[i]=e[i];return a}function a(e,t){for(var r=new Uint8Array(t),n=t-1,i=0;t>i;i++)r[n-i]=e>>>8*i&255;return r}function c(e,t){f(e.length===t.length);for(var r=0;r<e.length;r++){var i=n(e[r],t[r]);if(0!==i)return i}return 0}function u(e){var t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],r=arguments.length<=2||void 0===arguments[2]?e.length:arguments[2],n=arguments.length<=3||void 0===arguments[3]?e.constructor:arguments[3];return function(){0>t&&(t+=e.length),0>r&&(r+=e.length);for(var i=r-t,o=new n(i),s=r-1;s>=t;s--)o[s-t]=e[s];return o}()}var f=r(198),h=function(){for(var e={},t=e.reverse=new Array(256),r=0;16>r;r++){var n=r.toString(16).toUpperCase();e[n]=r;for(var i=0;16>i;i++){var o=i.toString(16).toUpperCase(),s=(r<<4)+i,a=n+o;e[a]=s,t[s]=a}}return e}(),d=h.reverse;e.exports={parseBytes:s,bytesToHex:i,slice:u,compareBytes:c,serializeUIntN:a}},function(e,t,r){"use strict";function n(e,t){o(e||{}).forEach(function(r){t(e[r],r)})}function i(e){return Array.isArray(e)?e:[e]}var o=r(508)["default"],_=r(192),s=r(513);e.exports=function(e,t){function r(e,t,r){f[t]=r||e}var o=t||e,a="function"==typeof e?e:null;if(null===a)for(var c in o)if(c[0].match(/[A-Z]/)){a=o[c];break}var u=o.inherits;u&&(null===a&&(a=function(){u.apply(this,arguments)}),s(a,u),_.defaults(a,u)),null===a&&(a=function(){});var f=a.prototype;return(o.getters||[]).forEach(function(e){var t="_"+e;f[e]=function(){return this[t]}}),n(o.virtuals,function(e,t){r(e,t,function(){throw new Error("unimplemented")})}),n(o.methods,r),n(o,function(e,t){_.isFunction(e)&&e!==a&&r(e,t)}),_.assign(a,o.statics),"function"==typeof a.init&&a.init(),n(o.cached,function(e,t){var n="_"+t;r(e,t,function(){var t=this[n];return void 0===t&&(t=this[n]=e.call(this)),t})}),o.mixins&&!function(){var e={};i(o.mixins).reverse().forEach(function(t){_.defaults(e,t)}),_.defaults(f,e)}(),a}},function(e,t,r){e.exports={"default":r(509),__esModule:!0}},function(e,t,r){r(510),e.exports=r(480).Object.keys},function(e,t,r){var n=r(511);r(512)("keys",function(e){return function(t){return e(n(t))}})},function(e,t,r){var n=r(475);e.exports=function(e){return Object(n(e))}},function(e,t,r){var n=r(478),i=r(480),o=r(488);e.exports=function(e,t){var r=(i.Object||{})[e]||Object[e],s={};s[e]=t(r),n(n.S+n.F*o(function(){r(1)}),"Object",s)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t){e.exports={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:{Ticket:84,LedgerHashes:104,EnabledAmendments:102,SignerList:83,Offer:111,AccountRoot:97,RippleState:114,FeeSettings:115,DirectoryNode:100,GeneratorMap:103,Contract:99,Invalid:-1},FIELDS:[["Generic",{nth:0,isVLEncoded:!1,bytes:"E0",isSerialized:!1,isSigningField:!1,type:"Unknown"}],["Invalid",{nth:-1,isVLEncoded:!1,bytes:"FF",isSerialized:!1,isSigningField:!1,type:"Unknown"}],["LedgerEntryType",{nth:1,isVLEncoded:!1,bytes:"11",isSerialized:!0,isSigningField:!0,type:"UInt16"}],["TransactionType",{nth:2,isVLEncoded:!1,bytes:"12",isSerialized:!0,isSigningField:!0,type:"UInt16"}],["SignerWeight",{nth:3,isVLEncoded:!1,bytes:"13",isSerialized:!0,isSigningField:!0,type:"UInt16"}],["Flags",{nth:2,isVLEncoded:!1,bytes:"22",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["SourceTag",{nth:3,isVLEncoded:!1,bytes:"23",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["Sequence",{nth:4,isVLEncoded:!1,bytes:"24",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["PreviousTxnLgrSeq",{nth:5,isVLEncoded:!1,bytes:"25",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["LedgerSequence",{nth:6,isVLEncoded:!1,bytes:"26",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["CloseTime",{nth:7,isVLEncoded:!1,bytes:"27",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["ParentCloseTime",{nth:8,isVLEncoded:!1,bytes:"28",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["SigningTime",{nth:9,isVLEncoded:!1,bytes:"29",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["Expiration",{nth:10,isVLEncoded:!1,bytes:"2A",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["TransferRate",{nth:11,isVLEncoded:!1,bytes:"2B",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["WalletSize",{nth:12,isVLEncoded:!1,bytes:"2C",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["OwnerCount",{nth:13,isVLEncoded:!1,bytes:"2D",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["DestinationTag",{nth:14,isVLEncoded:!1,bytes:"2E",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["HighQualityIn",{nth:16,isVLEncoded:!1,bytes:"2010",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["HighQualityOut",{nth:17,isVLEncoded:!1,bytes:"2011",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["LowQualityIn",{nth:18,isVLEncoded:!1,bytes:"2012",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["LowQualityOut",{nth:19,isVLEncoded:!1,bytes:"2013",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["QualityIn",{nth:20,isVLEncoded:!1,bytes:"2014",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["QualityOut",{nth:21,isVLEncoded:!1,bytes:"2015",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["StampEscrow",{nth:22,isVLEncoded:!1,bytes:"2016",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["BondAmount",{nth:23,isVLEncoded:!1,bytes:"2017",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["LoadFee",{nth:24,isVLEncoded:!1,bytes:"2018",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["OfferSequence",{nth:25,isVLEncoded:!1,bytes:"2019",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["FirstLedgerSequence",{nth:26,isVLEncoded:!1,bytes:"201A",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["LastLedgerSequence",{nth:27,isVLEncoded:!1,bytes:"201B",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["TransactionIndex",{nth:28,isVLEncoded:!1,bytes:"201C",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["OperationLimit",{nth:29,isVLEncoded:!1,bytes:"201D",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["ReferenceFeeUnits",{nth:30,isVLEncoded:!1,bytes:"201E",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["ReserveBase",{nth:31,isVLEncoded:!1,bytes:"201F",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["ReserveIncrement",{nth:32,isVLEncoded:!1,bytes:"2020",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["SetFlag",{nth:33,isVLEncoded:!1,bytes:"2021",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["ClearFlag",{nth:34,isVLEncoded:!1,bytes:"2022",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["SignerQuorum",{nth:35,isVLEncoded:!1,bytes:"2023",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["CancelAfter",{nth:36,isVLEncoded:!1,bytes:"2024",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["FinishAfter",{nth:37,isVLEncoded:!1,bytes:"2025",isSerialized:!0,isSigningField:!0,type:"UInt32"}],["IndexNext",{nth:1,isVLEncoded:!1,bytes:"31",isSerialized:!0,isSigningField:!0,type:"UInt64"}],["IndexPrevious",{nth:2,isVLEncoded:!1,bytes:"32",isSerialized:!0,isSigningField:!0,type:"UInt64"}],["BookNode",{nth:3,isVLEncoded:!1,bytes:"33",isSerialized:!0,isSigningField:!0,type:"UInt64"}],["OwnerNode",{nth:4,isVLEncoded:!1,bytes:"34",isSerialized:!0,isSigningField:!0,type:"UInt64"}],["BaseFee",{nth:5,isVLEncoded:!1,bytes:"35",isSerialized:!0,isSigningField:!0,type:"UInt64"}],["ExchangeRate",{nth:6,isVLEncoded:!1,bytes:"36",isSerialized:!0,isSigningField:!0,type:"UInt64"}],["LowNode",{nth:7,isVLEncoded:!1,bytes:"37",isSerialized:!0,isSigningField:!0,type:"UInt64"}],["HighNode",{nth:8,isVLEncoded:!1,bytes:"38",isSerialized:!0,isSigningField:!0,type:"UInt64"}],["EmailHash",{nth:1,isVLEncoded:!1,bytes:"41",isSerialized:!0,isSigningField:!0,type:"Hash128"}],["LedgerHash",{nth:1,isVLEncoded:!1,bytes:"51",isSerialized:!0,isSigningField:!0,type:"Hash256"}],["ParentHash",{nth:2,isVLEncoded:!1,bytes:"52",isSerialized:!0,isSigningField:!0,type:"Hash256"}],["TransactionHash",{nth:3,isVLEncoded:!1,bytes:"53",isSerialized:!0,isSigningField:!0,type:"Hash256"}],["AccountHash",{nth:4,isVLEncoded:!1,bytes:"54",isSerialized:!0,isSigningField:!0,type:"Hash256"}],["PreviousTxnID",{nth:5,isVLEncoded:!1,bytes:"55",isSerialized:!0,isSigningField:!0,type:"Hash256"}],["LedgerIndex",{nth:6,isVLEncoded:!1,bytes:"56",isSerialized:!0,isSigningField:!0,type:"Hash256"}],["WalletLocator",{nth:7,isVLEncoded:!1,bytes:"57",isSerialized:!0,isSigningField:!0,type:"Hash256"}],["RootIndex",{nth:8,isVLEncoded:!1,bytes:"58",isSerialized:!0,isSigningField:!0,type:"Hash256"}],["AccountTxnID",{nth:9,isVLEncoded:!1,bytes:"59",isSerialized:!0,isSigningField:!0,type:"Hash256"}],["BookDirectory",{nth:16,isVLEncoded:!1,bytes:"5010",isSerialized:!0,isSigningField:!0,type:"Hash256"}],["InvoiceID",{nth:17,isVLEncoded:!1,bytes:"5011",isSerialized:!0,isSigningField:!0,type:"Hash256"}],["Nickname",{nth:18,isVLEncoded:!1,bytes:"5012",isSerialized:!0,isSigningField:!0,type:"Hash256"}],["Amendment",{nth:19,isVLEncoded:!1,bytes:"5013",isSerialized:!0,isSigningField:!0,type:"Hash256"}],["TicketID",{nth:20,isVLEncoded:!1,bytes:"5014",isSerialized:!0,isSigningField:!0,type:"Hash256"}],["Digest",{nth:21,isVLEncoded:!1,bytes:"5015",isSerialized:!0,isSigningField:!0,type:"Hash256"}],["hash",{nth:257,isVLEncoded:!1,bytes:"5001",isSerialized:!1,isSigningField:!1,type:"Hash256"}],["index",{nth:258,isVLEncoded:!1,bytes:"5002",isSerialized:!1,isSigningField:!1,type:"Hash256"}],["Amount",{nth:1,isVLEncoded:!1,bytes:"61",isSerialized:!0,isSigningField:!0,type:"Amount"}],["Balance",{nth:2,isVLEncoded:!1,bytes:"62",isSerialized:!0,isSigningField:!0,type:"Amount"}],["LimitAmount",{nth:3,isVLEncoded:!1,bytes:"63",isSerialized:!0,isSigningField:!0,type:"Amount"}],["TakerPays",{nth:4,isVLEncoded:!1,bytes:"64",isSerialized:!0,isSigningField:!0,type:"Amount"}],["TakerGets",{nth:5,isVLEncoded:!1,bytes:"65",isSerialized:!0,isSigningField:!0,type:"Amount"}],["LowLimit",{nth:6,isVLEncoded:!1,bytes:"66",isSerialized:!0,isSigningField:!0,type:"Amount"}],["HighLimit",{nth:7,isVLEncoded:!1,bytes:"67",isSerialized:!0,isSigningField:!0,type:"Amount"}],["Fee",{nth:8,isVLEncoded:!1,bytes:"68",isSerialized:!0,isSigningField:!0,type:"Amount"}],["SendMax",{nth:9,isVLEncoded:!1,bytes:"69",isSerialized:!0,isSigningField:!0,type:"Amount"}],["DeliverMin",{nth:10,isVLEncoded:!1,bytes:"6A",isSerialized:!0,isSigningField:!0,type:"Amount"}],["MinimumOffer",{nth:16,isVLEncoded:!1,bytes:"6010",isSerialized:!0,isSigningField:!0,type:"Amount"}],["RippleEscrow",{nth:17,isVLEncoded:!1,bytes:"6011",isSerialized:!0,isSigningField:!0,type:"Amount"}],["DeliveredAmount",{nth:18,isVLEncoded:!1,bytes:"6012",isSerialized:!0,isSigningField:!0,type:"Amount"}],["taker_gets_funded",{nth:258,isVLEncoded:!1,bytes:"6002",isSerialized:!1,isSigningField:!1,type:"Amount"}],["taker_pays_funded",{nth:259,isVLEncoded:!1,bytes:"6003",isSerialized:!1,isSigningField:!1,type:"Amount"}],["PublicKey",{nth:1,isVLEncoded:!0,bytes:"71",isSerialized:!0,isSigningField:!0,type:"Blob"}],["MessageKey",{nth:2,isVLEncoded:!0,bytes:"72",isSerialized:!0,isSigningField:!0,type:"Blob"}],["SigningPubKey",{nth:3,isVLEncoded:!0,bytes:"73",isSerialized:!0,isSigningField:!0,type:"Blob"}],["TxnSignature",{nth:4,isVLEncoded:!0,bytes:"74",isSerialized:!0,isSigningField:!1,type:"Blob"}],["Generator",{nth:5,isVLEncoded:!0,bytes:"75",isSerialized:!0,isSigningField:!0,type:"Blob"}],["Signature",{nth:6,isVLEncoded:!0,bytes:"76",isSerialized:!0,isSigningField:!0,type:"Blob"}],["Domain",{nth:7,isVLEncoded:!0,bytes:"77",isSerialized:!0,isSigningField:!0,type:"Blob"}],["FundCode",{nth:8,isVLEncoded:!0,bytes:"78",isSerialized:!0,isSigningField:!0,type:"Blob"}],["RemoveCode",{nth:9,isVLEncoded:!0,bytes:"79",isSerialized:!0,isSigningField:!0,type:"Blob"}],["ExpireCode",{nth:10,isVLEncoded:!0,bytes:"7A",isSerialized:!0,isSigningField:!0,type:"Blob"}],["CreateCode",{nth:11,isVLEncoded:!0,bytes:"7B",isSerialized:!0,isSigningField:!0,type:"Blob"}],["MemoType",{nth:12,isVLEncoded:!0,bytes:"7C",isSerialized:!0,isSigningField:!0,type:"Blob"}],["MemoData",{nth:13,isVLEncoded:!0,bytes:"7D",isSerialized:!0,isSigningField:!0,type:"Blob"}],["MemoFormat",{nth:14,isVLEncoded:!0,bytes:"7E",isSerialized:!0,isSigningField:!0,type:"Blob"}],["Proof",{nth:17,isVLEncoded:!0,bytes:"7011",isSerialized:!0,isSigningField:!0,type:"Blob"}],["Account",{nth:1,isVLEncoded:!0,bytes:"81",isSerialized:!0,isSigningField:!0,type:"AccountID"}],["Owner",{nth:2,isVLEncoded:!0,bytes:"82",isSerialized:!0,isSigningField:!0,type:"AccountID"}],["Destination",{nth:3,isVLEncoded:!0,bytes:"83",isSerialized:!0,isSigningField:!0,type:"AccountID"}],["Issuer",{nth:4,isVLEncoded:!0,bytes:"84",isSerialized:!0,isSigningField:!0,type:"AccountID"}],["Target",{nth:7,isVLEncoded:!0,bytes:"87",isSerialized:!0,isSigningField:!0,type:"AccountID"}],["RegularKey",{nth:8,isVLEncoded:!0,bytes:"88",isSerialized:!0,isSigningField:!0,type:"AccountID"}],["ObjectEndMarker",{nth:1,isVLEncoded:!1,bytes:"E1",isSerialized:!0,isSigningField:!0,type:"STObject"}],["TransactionMetaData",{nth:2,isVLEncoded:!1,bytes:"E2",isSerialized:!0,isSigningField:!0,type:"STObject"}],["CreatedNode",{nth:3,isVLEncoded:!1,bytes:"E3",isSerialized:!0,isSigningField:!0,type:"STObject"}],["DeletedNode",{nth:4,isVLEncoded:!1,bytes:"E4",isSerialized:!0,isSigningField:!0,type:"STObject"}],["ModifiedNode",{nth:5,isVLEncoded:!1,bytes:"E5",isSerialized:!0,isSigningField:!0,type:"STObject"}],["PreviousFields",{nth:6,isVLEncoded:!1,bytes:"E6",isSerialized:!0,isSigningField:!0,type:"STObject"}],["FinalFields",{nth:7,isVLEncoded:!1,bytes:"E7",isSerialized:!0,isSigningField:!0,type:"STObject"}],["NewFields",{nth:8,isVLEncoded:!1,bytes:"E8",isSerialized:!0,isSigningField:!0,type:"STObject"}],["TemplateEntry",{nth:9,isVLEncoded:!1,bytes:"E9",isSerialized:!0,isSigningField:!0,type:"STObject"}],["Memo",{nth:10,isVLEncoded:!1,bytes:"EA",isSerialized:!0,isSigningField:!0,type:"STObject"}],["SignerEntry",{nth:11,isVLEncoded:!1,bytes:"EB",isSerialized:!0,isSigningField:!0,type:"STObject"}],["Signer",{nth:16,isVLEncoded:!1,bytes:"E010",isSerialized:!0,isSigningField:!0,type:"STObject"}],["ArrayEndMarker",{nth:1,isVLEncoded:!1,bytes:"F1",isSerialized:!0,isSigningField:!0,type:"STArray"}],["Signers",{nth:3,isVLEncoded:!1,bytes:"F3",isSerialized:!0,isSigningField:!1,type:"STArray"}],["SignerEntries",{nth:4,isVLEncoded:!1,bytes:"F4",isSerialized:!0,isSigningField:!0,type:"STArray"}],["Template",{nth:5,isVLEncoded:!1,bytes:"F5",isSerialized:!0,isSigningField:!0,type:"STArray"}],["Necessary",{nth:6,isVLEncoded:!1,bytes:"F6",isSerialized:!0,isSigningField:!0,type:"STArray"}],["Sufficient",{nth:7,isVLEncoded:!1,bytes:"F7",isSerialized:!0,isSigningField:!0,type:"STArray"}],["AffectedNodes",{nth:8,isVLEncoded:!1,bytes:"F8",isSerialized:!0,isSigningField:!0,type:"STArray"}],["Memos",{nth:9,isVLEncoded:!1,bytes:"F9",isSerialized:!0,isSigningField:!0,type:"STArray"}],["CloseResolution",{nth:1,isVLEncoded:!1,bytes:"0110",isSerialized:!0,isSigningField:!0,type:"UInt8"}],["Method",{nth:2,isVLEncoded:!1,bytes:"0210",isSerialized:!0,isSigningField:!0,type:"UInt8"}],["TransactionResult",{nth:3,isVLEncoded:!1,bytes:"0310",isSerialized:!0,isSigningField:!0,type:"UInt8"}],["TakerPaysCurrency",{nth:1,isVLEncoded:!1,bytes:"0111",isSerialized:!0,isSigningField:!0,type:"Hash160"}],["TakerPaysIssuer",{nth:2,isVLEncoded:!1,bytes:"0211",isSerialized:!0,isSigningField:!0,type:"Hash160"}],["TakerGetsCurrency",{nth:3,isVLEncoded:!1,bytes:"0311",isSerialized:!0,isSigningField:!0,type:"Hash160"}],["TakerGetsIssuer",{nth:4,isVLEncoded:!1,bytes:"0411",isSerialized:!0,isSigningField:!0,type:"Hash160"}],["Paths",{nth:1,isVLEncoded:!1,bytes:"0112",isSerialized:!0,isSigningField:!0,type:"PathSet"}],["Indexes",{nth:1,isVLEncoded:!0,bytes:"0113",isSerialized:!0,isSigningField:!0,type:"Vector256"}],["Hashes",{nth:2,isVLEncoded:!0,bytes:"0213",isSerialized:!0,isSigningField:!0,type:"Vector256"}],["Features",{nth:3,isVLEncoded:!0,bytes:"0313",isSerialized:!0,isSigningField:!0,type:"Vector256"}],["Transaction",{nth:1,isVLEncoded:!1,bytes:"0111",isSerialized:!1,isSigningField:!1,type:"Transaction"}],["LedgerEntry",{nth:1,isVLEncoded:!1,bytes:"0112",isSerialized:!1,isSigningField:!1,type:"LedgerEntry"}],["Validation",{nth:1,isVLEncoded:!1,bytes:"0113",isSerialized:!1,isSigningField:!1,type:"Validation"}]],"date-generated":"Fri Sep 11 11:35:38 ICT 2015",TRANSACTION_RESULTS:{tecINSUFFICIENT_RESERVE:141,telNO_DST_PARTIAL:-393,tecUNFUNDED_PAYMENT:104,tecNO_TARGET:138,temBAD_SRC_ACCOUNT:-281,tefPAST_SEQ:-189,terNO_ACCOUNT:-96,temREDUNDANT:-275,tefCREATED:-194,temDST_IS_SRC:-279,terRETRY:-99,temINVALID_FLAG:-276,temBAD_SEND_XRP_LIMIT:-288,terNO_LINE:-94,tefBAD_AUTH:-196,temBAD_EXPIRATION:-295,tecNO_ISSUER:133,temBAD_SEND_XRP_NO_DIRECT:-286,temBAD_SEND_XRP_PATHS:-284,tefBAD_LEDGER:-195,tefNO_AUTH_REQUIRED:-190,tecINSUF_RESERVE_LINE:122,terOWNERS:-93,tecNO_REGULAR_KEY:131,tecINSUFF_FEE:136,tecNO_ALTERNATIVE_KEY:130,tecNO_ENTRY:140,terLAST:-91,terNO_RIPPLE:-90,tecNO_PERMISSION:139,tecNEED_MASTER_KEY:142,temBAD_FEE:-294,terPRE_SEQ:-92,tecOVERSIZE:145,tefMASTER_DISABLED:-187,temBAD_CURRENCY:-296,tefDST_TAG_NEEDED:-193,tecUNFUNDED_ADD:102,tecOWNERS:132,tecNO_LINE_REDUNDANT:127,temBAD_SIGNATURE:-282,tefFAILURE:-199,telBAD_PATH_COUNT:-397,temBAD_TRANSFER_RATE:-280,tefWRONG_PRIOR:-188,tecNO_DST:124,tecNO_AUTH:134,telBAD_DOMAIN:-398,temBAD_AMOUNT:-298,temBAD_AUTH_MASTER:-297,temBAD_LIMIT:-292,temBAD_ISSUER:-293,tecNO_DST_INSUF_XRP:125,tecPATH_PARTIAL:101,telBAD_PUBLIC_KEY:-396,tefBAD_ADD_AUTH:-197,tecDST_TAG_NEEDED:143,temBAD_OFFER:-291,temBAD_SEND_XRP_PARTIAL:-285,temDST_NEEDED:-278,tefALREADY:-198,tecUNFUNDED:129,tecNO_LINE:135,tecFROZEN:137,temUNCERTAIN:-272,tecFAILED_PROCESSING:105,telLOCAL_ERROR:-399,temREDUNDANT_SEND_MAX:-274,tefINTERNAL:-191,temBAD_PATH_LOOP:-289,tecPATH_DRY:128,tefEXCEPTION:-192,tecDIR_FULL:121,tecUNFUNDED_OFFER:103,temRIPPLE_EMPTY:-273,telINSUF_FEE_P:-394,temBAD_SEQUENCE:-283,tefMAX_LEDGER:-186,terFUNDS_SPENT:-98,temBAD_SEND_XRP_MAX:-287,telFAILED_PROCESSING:-395,terINSUF_FEE_B:-97,tecCLAIM:100,tesSUCCESS:0,temBAD_PATH:-290,temMALFORMED:-299,temUNKNOWN:-271,tecINTERNAL:144,temINVALID:-277,tecINSUF_RESERVE_OFFER:123,tecNO_LINE_INSUF_RESERVE:126,terNO_AUTH:-95},TRANSACTION_TYPES:{OfferCancel:8,EnableAmendment:100,SetFee:101,SetRegularKey:5,TicketCreate:10,TicketCancel:11,NickNameSet:6,TrustSet:20,Payment:0,AccountSet:3,OfferCreate:7,SignerListSet:12,Contract:9,SuspendedPaymentCreate:1,SuspendedPaymentFinish:2,SuspendedPaymentCancel:4,Invalid:-1}}},function(e,t,r){"use strict";var n=r(463),i=n.Field,o=r(516),s=o.AccountID,a=r(521),c=a.Amount,u=r(536),f=u.Blob,h=r(533),d=h.Currency,l=r(537),p=l.Hash128,g=r(517),m=g.Hash160,v=r(538),y=v.Hash256,b=r(539),w=b.PathSet,S=r(540),x=S.STArray,E=r(541),A=E.STObject,P=r(542),T=P.UInt16,I=r(543),O=I.UInt32,R=r(534),k=R.UInt64,L=r(544),N=L.UInt8,j=r(545),F=j.Vector256,M={AccountID:s,Amount:c,Blob:f,Currency:d,Hash128:p,Hash160:m,Hash256:y,PathSet:w,STArray:x,STObject:A,UInt8:N,UInt16:T,UInt32:O,UInt64:k,Vector256:F};i.values.forEach(function(e){e.associatedType=M[e.type]}),i.TransactionType.associatedType=n.TransactionType,i.TransactionResult.associatedType=n.TransactionResult,i.LedgerEntryType.associatedType=n.LedgerEntryType,e.exports=M},function(e,t,r){"use strict";var n=r(507),i=r(249),o=i.decodeAccountID,s=i.encodeAccountID,a=r(517),c=a.Hash160,u=n({AccountID:function(e){c.call(this,e)},inherits:c,statics:{from:function(e){return e instanceof this?e:/^r/.test(e)?this.fromBase58(e):new this(e)},cache:{},fromCache:function(e){var t=this.cache[e];return t||(t=this.cache[e]=this.fromBase58(e)),t},fromBase58:function(e){var t=new this(o(e));return t._toBase58=e,t}},toJSON:function(){return this.toBase58()},cached:{toBase58:function(){return s(this._bytes)}}});e.exports={AccountID:u}},function(e,t,r){"use strict";var n=r(507),i=r(518),o=i.Hash,s=n({inherits:o,statics:{width:20}});e.exports={Hash160:s}},function(e,t,r){"use strict";var n=r(198),i=r(507),o=r(519),s=o.Comparable,a=o.SerializedType,c=r(506),u=c.compareBytes,f=c.parseBytes,h=i({Hash:function(e){var t=this.constructor.width;this._bytes=e?f(e,Uint8Array):new Uint8Array(t),n.equal(this._bytes.length,t)},mixins:[s,a],statics:{width:NaN,from:function(e){return e instanceof this?e:new this(f(e))},fromParser:function(e,t){return new this(e.read(t||this.width))}},compareTo:function(e){return u(this._bytes,this.constructor.from(e)._bytes)},toString:function(){return this.toHex()},nibblet:function(e){var t=e>0?e/2|0:0,r=this._bytes[t];return r=e%2===0?(240&r)>>>4:15&r}});e.exports={Hash:h}},function(e,t,r){"use strict";function n(e,t){return{withChildren:function(r){if(t instanceof e)return t;for(var n=new e,i=0;i<t.length;i++)n.push(r.from(t[i]));return n}}}var i=r(506),o=i.bytesToHex,s=i.slice,a=r(520),c=a.BytesList,u={lt:function(e){return this.compareTo(e)<0},eq:function(e){return 0===this.compareTo(e)},gt:function(e){return this.compareTo(e)>0},gte:function(e){return this.compareTo(e)>-1},lte:function(e){return this.compareTo(e)<1}},f={toBytesSink:function(e){e.put(this._bytes)},toHex:function(){return o(this.toBytes())},toBytes:function(){if(this._bytes)return s(this._bytes);var e=new c;return this.toBytesSink(e),e.toBytes()},toJSON:function(){return this.toHex()},toString:function(){return this.toHex()}};e.exports={ensureArrayLikeIs:n,SerializedType:f,Comparable:u}},function(e,t,r){"use strict";var n=r(198),i=r(506),o=i.parseBytes,s=i.bytesToHex,a=r(507),c=r(463),u=c.Type,f=c.Field,h={put:function(){}},d=a({implementing:h,BytesList:function(){this.arrays=[],this.length=0},put:function(e){var t=o(e,Uint8Array);return this.length+=t.length,this.arrays.push(t),this},toBytesSink:function(e){this.arrays.forEach(function(t){e.put(t)})},toBytes:function(){var e=new Uint8Array(this.length),t=0;return this.arrays.forEach(function(r){e.set(r,t),t+=r.length}),e},toHex:function(){return s(this.toBytes())}}),l=a({BinarySerializer:function(e){this.sink=e},write:function(e){e.toBytesSink(this.sink)},put:function(e){this.sink.put(e)},writeType:function(e,t){this.write(e.from(t))},writeBytesList:function(e){e.toBytesSink(this.sink)},encodeVL:function(e){var t=e,r=new Uint8Array(4);if(192>=t)return r[0]=t,r.subarray(0,1);if(12480>=t)return t-=193,r[0]=193+(t>>>8),r[1]=255&t,r.subarray(0,2);if(918744>=t)return t-=12481,r[0]=241+(t>>>16),r[1]=t>>8&255,r[2]=255&t,r.subarray(0,3);throw new Error("Overflow error")},writeFieldAndValue:function(e,t){var r=this.sink,i=e.associatedType.from(t);n(i.toBytesSink,e),r.put(e.bytes),e.isVLEncoded?this.writeLengthEncoded(i):(i.toBytesSink(r),e.type===u.STObject?r.put(f.ObjectEndMarker.bytes):e.type===u.STArray&&r.put(f.ArrayEndMarker.bytes))},writeLengthEncoded:function(e){var t=new d;e.toBytesSink(t),this.put(this.encodeVL(t.length)),this.writeBytesList(t)}});e.exports={BytesList:d,BinarySerializer:l}},function(e,t,r){"use strict";function n(e){return!_.isUndefined(e)}var i=r(522)["default"],o=r(530)["default"],_=r(192),s=r(198),a=r(531),c=r(532),u=r(507),f=r(519),h=f.SerializedType,d=r(506),l=d.bytesToHex,p=r(533),g=p.Currency,m=r(516),v=m.AccountID,y=r(534),b=y.UInt64;c.config({toExpPos:32,toExpNeg:-32});var w={string:function(e){return[new c(e).dividedBy("1e6"),g.XRP]},object:function(e){return s(n(e.currency),"currency must be defined"),s(n(e.issuer),"issuer must be defined"),[new c(e.value),g.from(e.currency),v.from(e.issuer)]}},S=u({Amount:function(e,t,r){this.value=e||new c("0"),this.currency=t||g.XRP,this.issuer=r||null},mixins:h,statics:{from:function(e){if(e instanceof this)return e;var t=w[typeof e];if(t)return new(o.apply(this,[null].concat(i(t(e)))));throw new Error("unsupported value: "+e)},fromParser:function(e){var t=e.read(8),r=t[0],n=t[1],i=128&r,o=64&r,s=o?"+":"-";if(i){t[0]=0;var a=e.readType(g),u=e.readType(v),f=((63&r)<<2)+((255&n)>>6)-97;t[1]&=63;var h=new c(s+l(t),16).times("1e"+f);return new this(h,a,u)}t[0]&=63;var d=new c(s+l(t),16),p=d.dividedBy("1e6");return new this(p,g.XRP)}},isNative:function(){return this.currency.isNative()},mantissa:function(){return new b(new a(this.value.times("1e"+-this.exponent()).abs().toString()))},isZero:function(){return this.value.isZero()},exponent:function(){return this.isNative()?-6:this.value.e-15},valueString:function(){return(this.isNative()?this.value.times("1e6"):this.value).toString()},toBytesSink:function(e){var t=this.isNative(),r=!this.value.isNegative(),n=this.mantissa().toBytes();if(t)n[0]|=r?64:0,e.put(n);else{if(n[0]|=128,!this.isZero()){r&&(n[0]|=64);var i=this.value.e-15,o=97+i;n[0]|=o>>>2,n[1]|=(3&o)<<6}e.put(n),this.currency.toBytesSink(e),this.issuer.toBytesSink(e)}},toJSON:function(){var e=this.valueString();return this.isNative()?e:{value:e,currency:this.currency.toJSON(),issuer:this.issuer.toJSON()}}});e.exports={Amount:S}},function(e,t,r){"use strict";var n=r(523)["default"];t["default"]=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return n(e)},t.__esModule=!0},function(e,t,r){e.exports={"default":r(524),__esModule:!0}},function(e,t,r){r(495),r(525),e.exports=r(480).Array.from},function(e,t,r){"use strict";var n=r(481),i=r(478),o=r(511),s=r(526),a=r(527),c=r(528),u=r(501);i(i.S+i.F*!r(529)(function(e){Array.from(e)}),"Array",{from:function(e){var t,r,i,f,h=o(e),d="function"==typeof this?this:Array,l=arguments,p=l.length,g=p>1?l[1]:void 0,m=void 0!==g,v=0,y=u(h);if(m&&(g=n(g,p>2?l[2]:void 0,2)),void 0==y||d==Array&&a(y))for(t=c(h.length),r=new d(t);t>v;v++)r[v]=m?g(h[v],v):h[v];else for(f=y.call(h),r=new d;!(i=f.next()).done;v++)r[v]=m?s(f,g,[i.value,v],!0):i.value;return r.length=v,r}})},function(e,t,r){var n=r(499);e.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(o){var s=e["return"];throw void 0!==s&&n(s.call(e)),o}}},function(e,t,r){var n=r(471),i=r(492)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||o[i]===e)}},function(e,t,r){var n=r(497),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t,r){var n=r(492)("iterator"),i=!1;try{var o=[7][n]();o["return"]=function(){i=!0},Array.from(o,function(){throw 2})}catch(s){}e.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var o=[7],s=o[n]();s.next=function(){r=!0},o[n]=function(){return s},e(o)}catch(a){}return r}},function(e,t){"use strict";t["default"]=Function.prototype.bind,t.__esModule=!0},function(e,t,r){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){return null!==e&&"object"==typeof e&&Array.isArray(e.words)?e:(this.sign=!1,this.words=null,this.length=0,this.red=null,"le"!==t&&"be"!==t||(r=t,t=10),void(null!==e&&this._init(e||0,t||10,r||"be")))}function o(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;i>o;o++){var s=e.charCodeAt(o)-48;n<<=4,n|=s>=49&&54>=s?s-49+10:s>=17&&22>=s?s-17+10:15&s}return n}function s(e,t,r,n){for(var i=0,o=Math.min(e.length,r),s=t;o>s;s++){var a=e.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}function a(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}function c(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function u(){c.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function f(){c.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function h(){c.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function d(){c.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function l(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else this.m=e,this.prime=null}function p(e){l.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26,i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&36>=t),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.sign=!0),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initNumber=function(e,t,n){0>e&&(this.sign=!0,e=-e),67108864>e?(this.words=[67108863&e],this.length=1):4503599627370496>e?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(9007199254740992>e),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o=0;if("be"===n)for(var i=e.length-1,s=0;i>=0;i-=3){var a=e[i]|e[i-1]<<8|e[i-2]<<16;this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,o+=24,o>=26&&(o-=26,s++)}else if("le"===n)for(var i=0,s=0;i<e.length;i+=3){var a=e[i]|e[i+1]<<8|e[i+2]<<16;this.words[s]|=a<<o&67108863,this.words[s+1]=a>>>26-o&67108863,o+=24,o>=26&&(o-=26,s++)}return this.strip()},i.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;for(var n=0,r=e.length-6,i=0;r>=t;r-=6){var s=o(e,r,r+6);this.words[i]|=s<<n&67108863,this.words[i+1]|=s>>>26-n&4194303,n+=24,n>=26&&(n-=26,i++)}if(r+6!==t){var s=o(e,t,r+6);this.words[i]|=s<<n&67108863,this.words[i+1]|=s>>>26-n&4194303}this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;67108863>=i;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,c=Math.min(o,o-a)+r,u=0,f=r;c>f;f+=n)u=s(e,f,f+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){for(var h=1,u=s(e,f,e.length,t),f=0;a>f;f++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.sign=this.sign,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.sign=!1),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var g=["","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"],m=[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],v=[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];
  i.prototype.toString=function(e,t){e=e||10;var t=0|t||1;if(16===e||"hex"===e){for(var n="",i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],c=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,n=0!==o||s!==this.length-1?g[6-c.length]+c+n:c+n,i+=2,i>=26&&(i-=26,s--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return this.sign&&(n="-"+n),n}if(e===(0|e)&&e>=2&&36>=e){var u=m[e],f=v[e],n="",h=this.clone();for(h.sign=!1;0!==h.cmpn(0);){var d=h.modn(f).toString(e);h=h.idivn(f),n=0!==h.cmpn(0)?g[u-d.length]+d+n:d+n}for(0===this.cmpn(0)&&(n="0"+n);n.length%t!==0;)n="0"+n;return this.sign&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toArray=function(e,t){this.strip();var n="le"===e,i=new Array(this.byteLength());i[0]=0;var o=this.clone();if(n)for(var s=0;0!==o.cmpn(0);s++){var a=o.andln(255);o.iushrn(8),i[s]=a}else for(var s=0;0!==o.cmpn(0);s++){var a=o.andln(255);o.iushrn(8),i[i.length-s-1]=a}if(t)for(r(i.length<=t,"byte array longer than desired length");i.length<t;)n?i.push(0):i.unshift(0);return i},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=0,t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},i.prototype.zeroBits=function(){if(0===this.cmpn(0))return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.neg=function(){if(0===this.cmpn(0))return this.clone();var e=this.clone();return e.sign=!this.sign,e},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return r(!this.sign&&!e.sign),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return r(!this.sign&&!e.sign),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return r(!this.sign&&!e.sign),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);for(var n=e/26|0,i=e%26;this.length<=n;)this.words[this.length++]=0;return t?this.words[n]=this.words[n]|1<<i:this.words[n]=this.words[n]&~(1<<i),this.strip()},i.prototype.iadd=function(e){if(this.sign&&!e.sign){this.sign=!1;var t=this.isub(e);return this.sign=!this.sign,this._normSign()}if(!this.sign&&e.sign){e.sign=!1;var t=this.isub(e);return e.sign=!0,t._normSign()}var r,n;this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++){var t=r.words[o]+n.words[o]+i;this.words[o]=67108863&t,i=t>>>26}for(;0!==i&&o<r.length;o++){var t=r.words[o]+i;this.words[o]=67108863&t,i=t>>>26}if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},i.prototype.add=function(e){if(e.sign&&!this.sign){e.sign=!1;var t=this.sub(e);return e.sign=!0,t}if(!e.sign&&this.sign){this.sign=!1;var t=e.sub(this);return this.sign=!0,t}return this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(e.sign){e.sign=!1;var t=this.iadd(e);return e.sign=!0,t._normSign()}if(this.sign)return this.sign=!1,this.iadd(e),this.sign=!0,this._normSign();var r=this.cmp(e);if(0===r)return this.sign=!1,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=e):(n=e,i=this);for(var o=0,s=0;s<i.length;s++){var t=n.words[s]-i.words[s]+o;o=t>>26,this.words[s]=67108863&t}for(;0!==o&&s<n.length;s++){var t=n.words[s]+o;o=t>>26,this.words[s]=67108863&t}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.sign=!0),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)},i.prototype._smallMulTo=function(e,t){t.sign=e.sign!==this.sign,t.length=this.length+e.length;for(var r=0,n=0;n<t.length-1;n++){for(var i=r>>>26,o=67108863&r,s=Math.min(n,e.length-1),a=Math.max(0,n-this.length+1);s>=a;a++){var c=n-a,u=0|this.words[c],f=0|e.words[a],h=u*f,d=67108863&h;i=i+(h/67108864|0)|0,d=d+o|0,o=67108863&d,i=i+(d>>>26)|0}t.words[n]=o,r=i}return 0!==r?t.words[n]=r:t.length--,t.strip()},i.prototype._bigMulTo=function(e,t){t.sign=e.sign!==this.sign,t.length=this.length+e.length;for(var r=0,n=0,i=0;i<t.length-1;i++){var o=n;n=0;for(var s=67108863&r,a=Math.min(i,e.length-1),c=Math.max(0,i-this.length+1);a>=c;c++){var u=i-c,f=0|this.words[u],h=0|e.words[c],d=f*h,l=67108863&d;o=o+(d/67108864|0)|0,l=l+s|0,s=67108863&l,o=o+(l>>>26)|0,n+=o>>>26,o&=67108863}t.words[i]=s,r=o,o=n}return 0!==r?t.words[i]=r:t.length--,t.strip()},i.prototype.mulTo=function(e,t){var r;return r=this.length+e.length<63?this._smallMulTo(e,t):this._bigMulTo(e,t)},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.imul=function(e){if(0===this.cmpn(0)||0===e.cmpn(0))return this.words[0]=0,this.length=1,this;var t=this.length,r=e.length;this.sign=e.sign!==this.sign,this.length=this.length+e.length,this.words[this.length-1]=0;for(var n=this.length-2;n>=0;n--){for(var i=0,o=0,s=Math.min(n,r-1),a=Math.max(0,n-t+1);s>=a;a++){var c=n-a,u=this.words[c],f=e.words[a],h=u*f,d=67108863&h;i+=h/67108864|0,d+=o,o=67108863&d,i+=d>>>26}this.words[n]=o,this.words[n+1]+=i,i=0}for(var i=0,c=1;c<this.length;c++){var l=this.words[c]+i;this.words[c]=67108863&l,i=l>>>26}return this.strip()},i.prototype.imuln=function(e){r("number"==typeof e);for(var t=0,n=0;n<this.length;n++){var i=this.words[n]*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.mul(this)},i.prototype.pow=function(e){var t=a(e);if(0===t.length)return new i(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var o=r.sqr();n<t.length;n++,o=o.sqr())0!==t[n]&&(r=r.mul(o));return r},i.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=67108863>>>26-t<<26-t;if(0!==t){for(var o=0,s=0;s<this.length;s++){var a=this.words[s]&i,c=this.words[s]-a<<t;this.words[s]=c|o,o=a>>>26-t}o&&(this.words[s]=o,this.length++)}if(0!==n){for(var s=this.length-1;s>=0;s--)this.words[s+n]=this.words[s];for(var s=0;n>s;s++)this.words[s]=0;this.length+=n}return this.strip()},i.prototype.ishln=function(e){return r(!this.sign),this.iushln(e)},i.prototype.iushrn=function(e,t,n){r("number"==typeof e&&e>=0);var i;i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,c=n;if(i-=s,i=Math.max(0,i),c){for(var u=0;s>u;u++)c.words[u]=this.words[u];c.length=s}if(0===s);else if(this.length>s){this.length-=s;for(var u=0;u<this.length;u++)this.words[u]=this.words[u+s]}else this.words[0]=0,this.length=1;for(var f=0,u=this.length-1;u>=0&&(0!==f||u>=i);u--){var h=this.words[u];this.words[u]=f<<26-o|h>>>o,f=h&a}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip(),this},i.prototype.ishrn=function(e,t,n){return r(!this.sign),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return!1;var o=this.words[n];return!!(o&i)},i.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(!this.sign,"imaskn works only with positive numbers"),0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return r("number"==typeof e),0>e?this.isubn(-e):this.sign?1===this.length&&this.words[0]<e?(this.words[0]=e-this.words[0],this.sign=!1,this):(this.sign=!1,this.isubn(e),this.sign=!0,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"==typeof e),0>e)return this.iaddn(-e);if(this.sign)return this.sign=!1,this.iaddn(e),this.sign=!0,this;this.words[0]-=e;for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.sign=!1,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,n){var i,o=e.length+n;if(this.words.length<o){for(var s=new Array(o),i=0;i<this.length;i++)s[i]=this.words[i];this.words=s}else i=this.length;for(this.length=Math.max(this.length,o);i<this.length;i++)this.words[i]=0;for(var a=0,i=0;i<e.length;i++){var c=this.words[i+n]+a,u=e.words[i]*t;c-=67108863&u,a=(c>>26)-(u/67108864|0),this.words[i+n]=67108863&c}for(;i<this.length-n;i++){var c=this.words[i+n]+a;a=c>>26,this.words[i+n]=67108863&c}if(0===a)return this.strip();r(-1===a),a=0;for(var i=0;i<this.length;i++){var c=-this.words[i]+a;a=c>>26,this.words[i]=67108863&c}return this.sign=!0,this.strip()},i.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),o=e,s=o.words[o.length-1],a=this._countBits(s);r=26-a,0!==r&&(o=o.ushln(r),n.iushln(r),s=o.words[o.length-1]);var c,u=n.length-o.length;if("mod"!==t){c=new i(null),c.length=u+1,c.words=new Array(c.length);for(var f=0;f<c.length;f++)c.words[f]=0}var h=n.clone()._ishlnsubmul(o,1,u);h.sign||(n=h,c&&(c.words[u]=1));for(var d=u-1;d>=0;d--){var l=67108864*n.words[o.length+d]+n.words[o.length+d-1];for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(o,l,d);n.sign;)l--,n.sign=!1,n._ishlnsubmul(o,1,d),0!==n.cmpn(0)&&(n.sign=!n.sign);c&&(c.words[d]=l)}return c&&c.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:c?c:null,mod:n}},i.prototype.divmod=function(e,t,n){if(r(0!==e.cmpn(0)),this.sign&&!e.sign){var o,s,a=this.neg().divmod(e,t);return"mod"!==t&&(o=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&s.neg&&(s=s.add(e))),{div:o,mod:s}}if(!this.sign&&e.sign){var o,a=this.divmod(e.neg(),t);return"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}}if(this.sign&&e.sign){var s,a=this.neg().divmod(e.neg(),t);return"div"!==t&&(s=a.mod.neg(),n&&s.neg&&(s=s.isub(e))),{div:a.div,mod:s}}return e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t)},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(0===t.mod.cmpn(0))return t.div;var r=t.div.sign?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return 0>o||1===i&&0===o?t.div:t.div.sign?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){r(67108863>=e);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+this.words[i])%e;return n},i.prototype.idivn=function(e){r(67108863>=e);for(var t=0,n=this.length-1;n>=0;n--){var i=this.words[n]+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(!e.sign),r(0!==e.cmpn(0));var t=this,n=e.clone();t=t.sign?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=new i(0),c=new i(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var f=n.clone(),h=t.clone();0!==t.cmpn(0);){for(;t.isEven();)t.iushrn(1),o.isEven()&&s.isEven()?(o.iushrn(1),s.iushrn(1)):(o.iadd(f).iushrn(1),s.isub(h).iushrn(1));for(;n.isEven();)n.iushrn(1),a.isEven()&&c.isEven()?(a.iushrn(1),c.iushrn(1)):(a.iadd(f).iushrn(1),c.isub(h).iushrn(1));t.cmp(n)>=0?(t.isub(n),o.isub(a),s.isub(c)):(n.isub(t),a.isub(o),c.isub(s))}return{a:a,b:c,gcd:n.iushln(u)}},i.prototype._invmp=function(e){r(!e.sign),r(0!==e.cmpn(0));var t=this,n=e.clone();t=t.sign?t.umod(e):t.clone();for(var o=new i(1),s=new i(0),a=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(;t.isEven();)t.iushrn(1),o.isEven()?o.iushrn(1):o.iadd(a).iushrn(1);for(;n.isEven();)n.iushrn(1),s.isEven()?s.iushrn(1):s.iadd(a).iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s)):(n.isub(t),s.isub(o))}var c;return c=0===t.cmpn(1)?o:s,c.cmpn(0)<0&&c.iadd(e),c},i.prototype.gcd=function(e){if(0===this.cmpn(0))return e.clone();if(0===e.cmpn(0))return this.clone();var t=this.clone(),r=e.clone();t.sign=!1,r.sign=!1;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(0>i){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n){for(var o=this.length;n+1>o;o++)this.words[o]=0;return this.words[n]|=i,this.length=n+1,this}for(var s=i,o=n;0!==s&&o<this.length;o++){var a=this.words[o];a+=s,s=a>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},i.prototype.cmpn=function(e){var t=0>e;if(t&&(e=-e),this.sign&&!t)return-1;if(!this.sign&&t)return 1;e&=67108863,this.strip();var r;if(this.length>1)r=1;else{var n=this.words[0];r=n===e?0:e>n?-1:1}return this.sign&&(r=-r),r},i.prototype.cmp=function(e){if(this.sign&&!e.sign)return-1;if(!this.sign&&e.sign)return 1;var t=this.ucmp(e);return this.sign?-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=this.words[r],i=e.words[r];if(n!==i){i>n?t=-1:n>i&&(t=1);break}}return t},i.red=function(e){return new l(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(!this.sign,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.ushl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};c.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},c.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength();while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},c.prototype.split=function(e,t){e.iushrn(this.n,0,t)},c.prototype.imulK=function(e){return e.imul(this.k)},n(u,c),u.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;n>i;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];t.words[t.length++]=o&r;for(var i=10;i<e.length;i++){var s=e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}e.words[i-10]=o>>>22,e.length-=9},u.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t,r=0,n=0;n<e.length;n++){var i=e.words[n];t=64*i,r+=977*i,t+=r/67108864|0,r&=67108863,e.words[n]=r,r=t}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(f,c),n(h,c),n(d,c),d.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*e.words[r]+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function b(e){if(y[e])return y[e];var b;if("k256"===e)b=new u;else if("p224"===e)b=new f;else if("p192"===e)b=new h;else{if("p25519"!==e)throw new Error("Unknown prime "+e);b=new d}return y[e]=b,b},l.prototype._verify1=function(e){r(!e.sign,"red works only with positives"),r(e.red,"red works only with red numbers")},l.prototype._verify2=function(e,t){r(!e.sign&&!t.sign,"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},l.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},l.prototype.neg=function(e){var t=e.clone();return t.sign=!t.sign,t.iadd(this.m)._forceRed(this)},l.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},l.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},l.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},l.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},l.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},l.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},l.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},l.prototype.isqr=function(e){return this.imul(e,e)},l.prototype.sqr=function(e){return this.mul(e,e)},l.prototype.sqrt=function(e){if(0===e.cmpn(0))return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new i(1)).iushrn(2),o=this.pow(e,n);return o}for(var s=this.m.subn(1),a=0;0!==s.cmpn(0)&&0===s.andln(1);)a++,s.iushrn(1);r(0!==s.cmpn(0));var c=new i(1).toRed(this),u=c.redNeg(),f=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new i(2*h*h).toRed(this);0!==this.pow(h,f).cmp(u);)h.redIAdd(u);for(var d=this.pow(h,s),o=this.pow(e,s.addn(1).iushrn(1)),l=this.pow(e,s),p=a;0!==l.cmp(c);){for(var g=l,m=0;0!==g.cmp(c);m++)g=g.redSqr();r(p>m);var v=this.pow(d,new i(1).iushln(p-m-1));o=o.redMul(v),d=v.redSqr(),l=l.redMul(d),p=m}return o},l.prototype.invm=function(e){var t=e._invmp(this.m);return t.sign?(t.sign=!1,this.imod(t).redNeg()):this.imod(t)},l.prototype.pow=function(e,t){var r=a(t);if(0===r.length)return new i(1);for(var n=e,o=0;o<r.length&&0===r[o];o++,n=this.sqr(n));if(++o<r.length)for(var s=this.sqr(n);o<r.length;o++,s=this.sqr(s))0!==r[o]&&(n=this.mul(n,s));return n},l.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},l.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new p(e)},n(p,l),p.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},p.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},p.prototype.imul=function(e,t){if(0===e.cmpn(0)||0===t.cmpn(0))return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},p.prototype.mul=function(e,t){if(0===e.cmpn(0)||0===t.cmpn(0))return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},p.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}("undefined"==typeof e||e,this)}).call(t,r(233)(e))},function(e,t,r){var n;!function(i){"use strict";function o(e){for(var t,r,n=1,i=e.length,o=e[0]+"";i>n;n++){for(t=e[n]+"",r=T-t.length;r--;)t="0"+t;o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function s(e,t,r,n){var i,o,s,a,c;for(o=1,s=e[0];s>=10;s/=10,o++);return s=t-o,0>s?(s+=T,i=0):(i=Math.ceil((s+1)/T),s%=T),o=E(10,T-s),c=e[i]%o|0,null==n?3>s?(0==s?c=c/100|0:1==s&&(c=c/10|0),a=4>r&&99999==c||r>3&&49999==c||5e4==c||0==c):a=(4>r&&c+1==o||r>3&&c+1==o/2)&&(e[i+1]/o/100|0)==E(10,s-2)-1||(c==o/2||0==c)&&0==(e[i+1]/o/100|0):4>s?(0==s?c=c/1e3|0:1==s?c=c/100|0:2==s&&(c=c/10|0),a=(n||4>r)&&9999==c||!n&&r>3&&4999==c):a=((n||4>r)&&c+1==o||!n&&r>3&&c+1==o/2)&&(e[i+1]/o/1e3|0)==E(10,s-3)-1,a}function a(e,t,r){var n=e.constructor;return null==t||((y=0>t||t>8)||0!==t&&(n.errors?parseInt:parseFloat)(t)!=t)&&!d(n,"rounding mode",t,r,0)?n.rounding:0|t}function c(e,t,r,n){var i=e.constructor;return!(y=(n||0)>t||t>=k+1)&&(0===t||(i.errors?parseInt:parseFloat)(t)==t)||d(i,"argument",t,r,0)}function u(e,t){var r,n,i,a,c,u,f,h=0,d=0,l=0,p=e.constructor,m=p.ONE,v=p.rounding,y=p.precision;if(!e.c||!e.c[0]||e.e>17)return new p(e.c?e.c[0]?e.s<0?0:1/0:m:e.s?e.s<0?0:e:NaN);for(null==t?(w=!1,c=y):c=t,f=new p(.03125);e.e>-2;)e=e.times(f),l+=5;for(n=Math.log(E(2,l))/Math.LN10*2+5|0,c+=n,r=a=u=new p(m),p.precision=c;;){if(a=g(a.times(e),c,1),r=r.times(++d),f=u.plus(j(a,r,c,1)),o(f.c).slice(0,c)===o(u.c).slice(0,c)){for(i=l;i--;)u=g(u.times(u),c,1);if(null!=t)return p.precision=y,u;if(!(3>h&&s(u.c,c-n,v,h)))return g(u,p.precision=y,v,w=!0);p.precision=c+=10,r=a=f=new p(m),d=0,h++}u=f}}function f(e,t,r,n){var i,s,a=e.constructor,c=(e=new a(e)).e;if(null==t?r=0:(g(e,++t,r),r=n?t:t+e.e-c),c=e.e,i=o(e.c),1==n||2==n&&(c>=t||c<=a.toExpNeg)){for(;i.length<r;i+="0");i.length>1&&(i=i.charAt(0)+"."+i.slice(1)),i+=(0>c?"e":"e+")+c}else{if(n=i.length,0>c){for(s=r-n;++c;i="0"+i);i="0."+i}else if(++c>n){for(s=r-c,c-=n;c--;i+="0");s>0&&(i+=".")}else s=r-n,n>c?i=i.slice(0,c)+"."+i.slice(c):s>0&&(i+=".");if(s>0)for(;s--;i+="0");}return e.s<0&&e.c[0]?"-"+i:i}function h(e){var t=e.length-1,r=t*T+1;if(t=e[t]){for(;t%10==0;t/=10,r--);for(t=e[0];t>=10;t/=10,r++);}return r}function d(e,t,r,n,i){if(e.errors){var o=new Error((n||["new Decimal","cmp","div","eq","gt","gte","lt","lte","minus","mod","plus","times","toFraction","pow","random","log","sqrt","toNearest","divToInt"][S?0>S?-S:S:0>1/S?1:0])+"() "+(["number type has more than 15 significant digits","LN10 out of digits"][t]||t+([y?" out of range":" not an integer"," not a boolean or binary digit"][i]||""))+": "+r);throw o.name="Decimal Error",y=S=0,o}}function l(e,t,r){var n=new e(e.ONE);for(w=!1;1&r&&(n=n.times(t)),r>>=1,r;)t=t.times(t);return w=!0,n}function p(e,t){var r,n,i,a,c,u,f,h,l,m,v,y=1,b=10,S=e,x=S.c,E=S.constructor,A=E.ONE,P=E.rounding,T=E.precision;if(S.s<0||!x||!x[0]||!S.e&&1==x[0]&&1==x.length)return new E(x&&!x[0]?-1/0:1!=S.s?NaN:x?0:S);if(null==t?(w=!1,f=T):f=t,E.precision=f+=b,r=o(x),n=r.charAt(0),!(Math.abs(a=S.e)<15e14))return S=new E(n+"."+r.slice(1)),f+2>N.length&&d(E,1,f+2,"ln"),S=p(S,f-b).plus(new E(N.slice(0,f+2)).times(a+"")),E.precision=T,null==t?g(S,T,P,w=!0):S;for(;7>n&&1!=n||1==n&&r.charAt(1)>3;)S=S.times(e),r=o(S.c),n=r.charAt(0),y++;for(a=S.e,n>1?(S=new E("0."+r),a++):S=new E(n+"."+r.slice(1)),m=S,h=c=S=j(S.minus(A),S.plus(A),f,1),v=g(S.times(S),f,1),i=3;;){if(c=g(c.times(v),f,1),l=h.plus(j(c,new E(i),f,1)),o(l.c).slice(0,f)===o(h.c).slice(0,f)){if(h=h.times(2),0!==a&&(f+2>N.length&&d(E,1,f+2,"ln"),h=h.plus(new E(N.slice(0,f+2)).times(a+""))),h=j(h,new E(y),f,1),null!=t)return E.precision=T,h;if(!s(h.c,f-b,P,u))return g(h,E.precision=T,P,w=!0);E.precision=f+=b,l=c=S=j(m.minus(A),m.plus(A),f,1),v=g(S.times(S),f,1),i=u=1}h=l,i+=2}}function g(e,t,r,n){var i,o,s,a,c,u,f,h,d=e.constructor;e:if(null!=t){if(!(f=e.c))return e;for(i=1,a=f[0];a>=10;a/=10,i++);if(o=t-i,0>o)o+=T,s=t,c=f[h=0],u=c/E(10,i-s-1)%10|0;else if(h=Math.ceil((o+1)/T),h>=f.length){if(!n)break e;for(;f.length<=h;f.push(0));c=u=0,i=1,o%=T,s=o-T+1}else{for(c=a=f[h],i=1;a>=10;a/=10,i++);o%=T,s=o-T+i,u=0>s?0:x(c/E(10,i-s-1)%10)}if(n=n||0>t||null!=f[h+1]||(0>s?c:c%E(10,i-s-1)),n=4>r?(u||n)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||n||6==r&&(o>0?s>0?c/E(10,i-s):0:f[h-1])%10&1||r==(e.s<0?8:7)),1>t||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=E(10,(T-t%T)%T),e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=h,a=1,h--):(f.length=h+1,a=E(10,T-o),f[h]=s>0?(c/E(10,i-s)%E(10,s)|0)*a:0),n)for(;;){if(0==h){for(o=1,s=f[0];s>=10;s/=10,o++);for(s=f[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(e.e++,f[0]==P&&(f[0]=1));break}if(f[h]+=a,f[h]!=P)break;f[h--]=0,a=1}for(o=f.length;0===f[--o];f.pop());}return w&&(e.e>d.maxE?e.c=e.e=null:e.e<d.minE&&(e.c=[e.e=0])),e}var m,v,y,b=i.crypto,w=!0,S=0,x=Math.floor,E=Math.pow,A=Object.prototype.toString,P=1e7,T=7,I="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",O={},R=9e15,k=1e9,L=3e3,N="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058";O.absoluteValue=O.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),g(e)},O.ceil=function(){return g(new this.constructor(this),this.e+1,2)},O.comparedTo=O.cmp=function(e,t){var r,n=this,i=n.c,o=(S=-S,e=new n.constructor(e,t),e.c),s=n.s,a=e.s,c=n.e,u=e.e;if(!s||!a)return null;if(r=i&&!i[0],t=o&&!o[0],r||t)return r?t?0:-a:s;if(s!=a)return s;if(r=0>s,!i||!o)return c==u?0:!i^r?1:-1;if(c!=u)return c>u^r?1:-1;for(s=-1,a=(c=i.length)<(u=o.length)?c:u;++s<a;)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return c==u?0:c>u^r?1:-1},O.decimalPlaces=O.dp=function(){var e,t,r=null;if(e=this.c){if(r=((t=e.length-1)-x(this.e/T))*T,t=e[t])for(;t%10==0;t/=10,r--);0>r&&(r=0)}return r},O.dividedBy=O.div=function(e,t){return S=2,j(this,new this.constructor(e,t))},O.dividedToIntegerBy=O.divToInt=function(e,t){var r=this,n=r.constructor;return S=18,g(j(r,new n(e,t),0,1,1),n.precision,n.rounding)},O.equals=O.eq=function(e,t){return S=3,0===this.cmp(e,t)},O.exponential=O.exp=function(){return u(this)},O.floor=function(){return g(new this.constructor(this),this.e+1,3)},O.greaterThan=O.gt=function(e,t){return S=4,this.cmp(e,t)>0},O.greaterThanOrEqualTo=O.gte=function(e,t){return S=5,t=this.cmp(e,t),1==t||0===t},O.isFinite=function(){return!!this.c},O.isInteger=O.isInt=function(){return!!this.c&&x(this.e/T)>this.c.length-2},O.isNaN=function(){return!this.s},O.isNegative=O.isNeg=function(){return this.s<0},O.isZero=function(){return!!this.c&&0==this.c[0]},O.lessThan=O.lt=function(e,t){return S=6,this.cmp(e,t)<0},O.lessThanOrEqualTo=O.lte=function(e,t){return S=7,t=this.cmp(e,t),-1==t||0===t},O.logarithm=O.log=function(e,t){var r,n,i,a,c,u,f,h,l,m=this,v=m.constructor,y=v.precision,b=v.rounding,x=5;if(null==e)e=new v(10),r=!0;else{if(S=15,e=new v(e,t),n=e.c,e.s<0||!n||!n[0]||!e.e&&1==n[0]&&1==n.length)return new v(NaN);r=e.eq(10)}if(n=m.c,m.s<0||!n||!n[0]||!m.e&&1==n[0]&&1==n.length)return new v(n&&!n[0]?-1/0:1!=m.s?NaN:n?0:1/0);if(c=r&&(a=n[0],n.length>1||1!=a&&10!=a&&100!=a&&1e3!=a&&1e4!=a&&1e5!=a&&1e6!=a),w=!1,f=y+x,h=f+10,u=p(m,f),r?(h>N.length&&d(v,1,h,"log"),i=new v(N.slice(0,h))):i=p(e,f),l=j(u,i,f,1),s(l.c,a=y,b))do if(f+=10,u=p(m,f),r?(h=f+10,h>N.length&&d(v,1,h,"log"),i=new v(N.slice(0,h))):i=p(e,f),l=j(u,i,f,1),!c){+o(l.c).slice(a+1,a+15)+1==1e14&&(l=g(l,y+1,0));break}while(s(l.c,a+=10,b));return w=!0,g(l,y,b)},O.minus=function(e,t){var r,n,i,o,s=this,a=s.constructor,c=s.s;if(S=8,e=new a(e,t),t=e.s,!c||!t)return new a(NaN);if(c!=t)return e.s=-t,s.plus(e);var u=s.c,f=e.c,h=x(e.e/T),d=x(s.e/T),l=a.precision,p=a.rounding;if(!d||!h){if(!u||!f)return u?(e.s=-t,e):new a(f?s:NaN);if(!u[0]||!f[0])return s=f[0]?(e.s=-t,e):new a(u[0]?s:3==p?-0:0),w?g(s,l,p):s}if(u=u.slice(),n=u.length,c=d-h){for((o=0>c)?(c=-c,r=u,n=f.length):(h=d,r=f),(d=Math.ceil(l/T))>n&&(n=d),c>(n+=2)&&(c=n,r.length=1),r.reverse(),t=c;t--;r.push(0));r.reverse()}else for((o=n<(i=f.length))&&(i=n),c=t=0;i>t;t++)if(u[t]!=f[t]){o=u[t]<f[t];break}if(o&&(r=u,u=f,f=r,e.s=-e.s),(t=-((i=u.length)-f.length))>0)for(;t--;u[i++]=0);for(d=P-1,t=f.length;t>c;){if(u[--t]<f[t]){for(n=t;n&&!u[--n];u[n]=d);--u[n],u[t]+=P}u[t]-=f[t]}for(;0==u[--i];u.pop());for(;0==u[0];u.shift(),--h);for(u[0]||(u=[h=0],e.s=3==p?-1:1),e.c=u,c=1,t=u[0];t>=10;t/=10,c++);return e.e=c+h*T-1,w?g(e,l,p):e},O.modulo=O.mod=function(e,t){var r,n,i=this,o=i.constructor,s=o.modulo;return S=9,e=new o(e,t),t=e.s,r=!i.c||!t||e.c&&!e.c[0],
  r||!e.c||i.c&&!i.c[0]?r?new o(NaN):g(new o(i),o.precision,o.rounding):(w=!1,9==s?(e.s=1,n=j(i,e,0,3,1),e.s=t,n.s*=t):n=j(i,e,0,s,1),n=n.times(e),w=!0,i.minus(n))},O.naturalLogarithm=O.ln=function(){return p(this)},O.negated=O.neg=function(){var e=new this.constructor(this);return e.s=-e.s||null,g(e)},O.plus=function(e,t){var r,n=this,i=n.constructor,o=n.s;if(S=10,e=new i(e,t),t=e.s,!o||!t)return new i(NaN);if(o!=t)return e.s=-t,n.minus(e);var s=n.c,a=e.c,c=x(e.e/T),u=x(n.e/T),f=i.precision,h=i.rounding;if(!u||!c){if(!s||!a)return new i(o/0);if(!s[0]||!a[0])return n=a[0]?e:new i(s[0]?n:0*o),w?g(n,f,h):n}if(s=s.slice(),o=u-c){for(0>o?(o=-o,r=s,t=a.length):(c=u,r=a,t=s.length),(u=Math.ceil(f/T))>t&&(t=u),o>++t&&(o=t,r.length=1),r.reverse();o--;r.push(0));r.reverse()}for(s.length-a.length<0&&(r=a,a=s,s=r),o=a.length,t=0,u=P;o;s[o]%=u)t=(s[--o]=s[o]+a[o]+t)/u|0;for(t&&(s.unshift(t),++c),o=s.length;0==s[--o];s.pop());for(e.c=s,o=1,t=s[0];t>=10;t/=10,o++);return e.e=o+c*T-1,w?g(e,f,h):e},O.precision=O.sd=function(e){var t=null,r=this;return e!=t&&e!==!!e&&1!==e&&0!==e&&d(r.constructor,"argument",e,"precision",1),r.c&&(t=h(r.c),e&&r.e+1>t&&(t=r.e+1)),t},O.round=function(){var e=this,t=e.constructor;return g(new t(e),e.e+1,t.rounding)},O.squareRoot=O.sqrt=function(){var e,t,r,n,i,s,a=this,c=a.c,u=a.s,f=a.e,h=a.constructor,d=new h(.5);if(1!==u||!c||!c[0])return new h(!u||0>u&&(!c||c[0])?NaN:c?a:1/0);for(w=!1,u=Math.sqrt(+a),0==u||u==1/0?(t=o(c),(t.length+f)%2==0&&(t+="0"),u=Math.sqrt(t),f=x((f+1)/2)-(0>f||f%2),u==1/0?t="1e"+f:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+f),n=new h(t)):n=new h(u.toString()),r=(f=h.precision)+3;;)if(s=n,n=d.times(s.plus(j(a,s,r+2,1))),o(s.c).slice(0,r)===(t=o(n.c)).slice(0,r)){if(t=t.slice(r-3,r+1),"9999"!=t&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(g(n,f+1,1),e=!n.times(n).eq(a));break}if(!i&&(g(s,f+1,0),s.times(s).eq(a))){n=s;break}r+=4,i=1}return w=!0,g(n,f,h.rounding,e)},O.times=function(e,t){var r,n,i=this,o=i.constructor,s=i.c,a=(S=11,e=new o(e,t),e.c),c=x(i.e/T),u=x(e.e/T),f=i.s;if(t=e.s,e.s=f==t?1:-1,!((c||s&&s[0])&&(u||a&&a[0])))return new o(!f||!t||s&&!s[0]&&!a||a&&!a[0]&&!s?NaN:s&&a?0*e.s:e.s/0);for(n=c+u,f=s.length,t=a.length,t>f&&(r=s,s=a,a=r,u=f,f=t,t=u),u=f+t,r=[];u--;r.push(0));for(c=t-1;c>-1;c--){for(t=0,u=f+c;u>c;)t=r[u]+a[c]*s[u-c-1]+t,r[u--]=t%P|0,t=t/P|0;r[u]=(r[u]+t)%P|0}for(t?++n:r[0]||r.shift(),u=r.length;!r[--u];r.pop());for(e.c=r,f=1,t=r[0];t>=10;t/=10,f++);return e.e=f+n*T-1,w?g(e,o.precision,o.rounding):e},O.toDecimalPlaces=O.toDP=function(e,t){var r=this;return r=new r.constructor(r),null!=e&&c(r,e,"toDP")?g(r,(0|e)+r.e+1,a(r,t,"toDP")):r},O.toExponential=function(e,t){var r=this;return r.c?f(r,null!=e&&c(r,e,"toExponential")?0|e:null,null!=e&&a(r,t,"toExponential"),1):r.toString()},O.toFixed=function(e,t){var r,n=this,i=n.constructor,o=i.toExpNeg,s=i.toExpPos;return null!=e&&(e=c(n,e,r="toFixed")?n.e+(0|e):null,t=a(n,t,r)),i.toExpNeg=-(i.toExpPos=1/0),null!=e&&n.c?(r=f(n,e,t),n.s<0&&n.c&&(n.c[0]?r.indexOf("-")<0&&(r="-"+r):r=r.replace("-",""))):r=n.toString(),i.toExpNeg=o,i.toExpPos=s,r},O.toFormat=function(e,t){var r=this;if(!r.c)return r.toString();var n,i=r.s<0,o=r.constructor.format,s=o.groupSeparator,a=+o.groupSize,c=+o.secondaryGroupSize,u=r.toFixed(e,t).split("."),f=u[0],h=u[1],d=i?f.slice(1):f,l=d.length;if(c&&(n=a,a=c,l-=c=n),a>0&&l>0){for(n=l%a||a,f=d.substr(0,n);l>n;n+=a)f+=s+d.substr(n,a);c>0&&(f+=s+d.slice(n)),i&&(f="-"+f)}return h?f+o.decimalSeparator+((c=+o.fractionGroupSize)?h.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+o.fractionGroupSeparator):h):f},O.toFraction=function(e){var t,r,n,i,s,a,c,u,f=this,l=f.constructor,p=t=new l(l.ONE),g=a=new l(0),m=f.c,v=new l(g);if(!m)return f.toString();for(n=v.e=h(m)-f.e-1,v.c[0]=E(10,(c=n%T)<0?T+c:c),(null==e||(!(S=12,s=new l(e)).s||(y=s.cmp(p)<0||!s.c)||l.errors&&x(s.e/T)<s.c.length-1)&&!d(l,"max denominator",e,"toFraction",0)||(e=s).cmp(v)>0)&&(e=n>0?v:p),w=!1,s=new l(o(m)),c=l.precision,l.precision=n=m.length*T*2;u=j(s,v,0,1,1),r=t.plus(u.times(g)),1!=r.cmp(e);)t=g,g=r,p=a.plus(u.times(r=p)),a=r,v=s.minus(u.times(r=v)),s=r;return r=j(e.minus(t),g,0,1,1),a=a.plus(r.times(p)),t=t.plus(r.times(g)),a.s=p.s=f.s,i=j(p,g,n,1).minus(f).abs().cmp(j(a,t,n,1).minus(f).abs())<1?[p+"",g+""]:[a+"",t+""],w=!0,l.precision=c,i},O.toNearest=function(e,t){var r=this,n=r.constructor;return r=new n(r),null==e?(e=new n(n.ONE),t=n.rounding):(S=17,e=new n(e),t=a(r,t,"toNearest")),e.c?r.c&&(e.c[0]?(w=!1,r=j(r,e,0,4>t?[4,5,7,8][t]:t,1).times(e),w=!0,g(r)):r.c=[r.e=0]):r.s&&(e.s&&(e.s=r.s),r=e),r},O.toNumber=function(){var e=this;return+e||(e.s?0*e.s:NaN)},O.toPower=O.pow=function(e,t){var r,n,i,a,c=this,f=c.constructor,h=c.s,d=(S=13,+(e=new f(e,t))),m=0>d?-d:d,v=f.precision,y=f.rounding;if(!c.c||!e.c||(i=!c.c[0])||!e.c[0])return new f(E(i?0*h:+c,d));if(c=new f(c),r=c.c.length,!c.e&&c.c[0]==c.s&&1==r)return c;if(t=e.c.length-1,e.e||e.c[0]!=e.s||t)if(n=x(e.e/T),i=n>=t,!i&&0>h)a=new f(NaN);else{if(i&&L>r*T*m){if(a=l(f,c,m),e.s<0)return f.ONE.div(a)}else{if(h=0>h&&1&e.c[Math.max(n,t)]?-1:1,t=E(+c,d),n=0!=t&&isFinite(t)?new f(t+"").e:x(d*(Math.log("0."+o(c.c))/Math.LN10+c.e+1)),n>f.maxE+1||n<f.minE-1)return new f(n>0?h/0:0);w=!1,f.rounding=c.s=1,m=Math.min(12,(n+"").length),a=u(e.times(p(c,v+m)),v),a=g(a,v+5,1),s(a.c,v,y)&&(n=v+10,a=g(u(e.times(p(c,n+m)),n),n+5,1),+o(a.c).slice(v+1,v+15)+1==1e14&&(a=g(a,v+1,0))),a.s=h,w=!0,f.rounding=y}a=g(a,v,y)}else a=g(c,v,y);return a},O.toPrecision=function(e,t){var r=this;return null!=e&&c(r,e,"toPrecision",1)&&r.c?f(r,0|--e,a(r,t,"toPrecision"),2):r.toString()},O.toSignificantDigits=O.toSD=function(e,t){var r=this,n=r.constructor;return r=new n(r),null!=e&&c(r,e,"toSD",1)?g(r,0|e,a(r,t,"toSD")):g(r,n.precision,n.rounding)},O.toString=function(e){var t,r,n,i=this,s=i.constructor,a=i.e;if(null===a)r=i.s?"Infinity":"NaN";else{if(e===t&&(a<=s.toExpNeg||a>=s.toExpPos))return f(i,null,s.rounding,1);if(r=o(i.c),0>a){for(;++a;r="0"+r);r="0."+r}else if(n=r.length,a>0)if(++a>n)for(a-=n;a--;r+="0");else n>a&&(r=r.slice(0,a)+"."+r.slice(a));else if(t=r.charAt(0),n>1)r=t+"."+r.slice(1);else if("0"==t)return t;if(null!=e)if((y=!(e>=2&&65>e))||e!=(0|e)&&s.errors)d(s,"base",e,"toString",0);else if(r=m(s,r,0|e,10,i.s),"0"==r)return r}return i.s<0?"-"+r:r},O.truncated=O.trunc=function(){return g(new this.constructor(this),this.e+1,1)},O.valueOf=O.toJSON=function(){return this.toString()},m=function(){function e(e,t,r){for(var n,i,o=[0],s=0,a=e.length;a>s;){for(i=o.length;i--;o[i]*=t);for(o[n=0]+=I.indexOf(e.charAt(s++));n<o.length;n++)o[n]>r-1&&(null==o[n+1]&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}return function(t,r,n,i,o){var s,a,c,u,f,h,d=r.indexOf("."),p=t.precision,g=t.rounding;for(37>i&&(r=r.toLowerCase()),d>=0&&(r=r.replace(".",""),h=new t(i),u=l(t,h,r.length-d),h.c=e(u.toFixed(),10,n),h.e=h.c.length),f=e(r,i,n),s=a=f.length;0==f[--a];f.pop());if(!f[0])return"0";if(0>d?s--:(u.c=f,u.e=s,u.s=o,u=j(u,h,p,g,0,n),f=u.c,c=u.r,s=u.e),d=f[p],a=n/2,c=c||null!=f[p+1],4>g?(null!=d||c)&&(0==g||g==(0>o?3:2)):d>a||d==a&&(4==g||c||6==g&&1&f[p-1]||g==(0>o?8:7)))for(f.length=p,--n;++f[--p]>n;)f[p]=0,p||(++s,f.unshift(1));else f.length=p;for(a=f.length;!f[--a];);for(d=0,r="";a>=d;r+=I.charAt(f[d++]));if(0>s){for(;++s;r="0"+r);r="0."+r}else if(d=r.length,++s>d)for(s-=d;s--;r+="0");else d>s&&(r=r.slice(0,s)+"."+r.slice(s));return r}}();var j=function(){function e(e,t,r){var n,i=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+i,e[o]=n%r|0,i=n/r|0;return i&&e.unshift(i),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;r>i;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.shift());}return function(n,i,o,s,a,c){var u,f,h,d,l,p,m,v,y,b,w,S,E,A,I,O,R,k,L,N=n.constructor,j=n.s==i.s?1:-1,F=n.c,M=i.c;if(!(F&&F[0]&&M&&M[0]))return new N(n.s&&i.s&&(F?!M||F[0]!=M[0]:M)?F&&0==F[0]||!M?0*j:j/0:NaN);for(c?(d=1,f=n.e-i.e):(c=P,d=T,f=x(n.e/d)-x(i.e/d)),k=M.length,O=F.length,y=new N(j),b=y.c=[],h=0;M[h]==(F[h]||0);h++);if(M[h]>(F[h]||0)&&f--,null==o?(j=o=N.precision,s=N.rounding):j=a?o+(n.e-i.e)+1:o,0>j)b.push(1),l=!0;else{if(j=j/d+2|0,h=0,1==k){for(p=0,M=M[0],j++;(O>h||p)&&j--;h++)A=p*c+(F[h]||0),b[h]=A/M|0,p=A%M|0;l=p||O>h}else{for(p=c/(M[0]+1)|0,p>1&&(M=e(M,p,c),F=e(F,p,c),k=M.length,O=F.length),I=k,w=F.slice(0,k),S=w.length;k>S;w[S++]=0);L=M.slice(),L.unshift(0),R=M[0],M[1]>=c/2&&R++;do p=0,u=t(M,w,k,S),0>u?(E=w[0],k!=S&&(E=E*c+(w[1]||0)),p=E/R|0,p>1?(p>=c&&(p=c-1),m=e(M,p,c),v=m.length,S=w.length,u=t(m,w,v,S),1==u&&(p--,r(m,v>k?L:M,v,c))):(0==p&&(u=p=1),m=M.slice()),v=m.length,S>v&&m.unshift(0),r(w,m,S,c),-1==u&&(S=w.length,u=t(M,w,k,S),1>u&&(p++,r(w,S>k?L:M,S,c))),S=w.length):0===u&&(p++,w=[0]),b[h++]=p,u&&w[0]?w[S++]=F[I]||0:(w=[F[I]],S=1);while((I++<O||null!=w[0])&&j--);l=null!=w[0]}b[0]||b.shift()}if(1==d)y.e=f,y.r=+l;else{for(h=1,j=b[0];j>=10;j/=10,h++);y.e=h+f*d-1,g(y,a?o+y.e+1:o,s,l)}return y}}();v=function(){function e(e){var t,r,n,i=this,o="config",s=i.errors?parseInt:parseFloat;return e==r||"object"!=typeof e&&!d(i,"object expected",e,o)?i:((n=e[t="precision"])!=r&&((y=1>n||n>k)||s(n)!=n?d(i,t,n,o,0):i[t]=0|n),(n=e[t="rounding"])!=r&&((y=0>n||n>8)||s(n)!=n?d(i,t,n,o,0):i[t]=0|n),(n=e[t="toExpNeg"])!=r&&((y=-R>n||n>0)||s(n)!=n?d(i,t,n,o,0):i[t]=x(n)),(n=e[t="toExpPos"])!=r&&((y=0>n||n>R)||s(n)!=n?d(i,t,n,o,0):i[t]=x(n)),(n=e[t="minE"])!=r&&((y=-R>n||n>0)||s(n)!=n?d(i,t,n,o,0):i[t]=x(n)),(n=e[t="maxE"])!=r&&((y=0>n||n>R)||s(n)!=n?d(i,t,n,o,0):i[t]=x(n)),(n=e[t="errors"])!=r&&(n===!!n||1===n||0===n?(y=S=0,i[t]=!!n):d(i,t,n,o,1)),(n=e[t="crypto"])!=r&&(n===!!n||1===n||0===n?i[t]=!(!n||!b||"object"!=typeof b):d(i,t,n,o,1)),(n=e[t="modulo"])!=r&&((y=0>n||n>9)||s(n)!=n?d(i,t,n,o,0):i[t]=0|n),(e=e[t="format"])!=r&&("object"==typeof e?i[t]=e:d(i,"format object expected",e,o)),i)}function t(e){return new this(e).exp()}function r(e){return new this(e).ln()}function n(e,t){return new this(e).log(t)}function i(e,t,r){var n,i,o=0;for("[object Array]"==A.call(t[0])&&(t=t[0]),n=new e(t[0]);++o<t.length;){if(i=new e(t[o]),!i.s){n=i;break}n[r](i)&&(n=i)}return n}function o(){return i(this,arguments,"lt")}function s(){return i(this,arguments,"gt")}function a(e,t){return new this(e).pow(t)}function u(e){var t,r,n,i=0,o=[],s=this,a=new s(s.ONE);if(null!=e&&c(a,e,"random")?e|=0:e=s.precision,r=Math.ceil(e/T),s.crypto)if(b&&b.getRandomValues)for(t=b.getRandomValues(new Uint32Array(r));r>i;)n=t[i],n>=429e7?t[i]=b.getRandomValues(new Uint32Array(1))[0]:o[i++]=n%1e7;else if(b&&b.randomBytes){for(t=b.randomBytes(r*=4);r>i;)n=t[i]+(t[i+1]<<8)+(t[i+2]<<16)+((127&t[i+3])<<24),n>=214e7?b.randomBytes(4).copy(t,i):(o.push(n%1e7),i+=4);i=r/4}else d(s,"crypto unavailable",b,"random");if(!i)for(;r>i;)o[i++]=1e7*Math.random()|0;for(r=o[--i],e%=T,r&&e&&(n=E(10,T-e),o[i]=(r/n|0)*n);0===o[i];i--)o.pop();if(0>i)o=[r=0];else{for(r=-1;0===o[0];)o.shift(),r-=T;for(i=1,n=o[0];n>=10;)n/=10,i++;T>i&&(r-=T-i)}return a.e=r,a.c=o,a}function f(e){return new this(e).sqrt()}function h(i){function c(e,t){var r=this;if(!(r instanceof c))return d(c,"Decimal called without new",e),new c(e,t);if(r.constructor=c,e instanceof c){if(null==t)return S=0,r.s=e.s,r.e=e.e,r.c=(e=e.c)?e.slice():e,r;if(10==t)return g(new c(e),c.precision,c.rounding);e+=""}return l(c,r,e,t)}return c.precision=20,c.rounding=4,c.modulo=1,c.toExpNeg=-7,c.toExpPos=21,c.minE=-R,c.maxE=R,c.errors=!0,c.crypto=!1,c.format={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0},c.prototype=O,c.ONE=new c(1),c.ROUND_UP=0,c.ROUND_DOWN=1,c.ROUND_CEIL=2,c.ROUND_FLOOR=3,c.ROUND_HALF_UP=4,c.ROUND_HALF_DOWN=5,c.ROUND_HALF_EVEN=6,c.ROUND_HALF_CEIL=7,c.ROUND_HALF_FLOOR=8,c.EUCLID=9,c.config=e,c.constructor=h,c.exp=t,c.ln=r,c.log=n,c.max=o,c.min=s,c.pow=a,c.sqrt=f,c.random=u,null!=i&&c.config(i),c}var l=function(){var e=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,t=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")};return function(r,n,i,o){var s,a,c,u,f,h;if("string"!=typeof i&&(i=(u="number"==typeof i||"[object Number]"==A.call(i))&&0===i&&0>1/i?"-0":i+""),f=i,null==o&&e.test(i))n.s=45===i.charCodeAt(0)?(i=i.slice(1),-1):1;else{if(10==o)return g(new r(i),r.precision,r.rounding);if(i=t.call(i).replace(/^\+(?!-)/,""),n.s=45===i.charCodeAt(0)?(i=i.replace(/^-(?!-)/,""),-1):1,null!=o?o!=(0|o)&&r.errors||(y=!(o>=2&&65>o))?(d(r,"base",o,0,0),h=e.test(i)):(s="["+I.slice(0,o=0|o)+"]+",i=i.replace(/\.$/,"").replace(/^\./,"0."),(h=new RegExp("^"+s+"(?:\\."+s+")?$",37>o?"i":"").test(i))?(u&&(i.replace(/^0\.0*|\./,"").length>15&&d(r,0,f),u=!u),i=m(r,i,10,o,n.s)):"Infinity"!=i&&"NaN"!=i&&(d(r,"not a base "+o+" number",f),i="NaN")):h=e.test(i),!h)return n.c=n.e=null,"Infinity"!=i&&("NaN"!=i&&d(r,"not a number",f),n.s=null),S=0,n}for((a=i.indexOf("."))>-1&&(i=i.replace(".","")),(c=i.search(/e/i))>0?(0>a&&(a=c),a+=+i.slice(c+1),i=i.substring(0,c)):0>a&&(a=i.length),c=0;48===i.charCodeAt(c);c++);for(o=i.length;48===i.charCodeAt(--o););if(i=i.slice(c,o+1)){if(o=i.length,u&&o>15&&d(r,0,f),n.e=a=a-c-1,n.c=[],c=(a+1)%T,0>a&&(c+=T),o>c){for(c&&n.c.push(+i.slice(0,c)),o-=T;o>c;)n.c.push(+i.slice(c,c+=T));i=i.slice(c),c=T-i.length}else c-=o;for(;c--;i+="0");n.c.push(+i),w&&(n.e>r.maxE?n.c=n.e=null:n.e<r.minE&&(n.c=[n.e=0]))}else n.c=[n.e=0];return S=0,n}}();return h()}(),n=function(){return v}.call(t,r,t,e),!(void 0!==n&&(e.exports=n))}(this)},function(e,t,r){"use strict";function n(e){var t=new Uint8Array(20);if("XRP"!==e){var r=e.split("").map(function(e){return e.charCodeAt(0)});t.set(r,12)}return t}function i(e){return 3===e.length}function o(e){return m.test(e)}function s(e){return _.isString(e)&&(i(e)||o(e))}function a(e){return 20===e.length}function c(e){return s(e)||a(e)}function u(e){if(c(e))return 3===e.length?n(e):e;throw new Error("Unsupported Currency repr: "+e)}var _=r(192),f=r(507),h=r(506),d=h.slice,l=r(517),p=l.Hash160,g=/^[A-Z0-9]{3}$/,m=/^[A-F0-9]{40}$/,v=p.prototype,y=f({inherits:p,getters:["isNative","iso"],statics:{init:function(){this.XRP=new this(new Uint8Array(20))},from:function(e){return e instanceof this?e:new this(u(e))}},Currency:function(e){p.call(this,e),this.classify()},classify:function(){for(var e=!0,t=this._bytes,r=d(this._bytes,12,15,Array),n=r.map(function(e){return String.fromCharCode(e)}).join(""),i=t.length-1;i>=0;i--)if(0!==t[i]&&12!==i&&13!==i&&14!==i){e=!1;break}var o=e&&"XRP"!==n&&g.test(n);this._isNative=e&&_.isEqual(r,[0,0,0]),this._iso=this._isNative?"XRP":o?n:null},toJSON:function(){return this.iso()?this.iso():v.toJSON.call(this)}});e.exports={Currency:y}},function(e,t,r){"use strict";var n=r(198),i=r(531),o=r(507),s=r(506),a=s.bytesToHex,c=s.parseBytes,u=s.serializeUIntN,f=r(535),h=f.UInt,d=/^[A-F0-9]{16}$/,l=o({inherits:h,statics:{width:8},UInt64:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=typeof e;if("number"===t)n(e>=0),this._bytes=new Uint8Array(8),this._bytes.set(u(e,4),4);else if(e instanceof i)this._bytes=c(e.toArray("be",8),Uint8Array),this._toBN=e;else{if("string"===t&&!d.test(e))throw new Error(e+" is not a valid UInt64 hex string");this._bytes=c(e,Uint8Array)}n(8===this._bytes.length)},toJSON:function(){return a(this._bytes)},valueOf:function(){return this.toBN()},cached:{toBN:function(){return new i(this._bytes)}},toBytes:function(){return this._bytes}});e.exports={UInt64:l}},function(e,t,r){"use strict";function n(e,t){return t>e?-1:e===t?0:1}var i=r(198),o=r(531),s=r(507),a=r(519),c=a.Comparable,u=a.SerializedType,f=r(506),h=f.serializeUIntN,d=[0,255,65535,16777215,4294967295],l=s({mixins:[c,u],UInt:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0],t=d[this.constructor.width];if(0>e||!(t>=e))throw new Error(e+" not in range 0 <= $val <= "+t);this.val=e},statics:{width:0,fromParser:function(e){var t=this.width>4?e.read(this.width):e.readUIntN(this.width);return new this(t)},from:function(e){return e instanceof this?e:new this(e)}},toJSON:function(){return this.val},valueOf:function(){return this.val},compareTo:function(e){var t=this.valueOf(),r=e.valueOf();return t instanceof o?r instanceof o?t.cmp(r):t.cmpn(r):r instanceof o?-e.compareTo(this):(i("number"==typeof r),n(t,r))},toBytesSink:function(e){e.put(this.toBytes())},toBytes:function(){return h(this.val,this.constructor.width)}});e.exports={UInt:l}},function(e,t,r){"use strict";var n=r(507),i=r(506),o=i.parseBytes,s=r(519),a=s.SerializedType,c=n({mixins:a,Blob:function(e){e?this._bytes=o(e,Uint8Array):this._bytes=new Uint8Array(0)},statics:{fromParser:function(e,t){return new this(e.read(t))},from:function(e){return e instanceof this?e:new this(e)}}});e.exports={Blob:c}},function(e,t,r){"use strict";var n=r(507),i=r(518),o=i.Hash,s=n({inherits:o,statics:{width:16}});e.exports={Hash128:s}},function(e,t,r){"use strict";var n=r(507),i=r(518),o=i.Hash,s=n({inherits:o,statics:{width:32,init:function(){this.ZERO_256=new this(new Uint8Array(this.width))}}});e.exports={Hash256:s}},function(e,t,r){"use strict";var n=r(507),i=r(519),o=i.SerializedType,s=i.ensureArrayLikeIs,a=r(533),c=a.Currency,u=r(516),f=u.AccountID,h=0,d=255,l=1,p=16,g=32,m=n({statics:{from:function(e){if(e instanceof this)return e;var t=new m;return e.issuer&&(t.issuer=f.from(e.issuer)),e.account&&(t.account=f.from(e.account)),e.currency&&(t.currency=c.from(e.currency)),t},parse:function(e,t){var r=new m;return t&l&&(r.account=f.fromParser(e)),t&p&&(r.currency=c.fromParser(e)),t&g&&(r.issuer=f.fromParser(e)),r}},toJSON:function(){var e=this.type(),t={};return e&l&&(t.account=this.account.toJSON()),e&g&&(t.issuer=this.issuer.toJSON()),e&p&&(t.currency=this.currency.toJSON()),t},type:function b(){var b=0;return this.issuer&&(b+=g),this.account&&(b+=l),this.currency&&(b+=p),b}}),v=n({inherits:Array,statics:{from:function(e){return s(v,e).withChildren(m)}},toJSON:function(){return this.map(function(e){return e.toJSON()})}}),y=n({mixins:o,inherits:Array,statics:{from:function(e){return s(y,e).withChildren(v)},fromParser:function(e){for(var t=new this,r=void 0;!e.end();){var n=e.readUInt8();if(n===h)break;n!==d?(r||(r=new v,t.push(r)),r.push(m.parse(e,n))):r=null}return t}},toJSON:function(){return this.map(function(e){return e.toJSON()})},toBytesSink:function(e){var t=0;this.forEach(function(r){0!==t++&&e.put([d]),r.forEach(function(t){e.put([t.type()]),t.account&&t.account.toBytesSink(e),t.currency&&t.currency.toBytesSink(e),t.issuer&&t.issuer.toBytesSink(e)})}),e.put([h])}});e.exports={PathSet:y}},function(e,t,r){"use strict";var n=r(507),i=r(519),o=i.ensureArrayLikeIs,s=i.SerializedType,a=r(463),c=a.Field,u=r(541),f=u.STObject,h=c.ArrayEndMarker,d=n({mixins:s,inherits:Array,statics:{fromParser:function(e){for(var t=new d;!e.end();){var r=e.readField();if(r===h)break;var n=new f;n[r]=e.readFieldValue(r),t.push(n)}return t},from:function(e){return o(d,e).withChildren(f)}},toJSON:function(){return this.map(function(e){return e.toJSON()})},toBytesSink:function(e){this.forEach(function(t){return t.toBytesSink(e)})}});e.exports={STArray:d}},function(e,t,r){"use strict";var n=r(508)["default"],_=r(192),i=r(507),o=r(463),s=o.Field,a=r(520),c=a.BinarySerializer,u=s.ObjectEndMarker,f=r(519),h=f.SerializedType,d=i({mixins:h,statics:{fromParser:function(e,t){for(var r="number"==typeof t?e.pos()+t:null,n=new this;!e.end(r);){var i=e.readField();if(i===u)break;n[i]=e.readFieldValue(i)}return n},from:function(e){if(e instanceof this)return e;if("object"==typeof e)return _.transform(e,function(e,t,r){var n=s[r];n?e[n]=n.associatedType.from(t):e[r]=t},new this);throw new Error(e+" is unsupported")}},fieldKeys:function(){return n(this).map(function(e){return s[e]}).filter(Boolean)},toJSON:function(){return _.transform(this,function(e,t,r){e[r]=t&&t.toJSON?t.toJSON():t})},toBytesSink:function(e){var t=this,r=arguments.length<=1||void 0===arguments[1]?function(){return!0}:arguments[1],n=new c(e),i=this.fieldKeys(),o=_.sortBy(i,"ordinal");o.filter(r).forEach(function(e){var r=t[e];e.isSerialized&&n.writeFieldAndValue(e,r)})}});e.exports={STObject:d}},function(e,t,r){"use strict";var n=r(507),i=r(535),o=i.UInt,s=n({inherits:o,statics:{width:2}});e.exports={UInt16:s}},function(e,t,r){"use strict";var n=r(507),i=r(535),o=i.UInt,s=n({inherits:o,statics:{width:4}});e.exports={UInt32:s}},function(e,t,r){"use strict";var n=r(507),i=r(535),o=i.UInt,s=n({inherits:o,statics:{width:1}});e.exports={UInt8:s}},function(e,t,r){"use strict";var n=r(507),i=r(538),o=i.Hash256,s=r(519),a=s.ensureArrayLikeIs,c=s.SerializedType,u=n({mixins:c,inherits:Array,statics:{fromParser:function(e,t){for(var r=new this,n=null!==t?t:e.size()-e.pos(),i=n/32,s=0;i>s;s++)r.push(o.fromParser(e));return r},from:function(e){return a(u,e).withChildren(o)}},toBytesSink:function(e){this.forEach(function(t){return t.toBytesSink(e)})},toJSON:function(){return this.map(function(e){return e.toJSON()})}});e.exports={Vector256:u}},function(e,t,r){"use strict";function n(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=t.prefix,n=t.suffix,i=t.signingFieldsOnly,o=void 0===i?!1:i,a=new l;r&&a.put(r);var c=o?function(e){return e.isSigningField}:void 0;return s.STObject.from(e).toBytesSink(a,c),n&&a.put(n),a.toBytes()}function i(e){var t=arguments.length<=1||void 0===arguments[1]?c.transactionSig:arguments[1];return n(e,{prefix:t,signingFieldsOnly:!0})}function o(e,t){var r=c.transactionMultiSig,i=s.AccountID.from(t).toBytes();return n(e,{prefix:r,suffix:i,signingFieldsOnly:!0})}var s=r(515),a=r(547),c=a.HashPrefix,u=r(548),f=u.BinaryParser,h=r(520),d=h.BinarySerializer,l=h.BytesList,p=r(506),g=p.bytesToHex,m=p.slice,v=p.parseBytes,y=r(549),b=y.sha512Half,w=y.transactionID,S=function(e){return new f(e)},x=function(e){return e.readType(s.STObject).toJSON()},E=function(e){return x(S(e))};e.exports={BinaryParser:f,BinarySerializer:d,BytesList:l,makeParser:S,serializeObject:n,readJSON:x,bytesToHex:g,parseBytes:v,multiSigningData:o,signingData:i,binaryToJSON:E,sha512Half:b,transactionID:w,slice:m}},function(e,t,r){"use strict";function n(e){return o(e,4)}var i=r(506),o=i.serializeUIntN,s={transactionID:n(1415073280),transaction:n(1397638144),accountStateEntry:n(1296846336),innerNode:n(1296649728),ledgerHeader:n(1280791040),transactionSig:n(1398036480),transactionMultiSig:n(1397576704),validation:n(1447119872),proposal:n(1347571712)};e.exports={HashPrefix:s}},function(e,t,r){"use strict";var n=r(198),i=r(507),o=r(463),s=o.Field,a=r(506),c=a.slice,u=a.parseBytes,f=i({BinaryParser:function(e){this._buf=u(e,Uint8Array),this._length=this._buf.length,this._cursor=0},skip:function(e){this._cursor+=e},read:function(e){var t=arguments.length<=1||void 0===arguments[1]?Uint8Array:arguments[1],r=this._cursor,i=this._cursor+e;return n(i<=this._buf.length),this._cursor=i,c(this._buf,r,i,t)},readUIntN:function(e){return this.read(e,Array).reduce(function(e,t){return e<<8|t})>>>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(e){var t=this.pos();return t>=this._length||null!==e&&t>=e},readVL:function(){return this.read(this.readVLLength())},readVLLength:function(){var e=this.readUInt8();if(192>=e)return e;if(240>=e){var t=this.readUInt8();return 193+256*(e-193)+t}if(254>=e){var t=this.readUInt8(),r=this.readUInt8();return 12481+65536*(e-241)+256*t+r}throw new Error("Invalid varint length indicator")},readFieldOrdinal:function(){var e=this.readUInt8(),t=(240&e)>>>4||this.readUInt8(),r=15&e||this.readUInt8();return t<<16|r},readField:function(){return s.from(this.readFieldOrdinal())},readType:function(e){return e.fromParser(this)},typeForField:function(e){return e.associatedType},readFieldValue:function(e){var t=this.typeForField(e);if(!t)throw new Error("unsupported: ("+e.name+", "+e.type.name+")");var r=e.isVLEncoded?this.readVLLength():null,n=t.fromParser(this,r);if(void 0===n)throw new Error("fromParser for ("+e.name+", "+e.type.name+") -> undefined ");return n},readFieldAndValue:function(){var e=this.readField();return[e,this.readFieldValue(e)]}});e.exports={BinaryParser:f}},function(e,t,r){(function(t){"use strict";function n(){for(var e=new l,t=arguments.length,r=Array(t),n=0;t>n;n++)r[n]=arguments[n];return r.forEach(function(t){return e.put(t)}),h(e.finish256(),Uint8Array)}function i(e){return new u(n(a.transactionID,e))}var o=r(507),s=r(547),a=s.HashPrefix,c=r(515),u=c.Hash256,f=r(506),h=f.parseBytes,d=r(550),l=o({Sha512Half:function(){this.hash=d("sha512")},statics:{put:function(e){return(new this).put(e)}},put:function(e){return this.hash.update(h(e,t)),this},finish256:function(){var e=this.hash.digest();return e.slice(0,32)},finish:function(){return new u(this.finish256())}});e.exports={Sha512Half:l,sha512Half:n,transactionID:i}}).call(t,r(204).Buffer)},function(e,t,r){(function(t){"use strict";function n(e){u.call(this,"digest"),this._hash=e,this.buffers=[]}function i(e){u.call(this,"digest"),this._hash=e}var o=r(513),s=r(551),a=r(553),c=r(554),u=r(562);o(n,u),n.prototype._update=function(e){this.buffers.push(e)},n.prototype._final=function(){var e=t.concat(this.buffers),r=this._hash(e);return this.buffers=null,r},o(i,u),i.prototype._update=function(e){this._hash.update(e)},i.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return e=e.toLowerCase(),"md5"===e?new n(s):"rmd160"===e||"ripemd160"===e?new n(a):new i(c(e))}}).call(t,r(204).Buffer)},function(e,t,r){"use strict";function n(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;for(var r=1732584193,n=-271733879,i=-1732584194,f=271733878,h=0;h<e.length;h+=16){var d=r,l=n,p=i,g=f;r=o(r,n,i,f,e[h+0],7,-680876936),f=o(f,r,n,i,e[h+1],12,-389564586),i=o(i,f,r,n,e[h+2],17,606105819),n=o(n,i,f,r,e[h+3],22,-1044525330),r=o(r,n,i,f,e[h+4],7,-176418897),f=o(f,r,n,i,e[h+5],12,1200080426),i=o(i,f,r,n,e[h+6],17,-1473231341),n=o(n,i,f,r,e[h+7],22,-45705983),r=o(r,n,i,f,e[h+8],7,1770035416),f=o(f,r,n,i,e[h+9],12,-1958414417),i=o(i,f,r,n,e[h+10],17,-42063),n=o(n,i,f,r,e[h+11],22,-1990404162),r=o(r,n,i,f,e[h+12],7,1804603682),f=o(f,r,n,i,e[h+13],12,-40341101),i=o(i,f,r,n,e[h+14],17,-1502002290),n=o(n,i,f,r,e[h+15],22,1236535329),r=s(r,n,i,f,e[h+1],5,-165796510),f=s(f,r,n,i,e[h+6],9,-1069501632),i=s(i,f,r,n,e[h+11],14,643717713),n=s(n,i,f,r,e[h+0],20,-373897302),r=s(r,n,i,f,e[h+5],5,-701558691),f=s(f,r,n,i,e[h+10],9,38016083),i=s(i,f,r,n,e[h+15],14,-660478335),n=s(n,i,f,r,e[h+4],20,-405537848),r=s(r,n,i,f,e[h+9],5,568446438),f=s(f,r,n,i,e[h+14],9,-1019803690),i=s(i,f,r,n,e[h+3],14,-187363961),n=s(n,i,f,r,e[h+8],20,1163531501),r=s(r,n,i,f,e[h+13],5,-1444681467),f=s(f,r,n,i,e[h+2],9,-51403784),i=s(i,f,r,n,e[h+7],14,1735328473),n=s(n,i,f,r,e[h+12],20,-1926607734),r=a(r,n,i,f,e[h+5],4,-378558),f=a(f,r,n,i,e[h+8],11,-2022574463),i=a(i,f,r,n,e[h+11],16,1839030562),n=a(n,i,f,r,e[h+14],23,-35309556),r=a(r,n,i,f,e[h+1],4,-1530992060),f=a(f,r,n,i,e[h+4],11,1272893353),i=a(i,f,r,n,e[h+7],16,-155497632),n=a(n,i,f,r,e[h+10],23,-1094730640),r=a(r,n,i,f,e[h+13],4,681279174),f=a(f,r,n,i,e[h+0],11,-358537222),i=a(i,f,r,n,e[h+3],16,-722521979),n=a(n,i,f,r,e[h+6],23,76029189),r=a(r,n,i,f,e[h+9],4,-640364487),f=a(f,r,n,i,e[h+12],11,-421815835),i=a(i,f,r,n,e[h+15],16,530742520),n=a(n,i,f,r,e[h+2],23,-995338651),r=c(r,n,i,f,e[h+0],6,-198630844),f=c(f,r,n,i,e[h+7],10,1126891415),i=c(i,f,r,n,e[h+14],15,-1416354905),n=c(n,i,f,r,e[h+5],21,-57434055),r=c(r,n,i,f,e[h+12],6,1700485571),f=c(f,r,n,i,e[h+3],10,-1894986606),i=c(i,f,r,n,e[h+10],15,-1051523),n=c(n,i,f,r,e[h+1],21,-2054922799),r=c(r,n,i,f,e[h+8],6,1873313359),f=c(f,r,n,i,e[h+15],10,-30611744),i=c(i,f,r,n,e[h+6],15,-1560198380),n=c(n,i,f,r,e[h+13],21,1309151649),r=c(r,n,i,f,e[h+4],6,-145523070),f=c(f,r,n,i,e[h+11],10,-1120210379),i=c(i,f,r,n,e[h+2],15,718787259),n=c(n,i,f,r,e[h+9],21,-343485551),r=u(r,d),n=u(n,l),i=u(i,p),f=u(f,g)}return Array(r,n,i,f)}function i(e,t,r,n,i,o){return u(f(u(u(t,e),u(n,o)),i),r)}function o(e,t,r,n,o,s,a){return i(t&r|~t&n,e,t,o,s,a)}function s(e,t,r,n,o,s,a){return i(t&n|r&~n,e,t,o,s,a)}function a(e,t,r,n,o,s,a){return i(t^r^n,e,t,o,s,a)}function c(e,t,r,n,o,s,a){return i(r^(t|~n),e,t,o,s,a)}function u(e,t){var r=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(r>>16);return n<<16|65535&r}function f(e,t){return e<<t|e>>>32-t}var h=r(552);e.exports=function(e){return h.hash(e,n,16)}},function(e,t,r){(function(e){"use strict";function r(t,r){if(t.length%o!==0){var n=t.length+(o-t.length%o);t=e.concat([t,s],n)}for(var i=[],a=r?t.readInt32BE:t.readInt32LE,c=0;c<t.length;c+=o)i.push(a.call(t,c));return i}function n(t,r,n){for(var i=new e(r),o=n?i.writeInt32BE:i.writeInt32LE,s=0;s<t.length;s++)o.call(i,t[s],4*s,!0);return i}function i(t,i,o,s){e.isBuffer(t)||(t=new e(t));var c=i(r(t,s),t.length*a);return n(c,o,s)}var o=4,s=new e(o);s.fill(0);var a=8;t.hash=i}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function r(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t}function n(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t}function i(e,t,r){for(var n=0;16>n;n++){var i=r+n,h=t[i];t[i]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}var y,b,w,S,x,E,A,P,T,I;E=y=e[0],A=b=e[1],P=w=e[2],T=S=e[3],I=x=e[4];var O;for(n=0;80>n;n+=1)O=y+t[r+d[n]]|0,O+=16>n?o(b,w,S)+m[0]:32>n?s(b,w,S)+m[1]:48>n?a(b,w,S)+m[2]:64>n?c(b,w,S)+m[3]:u(b,w,S)+m[4],O=0|O,O=f(O,p[n]),O=O+x|0,y=x,x=S,S=f(w,10),w=b,b=O,O=E+t[r+l[n]]|0,O+=16>n?u(A,P,T)+v[0]:32>n?c(A,P,T)+v[1]:48>n?a(A,P,T)+v[2]:64>n?s(A,P,T)+v[3]:o(A,P,T)+v[4],O=0|O,O=f(O,g[n]),O=O+I|0,E=I,I=T,T=f(P,10),P=A,A=O;O=e[1]+w+T|0,e[1]=e[2]+S+I|0,e[2]=e[3]+x+E|0,e[3]=e[4]+y+A|0,e[4]=e[0]+b+P|0,e[0]=O}function o(e,t,r){return e^t^r}function s(e,t,r){return e&t|~e&r}function a(e,t,r){return(e|~t)^r}function c(e,t,r){return e&r|t&~r}function u(e,t,r){return e^(t|~r)}function f(e,t){return e<<t|e>>>32-t}function h(e){var o=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof e&&(e=new t(e,"utf8"));var s=r(e),a=8*e.length,c=8*e.length;s[a>>>5]|=128<<24-a%32,s[(a+64>>>9<<4)+14]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8);for(var u=0;u<s.length;u+=16)i(o,s,u);for(u=0;5>u;u++){var f=o[u];o[u]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}var h=n(o);return new t(h)}var d=[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],l=[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],p=[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],g=[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],m=[0,1518500249,1859775393,2400959708,2840853838],v=[1352829926,1548603684,1836072691,2053994217,0];e.exports=h}).call(t,r(204).Buffer)},function(e,t,r){var t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};t.sha=r(555),t.sha1=r(557),t.sha224=r(558),t.sha256=r(559),t.sha384=r(560),t.sha512=r(561)},function(e,t,r){(function(t){function n(){this.init(),this._w=a,s.call(this,64,56)}function i(e,t){return e<<t|e>>>32-t}var o=r(513),s=r(556),a=new Array(80);o(n,s),n.prototype.init=function(){return this._a=1732584193,this._b=-271733879,this._c=-1732584194,this._d=271733878,this._e=-1009589776,this},n.prototype._update=function(e){function t(){return o[h-3]^o[h-8]^o[h-14]^o[h-16]}function r(e,t){o[h]=e;
  var r=i(s,5)+t+f+e+n;f=u,u=c,c=i(a,30),a=s,s=r,h++}var n,o=this._w,s=this._a,a=this._b,c=this._c,u=this._d,f=this._e,h=0;for(n=1518500249;16>h;)r(e.readInt32BE(4*h),a&c|~a&u);for(;20>h;)r(t(),a&c|~a&u);for(n=1859775393;40>h;)r(t(),a^c^u);for(n=-1894007588;60>h;)r(t(),a&c|a&u|c&u);for(n=-899497514;80>h;)r(t(),a^c^u);this._a=s+this._a|0,this._b=a+this._b|0,this._c=c+this._c|0,this._d=u+this._d|0,this._e=f+this._e|0},n.prototype._hash=function(){var e=new t(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=n}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function r(e,r){this._block=new t(e),this._finalSize=r,this._blockSize=e,this._len=0,this._s=0}r.prototype.update=function(e,r){"string"==typeof e&&(r=r||"utf8",e=new t(e,r));for(var n=this._len+=e.length,i=this._s||0,o=0,s=this._block;n>i;){for(var a=Math.min(e.length,o+this._blockSize-i%this._blockSize),c=a-o,u=0;c>u;u++)s[i%this._blockSize+u]=e[u+o];i+=c,o+=c,i%this._blockSize===0&&this._update(s)}return this._s=i,this},r.prototype.digest=function(e){var t=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),t%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(t,this._blockSize-4);var r=this._update(this._block)||this._hash();return e?r.toString(e):r},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=r}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function n(){this.init(),this._w=a,s.call(this,64,56)}function i(e,t){return e<<t|e>>>32-t}var o=r(513),s=r(556),a=new Array(80);o(n,s),n.prototype.init=function(){return this._a=1732584193,this._b=-271733879,this._c=-1732584194,this._d=271733878,this._e=-1009589776,this},n.prototype._update=function(e){function t(){return i(o[h-3]^o[h-8]^o[h-14]^o[h-16],1)}function r(e,t){o[h]=e;var r=i(s,5)+t+f+e+n;f=u,u=c,c=i(a,30),a=s,s=r,h++}var n,o=this._w,s=this._a,a=this._b,c=this._c,u=this._d,f=this._e,h=0;for(n=1518500249;16>h;)r(e.readInt32BE(4*h),a&c|~a&u);for(;20>h;)r(t(),a&c|~a&u);for(n=1859775393;40>h;)r(t(),a^c^u);for(n=-1894007588;60>h;)r(t(),a&c|a&u|c&u);for(n=-899497514;80>h;)r(t(),a^c^u);this._a=s+this._a|0,this._b=a+this._b|0,this._c=c+this._c|0,this._d=u+this._d|0,this._e=f+this._e|0},n.prototype._hash=function(){var e=new t(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=n}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function n(){this.init(),this._w=a,s.call(this,64,56)}var i=r(513),o=r(559),s=r(556),a=new Array(64);i(n,o),n.prototype.init=function(){return this._a=-1056596264,this._b=914150663,this._c=812702999,this._d=-150054599,this._e=-4191439,this._f=1750603025,this._g=1694076839,this._h=-1090891868,this},n.prototype._hash=function(){var e=new t(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=n}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function n(){this.init(),this._w=l,h.call(this,64,56)}function i(e,t,r){return r^e&(t^r)}function o(e,t,r){return e&t|r&(e|t)}function s(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function a(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function c(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function u(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}var f=r(513),h=r(556),d=[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],l=new Array(64);f(n,h),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this},n.prototype._update=function(e){function t(){return u(n[b-2])+n[b-7]+c(n[b-15])+n[b-16]}function r(e){n[b]=e;var t=y+a(g)+i(g,m,v)+d[b]+e,r=s(f)+o(f,h,l);y=v,v=m,m=g,g=p+t,p=l,l=h,h=f,f=t+r,b++}for(var n=this._w,f=0|this._a,h=0|this._b,l=0|this._c,p=0|this._d,g=0|this._e,m=0|this._f,v=0|this._g,y=0|this._h,b=0;16>b;)r(e.readInt32BE(4*b));for(;64>b;)r(t());this._a=f+this._a|0,this._b=h+this._b|0,this._c=l+this._c|0,this._d=p+this._d|0,this._e=g+this._e|0,this._f=m+this._f|0,this._g=v+this._g|0,this._h=y+this._h|0},n.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=n}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function n(){this.init(),this._w=a,s.call(this,128,112)}var i=r(513),o=r(561),s=r(556),a=new Array(160);i(n,o),n.prototype.init=function(){return this._a=-876896931,this._b=1654270250,this._c=-1856437926,this._d=355462360,this._e=1731405415,this._f=-1900787065,this._g=-619958771,this._h=1203062813,this._al=-1056596264,this._bl=914150663,this._cl=812702999,this._dl=-150054599,this._el=-4191439,this._fl=1750603025,this._gl=1694076839,this._hl=-1090891868,this},n.prototype._hash=function(){function e(e,t,n){r.writeInt32BE(e,n),r.writeInt32BE(t,n+4)}var r=new t(48);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),r},e.exports=n}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function n(){this.init(),this._w=g,l.call(this,128,112)}function i(e,t,r){return r^e&(t^r)}function o(e,t,r){return e&t|r&(e|t)}function s(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function a(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function c(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function u(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function f(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function h(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}var d=r(513),l=r(556),p=[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],g=new Array(160);d(n,l),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this},n.prototype._update=function(e){function t(){var e=l[N-30],t=l[N-30+1],r=c(e,t),i=u(t,e);e=l[N-4],t=l[N-4+1];var o=f(e,t),s=h(t,e),a=l[N-14],p=l[N-14+1],g=l[N-32],m=l[N-32+1];d=i+p,n=r+a+(i>>>0>d>>>0?1:0),d+=s,n=n+o+(s>>>0>d>>>0?1:0),d+=m,n=n+g+(m>>>0>d>>>0?1:0)}function r(){l[N]=n,l[N+1]=d;var e=o(g,m,v),t=o(E,A,P),r=s(g,E),c=s(E,g),u=a(b,I),f=a(I,b),h=p[N],j=p[N+1],F=i(b,w,S),M=i(I,O,R),B=k+f,C=x+u+(k>>>0>B>>>0?1:0);B+=M,C=C+F+(M>>>0>B>>>0?1:0),B+=j,C=C+h+(j>>>0>B>>>0?1:0),B+=d,C=C+n+(d>>>0>B>>>0?1:0);var q=c+t,z=r+e+(c>>>0>q>>>0?1:0);x=S,k=R,S=w,R=O,w=b,O=I,I=T+B|0,b=y+C+(T>>>0>I>>>0?1:0)|0,y=v,T=P,v=m,P=A,m=g,A=E,E=B+q|0,g=C+z+(B>>>0>E>>>0?1:0)|0,L++,N+=2}for(var n,d,l=this._w,g=0|this._a,m=0|this._b,v=0|this._c,y=0|this._d,b=0|this._e,w=0|this._f,S=0|this._g,x=0|this._h,E=0|this._al,A=0|this._bl,P=0|this._cl,T=0|this._dl,I=0|this._el,O=0|this._fl,R=0|this._gl,k=0|this._hl,L=0,N=0;16>L;)n=e.readInt32BE(4*N),d=e.readInt32BE(4*N+4),r();for(;80>L;)t(),r();this._al=this._al+E|0,this._bl=this._bl+A|0,this._cl=this._cl+P|0,this._dl=this._dl+T|0,this._el=this._el+I|0,this._fl=this._fl+O|0,this._gl=this._gl+R|0,this._hl=this._hl+k|0,this._a=this._a+g+(this._al>>>0<E>>>0?1:0)|0,this._b=this._b+m+(this._bl>>>0<A>>>0?1:0)|0,this._c=this._c+v+(this._cl>>>0<P>>>0?1:0)|0,this._d=this._d+y+(this._dl>>>0<T>>>0?1:0)|0,this._e=this._e+b+(this._el>>>0<I>>>0?1:0)|0,this._f=this._f+w+(this._fl>>>0<O>>>0?1:0)|0,this._g=this._g+S+(this._gl>>>0<R>>>0?1:0)|0,this._h=this._h+x+(this._hl>>>0<k>>>0?1:0)|0},n.prototype._hash=function(){function e(e,t,n){r.writeInt32BE(e,n),r.writeInt32BE(t,n+4)}var r=new t(64);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),e(this._g,this._gl,48),e(this._h,this._hl,56),r},e.exports=n}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function n(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this["final"]=this._finalOrDigest,this._decoder=null,this._encoding=null}var i=r(285).Transform,o=r(513),s=r(295).StringDecoder;e.exports=n,o(n,i),n.prototype.update=function(e,r,n){"string"==typeof e&&(e=new t(e,r));var i=this._update(e);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},n.prototype.setAutoPadding=function(){},n.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},n.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},n.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},n.prototype._transform=function(e,_,t){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(n){r=n}finally{t(r)}},n.prototype._flush=function(e){var t;try{this.push(this._final())}catch(r){t=r}finally{e(t)}},n.prototype._finalOrDigest=function(e){var r=this._final()||new t("");return e&&(r=this._toString(r,e,!0)),r},n.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new s(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n}}).call(t,r(204).Buffer)},function(e,t,r){"use strict";var n=r(198),i=r(507),o=r(515),s=o.Hash256,a=r(547),c=a.HashPrefix,u=r(549),f=u.Sha512Half,h=i({virtuals:{hashPrefix:function(){},isLeaf:function(){},isInner:function(){}},cached:{hash:function(){var e=f.put(this.hashPrefix());return this.toBytesSink(e),e.finish()}}}),d=i({inherits:h,ShaMapLeaf:function(e,t){h.call(this),this.index=e,this.item=t},isLeaf:function(){return!0},isInner:function(){return!1},hashPrefix:function(){return this.item.hashPrefix()},toBytesSink:function(e){this.item.toBytesSink(e),this.index.toBytesSink(e)}}),l=h.prototype,p=i({inherits:h,ShaMapInner:function(){var e=arguments.length<=0||void 0===arguments[0]?0:arguments[0];h.call(this),this.depth=e,this.slotBits=0,this.branches=Array(16)},isInner:function(){return!0},isLeaf:function(){return!1},hashPrefix:function(){return c.innerNode},setBranch:function(e,t){this.slotBits=this.slotBits|1<<e,this.branches[e]=t},empty:function(){return 0===this.slotBits},hash:function(){return this.empty()?s.ZERO_256:l.hash.call(this)},toBytesSink:function(e){for(var t=0;t<this.branches.length;t++){var r=this.branches[t],n=r?r.hash():s.ZERO_256;n.toBytesSink(e)}},addItem:function(e,t,r){n(e instanceof s);var i=e.nibblet(this.depth),o=this.branches[i];if(o)if(o.isLeaf()){var a=new p(this.depth+1);a.addItem(o.index,null,o),a.addItem(e,t,r),this.setBranch(i,a)}else o.isInner()?o.addItem(e,t,r):n(!1);else this.setBranch(i,r||new d(e,t))}}),g=i({inherits:p});e.exports={ShaMap:g}},function(e,t,r){"use strict";function n(e,t){var r=new p;return t.forEach(function(t){return r.addItem.apply(r,a(e(t)))}),r.hash()}function i(e){u(e.hash);var t=d.from(e.hash),r={hashPrefix:function(){return m.transaction},toBytesSink:function(t){var r=new w(t);r.writeLengthEncoded(h.from(e)),r.writeLengthEncoded(h.from(e.metaData))}};return[t,r]}function o(e){var t=d.from(e.index),r=S(e),n={hashPrefix:function(){return m.accountStateEntry},toBytesSink:function(e){e.put(r)}};return[t,n]}function s(e){var t=new y;return t.put(m.ledgerHeader),u(void 0!==e.parent_close_time),u(void 0!==e.close_flags),f.UInt32.from(e.ledger_index).toBytesSink(t),f.UInt64.from(new c(e.total_coins)).toBytesSink(t),f.Hash256.from(e.parent_hash).toBytesSink(t),f.Hash256.from(e.transaction_hash).toBytesSink(t),f.Hash256.from(e.account_hash).toBytesSink(t),f.UInt32.from(e.parent_close_time).toBytesSink(t),f.UInt32.from(e.close_time).toBytesSink(t),f.UInt8.from(e.close_time_resolution).toBytesSink(t),f.UInt8.from(e.close_flags).toBytesSink(t),t.finish()}var a=r(522)["default"],_=r(192),c=r(531),u=r(198),f=r(515),h=f.STObject,d=f.Hash256,l=r(563),p=l.ShaMap,g=r(547),m=g.HashPrefix,v=r(549),y=v.Sha512Half,b=r(546),w=b.BinarySerializer,S=b.serializeObject,x=_.partial(n,i),E=_.partial(n,o);e.exports={accountStateHash:E,transactionTreeHash:x,ledgerHash:s}},function(e,t,r){"use strict";var n=r(532),i=r(506),o=i.bytesToHex,s=i.slice,a=i.parseBytes,c=r(515),u=c.UInt64,f=r(531);e.exports={encode:function(e){var t=e instanceof n?e:new n(e),r=t.e-15,i=t.times("1e"+-r).abs().toString(),o=new u(new f(i)).toBytes();return o[0]=r+100,o},decode:function(e){var t=s(a(e),-8),r=t[0]-100,i=new n(o(s(t,1)),16);return i.times("1e"+r)}}},function(e,t,r){"use strict";function n(e){e.Flags|=g,e.Flags>>>=0}function i(e){var t=f(e),r=l(t).toHex(),n=m(t);return{tx_json:e,tx_blob:n,hash:r}}function o(e,t){var r=arguments.length<=2||void 0===arguments[2]?null:arguments[2],o=_.clone(e);o.SigningPubKey="",n(o);var s=r||t.id(),a=t.sign(d(o,s)),c={Signer:{SigningPubKey:m(t.publicBytes()),TxnSignature:m(a),Account:s}},u=o.Signers=o.Signers||[];return u.push(c),u.sort(y),i(o)}function s(e,t){var r=_.clone(e);return n(r),r.SigningPubKey=m(t.publicBytes()),r.TxnSignature=m(t.sign(p(r))),i(r)}var _=r(192),a=r(515),c=a.AccountID,u=r(546),f=u.serializeObject,h=u.bytesToHex,d=u.multiSigningData,l=u.transactionID,p=u.signingData,g=2147483648,m=function(e){return h(e)},v=function(e){return c.from(e.Signer.Account)},y=function(e,t){return v(e).compareTo(v(t))};e.exports={signFor:o,sign:s}},function(e,t,r){(function(t){"use strict";function n(e){return O(new t(e,"hex"))}function i(e,t){return Array(t-e.length+1).join("0")+e}function o(e,t){return i(Number(e).toString(16),2*t)}function s(e){return new t(e).toString("hex")}function a(e,t){var r=new S(e).toString(16);return i(r,2*t)}function c(e){return new t(x(e)).toString("hex")}function u(e){if(3===e.length){var t=new Array(21).join("0").split("").map(parseFloat);return t[12]=255&e.charCodeAt(0),t[13]=255&e.charCodeAt(1),t[14]=255&e.charCodeAt(2),s(t)}return e}function f(e){var t=e.length/2;if(192>=t)return s([t])+e;if(12480>=t){var r=t-193;return s([193+(r>>>8),255&r])+e}if(918744>=t){var r=t-12481;return s([241+(r>>>16),r>>>8&255,255&r])+e}throw new Error("Variable integer overflow.")}function h(e){var t=A.HASH_TX_ID.toString(16).toUpperCase();return n(t+e)}function d(e){return h(E.encode(e))}function l(e){var t=A.HASH_TX_SIGN.toString(16).toUpperCase();return n(t+e)}function p(e){return l(E.encode(e))}function g(e){var t="00"+o(I.account.charCodeAt(0),1);return n(t+c(e))}function m(e,t){var r="00"+o(I.offer.charCodeAt(0),1);return n(r+c(e)+o(t,4))}function v(e,t,r){var i=c(e),s=c(t),a=new S(i,16).greaterThan(new S(s,16)),f=a?s:i,h=a?i:s,d="00"+o(I.rippleState.charCodeAt(0),1);return n(d+f+h+u(r))}function y(e){var t=new P;return e.forEach(function(e){var r=E.encode(e),n=E.encode(e.metaData),i=h(r),o=f(r)+f(n);t.add_item(i,o,T.TYPE_TRANSACTION_MD)}),t.hash()}function b(e){var t=new P;return e.forEach(function(e){var r=E.encode(e);t.add_item(e.index,r,T.TYPE_ACCOUNT_STATE)}),t.hash()}function w(e){var t=A.HASH_LEDGER.toString(16).toUpperCase();return n(t+o(e.ledger_index,4)+a(e.total_coins,8)+e.parent_hash+e.transaction_hash+e.account_hash+o(e.parent_close_time,4)+o(e.close_time,4)+o(e.close_time_resolution,1)+o(e.close_flags,1))}var S=r(196),x=r(249).decodeAddress,E=r(461),A=r(568),P=r(569).SHAMap,T=r(569).SHAMapTreeNode,I=r(585),O=r(570);e.exports={computeTransactionHash:d,computeBinaryTransactionHash:h,computeTransactionSigningHash:p,computeBinaryTransactionSigningHash:l,computeAccountHash:g,computeOrderHash:m,computeTrustlineHash:v,computeStateTreeHash:b,computeTransactionTreeHash:y,computeLedgerHash:w}}).call(t,r(204).Buffer)},function(e,t){"use strict";t.HASH_TX_ID=1415073280,t.HASH_TX_NODE=1397638144,t.HASH_INNER_NODE=1296649728,t.HASH_LEAF_NODE=1296846336,t.HASH_TX_SIGN=1398036480,t.HASH_TX_SIGN_TESTNET=1937012736,t.HASH_TX_MULTISIGN=1397576704,t.HASH_LEDGER=1280791040},function(e,t,r){(function(e){"use strict";function n(){}function i(t){return f(new e(t,"hex"))}function o(e){n.call(this),this.leaves={},this.type=n.INNER,this.depth=void 0===e?0:e,this.empty=!0}function s(e,t,r){if(n.call(this),"string"!=typeof e)throw new Error("Tag is unexpected type.");this.tag=e,this.type=r,this.data=t}function a(){this.root=new o(0)}var c=r(199),u=r(568),f=r(570),h="0000000000000000000000000000000000000000000000000000000000000000";n.TYPE_INNER=1,n.TYPE_TRANSACTION_NM=2,n.TYPE_TRANSACTION_MD=3,n.TYPE_ACCOUNT_STATE=4,n.prototype.add_item=function(e,t){throw new Error("Called unimplemented virtual method SHAMapTreeNode#add_item.")},n.prototype.hash=function(){throw new Error("Called unimplemented virtual method SHAMapTreeNode#hash.")},c.inherits(o,n),o.prototype.add_item=function(e,t){var r=this.depth,n=this.get_node(e[r]);if(n)if(n instanceof o)n.add_item(e,t);else{if(n.tag===e)throw new Error("Tried to add a node to a SHAMap that was already in there.");var i=new o(r+1);i.add_item(n.tag,n),i.add_item(e,t),this.set_node(e[r],i)}else this.set_node(e[r],t)},o.prototype.set_node=function(e,t){this.leaves[e]=t,this.empty=!1},o.prototype.get_node=function(e){return this.leaves[e]},o.prototype.hash=function(){if(this.empty)return h;for(var e="",t=0;16>t;t++){var r=t.toString(16).toUpperCase();e+=this.leaves[r]?this.leaves[r].hash():h}var n=u.HASH_INNER_NODE.toString(16);return i(n+e)},c.inherits(s,n),s.prototype.hash=function(){switch(this.type){case n.TYPE_ACCOUNT_STATE:var e=u.HASH_LEAF_NODE.toString(16);return i(e+this.data+this.tag);case n.TYPE_TRANSACTION_NM:return this.tag;case n.TYPE_TRANSACTION_MD:var t=u.HASH_TX_NODE.toString(16);return i(t+this.data+this.tag);default:throw new Error("Tried to hash a SHAMap node of unknown type.")}},a.prototype.add_item=function(e,t,r){this.root.add_item(e,new s(e,t,r))},a.prototype.hash=function(){return this.root.hash()},t.SHAMap=a,t.SHAMapTreeNode=n,t.SHAMapTreeNodeInner=o,t.SHAMapTreeNodeLeaf=s}).call(t,r(204).Buffer)},function(e,t,r){"use strict";function n(e){var t=i("sha512");return t.update(e).digest("hex").toUpperCase().slice(0,64)}var i=r(571);e.exports=n},function(e,t,r){(function(t){"use strict";function n(e){u.call(this,"digest"),this._hash=e,this.buffers=[]}function i(e){u.call(this,"digest"),this._hash=e}var o=r(572),s=r(573),a=r(575),c=r(576),u=r(584);o(n,u),n.prototype._update=function(e){this.buffers.push(e)},n.prototype._final=function(){var e=t.concat(this.buffers),r=this._hash(e);return this.buffers=null,r},o(i,u),i.prototype._update=function(e){this._hash.update(e)},i.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return e=e.toLowerCase(),"md5"===e?new n(s):"rmd160"===e||"ripemd160"===e?new n(a):new i(c(e))}}).call(t,r(204).Buffer)},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t,r){"use strict";function n(e,t){e[t>>5]|=128<<t%32,e[(t+64>>>9<<4)+14]=t;for(var r=1732584193,n=-271733879,i=-1732584194,f=271733878,h=0;h<e.length;h+=16){var d=r,l=n,p=i,g=f;r=o(r,n,i,f,e[h+0],7,-680876936),f=o(f,r,n,i,e[h+1],12,-389564586),i=o(i,f,r,n,e[h+2],17,606105819),n=o(n,i,f,r,e[h+3],22,-1044525330),r=o(r,n,i,f,e[h+4],7,-176418897),f=o(f,r,n,i,e[h+5],12,1200080426),i=o(i,f,r,n,e[h+6],17,-1473231341),n=o(n,i,f,r,e[h+7],22,-45705983),r=o(r,n,i,f,e[h+8],7,1770035416),f=o(f,r,n,i,e[h+9],12,-1958414417),i=o(i,f,r,n,e[h+10],17,-42063),n=o(n,i,f,r,e[h+11],22,-1990404162),r=o(r,n,i,f,e[h+12],7,1804603682),f=o(f,r,n,i,e[h+13],12,-40341101),i=o(i,f,r,n,e[h+14],17,-1502002290),n=o(n,i,f,r,e[h+15],22,1236535329),r=s(r,n,i,f,e[h+1],5,-165796510),f=s(f,r,n,i,e[h+6],9,-1069501632),i=s(i,f,r,n,e[h+11],14,643717713),n=s(n,i,f,r,e[h+0],20,-373897302),r=s(r,n,i,f,e[h+5],5,-701558691),f=s(f,r,n,i,e[h+10],9,38016083),i=s(i,f,r,n,e[h+15],14,-660478335),n=s(n,i,f,r,e[h+4],20,-405537848),r=s(r,n,i,f,e[h+9],5,568446438),f=s(f,r,n,i,e[h+14],9,-1019803690),i=s(i,f,r,n,e[h+3],14,-187363961),n=s(n,i,f,r,e[h+8],20,1163531501),r=s(r,n,i,f,e[h+13],5,-1444681467),f=s(f,r,n,i,e[h+2],9,-51403784),i=s(i,f,r,n,e[h+7],14,1735328473),n=s(n,i,f,r,e[h+12],20,-1926607734),r=a(r,n,i,f,e[h+5],4,-378558),f=a(f,r,n,i,e[h+8],11,-2022574463),i=a(i,f,r,n,e[h+11],16,1839030562),n=a(n,i,f,r,e[h+14],23,-35309556),r=a(r,n,i,f,e[h+1],4,-1530992060),f=a(f,r,n,i,e[h+4],11,1272893353),i=a(i,f,r,n,e[h+7],16,-155497632),n=a(n,i,f,r,e[h+10],23,-1094730640),r=a(r,n,i,f,e[h+13],4,681279174),f=a(f,r,n,i,e[h+0],11,-358537222),i=a(i,f,r,n,e[h+3],16,-722521979),n=a(n,i,f,r,e[h+6],23,76029189),r=a(r,n,i,f,e[h+9],4,-640364487),f=a(f,r,n,i,e[h+12],11,-421815835),i=a(i,f,r,n,e[h+15],16,530742520),n=a(n,i,f,r,e[h+2],23,-995338651),r=c(r,n,i,f,e[h+0],6,-198630844),f=c(f,r,n,i,e[h+7],10,1126891415),i=c(i,f,r,n,e[h+14],15,-1416354905),n=c(n,i,f,r,e[h+5],21,-57434055),r=c(r,n,i,f,e[h+12],6,1700485571),f=c(f,r,n,i,e[h+3],10,-1894986606),i=c(i,f,r,n,e[h+10],15,-1051523),n=c(n,i,f,r,e[h+1],21,-2054922799),r=c(r,n,i,f,e[h+8],6,1873313359),f=c(f,r,n,i,e[h+15],10,-30611744),i=c(i,f,r,n,e[h+6],15,-1560198380),n=c(n,i,f,r,e[h+13],21,1309151649),r=c(r,n,i,f,e[h+4],6,-145523070),f=c(f,r,n,i,e[h+11],10,-1120210379),i=c(i,f,r,n,e[h+2],15,718787259),n=c(n,i,f,r,e[h+9],21,-343485551),r=u(r,d),n=u(n,l),i=u(i,p),f=u(f,g)}return Array(r,n,i,f)}function i(e,t,r,n,i,o){return u(f(u(u(t,e),u(n,o)),i),r)}function o(e,t,r,n,o,s,a){return i(t&r|~t&n,e,t,o,s,a)}function s(e,t,r,n,o,s,a){return i(t&n|r&~n,e,t,o,s,a)}function a(e,t,r,n,o,s,a){return i(t^r^n,e,t,o,s,a)}function c(e,t,r,n,o,s,a){return i(r^(t|~n),e,t,o,s,a)}function u(e,t){var r=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(r>>16);return n<<16|65535&r}function f(e,t){return e<<t|e>>>32-t}var h=r(574);e.exports=function(e){return h.hash(e,n,16)}},function(e,t,r){(function(e){"use strict";function r(t,r){if(t.length%o!==0){var n=t.length+(o-t.length%o);t=e.concat([t,s],n)}for(var i=[],a=r?t.readInt32BE:t.readInt32LE,c=0;c<t.length;c+=o)i.push(a.call(t,c));return i}function n(t,r,n){for(var i=new e(r),o=n?i.writeInt32BE:i.writeInt32LE,s=0;s<t.length;s++)o.call(i,t[s],4*s,!0);return i}function i(t,i,o,s){e.isBuffer(t)||(t=new e(t));var c=i(r(t,s),t.length*a);return n(c,o,s)}var o=4,s=new e(o);s.fill(0);var a=8;t.hash=i}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function r(e){for(var t=[],r=0,n=0;r<e.length;r++,n+=8)t[n>>>5]|=e[r]<<24-n%32;return t}function n(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t}function i(e,t,r){for(var n=0;16>n;n++){var i=r+n,h=t[i];t[i]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}var y,b,w,S,x,E,A,P,T,I;E=y=e[0],A=b=e[1],P=w=e[2],T=S=e[3],I=x=e[4];var O;for(n=0;80>n;n+=1)O=y+t[r+d[n]]|0,O+=16>n?o(b,w,S)+m[0]:32>n?s(b,w,S)+m[1]:48>n?a(b,w,S)+m[2]:64>n?c(b,w,S)+m[3]:u(b,w,S)+m[4],O=0|O,O=f(O,p[n]),O=O+x|0,y=x,x=S,S=f(w,10),w=b,b=O,O=E+t[r+l[n]]|0,O+=16>n?u(A,P,T)+v[0]:32>n?c(A,P,T)+v[1]:48>n?a(A,P,T)+v[2]:64>n?s(A,P,T)+v[3]:o(A,P,T)+v[4],O=0|O,O=f(O,g[n]),O=O+I|0,E=I,I=T,T=f(P,10),P=A,A=O;O=e[1]+w+T|0,e[1]=e[2]+S+I|0,e[2]=e[3]+x+E|0,e[3]=e[4]+y+A|0,e[4]=e[0]+b+P|0,e[0]=O}function o(e,t,r){return e^t^r}function s(e,t,r){return e&t|~e&r}function a(e,t,r){return(e|~t)^r}function c(e,t,r){return e&r|t&~r}function u(e,t,r){return e^(t|~r)}function f(e,t){return e<<t|e>>>32-t}function h(e){var o=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof e&&(e=new t(e,"utf8"));var s=r(e),a=8*e.length,c=8*e.length;s[a>>>5]|=128<<24-a%32,s[(a+64>>>9<<4)+14]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8);for(var u=0;u<s.length;u+=16)i(o,s,u);for(u=0;5>u;u++){var f=o[u];o[u]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}var h=n(o);return new t(h)}var d=[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],l=[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],p=[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],g=[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],m=[0,1518500249,1859775393,2400959708,2840853838],v=[1352829926,1548603684,1836072691,2053994217,0];e.exports=h}).call(t,r(204).Buffer)},function(e,t,r){var t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};t.sha=r(577),t.sha1=r(579),t.sha224=r(580),t.sha256=r(581),t.sha384=r(582),t.sha512=r(583)},function(e,t,r){(function(t){function n(){this.init(),this._w=a,s.call(this,64,56)}function i(e,t){return e<<t|e>>>32-t}var o=r(572),s=r(578),a=new Array(80);o(n,s),n.prototype.init=function(){return this._a=1732584193,this._b=-271733879,this._c=-1732584194,this._d=271733878,this._e=-1009589776,this},n.prototype._update=function(e){function t(){return o[h-3]^o[h-8]^o[h-14]^o[h-16]}function r(e,t){o[h]=e;var r=i(s,5)+t+f+e+n;f=u,u=c,c=i(a,30),a=s,s=r,h++}var n,o=this._w,s=this._a,a=this._b,c=this._c,u=this._d,f=this._e,h=0;for(n=1518500249;16>h;)r(e.readInt32BE(4*h),a&c|~a&u);for(;20>h;)r(t(),a&c|~a&u);for(n=1859775393;40>h;)r(t(),a^c^u);for(n=-1894007588;60>h;)r(t(),a&c|a&u|c&u);for(n=-899497514;80>h;)r(t(),a^c^u);this._a=s+this._a|0,this._b=a+this._b|0,this._c=c+this._c|0,this._d=u+this._d|0,this._e=f+this._e|0},n.prototype._hash=function(){var e=new t(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=n}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function r(e,r){this._block=new t(e),this._finalSize=r,this._blockSize=e,this._len=0,this._s=0}r.prototype.update=function(e,r){"string"==typeof e&&(r=r||"utf8",e=new t(e,r));for(var n=this._len+=e.length,i=this._s||0,o=0,s=this._block;n>i;){for(var a=Math.min(e.length,o+this._blockSize-i%this._blockSize),c=a-o,u=0;c>u;u++)s[i%this._blockSize+u]=e[u+o];i+=c,o+=c,i%this._blockSize===0&&this._update(s)}return this._s=i,this},r.prototype.digest=function(e){var t=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),t%(8*this._blockSize)>=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(t,this._blockSize-4);var r=this._update(this._block)||this._hash();return e?r.toString(e):r},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=r}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function n(){this.init(),this._w=a,s.call(this,64,56)}function i(e,t){return e<<t|e>>>32-t}var o=r(572),s=r(578),a=new Array(80);o(n,s),n.prototype.init=function(){return this._a=1732584193,this._b=-271733879,this._c=-1732584194,this._d=271733878,this._e=-1009589776,this},n.prototype._update=function(e){function t(){return i(o[h-3]^o[h-8]^o[h-14]^o[h-16],1)}function r(e,t){o[h]=e;var r=i(s,5)+t+f+e+n;f=u,u=c,c=i(a,30),a=s,s=r,h++}var n,o=this._w,s=this._a,a=this._b,c=this._c,u=this._d,f=this._e,h=0;for(n=1518500249;16>h;)r(e.readInt32BE(4*h),a&c|~a&u);for(;20>h;)r(t(),a&c|~a&u);for(n=1859775393;40>h;)r(t(),a^c^u);for(n=-1894007588;60>h;)r(t(),a&c|a&u|c&u);for(n=-899497514;80>h;)r(t(),a^c^u);this._a=s+this._a|0,this._b=a+this._b|0,this._c=c+this._c|0,this._d=u+this._d|0,this._e=f+this._e|0},n.prototype._hash=function(){var e=new t(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=n}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function n(){this.init(),this._w=a,s.call(this,64,56)}var i=r(572),o=r(581),s=r(578),a=new Array(64);i(n,o),n.prototype.init=function(){return this._a=-1056596264,this._b=914150663,this._c=812702999,this._d=-150054599,this._e=-4191439,this._f=1750603025,this._g=1694076839,this._h=-1090891868,this},n.prototype._hash=function(){var e=new t(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=n}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function n(){this.init(),this._w=l,h.call(this,64,56)}function i(e,t,r){return r^e&(t^r)}function o(e,t,r){return e&t|r&(e|t)}function s(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function a(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function c(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function u(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}var f=r(572),h=r(578),d=[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],l=new Array(64);
  f(n,h),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this},n.prototype._update=function(e){function t(){return u(n[b-2])+n[b-7]+c(n[b-15])+n[b-16]}function r(e){n[b]=e;var t=y+a(g)+i(g,m,v)+d[b]+e,r=s(f)+o(f,h,l);y=v,v=m,m=g,g=p+t,p=l,l=h,h=f,f=t+r,b++}for(var n=this._w,f=0|this._a,h=0|this._b,l=0|this._c,p=0|this._d,g=0|this._e,m=0|this._f,v=0|this._g,y=0|this._h,b=0;16>b;)r(e.readInt32BE(4*b));for(;64>b;)r(t());this._a=f+this._a|0,this._b=h+this._b|0,this._c=l+this._c|0,this._d=p+this._d|0,this._e=g+this._e|0,this._f=m+this._f|0,this._g=v+this._g|0,this._h=y+this._h|0},n.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=n}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function n(){this.init(),this._w=a,s.call(this,128,112)}var i=r(572),o=r(583),s=r(578),a=new Array(160);i(n,o),n.prototype.init=function(){return this._a=-876896931,this._b=1654270250,this._c=-1856437926,this._d=355462360,this._e=1731405415,this._f=-1900787065,this._g=-619958771,this._h=1203062813,this._al=-1056596264,this._bl=914150663,this._cl=812702999,this._dl=-150054599,this._el=-4191439,this._fl=1750603025,this._gl=1694076839,this._hl=-1090891868,this},n.prototype._hash=function(){function e(e,t,n){r.writeInt32BE(e,n),r.writeInt32BE(t,n+4)}var r=new t(48);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),r},e.exports=n}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function n(){this.init(),this._w=g,l.call(this,128,112)}function i(e,t,r){return r^e&(t^r)}function o(e,t,r){return e&t|r&(e|t)}function s(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function a(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function c(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function u(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function f(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function h(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}var d=r(572),l=r(578),p=[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],g=new Array(160);d(n,l),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this},n.prototype._update=function(e){function t(){var e=l[N-30],t=l[N-30+1],r=c(e,t),i=u(t,e);e=l[N-4],t=l[N-4+1];var o=f(e,t),s=h(t,e),a=l[N-14],p=l[N-14+1],g=l[N-32],m=l[N-32+1];d=i+p,n=r+a+(i>>>0>d>>>0?1:0),d+=s,n=n+o+(s>>>0>d>>>0?1:0),d+=m,n=n+g+(m>>>0>d>>>0?1:0)}function r(){l[N]=n,l[N+1]=d;var e=o(g,m,v),t=o(E,A,P),r=s(g,E),c=s(E,g),u=a(b,I),f=a(I,b),h=p[N],j=p[N+1],F=i(b,w,S),M=i(I,O,R),B=k+f,C=x+u+(k>>>0>B>>>0?1:0);B+=M,C=C+F+(M>>>0>B>>>0?1:0),B+=j,C=C+h+(j>>>0>B>>>0?1:0),B+=d,C=C+n+(d>>>0>B>>>0?1:0);var q=c+t,z=r+e+(c>>>0>q>>>0?1:0);x=S,k=R,S=w,R=O,w=b,O=I,I=T+B|0,b=y+C+(T>>>0>I>>>0?1:0)|0,y=v,T=P,v=m,P=A,m=g,A=E,E=B+q|0,g=C+z+(B>>>0>E>>>0?1:0)|0,L++,N+=2}for(var n,d,l=this._w,g=0|this._a,m=0|this._b,v=0|this._c,y=0|this._d,b=0|this._e,w=0|this._f,S=0|this._g,x=0|this._h,E=0|this._al,A=0|this._bl,P=0|this._cl,T=0|this._dl,I=0|this._el,O=0|this._fl,R=0|this._gl,k=0|this._hl,L=0,N=0;16>L;)n=e.readInt32BE(4*N),d=e.readInt32BE(4*N+4),r();for(;80>L;)t(),r();this._al=this._al+E|0,this._bl=this._bl+A|0,this._cl=this._cl+P|0,this._dl=this._dl+T|0,this._el=this._el+I|0,this._fl=this._fl+O|0,this._gl=this._gl+R|0,this._hl=this._hl+k|0,this._a=this._a+g+(this._al>>>0<E>>>0?1:0)|0,this._b=this._b+m+(this._bl>>>0<A>>>0?1:0)|0,this._c=this._c+v+(this._cl>>>0<P>>>0?1:0)|0,this._d=this._d+y+(this._dl>>>0<T>>>0?1:0)|0,this._e=this._e+b+(this._el>>>0<I>>>0?1:0)|0,this._f=this._f+w+(this._fl>>>0<O>>>0?1:0)|0,this._g=this._g+S+(this._gl>>>0<R>>>0?1:0)|0,this._h=this._h+x+(this._hl>>>0<k>>>0?1:0)|0},n.prototype._hash=function(){function e(e,t,n){r.writeInt32BE(e,n),r.writeInt32BE(t,n+4)}var r=new t(64);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),e(this._g,this._gl,48),e(this._h,this._hl,56),r},e.exports=n}).call(t,r(204).Buffer)},function(e,t,r){(function(t){function n(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this["final"]=this._finalOrDigest,this._decoder=null,this._encoding=null}var i=r(285).Transform,o=r(572),s=r(295).StringDecoder;e.exports=n,o(n,i),n.prototype.update=function(e,r,n){"string"==typeof e&&(e=new t(e,r));var i=this._update(e);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},n.prototype.setAutoPadding=function(){},n.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},n.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},n.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},n.prototype._transform=function(e,_,t){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(n){r=n}finally{t(r)}},n.prototype._flush=function(e){var t;try{this.push(this._final())}catch(r){t=r}finally{e(t)}},n.prototype._finalOrDigest=function(e){var r=this._final()||new t("");return e&&(r=this._toString(r,e,!0)),r},n.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new s(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n}}).call(t,r(204).Buffer)},function(e,t){e.exports={account:"a",dirNode:"d",generatorMap:"g",nickname:"n",rippleState:"r",offer:"o",ownerDir:"O",bookDir:"B",contract:"c",skipList:"s",amendment:"f",feeSettings:"e"}},function(e,t,r){"use strict";function n(e,t){return null===e||t.specification.currency===e}function i(e,t){return{marker:t.marker,results:t.lines.map(u).filter(_.partial(n,e.currency||null))}}function o(e,t,r,n,o,s){var c={command:"account_lines",account:t,ledger_index:r,marker:o,limit:a.clamp(s,10,400),peer:n.counterparty};return e.request(c).then(_.partial(i,n))}function s(e){var t=this,r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return c.getTrustlines({address:e,options:r}),this.getLedgerVersion().then(function(n){var i=_.partial(o,t.connection,e,r.ledgerVersion||n,r);return a.getRecursive(i,r.limit)})}var _=r(192),a=r(440),c=a.common.validate,u=r(587);e.exports=s},function(e,t,r){"use strict";function n(e){var t=i.removeUndefined({limit:e.limit,currency:e.currency,counterparty:e.account,qualityIn:i.parseQuality(e.quality_in)||void 0,qualityOut:i.parseQuality(e.quality_out)||void 0,ripplingDisabled:e.no_ripple||void 0,frozen:e.freeze||void 0,authorized:e.authorized||void 0}),r=i.removeUndefined({limit:e.limit_peer,ripplingDisabled:e.no_ripple_peer||void 0,frozen:e.freeze_peer||void 0,authorized:e.peer_authorized||void 0}),n={balance:e.balance};return{specification:t,counterparty:r,state:n}}var i=r(442);e.exports=n},function(e,t,r){"use strict";function n(e){return{currency:e.specification.currency,counterparty:e.specification.counterparty,value:e.state.balance}}function i(e,t){var r=t.trustlines.map(n);if(!(e.counterparty||e.currency&&"XRP"!==e.currency)){var i={currency:"XRP",value:t.xrp};r.unshift(i)}if(e.limit&&r.length>e.limit){var o=r.length-e.limit;r.splice(-o,o)}return r}function o(e,t){return void 0!==t&&null!==t?Promise.resolve(t):e.getLedgerVersion()}function s(e){var t=this,r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return c.getTrustlines({address:e,options:r}),Promise.all([o(this.connection,r.ledgerVersion).then(function(r){return a.getXRPBalance(t.connection,e,r)}),this.getTrustlines(e,r)]).then(function(e){return i(r,{xrp:e[0],trustlines:e[1]})})}var a=r(440),c=a.common.validate;e.exports=s},function(e,t,r){"use strict";function n(e){var t={};return _.isUndefined(e.balances)||(t.balances=[],_.forEach(e.balances,function(e,r){_.forEach(e,function(e){t.balances.push(Object.assign({counterparty:r},e))})})),_.isUndefined(e.assets)||(t.assets=[],_.forEach(e.assets,function(e,r){_.forEach(e,function(e){t.assets.push(Object.assign({counterparty:r},e))})})),_.isUndefined(e.obligations)||(t.obligations=_.map(e.obligations,function(e,t){return{currency:t,value:e}})),t}function i(e){var t=this,r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return s.getBalanceSheet({address:e,options:r}),o.ensureLedgerVersion.call(this,r).then(function(r){var i={command:"gateway_balances",account:e,strict:!0,hotwallet:r.excludeAddresses,ledger_index:r.ledgerVersion};return t.connection.request(i).then(n)})}var _=r(192),o=r(440),s=o.common.validate;e.exports=i},function(e,t,r){"use strict";function n(e,t){return _.defaults(_.assign({},t,{source_account:e.source_account,source_currencies:e.source_currencies}),{destination_amount:e.destination_amount})}function i(e,t){var r=_.assign({value:-1},t.destination.amount),i={command:"ripple_path_find",source_account:t.source.address,destination_account:t.destination.address,destination_amount:v(r)};if("object"!==h(i.destination_amount)||i.destination_amount.issuer||(i.destination_amount.issuer=i.destination_account),t.source.currencies&&t.source.currencies.length>0&&(i.source_currencies=t.source.currencies.map(function(e){return _.omit(v(e),"value")})),t.source.amount){if(void 0!==t.destination.amount.value)throw new ValidationError("Cannot specify both source.amount and destination.amount.value in getPaths");i.send_max=v(t.source.amount),i.send_max.currency&&!i.send_max.issuer&&(i.send_max.issuer=t.source.address)}return e.request(i).then(function(e){return n(i,e)})}function o(e,t){var r=e.destination_amount;return new d(t).greaterThanOrEqualTo(r)&&e.alternatives.unshift({paths_computed:[],source_amount:e.destination_amount}),e}function s(e){return"object"===("undefined"==typeof e?"undefined":h(e))&&e.currency&&"XRP"!==e.currency}function a(e,t,r){return s(r.destination_amount)||!_.includes(r.destination_currencies,"XRP")?Promise.resolve(r):l.getXRPBalance(e,t,void 0).then(function(e){return o(r,e)})}function c(e,t){return e.source.amount&&void 0===e.destination.amount.value&&t.alternatives&&(t.alternatives=_.filter(t.alternatives,function(t){return t.source_amount&&e.source.amount&&new d(t.source_amount.value).eq(e.source.amount.value)})),t}function u(e,t){if(t.alternatives&&t.alternatives.length>0)return p(t);throw new NotFoundError(void 0===t.destination_currencies||_.includes(t.destination_currencies,e.destination.amount.currency)?t.source_currencies&&t.source_currencies.length>0?"No paths found. Please ensure that the source_account has sufficient funds to execute the payment in one of the specified source_currencies. If it does there may be insufficient liquidity in the network to execute this payment right now":"No paths found. Please ensure that the source_account has sufficient funds to execute the payment. If it does there may be insufficient liquidity in the network to execute this payment right now":"No paths found. The destination_account does not accept "+e.destination.amount.currency+", they only accept: "+t.destination_currencies.join(", "))}function f(e){var t=this;m.getPaths({pathfind:e});var r=e.source.address;return i(this.connection,e).then(function(e){return a(t.connection,r,e)}).then(function(t){return c(e,t)}).then(function(t){return u(e,t)})}var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},_=r(192),d=r(196),l=r(440),p=r(591),g=l.common,m=g.validate,v=g.toRippledAmount,NotFoundError=l.common.errors.NotFoundError,ValidationError=l.common.errors.ValidationError;e.exports=f},function(e,t,r){"use strict";function n(e){return e.map(function(e){return e.map(function(e){return _.omit(e,["type","type_hex"])})})}function i(e,t){return t.counterparty===e?_.omit(t,"counterparty"):t}function o(e,t){var r=_.keys(t)[0],n=t[r];return _.set({address:e},r,i(e,n))}function s(e,t,r,i){var s=void 0!==i.destination_amount?{source:{amount:c(i.source_amount)},destination:{minAmount:c(i.destination_amount)}}:{source:{maxAmount:c(i.source_amount)},destination:{amount:c(r)}};return{source:o(e,s.source),destination:o(t,s.destination),paths:JSON.stringify(n(i.paths_computed))}}function a(e){var t=e.source_account,r=e.destination_account,n=e.destination_amount;return e.alternatives.map(_.partial(s,t,r,n))}var _=r(192),c=r(448);e.exports=a},function(e,t,r){"use strict";function n(e,t,r,n,i){return e.request({command:"account_offers",account:t,marker:n,limit:o.clamp(i,10,400),ledger_index:r}).then(function(e){return{marker:e.marker,results:e.offers.map(_.partial(a,t))}})}function i(e){var t=this,r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return s.getOrders({address:e,options:r}),o.ensureLedgerVersion.call(this,r).then(function(r){var i=_.partial(n,t.connection,e,r.ledgerVersion);return o.getRecursive(i,r.limit).then(function(e){return _.sortBy(e,function(e){return e.properties.sequence})})})}var _=r(192),o=r(440),s=o.common.validate,a=r(593);e.exports=i},function(e,t,r){"use strict";function n(e,t){var r=new c(t.value).dividedBy(e.value);return r.toDigits(16,c.ROUND_HALF_UP).toString()}function i(e,t){var r=0===(t.flags&s.Sell)?"buy":"sell",i=a(t.taker_gets),c=a(t.taker_pays),u="buy"===r?c:i,f="buy"===r?i:c,h=o.removeUndefined({direction:r,quantity:u,totalPrice:f,passive:0!==(t.flags&s.Passive)||void 0,expirationTime:o.parseTimestamp(t.expiration)}),d=t.quality?o.adjustQualityForXRP(t.quality.toString(),i.currency,c.currency):n(i,c),l={maker:e,sequence:t.seq,makerExchangeRate:d};return{specification:h,properties:l}}var o=r(442),s=r(594).orderFlags,a=r(448),c=r(196);e.exports=i},function(e,t){"use strict";var r={Passive:65536,Sell:131072},n={LowReserve:65536,HighReserve:131072,LowAuth:262144,HighAuth:524288,LowNoRipple:1048576,HighNoRipple:2097152,LowFreeze:4194304,HighFreeze:8388608};e.exports={orderFlags:r,trustlineFlags:n}},function(e,t,r){"use strict";function n(e,t,r,n,i,o){return e.request(f.renameCounterpartyToIssuerInOrder({command:"book_offers",taker_gets:i,taker_pays:o,ledger_index:r||"validated",limit:n,taker:t})).then(function(e){return e.offers})}function i(e,t){return e.currency===t.currency&&e.counterparty===t.counterparty}function o(e,t){return t.specification.direction===e}function s(e){var t=e.specification,r={quantity:t.totalPrice,totalPrice:t.quantity,direction:"buy"===t.direction?"sell":"buy"},n=_.merge({},t,r);return _.merge({},e,{specification:n})}function a(e,t){var r=t.specification.quantity;return i(r,e)?t:s(t)}function c(e,t){var r=_.sortBy(t,"quality").map(d),n=r.map(_.partial(a,e.base)),i=n.filter(_.partial(o,"buy")),s=n.filter(_.partial(o,"sell"));return{bids:i,asks:s}}function u(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];h.getOrderbook({address:e,orderbook:t,options:r});var i=_.partial(n,this.connection,e,r.ledgerVersion,r.limit),o=_.partial(i,t.base,t.counter),s=_.partial(i,t.counter,t.base);return Promise.all([o(),s()]).then(function(e){return c(t,_.flatten(e))})}var _=r(192),f=r(440),h=f.common.validate,d=r(596);e.exports=u},function(e,t,r){"use strict";function n(e){var t=0===(e.Flags&o.Sell)?"buy":"sell",r=s(e.TakerGets),n=s(e.TakerPays),a="buy"===t?n:r,c="buy"===t?r:n,u=i.removeUndefined({direction:t,quantity:a,totalPrice:c,passive:0!==(e.Flags&o.Passive)||void 0,expirationTime:i.parseTimestamp(e.Expiration)}),f={maker:e.Account,sequence:e.Sequence,makerExchangeRate:i.adjustQualityForXRP(e.quality,r.currency,n.currency)},h=e.taker_gets_funded?s(e.taker_gets_funded):void 0,d=e.taker_pays_funded?s(e.taker_pays_funded):void 0,l=i.removeUndefined({fundedAmount:h,priceOfFundedAmount:d}),p=_.isEmpty(l)?void 0:l;return i.removeUndefined({specification:u,properties:f,state:p})}var _=r(192),i=r(442),o=r(594).orderFlags,s=r(448);e.exports=n},function(e,t,r){"use strict";function n(e){var t={};for(var r in u)e&u[r]&&(t[r]=!0);return t}function i(e){var t=e.account_data,r=n(t.Flags),i=a(t);return _.assign({},r,i)}function o(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];c.getSettings({address:e,options:t});var r={command:"account_info",account:e,ledger_index:t.ledgerVersion||"validated"};return this.connection.request(r).then(i)}var _=r(192),s=r(440),a=r(454),c=s.common.validate,u=s.common.constants.AccountFlags;e.exports=o},function(e,t,r){"use strict";function n(e){var t=e.account_data;return c({sequence:t.Sequence,xrpBalance:o.common.dropsToXrp(t.Balance),ownerCount:t.OwnerCount,previousInitiatedTransactionID:t.AccountTxnID,previousAffectingTransactionID:t.PreviousTxnID,previousAffectingTransactionLedgerVersion:t.PreviousTxnLgrSeq})}function i(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];a.getAccountInfo({address:e,options:t});var r={command:"account_info",account:e,ledger_index:t.ledgerVersion||"validated"};return this.connection.request(r).then(n)}var o=r(440),s=o.common,a=s.validate,c=s.removeUndefined;e.exports=i},function(e,t,r){"use strict";function n(e){var t=_.get(e,"source.maxAmount.currency",_.get(e,"source.amount.currency")),r=_.get(e,"destination.amount.currency",_.get(e,"destination.minAmount.currency"));return"XRP"===t&&"XRP"===r}function i(e){return e&&"XRP"!==e.currency&&void 0===e.counterparty}function o(e){_.forEach([e.source,e.destination],function(e){_.forEach(["amount","minAmount","maxAmount"],function(t){i(e[t])&&(e[t].counterparty=e.address)})})}function s(e){var t="100000000000",r="9999999999999999e80",n="XRP"===e.currency?t:r;return _.assign({},e,{value:n})}function a(e,t){var r=_.cloneDeep(t);if(o(r),e!==r.source.address)throw new ValidationError("address must match payment.source.address");if(r.source.maxAmount&&r.destination.minAmount||r.source.amount&&r.destination.amount)throw new ValidationError("payment must specify either (source.maxAmount and destination.amount) or (source.amount and destination.minAmount)");var i=r.destination.minAmount&&!n(r)?s(r.destination.minAmount):r.destination.amount||r.destination.minAmount,a={TransactionType:"Payment",Account:r.source.address,Destination:r.destination.address,Amount:h(i),Flags:0};if(void 0!==r.invoiceID&&(a.InvoiceID=r.invoiceID),void 0!==r.source.tag&&(a.SourceTag=r.source.tag),void 0!==r.destination.tag&&(a.DestinationTag=r.destination.tag),void 0!==r.memos&&(a.Memos=_.map(r.memos,u.convertMemo)),r.noDirectRipple===!0&&(a.Flags|=d.NoRippleDirect),r.limitQuality===!0&&(a.Flags|=d.LimitQuality),n(r)){if(r.allowPartialPayment===!0)throw new ValidationError("XRP to XRP payments cannot be partial payments")}else r.allowPartialPayment!==!0&&void 0===r.destination.minAmount||(a.Flags|=d.PartialPayment),a.SendMax=h(r.source.maxAmount||r.source.amount),void 0!==r.destination.minAmount&&(a.DeliverMin=h(r.destination.minAmount)),void 0!==r.paths&&(a.Paths=JSON.parse(r.paths));return a}function c(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];f.preparePayment({address:e,payment:t,instructions:r});var n=a(e,t);return u.prepareTransaction(n,this,r)}var _=r(192),u=r(600),f=u.common.validate,h=u.common.toRippledAmount,d=u.common.txFlags.Payment,ValidationError=u.common.errors.ValidationError;e.exports=c},function(e,t,r){(function(t){"use strict";function n(e){var t={fee:f.dropsToXrp(e.Fee),sequence:e.Sequence,maxLedgerVersion:void 0===e.LastLedgerSequence?null:e.LastLedgerSequence};return{txJSON:JSON.stringify(e),instructions:_.omit(t,_.isUndefined)}}function i(e){e.Flags|=h.Universal.FullyCanonicalSig,e.Flags=e.Flags>>>0}function o(e,t){return new u(e).times(t).toString()}function s(e,t,r){function s(){if(void 0!==r.maxLedgerVersion)return null!==r.maxLedgerVersion&&(e.LastLedgerSequence=r.maxLedgerVersion),Promise.resolve(e);var n=void 0!==r.maxLedgerVersionOffset?r.maxLedgerVersionOffset:3;return t.connection.getLedgerVersion().then(function(t){return e.LastLedgerSequence=t+n,e})}function a(){var n=void 0===r.signersCount?1:r.signersCount+1;if(void 0!==r.fee)return e.Fee=o(f.xrpToDrops(r.fee),n),Promise.resolve(e);var i=t._feeCushion;return f.serverInfo.getFee(t.connection,i).then(function(t){var i=f.xrpToDrops(t);if(void 0!==r.maxFee){var s=f.xrpToDrops(r.maxFee),a=u.min(i,s).toString();e.Fee=o(a,n)}else e.Fee=o(i,n);return e})}function c(){if(void 0!==r.sequence)return e.Sequence=r.sequence,Promise.resolve(e);var n={command:"account_info",account:h};return t.connection.request(n).then(function(t){return e.Sequence=t.account_data.Sequence,e})}f.validate.instructions(r);var h=e.Account;return i(e),Promise.all([s(),a(),c()]).then(function(){return n(e)})}function a(e){return e?new t(e,"utf8").toString("hex").toUpperCase():void 0}function c(e){return{Memo:f.removeUndefined({MemoData:a(e.data),MemoType:a(e.type),MemoFormat:a(e.format)})}}var _=r(192),u=r(196),f=r(194),h=f.txFlags;e.exports={convertStringToHex:a,convertMemo:c,prepareTransaction:s,common:f}}).call(t,r(204).Buffer)},function(e,t,r){"use strict";function n(e){return new u(e).shift(9).truncated().toNumber()}function i(e,t){var r={currency:t.currency,issuer:t.counterparty,value:t.limit},i={TransactionType:"TrustSet",Account:e,LimitAmount:r,Flags:0};return void 0!==t.qualityIn&&(i.QualityIn=n(t.qualityIn)),void 0!==t.qualityOut&&(i.QualityOut=n(t.qualityOut)),t.authorized===!0&&(i.Flags|=c.SetAuth),void 0!==t.ripplingDisabled&&(i.Flags|=t.ripplingDisabled?c.NoRipple:c.ClearNoRipple),void 0!==t.frozen&&(i.Flags|=t.frozen?c.SetFreeze:c.ClearFreeze),void 0!==t.memos&&(i.Memos=_.map(t.memos,s.convertMemo)),i}function o(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];a.prepareTrustline({address:e,trustline:t,instructions:r});var n=i(e,t);return s.prepareTransaction(n,this,r)}var _=r(192),s=r(600),a=s.common.validate,c=s.common.txFlags.TrustSet,u=r(196);e.exports=o},function(e,t,r){"use strict";function n(e,t){var r=o.common.toRippledAmount("buy"===t.direction?t.quantity:t.totalPrice),n=o.common.toRippledAmount("buy"===t.direction?t.totalPrice:t.quantity),i={TransactionType:"OfferCreate",Account:e,TakerGets:n,TakerPays:r,Flags:0};return"sell"===t.direction&&(i.Flags|=s.Sell),t.passive===!0&&(i.Flags|=s.Passive),t.immediateOrCancel===!0&&(i.Flags|=s.ImmediateOrCancel),t.fillOrKill===!0&&(i.Flags|=s.FillOrKill),void 0!==t.expirationTime&&(i.Expiration=u(t.expirationTime)),void 0!==t.memos&&(i.Memos=_.map(t.memos,o.convertMemo)),i}function i(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];c.prepareOrder({address:e,order:t,instructions:r});var i=n(e,t);return o.prepareTransaction(i,this,r)}var _=r(192),o=r(600),s=o.common.txFlags.OfferCreate,a=o.common,c=a.validate,u=a.iso8601ToRippleTime;e.exports=i},function(e,t,r){"use strict";function n(e,t){var r={TransactionType:"OfferCancel",Account:e,OfferSequence:t.orderSequence};return void 0!==t.memos&&(r.Memos=_.map(t.memos,o.convertMemo)),r}function i(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];s.prepareOrderCancellation({address:e,orderCancellation:t,instructions:r});var i=n(e,t);return o.prepareTransaction(i,this,r)}var _=r(192),o=r(600),s=o.common.validate;e.exports=i},function(e,t,r){"use strict";function n(e,t){var r={TransactionType:"SuspendedPaymentCreate",Account:e,Destination:t.destination.address,Amount:u(t.destination.amount)};return void 0!==t.digest&&(r.Digest=t.digest),void 0!==t.allowCancelAfter&&(r.CancelAfter=c(t.allowCancelAfter)),void 0!==t.allowExecuteAfter&&(r.FinishAfter=c(t.allowExecuteAfter)),void 0!==t.source.tag&&(r.SourceTag=t.source.tag),void 0!==t.destination.tag&&(r.DestinationTag=t.destination.tag),void 0!==t.memos&&(r.Memos=_.map(t.memos,o.convertMemo)),r}function i(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];a.prepareSuspendedPaymentCreation({address:e,suspendedPaymentCreation:t,instructions:r});var i=n(e,t);return o.prepareTransaction(i,this,r)}var _=r(192),o=r(600),s=o.common,a=s.validate,c=s.iso8601ToRippleTime,u=s.toRippledAmount;e.exports=i},function(e,t,r){"use strict";function n(e,t){var r={TransactionType:"SuspendedPaymentFinish",Account:e,Owner:t.owner,OfferSequence:t.suspensionSequence};return void 0!==t.method&&(r.Method=t.method),void 0!==t.digest&&(r.Digest=t.digest),void 0!==t.proof&&(r.Proof=o.convertStringToHex(t.proof)),void 0!==t.memos&&(r.Memos=_.map(t.memos,o.convertMemo)),r}function i(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];s.prepareSuspendedPaymentExecution({address:e,suspendedPaymentExecution:t,instructions:r});var i=n(e,t);return o.prepareTransaction(i,this,r)}var _=r(192),o=r(600),s=o.common.validate;e.exports=i},function(e,t,r){"use strict";function n(e,t){var r={TransactionType:"SuspendedPaymentCancel",Account:e,Owner:t.owner,OfferSequence:t.suspensionSequence};return void 0!==t.memos&&(r.Memos=_.map(t.memos,o.convertMemo)),r}function i(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];s.prepareSuspendedPaymentCancellation({address:e,suspendedPaymentCancellation:t,instructions:r});var i=n(e,t);return o.prepareTransaction(i,this,r)}var _=r(192),o=r(600),s=o.common.validate;e.exports=i},function(e,t,r){(function(t){"use strict";function n(e,t){var r=Object.keys(t);f(1===r.length,"ERROR: can only set one setting per transaction");var n=r[0],i=t[n],o=p[n];void 0!==o&&(i?e.SetFlag=o:e.ClearFlag=o)}function i(e,r){var n=g;for(var i in n){var o=n[i],s=r[o.name];void 0!==s&&(s===m&&o.hasOwnProperty("defaults")&&(s=o.defaults),"hex"!==o.encoding||o.length||(s=new t(s,"ascii").toString("hex").toUpperCase()),e[i]=s)}}function o(e){return new h(e).shift(9).toNumber()}function s(e){return{SignerEntry:{Account:e.address,SignerWeight:e.weight}}}function a(e,t){if(void 0!==t.regularKey){var r={TransactionType:"SetRegularKey",Account:e};return null===t.regularKey?r:_.assign({},r,{RegularKey:t.regularKey})}if(void 0!==t.signers)return{TransactionType:"SignerListSet",Account:e,SignerQuorum:t.signers.threshold,SignerEntries:_.map(t.signers.weights,s)};var a={TransactionType:"AccountSet",Account:e};return n(a,_.omit(t,"memos")),i(a,t),void 0!==a.TransferRate&&(a.TransferRate=o(a.TransferRate)),a}function c(e,t){var r=a(e,t);return void 0!==t.memos&&(r.Memos=_.map(t.memos,d.convertMemo)),r}function u(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];l.prepareSettings({address:e,settings:t,instructions:r});var n=c(e,t);return d.prepareTransaction(n,this,r)}var _=r(192),f=r(198),h=r(196),d=r(600),l=d.common.validate,p=d.common.constants.AccountFlagIndices,g=d.common.constants.AccountFields,m=null;e.exports=u}).call(t,r(204).Buffer)},function(e,t,r){"use strict";function n(e,t,r){var n=r?a.encodeForMultisigning(e,r):a.encodeForSigning(e);return s.sign(n,t)}function i(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];f.sign({txJSON:e,secret:t});var i=JSON.parse(e);if(i.TxnSignature||i.Signers)throw new o.common.errors.ValidationError('txJSON must not contain "TxnSignature" or "Signers" properties');var c=s.deriveKeypair(t);if(i.SigningPubKey=r.signAs?"":c.publicKey,r.signAs){var h={Account:r.signAs,SigningPubKey:c.publicKey,TxnSignature:n(i,c.privateKey,r.signAs)};i.Signers=[{Signer:h}]}else i.TxnSignature=n(i,c.privateKey);var d=a.encode(i);return{signedTransaction:d,id:u(d)}}var o=r(600),s=r(197),a=r(461),c=r(567),u=c.computeBinaryTransactionHash,f=o.common.validate;e.exports=i},function(e,t,r){(function(t){"use strict";function n(e){var r=new t(f(e)).toString("hex");return new c(r,16)}function i(e,t){return n(e.Signer.Account).comparedTo(n(t.Signer.Account))}function o(e){h.combine({signedTransactions:e});var t=_.map(e,s.decode),r=_.omit(t[0],"Signers");if(!_.every(t,function(e){return _.isEqual(r,_.omit(e,"Signers"))}))throw new a.common.errors.ValidationError("txJSON is not the same for all signedTransactions");var n=_.reduce(t,function(e,t){return e.concat(t.Signers||[])},[]),o=n.sort(i),c=_.assign({},r,{Signers:o}),u=s.encode(c),f=l(u);return{signedTransaction:u,id:f}}var _=r(192),s=r(461),a=r(600),c=r(196),u=r(249),f=u.decodeAddress,h=a.common.validate,d=r(567),l=d.computeBinaryTransactionHash;e.exports=o}).call(t,r(204).Buffer)},function(e,t,r){"use strict";function n(e){return _.startsWith(e,"tem")}function i(e){var t={resultCode:e.engine_result,resultMessage:e.engine_result_message};if(n(e.engine_result))throw new s.common.errors.RippledError("Submit failed",t);return t}function o(e){a.submit({signedTransaction:e});var t={command:"submit",tx_blob:e};return this.connection.request(t).then(i)}var _=r(192),s=r(600),a=s.common.validate;e.exports=o},function(e,t,r){"use strict";function n(e){var t=o.generateSeed(e),r=o.deriveKeypair(t),n=o.deriveAddress(r.publicKey);return{secret:t,address:n}}function i(e){c.generateAddress({options:e});try{return n(e)}catch(t){throw new a.UnexpectedError(t.message)}}var o=r(197),s=r(194),a=s.errors,c=s.validate;e.exports={generateAddressAPI:i}},function(e,t,r){"use strict";function n(e){return{account_hash:e.stateHash,close_time:c.iso8601ToRippleTime(e.closeTime),close_time_resolution:e.closeTimeResolution,close_flags:e.closeFlags,hash:e.ledgerHash,ledger_hash:e.ledgerHash,ledger_index:e.ledgerVersion.toString(),seqNum:e.ledgerVersion.toString(),parent_hash:e.parentLedgerHash,parent_close_time:c.iso8601ToRippleTime(e.parentCloseTime),total_coins:e.totalDrops,totalCoins:e.totalDrops,transaction_hash:e.transactionHash}}function i(e){var t=n(e);return u.computeLedgerHash(t)}function o(e){if(void 0===e.rawTransactions)return e.transactionHash;var t=JSON.parse(e.rawTransactions),r=_.map(t,function(e){var t=_.assign({},_.omit(e,"tx"),e.tx||{}),r=_.assign({},_.omit(t,"meta"),e.meta?{metaData:e.meta}:{});return r}),n=u.computeTransactionTreeHash(r);if(void 0!==e.transactionHash&&e.transactionHash!==n)throw new c.errors.ValidationError("transactionHash in header does not match computed hash of transactions");
  return n}function s(e){if(void 0===e.rawState)return e.stateHash;var t=JSON.parse(e.rawState),r=u.computeStateTreeHash(t);if(void 0!==e.stateHash&&e.stateHash!==r)throw new c.errors.ValidationError("stateHash in header does not match computed hash of state");return r}function a(e){var t={transactionHash:o(e),stateHash:s(e)};return i(_.assign({},e,t))}var _=r(192),c=r(194),u=r(567);e.exports=a},function(e,t,r){"use strict";function n(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];o.getLedger({options:e});var t={command:"ledger",ledger_index:e.ledgerVersion||"validated",expand:e.includeAllData,transactions:e.includeTransactions,accounts:e.includeState};return this.connection.request(t).then(function(e){return s(e.ledger)})}var i=r(440),o=i.common.validate,s=r(614);e.exports=n},function(e,t,r){"use strict";function n(e,t){var r=_.assign({},_.omit(t,"metaData"),{meta:t.metaData}),n=f(r);return n.outcome.ledgerVersion||(n.outcome.ledgerVersion=e),n}function i(e,t){return _.isEmpty(e)?{}:_.isString(e[0])?{transactionHashes:e}:{transactions:_.map(e,_.partial(n,t)),rawTransactions:JSON.stringify(e)}}function o(e){return _.isEmpty(e)?{}:_.isString(e[0])?{stateHashes:e}:{rawState:JSON.stringify(e)}}function s(e){var t=parseInt(e.ledger_index||e.seqNum,10);return c(_.assign({stateHash:e.account_hash,closeTime:u(e.close_time),closeTimeResolution:e.close_time_resolution,closeFlags:e.close_flags,ledgerHash:e.hash||e.ledger_hash,ledgerVersion:t,parentLedgerHash:e.parent_hash,parentCloseTime:u(e.parent_close_time),totalDrops:e.total_coins||e.totalCoins,transactionHash:e.transaction_hash},i(e.transactions,t),o(e.accountState)))}var _=r(192),a=r(442),c=a.removeUndefined,u=a.rippleTimeToISO8601,f=r(441);e.exports=s},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_=r(192),a=r(1).RippleAPI,c=function(e){function t(e,r){n(this,t);var o=i(this,Object.getPrototypeOf(t).call(this,r));o.ledgerVersion=0;var s=e.map(function(e){return new a(_.assign({},r,{server:e}))});o._apis=s,o.getMethodNames().forEach(function(e){o[e]=function(){var t=arguments;return Promise.race(s.map(function(r){return r[e].apply(r,t)}))}}),o.connect=function(){return Promise.all(s.map(function(e){return e.connect()}))},o.disconnect=function(){return Promise.all(s.map(function(e){return e.disconnect()}))},o.isConnected=function(){return _.every(s.map(function(e){return e.isConnected()}))};var c=s[0],u=["sign","generateAddress","computeLedgerHash"];return u.forEach(function(e){o[e]=c[e].bind(c)}),s.forEach(function(e){e.on("ledger",o.onLedgerEvent.bind(o)),e.on("error",function(e,t,r){return o.emit("error",e,t,r)})}),o}return o(t,e),s(t,[{key:"onLedgerEvent",value:function(e){e.ledgerVersion>this.ledgerVersion&&(this.ledgerVersion=e.ledgerVersion,this.emit("ledger",e))}},{key:"getMethodNames",value:function(){var e=[];for(var t in a.prototype)a.prototype.hasOwnProperty(t)&&"function"==typeof a.prototype[t]&&e.push(t);return e}}]),t}(a);e.exports={RippleAPIBroadcast:c}},function(e,t,r){"use strict";function n(e,t){function r(e,t,r){try{var s=r;if(!_.isArray(r)){var a=o.Utils.getParameterNames(n[e]);s=a.map(function(e){return r[e]});var c=_.omit(r,a);i(_.size(c)<=1,"Function must have no more than one default argument"),_.size(c)>0&&s.push(c[_.keys(c)[0]])}Promise.resolve(n[e].apply(n,s)).then(function(e){return t(null,e)})["catch"](function(e){t({code:99,message:e.message,data:{name:e.name}})})}catch(u){t({code:99,message:u.message,data:{name:u.name}})}}var n=new s(e),a=_.filter(_.keys(s.prototype),function(e){return"function"==typeof s.prototype[e]&&"connect"!==e&&"disconnect"!==e&&"constructor"!==e&&"RippleAPI"!==e}),c={};_.forEach(a,function(e){c[e]=o.Method(function(t,n){r(e,n,t)},{collect:!0})});var u=o.server(c),f=null;return{server:u,start:function(){return null!==f?Promise.reject("Already started"):new Promise(function(e){n.connect().then(function(){f=u.http(),f.listen(t,e)})})},stop:function(){return null===f?Promise.reject("Not started"):new Promise(function(e){n.disconnect(),f.close(function(){f=null,e()})})}}}var i=r(198),_=r(192),o=r(617),s=r(1).RippleAPI;e.exports={createHTTPServer:n}},function(e,t){}]);